diff --git a/ts/docx/document/body/columns.ts b/ts/docx/document/body/columns.ts index cd721c6f12..3a1b3a1f60 100644 --- a/ts/docx/document/body/columns.ts +++ b/ts/docx/document/body/columns.ts @@ -5,7 +5,7 @@ export class Columns extends XmlComponent { constructor() { super("w:cols"); this.root.push(new Attributes({ - space: "708" + space: "708", })); } -} \ No newline at end of file +} diff --git a/ts/docx/document/body/doc-grid.ts b/ts/docx/document/body/doc-grid.ts index e8437b8a38..dd3fba0e68 100644 --- a/ts/docx/document/body/doc-grid.ts +++ b/ts/docx/document/body/doc-grid.ts @@ -5,7 +5,7 @@ export class DocumentGrid extends XmlComponent { constructor() { super("w:docGrid"); this.root.push(new Attributes({ - linePitch: "360" + linePitch: "360", })); } } \ No newline at end of file diff --git a/ts/docx/document/body/index.ts b/ts/docx/document/body/index.ts index ae491e456b..edf9812f49 100644 --- a/ts/docx/document/body/index.ts +++ b/ts/docx/document/body/index.ts @@ -1,5 +1,5 @@ import { Attributes, XmlComponent } from "../../xml-components"; -import {SectionProperties} from "./section-properties"; +import { SectionProperties } from "./section-properties"; export class Body extends XmlComponent { @@ -8,7 +8,7 @@ export class Body extends XmlComponent { // this.root.push(new SectionProperties()); not actually needed } - push(component: XmlComponent) { + public push(component: XmlComponent): void { // this.root.splice(this.body.length - 1, 0, component); this.root.push(component); } diff --git a/ts/docx/document/body/page-size.ts b/ts/docx/document/body/page-size.ts index da19557c62..8259326347 100644 --- a/ts/docx/document/body/page-size.ts +++ b/ts/docx/document/body/page-size.ts @@ -6,7 +6,7 @@ export class PageSize extends XmlComponent { super("w:pgSz"); this.root.push(new Attributes({ w: "11906", - h: "16838" + h: "16838", })); } -} \ No newline at end of file +} diff --git a/ts/docx/document/document-attributes.ts b/ts/docx/document/document-attributes.ts index 2583de85eb..8c1572f632 100644 --- a/ts/docx/document/document-attributes.ts +++ b/ts/docx/document/document-attributes.ts @@ -52,7 +52,7 @@ export class DocumentAttributes extends XmlAttributeComponent { dcterms: "xmlns:dcterms", dcmitype: "xmlns:dcmitype", xsi: "xmlns:xsi", - type: "xsi:type" + type: "xsi:type", }, properties); this.root = properties; diff --git a/ts/docx/index.ts b/ts/docx/index.ts index 7556c20cd3..3c7ccdd38a 100644 --- a/ts/docx/index.ts +++ b/ts/docx/index.ts @@ -1,4 +1,4 @@ -export {Document} from "./document"; -export {Paragraph} from "./paragraph"; -export {Run} from "./run" -export {TextRun} from "./run/text-run" \ No newline at end of file +export { Document } from "./document"; +export { Paragraph } from "./paragraph"; +export { Run } from "./run"; +export { TextRun } from "./run/text-run"; diff --git a/ts/docx/paragraph/border.ts b/ts/docx/paragraph/border.ts index 326ce3f30f..f1c712662a 100644 --- a/ts/docx/paragraph/border.ts +++ b/ts/docx/paragraph/border.ts @@ -8,7 +8,7 @@ class Border extends XmlComponent { color: "auto", space: "1", val: "single", - sz: "6" + sz: "6", })); } } @@ -19,4 +19,4 @@ export class ThematicBreak extends XmlComponent { super("w:pBdr"); this.root.push(new Border()); } -} \ No newline at end of file +} diff --git a/ts/docx/paragraph/index.ts b/ts/docx/paragraph/index.ts index 06c58a7d46..368cdc1f5a 100644 --- a/ts/docx/paragraph/index.ts +++ b/ts/docx/paragraph/index.ts @@ -1,19 +1,19 @@ -import { Attributes, XmlComponent } from "../xml-components"; -import {ThematicBreak} from "./border"; -import {PageBreak} from "./page-break"; -import {TextRun} from "../run/text-run"; -import {ParagraphProperties} from "./properties"; -import {MaxRightTabStop, LeftTabStop} from "./tab-stop"; -import {Style} from "./style"; -import {NumberProperties} from "./unordered-list"; import { Num } from "../../numbering/num"; +import { TextRun } from "../run/text-run"; +import { Attributes, XmlComponent } from "../xml-components"; +import { ThematicBreak } from "./border"; +import { PageBreak } from "./page-break"; +import { ParagraphProperties } from "./properties"; +import { Style } from "./style"; +import { LeftTabStop, MaxRightTabStop } from "./tab-stop"; +import { NumberProperties } from "./unordered-list"; class Alignment extends XmlComponent { constructor(type: string) { super("w:jc"); this.root.push(new Attributes({ - val: type + val: type, })); } } @@ -30,82 +30,82 @@ export class Paragraph extends XmlComponent { } } - addText(run: TextRun): Paragraph { + public addText(run: TextRun): Paragraph { this.root.push(run); return this; } - heading1(): Paragraph { + public heading1(): Paragraph { this.properties.push(new Style("Heading1")); return this; } - heading2(): Paragraph { + public heading2(): Paragraph { this.properties.push(new Style("Heading2")); return this; } - heading3(): Paragraph { + public heading3(): Paragraph { this.properties.push(new Style("Heading3")); return this; } - heading4(): Paragraph { + public heading4(): Paragraph { this.properties.push(new Style("Heading4")); return this; } - heading5(): Paragraph { + public heading5(): Paragraph { this.properties.push(new Style("Heading5")); return this; } - title(): Paragraph { + public title(): Paragraph { this.properties.push(new Style("Title")); return this; } - center(): Paragraph { + public center(): Paragraph { this.properties.push(new Alignment("center")); return this; } - left(): Paragraph { + public left(): Paragraph { this.properties.push(new Alignment("left")); return this; } - right(): Paragraph { + public right(): Paragraph { this.properties.push(new Alignment("right")); return this; } - justified(): Paragraph { + public justified(): Paragraph { this.properties.push(new Alignment("both")); return this; } - thematicBreak(): Paragraph { + public thematicBreak(): Paragraph { this.properties.push(new ThematicBreak()); return this; } - pageBreak(): Paragraph { + public pageBreak(): Paragraph { this.properties.push(new PageBreak()); return this; } - maxRightTabStop(): Paragraph { + public maxRightTabStop(): Paragraph { this.properties.push(new MaxRightTabStop()); return this; } - leftTabStop(position: number): Paragraph { + public leftTabStop(position: number): Paragraph { this.properties.push(new LeftTabStop(position)); return this; } - bullet(): Paragraph { + public bullet(): Paragraph { this.properties.push(new Style("ListParagraph")); this.properties.push(new NumberProperties(1, 0)); return this; diff --git a/ts/docx/paragraph/page-break.ts b/ts/docx/paragraph/page-break.ts index 65761a3e3d..f6957d3e7b 100644 --- a/ts/docx/paragraph/page-break.ts +++ b/ts/docx/paragraph/page-break.ts @@ -1,12 +1,12 @@ +import { Run } from "../run"; import { Attributes, XmlComponent } from "../xml-components"; -import {Run} from "../run"; class Break extends XmlComponent { constructor() { super("w:br"); this.root.push(new Attributes({ - type: "page" + type: "page", })); } } @@ -17,4 +17,4 @@ export class PageBreak extends Run { super(); this.root.push(new Break()); } -} \ No newline at end of file +} diff --git a/ts/docx/paragraph/properties.ts b/ts/docx/paragraph/properties.ts index bbb5dd48fe..72e6c3059d 100644 --- a/ts/docx/paragraph/properties.ts +++ b/ts/docx/paragraph/properties.ts @@ -7,7 +7,7 @@ export class ParagraphProperties extends XmlComponent { this.root.push(new Attributes()); } - push(item: XmlComponent): void { + public push(item: XmlComponent): void { this.root.push(item); } -} \ No newline at end of file +} diff --git a/ts/docx/paragraph/style.ts b/ts/docx/paragraph/style.ts index 5b6c560ca4..9ac9b66086 100644 --- a/ts/docx/paragraph/style.ts +++ b/ts/docx/paragraph/style.ts @@ -5,7 +5,7 @@ export class Style extends XmlComponent { constructor(type: string) { super("w:pStyle"); this.root.push(new Attributes({ - val: type + val: type, })); } -} \ No newline at end of file +} diff --git a/ts/docx/paragraph/tab-stop.ts b/ts/docx/paragraph/tab-stop.ts index 8f04f75978..91b48f6720 100644 --- a/ts/docx/paragraph/tab-stop.ts +++ b/ts/docx/paragraph/tab-stop.ts @@ -10,11 +10,11 @@ class TabStop extends XmlComponent { class Tab extends XmlComponent { - constructor(value: string, position: any) { + constructor(value: string, position: number) { super("w:tab"); this.root.push(new Attributes({ val: value, - pos: position + pos: position.toString(), })); } } diff --git a/ts/docx/paragraph/unordered-list.ts b/ts/docx/paragraph/unordered-list.ts index a3b9006deb..faff9fd9a8 100644 --- a/ts/docx/paragraph/unordered-list.ts +++ b/ts/docx/paragraph/unordered-list.ts @@ -1,5 +1,5 @@ import { Attributes, XmlComponent } from "../xml-components"; -import {Style} from "./style"; +import { Style } from "./style"; export class NumberProperties extends XmlComponent { @@ -15,7 +15,7 @@ class IndentLevel extends XmlComponent { constructor(level: number) { super("w:ilvl"); this.root.push(new Attributes({ - val: level + val: level, })); } } @@ -24,7 +24,7 @@ class NumberId extends XmlComponent { constructor(id: number) { super("w:numId"); this.root.push(new Attributes({ - val: id + val: id, })); } -} \ No newline at end of file +}