moved Begin, Separate and End from page-number.ts to field.ts
This commit is contained in:
@ -1,20 +1,9 @@
|
||||
import { XmlAttributeComponent, XmlComponent } from "file/xml-components";
|
||||
|
||||
class FidCharAttrs extends XmlAttributeComponent<{ type: "begin" | "end" | "separate" }> {
|
||||
protected xmlKeys = { type: "w:fldCharType" };
|
||||
}
|
||||
|
||||
class TextAttributes extends XmlAttributeComponent<{ space: "default" | "preserve" }> {
|
||||
protected xmlKeys = { space: "xml:space" };
|
||||
}
|
||||
|
||||
export class Begin extends XmlComponent {
|
||||
constructor() {
|
||||
super("w:fldChar");
|
||||
this.root.push(new FidCharAttrs({ type: "begin" }));
|
||||
}
|
||||
}
|
||||
|
||||
export class Page extends XmlComponent {
|
||||
constructor() {
|
||||
super("w:instrText");
|
||||
@ -22,17 +11,3 @@ export class Page extends XmlComponent {
|
||||
this.root.push("PAGE");
|
||||
}
|
||||
}
|
||||
|
||||
export class Separate extends XmlComponent {
|
||||
constructor() {
|
||||
super("w:fldChar");
|
||||
this.root.push(new FidCharAttrs({ type: "separate" }));
|
||||
}
|
||||
}
|
||||
|
||||
export class End extends XmlComponent {
|
||||
constructor() {
|
||||
super("w:fldChar");
|
||||
this.root.push(new FidCharAttrs({ type: "end" }));
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user