Revert unnecessary changes to sdt-properties
This commit is contained in:
@ -1,25 +1,10 @@
|
||||
// http://www.datypic.com/sc/ooxml/e-w_sdtPr-1.html
|
||||
import { CheckBoxUtil } from "@file/checkbox";
|
||||
import { StringValueElement, XmlComponent } from "@file/xml-components";
|
||||
|
||||
export type SdtPrChild =
|
||||
| CheckBoxUtil;
|
||||
|
||||
export interface ISdtPropertiesOptions {
|
||||
readonly children : readonly SdtPrChild[];
|
||||
}
|
||||
export class StructuredDocumentTagProperties extends XmlComponent {
|
||||
public constructor(alias?: string, options?: ISdtPropertiesOptions) {
|
||||
public constructor(alias: string) {
|
||||
super("w:sdtPr");
|
||||
|
||||
if(typeof alias === 'string'){
|
||||
this.root.push(new StringValueElement("w:alias", alias));
|
||||
}
|
||||
|
||||
if(options?.children){
|
||||
for(const child of options.children){
|
||||
this.root.push(child)
|
||||
}
|
||||
}
|
||||
this.root.push(new StringValueElement("w:alias", alias));
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user