devexpress-richedit 24.1.8-build-24316-0102 → 24.2.2-beta

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 (315) 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 +12 -1
  9. package/dist/dx.richedit.js +1174 -907
  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/bars/rich-edit-ribbon/ribbon-items-data.js +2 -1
  16. package/lib/client/client-rich-edit.d.ts +1 -0
  17. package/lib/client/client-rich-edit.js +15 -11
  18. package/lib/client/commands/commands.js +3 -0
  19. package/lib/client/commands/new-document-command.js +2 -1
  20. package/lib/client/commands/open-document-command.d.ts +1 -1
  21. package/lib/client/default-localization.js +2 -0
  22. package/lib/client/dialogs/dialog-base.js +3 -3
  23. package/lib/client/document-processor/public/processor.js +3 -3
  24. package/lib/client/formats/docx/export/data.js +5 -5
  25. package/lib/client/formats/docx/export/exporters/base/sections.js +4 -4
  26. package/lib/client/formats/docx/export/exporters/base.js +1 -1
  27. package/lib/client/formats/docx/export/exporters/content-types.js +4 -4
  28. package/lib/client/formats/docx/export/exporters/relations/relation-collection.js +1 -1
  29. package/lib/client/formats/docx/export/exporters/sub-document/base-sub-document.d.ts +1 -1
  30. package/lib/client/formats/docx/export/exporters/sub-document/base-sub-document.js +3 -3
  31. package/lib/client/formats/docx/export/exporters/sub-document/header-footer-sub-document-exporter.js +1 -1
  32. package/lib/client/formats/docx/import/data.js +2 -2
  33. package/lib/client/formats/docx/import/destination/character-properties/run-properties-base-destination.js +1 -1
  34. package/lib/client/formats/docx/import/destination/destination.d.ts +2 -2
  35. package/lib/client/formats/docx/import/destination/destination.js +7 -7
  36. package/lib/client/formats/docx/import/destination/drawing/drawing-anchor-position-destination.js +9 -9
  37. package/lib/client/formats/docx/import/destination/drawing/drawing-anchor-relative-size-destination.js +6 -6
  38. package/lib/client/formats/docx/import/destination/drawing/drawing-destination.js +38 -38
  39. package/lib/client/formats/docx/import/destination/drawing/non-visual-pucture-properties-destination.js +3 -3
  40. package/lib/client/formats/docx/import/destination/drawing/shape-properties-destination.js +9 -9
  41. package/lib/client/formats/docx/import/destination/notes/note-destination.d.ts +1 -1
  42. package/lib/client/formats/docx/import/destination/notes/note-properties-destination.js +3 -3
  43. package/lib/client/formats/docx/import/destination/numbering/numberings-destination.js +15 -15
  44. package/lib/client/formats/docx/import/destination/paragraph/paragraph-destination.js +3 -3
  45. package/lib/client/formats/docx/import/destination/paragraph-properties/paragraph-numbering-reference-destination.js +5 -5
  46. package/lib/client/formats/docx/import/destination/paragraph-properties/paragraph-properties-base-destination.js +3 -3
  47. package/lib/client/formats/docx/import/destination/paragraph-properties/paragraph-properties-destination.js +7 -7
  48. package/lib/client/formats/docx/import/destination/relationships/relationships-destination.js +3 -3
  49. package/lib/client/formats/docx/import/destination/runs/inline-object-destination.js +3 -3
  50. package/lib/client/formats/docx/import/destination/style/destinations/style-paragraph-properties-destination.js +4 -4
  51. package/lib/client/formats/docx/import/destination/table/cell/properties/table-cell-properties-destination-core.js +3 -3
  52. package/lib/client/formats/docx/import/destination/table/cell/table-cell-destination.js +3 -3
  53. package/lib/client/formats/docx/import/destination/table/row/properties/table-row-properties-destination.js +3 -3
  54. package/lib/client/formats/docx/import/destination/table/row/table-row-destination.js +3 -3
  55. package/lib/client/formats/docx/import/destination/table/table/properties/table-cell-margins-destination.d.ts +1 -1
  56. package/lib/client/formats/docx/import/destination/table/table/properties/table-properties-destination-core.js +3 -3
  57. package/lib/client/formats/docx/import/destination/table/table/properties/table-properties-destination.js +3 -3
  58. package/lib/client/formats/docx/import/destination/table/table/properties/table-properties-leaf-element-destination.js +3 -3
  59. package/lib/client/formats/docx/import/destination/table/table/table-destination.js +3 -3
  60. package/lib/client/formats/docx/import/destination/themes/color/drawing-color-properties-destination-base.js +3 -3
  61. package/lib/client/formats/docx/import/destination/themes/font/office-theme-font-collection-scheme-destination.js +7 -7
  62. package/lib/client/formats/docx/import/destination/vml/v-mlshape-destination.js +7 -7
  63. package/lib/client/formats/docx/import/importers/character-importer.js +6 -6
  64. package/lib/client/formats/docx/import/importers/comments-importer.js +1 -1
  65. package/lib/client/formats/docx/import/importers/field-importer.js +2 -2
  66. package/lib/client/formats/docx/import/importers/table-importer.js +1 -1
  67. package/lib/client/formats/docx/import/list/open-xml-list-level-override.js +3 -3
  68. package/lib/client/formats/docx/import/list/open-xml-numbering-list-info.d.ts +1 -1
  69. package/lib/client/formats/docx/utils/constants.js +6 -6
  70. package/lib/client/formats/docx/zip/xml-reader.js +10 -10
  71. package/lib/client/i-rich-constructor-settings.d.ts +2 -1
  72. package/lib/client/model-api/api-utils/parameter-checker.d.ts +1 -1
  73. package/lib/client/model-api/collections/drawing-object-collection.js +1 -1
  74. package/lib/client/model-api/fonts/control-font.js +4 -4
  75. package/lib/client/model-api/images/image-iterator.js +3 -3
  76. package/lib/client/model-api/interval.js +1 -1
  77. package/lib/client/public/api/authentication-options.js +3 -3
  78. package/lib/client/public/api/range-permission-options.js +3 -3
  79. package/lib/client/public/client-events.d.ts +2 -1
  80. package/lib/client/public/client-events.js +3 -1
  81. package/lib/client/public/commands/enum.d.ts +2 -1
  82. package/lib/client/public/commands/enum.js +1 -0
  83. package/lib/client/public/context-menu/menu.js +5 -5
  84. package/lib/client/public/events.d.ts +6 -0
  85. package/lib/client/public/events.js +8 -0
  86. package/lib/client/public/nusa/external-types.d.ts +2 -2
  87. package/lib/client/public/nusa/settings.js +1 -1
  88. package/lib/client/public/options.d.ts +1 -0
  89. package/lib/client/public/ribbon/item-ids.d.ts +2 -1
  90. package/lib/client/public/ribbon/item-ids.js +1 -0
  91. package/lib/client/public/ribbon/tab.d.ts +4 -4
  92. package/lib/client/public/ribbon/tab.js +2 -2
  93. package/lib/client/public/rich-edit.js +2 -2
  94. package/lib/client/ribbon/i-toolbar-item-options.d.ts +1 -1
  95. package/lib/client/ribbon/ribbon.d.ts +3 -3
  96. package/lib/client/ribbon/ribbon.js +1 -1
  97. package/lib/client/ribbon/toolbar-items/toolbar-interactive-item.d.ts +2 -2
  98. package/lib/client/settings.js +2 -0
  99. package/lib/client/utils/devextreme/devextreme-types.d.ts +17 -17
  100. package/lib/client/utils/devextreme/dxt-utils.d.ts +1 -1
  101. package/lib/common/auto-correct/auto-correct-providers.js +1 -1
  102. package/lib/common/bars/base.js +1 -1
  103. package/lib/common/canvas/canvas-manager.js +3 -3
  104. package/lib/common/canvas/canvas-scroll-manager.js +2 -2
  105. package/lib/common/canvas/listeners/anchor-listener.js +3 -3
  106. package/lib/common/canvas/listeners/resize-box-listener.js +5 -5
  107. package/lib/common/canvas/renderes/canvas-listener/canvas-listener.js +1 -1
  108. package/lib/common/canvas/renderes/change-active-sub-document/renderer.js +10 -10
  109. package/lib/common/canvas/renderes/common/document-renderer.d.ts +1 -1
  110. package/lib/common/canvas/renderes/common/document-renderer.js +1 -1
  111. package/lib/common/canvas/renderes/view-manager.js +3 -3
  112. package/lib/common/client-side-events.d.ts +1 -0
  113. package/lib/common/client-side-events.js +3 -0
  114. package/lib/common/commands/client-command.d.ts +2 -1
  115. package/lib/common/commands/client-command.js +1 -0
  116. package/lib/common/commands/command-base.js +10 -10
  117. package/lib/common/commands/command-manager.js +2 -1
  118. package/lib/common/commands/command-states.js +3 -3
  119. package/lib/common/commands/dialogs/dialog-spell-checker-command.js +3 -3
  120. package/lib/common/commands/document/print-document-on-client-command.js +4 -4
  121. package/lib/common/commands/fields/create-field-command.d.ts +4 -0
  122. package/lib/common/commands/fields/create-field-command.js +8 -0
  123. package/lib/common/commands/fields/open-hyperlink-command.js +3 -2
  124. package/lib/common/commands/floating-objects/floating-object-drag-drop-change-position-command.js +1 -1
  125. package/lib/common/commands/floating-objects/insert-anchored-text-box-command.js +1 -1
  126. package/lib/common/commands/ruler/toggle-show-horizontal-ruler-command.js +3 -1
  127. package/lib/common/commands/text/change-text-case-commands.d.ts +1 -1
  128. package/lib/common/event-manager.js +4 -4
  129. package/lib/common/formats/html/export/html-document-exporter.js +1 -1
  130. package/lib/common/formats/html/export/html-export.d.ts +7 -1
  131. package/lib/common/formats/html/export/html-export.js +38 -38
  132. package/lib/common/formats/html/import/html-importer.d.ts +1 -1
  133. package/lib/common/formats/html/import/html-importer.js +12 -12
  134. package/lib/common/formats/html/import/html-model-inserter.js +4 -4
  135. package/lib/common/formats/html/import/importers/base.js +1 -1
  136. package/lib/common/formats/html/import/importers/list-base.js +4 -4
  137. package/lib/common/formats/html/import/utils/character-properties-utils.js +4 -4
  138. package/lib/common/formats/i-document-importer.d.ts +2 -2
  139. package/lib/common/formats/pdf/exporter.js +3 -3
  140. package/lib/common/formats/pdf/interfaces.d.ts +2 -2
  141. package/lib/common/formats/rtf/export/exporter.js +1 -1
  142. package/lib/common/formats/rtf/export/exporters/rtf-anchored-picture-run-exporter.js +5 -5
  143. package/lib/common/formats/rtf/export/exporters/rtf-content-exporter.d.ts +1 -1
  144. package/lib/common/formats/rtf/export/exporters/rtf-content-exporter.js +2 -2
  145. package/lib/common/formats/rtf/export/rtf-builder.d.ts +2 -2
  146. package/lib/common/formats/rtf/import/destination/base/destination.d.ts +4 -4
  147. package/lib/common/formats/rtf/import/destination/base/destination.js +1 -1
  148. package/lib/common/formats/rtf/import/destination/base/skip-destination.js +3 -3
  149. package/lib/common/formats/rtf/import/destination/base/string-property-base-destination.js +2 -2
  150. package/lib/common/formats/rtf/import/destination/base/string-property-destination.js +2 -2
  151. package/lib/common/formats/rtf/import/destination/base/unicode-destination.js +2 -2
  152. package/lib/common/formats/rtf/import/destination/fields/field-sub-destination.js +1 -1
  153. package/lib/common/formats/rtf/import/destination/fields/table-content-field-destination.js +1 -1
  154. package/lib/common/formats/rtf/import/destination/font-table-destination.js +3 -3
  155. package/lib/common/formats/rtf/import/destination/numbering-list/destination-old-paragraph-numbering.js +1 -1
  156. package/lib/common/formats/rtf/import/destination/numbering-list/destination-old-section-numbering-level.js +1 -1
  157. package/lib/common/formats/rtf/import/destination/picture/picture-destination.js +4 -4
  158. package/lib/common/formats/rtf/import/destination/shape/shape-properties-destination-base.js +2 -2
  159. package/lib/common/formats/rtf/import/destination/shape/shape-property-destination.js +2 -2
  160. package/lib/common/formats/rtf/import/destination/shape/shape-property-hsv-value-destination.js +2 -2
  161. package/lib/common/formats/rtf/import/destination/styles/character-style-destination.js +5 -5
  162. package/lib/common/formats/rtf/import/destination/styles/style-sheet-destination.js +3 -3
  163. package/lib/common/formats/rtf/import/destination/styles/table-style-destination.js +7 -7
  164. package/lib/common/formats/rtf/import/destination/sub-document/destination-sub-document.js +2 -2
  165. package/lib/common/formats/rtf/import/destination/sub-document/section-header-footer-destination-base.js +1 -1
  166. package/lib/common/formats/rtf/import/importers/character-importer.js +1 -1
  167. package/lib/common/formats/rtf/import/importers/field-importer.js +2 -2
  168. package/lib/common/formats/rtf/import/importers/paragraph-importer.js +4 -4
  169. package/lib/common/formats/rtf/import/importers/range-permission-importer.js +1 -1
  170. package/lib/common/formats/rtf/import/importers/section-importer.js +4 -4
  171. package/lib/common/formats/rtf/import/importers/styles/paragraph-style-importer.js +4 -4
  172. package/lib/common/formats/rtf/import/model/numbering-lists/rtf-old-list-level-info.js +10 -10
  173. package/lib/common/formats/rtf/import/rtf-import-data.js +13 -13
  174. package/lib/common/formats/txt/txt-exporter.js +1 -1
  175. package/lib/common/global-event-dispatcher.d.ts +1 -1
  176. package/lib/common/input-controller.d.ts +14 -1
  177. package/lib/common/input-controller.js +58 -20
  178. package/lib/common/interfaces/i-control-owner.d.ts +1 -0
  179. package/lib/common/layout/document-layout.js +1 -1
  180. package/lib/common/layout/main-structures/layout-boxes/layout-anchored-object-box.d.ts +1 -1
  181. package/lib/common/layout/main-structures/layout-boxes/layout-dash-box.js +1 -1
  182. package/lib/common/layout/main-structures/layout-boxes/layout-line-break-box.js +4 -4
  183. package/lib/common/layout/main-structures/layout-boxes/layout-numbering-list-box.js +10 -10
  184. package/lib/common/layout/main-structures/layout-boxes/layout-page-break-box.js +4 -4
  185. package/lib/common/layout/main-structures/layout-boxes/layout-space-box.js +1 -1
  186. package/lib/common/layout/main-structures/layout-row.js +1 -1
  187. package/lib/common/layout/table/table-cell-iterator.js +6 -6
  188. package/lib/common/layout-engine/hit-test-manager/hit-test-result.d.ts +1 -1
  189. package/lib/common/layout-engine/selection/selection-formatter.js +1 -1
  190. package/lib/common/layout-formatter/box/generator/box-infos-generator.js +3 -3
  191. package/lib/common/layout-formatter/changes/changes/layout-change-base.js +12 -12
  192. package/lib/common/layout-formatter/invalidator/layout-invalidator.js +3 -3
  193. package/lib/common/layout-formatter/managers/formatter-manager.d.ts +1 -1
  194. package/lib/common/layout-formatter/managers/formatter-manager.js +2 -2
  195. package/lib/common/layout-formatter/row/result.js +3 -3
  196. package/lib/common/layout-formatter/row/size-engine/row-formatting-info.js +2 -2
  197. package/lib/common/layout-formatter/row/size-engine/row-height-calculator.js +3 -3
  198. package/lib/common/layout-formatter/row/tab-info.js +8 -8
  199. package/lib/common/layout-formatter/table/borders/border-helper.d.ts +1 -1
  200. package/lib/common/layout-formatter/table/borders/border-helper.js +5 -5
  201. package/lib/common/layout-formatter/table/formatter.js +12 -12
  202. package/lib/common/layout-formatter/table/grid-engine/calculators/column-interval.js +3 -3
  203. package/lib/common/layout-formatter/table/grid-engine/calculators/grid-calculator.js +3 -3
  204. package/lib/common/layout-formatter/table/grid-engine/calculators/table-properties-cache.js +7 -7
  205. package/lib/common/layout-formatter/table/info/cell-info.js +8 -8
  206. package/lib/common/layout-formatter/table/info/row-info.js +1 -1
  207. package/lib/common/layout-formatter/table/info/table-info.js +17 -17
  208. package/lib/common/model/bookmarks.js +7 -7
  209. package/lib/common/model/borders/border-base.js +3 -3
  210. package/lib/common/model/caches/hash-based-cache.d.ts +1 -1
  211. package/lib/common/model/caches/hash-based-cache.js +2 -2
  212. package/lib/common/model/caches/images.js +11 -11
  213. package/lib/common/model/changes/change.d.ts +1 -1
  214. package/lib/common/model/changes/sub-document/list/paragraph-numbering-list-changed.js +1 -1
  215. package/lib/common/model/changes/sub-document/table/cell-property-changed.js +1 -1
  216. package/lib/common/model/changes/sub-document/table/property-changed.js +1 -1
  217. package/lib/common/model/changes/sub-document/table/row-property-changed.js +1 -1
  218. package/lib/common/model/character/character-property-descriptor.d.ts +1 -1
  219. package/lib/common/model/color/color-model-info.js +6 -6
  220. package/lib/common/model/creator/font-corrector.js +5 -5
  221. package/lib/common/model/document-model.js +10 -10
  222. package/lib/common/model/fields/field-request-manager.d.ts +1 -1
  223. package/lib/common/model/fields/field-request-manager.js +2 -2
  224. package/lib/common/model/fields/names.d.ts +2 -1
  225. package/lib/common/model/fields/names.js +1 -0
  226. package/lib/common/model/fields/parsers/field-code-parser-client-updating-base.js +1 -1
  227. package/lib/common/model/fields/parsers/field-code-parser-doc-variable.js +1 -1
  228. package/lib/common/model/fields/parsers/field-code-parser-hyperlink.js +1 -1
  229. package/lib/common/model/fields/parsers/field-code-parser-if.d.ts +39 -0
  230. package/lib/common/model/fields/parsers/field-code-parser-if.js +138 -0
  231. package/lib/common/model/fields/parsers/field-code-parser-merge-field.js +1 -1
  232. package/lib/common/model/fields/parsers/field-code-parser.d.ts +5 -4
  233. package/lib/common/model/fields/parsers/field-code-parser.js +6 -12
  234. package/lib/common/model/fields/tree-creator.js +3 -1
  235. package/lib/common/model/floating-objects/sizes.js +2 -2
  236. package/lib/common/model/fonts/control-font.js +9 -9
  237. package/lib/common/model/fonts/loader.js +1 -1
  238. package/lib/common/model/footnotes/footnote.d.ts +1 -1
  239. package/lib/common/model/history/base/history-item.js +6 -6
  240. package/lib/common/model/history/base/interval-based-history-item.js +2 -2
  241. package/lib/common/model/history/base/position-based-history-item.js +2 -2
  242. package/lib/common/model/history/items/floating-objects/insert-anchored-picture-history-item.js +1 -0
  243. package/lib/common/model/history/items/insert-text-history-item.js +3 -3
  244. package/lib/common/model/history/items/switch-text-box-sub-documents-state-history-item.js +0 -1
  245. package/lib/common/model/history/selection/scroll-history-item.js +3 -3
  246. package/lib/common/model/history/selection/selection-history-item.js +3 -3
  247. package/lib/common/model/json/importers/sub-document/run-importers.d.ts +2 -2
  248. package/lib/common/model/manipulators/base-manipulator.js +2 -2
  249. package/lib/common/model/manipulators/document/sub-document-inserter.js +6 -6
  250. package/lib/common/model/manipulators/model-manipulator.js +1 -1
  251. package/lib/common/model/manipulators/picture-manipulator/insert-picture-manipulator-params.js +1 -1
  252. package/lib/common/model/manipulators/picture-manipulator/loader/image-loading-options.d.ts +1 -1
  253. package/lib/common/model/manipulators/picture-manipulator/loader/picture-loader.d.ts +1 -1
  254. package/lib/common/model/manipulators/picture-manipulator/loader/picture-loader.js +1 -1
  255. package/lib/common/model/manipulators/range/create-range-copy-operation.js +3 -3
  256. package/lib/common/model/manipulators/range/remove-interval-operation.js +8 -2
  257. package/lib/common/model/manipulators/tables/insert-table-cell-operation.js +1 -1
  258. package/lib/common/model/manipulators/tables/insert-table-row-operation.js +1 -1
  259. package/lib/common/model/manipulators/tables/merge-table-cells-operation.js +1 -1
  260. package/lib/common/model/manipulators/tables/table-normalizator.d.ts +2 -2
  261. package/lib/common/model/manipulators/text-box-manipulator.d.ts +1 -1
  262. package/lib/common/model/manipulators/text-box-manipulator.js +2 -1
  263. package/lib/common/model/options/fields.d.ts +1 -0
  264. package/lib/common/model/options/fields.js +3 -1
  265. package/lib/common/model/options/pdf.d.ts +2 -2
  266. package/lib/common/model/options/rich-options.js +3 -3
  267. package/lib/common/model/paragraph/paragraph-property-descriptors.d.ts +1 -1
  268. package/lib/common/model/paragraph/paragraph.js +1 -1
  269. package/lib/common/model/position/linked-interval.js +4 -4
  270. package/lib/common/model/range-permissions.js +3 -3
  271. package/lib/common/model/runs/anchored-picture-run.js +4 -4
  272. package/lib/common/model/runs/inline-picture-run.d.ts +1 -1
  273. package/lib/common/model/runs/inline-picture-run.js +1 -1
  274. package/lib/common/model/runs/run-base.js +4 -4
  275. package/lib/common/model/section/section-property-descriptor.d.ts +1 -1
  276. package/lib/common/model/shadings/shading-info.js +3 -3
  277. package/lib/common/model/styles-manager.d.ts +1 -1
  278. package/lib/common/model/tables/main-structures/table-row.js +1 -1
  279. package/lib/common/mouse-handler/base/manipulator-handler-state-base.js +2 -2
  280. package/lib/common/mouse-handler/mouse-handler/mouse-handler-drag-column-or-row-state.d.ts +1 -1
  281. package/lib/common/rich-edit-core.js +11 -11
  282. package/lib/common/rich-utils/debug/runtime-template-model-creator.js +6 -6
  283. package/lib/common/scroll/model-states.d.ts +1 -1
  284. package/lib/common/scroll/model-states.js +4 -4
  285. package/lib/common/selection/selected-cells-engine.js +12 -12
  286. package/lib/common/selection/selection-intervals-info.js +7 -7
  287. package/lib/common/selection/selection-state.js +5 -5
  288. package/lib/common/selection/selection.js +15 -14
  289. package/lib/common/ui/quick-search-panel.js +1 -1
  290. package/lib/common/ui/ruler/controls/base.js +1 -1
  291. package/lib/common/ui/ruler/controls/column.js +1 -1
  292. package/lib/common/ui/ruler/controls/divisions.js +1 -1
  293. package/lib/common/ui/ruler/controls/indent/first-line.js +7 -7
  294. package/lib/common/ui/ruler/controls/indent/left.js +6 -6
  295. package/lib/common/ui/ruler/controls/indent/right.js +7 -7
  296. package/lib/common/ui/ruler/controls/margin/left.js +4 -4
  297. package/lib/common/ui/ruler/controls/margin/right.js +1 -1
  298. package/lib/common/ui/ruler/controls/owner.js +1 -1
  299. package/lib/common/ui/ruler/controls/ruler.js +5 -5
  300. package/lib/common/ui/ruler/controls/tab/tab-type.js +5 -5
  301. package/lib/common/ui/ruler/controls/tab/tab.js +7 -7
  302. package/lib/common/ui/ruler/controls/tab/utils.d.ts +2 -2
  303. package/lib/common/ui/ruler/controls/tab/utils.js +5 -5
  304. package/lib/common/ui/ruler/controls/table.js +1 -1
  305. package/lib/common/ui/ruler/controls/vertical-line.d.ts +1 -2
  306. package/lib/common/ui/ruler/controls/vertical-line.js +2 -2
  307. package/lib/common/ui/ruler/controls/wrapper.js +1 -1
  308. package/lib/common/ui/ruler/manager.js +19 -19
  309. package/lib/common/ui/ruler/model-data.d.ts +8 -2
  310. package/lib/common/ui/ruler/model-data.js +10 -4
  311. package/lib/common/ui/ruler/ruler.js +4 -3
  312. package/lib/common/utils/utils.d.ts +8 -1
  313. package/lib/common/utils/utils.js +39 -8
  314. package/lib/common/view-settings/views-settings.js +6 -6
  315. package/package.json +3 -3
