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