2018-11-02 02:51:57 +00:00
|
|
|
import { SpaceType } from "file/space-type";
|
2018-05-12 20:04:54 -04:00
|
|
|
import { XmlAttributeComponent, XmlComponent } from "file/xml-components";
|
|
|
|
|
2018-11-02 02:51:57 +00:00
|
|
|
class TextAttributes extends XmlAttributeComponent<{ readonly space: SpaceType }> {
|
|
|
|
protected readonly xmlKeys = { space: "xml:space" };
|
2018-05-12 20:04:54 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
export class Page extends XmlComponent {
|
|
|
|
constructor() {
|
|
|
|
super("w:instrText");
|
2018-11-02 02:51:57 +00:00
|
|
|
this.root.push(new TextAttributes({ space: SpaceType.PRESERVE }));
|
2018-05-12 20:04:54 -04:00
|
|
|
this.root.push("PAGE");
|
|
|
|
}
|
|
|
|
}
|
2019-01-15 02:09:38 +00:00
|
|
|
|
|
|
|
export class NumberOfPages extends XmlComponent {
|
|
|
|
constructor() {
|
|
|
|
super("w:instrText");
|
|
|
|
this.root.push(new TextAttributes({ space: SpaceType.PRESERVE }));
|
|
|
|
this.root.push("NUMPAGES");
|
|
|
|
}
|
|
|
|
}
|
2019-08-09 11:56:22 +03:00
|
|
|
|
|
|
|
export class NumberOfPagesSection extends XmlComponent {
|
|
|
|
constructor() {
|
|
|
|
super("w:instrText");
|
|
|
|
this.root.push(new TextAttributes({ space: SpaceType.PRESERVE }));
|
|
|
|
this.root.push("SECTIONPAGES");
|
|
|
|
}
|
|
|
|
}
|