docx 7.4.1 → 7.6.0

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.
Files changed (303) hide show
  1. package/LICENSE +21 -21
  2. package/build/export/packer/image-replacer.d.ts +2 -2
  3. package/build/export/packer/numbering-replacer.d.ts +1 -1
  4. package/build/export/packer/packer.d.ts +4 -0
  5. package/build/file/core-properties/properties.d.ts +3 -3
  6. package/build/file/custom-properties/custom-properties.d.ts +1 -1
  7. package/build/file/document/body/section-properties/properties/columns.d.ts +1 -1
  8. package/build/file/drawing/text-wrap/wrap-square.d.ts +1 -1
  9. package/build/file/file.d.ts +3 -3
  10. package/build/file/footnotes/footnote/footnote.d.ts +1 -1
  11. package/build/file/footnotes/footnotes.d.ts +1 -1
  12. package/build/file/header.d.ts +1 -1
  13. package/build/file/numbering/abstract-numbering.d.ts +1 -1
  14. package/build/file/numbering/level.d.ts +2 -2
  15. package/build/file/numbering/numbering.d.ts +4 -4
  16. package/build/file/paragraph/formatting/tab-stop.d.ts +7 -2
  17. package/build/file/paragraph/links/bookmark.d.ts +2 -2
  18. package/build/file/paragraph/links/hyperlink.d.ts +5 -5
  19. package/build/file/paragraph/math/brackets/math-angled-brackets.d.ts +1 -1
  20. package/build/file/paragraph/math/brackets/math-curly-brackets.d.ts +1 -1
  21. package/build/file/paragraph/math/brackets/math-round-brackets.d.ts +1 -1
  22. package/build/file/paragraph/math/brackets/math-square-brackets.d.ts +1 -1
  23. package/build/file/paragraph/math/fraction/math-denominator.d.ts +1 -1
  24. package/build/file/paragraph/math/fraction/math-fraction.d.ts +2 -2
  25. package/build/file/paragraph/math/fraction/math-numerator.d.ts +1 -1
  26. package/build/file/paragraph/math/function/math-function-name.d.ts +1 -1
  27. package/build/file/paragraph/math/function/math-function.d.ts +2 -2
  28. package/build/file/paragraph/math/math-component.d.ts +2 -2
  29. package/build/file/paragraph/math/math.d.ts +1 -1
  30. package/build/file/paragraph/math/n-ary/index.d.ts +1 -0
  31. package/build/file/paragraph/math/n-ary/math-base.d.ts +1 -1
  32. package/build/file/paragraph/math/n-ary/math-integral.d.ts +10 -0
  33. package/build/file/paragraph/math/n-ary/math-sub-script.d.ts +1 -1
  34. package/build/file/paragraph/math/n-ary/math-sum.d.ts +3 -3
  35. package/build/file/paragraph/math/n-ary/math-super-script.d.ts +1 -1
  36. package/build/file/paragraph/math/radical/math-degree.d.ts +1 -1
  37. package/build/file/paragraph/math/radical/math-radical.d.ts +2 -2
  38. package/build/file/paragraph/math/script/pre-sub-super-script/math-pre-sub-super-script-function.d.ts +3 -3
  39. package/build/file/paragraph/math/script/sub-script/math-sub-script-function.d.ts +2 -2
  40. package/build/file/paragraph/math/script/sub-super-script/math-sub-super-script-function.d.ts +3 -3
  41. package/build/file/paragraph/math/script/super-script/math-super-script-function.d.ts +2 -2
  42. package/build/file/paragraph/paragraph.d.ts +1 -1
  43. package/build/file/paragraph/properties.d.ts +2 -6
  44. package/build/file/paragraph/run/comment-run.d.ts +1 -1
  45. package/build/file/paragraph/run/run.d.ts +1 -1
  46. package/build/file/styles/sample/default-style.d.ts +1 -102
  47. package/build/file/styles/styles.d.ts +3 -3
  48. package/build/file/table/grid.d.ts +1 -1
  49. package/build/file/table/table-cell/table-cell.d.ts +1 -1
  50. package/build/file/table/table-row/table-row.d.ts +2 -2
  51. package/build/file/table/table.d.ts +2 -2
  52. package/build/file/table-of-contents/table-of-contents-properties.d.ts +1 -1
  53. package/build/file/xml-components/default-attributes.d.ts +3 -3
  54. package/build/file/xml-components/imported-xml-component.d.ts +2 -2
  55. package/build/index.js +1 -1
  56. package/build/index.js.LICENSE.txt +0 -12
  57. package/build/util/values.d.ts +17 -17
  58. package/package.json +15 -8
  59. package/src/export/packer/image-replacer.ts +2 -2
  60. package/src/export/packer/next-compiler.spec.ts +2 -2
  61. package/src/export/packer/next-compiler.ts +8 -8
  62. package/src/export/packer/numbering-replacer.ts +1 -1
  63. package/src/export/packer/packer.spec.ts +65 -7
  64. package/src/export/packer/packer.ts +24 -0
  65. package/src/file/app-properties/app-properties.ts +1 -1
  66. package/src/file/border/border.ts +1 -1
  67. package/src/file/content-types/content-types.ts +1 -1
  68. package/src/file/content-types/default/default.ts +1 -1
  69. package/src/file/content-types/override/override.ts +1 -1
  70. package/src/file/core-properties/properties.ts +5 -5
  71. package/src/file/custom-properties/custom-properties.ts +4 -2
  72. package/src/file/custom-properties/custom-property.ts +2 -2
  73. package/src/file/document/body/body.ts +3 -1
  74. package/src/file/document/body/section-properties/properties/column.ts +1 -1
  75. package/src/file/document/body/section-properties/properties/columns.spec.ts +7 -0
  76. package/src/file/document/body/section-properties/properties/columns.ts +2 -2
  77. package/src/file/document/body/section-properties/properties/doc-grid.ts +1 -1
  78. package/src/file/document/body/section-properties/properties/header-footer-reference.ts +1 -1
  79. package/src/file/document/body/section-properties/properties/line-number.ts +1 -1
  80. package/src/file/document/body/section-properties/properties/page-borders.ts +1 -1
  81. package/src/file/document/body/section-properties/properties/page-margin.ts +1 -1
  82. package/src/file/document/body/section-properties/properties/page-number.ts +1 -1
  83. package/src/file/document/body/section-properties/properties/page-size.ts +1 -1
  84. package/src/file/document/body/section-properties/properties/page-text-direction.ts +1 -1
  85. package/src/file/document/body/section-properties/properties/section-type.ts +1 -1
  86. package/src/file/document/body/section-properties/section-properties.ts +1 -1
  87. package/src/file/document/document-background/document-background.ts +1 -1
  88. package/src/file/document/document.ts +1 -1
  89. package/src/file/document-wrapper.spec.ts +0 -2
  90. package/src/file/document-wrapper.ts +1 -1
  91. package/src/file/drawing/anchor/anchor.spec.ts +2 -3
  92. package/src/file/drawing/anchor/anchor.ts +1 -1
  93. package/src/file/drawing/doc-properties/doc-properties.ts +1 -1
  94. package/src/file/drawing/drawing.spec.ts +2 -3
  95. package/src/file/drawing/drawing.ts +1 -1
  96. package/src/file/drawing/effect-extent/effect-extent.ts +1 -1
  97. package/src/file/drawing/extent/extent.ts +1 -1
  98. package/src/file/drawing/floating/align.ts +1 -1
  99. package/src/file/drawing/floating/horizontal-position.ts +1 -1
  100. package/src/file/drawing/floating/position-offset.ts +1 -1
  101. package/src/file/drawing/floating/simple-pos.ts +1 -1
  102. package/src/file/drawing/floating/vertical-position.ts +1 -1
  103. package/src/file/drawing/graphic-frame/graphic-frame-locks/graphic-frame-locks.ts +1 -1
  104. package/src/file/drawing/graphic-frame/graphic-frame-properties.ts +1 -1
  105. package/src/file/drawing/inline/graphic/graphic-data/graphic-data.ts +1 -1
  106. package/src/file/drawing/inline/graphic/graphic-data/pic/blip/blip-fill.ts +1 -1
  107. package/src/file/drawing/inline/graphic/graphic-data/pic/blip/blip.ts +1 -1
  108. package/src/file/drawing/inline/graphic/graphic-data/pic/blip/source-rectangle.ts +1 -1
  109. package/src/file/drawing/inline/graphic/graphic-data/pic/blip/stretch.ts +2 -2
  110. package/src/file/drawing/inline/graphic/graphic-data/pic/non-visual-pic-properties/child-non-visual-pic-properties/child-non-visual-pic-properties.ts +1 -1
  111. package/src/file/drawing/inline/graphic/graphic-data/pic/non-visual-pic-properties/child-non-visual-pic-properties/pic-locks/pic-locks.ts +1 -1
  112. package/src/file/drawing/inline/graphic/graphic-data/pic/non-visual-pic-properties/non-visual-pic-properties.ts +1 -1
  113. package/src/file/drawing/inline/graphic/graphic-data/pic/non-visual-pic-properties/non-visual-properties/non-visual-properties.ts +1 -1
  114. package/src/file/drawing/inline/graphic/graphic-data/pic/pic.ts +1 -1
  115. package/src/file/drawing/inline/graphic/graphic-data/pic/shape-properties/form/extents/extents.ts +1 -1
  116. package/src/file/drawing/inline/graphic/graphic-data/pic/shape-properties/form/form.ts +1 -1
  117. package/src/file/drawing/inline/graphic/graphic-data/pic/shape-properties/form/offset/off.ts +1 -1
  118. package/src/file/drawing/inline/graphic/graphic-data/pic/shape-properties/outline/no-fill.ts +1 -1
  119. package/src/file/drawing/inline/graphic/graphic-data/pic/shape-properties/outline/outline.ts +1 -1
  120. package/src/file/drawing/inline/graphic/graphic-data/pic/shape-properties/preset-geometry/adjustment-values/adjustment-values.ts +1 -1
  121. package/src/file/drawing/inline/graphic/graphic-data/pic/shape-properties/preset-geometry/preset-geometry.ts +1 -1
  122. package/src/file/drawing/inline/graphic/graphic-data/pic/shape-properties/shape-properties.ts +1 -1
  123. package/src/file/drawing/inline/graphic/graphic.ts +1 -1
  124. package/src/file/drawing/inline/inline.ts +1 -1
  125. package/src/file/drawing/text-wrap/wrap-none.ts +1 -1
  126. package/src/file/drawing/text-wrap/wrap-square.ts +3 -2
  127. package/src/file/drawing/text-wrap/wrap-tight.ts +1 -1
  128. package/src/file/drawing/text-wrap/wrap-top-and-bottom.ts +1 -1
  129. package/src/file/file.spec.ts +55 -2
  130. package/src/file/file.ts +18 -13
  131. package/src/file/footer/footer.ts +1 -1
  132. package/src/file/footer-wrapper.spec.ts +1 -1
  133. package/src/file/footer-wrapper.ts +1 -1
  134. package/src/file/footnotes/footnote/footnote.ts +2 -2
  135. package/src/file/footnotes/footnote/run/continuation-seperator-run.ts +1 -1
  136. package/src/file/footnotes/footnote/run/continuation-seperator.ts +1 -1
  137. package/src/file/footnotes/footnote/run/footnote-ref-run.ts +1 -1
  138. package/src/file/footnotes/footnote/run/footnote-ref.ts +1 -1
  139. package/src/file/footnotes/footnote/run/reference-run.ts +2 -2
  140. package/src/file/footnotes/footnote/run/seperator-run.ts +1 -1
  141. package/src/file/footnotes/footnote/run/seperator.ts +1 -1
  142. package/src/file/footnotes/footnotes.ts +2 -2
  143. package/src/file/footnotes-wrapper.spec.ts +0 -2
  144. package/src/file/footnotes-wrapper.ts +1 -1
  145. package/src/file/header/header.ts +1 -1
  146. package/src/file/header-wrapper.spec.ts +1 -1
  147. package/src/file/header-wrapper.ts +1 -1
  148. package/src/file/header.ts +11 -3
  149. package/src/file/media/media.spec.ts +4 -2
  150. package/src/file/media/media.ts +3 -1
  151. package/src/file/numbering/abstract-numbering.ts +1 -1
  152. package/src/file/numbering/level.spec.ts +40 -3
  153. package/src/file/numbering/level.ts +27 -8
  154. package/src/file/numbering/multi-level-type.ts +1 -1
  155. package/src/file/numbering/num.ts +4 -4
  156. package/src/file/numbering/numbering.spec.ts +2 -1
  157. package/src/file/numbering/numbering.ts +18 -18
  158. package/src/file/paragraph/formatting/alignment.ts +1 -1
  159. package/src/file/paragraph/formatting/border.ts +2 -2
  160. package/src/file/paragraph/formatting/break.ts +4 -4
  161. package/src/file/paragraph/formatting/indent.ts +1 -1
  162. package/src/file/paragraph/formatting/spacing.ts +1 -1
  163. package/src/file/paragraph/formatting/style.ts +1 -1
  164. package/src/file/paragraph/formatting/tab-stop.spec.ts +2 -2
  165. package/src/file/paragraph/formatting/tab-stop.ts +14 -5
  166. package/src/file/paragraph/formatting/unordered-list.ts +3 -3
  167. package/src/file/paragraph/frame/frame-properties.ts +1 -1
  168. package/src/file/paragraph/links/bookmark.ts +4 -4
  169. package/src/file/paragraph/links/hyperlink.ts +6 -4
  170. package/src/file/paragraph/links/outline-level.ts +1 -1
  171. package/src/file/paragraph/links/pageref-field-instruction.ts +1 -1
  172. package/src/file/paragraph/links/pageref.ts +1 -1
  173. package/src/file/paragraph/math/brackets/math-angled-brackets.ts +1 -1
  174. package/src/file/paragraph/math/brackets/math-beginning-character.ts +1 -1
  175. package/src/file/paragraph/math/brackets/math-bracket-properties.ts +1 -1
  176. package/src/file/paragraph/math/brackets/math-curly-brackets.ts +1 -1
  177. package/src/file/paragraph/math/brackets/math-ending-char.ts +1 -1
  178. package/src/file/paragraph/math/brackets/math-round-brackets.ts +1 -1
  179. package/src/file/paragraph/math/brackets/math-square-brackets.ts +1 -1
  180. package/src/file/paragraph/math/fraction/math-denominator.ts +1 -1
  181. package/src/file/paragraph/math/fraction/math-fraction.ts +3 -3
  182. package/src/file/paragraph/math/fraction/math-numerator.ts +1 -1
  183. package/src/file/paragraph/math/function/math-function-name.ts +1 -1
  184. package/src/file/paragraph/math/function/math-function-properties.ts +1 -1
  185. package/src/file/paragraph/math/function/math-function.ts +3 -3
  186. package/src/file/paragraph/math/math-component.ts +2 -1
  187. package/src/file/paragraph/math/math-run.ts +1 -1
  188. package/src/file/paragraph/math/math-text.ts +1 -1
  189. package/src/file/paragraph/math/math.ts +2 -2
  190. package/src/file/paragraph/math/n-ary/index.ts +1 -0
  191. package/src/file/paragraph/math/n-ary/math-accent-character.ts +1 -1
  192. package/src/file/paragraph/math/n-ary/math-base.ts +1 -1
  193. package/src/file/paragraph/math/n-ary/math-integral.spec.ts +116 -0
  194. package/src/file/paragraph/math/n-ary/math-integral.ts +31 -0
  195. package/src/file/paragraph/math/n-ary/math-limit-location.ts +1 -1
  196. package/src/file/paragraph/math/n-ary/math-n-ary-properties.ts +4 -2
  197. package/src/file/paragraph/math/n-ary/math-sub-script-hide.ts +1 -1
  198. package/src/file/paragraph/math/n-ary/math-sub-script.ts +1 -1
  199. package/src/file/paragraph/math/n-ary/math-sum.ts +4 -4
  200. package/src/file/paragraph/math/n-ary/math-super-script-hide.ts +1 -1
  201. package/src/file/paragraph/math/n-ary/math-super-script.ts +1 -1
  202. package/src/file/paragraph/math/radical/math-degree-hide.ts +1 -1
  203. package/src/file/paragraph/math/radical/math-degree.ts +1 -1
  204. package/src/file/paragraph/math/radical/math-radical-properties.ts +1 -1
  205. package/src/file/paragraph/math/radical/math-radical.ts +3 -3
  206. package/src/file/paragraph/math/script/pre-sub-super-script/math-pre-sub-super-script-function-properties.ts +1 -1
  207. package/src/file/paragraph/math/script/pre-sub-super-script/math-pre-sub-super-script-function.ts +4 -4
  208. package/src/file/paragraph/math/script/sub-script/math-sub-script-function-properties.ts +1 -1
  209. package/src/file/paragraph/math/script/sub-script/math-sub-script-function.ts +3 -3
  210. package/src/file/paragraph/math/script/sub-super-script/math-sub-super-script-function-properties.ts +1 -1
  211. package/src/file/paragraph/math/script/sub-super-script/math-sub-super-script-function.ts +4 -4
  212. package/src/file/paragraph/math/script/super-script/math-super-script-function-properties.ts +1 -1
  213. package/src/file/paragraph/math/script/super-script/math-super-script-function.ts +3 -3
  214. package/src/file/paragraph/paragraph.spec.ts +2 -6
  215. package/src/file/paragraph/paragraph.ts +2 -2
  216. package/src/file/paragraph/properties.spec.ts +1 -3
  217. package/src/file/paragraph/properties.ts +18 -18
  218. package/src/file/paragraph/run/break.ts +1 -1
  219. package/src/file/paragraph/run/comment-run.ts +6 -6
  220. package/src/file/paragraph/run/emphasis-mark.ts +2 -2
  221. package/src/file/paragraph/run/field.ts +3 -3
  222. package/src/file/paragraph/run/formatting.ts +4 -4
  223. package/src/file/paragraph/run/image-run.spec.ts +9 -9
  224. package/src/file/paragraph/run/image-run.ts +2 -1
  225. package/src/file/paragraph/run/page-number.ts +3 -3
  226. package/src/file/paragraph/run/properties.ts +2 -2
  227. package/src/file/paragraph/run/run-components/symbol.ts +1 -1
  228. package/src/file/paragraph/run/run-components/text.ts +1 -1
  229. package/src/file/paragraph/run/run-fonts.ts +5 -5
  230. package/src/file/paragraph/run/run.spec.ts +1 -3
  231. package/src/file/paragraph/run/run.ts +2 -2
  232. package/src/file/paragraph/run/script.ts +3 -3
  233. package/src/file/paragraph/run/sequential-identifier-instruction.ts +1 -1
  234. package/src/file/paragraph/run/sequential-identifier.ts +1 -1
  235. package/src/file/paragraph/run/simple-field.ts +2 -2
  236. package/src/file/paragraph/run/symbol-run.spec.ts +1 -3
  237. package/src/file/paragraph/run/symbol-run.ts +1 -1
  238. package/src/file/paragraph/run/tab.ts +1 -1
  239. package/src/file/paragraph/run/text-run.ts +1 -1
  240. package/src/file/paragraph/run/underline.ts +1 -1
  241. package/src/file/relationships/relationship/relationship.ts +1 -1
  242. package/src/file/relationships/relationships.ts +1 -1
  243. package/src/file/settings/compatibility-setting/compatibility-setting.ts +1 -1
  244. package/src/file/settings/compatibility.ts +1 -1
  245. package/src/file/settings/settings.ts +1 -1
  246. package/src/file/shading/shading.ts +1 -1
  247. package/src/file/styles/defaults/document-defaults.spec.ts +2 -2
  248. package/src/file/styles/defaults/document-defaults.ts +1 -1
  249. package/src/file/styles/defaults/paragraph-properties.ts +1 -1
  250. package/src/file/styles/defaults/run-properties.ts +1 -1
  251. package/src/file/styles/external-styles-factory.spec.ts +3 -3
  252. package/src/file/styles/external-styles-factory.ts +1 -0
  253. package/src/file/styles/latent-styles/exceptions.ts +1 -1
  254. package/src/file/styles/latent-styles/latent-styles.ts +1 -1
  255. package/src/file/styles/sample/default-style.ts +6 -6
  256. package/src/file/styles/style/character-style.ts +1 -1
  257. package/src/file/styles/style/components.ts +2 -2
  258. package/src/file/styles/style/default-styles.spec.ts +1 -2
  259. package/src/file/styles/style/default-styles.ts +14 -14
  260. package/src/file/styles/style/paragraph-style.ts +1 -1
  261. package/src/file/styles/style/style.ts +1 -1
  262. package/src/file/styles/styles.ts +4 -4
  263. package/src/file/table/grid.spec.ts +1 -2
  264. package/src/file/table/grid.ts +2 -2
  265. package/src/file/table/table-cell/table-cell-components.ts +4 -4
  266. package/src/file/table/table-cell/table-cell-properties.ts +1 -1
  267. package/src/file/table/table-cell/table-cell.ts +2 -2
  268. package/src/file/table/table-properties/table-borders.ts +1 -1
  269. package/src/file/table/table-properties/table-cell-margin.ts +4 -1
  270. package/src/file/table/table-properties/table-float-properties.ts +1 -1
  271. package/src/file/table/table-properties/table-layout.ts +1 -1
  272. package/src/file/table/table-properties/table-overlap.ts +1 -1
  273. package/src/file/table/table-properties/table-properties.ts +1 -1
  274. package/src/file/table/table-row/table-row-height.ts +1 -1
  275. package/src/file/table/table-row/table-row-properties.ts +1 -1
  276. package/src/file/table/table-row/table-row.ts +3 -3
  277. package/src/file/table/table-width.ts +1 -1
  278. package/src/file/table/table.ts +4 -3
  279. package/src/file/table-of-contents/alias.ts +1 -1
  280. package/src/file/table-of-contents/field-instruction.ts +1 -1
  281. package/src/file/table-of-contents/sdt-content.ts +1 -1
  282. package/src/file/table-of-contents/sdt-properties.ts +1 -1
  283. package/src/file/table-of-contents/table-of-contents-properties.ts +2 -2
  284. package/src/file/table-of-contents/table-of-contents.spec.ts +1 -3
  285. package/src/file/table-of-contents/table-of-contents.ts +1 -1
  286. package/src/file/track-revision/track-revision-components/deleted-page-number.ts +3 -3
  287. package/src/file/track-revision/track-revision-components/deleted-text-run.ts +2 -2
  288. package/src/file/track-revision/track-revision-components/deleted-text.ts +1 -1
  289. package/src/file/track-revision/track-revision-components/inserted-text-run.ts +1 -1
  290. package/src/file/vertical-align/vertical-align.ts +1 -1
  291. package/src/file/xml-components/base.ts +1 -1
  292. package/src/file/xml-components/default-attributes.ts +5 -4
  293. package/src/file/xml-components/imported-xml-component.spec.ts +3 -2
  294. package/src/file/xml-components/imported-xml-component.ts +13 -8
  295. package/src/file/xml-components/initializable-xml-component.ts +1 -1
  296. package/src/file/xml-components/simple-elements.ts +5 -5
  297. package/src/file/xml-components/xml-component.ts +4 -2
  298. package/src/import-dotx/import-dotx.ts +2 -0
  299. package/src/index.spec.ts +0 -1
  300. package/src/tests/utility.ts +1 -1
  301. package/src/util/convenience-functions.spec.ts +0 -2
  302. package/src/util/convenience-functions.ts +4 -12
  303. package/src/util/values.ts +29 -41
