@heartlandone/vega 2.75.0-RTE-table-preview → 2.75.1

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 (639) hide show
  1. package/dist/cjs/{app-globals-6c9a0e62.js → app-globals-35614ce8.js} +17 -19
  2. package/dist/cjs/{code-block-d9001f03.js → code-block-c1d2e6a8.js} +3 -34
  3. package/dist/cjs/{component-value-history-controller-slimmer.abstract-b00e9f58.js → component-value-history-controller-slimmer.abstract-787c67dc.js} +5 -26
  4. package/dist/cjs/{design-token-a569577e.js → design-token-bb39e07e.js} +1 -1
  5. package/dist/cjs/{content-state-466f277f.js → dto-renderer-manager-03e1a038.js} +255 -37
  6. package/dist/cjs/{element-appender-slimmer-b7fdd82e.js → element-appender-slimmer-daa8b9f5.js} +6 -6
  7. package/dist/cjs/{form-field-controller-slimmer-3ea2464a.js → form-field-controller-slimmer-aef2fb1e.js} +2 -2
  8. package/dist/cjs/function-extension-cfbbc57e.js +2927 -0
  9. package/dist/cjs/{image-annotation-action-4435d531.js → image-annotation-action-3fa501b7.js} +31 -3
  10. package/dist/cjs/index-58ea899e.js +0 -4
  11. package/dist/cjs/{index-19e5b936.js → index-95fca64f.js} +1 -1
  12. package/dist/cjs/index.cjs.js +43 -48
  13. package/dist/cjs/{language-extension-26331915.js → language-extension-8c4a56ff.js} +8 -8
  14. package/dist/cjs/loader.cjs.js +13 -18
  15. package/dist/cjs/{public-rules-942bd931.js → public-rules-dc2a8d62.js} +4 -4
  16. package/dist/cjs/{range-cafe69a9.js → range-79b668e7.js} +1 -1
  17. package/dist/cjs/{responsive-format-facade-6c22bbbd.js → responsive-format-facade-d5dba942.js} +3 -4
  18. package/dist/cjs/{rich-text-editor-required-rule-0dcb08c8.js → rich-text-editor-required-rule-ba312af9.js} +2 -2
  19. package/dist/cjs/{string-input-formatter-slimmer-655d0322.js → string-input-formatter-slimmer-f3e0bbc7.js} +2 -2
  20. package/dist/cjs/{style-formatter-0e0ae896.js → style-formatter-49693da7.js} +1 -1
  21. package/dist/cjs/{sub-state-notify-slimmer-3fa87162.js → sub-state-notify-slimmer-468e19aa.js} +1 -1
  22. package/dist/cjs/{sub-state-observer-slimmer-77deba40.js → sub-state-observer-slimmer-5d0b8ac3.js} +1 -1
  23. package/dist/cjs/vega-accordion.cjs.entry.js +8 -12
  24. package/dist/cjs/vega-app-header-button.cjs.entry.js +8 -12
  25. package/dist/cjs/vega-box.cjs.entry.js +10 -14
  26. package/dist/cjs/vega-button-circle.cjs.entry.js +8 -12
  27. package/dist/cjs/vega-button-group_2.cjs.entry.js +3 -3
  28. package/dist/cjs/vega-button.cjs.entry.js +7 -11
  29. package/dist/cjs/vega-calendar_4.cjs.entry.js +3 -3
  30. package/dist/cjs/vega-card.cjs.entry.js +10 -14
  31. package/dist/cjs/vega-carousel.cjs.entry.js +7 -11
  32. package/dist/cjs/vega-checkbox_2.cjs.entry.js +3 -3
  33. package/dist/cjs/vega-chip.cjs.entry.js +8 -12
  34. package/dist/cjs/vega-code-block.cjs.entry.js +4 -4
  35. package/dist/cjs/vega-color-picker.cjs.entry.js +3 -3
  36. package/dist/cjs/vega-combo-box.cjs.entry.js +3 -3
  37. package/dist/cjs/vega-date-picker_2.cjs.entry.js +13 -17
  38. package/dist/cjs/vega-dialog_2.cjs.entry.js +16 -20
  39. package/dist/cjs/vega-divider.cjs.entry.js +11 -15
  40. package/dist/cjs/vega-dropdown_5.cjs.entry.js +11 -14
  41. package/dist/cjs/vega-env-manager-23b8b23c.js +2 -2
  42. package/dist/cjs/vega-file-uploader.cjs.entry.js +3 -3
  43. package/dist/cjs/vega-flag-icon.cjs.entry.js +9 -13
  44. package/dist/cjs/vega-flex.cjs.entry.js +11 -15
  45. package/dist/cjs/vega-font.cjs.entry.js +10 -14
  46. package/dist/cjs/vega-form.cjs.entry.js +4 -4
  47. package/dist/cjs/vega-grid.cjs.entry.js +10 -14
  48. package/dist/cjs/vega-icon.cjs.entry.js +10 -14
  49. package/dist/cjs/vega-image-uploader.cjs.entry.js +10 -14
  50. package/dist/cjs/vega-input-credit-card.cjs.entry.js +3 -3
  51. package/dist/cjs/vega-input-numeric.cjs.entry.js +4 -4
  52. package/dist/cjs/vega-input-passcode.cjs.entry.js +3 -3
  53. package/dist/cjs/vega-input-phone-number.cjs.entry.js +8 -12
  54. package/dist/cjs/vega-input-range.cjs.entry.js +3 -3
  55. package/dist/cjs/vega-input-select.cjs.entry.js +9 -12
  56. package/dist/cjs/vega-input.cjs.entry.js +5 -5
  57. package/dist/cjs/{vega-internal-event-id-73334b4b.js → vega-internal-event-id-f2465f1b.js} +0 -4
  58. package/dist/cjs/vega-left-nav_5.cjs.entry.js +13 -17
  59. package/dist/cjs/vega-loader-wrapper_2.cjs.entry.js +14 -18
  60. package/dist/cjs/vega-pagination-page-selector-mobile.cjs.entry.js +1 -1
  61. package/dist/cjs/vega-pagination-page-size-selector-mobile.cjs.entry.js +1 -1
  62. package/dist/cjs/vega-pagination.cjs.entry.js +8 -12
  63. package/dist/cjs/vega-popover_2.cjs.entry.js +9 -13
  64. package/dist/cjs/vega-progress-tracker_2.cjs.entry.js +8 -12
  65. package/dist/cjs/vega-radio_2.cjs.entry.js +3 -3
  66. package/dist/cjs/vega-rich-text-content.cjs.entry.js +18 -16
  67. package/dist/cjs/vega-rich-text-editor_4.cjs.entry.js +287 -192
  68. package/dist/cjs/vega-selection-chip_2.cjs.entry.js +10 -14
  69. package/dist/cjs/vega-selection-tile_2.cjs.entry.js +4 -4
  70. package/dist/cjs/vega-sidenav_3.cjs.entry.js +15 -19
  71. package/dist/cjs/vega-signature-capture.cjs.entry.js +10 -14
  72. package/dist/cjs/vega-stepper.cjs.entry.js +3 -3
  73. package/dist/cjs/vega-table_11.cjs.entry.js +14 -17
  74. package/dist/cjs/vega-textarea.cjs.entry.js +3 -3
  75. package/dist/cjs/vega-time-picker_2.cjs.entry.js +9 -13
  76. package/dist/cjs/vega-toggle-switch.cjs.entry.js +3 -3
  77. package/dist/cjs/vega-tooltip_2.cjs.entry.js +10 -14
  78. package/dist/cjs/vega.cjs.js +13 -18
  79. package/dist/collection/collection-manifest.json +0 -10
  80. package/dist/collection/components/vega-popover/slimmers/controllers/vega-popover-appender-controller.js +0 -1
  81. package/dist/collection/components/vega-rich-text-content/vega-rich-text-content.js +1 -9
  82. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/action-handle-strategy.abstract.js +0 -10
  83. package/dist/collection/components/vega-rich-text-editor/dto/blocks/block.abstract.js +2 -24
  84. package/dist/collection/components/vega-rich-text-editor/dto/blocks/html-block.js +16 -0
  85. package/dist/collection/components/vega-rich-text-editor/dto/content-state.js +3 -22
  86. package/dist/collection/components/vega-rich-text-editor/dto/renderers/nodes/text-node-renderer.js +10 -0
  87. package/dist/collection/components/vega-rich-text-editor/extensions/base-extension-renderer.js +1 -2
  88. package/dist/collection/components/vega-rich-text-editor/extensions/extension.abstract.js +1 -18
  89. package/dist/collection/components/vega-rich-text-editor/public-api.js +0 -1
  90. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/extension-controller.js +0 -20
  91. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/annotation-handler/html-element-to-annotation-generator.js +0 -10
  92. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/html-cleaner/html-content-cleaner.js +59 -0
  93. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/html-cleaner/index.js +4 -0
  94. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/html-cleaner/processors/remove-whitespace-after-opening-tag-processor.js +21 -0
  95. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/html-cleaner/processors/remove-whitespace-before-closing-tag-processor.js +21 -0
  96. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/html-cleaner/processors/remove-whitespace-between-tags-processor.js +77 -0
  97. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/selection-controller.js +2 -23
  98. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/text-node-color-controller.js +51 -0
  99. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/text-node-rendering-registry.js +26 -0
  100. package/dist/collection/components/vega-rich-text-editor/test/dto/blocks/html-block.test.js +39 -0
  101. package/dist/collection/components/vega-rich-text-editor/test/dto/content-state.test.js +166 -253
  102. package/dist/collection/components/vega-rich-text-editor/test/html-cleaner/html-content-cleaner.test.js +186 -0
  103. package/dist/collection/components/vega-rich-text-editor/test/html-cleaner/remove-whitespace-after-opening-tag-processor.test.js +22 -0
  104. package/dist/collection/components/vega-rich-text-editor/test/html-cleaner/remove-whitespace-before-closing-tag-processor.test.js +22 -0
  105. package/dist/collection/components/vega-rich-text-editor/test/html-cleaner/remove-whitespace-between-tags-processor.test.js +26 -0
  106. package/dist/collection/components/vega-rich-text-editor/test/spec-utils.js +2 -5
  107. package/dist/collection/components/vega-rich-text-editor/vega-rich-text-editor.css +0 -4
  108. package/dist/collection/components/vega-rich-text-editor/vega-rich-text-editor.js +5 -0
  109. package/dist/collection/global/scripts/before-vega-load.js +0 -2
  110. package/dist/collection/helpers/code-format/code-formatter.js +57 -7
  111. package/dist/collection/helpers/code-format/test/code-formatter.test.js +48 -0
  112. package/dist/collection/helpers/event-manager/event-id/vega-internal-event-id.js +0 -2
  113. package/dist/collection/utils/spec-utils.js +3 -4
  114. package/dist/esm/{app-globals-4146c01c.js → app-globals-2ac60ff5.js} +6 -8
  115. package/dist/esm/{child-nodes-event-prevent-slimmer-225e7b58.js → child-nodes-event-prevent-slimmer-e662bee2.js} +1 -1
  116. package/dist/esm/{code-block-36393b45.js → code-block-8ee34ab6.js} +5 -36
  117. package/dist/esm/{component-value-history-controller-slimmer.abstract-82339b2b.js → component-value-history-controller-slimmer.abstract-a61bf821.js} +6 -27
  118. package/dist/esm/{design-token-c57a58b4.js → design-token-007efbaa.js} +1 -1
  119. package/dist/esm/{dom-node-subject-observer-factory-d4e16f66.js → dom-node-subject-observer-factory-064ee2b2.js} +1 -1
  120. package/dist/esm/{content-state-e8ef033a.js → dto-renderer-manager-ee1a5864.js} +256 -36
  121. package/dist/esm/{element-appender-slimmer-a7341fc1.js → element-appender-slimmer-35e26b5a.js} +4 -4
  122. package/dist/esm/{event-emit-slimmer-1bb4b533.js → event-emit-slimmer-09827cec.js} +2 -2
  123. package/dist/esm/{form-field-controller-slimmer-907bf7c2.js → form-field-controller-slimmer-5d9dc384.js} +3 -3
  124. package/dist/esm/function-extension-e8c0e43e.js +2908 -0
  125. package/dist/esm/{image-annotation-action-82cef6e4.js → image-annotation-action-285d432e.js} +31 -4
  126. package/dist/esm/index-090d31ca.js +0 -4
  127. package/dist/esm/{index-2466b0c0.js → index-51a7da7f.js} +2 -2
  128. package/dist/esm/index.js +18 -22
  129. package/dist/esm/{internal-vega-event-manager-2cbb828a.js → internal-vega-event-manager-efb6786e.js} +1 -1
  130. package/dist/esm/{language-extension-dcc43702.js → language-extension-29bf8acd.js} +2 -2
  131. package/dist/esm/loader.js +13 -18
  132. package/dist/esm/polyfills/core-js.js +0 -0
  133. package/dist/esm/polyfills/dom.js +0 -0
  134. package/dist/esm/polyfills/es5-html-element.js +0 -0
  135. package/dist/esm/polyfills/index.js +0 -0
  136. package/dist/esm/polyfills/system.js +0 -0
  137. package/dist/esm/{public-rules-b8ea651f.js → public-rules-724873f5.js} +5 -5
  138. package/dist/esm/{range-872aad9f.js → range-5257c062.js} +1 -1
  139. package/dist/esm/{responsive-format-facade-9278eae4.js → responsive-format-facade-28ee2dbd.js} +3 -4
  140. package/dist/esm/{rich-text-editor-required-rule-36dd4242.js → rich-text-editor-required-rule-873e2e67.js} +1 -1
  141. package/dist/esm/{string-input-formatter-slimmer-7a1e8754.js → string-input-formatter-slimmer-ee32b1fd.js} +3 -3
  142. package/dist/esm/{style-formatter-e937952a.js → style-formatter-314b37f3.js} +1 -1
  143. package/dist/esm/{sub-state-notify-slimmer-2ecdba12.js → sub-state-notify-slimmer-4453047a.js} +2 -2
  144. package/dist/esm/{sub-state-observer-slimmer-2d5dba8d.js → sub-state-observer-slimmer-202ec7dc.js} +2 -2
  145. package/dist/esm/vega-accordion.entry.js +10 -14
  146. package/dist/esm/vega-app-header-button.entry.js +11 -15
  147. package/dist/esm/vega-banner.entry.js +3 -3
  148. package/dist/esm/vega-box.entry.js +11 -15
  149. package/dist/esm/vega-breadcrumb.entry.js +4 -4
  150. package/dist/esm/vega-button-circle.entry.js +11 -15
  151. package/dist/esm/vega-button-group_2.entry.js +7 -7
  152. package/dist/esm/vega-button-link.entry.js +4 -4
  153. package/dist/esm/vega-button.entry.js +10 -14
  154. package/dist/esm/vega-calendar_4.entry.js +7 -7
  155. package/dist/esm/vega-card.entry.js +10 -14
  156. package/dist/esm/vega-carousel.entry.js +9 -13
  157. package/dist/esm/vega-checkbox_2.entry.js +7 -7
  158. package/dist/esm/vega-chip.entry.js +11 -15
  159. package/dist/esm/vega-code-block.entry.js +8 -8
  160. package/dist/esm/vega-color-picker.entry.js +6 -6
  161. package/dist/esm/vega-combo-box.entry.js +7 -7
  162. package/dist/esm/vega-date-picker_2.entry.js +17 -21
  163. package/dist/esm/vega-dialog_2.entry.js +13 -17
  164. package/dist/esm/vega-divider.entry.js +11 -15
  165. package/dist/esm/vega-dropdown_5.entry.js +14 -17
  166. package/dist/esm/vega-env-manager-8f8dc473.js +2 -2
  167. package/dist/esm/vega-field-label.entry.js +3 -3
  168. package/dist/esm/vega-file-uploader.entry.js +6 -6
  169. package/dist/esm/vega-flag-icon.entry.js +9 -13
  170. package/dist/esm/vega-flex.entry.js +11 -15
  171. package/dist/esm/vega-font.entry.js +10 -14
  172. package/dist/esm/vega-form.entry.js +8 -8
  173. package/dist/esm/vega-grid.entry.js +10 -14
  174. package/dist/esm/vega-icon.entry.js +10 -14
  175. package/dist/esm/vega-image-uploader.entry.js +13 -17
  176. package/dist/esm/vega-input-credit-card.entry.js +7 -7
  177. package/dist/esm/vega-input-numeric.entry.js +8 -8
  178. package/dist/esm/vega-input-passcode.entry.js +7 -7
  179. package/dist/esm/vega-input-phone-number.entry.js +12 -16
  180. package/dist/esm/vega-input-range.entry.js +7 -7
  181. package/dist/esm/vega-input-select.entry.js +12 -15
  182. package/dist/esm/vega-input.entry.js +8 -8
  183. package/dist/esm/{vega-internal-event-id-3edc9b4e.js → vega-internal-event-id-4a06d705.js} +1 -3
  184. package/dist/esm/vega-item-toggle.entry.js +3 -3
  185. package/dist/esm/vega-left-nav_5.entry.js +12 -16
  186. package/dist/esm/vega-loader-wrapper_2.entry.js +12 -16
  187. package/dist/esm/vega-page-notification_2.entry.js +1 -1
  188. package/dist/esm/vega-pagination-page-selector-mobile.entry.js +4 -4
  189. package/dist/esm/vega-pagination-page-size-selector-mobile.entry.js +2 -2
  190. package/dist/esm/vega-pagination.entry.js +12 -16
  191. package/dist/esm/vega-popover_2.entry.js +12 -16
  192. package/dist/esm/vega-progress-tracker_2.entry.js +11 -15
  193. package/dist/esm/vega-radio_2.entry.js +7 -7
  194. package/dist/esm/vega-rich-text-content.entry.js +17 -15
  195. package/dist/esm/vega-rich-text-editor_4.entry.js +269 -174
  196. package/dist/esm/vega-segment-control.entry.js +3 -3
  197. package/dist/esm/vega-selection-chip_2.entry.js +13 -17
  198. package/dist/esm/vega-selection-tile_2.entry.js +8 -8
  199. package/dist/esm/vega-sidenav_3.entry.js +14 -18
  200. package/dist/esm/vega-signature-capture.entry.js +12 -16
  201. package/dist/esm/vega-stepper.entry.js +7 -7
  202. package/dist/esm/vega-tab-group_2.entry.js +4 -4
  203. package/dist/esm/vega-table_11.entry.js +12 -15
  204. package/dist/esm/vega-textarea.entry.js +7 -7
  205. package/dist/esm/vega-time-picker_2.entry.js +12 -16
  206. package/dist/esm/vega-toggle-switch.entry.js +6 -6
  207. package/dist/esm/vega-tooltip_2.entry.js +11 -15
  208. package/dist/esm/vega.js +13 -18
  209. package/dist/sri/vega-sri-manifest.json +301 -317
  210. package/dist/types/components/vega-popover/slimmers/controllers/vega-popover-appender-controller.d.ts +0 -1
  211. package/dist/types/components/vega-rich-text-content/vega-rich-text-content.d.ts +0 -3
  212. package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/action-handle-strategy.abstract.d.ts +0 -7
  213. package/dist/types/components/vega-rich-text-editor/dto/annotations/annotation.abstract.d.ts +5 -2
  214. package/dist/types/components/vega-rich-text-editor/dto/annotations/block-annotation.abstract.d.ts +3 -3
  215. package/dist/types/components/vega-rich-text-editor/dto/annotations/custom-attribute-annotation.d.ts +1 -1
  216. package/dist/types/components/vega-rich-text-editor/dto/blocks/block.abstract.d.ts +6 -10
  217. package/dist/types/components/vega-rich-text-editor/dto/blocks/html-block.d.ts +10 -0
  218. package/dist/types/components/vega-rich-text-editor/dto/renderers/nodes/text-node-renderer.d.ts +2 -0
  219. package/dist/types/components/vega-rich-text-editor/extensions/extension.abstract.d.ts +2 -15
  220. package/dist/types/components/vega-rich-text-editor/interface.d.ts +2 -34
  221. package/dist/types/components/vega-rich-text-editor/public-api.d.ts +0 -1
  222. package/dist/types/components/vega-rich-text-editor/slimmers/controllers/extension-controller.d.ts +0 -4
  223. package/dist/types/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/annotation-handler/html-element-to-annotation-generator.d.ts +0 -9
  224. package/dist/types/components/vega-rich-text-editor/slimmers/controllers/html-cleaner/html-content-cleaner-processor.interface.d.ts +13 -0
  225. package/dist/types/components/vega-rich-text-editor/slimmers/controllers/html-cleaner/html-content-cleaner.d.ts +35 -0
  226. package/dist/types/components/vega-rich-text-editor/slimmers/controllers/html-cleaner/index.d.ts +4 -0
  227. package/dist/types/components/vega-rich-text-editor/slimmers/controllers/html-cleaner/processors/remove-whitespace-after-opening-tag-processor.d.ts +19 -0
  228. package/dist/types/components/vega-rich-text-editor/slimmers/controllers/html-cleaner/processors/remove-whitespace-before-closing-tag-processor.d.ts +19 -0
  229. package/dist/types/components/vega-rich-text-editor/slimmers/controllers/html-cleaner/processors/remove-whitespace-between-tags-processor.d.ts +59 -0
  230. package/dist/types/components/vega-rich-text-editor/slimmers/controllers/selection-controller.d.ts +6 -19
  231. package/dist/types/components/vega-rich-text-editor/slimmers/controllers/text-node-color-controller.d.ts +22 -0
  232. package/dist/types/components/vega-rich-text-editor/slimmers/controllers/text-node-rendering-registry.d.ts +22 -0
  233. package/dist/types/components/vega-rich-text-editor/test/spec-utils.d.ts +0 -4
  234. package/dist/types/components/vega-rich-text-editor/vega-rich-text-editor.d.ts +2 -0
  235. package/dist/types/components.d.ts +1 -138
  236. package/dist/types/helpers/code-format/code-formatter.d.ts +14 -0
  237. package/dist/types/helpers/event-manager/event-id/vega-internal-event-id.d.ts +0 -2
  238. package/dist/types/types/components.type.d.ts +0 -4
  239. package/dist/types/utils/spec-utils.d.ts +1 -2
  240. package/dist/vega/index.esm.js +1 -1
  241. package/dist/vega/{p-3a6ff599.entry.js → p-011b94b1.entry.js} +1 -1
  242. package/dist/vega/p-012753b5.entry.js +1 -0
  243. package/dist/vega/p-024331ce.entry.js +1 -0
  244. package/dist/vega/{p-29f6b2d5.js → p-0575d22e.js} +1 -1
  245. package/dist/vega/p-08a90cc6.entry.js +1 -0
  246. package/dist/vega/p-0ede1fea.entry.js +1 -0
  247. package/dist/vega/{p-e1de1cdc.js → p-1298b126.js} +1 -1
  248. package/dist/vega/{p-9c624e03.entry.js → p-17c55205.entry.js} +1 -1
  249. package/dist/vega/p-3353b3d7.js +1 -0
  250. package/dist/vega/p-365b1b35.entry.js +1 -0
  251. package/dist/vega/p-3ae9ee3d.entry.js +1 -0
  252. package/dist/vega/p-3af92370.entry.js +1 -0
  253. package/dist/vega/p-3bf66be2.js +1 -0
  254. package/dist/vega/{p-e7cfb6b6.entry.js → p-3c5a28e4.entry.js} +1 -1
  255. package/dist/vega/p-430be941.js +1 -0
  256. package/dist/vega/{p-fdebc47f.entry.js → p-43f585f7.entry.js} +1 -1
  257. package/dist/vega/p-45296fd4.entry.js +1 -0
  258. package/dist/vega/p-491618a6.entry.js +1 -0
  259. package/dist/vega/{p-c5e7035b.entry.js → p-4a537391.entry.js} +1 -1
  260. package/dist/vega/p-4aa893ef.entry.js +1 -0
  261. package/dist/vega/p-4c47e8bb.entry.js +1 -0
  262. package/dist/vega/{p-d907f8a2.js → p-4da75f2b.js} +1 -1
  263. package/dist/vega/{p-60483e3d.entry.js → p-509eb52e.entry.js} +1 -1
  264. package/dist/vega/p-5110ba73.entry.js +1 -0
  265. package/dist/vega/p-556f9a21.entry.js +1 -0
  266. package/dist/vega/p-55b54ba0.entry.js +1 -0
  267. package/dist/vega/p-5b71c85e.js +1 -0
  268. package/dist/vega/p-5ea2e43c.entry.js +1 -0
  269. package/dist/vega/p-5efc6fe1.entry.js +1 -0
  270. package/dist/vega/p-5f377954.js +1 -1
  271. package/dist/vega/p-64cd1931.entry.js +1 -0
  272. package/dist/vega/{p-c841be8d.js → p-66fa700b.js} +1 -1
  273. package/dist/vega/{p-2c830cba.entry.js → p-67fcf6f2.entry.js} +1 -1
  274. package/dist/vega/{p-61ddae59.js → p-68df4288.js} +1 -1
  275. package/dist/vega/{p-5fdb9047.js → p-691ba1ae.js} +1 -1
  276. package/dist/vega/{p-87764570.entry.js → p-6a2205a1.entry.js} +1 -1
  277. package/dist/vega/{p-18560714.entry.js → p-6a4277df.entry.js} +1 -1
  278. package/dist/vega/{p-20010bd6.js → p-6e136980.js} +1 -1
  279. package/dist/vega/p-6f8be8ea.js +1 -0
  280. package/dist/vega/p-6fa8e231.entry.js +1 -0
  281. package/dist/vega/{p-585edae4.entry.js → p-7045e84c.entry.js} +1 -1
  282. package/dist/vega/{p-22989693.js → p-7288f8c4.js} +1 -1
  283. package/dist/vega/{p-85bfa0f7.js → p-749f96a4.js} +1 -1
  284. package/dist/vega/{p-e819940c.js → p-77edf50c.js} +1 -1
  285. package/dist/vega/p-7aaece55.entry.js +1 -0
  286. package/dist/vega/p-7ec6a104.entry.js +1 -0
  287. package/dist/vega/{p-01dc2e48.entry.js → p-81134e9e.entry.js} +1 -1
  288. package/dist/vega/p-89d685a8.js +1 -0
  289. package/dist/vega/{p-6e4e7192.entry.js → p-8c0eb12f.entry.js} +1 -1
  290. package/dist/vega/{p-11a6c1b7.js → p-8d0ca805.js} +1 -1
  291. package/dist/vega/p-8d701832.entry.js +1 -0
  292. package/dist/vega/{p-4f4c7593.entry.js → p-8e42a14c.entry.js} +1 -1
  293. package/dist/vega/p-8ed0faa2.entry.js +1 -0
  294. package/dist/vega/{p-849f78a7.entry.js → p-94394df7.entry.js} +1 -1
  295. package/dist/vega/p-99aa554b.entry.js +1 -0
  296. package/dist/vega/p-9a2446f1.entry.js +1 -0
  297. package/dist/vega/p-a475d525.entry.js +1 -0
  298. package/dist/vega/{p-bccaf3d2.entry.js → p-a530797f.entry.js} +1 -1
  299. package/dist/vega/{p-76d144f5.entry.js → p-a85ad369.entry.js} +1 -1
  300. package/dist/vega/p-ac5e9955.entry.js +1 -0
  301. package/dist/vega/{p-9472d19a.js → p-aedf7146.js} +1 -1
  302. package/dist/vega/p-b1f869fb.js +1 -0
  303. package/dist/vega/{p-b5b75a2f.entry.js → p-bb4a558d.entry.js} +1 -1
  304. package/dist/vega/{p-0bf4a3a7.entry.js → p-bb8339ed.entry.js} +1 -1
  305. package/dist/vega/{p-28e630b2.entry.js → p-be930e85.entry.js} +1 -1
  306. package/dist/vega/p-bf2bd6d0.entry.js +1 -0
  307. package/dist/vega/p-c2488ed6.js +1 -0
  308. package/dist/vega/{p-4c36b528.entry.js → p-c379a5a5.entry.js} +1 -1
  309. package/dist/vega/{p-89083d63.js → p-c9b6b5a9.js} +1 -1
  310. package/dist/vega/{p-61145506.entry.js → p-ca3472c1.entry.js} +1 -1
  311. package/dist/vega/p-cc43bffb.js +1 -0
  312. package/dist/vega/p-cf5b80f9.entry.js +1 -0
  313. package/dist/vega/p-db60a38e.entry.js +1 -0
  314. package/dist/vega/p-e93545fd.js +1 -0
  315. package/dist/vega/{p-77c9949d.entry.js → p-e9c4fd24.entry.js} +1 -1
  316. package/dist/vega/{p-326b5392.entry.js → p-eb60cfe1.entry.js} +1 -1
  317. package/dist/vega/p-ec192283.entry.js +1 -0
  318. package/dist/vega/p-f2a3a1ec.entry.js +1 -0
  319. package/dist/vega/p-f2cdd212.entry.js +1 -0
  320. package/dist/vega/{p-4ecf0ee7.entry.js → p-f3c3ff26.entry.js} +1 -1
  321. package/dist/vega/p-f4c05b4a.entry.js +1 -0
  322. package/dist/vega/{p-228784f7.entry.js → p-f52a0155.entry.js} +1 -1
  323. package/dist/vega/p-f8641214.entry.js +1 -0
  324. package/dist/vega/p-f89443aa.entry.js +1 -0
  325. package/dist/vega/{p-de850e98.entry.js → p-f8f7cf48.entry.js} +1 -1
  326. package/dist/vega/{p-3532aa12.js → p-fe12eff6.js} +1 -1
  327. package/dist/vega/vega.esm.js +1 -1
  328. package/package.json +1 -1
  329. package/dist/cjs/align-left-4a76df69.js +0 -22
  330. package/dist/cjs/dto-renderer-manager-ae5fcbba.js +0 -58
  331. package/dist/cjs/split-cell-operation-9930fde8.js +0 -2133
  332. package/dist/cjs/table-extension-5f27207f.js +0 -6321
  333. package/dist/cjs/vega-rich-text-table-properties_3.cjs.entry.js +0 -1521
  334. package/dist/collection/components/vega-rich-text-editor/extensions/table/action-handler-interceptors/prevent-cell-children-remove-interceptor.js +0 -42
  335. package/dist/collection/components/vega-rich-text-editor/extensions/table/action-handler-interceptors/prevent-cell-content-delete-interceptor.js +0 -26
  336. package/dist/collection/components/vega-rich-text-editor/extensions/table/action-handler-interceptors/prevent-row-insert-interceptor.js +0 -23
  337. package/dist/collection/components/vega-rich-text-editor/extensions/table/action-handler-strategies/delete-table-block-strategy.js +0 -25
  338. package/dist/collection/components/vega-rich-text-editor/extensions/table/action-handler-strategies/delete-table-column-strategy.js +0 -57
  339. package/dist/collection/components/vega-rich-text-editor/extensions/table/action-handler-strategies/delete-table-row-strategy.js +0 -57
  340. package/dist/collection/components/vega-rich-text-editor/extensions/table/action-handler-strategies/insert-table-block-strategy.js +0 -54
  341. package/dist/collection/components/vega-rich-text-editor/extensions/table/action-handler-strategies/insert-table-column-strategy.js +0 -42
  342. package/dist/collection/components/vega-rich-text-editor/extensions/table/action-handler-strategies/insert-table-row-strategy.js +0 -163
  343. package/dist/collection/components/vega-rich-text-editor/extensions/table/action-handler-strategies/merge-cells-strategy.js +0 -120
  344. package/dist/collection/components/vega-rich-text-editor/extensions/table/action-handler-strategies/select-table-column-strategy.js +0 -22
  345. package/dist/collection/components/vega-rich-text-editor/extensions/table/action-handler-strategies/split-cell-horizontally-strategy.js +0 -143
  346. package/dist/collection/components/vega-rich-text-editor/extensions/table/action-handler-strategies/split-cell-vertically-strategy.js +0 -80
  347. package/dist/collection/components/vega-rich-text-editor/extensions/table/action-handler-strategies/table-column-strategy.abstract.js +0 -19
  348. package/dist/collection/components/vega-rich-text-editor/extensions/table/action-handler-strategies/toggle-header-row-strategy.js +0 -133
  349. package/dist/collection/components/vega-rich-text-editor/extensions/table/action-handler-strategies/toggle-header-table-column-strategy.js +0 -99
  350. package/dist/collection/components/vega-rich-text-editor/extensions/table/action-handler-strategies/update-table-cell-properties-strategy.js +0 -24
  351. package/dist/collection/components/vega-rich-text-editor/extensions/table/action-handler-strategies/update-table-properties-strategy.js +0 -29
  352. package/dist/collection/components/vega-rich-text-editor/extensions/table/actions/delete-table-block-action.js +0 -13
  353. package/dist/collection/components/vega-rich-text-editor/extensions/table/actions/delete-table-column-action.js +0 -13
  354. package/dist/collection/components/vega-rich-text-editor/extensions/table/actions/delete-table-row-action.js +0 -18
  355. package/dist/collection/components/vega-rich-text-editor/extensions/table/actions/insert-table-block-action.js +0 -13
  356. package/dist/collection/components/vega-rich-text-editor/extensions/table/actions/insert-table-column-action.js +0 -19
  357. package/dist/collection/components/vega-rich-text-editor/extensions/table/actions/insert-table-row-action.js +0 -26
  358. package/dist/collection/components/vega-rich-text-editor/extensions/table/actions/merge-cells-action.js +0 -17
  359. package/dist/collection/components/vega-rich-text-editor/extensions/table/actions/select-table-column-action.js +0 -13
  360. package/dist/collection/components/vega-rich-text-editor/extensions/table/actions/split-cell-horizontally-action.js +0 -12
  361. package/dist/collection/components/vega-rich-text-editor/extensions/table/actions/split-cell-vertically-action.js +0 -12
  362. package/dist/collection/components/vega-rich-text-editor/extensions/table/actions/table-annotations-action.js +0 -18
  363. package/dist/collection/components/vega-rich-text-editor/extensions/table/actions/table-caption-action.js +0 -13
  364. package/dist/collection/components/vega-rich-text-editor/extensions/table/actions/table-cell-annotations-action.js +0 -18
  365. package/dist/collection/components/vega-rich-text-editor/extensions/table/actions/table-head-cell-annotations-action.js +0 -18
  366. package/dist/collection/components/vega-rich-text-editor/extensions/table/actions/toggle-header-row-action.js +0 -13
  367. package/dist/collection/components/vega-rich-text-editor/extensions/table/actions/toggle-header-table-column-action.js +0 -15
  368. package/dist/collection/components/vega-rich-text-editor/extensions/table/actions/update-table-properties-action.js +0 -38
  369. package/dist/collection/components/vega-rich-text-editor/extensions/table/annotation-handler/table-annotation-handler-base.js +0 -76
  370. package/dist/collection/components/vega-rich-text-editor/extensions/table/annotation-handler/table-annotation-handler.js +0 -69
  371. package/dist/collection/components/vega-rich-text-editor/extensions/table/annotation-handler/table-cell-annotation-handler.js +0 -108
  372. package/dist/collection/components/vega-rich-text-editor/extensions/table/annotation-handler/table-head-cell-annotation-handler.js +0 -14
  373. package/dist/collection/components/vega-rich-text-editor/extensions/table/annotations/table-annotation.js +0 -106
  374. package/dist/collection/components/vega-rich-text-editor/extensions/table/annotations/table-caption-annotation.js +0 -57
  375. package/dist/collection/components/vega-rich-text-editor/extensions/table/annotations/table-cell-annotation.js +0 -161
  376. package/dist/collection/components/vega-rich-text-editor/extensions/table/annotations/table-color-annotation.js +0 -66
  377. package/dist/collection/components/vega-rich-text-editor/extensions/table/annotations/table-head-cell-annotation.js +0 -45
  378. package/dist/collection/components/vega-rich-text-editor/extensions/table/constants/styles.constants.js +0 -21
  379. package/dist/collection/components/vega-rich-text-editor/extensions/table/dto/table-block.js +0 -119
  380. package/dist/collection/components/vega-rich-text-editor/extensions/table/dto/table-body-block.js +0 -56
  381. package/dist/collection/components/vega-rich-text-editor/extensions/table/dto/table-caption-block.js +0 -69
  382. package/dist/collection/components/vega-rich-text-editor/extensions/table/dto/table-cell-block.js +0 -97
  383. package/dist/collection/components/vega-rich-text-editor/extensions/table/dto/table-head-block.js +0 -60
  384. package/dist/collection/components/vega-rich-text-editor/extensions/table/dto/table-head-cell-block.js +0 -53
  385. package/dist/collection/components/vega-rich-text-editor/extensions/table/dto/table-row-block.js +0 -60
  386. package/dist/collection/components/vega-rich-text-editor/extensions/table/element-to-dto-strategies/caption-to-caption-block-strategy.js +0 -50
  387. package/dist/collection/components/vega-rich-text-editor/extensions/table/element-to-dto-strategies/table-to-table-block-strategy.js +0 -42
  388. package/dist/collection/components/vega-rich-text-editor/extensions/table/element-to-dto-strategies/tbody-to-table-body-block-strategy.js +0 -42
  389. package/dist/collection/components/vega-rich-text-editor/extensions/table/element-to-dto-strategies/td-to-table-cell-block-strategy.js +0 -71
  390. package/dist/collection/components/vega-rich-text-editor/extensions/table/element-to-dto-strategies/thead-to-table-head-block-strategy.js +0 -42
  391. package/dist/collection/components/vega-rich-text-editor/extensions/table/element-to-dto-strategies/tr-to-table-row-block-strategy.js +0 -42
  392. package/dist/collection/components/vega-rich-text-editor/extensions/table/renderers/table-body-renderer.js +0 -15
  393. package/dist/collection/components/vega-rich-text-editor/extensions/table/renderers/table-caption-renderer.js +0 -22
  394. package/dist/collection/components/vega-rich-text-editor/extensions/table/renderers/table-cell-renderer.js +0 -76
  395. package/dist/collection/components/vega-rich-text-editor/extensions/table/renderers/table-dynamic-popover-renderer.js +0 -254
  396. package/dist/collection/components/vega-rich-text-editor/extensions/table/renderers/table-head-cell-renderer.js +0 -12
  397. package/dist/collection/components/vega-rich-text-editor/extensions/table/renderers/table-head-renderer.js +0 -15
  398. package/dist/collection/components/vega-rich-text-editor/extensions/table/renderers/table-renderer.js +0 -142
  399. package/dist/collection/components/vega-rich-text-editor/extensions/table/renderers/table-row-renderer.js +0 -15
  400. package/dist/collection/components/vega-rich-text-editor/extensions/table/renderers/table-setting-popover-renderer.js +0 -152
  401. package/dist/collection/components/vega-rich-text-editor/extensions/table/setting-event-handlers/caption-operation.js +0 -78
  402. package/dist/collection/components/vega-rich-text-editor/extensions/table/setting-event-handlers/cell-properties-cancel-event-handler.js +0 -17
  403. package/dist/collection/components/vega-rich-text-editor/extensions/table/setting-event-handlers/cell-properties-change-event-handler.js +0 -15
  404. package/dist/collection/components/vega-rich-text-editor/extensions/table/setting-event-handlers/cell-properties-save-event-handler.js +0 -19
  405. package/dist/collection/components/vega-rich-text-editor/extensions/table/setting-event-handlers/cell-properties.js +0 -135
  406. package/dist/collection/components/vega-rich-text-editor/extensions/table/setting-event-handlers/column-operation.js +0 -109
  407. package/dist/collection/components/vega-rich-text-editor/extensions/table/setting-event-handlers/merge-cells-operation.js +0 -100
  408. package/dist/collection/components/vega-rich-text-editor/extensions/table/setting-event-handlers/row-operation.js +0 -132
  409. package/dist/collection/components/vega-rich-text-editor/extensions/table/setting-event-handlers/setting-event-handler.abstract.js +0 -45
  410. package/dist/collection/components/vega-rich-text-editor/extensions/table/setting-event-handlers/split-cell-operation.js +0 -57
  411. package/dist/collection/components/vega-rich-text-editor/extensions/table/setting-event-handlers/table-properties-cancel-event-handler.js +0 -19
  412. package/dist/collection/components/vega-rich-text-editor/extensions/table/setting-event-handlers/table-properties-change-event-handler.js +0 -20
  413. package/dist/collection/components/vega-rich-text-editor/extensions/table/setting-event-handlers/table-properties-save-event-handler.js +0 -20
  414. package/dist/collection/components/vega-rich-text-editor/extensions/table/setting-event-handlers/table-properties.js +0 -50
  415. package/dist/collection/components/vega-rich-text-editor/extensions/table/table-extension.js +0 -164
  416. package/dist/collection/components/vega-rich-text-editor/extensions/table/table-icon.js +0 -3
  417. package/dist/collection/components/vega-rich-text-editor/extensions/table/table-selection.js +0 -460
  418. package/dist/collection/components/vega-rich-text-editor/extensions/table/table-toolbar-button-renderer.js +0 -234
  419. package/dist/collection/components/vega-rich-text-editor/extensions/table/utils/table-color-manager.js +0 -51
  420. package/dist/collection/components/vega-rich-text-editor/extensions/table/utils/utils.js +0 -355
  421. package/dist/collection/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-properties/assets/align-bottom.js +0 -3
  422. package/dist/collection/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-properties/assets/align-middle.js +0 -3
  423. package/dist/collection/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-properties/assets/align-top.js +0 -3
  424. package/dist/collection/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-properties/assets/objects-align-center-horizontal.js +0 -3
  425. package/dist/collection/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-properties/assets/objects-align-left.js +0 -3
  426. package/dist/collection/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-properties/assets/objects-align-right.js +0 -3
  427. package/dist/collection/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-properties/slimmers/controllers/vega-rich-text-table-properties-color-controller.js +0 -58
  428. package/dist/collection/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-properties/slimmers/renderers/vega-rich-text-cell-properties-form-field-renderer.js +0 -106
  429. package/dist/collection/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-properties/slimmers/renderers/vega-rich-text-table-properties-basic-form-field-renderer.abstract.js +0 -291
  430. package/dist/collection/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-properties/slimmers/renderers/vega-rich-text-table-properties-form-field-renderer.js +0 -58
  431. package/dist/collection/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-properties/slimmers/renderers/vega-rich-text-table-properties-form-renderer.js +0 -111
  432. package/dist/collection/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-properties/vega-rich-text-table-properties.css +0 -149
  433. package/dist/collection/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-properties/vega-rich-text-table-properties.js +0 -251
  434. package/dist/collection/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-selection-widget/slimmers/controllers/selection-widget-keyboard-controller.js +0 -36
  435. package/dist/collection/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-selection-widget/slimmers/renderers/selection-widget-renderer.js +0 -83
  436. package/dist/collection/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-selection-widget/vega-rich-text-table-selection-widget.css +0 -41
  437. package/dist/collection/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-selection-widget/vega-rich-text-table-selection-widget.js +0 -80
  438. package/dist/collection/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-setting/assets/icon.js +0 -20
  439. package/dist/collection/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-setting/slimmers/renderers/caption-button-slimmer.js +0 -27
  440. package/dist/collection/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-setting/slimmers/renderers/cell-properties-button-slimmer.js +0 -26
  441. package/dist/collection/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-setting/slimmers/renderers/column-button-slimmer.js +0 -86
  442. package/dist/collection/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-setting/slimmers/renderers/merge-cells-button-slimmer.js +0 -117
  443. package/dist/collection/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-setting/slimmers/renderers/row-button-slimmer.js +0 -103
  444. package/dist/collection/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-setting/slimmers/renderers/table-properties-button-slimmer.js +0 -26
  445. package/dist/collection/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-setting/slimmers/renderers/table-setting-button-slimmer.abstract.js +0 -75
  446. package/dist/collection/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-setting/slimmers/renderers/vega-rich-text-table-setting-renderer.js +0 -55
  447. package/dist/collection/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-setting/vega-rich-text-table-setting.css +0 -20
  448. package/dist/collection/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-setting/vega-rich-text-table-setting.js +0 -222
  449. package/dist/collection/components/vega-rich-text-editor/test/extensions/table/annotation-handler/annotation-handler-registration.test.js +0 -164
  450. package/dist/collection/components/vega-rich-text-editor/test/extensions/table/annotation-handler/table-annotation-handler.test.js +0 -288
  451. package/dist/collection/components/vega-rich-text-editor/test/extensions/table/annotation-handler/table-cell-annotation-handler.test.js +0 -316
  452. package/dist/collection/components/vega-rich-text-editor/test/extensions/table/annotation-handler/table-head-cell-annotation-handler.test.js +0 -411
  453. package/dist/collection/components/vega-rich-text-editor/test/extensions/table/caption-operation.test.js +0 -99
  454. package/dist/collection/components/vega-rich-text-editor/test/extensions/table/table-annotation.test.js +0 -181
  455. package/dist/collection/components/vega-rich-text-editor/test/extensions/table/table-caption-annotations.test.js +0 -79
  456. package/dist/collection/components/vega-rich-text-editor/test/extensions/table/table-cell-annotation.test.js +0 -323
  457. package/dist/collection/components/vega-rich-text-editor/test/extensions/table/table-color-annotation.test.js +0 -32
  458. package/dist/collection/components/vega-rich-text-editor/test/extensions/table/table-dto.test.js +0 -1094
  459. package/dist/collection/components/vega-rich-text-editor/test/extensions/table/table-element-to-dto-strategies.test.js +0 -1539
  460. package/dist/collection/components/vega-rich-text-editor/test/extensions/table/table-test-utils.js +0 -172
  461. package/dist/esm/align-left-7f959adf.js +0 -17
  462. package/dist/esm/dto-renderer-manager-12bc9121.js +0 -56
  463. package/dist/esm/split-cell-operation-6749f654.js +0 -2090
  464. package/dist/esm/table-extension-6b31754b.js +0 -6302
  465. package/dist/esm/vega-rich-text-table-properties_3.entry.js +0 -1515
  466. package/dist/types/components/vega-rich-text-editor/extensions/table/action-handler-interceptors/prevent-cell-children-remove-interceptor.d.ts +0 -25
  467. package/dist/types/components/vega-rich-text-editor/extensions/table/action-handler-interceptors/prevent-cell-content-delete-interceptor.d.ts +0 -20
  468. package/dist/types/components/vega-rich-text-editor/extensions/table/action-handler-interceptors/prevent-row-insert-interceptor.d.ts +0 -19
  469. package/dist/types/components/vega-rich-text-editor/extensions/table/action-handler-strategies/delete-table-block-strategy.d.ts +0 -14
  470. package/dist/types/components/vega-rich-text-editor/extensions/table/action-handler-strategies/delete-table-column-strategy.d.ts +0 -31
  471. package/dist/types/components/vega-rich-text-editor/extensions/table/action-handler-strategies/delete-table-row-strategy.d.ts +0 -28
  472. package/dist/types/components/vega-rich-text-editor/extensions/table/action-handler-strategies/insert-table-block-strategy.d.ts +0 -27
  473. package/dist/types/components/vega-rich-text-editor/extensions/table/action-handler-strategies/insert-table-column-strategy.d.ts +0 -19
  474. package/dist/types/components/vega-rich-text-editor/extensions/table/action-handler-strategies/insert-table-row-strategy.d.ts +0 -44
  475. package/dist/types/components/vega-rich-text-editor/extensions/table/action-handler-strategies/merge-cells-strategy.d.ts +0 -38
  476. package/dist/types/components/vega-rich-text-editor/extensions/table/action-handler-strategies/select-table-column-strategy.d.ts +0 -12
  477. package/dist/types/components/vega-rich-text-editor/extensions/table/action-handler-strategies/split-cell-horizontally-strategy.d.ts +0 -43
  478. package/dist/types/components/vega-rich-text-editor/extensions/table/action-handler-strategies/split-cell-vertically-strategy.d.ts +0 -27
  479. package/dist/types/components/vega-rich-text-editor/extensions/table/action-handler-strategies/table-column-strategy.abstract.d.ts +0 -20
  480. package/dist/types/components/vega-rich-text-editor/extensions/table/action-handler-strategies/toggle-header-row-strategy.d.ts +0 -41
  481. package/dist/types/components/vega-rich-text-editor/extensions/table/action-handler-strategies/toggle-header-table-column-strategy.d.ts +0 -45
  482. package/dist/types/components/vega-rich-text-editor/extensions/table/action-handler-strategies/update-table-cell-properties-strategy.d.ts +0 -13
  483. package/dist/types/components/vega-rich-text-editor/extensions/table/action-handler-strategies/update-table-properties-strategy.d.ts +0 -12
  484. package/dist/types/components/vega-rich-text-editor/extensions/table/actions/delete-table-block-action.d.ts +0 -12
  485. package/dist/types/components/vega-rich-text-editor/extensions/table/actions/delete-table-column-action.d.ts +0 -15
  486. package/dist/types/components/vega-rich-text-editor/extensions/table/actions/delete-table-row-action.d.ts +0 -17
  487. package/dist/types/components/vega-rich-text-editor/extensions/table/actions/insert-table-block-action.d.ts +0 -20
  488. package/dist/types/components/vega-rich-text-editor/extensions/table/actions/insert-table-column-action.d.ts +0 -23
  489. package/dist/types/components/vega-rich-text-editor/extensions/table/actions/insert-table-row-action.d.ts +0 -23
  490. package/dist/types/components/vega-rich-text-editor/extensions/table/actions/merge-cells-action.d.ts +0 -33
  491. package/dist/types/components/vega-rich-text-editor/extensions/table/actions/select-table-column-action.d.ts +0 -18
  492. package/dist/types/components/vega-rich-text-editor/extensions/table/actions/split-cell-horizontally-action.d.ts +0 -10
  493. package/dist/types/components/vega-rich-text-editor/extensions/table/actions/split-cell-vertically-action.d.ts +0 -10
  494. package/dist/types/components/vega-rich-text-editor/extensions/table/actions/table-annotations-action.d.ts +0 -16
  495. package/dist/types/components/vega-rich-text-editor/extensions/table/actions/table-caption-action.d.ts +0 -14
  496. package/dist/types/components/vega-rich-text-editor/extensions/table/actions/table-cell-annotations-action.d.ts +0 -14
  497. package/dist/types/components/vega-rich-text-editor/extensions/table/actions/table-head-cell-annotations-action.d.ts +0 -15
  498. package/dist/types/components/vega-rich-text-editor/extensions/table/actions/toggle-header-row-action.d.ts +0 -12
  499. package/dist/types/components/vega-rich-text-editor/extensions/table/actions/toggle-header-table-column-action.d.ts +0 -16
  500. package/dist/types/components/vega-rich-text-editor/extensions/table/actions/update-table-properties-action.d.ts +0 -18
  501. package/dist/types/components/vega-rich-text-editor/extensions/table/annotation-handler/table-annotation-handler-base.d.ts +0 -36
  502. package/dist/types/components/vega-rich-text-editor/extensions/table/annotation-handler/table-annotation-handler.d.ts +0 -26
  503. package/dist/types/components/vega-rich-text-editor/extensions/table/annotation-handler/table-cell-annotation-handler.d.ts +0 -56
  504. package/dist/types/components/vega-rich-text-editor/extensions/table/annotation-handler/table-head-cell-annotation-handler.d.ts +0 -13
  505. package/dist/types/components/vega-rich-text-editor/extensions/table/annotations/table-annotation.d.ts +0 -73
  506. package/dist/types/components/vega-rich-text-editor/extensions/table/annotations/table-caption-annotation.d.ts +0 -26
  507. package/dist/types/components/vega-rich-text-editor/extensions/table/annotations/table-cell-annotation.d.ts +0 -76
  508. package/dist/types/components/vega-rich-text-editor/extensions/table/annotations/table-color-annotation.d.ts +0 -43
  509. package/dist/types/components/vega-rich-text-editor/extensions/table/annotations/table-head-cell-annotation.d.ts +0 -22
  510. package/dist/types/components/vega-rich-text-editor/extensions/table/constants/styles.constants.d.ts +0 -3
  511. package/dist/types/components/vega-rich-text-editor/extensions/table/dto/table-block.d.ts +0 -79
  512. package/dist/types/components/vega-rich-text-editor/extensions/table/dto/table-body-block.d.ts +0 -42
  513. package/dist/types/components/vega-rich-text-editor/extensions/table/dto/table-caption-block.d.ts +0 -41
  514. package/dist/types/components/vega-rich-text-editor/extensions/table/dto/table-cell-block.d.ts +0 -64
  515. package/dist/types/components/vega-rich-text-editor/extensions/table/dto/table-head-block.d.ts +0 -42
  516. package/dist/types/components/vega-rich-text-editor/extensions/table/dto/table-head-cell-block.d.ts +0 -34
  517. package/dist/types/components/vega-rich-text-editor/extensions/table/dto/table-row-block.d.ts +0 -44
  518. package/dist/types/components/vega-rich-text-editor/extensions/table/element-to-dto-strategies/caption-to-caption-block-strategy.d.ts +0 -29
  519. package/dist/types/components/vega-rich-text-editor/extensions/table/element-to-dto-strategies/table-to-table-block-strategy.d.ts +0 -26
  520. package/dist/types/components/vega-rich-text-editor/extensions/table/element-to-dto-strategies/tbody-to-table-body-block-strategy.d.ts +0 -26
  521. package/dist/types/components/vega-rich-text-editor/extensions/table/element-to-dto-strategies/td-to-table-cell-block-strategy.d.ts +0 -27
  522. package/dist/types/components/vega-rich-text-editor/extensions/table/element-to-dto-strategies/thead-to-table-head-block-strategy.d.ts +0 -26
  523. package/dist/types/components/vega-rich-text-editor/extensions/table/element-to-dto-strategies/tr-to-table-row-block-strategy.d.ts +0 -26
  524. package/dist/types/components/vega-rich-text-editor/extensions/table/renderers/table-body-renderer.d.ts +0 -12
  525. package/dist/types/components/vega-rich-text-editor/extensions/table/renderers/table-caption-renderer.d.ts +0 -13
  526. package/dist/types/components/vega-rich-text-editor/extensions/table/renderers/table-cell-renderer.d.ts +0 -37
  527. package/dist/types/components/vega-rich-text-editor/extensions/table/renderers/table-dynamic-popover-renderer.d.ts +0 -88
  528. package/dist/types/components/vega-rich-text-editor/extensions/table/renderers/table-head-cell-renderer.d.ts +0 -12
  529. package/dist/types/components/vega-rich-text-editor/extensions/table/renderers/table-head-renderer.d.ts +0 -12
  530. package/dist/types/components/vega-rich-text-editor/extensions/table/renderers/table-renderer.d.ts +0 -54
  531. package/dist/types/components/vega-rich-text-editor/extensions/table/renderers/table-row-renderer.d.ts +0 -12
  532. package/dist/types/components/vega-rich-text-editor/extensions/table/renderers/table-setting-popover-renderer.d.ts +0 -66
  533. package/dist/types/components/vega-rich-text-editor/extensions/table/setting-event-handlers/caption-operation.d.ts +0 -36
  534. package/dist/types/components/vega-rich-text-editor/extensions/table/setting-event-handlers/cell-properties-cancel-event-handler.d.ts +0 -17
  535. package/dist/types/components/vega-rich-text-editor/extensions/table/setting-event-handlers/cell-properties-change-event-handler.d.ts +0 -15
  536. package/dist/types/components/vega-rich-text-editor/extensions/table/setting-event-handlers/cell-properties-save-event-handler.d.ts +0 -17
  537. package/dist/types/components/vega-rich-text-editor/extensions/table/setting-event-handlers/cell-properties.d.ts +0 -62
  538. package/dist/types/components/vega-rich-text-editor/extensions/table/setting-event-handlers/column-operation.d.ts +0 -55
  539. package/dist/types/components/vega-rich-text-editor/extensions/table/setting-event-handlers/merge-cells-operation.d.ts +0 -44
  540. package/dist/types/components/vega-rich-text-editor/extensions/table/setting-event-handlers/row-operation.d.ts +0 -61
  541. package/dist/types/components/vega-rich-text-editor/extensions/table/setting-event-handlers/setting-event-handler.abstract.d.ts +0 -48
  542. package/dist/types/components/vega-rich-text-editor/extensions/table/setting-event-handlers/split-cell-operation.d.ts +0 -31
  543. package/dist/types/components/vega-rich-text-editor/extensions/table/setting-event-handlers/table-properties-cancel-event-handler.d.ts +0 -19
  544. package/dist/types/components/vega-rich-text-editor/extensions/table/setting-event-handlers/table-properties-change-event-handler.d.ts +0 -17
  545. package/dist/types/components/vega-rich-text-editor/extensions/table/setting-event-handlers/table-properties-save-event-handler.d.ts +0 -17
  546. package/dist/types/components/vega-rich-text-editor/extensions/table/setting-event-handlers/table-properties.d.ts +0 -33
  547. package/dist/types/components/vega-rich-text-editor/extensions/table/table-extension.d.ts +0 -36
  548. package/dist/types/components/vega-rich-text-editor/extensions/table/table-icon.d.ts +0 -3
  549. package/dist/types/components/vega-rich-text-editor/extensions/table/table-selection.d.ts +0 -164
  550. package/dist/types/components/vega-rich-text-editor/extensions/table/table-toolbar-button-renderer.d.ts +0 -86
  551. package/dist/types/components/vega-rich-text-editor/extensions/table/utils/table-color-manager.d.ts +0 -26
  552. package/dist/types/components/vega-rich-text-editor/extensions/table/utils/utils.d.ts +0 -153
  553. package/dist/types/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-properties/assets/align-bottom.d.ts +0 -3
  554. package/dist/types/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-properties/assets/align-middle.d.ts +0 -3
  555. package/dist/types/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-properties/assets/align-top.d.ts +0 -3
  556. package/dist/types/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-properties/assets/objects-align-center-horizontal.d.ts +0 -3
  557. package/dist/types/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-properties/assets/objects-align-left.d.ts +0 -3
  558. package/dist/types/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-properties/assets/objects-align-right.d.ts +0 -3
  559. package/dist/types/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-properties/slimmers/controllers/vega-rich-text-table-properties-color-controller.d.ts +0 -29
  560. package/dist/types/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-properties/slimmers/renderers/vega-rich-text-cell-properties-form-field-renderer.d.ts +0 -49
  561. package/dist/types/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-properties/slimmers/renderers/vega-rich-text-table-properties-basic-form-field-renderer.abstract.d.ts +0 -111
  562. package/dist/types/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-properties/slimmers/renderers/vega-rich-text-table-properties-form-field-renderer.d.ts +0 -27
  563. package/dist/types/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-properties/slimmers/renderers/vega-rich-text-table-properties-form-renderer.d.ts +0 -39
  564. package/dist/types/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-properties/vega-rich-text-table-properties.d.ts +0 -60
  565. package/dist/types/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-selection-widget/slimmers/controllers/selection-widget-keyboard-controller.d.ts +0 -15
  566. package/dist/types/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-selection-widget/slimmers/renderers/selection-widget-renderer.d.ts +0 -31
  567. package/dist/types/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-selection-widget/vega-rich-text-table-selection-widget.d.ts +0 -27
  568. package/dist/types/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-setting/assets/icon.d.ts +0 -2
  569. package/dist/types/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-setting/slimmers/renderers/caption-button-slimmer.d.ts +0 -11
  570. package/dist/types/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-setting/slimmers/renderers/cell-properties-button-slimmer.d.ts +0 -11
  571. package/dist/types/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-setting/slimmers/renderers/column-button-slimmer.d.ts +0 -28
  572. package/dist/types/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-setting/slimmers/renderers/merge-cells-button-slimmer.d.ts +0 -23
  573. package/dist/types/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-setting/slimmers/renderers/row-button-slimmer.d.ts +0 -36
  574. package/dist/types/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-setting/slimmers/renderers/table-properties-button-slimmer.d.ts +0 -11
  575. package/dist/types/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-setting/slimmers/renderers/table-setting-button-slimmer.abstract.d.ts +0 -36
  576. package/dist/types/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-setting/slimmers/renderers/vega-rich-text-table-setting-renderer.d.ts +0 -12
  577. package/dist/types/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-setting/vega-rich-text-table-setting.d.ts +0 -58
  578. package/dist/types/components/vega-rich-text-editor/test/extensions/table/annotation-handler/table-cell-annotation-handler.test.d.ts +0 -8
  579. package/dist/types/components/vega-rich-text-editor/test/extensions/table/table-caption-annotations.test.d.ts +0 -1
  580. package/dist/types/components/vega-rich-text-editor/test/extensions/table/table-cell-annotation.test.d.ts +0 -1
  581. package/dist/types/components/vega-rich-text-editor/test/extensions/table/table-color-annotation.test.d.ts +0 -1
  582. package/dist/types/components/vega-rich-text-editor/test/extensions/table/table-dto.test.d.ts +0 -1
  583. package/dist/types/components/vega-rich-text-editor/test/extensions/table/table-element-to-dto-strategies.test.d.ts +0 -1
  584. package/dist/types/components/vega-rich-text-editor/test/extensions/table/table-test-utils.d.ts +0 -11
  585. package/dist/vega/p-0459a474.entry.js +0 -1
  586. package/dist/vega/p-0770a0eb.entry.js +0 -1
  587. package/dist/vega/p-0d57293b.js +0 -1
  588. package/dist/vega/p-1199ebf6.entry.js +0 -1
  589. package/dist/vega/p-1415d93b.entry.js +0 -1
  590. package/dist/vega/p-1431c8b9.js +0 -1
  591. package/dist/vega/p-1a161082.entry.js +0 -1
  592. package/dist/vega/p-1b44db34.js +0 -1
  593. package/dist/vega/p-205d8401.js +0 -1
  594. package/dist/vega/p-20a98a99.entry.js +0 -1
  595. package/dist/vega/p-273911b2.entry.js +0 -1
  596. package/dist/vega/p-2af2e1ad.entry.js +0 -1
  597. package/dist/vega/p-2af78c38.entry.js +0 -1
  598. package/dist/vega/p-3224d794.entry.js +0 -1
  599. package/dist/vega/p-3413a678.entry.js +0 -1
  600. package/dist/vega/p-395cdd84.entry.js +0 -1
  601. package/dist/vega/p-3be82c0f.entry.js +0 -1
  602. package/dist/vega/p-3c0f55f7.entry.js +0 -1
  603. package/dist/vega/p-3e30567a.js +0 -1
  604. package/dist/vega/p-42cd1fde.js +0 -1
  605. package/dist/vega/p-4b6c60cb.entry.js +0 -1
  606. package/dist/vega/p-5b048141.js +0 -1
  607. package/dist/vega/p-64386be8.entry.js +0 -1
  608. package/dist/vega/p-6490b69a.entry.js +0 -1
  609. package/dist/vega/p-6bc1552e.entry.js +0 -1
  610. package/dist/vega/p-76eb9cd0.entry.js +0 -1
  611. package/dist/vega/p-8198a77c.js +0 -1
  612. package/dist/vega/p-82ad1006.entry.js +0 -1
  613. package/dist/vega/p-839c9d62.entry.js +0 -1
  614. package/dist/vega/p-88c894e8.entry.js +0 -1
  615. package/dist/vega/p-96657262.entry.js +0 -1
  616. package/dist/vega/p-979e4bd4.entry.js +0 -1
  617. package/dist/vega/p-a01f985f.entry.js +0 -1
  618. package/dist/vega/p-a495463f.entry.js +0 -1
  619. package/dist/vega/p-b56b0b89.js +0 -1
  620. package/dist/vega/p-bde5c990.entry.js +0 -1
  621. package/dist/vega/p-beb6c1ce.entry.js +0 -1
  622. package/dist/vega/p-c02b01ec.entry.js +0 -1
  623. package/dist/vega/p-c1fdcb62.js +0 -1
  624. package/dist/vega/p-c78fe943.js +0 -1
  625. package/dist/vega/p-cd078909.entry.js +0 -1
  626. package/dist/vega/p-d5c09a94.entry.js +0 -1
  627. package/dist/vega/p-e1dd23f8.entry.js +0 -1
  628. package/dist/vega/p-e95ed6f3.entry.js +0 -1
  629. package/dist/vega/p-ebb14c84.js +0 -1
  630. package/dist/vega/p-f0a8aed3.entry.js +0 -1
  631. package/dist/vega/p-f2b8abd3.entry.js +0 -1
  632. package/dist/vega/p-fb238751.entry.js +0 -1
  633. package/dist/vega/p-fcabf0dc.js +0 -1
  634. package/style/vega-icons.css +0 -17266
  635. /package/dist/{types/components/vega-rich-text-editor/test/extensions/table/annotation-handler/annotation-handler-registration.test.d.ts → collection/components/vega-rich-text-editor/slimmers/controllers/html-cleaner/html-content-cleaner-processor.interface.js} +0 -0
  636. /package/dist/types/components/vega-rich-text-editor/test/{extensions/table/annotation-handler/table-annotation-handler.test.d.ts → html-cleaner/html-content-cleaner.test.d.ts} +0 -0
  637. /package/dist/types/components/vega-rich-text-editor/test/{extensions/table/annotation-handler/table-head-cell-annotation-handler.test.d.ts → html-cleaner/remove-whitespace-after-opening-tag-processor.test.d.ts} +0 -0
  638. /package/dist/types/components/vega-rich-text-editor/test/{extensions/table/caption-operation.test.d.ts → html-cleaner/remove-whitespace-before-closing-tag-processor.test.d.ts} +0 -0
  639. /package/dist/types/components/vega-rich-text-editor/test/{extensions/table/table-annotation.test.d.ts → html-cleaner/remove-whitespace-between-tags-processor.test.d.ts} +0 -0
