updated clone deep dependency and make fields dirty to be updated when word is opened
This commit is contained in:
@ -1,26 +1,26 @@
|
||||
import { XmlAttributeComponent, XmlComponent } from "file/xml-components";
|
||||
|
||||
class FidCharAttrs extends XmlAttributeComponent<{ type: "begin" | "end" | "separate" }> {
|
||||
protected xmlKeys = { type: "w:fldCharType" };
|
||||
class FidCharAttrs extends XmlAttributeComponent<{ type: "begin" | "end" | "separate"; dirty?: boolean }> {
|
||||
protected xmlKeys = { type: "w:fldCharType", dirty: "w:dirty" };
|
||||
}
|
||||
|
||||
export class Begin extends XmlComponent {
|
||||
constructor() {
|
||||
constructor(dirty?: boolean) {
|
||||
super("w:fldChar");
|
||||
this.root.push(new FidCharAttrs({ type: "begin" }));
|
||||
this.root.push(new FidCharAttrs({ type: "begin", dirty }));
|
||||
}
|
||||
}
|
||||
|
||||
export class Separate extends XmlComponent {
|
||||
constructor() {
|
||||
constructor(dirty?: boolean) {
|
||||
super("w:fldChar");
|
||||
this.root.push(new FidCharAttrs({ type: "separate" }));
|
||||
this.root.push(new FidCharAttrs({ type: "separate", dirty }));
|
||||
}
|
||||
}
|
||||
|
||||
export class End extends XmlComponent {
|
||||
constructor() {
|
||||
constructor(dirty?: boolean) {
|
||||
super("w:fldChar");
|
||||
this.root.push(new FidCharAttrs({ type: "end" }));
|
||||
this.root.push(new FidCharAttrs({ type: "end", dirty }));
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user