@heartlandone/vega 2.78.0 → 2.79.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (784) hide show
  1. package/dist/cjs/align-left-4a76df69.js +22 -0
  2. package/dist/cjs/{app-globals-55e26945.js → app-globals-e9fdfbf9.js} +11 -9
  3. package/dist/cjs/aria-dialog-focusable-trap-slimmer-6faafc3e.js +218 -0
  4. package/dist/cjs/auto-run-when-re-render-task-queue-slimmer.abstract-5734634d.js +51 -0
  5. package/dist/cjs/{breakpoints-a8ff22f0.js → breakpoints-1cc2c4c6.js} +1 -1
  6. package/dist/cjs/{child-nodes-notify-observer-slimmer-ed39283b.js → child-nodes-notify-observer-slimmer-06c78f97.js} +1 -1
  7. package/dist/cjs/{code-block-1a5fafed.js → code-block-847534e3.js} +38 -7
  8. package/dist/cjs/{component-value-history-controller-slimmer.abstract-42683f23.js → component-value-history-controller-slimmer.abstract-d7f9812a.js} +34 -56
  9. package/dist/cjs/{dto-renderer-manager-7557d562.js → content-state-99be18a3.js} +19 -62
  10. package/dist/cjs/{date-required-rule-ad536cb5.js → date-required-rule-3823d506.js} +1 -1
  11. package/dist/cjs/{deprecated-property-slimmer-1eb8f031.js → deprecated-property-slimmer-300a3929.js} +1 -1
  12. package/dist/cjs/{design-token-45ebd5e4.js → design-token-b497bb6e.js} +3 -3
  13. package/dist/cjs/{dom-node-subject-observer-factory-c62823de.js → dom-node-subject-observer-factory-f7ed3bdc.js} +1 -1
  14. package/dist/cjs/dto-renderer-manager-ae5fcbba.js +58 -0
  15. package/dist/cjs/{element-appender-slimmer-16ec8591.js → element-appender-slimmer-eba4f3a2.js} +8 -8
  16. package/dist/cjs/{event-emit-slimmer-c84121c8.js → event-emit-slimmer-83f8e2bd.js} +1 -1
  17. package/dist/cjs/{form-field-controller-slimmer-73f5849e.js → form-field-controller-slimmer-93ca7239.js} +6 -6
  18. package/dist/cjs/{image-annotation-action-f275863e.js → image-annotation-action-9d6af380.js} +4 -32
  19. package/dist/cjs/index-58ea899e.js +4 -0
  20. package/dist/cjs/index.cjs.js +41 -36
  21. package/dist/cjs/{inject-keyboard-manager-6667c0f1.js → inject-keyboard-manager-23d07d87.js} +1 -1
  22. package/dist/cjs/{internal-translation-controller-24df468f.js → internal-translation-controller-9f58a4e4.js} +2 -0
  23. package/dist/cjs/{keyboard-manager-7de7ecfd.js → keyboard-manager-3923e29b.js} +2 -2
  24. package/dist/cjs/{keyboard-manager-slimmer-b44f0dc9.js → keyboard-manager-slimmer-f602725d.js} +1 -1
  25. package/dist/cjs/loader.cjs.js +26 -21
  26. package/dist/cjs/{month-view-generator-36c42772.js → month-view-generator-aa8e8e74.js} +1 -1
  27. package/dist/cjs/{object-e2e28e3d.js → object-b53e9416.js} +6 -4
  28. package/dist/cjs/{page-resize-observer-slimmer-e050cd26.js → page-resize-observer-slimmer-273d62ef.js} +1 -1
  29. package/dist/cjs/{public-rules-6c6cb4ac.js → public-rules-1dbda124.js} +12 -12
  30. package/dist/cjs/{range-e298d4aa.js → range-60fb9dd2.js} +2 -2
  31. package/dist/cjs/{responsive-format-facade-bddac47c.js → responsive-format-facade-a32cdb67.js} +31 -3
  32. package/dist/cjs/{rich-text-editor-required-rule-6346a888.js → rich-text-editor-required-rule-b4aab68d.js} +2 -2
  33. package/dist/cjs/split-cell-operation-190d4a87.js +2411 -0
  34. package/dist/cjs/{string-format-strategy.abstract-814d66c4.js → string-format-strategy.abstract-730088ee.js} +1 -1
  35. package/dist/cjs/{string-input-formatter-slimmer-749e3cfe.js → string-input-formatter-slimmer-9d6df58b.js} +4 -4
  36. package/dist/cjs/{string-mask-strategy-d00871c2.js → string-mask-strategy-b69e3b9e.js} +2 -2
  37. package/dist/cjs/{style-formatter-94c1a1ff.js → style-formatter-9d8a4ad2.js} +2 -2
  38. package/dist/cjs/{sub-state-notify-slimmer-ac1dae32.js → sub-state-notify-slimmer-c80b9d21.js} +2 -2
  39. package/dist/cjs/{sub-state-observer-slimmer-e692d849.js → sub-state-observer-slimmer-15740c97.js} +3 -3
  40. package/dist/cjs/{time-required-rule-f1f3c8c2.js → time-required-rule-6524b650.js} +1 -1
  41. package/dist/cjs/token-extension-b7c4ea17.js +7438 -0
  42. package/dist/cjs/{translation-slimmer-3fa03d81.js → translation-slimmer-c069ca84.js} +1 -1
  43. package/dist/cjs/{type-guard-a0d9ff1f.js → type-guard-2a46bca5.js} +12 -2
  44. package/dist/cjs/{ui-024696c0.js → ui-32120990.js} +3 -0
  45. package/dist/cjs/{ui-234ea151.js → ui-b3db0122.js} +21 -0
  46. package/dist/cjs/{valid-credit-card-number-rule-cba7d66a.js → valid-credit-card-number-rule-8eb02ea7.js} +1 -1
  47. package/dist/cjs/vega-accordion.cjs.entry.js +9 -9
  48. package/dist/cjs/vega-app-header-button.cjs.entry.js +10 -10
  49. package/dist/cjs/vega-backdrop.cjs.entry.js +2 -2
  50. package/dist/cjs/vega-banner.cjs.entry.js +3 -3
  51. package/dist/cjs/vega-box.cjs.entry.js +9 -9
  52. package/dist/cjs/vega-breadcrumb.cjs.entry.js +3 -3
  53. package/dist/cjs/vega-button-circle.cjs.entry.js +10 -10
  54. package/dist/cjs/vega-button-group_2.cjs.entry.js +6 -6
  55. package/dist/cjs/vega-button-link.cjs.entry.js +3 -3
  56. package/dist/cjs/vega-button.cjs.entry.js +10 -10
  57. package/dist/cjs/vega-calendar_4.cjs.entry.js +226 -165
  58. package/dist/cjs/vega-card.cjs.entry.js +7 -7
  59. package/dist/cjs/vega-carousel.cjs.entry.js +11 -11
  60. package/dist/cjs/vega-checkbox_2.cjs.entry.js +11 -11
  61. package/dist/cjs/vega-chip.cjs.entry.js +10 -10
  62. package/dist/cjs/vega-code-block.cjs.entry.js +16 -15
  63. package/dist/cjs/vega-color-picker.cjs.entry.js +10 -10
  64. package/dist/cjs/vega-combo-box.cjs.entry.js +13 -13
  65. package/dist/cjs/vega-date-picker_2.cjs.entry.js +104 -31
  66. package/dist/cjs/vega-dialog_2.cjs.entry.js +52 -15
  67. package/dist/cjs/vega-divider.cjs.entry.js +7 -7
  68. package/dist/cjs/vega-dropdown_5.cjs.entry.js +17 -17
  69. package/dist/cjs/vega-env-manager-23b8b23c.js +2 -2
  70. package/dist/cjs/vega-field-label.cjs.entry.js +3 -3
  71. package/dist/cjs/vega-file-uploader.cjs.entry.js +11 -11
  72. package/dist/cjs/vega-flag-icon.cjs.entry.js +6 -6
  73. package/dist/cjs/vega-flex.cjs.entry.js +9 -9
  74. package/dist/cjs/vega-font.cjs.entry.js +8 -8
  75. package/dist/cjs/vega-form.cjs.entry.js +13 -13
  76. package/dist/cjs/vega-grid.cjs.entry.js +9 -8
  77. package/dist/cjs/vega-icon.cjs.entry.js +7 -7
  78. package/dist/cjs/vega-image-uploader.cjs.entry.js +13 -13
  79. package/dist/cjs/vega-input-credit-card.cjs.entry.js +14 -14
  80. package/dist/cjs/vega-input-numeric.cjs.entry.js +14 -14
  81. package/dist/cjs/vega-input-passcode.cjs.entry.js +13 -13
  82. package/dist/cjs/vega-input-phone-number.cjs.entry.js +12 -12
  83. package/dist/cjs/vega-input-range.cjs.entry.js +11 -11
  84. package/dist/cjs/vega-input-select.cjs.entry.js +13 -13
  85. package/dist/cjs/vega-input.cjs.entry.js +30 -17
  86. package/dist/cjs/{vega-internal-event-id-e0aeac45.js → vega-internal-event-id-67bb91c1.js} +4 -0
  87. package/dist/cjs/vega-item-toggle.cjs.entry.js +6 -6
  88. package/dist/cjs/vega-left-nav_5.cjs.entry.js +15 -15
  89. package/dist/cjs/vega-loader-wrapper_2.cjs.entry.js +7 -7
  90. package/dist/cjs/vega-page-notification_2.cjs.entry.js +2 -2
  91. package/dist/cjs/vega-pagination-page-selector-mobile.cjs.entry.js +3 -3
  92. package/dist/cjs/vega-pagination-page-size-selector-mobile.cjs.entry.js +5 -5
  93. package/dist/cjs/vega-pagination.cjs.entry.js +11 -11
  94. package/dist/cjs/vega-popover_2.cjs.entry.js +15 -14
  95. package/dist/cjs/vega-progress-tracker_2.cjs.entry.js +14 -14
  96. package/dist/cjs/vega-radio_2.cjs.entry.js +14 -14
  97. package/dist/cjs/vega-rich-text-content.cjs.entry.js +22 -24
  98. package/dist/cjs/vega-rich-text-editor_4.cjs.entry.js +217 -252
  99. package/dist/cjs/vega-rich-text-table-properties_3.cjs.entry.js +1527 -0
  100. package/dist/cjs/vega-segment-control.cjs.entry.js +6 -6
  101. package/dist/cjs/vega-selection-chip_2.cjs.entry.js +13 -13
  102. package/dist/cjs/vega-selection-tile_2.cjs.entry.js +12 -12
  103. package/dist/cjs/vega-sidenav_3.cjs.entry.js +12 -12
  104. package/dist/cjs/vega-signature-capture.cjs.entry.js +15 -15
  105. package/dist/cjs/vega-stepper.cjs.entry.js +10 -10
  106. package/dist/cjs/vega-tab-group_2.cjs.entry.js +6 -6
  107. package/dist/cjs/vega-table_11.cjs.entry.js +14 -14
  108. package/dist/cjs/vega-text.cjs.entry.js +4 -4
  109. package/dist/cjs/vega-textarea.cjs.entry.js +10 -10
  110. package/dist/cjs/vega-time-picker_2.cjs.entry.js +62 -20
  111. package/dist/cjs/vega-toggle-switch.cjs.entry.js +10 -10
  112. package/dist/cjs/vega-tooltip_2.cjs.entry.js +14 -14
  113. package/dist/cjs/vega.cjs.js +26 -21
  114. package/dist/cjs/{wait-for-component-did-render-cbebfc33.js → wait-for-component-did-render-9e41b39e.js} +2 -2
  115. package/dist/collection/collection-manifest.json +10 -0
  116. package/dist/collection/components/vega-backdrop/slimmers/renerers/vega-backdrop-renderer.js +1 -1
  117. package/dist/collection/components/vega-calendar/slimmers/common/controllers/vega-calendar-day-view-focus-slimmer.js +34 -0
  118. package/dist/collection/components/vega-calendar/slimmers/common/renderers/vega-calendar-switch-panel.js +1 -1
  119. package/dist/collection/components/vega-calendar/slimmers/day-view/renderers/vega-calendar-view-with-time-renderer.js +2 -1
  120. package/dist/collection/components/vega-calendar/slimmers/month-view/renderers/vega-calendar-month-view-renderer.js +28 -7
  121. package/dist/collection/components/vega-calendar/vega-calendar-event-preview/slimmers/renderers/vega-calendar-event-preview-detail-renderer.js +4 -1
  122. package/dist/collection/components/vega-calendar/vega-calendar.js +5 -0
  123. package/dist/collection/components/vega-date-picker/slimmers/controllers/vega-date-picker-calendar-open-state-controller.js +13 -1
  124. package/dist/collection/components/vega-date-picker/slimmers/renderers/vega-date-picker-calendar-renderer.js +28 -2
  125. package/dist/collection/components/vega-date-picker/slimmers/renderers/vega-date-picker-input-renderer-base.abstract.js +7 -1
  126. package/dist/collection/components/vega-date-picker/slimmers/renderers/vega-date-picker-range-input-renderer.js +15 -2
  127. package/dist/collection/components/vega-date-picker/slimmers/renderers/vega-date-picker-renderer.js +1 -1
  128. package/dist/collection/components/vega-date-picker/slimmers/renderers/vega-date-picker-single-input-renderer.js +18 -1
  129. package/dist/collection/components/vega-grid/vega-grid.css +72 -0
  130. package/dist/collection/components/vega-grid/vega-grid.js +30 -0
  131. package/dist/collection/components/vega-input/slimmers/renderers/vega-input-input-renderer.js +4 -1
  132. package/dist/collection/components/vega-input/vega-input.js +34 -0
  133. package/dist/collection/components/vega-modal/slimmers/controllers/vega-modal-open-state-controller.js +34 -1
  134. package/dist/collection/components/vega-modal/slimmers/renderers/vega-modal-renderer.js +7 -2
  135. package/dist/collection/components/vega-popover/slimmers/controllers/vega-popover-appender-controller.js +1 -0
  136. package/dist/collection/components/vega-rich-text-content/vega-rich-text-content.js +9 -1
  137. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/action-handle-strategy.abstract.js +10 -0
  138. package/dist/collection/components/vega-rich-text-editor/dto/blocks/block.abstract.js +24 -2
  139. package/dist/collection/components/vega-rich-text-editor/dto/filter-styles-strategies/filter-styles-strategy-registry.js +35 -0
  140. package/dist/collection/components/vega-rich-text-editor/dto/filter-styles-strategies/filter-styles-strategy.abstract.js +31 -0
  141. package/dist/collection/components/vega-rich-text-editor/dto/renderers/nodes/text-node-renderer.js +0 -10
  142. package/dist/collection/components/vega-rich-text-editor/extensions/base-extension-renderer.js +2 -1
  143. package/dist/collection/components/vega-rich-text-editor/extensions/base-toolbar-button-renderer.js +10 -5
  144. package/dist/collection/components/vega-rich-text-editor/extensions/extension.abstract.js +18 -1
  145. package/dist/collection/components/vega-rich-text-editor/extensions/table/action-handler-interceptors/prevent-cell-children-remove-interceptor.js +42 -0
  146. package/dist/collection/components/vega-rich-text-editor/extensions/table/action-handler-interceptors/prevent-cell-content-delete-interceptor.js +26 -0
  147. package/dist/collection/components/vega-rich-text-editor/extensions/table/action-handler-interceptors/prevent-row-insert-interceptor.js +23 -0
  148. package/dist/collection/components/vega-rich-text-editor/extensions/table/action-handler-interceptors/prevent-table-insert-paragraph-interceptor.js +55 -0
  149. package/dist/collection/components/vega-rich-text-editor/extensions/table/action-handler-strategies/create-segment-table-cell-strategy.js +33 -0
  150. package/dist/collection/components/vega-rich-text-editor/extensions/table/action-handler-strategies/delete-table-block-strategy.js +25 -0
  151. package/dist/collection/components/vega-rich-text-editor/extensions/table/action-handler-strategies/delete-table-column-strategy.js +176 -0
  152. package/dist/collection/components/vega-rich-text-editor/extensions/table/action-handler-strategies/delete-table-row-strategy.js +154 -0
  153. package/dist/collection/components/vega-rich-text-editor/extensions/table/action-handler-strategies/insert-table-block-strategy.js +54 -0
  154. package/dist/collection/components/vega-rich-text-editor/extensions/table/action-handler-strategies/insert-table-column-strategy.js +163 -0
  155. package/dist/collection/components/vega-rich-text-editor/extensions/table/action-handler-strategies/insert-table-row-into-different-section-strategy.js +83 -0
  156. package/dist/collection/components/vega-rich-text-editor/extensions/table/action-handler-strategies/insert-table-row-into-same-section-strategy.js +55 -0
  157. package/dist/collection/components/vega-rich-text-editor/extensions/table/action-handler-strategies/merge-cells-strategy.js +120 -0
  158. package/dist/collection/components/vega-rich-text-editor/extensions/table/action-handler-strategies/replace-table-cell-strategy.js +21 -0
  159. package/dist/collection/components/vega-rich-text-editor/extensions/table/action-handler-strategies/select-table-column-strategy.js +33 -0
  160. package/dist/collection/components/vega-rich-text-editor/extensions/table/action-handler-strategies/split-cell-horizontally-strategy.js +143 -0
  161. package/dist/collection/components/vega-rich-text-editor/extensions/table/action-handler-strategies/split-cell-vertically-strategy.js +80 -0
  162. package/dist/collection/components/vega-rich-text-editor/extensions/table/action-handler-strategies/split-table-cell-strategy.js +45 -0
  163. package/dist/collection/components/vega-rich-text-editor/extensions/table/action-handler-strategies/table-column-strategy.abstract.js +27 -0
  164. package/dist/collection/components/vega-rich-text-editor/extensions/table/action-handler-strategies/table-row-strategy.abstract.js +296 -0
  165. package/dist/collection/components/vega-rich-text-editor/extensions/table/action-handler-strategies/toggle-header-row-strategy.js +274 -0
  166. package/dist/collection/components/vega-rich-text-editor/extensions/table/action-handler-strategies/toggle-header-table-column-strategy.js +159 -0
  167. package/dist/collection/components/vega-rich-text-editor/extensions/table/action-handler-strategies/update-table-cell-properties-strategy.js +33 -0
  168. package/dist/collection/components/vega-rich-text-editor/extensions/table/action-handler-strategies/update-table-properties-strategy.js +36 -0
  169. package/dist/collection/components/vega-rich-text-editor/extensions/table/actions/create-segment-table-cell-action.js +13 -0
  170. package/dist/collection/components/vega-rich-text-editor/extensions/table/actions/delete-table-block-action.js +13 -0
  171. package/dist/collection/components/vega-rich-text-editor/extensions/table/actions/delete-table-column-action.js +13 -0
  172. package/dist/collection/components/vega-rich-text-editor/extensions/table/actions/delete-table-row-action.js +18 -0
  173. package/dist/collection/components/vega-rich-text-editor/extensions/table/actions/insert-table-block-action.js +13 -0
  174. package/dist/collection/components/vega-rich-text-editor/extensions/table/actions/insert-table-column-action.js +19 -0
  175. package/dist/collection/components/vega-rich-text-editor/extensions/table/actions/insert-table-row-into-different-section-action.js +21 -0
  176. package/dist/collection/components/vega-rich-text-editor/extensions/table/actions/insert-table-row-into-same-section-action.js +27 -0
  177. package/dist/collection/components/vega-rich-text-editor/extensions/table/actions/merge-cells-action.js +17 -0
  178. package/dist/collection/components/vega-rich-text-editor/extensions/table/actions/replace-table-cell-action.js +13 -0
  179. package/dist/collection/components/vega-rich-text-editor/extensions/table/actions/select-table-column-action.js +13 -0
  180. package/dist/collection/components/vega-rich-text-editor/extensions/table/actions/split-cell-horizontally-action.js +12 -0
  181. package/dist/collection/components/vega-rich-text-editor/extensions/table/actions/split-cell-vertically-action.js +12 -0
  182. package/dist/collection/components/vega-rich-text-editor/extensions/table/actions/split-table-cell-action.js +13 -0
  183. package/dist/collection/components/vega-rich-text-editor/extensions/table/actions/table-annotations-action.js +18 -0
  184. package/dist/collection/components/vega-rich-text-editor/extensions/table/actions/table-caption-action.js +13 -0
  185. package/dist/collection/components/vega-rich-text-editor/extensions/table/actions/table-cell-annotations-action.js +28 -0
  186. package/dist/collection/components/vega-rich-text-editor/extensions/table/actions/table-head-cell-annotations-action.js +17 -0
  187. package/dist/collection/components/vega-rich-text-editor/extensions/table/actions/toggle-header-row-action.js +13 -0
  188. package/dist/collection/components/vega-rich-text-editor/extensions/table/actions/toggle-header-table-column-action.js +15 -0
  189. package/dist/collection/components/vega-rich-text-editor/extensions/table/actions/update-table-properties-action.js +38 -0
  190. package/dist/collection/components/vega-rich-text-editor/extensions/table/annotation-handler/table-annotation-handler-base.js +78 -0
  191. package/dist/collection/components/vega-rich-text-editor/extensions/table/annotation-handler/table-annotation-handler.js +69 -0
  192. package/dist/collection/components/vega-rich-text-editor/extensions/table/annotation-handler/table-cell-annotation-handler.js +108 -0
  193. package/dist/collection/components/vega-rich-text-editor/extensions/table/annotation-handler/table-head-cell-annotation-handler.js +14 -0
  194. package/dist/collection/components/vega-rich-text-editor/extensions/table/annotations/table-annotation.js +106 -0
  195. package/dist/collection/components/vega-rich-text-editor/extensions/table/annotations/table-caption-annotation.js +69 -0
  196. package/dist/collection/components/vega-rich-text-editor/extensions/table/annotations/table-cell-annotation.js +192 -0
  197. package/dist/collection/components/vega-rich-text-editor/extensions/table/annotations/table-color-annotation.js +66 -0
  198. package/dist/collection/components/vega-rich-text-editor/extensions/table/annotations/table-head-cell-annotation.js +56 -0
  199. package/dist/collection/components/vega-rich-text-editor/extensions/table/constants/styles.constants.js +27 -0
  200. package/dist/collection/components/vega-rich-text-editor/extensions/table/dto/table-block.js +119 -0
  201. package/dist/collection/components/vega-rich-text-editor/extensions/table/dto/table-body-block.js +56 -0
  202. package/dist/collection/components/vega-rich-text-editor/extensions/table/dto/table-caption-block.js +69 -0
  203. package/dist/collection/components/vega-rich-text-editor/extensions/table/dto/table-cell-block.js +97 -0
  204. package/dist/collection/components/vega-rich-text-editor/extensions/table/dto/table-head-block.js +60 -0
  205. package/dist/collection/components/vega-rich-text-editor/extensions/table/dto/table-head-cell-block.js +53 -0
  206. package/dist/collection/components/vega-rich-text-editor/extensions/table/dto/table-row-block.js +60 -0
  207. package/dist/collection/components/vega-rich-text-editor/extensions/table/element-to-dto-strategies/caption-to-caption-block-strategy.js +71 -0
  208. package/dist/collection/components/vega-rich-text-editor/extensions/table/element-to-dto-strategies/table-to-table-block-strategy.js +42 -0
  209. package/dist/collection/components/vega-rich-text-editor/extensions/table/element-to-dto-strategies/tbody-to-table-body-block-strategy.js +42 -0
  210. package/dist/collection/components/vega-rich-text-editor/extensions/table/element-to-dto-strategies/td-to-table-cell-block-strategy.js +93 -0
  211. package/dist/collection/components/vega-rich-text-editor/extensions/table/element-to-dto-strategies/thead-to-table-head-block-strategy.js +42 -0
  212. package/dist/collection/components/vega-rich-text-editor/extensions/table/element-to-dto-strategies/tr-to-table-row-block-strategy.js +42 -0
  213. package/dist/collection/components/vega-rich-text-editor/extensions/table/renderers/table-body-renderer.js +15 -0
  214. package/dist/collection/components/vega-rich-text-editor/extensions/table/renderers/table-caption-renderer.js +22 -0
  215. package/dist/collection/components/vega-rich-text-editor/extensions/table/renderers/table-cell-renderer.js +72 -0
  216. package/dist/collection/components/vega-rich-text-editor/extensions/table/renderers/table-dynamic-popover-renderer.js +263 -0
  217. package/dist/collection/components/vega-rich-text-editor/extensions/table/renderers/table-head-cell-renderer.js +12 -0
  218. package/dist/collection/components/vega-rich-text-editor/extensions/table/renderers/table-head-renderer.js +15 -0
  219. package/dist/collection/components/vega-rich-text-editor/extensions/table/renderers/table-popover-base-renderer.js +19 -0
  220. package/dist/collection/components/vega-rich-text-editor/extensions/table/renderers/table-renderer.js +116 -0
  221. package/dist/collection/components/vega-rich-text-editor/extensions/table/renderers/table-row-renderer.js +15 -0
  222. package/dist/collection/components/vega-rich-text-editor/extensions/table/renderers/table-setting-popover-renderer.js +148 -0
  223. package/dist/collection/components/vega-rich-text-editor/extensions/table/renderers/table-toolbar-popover-renderer.js +178 -0
  224. package/dist/collection/components/vega-rich-text-editor/extensions/table/setting-event-handlers/caption-operation.js +78 -0
  225. package/dist/collection/components/vega-rich-text-editor/extensions/table/setting-event-handlers/cell-properties-cancel-event-handler.js +17 -0
  226. package/dist/collection/components/vega-rich-text-editor/extensions/table/setting-event-handlers/cell-properties-change-event-handler.js +15 -0
  227. package/dist/collection/components/vega-rich-text-editor/extensions/table/setting-event-handlers/cell-properties-save-event-handler.js +19 -0
  228. package/dist/collection/components/vega-rich-text-editor/extensions/table/setting-event-handlers/cell-properties.js +136 -0
  229. package/dist/collection/components/vega-rich-text-editor/extensions/table/setting-event-handlers/column-operation.js +109 -0
  230. package/dist/collection/components/vega-rich-text-editor/extensions/table/setting-event-handlers/merge-cells-operation.js +100 -0
  231. package/dist/collection/components/vega-rich-text-editor/extensions/table/setting-event-handlers/row-operation.js +160 -0
  232. package/dist/collection/components/vega-rich-text-editor/extensions/table/setting-event-handlers/setting-event-handler.abstract.js +45 -0
  233. package/dist/collection/components/vega-rich-text-editor/extensions/table/setting-event-handlers/split-cell-operation.js +57 -0
  234. package/dist/collection/components/vega-rich-text-editor/extensions/table/setting-event-handlers/table-properties-cancel-event-handler.js +19 -0
  235. package/dist/collection/components/vega-rich-text-editor/extensions/table/setting-event-handlers/table-properties-change-event-handler.js +20 -0
  236. package/dist/collection/components/vega-rich-text-editor/extensions/table/setting-event-handlers/table-properties-save-event-handler.js +20 -0
  237. package/dist/collection/components/vega-rich-text-editor/extensions/table/setting-event-handlers/table-properties.js +50 -0
  238. package/dist/collection/components/vega-rich-text-editor/extensions/table/table-extension.js +174 -0
  239. package/dist/collection/components/vega-rich-text-editor/extensions/table/table-icon.js +3 -0
  240. package/dist/collection/components/vega-rich-text-editor/extensions/table/table-selection.js +460 -0
  241. package/dist/collection/components/vega-rich-text-editor/extensions/table/table-toolbar-button-renderer.js +61 -0
  242. package/dist/collection/components/vega-rich-text-editor/extensions/table/utils/table-color-manager.js +55 -0
  243. package/dist/collection/components/vega-rich-text-editor/extensions/table/utils/utils.js +436 -0
  244. package/dist/collection/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-properties/assets/align-bottom.js +3 -0
  245. package/dist/collection/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-properties/assets/align-middle.js +3 -0
  246. package/dist/collection/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-properties/assets/align-top.js +3 -0
  247. package/dist/collection/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-properties/assets/objects-align-center-horizontal.js +3 -0
  248. package/dist/collection/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-properties/assets/objects-align-left.js +3 -0
  249. package/dist/collection/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-properties/assets/objects-align-right.js +3 -0
  250. 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 +58 -0
  251. 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 +106 -0
  252. 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 +291 -0
  253. 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 +58 -0
  254. 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 +111 -0
  255. package/dist/collection/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-properties/vega-rich-text-table-properties.css +149 -0
  256. package/dist/collection/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-properties/vega-rich-text-table-properties.js +251 -0
  257. package/dist/collection/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-selection-widget/slimmers/controllers/selection-widget-keyboard-controller.js +36 -0
  258. package/dist/collection/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-selection-widget/slimmers/renderers/selection-widget-renderer.js +83 -0
  259. package/dist/collection/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-selection-widget/vega-rich-text-table-selection-widget.css +41 -0
  260. package/dist/collection/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-selection-widget/vega-rich-text-table-selection-widget.js +80 -0
  261. package/dist/collection/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-setting/assets/icon.js +20 -0
  262. package/dist/collection/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-setting/slimmers/renderers/caption-button-slimmer.js +27 -0
  263. package/dist/collection/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-setting/slimmers/renderers/cell-properties-button-slimmer.js +26 -0
  264. package/dist/collection/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-setting/slimmers/renderers/column-button-slimmer.js +90 -0
  265. package/dist/collection/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-setting/slimmers/renderers/merge-cells-button-slimmer.js +117 -0
  266. package/dist/collection/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-setting/slimmers/renderers/row-button-slimmer.js +103 -0
  267. package/dist/collection/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-setting/slimmers/renderers/table-properties-button-slimmer.js +26 -0
  268. package/dist/collection/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-setting/slimmers/renderers/table-setting-button-slimmer.abstract.js +76 -0
  269. package/dist/collection/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-setting/slimmers/renderers/vega-rich-text-table-setting-renderer.js +55 -0
  270. package/dist/collection/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-setting/vega-rich-text-table-setting.css +23 -0
  271. package/dist/collection/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-setting/vega-rich-text-table-setting.js +222 -0
  272. package/dist/collection/components/vega-rich-text-editor/helpers/extension-context-manager.test.js +2 -0
  273. package/dist/collection/components/vega-rich-text-editor/public-api.js +1 -0
  274. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/extension-controller.js +35 -6
  275. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/annotation-handler/html-element-to-annotation-generator.js +10 -0
  276. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/input-event-handler/insert-paragraph-handler.js +2 -1
  277. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/selection-controller.js +26 -2
  278. package/dist/collection/components/vega-rich-text-editor/test/dto/content-state.test.js +252 -0
  279. package/dist/collection/components/vega-rich-text-editor/test/extensions/extension-test-utils.js +2 -0
  280. package/dist/collection/components/vega-rich-text-editor/test/extensions/table/annotation-handler/annotation-handler-registration.test.js +164 -0
  281. package/dist/collection/components/vega-rich-text-editor/test/extensions/table/annotation-handler/table-annotation-handler.test.js +298 -0
  282. package/dist/collection/components/vega-rich-text-editor/test/extensions/table/annotation-handler/table-cell-annotation-handler.test.js +316 -0
  283. package/dist/collection/components/vega-rich-text-editor/test/extensions/table/annotation-handler/table-head-cell-annotation-handler.test.js +411 -0
  284. package/dist/collection/components/vega-rich-text-editor/test/extensions/table/caption-operation.test.js +99 -0
  285. package/dist/collection/components/vega-rich-text-editor/test/extensions/table/table-annotation.test.js +181 -0
  286. package/dist/collection/components/vega-rich-text-editor/test/extensions/table/table-caption-annotations.test.js +84 -0
  287. package/dist/collection/components/vega-rich-text-editor/test/extensions/table/table-cell-annotation.test.js +331 -0
  288. package/dist/collection/components/vega-rich-text-editor/test/extensions/table/table-color-annotation.test.js +32 -0
  289. package/dist/collection/components/vega-rich-text-editor/test/extensions/table/table-dto.test.js +1094 -0
  290. package/dist/collection/components/vega-rich-text-editor/test/extensions/table/table-element-to-dto-strategies.test.js +1590 -0
  291. package/dist/collection/components/vega-rich-text-editor/test/extensions/table/table-test-utils.js +172 -0
  292. package/dist/collection/components/vega-rich-text-editor/test/filter-styles-strategies/filter-styles-strategy.test.js +129 -0
  293. package/dist/collection/components/vega-rich-text-editor/test/spec-utils.js +5 -2
  294. package/dist/collection/components/vega-rich-text-editor/vega-rich-text-editor.css +4 -0
  295. package/dist/collection/components/vega-rich-text-editor/vega-rich-text-editor.js +0 -5
  296. package/dist/collection/components/vega-time-picker/slimmers/renderers/vega-time-picker-range-input-renderer.js +5 -2
  297. package/dist/collection/components/vega-time-picker/slimmers/renderers/vega-time-picker-single-input-renderer.js +4 -1
  298. package/dist/collection/components/vega-time-picker/vega-time-picker.js +36 -0
  299. package/dist/collection/constants/runtime-metrics-payload-definition/vega-time-picker/runtime-metrics-payload-definition.js +24 -0
  300. package/dist/collection/constants/ui.js +2 -0
  301. package/dist/collection/global/scripts/before-vega-load.js +2 -0
  302. package/dist/collection/helpers/event-manager/event-id/vega-internal-event-id.js +2 -0
  303. package/dist/collection/helpers/formatter/responsive-map-formatter/responsive-format-facade.js +3 -0
  304. package/dist/collection/helpers/formatter/responsive-map-formatter/responsive-grid-justify-items-formatter.js +29 -0
  305. package/dist/collection/helpers/formatter/test/responsive-map-formatter/responsive-grid-justify-items-formatter.test.js +19 -0
  306. package/dist/collection/helpers/slimmers/aria-dialog-focusable-trap-slimmer.js +213 -0
  307. package/dist/collection/helpers/slimmers/element-appender/body-positioned-wrapper/test/vega-popover-wrapper.test.js +66 -0
  308. package/dist/collection/helpers/slimmers/position-calculation/base-position-calculation-strategy.js +1 -1
  309. package/dist/collection/helpers/slimmers/position-calculation/test/body-position-calculation-strategy.test.js +49 -3
  310. package/dist/collection/helpers/slimmers/position-calculation/test/screen-position-calculation-strategy.test.js +18 -0
  311. package/dist/collection/helpers/slimmers/test/aria-dialog-focusable-trap-slimmer.test.js +375 -0
  312. package/dist/collection/helpers/translation/locales/en.js +2 -0
  313. package/dist/collection/helpers/translation/tests/internal-translation-controller.test.js +2 -0
  314. package/dist/collection/types/type-guard.js +10 -1
  315. package/dist/collection/utils/e2e-utils.js +51 -3
  316. package/dist/collection/utils/object.js +6 -4
  317. package/dist/collection/utils/spec-utils.js +4 -3
  318. package/dist/collection/utils/ui.js +20 -0
  319. package/dist/esm/align-left-7f959adf.js +17 -0
  320. package/dist/esm/{app-globals-3b97bb20.js → app-globals-776ccaa3.js} +8 -6
  321. package/dist/esm/aria-dialog-focusable-trap-slimmer-cc98a7a4.js +216 -0
  322. package/dist/esm/auto-run-when-re-render-task-queue-slimmer.abstract-27820d4c.js +49 -0
  323. package/dist/esm/{breakpoints-13353e09.js → breakpoints-332702ed.js} +1 -1
  324. package/dist/esm/{child-nodes-event-prevent-slimmer-4feabae0.js → child-nodes-event-prevent-slimmer-2ecc3e1f.js} +1 -1
  325. package/dist/esm/{child-nodes-notify-observer-slimmer-541dd6a4.js → child-nodes-notify-observer-slimmer-c7297b9f.js} +1 -1
  326. package/dist/esm/{code-block-d65bab61.js → code-block-58d1dbe5.js} +39 -8
  327. package/dist/esm/{component-value-history-controller-slimmer.abstract-556fcf2a.js → component-value-history-controller-slimmer.abstract-5beb8acb.js} +35 -56
  328. package/dist/esm/{dto-renderer-manager-73df5cbe.js → content-state-dad1fd71.js} +17 -62
  329. package/dist/esm/{date-required-rule-4ffd9cae.js → date-required-rule-4c40a4eb.js} +1 -1
  330. package/dist/esm/{deprecated-property-slimmer-2c14df89.js → deprecated-property-slimmer-ea34fa7b.js} +1 -1
  331. package/dist/esm/{design-token-b518a2aa.js → design-token-9c4eb6b1.js} +3 -3
  332. package/dist/esm/{dom-node-subject-observer-factory-82f346e3.js → dom-node-subject-observer-factory-94b2e2c3.js} +1 -1
  333. package/dist/esm/dto-renderer-manager-12bc9121.js +56 -0
  334. package/dist/esm/{element-appender-slimmer-36b7a572.js → element-appender-slimmer-fde815dc.js} +8 -8
  335. package/dist/esm/{event-emit-slimmer-f879fd58.js → event-emit-slimmer-b236945b.js} +2 -2
  336. package/dist/esm/{form-field-controller-slimmer-9a880420.js → form-field-controller-slimmer-00fa3678.js} +6 -6
  337. package/dist/esm/{image-annotation-action-eb3dcad5.js → image-annotation-action-1ec7b461.js} +5 -32
  338. package/dist/esm/index-090d31ca.js +4 -0
  339. package/dist/esm/index.js +30 -26
  340. package/dist/esm/{inject-keyboard-manager-e5481833.js → inject-keyboard-manager-784b1364.js} +1 -1
  341. package/dist/esm/{internal-translation-controller-0787a7a7.js → internal-translation-controller-b08aa9ab.js} +2 -0
  342. package/dist/esm/{internal-vega-event-manager-3aebbe55.js → internal-vega-event-manager-59f5bd47.js} +1 -1
  343. package/dist/esm/{keyboard-manager-4dfc625f.js → keyboard-manager-e020039f.js} +2 -2
  344. package/dist/esm/{keyboard-manager-slimmer-87bf68f1.js → keyboard-manager-slimmer-4722d20c.js} +1 -1
  345. package/dist/esm/loader.js +26 -21
  346. package/dist/esm/{month-view-generator-94134ec5.js → month-view-generator-6fe1f491.js} +1 -1
  347. package/dist/esm/{object-66c37948.js → object-0c277f57.js} +6 -4
  348. package/dist/esm/{page-resize-observer-slimmer-e0505250.js → page-resize-observer-slimmer-e24d36c5.js} +1 -1
  349. package/dist/esm/{public-rules-49912d52.js → public-rules-1626fb0d.js} +12 -12
  350. package/dist/esm/{range-0a22b512.js → range-4f9bf69d.js} +2 -2
  351. package/dist/esm/{responsive-format-facade-b3799ff9.js → responsive-format-facade-e8534e59.js} +31 -3
  352. package/dist/esm/{rich-text-editor-required-rule-d86e3a51.js → rich-text-editor-required-rule-c391aeb6.js} +1 -1
  353. package/dist/esm/split-cell-operation-55cd9fae.js +2360 -0
  354. package/dist/esm/{string-format-strategy.abstract-e40a0df7.js → string-format-strategy.abstract-8c48e515.js} +1 -1
  355. package/dist/esm/{string-input-formatter-slimmer-076764fc.js → string-input-formatter-slimmer-519480ce.js} +4 -4
  356. package/dist/esm/{string-mask-strategy-df1f5707.js → string-mask-strategy-8070817e.js} +2 -2
  357. package/dist/esm/{style-formatter-95255392.js → style-formatter-7afd0680.js} +2 -2
  358. package/dist/esm/{sub-state-notify-slimmer-f4b3b0b9.js → sub-state-notify-slimmer-54531808.js} +2 -2
  359. package/dist/esm/{sub-state-observer-slimmer-058feaf0.js → sub-state-observer-slimmer-b3a773c5.js} +3 -3
  360. package/dist/esm/{time-required-rule-b4af75ae.js → time-required-rule-2569e5ad.js} +1 -1
  361. package/dist/esm/token-extension-612575cb.js +7417 -0
  362. package/dist/esm/{translation-slimmer-e788cae4.js → translation-slimmer-35b1d0fa.js} +1 -1
  363. package/dist/esm/{type-guard-f69d2935.js → type-guard-c20cbbff.js} +12 -3
  364. package/dist/esm/{ui-41f725b7.js → ui-93922c59.js} +3 -1
  365. package/dist/esm/{ui-ee31416b.js → ui-ac244bf0.js} +21 -1
  366. package/dist/esm/{valid-credit-card-number-rule-c023326d.js → valid-credit-card-number-rule-b9c3c2f8.js} +1 -1
  367. package/dist/esm/vega-accordion.entry.js +11 -11
  368. package/dist/esm/vega-app-header-button.entry.js +13 -13
  369. package/dist/esm/vega-backdrop.entry.js +2 -2
  370. package/dist/esm/vega-banner.entry.js +5 -5
  371. package/dist/esm/vega-box.entry.js +9 -9
  372. package/dist/esm/vega-breadcrumb.entry.js +6 -6
  373. package/dist/esm/vega-button-circle.entry.js +13 -13
  374. package/dist/esm/vega-button-group_2.entry.js +9 -9
  375. package/dist/esm/vega-button-link.entry.js +6 -6
  376. package/dist/esm/vega-button.entry.js +13 -13
  377. package/dist/esm/vega-calendar_4.entry.js +229 -168
  378. package/dist/esm/vega-card.entry.js +7 -7
  379. package/dist/esm/vega-carousel.entry.js +13 -13
  380. package/dist/esm/vega-checkbox_2.entry.js +14 -14
  381. package/dist/esm/vega-chip.entry.js +13 -13
  382. package/dist/esm/vega-code-block.entry.js +18 -17
  383. package/dist/esm/vega-color-picker.entry.js +12 -12
  384. package/dist/esm/vega-combo-box.entry.js +16 -16
  385. package/dist/esm/vega-date-picker_2.entry.js +107 -34
  386. package/dist/esm/vega-dialog_2.entry.js +55 -18
  387. package/dist/esm/vega-divider.entry.js +7 -7
  388. package/dist/esm/vega-dropdown_5.entry.js +20 -20
  389. package/dist/esm/vega-env-manager-8f8dc473.js +2 -2
  390. package/dist/esm/{vega-event-id-fdc58a67.js → vega-event-id-4ede557a.js} +1 -1
  391. package/dist/esm/vega-field-label.entry.js +5 -5
  392. package/dist/esm/vega-file-uploader.entry.js +13 -13
  393. package/dist/esm/vega-flag-icon.entry.js +6 -6
  394. package/dist/esm/vega-flex.entry.js +9 -9
  395. package/dist/esm/vega-font.entry.js +8 -8
  396. package/dist/esm/vega-form.entry.js +16 -16
  397. package/dist/esm/vega-grid.entry.js +9 -8
  398. package/dist/esm/vega-icon.entry.js +7 -7
  399. package/dist/esm/vega-image-uploader.entry.js +16 -16
  400. package/dist/esm/vega-input-credit-card.entry.js +17 -17
  401. package/dist/esm/vega-input-numeric.entry.js +17 -17
  402. package/dist/esm/vega-input-passcode.entry.js +16 -16
  403. package/dist/esm/vega-input-phone-number.entry.js +15 -15
  404. package/dist/esm/vega-input-range.entry.js +14 -14
  405. package/dist/esm/vega-input-select.entry.js +16 -16
  406. package/dist/esm/vega-input.entry.js +32 -19
  407. package/dist/esm/{vega-internal-event-id-12783594.js → vega-internal-event-id-8002b179.js} +3 -1
  408. package/dist/esm/vega-item-toggle.entry.js +8 -8
  409. package/dist/esm/vega-left-nav_5.entry.js +17 -17
  410. package/dist/esm/vega-loader-wrapper_2.entry.js +7 -7
  411. package/dist/esm/vega-page-notification_2.entry.js +3 -3
  412. package/dist/esm/vega-pagination-page-selector-mobile.entry.js +6 -6
  413. package/dist/esm/vega-pagination-page-size-selector-mobile.entry.js +6 -6
  414. package/dist/esm/vega-pagination.entry.js +14 -14
  415. package/dist/esm/vega-popover_2.entry.js +17 -16
  416. package/dist/esm/vega-progress-tracker_2.entry.js +16 -16
  417. package/dist/esm/vega-radio_2.entry.js +17 -17
  418. package/dist/esm/vega-rich-text-content.entry.js +21 -23
  419. package/dist/esm/vega-rich-text-editor_4.entry.js +196 -231
  420. package/dist/esm/vega-rich-text-table-properties_3.entry.js +1521 -0
  421. package/dist/esm/vega-segment-control.entry.js +8 -8
  422. package/dist/esm/vega-selection-chip_2.entry.js +16 -16
  423. package/dist/esm/vega-selection-tile_2.entry.js +15 -15
  424. package/dist/esm/vega-sidenav_3.entry.js +14 -14
  425. package/dist/esm/vega-signature-capture.entry.js +17 -17
  426. package/dist/esm/vega-stepper.entry.js +13 -13
  427. package/dist/esm/vega-tab-group_2.entry.js +9 -9
  428. package/dist/esm/vega-table_11.entry.js +17 -17
  429. package/dist/esm/vega-text.entry.js +4 -4
  430. package/dist/esm/vega-textarea.entry.js +13 -13
  431. package/dist/esm/vega-time-picker_2.entry.js +65 -23
  432. package/dist/esm/vega-toggle-switch.entry.js +12 -12
  433. package/dist/esm/vega-tooltip_2.entry.js +14 -14
  434. package/dist/esm/vega.js +26 -21
  435. package/dist/esm/{wait-for-component-did-render-4d0a3428.js → wait-for-component-did-render-1e62d6f7.js} +2 -2
  436. package/dist/sri/vega-sri-manifest.json +384 -360
  437. package/dist/types/components/vega-calendar/slimmers/common/controllers/vega-calendar-day-view-focus-slimmer.d.ts +15 -0
  438. package/dist/types/components/vega-calendar/slimmers/month-view/renderers/vega-calendar-month-view-renderer.d.ts +3 -0
  439. package/dist/types/components/vega-calendar/vega-calendar-event-preview/slimmers/renderers/vega-calendar-event-preview-detail-renderer.d.ts +1 -0
  440. package/dist/types/components/vega-calendar/vega-calendar.d.ts +2 -0
  441. package/dist/types/components/vega-date-picker/slimmers/controllers/vega-date-picker-calendar-open-state-controller.d.ts +2 -0
  442. package/dist/types/components/vega-date-picker/slimmers/renderers/vega-date-picker-calendar-renderer.d.ts +5 -0
  443. package/dist/types/components/vega-date-picker/slimmers/renderers/vega-date-picker-input-renderer-base.abstract.d.ts +2 -0
  444. package/dist/types/components/vega-date-picker/slimmers/renderers/vega-date-picker-range-input-renderer.d.ts +3 -0
  445. package/dist/types/components/vega-date-picker/slimmers/renderers/vega-date-picker-single-input-renderer.d.ts +5 -0
  446. package/dist/types/components/vega-grid/vega-grid.d.ts +13 -1
  447. package/dist/types/components/vega-input/slimmers/renderers/vega-input-input-renderer.d.ts +1 -0
  448. package/dist/types/components/vega-input/vega-input.d.ts +10 -0
  449. package/dist/types/components/vega-modal/slimmers/controllers/vega-modal-open-state-controller.d.ts +13 -0
  450. package/dist/types/components/vega-modal/slimmers/renderers/vega-modal-renderer.d.ts +1 -0
  451. package/dist/types/components/vega-popover/slimmers/controllers/vega-popover-appender-controller.d.ts +1 -0
  452. package/dist/types/components/vega-rich-text-content/vega-rich-text-content.d.ts +3 -0
  453. package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/action-handle-strategy.abstract.d.ts +7 -0
  454. package/dist/types/components/vega-rich-text-editor/dto/annotations/annotation.abstract.d.ts +2 -5
  455. package/dist/types/components/vega-rich-text-editor/dto/annotations/block-annotation.abstract.d.ts +3 -3
  456. package/dist/types/components/vega-rich-text-editor/dto/annotations/custom-attribute-annotation.d.ts +1 -1
  457. package/dist/types/components/vega-rich-text-editor/dto/blocks/block.abstract.d.ts +10 -6
  458. package/dist/types/components/vega-rich-text-editor/dto/filter-styles-strategies/filter-styles-strategy-registry.d.ts +28 -0
  459. package/dist/types/components/vega-rich-text-editor/dto/filter-styles-strategies/filter-styles-strategy.abstract.d.ts +25 -0
  460. package/dist/types/components/vega-rich-text-editor/dto/renderers/nodes/text-node-renderer.d.ts +0 -2
  461. package/dist/types/components/vega-rich-text-editor/extensions/extension.abstract.d.ts +15 -2
  462. package/dist/types/components/vega-rich-text-editor/extensions/table/action-handler-interceptors/prevent-cell-children-remove-interceptor.d.ts +25 -0
  463. package/dist/types/components/vega-rich-text-editor/extensions/table/action-handler-interceptors/prevent-cell-content-delete-interceptor.d.ts +20 -0
  464. package/dist/types/components/vega-rich-text-editor/extensions/table/action-handler-interceptors/prevent-row-insert-interceptor.d.ts +19 -0
  465. package/dist/types/components/vega-rich-text-editor/extensions/table/action-handler-interceptors/prevent-table-insert-paragraph-interceptor.d.ts +31 -0
  466. package/dist/types/components/vega-rich-text-editor/extensions/table/action-handler-strategies/create-segment-table-cell-strategy.d.ts +20 -0
  467. package/dist/types/components/vega-rich-text-editor/extensions/table/action-handler-strategies/delete-table-block-strategy.d.ts +14 -0
  468. package/dist/types/components/vega-rich-text-editor/extensions/table/action-handler-strategies/delete-table-column-strategy.d.ts +74 -0
  469. package/dist/types/components/vega-rich-text-editor/extensions/table/action-handler-strategies/delete-table-row-strategy.d.ts +55 -0
  470. package/dist/types/components/vega-rich-text-editor/extensions/table/action-handler-strategies/insert-table-block-strategy.d.ts +27 -0
  471. package/dist/types/components/vega-rich-text-editor/extensions/table/action-handler-strategies/insert-table-column-strategy.d.ts +60 -0
  472. package/dist/types/components/vega-rich-text-editor/extensions/table/action-handler-strategies/insert-table-row-into-different-section-strategy.d.ts +21 -0
  473. package/dist/types/components/vega-rich-text-editor/extensions/table/action-handler-strategies/insert-table-row-into-same-section-strategy.d.ts +13 -0
  474. package/dist/types/components/vega-rich-text-editor/extensions/table/action-handler-strategies/merge-cells-strategy.d.ts +38 -0
  475. package/dist/types/components/vega-rich-text-editor/extensions/table/action-handler-strategies/replace-table-cell-strategy.d.ts +12 -0
  476. package/dist/types/components/vega-rich-text-editor/extensions/table/action-handler-strategies/select-table-column-strategy.d.ts +12 -0
  477. package/dist/types/components/vega-rich-text-editor/extensions/table/action-handler-strategies/split-cell-horizontally-strategy.d.ts +43 -0
  478. package/dist/types/components/vega-rich-text-editor/extensions/table/action-handler-strategies/split-cell-vertically-strategy.d.ts +27 -0
  479. package/dist/types/components/vega-rich-text-editor/extensions/table/action-handler-strategies/split-table-cell-strategy.d.ts +12 -0
  480. package/dist/types/components/vega-rich-text-editor/extensions/table/action-handler-strategies/table-column-strategy.abstract.d.ts +23 -0
  481. package/dist/types/components/vega-rich-text-editor/extensions/table/action-handler-strategies/table-row-strategy.abstract.d.ts +120 -0
  482. package/dist/types/components/vega-rich-text-editor/extensions/table/action-handler-strategies/toggle-header-row-strategy.d.ts +86 -0
  483. package/dist/types/components/vega-rich-text-editor/extensions/table/action-handler-strategies/toggle-header-table-column-strategy.d.ts +55 -0
  484. package/dist/types/components/vega-rich-text-editor/extensions/table/action-handler-strategies/update-table-cell-properties-strategy.d.ts +13 -0
  485. package/dist/types/components/vega-rich-text-editor/extensions/table/action-handler-strategies/update-table-properties-strategy.d.ts +12 -0
  486. package/dist/types/components/vega-rich-text-editor/extensions/table/actions/create-segment-table-cell-action.d.ts +21 -0
  487. package/dist/types/components/vega-rich-text-editor/extensions/table/actions/delete-table-block-action.d.ts +12 -0
  488. package/dist/types/components/vega-rich-text-editor/extensions/table/actions/delete-table-column-action.d.ts +15 -0
  489. package/dist/types/components/vega-rich-text-editor/extensions/table/actions/delete-table-row-action.d.ts +17 -0
  490. package/dist/types/components/vega-rich-text-editor/extensions/table/actions/insert-table-block-action.d.ts +20 -0
  491. package/dist/types/components/vega-rich-text-editor/extensions/table/actions/insert-table-column-action.d.ts +23 -0
  492. package/dist/types/components/vega-rich-text-editor/extensions/table/actions/insert-table-row-into-different-section-action.d.ts +20 -0
  493. package/dist/types/components/vega-rich-text-editor/extensions/table/actions/insert-table-row-into-same-section-action.d.ts +24 -0
  494. package/dist/types/components/vega-rich-text-editor/extensions/table/actions/merge-cells-action.d.ts +33 -0
  495. package/dist/types/components/vega-rich-text-editor/extensions/table/actions/replace-table-cell-action.d.ts +13 -0
  496. package/dist/types/components/vega-rich-text-editor/extensions/table/actions/select-table-column-action.d.ts +18 -0
  497. package/dist/types/components/vega-rich-text-editor/extensions/table/actions/split-cell-horizontally-action.d.ts +10 -0
  498. package/dist/types/components/vega-rich-text-editor/extensions/table/actions/split-cell-vertically-action.d.ts +10 -0
  499. package/dist/types/components/vega-rich-text-editor/extensions/table/actions/split-table-cell-action.d.ts +22 -0
  500. package/dist/types/components/vega-rich-text-editor/extensions/table/actions/table-annotations-action.d.ts +16 -0
  501. package/dist/types/components/vega-rich-text-editor/extensions/table/actions/table-caption-action.d.ts +14 -0
  502. package/dist/types/components/vega-rich-text-editor/extensions/table/actions/table-cell-annotations-action.d.ts +20 -0
  503. package/dist/types/components/vega-rich-text-editor/extensions/table/actions/table-head-cell-annotations-action.d.ts +14 -0
  504. package/dist/types/components/vega-rich-text-editor/extensions/table/actions/toggle-header-row-action.d.ts +12 -0
  505. package/dist/types/components/vega-rich-text-editor/extensions/table/actions/toggle-header-table-column-action.d.ts +16 -0
  506. package/dist/types/components/vega-rich-text-editor/extensions/table/actions/update-table-properties-action.d.ts +18 -0
  507. package/dist/types/components/vega-rich-text-editor/extensions/table/annotation-handler/table-annotation-handler-base.d.ts +36 -0
  508. package/dist/types/components/vega-rich-text-editor/extensions/table/annotation-handler/table-annotation-handler.d.ts +26 -0
  509. package/dist/types/components/vega-rich-text-editor/extensions/table/annotation-handler/table-cell-annotation-handler.d.ts +56 -0
  510. package/dist/types/components/vega-rich-text-editor/extensions/table/annotation-handler/table-head-cell-annotation-handler.d.ts +13 -0
  511. package/dist/types/components/vega-rich-text-editor/extensions/table/annotations/table-annotation.d.ts +73 -0
  512. package/dist/types/components/vega-rich-text-editor/extensions/table/annotations/table-caption-annotation.d.ts +32 -0
  513. package/dist/types/components/vega-rich-text-editor/extensions/table/annotations/table-cell-annotation.d.ts +100 -0
  514. package/dist/types/components/vega-rich-text-editor/extensions/table/annotations/table-color-annotation.d.ts +44 -0
  515. package/dist/types/components/vega-rich-text-editor/extensions/table/annotations/table-head-cell-annotation.d.ts +27 -0
  516. package/dist/types/components/vega-rich-text-editor/extensions/table/constants/styles.constants.d.ts +4 -0
  517. package/dist/types/components/vega-rich-text-editor/extensions/table/dto/table-block.d.ts +79 -0
  518. package/dist/types/components/vega-rich-text-editor/extensions/table/dto/table-body-block.d.ts +42 -0
  519. package/dist/types/components/vega-rich-text-editor/extensions/table/dto/table-caption-block.d.ts +41 -0
  520. package/dist/types/components/vega-rich-text-editor/extensions/table/dto/table-cell-block.d.ts +64 -0
  521. package/dist/types/components/vega-rich-text-editor/extensions/table/dto/table-head-block.d.ts +42 -0
  522. package/dist/types/components/vega-rich-text-editor/extensions/table/dto/table-head-cell-block.d.ts +34 -0
  523. package/dist/types/components/vega-rich-text-editor/extensions/table/dto/table-row-block.d.ts +44 -0
  524. package/dist/types/components/vega-rich-text-editor/extensions/table/element-to-dto-strategies/caption-to-caption-block-strategy.d.ts +37 -0
  525. package/dist/types/components/vega-rich-text-editor/extensions/table/element-to-dto-strategies/table-to-table-block-strategy.d.ts +26 -0
  526. package/dist/types/components/vega-rich-text-editor/extensions/table/element-to-dto-strategies/tbody-to-table-body-block-strategy.d.ts +26 -0
  527. package/dist/types/components/vega-rich-text-editor/extensions/table/element-to-dto-strategies/td-to-table-cell-block-strategy.d.ts +35 -0
  528. package/dist/types/components/vega-rich-text-editor/extensions/table/element-to-dto-strategies/thead-to-table-head-block-strategy.d.ts +26 -0
  529. package/dist/types/components/vega-rich-text-editor/extensions/table/element-to-dto-strategies/tr-to-table-row-block-strategy.d.ts +26 -0
  530. package/dist/types/components/vega-rich-text-editor/extensions/table/renderers/table-body-renderer.d.ts +12 -0
  531. package/dist/types/components/vega-rich-text-editor/extensions/table/renderers/table-caption-renderer.d.ts +13 -0
  532. package/dist/types/components/vega-rich-text-editor/extensions/table/renderers/table-cell-renderer.d.ts +30 -0
  533. package/dist/types/components/vega-rich-text-editor/extensions/table/renderers/table-dynamic-popover-renderer.d.ts +81 -0
  534. package/dist/types/components/vega-rich-text-editor/extensions/table/renderers/table-head-cell-renderer.d.ts +12 -0
  535. package/dist/types/components/vega-rich-text-editor/extensions/table/renderers/table-head-renderer.d.ts +12 -0
  536. package/dist/types/components/vega-rich-text-editor/extensions/table/renderers/table-popover-base-renderer.d.ts +16 -0
  537. package/dist/types/components/vega-rich-text-editor/extensions/table/renderers/table-renderer.d.ts +38 -0
  538. package/dist/types/components/vega-rich-text-editor/extensions/table/renderers/table-row-renderer.d.ts +12 -0
  539. package/dist/types/components/vega-rich-text-editor/extensions/table/renderers/table-setting-popover-renderer.d.ts +59 -0
  540. package/dist/types/components/vega-rich-text-editor/extensions/table/renderers/table-toolbar-popover-renderer.d.ts +59 -0
  541. package/dist/types/components/vega-rich-text-editor/extensions/table/setting-event-handlers/caption-operation.d.ts +36 -0
  542. package/dist/types/components/vega-rich-text-editor/extensions/table/setting-event-handlers/cell-properties-cancel-event-handler.d.ts +17 -0
  543. package/dist/types/components/vega-rich-text-editor/extensions/table/setting-event-handlers/cell-properties-change-event-handler.d.ts +15 -0
  544. package/dist/types/components/vega-rich-text-editor/extensions/table/setting-event-handlers/cell-properties-save-event-handler.d.ts +17 -0
  545. package/dist/types/components/vega-rich-text-editor/extensions/table/setting-event-handlers/cell-properties.d.ts +62 -0
  546. package/dist/types/components/vega-rich-text-editor/extensions/table/setting-event-handlers/column-operation.d.ts +55 -0
  547. package/dist/types/components/vega-rich-text-editor/extensions/table/setting-event-handlers/merge-cells-operation.d.ts +44 -0
  548. package/dist/types/components/vega-rich-text-editor/extensions/table/setting-event-handlers/row-operation.d.ts +69 -0
  549. package/dist/types/components/vega-rich-text-editor/extensions/table/setting-event-handlers/setting-event-handler.abstract.d.ts +48 -0
  550. package/dist/types/components/vega-rich-text-editor/extensions/table/setting-event-handlers/split-cell-operation.d.ts +31 -0
  551. package/dist/types/components/vega-rich-text-editor/extensions/table/setting-event-handlers/table-properties-cancel-event-handler.d.ts +19 -0
  552. package/dist/types/components/vega-rich-text-editor/extensions/table/setting-event-handlers/table-properties-change-event-handler.d.ts +17 -0
  553. package/dist/types/components/vega-rich-text-editor/extensions/table/setting-event-handlers/table-properties-save-event-handler.d.ts +17 -0
  554. package/dist/types/components/vega-rich-text-editor/extensions/table/setting-event-handlers/table-properties.d.ts +33 -0
  555. package/dist/types/components/vega-rich-text-editor/extensions/table/table-extension.d.ts +36 -0
  556. package/dist/types/components/vega-rich-text-editor/extensions/table/table-icon.d.ts +3 -0
  557. package/dist/types/components/vega-rich-text-editor/extensions/table/table-selection.d.ts +164 -0
  558. package/dist/types/components/vega-rich-text-editor/extensions/table/table-toolbar-button-renderer.d.ts +26 -0
  559. package/dist/types/components/vega-rich-text-editor/extensions/table/utils/table-color-manager.d.ts +27 -0
  560. package/dist/types/components/vega-rich-text-editor/extensions/table/utils/utils.d.ts +190 -0
  561. package/dist/types/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-properties/assets/align-bottom.d.ts +3 -0
  562. package/dist/types/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-properties/assets/align-middle.d.ts +3 -0
  563. package/dist/types/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-properties/assets/align-top.d.ts +3 -0
  564. package/dist/types/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-properties/assets/objects-align-center-horizontal.d.ts +3 -0
  565. package/dist/types/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-properties/assets/objects-align-left.d.ts +3 -0
  566. package/dist/types/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-properties/assets/objects-align-right.d.ts +3 -0
  567. 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 +29 -0
  568. 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 +49 -0
  569. 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 +111 -0
  570. 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 +27 -0
  571. 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 +39 -0
  572. package/dist/types/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-properties/vega-rich-text-table-properties.d.ts +60 -0
  573. package/dist/types/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-selection-widget/slimmers/controllers/selection-widget-keyboard-controller.d.ts +15 -0
  574. package/dist/types/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-selection-widget/slimmers/renderers/selection-widget-renderer.d.ts +31 -0
  575. package/dist/types/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-selection-widget/vega-rich-text-table-selection-widget.d.ts +27 -0
  576. package/dist/types/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-setting/assets/icon.d.ts +2 -0
  577. package/dist/types/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-setting/slimmers/renderers/caption-button-slimmer.d.ts +11 -0
  578. package/dist/types/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-setting/slimmers/renderers/cell-properties-button-slimmer.d.ts +11 -0
  579. package/dist/types/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-setting/slimmers/renderers/column-button-slimmer.d.ts +28 -0
  580. package/dist/types/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-setting/slimmers/renderers/merge-cells-button-slimmer.d.ts +23 -0
  581. package/dist/types/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-setting/slimmers/renderers/row-button-slimmer.d.ts +36 -0
  582. package/dist/types/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-setting/slimmers/renderers/table-properties-button-slimmer.d.ts +11 -0
  583. package/dist/types/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-setting/slimmers/renderers/table-setting-button-slimmer.abstract.d.ts +36 -0
  584. 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 +12 -0
  585. package/dist/types/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-setting/vega-rich-text-table-setting.d.ts +58 -0
  586. package/dist/types/components/vega-rich-text-editor/interface.d.ts +34 -2
  587. package/dist/types/components/vega-rich-text-editor/public-api.d.ts +1 -0
  588. package/dist/types/components/vega-rich-text-editor/slimmers/controllers/extension-controller.d.ts +10 -0
  589. package/dist/types/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/annotation-handler/html-element-to-annotation-generator.d.ts +9 -0
  590. package/dist/types/components/vega-rich-text-editor/slimmers/controllers/selection-controller.d.ts +19 -6
  591. package/dist/types/components/vega-rich-text-editor/test/extensions/table/annotation-handler/annotation-handler-registration.test.d.ts +1 -0
  592. package/dist/types/components/vega-rich-text-editor/test/extensions/table/annotation-handler/table-annotation-handler.test.d.ts +1 -0
  593. package/dist/types/components/vega-rich-text-editor/test/extensions/table/annotation-handler/table-cell-annotation-handler.test.d.ts +8 -0
  594. package/dist/types/components/vega-rich-text-editor/test/extensions/table/annotation-handler/table-head-cell-annotation-handler.test.d.ts +1 -0
  595. package/dist/types/components/vega-rich-text-editor/test/extensions/table/caption-operation.test.d.ts +1 -0
  596. package/dist/types/components/vega-rich-text-editor/test/extensions/table/table-annotation.test.d.ts +1 -0
  597. package/dist/types/components/vega-rich-text-editor/test/extensions/table/table-caption-annotations.test.d.ts +1 -0
  598. package/dist/types/components/vega-rich-text-editor/test/extensions/table/table-cell-annotation.test.d.ts +1 -0
  599. package/dist/types/components/vega-rich-text-editor/test/extensions/table/table-color-annotation.test.d.ts +1 -0
  600. package/dist/types/components/vega-rich-text-editor/test/extensions/table/table-dto.test.d.ts +1 -0
  601. package/dist/types/components/vega-rich-text-editor/test/extensions/table/table-element-to-dto-strategies.test.d.ts +1 -0
  602. package/dist/types/components/vega-rich-text-editor/test/extensions/table/table-test-utils.d.ts +11 -0
  603. package/dist/types/components/vega-rich-text-editor/test/filter-styles-strategies/filter-styles-strategy.test.d.ts +1 -0
  604. package/dist/types/components/vega-rich-text-editor/test/spec-utils.d.ts +4 -0
  605. package/dist/types/components/vega-rich-text-editor/vega-rich-text-editor.d.ts +0 -2
  606. package/dist/types/components/vega-time-picker/slimmers/renderers/vega-time-picker-range-input-renderer.d.ts +1 -0
  607. package/dist/types/components/vega-time-picker/slimmers/renderers/vega-time-picker-single-input-renderer.d.ts +1 -0
  608. package/dist/types/components/vega-time-picker/vega-time-picker.d.ts +12 -0
  609. package/dist/types/components.d.ts +173 -2
  610. package/dist/types/constants/ui.d.ts +1 -0
  611. package/dist/types/helpers/event-manager/event-id/vega-internal-event-id.d.ts +2 -0
  612. package/dist/types/helpers/formatter/responsive-map-formatter/responsive-grid-justify-items-formatter.d.ts +19 -0
  613. package/dist/types/helpers/formatter/test/responsive-map-formatter/responsive-grid-justify-items-formatter.test.d.ts +1 -0
  614. package/dist/types/helpers/slimmers/aria-dialog-focusable-trap-slimmer.d.ts +93 -0
  615. package/dist/types/helpers/slimmers/element-appender/body-positioned-wrapper/test/vega-popover-wrapper.test.d.ts +1 -0
  616. package/dist/types/helpers/slimmers/test/aria-dialog-focusable-trap-slimmer.test.d.ts +1 -0
  617. package/dist/types/helpers/translation/interface.d.ts +3 -1
  618. package/dist/types/types/components.type.d.ts +5 -0
  619. package/dist/types/types/type-guard.d.ts +7 -0
  620. package/dist/types/types/ui.type.d.ts +13 -1
  621. package/dist/types/utils/e2e-utils.d.ts +10 -0
  622. package/dist/types/utils/object.d.ts +6 -2
  623. package/dist/types/utils/spec-utils.d.ts +2 -1
  624. package/dist/types/utils/ui.d.ts +9 -0
  625. package/dist/vega/index.esm.js +1 -1
  626. package/dist/vega/p-02bab5ea.entry.js +1 -0
  627. package/dist/vega/p-02fec68b.entry.js +1 -0
  628. package/dist/vega/{p-3fd3861c.entry.js → p-04f9b0d4.entry.js} +1 -1
  629. package/dist/vega/{p-0681ffee.entry.js → p-076c6445.entry.js} +1 -1
  630. package/dist/vega/{p-c2df94f6.js → p-085d45c9.js} +1 -1
  631. package/dist/vega/p-0ac91609.entry.js +1 -0
  632. package/dist/vega/p-10e9438e.js +1 -0
  633. package/dist/vega/{p-ae6ed091.entry.js → p-14dfdba3.entry.js} +1 -1
  634. package/dist/vega/{p-7f665911.entry.js → p-1665d4b8.entry.js} +1 -1
  635. package/dist/vega/{p-71cd1d9e.entry.js → p-1784724a.entry.js} +1 -1
  636. package/dist/vega/{p-1ff45314.entry.js → p-18378017.entry.js} +1 -1
  637. package/dist/vega/{p-f49e8cc5.entry.js → p-19adff1f.entry.js} +1 -1
  638. package/dist/vega/{p-3b7ad04b.entry.js → p-20981b17.entry.js} +1 -1
  639. package/dist/vega/p-2697b52b.js +1 -0
  640. package/dist/vega/p-28c8ffb4.js +1 -0
  641. package/dist/vega/{p-3e484d99.entry.js → p-28ed34b3.entry.js} +1 -1
  642. package/dist/vega/{p-8852361b.js → p-2a9960c9.js} +1 -1
  643. package/dist/vega/{p-6b4021f0.entry.js → p-2bbbdf87.entry.js} +1 -1
  644. package/dist/vega/p-2fd266fa.js +1 -0
  645. package/dist/vega/p-31945d6c.js +1 -0
  646. package/dist/vega/p-3224e47c.js +1 -0
  647. package/dist/vega/{p-d7434f44.entry.js → p-32a0eed4.entry.js} +1 -1
  648. package/dist/vega/p-33475bcf.entry.js +1 -0
  649. package/dist/vega/{p-7f398d23.entry.js → p-33cacbd6.entry.js} +1 -1
  650. package/dist/vega/p-3a0b3fed.entry.js +1 -0
  651. package/dist/vega/p-3d2d267d.js +1 -0
  652. package/dist/vega/{p-abb81b7b.js → p-405ab757.js} +1 -1
  653. package/dist/vega/{p-31ac7386.js → p-4068e7de.js} +1 -1
  654. package/dist/vega/{p-57180993.entry.js → p-408a1baa.entry.js} +1 -1
  655. package/dist/vega/{p-a253e791.entry.js → p-439c7c13.entry.js} +1 -1
  656. package/dist/vega/{p-db92453f.entry.js → p-441fd2b3.entry.js} +1 -1
  657. package/dist/vega/{p-4e0344bc.entry.js → p-46c7763f.entry.js} +1 -1
  658. package/dist/vega/p-49a2e141.js +1 -0
  659. package/dist/vega/{p-951c0172.js → p-4a9be903.js} +1 -1
  660. package/dist/vega/p-4d65756f.js +1 -0
  661. package/dist/vega/{p-e52890db.js → p-4e15958f.js} +1 -1
  662. package/dist/vega/p-4e76a84d.entry.js +1 -0
  663. package/dist/vega/{p-0009e0bc.entry.js → p-4ea3cf5f.entry.js} +1 -1
  664. package/dist/vega/{p-f5b6059d.entry.js → p-5395faac.entry.js} +1 -1
  665. package/dist/vega/p-541ae774.entry.js +1 -0
  666. package/dist/vega/{p-19883e27.entry.js → p-558a707e.entry.js} +1 -1
  667. package/dist/vega/{p-cc243e62.entry.js → p-561e9097.entry.js} +1 -1
  668. package/dist/vega/p-5b90bbfe.js +1 -0
  669. package/dist/vega/p-5d397ee0.entry.js +1 -0
  670. package/dist/vega/{p-8fbb677e.entry.js → p-5dfd36d3.entry.js} +1 -1
  671. package/dist/vega/p-5f377954.js +1 -1
  672. package/dist/vega/p-603b851c.js +1 -0
  673. package/dist/vega/{p-9dc77b66.entry.js → p-615bc3de.entry.js} +1 -1
  674. package/dist/vega/p-6554a801.js +1 -0
  675. package/dist/vega/{p-a432708d.entry.js → p-667d5b80.entry.js} +1 -1
  676. package/dist/vega/p-679a4046.entry.js +1 -0
  677. package/dist/vega/{p-c208a3b7.js → p-68a531cf.js} +1 -1
  678. package/dist/vega/{p-309b5016.entry.js → p-6b19d33a.entry.js} +1 -1
  679. package/dist/vega/p-6d6ea8b4.js +1 -0
  680. package/dist/vega/p-6db0556d.js +1 -0
  681. package/dist/vega/p-6e05fc55.js +1 -0
  682. package/dist/vega/p-6e13e2fc.js +1 -0
  683. package/dist/vega/p-71720290.entry.js +1 -0
  684. package/dist/vega/{p-5ed5aa26.js → p-76f2e0f5.js} +1 -1
  685. package/dist/vega/p-79df30e3.entry.js +1 -0
  686. package/dist/vega/p-7f68abf7.js +1 -0
  687. package/dist/vega/{p-e7a8b61e.entry.js → p-814c37be.entry.js} +1 -1
  688. package/dist/vega/{p-7db918f4.js → p-81dd00d0.js} +1 -1
  689. package/dist/vega/{p-fb40a829.js → p-82016096.js} +1 -1
  690. package/dist/vega/{p-03280f85.entry.js → p-820906b8.entry.js} +1 -1
  691. package/dist/vega/{p-3d4b8066.entry.js → p-833b79ad.entry.js} +1 -1
  692. package/dist/vega/{p-5b238c6d.js → p-8cd70b3b.js} +1 -1
  693. package/dist/vega/p-8f88fb57.js +1 -0
  694. package/dist/vega/{p-1828f9e6.entry.js → p-905cf163.entry.js} +1 -1
  695. package/dist/vega/{p-b5e31243.entry.js → p-916ef5dd.entry.js} +1 -1
  696. package/dist/vega/p-937d5317.entry.js +1 -0
  697. package/dist/vega/{p-47c202eb.entry.js → p-972c594b.entry.js} +1 -1
  698. package/dist/vega/{p-c2560608.entry.js → p-9e6e76b2.entry.js} +1 -1
  699. package/dist/vega/{p-c3eec160.entry.js → p-a01ef160.entry.js} +1 -1
  700. package/dist/vega/p-a02f77c7.js +1 -0
  701. package/dist/vega/{p-882a220c.js → p-a0a39ec3.js} +1 -1
  702. package/dist/vega/{p-9c713bc0.js → p-a2161e9d.js} +1 -1
  703. package/dist/vega/{p-536ad3d7.entry.js → p-a5543b6a.entry.js} +1 -1
  704. package/dist/vega/{p-a113fd15.entry.js → p-a6ad6515.entry.js} +1 -1
  705. package/dist/vega/{p-3a537cd0.js → p-a6fb81c5.js} +1 -1
  706. package/dist/vega/p-a841cf13.js +1 -0
  707. package/dist/vega/{p-7440325c.entry.js → p-ace7aa6c.entry.js} +1 -1
  708. package/dist/vega/{p-5ba34330.js → p-b15a2d4b.js} +1 -1
  709. package/dist/vega/{p-53e0b2bd.entry.js → p-b4d72eff.entry.js} +1 -1
  710. package/dist/vega/{p-3592a26d.entry.js → p-b589cafd.entry.js} +1 -1
  711. package/dist/vega/{p-77908e45.entry.js → p-b67672ae.entry.js} +1 -1
  712. package/dist/vega/p-b7dd3ef2.entry.js +1 -0
  713. package/dist/vega/{p-a3272850.entry.js → p-b91aff06.entry.js} +1 -1
  714. package/dist/vega/{p-c25577ae.entry.js → p-bc142c5c.entry.js} +1 -1
  715. package/dist/vega/{p-99c8f9a4.entry.js → p-c58c3e7e.entry.js} +1 -1
  716. package/dist/vega/{p-5f81beae.js → p-c5eb0fa6.js} +1 -1
  717. package/dist/vega/p-c78fe943.js +1 -0
  718. package/dist/vega/p-c962cf5b.js +1 -0
  719. package/dist/vega/p-cb0324e7.entry.js +1 -0
  720. package/dist/vega/p-d4ea8e22.js +1 -0
  721. package/dist/vega/{p-e5be807b.entry.js → p-d5a8bb62.entry.js} +1 -1
  722. package/dist/vega/{p-6c170474.js → p-d6875e49.js} +1 -1
  723. package/dist/vega/p-d862195c.entry.js +1 -0
  724. package/dist/vega/{p-764425e4.entry.js → p-d94d785a.entry.js} +1 -1
  725. package/dist/vega/p-db29681a.entry.js +1 -0
  726. package/dist/vega/{p-c87cf96a.entry.js → p-dba91c23.entry.js} +1 -1
  727. package/dist/vega/{p-d42dbe39.js → p-dccda3d1.js} +1 -1
  728. package/dist/vega/p-dce9349e.js +1 -0
  729. package/dist/vega/{p-cd3d177b.entry.js → p-dd4c3d9b.entry.js} +1 -1
  730. package/dist/vega/{p-24b4c64f.js → p-e2268eef.js} +1 -1
  731. package/dist/vega/p-e5da9f66.js +1 -0
  732. package/dist/vega/p-f7505267.js +1 -0
  733. package/dist/vega/{p-f46f6679.entry.js → p-fadeb5a2.entry.js} +1 -1
  734. package/dist/vega/{p-d5570331.entry.js → p-fb92092b.entry.js} +1 -1
  735. package/dist/vega/{p-a957e15f.js → p-fc3d6d9d.js} +1 -1
  736. package/dist/vega/{p-2e7ec8e0.entry.js → p-fc93b467.entry.js} +1 -1
  737. package/dist/vega/p-fcabf0dc.js +1 -0
  738. package/dist/vega/p-fef22245.js +1 -0
  739. package/dist/vega/vega.esm.js +1 -1
  740. package/package.json +1 -1
  741. package/dist/cjs/token-extension-1e98ddf3.js +0 -3062
  742. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/text-node-color-controller.js +0 -51
  743. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/text-node-rendering-registry.js +0 -26
  744. package/dist/esm/token-extension-ffd98170.js +0 -3041
  745. package/dist/types/components/vega-rich-text-editor/slimmers/controllers/text-node-color-controller.d.ts +0 -22
  746. package/dist/types/components/vega-rich-text-editor/slimmers/controllers/text-node-rendering-registry.d.ts +0 -22
  747. package/dist/vega/p-02976501.js +0 -1
  748. package/dist/vega/p-03b1e442.js +0 -1
  749. package/dist/vega/p-093aa0cb.entry.js +0 -1
  750. package/dist/vega/p-1e015382.js +0 -1
  751. package/dist/vega/p-383e235a.entry.js +0 -1
  752. package/dist/vega/p-3992038a.js +0 -1
  753. package/dist/vega/p-4079e932.js +0 -1
  754. package/dist/vega/p-43df17a1.js +0 -1
  755. package/dist/vega/p-473ceda5.entry.js +0 -1
  756. package/dist/vega/p-474b97cf.entry.js +0 -1
  757. package/dist/vega/p-4efe9cd8.entry.js +0 -1
  758. package/dist/vega/p-5e1d0f21.entry.js +0 -1
  759. package/dist/vega/p-6a8ac66d.entry.js +0 -1
  760. package/dist/vega/p-6b3776ec.js +0 -1
  761. package/dist/vega/p-6cf28c27.js +0 -1
  762. package/dist/vega/p-7ade785e.js +0 -1
  763. package/dist/vega/p-7db5e003.js +0 -1
  764. package/dist/vega/p-840f156e.entry.js +0 -1
  765. package/dist/vega/p-87379d3c.js +0 -1
  766. package/dist/vega/p-87ed06cd.entry.js +0 -1
  767. package/dist/vega/p-898bcb24.js +0 -1
  768. package/dist/vega/p-9493d87a.js +0 -1
  769. package/dist/vega/p-95919581.entry.js +0 -1
  770. package/dist/vega/p-95d1b547.js +0 -1
  771. package/dist/vega/p-9f467a59.js +0 -1
  772. package/dist/vega/p-a57a7ab8.entry.js +0 -1
  773. package/dist/vega/p-a58bd510.entry.js +0 -1
  774. package/dist/vega/p-b88ca09b.js +0 -1
  775. package/dist/vega/p-b901d624.js +0 -1
  776. package/dist/vega/p-ba475520.entry.js +0 -1
  777. package/dist/vega/p-bf04ff19.js +0 -1
  778. package/dist/vega/p-bf19682d.js +0 -1
  779. package/dist/vega/p-c6031d3f.entry.js +0 -1
  780. package/dist/vega/p-c72e08c6.entry.js +0 -1
  781. package/dist/vega/p-d0687ec0.js +0 -1
  782. package/dist/vega/p-d25db724.js +0 -1
  783. package/dist/vega/p-d5797747.js +0 -1
  784. package/dist/vega/p-e6f0097f.js +0 -1