@@ -25,18 +25,6 @@ export var AddRowToTableResult;
25
25
  AddRowToTableResult[AddRowToTableResult["GoToNextColumn"] = 4] = "GoToNextColumn";
26
26
  })(AddRowToTableResult || (AddRowToTableResult = {}));
27
27
  export class Formatter {
28
- constructor(rowFormatter, tablePositions, column, tableMaxWidth, offset, parentCell, index, avaliableHeight, parentFormatter, pageIndexFromWhichTableWasMoved = null) {
29
- this._posToWaitingContinuedFormatterMap = [];
30
- this.isFullyFormatted = false;
31
- this.parentFormatter = parentFormatter;
32
- const tblPos = tablePositions[index];
33
- if (tblPos.rowIndex != 0 || tblPos.cellIndex != 0)
34
- throw new Error(Errors.InternalException);
35
- this.tableInfo = new TableInfo(rowFormatter, tblPos.table, tableMaxWidth, offset.x, offset.y, pageIndexFromWhichTableWasMoved);
36
- this.initColumn(column, parentCell, avaliableHeight);
37
- if (++index < tablePositions.length)
38
- this.createInnerFormatter(tablePositions);
39
- }
40
28
  get posToWaitingContinuedFormatterMap() {
41
29
  return this.nestedLevel == 0 ? this._posToWaitingContinuedFormatterMap : this.parentFormatter.posToWaitingContinuedFormatterMap;
42
30
  }
@@ -69,6 +57,18 @@ export class Formatter {
69
57
  }
70
58
  get position() { return this.tableInfo.position; }
71
59
  get grid() { return this.tableInfo.grid; }
60
+ constructor(rowFormatter, tablePositions, column, tableMaxWidth, offset, parentCell, index, avaliableHeight, parentFormatter, pageIndexFromWhichTableWasMoved = null) {
61
+ this._posToWaitingContinuedFormatterMap = [];
62
+ this.isFullyFormatted = false;
63
+ this.parentFormatter = parentFormatter;
64
+ const tblPos = tablePositions[index];
65
+ if (tblPos.rowIndex != 0 || tblPos.cellIndex != 0)
66
+ throw new Error(Errors.InternalException);
67
+ this.tableInfo = new TableInfo(rowFormatter, tblPos.table, tableMaxWidth, offset.x, offset.y, pageIndexFromWhichTableWasMoved);
68
+ this.initColumn(column, parentCell, avaliableHeight);
69
+ if (++index < tablePositions.length)
70
+ this.createInnerFormatter(tablePositions);
71
+ }
72
72
  getNestedTablePosition(tablePositions) {
73
73
  const index = this.nestedLevel + 1;
74
74
  return tablePositions && tablePositions.length > index ? tablePositions[index] : null;
@@ -2,6 +2,9 @@ import { MinMaxNumber } from '@devexpress/utils/lib/class/min-max';
2
2
  import { UnitConverter } from '@devexpress/utils/lib/class/unit-converter';
3
3
  import { TableWidthUnitType } from '../../../../model/tables/secondary-structures/table-units';
4
4
  export class GridColumnBase {
5
+ get isPercentBased() {
6
+ return this.type == TableWidthUnitType.FiftiethsOfPercent;
7
+ }
5
8
  constructor(interval) {
6
9
  this.width = interval.type == TableWidthUnitType.ModelUnits ? UnitConverter.twipsToPixelsF(interval.width) : interval.width;
7
10
  this.type = interval.type;
@@ -9,9 +12,6 @@ export class GridColumnBase {
9
12
  this.preferredWidth = 0;
10
13
  this.bounds = new MinMaxNumber(0, 0);
11
14
  }
12
- get isPercentBased() {
13
- return this.type == TableWidthUnitType.FiftiethsOfPercent;
14
- }
15
15
  updateMinBound(val) {
16
16
  if (val > this.bounds.minElement)
17
17
  this.bounds.minElement = val;
@@ -6,6 +6,9 @@ import { Columns } from '../columns';
6
6
  import { GridColumnBase } from './column-interval';
7
7
  import { Calculator } from './column-width-engine/calculator';
8
8
  export class GridCalculator {
9
+ get table() { return this.grid.table; }
10
+ get currCache() { return this.cache[this.table.index]; }
11
+ get subDocument() { return this.boxIterator.subDocument; }
9
12
  constructor(grid, cache, boxIterator, avaliableSpacing) {
10
13
  this.accuracy = 8;
11
14
  this.maxPercentWidth = 5000;
@@ -21,9 +24,6 @@ export class GridCalculator {
21
24
  this.applyCellsWidth(intervals);
22
25
  this.autofitTable();
23
26
  }
24
- get table() { return this.grid.table; }
25
- get currCache() { return this.cache[this.table.index]; }
26
- get subDocument() { return this.boxIterator.subDocument; }
27
27
  convertTableWidthUnitToTwips(value) {
28
28
  if (value.type == TableWidthUnitType.ModelUnits)
29
29
  return value.value;
@@ -6,6 +6,13 @@ import { TableWidthUnit, TableWidthUnitType } from '../../../../model/tables/sec
6
6
  import { BorderHelper, TableBorderInfoProvider } from '../../borders/border-helper';
7
7
  import { Formatter } from '../../formatter';
8
8
  export class TablePropertiesCache {
9
+ get isFixedTableWidth() {
10
+ const type = this.preferredWidth.type;
11
+ return type == TableWidthUnitType.FiftiethsOfPercent || type == TableWidthUnitType.ModelUnits;
12
+ }
13
+ get isFixedAlgoritm() {
14
+ return this.layoutType == TableLayoutType.Fixed && this.isFixedTableWidth;
15
+ }
9
16
  constructor(model, table, grid, innerClientProperties) {
10
17
  this.borderProvider = new TableBorderInfoProvider(model, table, UnitConverter.twipsToPixels);
11
18
  this.indent = table.getActualTableIndent(model.defaultTableProperties);
@@ -20,13 +27,6 @@ export class TablePropertiesCache {
20
27
  while (pos.moveToNextRow())
21
28
  this.rows.push(new TableRowPropertiesCache(model, this.borderProvider, pos, this.rows, grid));
22
29
  }
23
- get isFixedTableWidth() {
24
- const type = this.preferredWidth.type;
25
- return type == TableWidthUnitType.FiftiethsOfPercent || type == TableWidthUnitType.ModelUnits;
26
- }
27
- get isFixedAlgoritm() {
28
- return this.layoutType == TableLayoutType.Fixed && this.isFixedTableWidth;
29
- }
30
30
  getActualPreferredWidth(table) {
31
31
  let result = table.preferredWidth;
32
32
  if (result.type == TableWidthUnitType.ModelUnits && result.value == 0)
@@ -7,14 +7,6 @@ import { TablePositionIndexes } from '../../../model/tables/main-structures/tabl
7
7
  import { TableCellMergingState } from '../../../model/tables/secondary-structures/table-base-structures';
8
8
  import { Formatter } from '../formatter';
9
9
  export class CellInfo {
10
- constructor(cellIndex, rowInfo) {
11
- this._isStartOnThisColumn = false;
12
- this._formattingSuspended = false;
13
- this.cellIndex = cellIndex;
14
- this.rowInfo = rowInfo;
15
- this.actualCellInfo = this.getActuallCellInfo();
16
- this.init();
17
- }
18
10
  getContentModelPosition(maxNestedLevel) {
19
11
  const formatter = this.innerFormatter;
20
12
  return formatter && formatter.tableInfo.table.nestedLevel <= maxNestedLevel ?
@@ -58,6 +50,14 @@ export class CellInfo {
58
50
  set minBottomPosition(val) { this.actualCellInfo._minBottomPosition = Math.max(val, this.actualCellInfo._minBottomPosition); }
59
51
  get marginLeft() { return this.actualCellInfo._marginLeft; }
60
52
  get marginRight() { return this.actualCellInfo._marginRight; }
53
+ constructor(cellIndex, rowInfo) {
54
+ this._isStartOnThisColumn = false;
55
+ this._formattingSuspended = false;
56
+ this.cellIndex = cellIndex;
57
+ this.rowInfo = rowInfo;
58
+ this.actualCellInfo = this.getActuallCellInfo();
59
+ this.init();
60
+ }
61
61
  getActuallCellInfo() {
62
62
  if (this.cell.verticalMerging != TableCellMergingState.Continue)
63
63
  return this;
@@ -7,6 +7,7 @@ import { TableCellMergingState } from '../../../model/tables/secondary-structure
7
7
  import { Formatter } from '../formatter';
8
8
  import { TableRowHeightInfo, TopAndBottomMarginsForRow } from '../other';
9
9
  export class RowInfo {
10
+ get row() { return this.tableInfo.table.rows[this.rowIndex]; }
10
11
  constructor(tableInfo, rowIndex) {
11
12
  this.cells = [];
12
13
  this.tableInfo = tableInfo;
@@ -14,7 +15,6 @@ export class RowInfo {
14
15
  this.howManyColumnsConsiderTableRow = 0;
15
16
  this.init();
16
17
  }
17
- get row() { return this.tableInfo.table.rows[this.rowIndex]; }
18
18
  init() {
19
19
  const row = this.row;
20
20
  const cantSplit = new TableRowPropertiesMergerCantSplit().getProperty(row.properties, this.tableInfo.tableStyle, row.conditionalFormatting, this.tableInfo.defaultTblRowProps);
@@ -16,6 +16,23 @@ import { CellInfo } from './cell-info';
16
16
  import { CellOrderHelper } from './cell-order-helper';
17
17
  import { RowInfo } from './row-info';
18
18
  export class TableInfo {
19
+ get table() { return this.position.table; }
20
+ get tableStyle() { return this.table.style; }
21
+ get tblProps() { return this.table.properties; }
22
+ get defaultTblProps() { return this.model.defaultTableProperties; }
23
+ get defaultTblRowProps() { return this.model.defaultTableRowProperties; }
24
+ get defaultTblCellProps() { return this.model.defaultTableCellProperties; }
25
+ get currRowInfo() { return this.rows[this.position.rowIndex]; }
26
+ get currCellInfo() { return this.currRowInfo.cells[this.position.cellIndex]; }
27
+ get isThisTableRowFirstInColumn() { return this.currLayoutTableColumnInfo.tableRows.length == 0; }
28
+ get isCurrRowLastInTable() { return this.position.rowIndex == this.grid.table.rows.length - 1; }
29
+ get currTablePositionIndexes() {
30
+ const actCellInfo = this.currCellInfo;
31
+ return new TablePositionIndexes(actCellInfo.rowInfo.rowIndex, actCellInfo.cellIndex);
32
+ }
33
+ get isSimpleView() {
34
+ return this.rowFormatter.manager.innerClientProperties.viewsSettings.isSimpleView;
35
+ }
19
36
  constructor(rowFormatter, table, tableMaxWidth, xPosition, yOffset, pageIndexFromWhichTableWasMoved) {
20
37
  this.minRowIndex = 0;
21
38
  this.verticalBorders = [];
@@ -37,23 +54,6 @@ export class TableInfo {
37
54
  rowInfo.cells = ListUtils.map(rowInfo.row.cells, (_cell, cellIndex) => new CellInfo(cellIndex, rowInfo));
38
55
  this.cellOrderHelper = new CellOrderHelper(this);
39
56
  }
40
- get table() { return this.position.table; }
41
- get tableStyle() { return this.table.style; }
42
- get tblProps() { return this.table.properties; }
43
- get defaultTblProps() { return this.model.defaultTableProperties; }
44
- get defaultTblRowProps() { return this.model.defaultTableRowProperties; }
45
- get defaultTblCellProps() { return this.model.defaultTableCellProperties; }
46
- get currRowInfo() { return this.rows[this.position.rowIndex]; }
47
- get currCellInfo() { return this.currRowInfo.cells[this.position.cellIndex]; }
48
- get isThisTableRowFirstInColumn() { return this.currLayoutTableColumnInfo.tableRows.length == 0; }
49
- get isCurrRowLastInTable() { return this.position.rowIndex == this.grid.table.rows.length - 1; }
50
- get currTablePositionIndexes() {
51
- const actCellInfo = this.currCellInfo;
52
- return new TablePositionIndexes(actCellInfo.rowInfo.rowIndex, actCellInfo.cellIndex);
53
- }
54
- get isSimpleView() {
55
- return this.rowFormatter.manager.innerClientProperties.viewsSettings.isSimpleView;
56
- }
57
57
  static checkIsTableCannotBePlacedOnCurrentPage(rowFormatter, table, yOffset, maxWidth) {
58
58
  return this.moveRowDownToFitTable(rowFormatter, table, yOffset, TableInfo.getEstimatedTableWidth(table, maxWidth), maxWidth).needNextPage;
59
59
  }
@@ -3,14 +3,14 @@ import { ConstInterval } from '@devexpress/utils/lib/intervals/const';
3
3
  import { Comparers } from '@devexpress/utils/lib/utils/comparers';
4
4
  import { LinkedInterval } from './position/linked-interval';
5
5
  export class BookmarkBase extends ConstInterval {
6
- constructor(positionManager, interval) {
7
- super();
8
- this._interval = new LinkedInterval(positionManager, interval);
9
- }
10
6
  get start() { return this._interval.start; }
11
7
  get length() { return this._interval.length; }
12
8
  get end() { return this._interval.end; }
13
9
  get interval() { return this._interval.getFixedInterval(); }
10
+ constructor(positionManager, interval) {
11
+ super();
12
+ this._interval = new LinkedInterval(positionManager, interval);
13
+ }
14
14
  equals(obj) {
15
15
  return obj && this._interval.equals(obj._interval);
16
16
  }
@@ -51,14 +51,14 @@ export class Bookmark extends BookmarkBase {
51
51
  }
52
52
  }
53
53
  export class ConstBookmark extends ConstInterval {
54
+ get start() { return this.interval.start; }
55
+ get length() { return this.interval.length; }
56
+ get end() { return this.interval.end; }
54
57
  constructor(interval, name) {
55
58
  super();
56
59
  this.interval = new BoundaryInterval(interval.start, interval.end);
57
60
  this.name = name;
58
61
  }
59
- get start() { return this.interval.start; }
60
- get length() { return this.interval.length; }
61
- get end() { return this.interval.end; }
62
62
  equals(obj) {
63
63
  return obj && this.name == obj.name && this.interval.equals(obj.interval);
64
64
  }
@@ -1,14 +1,14 @@
1
1
  import { ColorHelper } from '../color/color';
2
2
  import { BorderLineStyle } from './enums';
3
3
  export class BorderBase {
4
+ static getEmpty() {
5
+ return BorderBase.empty.clone();
6
+ }
4
7
  constructor(style, width, color) {
5
8
  this.style = style;
6
9
  this.width = width;
7
10
  this.color = color;
8
11
  }
9
- static getEmpty() {
10
- return BorderBase.empty.clone();
11
- }
12
12
  clone() {
13
13
  return new BorderBase(this.style, this.width, this.color);
14
14
  }
@@ -4,7 +4,7 @@ export interface IHashBasedCacheTypeCore<T> extends IEquatable<T> {
4
4
  }
5
5
  export interface IHashBasedCacheType<T> extends IHashBasedCacheTypeCore<T>, ICloneable<T> {
6
6
  }
7
- export declare type FromJsonConverterType<T> = (obj: any) => T;
7
+ export type FromJsonConverterType<T> = (obj: any) => T;
8
8
  export declare class HashBasedCacheCore<T extends IHashBasedCacheTypeCore<T>> {
9
9
  protected hashtable: Record<number, T[]>;
10
10
  protected numElements: number;
@@ -2,11 +2,11 @@ import { Errors } from '@devexpress/utils/lib/errors';
2
2
  import { ListUtils } from '@devexpress/utils/lib/utils/list';
3
3
  import { NumberMapUtils } from '@devexpress/utils/lib/utils/map/number';
4
4
  export class HashBasedCacheCore {
5
+ get count() { return this.numElements; }
6
+ ;
5
7
  constructor() {
6
8
  this.clear();
7
9
  }
8
- get count() { return this.numElements; }
9
- ;
10
10
  clear() {
11
11
  this.hashtable = {};
12
12
  this.numElements = 0;
@@ -4,16 +4,6 @@ import { Base64Utils } from '@devexpress/utils/lib/utils/base64';
4
4
  import { NumberMapUtils } from '@devexpress/utils/lib/utils/map/number';
5
5
  import { isDefined } from '@devexpress/utils/lib/utils/common';
6
6
  export class CacheImageInfo {
7
- constructor(base64, actualId, tmpId, imageUrl, file, referenceInfo, size, isLoaded) {
8
- this._base64 = base64 !== undefined ? Base64Utils.normalizeToDataUrl(base64, "image/png") : undefined;
9
- this.actualId = actualId;
10
- this.tmpId = tmpId;
11
- this._referenceInfo = referenceInfo;
12
- this._size = size ? size : CacheImageInfo.emptyPictureSize;
13
- this._isLoaded = isLoaded !== undefined ? isLoaded : false;
14
- this.imageUrl = imageUrl;
15
- this.file = file;
16
- }
17
7
  static get emptyPictureSize() { return new Size(CacheImageInfo.emptyPicDimension, CacheImageInfo.emptyPicDimension); }
18
8
  get isLoaded() { return this._referenceInfo ? this._referenceInfo._isLoaded : this._isLoaded; }
19
9
  set isLoaded(val) { this._isLoaded = val; }
@@ -31,6 +21,16 @@ export class CacheImageInfo {
31
21
  this._isLoaded = undefined;
32
22
  this.file = undefined;
33
23
  }
24
+ constructor(base64, actualId, tmpId, imageUrl, file, referenceInfo, size, isLoaded) {
25
+ this._base64 = base64 !== undefined ? Base64Utils.normalizeToDataUrl(base64, "image/png") : undefined;
26
+ this.actualId = actualId;
27
+ this.tmpId = tmpId;
28
+ this._referenceInfo = referenceInfo;
29
+ this._size = size ? size : CacheImageInfo.emptyPictureSize;
30
+ this._isLoaded = isLoaded !== undefined ? isLoaded : false;
31
+ this.imageUrl = imageUrl;
32
+ this.file = file;
33
+ }
34
34
  equals(obj) {
35
35
  return (isDefined(this._referenceInfo) && this._referenceInfo === obj._referenceInfo) ||
36
36
  this.actualId == obj.actualId &&
@@ -71,6 +71,7 @@ export class CacheImageInfo {
71
71
  }
72
72
  CacheImageInfo.emptyPicDimension = UnitConverter.pixelsToTwips(32);
73
73
  export class ImageCache {
74
+ get emptyImage() { return this.cache[this.emptyImageId]; }
74
75
  constructor() {
75
76
  this.emptyImageId = 0;
76
77
  this.lastTmpId = 0;
@@ -80,7 +81,6 @@ export class ImageCache {
80
81
  const emptyImage = this.createUnloadedInfoByBase64(ImageCache.transparentWhiteImage1_1, new Size(onePixelSize, onePixelSize));
81
82
  emptyImage.isLoaded = false;
82
83
  }
83
- get emptyImage() { return this.cache[this.emptyImageId]; }
84
84
  getPictureData(id) {
85
85
  return this.cache[id];
86
86
  }
@@ -66,4 +66,4 @@ import { ParagraphMergedSubDocumentChange } from './sub-document/text/paragraph-
66
66
  import { SectionInsertedSubDocumentChange } from './sub-document/text/section-inserted';
67
67
  import { SimpleRunInsertedSubDocumentChange } from './sub-document/text/simple-run-inserted';
68
68
  import { TextBufferChangedSubDocumentChange } from './sub-document/text/text-buffer-changed';
69
- export declare type ModelChange = PageColorModelChange | DefaultTabWidthModelChange | DifferentOddAndEvenPagesModelChange | HeaderFooterCreatedModelChange | HeaderFooterIndexChangedModelChange | LoadFontInfoModelChange | SectionsFormattingChangedModelChange | CreateStyleLinkModelChange | DeleteStyleLinkModelChange | DocumentProtectionChangedModelChange | AbstractNumberingListAddedModelChange | AbstractNumberingListDeletedModelChange | NumberingListAddedModelChange | NumberingListDeletedModelChange | ListLevelPropertyChangedModelChange | ListLevelParagraphPropertyChangedModelChange | ListLevelCharacterPropertyChangedModelChange | IOverrideListLevelChangedModelChange | BookmarkCreatedSubDocumentChange | BookmarkDeletedSubDocumentChange | TabInsertedSubDocumentChange | TabDeletedSubDocumentChange | LoadPicturesInfoSubDocumentChange | InlinePictureInsertedSubDocumentChange | InlinePicturesUpdatedSubDocumentChange | AnchoredPictureInsertedSubDocumentChange | AnchoredPictureSizeChangedSubDocumentChange | InlineObjectRunPropertyChangedSubDocumentChange | FieldInsertedSubDocumentChange | FieldDeletedSubDocumentChange | HyperlinkInfoChangedSubDocumentChange | FieldsShowCodeChangedSubDocumentChange | SimpleRunInsertedSubDocumentChange | TextBufferChangedSubDocumentChange | ParagraphInsertedSubDocumentChange | SectionInsertedSubDocumentChange | AnchoredTextBoxInsertedSubDocumentChange | AnchorObjectRemovedSubDocumentChange | IntervalRemovedSubDocumentChange | ParagraphMergedSubDocumentChange | SectionMergedSubDocumentChange | CharacterFormattingChangedSubDocumentChange | CharacterPropertiesChangedSubDocumentChange | ParagraphFormattingChangedSubDocumentChange | ParagraphPropertiesChangedSubDocumentChange | ParagraphAndCharacterMergedPropertiesResetSubDocumentChange | AnchoredTextBoxSizeChangedSubDocumentChange | AnchoredTextBoxPropertiesChangedSubDocumentChange | AnchorInfoPropertyChangedSubDocumentChange | ShapeChangedSubDocumentChange | ShapePropertyChangedSubDocumentChange | CharacterStyleAppliedSubDocumentChange | ParagraphStyleAppliedSubDocumentChange | TableStyleChangedSubDocumentChange | ParagraphNumberingListChangedSubDocumentChange | TableCreatedSubDocumentChange | TableRemovedSubDocumentChange | TableStartPositionShiftedSubDocumentChange | TableCellPropertyChangedSubDocumentChange | TablePropertyChangedSubDocumentChange | TableRowPropertyChangedSubDocumentChange | TableCellSplittedHorizontallySubDocumentChange | TableCellMergedHorizontallySubDocumentChange | TableRowInsertedSubDocumentChange | TableRowRemovedSubDocumentChange | TableCellRemovedSubDocumentChange | TableCellInsertedSubDocumentChange | RangePermissionsChangedSubDocumentChange | RangePermissionsPropertiesChange;
69
+ export type ModelChange = PageColorModelChange | DefaultTabWidthModelChange | DifferentOddAndEvenPagesModelChange | HeaderFooterCreatedModelChange | HeaderFooterIndexChangedModelChange | LoadFontInfoModelChange | SectionsFormattingChangedModelChange | CreateStyleLinkModelChange | DeleteStyleLinkModelChange | DocumentProtectionChangedModelChange | AbstractNumberingListAddedModelChange | AbstractNumberingListDeletedModelChange | NumberingListAddedModelChange | NumberingListDeletedModelChange | ListLevelPropertyChangedModelChange | ListLevelParagraphPropertyChangedModelChange | ListLevelCharacterPropertyChangedModelChange | IOverrideListLevelChangedModelChange | BookmarkCreatedSubDocumentChange | BookmarkDeletedSubDocumentChange | TabInsertedSubDocumentChange | TabDeletedSubDocumentChange | LoadPicturesInfoSubDocumentChange | InlinePictureInsertedSubDocumentChange | InlinePicturesUpdatedSubDocumentChange | AnchoredPictureInsertedSubDocumentChange | AnchoredPictureSizeChangedSubDocumentChange | InlineObjectRunPropertyChangedSubDocumentChange | FieldInsertedSubDocumentChange | FieldDeletedSubDocumentChange | HyperlinkInfoChangedSubDocumentChange | FieldsShowCodeChangedSubDocumentChange | SimpleRunInsertedSubDocumentChange | TextBufferChangedSubDocumentChange | ParagraphInsertedSubDocumentChange | SectionInsertedSubDocumentChange | AnchoredTextBoxInsertedSubDocumentChange | AnchorObjectRemovedSubDocumentChange | IntervalRemovedSubDocumentChange | ParagraphMergedSubDocumentChange | SectionMergedSubDocumentChange | CharacterFormattingChangedSubDocumentChange | CharacterPropertiesChangedSubDocumentChange | ParagraphFormattingChangedSubDocumentChange | ParagraphPropertiesChangedSubDocumentChange | ParagraphAndCharacterMergedPropertiesResetSubDocumentChange | AnchoredTextBoxSizeChangedSubDocumentChange | AnchoredTextBoxPropertiesChangedSubDocumentChange | AnchorInfoPropertyChangedSubDocumentChange | ShapeChangedSubDocumentChange | ShapePropertyChangedSubDocumentChange | CharacterStyleAppliedSubDocumentChange | ParagraphStyleAppliedSubDocumentChange | TableStyleChangedSubDocumentChange | ParagraphNumberingListChangedSubDocumentChange | TableCreatedSubDocumentChange | TableRemovedSubDocumentChange | TableStartPositionShiftedSubDocumentChange | TableCellPropertyChangedSubDocumentChange | TablePropertyChangedSubDocumentChange | TableRowPropertyChangedSubDocumentChange | TableCellSplittedHorizontallySubDocumentChange | TableCellMergedHorizontallySubDocumentChange | TableRowInsertedSubDocumentChange | TableRowRemovedSubDocumentChange | TableCellRemovedSubDocumentChange | TableCellInsertedSubDocumentChange | RangePermissionsChangedSubDocumentChange | RangePermissionsPropertiesChange;
@@ -1,10 +1,10 @@
1
1
  import { ModelChangeType } from '../../enums';
2
2
  export class ParagraphNumberingListChangedSubDocumentChange {
3
+ get subDocumentId() { return this.subDocument.id; }
3
4
  constructor(subDocument, newState, oldAbstractNumberingListIndex) {
4
5
  this.subDocument = subDocument;
5
6
  this.newState = newState;
6
7
  this.oldAbstractNumberingListIndex = oldAbstractNumberingListIndex;
7
8
  this.type = ModelChangeType.ParagraphNumberingListChanged;
8
9
  }
9
- get subDocumentId() { return this.subDocument.id; }
10
10
  }
@@ -1,10 +1,10 @@
1
1
  import { ModelChangeType } from '../../enums';
2
2
  export class TableCellPropertyChangedSubDocumentChange {
3
+ get subDocumentId() { return this.subDocument.id; }
3
4
  constructor(subDocument, property, newState) {
4
5
  this.subDocument = subDocument;
5
6
  this.property = property;
6
7
  this.newState = newState;
7
8
  this.type = ModelChangeType.TableCellPropertyChanged;
8
9
  }
9
- get subDocumentId() { return this.subDocument.id; }
10
10
  }
@@ -1,10 +1,10 @@
1
1
  import { ModelChangeType } from '../../enums';
2
2
  export class TablePropertyChangedSubDocumentChange {
3
+ get subDocumentId() { return this.subDocument.id; }
3
4
  constructor(subDocument, property, newState) {
4
5
  this.subDocument = subDocument;
5
6
  this.property = property;
6
7
  this.newState = newState;
7
8
  this.type = ModelChangeType.TablePropertyChanged;
8
9
  }
9
- get subDocumentId() { return this.subDocument.id; }
10
10
  }
@@ -1,10 +1,10 @@
1
1
  import { ModelChangeType } from '../../enums';
2
2
  export class TableRowPropertyChangedSubDocumentChange {
3
+ get subDocumentId() { return this.subDocument.id; }
3
4
  constructor(subDocument, property, newState) {
4
5
  this.subDocument = subDocument;
5
6
  this.property = property;
6
7
  this.newState = newState;
7
8
  this.type = ModelChangeType.TableRowPropertyChanged;
8
9
  }
9
- get subDocumentId() { return this.subDocument.id; }
10
10
  }
@@ -10,7 +10,7 @@ import { CharacterProperties } from './character-properties';
10
10
  import { CompositeFontInfo } from './composite-font-info';
11
11
  import { CharacterFormattingScript, CharacterPropertiesMask, StrikeoutType, UnderlineType } from './enums';
12
12
  import { LangInfo } from './lang-info';
13
- export declare type CharacterPropertiesHistoryItemType<T> = new (modelManipulator: ModelManipulator, subDocInterval: SubDocumentInterval, newValue: T, newUse: boolean) => CharacterPropertiesHistoryItemBase<T>;
13
+ export type CharacterPropertiesHistoryItemType<T> = new (modelManipulator: ModelManipulator, subDocInterval: SubDocumentInterval, newValue: T, newUse: boolean) => CharacterPropertiesHistoryItemBase<T>;
14
14
  export interface ICharacterPropertyDescriptor<T> {
15
15
  setProp(props: CharacterProperties, newValue: T): any;
16
16
  getProp(props: CharacterProperties): T;
@@ -7,12 +7,6 @@ import { ColorHSL } from './color-hsl';
7
7
  import { DXColor } from './dx-color';
8
8
  import { ColorType, ThemeColorIndexConstants, ThemeColorValues } from './enums';
9
9
  export class ColorModelInfo {
10
- constructor() {
11
- this._themeColorIndex = ThemeColorIndexConstants.None;
12
- this._themeValue = ThemeColorValues.None;
13
- this._colorIndex = ColorModelInfo.defaultColorIndex;
14
- this.restoreDefaultValues();
15
- }
16
10
  static get nullColor() { return ColorModelInfo.makeByColor(ColorHelper.AUTOMATIC_COLOR); }
17
11
  ;
18
12
  static makeByThemeColorIndex(themeColorIndex, tint = 0, themeValue = ThemeColorValues.None) {
@@ -72,6 +66,12 @@ export class ColorModelInfo {
72
66
  this._tint = value;
73
67
  }
74
68
  get isEmpty() { return this.colorType == ColorType.Rgb && DXColor.isTransparentOrEmpty(this.rgb); }
69
+ constructor() {
70
+ this._themeColorIndex = ThemeColorIndexConstants.None;
71
+ this._themeValue = ThemeColorValues.None;
72
+ this._colorIndex = ColorModelInfo.defaultColorIndex;
73
+ this.restoreDefaultValues();
74
+ }
75
75
  restoreDefaultValues() {
76
76
  this._themeColorIndex = ThemeColorIndexConstants.None;
77
77
  this._themeValue = ThemeColorValues.None;
@@ -6,17 +6,17 @@ import { ControlFontType } from '../fonts/font-info';
6
6
  import { GoogleFontsApi } from '../fonts/google-fonts';
7
7
  import { ModelCacheFiller } from './cache';
8
8
  export class FontCorrector {
9
- constructor(modelManipulator, model, fonts) {
10
- this.modelManipulator = modelManipulator;
11
- this.model = model;
12
- this.fonts = fonts;
13
- }
14
9
  get fontInfoCache() {
15
10
  return this.model.cache.fontInfoCache;
16
11
  }
17
12
  get controlFontsCache() {
18
13
  return this.model.cache.controlFontsCache;
19
14
  }
15
+ constructor(modelManipulator, model, fonts) {
16
+ this.modelManipulator = modelManipulator;
17
+ this.model = model;
18
+ this.fonts = fonts;
19
+ }
20
20
  correct() {
21
21
  this.addAndLoad();
22
22
  new ModelCacheFiller(this.model, this.fonts).fillCache();
@@ -36,6 +36,16 @@ import { InlinePictureRun } from './runs/inline-picture-run';
36
36
  import { SubDocumentCollection } from './sub-document-collection';
37
37
  import { NotePosition, NoteSeparators } from './footnotes/footnote';
38
38
  export class DocumentModel {
39
+ get subDocuments() {
40
+ return this.subDocumentsCollection.filteredCollection;
41
+ }
42
+ get options() { return this.modelOptions.control; }
43
+ ;
44
+ get isDocumentProtectionEnabled() {
45
+ const properties = this.documentProtectionProperties;
46
+ return this.aspxIsDocumentProtectionEnabled ||
47
+ (properties.enforceProtection && properties.protectionType != DocumentProtectionType.None);
48
+ }
39
49
  constructor(modelOptions, subDocumentsIdCounter = 1) {
40
50
  this.mirrorMargins = false;
41
51
  this.aspxIsDocumentProtectionEnabled = false;
@@ -73,16 +83,6 @@ export class DocumentModel {
73
83
  this.compatibilitySettings = new CompatibilitySettings();
74
84
  this.docVariables = new DocumentVariables();
75
85
  }
76
- get subDocuments() {
77
- return this.subDocumentsCollection.filteredCollection;
78
- }
79
- get options() { return this.modelOptions.control; }
80
- ;
81
- get isDocumentProtectionEnabled() {
82
- const properties = this.documentProtectionProperties;
83
- return this.aspxIsDocumentProtectionEnabled ||
84
- (properties.enforceProtection && properties.protectionType != DocumentProtectionType.None);
85
- }
86
86
  setPageColor(value) {
87
87
  this.displayBackgroundShape = true;
88
88
  this.pageBackColor = value;
@@ -1,7 +1,7 @@
1
1
  import { FixedInterval } from '@devexpress/utils/lib/intervals/fixed';
2
2
  import { SubDocument } from '../sub-document';
3
3
  import { FieldParameter } from './parsers/field-code-parser';
4
- export declare type FieldRequestHandler = (fieldRequestManager: FieldRequestManager) => void;
4
+ export type FieldRequestHandler = (fieldRequestManager: FieldRequestManager) => void;
5
5
  export declare abstract class FieldRequestManager {
6
6
  private static fieldId;
7
7
  protected activeRecord: number;
@@ -45,13 +45,13 @@ export class TocFieldRequestManager extends FieldRequestManager {
45
45
  export class FieldRequestData {
46
46
  }
47
47
  export class FieldDocVariableRequestData extends FieldRequestData {
48
+ get serverUpdateFieldType() { return ServerUpdateFieldType.DocVariable; }
48
49
  constructor(fieldInterval, fieldName, parameters) {
49
50
  super();
50
51
  this.fieldInterval = fieldInterval;
51
52
  this.fieldName = fieldName;
52
53
  this.parameters = parameters;
53
54
  }
54
- get serverUpdateFieldType() { return ServerUpdateFieldType.DocVariable; }
55
55
  asJson() {
56
56
  return {
57
57
  [JSONUpdateFieldCommandInfo.ServerUpdateFieldType]: this.serverUpdateFieldType,
@@ -69,11 +69,11 @@ export class FieldDocVariableRequestData extends FieldRequestData {
69
69
  }
70
70
  }
71
71
  export class FieldMailMergeRequestData extends FieldRequestData {
72
+ get serverUpdateFieldType() { return ServerUpdateFieldType.MergeField; }
72
73
  constructor(fieldName) {
73
74
  super();
74
75
  this.fieldName = fieldName;
75
76
  }
76
- get serverUpdateFieldType() { return ServerUpdateFieldType.MergeField; }
77
77
  asJson() {
78
78
  return {
79
79
  [JSONUpdateFieldCommandInfo.ServerUpdateFieldType]: this.serverUpdateFieldType,
@@ -11,5 +11,6 @@ export declare enum FieldName {
11
11
  Tc = 9,
12
12
  PageRef = 10,
13
13
  Toc = 11,
14
- FillIn = 12
14
+ FillIn = 12,
15
+ If = 13
15
16
  }
@@ -13,4 +13,5 @@ export var FieldName;
13
13
  FieldName[FieldName["PageRef"] = 10] = "PageRef";
14
14
  FieldName[FieldName["Toc"] = 11] = "Toc";
15
15
  FieldName[FieldName["FillIn"] = 12] = "FillIn";
16
+ FieldName[FieldName["If"] = 13] = "If";
16
17
  })(FieldName || (FieldName = {}));
@@ -10,7 +10,7 @@ export class FieldCodeParserClientUpdatingBase extends FieldCodeParser {
10
10
  }
11
11
  parseCodeCurrentFieldInternal(_responce) {
12
12
  this.removeInterval(this.getTopField().getResultInterval());
13
- if (this.parseSwitchesAndArgs(true))
13
+ if (this.parseSwitchesAndArgs())
14
14
  this.fillResult();
15
15
  this.parserState = FieldCodeParserState.end;
16
16
  return true;
@@ -19,7 +19,7 @@ export class FieldCodeParserDocVariable extends FieldCodeParser {
19
19
  this.parserState = FieldCodeParserState.end;
20
20
  return true;
21
21
  }
22
- if (!this.parseSwitchesAndArgs(true)) {
22
+ if (!this.parseSwitchesAndArgs()) {
23
23
  this.parserState = FieldCodeParserState.end;
24
24
  return true;
25
25
  }
@@ -10,7 +10,7 @@ import { UrlUtils } from '../../../utils/utils';
10
10
  export class FieldCodeParserHyperlink extends FieldCodeParserClientUpdatingBase {
11
11
  get name() { return FieldName.Hyperlink; }
12
12
  parseCodeCurrentFieldInternal(_responce) {
13
- if (this.parseSwitchesAndArgs(true))
13
+ if (this.parseSwitchesAndArgs())
14
14
  this.fillResult();
15
15
  else
16
16
  this.removeInterval(this.getTopField().getResultInterval());
@@ -0,0 +1,39 @@
1
+ import { FieldName } from '../names';
2
+ import { FieldCodeParserClientUpdatingBase } from './field-code-parser-client-updating-base';
3
+ export declare class FieldCodeParserIf extends FieldCodeParserClientUpdatingBase {
4
+ get name(): FieldName;
5
+ protected fillResult(): boolean;
6
+ private parseParameters;
7
+ }
8
+ export declare class IfExpression {
9
+ operator: string;
10
+ leftExpression: IfExpressionParameter;
11
+ rightExpression: IfExpressionParameter;
12
+ trueText: string;
13
+ falseText: string;
14
+ static operators: string[];
15
+ constructor(operator: string, leftExpression: IfExpressionParameter, rightExpression: IfExpressionParameter, trueText?: string, falseText?: string);
16
+ static isOperator(operator: string): boolean;
17
+ evaluate(): string;
18
+ private evaluateComparison;
19
+ static compareStrings(leftValue: string, rightValue: string): number;
20
+ static compareStringsWithWildcards(leftValue: string, rightValue: string): 0 | 1;
21
+ }
22
+ export declare class IfExpressionParameter {
23
+ text: string;
24
+ number: number;
25
+ isNumber: boolean;
26
+ constructor(text: string, isQuoted?: boolean);
27
+ }
28
+ export declare class IfExpressionError extends Error {
29
+ constructor(message: string);
30
+ }
31
+ export declare class IfExpressionInvalidOperatorError extends IfExpressionError {
32
+ constructor(message?: string);
33
+ }
34
+ export declare class IfExpressionTooManyParametersError extends IfExpressionError {
35
+ constructor(message?: string);
36
+ }
37
+ export declare class IfExpressionMissingParametersError extends IfExpressionError {
38
+ constructor(message?: string);
39
+ }