@office-open/docx 0.4.4 → 0.4.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +11 -11
- package/dist/index.d.mts +52 -50
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +94 -280
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -3
package/dist/index.mjs
CHANGED
|
@@ -1716,57 +1716,6 @@ const createRunFonts = (nameOrAttrs, hint) => {
|
|
|
1716
1716
|
});
|
|
1717
1717
|
};
|
|
1718
1718
|
//#endregion
|
|
1719
|
-
//#region src/file/paragraph/run/script.ts
|
|
1720
|
-
/**
|
|
1721
|
-
* Subscript and superscript module for WordprocessingML documents.
|
|
1722
|
-
*
|
|
1723
|
-
* This module provides vertical alignment elements for subscript
|
|
1724
|
-
* and superscript text formatting.
|
|
1725
|
-
*
|
|
1726
|
-
* Reference: http://officeopenxml.com/WPtextFormatting.php
|
|
1727
|
-
*
|
|
1728
|
-
* ## XSD Schema
|
|
1729
|
-
* ```xml
|
|
1730
|
-
* <xsd:complexType name="CT_VerticalAlignRun">
|
|
1731
|
-
* <xsd:attribute name="val" type="ST_VerticalAlignRun" use="required"/>
|
|
1732
|
-
* </xsd:complexType>
|
|
1733
|
-
* <xsd:simpleType name="ST_VerticalAlignRun">
|
|
1734
|
-
* <xsd:restriction base="xsd:string">
|
|
1735
|
-
* <xsd:enumeration value="baseline"/>
|
|
1736
|
-
* <xsd:enumeration value="superscript"/>
|
|
1737
|
-
* <xsd:enumeration value="subscript"/>
|
|
1738
|
-
* </xsd:restriction>
|
|
1739
|
-
* </xsd:simpleType>
|
|
1740
|
-
* ```
|
|
1741
|
-
*
|
|
1742
|
-
* @module
|
|
1743
|
-
*/
|
|
1744
|
-
/**
|
|
1745
|
-
* Creates a vertical alignment run element.
|
|
1746
|
-
* @internal
|
|
1747
|
-
*/
|
|
1748
|
-
const createVerticalAlignRun = (type) => new BuilderElement({
|
|
1749
|
-
attributes: { val: {
|
|
1750
|
-
key: "w:val",
|
|
1751
|
-
value: type
|
|
1752
|
-
} },
|
|
1753
|
-
name: "w:vertAlign"
|
|
1754
|
-
});
|
|
1755
|
-
/**
|
|
1756
|
-
* Creates superscript text formatting.
|
|
1757
|
-
*
|
|
1758
|
-
* Raises text above the baseline, commonly used for exponents
|
|
1759
|
-
* and ordinal indicators.
|
|
1760
|
-
*/
|
|
1761
|
-
const createSuperScript = () => createVerticalAlignRun("superscript");
|
|
1762
|
-
/**
|
|
1763
|
-
* Creates subscript text formatting.
|
|
1764
|
-
*
|
|
1765
|
-
* Lowers text below the baseline, commonly used for chemical
|
|
1766
|
-
* formulas and footnote references.
|
|
1767
|
-
*/
|
|
1768
|
-
const createSubScript = () => createVerticalAlignRun("subscript");
|
|
1769
|
-
//#endregion
|
|
1770
1719
|
//#region src/file/paragraph/run/underline.ts
|
|
1771
1720
|
/**
|
|
1772
1721
|
* Underline module for WordprocessingML documents.
|
|
@@ -2012,53 +1961,11 @@ var RunProperties = class extends IgnoreIfEmptyXmlComponent {
|
|
|
2012
1961
|
constructor(options) {
|
|
2013
1962
|
super("w:rPr");
|
|
2014
1963
|
if (!options) return;
|
|
2015
|
-
|
|
2016
|
-
if (
|
|
2017
|
-
|
|
2018
|
-
|
|
2019
|
-
|
|
2020
|
-
if (options.boldComplexScript === void 0 && options.bold !== void 0 || options.boldComplexScript) this.push(new OnOffElement("w:bCs", options.boldComplexScript ?? options.bold));
|
|
2021
|
-
if (options.italics !== void 0) this.push(new OnOffElement("w:i", options.italics));
|
|
2022
|
-
if (options.italicsComplexScript === void 0 && options.italics !== void 0 || options.italicsComplexScript) this.push(new OnOffElement("w:iCs", options.italicsComplexScript ?? options.italics));
|
|
2023
|
-
if (options.smallCaps !== void 0) this.push(new OnOffElement("w:smallCaps", options.smallCaps));
|
|
2024
|
-
else if (options.allCaps !== void 0) this.push(new OnOffElement("w:caps", options.allCaps));
|
|
2025
|
-
if (options.strike !== void 0) this.push(new OnOffElement("w:strike", options.strike));
|
|
2026
|
-
if (options.doubleStrike !== void 0) this.push(new OnOffElement("w:dstrike", options.doubleStrike));
|
|
2027
|
-
if (options.emboss !== void 0) this.push(new OnOffElement("w:emboss", options.emboss));
|
|
2028
|
-
if (options.imprint !== void 0) this.push(new OnOffElement("w:imprint", options.imprint));
|
|
2029
|
-
if (options.outline !== void 0) this.push(new OnOffElement("w:outline", options.outline));
|
|
2030
|
-
if (options.shadow !== void 0) this.push(new OnOffElement("w:shadow", options.shadow));
|
|
2031
|
-
if (options.webHidden !== void 0) this.push(new OnOffElement("w:webHidden", options.webHidden));
|
|
2032
|
-
if (options.noProof !== void 0) this.push(new OnOffElement("w:noProof", options.noProof));
|
|
2033
|
-
if (options.snapToGrid !== void 0) this.push(new OnOffElement("w:snapToGrid", options.snapToGrid));
|
|
2034
|
-
if (options.vanish) this.push(new OnOffElement("w:vanish", options.vanish));
|
|
2035
|
-
if (options.color) this.push(new Color(options.color));
|
|
2036
|
-
if (options.characterSpacing) this.push(new CharacterSpacing(options.characterSpacing));
|
|
2037
|
-
if (options.scale !== void 0) this.push(new NumberValueElement("w:w", options.scale));
|
|
2038
|
-
if (options.kern) this.push(new HpsMeasureElement("w:kern", options.kern));
|
|
2039
|
-
if (options.position) this.push(new StringValueElement("w:position", options.position));
|
|
2040
|
-
if (options.size !== void 0) this.push(new HpsMeasureElement("w:sz", options.size));
|
|
2041
|
-
const szCs = options.sizeComplexScript === void 0 || options.sizeComplexScript === true ? options.size : options.sizeComplexScript;
|
|
2042
|
-
if (szCs) this.push(new HpsMeasureElement("w:szCs", szCs));
|
|
2043
|
-
if (options.highlight) this.push(new Highlight(options.highlight));
|
|
2044
|
-
if (options.highlightComplexScript === true) {
|
|
2045
|
-
if (options.highlight) this.push(new HighlightComplexScript(options.highlight));
|
|
2046
|
-
} else if (options.highlightComplexScript !== void 0 && options.highlightComplexScript !== false) this.push(new HighlightComplexScript(options.highlightComplexScript));
|
|
2047
|
-
if (options.underline) this.push(createUnderline(options.underline.type, options.underline.color));
|
|
2048
|
-
if (options.effect) this.push(new StringValueElement("w:effect", options.effect));
|
|
2049
|
-
if (options.border) this.push(createBorderElement("w:bdr", options.border));
|
|
2050
|
-
if (options.shading) this.push(createShading(options.shading));
|
|
2051
|
-
if (options.subScript) this.push(createSubScript());
|
|
2052
|
-
if (options.superScript) this.push(createSuperScript());
|
|
2053
|
-
if (options.rightToLeft !== void 0) this.push(new OnOffElement("w:rtl", options.rightToLeft));
|
|
2054
|
-
if (options.emphasisMark) this.push(createEmphasisMark(options.emphasisMark.type));
|
|
2055
|
-
if (options.language) this.push(createLanguageComponent(options.language));
|
|
2056
|
-
if (options.specVanish) this.push(new OnOffElement("w:specVanish", options.specVanish));
|
|
2057
|
-
if (options.math) this.push(new OnOffElement("w:oMath", options.math));
|
|
2058
|
-
if (options.fitText !== void 0) this.push(new NumberValueElement("w:fitText", options.fitText));
|
|
2059
|
-
if (options.complexScript !== void 0) this.push(new OnOffElement("w:cs", options.complexScript));
|
|
2060
|
-
if (options.eastAsianLayout) this.push(createEastAsianLayout(options.eastAsianLayout));
|
|
2061
|
-
if (options.revision) this.push(new RunPropertiesChange(options.revision));
|
|
1964
|
+
const result = buildRunProperties(options);
|
|
1965
|
+
if (result) {
|
|
1966
|
+
const children = result["w:rPr"];
|
|
1967
|
+
if (Array.isArray(children)) this.root.push(...children);
|
|
1968
|
+
}
|
|
2062
1969
|
}
|
|
2063
1970
|
push(item) {
|
|
2064
1971
|
this.root.push(item);
|
|
@@ -15759,59 +15666,91 @@ var EndnotesWrapper = class {
|
|
|
15759
15666
|
}
|
|
15760
15667
|
};
|
|
15761
15668
|
//#endregion
|
|
15762
|
-
//#region src/file/footer
|
|
15669
|
+
//#region src/file/header-footer-base.ts
|
|
15763
15670
|
/**
|
|
15764
|
-
*
|
|
15765
|
-
*
|
|
15766
|
-
* This class handles the serialization of namespace declarations that are required
|
|
15767
|
-
* for proper XML validation and processing of footer content in WordprocessingML documents.
|
|
15671
|
+
* Shared base class for header and footer XML components.
|
|
15768
15672
|
*
|
|
15769
|
-
* @
|
|
15770
|
-
* ```typescript
|
|
15771
|
-
* new FooterAttributes({
|
|
15772
|
-
* w: "http://schemas.openxmlformats.org/wordprocessingml/2006/main",
|
|
15773
|
-
* r: "http://schemas.openxmlformats.org/officeDocument/2006/relationships"
|
|
15774
|
-
* });
|
|
15775
|
-
* ```
|
|
15673
|
+
* @module
|
|
15776
15674
|
*/
|
|
15777
|
-
|
|
15778
|
-
|
|
15779
|
-
|
|
15780
|
-
|
|
15781
|
-
|
|
15782
|
-
|
|
15783
|
-
|
|
15784
|
-
|
|
15785
|
-
|
|
15786
|
-
|
|
15787
|
-
|
|
15788
|
-
|
|
15789
|
-
|
|
15790
|
-
|
|
15791
|
-
|
|
15792
|
-
|
|
15793
|
-
|
|
15794
|
-
|
|
15795
|
-
|
|
15796
|
-
|
|
15797
|
-
|
|
15798
|
-
|
|
15799
|
-
|
|
15800
|
-
|
|
15801
|
-
|
|
15675
|
+
/**
|
|
15676
|
+
* Namespace keys used by header elements.
|
|
15677
|
+
* @internal
|
|
15678
|
+
*/
|
|
15679
|
+
const HEADER_NAMESPACES = [
|
|
15680
|
+
"cx",
|
|
15681
|
+
"cx1",
|
|
15682
|
+
"cx2",
|
|
15683
|
+
"cx3",
|
|
15684
|
+
"cx4",
|
|
15685
|
+
"cx5",
|
|
15686
|
+
"cx6",
|
|
15687
|
+
"cx7",
|
|
15688
|
+
"cx8",
|
|
15689
|
+
"m",
|
|
15690
|
+
"mc",
|
|
15691
|
+
"o",
|
|
15692
|
+
"r",
|
|
15693
|
+
"v",
|
|
15694
|
+
"w",
|
|
15695
|
+
"w10",
|
|
15696
|
+
"w14",
|
|
15697
|
+
"w15",
|
|
15698
|
+
"w16cid",
|
|
15699
|
+
"w16se",
|
|
15700
|
+
"wne",
|
|
15701
|
+
"wp",
|
|
15702
|
+
"wp14",
|
|
15703
|
+
"wpc",
|
|
15704
|
+
"wpg",
|
|
15705
|
+
"wpi",
|
|
15706
|
+
"wps"
|
|
15707
|
+
];
|
|
15708
|
+
/**
|
|
15709
|
+
* Namespace keys used by footer elements.
|
|
15710
|
+
* @internal
|
|
15711
|
+
*/
|
|
15712
|
+
const FOOTER_NAMESPACES = [
|
|
15713
|
+
"m",
|
|
15714
|
+
"mc",
|
|
15715
|
+
"o",
|
|
15716
|
+
"r",
|
|
15717
|
+
"v",
|
|
15718
|
+
"w",
|
|
15719
|
+
"w10",
|
|
15720
|
+
"w14",
|
|
15721
|
+
"w15",
|
|
15722
|
+
"wne",
|
|
15723
|
+
"wp",
|
|
15724
|
+
"wp14",
|
|
15725
|
+
"wpc",
|
|
15726
|
+
"wpg",
|
|
15727
|
+
"wpi",
|
|
15728
|
+
"wps"
|
|
15729
|
+
];
|
|
15730
|
+
/**
|
|
15731
|
+
* Base class for header (w:hdr) and footer (w:ftr) XML components.
|
|
15732
|
+
*
|
|
15733
|
+
* Both share the same structure: namespace attributes, reference ID,
|
|
15734
|
+
* and block-level child elements. This base class eliminates the
|
|
15735
|
+
* duplication between Header and Footer internal implementations.
|
|
15736
|
+
*/
|
|
15737
|
+
var HeaderFooterBase = class extends InitializableXmlComponent {
|
|
15738
|
+
refId;
|
|
15739
|
+
constructor(tagName, referenceNumber, namespaces, initContent) {
|
|
15740
|
+
super(tagName, initContent);
|
|
15741
|
+
this.refId = referenceNumber;
|
|
15742
|
+
if (!initContent) this.root.push(buildDocumentAttributes(namespaces));
|
|
15743
|
+
}
|
|
15744
|
+
get ReferenceId() {
|
|
15745
|
+
return this.refId;
|
|
15746
|
+
}
|
|
15747
|
+
add(item) {
|
|
15748
|
+
this.root.push(item);
|
|
15749
|
+
}
|
|
15802
15750
|
};
|
|
15803
15751
|
//#endregion
|
|
15804
15752
|
//#region src/file/footer/footer.ts
|
|
15805
15753
|
/**
|
|
15806
|
-
* Footer module for WordprocessingML documents.
|
|
15807
|
-
*
|
|
15808
|
-
* Footers are repeated at the bottom of each page in a section.
|
|
15809
|
-
*
|
|
15810
|
-
* Reference: http://officeopenxml.com/WPfooters.php
|
|
15811
|
-
*
|
|
15812
|
-
* @module
|
|
15813
|
-
*/
|
|
15814
|
-
/**
|
|
15815
15754
|
* Represents a footer in a WordprocessingML document.
|
|
15816
15755
|
*
|
|
15817
15756
|
* A footer is the portion of the document that appears at the bottom of each page in a section.
|
|
@@ -15849,35 +15788,9 @@ var FooterAttributes = class extends XmlAttributeComponent {
|
|
|
15849
15788
|
* }));
|
|
15850
15789
|
* ```
|
|
15851
15790
|
*/
|
|
15852
|
-
var Footer$1 = class extends
|
|
15853
|
-
refId;
|
|
15791
|
+
var Footer$1 = class extends HeaderFooterBase {
|
|
15854
15792
|
constructor(referenceNumber, initContent) {
|
|
15855
|
-
super("w:ftr", initContent);
|
|
15856
|
-
this.refId = referenceNumber;
|
|
15857
|
-
if (!initContent) this.root.push(new FooterAttributes({
|
|
15858
|
-
m: "http://schemas.openxmlformats.org/officeDocument/2006/math",
|
|
15859
|
-
mc: "http://schemas.openxmlformats.org/markup-compatibility/2006",
|
|
15860
|
-
o: "urn:schemas-microsoft-com:office:office",
|
|
15861
|
-
r: "http://schemas.openxmlformats.org/officeDocument/2006/relationships",
|
|
15862
|
-
v: "urn:schemas-microsoft-com:vml",
|
|
15863
|
-
w: "http://schemas.openxmlformats.org/wordprocessingml/2006/main",
|
|
15864
|
-
w10: "urn:schemas-microsoft-com:office:word",
|
|
15865
|
-
w14: "http://schemas.microsoft.com/office/word/2010/wordml",
|
|
15866
|
-
w15: "http://schemas.microsoft.com/office/word/2012/wordml",
|
|
15867
|
-
wne: "http://schemas.microsoft.com/office/word/2006/wordml",
|
|
15868
|
-
wp: "http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing",
|
|
15869
|
-
wp14: "http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing",
|
|
15870
|
-
wpc: "http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas",
|
|
15871
|
-
wpg: "http://schemas.microsoft.com/office/word/2010/wordprocessingGroup",
|
|
15872
|
-
wpi: "http://schemas.microsoft.com/office/word/2010/wordprocessingInk",
|
|
15873
|
-
wps: "http://schemas.microsoft.com/office/word/2010/wordprocessingShape"
|
|
15874
|
-
}));
|
|
15875
|
-
}
|
|
15876
|
-
get ReferenceId() {
|
|
15877
|
-
return this.refId;
|
|
15878
|
-
}
|
|
15879
|
-
add(item) {
|
|
15880
|
-
this.root.push(item);
|
|
15793
|
+
super("w:ftr", referenceNumber, FOOTER_NAMESPACES, initContent);
|
|
15881
15794
|
}
|
|
15882
15795
|
};
|
|
15883
15796
|
//#endregion
|
|
@@ -16251,70 +16164,8 @@ var FootnotesWrapper = class {
|
|
|
16251
16164
|
}
|
|
16252
16165
|
};
|
|
16253
16166
|
//#endregion
|
|
16254
|
-
//#region src/file/header/header-attributes.ts
|
|
16255
|
-
/**
|
|
16256
|
-
* Component for managing XML namespace attributes on header elements.
|
|
16257
|
-
*
|
|
16258
|
-
* This class handles the serialization of namespace declarations that are required
|
|
16259
|
-
* for proper XML validation and processing of header content in WordprocessingML documents.
|
|
16260
|
-
*
|
|
16261
|
-
* @example
|
|
16262
|
-
* ```typescript
|
|
16263
|
-
* new HeaderAttributes({
|
|
16264
|
-
* w: "http://schemas.openxmlformats.org/wordprocessingml/2006/main",
|
|
16265
|
-
* r: "http://schemas.openxmlformats.org/officeDocument/2006/relationships"
|
|
16266
|
-
* });
|
|
16267
|
-
* ```
|
|
16268
|
-
*/
|
|
16269
|
-
var HeaderAttributes = class extends XmlAttributeComponent {
|
|
16270
|
-
xmlKeys = {
|
|
16271
|
-
cp: "xmlns:cp",
|
|
16272
|
-
cx: "xmlns:cx",
|
|
16273
|
-
cx1: "xmlns:cx1",
|
|
16274
|
-
cx2: "xmlns:cx2",
|
|
16275
|
-
cx3: "xmlns:cx3",
|
|
16276
|
-
cx4: "xmlns:cx4",
|
|
16277
|
-
cx5: "xmlns:cx5",
|
|
16278
|
-
cx6: "xmlns:cx6",
|
|
16279
|
-
cx7: "xmlns:cx7",
|
|
16280
|
-
cx8: "xmlns:cx8",
|
|
16281
|
-
dc: "xmlns:dc",
|
|
16282
|
-
dcmitype: "xmlns:dcmitype",
|
|
16283
|
-
dcterms: "xmlns:dcterms",
|
|
16284
|
-
m: "xmlns:m",
|
|
16285
|
-
mc: "xmlns:mc",
|
|
16286
|
-
o: "xmlns:o",
|
|
16287
|
-
r: "xmlns:r",
|
|
16288
|
-
type: "xsi:type",
|
|
16289
|
-
v: "xmlns:v",
|
|
16290
|
-
w: "xmlns:w",
|
|
16291
|
-
w10: "xmlns:w10",
|
|
16292
|
-
w14: "xmlns:w14",
|
|
16293
|
-
w15: "xmlns:w15",
|
|
16294
|
-
w16cid: "xmlns:w16cid",
|
|
16295
|
-
w16se: "xmlns:w16se",
|
|
16296
|
-
wne: "xmlns:wne",
|
|
16297
|
-
wp: "xmlns:wp",
|
|
16298
|
-
wp14: "xmlns:wp14",
|
|
16299
|
-
wpc: "xmlns:wpc",
|
|
16300
|
-
wpg: "xmlns:wpg",
|
|
16301
|
-
wpi: "xmlns:wpi",
|
|
16302
|
-
wps: "xmlns:wps",
|
|
16303
|
-
xsi: "xmlns:xsi"
|
|
16304
|
-
};
|
|
16305
|
-
};
|
|
16306
|
-
//#endregion
|
|
16307
16167
|
//#region src/file/header/header.ts
|
|
16308
16168
|
/**
|
|
16309
|
-
* Header module for WordprocessingML documents.
|
|
16310
|
-
*
|
|
16311
|
-
* Headers are repeated at the top of each page in a section.
|
|
16312
|
-
*
|
|
16313
|
-
* Reference: http://officeopenxml.com/WPheaders.php
|
|
16314
|
-
*
|
|
16315
|
-
* @module
|
|
16316
|
-
*/
|
|
16317
|
-
/**
|
|
16318
16169
|
* Represents a header in a WordprocessingML document.
|
|
16319
16170
|
*
|
|
16320
16171
|
* A header is the portion of the document that appears at the top of each page in a section.
|
|
@@ -16349,46 +16200,9 @@ var HeaderAttributes = class extends XmlAttributeComponent {
|
|
|
16349
16200
|
* }));
|
|
16350
16201
|
* ```
|
|
16351
16202
|
*/
|
|
16352
|
-
var Header$1 = class extends
|
|
16353
|
-
refId;
|
|
16203
|
+
var Header$1 = class extends HeaderFooterBase {
|
|
16354
16204
|
constructor(referenceNumber, initContent) {
|
|
16355
|
-
super("w:hdr", initContent);
|
|
16356
|
-
this.refId = referenceNumber;
|
|
16357
|
-
if (!initContent) this.root.push(new HeaderAttributes({
|
|
16358
|
-
cx: "http://schemas.microsoft.com/office/drawing/2014/chartex",
|
|
16359
|
-
cx1: "http://schemas.microsoft.com/office/drawing/2015/9/8/chartex",
|
|
16360
|
-
cx2: "http://schemas.microsoft.com/office/drawing/2015/10/21/chartex",
|
|
16361
|
-
cx3: "http://schemas.microsoft.com/office/drawing/2016/5/9/chartex",
|
|
16362
|
-
cx4: "http://schemas.microsoft.com/office/drawing/2016/5/10/chartex",
|
|
16363
|
-
cx5: "http://schemas.microsoft.com/office/drawing/2016/5/11/chartex",
|
|
16364
|
-
cx6: "http://schemas.microsoft.com/office/drawing/2016/5/12/chartex",
|
|
16365
|
-
cx7: "http://schemas.microsoft.com/office/drawing/2016/5/13/chartex",
|
|
16366
|
-
cx8: "http://schemas.microsoft.com/office/drawing/2016/5/14/chartex",
|
|
16367
|
-
m: "http://schemas.openxmlformats.org/officeDocument/2006/math",
|
|
16368
|
-
mc: "http://schemas.openxmlformats.org/markup-compatibility/2006",
|
|
16369
|
-
o: "urn:schemas-microsoft-com:office:office",
|
|
16370
|
-
r: "http://schemas.openxmlformats.org/officeDocument/2006/relationships",
|
|
16371
|
-
v: "urn:schemas-microsoft-com:vml",
|
|
16372
|
-
w: "http://schemas.openxmlformats.org/wordprocessingml/2006/main",
|
|
16373
|
-
w10: "urn:schemas-microsoft-com:office:word",
|
|
16374
|
-
w14: "http://schemas.microsoft.com/office/word/2010/wordml",
|
|
16375
|
-
w15: "http://schemas.microsoft.com/office/word/2012/wordml",
|
|
16376
|
-
w16cid: "http://schemas.microsoft.com/office/word/2016/wordml/cid",
|
|
16377
|
-
w16se: "http://schemas.microsoft.com/office/word/2015/wordml/symex",
|
|
16378
|
-
wne: "http://schemas.microsoft.com/office/word/2006/wordml",
|
|
16379
|
-
wp: "http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing",
|
|
16380
|
-
wp14: "http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing",
|
|
16381
|
-
wpc: "http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas",
|
|
16382
|
-
wpg: "http://schemas.microsoft.com/office/word/2010/wordprocessingGroup",
|
|
16383
|
-
wpi: "http://schemas.microsoft.com/office/word/2010/wordprocessingInk",
|
|
16384
|
-
wps: "http://schemas.microsoft.com/office/word/2010/wordprocessingShape"
|
|
16385
|
-
}));
|
|
16386
|
-
}
|
|
16387
|
-
get ReferenceId() {
|
|
16388
|
-
return this.refId;
|
|
16389
|
-
}
|
|
16390
|
-
add(item) {
|
|
16391
|
-
this.root.push(item);
|
|
16205
|
+
super("w:hdr", referenceNumber, HEADER_NAMESPACES, initContent);
|
|
16392
16206
|
}
|
|
16393
16207
|
};
|
|
16394
16208
|
//#endregion
|
|
@@ -24215,7 +24029,7 @@ var Compiler = class {
|
|
|
24215
24029
|
path: "docProps/app.xml"
|
|
24216
24030
|
},
|
|
24217
24031
|
Comments: {
|
|
24218
|
-
data: replaceNumberingPlaceholders(commentMediaDatas.length > 0 ? replaceImagePlaceholders(commentXmlData, commentMediaDatas, commentRelationshipCount, "
|
|
24032
|
+
data: replaceNumberingPlaceholders(commentMediaDatas.length > 0 ? replaceImagePlaceholders(commentXmlData, commentMediaDatas, commentRelationshipCount, "rId") : commentXmlData, file.Numbering.ConcreteNumbering),
|
|
24219
24033
|
path: "word/comments.xml"
|
|
24220
24034
|
},
|
|
24221
24035
|
CommentsRelationships: {
|
|
@@ -24279,11 +24093,11 @@ var Compiler = class {
|
|
|
24279
24093
|
},
|
|
24280
24094
|
Document: {
|
|
24281
24095
|
data: (() => {
|
|
24282
|
-
let xmlData = documentMediaDatas.length > 0 ? replaceImagePlaceholders(documentXmlData, documentMediaDatas, documentRelationshipCount, "
|
|
24096
|
+
let xmlData = documentMediaDatas.length > 0 ? replaceImagePlaceholders(documentXmlData, documentMediaDatas, documentRelationshipCount, "rId") : documentXmlData;
|
|
24283
24097
|
if (hasPlaceholders(xmlData)) {
|
|
24284
|
-
xmlData = replaceChartPlaceholders(xmlData, file.Charts.Array.map((c) => c.key), documentRelationshipCount, "
|
|
24098
|
+
xmlData = replaceChartPlaceholders(xmlData, file.Charts.Array.map((c) => c.key), documentRelationshipCount, "rId");
|
|
24285
24099
|
const smartArtDataOffset = documentRelationshipCount + documentMediaDatas.length + file.Charts.Array.length;
|
|
24286
|
-
xmlData = replaceSmartArtPlaceholders(xmlData, file.SmartArts.Array.map((s) => s.key), smartArtDataOffset, "
|
|
24100
|
+
xmlData = replaceSmartArtPlaceholders(xmlData, file.SmartArts.Array.map((s) => s.key), smartArtDataOffset, "rId");
|
|
24287
24101
|
}
|
|
24288
24102
|
return replaceNumberingPlaceholders(xmlData, file.Numbering.ConcreteNumbering);
|
|
24289
24103
|
})(),
|
|
@@ -24353,7 +24167,7 @@ var Compiler = class {
|
|
|
24353
24167
|
path: "word/_rels/fontTable.xml.rels"
|
|
24354
24168
|
},
|
|
24355
24169
|
FootNotes: {
|
|
24356
|
-
data: replaceNumberingPlaceholders(footnoteMediaDatas.length > 0 ? replaceImagePlaceholders(footnoteXmlData, footnoteMediaDatas, footnoteRelationshipCount, "
|
|
24170
|
+
data: replaceNumberingPlaceholders(footnoteMediaDatas.length > 0 ? replaceImagePlaceholders(footnoteXmlData, footnoteMediaDatas, footnoteRelationshipCount, "rId") : footnoteXmlData, file.Numbering.ConcreteNumbering),
|
|
24357
24171
|
path: "word/footnotes.xml"
|
|
24358
24172
|
},
|
|
24359
24173
|
FootNotesRelationships: {
|
|
@@ -24404,7 +24218,7 @@ var Compiler = class {
|
|
|
24404
24218
|
const tempXmlData = footerFormattedViews.get(index);
|
|
24405
24219
|
const mediaDatas = hasPlaceholders(tempXmlData) ? getReferencedMedia(tempXmlData, file.Media.Array) : [];
|
|
24406
24220
|
return {
|
|
24407
|
-
data: replaceNumberingPlaceholders(mediaDatas.length > 0 ? replaceImagePlaceholders(tempXmlData, mediaDatas, 0, "
|
|
24221
|
+
data: replaceNumberingPlaceholders(mediaDatas.length > 0 ? replaceImagePlaceholders(tempXmlData, mediaDatas, 0, "rId") : tempXmlData, file.Numbering.ConcreteNumbering),
|
|
24408
24222
|
path: `word/footer${index + 1}.xml`
|
|
24409
24223
|
};
|
|
24410
24224
|
}),
|
|
@@ -24439,7 +24253,7 @@ var Compiler = class {
|
|
|
24439
24253
|
const tempXmlData = headerFormattedViews.get(index);
|
|
24440
24254
|
const mediaDatas = hasPlaceholders(tempXmlData) ? getReferencedMedia(tempXmlData, file.Media.Array) : [];
|
|
24441
24255
|
return {
|
|
24442
|
-
data: replaceNumberingPlaceholders(mediaDatas.length > 0 ? replaceImagePlaceholders(tempXmlData, mediaDatas, 0, "
|
|
24256
|
+
data: replaceNumberingPlaceholders(mediaDatas.length > 0 ? replaceImagePlaceholders(tempXmlData, mediaDatas, 0, "rId") : tempXmlData, file.Numbering.ConcreteNumbering),
|
|
24443
24257
|
path: `word/header${index + 1}.xml`
|
|
24444
24258
|
};
|
|
24445
24259
|
}),
|