added xmlKeys to xmlcomponent
This commit is contained in:
@ -3,6 +3,10 @@ import {XmlComponent, Attributes} from "../xml-components";
|
||||
class Border implements XmlComponent {
|
||||
private bottom: Array<XmlComponent>;
|
||||
|
||||
xmlKeys = {
|
||||
bottom: 'w:bottom'
|
||||
}
|
||||
|
||||
constructor() {
|
||||
this.bottom = new Array<XmlComponent>();
|
||||
this.bottom.push(new Attributes({
|
||||
@ -14,9 +18,13 @@ class Border implements XmlComponent {
|
||||
}
|
||||
}
|
||||
|
||||
export class ThematicBreak {
|
||||
export class ThematicBreak implements XmlComponent {
|
||||
private pBdr: Array<XmlComponent>;
|
||||
|
||||
xmlKeys = {
|
||||
pBdr: 'w:pBdr'
|
||||
}
|
||||
|
||||
constructor() {
|
||||
this.pBdr = new Array<XmlComponent>();
|
||||
this.pBdr.push(new Border());
|
||||
|
@ -7,8 +7,12 @@ import {TabStop} from "../tab-stop";
|
||||
import {Style} from "./style";
|
||||
import {NumberProperties} from "./unordered-list";
|
||||
|
||||
class Alignment {
|
||||
class Alignment implements XmlComponent {
|
||||
private jc: Array<XmlComponent>;
|
||||
|
||||
xmlKeys = {
|
||||
jc: 'w:jc'
|
||||
}
|
||||
|
||||
constructor(type: string) {
|
||||
this.jc = new Array<XmlComponent>();
|
||||
@ -18,9 +22,13 @@ class Alignment {
|
||||
}
|
||||
}
|
||||
|
||||
export class Paragraph {
|
||||
export class Paragraph implements XmlComponent {
|
||||
private p: Array<XmlComponent>;
|
||||
private properties: ParagraphProperties;
|
||||
|
||||
xmlKeys = {
|
||||
p: 'w:p'
|
||||
}
|
||||
|
||||
constructor(text?: string) {
|
||||
this.p = new Array<XmlComponent>();
|
||||
|
@ -3,6 +3,11 @@ import {Run} from "../run";
|
||||
|
||||
class Break implements XmlComponent {
|
||||
private br: Array<XmlComponent>;
|
||||
|
||||
xmlKeys = {
|
||||
br: 'w:br'
|
||||
}
|
||||
|
||||
constructor() {
|
||||
this.br = new Array<XmlComponent>();
|
||||
this.br.push(new Attributes({
|
||||
|
@ -2,6 +2,10 @@ import {XmlComponent, Attributes} from "../xml-components";
|
||||
|
||||
export class ParagraphProperties implements XmlComponent {
|
||||
private pPr: Array<XmlComponent>;
|
||||
|
||||
xmlKeys = {
|
||||
pPr: 'w:rPr'
|
||||
}
|
||||
|
||||
constructor() {
|
||||
this.pPr = new Array<XmlComponent>();
|
||||
|
@ -2,6 +2,10 @@ import {XmlComponent, Attributes} from "../xml-components";
|
||||
|
||||
export class Style implements XmlComponent {
|
||||
private pStyle: Array<XmlComponent>;
|
||||
|
||||
xmlKeys = {
|
||||
pStyle: 'w:pStyle'
|
||||
}
|
||||
|
||||
constructor(type: string) {
|
||||
this.pStyle = new Array<XmlComponent>();
|
||||
|
@ -4,6 +4,10 @@ import {Style} from "./style";
|
||||
export class NumberProperties implements XmlComponent {
|
||||
private numPr: Array<XmlComponent>;
|
||||
|
||||
xmlKeys = {
|
||||
numPr: 'w:numPr'
|
||||
}
|
||||
|
||||
constructor() {
|
||||
this.numPr = new Array<XmlComponent>();
|
||||
this.numPr.push(new IndentLevel(0));
|
||||
@ -13,7 +17,11 @@ export class NumberProperties implements XmlComponent {
|
||||
|
||||
export class IndentLevel implements XmlComponent {
|
||||
private ilvl: Array<XmlComponent>;
|
||||
|
||||
|
||||
xmlKeys = {
|
||||
ilvl: 'w:ilvl'
|
||||
}
|
||||
|
||||
constructor(level: number) {
|
||||
this.ilvl = new Array<XmlComponent>();
|
||||
this.ilvl.push(new Attributes({
|
||||
@ -24,7 +32,11 @@ export class IndentLevel implements XmlComponent {
|
||||
|
||||
export class NumberId implements XmlComponent {
|
||||
private ilvl: Array<XmlComponent>;
|
||||
|
||||
|
||||
xmlKeys = {
|
||||
ilvl: 'w:ilvl'
|
||||
}
|
||||
|
||||
constructor(id: number) {
|
||||
this.ilvl = new Array<XmlComponent>();
|
||||
this.ilvl.push(new Attributes({
|
||||
|
Reference in New Issue
Block a user