@@ -1,2090 +0,0 @@
1
- import { B as BlockAnnotation, f as RTEBlock, M as ModifyContentAction, n as CommonAnnotationTypeEnum, C as CustomAttributeAnnotation, i as RTENode, d as ActionHandleStrategy, j as InsertChildrenBeforeAction, m as RemoveChildrenAction } from './code-block-36393b45.js';
2
- import { c as cleanObject } from './object-66c37948.js';
3
- import { V as VegaInternalThemeManager } from './dark-mode-style-controller-de88a117.js';
4
- import './global-slimmer-registry-17c4efd4.js';
5
- import { I as InjectVegaTelemetrySlimmer, c as createPublicAPIRuntimeMetricsSlimmer, g as generateUUID } from './create-public-api-runtime-metrics-slimmer-bedf3a1e.js';
6
- import { r as rgbToHex } from './ui-bb99c0c2.js';
7
- import { i as isNonNullable } from './type-guard-c65a227d.js';
8
- import { U as UpdateCursorPositionAction, V as VegaRTEContent } from './content-state-e8ef033a.js';
9
-
10
- const ThemeManagerRuntimeMetricsPayloadDefinition = [
11
- {
12
- payloadKey: 'IS_OVERRIDECOLORS_METHOD_CALLED',
13
- payloadDescription: 'Indicate if the method overrideColors of public API ThemeManager is called',
14
- /**
15
- * Indicate whether the method is collected when the method been called .
16
- *
17
- * @param {string} scope - The class name of public api
18
- * @param {string} methodName - The method name called by the public api
19
- * @returns {boolean} A boolean value
20
- */
21
- canAccept: (scope, methodName) => scope === 'ThemeManager' && methodName === 'overrideColors',
22
- /**
23
- * The function checks if the method is be called.
24
- *
25
- * @returns {boolean} A boolean value
26
- */
27
- payloadValue: () => {
28
- return true;
29
- },
30
- },
31
- {
32
- payloadKey: 'IS_RESET_METHOD_CALLED',
33
- payloadDescription: 'Indicate if the method reset of public API ThemeManager is called',
34
- /**
35
- * Indicate whether the method is collected when the method been called .
36
- *
37
- * @param {string} scope - The class name of public api
38
- * @param {string} methodName - The method name called by the public api
39
- * @returns {boolean} A boolean value
40
- */
41
- canAccept: (scope, methodName) => scope === 'ThemeManager' && methodName === 'reset',
42
- /**
43
- * The function checks if the method is be called.
44
- *
45
- * @returns {boolean} A boolean value
46
- */
47
- payloadValue: () => {
48
- return true;
49
- },
50
- },
51
- {
52
- payloadKey: 'IS_TOGGLEDARKMODE_METHOD_CALLED',
53
- payloadDescription: 'Indicate if the method toggleDarkMode of public API ThemeManager is called',
54
- /**
55
- * Indicate whether the method is collected when the method been called .
56
- *
57
- * @param {string} scope - The class name of public api
58
- * @param {string} methodName - The method name called by the public api
59
- * @returns {boolean} A boolean value
60
- */
61
- canAccept: (scope, methodName) => scope === 'ThemeManager' && methodName === 'toggleDarkMode',
62
- /**
63
- * The function checks if the method is be called.
64
- *
65
- * @returns {boolean} A boolean value
66
- */
67
- payloadValue: () => {
68
- return true;
69
- },
70
- },
71
- {
72
- payloadKey: 'IS_ISDARKMODE_METHOD_CALLED',
73
- payloadDescription: 'Indicate if the method isDarkMode of public API ThemeManager is called',
74
- /**
75
- * Indicate whether the method is collected when the method been called .
76
- *
77
- * @param {string} scope - The class name of public api
78
- * @param {string} methodName - The method name called by the public api
79
- * @returns {boolean} A boolean value
80
- */
81
- canAccept: (scope, methodName) => scope === 'ThemeManager' && methodName === 'isDarkMode',
82
- /**
83
- * The function checks if the method is be called.
84
- *
85
- * @returns {boolean} A boolean value
86
- */
87
- payloadValue: () => {
88
- return true;
89
- },
90
- },
91
- {
92
- payloadKey: 'IS_APPLY_BRANDING_METHOD_CALLED',
93
- payloadDescription: 'Indicate if the method applyBranding of public API ThemeManager is called',
94
- /**
95
- * Indicate whether the method is collected when the method been called .
96
- *
97
- * @param {string} scope - The class name of public api
98
- * @param {string} methodName - The method name called by the public api
99
- * @returns {boolean} A boolean value
100
- */
101
- canAccept: (scope, methodName) => scope === 'ThemeManager' && methodName === 'applyBranding',
102
- /**
103
- * The function checks if the method is be called.
104
- *
105
- * @returns {boolean} A boolean value
106
- */
107
- payloadValue: () => {
108
- return true;
109
- },
110
- },
111
- ];
112
-
113
- var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
114
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
115
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
116
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
117
- return c > 3 && r && Object.defineProperty(target, key, r), r;
118
- };
119
- /**
120
- * Vega components theme manager
121
- */
122
- class ThemeManager {
123
- constructor() {
124
- this.vegaPublicAPIRuntimeMetricsSlimmer = createPublicAPIRuntimeMetricsSlimmer(ThemeManager, ['overrideColors', 'reset', 'toggleDarkMode', 'isDarkMode', 'applyBranding'], ThemeManagerRuntimeMetricsPayloadDefinition);
125
- }
126
- /**
127
- * It takes the colors you passed in, parses them into the correct format, and then applies them to the theme
128
- *
129
- * @param {VegaThemeOverrideColors} overrideColors - OverrideColors - This is the object that you pass to the function.
130
- * @vegaVersion 1.20.0
131
- */
132
- async overrideColors(overrideColors) {
133
- void VegaInternalThemeManager.overrideColors(overrideColors);
134
- }
135
- /**
136
- * It removes all the custom override theme styles from the DOM
137
- *
138
- * @vegaVersion 1.20.0
139
- */
140
- async reset() {
141
- void VegaInternalThemeManager.reset();
142
- }
143
- /**
144
- * This function toggles the dark mode of a webpage by adding or removing a 'dark' class to the HTML element.
145
- *
146
- * @param {boolean | undefined} darkMode - A boolean or undefined value that determines whether to enable or disable dark mode.
147
- * If it is true, dark mode is enabled.
148
- * If it is false, dark mode is disabled.
149
- * @vegaVersion 1.32.0
150
- */
151
- toggleDarkMode(darkMode) {
152
- VegaInternalThemeManager.toggleDarkMode(darkMode);
153
- }
154
- /**
155
- * The function checks if the HTML element has a class of "dark" and returns a boolean value accordingly.
156
- *
157
- * @returns {boolean} A boolean value indicating whether the HTML element has a class of "dark", which is
158
- * typically used to indicate that the website is in dark mode.
159
- * @vegaVersion 1.32.0
160
- */
161
- isDarkMode() {
162
- return VegaInternalThemeManager.isDarkMode();
163
- }
164
- /**
165
- * This function switches the Vega theme to a brand theme based on the provided options.
166
- *
167
- * @param {BrandOptions} options - The options includes 'gp', 'genius' and 'heartland' options
168
- * @vegaVersion 2.47.0
169
- */
170
- applyBranding(options) {
171
- VegaInternalThemeManager.applyBranding(options);
172
- }
173
- }
174
- __decorate([
175
- InjectVegaTelemetrySlimmer()
176
- ], ThemeManager.prototype, "vegaPublicAPIRuntimeMetricsSlimmer", void 0);
177
- const VegaThemeManager = new ThemeManager();
178
-
179
- const RTE_TABLE_BORDER_STYLES = [
180
- 'none',
181
- 'solid',
182
- 'dashed',
183
- 'dotted',
184
- 'double',
185
- 'groove',
186
- 'ridge',
187
- 'inset',
188
- 'outset',
189
- ];
190
- const RTE_TABLE_DEFAULT_COLORS = [
191
- { key: 'white', dark: '#04041C', light: '#FCFCFC' },
192
- { key: 'red', dark: '#AA091C', light: '#FF4C61' },
193
- { key: 'orange', dark: '#974502', light: '#FDAB68' },
194
- { key: 'yellow', dark: '#735C00', light: '#FFDC4C' },
195
- { key: 'green', dark: '#2E6D18', light: '#7BDA58' },
196
- { key: 'teal', dark: '#287171', light: '#7BD1D1' },
197
- { key: 'gray', dark: '#595959', light: '#999999' },
198
- { key: 'black', dark: '#FCFCFC', light: '#04041C' },
199
- ];
200
-
201
- /**
202
- * Manages table colors for the rich text editor.
203
- */
204
- class RTETableColorManager {
205
- /**
206
- * Get the list of table colors.
207
- *
208
- * @returns {VegaRTEColorSchema[]} - Array of table colors.
209
- */
210
- static getTableColors() {
211
- return RTETableColorManager.TABLE_COLORS;
212
- }
213
- /**
214
- * Set the list of table colors.
215
- *
216
- * @param {VegaRTEColorSchema[]} colors - Array of table colors.
217
- */
218
- static setTableColors(colors) {
219
- RTETableColorManager.TABLE_COLORS = colors;
220
- }
221
- /**
222
- * Get color key from color value
223
- *
224
- * @param {string} colorValue - color value
225
- * @returns {string} - color key
226
- */
227
- static getColorKey(colorValue) {
228
- var _a;
229
- let result = null;
230
- const tableColors = RTETableColorManager.TABLE_COLORS;
231
- if (tableColors) {
232
- const hexColor = (_a = rgbToHex(colorValue)) === null || _a === void 0 ? void 0 : _a.toUpperCase();
233
- if (hexColor) {
234
- result = tableColors.find((schema) => VegaThemeManager.isDarkMode() ? schema.dark === hexColor : schema.light === hexColor);
235
- }
236
- else {
237
- for (const color of tableColors) {
238
- if (color.key === colorValue) {
239
- result = color;
240
- break;
241
- }
242
- }
243
- }
244
- }
245
- return result ? result.key : '';
246
- }
247
- }
248
- RTETableColorManager.TABLE_COLORS = RTE_TABLE_DEFAULT_COLORS;
249
-
250
- /**
251
- * Class representing a table color annotation in the rich text editor.
252
- */
253
- class RTETableColorAnnotation extends BlockAnnotation {
254
- constructor(colorKey) {
255
- super();
256
- this.type = RTETableExtensionAnnotationTypeEnum.COLOR;
257
- if (colorKey) {
258
- this.color = this.formatColor(colorKey);
259
- }
260
- }
261
- /**
262
- * Render the style for the annotation
263
- *
264
- * @returns {AnnotationStyle} The style object containing the color
265
- */
266
- renderStyle() {
267
- const color = this.color
268
- ? VegaInternalThemeManager.isDarkMode()
269
- ? this.color.dark
270
- : this.color.light
271
- : '';
272
- return { color };
273
- }
274
- /**
275
- * Render the CSS class for the annotation
276
- *
277
- * @returns {Nullable<string>} Always returns null as no CSS class is used
278
- */
279
- renderClass() {
280
- return null;
281
- }
282
- /**
283
- * Convert the annotation to a JSON representation
284
- *
285
- * @returns {Record<string, string>} A JSON object containing the color key
286
- */
287
- toJSON() {
288
- var _a;
289
- return {
290
- color: ((_a = this.color) === null || _a === void 0 ? void 0 : _a.key) || '',
291
- };
292
- }
293
- /**
294
- * Clone the current annotation
295
- *
296
- * @returns {BlockAnnotation<RTETableExtensionAnnotationTypeEnum.COLOR>} A new instance of RTETableColorAnnotation with the same color key
297
- */
298
- clone() {
299
- var _a;
300
- return new RTETableColorAnnotation((_a = this.color) === null || _a === void 0 ? void 0 : _a.key);
301
- }
302
- /**
303
- * format table color
304
- *
305
- * @param {string} colorKey - table color
306
- * @returns {Nullable<VegaRTEColorSchema>} - VegaRTEColorSchema
307
- */
308
- formatColor(colorKey) {
309
- return RTETableColorManager.getTableColors().find((item) => item.key === colorKey);
310
- }
311
- }
312
-
313
- var RTETableExtensionAnnotationTypeEnum;
314
- (function (RTETableExtensionAnnotationTypeEnum) {
315
- RTETableExtensionAnnotationTypeEnum["TABLE"] = "EXTENSION_TABLE";
316
- RTETableExtensionAnnotationTypeEnum["CELL"] = "EXTENSION_TABLE_CELL";
317
- RTETableExtensionAnnotationTypeEnum["CAPTION"] = "EXTENSION_TABLE_CAPTION";
318
- RTETableExtensionAnnotationTypeEnum["COLOR"] = "EXTENSION_TABLE_COLOR";
319
- })(RTETableExtensionAnnotationTypeEnum || (RTETableExtensionAnnotationTypeEnum = {}));
320
- /**
321
- * Class representing a table annotation in the rich text editor.
322
- */
323
- class RTETableAnnotation extends BlockAnnotation {
324
- constructor({ backgroundColor, border, width, height, alignment, borderCollapse } = {}, useInternalStyle = true) {
325
- super();
326
- this.type = RTETableExtensionAnnotationTypeEnum.TABLE;
327
- this.useInternalStyle = useInternalStyle;
328
- this.backgroundColor = backgroundColor;
329
- this.border = border;
330
- this.width = width;
331
- this.height = height;
332
- this.alignment =
333
- useInternalStyle && alignment === undefined ? RTETableAnnotation.DEFAULT_ALIGNMENT : alignment;
334
- this.backgroundColorAnnotation = new RTETableColorAnnotation(backgroundColor);
335
- this.borderColorAnnotation = new RTETableColorAnnotation(border === null || border === void 0 ? void 0 : border.color);
336
- this.borderCollapse =
337
- useInternalStyle && borderCollapse === undefined
338
- ? RTETableAnnotation.DEFAULT_BORDER_COLLAPSE
339
- : borderCollapse;
340
- }
341
- /**
342
- * @inheritDoc
343
- */
344
- static from(value, useInternalStyle = true) {
345
- return [RTETableExtensionAnnotationTypeEnum.TABLE, new RTETableAnnotation(value, useInternalStyle)];
346
- }
347
- /**
348
- * Generates the CSS border string from the border properties.
349
- *
350
- * @returns {Nullable<string>} The CSS border string.
351
- */
352
- get borderStr() {
353
- if (!this.border) {
354
- return null;
355
- }
356
- return `${this.border.style} ${this.border.width} ${this.borderColorAnnotation.renderStyle().color}`.trim();
357
- }
358
- /**
359
- * @inheritDoc
360
- */
361
- clone() {
362
- return new RTETableAnnotation({
363
- backgroundColor: this.backgroundColor,
364
- border: this.border,
365
- width: this.width,
366
- height: this.height,
367
- alignment: this.alignment,
368
- borderCollapse: this.borderCollapse,
369
- }, this.useInternalStyle);
370
- }
371
- /**
372
- * @inheritDoc
373
- */
374
- toJSON() {
375
- return {
376
- table: cleanObject({
377
- backgroundColor: this.backgroundColor,
378
- border: this.border,
379
- width: this.width,
380
- height: this.height,
381
- alignment: this.alignment,
382
- borderCollapse: this.borderCollapse,
383
- }),
384
- };
385
- }
386
- /**
387
- * @inheritDoc
388
- */
389
- renderStyle() {
390
- const backgroundColor = this.backgroundColorAnnotation.renderStyle().color;
391
- const tableStyles = Object.assign({ border: this.borderStr, width: this.width, height: this.height, borderCollapse: this.borderCollapse }, this.renderAlignmentStyle());
392
- backgroundColor && (tableStyles.backgroundColor = backgroundColor);
393
- return cleanObject(tableStyles);
394
- }
395
- /**
396
- * @inheritDoc
397
- */
398
- renderClass() {
399
- return 'v-rte--extension-table';
400
- }
401
- /**
402
- * Generates the alignment styles for the table.
403
- *
404
- * @returns {Record<string, string>} The alignment styles.
405
- */
406
- renderAlignmentStyle() {
407
- if (!this.alignment)
408
- return {};
409
- return {
410
- margin: this.alignment === 'center' ? '0 auto' : this.alignment === 'left' ? '0' : '0 0 0 auto',
411
- };
412
- }
413
- }
414
- RTETableAnnotation.DEFAULT_BORDER_COLLAPSE = 'collapse';
415
- RTETableAnnotation.DEFAULT_ALIGNMENT = 'center';
416
-
417
- /**
418
- * Class representing a table block in the rich text editor.
419
- */
420
- class RTETableBlock extends RTEBlock {
421
- constructor(id, options) {
422
- super(id);
423
- this.type = 'table-block';
424
- this.children = [];
425
- const { autoMatchFormat } = options || { autoMatchFormat: true };
426
- if (autoMatchFormat) {
427
- this.annotationMap.set(RTETableExtensionAnnotationTypeEnum.TABLE, new RTETableAnnotation());
428
- }
429
- }
430
- /**
431
- * @inheritDoc
432
- */
433
- static from(block, options) {
434
- var _a;
435
- const tableBlock = new RTETableBlock(block.id, options);
436
- super.convertAnnotationsToMap(tableBlock.annotationMap, Object.assign({}, block.annotations));
437
- tableBlock.children = super.generateBlockChildren(block.children, options, tableBlock);
438
- if ((_a = block.annotations) === null || _a === void 0 ? void 0 : _a.table) {
439
- tableBlock.annotationMap.set(...RTETableAnnotation.from(block.annotations.table, options === null || options === void 0 ? void 0 : options.autoMatchFormat));
440
- }
441
- return tableBlock;
442
- }
443
- /**
444
- * @inheritDoc
445
- */
446
- clone(parent) {
447
- const clonedBlock = new RTETableBlock(this.id);
448
- clonedBlock.children = this.children.map((child) => child.clone(clonedBlock));
449
- clonedBlock.parent = parent;
450
- clonedBlock.annotationMap = super.cloneAnnotations();
451
- return clonedBlock;
452
- }
453
- /**
454
- * @inheritDoc
455
- */
456
- getLastNode() {
457
- return this.children[this.children.length - 1].getLastNode();
458
- }
459
- /**
460
- * Get the first node of the table block.
461
- *
462
- * @returns {RTENode} The first node of the table block.
463
- */
464
- getFirstNode() {
465
- if (this.hasCaption()) {
466
- return this.children[0].children[0].getLastNode();
467
- }
468
- else {
469
- const childNode = this.children[0].children[0]
470
- .children[0];
471
- return childNode.getLastNode();
472
- }
473
- }
474
- /**
475
- * @inheritDoc
476
- */
477
- isNotEmpty() {
478
- return this.children.length > 0;
479
- }
480
- /**
481
- * @inheritDoc
482
- */
483
- toHtml() {
484
- const childrenHtml = this.children.map((child) => child.toHtml()).join('');
485
- const attrStr = super.generateAttributeString();
486
- return `<table${attrStr}>${childrenHtml}</table>`;
487
- }
488
- /**
489
- * @inheritDoc
490
- */
491
- toJSON() {
492
- return Object.assign(Object.assign({}, super.toJSON()), { type: this.type, children: this.children.map((child) => child.toJSON()) });
493
- }
494
- /**
495
- * Retrieves the caption block from the children collection, if present.
496
- *
497
- * @returns {Nullable<RTETableCaptionBlock>} The caption block or `null`.
498
- */
499
- getCaption() {
500
- const caption = this.children.find((child) => child.type === 'table-caption');
501
- return caption !== null && caption !== void 0 ? caption : null;
502
- }
503
- /**
504
- * Inserts, replaces, or removes the caption block within the children.
505
- *
506
- * @param {Nullable<RTETableCaptionBlock>} caption - The caption block to set, or `null` to remove.
507
- */
508
- setCaption(caption) {
509
- const index = this.children.findIndex((child) => child.type === 'table-caption');
510
- if (!caption) {
511
- if (index >= 0) {
512
- this.children.splice(index, 1);
513
- }
514
- return;
515
- }
516
- caption.parent = this;
517
- if (index >= 0) {
518
- this.children[index] = caption;
519
- }
520
- else {
521
- this.children.unshift(caption);
522
- }
523
- }
524
- /**
525
- * Checks whether the table currently stores a caption block reference.
526
- *
527
- * @returns {boolean} `true` when a caption DTO is attached; otherwise `false`.
528
- */
529
- hasCaption() {
530
- return isNonNullable(this.getCaption());
531
- }
532
- }
533
-
534
- var TableSettingType;
535
- (function (TableSettingType) {
536
- TableSettingType["ROW"] = "ROW";
537
- TableSettingType["CAPTION"] = "CAPTION";
538
- TableSettingType["COLUMN"] = "COLUMN";
539
- TableSettingType["MERGE_CELLS"] = "MERGE_CELLS";
540
- TableSettingType["TABLE"] = "TABLE";
541
- TableSettingType["CELL"] = "CELL";
542
- TableSettingType["SPLIT_CELL"] = "SPLIT_CELL";
543
- })(TableSettingType || (TableSettingType = {}));
544
- /**
545
- * Abstract class for setting event handlers.
546
- */
547
- class SettingEventHandler {
548
- /**
549
- * Applies a cursor update action so the editor focuses on the resolved node.
550
- *
551
- * @param {RTETableBlock} block - Table block currently being toggled.
552
- * @param {Nullable<RTENode>} focusNode - Target node that should receive the caret.
553
- */
554
- syncCursorPosition(block, focusNode) {
555
- const rootContent = this.findRootContent(block);
556
- if (focusNode && rootContent) {
557
- const offset = focusNode.getRangeEndOffset();
558
- rootContent.apply(new UpdateCursorPositionAction(focusNode, offset));
559
- }
560
- }
561
- /**
562
- * Walks up the parent chain to locate the nearest VegaRTEContent root.
563
- *
564
- * @param {RTETableBlock} block - Table block used as the starting point.
565
- * @returns {Nullable<VegaRTEContent>} Content root containing the table, if found.
566
- */
567
- findRootContent(block) {
568
- let currentParent = block.parent;
569
- while (currentParent) {
570
- if (currentParent instanceof VegaRTEContent) {
571
- return currentParent;
572
- }
573
- currentParent = currentParent.parent;
574
- }
575
- }
576
- }
577
-
578
- const DELETE_TABLE_ROW = 'DELETE_TABLE_ROW';
579
- /**
580
- * Action class for deleting a specific table row.
581
- */
582
- class DeleteTableRowAction extends ModifyContentAction {
583
- /**
584
- * Constructs an InsertTableRowAction.
585
- *
586
- * @param {RTETableRowBlock[]} rowsToBeRemoved - The rows to be removed from the table.
587
- */
588
- constructor(rowsToBeRemoved) {
589
- super();
590
- this.isFlushable = true;
591
- this.type = DELETE_TABLE_ROW;
592
- this.rowsToBeRemoved = rowsToBeRemoved;
593
- }
594
- }
595
-
596
- const INSERT_TABLE_ROW = 'INSERT_TABLE_ROW';
597
- var InsertTableRowDirection;
598
- (function (InsertTableRowDirection) {
599
- InsertTableRowDirection["ABOVE"] = "ABOVE";
600
- InsertTableRowDirection["BELOW"] = "BELOW";
601
- })(InsertTableRowDirection || (InsertTableRowDirection = {}));
602
- /**
603
- * Action class for inserting a new row into a table within the rich text editor.
604
- */
605
- class InsertTableRowAction extends ModifyContentAction {
606
- /**
607
- * Constructs an InsertTableRowAction.
608
- *
609
- * @param {InsertTableRowDirection} insertDirection - The direction to insert the new row (above or below the current row).
610
- * @param {RTETableRowBlock[]} selectedRows - The currently selected rows in the table.
611
- */
612
- constructor(insertDirection, selectedRows = []) {
613
- super();
614
- this.isFlushable = true;
615
- this.type = INSERT_TABLE_ROW;
616
- this.selectedRows = [];
617
- this.insertDirection = insertDirection;
618
- this.selectedRows = selectedRows;
619
- }
620
- }
621
-
622
- const TOGGLE_HEADER_ROW = 'TOGGLE_HEADER_ROW';
623
- /**
624
- * Action to convert selected rows to header rows or revert them back to normal rows.
625
- */
626
- class ToggleHeaderRowAction extends ModifyContentAction {
627
- constructor(selectedRows) {
628
- super();
629
- this.isFlushable = true;
630
- this.type = TOGGLE_HEADER_ROW;
631
- this.selectedRows = selectedRows;
632
- }
633
- }
634
-
635
- /**
636
- * Class representing a table row block in the rich text editor.
637
- */
638
- class RTETableRowBlock extends RTEBlock {
639
- constructor(id) {
640
- super(id);
641
- this.type = 'table-row';
642
- this.children = [];
643
- }
644
- /**
645
- * @inheritDoc
646
- */
647
- static from(block, options) {
648
- const rowBlock = new RTETableRowBlock(block.id);
649
- super.convertAnnotationsToMap(rowBlock.annotationMap, Object.assign({}, block.annotations));
650
- rowBlock.children = super.generateBlockChildren(block.children, options, rowBlock);
651
- return rowBlock;
652
- }
653
- /**
654
- * @inheritDoc
655
- */
656
- clone(parent) {
657
- const clonedBlock = new RTETableRowBlock(this.id);
658
- clonedBlock.children = this.children.map((child) => child.clone(clonedBlock));
659
- clonedBlock.parent = parent;
660
- clonedBlock.annotationMap = super.cloneAnnotations();
661
- return clonedBlock;
662
- }
663
- /**
664
- * @inheritDoc
665
- */
666
- getLastNode() {
667
- return this.children[this.children.length - 1].getLastNode();
668
- }
669
- /**
670
- * @inheritDoc
671
- */
672
- isNotEmpty() {
673
- return this.children.length > 0;
674
- }
675
- /**
676
- * @inheritDoc
677
- */
678
- toHtml() {
679
- const childrenHtml = this.children
680
- .map((child) => {
681
- return child.toHtml();
682
- })
683
- .join('');
684
- const attrStr = super.generateAttributeString();
685
- return `<tr${attrStr}>${childrenHtml}</tr>`;
686
- }
687
- /**
688
- * @inheritDoc
689
- */
690
- toJSON() {
691
- return Object.assign(Object.assign({}, super.toJSON()), { type: this.type, children: this.children.map((child) => child.toJSON()) });
692
- }
693
- }
694
-
695
- /**
696
- * Class representing a table body block in the rich text editor.
697
- */
698
- class RTETableBodyBlock extends RTEBlock {
699
- constructor(id) {
700
- super(id);
701
- this.type = 'table-body';
702
- this.children = [];
703
- }
704
- /**
705
- * @inheritDoc
706
- */
707
- static from(block, options) {
708
- const tableBodyBlock = new RTETableBodyBlock(block.id);
709
- super.convertAnnotationsToMap(tableBodyBlock.annotationMap, Object.assign({}, block.annotations));
710
- tableBodyBlock.children = super.generateBlockChildren(block.children, options, tableBodyBlock);
711
- return tableBodyBlock;
712
- }
713
- /**
714
- * @inheritDoc
715
- */
716
- clone(parent) {
717
- const clonedBlock = new RTETableBodyBlock(this.id);
718
- clonedBlock.children = this.children.map((child) => child.clone(clonedBlock));
719
- clonedBlock.parent = parent;
720
- clonedBlock.annotationMap = super.cloneAnnotations();
721
- return clonedBlock;
722
- }
723
- /**
724
- * @inheritDoc
725
- */
726
- getLastNode() {
727
- return this.children[this.children.length - 1].getLastNode();
728
- }
729
- /**
730
- * @inheritDoc
731
- */
732
- isNotEmpty() {
733
- return this.children.length > 0;
734
- }
735
- /**
736
- * @inheritDoc
737
- */
738
- toHtml() {
739
- const childrenHtml = this.children.map((child) => child.toHtml()).join('');
740
- const attrStr = super.generateAttributeString();
741
- return `<tbody${attrStr}>${childrenHtml}</tbody>`;
742
- }
743
- /**
744
- * @inheritDoc
745
- */
746
- toJSON() {
747
- return Object.assign(Object.assign({}, super.toJSON()), { type: this.type, children: this.children.map((child) => child.toJSON()) });
748
- }
749
- }
750
-
751
- /**
752
- * Class representing a table cell annotation in the rich text editor.
753
- */
754
- class RTETableCellAnnotation extends BlockAnnotation {
755
- constructor({ backgroundColor, padding, border, width, height, textAlign, verticalAlign, minWidth, boxSizing, } = {}, useInternalStyle = true) {
756
- super();
757
- this.type = RTETableExtensionAnnotationTypeEnum.CELL;
758
- this.useInternalStyle = useInternalStyle;
759
- this.backgroundColor = backgroundColor;
760
- this.width = width;
761
- this.height = height;
762
- this.backgroundColorAnnotation = new RTETableColorAnnotation(backgroundColor);
763
- this.borderColorAnnotation = new RTETableColorAnnotation(border === null || border === void 0 ? void 0 : border.color);
764
- this.padding =
765
- useInternalStyle && padding === undefined ? RTETableCellAnnotation.DEFAULT_PADDING : padding;
766
- this.border =
767
- useInternalStyle && border === undefined ? RTETableCellAnnotation.DEFAULT_BORDER : border;
768
- this.textAlign =
769
- useInternalStyle && textAlign === undefined
770
- ? RTETableCellAnnotation.DEFAULT_HORIZONTAL_TEXT_ALIGN
771
- : textAlign;
772
- this.verticalAlign =
773
- useInternalStyle && verticalAlign === undefined
774
- ? RTETableCellAnnotation.DEFAULT_VERTICAL_TEXT_ALIGN
775
- : verticalAlign;
776
- this.minWidth =
777
- useInternalStyle && minWidth === undefined
778
- ? RTETableCellAnnotation.DEFAULT_CELL_MIN_WIDTH
779
- : minWidth;
780
- this.boxSizing =
781
- useInternalStyle && boxSizing === undefined
782
- ? RTETableCellAnnotation.DEFAULT_BOX_SIZING
783
- : boxSizing;
784
- }
785
- /**
786
- * @inheritDoc
787
- */
788
- static from(cellAnnotation, useInternalStyle) {
789
- return [
790
- RTETableExtensionAnnotationTypeEnum.CELL,
791
- new RTETableCellAnnotation(cellAnnotation, useInternalStyle),
792
- ];
793
- }
794
- /**
795
- * Generates the CSS border string from the border properties.
796
- *
797
- * @returns {Nullable<string>} The CSS border string.
798
- */
799
- get borderStr() {
800
- if (!this.border)
801
- return null;
802
- return `${this.border.style} ${this.border.width} ${this.borderColorAnnotation.renderStyle().color ||
803
- RTETableCellAnnotation.DEFAULT_BORDER.color}`;
804
- }
805
- /**
806
- * @inheritDoc
807
- */
808
- clone() {
809
- return new RTETableCellAnnotation({
810
- backgroundColor: this.backgroundColor,
811
- padding: this.padding,
812
- border: this.border,
813
- width: this.width,
814
- height: this.height,
815
- textAlign: this.textAlign,
816
- verticalAlign: this.verticalAlign,
817
- minWidth: this.minWidth,
818
- boxSizing: this.boxSizing,
819
- }, this.useInternalStyle);
820
- }
821
- /**
822
- * @inheritDoc
823
- */
824
- toJSON() {
825
- return {
826
- tableCell: cleanObject({
827
- backgroundColor: this.backgroundColor,
828
- padding: this.padding,
829
- border: this.border,
830
- width: this.width,
831
- height: this.height,
832
- textAlign: this.textAlign,
833
- verticalAlign: this.verticalAlign,
834
- minWidth: this.minWidth,
835
- boxSizing: this.boxSizing,
836
- }),
837
- };
838
- }
839
- /**
840
- * @inheritDoc
841
- */
842
- renderStyle(options) {
843
- const backgroundColor = this.backgroundColorAnnotation.renderStyle().color;
844
- const style = {
845
- padding: this.padding,
846
- border: this.borderStr,
847
- width: this.width,
848
- height: this.height,
849
- textAlign: this.textAlign,
850
- verticalAlign: this.verticalAlign,
851
- minWidth: this.minWidth,
852
- boxSizing: this.boxSizing,
853
- };
854
- if (backgroundColor) {
855
- style.backgroundColor = backgroundColor;
856
- }
857
- if (!(options === null || options === void 0 ? void 0 : options.standalone)) {
858
- return cleanObject(this.removeDefaultValues(style));
859
- }
860
- return cleanObject(style);
861
- }
862
- /**
863
- * @inheritDoc
864
- */
865
- renderClass() {
866
- return null;
867
- }
868
- /**
869
- * Removes default values from the style object to avoid redundancy.
870
- *
871
- * @param {Record<string, Nullable<string>>} style - The style object to clean.
872
- * @returns {Record<string, Nullable<string>>} The cleaned style object.
873
- */
874
- removeDefaultValues(style) {
875
- const cleanedStyle = Object.assign({}, style);
876
- if (cleanedStyle.padding === RTETableCellAnnotation.DEFAULT_PADDING) {
877
- delete cleanedStyle.padding;
878
- }
879
- if (cleanedStyle.border ===
880
- `${RTETableCellAnnotation.DEFAULT_BORDER.style} ${RTETableCellAnnotation.DEFAULT_BORDER.width} ${RTETableCellAnnotation.DEFAULT_BORDER.color}`) {
881
- delete cleanedStyle.border;
882
- }
883
- if (cleanedStyle.textAlign === RTETableCellAnnotation.DEFAULT_HORIZONTAL_TEXT_ALIGN) {
884
- delete cleanedStyle.textAlign;
885
- }
886
- if (cleanedStyle.verticalAlign === RTETableCellAnnotation.DEFAULT_VERTICAL_TEXT_ALIGN) {
887
- delete cleanedStyle.verticalAlign;
888
- }
889
- if (cleanedStyle.minWidth === RTETableCellAnnotation.DEFAULT_CELL_MIN_WIDTH) {
890
- delete cleanedStyle.minWidth;
891
- }
892
- if (cleanedStyle.boxSizing === RTETableCellAnnotation.DEFAULT_BOX_SIZING) {
893
- delete cleanedStyle.boxSizing;
894
- }
895
- return cleanedStyle;
896
- }
897
- }
898
- RTETableCellAnnotation.DEFAULT_PADDING = '12px';
899
- RTETableCellAnnotation.DEFAULT_BORDER = {
900
- style: 'solid',
901
- width: '1px',
902
- color: '#ddd',
903
- };
904
- RTETableCellAnnotation.DEFAULT_HORIZONTAL_TEXT_ALIGN = 'left';
905
- RTETableCellAnnotation.DEFAULT_VERTICAL_TEXT_ALIGN = 'middle';
906
- RTETableCellAnnotation.DEFAULT_CELL_MIN_WIDTH = '55px';
907
- RTETableCellAnnotation.DEFAULT_BOX_SIZING = 'border-box';
908
-
909
- /**
910
- * Class representing a table cell block in the rich text editor.
911
- */
912
- class RTETableCellBlock extends RTEBlock {
913
- constructor(id, options) {
914
- super(id);
915
- this.type = 'table-cell';
916
- this.children = [];
917
- const { autoMatchFormat } = options || { autoMatchFormat: true };
918
- if (autoMatchFormat) {
919
- this.annotationMap.set(RTETableExtensionAnnotationTypeEnum.CELL, new RTETableCellAnnotation());
920
- }
921
- }
922
- /**
923
- * @inheritDoc
924
- */
925
- static from(block, options) {
926
- var _a;
927
- const tableCellBlock = new RTETableCellBlock(block.id, options);
928
- super.convertAnnotationsToMap(tableCellBlock.annotationMap, Object.assign({}, block.annotations));
929
- if ((_a = block.annotations) === null || _a === void 0 ? void 0 : _a.tableCell) {
930
- tableCellBlock.annotationMap.set(...RTETableCellAnnotation.from(block.annotations.tableCell, options === null || options === void 0 ? void 0 : options.autoMatchFormat));
931
- }
932
- tableCellBlock.children = super.generateBlockChildren(block.children, options, tableCellBlock);
933
- return tableCellBlock;
934
- }
935
- /**
936
- * @inheritDoc
937
- */
938
- clone(parent) {
939
- const clonedBlock = new RTETableCellBlock(this.id);
940
- clonedBlock.children = this.children.map((child) => child.clone(clonedBlock));
941
- clonedBlock.parent = parent;
942
- clonedBlock.annotationMap = super.cloneAnnotations();
943
- return clonedBlock;
944
- }
945
- /**
946
- * @inheritDoc
947
- */
948
- getLastNode() {
949
- return this.children[this.children.length - 1].getLastNode();
950
- }
951
- /**
952
- * @inheritDoc
953
- */
954
- isNotEmpty() {
955
- return this.children.length > 0;
956
- }
957
- /**
958
- * Get the rowSpan of the table cell
959
- *
960
- * @returns {number} - rowSpan value
961
- */
962
- get rowSpan() {
963
- const rowSpan = this.getCustomAttributeByName('rowspan');
964
- return !isNaN(Number(rowSpan)) ? Math.max(Number(rowSpan), 1) : 1;
965
- }
966
- /**
967
- * Get the colSpan of the table cell
968
- *
969
- * @returns {number} - colSpan value
970
- */
971
- get colSpan() {
972
- const colSpan = this.getCustomAttributeByName('colspan');
973
- return !isNaN(Number(colSpan)) ? Math.max(Number(colSpan), 1) : 1;
974
- }
975
- /**
976
- * @inheritDoc
977
- */
978
- toHtml() {
979
- const childrenHtml = this.children.map((child) => child.toHtml()).join('');
980
- const attrStr = super.generateAttributeString();
981
- return `<td${attrStr}>${childrenHtml}</td>`;
982
- }
983
- /**
984
- * @inheritDoc
985
- */
986
- toJSON() {
987
- return Object.assign(Object.assign({}, super.toJSON()), { type: this.type, children: this.children.map((child) => child.toJSON()) });
988
- }
989
- /**
990
- * Get custom attribute by name
991
- *
992
- * @param {string} attrName - attribute name
993
- * @returns {Nullable<string>} - attribute value
994
- */
995
- getCustomAttributeByName(attrName) {
996
- const customAttrAnnotation = this.getCustomAttributesAnnotation();
997
- if (customAttrAnnotation) {
998
- const customAttributes = customAttrAnnotation.toJSON()['customAttribute'] || {};
999
- return customAttributes[attrName];
1000
- }
1001
- }
1002
- }
1003
-
1004
- /**
1005
- * Class representing a table head block in the rich text editor.
1006
- */
1007
- class RTETableHeadBlock extends RTEBlock {
1008
- constructor(id) {
1009
- super(id);
1010
- this.type = 'table-head';
1011
- this.children = [];
1012
- }
1013
- /**
1014
- * @inheritDoc
1015
- */
1016
- static from(block, options) {
1017
- const headBlock = new RTETableHeadBlock(block.id);
1018
- super.convertAnnotationsToMap(headBlock.annotationMap, Object.assign({}, block.annotations));
1019
- headBlock.children = super.generateBlockChildren(block.children, options, headBlock);
1020
- return headBlock;
1021
- }
1022
- /**
1023
- * @inheritDoc
1024
- */
1025
- clone(parent) {
1026
- const clonedBlock = new RTETableHeadBlock(this.id);
1027
- clonedBlock.children = this.children.map((child) => child.clone(clonedBlock));
1028
- clonedBlock.parent = parent;
1029
- clonedBlock.annotationMap = super.cloneAnnotations();
1030
- return clonedBlock;
1031
- }
1032
- /**
1033
- * @inheritDoc
1034
- */
1035
- getLastNode() {
1036
- return this.children[this.children.length - 1].getLastNode();
1037
- }
1038
- /**
1039
- * @inheritDoc
1040
- */
1041
- isNotEmpty() {
1042
- return this.children.length > 0;
1043
- }
1044
- /**
1045
- * @inheritDoc
1046
- */
1047
- toHtml() {
1048
- const childrenHtml = this.children
1049
- .map((child) => {
1050
- return child.toHtml();
1051
- })
1052
- .join('');
1053
- const attrStr = super.generateAttributeString();
1054
- return `<thead${attrStr}>${childrenHtml}</thead>`;
1055
- }
1056
- /**
1057
- * @inheritDoc
1058
- */
1059
- toJSON() {
1060
- return Object.assign(Object.assign({}, super.toJSON()), { type: this.type, children: this.children.map((child) => child.toJSON()) });
1061
- }
1062
- }
1063
-
1064
- /**
1065
- * Class representing a table head cell annotation in the rich text editor.
1066
- */
1067
- class RTETableHeadCellAnnotation extends RTETableCellAnnotation {
1068
- constructor(annotation = {}, useInternalStyle = true) {
1069
- super(annotation, useInternalStyle);
1070
- }
1071
- /**
1072
- * @inheritDoc
1073
- */
1074
- static from(cellAnnotation, useInternalStyle) {
1075
- return [
1076
- RTETableExtensionAnnotationTypeEnum.CELL,
1077
- new RTETableHeadCellAnnotation(cellAnnotation, useInternalStyle),
1078
- ];
1079
- }
1080
- /**
1081
- * @inheritDoc
1082
- */
1083
- clone() {
1084
- return new RTETableHeadCellAnnotation({
1085
- backgroundColor: this.backgroundColor,
1086
- padding: this.padding,
1087
- border: this.border,
1088
- width: this.width,
1089
- height: this.height,
1090
- textAlign: this.textAlign,
1091
- verticalAlign: this.verticalAlign,
1092
- minWidth: this.minWidth,
1093
- boxSizing: this.boxSizing,
1094
- }, this.useInternalStyle);
1095
- }
1096
- /**
1097
- * @inheritDoc
1098
- */
1099
- renderStyle(options) {
1100
- var _a;
1101
- const styles = super.renderStyle(options);
1102
- return cleanObject(Object.assign(Object.assign({}, styles), { backgroundColor: (_a = styles.backgroundColor) !== null && _a !== void 0 ? _a : RTETableHeadCellAnnotation.DEFAULT_BACKGROUND_COLOR }));
1103
- }
1104
- }
1105
- RTETableHeadCellAnnotation.DEFAULT_BACKGROUND_COLOR = '#f2f2f2';
1106
-
1107
- /**
1108
- * Class representing a table head block in the rich text editor.
1109
- */
1110
- class RTETableHeadCellBlock extends RTETableCellBlock {
1111
- constructor(id, options) {
1112
- super(id, options);
1113
- this.type = 'table-head-cell';
1114
- const { autoMatchFormat } = options || { autoMatchFormat: true };
1115
- if (autoMatchFormat) {
1116
- this.annotationMap.set(RTETableExtensionAnnotationTypeEnum.CELL, new RTETableHeadCellAnnotation());
1117
- }
1118
- }
1119
- /**
1120
- * @inheritDoc
1121
- */
1122
- static from(block, options) {
1123
- var _a;
1124
- const headCellBlock = new RTETableHeadCellBlock(block.id, options);
1125
- super.convertAnnotationsToMap(headCellBlock.annotationMap, Object.assign({}, block.annotations));
1126
- if ((_a = block.annotations) === null || _a === void 0 ? void 0 : _a.tableCell) {
1127
- headCellBlock.annotationMap.set(...RTETableHeadCellAnnotation.from(block.annotations.tableCell, options === null || options === void 0 ? void 0 : options.autoMatchFormat));
1128
- }
1129
- headCellBlock.children = super.generateBlockChildren(block.children, options, headCellBlock);
1130
- return headCellBlock;
1131
- }
1132
- /**
1133
- * @inheritDoc
1134
- */
1135
- clone(parent) {
1136
- const clonedBlock = new RTETableHeadCellBlock(this.id);
1137
- clonedBlock.children = this.children.map((child) => child.clone(clonedBlock));
1138
- clonedBlock.parent = parent;
1139
- clonedBlock.annotationMap = super.cloneAnnotations();
1140
- return clonedBlock;
1141
- }
1142
- /**
1143
- * @inheritDoc
1144
- */
1145
- toHtml() {
1146
- const childrenHtml = this.children.map((child) => child.toHtml()).join('');
1147
- const attrStr = super.generateAttributeString();
1148
- return `<th${attrStr}>${childrenHtml}</th>`;
1149
- }
1150
- /**
1151
- * @inheritDoc
1152
- */
1153
- toJSON() {
1154
- return Object.assign(Object.assign({}, super.toJSON()), { type: this.type, children: this.children.map((child) => child.toJSON()) });
1155
- }
1156
- }
1157
-
1158
- const MERGE_CELLS = 'MERGE_CELLS';
1159
- /**
1160
- * Action to merge cells into the RTETable.
1161
- */
1162
- class MergeCellsAction extends ModifyContentAction {
1163
- constructor(targetCell, mergeCells, colSpan, rowSpan, direction) {
1164
- super();
1165
- this.type = MERGE_CELLS;
1166
- this.isFlushable = true;
1167
- this.targetCell = targetCell;
1168
- this.mergeCells = mergeCells;
1169
- this.colSpan = colSpan;
1170
- this.rowSpan = rowSpan;
1171
- this.direction = direction;
1172
- }
1173
- }
1174
-
1175
- var MergeCellsOperationType;
1176
- (function (MergeCellsOperationType) {
1177
- MergeCellsOperationType["MERGE_CELLS"] = "MERGE_CELLS";
1178
- MergeCellsOperationType["MERGE_CELL_UP"] = "MERGE_CELL_UP";
1179
- MergeCellsOperationType["MERGE_CELL_RIGHT"] = "MERGE_CELL_RIGHT";
1180
- MergeCellsOperationType["MERGE_CELL_DOWN"] = "MERGE_CELL_DOWN";
1181
- MergeCellsOperationType["MERGE_CELL_LEFT"] = "MERGE_CELL_LEFT";
1182
- })(MergeCellsOperationType || (MergeCellsOperationType = {}));
1183
- /**
1184
- * Event handler for merge cells operations in a table.
1185
- */
1186
- class MergeCellsOperationEventHandler extends SettingEventHandler {
1187
- /**
1188
- * @inheritDoc
1189
- */
1190
- canHandle(action) {
1191
- return action[0] === TableSettingType.MERGE_CELLS;
1192
- }
1193
- /**
1194
- * @inheritDoc
1195
- */
1196
- execute(action, extensionContext) {
1197
- const selectedCells = extensionContext.tableSelection.getSelectedCells();
1198
- const operation = action[1];
1199
- switch (operation) {
1200
- case MergeCellsOperationType.MERGE_CELL_UP:
1201
- case MergeCellsOperationType.MERGE_CELL_RIGHT:
1202
- case MergeCellsOperationType.MERGE_CELL_DOWN:
1203
- case MergeCellsOperationType.MERGE_CELL_LEFT:
1204
- {
1205
- const mergeCells = this.getDirectionMergeCells(operation, selectedCells[0]);
1206
- this.handleMergeCells(mergeCells, operation);
1207
- }
1208
- break;
1209
- default:
1210
- {
1211
- if (selectedCells.length > 1) {
1212
- this.handleMergeCells(selectedCells, MergeCellsOperationType.MERGE_CELLS);
1213
- }
1214
- }
1215
- break;
1216
- }
1217
- }
1218
- /**
1219
- * Get the adjacent cell in the specified direction.
1220
- *
1221
- * @param {MergeCellsOperationType} direction - The direction to look for the adjacent cell.
1222
- * @param {RTETableCellBlock | RTETableHeadCellBlock} cell - The current cell.
1223
- * @returns {Array<RTETableCellBlock | RTETableHeadCellBlock>} Array containing the cells to merge.
1224
- */
1225
- getDirectionMergeCells(direction, cell) {
1226
- const adjacent = getAdjacentCell(cell, direction);
1227
- if (!adjacent) {
1228
- return [cell];
1229
- }
1230
- switch (direction) {
1231
- case MergeCellsOperationType.MERGE_CELL_UP:
1232
- return [adjacent, cell];
1233
- case MergeCellsOperationType.MERGE_CELL_DOWN:
1234
- return [cell, adjacent];
1235
- case MergeCellsOperationType.MERGE_CELL_LEFT:
1236
- return [adjacent, cell];
1237
- default:
1238
- return [cell, adjacent];
1239
- }
1240
- }
1241
- /**
1242
- * Handle the merge cells operation by creating and applying a MergeCellsAction.
1243
- *
1244
- * @param {Array<RTETableCellBlock | RTETableHeadCellBlock>} mergeCells - The cells to merge.
1245
- * @param {MergeCellsOperationType} direction - The merge cell direction.
1246
- */
1247
- handleMergeCells(mergeCells, direction) {
1248
- if (mergeCells.length < 2) {
1249
- return;
1250
- }
1251
- const rectInfo = getRectangularBounds(mergeCells);
1252
- const { minRow, maxRow, minCol, maxCol, targetCell } = rectInfo;
1253
- const colSpan = maxCol - minCol + 1;
1254
- const rowSpan = maxRow - minRow + 1;
1255
- const action = new MergeCellsAction(targetCell, mergeCells, colSpan, rowSpan, direction);
1256
- this.applyActionOnTable(action, targetCell);
1257
- }
1258
- /**
1259
- * Apply the specified action on the table containing the selected cell.
1260
- *
1261
- * @param {MergeCellsAction} action - The action to apply.
1262
- * @param {RTETableCellBlock | RTETableHeadCellBlock} selectedCell - The selected table cell.
1263
- */
1264
- applyActionOnTable(action, selectedCell) {
1265
- const table = getParentBlockByType(selectedCell, RTETableBlock);
1266
- if (table) {
1267
- table.apply(action);
1268
- }
1269
- }
1270
- }
1271
-
1272
- /**
1273
- * Recursively searches for a parent block of a specific type.
1274
- *
1275
- * @typedef T - Generic type extending RTEBlock.
1276
- * @param {RTEBlock} block - The starting block to search from.
1277
- * @param {ClassType<unknown>} dtoClass - The class type to match the parent block against.
1278
- * @returns {T | null} - The found parent block of the specified type, or null if not found.
1279
- */
1280
- function getParentBlockByType(block, dtoClass) {
1281
- if (block) {
1282
- if (block instanceof dtoClass) {
1283
- return block;
1284
- }
1285
- else {
1286
- return getParentBlockByType(block.parent, dtoClass);
1287
- }
1288
- }
1289
- return null;
1290
- }
1291
- /**
1292
- * Generate the table body with the specified number of rows and columns.
1293
- *
1294
- * @param {number} rowCount - The number of rows in the table body.
1295
- * @param {number} columnCount - The number of columns in the table body.
1296
- * @returns {VegaRTETableBodyBlock} The generated table body block.
1297
- */
1298
- function generateTableBody(rowCount, columnCount) {
1299
- return {
1300
- id: generateUUID(),
1301
- type: 'table-body',
1302
- children: Array.from({ length: rowCount }, () => generateTableRow(columnCount)),
1303
- };
1304
- }
1305
- /**
1306
- * Create a table row block with the specified number of columns and cell type.
1307
- *
1308
- * @param {number} columnCount - The number of columns in the row.
1309
- * @returns {VegaRTETableRowBlock} The created table row block.
1310
- */
1311
- function generateTableRow(columnCount) {
1312
- return {
1313
- id: generateUUID(),
1314
- type: 'table-row',
1315
- children: Array.from({ length: columnCount }, () => getDefaultCellBlockTemplate('table-cell')),
1316
- };
1317
- }
1318
- /**
1319
- * Get all table rows from a table block (including rows from all table bodies and headers).
1320
- *
1321
- * @param {RTETableBlock} tableBlock - The table block.
1322
- * @returns {RTETableRowBlock[]} Array of all table row blocks.
1323
- */
1324
- function getAllTableRows(tableBlock) {
1325
- return tableBlock.children
1326
- .filter((child) => child instanceof RTETableBodyBlock || child instanceof RTETableHeadBlock)
1327
- .flatMap((body) => body.children);
1328
- }
1329
- /**
1330
- * Find the first node within a block recursively.
1331
- *
1332
- * @param {Nullable<RTEBlock>} block - The block to find the first node in.
1333
- * @returns {Nullable<RTENode>} The focusable node within the block.
1334
- */
1335
- function getFirstNode(block) {
1336
- if (!block || !block.children || !block.children[0])
1337
- return null;
1338
- const firstNode = block.children[0];
1339
- if (firstNode instanceof RTENode) {
1340
- return firstNode;
1341
- }
1342
- return getFirstNode(firstNode);
1343
- }
1344
- /**
1345
- * Get the default cell block template.
1346
- *
1347
- * @param {string} cellType - The type of the cell block.
1348
- * @returns {VegaRTETableCellBlock} The default cell block template.
1349
- */
1350
- function getDefaultCellBlockTemplate(cellType) {
1351
- const id = generateUUID();
1352
- return {
1353
- id,
1354
- type: cellType,
1355
- children: [
1356
- {
1357
- id: `${id}-p`,
1358
- type: 'paragraph',
1359
- nodes: [
1360
- {
1361
- id: `${id}-p-t`,
1362
- type: 'text',
1363
- text: '',
1364
- },
1365
- ],
1366
- },
1367
- ],
1368
- };
1369
- }
1370
- /**
1371
- * Get the actual col span and row span of a cell.
1372
- *
1373
- * @param {RTETableCellBlock | RTETableHeadCellBlock} cell - The cell to check.
1374
- * @returns {CellSpan} The actual span values.
1375
- */
1376
- function getCellSpan(cell) {
1377
- return { colSpan: cell.colSpan, rowSpan: cell.rowSpan };
1378
- }
1379
- /**
1380
- * Get the actual column position of a cell considering previous cells' colspan
1381
- * and cells from previous rows with rowspan that extend into the current row.
1382
- *
1383
- * @param {RTETableCellBlock | RTETableHeadCellBlock} cell - The cell to check.
1384
- * @param {RTETableRowBlock[]} allRows - The table all rows.
1385
- * @returns {number} The actual column position.
1386
- */
1387
- function getActualColumnPosition(cell, allRows) {
1388
- const tableGrid = buildTableGrid(allRows);
1389
- for (let row = 0; row < tableGrid.length; row++) {
1390
- const cols = tableGrid[row];
1391
- for (let col = 0; col < cols.length; col++) {
1392
- if (cols[col] === cell.id) {
1393
- return col;
1394
- }
1395
- }
1396
- }
1397
- return -1;
1398
- }
1399
- /**
1400
- * Build a 2D grid representation of a table section where each occupied position
1401
- * contains the cell id covering that (row, col) coordinate, accounting for colSpan/rowSpan.
1402
- *
1403
- * @param {RTETableRowBlock[]} allRows - All rows in the current table section.
1404
- * @returns {string[][]} The table grid.
1405
- */
1406
- function buildTableGrid(allRows) {
1407
- const grid = [];
1408
- allRows.forEach((row, rowIndex) => {
1409
- if (!grid[rowIndex]) {
1410
- grid[rowIndex] = [];
1411
- }
1412
- let colIndex = 0;
1413
- row.children.forEach((cell) => {
1414
- const { colSpan, rowSpan } = getCellSpan(cell);
1415
- while (grid[rowIndex][colIndex] !== undefined) {
1416
- colIndex++;
1417
- }
1418
- for (let r = 0; r < rowSpan; r++) {
1419
- for (let c = 0; c < colSpan; c++) {
1420
- if (!grid[rowIndex + r]) {
1421
- grid[rowIndex + r] = [];
1422
- }
1423
- grid[rowIndex + r][colIndex + c] = cell.id;
1424
- }
1425
- }
1426
- colIndex += colSpan;
1427
- });
1428
- });
1429
- return grid;
1430
- }
1431
- /**
1432
- * Get the adjacent cell in the specified direction based on the table matrix.
1433
- *
1434
- * @param {RTETableCellBlock | RTETableHeadCellBlock} cell - The current cell.
1435
- * @param {AdjacentCellDirection} direction - The direction to locate the adjacent cell.
1436
- * @returns {RTETableCellBlock | RTETableHeadCellBlock | null} The adjacent cell or null.
1437
- */
1438
- function getAdjacentCell(cell, direction) {
1439
- if (!cell) {
1440
- return null;
1441
- }
1442
- const row = cell.parent;
1443
- const sectionRows = row.parent.children;
1444
- const rowIndex = sectionRows.indexOf(row);
1445
- const { colSpan, rowSpan } = getCellSpan(cell);
1446
- const cellColPosition = getActualColumnPosition(cell, sectionRows);
1447
- let targetRowIndex = rowIndex;
1448
- let targetColPosition = cellColPosition;
1449
- switch (direction) {
1450
- case MergeCellsOperationType.MERGE_CELL_LEFT:
1451
- targetColPosition = cellColPosition - 1;
1452
- break;
1453
- case MergeCellsOperationType.MERGE_CELL_RIGHT:
1454
- targetColPosition = cellColPosition + colSpan;
1455
- break;
1456
- case MergeCellsOperationType.MERGE_CELL_UP:
1457
- targetRowIndex = rowIndex - 1;
1458
- break;
1459
- default:
1460
- targetRowIndex = rowIndex + rowSpan;
1461
- break;
1462
- }
1463
- return findCellAtPosition(sectionRows, targetRowIndex, targetColPosition);
1464
- }
1465
- /**
1466
- * Find the cell that covers the specified matrix position.
1467
- *
1468
- * @param {RTETableRowBlock[]} rows - Rows in the current table section.
1469
- * @param {number} targetRowIndex - Target matrix row index.
1470
- * @param {number} targetColPosition - Target matrix column position.
1471
- * @returns {RTETableCellBlock | RTETableHeadCellBlock | null} The covering cell or null.
1472
- */
1473
- function findCellAtPosition(rows, targetRowIndex, targetColPosition) {
1474
- for (let r = 0; r < rows.length; r++) {
1475
- const currentRow = rows[r];
1476
- for (const candidate of currentRow.children) {
1477
- const { colSpan, rowSpan } = getCellSpan(candidate);
1478
- const candidateColPosition = getActualColumnPosition(candidate, rows);
1479
- const candidateRowStart = r;
1480
- const candidateRowEnd = r + rowSpan - 1;
1481
- const candidateColEnd = candidateColPosition + colSpan - 1;
1482
- const isSameMatrixRow = targetRowIndex >= candidateRowStart && targetRowIndex <= candidateRowEnd;
1483
- const isTargetColumnCovered = targetColPosition >= candidateColPosition && targetColPosition <= candidateColEnd;
1484
- if (isSameMatrixRow && isTargetColumnCovered) {
1485
- return candidate;
1486
- }
1487
- }
1488
- }
1489
- return null;
1490
- }
1491
- /**
1492
- * Get the rectangular bounds of selected cells.
1493
- * Calculates the bounding box (minRow, maxRow, minCol, maxCol) and returns related information.
1494
- *
1495
- * @param {RTETableCellBlock[] | RTETableHeadCellBlock[]} selectedCells - The selected table cells.
1496
- * @returns {RectangularBounds} The rectangular bounds' information.
1497
- */
1498
- function getRectangularBounds(selectedCells) {
1499
- const firstCell = selectedCells[0];
1500
- const firstRow = firstCell.parent;
1501
- const table = firstRow.parent;
1502
- const allRows = table.children;
1503
- let minRow = Number.POSITIVE_INFINITY;
1504
- let maxRow = -1;
1505
- let minCol = Number.POSITIVE_INFINITY;
1506
- let maxCol = -1;
1507
- const coveredPositions = new Set();
1508
- selectedCells.forEach((cell) => {
1509
- const row = cell.parent;
1510
- const rowIndex = allRows.indexOf(row);
1511
- const actualColPosition = getActualColumnPosition(cell, allRows);
1512
- const { colSpan, rowSpan } = getCellSpan(cell);
1513
- const cellMinRow = rowIndex;
1514
- const cellMaxRow = rowIndex + rowSpan - 1;
1515
- const cellMinCol = actualColPosition;
1516
- const cellMaxCol = actualColPosition + colSpan - 1;
1517
- for (let r = cellMinRow; r <= cellMaxRow; r++) {
1518
- for (let c = cellMinCol; c <= cellMaxCol; c++) {
1519
- coveredPositions.add(`${r},${c}`);
1520
- }
1521
- }
1522
- minRow = Math.min(minRow, cellMinRow);
1523
- maxRow = Math.max(maxRow, cellMaxRow);
1524
- minCol = Math.min(minCol, cellMinCol);
1525
- maxCol = Math.max(maxCol, cellMaxCol);
1526
- });
1527
- const targetCell = selectedCells[0];
1528
- return {
1529
- minRow,
1530
- maxRow,
1531
- minCol,
1532
- maxCol,
1533
- targetCell,
1534
- coveredPositions,
1535
- };
1536
- }
1537
- /**
1538
- * Calculate the total number of columns in the table.
1539
- * Accounts for cells with col span.
1540
- *
1541
- * @param {RTETableBlock} table - The table block.
1542
- * @returns {number} The total number of columns in the table.
1543
- */
1544
- function getTableColumnCount(table) {
1545
- const rows = getAllTableRows(table);
1546
- // Calculate the total columns from the first row, accounting for col span
1547
- let totalColumns = 0;
1548
- const firstRow = rows[0];
1549
- for (const cell of firstRow.children) {
1550
- const { colSpan } = getCellSpan(cell);
1551
- totalColumns += colSpan;
1552
- }
1553
- return totalColumns;
1554
- }
1555
- /**
1556
- * Check if the selected cells form a rectangular area.
1557
- * Considers cells with col span and row span.
1558
- *
1559
- * @param {RTETableCellBlock[] | RTETableHeadCellBlock[]} selectedCells - The selected table cells.
1560
- * @returns {boolean} True if the selected cells form a rectangle, false otherwise.
1561
- */
1562
- function isRectangularSelection(selectedCells) {
1563
- if (selectedCells.length === 1) {
1564
- return true;
1565
- }
1566
- const bounds = getRectangularBounds(selectedCells);
1567
- const { minRow, maxRow, minCol, maxCol, coveredPositions } = bounds;
1568
- const expectedPositions = (maxRow - minRow + 1) * (maxCol - minCol + 1);
1569
- if (coveredPositions.size !== expectedPositions) {
1570
- return false;
1571
- }
1572
- return true;
1573
- }
1574
- /**
1575
- * Set the col span and row span attributes for a target cell.
1576
- * When colSpan equals the table's total columns, rowSpan is removed.
1577
- *
1578
- * @param {RTETableCellBlock | RTETableHeadCellBlock} targetCell - The target cell to set attributes on.
1579
- * @param {number} colSpan - The column span value.
1580
- * @param {number} rowSpan - The row span value.
1581
- * @param {RTETableBlock} table - The table block.
1582
- */
1583
- function setSpanAttributes(targetCell, colSpan, rowSpan, table) {
1584
- const existingAnnotation = targetCell.annotationMap.get(CommonAnnotationTypeEnum.CUSTOM_ATTRIBUTE);
1585
- const existingAttrs = existingAnnotation
1586
- ? Object.assign({}, existingAnnotation['customAttribute']) : {};
1587
- delete existingAttrs.colspan;
1588
- delete existingAttrs.rowspan;
1589
- if (colSpan > 1) {
1590
- existingAttrs.colspan = String(colSpan);
1591
- }
1592
- // When colspan equals table column count, don't set rowspan
1593
- const tableColumnCount = getTableColumnCount(table);
1594
- if (rowSpan > 1 && colSpan !== tableColumnCount) {
1595
- existingAttrs.rowspan = String(rowSpan);
1596
- }
1597
- if (Object.keys(existingAttrs).length > 0) {
1598
- const customAttributeAnnotation = new CustomAttributeAnnotation(existingAttrs);
1599
- targetCell.annotationMap.set(CommonAnnotationTypeEnum.CUSTOM_ATTRIBUTE, customAttributeAnnotation);
1600
- }
1601
- else {
1602
- targetCell.annotationMap.delete(CommonAnnotationTypeEnum.CUSTOM_ATTRIBUTE);
1603
- }
1604
- }
1605
- /**
1606
- * Create a new cell of the specified type.
1607
- *
1608
- * @param {string} cellType - The type of cell ('table-cell' or 'table-head-cell').
1609
- * @returns {RTETableCellBlock | RTETableHeadCellBlock} The newly created cell.
1610
- */
1611
- function createNewCell(cellType) {
1612
- const cellTemplate = getDefaultCellBlockTemplate(cellType);
1613
- if (cellType === 'table-head-cell') {
1614
- return RTETableHeadCellBlock.from(cellTemplate);
1615
- }
1616
- return RTETableCellBlock.from(cellTemplate);
1617
- }
1618
-
1619
- var RowOperationType;
1620
- (function (RowOperationType) {
1621
- RowOperationType["HEADER_ROW"] = "HEADER_ROW";
1622
- RowOperationType["ADD_ROW_ABOVE"] = "ADD_ROW_ABOVE";
1623
- RowOperationType["ADD_ROW_BELOW"] = "ADD_ROW_BELOW";
1624
- RowOperationType["DELETE_ROW"] = "DELETE_ROW";
1625
- RowOperationType["SELECT_ROW"] = "SELECT_ROW";
1626
- })(RowOperationType || (RowOperationType = {}));
1627
- /**
1628
- * Event handler for row operations in a table.
1629
- */
1630
- class RowOperationEventHandler extends SettingEventHandler {
1631
- /**
1632
- * @inheritDoc
1633
- */
1634
- canHandle(action) {
1635
- return action[0] === TableSettingType.ROW;
1636
- }
1637
- /**
1638
- * @inheritDoc
1639
- */
1640
- execute(action, extensionContext) {
1641
- const operation = action[1];
1642
- switch (operation) {
1643
- case RowOperationType.ADD_ROW_ABOVE:
1644
- case RowOperationType.ADD_ROW_BELOW:
1645
- this.handleInsertRow(operation, extensionContext);
1646
- break;
1647
- case RowOperationType.DELETE_ROW:
1648
- this.handleDeleteRow(extensionContext);
1649
- break;
1650
- case RowOperationType.HEADER_ROW:
1651
- this.handleToggleHeader(extensionContext);
1652
- break;
1653
- case RowOperationType.SELECT_ROW:
1654
- this.handleSelectRow(extensionContext);
1655
- break;
1656
- }
1657
- }
1658
- /**
1659
- * Adds a new row to the table at the specified position.
1660
- *
1661
- * @param {RowOperationType} direction - The position to insert the new row (above or below).
1662
- * @param {RTETableExtensionContext} extensionContext - The extension context.
1663
- */
1664
- handleInsertRow(direction, extensionContext) {
1665
- const selectedRows = this.getAllSelectedRows(extensionContext);
1666
- if (selectedRows.length > 0) {
1667
- const action = new InsertTableRowAction(direction === RowOperationType.ADD_ROW_ABOVE
1668
- ? InsertTableRowDirection.ABOVE
1669
- : InsertTableRowDirection.BELOW, selectedRows);
1670
- this.applyActionToTable(selectedRows[0], action);
1671
- }
1672
- }
1673
- /**
1674
- * Deletes the selected row(s) from the table.
1675
- *
1676
- * @param {RTETableExtensionContext} extensionContext - The extension context.
1677
- */
1678
- handleDeleteRow(extensionContext) {
1679
- const selectedRows = this.getAllSelectedRows(extensionContext);
1680
- if (selectedRows.length) {
1681
- const action = new DeleteTableRowAction(selectedRows);
1682
- this.applyActionToTable(selectedRows[0], action);
1683
- }
1684
- }
1685
- /**
1686
- * Converts selected rows to header rows or reverts them back to normal rows.
1687
- *
1688
- * @param {RTETableExtensionContext} extensionContext - The extension context.
1689
- */
1690
- handleToggleHeader(extensionContext) {
1691
- const selectedRows = this.getAllSelectedRows(extensionContext);
1692
- if (selectedRows.length > 0) {
1693
- const action = new ToggleHeaderRowAction(selectedRows);
1694
- this.applyActionToTable(selectedRows[0], action);
1695
- }
1696
- }
1697
- /**
1698
- * Selects the focus row(s) in the table.
1699
- *
1700
- * @param {RTETableExtensionContext} extensionContext - The extension context.
1701
- */
1702
- handleSelectRow(extensionContext) {
1703
- const selectedRows = this.getAllSelectedRows(extensionContext);
1704
- if (selectedRows.length > 0 && extensionContext && extensionContext.tableSelection) {
1705
- const allCells = selectedRows.flatMap((row) => row.children);
1706
- extensionContext.tableSelection.setSelectedCells(allCells);
1707
- }
1708
- }
1709
- /**
1710
- * Get all selected table rows.
1711
- *
1712
- * @param {RTETableExtensionContext} extensionContext - The extension context.
1713
- * @returns {RTETableRowBlock[]} The selected table row blocks.
1714
- */
1715
- getAllSelectedRows(extensionContext) {
1716
- const selectedRows = new Set();
1717
- if (extensionContext && extensionContext.tableSelection) {
1718
- const { tableSelection } = extensionContext;
1719
- const selectedCells = tableSelection.getSelectedCells();
1720
- selectedCells.forEach((cell) => {
1721
- const rowBlock = getParentBlockByType(cell, RTETableRowBlock);
1722
- if (rowBlock) {
1723
- selectedRows.add(rowBlock);
1724
- }
1725
- });
1726
- }
1727
- return Array.from(selectedRows);
1728
- }
1729
- /**
1730
- * Applies the given action to the table containing the reference block.
1731
- *
1732
- * @param {RTEBlock} refBlock - The reference block within the table.
1733
- * @param {ModifyContentAction} action - The action to apply to the table.
1734
- */
1735
- applyActionToTable(refBlock, action) {
1736
- const table = getParentBlockByType(refBlock, RTETableBlock);
1737
- if (table) {
1738
- table.apply(action);
1739
- }
1740
- }
1741
- }
1742
-
1743
- /**
1744
- * Abstract base strategy for handling table column operations.
1745
- * Provides common functionality for all column-related strategies.
1746
- */
1747
- class TableColumnStrategy extends ActionHandleStrategy {
1748
- /**
1749
- * Finds the index range of cells within a table row.
1750
- * Returns the start and end indices of the given cell range.
1751
- *
1752
- * @param {(RTETableCellBlock | RTETableHeadCellBlock)[]} cellRange - The range of table cells to find indices for.
1753
- * @returns {[number, number]} A tuple containing the start and end indices.
1754
- */
1755
- getBoundaryCellIndexOfRow(cellRange) {
1756
- const firstCell = cellRange[0];
1757
- const lastCell = cellRange[cellRange.length - 1];
1758
- return [firstCell.parent.children.indexOf(firstCell), lastCell.parent.children.indexOf(lastCell)];
1759
- }
1760
- }
1761
-
1762
- /**
1763
- * Strategy to handle the toggle of header state of a table column.
1764
- */
1765
- class ToggleHeaderTableColumnStrategy extends TableColumnStrategy {
1766
- /**
1767
- * Check if all selected cells are header cells.
1768
- *
1769
- * @param {(RTETableCellBlock | RTETableHeadCellBlock)[]} selectedCellRange - The range of selected table cell blocks.
1770
- * @returns {boolean} True if all selected cells are header cells, false otherwise.
1771
- */
1772
- static isFullHeaderSelection(selectedCellRange) {
1773
- if (selectedCellRange.length === 0) {
1774
- return false;
1775
- }
1776
- const endSelectedCell = selectedCellRange[selectedCellRange.length - 1];
1777
- const endSelectedCellIndex = endSelectedCell.parent.children.findIndex((child) => child === endSelectedCell);
1778
- const table = getParentBlockByType(endSelectedCell, RTETableBlock);
1779
- if (table) {
1780
- const allTableRows = getAllTableRows(table);
1781
- return allTableRows.every((row) => {
1782
- const cell = row.children[endSelectedCellIndex];
1783
- return cell instanceof RTETableHeadCellBlock;
1784
- });
1785
- }
1786
- return false;
1787
- }
1788
- /**
1789
- * @inheritDoc
1790
- */
1791
- handleAction(action, target) {
1792
- var _a;
1793
- const headerOn = action.headerOn;
1794
- const [startCellIndex, endCellIndex] = this.getBoundaryCellIndexOfRow(action.tableCellHeaderRange);
1795
- const allTableBodyRows = ((_a = target.children.find((body) => body instanceof RTETableBodyBlock)) === null || _a === void 0 ? void 0 : _a.children) || [];
1796
- allTableBodyRows.forEach((row) => {
1797
- const firstTableCellIndex = row.children.findIndex((cell) => !(cell instanceof RTETableHeadCellBlock));
1798
- if (headerOn) {
1799
- this.toggleCellsToHeader(firstTableCellIndex, endCellIndex, row);
1800
- }
1801
- else {
1802
- this.toggleHeaderCellsToCells(firstTableCellIndex, row, startCellIndex);
1803
- }
1804
- });
1805
- const root = this.getRootContent(target);
1806
- if (root && action.tableCellHeaderRange[0].parent) {
1807
- const focusNode = action.tableCellHeaderRange[0].parent.getFirstNode();
1808
- focusNode && root.apply(new UpdateCursorPositionAction(focusNode, 0));
1809
- }
1810
- }
1811
- /**
1812
- * Toggles the specified header cells in a row to cells.
1813
- *
1814
- * @param {number} firstTableCellIndex - The index of the first table cell in the row.
1815
- * @param {RTETableRowBlock} row - The table row block containing the cells to toggle.
1816
- * @param {number} startCellIndex - The index of the first cell to toggle.
1817
- */
1818
- toggleHeaderCellsToCells(firstTableCellIndex, row, startCellIndex) {
1819
- const lastTableHeaderCellIndex = firstTableCellIndex >= 0 ? firstTableCellIndex - 1 : row.children.length - 1;
1820
- for (let cellIndex = startCellIndex; cellIndex <= lastTableHeaderCellIndex; cellIndex++) {
1821
- const cellToToggle = row.children[cellIndex];
1822
- const newCell = RTETableCellBlock.from(cellToToggle.toJSON());
1823
- this.replaceCellInRow(row, cellToToggle, newCell);
1824
- }
1825
- }
1826
- /**
1827
- * Toggles the specified cells in a row to header cells.
1828
- *
1829
- * @param {number} firstTableCellIndex - The index of the first table cell in the row.
1830
- * @param {number} endCellIndex - The index of the last cell to toggle.
1831
- * @param {RTETableRowBlock} row - The table row block containing the cells to toggle.
1832
- */
1833
- toggleCellsToHeader(firstTableCellIndex, endCellIndex, row) {
1834
- for (let tableCellIndex = firstTableCellIndex; tableCellIndex <= endCellIndex; tableCellIndex++) {
1835
- const cellToToggle = row.children[tableCellIndex];
1836
- const newHeaderCell = RTETableHeadCellBlock.from(cellToToggle.toJSON());
1837
- this.replaceCellInRow(row, cellToToggle, newHeaderCell);
1838
- }
1839
- }
1840
- /**
1841
- * Replaces a cell in a given row at the specified index with a new cell.
1842
- *
1843
- * @param {RTETableRowBlock} row - The table row block containing the cell to replace.
1844
- * @param {RTETableCellBlock | RTETableHeadCellBlock} oldCell - The cell to replace.
1845
- * @param {RTETableCellBlock | RTETableHeadCellBlock} newCell - The new cell to insert.
1846
- */
1847
- replaceCellInRow(row, oldCell, newCell) {
1848
- row.apply(new InsertChildrenBeforeAction(oldCell, newCell));
1849
- row.apply(new RemoveChildrenAction(oldCell));
1850
- }
1851
- }
1852
-
1853
- const DELETE_TABLE_COLUMN = 'DELETE_TABLE_COLUMN';
1854
- /**
1855
- * Action to delete a table column
1856
- */
1857
- class DeleteTableColumnAction extends ModifyContentAction {
1858
- constructor(target) {
1859
- super();
1860
- this.isFlushable = true;
1861
- this.type = DELETE_TABLE_COLUMN;
1862
- this.tableCellDeleteRange = target;
1863
- }
1864
- }
1865
-
1866
- const INSERT_TABLE_COLUMN = 'INSERT_TABLE_COLUMN';
1867
- var InsertTableColumnDirection;
1868
- (function (InsertTableColumnDirection) {
1869
- InsertTableColumnDirection["LEFT"] = "LEFT";
1870
- InsertTableColumnDirection["RIGHT"] = "RIGHT";
1871
- })(InsertTableColumnDirection || (InsertTableColumnDirection = {}));
1872
- /**
1873
- * Action to insert a table column into the RTETable.
1874
- */
1875
- class InsertTableColumnAction extends ModifyContentAction {
1876
- constructor(insertDirection, tableCellInsertRange) {
1877
- super();
1878
- this.isFlushable = true;
1879
- this.type = INSERT_TABLE_COLUMN;
1880
- this.tableCellInsertRange = tableCellInsertRange;
1881
- this.insertDirection = insertDirection;
1882
- }
1883
- }
1884
-
1885
- const SELECT_TABLE_COLUMN = 'SELECT_TABLE_COLUMN';
1886
- /**
1887
- * Action to select a table column into the RTETable.
1888
- */
1889
- class SelectTableColumnAction extends ModifyContentAction {
1890
- constructor(tableCellSelectRange, selectCellCallback) {
1891
- super();
1892
- this.type = SELECT_TABLE_COLUMN;
1893
- this.tableCellSelectRange = tableCellSelectRange;
1894
- this.selectCellCallback = selectCellCallback;
1895
- }
1896
- }
1897
-
1898
- const TOGGLE_HEADER_TABLE_COLUMN = 'TOGGLE_HEADER_TABLE_COLUMN';
1899
- /**
1900
- * Action to toggle header state of a table column in the RTETable.
1901
- */
1902
- class ToggleHeaderTableColumnAction extends ModifyContentAction {
1903
- constructor(tableCellHeaderRange, headerOn) {
1904
- super();
1905
- this.isFlushable = true;
1906
- this.type = TOGGLE_HEADER_TABLE_COLUMN;
1907
- this.headerOn = false;
1908
- this.tableCellHeaderRange = tableCellHeaderRange;
1909
- this.headerOn = headerOn;
1910
- }
1911
- }
1912
-
1913
- var ColumnOperationType;
1914
- (function (ColumnOperationType) {
1915
- ColumnOperationType["HEADER_COLUMN"] = "HEADER_COLUMN";
1916
- ColumnOperationType["ADD_COLUMN_LEFT"] = "ADD_COLUMN_LEFT";
1917
- ColumnOperationType["ADD_COLUMN_RIGHT"] = "ADD_COLUMN_RIGHT";
1918
- ColumnOperationType["DELETE_COLUMN"] = "DELETE_COLUMN";
1919
- ColumnOperationType["SELECT_COLUMN"] = "SELECT_COLUMN";
1920
- })(ColumnOperationType || (ColumnOperationType = {}));
1921
- /**
1922
- * Event handler for column operations in a table.
1923
- */
1924
- class ColumnOperationEventHandler extends SettingEventHandler {
1925
- /**
1926
- * @inheritDoc
1927
- */
1928
- canHandle(action) {
1929
- return action[0] === TableSettingType.COLUMN;
1930
- }
1931
- /**
1932
- * @inheritDoc
1933
- */
1934
- execute(action, extensionContext) {
1935
- const selectedCells = extensionContext.tableSelection.getSelectedCells();
1936
- if (!selectedCells || selectedCells.length === 0) {
1937
- return;
1938
- }
1939
- const operation = action[1];
1940
- switch (operation) {
1941
- case ColumnOperationType.ADD_COLUMN_LEFT:
1942
- case ColumnOperationType.ADD_COLUMN_RIGHT:
1943
- this.handleInsertColumn(operation, selectedCells);
1944
- break;
1945
- case ColumnOperationType.DELETE_COLUMN:
1946
- this.handleDeleteColumn(selectedCells);
1947
- break;
1948
- case ColumnOperationType.SELECT_COLUMN:
1949
- this.handleSelectColumn(selectedCells, extensionContext);
1950
- break;
1951
- case ColumnOperationType.HEADER_COLUMN:
1952
- this.handleToggleHeaderColumn(selectedCells);
1953
- break;
1954
- }
1955
- }
1956
- /**
1957
- * Adds a new column to the table at the specified position.
1958
- *
1959
- * @param {ColumnOperationType} direction - The position to insert the new column (left or right).
1960
- * @param {RTETableCellBlock[] | RTETableHeadCellBlock[]} selectedCells - The selected table cells.
1961
- */
1962
- handleInsertColumn(direction, selectedCells) {
1963
- const action = new InsertTableColumnAction(direction === ColumnOperationType.ADD_COLUMN_LEFT
1964
- ? InsertTableColumnDirection.LEFT
1965
- : InsertTableColumnDirection.RIGHT, selectedCells);
1966
- this.applyActionOnTable(action, selectedCells[0]);
1967
- }
1968
- /**
1969
- * Deletes the selected column from the table.
1970
- *
1971
- * @param {RTETableCellBlock[] | RTETableHeadCellBlock[]} selectedCells - The selected table cells.
1972
- */
1973
- handleDeleteColumn(selectedCells) {
1974
- const action = new DeleteTableColumnAction(selectedCells);
1975
- this.applyActionOnTable(action, selectedCells[0]);
1976
- }
1977
- /**
1978
- * Selects the entire column in the table.
1979
- *
1980
- * @param {RTETableCellBlock[] | RTETableHeadCellBlock[]} selectedCells - The selected table cells.
1981
- * @param {RTETableExtensionContext} extensionContext - The table extension context.
1982
- */
1983
- handleSelectColumn(selectedCells, extensionContext) {
1984
- const action = new SelectTableColumnAction(selectedCells, (allSelectedCells) => {
1985
- extensionContext.tableSelection.setSelectedCells(allSelectedCells);
1986
- });
1987
- this.applyActionOnTable(action, selectedCells[0]);
1988
- }
1989
- /**
1990
- * Toggles the header state of the selected column in the table.
1991
- *
1992
- * @param {RTETableCellBlock[] | RTETableHeadCellBlock[]} selectedCells - The selected table cells.
1993
- */
1994
- handleToggleHeaderColumn(selectedCells) {
1995
- const headerOn = !ToggleHeaderTableColumnStrategy.isFullHeaderSelection(selectedCells);
1996
- const action = new ToggleHeaderTableColumnAction(selectedCells, headerOn);
1997
- this.applyActionOnTable(action, selectedCells[0]);
1998
- }
1999
- /**
2000
- * Apply the specified action on the table containing the selected cell.
2001
- *
2002
- * @param {DeleteTableColumnAction | InsertTableColumnAction} action - The action to apply.
2003
- * @param {RTETableCellBlock | RTETableHeadCellBlock} selectedCell - The selected table cell.
2004
- */
2005
- applyActionOnTable(action, selectedCell) {
2006
- const table = getParentBlockByType(selectedCell, RTETableBlock);
2007
- if (table) {
2008
- table.apply(action);
2009
- }
2010
- }
2011
- }
2012
-
2013
- const SPLIT_CELL_HORIZONTALLY = 'SPLIT_CELL_HORIZONTALLY';
2014
- /**
2015
- * Action to split a table cell horizontally.
2016
- */
2017
- class SplitCellHorizontallyAction extends ModifyContentAction {
2018
- constructor() {
2019
- super();
2020
- this.isFlushable = true;
2021
- this.type = SPLIT_CELL_HORIZONTALLY;
2022
- }
2023
- }
2024
-
2025
- const SPLIT_CELL_VERTICALLY = 'SPLIT_CELL_VERTICALLY';
2026
- /**
2027
- * Action to split a table cell vertically.
2028
- */
2029
- class SplitCellVerticallyAction extends ModifyContentAction {
2030
- constructor() {
2031
- super();
2032
- this.isFlushable = true;
2033
- this.type = SPLIT_CELL_VERTICALLY;
2034
- }
2035
- }
2036
-
2037
- var SplitCellOperationType;
2038
- (function (SplitCellOperationType) {
2039
- SplitCellOperationType["SPLIT_CELL_HORIZONTALLY"] = "SPLIT_CELL_HORIZONTALLY";
2040
- SplitCellOperationType["SPLIT_CELL_VERTICALLY"] = "SPLIT_CELL_VERTICALLY";
2041
- })(SplitCellOperationType || (SplitCellOperationType = {}));
2042
- /**
2043
- * Event handler for split cell operations in a table.
2044
- */
2045
- class SplitCellOperationEventHandler extends SettingEventHandler {
2046
- /**
2047
- * @inheritDoc
2048
- */
2049
- canHandle(action) {
2050
- return action[0] === TableSettingType.SPLIT_CELL;
2051
- }
2052
- /**
2053
- * @inheritDoc
2054
- */
2055
- execute(action, extensionContext) {
2056
- const selectedCells = extensionContext.tableSelection.getSelectedCells();
2057
- if (selectedCells && selectedCells.length === 1) {
2058
- const targetCell = selectedCells[0];
2059
- const operation = action[1];
2060
- switch (operation) {
2061
- case SplitCellOperationType.SPLIT_CELL_HORIZONTALLY:
2062
- this.handleSplitCellHorizontally(targetCell);
2063
- break;
2064
- case SplitCellOperationType.SPLIT_CELL_VERTICALLY:
2065
- this.handleSplitCellVertically(targetCell);
2066
- break;
2067
- }
2068
- }
2069
- }
2070
- /**
2071
- * Splits the selected table cell horizontally (split top/bottom).
2072
- *
2073
- * @param {RTETableCellBlock | RTETableHeadCellBlock} selectedCell - The table cell block to split.
2074
- */
2075
- handleSplitCellHorizontally(selectedCell) {
2076
- const action = new SplitCellHorizontallyAction();
2077
- selectedCell.apply(action);
2078
- }
2079
- /**
2080
- * Splits the selected table cell vertically (split left/right).
2081
- *
2082
- * @param {RTETableCellBlock | RTETableHeadCellBlock} selectedCell - The table cell block to split.
2083
- */
2084
- handleSplitCellVertically(selectedCell) {
2085
- const action = new SplitCellVerticallyAction();
2086
- selectedCell.apply(action);
2087
- }
2088
- }
2089
-
2090
- export { INSERT_TABLE_ROW as A, TOGGLE_HEADER_ROW as B, ColumnOperationEventHandler as C, DELETE_TABLE_ROW as D, INSERT_TABLE_COLUMN as E, DELETE_TABLE_COLUMN as F, TOGGLE_HEADER_TABLE_COLUMN as G, ToggleHeaderTableColumnStrategy as H, InsertTableRowDirection as I, SPLIT_CELL_HORIZONTALLY as J, SPLIT_CELL_VERTICALLY as K, SELECT_TABLE_COLUMN as L, MergeCellsOperationEventHandler as M, MERGE_CELLS as N, RTE_TABLE_BORDER_STYLES as O, ColumnOperationType as P, RowOperationType as Q, RTETableExtensionAnnotationTypeEnum as R, SettingEventHandler as S, TableSettingType as T, SplitCellOperationType as U, VegaThemeManager as V, isRectangularSelection as W, getAdjacentCell as X, RowOperationEventHandler as a, SplitCellOperationEventHandler as b, RTETableAnnotation as c, RTETableCellAnnotation as d, RTETableHeadCellAnnotation as e, RTETableHeadCellBlock as f, RTETableColorManager as g, RTETableBlock as h, generateTableBody as i, RTETableCellBlock as j, RTETableRowBlock as k, RTETableBodyBlock as l, RTETableHeadBlock as m, getParentBlockByType as n, TableColumnStrategy as o, getAllTableRows as p, InsertTableColumnDirection as q, getDefaultCellBlockTemplate as r, getFirstNode as s, setSpanAttributes as t, MergeCellsOperationType as u, buildTableGrid as v, getCellSpan as w, getActualColumnPosition as x, createNewCell as y, RTE_TABLE_DEFAULT_COLORS as z };