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
@@ -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) {
@@ -71,6 +65,12 @@ export class ColorModelInfo {
71
65
  this._tint = value;
72
66
  }
73
67
  get isEmpty() { return this.colorType == ColorType.Rgb && DXColor.isTransparentOrEmpty(this.rgb); }
68
+ constructor() {
69
+ this._themeColorIndex = ThemeColorIndexConstants.None;
70
+ this._themeValue = ThemeColorValues.None;
71
+ this._colorIndex = ColorModelInfo.defaultColorIndex;
72
+ this.restoreDefaultValues();
73
+ }
74
74
  restoreDefaultValues() {
75
75
  this._themeColorIndex = ThemeColorIndexConstants.None;
76
76
  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,
@@ -46,7 +46,7 @@ export declare class FieldCodeParserHelper {
46
46
  static isBackslesh(char: string): boolean;
47
47
  static isQuote(char: string): boolean;
48
48
  }
49
- export declare type FieldParserConstructorArguments = {
49
+ export type FieldParserConstructorArguments = {
50
50
  modelManager: IModelManager;
51
51
  layoutFormatterManager: FormatterManager;
52
52
  requestManager: FieldRequestManager;
@@ -55,7 +55,7 @@ export declare type FieldParserConstructorArguments = {
55
55
  modelIterator: ModelIterator;
56
56
  fieldNameFirstLetterPosition: number;
57
57
  };
58
- export declare type FieldParserConstructor = (args: FieldParserConstructorArguments) => FieldCodeParser;
58
+ export type FieldParserConstructor = (args: FieldParserConstructorArguments) => FieldCodeParser;
59
59
  export declare abstract class FieldCodeParser {
60
60
  protected readonly switchInfoList: FieldSwitch[];
61
61
  protected readonly parameterInfoList: FieldParameter[];
@@ -40,6 +40,7 @@ export class UpdateFieldsOptions {
40
40
  }
41
41
  }
42
42
  export class FieldsWaitingForUpdate {
43
+ get fields() { return this.subDocument.fields; }
43
44
  constructor(modelManager, layoutFormatterManager, requestManager, subDocumentIntervals, options, callback) {
44
45
  this.infoForFutureUpdate = [];
45
46
  this.savedSelectionIntervals = [];
@@ -52,7 +53,6 @@ export class FieldsWaitingForUpdate {
52
53
  this.infoForFutureUpdate = ListUtils.map(subDocumentIntervals.intervals, (interval) => new FieldParsersAndIntervals(new LinkedInterval(this.subDocument.positionManager, interval)));
53
54
  this.savedSelectionIntervals = ListUtils.map(subDocumentIntervals.intervals, (interval) => new LinkedInterval(this.subDocument.positionManager, interval));
54
55
  }
55
- get fields() { return this.subDocument.fields; }
56
56
  update(response, immediateSendRequest = true) {
57
57
  if (this.fields.length == 0) {
58
58
  this.endAction();
@@ -16,13 +16,13 @@ export class AnchorInlineBaseSize {
16
16
  }
17
17
  }
18
18
  export class PictureSize extends AnchorInlineBaseSize {
19
+ get originalSize() { return this.cacheInfo.size; }
20
+ ;
19
21
  constructor(lockAspectRatio, rotation, cacheInfo, scale) {
20
22
  super(lockAspectRatio, rotation);
21
23
  this.cacheInfo = cacheInfo;
22
24
  this.scale = scale;
23
25
  }
24
- get originalSize() { return this.cacheInfo.size; }
25
- ;
26
26
  get actualSize() {
27
27
  return Size.initByCommonAction(adp => adp(this.cacheInfo.size) * adp(this.scale) / 100);
28
28
  }
@@ -12,15 +12,6 @@ export var FontLoadStatus;
12
12
  FontLoadStatus[FontLoadStatus["Error"] = 3] = "Error";
13
13
  })(FontLoadStatus || (FontLoadStatus = {}));
14
14
  export class ControlFont {
15
- constructor(fontFamily, descriptors, key) {
16
- this.isFontCollection = false;
17
- this.status = FontLoadStatus.Unloaded;
18
- this.sourceUrls = [];
19
- this._unicodeRanges = null;
20
- this.fontFamily = fontFamily;
21
- this.descriptors = descriptors;
22
- this.cacheKey = key ? key : [this.fontFamily, this.descriptors.cacheKey].join('/');
23
- }
24
15
  get loaded() { return this.status == FontLoadStatus.Loaded; }
25
16
  get unicodeRanges() {
26
17
  if (!this._unicodeRanges)
@@ -33,6 +24,15 @@ export class ControlFont {
33
24
  controlFontType.set(ControlFontType.Italic, this.descriptors.msWordItalic());
34
25
  return controlFontType.getValue();
35
26
  }
27
+ constructor(fontFamily, descriptors, key) {
28
+ this.isFontCollection = false;
29
+ this.status = FontLoadStatus.Unloaded;
30
+ this.sourceUrls = [];
31
+ this._unicodeRanges = null;
32
+ this.fontFamily = fontFamily;
33
+ this.descriptors = descriptors;
34
+ this.cacheKey = key ? key : [this.fontFamily, this.descriptors.cacheKey].join('/');
35
+ }
36
36
  applySource(data, callback) {
37
37
  if (!this.data)
38
38
  this.data = data;
@@ -67,13 +67,13 @@ export class ControlFontsLoader {
67
67
  }
68
68
  }
69
69
  class FontToLoad {
70
+ get currentPath() { return this.sourceUrls[this.ind]; }
70
71
  constructor(font, fontsSettings) {
71
72
  this.sourceUrls = [];
72
73
  this.ind = 0;
73
74
  this.font = font;
74
75
  this.sourceUrls = font.allSourceUrls(fontsSettings.defaultFolder);
75
76
  }
76
- get currentPath() { return this.sourceUrls[this.ind]; }
77
77
  next() {
78
78
  return ++this.ind < this.sourceUrls.length;
79
79
  }
@@ -14,7 +14,7 @@ export declare enum NoteType {
14
14
  ContinuationNotice = 2,
15
15
  Normal = 3
16
16
  }
17
- export declare type NoteSeparatorTypes = NoteType.Separator | NoteType.ContinuationSeparator | NoteType.ContinuationNotice;
17
+ export type NoteSeparatorTypes = NoteType.Separator | NoteType.ContinuationSeparator | NoteType.ContinuationNotice;
18
18
  export declare enum NoteNumberingRestartType {
19
19
  Continuous = 0,
20
20
  NewPage = 1,
@@ -1,24 +1,24 @@
1
1
  import { Errors } from '@devexpress/utils/lib/errors';
2
2
  export class HistoryItem {
3
+ canBeMerged() {
4
+ return false;
5
+ }
3
6
  constructor(modelManipulator) {
4
7
  this.uniqueId = -1;
5
8
  this.modelManipulator = modelManipulator;
6
9
  }
7
- canBeMerged() {
8
- return false;
9
- }
10
10
  changeModified() {
11
11
  return true;
12
12
  }
13
13
  }
14
14
  export class CompositionHistoryItem extends HistoryItem {
15
+ canBeMerged() {
16
+ return true;
17
+ }
15
18
  constructor() {
16
19
  super(null);
17
20
  this.historyItems = [];
18
21
  }
19
- canBeMerged() {
20
- return true;
21
- }
22
22
  changeModified() {
23
23
  var item;
24
24
  for (var i = 0; item = this.historyItems[i]; i++) {