@@ -10,7 +10,7 @@ class PageTextDirectionAttributes extends XmlAttributeComponent<{ readonly val:
10
10
  }
11
11
 
12
12
  export class PageTextDirection extends XmlComponent {
13
- constructor(value: PageTextDirectionType) {
13
+ public constructor(value: PageTextDirectionType) {
14
14
  super("w:textDirection");
15
15
 
16
16
  this.root.push(
@@ -30,7 +30,7 @@ export class SectionTypeAttributes extends XmlAttributeComponent<{
30
30
  }
31
31
 
32
32
  export class Type extends XmlComponent {
33
- constructor(value: SectionType) {
33
+ public constructor(value: SectionType) {
34
34
  super("w:type");
35
35
  this.root.push(new SectionTypeAttributes({ val: value }));
36
36
  }
@@ -92,7 +92,7 @@ export const sectionPageSizeDefaults = {
92
92
  };
93
93
 
94
94
  export class SectionProperties extends XmlComponent {
95
- constructor({
95
+ public constructor({
96
96
  page: {
97
97
  size: {
98
98
  width = sectionPageSizeDefaults.WIDTH,
@@ -63,7 +63,7 @@ export interface IDocumentBackgroundOptions {
63
63
  // </xsd:complexType>
64
64
 
65
65
  export class DocumentBackground extends XmlComponent {
66
- constructor(options: IDocumentBackgroundOptions) {
66
+ public constructor(options: IDocumentBackgroundOptions) {
67
67
  super("w:background");
68
68
 
69
69
  this.root.push(
@@ -33,7 +33,7 @@ export interface IDocumentOptions {
33
33
  export class Document extends XmlComponent {
34
34
  private readonly body: Body;
35
35
 
36
- constructor(options: IDocumentOptions) {
36
+ public constructor(options: IDocumentOptions) {
37
37
  super("w:document");
38
38
  this.root.push(
39
39
  new DocumentAttributes({
@@ -7,9 +7,7 @@ describe("DocumentWrapper", () => {
7
7
  it("should create", () => {
8
8
  const file = new DocumentWrapper({ background: {} });
9
9
 
10
- // tslint:disable-next-line: no-unused-expression
11
10
  expect(file.View).to.be.ok;
12
- // tslint:disable-next-line: no-unused-expression
13
11
  expect(file.Relationships).to.be.ok;
14
12
  });
15
13
  });
@@ -13,7 +13,7 @@ export class DocumentWrapper implements IViewWrapper {
13
13
  private readonly document: Document;
14
14
  private readonly relationships: Relationships;
15
15
 
16
- constructor(options: IDocumentOptions) {
16
+ public constructor(options: IDocumentOptions) {
17
17
  this.document = new Document(options);
18
18
  this.relationships = new Relationships();
19
19
  }
@@ -6,8 +6,8 @@ import { IDrawingOptions } from "../drawing";
6
6
  import { TextWrappingType } from "../text-wrap";
7
7
  import { Anchor } from "./anchor";
8
8
 
9
- function createAnchor(drawingOptions: IDrawingOptions): Anchor {
10
- return new Anchor(
9
+ const createAnchor = (drawingOptions: IDrawingOptions): Anchor =>
10
+ new Anchor(
11
11
  {
12
12
  fileName: "test.png",
13
13
  stream: new Buffer(""),
@@ -34,7 +34,6 @@ function createAnchor(drawingOptions: IDrawingOptions): Anchor {
34
34
  },
35
35
  drawingOptions,
36
36
  );
37
- }
38
37
 
39
38
  describe("Anchor", () => {
40
39
  let anchor: Anchor;
@@ -37,7 +37,7 @@ import { AnchorAttributes } from "./anchor-attributes";
37
37
  // <xsd:attribute name="allowOverlap" type="xsd:boolean" use="required"/>
38
38
  // </xsd:complexType>
39
39
  export class Anchor extends XmlComponent {
40
- constructor(mediaData: IMediaData, transform: IMediaDataTransformation, drawingOptions: IDrawingOptions) {
40
+ public constructor(mediaData: IMediaData, transform: IMediaDataTransformation, drawingOptions: IDrawingOptions) {
41
41
  super("wp:anchor");
42
42
 
43
43
  const floating: IFloating = {
@@ -2,7 +2,7 @@ import { XmlComponent } from "@file/xml-components";
2
2
  import { DocPropertiesAttributes } from "./doc-properties-attributes";
3
3
 
4
4
  export class DocProperties extends XmlComponent {
5
- constructor() {
5
+ public constructor() {
6
6
  super("wp:docPr");
7
7
 
8
8
  this.root.push(
@@ -6,8 +6,8 @@ import { Drawing, IDrawingOptions } from "./drawing";
6
6
 
7
7
  const imageBase64Data = `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`;
8
8
 
9
- function createDrawing(drawingOptions?: IDrawingOptions): Drawing {
10
- return new Drawing(
9
+ const createDrawing = (drawingOptions?: IDrawingOptions): Drawing =>
10
+ new Drawing(
11
11
  {
12
12
  fileName: "test.jpg",
13
13
  stream: Buffer.from(imageBase64Data, "base64"),
@@ -24,7 +24,6 @@ function createDrawing(drawingOptions?: IDrawingOptions): Drawing {
24
24
  },
25
25
  drawingOptions,
26
26
  );
27
- }
28
27
 
29
28
  describe("Drawing", () => {
30
29
  let currentBreak: Drawing;
@@ -25,7 +25,7 @@ export interface IDrawingOptions {
25
25
  export class Drawing extends XmlComponent {
26
26
  private readonly inline: Inline;
27
27
 
28
- constructor(imageData: IMediaData, drawingOptions: IDrawingOptions = {}) {
28
+ public constructor(imageData: IMediaData, drawingOptions: IDrawingOptions = {}) {
29
29
  super("w:drawing");
30
30
 
31
31
  if (!drawingOptions.floating) {
@@ -2,7 +2,7 @@ import { XmlComponent } from "@file/xml-components";
2
2
  import { EffectExtentAttributes } from "./effect-extent-attributes";
3
3
 
4
4
  export class EffectExtent extends XmlComponent {
5
- constructor() {
5
+ public constructor() {
6
6
  super("wp:effectExtent");
7
7
 
8
8
  this.root.push(
@@ -5,7 +5,7 @@ import { ExtentAttributes } from "./extent-attributes";
5
5
  export class Extent extends XmlComponent {
6
6
  private readonly attributes: ExtentAttributes;
7
7
 
8
- constructor(x: number, y: number) {
8
+ public constructor(x: number, y: number) {
9
9
  super("wp:extent");
10
10
 
11
11
  this.attributes = new ExtentAttributes({
@@ -3,7 +3,7 @@ import { HorizontalPositionAlign, VerticalPositionAlign } from "@file/shared/ali
3
3
  import { XmlComponent } from "@file/xml-components";
4
4
 
5
5
  export class Align extends XmlComponent {
6
- constructor(value: HorizontalPositionAlign | VerticalPositionAlign) {
6
+ public constructor(value: HorizontalPositionAlign | VerticalPositionAlign) {
7
7
  super("wp:align");
8
8
  this.root.push(value);
9
9
  }
@@ -13,7 +13,7 @@ class HorizontalPositionAttributes extends XmlAttributeComponent<{
13
13
  }
14
14
 
15
15
  export class HorizontalPosition extends XmlComponent {
16
- constructor(horizontalPosition: IHorizontalPositionOptions) {
16
+ public constructor(horizontalPosition: IHorizontalPositionOptions) {
17
17
  super("wp:positionH");
18
18
 
19
19
  this.root.push(
@@ -2,7 +2,7 @@
2
2
  import { XmlComponent } from "@file/xml-components";
3
3
 
4
4
  export class PositionOffset extends XmlComponent {
5
- constructor(offsetValue: number) {
5
+ public constructor(offsetValue: number) {
6
6
  super("wp:posOffset");
7
7
  this.root.push(offsetValue.toString());
8
8
  }
@@ -12,7 +12,7 @@ class SimplePosAttributes extends XmlAttributeComponent<{
12
12
  }
13
13
 
14
14
  export class SimplePos extends XmlComponent {
15
- constructor() {
15
+ public constructor() {
16
16
  super("wp:simplePos");
17
17
 
18
18
  // NOTE: It's not fully supported in Microsoft Word, but this element is needed anyway
@@ -13,7 +13,7 @@ class VerticalPositionAttributes extends XmlAttributeComponent<{
13
13
  }
14
14
 
15
15
  export class VerticalPosition extends XmlComponent {
16
- constructor(verticalPosition: IVerticalPositionOptions) {
16
+ public constructor(verticalPosition: IVerticalPositionOptions) {
17
17
  super("wp:positionV");
18
18
 
19
19
  this.root.push(
@@ -2,7 +2,7 @@ import { XmlComponent } from "@file/xml-components";
2
2
  import { GraphicFrameLockAttributes } from "./graphic-frame-lock-attributes";
3
3
 
4
4
  export class GraphicFrameLocks extends XmlComponent {
5
- constructor() {
5
+ public constructor() {
6
6
  super("a:graphicFrameLocks");
7
7
 
8
8
  this.root.push(
@@ -2,7 +2,7 @@ import { XmlComponent } from "@file/xml-components";
2
2
  import { GraphicFrameLocks } from "./graphic-frame-locks/graphic-frame-locks";
3
3
 
4
4
  export class GraphicFrameProperties extends XmlComponent {
5
- constructor() {
5
+ public constructor() {
6
6
  super("wp:cNvGraphicFramePr");
7
7
 
8
8
  this.root.push(new GraphicFrameLocks());
@@ -7,7 +7,7 @@ import { Pic } from "./pic";
7
7
  export class GraphicData extends XmlComponent {
8
8
  private readonly pic: Pic;
9
9
 
10
- constructor(mediaData: IMediaData, transform: IMediaDataTransformation) {
10
+ public constructor(mediaData: IMediaData, transform: IMediaDataTransformation) {
11
11
  super("a:graphicData");
12
12
 
13
13
  this.root.push(
@@ -6,7 +6,7 @@ import { SourceRectangle } from "./source-rectangle";
6
6
  import { Stretch } from "./stretch";
7
7
 
8
8
  export class BlipFill extends XmlComponent {
9
- constructor(mediaData: IMediaData) {
9
+ public constructor(mediaData: IMediaData) {
10
10
  super("pic:blipFill");
11
11
 
12
12
  this.root.push(new Blip(mediaData));
@@ -12,7 +12,7 @@ class BlipAttributes extends XmlAttributeComponent<{
12
12
  }
13
13
 
14
14
  export class Blip extends XmlComponent {
15
- constructor(mediaData: IMediaData) {
15
+ public constructor(mediaData: IMediaData) {
16
16
  super("a:blip");
17
17
  this.root.push(
18
18
  new BlipAttributes({
@@ -1,7 +1,7 @@
1
1
  import { XmlComponent } from "@file/xml-components";
2
2
 
3
3
  export class SourceRectangle extends XmlComponent {
4
- constructor() {
4
+ public constructor() {
5
5
  super("a:srcRect");
6
6
  }
7
7
  }
@@ -1,13 +1,13 @@
1
1
  import { XmlComponent } from "@file/xml-components";
2
2
 
3
3
  class FillRectangle extends XmlComponent {
4
- constructor() {
4
+ public constructor() {
5
5
  super("a:fillRect");
6
6
  }
7
7
  }
8
8
 
9
9
  export class Stretch extends XmlComponent {
10
- constructor() {
10
+ public constructor() {
11
11
  super("a:stretch");
12
12
  this.root.push(new FillRectangle());
13
13
  }
@@ -2,7 +2,7 @@ import { XmlComponent } from "@file/xml-components";
2
2
  import { PicLocks } from "./pic-locks/pic-locks";
3
3
 
4
4
  export class ChildNonVisualProperties extends XmlComponent {
5
- constructor() {
5
+ public constructor() {
6
6
  super("pic:cNvPicPr");
7
7
 
8
8
  this.root.push(new PicLocks());
@@ -2,7 +2,7 @@ import { XmlComponent } from "@file/xml-components";
2
2
  import { PicLocksAttributes } from "./pic-locks-attributes";
3
3
 
4
4
  export class PicLocks extends XmlComponent {
5
- constructor() {
5
+ public constructor() {
6
6
  super("a:picLocks");
7
7
  this.root.push(
8
8
  new PicLocksAttributes({
@@ -3,7 +3,7 @@ import { ChildNonVisualProperties } from "./child-non-visual-pic-properties/chil
3
3
  import { NonVisualProperties } from "./non-visual-properties/non-visual-properties";
4
4
 
5
5
  export class NonVisualPicProperties extends XmlComponent {
6
- constructor() {
6
+ public constructor() {
7
7
  super("pic:nvPicPr");
8
8
 
9
9
  this.root.push(new NonVisualProperties());
@@ -2,7 +2,7 @@ import { XmlComponent } from "@file/xml-components";
2
2
  import { NonVisualPropertiesAttributes } from "./non-visual-properties-attributes";
3
3
 
4
4
  export class NonVisualProperties extends XmlComponent {
5
- constructor() {
5
+ public constructor() {
6
6
  super("pic:cNvPr");
7
7
 
8
8
  this.root.push(
@@ -8,7 +8,7 @@ import { PicAttributes } from "./pic-attributes";
8
8
  import { ShapeProperties } from "./shape-properties/shape-properties";
9
9
 
10
10
  export class Pic extends XmlComponent {
11
- constructor(mediaData: IMediaData, transform: IMediaDataTransformation) {
11
+ public constructor(mediaData: IMediaData, transform: IMediaDataTransformation) {
12
12
  super("pic:pic");
13
13
 
14
14
  this.root.push(
@@ -5,7 +5,7 @@ import { ExtentsAttributes } from "./extents-attributes";
5
5
  export class Extents extends XmlComponent {
6
6
  private readonly attributes: ExtentsAttributes;
7
7
 
8
- constructor(x: number, y: number) {
8
+ public constructor(x: number, y: number) {
9
9
  super("a:ext");
10
10
 
11
11
  this.attributes = new ExtentsAttributes({
@@ -21,7 +21,7 @@ export class FormAttributes extends XmlAttributeComponent<{
21
21
  export class Form extends XmlComponent {
22
22
  private readonly extents: Extents;
23
23
 
24
- constructor(options: IMediaDataTransformation) {
24
+ public constructor(options: IMediaDataTransformation) {
25
25
  super("a:xfrm");
26
26
 
27
27
  this.root.push(
@@ -3,7 +3,7 @@ import { XmlComponent } from "@file/xml-components";
3
3
  import { OffsetAttributes } from "./off-attributes";
4
4
 
5
5
  export class Offset extends XmlComponent {
6
- constructor() {
6
+ public constructor() {
7
7
  super("a:off");
8
8
 
9
9
  this.root.push(
@@ -1,7 +1,7 @@
1
1
  import { XmlComponent } from "@file/xml-components";
2
2
 
3
3
  export class NoFill extends XmlComponent {
4
- constructor() {
4
+ public constructor() {
5
5
  super("a:noFill");
6
6
  }
7
7
  }
@@ -3,7 +3,7 @@ import { XmlComponent } from "@file/xml-components";
3
3
  import { NoFill } from "./no-fill";
4
4
 
5
5
  export class Outline extends XmlComponent {
6
- constructor() {
6
+ public constructor() {
7
7
  super("a:ln");
8
8
 
9
9
  this.root.push(new NoFill());
@@ -2,7 +2,7 @@
2
2
  import { XmlComponent } from "@file/xml-components";
3
3
 
4
4
  export class AdjustmentValues extends XmlComponent {
5
- constructor() {
5
+ public constructor() {
6
6
  super("a:avLst");
7
7
  }
8
8
  }
@@ -4,7 +4,7 @@ import { AdjustmentValues } from "./adjustment-values/adjustment-values";
4
4
  import { PresetGeometryAttributes } from "./preset-geometry-attributes";
5
5
 
6
6
  export class PresetGeometry extends XmlComponent {
7
- constructor() {
7
+ public constructor() {
8
8
  super("a:prstGeom");
9
9
 
10
10
  this.root.push(
@@ -10,7 +10,7 @@ import { ShapePropertiesAttributes } from "./shape-properties-attributes";
10
10
  export class ShapeProperties extends XmlComponent {
11
11
  private readonly form: Form;
12
12
 
13
- constructor(transform: IMediaDataTransformation) {
13
+ public constructor(transform: IMediaDataTransformation) {
14
14
  super("pic:spPr");
15
15
 
16
16
  this.root.push(
@@ -14,7 +14,7 @@ class GraphicAttributes extends XmlAttributeComponent<{
14
14
  export class Graphic extends XmlComponent {
15
15
  private readonly data: GraphicData;
16
16
 
17
- constructor(mediaData: IMediaData, transform: IMediaDataTransformation) {
17
+ public constructor(mediaData: IMediaData, transform: IMediaDataTransformation) {
18
18
  super("a:graphic");
19
19
  this.root.push(
20
20
  new GraphicAttributes({
@@ -26,7 +26,7 @@ export class Inline extends XmlComponent {
26
26
  private readonly extent: Extent;
27
27
  private readonly graphic: Graphic;
28
28
 
29
- constructor(mediaData: IMediaData, transform: IMediaDataTransformation) {
29
+ public constructor(mediaData: IMediaData, transform: IMediaDataTransformation) {
30
30
  super("wp:inline");
31
31
 
32
32
  this.root.push(
@@ -2,7 +2,7 @@
2
2
  import { XmlComponent } from "@file/xml-components";
3
3
 
4
4
  export class WrapNone extends XmlComponent {
5
- constructor() {
5
+ public constructor() {
6
6
  super("wp:wrapNone");
7
7
  }
8
8
  }
@@ -1,8 +1,9 @@
1
1
  // http://officeopenxml.com/drwPicFloating-textWrap.php
2
2
  import { XmlAttributeComponent, XmlComponent } from "@file/xml-components";
3
- import { ITextWrapping, TextWrappingSide } from ".";
3
+
4
4
  import { IDistance } from "../drawing";
5
5
  import { IMargins } from "../floating";
6
+ import { ITextWrapping, TextWrappingSide } from "./text-wrapping";
6
7
 
7
8
  interface IWrapSquareAttributes extends IDistance {
8
9
  readonly wrapText?: TextWrappingSide;
@@ -19,7 +20,7 @@ class WrapSquareAttributes extends XmlAttributeComponent<IWrapSquareAttributes>
19
20
  }
20
21
 
21
22
  export class WrapSquare extends XmlComponent {
22
- constructor(
23
+ public constructor(
23
24
  textWrapping: ITextWrapping,
24
25
  margins: IMargins = {
25
26
  top: 0,
@@ -14,7 +14,7 @@ class WrapTightAttributes extends XmlAttributeComponent<{
14
14
  }
15
15
 
16
16
  export class WrapTight extends XmlComponent {
17
- constructor(
17
+ public constructor(
18
18
  margins: IMargins = {
19
19
  top: 0,
20
20
  bottom: 0,
@@ -14,7 +14,7 @@ class WrapTopAndBottomAttributes extends XmlAttributeComponent<{
14
14
  }
15
15
 
16
16
  export class WrapTopAndBottom extends XmlComponent {
17
- constructor(
17
+ public constructor(
18
18
  margins: IMargins = {
19
19
  top: 0,
20
20
  bottom: 0,
@@ -6,6 +6,7 @@ import { sectionMarginDefaults, sectionPageSizeDefaults } from "./document";
6
6
  import { File } from "./file";
7
7
  import { Footer, Header } from "./header";
8
8
  import { Paragraph } from "./paragraph";
9
+ import { Media } from "./media";
9
10
 
10
11
  const PAGE_SIZE_DEFAULTS = {
11
12
  "w:h": sectionPageSizeDefaults.HEIGHT,
@@ -397,7 +398,6 @@ describe("File", () => {
397
398
  sections: [],
398
399
  });
399
400
 
400
- // tslint:disable-next-line: no-unused-expression
401
401
  expect(doc.Comments).to.not.be.undefined;
402
402
  });
403
403
  });
@@ -409,8 +409,61 @@ describe("File", () => {
409
409
  sections: [],
410
410
  });
411
411
 
412
- // tslint:disable-next-line: no-unused-expression
413
412
  expect(doc.Numbering).to.not.be.undefined;
414
413
  });
415
414
  });
415
+
416
+ describe("#getters", () => {
417
+ it("should have defined getters", () => {
418
+ const doc = new File({
419
+ sections: [],
420
+ });
421
+
422
+ expect(doc.CoreProperties).to.not.be.undefined;
423
+ expect(doc.Media).to.not.be.undefined;
424
+ expect(doc.FileRelationships).to.not.be.undefined;
425
+ expect(doc.Headers).to.not.be.undefined;
426
+ expect(doc.Footers).to.not.be.undefined;
427
+ expect(doc.ContentTypes).to.not.be.undefined;
428
+ expect(doc.CustomProperties).to.not.be.undefined;
429
+ expect(doc.AppProperties).to.not.be.undefined;
430
+ expect(doc.FootNotes).to.not.be.undefined;
431
+ expect(doc.Settings).to.not.be.undefined;
432
+ expect(doc.Comments).to.not.be.undefined;
433
+ });
434
+ });
435
+
436
+ describe("#templates", () => {
437
+ // Test will be deprecated when import-dotx and templates are deprecated
438
+ it("should work with template", () => {
439
+ const doc = new File(
440
+ {
441
+ sections: [],
442
+ },
443
+ {
444
+ template: {
445
+ currentRelationshipId: 1,
446
+ headers: [],
447
+ footers: [],
448
+ styles: "",
449
+ titlePageIsDefined: true,
450
+ media: new Media(),
451
+ },
452
+ },
453
+ );
454
+
455
+ expect(doc).to.not.be.undefined;
456
+ });
457
+ });
458
+
459
+ describe("#externalStyles", () => {
460
+ it("should work with external styles", () => {
461
+ const doc = new File({
462
+ sections: [],
463
+ externalStyles: "",
464
+ });
465
+
466
+ expect(doc.Styles).to.not.be.undefined;
467
+ });
468
+ });
416
469
  });