Files
docx-js/ts/docx/paragraph/unordered-list.ts

30 lines
673 B
TypeScript
Raw Normal View History

2017-03-08 20:35:26 +00:00
import { Attributes, XmlComponent } from "../xml-components";
2016-03-30 02:55:11 +01:00
2016-04-09 20:16:35 +01:00
export class NumberProperties extends XmlComponent {
2016-05-26 15:08:34 +01:00
constructor(numberId: number, indentLevel: number) {
2016-04-09 20:16:35 +01:00
super("w:numPr");
this.root.push(new IndentLevel(indentLevel));
this.root.push(new NumberId(numberId));
2016-03-30 02:55:11 +01:00
}
}
2016-07-17 16:28:54 +01:00
class IndentLevel extends XmlComponent {
2016-04-03 01:44:18 +01:00
2016-03-30 02:55:11 +01:00
constructor(level: number) {
2016-04-09 20:16:35 +01:00
super("w:ilvl");
this.root.push(new Attributes({
2017-03-08 21:36:09 +00:00
val: level,
2016-03-30 02:55:11 +01:00
}));
}
}
2016-07-17 16:28:54 +01:00
class NumberId extends XmlComponent {
2016-03-30 02:55:11 +01:00
constructor(id: number) {
2016-04-09 20:16:35 +01:00
super("w:numId");
this.root.push(new Attributes({
2017-03-08 21:36:09 +00:00
val: id,
2016-03-30 02:55:11 +01:00
}));
}
2017-03-08 21:36:09 +00:00
}