now extends XmlComponent
This commit is contained in:
@ -1,45 +1,29 @@
|
||||
import {XmlComponent, Attributes} from "../xml-components";
|
||||
import {Style} from "./style";
|
||||
|
||||
export class NumberProperties implements XmlComponent {
|
||||
private numPr: Array<XmlComponent>;
|
||||
|
||||
xmlKeys = {
|
||||
numPr: 'w:numPr'
|
||||
}
|
||||
|
||||
export class NumberProperties extends XmlComponent {
|
||||
|
||||
constructor() {
|
||||
this.numPr = new Array<XmlComponent>();
|
||||
this.numPr.push(new IndentLevel(0));
|
||||
this.numPr.push(new NumberId(1));
|
||||
super("w:numPr");
|
||||
this.root.push(new IndentLevel(0));
|
||||
this.root.push(new NumberId(1));
|
||||
}
|
||||
}
|
||||
|
||||
export class IndentLevel implements XmlComponent {
|
||||
private ilvl: Array<XmlComponent>;
|
||||
|
||||
xmlKeys = {
|
||||
ilvl: 'w:ilvl'
|
||||
}
|
||||
export class IndentLevel extends XmlComponent {
|
||||
|
||||
constructor(level: number) {
|
||||
this.ilvl = new Array<XmlComponent>();
|
||||
this.ilvl.push(new Attributes({
|
||||
super("w:ilvl");
|
||||
this.root.push(new Attributes({
|
||||
val: level
|
||||
}));
|
||||
}
|
||||
}
|
||||
|
||||
export class NumberId implements XmlComponent {
|
||||
private ilvl: Array<XmlComponent>;
|
||||
|
||||
xmlKeys = {
|
||||
ilvl: 'w:ilvl'
|
||||
}
|
||||
|
||||
export class NumberId extends XmlComponent {
|
||||
constructor(id: number) {
|
||||
this.ilvl = new Array<XmlComponent>();
|
||||
this.ilvl.push(new Attributes({
|
||||
super("w:numId");
|
||||
this.root.push(new Attributes({
|
||||
val: id
|
||||
}));
|
||||
}
|
||||
|
Reference in New Issue
Block a user