devexpress-richedit 24.1.6-build-24232-0102 → 24.2.1-alpha-24260-0102

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 (273) hide show
  1. package/bin/gulpfile.js +1 -1
  2. package/bin/index-custom.js +1 -1
  3. package/bin/localization-builder.js +1 -1
  4. package/bin/nspell-index.js +1 -1
  5. package/bin/nspell.webpack.config.js +1 -1
  6. package/bin/webpack-externals.js +1 -1
  7. package/bin/webpack.config.js +1 -1
  8. package/dist/dx.richedit.d.ts +1 -1
  9. package/dist/dx.richedit.js +860 -788
  10. package/dist/dx.richedit.min.js +2 -2
  11. package/index.d.ts +1 -1
  12. package/index.js +1 -1
  13. package/lib/client/api/loading-panel.js +3 -3
  14. package/lib/client/bars/rich-edit-ribbon/ribbon-items-data.d.ts +2 -2
  15. package/lib/client/client-rich-edit.d.ts +1 -0
  16. package/lib/client/client-rich-edit.js +15 -11
  17. package/lib/client/commands/open-document-command.d.ts +1 -1
  18. package/lib/client/dialogs/dialog-base.js +3 -3
  19. package/lib/client/document-processor/public/processor.js +3 -3
  20. package/lib/client/formats/docx/export/data.js +5 -5
  21. package/lib/client/formats/docx/export/exporters/base/sections.js +4 -4
  22. package/lib/client/formats/docx/export/exporters/base.js +1 -1
  23. package/lib/client/formats/docx/export/exporters/content-types.js +4 -4
  24. package/lib/client/formats/docx/export/exporters/relations/relation-collection.js +1 -1
  25. package/lib/client/formats/docx/export/exporters/sub-document/base-sub-document.d.ts +1 -1
  26. package/lib/client/formats/docx/export/exporters/sub-document/base-sub-document.js +3 -3
  27. package/lib/client/formats/docx/export/exporters/sub-document/header-footer-sub-document-exporter.js +1 -1
  28. package/lib/client/formats/docx/import/data.js +2 -2
  29. package/lib/client/formats/docx/import/destination/character-properties/run-properties-base-destination.js +1 -1
  30. package/lib/client/formats/docx/import/destination/destination.d.ts +2 -2
  31. package/lib/client/formats/docx/import/destination/destination.js +7 -7
  32. package/lib/client/formats/docx/import/destination/drawing/drawing-anchor-position-destination.js +9 -9
  33. package/lib/client/formats/docx/import/destination/drawing/drawing-anchor-relative-size-destination.js +6 -6
  34. package/lib/client/formats/docx/import/destination/drawing/drawing-destination.js +38 -38
  35. package/lib/client/formats/docx/import/destination/drawing/non-visual-pucture-properties-destination.js +3 -3
  36. package/lib/client/formats/docx/import/destination/drawing/shape-properties-destination.js +9 -9
  37. package/lib/client/formats/docx/import/destination/notes/note-destination.d.ts +1 -1
  38. package/lib/client/formats/docx/import/destination/notes/note-properties-destination.js +3 -3
  39. package/lib/client/formats/docx/import/destination/numbering/numberings-destination.js +15 -15
  40. package/lib/client/formats/docx/import/destination/paragraph/paragraph-destination.js +3 -3
  41. package/lib/client/formats/docx/import/destination/paragraph-properties/paragraph-numbering-reference-destination.js +5 -5
  42. package/lib/client/formats/docx/import/destination/paragraph-properties/paragraph-properties-base-destination.js +3 -3
  43. package/lib/client/formats/docx/import/destination/paragraph-properties/paragraph-properties-destination.js +7 -7
  44. package/lib/client/formats/docx/import/destination/relationships/relationships-destination.js +3 -3
  45. package/lib/client/formats/docx/import/destination/runs/inline-object-destination.js +3 -3
  46. package/lib/client/formats/docx/import/destination/style/destinations/style-paragraph-properties-destination.js +4 -4
  47. package/lib/client/formats/docx/import/destination/table/cell/properties/table-cell-properties-destination-core.js +3 -3
  48. package/lib/client/formats/docx/import/destination/table/cell/table-cell-destination.js +3 -3
  49. package/lib/client/formats/docx/import/destination/table/row/properties/table-row-properties-destination.js +3 -3
  50. package/lib/client/formats/docx/import/destination/table/row/table-row-destination.js +3 -3
  51. package/lib/client/formats/docx/import/destination/table/table/properties/table-cell-margins-destination.d.ts +1 -1
  52. package/lib/client/formats/docx/import/destination/table/table/properties/table-properties-destination-core.js +3 -3
  53. package/lib/client/formats/docx/import/destination/table/table/properties/table-properties-destination.js +3 -3
  54. package/lib/client/formats/docx/import/destination/table/table/properties/table-properties-leaf-element-destination.js +3 -3
  55. package/lib/client/formats/docx/import/destination/table/table/table-destination.js +3 -3
  56. package/lib/client/formats/docx/import/destination/themes/color/drawing-color-properties-destination-base.js +3 -3
  57. package/lib/client/formats/docx/import/destination/themes/font/office-theme-font-collection-scheme-destination.js +7 -7
  58. package/lib/client/formats/docx/import/destination/vml/v-mlshape-destination.js +7 -7
  59. package/lib/client/formats/docx/import/importers/character-importer.js +6 -6
  60. package/lib/client/formats/docx/import/importers/comments-importer.js +1 -1
  61. package/lib/client/formats/docx/import/importers/field-importer.js +2 -2
  62. package/lib/client/formats/docx/import/importers/table-importer.js +1 -1
  63. package/lib/client/formats/docx/import/list/open-xml-list-level-override.js +3 -3
  64. package/lib/client/formats/docx/import/list/open-xml-numbering-list-info.d.ts +1 -1
  65. package/lib/client/formats/docx/utils/constants.js +6 -6
  66. package/lib/client/formats/docx/zip/xml-reader.js +10 -10
  67. package/lib/client/i-rich-constructor-settings.d.ts +3 -1
  68. package/lib/client/model-api/api-utils/parameter-checker.d.ts +1 -1
  69. package/lib/client/model-api/fonts/control-font.js +4 -4
  70. package/lib/client/model-api/images/image-iterator.js +3 -3
  71. package/lib/client/model-api/interval.js +1 -1
  72. package/lib/client/public/api/authentication-options.js +3 -3
  73. package/lib/client/public/api/range-permission-options.js +3 -3
  74. package/lib/client/public/client-events.d.ts +2 -1
  75. package/lib/client/public/client-events.js +3 -1
  76. package/lib/client/public/commands/enum.d.ts +1 -1
  77. package/lib/client/public/context-menu/menu.js +5 -5
  78. package/lib/client/public/events.d.ts +6 -0
  79. package/lib/client/public/events.js +8 -0
  80. package/lib/client/public/nusa/external-types.d.ts +2 -2
  81. package/lib/client/public/nusa/settings.js +1 -1
  82. package/lib/client/public/options.d.ts +2 -0
  83. package/lib/client/public/ribbon/item-ids.d.ts +1 -1
  84. package/lib/client/public/ribbon/tab.d.ts +4 -4
  85. package/lib/client/public/ribbon/tab.js +2 -2
  86. package/lib/client/public/rich-edit.js +1 -1
  87. package/lib/client/ribbon/i-toolbar-item-options.d.ts +1 -1
  88. package/lib/client/ribbon/ribbon.d.ts +3 -3
  89. package/lib/client/ribbon/ribbon.js +1 -1
  90. package/lib/client/ribbon/toolbar-items/toolbar-interactive-item.d.ts +2 -2
  91. package/lib/client/settings.js +4 -0
  92. package/lib/client/utils/devextreme/devextreme-types.d.ts +17 -17
  93. package/lib/client/utils/devextreme/dxt-utils.d.ts +1 -1
  94. package/lib/common/auto-correct/auto-correct-providers.js +1 -1
  95. package/lib/common/bars/base.js +1 -1
  96. package/lib/common/canvas/canvas-manager.js +3 -3
  97. package/lib/common/canvas/canvas-scroll-manager.js +2 -2
  98. package/lib/common/canvas/listeners/anchor-listener.js +3 -3
  99. package/lib/common/canvas/listeners/resize-box-listener.js +5 -5
  100. package/lib/common/canvas/renderes/canvas-listener/canvas-listener.js +1 -1
  101. package/lib/common/canvas/renderes/change-active-sub-document/renderer.js +10 -10
  102. package/lib/common/canvas/renderes/common/document-renderer.d.ts +1 -1
  103. package/lib/common/canvas/renderes/common/document-renderer.js +1 -1
  104. package/lib/common/canvas/renderes/view-manager.js +3 -3
  105. package/lib/common/client-side-events.d.ts +1 -0
  106. package/lib/common/client-side-events.js +3 -0
  107. package/lib/common/commands/command-base.js +10 -10
  108. package/lib/common/commands/command-states.js +3 -3
  109. package/lib/common/commands/dialogs/dialog-spell-checker-command.js +3 -3
  110. package/lib/common/commands/document/print-document-on-client-command.js +4 -4
  111. package/lib/common/commands/fields/open-hyperlink-command.js +6 -2
  112. package/lib/common/commands/ruler/toggle-show-horizontal-ruler-command.js +3 -1
  113. package/lib/common/commands/text/change-text-case-commands.d.ts +1 -1
  114. package/lib/common/event-manager.js +4 -4
  115. package/lib/common/formats/html/export/html-document-exporter.js +1 -1
  116. package/lib/common/formats/html/export/html-export.js +4 -4
  117. package/lib/common/formats/html/import/html-importer.d.ts +1 -1
  118. package/lib/common/formats/html/import/html-importer.js +12 -12
  119. package/lib/common/formats/html/import/html-model-inserter.js +4 -4
  120. package/lib/common/formats/html/import/importers/base.js +1 -1
  121. package/lib/common/formats/html/import/utils/character-properties-utils.js +4 -4
  122. package/lib/common/formats/i-document-importer.d.ts +2 -2
  123. package/lib/common/formats/pdf/exporter.js +3 -3
  124. package/lib/common/formats/pdf/interfaces.d.ts +2 -2
  125. package/lib/common/formats/rtf/export/exporter.js +1 -1
  126. package/lib/common/formats/rtf/export/exporters/rtf-anchored-picture-run-exporter.js +5 -5
  127. package/lib/common/formats/rtf/export/exporters/rtf-content-exporter.d.ts +1 -1
  128. package/lib/common/formats/rtf/export/exporters/rtf-content-exporter.js +2 -2
  129. package/lib/common/formats/rtf/export/rtf-builder.d.ts +2 -2
  130. package/lib/common/formats/rtf/import/destination/base/destination.d.ts +4 -4
  131. package/lib/common/formats/rtf/import/destination/base/destination.js +1 -1
  132. package/lib/common/formats/rtf/import/destination/base/skip-destination.js +3 -3
  133. package/lib/common/formats/rtf/import/destination/base/string-property-base-destination.js +2 -2
  134. package/lib/common/formats/rtf/import/destination/base/string-property-destination.js +2 -2
  135. package/lib/common/formats/rtf/import/destination/base/unicode-destination.js +2 -2
  136. package/lib/common/formats/rtf/import/destination/fields/field-sub-destination.js +1 -1
  137. package/lib/common/formats/rtf/import/destination/fields/table-content-field-destination.js +1 -1
  138. package/lib/common/formats/rtf/import/destination/font-table-destination.js +3 -3
  139. package/lib/common/formats/rtf/import/destination/numbering-list/destination-old-paragraph-numbering.js +1 -1
  140. package/lib/common/formats/rtf/import/destination/numbering-list/destination-old-section-numbering-level.js +1 -1
  141. package/lib/common/formats/rtf/import/destination/picture/picture-destination.js +4 -4
  142. package/lib/common/formats/rtf/import/destination/shape/shape-properties-destination-base.js +2 -2
  143. package/lib/common/formats/rtf/import/destination/shape/shape-property-destination.js +2 -2
  144. package/lib/common/formats/rtf/import/destination/shape/shape-property-hsv-value-destination.js +2 -2
  145. package/lib/common/formats/rtf/import/destination/styles/character-style-destination.js +5 -5
  146. package/lib/common/formats/rtf/import/destination/styles/style-sheet-destination.js +3 -3
  147. package/lib/common/formats/rtf/import/destination/styles/table-style-destination.js +7 -7
  148. package/lib/common/formats/rtf/import/destination/sub-document/destination-sub-document.js +2 -2
  149. package/lib/common/formats/rtf/import/destination/sub-document/section-header-footer-destination-base.js +1 -1
  150. package/lib/common/formats/rtf/import/importers/character-importer.js +1 -1
  151. package/lib/common/formats/rtf/import/importers/field-importer.js +2 -2
  152. package/lib/common/formats/rtf/import/importers/paragraph-importer.js +4 -4
  153. package/lib/common/formats/rtf/import/importers/range-permission-importer.js +1 -1
  154. package/lib/common/formats/rtf/import/importers/section-importer.js +4 -4
  155. package/lib/common/formats/rtf/import/importers/styles/paragraph-style-importer.js +4 -4
  156. package/lib/common/formats/rtf/import/model/numbering-lists/rtf-old-list-level-info.js +10 -10
  157. package/lib/common/formats/rtf/import/rtf-import-data.js +13 -13
  158. package/lib/common/formats/txt/txt-exporter.js +1 -1
  159. package/lib/common/global-event-dispatcher.d.ts +1 -1
  160. package/lib/common/interfaces/i-control-owner.d.ts +1 -0
  161. package/lib/common/layout/main-structures/layout-boxes/layout-anchored-object-box.d.ts +1 -1
  162. package/lib/common/layout/main-structures/layout-boxes/layout-dash-box.js +1 -1
  163. package/lib/common/layout/main-structures/layout-boxes/layout-line-break-box.js +4 -4
  164. package/lib/common/layout/main-structures/layout-boxes/layout-numbering-list-box.js +10 -10
  165. package/lib/common/layout/main-structures/layout-boxes/layout-page-break-box.js +4 -4
  166. package/lib/common/layout/main-structures/layout-row.js +1 -1
  167. package/lib/common/layout/table/table-cell-iterator.js +6 -6
  168. package/lib/common/layout-engine/hit-test-manager/hit-test-result.d.ts +1 -1
  169. package/lib/common/layout-engine/selection/selection-formatter.js +1 -1
  170. package/lib/common/layout-formatter/box/generator/box-infos-generator.js +3 -3
  171. package/lib/common/layout-formatter/changes/changes/layout-change-base.js +12 -12
  172. package/lib/common/layout-formatter/invalidator/layout-invalidator.js +3 -3
  173. package/lib/common/layout-formatter/managers/formatter-manager.d.ts +1 -1
  174. package/lib/common/layout-formatter/managers/formatter-manager.js +2 -2
  175. package/lib/common/layout-formatter/row/result.js +3 -3
  176. package/lib/common/layout-formatter/row/size-engine/row-formatting-info.js +2 -2
  177. package/lib/common/layout-formatter/row/size-engine/row-height-calculator.js +3 -3
  178. package/lib/common/layout-formatter/row/tab-info.js +8 -8
  179. package/lib/common/layout-formatter/table/borders/border-helper.d.ts +1 -1
  180. package/lib/common/layout-formatter/table/borders/border-helper.js +5 -5
  181. package/lib/common/layout-formatter/table/formatter.js +12 -12
  182. package/lib/common/layout-formatter/table/grid-engine/calculators/column-interval.js +3 -3
  183. package/lib/common/layout-formatter/table/grid-engine/calculators/grid-calculator.js +3 -3
  184. package/lib/common/layout-formatter/table/grid-engine/calculators/table-properties-cache.js +7 -7
  185. package/lib/common/layout-formatter/table/info/cell-info.js +8 -8
  186. package/lib/common/layout-formatter/table/info/row-info.js +1 -1
  187. package/lib/common/layout-formatter/table/info/table-info.js +17 -17
  188. package/lib/common/model/bookmarks.js +7 -7
  189. package/lib/common/model/borders/border-base.js +3 -3
  190. package/lib/common/model/caches/hash-based-cache.d.ts +1 -1
  191. package/lib/common/model/caches/hash-based-cache.js +2 -2
  192. package/lib/common/model/caches/images.js +11 -11
  193. package/lib/common/model/changes/change.d.ts +1 -1
  194. package/lib/common/model/changes/sub-document/list/paragraph-numbering-list-changed.js +1 -1
  195. package/lib/common/model/changes/sub-document/table/cell-property-changed.js +1 -1
  196. package/lib/common/model/changes/sub-document/table/property-changed.js +1 -1
  197. package/lib/common/model/changes/sub-document/table/row-property-changed.js +1 -1
  198. package/lib/common/model/character/character-property-descriptor.d.ts +1 -1
  199. package/lib/common/model/color/color-model-info.js +6 -6
  200. package/lib/common/model/creator/font-corrector.js +5 -5
  201. package/lib/common/model/document-model.js +10 -10
  202. package/lib/common/model/fields/field-request-manager.d.ts +1 -1
  203. package/lib/common/model/fields/field-request-manager.js +2 -2
  204. package/lib/common/model/fields/parsers/field-code-parser.d.ts +2 -2
  205. package/lib/common/model/fields/tree-creator.js +1 -1
  206. package/lib/common/model/floating-objects/sizes.js +2 -2
  207. package/lib/common/model/fonts/control-font.js +9 -9
  208. package/lib/common/model/fonts/loader.js +1 -1
  209. package/lib/common/model/footnotes/footnote.d.ts +1 -1
  210. package/lib/common/model/history/base/history-item.js +6 -6
  211. package/lib/common/model/history/base/interval-based-history-item.js +2 -2
  212. package/lib/common/model/history/base/position-based-history-item.js +2 -2
  213. package/lib/common/model/history/items/insert-text-history-item.js +3 -3
  214. package/lib/common/model/history/selection/scroll-history-item.js +3 -3
  215. package/lib/common/model/history/selection/selection-history-item.js +3 -3
  216. package/lib/common/model/json/importers/sub-document/run-importers.d.ts +2 -2
  217. package/lib/common/model/manipulators/base-manipulator.js +2 -2
  218. package/lib/common/model/manipulators/document/sub-document-inserter.js +6 -6
  219. package/lib/common/model/manipulators/model-manipulator.js +1 -1
  220. package/lib/common/model/manipulators/picture-manipulator/insert-picture-manipulator-params.js +1 -1
  221. package/lib/common/model/manipulators/picture-manipulator/loader/image-loading-options.d.ts +1 -1
  222. package/lib/common/model/manipulators/picture-manipulator/loader/picture-loader.d.ts +1 -1
  223. package/lib/common/model/manipulators/picture-manipulator/loader/picture-loader.js +1 -1
  224. package/lib/common/model/manipulators/range/create-range-copy-operation.js +3 -3
  225. package/lib/common/model/manipulators/tables/insert-table-cell-operation.js +1 -1
  226. package/lib/common/model/manipulators/tables/insert-table-row-operation.js +1 -1
  227. package/lib/common/model/manipulators/tables/merge-table-cells-operation.js +1 -1
  228. package/lib/common/model/manipulators/tables/table-normalizator.d.ts +2 -2
  229. package/lib/common/model/options/fields.d.ts +2 -0
  230. package/lib/common/model/options/fields.js +7 -3
  231. package/lib/common/model/options/pdf.d.ts +2 -2
  232. package/lib/common/model/options/rich-options.js +3 -3
  233. package/lib/common/model/paragraph/paragraph-property-descriptors.d.ts +1 -1
  234. package/lib/common/model/paragraph/paragraph.js +1 -1
  235. package/lib/common/model/position/linked-interval.js +4 -4
  236. package/lib/common/model/range-permissions.js +3 -3
  237. package/lib/common/model/runs/anchored-picture-run.js +4 -4
  238. package/lib/common/model/runs/inline-picture-run.d.ts +1 -1
  239. package/lib/common/model/runs/inline-picture-run.js +1 -1
  240. package/lib/common/model/runs/run-base.js +4 -4
  241. package/lib/common/model/section/section-property-descriptor.d.ts +1 -1
  242. package/lib/common/model/shadings/shading-info.js +3 -3
  243. package/lib/common/model/styles-manager.d.ts +1 -1
  244. package/lib/common/model/tables/main-structures/table-row.js +1 -1
  245. package/lib/common/mouse-handler/base/manipulator-handler-state-base.js +2 -2
  246. package/lib/common/mouse-handler/mouse-handler/mouse-handler-drag-column-or-row-state.d.ts +1 -1
  247. package/lib/common/rich-edit-core.js +11 -11
  248. package/lib/common/rich-utils/debug/runtime-template-model-creator.js +6 -6
  249. package/lib/common/scroll/model-states.d.ts +1 -1
  250. package/lib/common/scroll/model-states.js +4 -4
  251. package/lib/common/selection/input-position.js +17 -6
  252. package/lib/common/selection/selected-cells-engine.js +12 -12
  253. package/lib/common/selection/selection-intervals-info.js +7 -7
  254. package/lib/common/selection/selection-state.js +5 -5
  255. package/lib/common/selection/selection.js +13 -13
  256. package/lib/common/ui/quick-search-panel.js +1 -1
  257. package/lib/common/ui/ruler/controls/base.js +1 -1
  258. package/lib/common/ui/ruler/controls/column.js +1 -1
  259. package/lib/common/ui/ruler/controls/divisions.js +1 -1
  260. package/lib/common/ui/ruler/controls/indent/first-line.js +5 -5
  261. package/lib/common/ui/ruler/controls/indent/left.js +2 -2
  262. package/lib/common/ui/ruler/controls/indent/right.js +5 -5
  263. package/lib/common/ui/ruler/controls/margin/left.js +3 -3
  264. package/lib/common/ui/ruler/controls/owner.js +1 -1
  265. package/lib/common/ui/ruler/controls/ruler.js +4 -4
  266. package/lib/common/ui/ruler/controls/tab/tab-type.js +2 -2
  267. package/lib/common/ui/ruler/manager.js +18 -18
  268. package/lib/common/ui/ruler/model-data.js +4 -4
  269. package/lib/common/ui/ruler/ruler.js +2 -2
  270. package/lib/common/utils/utils.d.ts +7 -0
  271. package/lib/common/utils/utils.js +26 -0
  272. package/lib/common/view-settings/views-settings.js +6 -6
  273. package/package.json +3 -3