@@ -0,0 +1,2360 @@
1
+ import { B as BlockAnnotation, c as RTEBlock, M as ModifyContentAction, C as CommonAnnotationTypeEnum, n as CustomAttributeAnnotation, h as RTENode, f as ActionHandleStrategy } from './code-block-58d1dbe5.js';
2
+ import { c as cleanObject } from './object-0c277f57.js';
3
+ import { V as VegaInternalThemeManager } from './dark-mode-style-controller-82e5c1c6.js';
4
+ import './global-slimmer-registry-17c4efd4.js';
5
+ import { I as InjectVegaTelemetrySlimmer, c as createPublicAPIRuntimeMetricsSlimmer } from './create-public-api-runtime-metrics-slimmer-aaadaa08.js';
6
+ import { r as rgbToHex } from './ui-ac244bf0.js';
7
+ import { i as isNonNullable } from './type-guard-c20cbbff.js';
8
+ import { g as generateUUID } from './misc-9fdbcfbb.js';
9
+ import { U as UpdateCursorPositionAction, V as VegaRTEContent } from './content-state-dad1fd71.js';
10
+
11
+ const ThemeManagerRuntimeMetricsPayloadDefinition = [
12
+ {
13
+ payloadKey: 'IS_OVERRIDECOLORS_METHOD_CALLED',
14
+ payloadDescription: 'Indicate if the method overrideColors of public API ThemeManager is called',
15
+ /**
16
+ * Indicate whether the method is collected when the method been called .
17
+ *
18
+ * @param {string} scope - The class name of public api
19
+ * @param {string} methodName - The method name called by the public api
20
+ * @returns {boolean} A boolean value
21
+ */
22
+ canAccept: (scope, methodName) => scope === 'ThemeManager' && methodName === 'overrideColors',
23
+ /**
24
+ * The function checks if the method is be called.
25
+ *
26
+ * @returns {boolean} A boolean value
27
+ */
28
+ payloadValue: () => {
29
+ return true;
30
+ },
31
+ },
32
+ {
33
+ payloadKey: 'IS_RESET_METHOD_CALLED',
34
+ payloadDescription: 'Indicate if the method reset of public API ThemeManager is called',
35
+ /**
36
+ * Indicate whether the method is collected when the method been called .
37
+ *
38
+ * @param {string} scope - The class name of public api
39
+ * @param {string} methodName - The method name called by the public api
40
+ * @returns {boolean} A boolean value
41
+ */
42
+ canAccept: (scope, methodName) => scope === 'ThemeManager' && methodName === 'reset',
43
+ /**
44
+ * The function checks if the method is be called.
45
+ *
46
+ * @returns {boolean} A boolean value
47
+ */
48
+ payloadValue: () => {
49
+ return true;
50
+ },
51
+ },
52
+ {
53
+ payloadKey: 'IS_TOGGLEDARKMODE_METHOD_CALLED',
54
+ payloadDescription: 'Indicate if the method toggleDarkMode of public API ThemeManager is called',
55
+ /**
56
+ * Indicate whether the method is collected when the method been called .
57
+ *
58
+ * @param {string} scope - The class name of public api
59
+ * @param {string} methodName - The method name called by the public api
60
+ * @returns {boolean} A boolean value
61
+ */
62
+ canAccept: (scope, methodName) => scope === 'ThemeManager' && methodName === 'toggleDarkMode',
63
+ /**
64
+ * The function checks if the method is be called.
65
+ *
66
+ * @returns {boolean} A boolean value
67
+ */
68
+ payloadValue: () => {
69
+ return true;
70
+ },
71
+ },
72
+ {
73
+ payloadKey: 'IS_ISDARKMODE_METHOD_CALLED',
74
+ payloadDescription: 'Indicate if the method isDarkMode of public API ThemeManager is called',
75
+ /**
76
+ * Indicate whether the method is collected when the method been called .
77
+ *
78
+ * @param {string} scope - The class name of public api
79
+ * @param {string} methodName - The method name called by the public api
80
+ * @returns {boolean} A boolean value
81
+ */
82
+ canAccept: (scope, methodName) => scope === 'ThemeManager' && methodName === 'isDarkMode',
83
+ /**
84
+ * The function checks if the method is be called.
85
+ *
86
+ * @returns {boolean} A boolean value
87
+ */
88
+ payloadValue: () => {
89
+ return true;
90
+ },
91
+ },
92
+ {
93
+ payloadKey: 'IS_APPLY_BRANDING_METHOD_CALLED',
94
+ payloadDescription: 'Indicate if the method applyBranding of public API ThemeManager is called',
95
+ /**
96
+ * Indicate whether the method is collected when the method been called .
97
+ *
98
+ * @param {string} scope - The class name of public api
99
+ * @param {string} methodName - The method name called by the public api
100
+ * @returns {boolean} A boolean value
101
+ */
102
+ canAccept: (scope, methodName) => scope === 'ThemeManager' && methodName === 'applyBranding',
103
+ /**
104
+ * The function checks if the method is be called.
105
+ *
106
+ * @returns {boolean} A boolean value
107
+ */
108
+ payloadValue: () => {
109
+ return true;
110
+ },
111
+ },
112
+ ];
113
+
114
+ var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
115
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
116
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
117
+ 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;
118
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
119
+ };
120
+ /**
121
+ * Vega components theme manager
122
+ */
123
+ class ThemeManager {
124
+ constructor() {
125
+ this.vegaPublicAPIRuntimeMetricsSlimmer = createPublicAPIRuntimeMetricsSlimmer(ThemeManager, ['overrideColors', 'reset', 'toggleDarkMode', 'isDarkMode', 'applyBranding'], ThemeManagerRuntimeMetricsPayloadDefinition);
126
+ }
127
+ /**
128
+ * It takes the colors you passed in, parses them into the correct format, and then applies them to the theme
129
+ *
130
+ * @param {VegaThemeOverrideColors} overrideColors - OverrideColors - This is the object that you pass to the function.
131
+ * @vegaVersion 1.20.0
132
+ */
133
+ async overrideColors(overrideColors) {
134
+ void VegaInternalThemeManager.overrideColors(overrideColors);
135
+ }
136
+ /**
137
+ * It removes all the custom override theme styles from the DOM
138
+ *
139
+ * @vegaVersion 1.20.0
140
+ */
141
+ async reset() {
142
+ void VegaInternalThemeManager.reset();
143
+ }
144
+ /**
145
+ * This function toggles the dark mode of a webpage by adding or removing a 'dark' class to the HTML element.
146
+ *
147
+ * @param {boolean | undefined} darkMode - A boolean or undefined value that determines whether to enable or disable dark mode.
148
+ * If it is true, dark mode is enabled.
149
+ * If it is false, dark mode is disabled.
150
+ * @vegaVersion 1.32.0
151
+ */
152
+ toggleDarkMode(darkMode) {
153
+ VegaInternalThemeManager.toggleDarkMode(darkMode);
154
+ }
155
+ /**
156
+ * The function checks if the HTML element has a class of "dark" and returns a boolean value accordingly.
157
+ *
158
+ * @returns {boolean} A boolean value indicating whether the HTML element has a class of "dark", which is
159
+ * typically used to indicate that the website is in dark mode.
160
+ * @vegaVersion 1.32.0
161
+ */
162
+ isDarkMode() {
163
+ return VegaInternalThemeManager.isDarkMode();
164
+ }
165
+ /**
166
+ * This function switches the Vega theme to a brand theme based on the provided options.
167
+ *
168
+ * @param {BrandOptions} options - The options includes 'gp', 'genius' and 'heartland' options
169
+ * @vegaVersion 2.47.0
170
+ */
171
+ applyBranding(options) {
172
+ VegaInternalThemeManager.applyBranding(options);
173
+ }
174
+ }
175
+ __decorate([
176
+ InjectVegaTelemetrySlimmer()
177
+ ], ThemeManager.prototype, "vegaPublicAPIRuntimeMetricsSlimmer", void 0);
178
+ const VegaThemeManager = new ThemeManager();
179
+
180
+ const RTE_TABLE_BORDER_STYLES = [
181
+ 'none',
182
+ 'solid',
183
+ 'dashed',
184
+ 'dotted',
185
+ 'double',
186
+ 'groove',
187
+ 'ridge',
188
+ 'inset',
189
+ 'outset',
190
+ ];
191
+ const RTE_TABLE_DEFAULT_COLORS = [
192
+ { key: 'white', dark: '#04041C', light: '#FCFCFC' },
193
+ { key: 'red', dark: '#AA091C', light: '#FF4C61' },
194
+ { key: 'orange', dark: '#974502', light: '#FDAB68' },
195
+ { key: 'yellow', dark: '#735C00', light: '#FFDC4C' },
196
+ { key: 'green', dark: '#2E6D18', light: '#7BDA58' },
197
+ { key: 'teal', dark: '#287171', light: '#7BD1D1' },
198
+ { key: 'gray', dark: '#595959', light: '#999999' },
199
+ { key: 'black', dark: '#FCFCFC', light: '#04041C' },
200
+ ];
201
+ // Default background color for table head cells in both light and dark modes: token = bg-table-header
202
+ const RTE_TABLE_HEAD_DEFAULT_BACKGROUND_COLOR = {
203
+ key: 'default-head-bg',
204
+ dark: '#181830',
205
+ light: '#F0F3F7',
206
+ };
207
+
208
+ /**
209
+ * Manages table colors for the rich text editor.
210
+ */
211
+ class RTETableColorManager {
212
+ /**
213
+ * Get the list of table colors.
214
+ *
215
+ * @returns {VegaRTEColorSchema[]} - Array of table colors.
216
+ */
217
+ static getTableColors() {
218
+ return RTETableColorManager.TABLE_COLORS;
219
+ }
220
+ /**
221
+ * Set the list of table colors.
222
+ *
223
+ * @param {VegaRTEColorSchema[]} colors - Array of table colors.
224
+ */
225
+ static setTableColors(colors) {
226
+ RTETableColorManager.TABLE_COLORS = colors;
227
+ }
228
+ /**
229
+ * Get color key from color value
230
+ *
231
+ * @param {string} colorValue - color value
232
+ * @param {boolean} isHeadCellColor - whether the color is for a head cell
233
+ * @returns {string} - color key
234
+ */
235
+ static getColorKey(colorValue, isHeadCellColor = false) {
236
+ var _a;
237
+ let result = null;
238
+ const defaultColorList = RTETableColorManager.TABLE_COLORS;
239
+ const tableColors = isHeadCellColor
240
+ ? [...defaultColorList, RTE_TABLE_HEAD_DEFAULT_BACKGROUND_COLOR]
241
+ : defaultColorList;
242
+ if (tableColors) {
243
+ const hexColor = (_a = rgbToHex(colorValue)) === null || _a === void 0 ? void 0 : _a.toUpperCase();
244
+ if (hexColor) {
245
+ result = tableColors.find((schema) => VegaThemeManager.isDarkMode() ? schema.dark === hexColor : schema.light === hexColor);
246
+ }
247
+ else {
248
+ for (const color of tableColors) {
249
+ if (color.key === colorValue) {
250
+ result = color;
251
+ break;
252
+ }
253
+ }
254
+ }
255
+ }
256
+ return result ? result.key : '';
257
+ }
258
+ }
259
+ RTETableColorManager.TABLE_COLORS = RTE_TABLE_DEFAULT_COLORS;
260
+
261
+ /**
262
+ * Class representing a table color annotation in the rich text editor.
263
+ */
264
+ class RTETableColorAnnotation extends BlockAnnotation {
265
+ constructor(colorKey) {
266
+ super();
267
+ this.type = RTETableExtensionAnnotationTypeEnum.COLOR;
268
+ this.colorKey = colorKey;
269
+ if (colorKey) {
270
+ this.color = this.formatColor(colorKey);
271
+ }
272
+ }
273
+ /**
274
+ * Render the style for the annotation
275
+ *
276
+ * @returns {AnnotationStyle} The style object containing the color
277
+ */
278
+ renderStyle() {
279
+ const color = this.color
280
+ ? VegaInternalThemeManager.isDarkMode()
281
+ ? this.color.dark
282
+ : this.color.light
283
+ : this.colorKey || '';
284
+ return { color };
285
+ }
286
+ /**
287
+ * Render the CSS class for the annotation
288
+ *
289
+ * @returns {Nullable<string>} Always returns null as no CSS class is used
290
+ */
291
+ renderClass() {
292
+ return null;
293
+ }
294
+ /**
295
+ * Convert the annotation to a JSON representation
296
+ *
297
+ * @returns {Record<string, string>} A JSON object containing the color key
298
+ */
299
+ toJSON() {
300
+ var _a;
301
+ return {
302
+ color: ((_a = this.color) === null || _a === void 0 ? void 0 : _a.key) || this.colorKey || '',
303
+ };
304
+ }
305
+ /**
306
+ * Clone the current annotation
307
+ *
308
+ * @returns {BlockAnnotation<RTETableExtensionAnnotationTypeEnum.COLOR>} A new instance of RTETableColorAnnotation with the same color key
309
+ */
310
+ clone() {
311
+ return new RTETableColorAnnotation(this.colorKey);
312
+ }
313
+ /**
314
+ * format table color
315
+ *
316
+ * @param {string} colorKey - table color
317
+ * @returns {Nullable<VegaRTEColorSchema>} - VegaRTEColorSchema
318
+ */
319
+ formatColor(colorKey) {
320
+ return RTETableColorManager.getTableColors().find((item) => item.key === colorKey);
321
+ }
322
+ }
323
+
324
+ var RTETableExtensionAnnotationTypeEnum;
325
+ (function (RTETableExtensionAnnotationTypeEnum) {
326
+ RTETableExtensionAnnotationTypeEnum["TABLE"] = "EXTENSION_TABLE";
327
+ RTETableExtensionAnnotationTypeEnum["CELL"] = "EXTENSION_TABLE_CELL";
328
+ RTETableExtensionAnnotationTypeEnum["CAPTION"] = "EXTENSION_TABLE_CAPTION";
329
+ RTETableExtensionAnnotationTypeEnum["COLOR"] = "EXTENSION_TABLE_COLOR";
330
+ })(RTETableExtensionAnnotationTypeEnum || (RTETableExtensionAnnotationTypeEnum = {}));
331
+ /**
332
+ * Class representing a table annotation in the rich text editor.
333
+ */
334
+ class RTETableAnnotation extends BlockAnnotation {
335
+ constructor({ backgroundColor, border, width, height, alignment, borderCollapse } = {}, useInternalStyle = true) {
336
+ super();
337
+ this.type = RTETableExtensionAnnotationTypeEnum.TABLE;
338
+ this.useInternalStyle = useInternalStyle;
339
+ this.backgroundColor = backgroundColor;
340
+ this.border = border;
341
+ this.width = width;
342
+ this.height = height;
343
+ this.alignment =
344
+ useInternalStyle && alignment === undefined ? RTETableAnnotation.DEFAULT_ALIGNMENT : alignment;
345
+ this.backgroundColorAnnotation = new RTETableColorAnnotation(backgroundColor);
346
+ this.borderColorAnnotation = new RTETableColorAnnotation(border === null || border === void 0 ? void 0 : border.color);
347
+ this.borderCollapse =
348
+ useInternalStyle && borderCollapse === undefined
349
+ ? RTETableAnnotation.DEFAULT_BORDER_COLLAPSE
350
+ : borderCollapse;
351
+ }
352
+ /**
353
+ * @inheritDoc
354
+ */
355
+ static from(value, useInternalStyle = true) {
356
+ return [RTETableExtensionAnnotationTypeEnum.TABLE, new RTETableAnnotation(value, useInternalStyle)];
357
+ }
358
+ /**
359
+ * Generates the CSS border string from the border properties.
360
+ *
361
+ * @returns {Nullable<string>} The CSS border string.
362
+ */
363
+ get borderStr() {
364
+ if (!this.border) {
365
+ return null;
366
+ }
367
+ return `${this.border.style} ${this.border.width} ${this.borderColorAnnotation.renderStyle().color}`.trim();
368
+ }
369
+ /**
370
+ * @inheritDoc
371
+ */
372
+ clone() {
373
+ return new RTETableAnnotation({
374
+ backgroundColor: this.backgroundColor,
375
+ border: this.border,
376
+ width: this.width,
377
+ height: this.height,
378
+ alignment: this.alignment,
379
+ borderCollapse: this.borderCollapse,
380
+ }, this.useInternalStyle);
381
+ }
382
+ /**
383
+ * @inheritDoc
384
+ */
385
+ toJSON() {
386
+ return {
387
+ table: cleanObject({
388
+ backgroundColor: this.backgroundColor,
389
+ border: this.border,
390
+ width: this.width,
391
+ height: this.height,
392
+ alignment: this.alignment,
393
+ borderCollapse: this.borderCollapse,
394
+ }),
395
+ };
396
+ }
397
+ /**
398
+ * @inheritDoc
399
+ */
400
+ renderStyle() {
401
+ const backgroundColor = this.backgroundColorAnnotation.renderStyle().color;
402
+ const tableStyles = Object.assign({ border: this.borderStr, width: this.width, height: this.height, borderCollapse: this.borderCollapse }, this.renderAlignmentStyle());
403
+ backgroundColor && (tableStyles.backgroundColor = backgroundColor);
404
+ return cleanObject(tableStyles);
405
+ }
406
+ /**
407
+ * @inheritDoc
408
+ */
409
+ renderClass() {
410
+ return 'v-rte--extension-table';
411
+ }
412
+ /**
413
+ * Generates the alignment styles for the table.
414
+ *
415
+ * @returns {Record<string, string>} The alignment styles.
416
+ */
417
+ renderAlignmentStyle() {
418
+ if (!this.alignment)
419
+ return {};
420
+ return {
421
+ margin: this.alignment === 'center' ? '0 auto' : this.alignment === 'left' ? '0' : '0 0 0 auto',
422
+ };
423
+ }
424
+ }
425
+ RTETableAnnotation.DEFAULT_BORDER_COLLAPSE = 'collapse';
426
+ RTETableAnnotation.DEFAULT_ALIGNMENT = 'center';
427
+
428
+ /**
429
+ * Class representing a table block in the rich text editor.
430
+ */
431
+ class RTETableBlock extends RTEBlock {
432
+ constructor(id, options) {
433
+ super(id);
434
+ this.type = 'table-block';
435
+ this.children = [];
436
+ const { autoMatchFormat } = options || { autoMatchFormat: true };
437
+ if (autoMatchFormat) {
438
+ this.annotationMap.set(RTETableExtensionAnnotationTypeEnum.TABLE, new RTETableAnnotation());
439
+ }
440
+ }
441
+ /**
442
+ * @inheritDoc
443
+ */
444
+ static from(block, options) {
445
+ var _a;
446
+ const tableBlock = new RTETableBlock(block.id, options);
447
+ super.convertAnnotationsToMap(tableBlock.annotationMap, Object.assign({}, block.annotations));
448
+ tableBlock.children = super.generateBlockChildren(block.children, options, tableBlock);
449
+ if ((_a = block.annotations) === null || _a === void 0 ? void 0 : _a.table) {
450
+ tableBlock.annotationMap.set(...RTETableAnnotation.from(block.annotations.table, options === null || options === void 0 ? void 0 : options.autoMatchFormat));
451
+ }
452
+ return tableBlock;
453
+ }
454
+ /**
455
+ * @inheritDoc
456
+ */
457
+ clone(parent) {
458
+ const clonedBlock = new RTETableBlock(this.id);
459
+ clonedBlock.children = this.children.map((child) => child.clone(clonedBlock));
460
+ clonedBlock.parent = parent;
461
+ clonedBlock.annotationMap = super.cloneAnnotations();
462
+ return clonedBlock;
463
+ }
464
+ /**
465
+ * @inheritDoc
466
+ */
467
+ getLastNode() {
468
+ return this.children[this.children.length - 1].getLastNode();
469
+ }
470
+ /**
471
+ * Get the first node of the table block.
472
+ *
473
+ * @returns {RTENode} The first node of the table block.
474
+ */
475
+ getFirstNode() {
476
+ if (this.hasCaption()) {
477
+ return this.children[0].children[0].getLastNode();
478
+ }
479
+ else {
480
+ const childNode = this.children[0].children[0]
481
+ .children[0];
482
+ return childNode.getLastNode();
483
+ }
484
+ }
485
+ /**
486
+ * @inheritDoc
487
+ */
488
+ isNotEmpty() {
489
+ return this.children.length > 0;
490
+ }
491
+ /**
492
+ * @inheritDoc
493
+ */
494
+ toHtml() {
495
+ const childrenHtml = this.children.map((child) => child.toHtml()).join('');
496
+ const attrStr = super.generateAttributeString();
497
+ return `<table${attrStr}>${childrenHtml}</table>`;
498
+ }
499
+ /**
500
+ * @inheritDoc
501
+ */
502
+ toJSON() {
503
+ return Object.assign(Object.assign({}, super.toJSON()), { type: this.type, children: this.children.map((child) => child.toJSON()) });
504
+ }
505
+ /**
506
+ * Retrieves the caption block from the children collection, if present.
507
+ *
508
+ * @returns {Nullable<RTETableCaptionBlock>} The caption block or `null`.
509
+ */
510
+ getCaption() {
511
+ const caption = this.children.find((child) => child.type === 'table-caption');
512
+ return caption !== null && caption !== void 0 ? caption : null;
513
+ }
514
+ /**
515
+ * Inserts, replaces, or removes the caption block within the children.
516
+ *
517
+ * @param {Nullable<RTETableCaptionBlock>} caption - The caption block to set, or `null` to remove.
518
+ */
519
+ setCaption(caption) {
520
+ const index = this.children.findIndex((child) => child.type === 'table-caption');
521
+ if (!caption) {
522
+ if (index >= 0) {
523
+ this.children.splice(index, 1);
524
+ }
525
+ return;
526
+ }
527
+ caption.parent = this;
528
+ if (index >= 0) {
529
+ this.children[index] = caption;
530
+ }
531
+ else {
532
+ this.children.unshift(caption);
533
+ }
534
+ }
535
+ /**
536
+ * Checks whether the table currently stores a caption block reference.
537
+ *
538
+ * @returns {boolean} `true` when a caption DTO is attached; otherwise `false`.
539
+ */
540
+ hasCaption() {
541
+ return isNonNullable(this.getCaption());
542
+ }
543
+ }
544
+
545
+ var TableSettingType;
546
+ (function (TableSettingType) {
547
+ TableSettingType["ROW"] = "ROW";
548
+ TableSettingType["CAPTION"] = "CAPTION";
549
+ TableSettingType["COLUMN"] = "COLUMN";
550
+ TableSettingType["MERGE_CELLS"] = "MERGE_CELLS";
551
+ TableSettingType["TABLE"] = "TABLE";
552
+ TableSettingType["CELL"] = "CELL";
553
+ TableSettingType["SPLIT_CELL"] = "SPLIT_CELL";
554
+ })(TableSettingType || (TableSettingType = {}));
555
+ /**
556
+ * Abstract class for setting event handlers.
557
+ */
558
+ class SettingEventHandler {
559
+ /**
560
+ * Applies a cursor update action so the editor focuses on the resolved node.
561
+ *
562
+ * @param {RTETableBlock} block - Table block currently being toggled.
563
+ * @param {Nullable<RTENode>} focusNode - Target node that should receive the caret.
564
+ */
565
+ syncCursorPosition(block, focusNode) {
566
+ const rootContent = this.findRootContent(block);
567
+ if (focusNode && rootContent) {
568
+ const offset = focusNode.getRangeEndOffset();
569
+ rootContent.apply(new UpdateCursorPositionAction(focusNode, offset));
570
+ }
571
+ }
572
+ /**
573
+ * Walks up the parent chain to locate the nearest VegaRTEContent root.
574
+ *
575
+ * @param {RTETableBlock} block - Table block used as the starting point.
576
+ * @returns {Nullable<VegaRTEContent>} Content root containing the table, if found.
577
+ */
578
+ findRootContent(block) {
579
+ let currentParent = block.parent;
580
+ while (currentParent) {
581
+ if (currentParent instanceof VegaRTEContent) {
582
+ return currentParent;
583
+ }
584
+ currentParent = currentParent.parent;
585
+ }
586
+ }
587
+ }
588
+
589
+ const DELETE_TABLE_ROW = 'DELETE_TABLE_ROW';
590
+ /**
591
+ * Action class for deleting a specific table row.
592
+ */
593
+ class DeleteTableRowAction extends ModifyContentAction {
594
+ /**
595
+ * Constructs an InsertTableRowAction.
596
+ *
597
+ * @param {RTETableRowBlock[]} rowsToBeRemoved - The rows to be removed from the table.
598
+ */
599
+ constructor(rowsToBeRemoved) {
600
+ super();
601
+ this.isFlushable = true;
602
+ this.type = DELETE_TABLE_ROW;
603
+ this.rowsToBeRemoved = rowsToBeRemoved;
604
+ }
605
+ }
606
+
607
+ const INSERT_TABLE_ROW_INTO_DIFFERENT_SECTION = 'INSERT_TABLE_ROW_INTO_DIFFERENT_SECTION';
608
+ /**
609
+ * Action class for inserting a new row into a table within the rich text editor.
610
+ */
611
+ class InsertTableRowIntoDifferentSectionAction extends ModifyContentAction {
612
+ /**
613
+ * Constructs an InsertTableRowIntoDifferentSectionAction.
614
+ *
615
+ * @param {InsertTableRowDirection} insertDirection - The direction to insert the new row (above or below the current row).
616
+ * @param {RTETableRowBlock[]} selectedRows - The currently selected rows in the table.
617
+ */
618
+ constructor(insertDirection, selectedRows = []) {
619
+ super();
620
+ this.isFlushable = true;
621
+ this.type = INSERT_TABLE_ROW_INTO_DIFFERENT_SECTION;
622
+ this.selectedRows = [];
623
+ this.insertDirection = insertDirection;
624
+ this.selectedRows = selectedRows;
625
+ }
626
+ }
627
+
628
+ const INSERT_TABLE_ROW_INTO_SAME_SECTION = 'INSERT_TABLE_ROW_INTO_SAME_SECTION';
629
+ var InsertTableRowDirection;
630
+ (function (InsertTableRowDirection) {
631
+ InsertTableRowDirection["ABOVE"] = "ABOVE";
632
+ InsertTableRowDirection["BELOW"] = "BELOW";
633
+ })(InsertTableRowDirection || (InsertTableRowDirection = {}));
634
+ /**
635
+ * Action class for inserting a new row into a table within the rich text editor.
636
+ */
637
+ class InsertTableRowIntoSameSectionAction extends ModifyContentAction {
638
+ /**
639
+ * Constructs an InsertTableRowIntoSameSectionAction.
640
+ *
641
+ * @param {InsertTableRowDirection} insertDirection - The direction to insert the new row (above or below the current row).
642
+ * @param {RTETableRowBlock[]} selectedRows - The currently selected rows in the table.
643
+ */
644
+ constructor(insertDirection, selectedRows = []) {
645
+ super();
646
+ this.isFlushable = true;
647
+ this.type = INSERT_TABLE_ROW_INTO_SAME_SECTION;
648
+ this.selectedRows = [];
649
+ this.insertDirection = insertDirection;
650
+ this.selectedRows = selectedRows;
651
+ }
652
+ }
653
+
654
+ const TOGGLE_HEADER_ROW = 'TOGGLE_HEADER_ROW';
655
+ /**
656
+ * Action to convert selected rows to header rows or revert them back to normal rows.
657
+ */
658
+ class ToggleHeaderRowAction extends ModifyContentAction {
659
+ constructor(selectedRows) {
660
+ super();
661
+ this.isFlushable = true;
662
+ this.type = TOGGLE_HEADER_ROW;
663
+ this.selectedRows = selectedRows;
664
+ }
665
+ }
666
+
667
+ /**
668
+ * Class representing a table body block in the rich text editor.
669
+ */
670
+ class RTETableBodyBlock extends RTEBlock {
671
+ constructor(id) {
672
+ super(id);
673
+ this.type = 'table-body';
674
+ this.children = [];
675
+ }
676
+ /**
677
+ * @inheritDoc
678
+ */
679
+ static from(block, options) {
680
+ const tableBodyBlock = new RTETableBodyBlock(block.id);
681
+ super.convertAnnotationsToMap(tableBodyBlock.annotationMap, Object.assign({}, block.annotations));
682
+ tableBodyBlock.children = super.generateBlockChildren(block.children, options, tableBodyBlock);
683
+ return tableBodyBlock;
684
+ }
685
+ /**
686
+ * @inheritDoc
687
+ */
688
+ clone(parent) {
689
+ const clonedBlock = new RTETableBodyBlock(this.id);
690
+ clonedBlock.children = this.children.map((child) => child.clone(clonedBlock));
691
+ clonedBlock.parent = parent;
692
+ clonedBlock.annotationMap = super.cloneAnnotations();
693
+ return clonedBlock;
694
+ }
695
+ /**
696
+ * @inheritDoc
697
+ */
698
+ getLastNode() {
699
+ return this.children[this.children.length - 1].getLastNode();
700
+ }
701
+ /**
702
+ * @inheritDoc
703
+ */
704
+ isNotEmpty() {
705
+ return this.children.length > 0;
706
+ }
707
+ /**
708
+ * @inheritDoc
709
+ */
710
+ toHtml() {
711
+ const childrenHtml = this.children.map((child) => child.toHtml()).join('');
712
+ const attrStr = super.generateAttributeString();
713
+ return `<tbody${attrStr}>${childrenHtml}</tbody>`;
714
+ }
715
+ /**
716
+ * @inheritDoc
717
+ */
718
+ toJSON() {
719
+ return Object.assign(Object.assign({}, super.toJSON()), { type: this.type, children: this.children.map((child) => child.toJSON()) });
720
+ }
721
+ }
722
+
723
+ /**
724
+ * Class representing a table head block in the rich text editor.
725
+ */
726
+ class RTETableHeadBlock extends RTEBlock {
727
+ constructor(id) {
728
+ super(id);
729
+ this.type = 'table-head';
730
+ this.children = [];
731
+ }
732
+ /**
733
+ * @inheritDoc
734
+ */
735
+ static from(block, options) {
736
+ const headBlock = new RTETableHeadBlock(block.id);
737
+ super.convertAnnotationsToMap(headBlock.annotationMap, Object.assign({}, block.annotations));
738
+ headBlock.children = super.generateBlockChildren(block.children, options, headBlock);
739
+ return headBlock;
740
+ }
741
+ /**
742
+ * @inheritDoc
743
+ */
744
+ clone(parent) {
745
+ const clonedBlock = new RTETableHeadBlock(this.id);
746
+ clonedBlock.children = this.children.map((child) => child.clone(clonedBlock));
747
+ clonedBlock.parent = parent;
748
+ clonedBlock.annotationMap = super.cloneAnnotations();
749
+ return clonedBlock;
750
+ }
751
+ /**
752
+ * @inheritDoc
753
+ */
754
+ getLastNode() {
755
+ return this.children[this.children.length - 1].getLastNode();
756
+ }
757
+ /**
758
+ * @inheritDoc
759
+ */
760
+ isNotEmpty() {
761
+ return this.children.length > 0;
762
+ }
763
+ /**
764
+ * @inheritDoc
765
+ */
766
+ toHtml() {
767
+ const childrenHtml = this.children
768
+ .map((child) => {
769
+ return child.toHtml();
770
+ })
771
+ .join('');
772
+ const attrStr = super.generateAttributeString();
773
+ return `<thead${attrStr}>${childrenHtml}</thead>`;
774
+ }
775
+ /**
776
+ * @inheritDoc
777
+ */
778
+ toJSON() {
779
+ return Object.assign(Object.assign({}, super.toJSON()), { type: this.type, children: this.children.map((child) => child.toJSON()) });
780
+ }
781
+ }
782
+
783
+ /**
784
+ * Class representing a table row block in the rich text editor.
785
+ */
786
+ class RTETableRowBlock extends RTEBlock {
787
+ constructor(id) {
788
+ super(id);
789
+ this.type = 'table-row';
790
+ this.children = [];
791
+ }
792
+ /**
793
+ * @inheritDoc
794
+ */
795
+ static from(block, options) {
796
+ const rowBlock = new RTETableRowBlock(block.id);
797
+ super.convertAnnotationsToMap(rowBlock.annotationMap, Object.assign({}, block.annotations));
798
+ rowBlock.children = super.generateBlockChildren(block.children, options, rowBlock);
799
+ return rowBlock;
800
+ }
801
+ /**
802
+ * @inheritDoc
803
+ */
804
+ clone(parent) {
805
+ const clonedBlock = new RTETableRowBlock(this.id);
806
+ clonedBlock.children = this.children.map((child) => child.clone(clonedBlock));
807
+ clonedBlock.parent = parent;
808
+ clonedBlock.annotationMap = super.cloneAnnotations();
809
+ return clonedBlock;
810
+ }
811
+ /**
812
+ * @inheritDoc
813
+ */
814
+ getLastNode() {
815
+ return this.children[this.children.length - 1].getLastNode();
816
+ }
817
+ /**
818
+ * @inheritDoc
819
+ */
820
+ isNotEmpty() {
821
+ return this.children.length > 0;
822
+ }
823
+ /**
824
+ * @inheritDoc
825
+ */
826
+ toHtml() {
827
+ const childrenHtml = this.children
828
+ .map((child) => {
829
+ return child.toHtml();
830
+ })
831
+ .join('');
832
+ const attrStr = super.generateAttributeString();
833
+ return `<tr${attrStr}>${childrenHtml}</tr>`;
834
+ }
835
+ /**
836
+ * @inheritDoc
837
+ */
838
+ toJSON() {
839
+ return Object.assign(Object.assign({}, super.toJSON()), { type: this.type, children: this.children.map((child) => child.toJSON()) });
840
+ }
841
+ }
842
+
843
+ /**
844
+ * Class representing a table cell annotation in the rich text editor.
845
+ */
846
+ class RTETableCellAnnotation extends BlockAnnotation {
847
+ constructor({ backgroundColor, padding, border, width, height, textAlign, verticalAlign, minWidth, boxSizing, } = {}, useInternalStyle = true) {
848
+ super();
849
+ this.type = RTETableExtensionAnnotationTypeEnum.CELL;
850
+ this.useInternalStyle = useInternalStyle;
851
+ this.backgroundColor = backgroundColor;
852
+ this.width = width;
853
+ this.height = height;
854
+ this.border =
855
+ useInternalStyle && border === undefined ? RTETableCellAnnotation.DEFAULT_BORDER : border;
856
+ this.padding =
857
+ useInternalStyle && padding === undefined ? RTETableCellAnnotation.DEFAULT_PADDING : padding;
858
+ this.textAlign =
859
+ useInternalStyle && textAlign === undefined
860
+ ? RTETableCellAnnotation.DEFAULT_HORIZONTAL_TEXT_ALIGN
861
+ : textAlign;
862
+ this.verticalAlign =
863
+ useInternalStyle && verticalAlign === undefined
864
+ ? RTETableCellAnnotation.DEFAULT_VERTICAL_TEXT_ALIGN
865
+ : verticalAlign;
866
+ this.minWidth =
867
+ useInternalStyle && minWidth === undefined
868
+ ? RTETableCellAnnotation.DEFAULT_CELL_MIN_WIDTH
869
+ : minWidth;
870
+ this.boxSizing =
871
+ useInternalStyle && boxSizing === undefined
872
+ ? RTETableCellAnnotation.DEFAULT_BOX_SIZING
873
+ : boxSizing;
874
+ }
875
+ /**
876
+ * @inheritDoc
877
+ */
878
+ static from(cellAnnotation, useInternalStyle) {
879
+ return [
880
+ RTETableExtensionAnnotationTypeEnum.CELL,
881
+ new RTETableCellAnnotation(cellAnnotation, useInternalStyle),
882
+ ];
883
+ }
884
+ /**
885
+ * Generates the CSS border string from the border properties.
886
+ *
887
+ * @returns {Nullable<string>} The CSS border string.
888
+ */
889
+ get borderStr() {
890
+ if (!this.border)
891
+ return null;
892
+ return `${this.border.style || ''} ${this.border.width || ''} ${this.borderColorAnnotation.renderStyle().color}`.trim();
893
+ }
894
+ /**
895
+ * Sets the background color using a color key.
896
+ *
897
+ * @param {Nullable<string>} colorKey - The key representing the background color.
898
+ */
899
+ set backgroundColor(colorKey) {
900
+ this._backgroundColor = colorKey;
901
+ this.backgroundColorAnnotation = new RTETableColorAnnotation(colorKey);
902
+ }
903
+ /**
904
+ * Gets the background color value.
905
+ *
906
+ * @returns {Nullable<string>} The background color value.
907
+ */
908
+ get backgroundColor() {
909
+ return this._backgroundColor;
910
+ }
911
+ /**
912
+ * Sets the border properties and updates the border color annotation accordingly.
913
+ *
914
+ * @param {Nullable<VegaRTETableBorderType>} border - The border properties to set.
915
+ */
916
+ set border(border) {
917
+ this._border = border;
918
+ this.borderColorAnnotation = new RTETableColorAnnotation(border === null || border === void 0 ? void 0 : border.color);
919
+ }
920
+ /**
921
+ * Gets the border properties.
922
+ *
923
+ * @returns {Nullable<VegaRTETableBorderType>} The border properties.
924
+ */
925
+ get border() {
926
+ return this._border;
927
+ }
928
+ /**
929
+ * @inheritDoc
930
+ */
931
+ clone() {
932
+ return new RTETableCellAnnotation({
933
+ backgroundColor: this.backgroundColor,
934
+ padding: this.padding,
935
+ border: this.border,
936
+ width: this.width,
937
+ height: this.height,
938
+ textAlign: this.textAlign,
939
+ verticalAlign: this.verticalAlign,
940
+ minWidth: this.minWidth,
941
+ boxSizing: this.boxSizing,
942
+ }, this.useInternalStyle);
943
+ }
944
+ /**
945
+ * @inheritDoc
946
+ */
947
+ toJSON() {
948
+ return {
949
+ tableCell: cleanObject({
950
+ backgroundColor: this.backgroundColor,
951
+ padding: this.padding,
952
+ border: this.border,
953
+ width: this.width,
954
+ height: this.height,
955
+ textAlign: this.textAlign,
956
+ verticalAlign: this.verticalAlign,
957
+ minWidth: this.minWidth,
958
+ boxSizing: this.boxSizing,
959
+ }),
960
+ };
961
+ }
962
+ /**
963
+ * @inheritDoc
964
+ */
965
+ renderStyle(options) {
966
+ const backgroundColor = this.backgroundColorAnnotation.renderStyle().color;
967
+ const style = {
968
+ padding: this.padding,
969
+ border: this.borderStr,
970
+ width: this.width,
971
+ height: this.height,
972
+ textAlign: this.textAlign,
973
+ verticalAlign: this.verticalAlign,
974
+ minWidth: this.minWidth,
975
+ boxSizing: this.boxSizing,
976
+ };
977
+ if (backgroundColor) {
978
+ style.backgroundColor = backgroundColor;
979
+ }
980
+ if (!(options === null || options === void 0 ? void 0 : options.standalone)) {
981
+ return cleanObject(this.removeDefaultValues(style), { cleanEmptyString: true });
982
+ }
983
+ return cleanObject(style, { cleanEmptyString: true });
984
+ }
985
+ /**
986
+ * @inheritDoc
987
+ */
988
+ renderClass() {
989
+ return null;
990
+ }
991
+ /**
992
+ * Removes default values from the style object to avoid redundancy.
993
+ *
994
+ * @param {Record<string, Nullable<string>>} style - The style object to clean.
995
+ * @returns {Record<string, Nullable<string>>} The cleaned style object.
996
+ */
997
+ removeDefaultValues(style) {
998
+ const cleanedStyle = Object.assign({}, style);
999
+ if (cleanedStyle.padding === RTETableCellAnnotation.DEFAULT_PADDING) {
1000
+ delete cleanedStyle.padding;
1001
+ }
1002
+ if (cleanedStyle.border ===
1003
+ `${RTETableCellAnnotation.DEFAULT_BORDER.style} ${RTETableCellAnnotation.DEFAULT_BORDER.width} ${RTETableCellAnnotation.DEFAULT_BORDER.color}`) {
1004
+ delete cleanedStyle.border;
1005
+ }
1006
+ if (cleanedStyle.textAlign === RTETableCellAnnotation.DEFAULT_HORIZONTAL_TEXT_ALIGN) {
1007
+ delete cleanedStyle.textAlign;
1008
+ }
1009
+ if (cleanedStyle.verticalAlign === RTETableCellAnnotation.DEFAULT_VERTICAL_TEXT_ALIGN) {
1010
+ delete cleanedStyle.verticalAlign;
1011
+ }
1012
+ if (cleanedStyle.minWidth === RTETableCellAnnotation.DEFAULT_CELL_MIN_WIDTH) {
1013
+ delete cleanedStyle.minWidth;
1014
+ }
1015
+ if (cleanedStyle.boxSizing === RTETableCellAnnotation.DEFAULT_BOX_SIZING) {
1016
+ delete cleanedStyle.boxSizing;
1017
+ }
1018
+ return cleanedStyle;
1019
+ }
1020
+ }
1021
+ RTETableCellAnnotation.DEFAULT_PADDING = '12px';
1022
+ RTETableCellAnnotation.DEFAULT_BORDER = {
1023
+ style: 'solid',
1024
+ width: '1px',
1025
+ color: '#ddd',
1026
+ };
1027
+ RTETableCellAnnotation.DEFAULT_HORIZONTAL_TEXT_ALIGN = 'left';
1028
+ RTETableCellAnnotation.DEFAULT_VERTICAL_TEXT_ALIGN = 'middle';
1029
+ RTETableCellAnnotation.DEFAULT_CELL_MIN_WIDTH = '55px';
1030
+ RTETableCellAnnotation.DEFAULT_BOX_SIZING = 'border-box';
1031
+
1032
+ /**
1033
+ * Class representing a table cell block in the rich text editor.
1034
+ */
1035
+ class RTETableCellBlock extends RTEBlock {
1036
+ constructor(id, options) {
1037
+ super(id);
1038
+ this.type = 'table-cell';
1039
+ this.children = [];
1040
+ const { autoMatchFormat } = options || { autoMatchFormat: true };
1041
+ if (autoMatchFormat) {
1042
+ this.annotationMap.set(RTETableExtensionAnnotationTypeEnum.CELL, new RTETableCellAnnotation());
1043
+ }
1044
+ }
1045
+ /**
1046
+ * @inheritDoc
1047
+ */
1048
+ static from(block, options) {
1049
+ var _a;
1050
+ const tableCellBlock = new RTETableCellBlock(block.id, options);
1051
+ super.convertAnnotationsToMap(tableCellBlock.annotationMap, Object.assign({}, block.annotations));
1052
+ if ((_a = block.annotations) === null || _a === void 0 ? void 0 : _a.tableCell) {
1053
+ tableCellBlock.annotationMap.set(...RTETableCellAnnotation.from(block.annotations.tableCell, options === null || options === void 0 ? void 0 : options.autoMatchFormat));
1054
+ }
1055
+ tableCellBlock.children = super.generateBlockChildren(block.children, options, tableCellBlock);
1056
+ return tableCellBlock;
1057
+ }
1058
+ /**
1059
+ * @inheritDoc
1060
+ */
1061
+ clone(parent) {
1062
+ const clonedBlock = new RTETableCellBlock(this.id);
1063
+ clonedBlock.children = this.children.map((child) => child.clone(clonedBlock));
1064
+ clonedBlock.parent = parent;
1065
+ clonedBlock.annotationMap = super.cloneAnnotations();
1066
+ return clonedBlock;
1067
+ }
1068
+ /**
1069
+ * @inheritDoc
1070
+ */
1071
+ getLastNode() {
1072
+ return this.children[this.children.length - 1].getLastNode();
1073
+ }
1074
+ /**
1075
+ * @inheritDoc
1076
+ */
1077
+ isNotEmpty() {
1078
+ return this.children.length > 0;
1079
+ }
1080
+ /**
1081
+ * Get the rowSpan of the table cell
1082
+ *
1083
+ * @returns {number} - rowSpan value
1084
+ */
1085
+ get rowSpan() {
1086
+ const rowSpan = this.getCustomAttributeByName('rowspan');
1087
+ return !isNaN(Number(rowSpan)) ? Math.max(Number(rowSpan), 1) : 1;
1088
+ }
1089
+ /**
1090
+ * Get the colSpan of the table cell
1091
+ *
1092
+ * @returns {number} - colSpan value
1093
+ */
1094
+ get colSpan() {
1095
+ const colSpan = this.getCustomAttributeByName('colspan');
1096
+ return !isNaN(Number(colSpan)) ? Math.max(Number(colSpan), 1) : 1;
1097
+ }
1098
+ /**
1099
+ * @inheritDoc
1100
+ */
1101
+ toHtml() {
1102
+ const childrenHtml = this.children.map((child) => child.toHtml()).join('');
1103
+ const attrStr = super.generateAttributeString();
1104
+ return `<td${attrStr}>${childrenHtml}</td>`;
1105
+ }
1106
+ /**
1107
+ * @inheritDoc
1108
+ */
1109
+ toJSON() {
1110
+ return Object.assign(Object.assign({}, super.toJSON()), { type: this.type, children: this.children.map((child) => child.toJSON()) });
1111
+ }
1112
+ /**
1113
+ * Get custom attribute by name
1114
+ *
1115
+ * @param {string} attrName - attribute name
1116
+ * @returns {Nullable<string>} - attribute value
1117
+ */
1118
+ getCustomAttributeByName(attrName) {
1119
+ const customAttrAnnotation = this.getCustomAttributesAnnotation();
1120
+ if (customAttrAnnotation) {
1121
+ const customAttributes = customAttrAnnotation.toJSON()['customAttribute'] || {};
1122
+ return customAttributes[attrName];
1123
+ }
1124
+ }
1125
+ }
1126
+
1127
+ /**
1128
+ * Class representing a table head cell annotation in the rich text editor.
1129
+ */
1130
+ class RTETableHeadCellAnnotation extends RTETableCellAnnotation {
1131
+ constructor(annotation = {}, useInternalStyle = true) {
1132
+ super(annotation, useInternalStyle);
1133
+ }
1134
+ /**
1135
+ * @inheritDoc
1136
+ */
1137
+ static from(cellAnnotation, useInternalStyle) {
1138
+ return [
1139
+ RTETableExtensionAnnotationTypeEnum.CELL,
1140
+ new RTETableHeadCellAnnotation(cellAnnotation, useInternalStyle),
1141
+ ];
1142
+ }
1143
+ /**
1144
+ * Gets the default background color for table head cells based on the current theme mode.
1145
+ *
1146
+ * @returns {string} The default background color for table head cells.
1147
+ */
1148
+ static getDefaultBackgroundColor() {
1149
+ return VegaInternalThemeManager.isDarkMode()
1150
+ ? RTE_TABLE_HEAD_DEFAULT_BACKGROUND_COLOR.dark
1151
+ : RTE_TABLE_HEAD_DEFAULT_BACKGROUND_COLOR.light;
1152
+ }
1153
+ /**
1154
+ * @inheritDoc
1155
+ */
1156
+ clone() {
1157
+ return new RTETableHeadCellAnnotation({
1158
+ backgroundColor: this.backgroundColor,
1159
+ padding: this.padding,
1160
+ border: this.border,
1161
+ width: this.width,
1162
+ height: this.height,
1163
+ textAlign: this.textAlign,
1164
+ verticalAlign: this.verticalAlign,
1165
+ minWidth: this.minWidth,
1166
+ boxSizing: this.boxSizing,
1167
+ }, this.useInternalStyle);
1168
+ }
1169
+ /**
1170
+ * @inheritDoc
1171
+ */
1172
+ renderStyle(options) {
1173
+ var _a;
1174
+ const styles = super.renderStyle(options);
1175
+ return cleanObject(Object.assign(Object.assign({}, styles), { backgroundColor: (_a = styles.backgroundColor) !== null && _a !== void 0 ? _a : RTETableHeadCellAnnotation.getDefaultBackgroundColor() }));
1176
+ }
1177
+ }
1178
+
1179
+ /**
1180
+ * Class representing a table head block in the rich text editor.
1181
+ */
1182
+ class RTETableHeadCellBlock extends RTETableCellBlock {
1183
+ constructor(id, options) {
1184
+ super(id, options);
1185
+ this.type = 'table-head-cell';
1186
+ const { autoMatchFormat } = options || { autoMatchFormat: true };
1187
+ if (autoMatchFormat) {
1188
+ this.annotationMap.set(RTETableExtensionAnnotationTypeEnum.CELL, new RTETableHeadCellAnnotation());
1189
+ }
1190
+ }
1191
+ /**
1192
+ * @inheritDoc
1193
+ */
1194
+ static from(block, options) {
1195
+ var _a;
1196
+ const headCellBlock = new RTETableHeadCellBlock(block.id, options);
1197
+ super.convertAnnotationsToMap(headCellBlock.annotationMap, Object.assign({}, block.annotations));
1198
+ if ((_a = block.annotations) === null || _a === void 0 ? void 0 : _a.tableCell) {
1199
+ headCellBlock.annotationMap.set(...RTETableHeadCellAnnotation.from(block.annotations.tableCell, options === null || options === void 0 ? void 0 : options.autoMatchFormat));
1200
+ }
1201
+ headCellBlock.children = super.generateBlockChildren(block.children, options, headCellBlock);
1202
+ return headCellBlock;
1203
+ }
1204
+ /**
1205
+ * @inheritDoc
1206
+ */
1207
+ clone(parent) {
1208
+ const clonedBlock = new RTETableHeadCellBlock(this.id);
1209
+ clonedBlock.children = this.children.map((child) => child.clone(clonedBlock));
1210
+ clonedBlock.parent = parent;
1211
+ clonedBlock.annotationMap = super.cloneAnnotations();
1212
+ return clonedBlock;
1213
+ }
1214
+ /**
1215
+ * @inheritDoc
1216
+ */
1217
+ toHtml() {
1218
+ const childrenHtml = this.children.map((child) => child.toHtml()).join('');
1219
+ const attrStr = super.generateAttributeString();
1220
+ return `<th${attrStr}>${childrenHtml}</th>`;
1221
+ }
1222
+ /**
1223
+ * @inheritDoc
1224
+ */
1225
+ toJSON() {
1226
+ return Object.assign(Object.assign({}, super.toJSON()), { type: this.type, children: this.children.map((child) => child.toJSON()) });
1227
+ }
1228
+ }
1229
+
1230
+ const MERGE_CELLS = 'MERGE_CELLS';
1231
+ /**
1232
+ * Action to merge cells into the RTETable.
1233
+ */
1234
+ class MergeCellsAction extends ModifyContentAction {
1235
+ constructor(targetCell, mergeCells, colSpan, rowSpan, direction) {
1236
+ super();
1237
+ this.type = MERGE_CELLS;
1238
+ this.isFlushable = true;
1239
+ this.targetCell = targetCell;
1240
+ this.mergeCells = mergeCells;
1241
+ this.colSpan = colSpan;
1242
+ this.rowSpan = rowSpan;
1243
+ this.direction = direction;
1244
+ }
1245
+ }
1246
+
1247
+ var MergeCellsOperationType;
1248
+ (function (MergeCellsOperationType) {
1249
+ MergeCellsOperationType["MERGE_CELLS"] = "MERGE_CELLS";
1250
+ MergeCellsOperationType["MERGE_CELL_UP"] = "MERGE_CELL_UP";
1251
+ MergeCellsOperationType["MERGE_CELL_RIGHT"] = "MERGE_CELL_RIGHT";
1252
+ MergeCellsOperationType["MERGE_CELL_DOWN"] = "MERGE_CELL_DOWN";
1253
+ MergeCellsOperationType["MERGE_CELL_LEFT"] = "MERGE_CELL_LEFT";
1254
+ })(MergeCellsOperationType || (MergeCellsOperationType = {}));
1255
+ /**
1256
+ * Event handler for merge cells operations in a table.
1257
+ */
1258
+ class MergeCellsOperationEventHandler extends SettingEventHandler {
1259
+ /**
1260
+ * @inheritDoc
1261
+ */
1262
+ canHandle(action) {
1263
+ return action[0] === TableSettingType.MERGE_CELLS;
1264
+ }
1265
+ /**
1266
+ * @inheritDoc
1267
+ */
1268
+ execute(action, extensionContext) {
1269
+ const selectedCells = extensionContext.tableSelection.getSelectedCells();
1270
+ const operation = action[1];
1271
+ switch (operation) {
1272
+ case MergeCellsOperationType.MERGE_CELL_UP:
1273
+ case MergeCellsOperationType.MERGE_CELL_RIGHT:
1274
+ case MergeCellsOperationType.MERGE_CELL_DOWN:
1275
+ case MergeCellsOperationType.MERGE_CELL_LEFT:
1276
+ {
1277
+ const mergeCells = this.getDirectionMergeCells(operation, selectedCells[0]);
1278
+ this.handleMergeCells(mergeCells, operation);
1279
+ }
1280
+ break;
1281
+ default:
1282
+ {
1283
+ if (selectedCells.length > 1) {
1284
+ this.handleMergeCells(selectedCells, MergeCellsOperationType.MERGE_CELLS);
1285
+ }
1286
+ }
1287
+ break;
1288
+ }
1289
+ }
1290
+ /**
1291
+ * Get the adjacent cell in the specified direction.
1292
+ *
1293
+ * @param {MergeCellsOperationType} direction - The direction to look for the adjacent cell.
1294
+ * @param {RTETableCellBlock | RTETableHeadCellBlock} cell - The current cell.
1295
+ * @returns {Array<RTETableCellBlock | RTETableHeadCellBlock>} Array containing the cells to merge.
1296
+ */
1297
+ getDirectionMergeCells(direction, cell) {
1298
+ const adjacent = getAdjacentCell(cell, direction);
1299
+ if (!adjacent) {
1300
+ return [cell];
1301
+ }
1302
+ switch (direction) {
1303
+ case MergeCellsOperationType.MERGE_CELL_UP:
1304
+ return [adjacent, cell];
1305
+ case MergeCellsOperationType.MERGE_CELL_DOWN:
1306
+ return [cell, adjacent];
1307
+ case MergeCellsOperationType.MERGE_CELL_LEFT:
1308
+ return [adjacent, cell];
1309
+ default:
1310
+ return [cell, adjacent];
1311
+ }
1312
+ }
1313
+ /**
1314
+ * Handle the merge cells operation by creating and applying a MergeCellsAction.
1315
+ *
1316
+ * @param {Array<RTETableCellBlock | RTETableHeadCellBlock>} mergeCells - The cells to merge.
1317
+ * @param {MergeCellsOperationType} direction - The merge cell direction.
1318
+ */
1319
+ handleMergeCells(mergeCells, direction) {
1320
+ if (mergeCells.length < 2) {
1321
+ return;
1322
+ }
1323
+ const rectInfo = getRectangularBounds(mergeCells);
1324
+ const { minRow, maxRow, minCol, maxCol, targetCell } = rectInfo;
1325
+ const colSpan = maxCol - minCol + 1;
1326
+ const rowSpan = maxRow - minRow + 1;
1327
+ const action = new MergeCellsAction(targetCell, mergeCells, colSpan, rowSpan, direction);
1328
+ this.applyActionOnTable(action, targetCell);
1329
+ }
1330
+ /**
1331
+ * Apply the specified action on the table containing the selected cell.
1332
+ *
1333
+ * @param {MergeCellsAction} action - The action to apply.
1334
+ * @param {RTETableCellBlock | RTETableHeadCellBlock} selectedCell - The selected table cell.
1335
+ */
1336
+ applyActionOnTable(action, selectedCell) {
1337
+ const table = getParentBlockByType(selectedCell, RTETableBlock);
1338
+ if (table) {
1339
+ table.apply(action);
1340
+ }
1341
+ }
1342
+ }
1343
+
1344
+ /**
1345
+ * Recursively searches for a parent block of a specific type.
1346
+ *
1347
+ * @typedef T - Generic type extending RTEBlock.
1348
+ * @param {RTEBlock} block - The starting block to search from.
1349
+ * @param {ClassType<unknown>} dtoClass - The class type to match the parent block against.
1350
+ * @returns {T | null} - The found parent block of the specified type, or null if not found.
1351
+ */
1352
+ function getParentBlockByType(block, dtoClass) {
1353
+ if (block) {
1354
+ if (block instanceof dtoClass) {
1355
+ return block;
1356
+ }
1357
+ else {
1358
+ return getParentBlockByType(block.parent, dtoClass);
1359
+ }
1360
+ }
1361
+ return null;
1362
+ }
1363
+ /**
1364
+ * Generate the table body with the specified number of rows and columns.
1365
+ *
1366
+ * @param {number} rowCount - The number of rows in the table body.
1367
+ * @param {number} columnCount - The number of columns in the table body.
1368
+ * @returns {VegaRTETableBodyBlock} The generated table body block.
1369
+ */
1370
+ function generateTableBody(rowCount, columnCount) {
1371
+ return {
1372
+ id: generateUUID(),
1373
+ type: 'table-body',
1374
+ children: Array.from({ length: rowCount }, () => generateTableRow(columnCount)),
1375
+ };
1376
+ }
1377
+ /**
1378
+ * Create a table row block with the specified number of columns and cell type.
1379
+ *
1380
+ * @param {number} columnCount - The number of columns in the row.
1381
+ * @returns {VegaRTETableRowBlock} The created table row block.
1382
+ */
1383
+ function generateTableRow(columnCount) {
1384
+ return {
1385
+ id: generateUUID(),
1386
+ type: 'table-row',
1387
+ children: Array.from({ length: columnCount }, () => getDefaultCellBlockTemplate('table-cell')),
1388
+ };
1389
+ }
1390
+ /**
1391
+ * Get all table rows from a table block (including rows from all table bodies and headers).
1392
+ *
1393
+ * @param {RTETableBlock} tableBlock - The table block.
1394
+ * @returns {RTETableRowBlock[]} Array of all table row blocks.
1395
+ */
1396
+ function getAllTableRows(tableBlock) {
1397
+ return tableBlock.children
1398
+ .filter((child) => child instanceof RTETableBodyBlock || child instanceof RTETableHeadBlock)
1399
+ .flatMap((body) => body.children);
1400
+ }
1401
+ /**
1402
+ * Find the first node within a block recursively.
1403
+ *
1404
+ * @param {Nullable<RTEBlock>} block - The block to find the first node in.
1405
+ * @returns {Nullable<RTENode>} The focusable node within the block.
1406
+ */
1407
+ function getFirstNode(block) {
1408
+ if (!block || !block.children || !block.children[0])
1409
+ return null;
1410
+ const firstNode = block.children[0];
1411
+ if (firstNode instanceof RTENode) {
1412
+ return firstNode;
1413
+ }
1414
+ return getFirstNode(firstNode);
1415
+ }
1416
+ /**
1417
+ * Find a cell block by its ID across all table rows.
1418
+ *
1419
+ * @param {RTETableRowBlock[]} allTableRows - All table rows to search within.
1420
+ * @param {string} cellId - The unique identifier of the cell to find.
1421
+ * @returns {Nullable<RTETableCellBlock | RTETableHeadCellBlock>} The found cell block, or null if not found.
1422
+ */
1423
+ function findCellBlockById(allTableRows, cellId) {
1424
+ for (const row of allTableRows) {
1425
+ const found = row.children.find((cell) => cell.id === cellId);
1426
+ if (found) {
1427
+ return found;
1428
+ }
1429
+ }
1430
+ return null;
1431
+ }
1432
+ /**
1433
+ * Get the default cell block template.
1434
+ *
1435
+ * @param {string} cellType - The type of the cell block.
1436
+ * @returns {VegaRTETableCellBlock} The default cell block template.
1437
+ */
1438
+ function getDefaultCellBlockTemplate(cellType) {
1439
+ const id = generateUUID();
1440
+ return {
1441
+ id,
1442
+ type: cellType,
1443
+ children: [
1444
+ {
1445
+ id: `${id}-p`,
1446
+ type: 'paragraph',
1447
+ nodes: [
1448
+ {
1449
+ id: `${id}-p-t`,
1450
+ type: 'text',
1451
+ text: '',
1452
+ },
1453
+ ],
1454
+ },
1455
+ ],
1456
+ };
1457
+ }
1458
+ /**
1459
+ * Get the actual col span and row span of a cell.
1460
+ *
1461
+ * @param {RTETableCellBlock | RTETableHeadCellBlock} cell - The cell to check.
1462
+ * @returns {CellSpan} The actual span values.
1463
+ */
1464
+ function getCellSpan(cell) {
1465
+ return { colSpan: cell.colSpan, rowSpan: cell.rowSpan };
1466
+ }
1467
+ /**
1468
+ * Get the actual column position of a cell considering previous cells' colspan
1469
+ * and cells from previous rows with rowspan that extend into the current row.
1470
+ *
1471
+ * @param {RTETableCellBlock | RTETableHeadCellBlock} cell - The cell to check.
1472
+ * @param {RTETableRowBlock[]} allRows - The table all rows.
1473
+ * @param {string[][]} grid - The 2D grid representation of the table
1474
+ * @returns {number} The actual column position.
1475
+ */
1476
+ function getActualColumnPosition(cell, allRows, grid) {
1477
+ const tableGrid = grid !== null && grid !== void 0 ? grid : buildTableGrid(allRows);
1478
+ for (let row = 0; row < tableGrid.length; row++) {
1479
+ const cols = tableGrid[row];
1480
+ for (let col = 0; col < cols.length; col++) {
1481
+ if (cols[col] === cell.id) {
1482
+ return col;
1483
+ }
1484
+ }
1485
+ }
1486
+ return -1;
1487
+ }
1488
+ /**
1489
+ * Build a 2D grid representation of a table section where each occupied position
1490
+ * contains the cell id covering that (row, col) coordinate, accounting for colSpan/rowSpan.
1491
+ *
1492
+ * @param {RTETableRowBlock[]} allRows - All rows in the current table section.
1493
+ * @returns {string[][]} The table grid.
1494
+ */
1495
+ function buildTableGrid(allRows) {
1496
+ const grid = [];
1497
+ allRows.forEach((row, rowIndex) => {
1498
+ if (!grid[rowIndex]) {
1499
+ grid[rowIndex] = [];
1500
+ }
1501
+ let colIndex = 0;
1502
+ row.children.forEach((cell) => {
1503
+ const { colSpan, rowSpan } = getCellSpan(cell);
1504
+ while (grid[rowIndex][colIndex] !== undefined) {
1505
+ colIndex++;
1506
+ }
1507
+ for (let r = 0; r < rowSpan; r++) {
1508
+ for (let c = 0; c < colSpan; c++) {
1509
+ if (!grid[rowIndex + r]) {
1510
+ grid[rowIndex + r] = [];
1511
+ }
1512
+ grid[rowIndex + r][colIndex + c] = cell.id;
1513
+ }
1514
+ }
1515
+ colIndex += colSpan;
1516
+ });
1517
+ });
1518
+ return grid;
1519
+ }
1520
+ /**
1521
+ * Get the adjacent cell in the specified direction based on the table matrix.
1522
+ *
1523
+ * @param {RTETableCellBlock | RTETableHeadCellBlock} cell - The current cell.
1524
+ * @param {AdjacentCellDirection} direction - The direction to locate the adjacent cell.
1525
+ * @returns {RTETableCellBlock | RTETableHeadCellBlock | null} The adjacent cell or null.
1526
+ */
1527
+ function getAdjacentCell(cell, direction) {
1528
+ if (!cell) {
1529
+ return null;
1530
+ }
1531
+ const row = cell.parent;
1532
+ const sectionRows = row.parent.children;
1533
+ const rowIndex = sectionRows.indexOf(row);
1534
+ const { colSpan, rowSpan } = getCellSpan(cell);
1535
+ const cellColPosition = getActualColumnPosition(cell, sectionRows);
1536
+ let targetRowIndex = rowIndex;
1537
+ let targetColPosition = cellColPosition;
1538
+ switch (direction) {
1539
+ case MergeCellsOperationType.MERGE_CELL_LEFT:
1540
+ targetColPosition = cellColPosition - 1;
1541
+ break;
1542
+ case MergeCellsOperationType.MERGE_CELL_RIGHT:
1543
+ targetColPosition = cellColPosition + colSpan;
1544
+ break;
1545
+ case MergeCellsOperationType.MERGE_CELL_UP:
1546
+ targetRowIndex = rowIndex - 1;
1547
+ break;
1548
+ default:
1549
+ targetRowIndex = rowIndex + rowSpan;
1550
+ break;
1551
+ }
1552
+ return findCellAtPosition(sectionRows, targetRowIndex, targetColPosition);
1553
+ }
1554
+ /**
1555
+ * Find the cell that covers the specified matrix position.
1556
+ *
1557
+ * @param {RTETableRowBlock[]} rows - Rows in the current table section.
1558
+ * @param {number} targetRowIndex - Target matrix row index.
1559
+ * @param {number} targetColPosition - Target matrix column position.
1560
+ * @returns {RTETableCellBlock | RTETableHeadCellBlock | null} The covering cell or null.
1561
+ */
1562
+ function findCellAtPosition(rows, targetRowIndex, targetColPosition) {
1563
+ const tableGrid = buildTableGrid(rows);
1564
+ for (let r = 0; r < rows.length; r++) {
1565
+ const currentRow = rows[r];
1566
+ for (const candidate of currentRow.children) {
1567
+ const { colSpan, rowSpan } = getCellSpan(candidate);
1568
+ const candidateColPosition = getActualColumnPosition(candidate, rows, tableGrid);
1569
+ const candidateRowStart = r;
1570
+ const candidateRowEnd = r + rowSpan - 1;
1571
+ const candidateColEnd = candidateColPosition + colSpan - 1;
1572
+ const isSameMatrixRow = targetRowIndex >= candidateRowStart && targetRowIndex <= candidateRowEnd;
1573
+ const isTargetColumnCovered = targetColPosition >= candidateColPosition && targetColPosition <= candidateColEnd;
1574
+ if (isSameMatrixRow && isTargetColumnCovered) {
1575
+ return candidate;
1576
+ }
1577
+ }
1578
+ }
1579
+ return null;
1580
+ }
1581
+ /**
1582
+ * Get the rectangular bounds of selected cells.
1583
+ * Calculates the bounding box (minRow, maxRow, minCol, maxCol) and returns related information.
1584
+ *
1585
+ * @param {RTETableCellBlock[] | RTETableHeadCellBlock[]} selectedCells - The selected table cells.
1586
+ * @returns {RectangularBounds} The rectangular bounds' information.
1587
+ */
1588
+ function getRectangularBounds(selectedCells) {
1589
+ const firstCell = selectedCells[0];
1590
+ const firstRow = firstCell.parent;
1591
+ const table = firstRow.parent;
1592
+ const allRows = table.children;
1593
+ const tableGrid = buildTableGrid(allRows);
1594
+ let minRow = Number.POSITIVE_INFINITY;
1595
+ let maxRow = -1;
1596
+ let minCol = Number.POSITIVE_INFINITY;
1597
+ let maxCol = -1;
1598
+ const coveredPositions = new Set();
1599
+ selectedCells.forEach((cell) => {
1600
+ const row = cell.parent;
1601
+ const rowIndex = allRows.indexOf(row);
1602
+ const actualColPosition = getActualColumnPosition(cell, allRows, tableGrid);
1603
+ const { colSpan, rowSpan } = getCellSpan(cell);
1604
+ const cellMinRow = rowIndex;
1605
+ const cellMaxRow = rowIndex + rowSpan - 1;
1606
+ const cellMinCol = actualColPosition;
1607
+ const cellMaxCol = actualColPosition + colSpan - 1;
1608
+ for (let r = cellMinRow; r <= cellMaxRow; r++) {
1609
+ for (let c = cellMinCol; c <= cellMaxCol; c++) {
1610
+ coveredPositions.add(`${r},${c}`);
1611
+ }
1612
+ }
1613
+ minRow = Math.min(minRow, cellMinRow);
1614
+ maxRow = Math.max(maxRow, cellMaxRow);
1615
+ minCol = Math.min(minCol, cellMinCol);
1616
+ maxCol = Math.max(maxCol, cellMaxCol);
1617
+ });
1618
+ const targetCell = selectedCells[0];
1619
+ return {
1620
+ minRow,
1621
+ maxRow,
1622
+ minCol,
1623
+ maxCol,
1624
+ targetCell,
1625
+ coveredPositions,
1626
+ };
1627
+ }
1628
+ /**
1629
+ * Calculate the total number of columns in the table.
1630
+ * Accounts for cells with col span.
1631
+ *
1632
+ * @param {RTETableBlock} table - The table block.
1633
+ * @returns {number} The total number of columns in the table.
1634
+ */
1635
+ function getTableColumnCount(table) {
1636
+ const rows = getAllTableRows(table);
1637
+ // Calculate the total columns from the first row, accounting for col span
1638
+ let totalColumns = 0;
1639
+ const firstRow = rows[0];
1640
+ for (const cell of firstRow.children) {
1641
+ const { colSpan } = getCellSpan(cell);
1642
+ totalColumns += colSpan;
1643
+ }
1644
+ return totalColumns;
1645
+ }
1646
+ /**
1647
+ * Check if the selected cells form a rectangular area.
1648
+ * Considers cells with col span and row span.
1649
+ *
1650
+ * @param {RTETableCellBlock[] | RTETableHeadCellBlock[]} selectedCells - The selected table cells.
1651
+ * @returns {boolean} True if the selected cells form a rectangle, false otherwise.
1652
+ */
1653
+ function isRectangularSelection(selectedCells) {
1654
+ if (selectedCells.length === 1) {
1655
+ return true;
1656
+ }
1657
+ const bounds = getRectangularBounds(selectedCells);
1658
+ const { minRow, maxRow, minCol, maxCol, coveredPositions } = bounds;
1659
+ const expectedPositions = (maxRow - minRow + 1) * (maxCol - minCol + 1);
1660
+ if (coveredPositions.size !== expectedPositions) {
1661
+ return false;
1662
+ }
1663
+ return true;
1664
+ }
1665
+ /**
1666
+ * Set the col span and row span attributes for a target cell.
1667
+ * When colSpan equals the table's total columns, rowSpan is removed.
1668
+ *
1669
+ * @param {RTETableCellBlock | RTETableHeadCellBlock} targetCell - The target cell to set attributes on.
1670
+ * @param {number} colSpan - The column span value.
1671
+ * @param {number} rowSpan - The row span value.
1672
+ * @param {RTETableBlock} table - The table block.
1673
+ * @param {boolean} insertColumn - Whether the operation is an insert-column action.
1674
+ */
1675
+ function setSpanAttributes(targetCell, colSpan, rowSpan, table, insertColumn) {
1676
+ const existingAnnotation = targetCell.annotationMap.get(CommonAnnotationTypeEnum.CUSTOM_ATTRIBUTE);
1677
+ const existingAttrs = existingAnnotation
1678
+ ? Object.assign({}, existingAnnotation['customAttribute']) : {};
1679
+ delete existingAttrs.colspan;
1680
+ delete existingAttrs.rowspan;
1681
+ if (colSpan > 1) {
1682
+ existingAttrs.colspan = String(colSpan);
1683
+ }
1684
+ // When colspan equals table column count, don't set rowspan
1685
+ const tableColumnCount = getTableColumnCount(table) + (insertColumn ? 1 : 0);
1686
+ if (rowSpan > 1 && colSpan !== tableColumnCount) {
1687
+ existingAttrs.rowspan = String(rowSpan);
1688
+ }
1689
+ if (Object.keys(existingAttrs).length > 0) {
1690
+ const customAttributeAnnotation = new CustomAttributeAnnotation(existingAttrs);
1691
+ targetCell.annotationMap.set(CommonAnnotationTypeEnum.CUSTOM_ATTRIBUTE, customAttributeAnnotation);
1692
+ }
1693
+ else {
1694
+ targetCell.annotationMap.delete(CommonAnnotationTypeEnum.CUSTOM_ATTRIBUTE);
1695
+ }
1696
+ }
1697
+ /**
1698
+ * Create a new cell of the specified type.
1699
+ *
1700
+ * @param {string} cellType - The type of cell ('table-cell' or 'table-head-cell').
1701
+ * @returns {RTETableCellBlock | RTETableHeadCellBlock} The newly created cell.
1702
+ */
1703
+ function createNewCell(cellType) {
1704
+ const cellTemplate = getDefaultCellBlockTemplate(cellType);
1705
+ if (cellType === 'table-head-cell') {
1706
+ return RTETableHeadCellBlock.from(cellTemplate);
1707
+ }
1708
+ return RTETableCellBlock.from(cellTemplate);
1709
+ }
1710
+ /**
1711
+ * Find the first logical column index in a row that is not a header cell.
1712
+ *
1713
+ * @param {string[]} gridRow - The grid row array.
1714
+ * @param {RTETableRowBlock} row - The table row block.
1715
+ * @param {number} maxColLength - The maximum number of columns.
1716
+ * @returns {number} The first non-header logical column index, or -1 if not found.
1717
+ */
1718
+ function findFirstBodyColIndex(gridRow, row, maxColLength) {
1719
+ for (let colIndex = 0; colIndex < maxColLength; colIndex++) {
1720
+ const cellId = gridRow[colIndex];
1721
+ const cellBlock = row.children.find((c) => c.id === cellId);
1722
+ if (cellBlock && !(cellBlock instanceof RTETableHeadCellBlock)) {
1723
+ return colIndex;
1724
+ }
1725
+ }
1726
+ return -1;
1727
+ }
1728
+ /**
1729
+ * Build a map of cell id to its first logical column index in the table grid.
1730
+ *
1731
+ * @param {string[][]} tableGrid - The table grid.
1732
+ * @returns {Map<string, number>} Cell id to start column index.
1733
+ */
1734
+ function buildCellStartColumnMap(tableGrid) {
1735
+ const cellStartColMap = new Map();
1736
+ tableGrid.forEach((gridRow) => {
1737
+ for (let col = 0; col < gridRow.length; col++) {
1738
+ const cellId = gridRow[col];
1739
+ if (cellId && !cellStartColMap.has(cellId)) {
1740
+ cellStartColMap.set(cellId, col);
1741
+ }
1742
+ }
1743
+ });
1744
+ return cellStartColMap;
1745
+ }
1746
+ /**
1747
+ * Find the index range of the table selection.
1748
+ * Returns the starting and ending indices of the selected cells.
1749
+ *
1750
+ * @param {(RTETableCellBlock | RTETableHeadCellBlock)[]} selectedCells - The selected table cells.
1751
+ * @param {RTETableBlock} table - The table block
1752
+ * @param {RTETableRowBlock[]} allTableRows - All table rows.
1753
+ * @param {string[][]} grid - The 2D grid representation of the table
1754
+ * @returns {[number, number]} A tuple containing the start and end indices.
1755
+ */
1756
+ function getSelectedCellsBoundary(selectedCells, table, allTableRows, grid) {
1757
+ if (selectedCells.length === 0) {
1758
+ return [0, -1];
1759
+ }
1760
+ const tableRows = allTableRows ? allTableRows : getAllTableRows(table);
1761
+ const tableGrid = grid !== null && grid !== void 0 ? grid : buildTableGrid(tableRows);
1762
+ let minCol = Number.POSITIVE_INFINITY;
1763
+ let maxCol = Number.NEGATIVE_INFINITY;
1764
+ selectedCells.forEach((cell) => {
1765
+ const logicalCol = getActualColumnPosition(cell, tableRows, tableGrid);
1766
+ minCol = Math.min(minCol, logicalCol);
1767
+ maxCol = Math.max(maxCol, logicalCol);
1768
+ });
1769
+ return [minCol, maxCol];
1770
+ }
1771
+
1772
+ var RowOperationType;
1773
+ (function (RowOperationType) {
1774
+ RowOperationType["HEADER_ROW"] = "HEADER_ROW";
1775
+ RowOperationType["ADD_ROW_ABOVE"] = "ADD_ROW_ABOVE";
1776
+ RowOperationType["ADD_ROW_BELOW"] = "ADD_ROW_BELOW";
1777
+ RowOperationType["DELETE_ROW"] = "DELETE_ROW";
1778
+ RowOperationType["SELECT_ROW"] = "SELECT_ROW";
1779
+ })(RowOperationType || (RowOperationType = {}));
1780
+ /**
1781
+ * Event handler for row operations in a table.
1782
+ */
1783
+ class RowOperationEventHandler extends SettingEventHandler {
1784
+ /**
1785
+ * @inheritDoc
1786
+ */
1787
+ canHandle(action) {
1788
+ return action[0] === TableSettingType.ROW;
1789
+ }
1790
+ /**
1791
+ * @inheritDoc
1792
+ */
1793
+ execute(action, extensionContext) {
1794
+ const operation = action[1];
1795
+ switch (operation) {
1796
+ case RowOperationType.ADD_ROW_ABOVE:
1797
+ case RowOperationType.ADD_ROW_BELOW:
1798
+ this.handleInsertRow(operation, extensionContext);
1799
+ break;
1800
+ case RowOperationType.DELETE_ROW:
1801
+ this.handleDeleteRow(extensionContext);
1802
+ break;
1803
+ case RowOperationType.HEADER_ROW:
1804
+ this.handleToggleHeader(extensionContext);
1805
+ break;
1806
+ case RowOperationType.SELECT_ROW:
1807
+ this.handleSelectRow(extensionContext);
1808
+ break;
1809
+ }
1810
+ }
1811
+ /**
1812
+ * Adds a new row to the table at the specified position.
1813
+ *
1814
+ * @param {RowOperationType} direction - The position to insert the new row (above or below).
1815
+ * @param {RTETableExtensionContext} extensionContext - The extension context.
1816
+ */
1817
+ handleInsertRow(direction, extensionContext) {
1818
+ const selectedRows = this.getAllSelectedRows(extensionContext);
1819
+ if (selectedRows.length > 0) {
1820
+ const insertDirection = direction === RowOperationType.ADD_ROW_ABOVE
1821
+ ? InsertTableRowDirection.ABOVE
1822
+ : InsertTableRowDirection.BELOW;
1823
+ // The reference block will control where to insert the new row
1824
+ const refBlock = insertDirection === InsertTableRowDirection.ABOVE
1825
+ ? selectedRows[0]
1826
+ : selectedRows[selectedRows.length - 1];
1827
+ const refBlockIsBodyRow = refBlock.parent instanceof RTETableBodyBlock;
1828
+ const action = this.shouldInsertHeaderRow(refBlock, insertDirection) || refBlockIsBodyRow
1829
+ ? new InsertTableRowIntoSameSectionAction(insertDirection, selectedRows)
1830
+ : new InsertTableRowIntoDifferentSectionAction(insertDirection, selectedRows);
1831
+ this.applyActionToTable(selectedRows[0], action);
1832
+ }
1833
+ }
1834
+ /**
1835
+ * Checks if a header row should be inserted based on the selected rows and position.
1836
+ *
1837
+ * @param {RTETableRowBlock} refBlock - The reference table row block.
1838
+ * @param {InsertTableRowDirection} direction - The direction to insert the new row (above or below).
1839
+ * @returns {boolean} True if a header row should be inserted, false otherwise.
1840
+ */
1841
+ shouldInsertHeaderRow(refBlock, direction) {
1842
+ if (direction === InsertTableRowDirection.ABOVE) {
1843
+ return refBlock.parent instanceof RTETableHeadBlock;
1844
+ }
1845
+ else {
1846
+ const parentBlock = refBlock.parent;
1847
+ return (parentBlock instanceof RTETableHeadBlock &&
1848
+ parentBlock.children[parentBlock.children.length - 1] !== refBlock);
1849
+ }
1850
+ }
1851
+ /**
1852
+ * Deletes the selected row(s) from the table.
1853
+ *
1854
+ * @param {RTETableExtensionContext} extensionContext - The extension context.
1855
+ */
1856
+ handleDeleteRow(extensionContext) {
1857
+ const selectedRows = this.getAllSelectedRows(extensionContext);
1858
+ if (selectedRows.length) {
1859
+ const action = new DeleteTableRowAction(selectedRows);
1860
+ this.applyActionToTable(selectedRows[0], action);
1861
+ }
1862
+ }
1863
+ /**
1864
+ * Converts selected rows to header rows or reverts them back to normal rows.
1865
+ *
1866
+ * @param {RTETableExtensionContext} extensionContext - The extension context.
1867
+ */
1868
+ handleToggleHeader(extensionContext) {
1869
+ const selectedRows = this.getAllSelectedRows(extensionContext);
1870
+ if (selectedRows.length > 0) {
1871
+ const action = new ToggleHeaderRowAction(selectedRows);
1872
+ this.applyActionToTable(selectedRows[0], action);
1873
+ }
1874
+ }
1875
+ /**
1876
+ * Selects the focus row(s) in the table.
1877
+ *
1878
+ * @param {RTETableExtensionContext} extensionContext - The extension context.
1879
+ */
1880
+ handleSelectRow(extensionContext) {
1881
+ const selectedRows = this.getAllSelectedRows(extensionContext);
1882
+ if (selectedRows.length > 0 && extensionContext && extensionContext.tableSelection) {
1883
+ const allCells = selectedRows.flatMap((row) => row.children);
1884
+ extensionContext.tableSelection.setSelectedCells(allCells);
1885
+ }
1886
+ }
1887
+ /**
1888
+ * Get all selected table rows.
1889
+ *
1890
+ * @param {RTETableExtensionContext} extensionContext - The extension context.
1891
+ * @returns {RTETableRowBlock[]} The selected table row blocks.
1892
+ */
1893
+ getAllSelectedRows(extensionContext) {
1894
+ const selectedRows = new Set();
1895
+ if (extensionContext && extensionContext.tableSelection) {
1896
+ const { tableSelection } = extensionContext;
1897
+ const selectedCells = tableSelection.getSelectedCells();
1898
+ selectedCells.forEach((cell) => {
1899
+ const rowBlock = getParentBlockByType(cell, RTETableRowBlock);
1900
+ if (rowBlock) {
1901
+ selectedRows.add(rowBlock);
1902
+ }
1903
+ });
1904
+ }
1905
+ return Array.from(selectedRows);
1906
+ }
1907
+ /**
1908
+ * Applies the given action to the table containing the reference block.
1909
+ *
1910
+ * @param {RTEBlock} refBlock - The reference block within the table.
1911
+ * @param {ModifyContentAction} action - The action to apply to the table.
1912
+ */
1913
+ applyActionToTable(refBlock, action) {
1914
+ const table = getParentBlockByType(refBlock, RTETableBlock);
1915
+ if (table) {
1916
+ table.apply(action);
1917
+ }
1918
+ }
1919
+ }
1920
+
1921
+ const REPLACE_TABLE_CELL = 'REPLACE_TABLE_CELL';
1922
+ /**
1923
+ * Action to replace a fully overlapped table cell.
1924
+ */
1925
+ class ReplaceTableCellAction extends ModifyContentAction {
1926
+ constructor(payload) {
1927
+ super();
1928
+ this.isFlushable = true;
1929
+ this.type = REPLACE_TABLE_CELL;
1930
+ this.payload = payload;
1931
+ }
1932
+ }
1933
+
1934
+ const SPLIT_TABLE_CELL = 'SPLIT_TABLE_CELL';
1935
+ /**
1936
+ * Action to split a partially overlapped table cell.
1937
+ */
1938
+ class SplitTableCellAction extends ModifyContentAction {
1939
+ constructor(payload) {
1940
+ super();
1941
+ this.isFlushable = true;
1942
+ this.type = SPLIT_TABLE_CELL;
1943
+ this.payload = payload;
1944
+ }
1945
+ }
1946
+
1947
+ /**
1948
+ * Abstract base strategy for handling table column operations.
1949
+ * Provides common functionality for all column-related strategies.
1950
+ */
1951
+ class TableColumnStrategy extends ActionHandleStrategy {
1952
+ /**
1953
+ * Finds the index range of cells within a table row.
1954
+ * Returns the start and end indices of the given cell range.
1955
+ *
1956
+ * @param {(RTETableCellBlock | RTETableHeadCellBlock)[]} cellRange - The range of table cells to find indices for.
1957
+ * @param {RTETableRowBlock[]} allTableRows - All table rows.
1958
+ * @param {string[][]} grid - The 2D grid representation of the table
1959
+ * @returns {[number, number]} A tuple containing the start and end indices.
1960
+ */
1961
+ getBoundaryCellColumnRange(cellRange, allTableRows, grid) {
1962
+ let minCol = Number.POSITIVE_INFINITY;
1963
+ let maxCol = Number.NEGATIVE_INFINITY;
1964
+ cellRange.forEach((cell) => {
1965
+ const logicalCol = getActualColumnPosition(cell, allTableRows, grid);
1966
+ minCol = Math.min(minCol, logicalCol);
1967
+ maxCol = Math.max(maxCol, logicalCol);
1968
+ });
1969
+ return [minCol, maxCol];
1970
+ }
1971
+ }
1972
+
1973
+ /**
1974
+ * Strategy to handle the toggle of header state of a table column.
1975
+ */
1976
+ class ToggleHeaderTableColumnStrategy extends TableColumnStrategy {
1977
+ /**
1978
+ * Check if all cells in the column containing the selected cell are head cells.
1979
+ *
1980
+ * @param {(RTETableCellBlock | RTETableHeadCellBlock)[]} selectedCellRange - The range of selected table cell blocks.
1981
+ * @returns {boolean} True if all cells in the column containing the selected cell are head cells, false otherwise.
1982
+ */
1983
+ static isFullHeaderSelection(selectedCellRange) {
1984
+ if (selectedCellRange.length === 0) {
1985
+ return false;
1986
+ }
1987
+ const firstSelectedCell = selectedCellRange[0];
1988
+ const table = getParentBlockByType(firstSelectedCell, RTETableBlock);
1989
+ if (table) {
1990
+ const allTableRows = getAllTableRows(table);
1991
+ const tableGrid = buildTableGrid(allTableRows);
1992
+ const tableCellsById = new Map();
1993
+ allTableRows.forEach((row) => {
1994
+ row.children.forEach((cell) => tableCellsById.set(cell.id, cell));
1995
+ });
1996
+ const [minCol, maxCol] = getSelectedCellsBoundary(selectedCellRange, table, allTableRows, tableGrid);
1997
+ for (const gridRow of tableGrid) {
1998
+ for (let col = minCol; col <= maxCol; col++) {
1999
+ const cell = tableCellsById.get(gridRow[col]);
2000
+ if (cell && !(cell instanceof RTETableHeadCellBlock)) {
2001
+ return false;
2002
+ }
2003
+ }
2004
+ }
2005
+ return true;
2006
+ }
2007
+ return false;
2008
+ }
2009
+ /**
2010
+ * @inheritDoc
2011
+ */
2012
+ handleAction(action, target) {
2013
+ const headerOn = action.headerOn;
2014
+ const allTableRows = getAllTableRows(target);
2015
+ const tableGrid = buildTableGrid(allTableRows);
2016
+ const [minSelectCellCol, maxSelectCellCol] = this.getBoundaryCellColumnRange(action.tableCellHeaderRange, allTableRows, tableGrid);
2017
+ const shouldSplitHeadCells = headerOn || (!headerOn && minSelectCellCol > 0);
2018
+ if (shouldSplitHeadCells) {
2019
+ this.toggleHeadRows(target, allTableRows, tableGrid, headerOn, maxSelectCellCol, minSelectCellCol);
2020
+ }
2021
+ this.toggleBodyRows(target, allTableRows, tableGrid, headerOn, minSelectCellCol, maxSelectCellCol);
2022
+ const root = this.getRootContent(target);
2023
+ if (root && action.tableCellHeaderRange[0].parent) {
2024
+ const focusNode = action.tableCellHeaderRange[0].parent.getFirstNode();
2025
+ focusNode && root.apply(new UpdateCursorPositionAction(focusNode, 0));
2026
+ }
2027
+ }
2028
+ /**
2029
+ * Toggle header cells within existing table-head rows.
2030
+ *
2031
+ * @param {RTETableBlock} table - The target table block.
2032
+ * @param {RTETableRowBlock[]} allTableRows - All table rows in order.
2033
+ * @param {string[][]} tableGrid - Table grid representation.
2034
+ * @param {boolean} headerOn - Whether header mode is being enabled.
2035
+ * @param {number} maxSelectCellCol - Maximum selected logical column.
2036
+ * @param {number} minSelectCellCol - Minimum selected logical column.
2037
+ */
2038
+ toggleHeadRows(table, allTableRows, tableGrid, headerOn, maxSelectCellCol, minSelectCellCol) {
2039
+ var _a;
2040
+ const allTableHeadRows = ((_a = table.children.find((head) => head instanceof RTETableHeadBlock)) === null || _a === void 0 ? void 0 : _a.children) || [];
2041
+ const headRowLength = allTableHeadRows.length;
2042
+ for (let rowIndex = 0; rowIndex < headRowLength; rowIndex++) {
2043
+ const row = allTableRows[rowIndex];
2044
+ const endColIndex = headerOn ? maxSelectCellCol : minSelectCellCol - 1;
2045
+ this.toggleCellType(table, row, tableGrid[rowIndex], 0, endColIndex, () => true, (cell) => RTETableHeadCellBlock.from(cell.toJSON()));
2046
+ }
2047
+ }
2048
+ /**
2049
+ * Toggle header cells within body rows.
2050
+ *
2051
+ * @param {RTETableBlock} table - The target table block.
2052
+ * @param {RTETableRowBlock[]} allTableRows - All table rows in order.
2053
+ * @param {string[][]} tableGrid - Table grid representation.
2054
+ * @param {boolean} headerOn - Whether header mode is being enabled.
2055
+ * @param {number} minSelectCellCol - Minimum selected logical column.
2056
+ * @param {number} maxSelectCellCol - Maximum selected logical column.
2057
+ */
2058
+ toggleBodyRows(table, allTableRows, tableGrid, headerOn, minSelectCellCol, maxSelectCellCol) {
2059
+ var _a;
2060
+ const tableColLength = tableGrid[0].length;
2061
+ const allTableBodyRows = ((_a = table.children.find((body) => body instanceof RTETableBodyBlock)) === null || _a === void 0 ? void 0 : _a.children) || [];
2062
+ const headRowLength = allTableRows.length - allTableBodyRows.length;
2063
+ for (let i = 0; i < allTableBodyRows.length; i++) {
2064
+ const rowIndex = i + headRowLength;
2065
+ const row = allTableRows[rowIndex];
2066
+ const gridRow = tableGrid[rowIndex];
2067
+ const startColIndex = findFirstBodyColIndex(gridRow, row, tableColLength);
2068
+ if (headerOn) {
2069
+ if (startColIndex > -1) {
2070
+ this.toggleCellType(table, row, gridRow, startColIndex, maxSelectCellCol, (cell) => !(cell instanceof RTETableHeadCellBlock), (cell) => RTETableHeadCellBlock.from(cell.toJSON()));
2071
+ }
2072
+ continue;
2073
+ }
2074
+ const lastHeaderCol = startColIndex === -1 ? tableColLength - 1 : startColIndex - 1;
2075
+ this.toggleCellType(table, row, gridRow, minSelectCellCol, lastHeaderCol, (cell) => cell instanceof RTETableHeadCellBlock, (cell) => RTETableCellBlock.from(cell.toJSON()));
2076
+ }
2077
+ }
2078
+ /**
2079
+ * Toggle cell types in a row within a logical column range.
2080
+ *
2081
+ * @param {RTETableBlock} table - The table block containing the target row.
2082
+ * @param {RTETableRowBlock} row - The table row block.
2083
+ * @param {string[]} gridRow - The grid row array.
2084
+ * @param {number} startCol - Start logical column.
2085
+ * @param {number} endCol - End logical column.
2086
+ * @param {(cell: RTETableCellBlock | RTETableHeadCellBlock) => boolean} shouldConvert - Predicate to determine if a cell should be converted.
2087
+ * @param {(cell: RTETableCellBlock | RTETableHeadCellBlock) => RTETableCellBlock | RTETableHeadCellBlock} convert - Function to convert the cell.
2088
+ */
2089
+ toggleCellType(table, row, gridRow, startCol, endCol, shouldConvert, convert) {
2090
+ for (let col = startCol; col <= endCol; col++) {
2091
+ const cellId = gridRow[col];
2092
+ const cell = row.children.find((c) => c.id === cellId);
2093
+ if (cell && shouldConvert(cell)) {
2094
+ const cellStartCol = gridRow.indexOf(cellId);
2095
+ const targetCellType = convert(cell).type;
2096
+ const payload = {
2097
+ table,
2098
+ cell,
2099
+ col,
2100
+ cellStartCol,
2101
+ endCol,
2102
+ targetCellType,
2103
+ };
2104
+ const cellEndCol = cellStartCol + cell.colSpan - 1;
2105
+ const shouldSplit = cellEndCol > endCol || cellStartCol < col;
2106
+ if (shouldSplit) {
2107
+ row.apply(new SplitTableCellAction(payload));
2108
+ if (cellEndCol > endCol) {
2109
+ return;
2110
+ }
2111
+ col = cellEndCol;
2112
+ continue;
2113
+ }
2114
+ row.apply(new ReplaceTableCellAction(payload));
2115
+ }
2116
+ if (cell) {
2117
+ col += cell.colSpan - 1;
2118
+ }
2119
+ }
2120
+ }
2121
+ }
2122
+
2123
+ const DELETE_TABLE_COLUMN = 'DELETE_TABLE_COLUMN';
2124
+ /**
2125
+ * Action to delete a table column
2126
+ */
2127
+ class DeleteTableColumnAction extends ModifyContentAction {
2128
+ constructor(target) {
2129
+ super();
2130
+ this.isFlushable = true;
2131
+ this.type = DELETE_TABLE_COLUMN;
2132
+ this.tableCellDeleteRange = target;
2133
+ }
2134
+ }
2135
+
2136
+ const INSERT_TABLE_COLUMN = 'INSERT_TABLE_COLUMN';
2137
+ var InsertTableColumnDirection;
2138
+ (function (InsertTableColumnDirection) {
2139
+ InsertTableColumnDirection["LEFT"] = "LEFT";
2140
+ InsertTableColumnDirection["RIGHT"] = "RIGHT";
2141
+ })(InsertTableColumnDirection || (InsertTableColumnDirection = {}));
2142
+ /**
2143
+ * Action to insert a table column into the RTETable.
2144
+ */
2145
+ class InsertTableColumnAction extends ModifyContentAction {
2146
+ constructor(insertDirection, tableCellInsertRange) {
2147
+ super();
2148
+ this.isFlushable = true;
2149
+ this.type = INSERT_TABLE_COLUMN;
2150
+ this.tableCellInsertRange = tableCellInsertRange;
2151
+ this.insertDirection = insertDirection;
2152
+ }
2153
+ }
2154
+
2155
+ const SELECT_TABLE_COLUMN = 'SELECT_TABLE_COLUMN';
2156
+ /**
2157
+ * Action to select a table column into the RTETable.
2158
+ */
2159
+ class SelectTableColumnAction extends ModifyContentAction {
2160
+ constructor(tableCellSelectRange, selectCellCallback) {
2161
+ super();
2162
+ this.type = SELECT_TABLE_COLUMN;
2163
+ this.tableCellSelectRange = tableCellSelectRange;
2164
+ this.selectCellCallback = selectCellCallback;
2165
+ }
2166
+ }
2167
+
2168
+ const TOGGLE_HEADER_TABLE_COLUMN = 'TOGGLE_HEADER_TABLE_COLUMN';
2169
+ /**
2170
+ * Action to toggle header state of a table column in the RTETable.
2171
+ */
2172
+ class ToggleHeaderTableColumnAction extends ModifyContentAction {
2173
+ constructor(tableCellHeaderRange, headerOn) {
2174
+ super();
2175
+ this.isFlushable = true;
2176
+ this.type = TOGGLE_HEADER_TABLE_COLUMN;
2177
+ this.headerOn = false;
2178
+ this.tableCellHeaderRange = tableCellHeaderRange;
2179
+ this.headerOn = headerOn;
2180
+ }
2181
+ }
2182
+
2183
+ var ColumnOperationType;
2184
+ (function (ColumnOperationType) {
2185
+ ColumnOperationType["HEADER_COLUMN"] = "HEADER_COLUMN";
2186
+ ColumnOperationType["ADD_COLUMN_LEFT"] = "ADD_COLUMN_LEFT";
2187
+ ColumnOperationType["ADD_COLUMN_RIGHT"] = "ADD_COLUMN_RIGHT";
2188
+ ColumnOperationType["DELETE_COLUMN"] = "DELETE_COLUMN";
2189
+ ColumnOperationType["SELECT_COLUMN"] = "SELECT_COLUMN";
2190
+ })(ColumnOperationType || (ColumnOperationType = {}));
2191
+ /**
2192
+ * Event handler for column operations in a table.
2193
+ */
2194
+ class ColumnOperationEventHandler extends SettingEventHandler {
2195
+ /**
2196
+ * @inheritDoc
2197
+ */
2198
+ canHandle(action) {
2199
+ return action[0] === TableSettingType.COLUMN;
2200
+ }
2201
+ /**
2202
+ * @inheritDoc
2203
+ */
2204
+ execute(action, extensionContext) {
2205
+ const selectedCells = extensionContext.tableSelection.getSelectedCells();
2206
+ if (!selectedCells || selectedCells.length === 0) {
2207
+ return;
2208
+ }
2209
+ const operation = action[1];
2210
+ switch (operation) {
2211
+ case ColumnOperationType.ADD_COLUMN_LEFT:
2212
+ case ColumnOperationType.ADD_COLUMN_RIGHT:
2213
+ this.handleInsertColumn(operation, selectedCells);
2214
+ break;
2215
+ case ColumnOperationType.DELETE_COLUMN:
2216
+ this.handleDeleteColumn(selectedCells);
2217
+ break;
2218
+ case ColumnOperationType.SELECT_COLUMN:
2219
+ this.handleSelectColumn(selectedCells, extensionContext);
2220
+ break;
2221
+ case ColumnOperationType.HEADER_COLUMN:
2222
+ this.handleToggleHeaderColumn(selectedCells);
2223
+ break;
2224
+ }
2225
+ }
2226
+ /**
2227
+ * Adds a new column to the table at the specified position.
2228
+ *
2229
+ * @param {ColumnOperationType} direction - The position to insert the new column (left or right).
2230
+ * @param {RTETableCellBlock[] | RTETableHeadCellBlock[]} selectedCells - The selected table cells.
2231
+ */
2232
+ handleInsertColumn(direction, selectedCells) {
2233
+ const action = new InsertTableColumnAction(direction === ColumnOperationType.ADD_COLUMN_LEFT
2234
+ ? InsertTableColumnDirection.LEFT
2235
+ : InsertTableColumnDirection.RIGHT, selectedCells);
2236
+ this.applyActionOnTable(action, selectedCells[0]);
2237
+ }
2238
+ /**
2239
+ * Deletes the selected column from the table.
2240
+ *
2241
+ * @param {RTETableCellBlock[] | RTETableHeadCellBlock[]} selectedCells - The selected table cells.
2242
+ */
2243
+ handleDeleteColumn(selectedCells) {
2244
+ const action = new DeleteTableColumnAction(selectedCells);
2245
+ this.applyActionOnTable(action, selectedCells[0]);
2246
+ }
2247
+ /**
2248
+ * Selects the entire column in the table.
2249
+ *
2250
+ * @param {RTETableCellBlock[] | RTETableHeadCellBlock[]} selectedCells - The selected table cells.
2251
+ * @param {RTETableExtensionContext} extensionContext - The table extension context.
2252
+ */
2253
+ handleSelectColumn(selectedCells, extensionContext) {
2254
+ const action = new SelectTableColumnAction(selectedCells, (allSelectedCells) => {
2255
+ extensionContext.tableSelection.setSelectedCells(allSelectedCells);
2256
+ });
2257
+ this.applyActionOnTable(action, selectedCells[0]);
2258
+ }
2259
+ /**
2260
+ * Toggles the header state of the selected column in the table.
2261
+ *
2262
+ * @param {RTETableCellBlock[] | RTETableHeadCellBlock[]} selectedCells - The selected table cells.
2263
+ */
2264
+ handleToggleHeaderColumn(selectedCells) {
2265
+ const headerOn = !ToggleHeaderTableColumnStrategy.isFullHeaderSelection(selectedCells);
2266
+ const action = new ToggleHeaderTableColumnAction(selectedCells, headerOn);
2267
+ this.applyActionOnTable(action, selectedCells[0]);
2268
+ }
2269
+ /**
2270
+ * Apply the specified action on the table containing the selected cell.
2271
+ *
2272
+ * @param {DeleteTableColumnAction | InsertTableColumnAction} action - The action to apply.
2273
+ * @param {RTETableCellBlock | RTETableHeadCellBlock} selectedCell - The selected table cell.
2274
+ */
2275
+ applyActionOnTable(action, selectedCell) {
2276
+ const table = getParentBlockByType(selectedCell, RTETableBlock);
2277
+ if (table) {
2278
+ table.apply(action);
2279
+ }
2280
+ }
2281
+ }
2282
+
2283
+ const SPLIT_CELL_HORIZONTALLY = 'SPLIT_CELL_HORIZONTALLY';
2284
+ /**
2285
+ * Action to split a table cell horizontally.
2286
+ */
2287
+ class SplitCellHorizontallyAction extends ModifyContentAction {
2288
+ constructor() {
2289
+ super();
2290
+ this.isFlushable = true;
2291
+ this.type = SPLIT_CELL_HORIZONTALLY;
2292
+ }
2293
+ }
2294
+
2295
+ const SPLIT_CELL_VERTICALLY = 'SPLIT_CELL_VERTICALLY';
2296
+ /**
2297
+ * Action to split a table cell vertically.
2298
+ */
2299
+ class SplitCellVerticallyAction extends ModifyContentAction {
2300
+ constructor() {
2301
+ super();
2302
+ this.isFlushable = true;
2303
+ this.type = SPLIT_CELL_VERTICALLY;
2304
+ }
2305
+ }
2306
+
2307
+ var SplitCellOperationType;
2308
+ (function (SplitCellOperationType) {
2309
+ SplitCellOperationType["SPLIT_CELL_HORIZONTALLY"] = "SPLIT_CELL_HORIZONTALLY";
2310
+ SplitCellOperationType["SPLIT_CELL_VERTICALLY"] = "SPLIT_CELL_VERTICALLY";
2311
+ })(SplitCellOperationType || (SplitCellOperationType = {}));
2312
+ /**
2313
+ * Event handler for split cell operations in a table.
2314
+ */
2315
+ class SplitCellOperationEventHandler extends SettingEventHandler {
2316
+ /**
2317
+ * @inheritDoc
2318
+ */
2319
+ canHandle(action) {
2320
+ return action[0] === TableSettingType.SPLIT_CELL;
2321
+ }
2322
+ /**
2323
+ * @inheritDoc
2324
+ */
2325
+ execute(action, extensionContext) {
2326
+ const selectedCells = extensionContext.tableSelection.getSelectedCells();
2327
+ if (selectedCells && selectedCells.length === 1) {
2328
+ const targetCell = selectedCells[0];
2329
+ const operation = action[1];
2330
+ switch (operation) {
2331
+ case SplitCellOperationType.SPLIT_CELL_HORIZONTALLY:
2332
+ this.handleSplitCellHorizontally(targetCell);
2333
+ break;
2334
+ case SplitCellOperationType.SPLIT_CELL_VERTICALLY:
2335
+ this.handleSplitCellVertically(targetCell);
2336
+ break;
2337
+ }
2338
+ }
2339
+ }
2340
+ /**
2341
+ * Splits the selected table cell horizontally (split top/bottom).
2342
+ *
2343
+ * @param {RTETableCellBlock | RTETableHeadCellBlock} selectedCell - The table cell block to split.
2344
+ */
2345
+ handleSplitCellHorizontally(selectedCell) {
2346
+ const action = new SplitCellHorizontallyAction();
2347
+ selectedCell.apply(action);
2348
+ }
2349
+ /**
2350
+ * Splits the selected table cell vertically (split left/right).
2351
+ *
2352
+ * @param {RTETableCellBlock | RTETableHeadCellBlock} selectedCell - The table cell block to split.
2353
+ */
2354
+ handleSplitCellVertically(selectedCell) {
2355
+ const action = new SplitCellVerticallyAction();
2356
+ selectedCell.apply(action);
2357
+ }
2358
+ }
2359
+
2360
+ export { getSelectedCellsBoundary as $, RTETableRowBlock as A, getActualColumnPosition as B, ColumnOperationEventHandler as C, InsertTableRowDirection as D, RTE_TABLE_DEFAULT_COLORS as E, INSERT_TABLE_ROW_INTO_DIFFERENT_SECTION as F, INSERT_TABLE_ROW_INTO_SAME_SECTION as G, DELETE_TABLE_ROW as H, InsertTableColumnDirection as I, TOGGLE_HEADER_ROW as J, INSERT_TABLE_COLUMN as K, DELETE_TABLE_COLUMN as L, MergeCellsOperationEventHandler as M, TOGGLE_HEADER_TABLE_COLUMN as N, ToggleHeaderTableColumnStrategy as O, SPLIT_TABLE_CELL as P, REPLACE_TABLE_CELL as Q, RTETableExtensionAnnotationTypeEnum as R, SettingEventHandler as S, TableSettingType as T, SPLIT_CELL_HORIZONTALLY as U, VegaThemeManager as V, SPLIT_CELL_VERTICALLY as W, SELECT_TABLE_COLUMN as X, MERGE_CELLS as Y, RTE_TABLE_BORDER_STYLES as Z, ColumnOperationType as _, RTE_TABLE_HEAD_DEFAULT_BACKGROUND_COLOR as a, RowOperationType as a0, SplitCellOperationType as a1, isRectangularSelection as a2, getAdjacentCell as a3, RowOperationEventHandler as b, SplitCellOperationEventHandler as c, RTETableAnnotation as d, RTETableCellAnnotation as e, RTETableHeadCellBlock as f, RTETableColorManager as g, RTETableBlock as h, generateTableBody as i, RTETableCellBlock as j, RTETableHeadBlock as k, RTETableBodyBlock as l, getParentBlockByType as m, RTETableHeadCellAnnotation as n, TableColumnStrategy as o, getAllTableRows as p, buildTableGrid as q, findCellBlockById as r, setSpanAttributes as s, getDefaultCellBlockTemplate as t, buildCellStartColumnMap as u, getTableColumnCount as v, getFirstNode as w, getCellSpan as x, createNewCell as y, MergeCellsOperationType as z };