@@ -68,6 +68,18 @@ export class HtmlImportData {
68
68
  }
69
69
  }
70
70
  export class HtmlImporter {
71
+ get currElement() { return ListUtils.last(this.levelInfo).element; }
72
+ ;
73
+ get currElementChildren() { return ListUtils.last(this.levelInfo).childElements; }
74
+ ;
75
+ get prevLevelInfo() { return this.levelInfo[this.levelInfo.length - 2]; }
76
+ get currLevelInfo() { return ListUtils.last(this.levelInfo); }
77
+ get currListItemLevelInfo() { return ListUtils.reverseElementBy(this.levelInfo, (levelInfo) => { var _a; return ((_a = levelInfo.tagImporter) === null || _a === void 0 ? void 0 : _a.elementTag()) === 'LI'; }); }
78
+ get currListInfo() {
79
+ const currListItemLevelInfo = this.currListItemLevelInfo;
80
+ return currListItemLevelInfo && !currListItemLevelInfo.tagImporter.paragraphWasAddedBefore ? ListUtils.last(this.listInfos) : null;
81
+ }
82
+ get subDocument() { return this.subDocPosition.subDocument; }
71
83
  constructor(modelManager, measurer, subDocPosition, initElements, charPropsBundle, formatImagesImporter) {
72
84
  this.fieldsId = 0;
73
85
  this.listIndex = 0;
@@ -119,18 +131,6 @@ export class HtmlImporter {
119
131
  for (let importerConst of HtmlImporter.importers)
120
132
  this.tagImporters[new importerConst(this).elementTag()] = importerConst;
121
133
  }
122
- get currElement() { return ListUtils.last(this.levelInfo).element; }
123
- ;
124
- get currElementChildren() { return ListUtils.last(this.levelInfo).childElements; }
125
- ;
126
- get prevLevelInfo() { return this.levelInfo[this.levelInfo.length - 2]; }
127
- get currLevelInfo() { return ListUtils.last(this.levelInfo); }
128
- get currListItemLevelInfo() { return ListUtils.reverseElementBy(this.levelInfo, (levelInfo) => { var _a; return ((_a = levelInfo.tagImporter) === null || _a === void 0 ? void 0 : _a.elementTag()) === 'LI'; }); }
129
- get currListInfo() {
130
- const currListItemLevelInfo = this.currListItemLevelInfo;
131
- return currListItemLevelInfo && !currListItemLevelInfo.tagImporter.paragraphWasAddedBefore ? ListUtils.last(this.listInfos) : null;
132
- }
133
- get subDocument() { return this.subDocPosition.subDocument; }
134
134
  import() {
135
135
  this.importStarted = false;
136
136
  this.importedRunsInfo = [];
@@ -11,6 +11,10 @@ import { FixedInterval } from '@devexpress/utils/lib/intervals/fixed';
11
11
  import { ListUtils } from '@devexpress/utils/lib/utils/list';
12
12
  import { PasteHtmlDataHistoryItem } from '../model/history/paste-html-data-history-item';
13
13
  export class HtmlModelInserter {
14
+ get options() { return this.modelManager.richOptions.control; }
15
+ ;
16
+ get subDocument() { return this.subDocPos.subDocument; }
17
+ ;
14
18
  constructor(modelManager, subDocPos, htmlData, charPropsBundle) {
15
19
  this.pastedListsIndices = {};
16
20
  this.fieldsMap = {};
@@ -38,10 +42,6 @@ export class HtmlModelInserter {
38
42
  HtmlModelInserter.runConverterMap[RunType.FieldResultEndRun] = this.convertFieldResultEndRun;
39
43
  }
40
44
  }
41
- get options() { return this.modelManager.richOptions.control; }
42
- ;
43
- get subDocument() { return this.subDocPos.subDocument; }
44
- ;
45
45
  insert() {
46
46
  for (let runInfo of this.htmlData.runsInfo)
47
47
  this.position += HtmlModelInserter.runConverterMap[runInfo.runType].call(this, runInfo);
@@ -1,11 +1,11 @@
1
1
  import { ListUtils } from '@devexpress/utils/lib/utils/list';
2
2
  export class HtmlTagImporterBase {
3
+ get colorProvider() { return this.importer.modelManager.model.colorProvider; }
3
4
  constructor(importer) {
4
5
  this.enablePreserveLineBreaks = false;
5
6
  this.paragraphWasAddedBefore = false;
6
7
  this.importer = importer;
7
8
  }
8
- get colorProvider() { return this.importer.modelManager.model.colorProvider; }
9
9
  getClosestImporterByTagName(tagName) {
10
10
  return ListUtils.reverseElementBy(this.importer.levelInfo, (levelInfo) => levelInfo.tagImporter.elementTag() == tagName).tagImporter;
11
11
  }
@@ -9,16 +9,16 @@ import { DomUtils } from '@devexpress/utils/lib/utils/dom';
9
9
  import { LoadFontInfo } from '../load-font-info';
10
10
  import { HtmlImporterFontUtils } from './font-utils';
11
11
  export class HtmlImporterMaskedCharacterProperties {
12
+ get model() { return this.importer.modelManager.model; }
13
+ ;
14
+ get controlOptions() { return this.importer.modelManager.richOptions.control; }
15
+ ;
12
16
  constructor(importer, loadFontInfos, tempFontInfoCache, allowCreateNewFonts) {
13
17
  this.importer = importer;
14
18
  this.loadFontInfos = loadFontInfos;
15
19
  this.tempFontInfoCache = tempFontInfoCache;
16
20
  this.allowCreateNewFonts = allowCreateNewFonts;
17
21
  }
18
- get model() { return this.importer.modelManager.model; }
19
- ;
20
- get controlOptions() { return this.importer.modelManager.richOptions.control; }
21
- ;
22
22
  getBundleFrom(element, interval) {
23
23
  return new MaskedCharacterPropertiesBundle(this.import(element, interval, this.importer.charPropsBundle.props), this.importer.charPropsBundle.style);
24
24
  }
@@ -1,8 +1,8 @@
1
1
  import { DocumentModel, IModelOptions } from '../model/document-model';
2
2
  import { DocumentImporterErrors } from './document-importer-errors';
3
3
  import { FormatImagesImporter } from './utils/images-import';
4
- export declare type FormatImportCallback = (model: DocumentModel, formatImagesImporter: FormatImagesImporter) => void;
5
- export declare type FormatImportReject = (reason: DocumentImporterErrors) => void;
4
+ export type FormatImportCallback = (model: DocumentModel, formatImagesImporter: FormatImagesImporter) => void;
5
+ export type FormatImportReject = (reason: DocumentImporterErrors) => void;
6
6
  export interface IDocumentImporter {
7
7
  importFromFile(blob: Blob, modelOptions: IModelOptions, callback: FormatImportCallback, reject: FormatImportReject): void;
8
8
  }
@@ -7,9 +7,6 @@ import { afterFontsLoaded, fontWebApiAvailable } from '@devexpress/utils/lib/uti
7
7
  import { ListUtils } from '@devexpress/utils/lib/utils/list';
8
8
  import { PdfLayoutPageExporter } from './page-exporter';
9
9
  export class PdfExporter {
10
- constructor(docProcessor) {
11
- this.docProcessor = docProcessor;
12
- }
13
10
  get layoutFormatterManager() {
14
11
  return this.docProcessor.layoutFormatterManager;
15
12
  }
@@ -25,6 +22,9 @@ export class PdfExporter {
25
22
  get fontsSettings() {
26
23
  return this.docProcessor.modelManager.richOptions.fonts;
27
24
  }
25
+ constructor(docProcessor) {
26
+ this.docProcessor = docProcessor;
27
+ }
28
28
  export(callback, options) {
29
29
  const modifyPdfDocument = typeof options == 'function' ? options :
30
30
  (!options || !options.modifyPdfDocument ? () => { } : options.modifyPdfDocument);
@@ -1,5 +1,5 @@
1
1
  /// <reference types="node" />
2
- export declare type IPdfKitColorValue = string | [number, number, number] | [number, number, number, number];
2
+ export type IPdfKitColorValue = string | [number, number, number] | [number, number, number, number];
3
3
  export interface IPdfKitDocument {
4
4
  pipe(stream: any): void;
5
5
  registerFont(font: string, source: ArrayBuffer, fontFamily: string): IPdfKitDocument;
@@ -31,7 +31,7 @@ export interface IPdfKitDocument {
31
31
  fillOpacity(opacity: number): IPdfKitDocument;
32
32
  fill(rule: IPdfKitRuleValue): IPdfKitDocument;
33
33
  }
34
- export declare type IPdfKitRuleValue = 'even-odd' | 'evenodd' | 'non-zero' | 'nonzero';
34
+ export type IPdfKitRuleValue = 'even-odd' | 'evenodd' | 'non-zero' | 'nonzero';
35
35
  export interface IPdfKitPageOptions {
36
36
  size?: [number, number] | string;
37
37
  margin?: number;
@@ -10,6 +10,7 @@ import { RtfExportSR } from '../translation-table/rtf-export-sr';
10
10
  import { RtfContentExporter } from './exporters/rtf-content-exporter';
11
11
  import { RtfExportHelper } from './helpers/rtf-export-helper';
12
12
  export class RtfExporter {
13
+ get documentModel() { return this.modelManipulator.model; }
13
14
  constructor(modelManipulator, options) {
14
15
  this.modelManipulator = modelManipulator;
15
16
  this.options = options;
@@ -17,7 +18,6 @@ export class RtfExporter {
17
18
  this.contentExporter = new RtfContentExporter(this.documentModel, options, this.rtfExportHelper);
18
19
  this.rtfBuilder = this.contentExporter.createRtfBuilder();
19
20
  }
20
- get documentModel() { return this.modelManipulator.model; }
21
21
  exportToBlob(callback) {
22
22
  this.modelManipulator.picture.loader.ensureAllPicturesLoaded(this.options.ensurePictureLoadedTimeout, (_loaded) => {
23
23
  callback(new Blob([this.exportAsString()], { type: 'application/rtf' }));
@@ -1,17 +1,17 @@
1
1
  import { RtfFloatingObjectPictureExportStrategy } from './picture/rtf-floating-object-picture-export-strategy';
2
2
  import { RtfAnchoredRunExporter } from './rtf-anchored-run-exporter';
3
3
  export class RtfAnchoredPictureRunExporter extends RtfAnchoredRunExporter {
4
- constructor(rtfBuilder, pictureRun, imageCache) {
5
- super(rtfBuilder, pictureRun.anchorInfo, pictureRun.shape, pictureRun.size, pictureRun.info.containerProperties);
6
- this.pictureRun = pictureRun;
7
- this.imageCache = imageCache;
8
- }
9
4
  getWidth() {
10
5
  return this.size.actualSize.width;
11
6
  }
12
7
  getHeight() {
13
8
  return this.size.actualSize.height;
14
9
  }
10
+ constructor(rtfBuilder, pictureRun, imageCache) {
11
+ super(rtfBuilder, pictureRun.anchorInfo, pictureRun.shape, pictureRun.size, pictureRun.info.containerProperties);
12
+ this.pictureRun = pictureRun;
13
+ this.imageCache = imageCache;
14
+ }
15
15
  exportContent() {
16
16
  const exportStrategy = new RtfFloatingObjectPictureExportStrategy();
17
17
  exportStrategy.export(this.rtfBuilder, this.pictureRun.info, this.imageCache, this.pictureRun.info.containerProperties);
@@ -15,7 +15,7 @@ import { DocumentPropertyNames, RtfDocumentExporterOptions } from '../rtf-docume
15
15
  import { RtfCharacterPropertiesExporter } from './rtf-character-properties-exporter';
16
16
  import { RtfParagraphPropertiesExporter } from './rtf-paragraph-properties-exporter';
17
17
  import { RtfSectionPropertiesExporter } from './rtf-section-properties-exporter';
18
- export declare type RunHandler = (run: RunBase, runText: string, absolutePosition: number) => void;
18
+ export type RunHandler = (run: RunBase, runText: string, absolutePosition: number) => void;
19
19
  export declare class RtfContentExporter {
20
20
  documentModel: DocumentModel;
21
21
  subDocument: SubDocument;
@@ -35,6 +35,8 @@ import { RtfSectionPropertiesExporter } from './rtf-section-properties-exporter'
35
35
  import { RtfStyleExporter } from './rtf-style-exporter';
36
36
  import { RtfTableExporter } from './table/rtf-table-exporter';
37
37
  export class RtfContentExporter {
38
+ get shouldExportHiddenText() { return true; }
39
+ ;
38
40
  constructor(documentModel, options, rtfExportHelper) {
39
41
  this.shouldFourceUpdateIterators = false;
40
42
  this.documentModel = documentModel;
@@ -57,8 +59,6 @@ export class RtfContentExporter {
57
59
  .add(RunType.AnchoredTextBoxRun, this.anchoredTextBoxRunHandler)
58
60
  .get();
59
61
  }
60
- get shouldExportHiddenText() { return true; }
61
- ;
62
62
  createRtfBuilder() {
63
63
  return new RtfBuilder();
64
64
  }
@@ -1,7 +1,7 @@
1
1
  import { ChunkedText } from '@devexpress/utils/lib/class/chunked-text';
2
2
  import { NonVisualDrawingObjectInfo } from '../../../model/manipulators/picture-manipulator/non-visual-drawing-object-info';
3
- declare type SpecialMarksTable = Record<string, string>;
4
- declare type Action = () => void;
3
+ type SpecialMarksTable = Record<string, string>;
4
+ type Action = () => void;
5
5
  export declare class RtfBuilder {
6
6
  static readonly specialMarks: SpecialMarksTable;
7
7
  static readonly byteToHexString: string[];
@@ -2,10 +2,10 @@ import { SubDocument } from '../../../../../model/sub-document';
2
2
  import { RtfFormattingInfo } from '../../model/character/rtf-formatting-info';
3
3
  import { RtfImportData } from '../../rtf-import-data';
4
4
  import { DestinationType } from '../utils/destination-type';
5
- export declare type TranslateControlCharHandler = (importer: RtfImportData, ch: string) => void;
6
- export declare type ControlCharTranslatorTable = Record<string, TranslateControlCharHandler>;
7
- export declare type TranslateKeywordHandler = (importer: RtfImportData, parameterValue: number, hasParameter: boolean) => void;
8
- export declare type KeywordTranslatorTable = Record<string, TranslateKeywordHandler>;
5
+ export type TranslateControlCharHandler = (importer: RtfImportData, ch: string) => void;
6
+ export type ControlCharTranslatorTable = Record<string, TranslateControlCharHandler>;
7
+ export type TranslateKeywordHandler = (importer: RtfImportData, parameterValue: number, hasParameter: boolean) => void;
8
+ export type KeywordTranslatorTable = Record<string, TranslateKeywordHandler>;
9
9
  export declare abstract class DestinationBase {
10
10
  static readonly macCodePage: number;
11
11
  static readonly pcCodePage: number;
@@ -4,6 +4,7 @@ import { RtfFormattingInfo } from '../../model/character/rtf-formatting-info';
4
4
  import { RtfParsingState } from '../../model/enums';
5
5
  import { DestinationType } from '../utils/destination-type';
6
6
  export class DestinationBase {
7
+ static get empty() { return EmptyDestination._empty; }
7
8
  constructor(importer) {
8
9
  if (importer) {
9
10
  this.importer = importer;
@@ -13,7 +14,6 @@ export class DestinationBase {
13
14
  importer.importers.character.characterFormatting.rtfFormattingInfo = rtfFormattingInfo;
14
15
  }
15
16
  }
16
- static get empty() { return EmptyDestination._empty; }
17
17
  createRtfFormattingInfo() {
18
18
  return new RtfFormattingInfo();
19
19
  }
@@ -2,15 +2,15 @@ import { SkipCharacterDecoder } from '../../encoding/skip-character-decoder';
2
2
  import { DestinationType } from '../utils/destination-type';
3
3
  import { DestinationBase } from './destination';
4
4
  export class SkipDestination extends DestinationBase {
5
+ get destinationType() { return DestinationType.SkipDestination; }
6
+ get controlCharHT() { return null; }
7
+ ;
5
8
  constructor(importer) {
6
9
  super(importer);
7
10
  const formInfo = this.importer.importers.character.characterFormatting.rtfFormattingInfo;
8
11
  this.oldDecoder = formInfo.activeDecoder;
9
12
  formInfo.activeDecoder = new SkipCharacterDecoder();
10
13
  }
11
- get destinationType() { return DestinationType.SkipDestination; }
12
- get controlCharHT() { return null; }
13
- ;
14
14
  beforePopRtfState() {
15
15
  this.importer.importers.character.characterFormatting.rtfFormattingInfo.activeDecoder = this.oldDecoder;
16
16
  super.beforePopRtfState();
@@ -3,13 +3,13 @@ import { StringUtils } from '@devexpress/utils/lib/utils/string';
3
3
  import { DestinationType } from '../utils/destination-type';
4
4
  import { DestinationBase } from './destination';
5
5
  export class StringPropertyBaseDestination extends DestinationBase {
6
+ get destinationType() { return DestinationType.StringPropertyBaseDestination; }
7
+ get controlCharHT() { return StringPropertyBaseDestination.controlCharHT; }
6
8
  constructor(importer, modifier) {
7
9
  super(importer);
8
10
  this.value = [];
9
11
  this.modifier = modifier;
10
12
  }
11
- get destinationType() { return DestinationType.StringPropertyBaseDestination; }
12
- get controlCharHT() { return StringPropertyBaseDestination.controlCharHT; }
13
13
  processCharCore(ch) {
14
14
  this.value.push(ch);
15
15
  }
@@ -3,12 +3,12 @@ import { StringUtils } from '@devexpress/utils/lib/utils/string';
3
3
  import { DestinationType } from '../utils/destination-type';
4
4
  import { UnicodeStringValueDestination } from './unicode-string-value-destination';
5
5
  export class StringPropertyDestination extends UnicodeStringValueDestination {
6
+ get destinationType() { return DestinationType.StringPropertyDestination; }
7
+ get controlCharHT() { return StringPropertyDestination.controlCharHT; }
6
8
  constructor(importer, setProperty) {
7
9
  super(importer);
8
10
  this.setProperty = setProperty;
9
11
  }
10
- get destinationType() { return DestinationType.StringPropertyDestination; }
11
- get controlCharHT() { return StringPropertyDestination.controlCharHT; }
12
12
  createEmptyClone() {
13
13
  return new StringPropertyDestination(this.importer, this.setProperty);
14
14
  }
@@ -1,12 +1,12 @@
1
1
  import { DestinationType } from '../utils/destination-type';
2
2
  import { DestinationBase } from './destination';
3
3
  export class UnicodeDestination extends DestinationBase {
4
+ get destinationType() { return DestinationType.UnicodeDestination; }
5
+ get controlCharHT() { return null; }
4
6
  constructor(importer, lastDestination) {
5
7
  super(importer);
6
8
  this.lastDestination = lastDestination;
7
9
  }
8
- get destinationType() { return DestinationType.UnicodeDestination; }
9
- get controlCharHT() { return null; }
10
10
  createClone() {
11
11
  return new UnicodeDestination(this.importer, this.lastDestination);
12
12
  }
@@ -1,11 +1,11 @@
1
1
  import { DefaultDestination } from '../sub-document/default-destination';
2
2
  import { DestinationType } from '../utils/destination-type';
3
3
  export class FieldSubDestination extends DefaultDestination {
4
+ get destinationType() { return DestinationType.FieldSubDestination; }
4
5
  constructor(importer) {
5
6
  super(importer, importer.subDocument);
6
7
  this.nestedGroupLevel = 1;
7
8
  }
8
- get destinationType() { return DestinationType.FieldSubDestination; }
9
9
  createClone() {
10
10
  const clone = this.createInstance();
11
11
  clone.nestedGroupLevel = this.nestedGroupLevel;
@@ -2,13 +2,13 @@ import { DestinationType } from '../utils/destination-type';
2
2
  import { TCFieldState } from './enums';
3
3
  import { FieldSubDestination } from './field-sub-destination';
4
4
  export class TableContentFieldDestination extends FieldSubDestination {
5
+ get destinationType() { return DestinationType.TableContentFieldDestination; }
5
6
  constructor(importer, createField) {
6
7
  super(importer);
7
8
  if (!createField)
8
9
  return;
9
10
  this.insertTextCore(TableContentFieldDestination.tcFieldName);
10
11
  }
11
- get destinationType() { return DestinationType.TableContentFieldDestination; }
12
12
  tableOfContentsEntryLevelNumberKeyword(parameterValue, hasParameter) {
13
13
  this.closeQuotes();
14
14
  super.tableOfContentsEntryLevelNumberKeyword(parameterValue, hasParameter);
@@ -3,15 +3,15 @@ import { RtfFontInfo } from '../model/character/rtf-font-info';
3
3
  import { DestinationBase } from './base/destination';
4
4
  import { DestinationType } from './utils/destination-type';
5
5
  export class FontTableDestination extends DestinationBase {
6
+ get destinationType() { return DestinationType.FontTableDestination; }
7
+ get controlCharHT() { return null; }
8
+ get keywordHT() { return null; }
6
9
  constructor(importer, nestedState = false) {
7
10
  super(importer);
8
11
  this.nestedState = nestedState;
9
12
  this.fontInfo = new RtfFontInfo();
10
13
  this.emptyFontInfo = true;
11
14
  }
12
- get destinationType() { return DestinationType.FontTableDestination; }
13
- get controlCharHT() { return null; }
14
- get keywordHT() { return null; }
15
15
  processKeywordCore(keyword, parameterValue, hasParameter) {
16
16
  if (!hasParameter)
17
17
  parameterValue = 0;
@@ -8,6 +8,7 @@ import { RtfOldListLevelInfo } from '../../model/numbering-lists/rtf-old-list-le
8
8
  import { DestinationType } from '../utils/destination-type';
9
9
  import { DestinationOldParagraphNumberingBase } from './destination-old-paragraph-numbering-base';
10
10
  export class DestinationOldParagraphNumbering extends DestinationOldParagraphNumberingBase {
11
+ get destinationType() { return DestinationType.DestinationOldParagraphNumbering; }
11
12
  constructor(importer) {
12
13
  super(importer);
13
14
  this.oldLevelNumber = -1;
@@ -17,7 +18,6 @@ export class DestinationOldParagraphNumbering extends DestinationOldParagraphNum
17
18
  this.multiLevelListIndex = NumberingListIndexConstants.listIndexNotSetted;
18
19
  this.simpleListIndex = NumberingListIndexConstants.listIndexNotSetted;
19
20
  }
20
- get destinationType() { return DestinationType.DestinationOldParagraphNumbering; }
21
21
  static onParagraphLevelKeyword(importer, parameterValue, hasParameter) {
22
22
  if (hasParameter && parameterValue == 10) {
23
23
  DestinationOldParagraphNumbering.onSimpleNumberingKeyword(importer, 0, false);
@@ -2,12 +2,12 @@ import { RtfOldListLevelInfo } from '../../model/numbering-lists/rtf-old-list-le
2
2
  import { DestinationType } from '../utils/destination-type';
3
3
  import { DestinationOldParagraphNumberingBase } from './destination-old-paragraph-numbering-base';
4
4
  export class DestinationOldSectionNumberingLevel extends DestinationOldParagraphNumberingBase {
5
+ get destinationType() { return DestinationType.DestinationOldSectionNumberingLevel; }
5
6
  constructor(importer, levelNumber) {
6
7
  super(importer);
7
8
  importer.importers.numbering.oldListLevelInfo = new RtfOldListLevelInfo();
8
9
  this.levelNumber = levelNumber;
9
10
  }
10
- get destinationType() { return DestinationType.DestinationOldSectionNumberingLevel; }
11
11
  createClone() {
12
12
  const result = new DestinationOldSectionNumberingLevel(this.importer, this.levelNumber);
13
13
  return result;
@@ -12,16 +12,16 @@ import { PictureSourceType } from '../utils/enums';
12
12
  import { RtfHundredthsOfMillimeterConverter, RtfPixelsToTwipsConverter } from './picture-units-converter';
13
13
  import { SkipDestination } from '../base/skip-destination';
14
14
  export class PictureDestination extends HexContentDestination {
15
+ get destinationType() { return DestinationType.PictureDestination; }
16
+ ;
17
+ get controlCharHT() { return null; }
18
+ ;
15
19
  constructor(importer) {
16
20
  super(importer);
17
21
  this.info = new PictureDestinationInfo();
18
22
  this.oldDecoder = this.importer.importers.character.characterFormatting.rtfFormattingInfo.activeDecoder;
19
23
  this.importer.importers.character.characterFormatting.rtfFormattingInfo.activeDecoder = new EmptyCharacterDecoder();
20
24
  }
21
- get destinationType() { return DestinationType.PictureDestination; }
22
- ;
23
- get controlCharHT() { return null; }
24
- ;
25
25
  static getThis(rtfImporter) {
26
26
  return rtfImporter.destination;
27
27
  }
@@ -12,12 +12,12 @@ import { DrawingObjectHorizontalPositionType, DrawingObjectVerticalPositionType
12
12
  import { ShapePropertyDestination } from './shape-property-destination';
13
13
  import { ShapeTextDestination } from './shape-text-destination';
14
14
  export class ShapePropertiesDestinationBase extends DestinationBase {
15
+ get destinationType() { return DestinationType.ShapePropertiesDestinationBase; }
16
+ get controlCharHT() { return null; }
15
17
  constructor(importer, shapeProperties = new RtfShapePropertiesInfo()) {
16
18
  super(importer);
17
19
  this.shapeProperties = shapeProperties;
18
20
  }
19
- get destinationType() { return DestinationType.ShapePropertiesDestinationBase; }
20
- get controlCharHT() { return null; }
21
21
  static getThis(rtfImporter) {
22
22
  return rtfImporter.destination;
23
23
  }
@@ -5,12 +5,12 @@ import { ShapePropertyHsvValueDestination } from './shape-property-hsv-value-des
5
5
  import { ShapePropertyNameDestination } from './shape-property-name-destination';
6
6
  import { ShapePropertyValueDestination } from './shape-property-value-destination';
7
7
  export class ShapePropertyDestination extends DestinationBase {
8
+ get destinationType() { return DestinationType.ShapePropertyDestination; }
9
+ get controlCharHT() { return null; }
8
10
  constructor(rtfImporter, properties) {
9
11
  super(rtfImporter);
10
12
  this.properties = properties;
11
13
  }
12
- get destinationType() { return DestinationType.ShapePropertyDestination; }
13
- get controlCharHT() { return null; }
14
14
  processControlCharCore(_ch) { }
15
15
  processKeywordCore(keyword, parameterValue, hasParameter) {
16
16
  const translator = this.keywordHT[keyword];
@@ -3,12 +3,12 @@ import { HsvInfo } from '../../model/color-collections';
3
3
  import { DestinationBase } from '../base/destination';
4
4
  import { DestinationType } from '../utils/destination-type';
5
5
  export class ShapePropertyHsvValueDestination extends DestinationBase {
6
+ get destinationType() { return DestinationType.ShapePropertyHsvValueDestination; }
7
+ get controlCharHT() { return null; }
6
8
  constructor(importer, hsvInfo = new HsvInfo()) {
7
9
  super(importer);
8
10
  this.hsvInfo = hsvInfo;
9
11
  }
10
- get destinationType() { return DestinationType.ShapePropertyHsvValueDestination; }
11
- get controlCharHT() { return null; }
12
12
  static getThis(importer) {
13
13
  return importer.destination;
14
14
  }
@@ -4,11 +4,6 @@ import { DestinationSubDocument } from '../sub-document/destination-sub-document
4
4
  import { DestinationType } from '../utils/destination-type';
5
5
  import { StyleSheetDestination } from './style-sheet-destination';
6
6
  export class CharacterStyleDestination extends DestinationSubDocument {
7
- constructor(importer, styleIndex) {
8
- super(importer, importer.subDocument);
9
- importer.importers.style.character.rtfStyleIndex = styleIndex;
10
- this.styleName = '';
11
- }
12
7
  get destinationType() { return DestinationType.CharacterStyleDestination; }
13
8
  get controlCharHT() { return null; }
14
9
  static onParentStyleIndex(importer, parameterValue, _hasParameter) {
@@ -21,6 +16,11 @@ export class CharacterStyleDestination extends DestinationSubDocument {
21
16
  importer.destination.qFormat = true;
22
17
  importer.importers.style.character.rtfParentStyleIndex = parameterValue;
23
18
  }
19
+ constructor(importer, styleIndex) {
20
+ super(importer, importer.subDocument);
21
+ importer.importers.style.character.rtfStyleIndex = styleIndex;
22
+ this.styleName = '';
23
+ }
24
24
  get canAppendText() {
25
25
  return false;
26
26
  }
@@ -8,14 +8,14 @@ import { DestinationType } from '../utils/destination-type';
8
8
  import { CharacterStyleDestination } from './character-style-destination';
9
9
  import { TableStyleDestination } from './table-style-destination';
10
10
  export class StyleSheetDestination extends DestinationSubDocument {
11
+ get destinationType() { return DestinationType.StyleSheetDestination; }
12
+ get controlCharHT() { return null; }
13
+ get canAppendText() { return false; }
11
14
  constructor(importer) {
12
15
  super(importer, importer.subDocument);
13
16
  this.styleName = "";
14
17
  importer.rtfDocumentModelType = RtfDocumentModelType.WithStyle;
15
18
  }
16
- get destinationType() { return DestinationType.StyleSheetDestination; }
17
- get controlCharHT() { return null; }
18
- get canAppendText() { return false; }
19
19
  static onStyleQFormatKeyword(importer, _parameterValue, _hasParameter) {
20
20
  importer.destination.qFormat = true;
21
21
  }
@@ -9,13 +9,6 @@ import { RtfTableRowPropertiesMerger } from '../../../utils/mergers/rtf-table-ro
9
9
  import { DestinationSubDocument } from '../sub-document/destination-sub-document';
10
10
  import { DestinationType } from '../utils/destination-type';
11
11
  export class TableStyleDestination extends DestinationSubDocument {
12
- constructor(importer, styleIndex) {
13
- super(importer, importer.subDocument);
14
- this.conditionalTableStyleFormattingType = ConditionalTableStyleFormatting.WholeTable;
15
- this.styleName = '';
16
- this.rtfStyleIndex = styleIndex;
17
- this.importer.importers.character.characterFormatting.coreProperties.setUseValue(CharacterPropertiesMask.UseAll, false);
18
- }
19
12
  get destinationType() { return DestinationType.TableStyleDestination; }
20
13
  get controlCharHT() { return null; }
21
14
  static onStyleQFormatKeyword(importer, _parameterValue, _hasParameter) {
@@ -69,6 +62,13 @@ export class TableStyleDestination extends DestinationSubDocument {
69
62
  get rtfStyleIndex() { return this.importer.importers.style.table.rtfStyleIndex; }
70
63
  set rtfStyleIndex(value) { this.importer.importers.style.table.rtfStyleIndex = value; }
71
64
  get rtfParentStyleIndex() { return this.importer.importers.style.table.rtfParentStyleIndex; }
65
+ constructor(importer, styleIndex) {
66
+ super(importer, importer.subDocument);
67
+ this.conditionalTableStyleFormattingType = ConditionalTableStyleFormatting.WholeTable;
68
+ this.styleName = '';
69
+ this.rtfStyleIndex = styleIndex;
70
+ this.importer.importers.character.characterFormatting.coreProperties.setUseValue(CharacterPropertiesMask.UseAll, false);
71
+ }
72
72
  beforePopRtfState() {
73
73
  const name = this.styleName.trim();
74
74
  let style = null;
@@ -32,12 +32,12 @@ import { DestinationType } from '../utils/destination-type';
32
32
  import { ParagraphFrameHorizontalPositionType, ParagraphFrameTextWrapType, ParagraphFrameVerticalPositionType } from '../utils/enums';
33
33
  import { TableCellPropertyDescriptor } from '../../../../../model/tables/properties/table-cell-properties';
34
34
  export class DestinationSubDocument extends DestinationBase {
35
+ get destinationType() { return DestinationType.DestinationSubDocument; }
36
+ get controlCharHT() { return DestinationSubDocument.controlCharHT; }
35
37
  constructor(importer, targetSubDocument) {
36
38
  super(importer);
37
39
  this.subDocument = targetSubDocument;
38
40
  }
39
- get destinationType() { return DestinationType.DestinationSubDocument; }
40
- get controlCharHT() { return DestinationSubDocument.controlCharHT; }
41
41
  get canAppendText() { return true; }
42
42
  canProcessSpecialHexChar() { return true; }
43
43
  get documentModel() { return this.subDocument.documentModel; }
@@ -1,9 +1,9 @@
1
1
  import { DestinationType } from '../utils/destination-type';
2
2
  import { DestinationSubDocument } from './destination-sub-document';
3
3
  export class SectionHeaderFooterDestinationBase extends DestinationSubDocument {
4
+ get destinationType() { return DestinationType.SectionHeaderFooterDestinationBase; }
4
5
  constructor(importer, section, subDocument) {
5
6
  super(importer, subDocument);
6
7
  this.section = section;
7
8
  }
8
- get destinationType() { return DestinationType.SectionHeaderFooterDestinationBase; }
9
9
  }
@@ -14,6 +14,7 @@ class RtfCharacterImporterState {
14
14
  }
15
15
  }
16
16
  export class RtfCharacterImporter extends RtfBaseImporter {
17
+ get characterFormatting() { return this.states.last.characterFormatting; }
17
18
  constructor(data) {
18
19
  super(data);
19
20
  this.states = new Stack();
@@ -22,7 +23,6 @@ export class RtfCharacterImporter extends RtfBaseImporter {
22
23
  this.states.push(new RtfCharacterImporterState(defaultCharacterProperties));
23
24
  this.logPosition = 0;
24
25
  }
25
- get characterFormatting() { return this.states.last.characterFormatting; }
26
26
  static getOnlyOwnCharacterProperties(source, parentCharacterStyle) {
27
27
  const parentPropertiesMerger = new CharacterPropertiesMerger();
28
28
  parentPropertiesMerger.mergeCharacterStyle(parentCharacterStyle);
@@ -4,12 +4,12 @@ import { FieldCodeEndRun, FieldCodeStartRun, FieldResultEndRun } from '../../../
4
4
  import { RtfFieldInfo } from '../model/fields/rtf-field-info';
5
5
  import { RtfBaseImporter } from './importer-base';
6
6
  export class RtfFieldImporter extends RtfBaseImporter {
7
+ get fields() { return this.data.positionStates.last.fields; }
8
+ get currentField() { return this.fields.last; }
7
9
  constructor(data) {
8
10
  super(data);
9
11
  this.updateFieldsOnPaste = true;
10
12
  }
11
- get fields() { return this.data.positionStates.last.fields; }
12
- get currentField() { return this.fields.last; }
13
13
  startField() {
14
14
  this.fields.push(new RtfFieldInfo());
15
15
  }