@heartlandone/vega 2.78.0 → 2.80.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 (1535) hide show
  1. package/dist/cjs/align-left-4a76df69.js +22 -0
  2. package/dist/cjs/app-globals-7a48292d.js +430 -0
  3. package/dist/cjs/aria-dialog-focusable-trap-slimmer-5a0a78fe.js +272 -0
  4. package/dist/cjs/auto-run-when-re-render-task-queue-slimmer.abstract-5734634d.js +51 -0
  5. package/dist/cjs/breakpoints-1cc2c4c6.js +56 -0
  6. package/dist/cjs/child-nodes-notify-observer-slimmer-a8d13f4c.js +90 -0
  7. package/dist/cjs/code-block-71a330a1.js +4521 -0
  8. package/dist/cjs/component-value-history-controller-slimmer.abstract-fd077a6c.js +714 -0
  9. package/dist/cjs/content-state-afa26456.js +4459 -0
  10. package/dist/cjs/date-required-rule-9f0e3e99.js +92 -0
  11. package/dist/cjs/deprecated-property-slimmer-300a3929.js +51 -0
  12. package/dist/cjs/design-token-3f9589eb.js +402 -0
  13. package/dist/cjs/dom-node-subject-observer-factory-a3a60da4.js +141 -0
  14. package/dist/cjs/dto-renderer-manager-ae5fcbba.js +58 -0
  15. package/dist/cjs/element-appender-slimmer-7a66229b.js +1974 -0
  16. package/dist/cjs/event-emit-slimmer-024e26bb.js +267 -0
  17. package/dist/cjs/form-field-controller-slimmer-c487cf2b.js +1266 -0
  18. package/dist/cjs/image-annotation-action-4e72af4b.js +285 -0
  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-d1a82089.js +37 -0
  22. package/dist/cjs/internal-translation-controller-9f58a4e4.js +301 -0
  23. package/dist/cjs/keyboard-manager-9dbbb0d4.js +148 -0
  24. package/dist/cjs/keyboard-manager-slimmer-68cff676.js +39 -0
  25. package/dist/cjs/loader.cjs.js +26 -21
  26. package/dist/cjs/month-view-generator-65a2f883.js +101 -0
  27. package/dist/cjs/object-b53e9416.js +52 -0
  28. package/dist/cjs/page-resize-observer-slimmer-273d62ef.js +123 -0
  29. package/dist/cjs/public-rules-36f202b3.js +46 -0
  30. package/dist/cjs/range-fa15d524.js +178 -0
  31. package/dist/cjs/responsive-format-facade-4419b4ae.js +944 -0
  32. package/dist/cjs/rich-text-editor-required-rule-7d4c2973.js +64 -0
  33. package/dist/cjs/split-cell-operation-19f98afb.js +2411 -0
  34. package/dist/cjs/string-format-strategy.abstract-c65d9861.js +63 -0
  35. package/dist/cjs/string-input-formatter-slimmer-c2e04acc.js +230 -0
  36. package/dist/cjs/string-mask-strategy-418fc0b8.js +203 -0
  37. package/dist/cjs/style-formatter-3c9ce0e5.js +34 -0
  38. package/dist/cjs/sub-state-notify-slimmer-7a4c6061.js +81 -0
  39. package/dist/cjs/sub-state-observer-slimmer-f728e068.js +134 -0
  40. package/dist/cjs/time-required-rule-ad091302.js +141 -0
  41. package/dist/cjs/token-extension-90396de7.js +7438 -0
  42. package/dist/cjs/translation-slimmer-c069ca84.js +42 -0
  43. package/dist/cjs/type-guard-d760850a.js +2033 -0
  44. package/dist/cjs/ui-32120990.js +62 -0
  45. package/dist/cjs/ui-9e8c9732.js +283 -0
  46. package/dist/cjs/valid-credit-card-number-rule-5ce8e973.js +173 -0
  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 +247 -173
  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 +109 -36
  66. package/dist/cjs/vega-dialog_2.cjs.entry.js +53 -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 +56 -33
  86. package/dist/cjs/vega-internal-event-id-a1837fa2.js +126 -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 +53 -16
  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-b6aba2de.js +32 -0
  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/slimmers/renderers/vega-calendar-event-renderer.js +4 -4
  122. package/dist/collection/components/vega-calendar/vega-calendar-event/vega-calendar-event.css +15 -12
  123. package/dist/collection/components/vega-calendar/vega-calendar-event/vega-calendar-event.js +1 -1
  124. package/dist/collection/components/vega-calendar/vega-calendar-event-preview/slimmers/renderers/vega-calendar-event-preview-detail-renderer.js +20 -3
  125. package/dist/collection/components/vega-calendar/vega-calendar.css +1 -1
  126. package/dist/collection/components/vega-calendar/vega-calendar.js +5 -0
  127. package/dist/collection/components/vega-date-picker/slimmers/controllers/vega-date-picker-calendar-open-state-controller.js +13 -1
  128. package/dist/collection/components/vega-date-picker/slimmers/renderers/vega-date-picker-calendar-renderer.js +28 -2
  129. package/dist/collection/components/vega-date-picker/slimmers/renderers/vega-date-picker-input-renderer-base.abstract.js +7 -1
  130. package/dist/collection/components/vega-date-picker/slimmers/renderers/vega-date-picker-range-input-renderer.js +15 -2
  131. package/dist/collection/components/vega-date-picker/slimmers/renderers/vega-date-picker-renderer.js +1 -1
  132. package/dist/collection/components/vega-date-picker/slimmers/renderers/vega-date-picker-single-input-renderer.js +18 -1
  133. package/dist/collection/components/vega-date-picker/vega-date-picker-calendar/slimmers/renderers/vega-date-picker-month-item-renderer.js +5 -5
  134. package/dist/collection/components/vega-grid/vega-grid.css +72 -0
  135. package/dist/collection/components/vega-grid/vega-grid.js +30 -0
  136. package/dist/collection/components/vega-input/slimmers/controllers/vega-input-mask-config-controller.js +13 -12
  137. package/dist/collection/components/vega-input/slimmers/renderers/vega-input-input-renderer.js +4 -1
  138. package/dist/collection/components/vega-input/vega-input.js +35 -1
  139. package/dist/collection/components/vega-modal/slimmers/controllers/vega-modal-open-state-controller.js +34 -1
  140. package/dist/collection/components/vega-modal/slimmers/renderers/vega-modal-renderer.js +7 -2
  141. package/dist/collection/components/vega-popover/slimmers/controllers/vega-popover-appender-controller.js +26 -1
  142. package/dist/collection/components/vega-popover/vega-popover-content-box/vega-popover-content-box.js +6 -1
  143. package/dist/collection/components/vega-popover/vega-popover.js +7 -0
  144. package/dist/collection/components/vega-rich-text-content/vega-rich-text-content.js +9 -1
  145. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/action-handle-strategy.abstract.js +10 -0
  146. package/dist/collection/components/vega-rich-text-editor/dto/annotations/bold-annotation.js +2 -1
  147. package/dist/collection/components/vega-rich-text-editor/dto/annotations/code-annotation.js +13 -6
  148. package/dist/collection/components/vega-rich-text-editor/dto/annotations/horizontal-alignment-annotation.js +18 -9
  149. package/dist/collection/components/vega-rich-text-editor/dto/annotations/image-annotation.js +11 -1
  150. package/dist/collection/components/vega-rich-text-editor/dto/annotations/italic-annotation.js +2 -1
  151. package/dist/collection/components/vega-rich-text-editor/dto/annotations/link-group-annotation.js +12 -1
  152. package/dist/collection/components/vega-rich-text-editor/dto/annotations/list-annotation.js +12 -4
  153. package/dist/collection/components/vega-rich-text-editor/dto/annotations/strikethrough-annotation.js +2 -1
  154. package/dist/collection/components/vega-rich-text-editor/dto/annotations/text-format-default-styles.js +22 -0
  155. package/dist/collection/components/vega-rich-text-editor/dto/annotations/text-style-annotation.js +43 -32
  156. package/dist/collection/components/vega-rich-text-editor/dto/annotations/underline-annotation.js +2 -1
  157. package/dist/collection/components/vega-rich-text-editor/dto/blocks/block.abstract.js +24 -2
  158. package/dist/collection/components/vega-rich-text-editor/dto/filter-styles-strategies/filter-styles-strategy-registry.js +35 -0
  159. package/dist/collection/components/vega-rich-text-editor/dto/filter-styles-strategies/filter-styles-strategy.abstract.js +62 -0
  160. package/dist/collection/components/vega-rich-text-editor/dto/filter-styles-strategies/image-node/image-filter-styles-strategy.js +16 -0
  161. package/dist/collection/components/vega-rich-text-editor/dto/filter-styles-strategies/list-block/list-block-filter-styles-strategy.js +12 -0
  162. package/dist/collection/components/vega-rich-text-editor/dto/filter-styles-strategies/list-block/list-item-block-filter-styles-strategy.js +13 -0
  163. package/dist/collection/components/vega-rich-text-editor/dto/filter-styles-strategies/text-block/alignment-filter-styles-strategy.js +39 -0
  164. package/dist/collection/components/vega-rich-text-editor/dto/filter-styles-strategies/text-node/code-filter-styles-strategy.js +26 -0
  165. package/dist/collection/components/vega-rich-text-editor/dto/filter-styles-strategies/text-node/link-filter-styles-strategy.js +30 -0
  166. package/dist/collection/components/vega-rich-text-editor/dto/filter-styles-strategies/text-node/text-format-filter-styles-strategy.js +89 -0
  167. package/dist/collection/components/vega-rich-text-editor/dto/renderers/nodes/text-node-renderer.js +0 -10
  168. package/dist/collection/components/vega-rich-text-editor/dto/setup.js +18 -0
  169. package/dist/collection/components/vega-rich-text-editor/extensions/base-extension-renderer.js +2 -1
  170. package/dist/collection/components/vega-rich-text-editor/extensions/base-toolbar-button-renderer.js +10 -5
  171. package/dist/collection/components/vega-rich-text-editor/extensions/extension.abstract.js +18 -1
  172. package/dist/collection/components/vega-rich-text-editor/extensions/table/action-handler-interceptors/prevent-cell-children-remove-interceptor.js +42 -0
  173. package/dist/collection/components/vega-rich-text-editor/extensions/table/action-handler-interceptors/prevent-cell-content-delete-interceptor.js +26 -0
  174. package/dist/collection/components/vega-rich-text-editor/extensions/table/action-handler-interceptors/prevent-row-insert-interceptor.js +23 -0
  175. package/dist/collection/components/vega-rich-text-editor/extensions/table/action-handler-interceptors/prevent-table-insert-paragraph-interceptor.js +55 -0
  176. package/dist/collection/components/vega-rich-text-editor/extensions/table/action-handler-strategies/create-segment-table-cell-strategy.js +33 -0
  177. package/dist/collection/components/vega-rich-text-editor/extensions/table/action-handler-strategies/delete-table-block-strategy.js +25 -0
  178. package/dist/collection/components/vega-rich-text-editor/extensions/table/action-handler-strategies/delete-table-column-strategy.js +176 -0
  179. package/dist/collection/components/vega-rich-text-editor/extensions/table/action-handler-strategies/delete-table-row-strategy.js +154 -0
  180. package/dist/collection/components/vega-rich-text-editor/extensions/table/action-handler-strategies/insert-table-block-strategy.js +54 -0
  181. package/dist/collection/components/vega-rich-text-editor/extensions/table/action-handler-strategies/insert-table-column-strategy.js +163 -0
  182. package/dist/collection/components/vega-rich-text-editor/extensions/table/action-handler-strategies/insert-table-row-into-different-section-strategy.js +83 -0
  183. package/dist/collection/components/vega-rich-text-editor/extensions/table/action-handler-strategies/insert-table-row-into-same-section-strategy.js +55 -0
  184. package/dist/collection/components/vega-rich-text-editor/extensions/table/action-handler-strategies/merge-cells-strategy.js +120 -0
  185. package/dist/collection/components/vega-rich-text-editor/extensions/table/action-handler-strategies/replace-table-cell-strategy.js +21 -0
  186. package/dist/collection/components/vega-rich-text-editor/extensions/table/action-handler-strategies/select-table-column-strategy.js +33 -0
  187. package/dist/collection/components/vega-rich-text-editor/extensions/table/action-handler-strategies/split-cell-horizontally-strategy.js +143 -0
  188. package/dist/collection/components/vega-rich-text-editor/extensions/table/action-handler-strategies/split-cell-vertically-strategy.js +80 -0
  189. package/dist/collection/components/vega-rich-text-editor/extensions/table/action-handler-strategies/split-table-cell-strategy.js +45 -0
  190. package/dist/collection/components/vega-rich-text-editor/extensions/table/action-handler-strategies/table-column-strategy.abstract.js +27 -0
  191. package/dist/collection/components/vega-rich-text-editor/extensions/table/action-handler-strategies/table-row-strategy.abstract.js +296 -0
  192. package/dist/collection/components/vega-rich-text-editor/extensions/table/action-handler-strategies/toggle-header-row-strategy.js +274 -0
  193. package/dist/collection/components/vega-rich-text-editor/extensions/table/action-handler-strategies/toggle-header-table-column-strategy.js +159 -0
  194. package/dist/collection/components/vega-rich-text-editor/extensions/table/action-handler-strategies/update-table-cell-properties-strategy.js +33 -0
  195. package/dist/collection/components/vega-rich-text-editor/extensions/table/action-handler-strategies/update-table-properties-strategy.js +36 -0
  196. package/dist/collection/components/vega-rich-text-editor/extensions/table/actions/create-segment-table-cell-action.js +13 -0
  197. package/dist/collection/components/vega-rich-text-editor/extensions/table/actions/delete-table-block-action.js +13 -0
  198. package/dist/collection/components/vega-rich-text-editor/extensions/table/actions/delete-table-column-action.js +13 -0
  199. package/dist/collection/components/vega-rich-text-editor/extensions/table/actions/delete-table-row-action.js +18 -0
  200. package/dist/collection/components/vega-rich-text-editor/extensions/table/actions/insert-table-block-action.js +13 -0
  201. package/dist/collection/components/vega-rich-text-editor/extensions/table/actions/insert-table-column-action.js +19 -0
  202. package/dist/collection/components/vega-rich-text-editor/extensions/table/actions/insert-table-row-into-different-section-action.js +21 -0
  203. package/dist/collection/components/vega-rich-text-editor/extensions/table/actions/insert-table-row-into-same-section-action.js +27 -0
  204. package/dist/collection/components/vega-rich-text-editor/extensions/table/actions/merge-cells-action.js +17 -0
  205. package/dist/collection/components/vega-rich-text-editor/extensions/table/actions/replace-table-cell-action.js +13 -0
  206. package/dist/collection/components/vega-rich-text-editor/extensions/table/actions/select-table-column-action.js +13 -0
  207. package/dist/collection/components/vega-rich-text-editor/extensions/table/actions/split-cell-horizontally-action.js +12 -0
  208. package/dist/collection/components/vega-rich-text-editor/extensions/table/actions/split-cell-vertically-action.js +12 -0
  209. package/dist/collection/components/vega-rich-text-editor/extensions/table/actions/split-table-cell-action.js +13 -0
  210. package/dist/collection/components/vega-rich-text-editor/extensions/table/actions/table-annotations-action.js +18 -0
  211. package/dist/collection/components/vega-rich-text-editor/extensions/table/actions/table-caption-action.js +13 -0
  212. package/dist/collection/components/vega-rich-text-editor/extensions/table/actions/table-cell-annotations-action.js +28 -0
  213. package/dist/collection/components/vega-rich-text-editor/extensions/table/actions/table-head-cell-annotations-action.js +17 -0
  214. package/dist/collection/components/vega-rich-text-editor/extensions/table/actions/toggle-header-row-action.js +13 -0
  215. package/dist/collection/components/vega-rich-text-editor/extensions/table/actions/toggle-header-table-column-action.js +15 -0
  216. package/dist/collection/components/vega-rich-text-editor/extensions/table/actions/update-table-properties-action.js +38 -0
  217. package/dist/collection/components/vega-rich-text-editor/extensions/table/annotation-handler/table-annotation-handler-base.js +78 -0
  218. package/dist/collection/components/vega-rich-text-editor/extensions/table/annotation-handler/table-annotation-handler.js +69 -0
  219. package/dist/collection/components/vega-rich-text-editor/extensions/table/annotation-handler/table-cell-annotation-handler.js +108 -0
  220. package/dist/collection/components/vega-rich-text-editor/extensions/table/annotation-handler/table-head-cell-annotation-handler.js +14 -0
  221. package/dist/collection/components/vega-rich-text-editor/extensions/table/annotations/table-annotation.js +106 -0
  222. package/dist/collection/components/vega-rich-text-editor/extensions/table/annotations/table-caption-annotation.js +69 -0
  223. package/dist/collection/components/vega-rich-text-editor/extensions/table/annotations/table-cell-annotation.js +192 -0
  224. package/dist/collection/components/vega-rich-text-editor/extensions/table/annotations/table-color-annotation.js +66 -0
  225. package/dist/collection/components/vega-rich-text-editor/extensions/table/annotations/table-head-cell-annotation.js +56 -0
  226. package/dist/collection/components/vega-rich-text-editor/extensions/table/constants/styles.constants.js +27 -0
  227. package/dist/collection/components/vega-rich-text-editor/extensions/table/dto/table-block.js +119 -0
  228. package/dist/collection/components/vega-rich-text-editor/extensions/table/dto/table-body-block.js +56 -0
  229. package/dist/collection/components/vega-rich-text-editor/extensions/table/dto/table-caption-block.js +69 -0
  230. package/dist/collection/components/vega-rich-text-editor/extensions/table/dto/table-cell-block.js +97 -0
  231. package/dist/collection/components/vega-rich-text-editor/extensions/table/dto/table-head-block.js +60 -0
  232. package/dist/collection/components/vega-rich-text-editor/extensions/table/dto/table-head-cell-block.js +53 -0
  233. package/dist/collection/components/vega-rich-text-editor/extensions/table/dto/table-row-block.js +60 -0
  234. package/dist/collection/components/vega-rich-text-editor/extensions/table/element-to-dto-strategies/caption-to-caption-block-strategy.js +71 -0
  235. package/dist/collection/components/vega-rich-text-editor/extensions/table/element-to-dto-strategies/table-to-table-block-strategy.js +42 -0
  236. package/dist/collection/components/vega-rich-text-editor/extensions/table/element-to-dto-strategies/tbody-to-table-body-block-strategy.js +42 -0
  237. package/dist/collection/components/vega-rich-text-editor/extensions/table/element-to-dto-strategies/td-to-table-cell-block-strategy.js +93 -0
  238. package/dist/collection/components/vega-rich-text-editor/extensions/table/element-to-dto-strategies/thead-to-table-head-block-strategy.js +42 -0
  239. package/dist/collection/components/vega-rich-text-editor/extensions/table/element-to-dto-strategies/tr-to-table-row-block-strategy.js +42 -0
  240. package/dist/collection/components/vega-rich-text-editor/extensions/table/renderers/table-body-renderer.js +15 -0
  241. package/dist/collection/components/vega-rich-text-editor/extensions/table/renderers/table-caption-renderer.js +22 -0
  242. package/dist/collection/components/vega-rich-text-editor/extensions/table/renderers/table-cell-renderer.js +72 -0
  243. package/dist/collection/components/vega-rich-text-editor/extensions/table/renderers/table-dynamic-popover-renderer.js +263 -0
  244. package/dist/collection/components/vega-rich-text-editor/extensions/table/renderers/table-head-cell-renderer.js +12 -0
  245. package/dist/collection/components/vega-rich-text-editor/extensions/table/renderers/table-head-renderer.js +15 -0
  246. package/dist/collection/components/vega-rich-text-editor/extensions/table/renderers/table-popover-base-renderer.js +19 -0
  247. package/dist/collection/components/vega-rich-text-editor/extensions/table/renderers/table-renderer.js +116 -0
  248. package/dist/collection/components/vega-rich-text-editor/extensions/table/renderers/table-row-renderer.js +15 -0
  249. package/dist/collection/components/vega-rich-text-editor/extensions/table/renderers/table-setting-popover-renderer.js +148 -0
  250. package/dist/collection/components/vega-rich-text-editor/extensions/table/renderers/table-toolbar-popover-renderer.js +178 -0
  251. package/dist/collection/components/vega-rich-text-editor/extensions/table/setting-event-handlers/caption-operation.js +78 -0
  252. package/dist/collection/components/vega-rich-text-editor/extensions/table/setting-event-handlers/cell-properties-cancel-event-handler.js +17 -0
  253. package/dist/collection/components/vega-rich-text-editor/extensions/table/setting-event-handlers/cell-properties-change-event-handler.js +15 -0
  254. package/dist/collection/components/vega-rich-text-editor/extensions/table/setting-event-handlers/cell-properties-save-event-handler.js +19 -0
  255. package/dist/collection/components/vega-rich-text-editor/extensions/table/setting-event-handlers/cell-properties.js +136 -0
  256. package/dist/collection/components/vega-rich-text-editor/extensions/table/setting-event-handlers/column-operation.js +109 -0
  257. package/dist/collection/components/vega-rich-text-editor/extensions/table/setting-event-handlers/merge-cells-operation.js +100 -0
  258. package/dist/collection/components/vega-rich-text-editor/extensions/table/setting-event-handlers/row-operation.js +160 -0
  259. package/dist/collection/components/vega-rich-text-editor/extensions/table/setting-event-handlers/setting-event-handler.abstract.js +45 -0
  260. package/dist/collection/components/vega-rich-text-editor/extensions/table/setting-event-handlers/split-cell-operation.js +57 -0
  261. package/dist/collection/components/vega-rich-text-editor/extensions/table/setting-event-handlers/table-properties-cancel-event-handler.js +19 -0
  262. package/dist/collection/components/vega-rich-text-editor/extensions/table/setting-event-handlers/table-properties-change-event-handler.js +20 -0
  263. package/dist/collection/components/vega-rich-text-editor/extensions/table/setting-event-handlers/table-properties-save-event-handler.js +20 -0
  264. package/dist/collection/components/vega-rich-text-editor/extensions/table/setting-event-handlers/table-properties.js +50 -0
  265. package/dist/collection/components/vega-rich-text-editor/extensions/table/table-extension.js +174 -0
  266. package/dist/collection/components/vega-rich-text-editor/extensions/table/table-icon.js +3 -0
  267. package/dist/collection/components/vega-rich-text-editor/extensions/table/table-selection.js +460 -0
  268. package/dist/collection/components/vega-rich-text-editor/extensions/table/table-toolbar-button-renderer.js +61 -0
  269. package/dist/collection/components/vega-rich-text-editor/extensions/table/utils/table-color-manager.js +55 -0
  270. package/dist/collection/components/vega-rich-text-editor/extensions/table/utils/utils.js +436 -0
  271. package/dist/collection/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-properties/assets/align-bottom.js +3 -0
  272. package/dist/collection/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-properties/assets/align-middle.js +3 -0
  273. package/dist/collection/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-properties/assets/align-top.js +3 -0
  274. package/dist/collection/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-properties/assets/objects-align-center-horizontal.js +3 -0
  275. package/dist/collection/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-properties/assets/objects-align-left.js +3 -0
  276. package/dist/collection/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-properties/assets/objects-align-right.js +3 -0
  277. 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
  278. 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
  279. 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
  280. 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
  281. 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
  282. package/dist/collection/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-properties/vega-rich-text-table-properties.css +149 -0
  283. package/dist/collection/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-properties/vega-rich-text-table-properties.js +251 -0
  284. 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
  285. package/dist/collection/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-selection-widget/slimmers/renderers/selection-widget-renderer.js +83 -0
  286. 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
  287. 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
  288. package/dist/collection/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-setting/assets/icon.js +20 -0
  289. package/dist/collection/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-setting/slimmers/renderers/caption-button-slimmer.js +27 -0
  290. package/dist/collection/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-setting/slimmers/renderers/cell-properties-button-slimmer.js +26 -0
  291. package/dist/collection/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-setting/slimmers/renderers/column-button-slimmer.js +90 -0
  292. package/dist/collection/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-setting/slimmers/renderers/merge-cells-button-slimmer.js +117 -0
  293. package/dist/collection/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-setting/slimmers/renderers/row-button-slimmer.js +103 -0
  294. package/dist/collection/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-setting/slimmers/renderers/table-properties-button-slimmer.js +26 -0
  295. 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
  296. 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
  297. package/dist/collection/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-setting/vega-rich-text-table-setting.css +23 -0
  298. package/dist/collection/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-setting/vega-rich-text-table-setting.js +222 -0
  299. package/dist/collection/components/vega-rich-text-editor/public-api.js +1 -0
  300. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/extension-controller.js +35 -6
  301. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/annotation-handler/bold-annotaion-handler.js +3 -2
  302. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/annotation-handler/html-element-to-annotation-generator.js +50 -2
  303. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/annotation-handler/italic-annotation-handler.js +2 -1
  304. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/annotation-handler/strike-through-annotation-handler.js +2 -1
  305. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/annotation-handler/text-style-annotation-handler.js +3 -1
  306. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/annotation-handler/underline-annotation-handler.js +2 -1
  307. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/input-event-handler/insert-paragraph-handler.js +2 -1
  308. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/selection-controller.js +26 -2
  309. package/dist/collection/components/vega-rich-text-editor/vega-rich-text-editor.css +4 -0
  310. package/dist/collection/components/vega-rich-text-editor/vega-rich-text-editor.js +0 -5
  311. package/dist/collection/components/vega-time-picker/slimmers/renderers/vega-time-picker-range-input-renderer.js +5 -2
  312. package/dist/collection/components/vega-time-picker/slimmers/renderers/vega-time-picker-single-input-renderer.js +4 -1
  313. package/dist/collection/components/vega-time-picker/vega-time-picker.js +36 -0
  314. package/dist/collection/constants/runtime-metrics-payload-definition/vega-time-picker/runtime-metrics-payload-definition.js +24 -0
  315. package/dist/collection/constants/ui.js +2 -0
  316. package/dist/collection/global/scripts/before-vega-load.js +2 -0
  317. package/dist/collection/helpers/calendar/calendar-date.js +10 -0
  318. package/dist/collection/helpers/calendar/calendar-view-generator/calendar-view-generator.abstract.js +2 -2
  319. package/dist/collection/helpers/event-manager/event-id/vega-internal-event-id.js +3 -0
  320. package/dist/collection/helpers/formatter/responsive-map-formatter/responsive-format-facade.js +3 -0
  321. package/dist/collection/helpers/formatter/responsive-map-formatter/responsive-grid-justify-items-formatter.js +29 -0
  322. package/dist/collection/helpers/formatter/string-formatter/custom-formatter-strategy.js +3 -1
  323. package/dist/collection/helpers/formatter/string-formatter/number-mask-strategy.js +3 -1
  324. package/dist/collection/helpers/formatter/string-formatter/number-thousand-comma-strategy.js +3 -2
  325. package/dist/collection/helpers/formatter/string-formatter/string-format-strategy.abstract.js +4 -1
  326. package/dist/collection/helpers/formatter/string-formatter/string-mask-strategy.js +38 -7
  327. package/dist/collection/helpers/formatter/string-formatter/thousand-comma-strategy.js +4 -0
  328. package/dist/collection/helpers/keyboard/keyboard-manager.js +11 -3
  329. package/dist/collection/helpers/slimmers/aria-dialog-focusable-trap-slimmer.js +267 -0
  330. package/dist/collection/helpers/slimmers/position-calculation/base-position-calculation-strategy.js +1 -1
  331. package/dist/collection/helpers/translation/locales/en.js +2 -0
  332. package/dist/collection/types/type-guard.js +10 -1
  333. package/dist/collection/utils/object.js +6 -4
  334. package/dist/collection/utils/ui.js +28 -2
  335. package/dist/esm/align-left-7f959adf.js +17 -0
  336. package/dist/esm/app-globals-e77015e3.js +428 -0
  337. package/dist/esm/aria-dialog-focusable-trap-slimmer-5a2f92be.js +270 -0
  338. package/dist/esm/auto-run-when-re-render-task-queue-slimmer.abstract-27820d4c.js +49 -0
  339. package/dist/esm/breakpoints-332702ed.js +53 -0
  340. package/dist/esm/child-nodes-event-prevent-slimmer-2ecc3e1f.js +156 -0
  341. package/dist/esm/child-nodes-notify-observer-slimmer-b7f0e419.js +88 -0
  342. package/dist/esm/code-block-7d6f231b.js +4455 -0
  343. package/dist/esm/component-value-history-controller-slimmer.abstract-acf65b17.js +709 -0
  344. package/dist/esm/content-state-084cd705.js +4439 -0
  345. package/dist/esm/date-required-rule-29608215.js +90 -0
  346. package/dist/esm/deprecated-property-slimmer-ea34fa7b.js +49 -0
  347. package/dist/esm/design-token-edcd787b.js +388 -0
  348. package/dist/esm/dom-node-subject-observer-factory-cea9248d.js +138 -0
  349. package/dist/esm/dto-renderer-manager-12bc9121.js +56 -0
  350. package/dist/esm/element-appender-slimmer-08ec429b.js +1972 -0
  351. package/dist/esm/event-emit-slimmer-4fba1b35.js +265 -0
  352. package/dist/esm/form-field-controller-slimmer-8dd39707.js +1264 -0
  353. package/dist/esm/image-annotation-action-a6b33a81.js +280 -0
  354. package/dist/esm/index-090d31ca.js +4 -0
  355. package/dist/esm/index.js +30 -26
  356. package/dist/esm/inject-keyboard-manager-7557816f.js +35 -0
  357. package/dist/esm/internal-translation-controller-b08aa9ab.js +298 -0
  358. package/dist/esm/internal-vega-event-manager-59f5bd47.js +494 -0
  359. package/dist/esm/keyboard-manager-1846c6a5.js +146 -0
  360. package/dist/esm/keyboard-manager-slimmer-1ae0aa4d.js +37 -0
  361. package/dist/esm/loader.js +26 -21
  362. package/dist/esm/month-view-generator-b700ed08.js +97 -0
  363. package/dist/esm/object-0c277f57.js +48 -0
  364. package/dist/esm/page-resize-observer-slimmer-e24d36c5.js +121 -0
  365. package/dist/esm/public-rules-fe2c7934.js +31 -0
  366. package/dist/esm/range-00afe462.js +176 -0
  367. package/dist/esm/responsive-format-facade-37d4d850.js +940 -0
  368. package/dist/esm/rich-text-editor-required-rule-6487ec94.js +62 -0
  369. package/dist/esm/split-cell-operation-9445e642.js +2360 -0
  370. package/dist/esm/string-format-strategy.abstract-ec6d627b.js +61 -0
  371. package/dist/esm/string-input-formatter-slimmer-959dff7a.js +228 -0
  372. package/dist/esm/string-mask-strategy-49be41f0.js +201 -0
  373. package/dist/esm/style-formatter-ad0b2bac.js +32 -0
  374. package/dist/esm/sub-state-notify-slimmer-ee8c417b.js +79 -0
  375. package/dist/esm/sub-state-observer-slimmer-4d30fa5c.js +132 -0
  376. package/dist/esm/time-required-rule-414b1590.js +138 -0
  377. package/dist/esm/token-extension-600b1c88.js +7417 -0
  378. package/dist/esm/translation-slimmer-35b1d0fa.js +40 -0
  379. package/dist/esm/type-guard-23a08026.js +1958 -0
  380. package/dist/esm/ui-93922c59.js +47 -0
  381. package/dist/esm/ui-ba5a4758.js +267 -0
  382. package/dist/esm/valid-credit-card-number-rule-60abddac.js +171 -0
  383. package/dist/esm/vega-accordion.entry.js +11 -11
  384. package/dist/esm/vega-app-header-button.entry.js +13 -13
  385. package/dist/esm/vega-backdrop.entry.js +2 -2
  386. package/dist/esm/vega-banner.entry.js +5 -5
  387. package/dist/esm/vega-box.entry.js +9 -9
  388. package/dist/esm/vega-breadcrumb.entry.js +6 -6
  389. package/dist/esm/vega-button-circle.entry.js +13 -13
  390. package/dist/esm/vega-button-group_2.entry.js +9 -9
  391. package/dist/esm/vega-button-link.entry.js +6 -6
  392. package/dist/esm/vega-button.entry.js +13 -13
  393. package/dist/esm/vega-calendar_4.entry.js +250 -176
  394. package/dist/esm/vega-card.entry.js +7 -7
  395. package/dist/esm/vega-carousel.entry.js +13 -13
  396. package/dist/esm/vega-checkbox_2.entry.js +14 -14
  397. package/dist/esm/vega-chip.entry.js +13 -13
  398. package/dist/esm/vega-code-block.entry.js +18 -17
  399. package/dist/esm/vega-color-picker.entry.js +12 -12
  400. package/dist/esm/vega-combo-box.entry.js +16 -16
  401. package/dist/esm/vega-date-picker_2.entry.js +112 -39
  402. package/dist/esm/vega-dialog_2.entry.js +56 -18
  403. package/dist/esm/vega-divider.entry.js +7 -7
  404. package/dist/esm/vega-dropdown_5.entry.js +20 -20
  405. package/dist/esm/vega-env-manager-8f8dc473.js +2 -2
  406. package/dist/esm/vega-event-id-4ede557a.js +114 -0
  407. package/dist/esm/vega-field-label.entry.js +5 -5
  408. package/dist/esm/vega-file-uploader.entry.js +13 -13
  409. package/dist/esm/vega-flag-icon.entry.js +6 -6
  410. package/dist/esm/vega-flex.entry.js +9 -9
  411. package/dist/esm/vega-font.entry.js +8 -8
  412. package/dist/esm/vega-form.entry.js +16 -16
  413. package/dist/esm/vega-grid.entry.js +9 -8
  414. package/dist/esm/vega-icon.entry.js +7 -7
  415. package/dist/esm/vega-image-uploader.entry.js +16 -16
  416. package/dist/esm/vega-input-credit-card.entry.js +17 -17
  417. package/dist/esm/vega-input-numeric.entry.js +17 -17
  418. package/dist/esm/vega-input-passcode.entry.js +16 -16
  419. package/dist/esm/vega-input-phone-number.entry.js +15 -15
  420. package/dist/esm/vega-input-range.entry.js +14 -14
  421. package/dist/esm/vega-input-select.entry.js +16 -16
  422. package/dist/esm/vega-input.entry.js +58 -35
  423. package/dist/esm/vega-internal-event-id-70bd893d.js +73 -0
  424. package/dist/esm/vega-item-toggle.entry.js +8 -8
  425. package/dist/esm/vega-left-nav_5.entry.js +17 -17
  426. package/dist/esm/vega-loader-wrapper_2.entry.js +7 -7
  427. package/dist/esm/vega-page-notification_2.entry.js +3 -3
  428. package/dist/esm/vega-pagination-page-selector-mobile.entry.js +6 -6
  429. package/dist/esm/vega-pagination-page-size-selector-mobile.entry.js +6 -6
  430. package/dist/esm/vega-pagination.entry.js +14 -14
  431. package/dist/esm/vega-popover_2.entry.js +55 -18
  432. package/dist/esm/vega-progress-tracker_2.entry.js +16 -16
  433. package/dist/esm/vega-radio_2.entry.js +17 -17
  434. package/dist/esm/vega-rich-text-content.entry.js +21 -23
  435. package/dist/esm/vega-rich-text-editor_4.entry.js +196 -231
  436. package/dist/esm/vega-rich-text-table-properties_3.entry.js +1521 -0
  437. package/dist/esm/vega-segment-control.entry.js +8 -8
  438. package/dist/esm/vega-selection-chip_2.entry.js +16 -16
  439. package/dist/esm/vega-selection-tile_2.entry.js +15 -15
  440. package/dist/esm/vega-sidenav_3.entry.js +14 -14
  441. package/dist/esm/vega-signature-capture.entry.js +17 -17
  442. package/dist/esm/vega-stepper.entry.js +13 -13
  443. package/dist/esm/vega-tab-group_2.entry.js +9 -9
  444. package/dist/esm/vega-table_11.entry.js +17 -17
  445. package/dist/esm/vega-text.entry.js +4 -4
  446. package/dist/esm/vega-textarea.entry.js +13 -13
  447. package/dist/esm/vega-time-picker_2.entry.js +65 -23
  448. package/dist/esm/vega-toggle-switch.entry.js +12 -12
  449. package/dist/esm/vega-tooltip_2.entry.js +14 -14
  450. package/dist/esm/vega.js +26 -21
  451. package/dist/esm/wait-for-component-did-render-03e7ccb2.js +30 -0
  452. package/dist/sri/vega-sri-manifest.json +384 -360
  453. package/dist/types/components/vega-calendar/slimmers/common/controllers/vega-calendar-day-view-focus-slimmer.d.ts +15 -0
  454. package/dist/types/components/vega-calendar/slimmers/month-view/renderers/vega-calendar-month-view-renderer.d.ts +3 -0
  455. package/dist/types/components/vega-calendar/vega-calendar-event-preview/slimmers/renderers/vega-calendar-event-preview-detail-renderer.d.ts +6 -0
  456. package/dist/types/components/vega-calendar/vega-calendar.d.ts +2 -0
  457. package/dist/types/components/vega-date-picker/slimmers/controllers/vega-date-picker-calendar-open-state-controller.d.ts +2 -0
  458. package/dist/types/components/vega-date-picker/slimmers/renderers/vega-date-picker-calendar-renderer.d.ts +5 -0
  459. package/dist/types/components/vega-date-picker/slimmers/renderers/vega-date-picker-input-renderer-base.abstract.d.ts +2 -0
  460. package/dist/types/components/vega-date-picker/slimmers/renderers/vega-date-picker-range-input-renderer.d.ts +3 -0
  461. package/dist/types/components/vega-date-picker/slimmers/renderers/vega-date-picker-single-input-renderer.d.ts +5 -0
  462. package/dist/types/components/vega-grid/vega-grid.d.ts +13 -1
  463. package/dist/types/components/vega-input/slimmers/controllers/vega-input-mask-config-controller.d.ts +1 -0
  464. package/dist/types/components/vega-input/slimmers/renderers/vega-input-input-renderer.d.ts +1 -0
  465. package/dist/types/components/vega-input/types.d.ts +30 -1
  466. package/dist/types/components/vega-input/vega-input.d.ts +10 -0
  467. package/dist/types/components/vega-modal/slimmers/controllers/vega-modal-open-state-controller.d.ts +13 -0
  468. package/dist/types/components/vega-modal/slimmers/renderers/vega-modal-renderer.d.ts +1 -0
  469. package/dist/types/components/vega-popover/slimmers/controllers/vega-popover-appender-controller.d.ts +7 -0
  470. package/dist/types/components/vega-rich-text-content/vega-rich-text-content.d.ts +3 -0
  471. package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/action-handle-strategy.abstract.d.ts +7 -0
  472. package/dist/types/components/vega-rich-text-editor/dto/annotations/annotation.abstract.d.ts +2 -5
  473. package/dist/types/components/vega-rich-text-editor/dto/annotations/block-annotation.abstract.d.ts +3 -3
  474. package/dist/types/components/vega-rich-text-editor/dto/annotations/code-annotation.d.ts +6 -0
  475. package/dist/types/components/vega-rich-text-editor/dto/annotations/custom-attribute-annotation.d.ts +1 -1
  476. package/dist/types/components/vega-rich-text-editor/dto/annotations/horizontal-alignment-annotation.d.ts +7 -0
  477. package/dist/types/components/vega-rich-text-editor/dto/annotations/image-annotation.d.ts +6 -0
  478. package/dist/types/components/vega-rich-text-editor/dto/annotations/link-group-annotation.d.ts +7 -0
  479. package/dist/types/components/vega-rich-text-editor/dto/annotations/list-annotation.d.ts +6 -0
  480. package/dist/types/components/vega-rich-text-editor/dto/annotations/text-format-default-styles.d.ts +22 -0
  481. package/dist/types/components/vega-rich-text-editor/dto/annotations/text-style-annotation.d.ts +7 -0
  482. package/dist/types/components/vega-rich-text-editor/dto/blocks/block.abstract.d.ts +10 -6
  483. package/dist/types/components/vega-rich-text-editor/dto/filter-styles-strategies/filter-styles-strategy-registry.d.ts +28 -0
  484. package/dist/types/components/vega-rich-text-editor/dto/filter-styles-strategies/filter-styles-strategy.abstract.d.ts +45 -0
  485. package/dist/types/components/vega-rich-text-editor/dto/filter-styles-strategies/image-node/image-filter-styles-strategy.d.ts +10 -0
  486. package/dist/types/components/vega-rich-text-editor/dto/filter-styles-strategies/list-block/list-block-filter-styles-strategy.d.ts +8 -0
  487. package/dist/types/components/vega-rich-text-editor/dto/filter-styles-strategies/list-block/list-item-block-filter-styles-strategy.d.ts +9 -0
  488. package/dist/types/components/vega-rich-text-editor/dto/filter-styles-strategies/text-block/alignment-filter-styles-strategy.d.ts +27 -0
  489. package/dist/types/components/vega-rich-text-editor/dto/filter-styles-strategies/text-node/code-filter-styles-strategy.d.ts +17 -0
  490. package/dist/types/components/vega-rich-text-editor/dto/filter-styles-strategies/text-node/link-filter-styles-strategy.d.ts +17 -0
  491. package/dist/types/components/vega-rich-text-editor/dto/filter-styles-strategies/text-node/text-format-filter-styles-strategy.d.ts +41 -0
  492. package/dist/types/components/vega-rich-text-editor/dto/renderers/nodes/text-node-renderer.d.ts +0 -2
  493. package/dist/types/components/vega-rich-text-editor/extensions/extension.abstract.d.ts +15 -2
  494. package/dist/types/components/vega-rich-text-editor/extensions/table/action-handler-interceptors/prevent-cell-children-remove-interceptor.d.ts +25 -0
  495. package/dist/types/components/vega-rich-text-editor/extensions/table/action-handler-interceptors/prevent-cell-content-delete-interceptor.d.ts +20 -0
  496. package/dist/types/components/vega-rich-text-editor/extensions/table/action-handler-interceptors/prevent-row-insert-interceptor.d.ts +19 -0
  497. package/dist/types/components/vega-rich-text-editor/extensions/table/action-handler-interceptors/prevent-table-insert-paragraph-interceptor.d.ts +31 -0
  498. package/dist/types/components/vega-rich-text-editor/extensions/table/action-handler-strategies/create-segment-table-cell-strategy.d.ts +20 -0
  499. package/dist/types/components/vega-rich-text-editor/extensions/table/action-handler-strategies/delete-table-block-strategy.d.ts +14 -0
  500. package/dist/types/components/vega-rich-text-editor/extensions/table/action-handler-strategies/delete-table-column-strategy.d.ts +74 -0
  501. package/dist/types/components/vega-rich-text-editor/extensions/table/action-handler-strategies/delete-table-row-strategy.d.ts +55 -0
  502. package/dist/types/components/vega-rich-text-editor/extensions/table/action-handler-strategies/insert-table-block-strategy.d.ts +27 -0
  503. package/dist/types/components/vega-rich-text-editor/extensions/table/action-handler-strategies/insert-table-column-strategy.d.ts +60 -0
  504. package/dist/types/components/vega-rich-text-editor/extensions/table/action-handler-strategies/insert-table-row-into-different-section-strategy.d.ts +21 -0
  505. package/dist/types/components/vega-rich-text-editor/extensions/table/action-handler-strategies/insert-table-row-into-same-section-strategy.d.ts +13 -0
  506. package/dist/types/components/vega-rich-text-editor/extensions/table/action-handler-strategies/merge-cells-strategy.d.ts +38 -0
  507. package/dist/types/components/vega-rich-text-editor/extensions/table/action-handler-strategies/replace-table-cell-strategy.d.ts +12 -0
  508. package/dist/types/components/vega-rich-text-editor/extensions/table/action-handler-strategies/select-table-column-strategy.d.ts +12 -0
  509. package/dist/types/components/vega-rich-text-editor/extensions/table/action-handler-strategies/split-cell-horizontally-strategy.d.ts +43 -0
  510. package/dist/types/components/vega-rich-text-editor/extensions/table/action-handler-strategies/split-cell-vertically-strategy.d.ts +27 -0
  511. package/dist/types/components/vega-rich-text-editor/extensions/table/action-handler-strategies/split-table-cell-strategy.d.ts +12 -0
  512. package/dist/types/components/vega-rich-text-editor/extensions/table/action-handler-strategies/table-column-strategy.abstract.d.ts +23 -0
  513. package/dist/types/components/vega-rich-text-editor/extensions/table/action-handler-strategies/table-row-strategy.abstract.d.ts +120 -0
  514. package/dist/types/components/vega-rich-text-editor/extensions/table/action-handler-strategies/toggle-header-row-strategy.d.ts +86 -0
  515. package/dist/types/components/vega-rich-text-editor/extensions/table/action-handler-strategies/toggle-header-table-column-strategy.d.ts +55 -0
  516. package/dist/types/components/vega-rich-text-editor/extensions/table/action-handler-strategies/update-table-cell-properties-strategy.d.ts +13 -0
  517. package/dist/types/components/vega-rich-text-editor/extensions/table/action-handler-strategies/update-table-properties-strategy.d.ts +12 -0
  518. package/dist/types/components/vega-rich-text-editor/extensions/table/actions/create-segment-table-cell-action.d.ts +21 -0
  519. package/dist/types/components/vega-rich-text-editor/extensions/table/actions/delete-table-block-action.d.ts +12 -0
  520. package/dist/types/components/vega-rich-text-editor/extensions/table/actions/delete-table-column-action.d.ts +15 -0
  521. package/dist/types/components/vega-rich-text-editor/extensions/table/actions/delete-table-row-action.d.ts +17 -0
  522. package/dist/types/components/vega-rich-text-editor/extensions/table/actions/insert-table-block-action.d.ts +20 -0
  523. package/dist/types/components/vega-rich-text-editor/extensions/table/actions/insert-table-column-action.d.ts +23 -0
  524. package/dist/types/components/vega-rich-text-editor/extensions/table/actions/insert-table-row-into-different-section-action.d.ts +20 -0
  525. package/dist/types/components/vega-rich-text-editor/extensions/table/actions/insert-table-row-into-same-section-action.d.ts +24 -0
  526. package/dist/types/components/vega-rich-text-editor/extensions/table/actions/merge-cells-action.d.ts +33 -0
  527. package/dist/types/components/vega-rich-text-editor/extensions/table/actions/replace-table-cell-action.d.ts +13 -0
  528. package/dist/types/components/vega-rich-text-editor/extensions/table/actions/select-table-column-action.d.ts +18 -0
  529. package/dist/types/components/vega-rich-text-editor/extensions/table/actions/split-cell-horizontally-action.d.ts +10 -0
  530. package/dist/types/components/vega-rich-text-editor/extensions/table/actions/split-cell-vertically-action.d.ts +10 -0
  531. package/dist/types/components/vega-rich-text-editor/extensions/table/actions/split-table-cell-action.d.ts +22 -0
  532. package/dist/types/components/vega-rich-text-editor/extensions/table/actions/table-annotations-action.d.ts +16 -0
  533. package/dist/types/components/vega-rich-text-editor/extensions/table/actions/table-caption-action.d.ts +14 -0
  534. package/dist/types/components/vega-rich-text-editor/extensions/table/actions/table-cell-annotations-action.d.ts +20 -0
  535. package/dist/types/components/vega-rich-text-editor/extensions/table/actions/table-head-cell-annotations-action.d.ts +14 -0
  536. package/dist/types/components/vega-rich-text-editor/extensions/table/actions/toggle-header-row-action.d.ts +12 -0
  537. package/dist/types/components/vega-rich-text-editor/extensions/table/actions/toggle-header-table-column-action.d.ts +16 -0
  538. package/dist/types/components/vega-rich-text-editor/extensions/table/actions/update-table-properties-action.d.ts +18 -0
  539. package/dist/types/components/vega-rich-text-editor/extensions/table/annotation-handler/table-annotation-handler-base.d.ts +36 -0
  540. package/dist/types/components/vega-rich-text-editor/extensions/table/annotation-handler/table-annotation-handler.d.ts +26 -0
  541. package/dist/types/components/vega-rich-text-editor/extensions/table/annotation-handler/table-cell-annotation-handler.d.ts +56 -0
  542. package/dist/types/components/vega-rich-text-editor/extensions/table/annotation-handler/table-head-cell-annotation-handler.d.ts +13 -0
  543. package/dist/types/components/vega-rich-text-editor/extensions/table/annotations/table-annotation.d.ts +73 -0
  544. package/dist/types/components/vega-rich-text-editor/extensions/table/annotations/table-caption-annotation.d.ts +32 -0
  545. package/dist/types/components/vega-rich-text-editor/extensions/table/annotations/table-cell-annotation.d.ts +100 -0
  546. package/dist/types/components/vega-rich-text-editor/extensions/table/annotations/table-color-annotation.d.ts +44 -0
  547. package/dist/types/components/vega-rich-text-editor/extensions/table/annotations/table-head-cell-annotation.d.ts +27 -0
  548. package/dist/types/components/vega-rich-text-editor/extensions/table/constants/styles.constants.d.ts +4 -0
  549. package/dist/types/components/vega-rich-text-editor/extensions/table/dto/table-block.d.ts +79 -0
  550. package/dist/types/components/vega-rich-text-editor/extensions/table/dto/table-body-block.d.ts +42 -0
  551. package/dist/types/components/vega-rich-text-editor/extensions/table/dto/table-caption-block.d.ts +41 -0
  552. package/dist/types/components/vega-rich-text-editor/extensions/table/dto/table-cell-block.d.ts +64 -0
  553. package/dist/types/components/vega-rich-text-editor/extensions/table/dto/table-head-block.d.ts +42 -0
  554. package/dist/types/components/vega-rich-text-editor/extensions/table/dto/table-head-cell-block.d.ts +34 -0
  555. package/dist/types/components/vega-rich-text-editor/extensions/table/dto/table-row-block.d.ts +44 -0
  556. package/dist/types/components/vega-rich-text-editor/extensions/table/element-to-dto-strategies/caption-to-caption-block-strategy.d.ts +37 -0
  557. package/dist/types/components/vega-rich-text-editor/extensions/table/element-to-dto-strategies/table-to-table-block-strategy.d.ts +26 -0
  558. package/dist/types/components/vega-rich-text-editor/extensions/table/element-to-dto-strategies/tbody-to-table-body-block-strategy.d.ts +26 -0
  559. package/dist/types/components/vega-rich-text-editor/extensions/table/element-to-dto-strategies/td-to-table-cell-block-strategy.d.ts +35 -0
  560. package/dist/types/components/vega-rich-text-editor/extensions/table/element-to-dto-strategies/thead-to-table-head-block-strategy.d.ts +26 -0
  561. package/dist/types/components/vega-rich-text-editor/extensions/table/element-to-dto-strategies/tr-to-table-row-block-strategy.d.ts +26 -0
  562. package/dist/types/components/vega-rich-text-editor/extensions/table/renderers/table-body-renderer.d.ts +12 -0
  563. package/dist/types/components/vega-rich-text-editor/extensions/table/renderers/table-caption-renderer.d.ts +13 -0
  564. package/dist/types/components/vega-rich-text-editor/extensions/table/renderers/table-cell-renderer.d.ts +30 -0
  565. package/dist/types/components/vega-rich-text-editor/extensions/table/renderers/table-dynamic-popover-renderer.d.ts +81 -0
  566. package/dist/types/components/vega-rich-text-editor/extensions/table/renderers/table-head-cell-renderer.d.ts +12 -0
  567. package/dist/types/components/vega-rich-text-editor/extensions/table/renderers/table-head-renderer.d.ts +12 -0
  568. package/dist/types/components/vega-rich-text-editor/extensions/table/renderers/table-popover-base-renderer.d.ts +16 -0
  569. package/dist/types/components/vega-rich-text-editor/extensions/table/renderers/table-renderer.d.ts +38 -0
  570. package/dist/types/components/vega-rich-text-editor/extensions/table/renderers/table-row-renderer.d.ts +12 -0
  571. package/dist/types/components/vega-rich-text-editor/extensions/table/renderers/table-setting-popover-renderer.d.ts +59 -0
  572. package/dist/types/components/vega-rich-text-editor/extensions/table/renderers/table-toolbar-popover-renderer.d.ts +59 -0
  573. package/dist/types/components/vega-rich-text-editor/extensions/table/setting-event-handlers/caption-operation.d.ts +36 -0
  574. package/dist/types/components/vega-rich-text-editor/extensions/table/setting-event-handlers/cell-properties-cancel-event-handler.d.ts +17 -0
  575. package/dist/types/components/vega-rich-text-editor/extensions/table/setting-event-handlers/cell-properties-change-event-handler.d.ts +15 -0
  576. package/dist/types/components/vega-rich-text-editor/extensions/table/setting-event-handlers/cell-properties-save-event-handler.d.ts +17 -0
  577. package/dist/types/components/vega-rich-text-editor/extensions/table/setting-event-handlers/cell-properties.d.ts +62 -0
  578. package/dist/types/components/vega-rich-text-editor/extensions/table/setting-event-handlers/column-operation.d.ts +55 -0
  579. package/dist/types/components/vega-rich-text-editor/extensions/table/setting-event-handlers/merge-cells-operation.d.ts +44 -0
  580. package/dist/types/components/vega-rich-text-editor/extensions/table/setting-event-handlers/row-operation.d.ts +69 -0
  581. package/dist/types/components/vega-rich-text-editor/extensions/table/setting-event-handlers/setting-event-handler.abstract.d.ts +48 -0
  582. package/dist/types/components/vega-rich-text-editor/extensions/table/setting-event-handlers/split-cell-operation.d.ts +31 -0
  583. package/dist/types/components/vega-rich-text-editor/extensions/table/setting-event-handlers/table-properties-cancel-event-handler.d.ts +19 -0
  584. package/dist/types/components/vega-rich-text-editor/extensions/table/setting-event-handlers/table-properties-change-event-handler.d.ts +17 -0
  585. package/dist/types/components/vega-rich-text-editor/extensions/table/setting-event-handlers/table-properties-save-event-handler.d.ts +17 -0
  586. package/dist/types/components/vega-rich-text-editor/extensions/table/setting-event-handlers/table-properties.d.ts +33 -0
  587. package/dist/types/components/vega-rich-text-editor/extensions/table/table-extension.d.ts +36 -0
  588. package/dist/types/components/vega-rich-text-editor/extensions/table/table-icon.d.ts +3 -0
  589. package/dist/types/components/vega-rich-text-editor/extensions/table/table-selection.d.ts +164 -0
  590. package/dist/types/components/vega-rich-text-editor/extensions/table/table-toolbar-button-renderer.d.ts +26 -0
  591. package/dist/types/components/vega-rich-text-editor/extensions/table/utils/table-color-manager.d.ts +27 -0
  592. package/dist/types/components/vega-rich-text-editor/extensions/table/utils/utils.d.ts +190 -0
  593. package/dist/types/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-properties/assets/align-bottom.d.ts +3 -0
  594. package/dist/types/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-properties/assets/align-middle.d.ts +3 -0
  595. package/dist/types/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-properties/assets/align-top.d.ts +3 -0
  596. package/dist/types/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-properties/assets/objects-align-center-horizontal.d.ts +3 -0
  597. package/dist/types/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-properties/assets/objects-align-left.d.ts +3 -0
  598. package/dist/types/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-properties/assets/objects-align-right.d.ts +3 -0
  599. 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
  600. 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
  601. 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
  602. 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
  603. 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
  604. package/dist/types/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-properties/vega-rich-text-table-properties.d.ts +60 -0
  605. 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
  606. 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
  607. 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
  608. package/dist/types/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-setting/assets/icon.d.ts +2 -0
  609. package/dist/types/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-setting/slimmers/renderers/caption-button-slimmer.d.ts +11 -0
  610. 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
  611. package/dist/types/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-setting/slimmers/renderers/column-button-slimmer.d.ts +28 -0
  612. 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
  613. package/dist/types/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-setting/slimmers/renderers/row-button-slimmer.d.ts +36 -0
  614. 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
  615. 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
  616. 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
  617. package/dist/types/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-setting/vega-rich-text-table-setting.d.ts +58 -0
  618. package/dist/types/components/vega-rich-text-editor/interface.d.ts +34 -2
  619. package/dist/types/components/vega-rich-text-editor/public-api.d.ts +1 -0
  620. package/dist/types/components/vega-rich-text-editor/slimmers/controllers/extension-controller.d.ts +10 -0
  621. package/dist/types/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/annotation-handler/html-element-to-annotation-generator.d.ts +19 -0
  622. package/dist/types/components/vega-rich-text-editor/slimmers/controllers/selection-controller.d.ts +19 -6
  623. package/dist/types/components/vega-rich-text-editor/vega-rich-text-editor.d.ts +0 -2
  624. package/dist/types/components/vega-time-picker/slimmers/renderers/vega-time-picker-range-input-renderer.d.ts +1 -0
  625. package/dist/types/components/vega-time-picker/slimmers/renderers/vega-time-picker-single-input-renderer.d.ts +1 -0
  626. package/dist/types/components/vega-time-picker/vega-time-picker.d.ts +12 -0
  627. package/dist/types/components.d.ts +173 -2
  628. package/dist/types/constants/ui.d.ts +1 -0
  629. package/dist/types/helpers/calendar/calendar-date.d.ts +7 -0
  630. package/dist/types/helpers/calendar/calendar-view-generator/calendar-view-generator.abstract.d.ts +0 -1
  631. package/dist/types/helpers/event-manager/event-id/vega-internal-event-id.d.ts +3 -0
  632. package/dist/types/helpers/formatter/responsive-map-formatter/responsive-grid-justify-items-formatter.d.ts +19 -0
  633. package/dist/types/helpers/formatter/string-formatter/custom-formatter-strategy.d.ts +2 -1
  634. package/dist/types/helpers/formatter/string-formatter/number-mask-strategy.d.ts +2 -1
  635. package/dist/types/helpers/formatter/string-formatter/number-thousand-comma-strategy.d.ts +2 -1
  636. package/dist/types/helpers/formatter/string-formatter/string-format-strategy.abstract.d.ts +1 -0
  637. package/dist/types/helpers/formatter/string-formatter/string-mask-strategy.d.ts +32 -4
  638. package/dist/types/helpers/formatter/string-formatter/thousand-comma-strategy.d.ts +1 -0
  639. package/dist/types/helpers/keyboard/keyboard-manager.d.ts +1 -0
  640. package/dist/types/helpers/slimmers/aria-dialog-focusable-trap-slimmer.d.ts +112 -0
  641. package/dist/types/helpers/translation/interface.d.ts +3 -1
  642. package/dist/types/types/components.type.d.ts +5 -0
  643. package/dist/types/types/type-guard.d.ts +7 -0
  644. package/dist/types/types/ui.type.d.ts +13 -1
  645. package/dist/types/utils/object.d.ts +6 -2
  646. package/dist/types/utils/ui.d.ts +12 -1
  647. package/dist/vega/index.esm.js +1 -1
  648. package/dist/vega/p-010b5e74.js +1 -0
  649. package/dist/vega/p-01883ffc.entry.js +1 -0
  650. package/dist/vega/p-02578a59.js +1 -0
  651. package/dist/vega/p-0313393d.entry.js +1 -0
  652. package/dist/vega/p-043e685a.entry.js +1 -0
  653. package/dist/vega/p-04e56b0c.entry.js +1 -0
  654. package/dist/vega/p-07a2b42a.js +1 -0
  655. package/dist/vega/p-08780df0.entry.js +1 -0
  656. package/dist/vega/p-10fa4eac.js +1 -0
  657. package/dist/vega/p-1557ed92.entry.js +1 -0
  658. package/dist/vega/p-18619467.js +1 -0
  659. package/dist/vega/p-19ad4f15.entry.js +1 -0
  660. package/dist/vega/p-1a2f92a3.entry.js +1 -0
  661. package/dist/vega/p-1c45565d.js +1 -0
  662. package/dist/vega/p-1feb4f2a.entry.js +1 -0
  663. package/dist/vega/p-203bc4db.entry.js +1 -0
  664. package/dist/vega/p-204c7d41.js +1 -0
  665. package/dist/vega/p-21c9e1ca.entry.js +1 -0
  666. package/dist/vega/p-22336063.js +1 -0
  667. package/dist/vega/p-224b67ff.entry.js +1 -0
  668. package/dist/vega/p-2a9960c9.js +1 -0
  669. package/dist/vega/p-2c2df248.js +1 -0
  670. package/dist/vega/p-2d917e2d.entry.js +1 -0
  671. package/dist/vega/p-2e73582d.entry.js +1 -0
  672. package/dist/vega/p-3224e47c.js +1 -0
  673. package/dist/vega/p-334e3b02.entry.js +1 -0
  674. package/dist/vega/p-33860e54.js +1 -0
  675. package/dist/vega/p-35386999.entry.js +1 -0
  676. package/dist/vega/p-365d21ac.entry.js +1 -0
  677. package/dist/vega/p-367d44d9.entry.js +1 -0
  678. package/dist/vega/p-382b71a3.entry.js +1 -0
  679. package/dist/vega/p-3d2d267d.js +1 -0
  680. package/dist/vega/p-434fc427.entry.js +1 -0
  681. package/dist/vega/p-44c5cbb7.js +1 -0
  682. package/dist/vega/p-47ca1f69.entry.js +1 -0
  683. package/dist/vega/p-49a2e141.js +1 -0
  684. package/dist/vega/p-4d65756f.js +1 -0
  685. package/dist/vega/p-4eb282ef.entry.js +1 -0
  686. package/dist/vega/p-517434d4.entry.js +1 -0
  687. package/dist/vega/p-559197f8.js +1 -0
  688. package/dist/vega/p-576fe408.js +1 -0
  689. package/dist/vega/p-5ae4ea20.entry.js +1 -0
  690. package/dist/vega/p-5f377954.js +1 -1
  691. package/dist/vega/p-60cf2a68.js +1 -0
  692. package/dist/vega/p-612e3ded.js +1 -0
  693. package/dist/vega/p-65900dbf.entry.js +1 -0
  694. package/dist/vega/p-68124bc5.js +1 -0
  695. package/dist/vega/p-68a531cf.js +1 -0
  696. package/dist/vega/p-6af55f1c.entry.js +1 -0
  697. package/dist/vega/p-6c5250b3.js +1 -0
  698. package/dist/vega/p-6f2e5bc6.js +1 -0
  699. package/dist/vega/p-70f1cf4e.entry.js +1 -0
  700. package/dist/vega/p-716c71e6.js +1 -0
  701. package/dist/vega/p-7362723e.entry.js +1 -0
  702. package/dist/vega/p-7618dde4.js +1 -0
  703. package/dist/vega/p-76b80a0c.js +1 -0
  704. package/dist/vega/p-7912741f.entry.js +1 -0
  705. package/dist/vega/p-7942c042.entry.js +1 -0
  706. package/dist/vega/p-7c2fecfd.entry.js +1 -0
  707. package/dist/vega/p-7ceab8c7.entry.js +1 -0
  708. package/dist/vega/p-81dd00d0.js +1 -0
  709. package/dist/vega/p-82016096.js +1 -0
  710. package/dist/vega/p-8327635d.js +1 -0
  711. package/dist/vega/p-840ad046.entry.js +1 -0
  712. package/dist/vega/p-878851f6.js +1 -0
  713. package/dist/vega/p-89e56502.js +1 -0
  714. package/dist/vega/p-8adf9732.entry.js +1 -0
  715. package/dist/vega/p-90137c68.entry.js +1 -0
  716. package/dist/vega/p-9341c1a9.js +1 -0
  717. package/dist/vega/p-9390a94b.entry.js +1 -0
  718. package/dist/vega/p-9551da9c.entry.js +1 -0
  719. package/dist/vega/p-9862d1a8.entry.js +1 -0
  720. package/dist/vega/p-9dc23325.entry.js +1 -0
  721. package/dist/vega/p-a4dbf2cc.js +1 -0
  722. package/dist/vega/p-a841cf13.js +1 -0
  723. package/dist/vega/p-a99e75a1.entry.js +1 -0
  724. package/dist/vega/p-ab21fdf6.entry.js +1 -0
  725. package/dist/vega/p-b3e40faf.js +1 -0
  726. package/dist/vega/p-b5a6bd0f.entry.js +1 -0
  727. package/dist/vega/p-b5c2fff3.entry.js +1 -0
  728. package/dist/vega/p-b696a861.js +1 -0
  729. package/dist/vega/p-ba415db6.entry.js +1 -0
  730. package/dist/vega/p-be3517be.entry.js +1 -0
  731. package/dist/vega/p-c045e4c1.entry.js +1 -0
  732. package/dist/vega/p-c4e32125.entry.js +1 -0
  733. package/dist/vega/p-c5b698f6.entry.js +1 -0
  734. package/dist/vega/p-c5eb0fa6.js +1 -0
  735. package/dist/vega/p-c61279a7.entry.js +1 -0
  736. package/dist/vega/p-c6d62f0d.js +1 -0
  737. package/dist/vega/p-c78fe943.js +1 -0
  738. package/dist/vega/p-c9201bf4.js +1 -0
  739. package/dist/vega/p-cc055723.entry.js +1 -0
  740. package/dist/vega/p-cca5042b.entry.js +1 -0
  741. package/dist/vega/p-cda45d2a.entry.js +1 -0
  742. package/dist/vega/p-cdf5b2f0.entry.js +1 -0
  743. package/dist/vega/p-cf70c57d.js +1 -0
  744. package/dist/vega/p-d1494c7c.entry.js +1 -0
  745. package/dist/vega/p-d1ca70a1.js +1 -0
  746. package/dist/vega/p-d202e69d.entry.js +1 -0
  747. package/dist/vega/p-d4ea8e22.js +1 -0
  748. package/dist/vega/p-dc9b5063.entry.js +1 -0
  749. package/dist/vega/p-dcd18ab1.js +1 -0
  750. package/dist/vega/p-df5bfbc4.entry.js +1 -0
  751. package/dist/vega/p-e4726dcd.entry.js +1 -0
  752. package/dist/vega/p-e84b95d4.js +1 -0
  753. package/dist/vega/p-ea21462f.js +1 -0
  754. package/dist/vega/p-ec1d76c6.entry.js +1 -0
  755. package/dist/vega/p-f3456993.entry.js +1 -0
  756. package/dist/vega/p-f4190826.entry.js +1 -0
  757. package/dist/vega/p-f48c43f4.entry.js +1 -0
  758. package/dist/vega/p-fcabf0dc.js +1 -0
  759. package/dist/vega/p-fdac91c4.entry.js +1 -0
  760. package/dist/vega/p-ffa2e3a6.entry.js +1 -0
  761. package/dist/vega/vega.esm.js +1 -1
  762. package/package.json +3 -2
  763. package/dist/cjs/app-globals-55e26945.js +0 -428
  764. package/dist/cjs/breakpoints-a8ff22f0.js +0 -56
  765. package/dist/cjs/child-nodes-notify-observer-slimmer-ed39283b.js +0 -90
  766. package/dist/cjs/code-block-1a5fafed.js +0 -4422
  767. package/dist/cjs/component-value-history-controller-slimmer.abstract-42683f23.js +0 -736
  768. package/dist/cjs/date-required-rule-ad536cb5.js +0 -92
  769. package/dist/cjs/deprecated-property-slimmer-1eb8f031.js +0 -51
  770. package/dist/cjs/design-token-45ebd5e4.js +0 -402
  771. package/dist/cjs/dom-node-subject-observer-factory-c62823de.js +0 -141
  772. package/dist/cjs/dto-renderer-manager-7557d562.js +0 -4119
  773. package/dist/cjs/element-appender-slimmer-16ec8591.js +0 -1974
  774. package/dist/cjs/event-emit-slimmer-c84121c8.js +0 -267
  775. package/dist/cjs/form-field-controller-slimmer-73f5849e.js +0 -1266
  776. package/dist/cjs/image-annotation-action-f275863e.js +0 -313
  777. package/dist/cjs/inject-keyboard-manager-6667c0f1.js +0 -37
  778. package/dist/cjs/internal-translation-controller-24df468f.js +0 -299
  779. package/dist/cjs/keyboard-manager-7de7ecfd.js +0 -140
  780. package/dist/cjs/keyboard-manager-slimmer-b44f0dc9.js +0 -39
  781. package/dist/cjs/month-view-generator-36c42772.js +0 -102
  782. package/dist/cjs/object-e2e28e3d.js +0 -50
  783. package/dist/cjs/page-resize-observer-slimmer-e050cd26.js +0 -123
  784. package/dist/cjs/public-rules-6c6cb4ac.js +0 -46
  785. package/dist/cjs/range-e298d4aa.js +0 -178
  786. package/dist/cjs/responsive-format-facade-bddac47c.js +0 -916
  787. package/dist/cjs/rich-text-editor-required-rule-6346a888.js +0 -64
  788. package/dist/cjs/string-format-strategy.abstract-814d66c4.js +0 -60
  789. package/dist/cjs/string-input-formatter-slimmer-749e3cfe.js +0 -230
  790. package/dist/cjs/string-mask-strategy-d00871c2.js +0 -172
  791. package/dist/cjs/style-formatter-94c1a1ff.js +0 -34
  792. package/dist/cjs/sub-state-notify-slimmer-ac1dae32.js +0 -81
  793. package/dist/cjs/sub-state-observer-slimmer-e692d849.js +0 -134
  794. package/dist/cjs/time-required-rule-f1f3c8c2.js +0 -141
  795. package/dist/cjs/token-extension-1e98ddf3.js +0 -3062
  796. package/dist/cjs/translation-slimmer-3fa03d81.js +0 -42
  797. package/dist/cjs/type-guard-a0d9ff1f.js +0 -2012
  798. package/dist/cjs/ui-024696c0.js +0 -59
  799. package/dist/cjs/ui-234ea151.js +0 -256
  800. package/dist/cjs/valid-credit-card-number-rule-cba7d66a.js +0 -173
  801. package/dist/cjs/vega-internal-event-id-e0aeac45.js +0 -120
  802. package/dist/cjs/wait-for-component-did-render-cbebfc33.js +0 -32
  803. package/dist/collection/components/vega-calendar/slimmers/common/helpers/test/calendar-event-repeat-pattern-factory.test.js +0 -195
  804. package/dist/collection/components/vega-calendar/slimmers/common/layout/test/long-event-layout-generator.test.js +0 -94
  805. package/dist/collection/components/vega-calendar/slimmers/day-view/renderers/timed-event/layout/test/day-view-event-layout-generator.test.js +0 -72
  806. package/dist/collection/components/vega-code-block/test/code-block-range.test.js +0 -81
  807. package/dist/collection/components/vega-dropdown/test/share.js +0 -13
  808. package/dist/collection/components/vega-input-credit-card/test/share.js +0 -21
  809. package/dist/collection/components/vega-nav/vega-left-nav/test/vega-left-nav-mock-data.js +0 -147
  810. package/dist/collection/components/vega-rich-text-editor/helpers/extension-context-manager.test.js +0 -19
  811. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/text-node-color-controller.js +0 -51
  812. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/text-node-rendering-registry.js +0 -26
  813. package/dist/collection/components/vega-rich-text-editor/test/dto/action-handle-strategies/action-handle-strategy-registry.test.js +0 -71
  814. package/dist/collection/components/vega-rich-text-editor/test/dto/action-handle-strategies/block-delete-node-content-strategy.test.js +0 -69
  815. package/dist/collection/components/vega-rich-text-editor/test/dto/action-handle-strategies/block-insert-line-break-with-blocks-strategy.test.js +0 -24
  816. package/dist/collection/components/vega-rich-text-editor/test/dto/action-handle-strategies/code-block-strategy-registry.test.js +0 -20
  817. package/dist/collection/components/vega-rich-text-editor/test/dto/action-handle-strategies/content-state-strategy-registry.test.js +0 -15
  818. package/dist/collection/components/vega-rich-text-editor/test/dto/action-handle-strategies/image-block-strategy-register.test.js +0 -32
  819. package/dist/collection/components/vega-rich-text-editor/test/dto/action-handle-strategies/image-set-annotation-map-strategy.test.js +0 -11
  820. package/dist/collection/components/vega-rich-text-editor/test/dto/action-handle-strategies/image-update-url-strategy.test.js +0 -16
  821. package/dist/collection/components/vega-rich-text-editor/test/dto/action-handle-strategies/list-block-strategy-register.test.js +0 -20
  822. package/dist/collection/components/vega-rich-text-editor/test/dto/action-handle-strategies/list-item-strategy-register.test.js +0 -87
  823. package/dist/collection/components/vega-rich-text-editor/test/dto/action-handle-strategies/node-split-text-strategy.test.js +0 -32
  824. package/dist/collection/components/vega-rich-text-editor/test/dto/action-handle-strategies/node-update-annotation-map-strategy.test.js +0 -17
  825. package/dist/collection/components/vega-rich-text-editor/test/dto/action-handle-strategies/text-block-strategy-register.test.js +0 -77
  826. package/dist/collection/components/vega-rich-text-editor/test/dto/action-handle-strategies/update-selected-text-strategy.test.js +0 -23
  827. package/dist/collection/components/vega-rich-text-editor/test/dto/annotation-actions.test.js +0 -39
  828. package/dist/collection/components/vega-rich-text-editor/test/dto/annotation-style.test.js +0 -71
  829. package/dist/collection/components/vega-rich-text-editor/test/dto/annotations.test.js +0 -381
  830. package/dist/collection/components/vega-rich-text-editor/test/dto/blocks/code-block.test.js +0 -54
  831. package/dist/collection/components/vega-rich-text-editor/test/dto/blocks/html-block.test.js +0 -167
  832. package/dist/collection/components/vega-rich-text-editor/test/dto/blocks/image-block.test.js +0 -90
  833. package/dist/collection/components/vega-rich-text-editor/test/dto/blocks/list-block.test.js +0 -176
  834. package/dist/collection/components/vega-rich-text-editor/test/dto/blocks/list-item.test.js +0 -188
  835. package/dist/collection/components/vega-rich-text-editor/test/dto/blocks/text-block.test.js +0 -193
  836. package/dist/collection/components/vega-rich-text-editor/test/dto/content-state.test.js +0 -3123
  837. package/dist/collection/components/vega-rich-text-editor/test/dto/nodes/image-node.test.js +0 -108
  838. package/dist/collection/components/vega-rich-text-editor/test/dto/nodes/text-node.test.js +0 -510
  839. package/dist/collection/components/vega-rich-text-editor/test/dto/range.test.js +0 -53
  840. package/dist/collection/components/vega-rich-text-editor/test/e2e-utils.js +0 -182
  841. package/dist/collection/components/vega-rich-text-editor/test/element-to-dto-strategy/custom-attribute-annotation-handler.test.js +0 -49
  842. package/dist/collection/components/vega-rich-text-editor/test/element-to-dto-strategy/element-to-text-node-strategy.test.js +0 -38
  843. package/dist/collection/components/vega-rich-text-editor/test/element-to-dto-strategy/html-element-to-annotation-generator.test.js +0 -26
  844. package/dist/collection/components/vega-rich-text-editor/test/element-to-dto-strategy/jira-code-to-rte-code-block-strategy.test.js +0 -32
  845. package/dist/collection/components/vega-rich-text-editor/test/element-to-dto-strategy/vega-code-block-to-rte-code-block-strategy.test.js +0 -61
  846. package/dist/collection/components/vega-rich-text-editor/test/extensions/extension-test-utils.js +0 -41
  847. package/dist/collection/components/vega-rich-text-editor/test/fixture.js +0 -257
  848. package/dist/collection/components/vega-rich-text-editor/test/html-cleaner/html-content-cleaner.test.js +0 -186
  849. package/dist/collection/components/vega-rich-text-editor/test/html-cleaner/remove-whitespace-after-opening-tag-processor.test.js +0 -22
  850. package/dist/collection/components/vega-rich-text-editor/test/html-cleaner/remove-whitespace-before-closing-tag-processor.test.js +0 -22
  851. package/dist/collection/components/vega-rich-text-editor/test/html-cleaner/remove-whitespace-between-tags-processor.test.js +0 -26
  852. package/dist/collection/components/vega-rich-text-editor/test/spec-utils.js +0 -32
  853. package/dist/collection/components/vega-sidenav/test/test.helper.js +0 -68
  854. package/dist/collection/components/vega-table/slimmers/controllers/dto/test/column-render-input-model.test.js +0 -83
  855. package/dist/collection/components/vega-table/slimmers/controllers/dto/test/column-structure-model.test.js +0 -147
  856. package/dist/collection/components/vega-table/test/utils.js +0 -22
  857. package/dist/collection/components/vega-table/test/vega-table-sorter.test.js +0 -508
  858. package/dist/collection/constants/tests/validator.test.js +0 -24
  859. package/dist/collection/decorators/method-decorators/tests/component-load-required.test.js +0 -114
  860. package/dist/collection/decorators/property-decorators/tests/inject-element-appender-proxy.test.js +0 -237
  861. package/dist/collection/decorators/property-decorators/tests/inject-keyboard-manager.test.js +0 -91
  862. package/dist/collection/global/tests/before-vega-load.test.js +0 -62
  863. package/dist/collection/helpers/calendar/test/calendar-date-time.test.js +0 -27
  864. package/dist/collection/helpers/calendar/test/calendar-date.test.js +0 -172
  865. package/dist/collection/helpers/calendar/test/calendar-event.test.js +0 -263
  866. package/dist/collection/helpers/calendar/test/calendar-period/day-period.test.js +0 -118
  867. package/dist/collection/helpers/calendar/test/calendar-period/month-period.test.js +0 -144
  868. package/dist/collection/helpers/calendar/test/calendar-period/week-period.test.js +0 -114
  869. package/dist/collection/helpers/calendar/test/calendar-time.test.js +0 -45
  870. package/dist/collection/helpers/calendar/test/calendar-view-generator/day-view-generator.test.js +0 -19
  871. package/dist/collection/helpers/calendar/test/calendar-view-generator/month-view-generator.test.js +0 -123
  872. package/dist/collection/helpers/calendar/test/calendar-view-generator/week-view-generator.test.js +0 -43
  873. package/dist/collection/helpers/calendar/test/calendar-view.test.js +0 -9
  874. package/dist/collection/helpers/calendar/test/index.test.js +0 -13
  875. package/dist/collection/helpers/calendar/test/utils.test.js +0 -62
  876. package/dist/collection/helpers/change-manager/test/change-manager.test.js +0 -30
  877. package/dist/collection/helpers/change-manager/test/dom-node-subject-factory.test.js +0 -38
  878. package/dist/collection/helpers/chart/test/controllers/chart-dimension-controller.test.js +0 -63
  879. package/dist/collection/helpers/chart/test/drawers/arc-path-drawer.test.js +0 -55
  880. package/dist/collection/helpers/chart/test/drawers/legend-drawer.test.js +0 -94
  881. package/dist/collection/helpers/chart/test/drawers/line-drawer.test.js +0 -25
  882. package/dist/collection/helpers/chart/test/drawers/path-drawer.test.js +0 -21
  883. package/dist/collection/helpers/chart/test/drawers/rect-drawer.test.js +0 -78
  884. package/dist/collection/helpers/chart/test/drawers/text-drawer.test.js +0 -25
  885. package/dist/collection/helpers/chart/test/drawers/x-axis-drawer.test.js +0 -38
  886. package/dist/collection/helpers/chart/test/drawers/y-axis-drawer.test.js +0 -44
  887. package/dist/collection/helpers/chart/test/graph-context-factory.test.js +0 -17
  888. package/dist/collection/helpers/chart/test/input-processors/format-time-positions-input-processor.test.js +0 -62
  889. package/dist/collection/helpers/chart/test/input-processors/horizontal-x-axis-input-processor.test.js +0 -45
  890. package/dist/collection/helpers/chart/test/input-processors/horizontal-y-axis-input-processor.test.js +0 -80
  891. package/dist/collection/helpers/chart/test/input-processors/layout-input-processor.test.js +0 -40
  892. package/dist/collection/helpers/chart/test/input-processors/line-path-input-processor.test.js +0 -16
  893. package/dist/collection/helpers/chart/test/input-processors/pie-chart-filter-input-processor.test.js +0 -20
  894. package/dist/collection/helpers/chart/test/input-processors/pie-chart-radius-input-processor.test.js +0 -48
  895. package/dist/collection/helpers/chart/test/input-processors/sort-positions-input-processor.test.js +0 -53
  896. package/dist/collection/helpers/chart/test/input-processors/x-axis-input-processor.test.js +0 -78
  897. package/dist/collection/helpers/chart/test/input-processors/x-axis-label-formatter-input-processor.test.js +0 -109
  898. package/dist/collection/helpers/chart/test/input-processors/y-axis-input-processor.coverage.test.js +0 -39
  899. package/dist/collection/helpers/chart/test/input-processors/y-axis-input-processor.test.js +0 -55
  900. package/dist/collection/helpers/chart/test/interacting-entry-generator/arc-path-hover-generator.test.js +0 -11
  901. package/dist/collection/helpers/chart/test/interacting-entry-generator/pie-legend-hover-generator.test.js +0 -25
  902. package/dist/collection/helpers/chart/test/interactors/interactor-factory.test.js +0 -19
  903. package/dist/collection/helpers/chart/test/interactors/svg-interactor.test.js +0 -48
  904. package/dist/collection/helpers/chart/test/line-chart.test.js +0 -96
  905. package/dist/collection/helpers/chart/test/pie-chart.test.js +0 -38
  906. package/dist/collection/helpers/chart/test/renderers/canvas-renderer.test.js +0 -31
  907. package/dist/collection/helpers/chart/test/renderers/renderer-factory.test.js +0 -19
  908. package/dist/collection/helpers/chart/test/renderers/svg-renderer.test.js +0 -99
  909. package/dist/collection/helpers/code-format/test/code-formatter.test.js +0 -410
  910. package/dist/collection/helpers/common/test/common.test.js +0 -7
  911. package/dist/collection/helpers/common/test/wait-for-component-did-render.test.js +0 -67
  912. package/dist/collection/helpers/common/test/wait-for-vega-handler.test.js +0 -17
  913. package/dist/collection/helpers/csp/test/styles-preservator.test.js +0 -207
  914. package/dist/collection/helpers/csp/test/vega-nonce-manager.test.js +0 -177
  915. package/dist/collection/helpers/dialog/test/vega-dialog-controller.test.js +0 -114
  916. package/dist/collection/helpers/event-manager/test/child-nodes-event-prevent-slimmer.test.js +0 -209
  917. package/dist/collection/helpers/event-manager/test/child-nodes-notify-observer-slimmer.test.js +0 -81
  918. package/dist/collection/helpers/event-manager/test/component-event-id-map.test.js +0 -16
  919. package/dist/collection/helpers/event-manager/test/event-emit-slimmer.test.js +0 -144
  920. package/dist/collection/helpers/event-manager/test/internal-vega-event-manager.test.js +0 -70
  921. package/dist/collection/helpers/event-manager/test/jquery-delegated-strategy-controller.test.js +0 -131
  922. package/dist/collection/helpers/event-manager/test/vega-event-id.test.js +0 -16
  923. package/dist/collection/helpers/event-manager/test/vega-event-manager.test.js +0 -97
  924. package/dist/collection/helpers/feature-control/tests/feature-flag-controller.test.js +0 -69
  925. package/dist/collection/helpers/formatter/test/responsive-map-formatter/responsive-border-radius-formatter.test.js +0 -64
  926. package/dist/collection/helpers/formatter/test/responsive-map-formatter/responsive-border-radius-style-formatter.test.js +0 -32
  927. package/dist/collection/helpers/formatter/test/responsive-map-formatter/responsive-box-display-formatter.test.js +0 -31
  928. package/dist/collection/helpers/formatter/test/responsive-map-formatter/responsive-custom-formatter.test.js +0 -17
  929. package/dist/collection/helpers/formatter/test/responsive-map-formatter/responsive-display-formatter.test.js +0 -23
  930. package/dist/collection/helpers/formatter/test/responsive-map-formatter/responsive-flex-direction-formatter.test.js +0 -19
  931. package/dist/collection/helpers/formatter/test/responsive-map-formatter/responsive-flex-wrap-formatter.test.js +0 -19
  932. package/dist/collection/helpers/formatter/test/responsive-map-formatter/responsive-format-mediator.test.js +0 -43
  933. package/dist/collection/helpers/formatter/test/responsive-map-formatter/responsive-gap-formatter.ts.test.js +0 -29
  934. package/dist/collection/helpers/formatter/test/responsive-map-formatter/responsive-grid-column-formatter.test.js +0 -23
  935. package/dist/collection/helpers/formatter/test/responsive-map-formatter/responsive-grid-row-formatter.test.js +0 -27
  936. package/dist/collection/helpers/formatter/test/responsive-map-formatter/responsive-margin-formatter.test.js +0 -43
  937. package/dist/collection/helpers/formatter/test/responsive-map-formatter/responsive-margin-style-formatter.test.js +0 -28
  938. package/dist/collection/helpers/formatter/test/responsive-map-formatter/responsive-padding-formatter.test.js +0 -43
  939. package/dist/collection/helpers/formatter/test/responsive-map-formatter/responsive-padding-style-formatter.test.js +0 -28
  940. package/dist/collection/helpers/formatter/test/responsive-map-formatter/responsive-size-formatter.test.js +0 -27
  941. package/dist/collection/helpers/formatter/test/responsive-map-formatter/responsive-text-align-formatter.test.js +0 -19
  942. package/dist/collection/helpers/formatter/test/responsive-map-formatter/responsive-translocation-formatter.test.js +0 -51
  943. package/dist/collection/helpers/formatter/test/responsive-map-formatter/responsive-width-and-height-formatter.test.js +0 -20
  944. package/dist/collection/helpers/formatter/test/state-formatter/state-background-color-formatter.test.js +0 -18
  945. package/dist/collection/helpers/formatter/test/state-formatter/state-border-color-formatter.test.js +0 -13
  946. package/dist/collection/helpers/formatter/test/state-formatter/state-border-formatter.test.js +0 -13
  947. package/dist/collection/helpers/formatter/test/state-formatter/state-format-facade.test.js +0 -27
  948. package/dist/collection/helpers/formatter/test/state-formatter/state-shadow-formatter.test.js +0 -13
  949. package/dist/collection/helpers/formatter/test/string-formatter/custom-formatter-strategy.test.js +0 -13
  950. package/dist/collection/helpers/formatter/test/string-formatter/number-mask-strategy.test.js +0 -101
  951. package/dist/collection/helpers/formatter/test/string-formatter/number-thousand-comma-mask-strategy.test.js +0 -40
  952. package/dist/collection/helpers/formatter/test/string-formatter/string-mask-strategy.test.js +0 -147
  953. package/dist/collection/helpers/formatter/test/string-formatter/thousand-comma-strategy.test.js +0 -21
  954. package/dist/collection/helpers/formatter/test/string-formatter/vega-phone-number-input-strategy.test.js +0 -43
  955. package/dist/collection/helpers/formatter/test/style-formatter.test.js +0 -16
  956. package/dist/collection/helpers/icon/test/icon-manager-controller.test.js +0 -101
  957. package/dist/collection/helpers/icon/test/internal-icon-manager.test.js +0 -18
  958. package/dist/collection/helpers/immutable/test/immutable-array.test.js +0 -78
  959. package/dist/collection/helpers/immutable/test/immutable-map.test.js +0 -83
  960. package/dist/collection/helpers/immutable/test/immutable-set.test.js +0 -87
  961. package/dist/collection/helpers/keyboard/test/keyboard-manager.test.js +0 -241
  962. package/dist/collection/helpers/level-tracker/test/nested-level-tracker.test.js +0 -33
  963. package/dist/collection/helpers/loading-indicator/tests/vega-loader-controller.test.js +0 -192
  964. package/dist/collection/helpers/notify/tests/vega-notify-controller.test.js +0 -165
  965. package/dist/collection/helpers/paginator/test/value-paginator.test.js +0 -15
  966. package/dist/collection/helpers/queue/test/synchronize-task-queue.test.js +0 -76
  967. package/dist/collection/helpers/remote-invocation/remote-invocation-registry.test.js +0 -17
  968. package/dist/collection/helpers/rte-manager/rte.manager.test.js +0 -94
  969. package/dist/collection/helpers/skeleton-loader/tests/vega-skeleton-loader-controller.test.js +0 -194
  970. package/dist/collection/helpers/slimmers/element-appender/test/element-appender-slimmer.test.js +0 -621
  971. package/dist/collection/helpers/slimmers/mutation-observer/test/aria-attributes-value-mapper.test.js +0 -248
  972. package/dist/collection/helpers/slimmers/mutation-observer/test/data-tab-index-value-mapper.test.js +0 -120
  973. package/dist/collection/helpers/slimmers/mutation-observer/test/mutation-observer-slimmer.test.js +0 -182
  974. package/dist/collection/helpers/slimmers/position-calculation/test/body-position-calculation-strategy.test.js +0 -353
  975. package/dist/collection/helpers/slimmers/position-calculation/test/screen-position-calculation-strategy.test.js +0 -365
  976. package/dist/collection/helpers/slimmers/runtime-metrics/test/public-api-runtime-metrics-slimmer-base.test.js +0 -96
  977. package/dist/collection/helpers/slimmers/sub-state/test/sub-state-observer-slimmer.test.js +0 -228
  978. package/dist/collection/helpers/slimmers/test/auto-run-when-re-render-task-queue-slimmer.test.js +0 -46
  979. package/dist/collection/helpers/slimmers/test/brand-switch-state-controller-slimmer.test.js +0 -75
  980. package/dist/collection/helpers/slimmers/test/component-global-style-slimmer.test.js +0 -104
  981. package/dist/collection/helpers/slimmers/test/component-usage-runtime-metrics.test.js +0 -72
  982. package/dist/collection/helpers/slimmers/test/dark-mode-state-controller.test.js +0 -65
  983. package/dist/collection/helpers/slimmers/test/deprecated-property-slimmer.test.js +0 -36
  984. package/dist/collection/helpers/slimmers/test/field-error-controller-slimmer.test.js +0 -55
  985. package/dist/collection/helpers/slimmers/test/form-field-controller-slimmer.test.js +0 -278
  986. package/dist/collection/helpers/slimmers/test/form-field-valid-invoke-slimmer.test.js +0 -106
  987. package/dist/collection/helpers/slimmers/test/global/vega-nonce-injector-slimmer.test.js +0 -64
  988. package/dist/collection/helpers/slimmers/test/global/vega-translate-observer-slimmer.test.js +0 -89
  989. package/dist/collection/helpers/slimmers/test/global/vega-watch-method-cancel-slimmer.test.js +0 -101
  990. package/dist/collection/helpers/slimmers/test/keyboard-manager-slimmer.test.js +0 -90
  991. package/dist/collection/helpers/slimmers/test/page-resize-observer-slimmer.test.js +0 -278
  992. package/dist/collection/helpers/slimmers/test/string-input-formatter-slimmer.test.js +0 -220
  993. package/dist/collection/helpers/slimmers/test/translation-slimmer.test.js +0 -89
  994. package/dist/collection/helpers/theme/tests/theme-manager-controller.test.js +0 -614
  995. package/dist/collection/helpers/touch-helper/test/touch-listener.test.js +0 -122
  996. package/dist/collection/helpers/translation/tests/internal-translation-controller.test.js +0 -286
  997. package/dist/collection/helpers/translation/tests/translation.test.js +0 -46
  998. package/dist/collection/helpers/ui/test/element-appender.test.js +0 -530
  999. package/dist/collection/helpers/validator/test/rules/check-box-required-rule.test.js +0 -88
  1000. package/dist/collection/helpers/validator/test/rules/custom-validation-rule.test.js +0 -56
  1001. package/dist/collection/helpers/validator/test/rules/date-range-rule.test.js +0 -67
  1002. package/dist/collection/helpers/validator/test/rules/date-required-rule.test.js +0 -120
  1003. package/dist/collection/helpers/validator/test/rules/email-field-rule.test.js +0 -69
  1004. package/dist/collection/helpers/validator/test/rules/file-uploader-required-rule.test.js +0 -7
  1005. package/dist/collection/helpers/validator/test/rules/input-phone-number-required-rule.test.js +0 -105
  1006. package/dist/collection/helpers/validator/test/rules/input-range-min-and-max-rule.test.js +0 -146
  1007. package/dist/collection/helpers/validator/test/rules/input-range-required-rule.test.js +0 -82
  1008. package/dist/collection/helpers/validator/test/rules/input-select-value-in-source-rule.test.js +0 -99
  1009. package/dist/collection/helpers/validator/test/rules/max-number-rule.test.js +0 -97
  1010. package/dist/collection/helpers/validator/test/rules/max-string-length-rule.test.js +0 -85
  1011. package/dist/collection/helpers/validator/test/rules/min-and-max-date-rule.test.js +0 -174
  1012. package/dist/collection/helpers/validator/test/rules/min-number-rule.test.js +0 -97
  1013. package/dist/collection/helpers/validator/test/rules/min-string-length-rule.test.js +0 -85
  1014. package/dist/collection/helpers/validator/test/rules/public-rules.test.js +0 -80
  1015. package/dist/collection/helpers/validator/test/rules/required-field-rule.test.js +0 -126
  1016. package/dist/collection/helpers/validator/test/rules/rich-text-editor-required-rule.test.js +0 -360
  1017. package/dist/collection/helpers/validator/test/rules/time-range-required-rule.test.js +0 -82
  1018. package/dist/collection/helpers/validator/test/rules/time-range-rule.test.js +0 -67
  1019. package/dist/collection/helpers/validator/test/rules/time-required-rule.test.js +0 -116
  1020. package/dist/collection/helpers/validator/test/rules/toggle-switch-required-rule.test.js +0 -72
  1021. package/dist/collection/helpers/validator/test/rules/valid-credit-card-number-rule.test.js +0 -135
  1022. package/dist/collection/helpers/validator/test/rules/valid-phone-number-rule.test.js +0 -95
  1023. package/dist/collection/helpers/validator/test/validation-rule-handler/form-field-validation-rule-handler-chain.test.js +0 -65
  1024. package/dist/collection/helpers/validator/test/validation-rule-handler/form-field-validation-rule-handler.test.js +0 -82
  1025. package/dist/collection/helpers/validator/test/validator/form-field-controller.test.js +0 -205
  1026. package/dist/collection/helpers/vega-telemetry-helper/test/vega-env-manager.test.js +0 -14
  1027. package/dist/collection/helpers/zindex/test/internal-vega-z-index-manager.test.js +0 -176
  1028. package/dist/collection/helpers/zindex/test/vega-z-index-manager.test.js +0 -46
  1029. package/dist/collection/polyfill/d3/test/d3-array-polyfill.test.js +0 -72
  1030. package/dist/collection/polyfill/d3/test/d3-axis-polyfill.test.js +0 -171
  1031. package/dist/collection/polyfill/d3/test/d3-integration.test.js +0 -137
  1032. package/dist/collection/polyfill/d3/test/d3-scale-polyfill.test.js +0 -382
  1033. package/dist/collection/polyfill/d3/test/d3-selection-polyfill.test.js +0 -239
  1034. package/dist/collection/polyfill/d3/test/d3-shape-polyfill.test.js +0 -225
  1035. package/dist/collection/polyfill/d3/test/d3-time-format-polyfill.test.js +0 -162
  1036. package/dist/collection/polyfill/d3/test/d3-time-polyfill.test.js +0 -76
  1037. package/dist/collection/polyfill/d3/test/index.test.js +0 -78
  1038. package/dist/collection/polyfill/libphonenumber/test/as-you-type.test.js +0 -309
  1039. package/dist/collection/polyfill/libphonenumber/test/format-helpers.test.js +0 -192
  1040. package/dist/collection/polyfill/libphonenumber/test/index.test.js +0 -16
  1041. package/dist/collection/polyfill/libphonenumber/test/metadata.test.js +0 -196
  1042. package/dist/collection/polyfill/libphonenumber/test/parse-phone-number.test.js +0 -218
  1043. package/dist/collection/polyfill/libphonenumber/test/phone-number.test.js +0 -56
  1044. package/dist/collection/polyfill/prism/test/css.test.js +0 -61
  1045. package/dist/collection/polyfill/prism/test/javascript.test.js +0 -113
  1046. package/dist/collection/polyfill/prism/test/jsx.test.js +0 -48
  1047. package/dist/collection/polyfill/prism/test/language-registry.test.js +0 -77
  1048. package/dist/collection/polyfill/prism/test/markup.test.js +0 -57
  1049. package/dist/collection/polyfill/prism/test/test-utils.js +0 -22
  1050. package/dist/collection/polyfill/prism/test/tokenizer.test.js +0 -180
  1051. package/dist/collection/polyfill/prism/test/tsx.test.js +0 -87
  1052. package/dist/collection/polyfill/prism/test/typescript.test.js +0 -86
  1053. package/dist/collection/polyfill/shadow-selection/test/shadow-selection-polyfill.test.js +0 -234
  1054. package/dist/collection/polyfill/test-polyfill/e2e/retry.js +0 -42
  1055. package/dist/collection/polyfill/test-polyfill/unit/create-touch-event.js +0 -31
  1056. package/dist/collection/polyfill/test-polyfill/unit/events.js +0 -100
  1057. package/dist/collection/polyfill/test-polyfill/unit/index.js +0 -3
  1058. package/dist/collection/polyfill/test-polyfill/unit/methods.js +0 -47
  1059. package/dist/collection/polyfill/test-polyfill/unit/range.js +0 -15
  1060. package/dist/collection/polyfill/test-polyfill/unit/shadow-selection.js +0 -17
  1061. package/dist/collection/polyfill/tinycolor/tinycolor-polyfill.test.js +0 -361
  1062. package/dist/collection/test-assets/test-icons.js +0 -5
  1063. package/dist/collection/types/test/type-guard.test.js +0 -46
  1064. package/dist/collection/utils/e2e-utils.js +0 -341
  1065. package/dist/collection/utils/sanitize/test/empty-strategy.test.js +0 -12
  1066. package/dist/collection/utils/sanitize/test/html-sanitizer.test.js +0 -57
  1067. package/dist/collection/utils/sanitize/test/label-strategy.test.js +0 -56
  1068. package/dist/collection/utils/sanitize/test/sanitize-strategy.test.js +0 -85
  1069. package/dist/collection/utils/sanitize/test/sanitize.test.js +0 -22
  1070. package/dist/collection/utils/sanitize/test/serialize-fragment.test.js +0 -25
  1071. package/dist/collection/utils/sanitize/test/style-strategy.test.js +0 -45
  1072. package/dist/collection/utils/spec-utils.js +0 -225
  1073. package/dist/collection/utils/test/accessibility.test.js +0 -40
  1074. package/dist/collection/utils/test/api.test.js +0 -34
  1075. package/dist/collection/utils/test/array.test.js +0 -260
  1076. package/dist/collection/utils/test/breakpoint.test.js +0 -37
  1077. package/dist/collection/utils/test/component.test.js +0 -59
  1078. package/dist/collection/utils/test/date.test.js +0 -104
  1079. package/dist/collection/utils/test/design-token.test.js +0 -91
  1080. package/dist/collection/utils/test/effect.test.js +0 -64
  1081. package/dist/collection/utils/test/local-storage.test.js +0 -38
  1082. package/dist/collection/utils/test/log.test.js +0 -49
  1083. package/dist/collection/utils/test/misc.test.js +0 -40
  1084. package/dist/collection/utils/test/number.test.js +0 -18
  1085. package/dist/collection/utils/test/object.test.js +0 -77
  1086. package/dist/collection/utils/test/pagination.test.js +0 -40
  1087. package/dist/collection/utils/test/pixel.test.js +0 -29
  1088. package/dist/collection/utils/test/safe-document.test.js +0 -13
  1089. package/dist/collection/utils/test/spec-utils.test.js +0 -73
  1090. package/dist/collection/utils/test/string.test.js +0 -8
  1091. package/dist/collection/utils/test/test-utils.test.js +0 -70
  1092. package/dist/collection/utils/test/timer.test.js +0 -16
  1093. package/dist/collection/utils/test/ui.test.js +0 -301
  1094. package/dist/collection/utils/test-utils.js +0 -156
  1095. package/dist/esm/app-globals-3b97bb20.js +0 -426
  1096. package/dist/esm/breakpoints-13353e09.js +0 -53
  1097. package/dist/esm/child-nodes-event-prevent-slimmer-4feabae0.js +0 -156
  1098. package/dist/esm/child-nodes-notify-observer-slimmer-541dd6a4.js +0 -88
  1099. package/dist/esm/code-block-d65bab61.js +0 -4364
  1100. package/dist/esm/component-value-history-controller-slimmer.abstract-556fcf2a.js +0 -730
  1101. package/dist/esm/date-required-rule-4ffd9cae.js +0 -90
  1102. package/dist/esm/deprecated-property-slimmer-2c14df89.js +0 -49
  1103. package/dist/esm/design-token-b518a2aa.js +0 -388
  1104. package/dist/esm/dom-node-subject-observer-factory-82f346e3.js +0 -138
  1105. package/dist/esm/dto-renderer-manager-73df5cbe.js +0 -4101
  1106. package/dist/esm/element-appender-slimmer-36b7a572.js +0 -1972
  1107. package/dist/esm/event-emit-slimmer-f879fd58.js +0 -265
  1108. package/dist/esm/form-field-controller-slimmer-9a880420.js +0 -1264
  1109. package/dist/esm/image-annotation-action-eb3dcad5.js +0 -307
  1110. package/dist/esm/inject-keyboard-manager-e5481833.js +0 -35
  1111. package/dist/esm/internal-translation-controller-0787a7a7.js +0 -296
  1112. package/dist/esm/internal-vega-event-manager-3aebbe55.js +0 -494
  1113. package/dist/esm/keyboard-manager-4dfc625f.js +0 -138
  1114. package/dist/esm/keyboard-manager-slimmer-87bf68f1.js +0 -37
  1115. package/dist/esm/month-view-generator-94134ec5.js +0 -98
  1116. package/dist/esm/object-66c37948.js +0 -46
  1117. package/dist/esm/page-resize-observer-slimmer-e0505250.js +0 -121
  1118. package/dist/esm/public-rules-49912d52.js +0 -31
  1119. package/dist/esm/range-0a22b512.js +0 -176
  1120. package/dist/esm/responsive-format-facade-b3799ff9.js +0 -912
  1121. package/dist/esm/rich-text-editor-required-rule-d86e3a51.js +0 -62
  1122. package/dist/esm/string-format-strategy.abstract-e40a0df7.js +0 -58
  1123. package/dist/esm/string-input-formatter-slimmer-076764fc.js +0 -228
  1124. package/dist/esm/string-mask-strategy-df1f5707.js +0 -170
  1125. package/dist/esm/style-formatter-95255392.js +0 -32
  1126. package/dist/esm/sub-state-notify-slimmer-f4b3b0b9.js +0 -79
  1127. package/dist/esm/sub-state-observer-slimmer-058feaf0.js +0 -132
  1128. package/dist/esm/time-required-rule-b4af75ae.js +0 -138
  1129. package/dist/esm/token-extension-ffd98170.js +0 -3041
  1130. package/dist/esm/translation-slimmer-e788cae4.js +0 -40
  1131. package/dist/esm/type-guard-f69d2935.js +0 -1939
  1132. package/dist/esm/ui-41f725b7.js +0 -45
  1133. package/dist/esm/ui-ee31416b.js +0 -241
  1134. package/dist/esm/valid-credit-card-number-rule-c023326d.js +0 -171
  1135. package/dist/esm/vega-event-id-fdc58a67.js +0 -114
  1136. package/dist/esm/vega-internal-event-id-12783594.js +0 -70
  1137. package/dist/esm/wait-for-component-did-render-4d0a3428.js +0 -30
  1138. package/dist/types/components/vega-calendar/slimmers/common/helpers/test/calendar-event-repeat-pattern-factory.test.d.ts +0 -1
  1139. package/dist/types/components/vega-calendar/slimmers/common/layout/test/long-event-layout-generator.test.d.ts +0 -1
  1140. package/dist/types/components/vega-calendar/slimmers/day-view/renderers/timed-event/layout/test/day-view-event-layout-generator.test.d.ts +0 -1
  1141. package/dist/types/components/vega-code-block/test/code-block-range.test.d.ts +0 -1
  1142. package/dist/types/components/vega-dropdown/test/share.d.ts +0 -12
  1143. package/dist/types/components/vega-input-credit-card/test/share.d.ts +0 -18
  1144. package/dist/types/components/vega-nav/vega-left-nav/test/vega-left-nav-mock-data.d.ts +0 -4
  1145. package/dist/types/components/vega-rich-text-editor/helpers/extension-context-manager.test.d.ts +0 -1
  1146. package/dist/types/components/vega-rich-text-editor/slimmers/controllers/text-node-color-controller.d.ts +0 -22
  1147. package/dist/types/components/vega-rich-text-editor/slimmers/controllers/text-node-rendering-registry.d.ts +0 -22
  1148. package/dist/types/components/vega-rich-text-editor/test/dto/action-handle-strategies/action-handle-strategy-registry.test.d.ts +0 -1
  1149. package/dist/types/components/vega-rich-text-editor/test/dto/action-handle-strategies/block-delete-node-content-strategy.test.d.ts +0 -1
  1150. package/dist/types/components/vega-rich-text-editor/test/dto/action-handle-strategies/block-insert-line-break-with-blocks-strategy.test.d.ts +0 -1
  1151. package/dist/types/components/vega-rich-text-editor/test/dto/action-handle-strategies/code-block-strategy-registry.test.d.ts +0 -1
  1152. package/dist/types/components/vega-rich-text-editor/test/dto/action-handle-strategies/content-state-strategy-registry.test.d.ts +0 -1
  1153. package/dist/types/components/vega-rich-text-editor/test/dto/action-handle-strategies/image-block-strategy-register.test.d.ts +0 -1
  1154. package/dist/types/components/vega-rich-text-editor/test/dto/action-handle-strategies/image-set-annotation-map-strategy.test.d.ts +0 -1
  1155. package/dist/types/components/vega-rich-text-editor/test/dto/action-handle-strategies/image-update-url-strategy.test.d.ts +0 -1
  1156. package/dist/types/components/vega-rich-text-editor/test/dto/action-handle-strategies/list-block-strategy-register.test.d.ts +0 -1
  1157. package/dist/types/components/vega-rich-text-editor/test/dto/action-handle-strategies/list-item-strategy-register.test.d.ts +0 -1
  1158. package/dist/types/components/vega-rich-text-editor/test/dto/action-handle-strategies/node-split-text-strategy.test.d.ts +0 -1
  1159. package/dist/types/components/vega-rich-text-editor/test/dto/action-handle-strategies/node-update-annotation-map-strategy.test.d.ts +0 -1
  1160. package/dist/types/components/vega-rich-text-editor/test/dto/action-handle-strategies/text-block-strategy-register.test.d.ts +0 -1
  1161. package/dist/types/components/vega-rich-text-editor/test/dto/action-handle-strategies/update-selected-text-strategy.test.d.ts +0 -1
  1162. package/dist/types/components/vega-rich-text-editor/test/dto/annotation-actions.test.d.ts +0 -1
  1163. package/dist/types/components/vega-rich-text-editor/test/dto/annotation-style.test.d.ts +0 -1
  1164. package/dist/types/components/vega-rich-text-editor/test/dto/annotations.test.d.ts +0 -1
  1165. package/dist/types/components/vega-rich-text-editor/test/dto/blocks/code-block.test.d.ts +0 -1
  1166. package/dist/types/components/vega-rich-text-editor/test/dto/blocks/html-block.test.d.ts +0 -1
  1167. package/dist/types/components/vega-rich-text-editor/test/dto/blocks/image-block.test.d.ts +0 -1
  1168. package/dist/types/components/vega-rich-text-editor/test/dto/blocks/list-block.test.d.ts +0 -1
  1169. package/dist/types/components/vega-rich-text-editor/test/dto/blocks/list-item.test.d.ts +0 -1
  1170. package/dist/types/components/vega-rich-text-editor/test/dto/blocks/text-block.test.d.ts +0 -1
  1171. package/dist/types/components/vega-rich-text-editor/test/dto/content-state.test.d.ts +0 -1
  1172. package/dist/types/components/vega-rich-text-editor/test/dto/nodes/image-node.test.d.ts +0 -1
  1173. package/dist/types/components/vega-rich-text-editor/test/dto/nodes/text-node.test.d.ts +0 -1
  1174. package/dist/types/components/vega-rich-text-editor/test/dto/range.test.d.ts +0 -1
  1175. package/dist/types/components/vega-rich-text-editor/test/e2e-utils.d.ts +0 -67
  1176. package/dist/types/components/vega-rich-text-editor/test/element-to-dto-strategy/custom-attribute-annotation-handler.test.d.ts +0 -1
  1177. package/dist/types/components/vega-rich-text-editor/test/element-to-dto-strategy/element-to-text-node-strategy.test.d.ts +0 -1
  1178. package/dist/types/components/vega-rich-text-editor/test/element-to-dto-strategy/html-element-to-annotation-generator.test.d.ts +0 -1
  1179. package/dist/types/components/vega-rich-text-editor/test/element-to-dto-strategy/jira-code-to-rte-code-block-strategy.test.d.ts +0 -1
  1180. package/dist/types/components/vega-rich-text-editor/test/element-to-dto-strategy/vega-code-block-to-rte-code-block-strategy.test.d.ts +0 -1
  1181. package/dist/types/components/vega-rich-text-editor/test/extensions/extension-test-utils.d.ts +0 -21
  1182. package/dist/types/components/vega-rich-text-editor/test/fixture.d.ts +0 -19
  1183. package/dist/types/components/vega-rich-text-editor/test/html-cleaner/html-content-cleaner.test.d.ts +0 -1
  1184. package/dist/types/components/vega-rich-text-editor/test/html-cleaner/remove-whitespace-after-opening-tag-processor.test.d.ts +0 -1
  1185. package/dist/types/components/vega-rich-text-editor/test/html-cleaner/remove-whitespace-before-closing-tag-processor.test.d.ts +0 -1
  1186. package/dist/types/components/vega-rich-text-editor/test/html-cleaner/remove-whitespace-between-tags-processor.test.d.ts +0 -1
  1187. package/dist/types/components/vega-rich-text-editor/test/spec-utils.d.ts +0 -15
  1188. package/dist/types/components/vega-sidenav/test/test.helper.d.ts +0 -6
  1189. package/dist/types/components/vega-table/slimmers/controllers/dto/test/column-render-input-model.test.d.ts +0 -1
  1190. package/dist/types/components/vega-table/slimmers/controllers/dto/test/column-structure-model.test.d.ts +0 -1
  1191. package/dist/types/components/vega-table/test/utils.d.ts +0 -9
  1192. package/dist/types/components/vega-table/test/vega-table-sorter.test.d.ts +0 -1
  1193. package/dist/types/constants/tests/validator.test.d.ts +0 -1
  1194. package/dist/types/decorators/method-decorators/tests/component-load-required.test.d.ts +0 -1
  1195. package/dist/types/decorators/property-decorators/tests/inject-element-appender-proxy.test.d.ts +0 -1
  1196. package/dist/types/decorators/property-decorators/tests/inject-keyboard-manager.test.d.ts +0 -1
  1197. package/dist/types/global/tests/before-vega-load.test.d.ts +0 -1
  1198. package/dist/types/helpers/calendar/test/calendar-date-time.test.d.ts +0 -1
  1199. package/dist/types/helpers/calendar/test/calendar-date.test.d.ts +0 -1
  1200. package/dist/types/helpers/calendar/test/calendar-event.test.d.ts +0 -1
  1201. package/dist/types/helpers/calendar/test/calendar-period/day-period.test.d.ts +0 -1
  1202. package/dist/types/helpers/calendar/test/calendar-period/month-period.test.d.ts +0 -1
  1203. package/dist/types/helpers/calendar/test/calendar-period/week-period.test.d.ts +0 -1
  1204. package/dist/types/helpers/calendar/test/calendar-time.test.d.ts +0 -1
  1205. package/dist/types/helpers/calendar/test/calendar-view-generator/day-view-generator.test.d.ts +0 -1
  1206. package/dist/types/helpers/calendar/test/calendar-view-generator/month-view-generator.test.d.ts +0 -1
  1207. package/dist/types/helpers/calendar/test/calendar-view-generator/week-view-generator.test.d.ts +0 -1
  1208. package/dist/types/helpers/calendar/test/calendar-view.test.d.ts +0 -1
  1209. package/dist/types/helpers/calendar/test/index.test.d.ts +0 -1
  1210. package/dist/types/helpers/calendar/test/utils.test.d.ts +0 -1
  1211. package/dist/types/helpers/change-manager/test/change-manager.test.d.ts +0 -1
  1212. package/dist/types/helpers/change-manager/test/dom-node-subject-factory.test.d.ts +0 -1
  1213. package/dist/types/helpers/chart/test/controllers/chart-dimension-controller.test.d.ts +0 -1
  1214. package/dist/types/helpers/chart/test/drawers/arc-path-drawer.test.d.ts +0 -1
  1215. package/dist/types/helpers/chart/test/drawers/legend-drawer.test.d.ts +0 -1
  1216. package/dist/types/helpers/chart/test/drawers/line-drawer.test.d.ts +0 -1
  1217. package/dist/types/helpers/chart/test/drawers/path-drawer.test.d.ts +0 -1
  1218. package/dist/types/helpers/chart/test/drawers/rect-drawer.test.d.ts +0 -1
  1219. package/dist/types/helpers/chart/test/drawers/text-drawer.test.d.ts +0 -1
  1220. package/dist/types/helpers/chart/test/drawers/x-axis-drawer.test.d.ts +0 -1
  1221. package/dist/types/helpers/chart/test/drawers/y-axis-drawer.test.d.ts +0 -1
  1222. package/dist/types/helpers/chart/test/graph-context-factory.test.d.ts +0 -1
  1223. package/dist/types/helpers/chart/test/input-processors/format-time-positions-input-processor.test.d.ts +0 -1
  1224. package/dist/types/helpers/chart/test/input-processors/horizontal-x-axis-input-processor.test.d.ts +0 -1
  1225. package/dist/types/helpers/chart/test/input-processors/horizontal-y-axis-input-processor.test.d.ts +0 -1
  1226. package/dist/types/helpers/chart/test/input-processors/layout-input-processor.test.d.ts +0 -1
  1227. package/dist/types/helpers/chart/test/input-processors/line-path-input-processor.test.d.ts +0 -1
  1228. package/dist/types/helpers/chart/test/input-processors/pie-chart-filter-input-processor.test.d.ts +0 -1
  1229. package/dist/types/helpers/chart/test/input-processors/pie-chart-radius-input-processor.test.d.ts +0 -1
  1230. package/dist/types/helpers/chart/test/input-processors/sort-positions-input-processor.test.d.ts +0 -1
  1231. package/dist/types/helpers/chart/test/input-processors/x-axis-input-processor.test.d.ts +0 -1
  1232. package/dist/types/helpers/chart/test/input-processors/x-axis-label-formatter-input-processor.test.d.ts +0 -1
  1233. package/dist/types/helpers/chart/test/input-processors/y-axis-input-processor.coverage.test.d.ts +0 -1
  1234. package/dist/types/helpers/chart/test/input-processors/y-axis-input-processor.test.d.ts +0 -1
  1235. package/dist/types/helpers/chart/test/interacting-entry-generator/arc-path-hover-generator.test.d.ts +0 -1
  1236. package/dist/types/helpers/chart/test/interacting-entry-generator/pie-legend-hover-generator.test.d.ts +0 -1
  1237. package/dist/types/helpers/chart/test/interactors/interactor-factory.test.d.ts +0 -1
  1238. package/dist/types/helpers/chart/test/interactors/svg-interactor.test.d.ts +0 -1
  1239. package/dist/types/helpers/chart/test/line-chart.test.d.ts +0 -1
  1240. package/dist/types/helpers/chart/test/pie-chart.test.d.ts +0 -1
  1241. package/dist/types/helpers/chart/test/renderers/canvas-renderer.test.d.ts +0 -1
  1242. package/dist/types/helpers/chart/test/renderers/renderer-factory.test.d.ts +0 -1
  1243. package/dist/types/helpers/chart/test/renderers/svg-renderer.test.d.ts +0 -1
  1244. package/dist/types/helpers/code-format/test/code-formatter.test.d.ts +0 -1
  1245. package/dist/types/helpers/common/test/common.test.d.ts +0 -1
  1246. package/dist/types/helpers/common/test/wait-for-component-did-render.test.d.ts +0 -1
  1247. package/dist/types/helpers/common/test/wait-for-vega-handler.test.d.ts +0 -1
  1248. package/dist/types/helpers/csp/test/styles-preservator.test.d.ts +0 -1
  1249. package/dist/types/helpers/csp/test/vega-nonce-manager.test.d.ts +0 -1
  1250. package/dist/types/helpers/dialog/test/vega-dialog-controller.test.d.ts +0 -1
  1251. package/dist/types/helpers/event-manager/test/child-nodes-event-prevent-slimmer.test.d.ts +0 -1
  1252. package/dist/types/helpers/event-manager/test/child-nodes-notify-observer-slimmer.test.d.ts +0 -1
  1253. package/dist/types/helpers/event-manager/test/component-event-id-map.test.d.ts +0 -1
  1254. package/dist/types/helpers/event-manager/test/event-emit-slimmer.test.d.ts +0 -1
  1255. package/dist/types/helpers/event-manager/test/internal-vega-event-manager.test.d.ts +0 -1
  1256. package/dist/types/helpers/event-manager/test/jquery-delegated-strategy-controller.test.d.ts +0 -1
  1257. package/dist/types/helpers/event-manager/test/vega-event-id.test.d.ts +0 -1
  1258. package/dist/types/helpers/event-manager/test/vega-event-manager.test.d.ts +0 -1
  1259. package/dist/types/helpers/feature-control/tests/feature-flag-controller.test.d.ts +0 -1
  1260. package/dist/types/helpers/formatter/test/responsive-map-formatter/responsive-border-radius-formatter.test.d.ts +0 -1
  1261. package/dist/types/helpers/formatter/test/responsive-map-formatter/responsive-border-radius-style-formatter.test.d.ts +0 -1
  1262. package/dist/types/helpers/formatter/test/responsive-map-formatter/responsive-box-display-formatter.test.d.ts +0 -1
  1263. package/dist/types/helpers/formatter/test/responsive-map-formatter/responsive-custom-formatter.test.d.ts +0 -1
  1264. package/dist/types/helpers/formatter/test/responsive-map-formatter/responsive-display-formatter.test.d.ts +0 -1
  1265. package/dist/types/helpers/formatter/test/responsive-map-formatter/responsive-flex-direction-formatter.test.d.ts +0 -1
  1266. package/dist/types/helpers/formatter/test/responsive-map-formatter/responsive-flex-wrap-formatter.test.d.ts +0 -1
  1267. package/dist/types/helpers/formatter/test/responsive-map-formatter/responsive-format-mediator.test.d.ts +0 -1
  1268. package/dist/types/helpers/formatter/test/responsive-map-formatter/responsive-gap-formatter.ts.test.d.ts +0 -1
  1269. package/dist/types/helpers/formatter/test/responsive-map-formatter/responsive-grid-column-formatter.test.d.ts +0 -1
  1270. package/dist/types/helpers/formatter/test/responsive-map-formatter/responsive-grid-row-formatter.test.d.ts +0 -1
  1271. package/dist/types/helpers/formatter/test/responsive-map-formatter/responsive-margin-formatter.test.d.ts +0 -1
  1272. package/dist/types/helpers/formatter/test/responsive-map-formatter/responsive-margin-style-formatter.test.d.ts +0 -1
  1273. package/dist/types/helpers/formatter/test/responsive-map-formatter/responsive-padding-formatter.test.d.ts +0 -1
  1274. package/dist/types/helpers/formatter/test/responsive-map-formatter/responsive-padding-style-formatter.test.d.ts +0 -1
  1275. package/dist/types/helpers/formatter/test/responsive-map-formatter/responsive-size-formatter.test.d.ts +0 -1
  1276. package/dist/types/helpers/formatter/test/responsive-map-formatter/responsive-text-align-formatter.test.d.ts +0 -1
  1277. package/dist/types/helpers/formatter/test/responsive-map-formatter/responsive-translocation-formatter.test.d.ts +0 -1
  1278. package/dist/types/helpers/formatter/test/responsive-map-formatter/responsive-width-and-height-formatter.test.d.ts +0 -1
  1279. package/dist/types/helpers/formatter/test/state-formatter/state-background-color-formatter.test.d.ts +0 -1
  1280. package/dist/types/helpers/formatter/test/state-formatter/state-border-color-formatter.test.d.ts +0 -1
  1281. package/dist/types/helpers/formatter/test/state-formatter/state-border-formatter.test.d.ts +0 -1
  1282. package/dist/types/helpers/formatter/test/state-formatter/state-format-facade.test.d.ts +0 -1
  1283. package/dist/types/helpers/formatter/test/state-formatter/state-shadow-formatter.test.d.ts +0 -1
  1284. package/dist/types/helpers/formatter/test/string-formatter/custom-formatter-strategy.test.d.ts +0 -1
  1285. package/dist/types/helpers/formatter/test/string-formatter/number-mask-strategy.test.d.ts +0 -1
  1286. package/dist/types/helpers/formatter/test/string-formatter/number-thousand-comma-mask-strategy.test.d.ts +0 -1
  1287. package/dist/types/helpers/formatter/test/string-formatter/string-mask-strategy.test.d.ts +0 -1
  1288. package/dist/types/helpers/formatter/test/string-formatter/thousand-comma-strategy.test.d.ts +0 -1
  1289. package/dist/types/helpers/formatter/test/string-formatter/vega-phone-number-input-strategy.test.d.ts +0 -1
  1290. package/dist/types/helpers/formatter/test/style-formatter.test.d.ts +0 -1
  1291. package/dist/types/helpers/icon/test/icon-manager-controller.test.d.ts +0 -1
  1292. package/dist/types/helpers/icon/test/internal-icon-manager.test.d.ts +0 -1
  1293. package/dist/types/helpers/immutable/test/immutable-array.test.d.ts +0 -1
  1294. package/dist/types/helpers/immutable/test/immutable-map.test.d.ts +0 -1
  1295. package/dist/types/helpers/immutable/test/immutable-set.test.d.ts +0 -1
  1296. package/dist/types/helpers/keyboard/test/keyboard-manager.test.d.ts +0 -1
  1297. package/dist/types/helpers/level-tracker/test/nested-level-tracker.test.d.ts +0 -1
  1298. package/dist/types/helpers/loading-indicator/tests/vega-loader-controller.test.d.ts +0 -1
  1299. package/dist/types/helpers/notify/tests/vega-notify-controller.test.d.ts +0 -1
  1300. package/dist/types/helpers/paginator/test/value-paginator.test.d.ts +0 -1
  1301. package/dist/types/helpers/queue/test/synchronize-task-queue.test.d.ts +0 -1
  1302. package/dist/types/helpers/remote-invocation/remote-invocation-registry.test.d.ts +0 -1
  1303. package/dist/types/helpers/rte-manager/rte.manager.test.d.ts +0 -1
  1304. package/dist/types/helpers/skeleton-loader/tests/vega-skeleton-loader-controller.test.d.ts +0 -1
  1305. package/dist/types/helpers/slimmers/element-appender/test/element-appender-slimmer.test.d.ts +0 -1
  1306. package/dist/types/helpers/slimmers/mutation-observer/test/aria-attributes-value-mapper.test.d.ts +0 -1
  1307. package/dist/types/helpers/slimmers/mutation-observer/test/data-tab-index-value-mapper.test.d.ts +0 -1
  1308. package/dist/types/helpers/slimmers/mutation-observer/test/mutation-observer-slimmer.test.d.ts +0 -1
  1309. package/dist/types/helpers/slimmers/position-calculation/test/body-position-calculation-strategy.test.d.ts +0 -15
  1310. package/dist/types/helpers/slimmers/position-calculation/test/screen-position-calculation-strategy.test.d.ts +0 -1
  1311. package/dist/types/helpers/slimmers/runtime-metrics/test/public-api-runtime-metrics-slimmer-base.test.d.ts +0 -1
  1312. package/dist/types/helpers/slimmers/sub-state/test/sub-state-observer-slimmer.test.d.ts +0 -1
  1313. package/dist/types/helpers/slimmers/test/auto-run-when-re-render-task-queue-slimmer.test.d.ts +0 -1
  1314. package/dist/types/helpers/slimmers/test/brand-switch-state-controller-slimmer.test.d.ts +0 -1
  1315. package/dist/types/helpers/slimmers/test/component-global-style-slimmer.test.d.ts +0 -1
  1316. package/dist/types/helpers/slimmers/test/component-usage-runtime-metrics.test.d.ts +0 -1
  1317. package/dist/types/helpers/slimmers/test/dark-mode-state-controller.test.d.ts +0 -1
  1318. package/dist/types/helpers/slimmers/test/deprecated-property-slimmer.test.d.ts +0 -1
  1319. package/dist/types/helpers/slimmers/test/field-error-controller-slimmer.test.d.ts +0 -1
  1320. package/dist/types/helpers/slimmers/test/form-field-controller-slimmer.test.d.ts +0 -1
  1321. package/dist/types/helpers/slimmers/test/form-field-valid-invoke-slimmer.test.d.ts +0 -1
  1322. package/dist/types/helpers/slimmers/test/global/vega-nonce-injector-slimmer.test.d.ts +0 -1
  1323. package/dist/types/helpers/slimmers/test/global/vega-translate-observer-slimmer.test.d.ts +0 -1
  1324. package/dist/types/helpers/slimmers/test/global/vega-watch-method-cancel-slimmer.test.d.ts +0 -1
  1325. package/dist/types/helpers/slimmers/test/keyboard-manager-slimmer.test.d.ts +0 -1
  1326. package/dist/types/helpers/slimmers/test/page-resize-observer-slimmer.test.d.ts +0 -1
  1327. package/dist/types/helpers/slimmers/test/string-input-formatter-slimmer.test.d.ts +0 -1
  1328. package/dist/types/helpers/slimmers/test/translation-slimmer.test.d.ts +0 -1
  1329. package/dist/types/helpers/theme/tests/theme-manager-controller.test.d.ts +0 -1
  1330. package/dist/types/helpers/touch-helper/test/touch-listener.test.d.ts +0 -1
  1331. package/dist/types/helpers/translation/tests/internal-translation-controller.test.d.ts +0 -1
  1332. package/dist/types/helpers/translation/tests/translation.test.d.ts +0 -1
  1333. package/dist/types/helpers/ui/test/element-appender.test.d.ts +0 -1
  1334. package/dist/types/helpers/validator/test/rules/check-box-required-rule.test.d.ts +0 -1
  1335. package/dist/types/helpers/validator/test/rules/custom-validation-rule.test.d.ts +0 -1
  1336. package/dist/types/helpers/validator/test/rules/date-range-rule.test.d.ts +0 -1
  1337. package/dist/types/helpers/validator/test/rules/date-required-rule.test.d.ts +0 -1
  1338. package/dist/types/helpers/validator/test/rules/email-field-rule.test.d.ts +0 -1
  1339. package/dist/types/helpers/validator/test/rules/file-uploader-required-rule.test.d.ts +0 -1
  1340. package/dist/types/helpers/validator/test/rules/input-phone-number-required-rule.test.d.ts +0 -1
  1341. package/dist/types/helpers/validator/test/rules/input-range-min-and-max-rule.test.d.ts +0 -1
  1342. package/dist/types/helpers/validator/test/rules/input-range-required-rule.test.d.ts +0 -1
  1343. package/dist/types/helpers/validator/test/rules/input-select-value-in-source-rule.test.d.ts +0 -1
  1344. package/dist/types/helpers/validator/test/rules/max-number-rule.test.d.ts +0 -1
  1345. package/dist/types/helpers/validator/test/rules/max-string-length-rule.test.d.ts +0 -1
  1346. package/dist/types/helpers/validator/test/rules/min-and-max-date-rule.test.d.ts +0 -1
  1347. package/dist/types/helpers/validator/test/rules/min-number-rule.test.d.ts +0 -1
  1348. package/dist/types/helpers/validator/test/rules/min-string-length-rule.test.d.ts +0 -1
  1349. package/dist/types/helpers/validator/test/rules/public-rules.test.d.ts +0 -1
  1350. package/dist/types/helpers/validator/test/rules/required-field-rule.test.d.ts +0 -1
  1351. package/dist/types/helpers/validator/test/rules/rich-text-editor-required-rule.test.d.ts +0 -1
  1352. package/dist/types/helpers/validator/test/rules/time-range-required-rule.test.d.ts +0 -1
  1353. package/dist/types/helpers/validator/test/rules/time-range-rule.test.d.ts +0 -1
  1354. package/dist/types/helpers/validator/test/rules/time-required-rule.test.d.ts +0 -1
  1355. package/dist/types/helpers/validator/test/rules/toggle-switch-required-rule.test.d.ts +0 -1
  1356. package/dist/types/helpers/validator/test/rules/valid-credit-card-number-rule.test.d.ts +0 -1
  1357. package/dist/types/helpers/validator/test/rules/valid-phone-number-rule.test.d.ts +0 -1
  1358. package/dist/types/helpers/validator/test/validation-rule-handler/form-field-validation-rule-handler-chain.test.d.ts +0 -1
  1359. package/dist/types/helpers/validator/test/validation-rule-handler/form-field-validation-rule-handler.test.d.ts +0 -1
  1360. package/dist/types/helpers/validator/test/validator/form-field-controller.test.d.ts +0 -1
  1361. package/dist/types/helpers/vega-telemetry-helper/test/vega-env-manager.test.d.ts +0 -1
  1362. package/dist/types/helpers/zindex/test/internal-vega-z-index-manager.test.d.ts +0 -1
  1363. package/dist/types/helpers/zindex/test/vega-z-index-manager.test.d.ts +0 -1
  1364. package/dist/types/polyfill/d3/test/d3-array-polyfill.test.d.ts +0 -1
  1365. package/dist/types/polyfill/d3/test/d3-axis-polyfill.test.d.ts +0 -1
  1366. package/dist/types/polyfill/d3/test/d3-integration.test.d.ts +0 -1
  1367. package/dist/types/polyfill/d3/test/d3-scale-polyfill.test.d.ts +0 -1
  1368. package/dist/types/polyfill/d3/test/d3-selection-polyfill.test.d.ts +0 -1
  1369. package/dist/types/polyfill/d3/test/d3-shape-polyfill.test.d.ts +0 -1
  1370. package/dist/types/polyfill/d3/test/d3-time-format-polyfill.test.d.ts +0 -1
  1371. package/dist/types/polyfill/d3/test/d3-time-polyfill.test.d.ts +0 -1
  1372. package/dist/types/polyfill/d3/test/index.test.d.ts +0 -1
  1373. package/dist/types/polyfill/libphonenumber/test/as-you-type.test.d.ts +0 -1
  1374. package/dist/types/polyfill/libphonenumber/test/format-helpers.test.d.ts +0 -1
  1375. package/dist/types/polyfill/libphonenumber/test/index.test.d.ts +0 -1
  1376. package/dist/types/polyfill/libphonenumber/test/metadata.test.d.ts +0 -1
  1377. package/dist/types/polyfill/libphonenumber/test/parse-phone-number.test.d.ts +0 -1
  1378. package/dist/types/polyfill/libphonenumber/test/phone-number.test.d.ts +0 -1
  1379. package/dist/types/polyfill/prism/test/css.test.d.ts +0 -1
  1380. package/dist/types/polyfill/prism/test/javascript.test.d.ts +0 -1
  1381. package/dist/types/polyfill/prism/test/jsx.test.d.ts +0 -1
  1382. package/dist/types/polyfill/prism/test/language-registry.test.d.ts +0 -1
  1383. package/dist/types/polyfill/prism/test/markup.test.d.ts +0 -1
  1384. package/dist/types/polyfill/prism/test/test-utils.d.ts +0 -10
  1385. package/dist/types/polyfill/prism/test/tokenizer.test.d.ts +0 -1
  1386. package/dist/types/polyfill/prism/test/tsx.test.d.ts +0 -1
  1387. package/dist/types/polyfill/prism/test/typescript.test.d.ts +0 -1
  1388. package/dist/types/polyfill/shadow-selection/test/shadow-selection-polyfill.test.d.ts +0 -0
  1389. package/dist/types/polyfill/test-polyfill/e2e/retry.d.ts +0 -8
  1390. package/dist/types/polyfill/test-polyfill/unit/create-touch-event.d.ts +0 -11
  1391. package/dist/types/polyfill/test-polyfill/unit/events.d.ts +0 -1
  1392. package/dist/types/polyfill/test-polyfill/unit/index.d.ts +0 -3
  1393. package/dist/types/polyfill/test-polyfill/unit/methods.d.ts +0 -1
  1394. package/dist/types/polyfill/test-polyfill/unit/range.d.ts +0 -7
  1395. package/dist/types/polyfill/test-polyfill/unit/shadow-selection.d.ts +0 -0
  1396. package/dist/types/polyfill/tinycolor/tinycolor-polyfill.test.d.ts +0 -1
  1397. package/dist/types/test-assets/test-icons.d.ts +0 -4
  1398. package/dist/types/types/test/type-guard.test.d.ts +0 -1
  1399. package/dist/types/utils/e2e-utils.d.ts +0 -150
  1400. package/dist/types/utils/sanitize/test/empty-strategy.test.d.ts +0 -1
  1401. package/dist/types/utils/sanitize/test/html-sanitizer.test.d.ts +0 -1
  1402. package/dist/types/utils/sanitize/test/label-strategy.test.d.ts +0 -1
  1403. package/dist/types/utils/sanitize/test/sanitize-strategy.test.d.ts +0 -1
  1404. package/dist/types/utils/sanitize/test/sanitize.test.d.ts +0 -1
  1405. package/dist/types/utils/sanitize/test/serialize-fragment.test.d.ts +0 -1
  1406. package/dist/types/utils/sanitize/test/style-strategy.test.d.ts +0 -1
  1407. package/dist/types/utils/spec-utils.d.ts +0 -108
  1408. package/dist/types/utils/test/accessibility.test.d.ts +0 -1
  1409. package/dist/types/utils/test/api.test.d.ts +0 -1
  1410. package/dist/types/utils/test/array.test.d.ts +0 -1
  1411. package/dist/types/utils/test/breakpoint.test.d.ts +0 -1
  1412. package/dist/types/utils/test/component.test.d.ts +0 -1
  1413. package/dist/types/utils/test/date.test.d.ts +0 -1
  1414. package/dist/types/utils/test/design-token.test.d.ts +0 -1
  1415. package/dist/types/utils/test/effect.test.d.ts +0 -1
  1416. package/dist/types/utils/test/local-storage.test.d.ts +0 -1
  1417. package/dist/types/utils/test/log.test.d.ts +0 -1
  1418. package/dist/types/utils/test/misc.test.d.ts +0 -1
  1419. package/dist/types/utils/test/number.test.d.ts +0 -1
  1420. package/dist/types/utils/test/object.test.d.ts +0 -1
  1421. package/dist/types/utils/test/pagination.test.d.ts +0 -1
  1422. package/dist/types/utils/test/pixel.test.d.ts +0 -1
  1423. package/dist/types/utils/test/safe-document.test.d.ts +0 -1
  1424. package/dist/types/utils/test/spec-utils.test.d.ts +0 -1
  1425. package/dist/types/utils/test/string.test.d.ts +0 -1
  1426. package/dist/types/utils/test/test-utils.test.d.ts +0 -1
  1427. package/dist/types/utils/test/timer.test.d.ts +0 -1
  1428. package/dist/types/utils/test/ui.test.d.ts +0 -1
  1429. package/dist/types/utils/test-utils.d.ts +0 -61
  1430. package/dist/vega/p-0009e0bc.entry.js +0 -1
  1431. package/dist/vega/p-02976501.js +0 -1
  1432. package/dist/vega/p-03280f85.entry.js +0 -1
  1433. package/dist/vega/p-03b1e442.js +0 -1
  1434. package/dist/vega/p-0681ffee.entry.js +0 -1
  1435. package/dist/vega/p-093aa0cb.entry.js +0 -1
  1436. package/dist/vega/p-1828f9e6.entry.js +0 -1
  1437. package/dist/vega/p-19883e27.entry.js +0 -1
  1438. package/dist/vega/p-1e015382.js +0 -1
  1439. package/dist/vega/p-1ff45314.entry.js +0 -1
  1440. package/dist/vega/p-24b4c64f.js +0 -1
  1441. package/dist/vega/p-2e7ec8e0.entry.js +0 -1
  1442. package/dist/vega/p-309b5016.entry.js +0 -1
  1443. package/dist/vega/p-31ac7386.js +0 -1
  1444. package/dist/vega/p-3592a26d.entry.js +0 -1
  1445. package/dist/vega/p-383e235a.entry.js +0 -1
  1446. package/dist/vega/p-3992038a.js +0 -1
  1447. package/dist/vega/p-3a537cd0.js +0 -1
  1448. package/dist/vega/p-3b7ad04b.entry.js +0 -1
  1449. package/dist/vega/p-3d4b8066.entry.js +0 -1
  1450. package/dist/vega/p-3e484d99.entry.js +0 -1
  1451. package/dist/vega/p-3fd3861c.entry.js +0 -1
  1452. package/dist/vega/p-4079e932.js +0 -1
  1453. package/dist/vega/p-43df17a1.js +0 -1
  1454. package/dist/vega/p-473ceda5.entry.js +0 -1
  1455. package/dist/vega/p-474b97cf.entry.js +0 -1
  1456. package/dist/vega/p-47c202eb.entry.js +0 -1
  1457. package/dist/vega/p-4e0344bc.entry.js +0 -1
  1458. package/dist/vega/p-4efe9cd8.entry.js +0 -1
  1459. package/dist/vega/p-536ad3d7.entry.js +0 -1
  1460. package/dist/vega/p-53e0b2bd.entry.js +0 -1
  1461. package/dist/vega/p-57180993.entry.js +0 -1
  1462. package/dist/vega/p-5b238c6d.js +0 -1
  1463. package/dist/vega/p-5ba34330.js +0 -1
  1464. package/dist/vega/p-5e1d0f21.entry.js +0 -1
  1465. package/dist/vega/p-5ed5aa26.js +0 -1
  1466. package/dist/vega/p-5f81beae.js +0 -1
  1467. package/dist/vega/p-6a8ac66d.entry.js +0 -1
  1468. package/dist/vega/p-6b3776ec.js +0 -1
  1469. package/dist/vega/p-6b4021f0.entry.js +0 -1
  1470. package/dist/vega/p-6c170474.js +0 -1
  1471. package/dist/vega/p-6cf28c27.js +0 -1
  1472. package/dist/vega/p-71cd1d9e.entry.js +0 -1
  1473. package/dist/vega/p-7440325c.entry.js +0 -1
  1474. package/dist/vega/p-764425e4.entry.js +0 -1
  1475. package/dist/vega/p-77908e45.entry.js +0 -1
  1476. package/dist/vega/p-7ade785e.js +0 -1
  1477. package/dist/vega/p-7db5e003.js +0 -1
  1478. package/dist/vega/p-7db918f4.js +0 -1
  1479. package/dist/vega/p-7f398d23.entry.js +0 -1
  1480. package/dist/vega/p-7f665911.entry.js +0 -1
  1481. package/dist/vega/p-840f156e.entry.js +0 -1
  1482. package/dist/vega/p-87379d3c.js +0 -1
  1483. package/dist/vega/p-87ed06cd.entry.js +0 -1
  1484. package/dist/vega/p-882a220c.js +0 -1
  1485. package/dist/vega/p-8852361b.js +0 -1
  1486. package/dist/vega/p-898bcb24.js +0 -1
  1487. package/dist/vega/p-8fbb677e.entry.js +0 -1
  1488. package/dist/vega/p-9493d87a.js +0 -1
  1489. package/dist/vega/p-951c0172.js +0 -1
  1490. package/dist/vega/p-95919581.entry.js +0 -1
  1491. package/dist/vega/p-95d1b547.js +0 -1
  1492. package/dist/vega/p-99c8f9a4.entry.js +0 -1
  1493. package/dist/vega/p-9c713bc0.js +0 -1
  1494. package/dist/vega/p-9dc77b66.entry.js +0 -1
  1495. package/dist/vega/p-9f467a59.js +0 -1
  1496. package/dist/vega/p-a113fd15.entry.js +0 -1
  1497. package/dist/vega/p-a253e791.entry.js +0 -1
  1498. package/dist/vega/p-a3272850.entry.js +0 -1
  1499. package/dist/vega/p-a432708d.entry.js +0 -1
  1500. package/dist/vega/p-a57a7ab8.entry.js +0 -1
  1501. package/dist/vega/p-a58bd510.entry.js +0 -1
  1502. package/dist/vega/p-a957e15f.js +0 -1
  1503. package/dist/vega/p-abb81b7b.js +0 -1
  1504. package/dist/vega/p-ae6ed091.entry.js +0 -1
  1505. package/dist/vega/p-b5e31243.entry.js +0 -1
  1506. package/dist/vega/p-b88ca09b.js +0 -1
  1507. package/dist/vega/p-b901d624.js +0 -1
  1508. package/dist/vega/p-ba475520.entry.js +0 -1
  1509. package/dist/vega/p-bf04ff19.js +0 -1
  1510. package/dist/vega/p-bf19682d.js +0 -1
  1511. package/dist/vega/p-c208a3b7.js +0 -1
  1512. package/dist/vega/p-c25577ae.entry.js +0 -1
  1513. package/dist/vega/p-c2560608.entry.js +0 -1
  1514. package/dist/vega/p-c2df94f6.js +0 -1
  1515. package/dist/vega/p-c3eec160.entry.js +0 -1
  1516. package/dist/vega/p-c6031d3f.entry.js +0 -1
  1517. package/dist/vega/p-c72e08c6.entry.js +0 -1
  1518. package/dist/vega/p-c87cf96a.entry.js +0 -1
  1519. package/dist/vega/p-cc243e62.entry.js +0 -1
  1520. package/dist/vega/p-cd3d177b.entry.js +0 -1
  1521. package/dist/vega/p-d0687ec0.js +0 -1
  1522. package/dist/vega/p-d25db724.js +0 -1
  1523. package/dist/vega/p-d42dbe39.js +0 -1
  1524. package/dist/vega/p-d5570331.entry.js +0 -1
  1525. package/dist/vega/p-d5797747.js +0 -1
  1526. package/dist/vega/p-d7434f44.entry.js +0 -1
  1527. package/dist/vega/p-db92453f.entry.js +0 -1
  1528. package/dist/vega/p-e52890db.js +0 -1
  1529. package/dist/vega/p-e5be807b.entry.js +0 -1
  1530. package/dist/vega/p-e6f0097f.js +0 -1
  1531. package/dist/vega/p-e7a8b61e.entry.js +0 -1
  1532. package/dist/vega/p-f46f6679.entry.js +0 -1
  1533. package/dist/vega/p-f49e8cc5.entry.js +0 -1
  1534. package/dist/vega/p-f5b6059d.entry.js +0 -1
  1535. package/dist/vega/p-fb40a829.js +0 -1
@@ -0,0 +1,4455 @@
1
+ import { C as ChangeManager } from './change-manager-6a7eb88c.js';
2
+ import { d as domNodeSubjectFactory } from './dom-node-subject-observer-factory-cea9248d.js';
3
+ import { d as VegaInternalRichTextEditorFlushChanges, e as VegaInternalRichTextEditorSelectionRangeChange } from './vega-internal-event-id-70bd893d.js';
4
+ import { c as camelToDashCase } from './string-a953eafc.js';
5
+ import { L as LogUtility } from './global-slimmer-registry-17c4efd4.js';
6
+ import { i as isNonNullable } from './type-guard-23a08026.js';
7
+ import { g as generateUUID } from './misc-9fdbcfbb.js';
8
+ import { V as VegaInternalThemeManager } from './dark-mode-style-controller-82e5c1c6.js';
9
+ import { c as cleanObject } from './object-0c277f57.js';
10
+ import { f as findParent } from './ui-ba5a4758.js';
11
+
12
+ var InternalAnnotationTypeEnum;
13
+ (function (InternalAnnotationTypeEnum) {
14
+ InternalAnnotationTypeEnum["SELECTION_RANGE"] = "SELECTION_RANGE";
15
+ InternalAnnotationTypeEnum["CLEAR_FORMATTING"] = "CLEAR_FORMATTING";
16
+ InternalAnnotationTypeEnum["LINK_GROUP"] = "LINK_GROUP";
17
+ })(InternalAnnotationTypeEnum || (InternalAnnotationTypeEnum = {}));
18
+ /**
19
+ * Abstract class for all annotations
20
+ */
21
+ class Annotation {
22
+ }
23
+
24
+ var BlockAnnotationTypeEnum;
25
+ (function (BlockAnnotationTypeEnum) {
26
+ BlockAnnotationTypeEnum["ALIGNMENT"] = "ALIGNMENT";
27
+ BlockAnnotationTypeEnum["TEXT_STYLE"] = "TEXT_STYLE";
28
+ BlockAnnotationTypeEnum["INDENT"] = "INDENT";
29
+ BlockAnnotationTypeEnum["LIST"] = "LIST";
30
+ BlockAnnotationTypeEnum["INTERNAL_WRAPPER"] = "INTERNAL_WRAPPER";
31
+ })(BlockAnnotationTypeEnum || (BlockAnnotationTypeEnum = {}));
32
+ /**
33
+ * BlockAnnotation is an abstract class that represents a block annotation.
34
+ */
35
+ class BlockAnnotation extends Annotation {
36
+ }
37
+
38
+ /**
39
+ * This class is responsible for keeping track of the DOM elements and their corresponding entities.
40
+ */
41
+ class StateEntityRenderingRegistry {
42
+ constructor() {
43
+ this.domToEntity = new WeakMap();
44
+ this.entityToDOM = new WeakMap();
45
+ this.contentEntityToRootDom = new Map();
46
+ this.rootDomToContentEntity = new WeakMap();
47
+ }
48
+ /**
49
+ * Registers a DOM element and its corresponding entity.
50
+ *
51
+ * @param {HTMLElement} dom The DOM element to register.
52
+ * @param {RTEBlock | RTENode | VegaRTEContent} entity The entity to register.
53
+ */
54
+ register(dom, entity) {
55
+ if (!this.isVegaRTEContent(entity)) {
56
+ this.domToEntity.set(dom, entity);
57
+ this.entityToDOM.set(entity, dom);
58
+ }
59
+ else {
60
+ this.registerRootDomAndContentEntity(dom, entity);
61
+ }
62
+ }
63
+ /**
64
+ * Retrieves the entity corresponding to a DOM element.
65
+ *
66
+ * @param {HTMLElement} dom The DOM element to retrieve the entity for.
67
+ * @returns {Nullable<RTEBlock | RTENode>} The entity corresponding to the DOM element, or null if not found.
68
+ */
69
+ getEntityByDOM(dom) {
70
+ return this.domToEntity.get(dom);
71
+ }
72
+ /**
73
+ * Retrieves the DOM element corresponding to an entity.
74
+ *
75
+ * @param {RTEBlock | RTENode} entity The entity to retrieve the DOM element for.
76
+ * @returns {Nullable<HTMLElement>} The DOM element corresponding to the entity, or null if not found.
77
+ */
78
+ getDOMByEntity(entity) {
79
+ if (!this.isVegaRTEContent(entity)) {
80
+ return this.entityToDOM.get(entity);
81
+ }
82
+ else {
83
+ return this.contentEntityToRootDom.get(entity);
84
+ }
85
+ }
86
+ /**
87
+ * Delete the dirty element to entity ref.
88
+ *
89
+ * @example Convert text node to the link node, the old span will change to the link wrapper element, and there will be a new text span, so we need remove the old span ref from the map.
90
+ * @param {HTMLElement} dom - The dirty element ref.
91
+ */
92
+ removeDirtyDomRef(dom) {
93
+ this.domToEntity.delete(dom);
94
+ }
95
+ /**
96
+ * Bind the root dom ref and content entity.
97
+ *
98
+ * @param {HTMLElement} dom - The vega rich text editor ref.
99
+ * @param {VegaRTEContent} contentEntity - The rich text editor value content.
100
+ */
101
+ registerRootDomAndContentEntity(dom, contentEntity) {
102
+ const oldContent = this.rootDomToContentEntity.get(dom);
103
+ if (oldContent && oldContent !== contentEntity) {
104
+ this.contentEntityToRootDom.delete(oldContent);
105
+ }
106
+ this.rootDomToContentEntity.set(dom, contentEntity);
107
+ this.contentEntityToRootDom.set(contentEntity, dom);
108
+ }
109
+ /**
110
+ * Check the entity is VegaRTEContent instance.
111
+ *
112
+ * @param {VegaRTEContent | RTEBlock | RTENode} entity - The entity to check.
113
+ * @returns {entity is VegaRTEContent} - True if the entity is a VegaRTEContent instance, false otherwise.
114
+ */
115
+ isVegaRTEContent(entity) {
116
+ return entity && entity.constructor.name === 'VegaRTEContent';
117
+ }
118
+ }
119
+ const stateEntityRenderingRegistry = new StateEntityRenderingRegistry();
120
+
121
+ var ModifyContentActionType;
122
+ (function (ModifyContentActionType) {
123
+ ModifyContentActionType["DELETE_CHILDREN"] = "DELETE_CHILDREN";
124
+ ModifyContentActionType["DELETE_NEST_LIST"] = "DELETE_NEST_LIST";
125
+ ModifyContentActionType["UPDATE_TEXT"] = "UPDATE_TEXT";
126
+ ModifyContentActionType["REPLACE_SELECTED_TEXT"] = "REPLACE_SELECTED_TEXT";
127
+ ModifyContentActionType["APPEND_CHILDREN"] = "APPEND_CHILDREN";
128
+ ModifyContentActionType["INSERT_CHILDREN_AFTER"] = "INSERT_CHILDREN_AFTER";
129
+ ModifyContentActionType["INSERT_CHILDREN_BEFORE"] = "INSERT_CHILDREN_BEFORE";
130
+ ModifyContentActionType["SPLIT_BLOCK_WITH_NODE"] = "SPLIT_BLOCK_WITH_NODE";
131
+ ModifyContentActionType["REPLACE_CHILD_NODES"] = "REPLACE_CHILD_NODES";
132
+ ModifyContentActionType["REPLACE_NEST_LIST"] = "REPLACE_NEST_LIST";
133
+ ModifyContentActionType["MERGE_TWO_BLOCKS_NODES"] = "MERGE_TWO_BLOCKS_NODES";
134
+ ModifyContentActionType["INSERT_NEW_PARAGRAPH"] = "INSERT_NEW_PARAGRAPH";
135
+ ModifyContentActionType["LINE_BREAK_SINGLE_BLOCK"] = "LINE_BREAK_SINGLE_BLOCK";
136
+ ModifyContentActionType["LINE_BREAK_MULTIPLE_BLOCKS"] = "LINE_BREAK_MULTIPLE_BLOCKS";
137
+ ModifyContentActionType["TRANSFORM_LIST_BLOCK"] = "TRANSFORM_LIST_BLOCK";
138
+ ModifyContentActionType["TRANSFORM_PARAGRAPH_BLOCK"] = "TRANSFORM_PARAGRAPH_BLOCK";
139
+ ModifyContentActionType["DELETE_BLOCK_CONTENT"] = "DELETE_BLOCK_CONTENT";
140
+ ModifyContentActionType["INSERT_IMAGE_TO_BLOCK"] = "INSERT_IMAGE_TO_BLOCK";
141
+ ModifyContentActionType["UPDATE_IMAGE_NODE_URL"] = "UPDATE_IMAGE_NODE_URL";
142
+ ModifyContentActionType["TRANSFORM_TO_CODE_BLOCK"] = "TRANSFORM_TO_CODE_BLOCK";
143
+ ModifyContentActionType["UPDATE_CODE_BLOCK"] = "UPDATE_CODE_BLOCK";
144
+ ModifyContentActionType["SWITCH_OUT_FROM_CODE_BLOCK"] = "SWITCH_OUT_FROM_CODE_BLOCK";
145
+ ModifyContentActionType["DELETE_CODE_BLOCK"] = "DELETE_CODE_BLOCK";
146
+ ModifyContentActionType["UNLINK_LINK_GROUP"] = "UNLINK_LINK_GROUP";
147
+ ModifyContentActionType["LINK_GROUP_NODE_SPLIT"] = "LINK_GROUP_NODE_SPLIT";
148
+ ModifyContentActionType["DELETE_LINK_GROUP"] = "DELETE_LINK_GROUP";
149
+ ModifyContentActionType["UPDATE_CURSOR_POSITION"] = "UPDATE_CURSOR_POSITION";
150
+ ModifyContentActionType["INSERT_TEXT_TO_DECORATOR_NODE"] = "INSERT_TEXT_TO_DECORATOR_NODE";
151
+ ModifyContentActionType["INSERT_NODE_TO_NEAREST_ROOT"] = "INSERT_NODE_TO_NEAREST_ROOT";
152
+ ModifyContentActionType["PASTE_CONTENT"] = "PASTE_CONTENT";
153
+ })(ModifyContentActionType || (ModifyContentActionType = {}));
154
+ /**
155
+ * Abstract class for update node content, delete node, insert node
156
+ */
157
+ class ModifyContentAction {
158
+ constructor() {
159
+ this.isFlushable = false;
160
+ }
161
+ }
162
+
163
+ /**
164
+ * Annotation to represent a link of grouped nodes
165
+ */
166
+ class LinkGroupAnnotation extends Annotation {
167
+ constructor(groupKey) {
168
+ super();
169
+ this.type = InternalAnnotationTypeEnum.LINK_GROUP;
170
+ this.linkGroups = new Map();
171
+ this.linkGroups = new Map([[groupKey, []]]);
172
+ }
173
+ /**
174
+ * Get the default standalone styles applied to a link by Vega's internal style.
175
+ * These are redundant when parsed back from standalone HTML and should be stripped.
176
+ *
177
+ * @returns {AnnotationStyle} The default styles.
178
+ */
179
+ static getDefaultStyles() {
180
+ return {
181
+ color: 'rgba(var(--v-text-link, 19, 98, 226, 1))',
182
+ };
183
+ }
184
+ clone() {
185
+ const clonedAnnotation = new LinkGroupAnnotation('');
186
+ this.linkGroups.forEach((nodes, key) => {
187
+ clonedAnnotation.linkGroups.set(key, nodes.map((node) => node.clone(node.parent)));
188
+ });
189
+ return clonedAnnotation;
190
+ }
191
+ /**
192
+ * Convert the custom style, class and attribute to string which html can used
193
+ *
194
+ * @param {linkAnnotation} linkAnnotation current link annotation which saved custom style, class and attribute.
195
+ * @param {RTERenderContext} options - options.
196
+ * @returns {string} - string.
197
+ */
198
+ toString(linkAnnotation, options) {
199
+ const attributes = this.toJsx(linkAnnotation, options);
200
+ return Object.entries(attributes)
201
+ .map(([key, value]) => {
202
+ const valueString = typeof value === 'string' ? value : this.formatStyleToString(value);
203
+ return `${camelToDashCase(key)}="${valueString}"`;
204
+ })
205
+ .join(' ');
206
+ }
207
+ /**
208
+ * Convert the custom style, class and attribute to JSX attributes
209
+ *
210
+ * @param {linkAnnotation} linkAnnotation current link annotation which saved custom style, class and attribute.
211
+ * @param {RTERenderContext} options - options.
212
+ * @returns {Record<string, string | AnnotationStyle>} JSX used attributes.
213
+ */
214
+ toJsx(linkAnnotation, options) {
215
+ const linkStyle = this.getStyle(linkAnnotation, options);
216
+ const linkClass = this.getClass(linkAnnotation, options);
217
+ const attributes = this.getAttribute(linkAnnotation);
218
+ if (linkClass.length > 0) {
219
+ attributes.class = linkClass.join(' ');
220
+ }
221
+ if (linkStyle && Object.keys(linkStyle).length > 0) {
222
+ attributes.style = linkStyle;
223
+ }
224
+ return attributes;
225
+ }
226
+ /**
227
+ * Get the custom class for the annotation
228
+ *
229
+ * @param {linkAnnotation} linkAnnotation current link annotation which saved custom style, class and attribute.
230
+ * @param {RTERenderContext} options - options.
231
+ * @returns {string[]} Link class
232
+ */
233
+ getClass(linkAnnotation, options) {
234
+ const linkClass = [];
235
+ if (linkAnnotation.link.customClass)
236
+ linkClass.push(...linkAnnotation.link.customClass);
237
+ if (!(options === null || options === void 0 ? void 0 : options.standalone) && linkAnnotation.useInternalStyle)
238
+ linkClass.push('v-rte--link');
239
+ return linkClass;
240
+ }
241
+ /**
242
+ * Get the custom style for the annotation
243
+ *
244
+ * @param {LinkAnnotation} linkAnnotation current link annotation which saved custom style, class and attribute.
245
+ * @param {RTERenderContext} options - options.
246
+ * @returns {AnnotationStyle} Link style
247
+ */
248
+ getStyle(linkAnnotation, options) {
249
+ const linkStyle = {};
250
+ if (linkAnnotation.link.customStyle)
251
+ Object.assign(linkStyle, linkAnnotation.link.customStyle);
252
+ if ((options === null || options === void 0 ? void 0 : options.standalone) && linkAnnotation.useInternalStyle) {
253
+ Object.assign(linkStyle, LinkGroupAnnotation.getDefaultStyles());
254
+ }
255
+ return linkStyle;
256
+ }
257
+ /**
258
+ * Get the custom attribute for the annotation
259
+ *
260
+ * @param {LinkAnnotation} linkAnnotation current link annotation which saved custom style, class and attribute.
261
+ * @returns {Record<string, string>} Link attributes
262
+ */
263
+ getAttribute(linkAnnotation) {
264
+ const { href, customAttribute = {} } = linkAnnotation.link;
265
+ const useInternalStyle = linkAnnotation.useInternalStyle;
266
+ const target = customAttribute.target || (useInternalStyle ? '_blank' : '');
267
+ return Object.assign(Object.assign(Object.assign({}, customAttribute), (href ? { href } : useInternalStyle ? { href } : {})), (target ? { target } : {}));
268
+ }
269
+ /**
270
+ * Convert style to string which can be used to html string.
271
+ *
272
+ * @param {AnnotationStyle} style Style object.
273
+ * @returns {string} Style string
274
+ */
275
+ formatStyleToString(style) {
276
+ return Object.entries(style)
277
+ .map(([key, value]) => `${camelToDashCase(key)}: ${value};`)
278
+ .join(' ');
279
+ }
280
+ }
281
+
282
+ /**
283
+ * Annotation to make block with horizontal alignment
284
+ */
285
+ class HorizontalAlignmentAnnotation extends BlockAnnotation {
286
+ constructor(textAlign) {
287
+ super();
288
+ this.type = BlockAnnotationTypeEnum.ALIGNMENT;
289
+ this.textAlign = textAlign;
290
+ }
291
+ /**
292
+ * Generate the map item for the annotation
293
+ *
294
+ * @param {VegaRTEBlockAlignment} textAlign - Text alignment
295
+ * @returns {[BlockAnnotationTypeEnum.ALIGNMENT, HorizontalAlignmentAnnotation]} Map item for the annotation
296
+ */
297
+ static from(textAlign) {
298
+ return [BlockAnnotationTypeEnum.ALIGNMENT, new HorizontalAlignmentAnnotation(textAlign)];
299
+ }
300
+ /**
301
+ * Get the default standalone styles for a given alignment value.
302
+ *
303
+ * @param {VegaRTEBlockAlignment} textAlign - The alignment value.
304
+ * @returns {AnnotationStyle} The default standalone styles.
305
+ */
306
+ static getDefaultStyles(textAlign) {
307
+ switch (textAlign) {
308
+ case 'right':
309
+ case 'center':
310
+ case 'justify':
311
+ return { textAlign };
312
+ case 'left':
313
+ default:
314
+ return { textAlign: 'left' };
315
+ }
316
+ }
317
+ /**
318
+ * Generate the JSON item of the annotation
319
+ *
320
+ * @returns {Record<string, unknown>} JSON representation of the annotation
321
+ */
322
+ toJSON() {
323
+ return {
324
+ textAlign: this.textAlign,
325
+ };
326
+ }
327
+ /**
328
+ * @inheritDoc
329
+ */
330
+ renderClass(options) {
331
+ if (options === null || options === void 0 ? void 0 : options.standalone)
332
+ return null;
333
+ switch (this.textAlign) {
334
+ case 'right':
335
+ case 'center':
336
+ case 'justify':
337
+ return `v-rte--horizontal-alignment-${this.textAlign}`;
338
+ case 'left':
339
+ default:
340
+ return `v-rte--horizontal-alignment-left`;
341
+ }
342
+ }
343
+ /**
344
+ * @inheritDoc
345
+ */
346
+ clone() {
347
+ return new HorizontalAlignmentAnnotation(this.textAlign);
348
+ }
349
+ /**
350
+ * @inheritDoc
351
+ */
352
+ renderStyle(options) {
353
+ if (!(options === null || options === void 0 ? void 0 : options.standalone))
354
+ return null;
355
+ return HorizontalAlignmentAnnotation.getDefaultStyles(this.textAlign);
356
+ }
357
+ }
358
+
359
+ /**
360
+ * Annotation for block indentation
361
+ */
362
+ class IndentAnnotation extends BlockAnnotation {
363
+ constructor(indent) {
364
+ super();
365
+ this.type = BlockAnnotationTypeEnum.INDENT;
366
+ this.indent = Math.max(0, indent);
367
+ }
368
+ /**
369
+ * Generate the map item for the annotation
370
+ *
371
+ * @param {number} indent - Text alignment
372
+ * @returns {[BlockAnnotationTypeEnum.INDENT, IndentAnnotation]} Map item for the annotation
373
+ */
374
+ static from(indent) {
375
+ return [BlockAnnotationTypeEnum.INDENT, new IndentAnnotation(indent)];
376
+ }
377
+ /**
378
+ * Generate the JSON item of the annotation
379
+ *
380
+ * @returns {Nullable<Record<string, unknown>>} JSON representation of the annotation
381
+ */
382
+ toJSON() {
383
+ return this.indent > 0 ? { indent: this.indent } : null;
384
+ }
385
+ /**
386
+ * @inheritDoc
387
+ */
388
+ clone() {
389
+ return new IndentAnnotation(this.indent);
390
+ }
391
+ /**
392
+ * @inheritDoc
393
+ */
394
+ renderClass() {
395
+ return null;
396
+ }
397
+ /**
398
+ * Generate the style for the annotation
399
+ *
400
+ * @returns {Nullable<AnnotationStyle>} - Annotation style
401
+ */
402
+ renderStyle() {
403
+ return this.indent > 0 ? { marginLeft: `${this.indent * 16}px` } : null;
404
+ }
405
+ }
406
+
407
+ /**
408
+ * Registry for action handler interceptors, which can register and retrieve interceptors for specific actions and targets.
409
+ */
410
+ class ActionHandlerInterceptorRegistry {
411
+ /**
412
+ * Bind a specific strategy to a special action type of the rich text node.
413
+ *
414
+ * @param {string} actionType - The special action type or the action class name.
415
+ * @param {string} targetClass - The rich text node class name.
416
+ * @param {ActionHandlerInterceptor} strategy - The action handle strategy instance.
417
+ */
418
+ static register(actionType, targetClass, strategy) {
419
+ if (!this.registry.has(targetClass)) {
420
+ this.registry.set(targetClass, new Map());
421
+ }
422
+ /* eslint-disable @typescript-eslint/no-non-null-assertion */
423
+ if (!this.registry.get(targetClass).has(actionType)) {
424
+ this.registry.get(targetClass).set(actionType, new Set());
425
+ }
426
+ this.registry.get(targetClass).get(actionType).add(strategy);
427
+ /* eslint-enable @typescript-eslint/no-non-null-assertion */
428
+ }
429
+ /**
430
+ * Unregister the strategy for the specific action type and target class.
431
+ *
432
+ * @param {string} actionType - The special action type or the action class name.
433
+ * @param {string} targetClass - The rich text node class name.
434
+ * @param {ActionHandlerInterceptor} strategy - The action handler interceptor instance.
435
+ */
436
+ static unregister(actionType, targetClass, strategy) {
437
+ const strategyMap = this.registry.get(targetClass);
438
+ if (strategyMap) {
439
+ const strategySet = strategyMap.get(actionType);
440
+ if (strategySet) {
441
+ strategySet.delete(strategy);
442
+ }
443
+ }
444
+ }
445
+ /**
446
+ * Get the special interceptor strategy that before handle the action logic.
447
+ *
448
+ * @typedef T generic type
449
+ * @typedef target generic type
450
+ * @param {RTEActionType} action - The special action .
451
+ * @param {string} targetClass - The rich text node class name.
452
+ * @returns {Nullable<ActionHandlerInterceptor<T, target>>} - The action handler interceptor instance or null if not found.
453
+ */
454
+ static get(action, targetClass) {
455
+ const targetClassName = targetClass.constructor.name;
456
+ const actionType = action instanceof ModifyContentAction ? action.type : action.constructor.name;
457
+ const strategyMap = this.registry.get(targetClassName);
458
+ if (strategyMap) {
459
+ const set = strategyMap.get(actionType);
460
+ if (set && set.size > 0) {
461
+ return Array.from(set).find((interceptor) => interceptor.canIntercept(action, targetClass));
462
+ }
463
+ }
464
+ }
465
+ }
466
+ ActionHandlerInterceptorRegistry.registry = new Map();
467
+
468
+ /**
469
+ * The strategies registry, contains static methods `register`, `get` and `getStrategyAndExecute`.
470
+ */
471
+ class ActionHandleStrategyRegistry {
472
+ /**
473
+ * Bind a specific strategy to a special action type of the rich text node.
474
+ *
475
+ * @param {string} actionType - The special action type or the action class name.
476
+ * @param {string} targetClass - The rich text node class name.
477
+ * @param {ActionHandleStrategy} strategy - The action handle strategy instance.
478
+ */
479
+ static register(actionType, targetClass, strategy) {
480
+ if (!this.registry.has(targetClass)) {
481
+ this.registry.set(targetClass, new Map());
482
+ }
483
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
484
+ this.registry.get(targetClass).set(actionType, strategy);
485
+ }
486
+ /**
487
+ * Unregister the strategy for the specific action type and target class.
488
+ *
489
+ * @param {string} actionType - The special action type or the action class name.
490
+ * @param {string} targetClass - The rich text node class name.
491
+ */
492
+ static unregister(actionType, targetClass) {
493
+ const strategyMap = this.registry.get(targetClass);
494
+ if (strategyMap) {
495
+ strategyMap.delete(actionType);
496
+ }
497
+ }
498
+ /**
499
+ * Get the special strategy that handle the action logic.
500
+ *
501
+ * @typedef T generic type
502
+ * @typedef target generic type
503
+ * @typedef R generic type
504
+ * @param {string} actionType - The special action type or the action class name.
505
+ * @param {string} targetClass - The rich text node class name.
506
+ * @returns {Nullable<ActionHandleStrategy<T, target, R>>} - The action handle strategy instance if defined.
507
+ */
508
+ static get(actionType, targetClass) {
509
+ const strategyMap = this.registry.get(targetClass);
510
+ if (strategyMap) {
511
+ return strategyMap.get(actionType);
512
+ }
513
+ }
514
+ /**
515
+ * Get the special strategy from the registry and run the strategy execute method.
516
+ *
517
+ * @typedef R generic type
518
+ * @param {ModifyContentAction | AnnotationAction} action - The update node action instance.
519
+ * @param {RTENode | RTEBlock | VegaRTEContent} RTEInstance - The rich text editor node.
520
+ * @returns {R | undefined} The return value of the strategy method execute invoke result.
521
+ */
522
+ static executeTheStrategy(action, RTEInstance) {
523
+ const interceptor = ActionHandlerInterceptorRegistry.get(action, RTEInstance);
524
+ // eslint-disable-next-line jsdoc/require-jsdoc
525
+ const executeStrategy = () => {
526
+ const actionType = action instanceof ModifyContentAction ? action.type : action.constructor.name;
527
+ const strategy = ActionHandleStrategyRegistry.get(actionType, RTEInstance.constructor.name);
528
+ if (strategy) {
529
+ action['executedFlag'] = true;
530
+ return strategy.execute(action, RTEInstance);
531
+ }
532
+ else {
533
+ LogUtility.warn(`Type ${actionType} action handle strategy is not registered in class ${RTEInstance.constructor.name}`);
534
+ }
535
+ };
536
+ if (interceptor) {
537
+ return interceptor.intercept(executeStrategy, action, RTEInstance);
538
+ }
539
+ else {
540
+ return executeStrategy();
541
+ }
542
+ }
543
+ /**
544
+ * Check if the action type can be handled by strategy for the specific RTE instance.
545
+ *
546
+ * @param {string} actionType - The special action type or the action class name.
547
+ * @param {RTENode | RTEBlock | VegaRTEContent} RTEInstance - The rich text editor node.
548
+ * @returns {boolean} - Whether the action type can be handled by the strategy.
549
+ */
550
+ static canHandle(actionType, RTEInstance) {
551
+ const strategy = ActionHandleStrategyRegistry.get(actionType, RTEInstance.constructor.name);
552
+ return strategy ? true : false;
553
+ }
554
+ }
555
+ ActionHandleStrategyRegistry.registry = new Map();
556
+
557
+ var CommonAnnotationTypeEnum;
558
+ (function (CommonAnnotationTypeEnum) {
559
+ CommonAnnotationTypeEnum["CUSTOM_ATTRIBUTE"] = "CUSTOM_ATTRIBUTE";
560
+ CommonAnnotationTypeEnum["CUSTOM_CLASS"] = "CUSTOM_CLASS";
561
+ CommonAnnotationTypeEnum["CUSTOM_STYLE"] = "CUSTOM_STYLE";
562
+ })(CommonAnnotationTypeEnum || (CommonAnnotationTypeEnum = {}));
563
+ /**
564
+ * CommonAnnotation is an abstract class that represents common annotation for block and node.
565
+ */
566
+ class CommonAnnotation extends Annotation {
567
+ }
568
+
569
+ /**
570
+ * Annotation to add custom attributes of element
571
+ */
572
+ class CustomAttributeAnnotation extends CommonAnnotation {
573
+ constructor(customAttribute) {
574
+ super();
575
+ this.type = CommonAnnotationTypeEnum.CUSTOM_ATTRIBUTE;
576
+ this.BOOLEAN_ATTRS = new Set([
577
+ 'controls',
578
+ 'disabled',
579
+ 'checked',
580
+ 'readonly',
581
+ 'multiple',
582
+ 'required',
583
+ 'autoplay',
584
+ 'muted',
585
+ ]);
586
+ this.customAttribute = customAttribute;
587
+ }
588
+ /**
589
+ * Generate the map item for the annotation
590
+ *
591
+ * @param {Record<string, string>} customizeAttribute - custom attribute annotation
592
+ * @returns {[CommonAnnotationTypeEnum.CUSTOM_ATTRIBUTE, CustomAttributeAnnotation]} Map item for the annotation
593
+ */
594
+ static from(customizeAttribute) {
595
+ return [CommonAnnotationTypeEnum.CUSTOM_ATTRIBUTE, new CustomAttributeAnnotation(customizeAttribute)];
596
+ }
597
+ /**
598
+ * Generate the JSON representation of the annotation
599
+ *
600
+ * @returns {Record<string, unknown>} JSON representation of the annotation
601
+ */
602
+ toJSON() {
603
+ return {
604
+ customAttribute: this.customAttribute,
605
+ };
606
+ }
607
+ /**
608
+ * Create a new custom attribute annotation
609
+ *
610
+ * @returns {CustomAttributeAnnotation} - Custom attribute annotation
611
+ */
612
+ clone() {
613
+ return new CustomAttributeAnnotation(this.customAttribute);
614
+ }
615
+ /**
616
+ * Generate the custom attribute of current element, excluding 'style' and 'class'
617
+ *
618
+ * @param {string[]} filterAttr - should filter these existed attrs
619
+ * @returns {string[]} - Custom attributes
620
+ */
621
+ toString(filterAttr = []) {
622
+ const filterAttrKeys = filterAttr.map((attr) => attr.split('=')[0]);
623
+ return Object.keys(this.customAttribute)
624
+ .map((key) => {
625
+ return !filterAttrKeys.includes(key) ? `${key}="${this.customAttribute[key]}"` : null;
626
+ })
627
+ .filter(isNonNullable);
628
+ }
629
+ /**
630
+ * Generate the custom attribute for the annotation
631
+ *
632
+ * @param {RTERenderCustomAttributes} options - should filter these certain attrs
633
+ * @returns {Record<string, string>} custom attribute
634
+ */
635
+ render(options = {}) {
636
+ var _a;
637
+ const customAttribute = Object.assign({}, this.customAttribute);
638
+ (_a = options.filterAttributes) === null || _a === void 0 ? void 0 : _a.forEach((attr) => delete customAttribute[attr]);
639
+ Object.keys(customAttribute).forEach((key) => {
640
+ if (this.BOOLEAN_ATTRS.has(key) && customAttribute[key] === '') {
641
+ customAttribute[key] = 'true';
642
+ }
643
+ });
644
+ return customAttribute;
645
+ }
646
+ }
647
+
648
+ /**
649
+ * Annotation to add custom class of element
650
+ */
651
+ class CustomClassAnnotation extends CommonAnnotation {
652
+ constructor(customClass) {
653
+ super();
654
+ this.type = CommonAnnotationTypeEnum.CUSTOM_CLASS;
655
+ this.customClass = customClass;
656
+ }
657
+ /**
658
+ * Generate the map item for the annotation
659
+ *
660
+ * @param {string[]} customClass - custom class annotation
661
+ * @returns {[CommonAnnotationTypeEnum.CUSTOM_CLASS, CustomClassAnnotation]} Map item for the annotation
662
+ */
663
+ static from(customClass) {
664
+ return [CommonAnnotationTypeEnum.CUSTOM_CLASS, new CustomClassAnnotation(customClass)];
665
+ }
666
+ /**
667
+ * Generate the JSON representation of the annotation
668
+ *
669
+ * @returns {Record<string, unknown>} JSON representation of the annotation
670
+ */
671
+ toJSON() {
672
+ return {
673
+ customClass: this.customClass,
674
+ };
675
+ }
676
+ /**
677
+ * Create a new custom class annotation
678
+ *
679
+ * @returns {CustomClassAnnotation} - Custom class annotation
680
+ */
681
+ clone() {
682
+ return new CustomClassAnnotation(this.customClass);
683
+ }
684
+ /**
685
+ * Generate the custom class of current element
686
+ *
687
+ * @returns {string} - Custom class
688
+ */
689
+ toString() {
690
+ return `class="${this.customClass.join(' ')}"`;
691
+ }
692
+ /**
693
+ * Generate the custom attribute for the annotation
694
+ *
695
+ * @returns {string[]} custom classes
696
+ */
697
+ renderClass() {
698
+ return this.customClass;
699
+ }
700
+ }
701
+
702
+ /**
703
+ * Annotation to add custom attributes of element
704
+ */
705
+ class CustomStyleAnnotation extends CommonAnnotation {
706
+ constructor(customStyle) {
707
+ super();
708
+ this.type = CommonAnnotationTypeEnum.CUSTOM_STYLE;
709
+ this.customStyle = customStyle;
710
+ }
711
+ /**
712
+ * Generate the map item for the annotation
713
+ *
714
+ * @param {AnnotationStyle} customStyle - custom attribute annotation
715
+ * @returns {[CommonAnnotationTypeEnum.CUSTOM_STYLE, CustomStyleAnnotation]} Map item for the annotation
716
+ */
717
+ static from(customStyle) {
718
+ return [CommonAnnotationTypeEnum.CUSTOM_STYLE, new CustomStyleAnnotation(customStyle)];
719
+ }
720
+ /**
721
+ * Generate the JSON representation of the annotation
722
+ *
723
+ * @returns {Record<string, unknown>} JSON representation of the annotation
724
+ */
725
+ toJSON() {
726
+ return {
727
+ customStyle: this.customStyle,
728
+ };
729
+ }
730
+ /**
731
+ * Create a new custom attribute annotation
732
+ *
733
+ * @returns {CustomStyleAnnotation} - Custom attribute annotation
734
+ */
735
+ clone() {
736
+ return new CustomStyleAnnotation(this.customStyle);
737
+ }
738
+ /**
739
+ * Generate the custom attribute for the annotation
740
+ *
741
+ * @returns {AnnotationStyle} custom attribute
742
+ */
743
+ renderStyle() {
744
+ return this.customStyle;
745
+ }
746
+ /**
747
+ * Remove the style
748
+ *
749
+ * @param {string[]} styleKeys - custom attribute annotation
750
+ * @returns {AnnotationStyle} Map item for the annotation
751
+ */
752
+ removeStyles(styleKeys) {
753
+ const customStyle = Object.assign({}, this.customStyle);
754
+ styleKeys.forEach((item) => delete customStyle[item]);
755
+ return customStyle;
756
+ }
757
+ /**
758
+ * Generate the custom style string for the annotation
759
+ *
760
+ * @returns {string} custom style string
761
+ */
762
+ toString() {
763
+ return `style="${Object.entries(this.customStyle)
764
+ .map(([key, value]) => `${key}: ${value};`)
765
+ .join(' ')}"`;
766
+ }
767
+ }
768
+
769
+ /**
770
+ * Internal wrapper annotation for block node.
771
+ */
772
+ class InternalWrapperAnnotation extends BlockAnnotation {
773
+ constructor(internalWrapper) {
774
+ super();
775
+ this.type = BlockAnnotationTypeEnum.INTERNAL_WRAPPER;
776
+ this.internalWrapper = internalWrapper;
777
+ }
778
+ /**
779
+ * @inheritDoc
780
+ */
781
+ static from(internalWrapper) {
782
+ return [BlockAnnotationTypeEnum.INTERNAL_WRAPPER, new InternalWrapperAnnotation(internalWrapper)];
783
+ }
784
+ /**
785
+ * @inheritDoc
786
+ */
787
+ clone() {
788
+ return new InternalWrapperAnnotation(this.internalWrapper);
789
+ }
790
+ /**
791
+ * @inheritDoc
792
+ */
793
+ renderClass() {
794
+ return undefined;
795
+ }
796
+ /**
797
+ * @inheritDoc
798
+ */
799
+ renderStyle() {
800
+ return undefined;
801
+ }
802
+ /**
803
+ * @inheritDoc
804
+ */
805
+ toJSON() {
806
+ return this.internalWrapper ? { internalWrapper: this.internalWrapper } : undefined;
807
+ }
808
+ }
809
+
810
+ var NodeAnnotationTypeEnum;
811
+ (function (NodeAnnotationTypeEnum) {
812
+ NodeAnnotationTypeEnum["BOLD"] = "BOLD";
813
+ NodeAnnotationTypeEnum["ITALIC"] = "ITALIC";
814
+ NodeAnnotationTypeEnum["UNDERLINE"] = "UNDERLINE";
815
+ NodeAnnotationTypeEnum["STRIKETHROUGH"] = "STRIKETHROUGH";
816
+ NodeAnnotationTypeEnum["SELECTION_RANGE"] = "SELECTION_RANGE";
817
+ NodeAnnotationTypeEnum["IMAGE"] = "IMAGE";
818
+ NodeAnnotationTypeEnum["CODE"] = "CODE";
819
+ NodeAnnotationTypeEnum["TEXT_COLOR"] = "TEXT_COLOR";
820
+ NodeAnnotationTypeEnum["LINK"] = "LINK";
821
+ NodeAnnotationTypeEnum["INLINE_HTML"] = "INLINE_HTML";
822
+ NodeAnnotationTypeEnum["PLAIN_TEXT"] = "PLAIN_TEXT";
823
+ })(NodeAnnotationTypeEnum || (NodeAnnotationTypeEnum = {}));
824
+ /**
825
+ * Abstract class for all annotations
826
+ */
827
+ class NodeAnnotation extends Annotation {
828
+ }
829
+
830
+ /**
831
+ * Class to handle the style representation of annotations for RTE blocks and nodes.
832
+ */
833
+ class RTEAnnotationStyle {
834
+ constructor(dto) {
835
+ this.dtoType = dto instanceof RTEBlock ? 'block' : 'node';
836
+ this.annotationMap = dto.annotationMap;
837
+ }
838
+ /**
839
+ * Convert an AnnotationStyle object to a CSS text string.
840
+ *
841
+ * @param {RTERenderContext} options - Rendering context options.
842
+ * @param {string[]} canMergeKeyList - List of style keys that can be merged by concatenation.
843
+ * @param {Nullable<AnnotationStyle>} annotationStyle - The annotation style object, if null, get from toJSON().
844
+ * @returns {string} A string representing the CSS text.
845
+ */
846
+ toCssText(options = { standalone: false }, canMergeKeyList, annotationStyle) {
847
+ annotationStyle = annotationStyle ? annotationStyle : this.toJSON(options, canMergeKeyList);
848
+ return Object.entries(Object.assign({}, annotationStyle))
849
+ .map(([key, value]) => `${camelToDashCase(key)}: ${value};`)
850
+ .join('');
851
+ }
852
+ /**
853
+ * Convert the annotation map to a JSON representation.
854
+ *
855
+ * @param {RTERenderContext} options - Rendering context options.
856
+ * @param {string[]} canMergeKeyList - List of style keys that can be merged by concatenation.
857
+ * @returns {AnnotationStyle} - The JSON representation of the annotation styles.
858
+ */
859
+ toJSON(options = { standalone: false }, canMergeKeyList) {
860
+ const styles = Array.from(this.annotationMap.values())
861
+ .filter((annotation) => this.filterAnnotation(annotation) || annotation instanceof CustomStyleAnnotation)
862
+ .map((annotation) => annotation.renderStyle(options))
863
+ .filter(isNonNullable);
864
+ if (canMergeKeyList && canMergeKeyList.length > 0) {
865
+ return this.mergeAnnotationStyles(styles, canMergeKeyList);
866
+ }
867
+ else {
868
+ return styles.reduce((current, obj) => (Object.assign(Object.assign({}, current), obj)), {});
869
+ }
870
+ }
871
+ /**
872
+ * Filter annotations based on whether they are block or node annotations.
873
+ *
874
+ * @param {RTENodeAnnotationMapValue | RTEBlockAnnotationMapValue} annotation - The annotation to filter.
875
+ * @returns {boolean} - True if the annotation matches the DTO type, false otherwise.
876
+ */
877
+ filterAnnotation(annotation) {
878
+ return this.dtoType === 'block'
879
+ ? annotation instanceof BlockAnnotation
880
+ : annotation instanceof NodeAnnotation;
881
+ }
882
+ /**
883
+ * Merge an array of annotation styles into a single style object.
884
+ * e.g.,
885
+ * { textDecoration: 'underline', textDecoration: 'line-through' }
886
+ * -> { textDecoration: 'underline line-through' }
887
+ *
888
+ * @param {AnnotationStyle[]} styles - Array of annotation style objects to merge.
889
+ * @param {string[]} canMergeKeyList - List of style keys that can be merged by concatenation.
890
+ * @returns {AnnotationStyle} - The merged annotation style object.
891
+ */
892
+ mergeAnnotationStyles(styles, canMergeKeyList) {
893
+ const merged = {};
894
+ for (const style of styles) {
895
+ for (const key in style) {
896
+ const value = style[key];
897
+ const existing = merged[key];
898
+ if (typeof existing === 'string' &&
899
+ typeof value === 'string' &&
900
+ canMergeKeyList.includes(key)) {
901
+ merged[key] = Array.from(new Set(`${existing} ${value}`.split(/\s+/).filter(Boolean))).join(' ');
902
+ }
903
+ else {
904
+ merged[key] = value;
905
+ }
906
+ }
907
+ }
908
+ return merged;
909
+ }
910
+ }
911
+
912
+ var NodeTypeEnum;
913
+ (function (NodeTypeEnum) {
914
+ NodeTypeEnum["TEXT"] = "TEXT";
915
+ NodeTypeEnum["IMAGE"] = "IMAGE";
916
+ NodeTypeEnum["CODE_BLOCK_NODE"] = "CODE_BLOCK_NODE";
917
+ })(NodeTypeEnum || (NodeTypeEnum = {}));
918
+ /**
919
+ * Abstract class for all nodes
920
+ */
921
+ class RTENode {
922
+ constructor(id, annotationMap) {
923
+ this.annotationMap = new Map();
924
+ this.id = id;
925
+ if (annotationMap) {
926
+ this.annotationMap = annotationMap;
927
+ }
928
+ }
929
+ /**
930
+ * Creates a new instance of the RTENode from the given JSON data.
931
+ *
932
+ * @param {unknown} json - The JSON data to create the node from.
933
+ * @param {RTEBlock} parentBlock - The parent block of the node.
934
+ * @param {VegaRTETransformOptions} options - Options for transforming the node.
935
+ */
936
+ static from(json, parentBlock, options) {
937
+ throw new Error(`[Vega] ${this.constructor.name}.from(${JSON.stringify(json)}, ${parentBlock}, ${options}) is not implemented. Please implement this method in the subclass.`);
938
+ }
939
+ /**
940
+ * Creates different types of text annotations based on the provided type and value.
941
+ *
942
+ * @param {keyof VegaRTETextAnnotations} type - The key of the type.
943
+ * @param {unknown} value - The value that will be used to create the specific type of annotation entity based on the `type` provided.
944
+ * @returns {Nullable<[RTENodeAnnotationMapKey, RTENodeAnnotationMapValue]>} Returning a nullable tuple containing a key and a
945
+ * value from the `RTENodeAnnotationMapKey` and `RTENodeAnnotationMapValue` types.
946
+ */
947
+ static createAnnotationEntity(type, value) {
948
+ switch (type) {
949
+ case 'customAttribute':
950
+ return CustomAttributeAnnotation.from(value);
951
+ case 'customClass':
952
+ return CustomClassAnnotation.from(value);
953
+ case 'customStyle':
954
+ return CustomStyleAnnotation.from(value);
955
+ }
956
+ }
957
+ /**
958
+ * Get annotation by type
959
+ *
960
+ * @typedef T generic type
961
+ * @param {RTENodeAnnotationMapKey} type - Annotation type
962
+ * @returns {Nullable<T>} - Annotation
963
+ */
964
+ getAnnotationByType(type) {
965
+ return this.annotationMap.get(type);
966
+ }
967
+ /**
968
+ * Delete annotation by type
969
+ *
970
+ * @param {RTENodeAnnotationMapKey} type - Annotation type
971
+ */
972
+ deleteAnnotationByType(type) {
973
+ this.annotationMap.delete(type);
974
+ this.flushChange();
975
+ }
976
+ /**
977
+ * Apply action to node
978
+ *
979
+ * @param {AnnotationAction} action - Annotation action
980
+ * @returns {this} - Node
981
+ */
982
+ apply(action) {
983
+ this.doApply(action);
984
+ if (action.isFlushable) {
985
+ this.flushChange();
986
+ }
987
+ return this;
988
+ }
989
+ /**
990
+ * Get styles from annotations
991
+ *
992
+ * @param {RTERenderContext} [options={ standalone: false }] - Options to control style mode
993
+ * @returns {AnnotationStyle} - Annotation styles
994
+ */
995
+ getStyles(options = { standalone: false }) {
996
+ const rteAnnotationStyle = new RTEAnnotationStyle(this);
997
+ return rteAnnotationStyle.toJSON(options, ['textDecoration']);
998
+ }
999
+ /**
1000
+ * Get classes from annotations
1001
+ *
1002
+ * @param {RTERenderContext} [options={ standalone: false }] - Options to control style mode
1003
+ * @returns {string} - Annotation style
1004
+ */
1005
+ getClasses(options = { standalone: false }) {
1006
+ return Array.from(this.annotationMap.values())
1007
+ .filter((annotation) => annotation instanceof NodeAnnotation || annotation instanceof CustomClassAnnotation)
1008
+ .map((annotation) => annotation.renderClass(options))
1009
+ .filter(isNonNullable)
1010
+ .reduce((pre, cur) => [pre, cur].join(' ').trim(), '');
1011
+ }
1012
+ /**
1013
+ * Get custom attribute annotation, excluding "class" and "style"
1014
+ *
1015
+ * @returns {CustomAttributeAnnotation} - custom attribute annotation
1016
+ */
1017
+ getCustomAttributesAnnotation() {
1018
+ return this.annotationMap.get(CommonAnnotationTypeEnum.CUSTOM_ATTRIBUTE);
1019
+ }
1020
+ /**
1021
+ * Check if the node is a text node.
1022
+ *
1023
+ * @returns {boolean} - True if the node is a text node, false otherwise.
1024
+ */
1025
+ isTextNode() {
1026
+ return false;
1027
+ }
1028
+ /**
1029
+ * Get the HTMLElement reference associated with this node.
1030
+ *
1031
+ * @returns {Nullable<HTMLElement>} The HTMLElement reference or null if not found.
1032
+ */
1033
+ getElementRef() {
1034
+ return stateEntityRenderingRegistry.getDOMByEntity(this);
1035
+ }
1036
+ /**
1037
+ * Generate attributes as string
1038
+ *
1039
+ * @param {...string} attrs - Additional attributes to include
1040
+ * @returns {string} - Attributes as string
1041
+ */
1042
+ generateAttributeString(...attrs) {
1043
+ var _a;
1044
+ const nodeAnnotationStyle = new RTEAnnotationStyle(this);
1045
+ const styles = nodeAnnotationStyle.toCssText({ standalone: true }, [
1046
+ 'textDecoration',
1047
+ ]);
1048
+ const customClassAnnotation = this.annotationMap.get(CommonAnnotationTypeEnum.CUSTOM_CLASS);
1049
+ const customAttributeString = ((_a = this.getCustomAttributesAnnotation()) === null || _a === void 0 ? void 0 : _a.toString(attrs)) || [];
1050
+ const attributes = [
1051
+ ...customAttributeString,
1052
+ customClassAnnotation === null || customClassAnnotation === void 0 ? void 0 : customClassAnnotation.toString(),
1053
+ styles ? `style="${styles}"` : null,
1054
+ ...attrs,
1055
+ ].filter(isNonNullable);
1056
+ return attributes.length ? ` ${attributes.join(' ')}` : '';
1057
+ }
1058
+ /**
1059
+ * apply annotation action or modify content action
1060
+ *
1061
+ * @param {AnnotationAction | ModifyContentAction} action annotation type action or modify content type action
1062
+ */
1063
+ doApply(action) {
1064
+ if (action instanceof ModifyContentAction) {
1065
+ this.doModifyActionApply(action);
1066
+ }
1067
+ else {
1068
+ this.doAnnotationActionApply(action);
1069
+ }
1070
+ }
1071
+ /**
1072
+ * Flush the value change
1073
+ */
1074
+ flushChange() {
1075
+ const domNode = stateEntityRenderingRegistry.getDOMByEntity(this);
1076
+ if (domNode) {
1077
+ const nodeSubject = domNodeSubjectFactory.getSubjectFromParentNodeByEventId(domNode, VegaInternalRichTextEditorFlushChanges);
1078
+ if (nodeSubject) {
1079
+ ChangeManager.notify(nodeSubject, {});
1080
+ }
1081
+ }
1082
+ }
1083
+ /**
1084
+ * Clones the annotations of the current RTETextNode.
1085
+ *
1086
+ * @returns {NodeAnnotations} A new Map containing cloned annotations.
1087
+ */
1088
+ cloneAnnotations() {
1089
+ return new Map(Array.from(this.annotationMap.entries()).map(([key, value]) => [key, value.clone()]));
1090
+ }
1091
+ /* istanbul ignore next */
1092
+ /**
1093
+ * Placeholder for the method to be implemented in sub classes.
1094
+ *
1095
+ * @param {AnnotationAction} action Annotation action
1096
+ */
1097
+ doAnnotationActionApply(action) {
1098
+ }
1099
+ /* istanbul ignore next */
1100
+ /**
1101
+ * Placeholder for the method to be implemented in sub classes.
1102
+ *
1103
+ * @param {ModifyContentAction} action ModifyContentAction
1104
+ */
1105
+ doModifyActionApply(action) {
1106
+ }
1107
+ }
1108
+
1109
+ /**
1110
+ * RTEDTOClassManager is a singleton class that manages the registration and retrieval of RTE DTO classes.
1111
+ * It allows for the dynamic handling of different RTE blocks and nodes by their types.
1112
+ */
1113
+ class RTEDTOClassManager {
1114
+ constructor() {
1115
+ // Register RTE Block DTO classes.
1116
+ this.RTE_BLOCK_DTO_CLASS_MAP = new Map();
1117
+ // Register RTE Block DTO classes.
1118
+ this.RTE_NODE_DTO_CLASS_MAP = new Map();
1119
+ }
1120
+ /**
1121
+ * Registers a new RTE DTO class.
1122
+ *
1123
+ * @typedef T - The type of the RTE DTO class to register.
1124
+ * @param {string} type - The type identifier for the RTE DTO class.
1125
+ * @param {ClassType<T>} RTEDTOClass - The class constructor for the RTE DTO.
1126
+ */
1127
+ registerRTEDTOClass(type, RTEDTOClass) {
1128
+ if (RTEDTOClass.prototype instanceof RTEBlock) {
1129
+ this.RTE_BLOCK_DTO_CLASS_MAP.set(type, RTEDTOClass);
1130
+ }
1131
+ else if (RTEDTOClass.prototype instanceof RTENode) {
1132
+ this.RTE_NODE_DTO_CLASS_MAP.set(type, RTEDTOClass);
1133
+ }
1134
+ else {
1135
+ throw new Error(`Invalid RTE DTO class type: ${type}`);
1136
+ }
1137
+ }
1138
+ /**
1139
+ * Retrieves the RTE block class for a given type.
1140
+ *
1141
+ * @param {string} type - The type identifier for the RTE block.
1142
+ * @returns {Nullable<RTEBlockDTOClass>} - The class constructor for the RTE block, or null if not found.
1143
+ */
1144
+ getRTEBlockClass(type) {
1145
+ return this.RTE_BLOCK_DTO_CLASS_MAP.get(type);
1146
+ }
1147
+ /**
1148
+ * Retrieves the RTE node class for a given type.
1149
+ *
1150
+ * @param {string} type - The type identifier for the RTE node.
1151
+ * @returns {Nullable<RTENodeDTOClass>} - The class constructor for the RTE node, or null if not found.
1152
+ */
1153
+ getRTENodeClass(type) {
1154
+ return this.RTE_NODE_DTO_CLASS_MAP.get(type);
1155
+ }
1156
+ }
1157
+ const RTEDTOClassManager$1 = new RTEDTOClassManager();
1158
+
1159
+ /**
1160
+ * Abstract class for block
1161
+ */
1162
+ class RTEBlock {
1163
+ constructor(id) {
1164
+ this.annotationMap = new Map();
1165
+ this.id = id;
1166
+ }
1167
+ /**
1168
+ * Creates a new instance of the block from the given JSON object.
1169
+ *
1170
+ * @param {unknown} json - The JSON object to create the block from.
1171
+ * @param {VegaRTETransformOptions} options - Options for transforming the block.
1172
+ */
1173
+ static from(json, options) {
1174
+ throw new Error(`[Vega] ${this.constructor.name}.from(${JSON.stringify(json)}, ${options}) is not implemented. Please implement this method in the subclass.`);
1175
+ }
1176
+ /**
1177
+ * Generates block children from an array of VegaRTEContentBlock.
1178
+ *
1179
+ * @param {VegaRTEContentBlock[]} blockArray - The array of VegaRTEContentBlock to generate children from.
1180
+ * @param {VegaRTETransformOptions} [options] - Optional transformation options.
1181
+ * @param {VegaRTEContent | RTEBlock} [parentBlock] - Optional parent block.
1182
+ * @returns {RTEBlock[]} An array of generated RTEBlock children.
1183
+ */
1184
+ static generateBlockChildren(blockArray, options, parentBlock) {
1185
+ return blockArray
1186
+ .map((child) => {
1187
+ const BlockClass = RTEDTOClassManager$1.getRTEBlockClass(child.type);
1188
+ if (BlockClass) {
1189
+ const block = BlockClass.from(child, options);
1190
+ block.parent = parentBlock;
1191
+ return block;
1192
+ }
1193
+ })
1194
+ .filter(isNonNullable);
1195
+ }
1196
+ /**
1197
+ * The function `createAnnotationEntity` creates a block annotation entity based on the provided type
1198
+ * and value.
1199
+ *
1200
+ * @param {keyof VegaRTEBlockAnnotations} type - The `type` parameter is a key of the `VegaRTEBlockAnnotations` enum, which specifies
1201
+ * the type of annotation entity to create.
1202
+ * @param {unknown} value - The `value` parameter in the `createAnnotationEntity` function is the value
1203
+ * that will be used to create the annotation entity. It can be of any type depending on the specific
1204
+ * annotation being created.
1205
+ * @returns {Nullable<BlockAnnotationsEntity>} The `createAnnotationEntity` function returns a nullable tuple containing a
1206
+ * `BlockAnnotationTypeEnum` and a `BlockAnnotation` object.
1207
+ */
1208
+ static createAnnotationEntity(type, value) {
1209
+ switch (type) {
1210
+ case 'textAlign':
1211
+ return HorizontalAlignmentAnnotation.from(value);
1212
+ case 'indent':
1213
+ return IndentAnnotation.from(value);
1214
+ case 'customAttribute':
1215
+ return CustomAttributeAnnotation.from(value);
1216
+ case 'customClass':
1217
+ return CustomClassAnnotation.from(value);
1218
+ case 'customStyle':
1219
+ return CustomStyleAnnotation.from(value);
1220
+ case 'internalWrapper':
1221
+ return InternalWrapperAnnotation.from(value);
1222
+ }
1223
+ }
1224
+ /**
1225
+ * Converts annotations to an array of block annotation entities.
1226
+ *
1227
+ * @param {BlockAnnotations} annotationMap - The map to store the converted annotations.
1228
+ * @param {VegaRTEBlockAnnotations} annotations - The annotations to convert.
1229
+ */
1230
+ static convertAnnotationsToMap(annotationMap, annotations) {
1231
+ Object.entries(annotations).forEach(([type, value]) => {
1232
+ const item = this.createAnnotationEntity(type, value);
1233
+ if (isNonNullable(item)) {
1234
+ annotationMap.set(...item);
1235
+ }
1236
+ });
1237
+ }
1238
+ /**
1239
+ * Check if the block should be rendered as a wrapper.
1240
+ *
1241
+ * @returns {boolean} - Returns true if the block is an internal wrapper.
1242
+ */
1243
+ shouldRenderAsInternalWrapper() {
1244
+ const internalWrapperAnnotation = this.getAnnotationByType(BlockAnnotationTypeEnum.INTERNAL_WRAPPER);
1245
+ if (internalWrapperAnnotation) {
1246
+ return (internalWrapperAnnotation.internalWrapper &&
1247
+ Array.from(this.annotationMap.values()).filter((annotation) => !(annotation instanceof LinkGroupAnnotation) &&
1248
+ !(annotation instanceof InternalWrapperAnnotation)).length === 0);
1249
+ }
1250
+ else {
1251
+ return false;
1252
+ }
1253
+ }
1254
+ /**
1255
+ * Class to JSON object
1256
+ *
1257
+ * @returns {VegaRTEBlockBase} - JSON object
1258
+ */
1259
+ toJSON() {
1260
+ const annotations = Array.from(this.annotationMap.values())
1261
+ .filter((annotation) => annotation instanceof BlockAnnotation || annotation instanceof CommonAnnotation)
1262
+ .reduce((record, annotation) => {
1263
+ return Object.assign(Object.assign({}, record), annotation.toJSON());
1264
+ }, {});
1265
+ return Object.assign({ id: this.id }, (Object.keys(annotations).length > 0 ? { annotations } : {}));
1266
+ }
1267
+ /**
1268
+ * Get annotation by type
1269
+ *
1270
+ * @typedef T generic type
1271
+ * @param {string} type - Annotation type
1272
+ * @returns {Nullable<T>} - Annotation
1273
+ */
1274
+ getAnnotationByType(type) {
1275
+ return this.annotationMap.get(type);
1276
+ }
1277
+ /**
1278
+ * Apply action to block
1279
+ *
1280
+ * @param {AnnotationAction} action - Annotation action
1281
+ */
1282
+ apply(action) {
1283
+ this.doApply(action);
1284
+ if (action.isFlushable) {
1285
+ const domNode = stateEntityRenderingRegistry.getDOMByEntity(this);
1286
+ if (domNode) {
1287
+ const nodeSubject = domNodeSubjectFactory.getSubjectFromParentNodeByEventId(domNode, VegaInternalRichTextEditorFlushChanges);
1288
+ if (nodeSubject) {
1289
+ ChangeManager.notify(nodeSubject, {});
1290
+ }
1291
+ }
1292
+ }
1293
+ }
1294
+ /**
1295
+ * Get the first node of the block
1296
+ *
1297
+ * @returns {Nullable<RTENode>} The first RTENode or null if no children exist.
1298
+ */
1299
+ getFirstNode() {
1300
+ if (!this.children || !this.children[0])
1301
+ return null;
1302
+ const firstItem = this.children[0];
1303
+ if (firstItem instanceof RTEBlock) {
1304
+ return firstItem.getFirstNode();
1305
+ }
1306
+ return firstItem;
1307
+ }
1308
+ /**
1309
+ * Check if the block is a list item block
1310
+ *
1311
+ * @returns {boolean} True if the block is a list item block, false otherwise.
1312
+ */
1313
+ isListItemBlock() {
1314
+ return this.type === 'list-item';
1315
+ }
1316
+ /**
1317
+ * Get styles from annotations
1318
+ *
1319
+ * @param {RTERenderContext} [options={ standalone: false }] - Options to control style mode
1320
+ * @returns {AnnotationStyle} - Annotation styles
1321
+ */
1322
+ getStyles(options = { standalone: false }) {
1323
+ const rteAnnotationStyle = new RTEAnnotationStyle(this);
1324
+ const blockAnnotationStyle = rteAnnotationStyle.toJSON(options);
1325
+ return Object.assign(Object.assign({}, blockAnnotationStyle), (this.shouldRenderAsInternalWrapper() ? { display: 'contents' } : {}));
1326
+ }
1327
+ /**
1328
+ * Get classes from annotations
1329
+ *
1330
+ * @param {RTERenderContext} [options={ standalone: false }] - Options to control standalone mode
1331
+ * @returns {string} - Annotation style
1332
+ */
1333
+ getClasses(options = { standalone: false }) {
1334
+ return Array.from(this.annotationMap.values())
1335
+ .filter((annotation) => annotation instanceof BlockAnnotation || annotation instanceof CustomClassAnnotation)
1336
+ .map((annotation) => annotation.renderClass(options))
1337
+ .filter(isNonNullable)
1338
+ .reduce((pre, cur) => [pre, cur].join(' ').trim(), '');
1339
+ }
1340
+ /**
1341
+ * Get custom attribute annotation, excluding "class" and "style"
1342
+ *
1343
+ * @returns {Nullable<CustomAttributeAnnotation>} - custom attribute annotation
1344
+ */
1345
+ getCustomAttributesAnnotation() {
1346
+ return this.annotationMap.get(CommonAnnotationTypeEnum.CUSTOM_ATTRIBUTE);
1347
+ }
1348
+ /**
1349
+ * Generate attributes as string
1350
+ *
1351
+ * @param {...string} attrs - Additional attributes to include
1352
+ * @returns {string} - Attributes as string
1353
+ */
1354
+ generateAttributeString(...attrs) {
1355
+ var _a;
1356
+ const blockAnnotationStyle = new RTEAnnotationStyle(this);
1357
+ const styles = blockAnnotationStyle.toCssText({ standalone: true });
1358
+ const customClassAnnotation = this.annotationMap.get(CommonAnnotationTypeEnum.CUSTOM_CLASS);
1359
+ const customAttributeString = ((_a = this.getCustomAttributesAnnotation()) === null || _a === void 0 ? void 0 : _a.toString(attrs)) || [];
1360
+ const attributes = [
1361
+ ...customAttributeString,
1362
+ customClassAnnotation === null || customClassAnnotation === void 0 ? void 0 : customClassAnnotation.toString(),
1363
+ styles ? `style="${styles}"` : null,
1364
+ ...attrs,
1365
+ ].filter(isNonNullable);
1366
+ return attributes.length ? ` ${attributes.join(' ')}` : '';
1367
+ }
1368
+ /**
1369
+ * Apply action to block
1370
+ *
1371
+ * @param {AnnotationAction|ModifyContentAction} action - Annotation action
1372
+ */
1373
+ doApply(action) {
1374
+ if (action instanceof ModifyContentAction) {
1375
+ ActionHandleStrategyRegistry.executeTheStrategy(action, this);
1376
+ }
1377
+ else {
1378
+ this.applyAnnotationAction(action);
1379
+ }
1380
+ }
1381
+ /**
1382
+ * Apply annotation action to block
1383
+ *
1384
+ * @param {AnnotationAction} action - Annotation action
1385
+ */
1386
+ applyAnnotationAction(action) {
1387
+ const annotation = action.toAnnotation();
1388
+ if (!(annotation instanceof LinkGroupAnnotation)) {
1389
+ this.annotationMap.set(annotation.type, annotation);
1390
+ }
1391
+ if (typeof this.doAnnotationActionApply === 'function') {
1392
+ this.doAnnotationActionApply(action);
1393
+ }
1394
+ else {
1395
+ const strategy = ActionHandleStrategyRegistry.get(action.constructor.name, this.constructor.name);
1396
+ if (strategy) {
1397
+ strategy.execute(action, this);
1398
+ }
1399
+ }
1400
+ }
1401
+ /**
1402
+ * clone annotations of the block
1403
+ *
1404
+ * @returns {BlockAnnotations} - Cloned annotations
1405
+ */
1406
+ cloneAnnotations() {
1407
+ return new Map(Array.from(this.annotationMap.entries()).map(([key, value]) => [key, value.clone()]));
1408
+ }
1409
+ }
1410
+
1411
+ /**
1412
+ * Abstract class for annotation actions
1413
+ */
1414
+ class AnnotationAction {
1415
+ }
1416
+
1417
+ /**
1418
+ * Abstract class for which can be splittable
1419
+ */
1420
+ class TextSplittableAction extends AnnotationAction {
1421
+ constructor() {
1422
+ super(...arguments);
1423
+ /**
1424
+ * Whether the action should split the node
1425
+ */
1426
+ this.doSplit = true;
1427
+ }
1428
+ }
1429
+
1430
+ /**
1431
+ * Annotation to represent a selection range
1432
+ */
1433
+ class SelectionRangeAnnotation extends Annotation {
1434
+ constructor(range) {
1435
+ super();
1436
+ this.type = InternalAnnotationTypeEnum.SELECTION_RANGE;
1437
+ this.range = range;
1438
+ }
1439
+ /**
1440
+ * Clone the selection range annotation
1441
+ *
1442
+ * @returns {SelectionRangeAnnotation} A cloned instance of the selection range annotation
1443
+ */
1444
+ clone() {
1445
+ return new SelectionRangeAnnotation(this.range);
1446
+ }
1447
+ }
1448
+
1449
+ /**
1450
+ * Default CSS style values produced by inline text-formatting annotations.
1451
+ *
1452
+ * These constants are the single source of truth for the CSS values that
1453
+ * bold, italic, underline and strikethrough semantic annotations render as
1454
+ * (in standalone mode) and that annotation handlers / filter strategies use
1455
+ * to detect or remove redundant inline styles.
1456
+ */
1457
+ /** CSS `font-weight` value rendered by the bold annotation. */
1458
+ const BOLD_FONT_WEIGHT = '700';
1459
+ /** Alternative `font-weight` keyword that browsers report for bold elements. */
1460
+ const BOLD_FONT_WEIGHT_KEYWORD = 'bold';
1461
+ /** CSS `font-style` value rendered by the italic annotation. */
1462
+ const ITALIC_FONT_STYLE = 'italic';
1463
+ /** CSS `text-decoration` token rendered by the underline annotation. */
1464
+ const UNDERLINE_TEXT_DECORATION = 'underline';
1465
+ /** CSS `text-decoration` token rendered by the strikethrough annotation. */
1466
+ const STRIKETHROUGH_TEXT_DECORATION = 'line-through';
1467
+ /** CSS `font-family` value rendered by the code annotation. */
1468
+ const CODE_FONT_FAMILY = 'Roboto Mono';
1469
+ /** CSS `white-space` value rendered by the code annotation. */
1470
+ const CODE_WHITE_SPACE = 'pre-wrap';
1471
+
1472
+ /**
1473
+ * Annotation to make text with strikethrough
1474
+ */
1475
+ class StrikethroughAnnotation extends NodeAnnotation {
1476
+ constructor(underline) {
1477
+ super();
1478
+ this.type = NodeAnnotationTypeEnum.STRIKETHROUGH;
1479
+ this.strikethrough = underline;
1480
+ }
1481
+ /**
1482
+ * Generate the map item for the annotation
1483
+ *
1484
+ * @param {Nullable<boolean>} strikethrough - Strikethrough annotation
1485
+ * @returns {[NodeAnnotationTypeEnum.STRIKETHROUGH, StrikethroughAnnotation]} Map item for the annotation
1486
+ */
1487
+ static from(strikethrough) {
1488
+ return [NodeAnnotationTypeEnum.STRIKETHROUGH, new StrikethroughAnnotation(strikethrough)];
1489
+ }
1490
+ /**
1491
+ * Generate the JSON representation of the annotation
1492
+ *
1493
+ * @returns {Record<string, unknown>} JSON representation of the annotation
1494
+ */
1495
+ toJSON() {
1496
+ return {
1497
+ strikethrough: this.strikethrough,
1498
+ };
1499
+ }
1500
+ /**
1501
+ * @inheritDoc
1502
+ */
1503
+ clone() {
1504
+ return new StrikethroughAnnotation(this.strikethrough);
1505
+ }
1506
+ /**
1507
+ * @inheritDoc
1508
+ */
1509
+ renderClass(options) {
1510
+ if (options === null || options === void 0 ? void 0 : options.standalone)
1511
+ return null;
1512
+ return this.strikethrough ? 'v-rte--strikethrough' : null;
1513
+ }
1514
+ /**
1515
+ * @inheritDoc
1516
+ */
1517
+ renderStyle(options) {
1518
+ if (!(options === null || options === void 0 ? void 0 : options.standalone))
1519
+ return null;
1520
+ return this.strikethrough ? { textDecoration: STRIKETHROUGH_TEXT_DECORATION } : null;
1521
+ }
1522
+ }
1523
+
1524
+ /**
1525
+ * Annotation to make text with underline
1526
+ */
1527
+ class UnderlineAnnotation extends NodeAnnotation {
1528
+ constructor(underline) {
1529
+ super();
1530
+ this.type = NodeAnnotationTypeEnum.UNDERLINE;
1531
+ this.underline = underline;
1532
+ }
1533
+ /**
1534
+ * Generate the map item for the annotation
1535
+ *
1536
+ * @param {boolean} underline - Underline annotation
1537
+ * @returns {[NodeAnnotationTypeEnum.UNDERLINE, UnderlineAnnotation]} Map item for the annotation
1538
+ */
1539
+ static from(underline) {
1540
+ return [NodeAnnotationTypeEnum.UNDERLINE, new UnderlineAnnotation(underline)];
1541
+ }
1542
+ /**
1543
+ * Generate the JSON representation of the annotation
1544
+ *
1545
+ * @returns {Record<string, unknown>} JSON representation of the annotation
1546
+ */
1547
+ toJSON() {
1548
+ return {
1549
+ underline: this.underline,
1550
+ };
1551
+ }
1552
+ /**
1553
+ * @inheritDoc
1554
+ */
1555
+ clone() {
1556
+ return new UnderlineAnnotation(this.underline);
1557
+ }
1558
+ /**
1559
+ * @inheritDoc
1560
+ */
1561
+ renderClass(options) {
1562
+ if (options === null || options === void 0 ? void 0 : options.standalone)
1563
+ return null;
1564
+ return this.underline ? 'v-rte--underline' : null;
1565
+ }
1566
+ /**
1567
+ * @inheritDoc
1568
+ */
1569
+ renderStyle(options) {
1570
+ if (!(options === null || options === void 0 ? void 0 : options.standalone))
1571
+ return null;
1572
+ return this.underline ? { textDecoration: UNDERLINE_TEXT_DECORATION } : null;
1573
+ }
1574
+ }
1575
+
1576
+ /**
1577
+ * Annotation to make text Italic
1578
+ */
1579
+ class ItalicAnnotation extends NodeAnnotation {
1580
+ constructor(italic) {
1581
+ super();
1582
+ this.type = NodeAnnotationTypeEnum.ITALIC;
1583
+ this.italic = italic;
1584
+ }
1585
+ /**
1586
+ * Generate the map item for the annotation
1587
+ *
1588
+ * @param {boolean} italic - Italic annotation
1589
+ * @returns {[NodeAnnotationTypeEnum.ITALIC, ItalicAnnotation]} Map item for the annotation
1590
+ */
1591
+ static from(italic) {
1592
+ return [NodeAnnotationTypeEnum.ITALIC, new ItalicAnnotation(italic)];
1593
+ }
1594
+ /**
1595
+ * Generate the JSON representation of the annotation
1596
+ *
1597
+ * @returns {Record<string, unknown>} JSON representation of the annotation
1598
+ */
1599
+ toJSON() {
1600
+ return {
1601
+ italic: this.italic,
1602
+ };
1603
+ }
1604
+ /**
1605
+ * @inheritDoc
1606
+ */
1607
+ clone() {
1608
+ return new ItalicAnnotation(this.italic);
1609
+ }
1610
+ /**
1611
+ * @inheritDoc
1612
+ */
1613
+ renderClass(options) {
1614
+ if (options === null || options === void 0 ? void 0 : options.standalone)
1615
+ return null;
1616
+ return this.italic ? 'v-rte--italic' : null;
1617
+ }
1618
+ /**
1619
+ * @inheritDoc
1620
+ */
1621
+ renderStyle(options) {
1622
+ if (!(options === null || options === void 0 ? void 0 : options.standalone))
1623
+ return null;
1624
+ return this.italic ? { fontStyle: ITALIC_FONT_STYLE } : null;
1625
+ }
1626
+ }
1627
+
1628
+ /**
1629
+ * Annotation to make text bold
1630
+ */
1631
+ class BoldAnnotation extends NodeAnnotation {
1632
+ constructor(bold) {
1633
+ super();
1634
+ this.type = NodeAnnotationTypeEnum.BOLD;
1635
+ this.bold = bold;
1636
+ }
1637
+ /**
1638
+ * Generate the map item for the annotation
1639
+ *
1640
+ * @param {boolean} bold - Bold annotation
1641
+ * @returns {[NodeAnnotationTypeEnum.BOLD, BoldAnnotation]} Map item for the annotation
1642
+ */
1643
+ static from(bold) {
1644
+ return [NodeAnnotationTypeEnum.BOLD, new BoldAnnotation(bold)];
1645
+ }
1646
+ /**
1647
+ * Generate the JSON representation of the annotation
1648
+ *
1649
+ * @returns {Record<string, unknown>} JSON representation of the annotation
1650
+ */
1651
+ toJSON() {
1652
+ return {
1653
+ bold: this.bold,
1654
+ };
1655
+ }
1656
+ /**
1657
+ * @inheritDoc
1658
+ */
1659
+ clone() {
1660
+ return new BoldAnnotation(this.bold);
1661
+ }
1662
+ /**
1663
+ * @inheritDoc
1664
+ */
1665
+ renderClass(options) {
1666
+ if (options === null || options === void 0 ? void 0 : options.standalone)
1667
+ return null;
1668
+ return this.bold ? 'v-rte--bold' : null;
1669
+ }
1670
+ /**
1671
+ * @inheritDoc
1672
+ */
1673
+ renderStyle(options) {
1674
+ if (!(options === null || options === void 0 ? void 0 : options.standalone))
1675
+ return null;
1676
+ return this.bold ? { fontWeight: BOLD_FONT_WEIGHT } : null;
1677
+ }
1678
+ }
1679
+
1680
+ /**
1681
+ * Annotation to make text code
1682
+ */
1683
+ class CodeAnnotation extends NodeAnnotation {
1684
+ constructor(code, useInternalStyle = true) {
1685
+ super();
1686
+ this.type = NodeAnnotationTypeEnum.CODE;
1687
+ this.code = code;
1688
+ this.useInternalStyle = useInternalStyle;
1689
+ }
1690
+ /**
1691
+ * Generate the map item for the annotation
1692
+ *
1693
+ * @param {boolean} code - Bold annotation
1694
+ * @param {boolean} useInternalStyle - Whether to use default style for the link
1695
+ * @returns {[NodeAnnotationTypeEnum.CODE, CodeAnnotation]} Map item for the annotation
1696
+ */
1697
+ static from(code, useInternalStyle) {
1698
+ return [NodeAnnotationTypeEnum.CODE, new CodeAnnotation(code, useInternalStyle)];
1699
+ }
1700
+ /**
1701
+ * Get the default standalone styles for an inline code annotation.
1702
+ *
1703
+ * @returns {AnnotationStyle} The default styles.
1704
+ */
1705
+ static getDefaultStyles() {
1706
+ return {
1707
+ fontFamily: CODE_FONT_FAMILY,
1708
+ whiteSpace: CODE_WHITE_SPACE,
1709
+ };
1710
+ }
1711
+ /**
1712
+ * Generate the JSON representation of the annotation
1713
+ *
1714
+ * @returns {Record<string, unknown>} JSON representation of the annotation
1715
+ */
1716
+ toJSON() {
1717
+ return {
1718
+ code: this.code,
1719
+ };
1720
+ }
1721
+ /**
1722
+ * @inheritDoc
1723
+ */
1724
+ clone() {
1725
+ return new CodeAnnotation(this.code, this.useInternalStyle);
1726
+ }
1727
+ /**
1728
+ * @inheritDoc
1729
+ */
1730
+ renderClass(options) {
1731
+ if (options === null || options === void 0 ? void 0 : options.standalone)
1732
+ return null;
1733
+ return this.code && this.useInternalStyle ? 'v-rte--code' : null;
1734
+ }
1735
+ /**
1736
+ * @inheritDoc
1737
+ */
1738
+ renderStyle(options) {
1739
+ if (!(options === null || options === void 0 ? void 0 : options.standalone))
1740
+ return null;
1741
+ return this.code && this.useInternalStyle ? CodeAnnotation.getDefaultStyles() : null;
1742
+ }
1743
+ }
1744
+
1745
+ const RTE_DEFAULT_TEXT_COLOR = {
1746
+ key: 'black',
1747
+ light: '#111128',
1748
+ dark: '#E3E3E8',
1749
+ };
1750
+ const RTE_TEXT_COLORS = [
1751
+ RTE_DEFAULT_TEXT_COLOR,
1752
+ {
1753
+ key: 'gray',
1754
+ light: '#5E5E6D',
1755
+ dark: '#B9B9C1',
1756
+ },
1757
+ {
1758
+ key: 'green',
1759
+ light: '#01801F',
1760
+ dark: '#59D977',
1761
+ },
1762
+ {
1763
+ key: 'red',
1764
+ light: '#BD2947',
1765
+ dark: '#FFB2B5',
1766
+ },
1767
+ {
1768
+ key: 'purple',
1769
+ light: '#563D82',
1770
+ dark: '#BEB2FF',
1771
+ },
1772
+ {
1773
+ key: 'teal',
1774
+ light: '#17758F',
1775
+ dark: '#4CD8FF',
1776
+ },
1777
+ ];
1778
+ const ZERO_WIDTH_SPACE = '\u200b';
1779
+ const VegaRTEPresetToolbarItems = [
1780
+ ['textStyles'],
1781
+ ['bold', 'italic', 'underline', 'strikethrough', 'code'],
1782
+ ['textColor'],
1783
+ ['horizontalAlignment', 'bulletsNumbers'],
1784
+ ['moreIndent', 'lessIndent'],
1785
+ ['link'],
1786
+ ['image'],
1787
+ ['clearStyle'],
1788
+ ];
1789
+
1790
+ /**
1791
+ * Annotation to make text with text color
1792
+ */
1793
+ class TextColorAnnotation extends NodeAnnotation {
1794
+ constructor(textColor) {
1795
+ super();
1796
+ this.type = NodeAnnotationTypeEnum.TEXT_COLOR;
1797
+ this.textColor = this.formatTextColor(textColor);
1798
+ }
1799
+ /**
1800
+ * Generate the map item for the annotation
1801
+ *
1802
+ * @param {string} textColor - text color annotation
1803
+ * @returns {[NodeAnnotationTypeEnum.TEXT_COLOR, TextColorAnnotation]} Map item for the annotation
1804
+ */
1805
+ static from(textColor) {
1806
+ return [NodeAnnotationTypeEnum.TEXT_COLOR, new TextColorAnnotation(textColor)];
1807
+ }
1808
+ /**
1809
+ * Generate the JSON representation of the annotation
1810
+ *
1811
+ * @returns {Record<string, unknown>} JSON representation of the annotation
1812
+ */
1813
+ toJSON() {
1814
+ return {
1815
+ textColor: this.textColor.key,
1816
+ };
1817
+ }
1818
+ /**
1819
+ * @inheritDoc
1820
+ */
1821
+ clone() {
1822
+ return new TextColorAnnotation(this.textColor.key);
1823
+ }
1824
+ /**
1825
+ * @inheritDoc
1826
+ */
1827
+ renderClass() {
1828
+ return null;
1829
+ }
1830
+ /**
1831
+ * @inheritDoc
1832
+ */
1833
+ renderStyle() {
1834
+ return {
1835
+ color: VegaInternalThemeManager.isDarkMode() ? this.textColor.dark : this.textColor.light,
1836
+ };
1837
+ }
1838
+ /**
1839
+ * format text color
1840
+ *
1841
+ * @param {string} textColor - text color
1842
+ * @returns {VegaRTEColorSchema} - VegaRTEColorSchema
1843
+ */
1844
+ formatTextColor(textColor) {
1845
+ return (RTE_TEXT_COLORS.find((item) => item.key === textColor) || RTE_TEXT_COLORS[0]);
1846
+ }
1847
+ }
1848
+
1849
+ /**
1850
+ * Annotation to make text a link
1851
+ */
1852
+ class LinkAnnotation extends NodeAnnotation {
1853
+ constructor(link, useInternalStyle = true) {
1854
+ super();
1855
+ this.type = NodeAnnotationTypeEnum.LINK;
1856
+ this.link = link;
1857
+ this.useInternalStyle = useInternalStyle;
1858
+ }
1859
+ /**
1860
+ * Generate the map item for the annotation
1861
+ *
1862
+ * @param {VegaRTELink} link - Bold annotation
1863
+ * @param {boolean} useInternalStyle - Whether to use default style for the link
1864
+ * @returns {[NodeAnnotationTypeEnum.LINK, LinkAnnotation]} Map item for the annotation
1865
+ */
1866
+ static from(link, useInternalStyle = true) {
1867
+ return [NodeAnnotationTypeEnum.LINK, new LinkAnnotation(link, useInternalStyle)];
1868
+ }
1869
+ /**
1870
+ * Generate the JSON representation of the annotation
1871
+ *
1872
+ * @returns {Record<'link', VegaRTELink>} JSON representation of the annotation
1873
+ */
1874
+ toJSON() {
1875
+ return {
1876
+ link: this.link,
1877
+ };
1878
+ }
1879
+ /**
1880
+ * @inheritDoc
1881
+ */
1882
+ clone() {
1883
+ return new LinkAnnotation(this.link, this.useInternalStyle);
1884
+ }
1885
+ /**
1886
+ * Verify whether two link annotation is same or not
1887
+ *
1888
+ * @param {LinkAnnotation} annotation - Compared annotation
1889
+ * @returns {boolean} Whether two link annotation is same or not
1890
+ */
1891
+ toEqual(annotation) {
1892
+ return this.link.groupKey === annotation.link.groupKey;
1893
+ }
1894
+ /**
1895
+ * @inheritDoc
1896
+ */
1897
+ renderClass() {
1898
+ return null;
1899
+ }
1900
+ /**
1901
+ * @inheritDoc
1902
+ */
1903
+ renderStyle() {
1904
+ return null;
1905
+ }
1906
+ }
1907
+
1908
+ /**
1909
+ * Action to link a group of nodes
1910
+ */
1911
+ class LinkGroupAnnotationAction extends AnnotationAction {
1912
+ constructor(groupKey, nodes, type) {
1913
+ super();
1914
+ this.isFlushable = false;
1915
+ this.groupKey = groupKey;
1916
+ this.nodes = nodes;
1917
+ this.type = type;
1918
+ }
1919
+ /**
1920
+ * Converts the action to an annotation
1921
+ *
1922
+ * @returns {Annotation} The annotation
1923
+ */
1924
+ toAnnotation() {
1925
+ return new LinkGroupAnnotation(this.groupKey);
1926
+ }
1927
+ }
1928
+
1929
+ /**
1930
+ * Sync up selection action
1931
+ */
1932
+ class SyncUpSelectionAction extends AnnotationAction {
1933
+ constructor() {
1934
+ super();
1935
+ this.isFlushable = false;
1936
+ }
1937
+ /**
1938
+ * annotation null
1939
+ *
1940
+ * @returns {Nullable<Annotation>} null
1941
+ */
1942
+ toAnnotation() {
1943
+ return null;
1944
+ }
1945
+ }
1946
+
1947
+ /**
1948
+ * The base action handle strategy class, use to modify the rich text node content or modify the annotation.
1949
+ */
1950
+ class ActionHandleStrategy {
1951
+ /**
1952
+ * Public method to invoke the handle logic.
1953
+ *
1954
+ * @typedef R generic type
1955
+ * @param {ModifyContentAction | AnnotationAction} action - The action instance. Contains the action type and necessary params.
1956
+ * @param {RTENode | RTEBlock | VegaRTEContent} target - The rich text node instance that will be modified.
1957
+ * @returns {R} - The invoke result in special strategy.
1958
+ */
1959
+ execute(action, target) {
1960
+ LogUtility.log(`Executing action ${action.constructor.name} on ${target.constructor.name} ${target['id']}`);
1961
+ return this.handleAction(action, target);
1962
+ }
1963
+ /**
1964
+ * Update the custom style annotation of a block or node
1965
+ *
1966
+ * @param {RTEBlock | RTETextNode} item - block or node
1967
+ * @param {string[]} styleKeys - custom style keys, for examples ['fontSize', 'fontWeight'].
1968
+ */
1969
+ updateCustomStyleAnnotation(item, styleKeys) {
1970
+ const customStyleAnnotation = item.annotationMap.get(CommonAnnotationTypeEnum.CUSTOM_STYLE);
1971
+ if (customStyleAnnotation && this.isCustomStyle(customStyleAnnotation, styleKeys)) {
1972
+ item.annotationMap.set(customStyleAnnotation.type, new CustomStyleAnnotation(customStyleAnnotation.removeStyles(styleKeys)));
1973
+ }
1974
+ }
1975
+ /**
1976
+ * Create a new paragraph block with the given text.
1977
+ *
1978
+ * @param {string} text - The text content for the new paragraph.
1979
+ * @returns {Nullable<RTETextBlock>} - The newly created paragraph block, or null if creation failed.
1980
+ */
1981
+ createNewParagraph(text) {
1982
+ const dtoClass = RTEDTOClassManager$1.getRTEBlockClass('paragraph');
1983
+ if (dtoClass) {
1984
+ const newParagraph = dtoClass.from({
1985
+ id: generateUUID(),
1986
+ type: 'paragraph',
1987
+ nodes: [{ id: generateUUID(), type: 'text', text }],
1988
+ });
1989
+ return newParagraph;
1990
+ }
1991
+ }
1992
+ /**
1993
+ * Get the root content from a child block or node.
1994
+ *
1995
+ * @param {RTEBlock | RTENode} child - The child block or node.
1996
+ * @returns {Nullable<VegaRTEContent>} The root content, if found.
1997
+ */
1998
+ getRootContent(child) {
1999
+ const parent = child.parent;
2000
+ if (parent) {
2001
+ if (parent.constructor.name === 'VegaRTEContent') {
2002
+ return parent;
2003
+ }
2004
+ else {
2005
+ return this.getRootContent(parent);
2006
+ }
2007
+ }
2008
+ }
2009
+ /**
2010
+ * Check the caret position at the start of a block.
2011
+ *
2012
+ * @param {RTEBlock} block - The RTE Block.
2013
+ * @param {RTENode} node - The RTE Node.
2014
+ * @param {number} offset - The offset position.
2015
+ * @returns {boolean} - Whether the caret is at the start of the block.
2016
+ */
2017
+ isCaretPositionAtBlockStart(block, node, offset) {
2018
+ return node === block.children[0] && offset === 0;
2019
+ }
2020
+ /**
2021
+ * Check the caret position at the end of a block.
2022
+ *
2023
+ * @param {RTEBlock} block - The RTE Block.
2024
+ * @param {RTENode} node - The RTE Node.
2025
+ * @param {number} offset - The offset position.
2026
+ * @returns {boolean} - Whether the caret is at the end of the block.
2027
+ */
2028
+ isCaretPositionAtBlockEnd(block, node, offset) {
2029
+ if (!node.isContentEditable()) {
2030
+ return this.isCaretPositionAtDecoratorBlockEnd(block, node, offset);
2031
+ }
2032
+ else {
2033
+ return this.isCaretPositionAtTextBlockEnd(block, node, offset);
2034
+ }
2035
+ }
2036
+ /**
2037
+ * Get the registered DOM element by the RTE entity.
2038
+ *
2039
+ * @param {RTEBlock | RTENode} instance - The RTE block or node instance.
2040
+ * @returns {Nullable<HTMLElement>} The registered DOM element.
2041
+ */
2042
+ getDOMByEntity(instance) {
2043
+ return stateEntityRenderingRegistry.getDOMByEntity(instance);
2044
+ }
2045
+ /**
2046
+ * Checks if the caret position is at the end of a specified RTETextNode.
2047
+ *
2048
+ * @param {RTETextBlock} textBlock - `RTETextBlock` - a text block.
2049
+ * @param {RTETextNode} node - `RTETextNode` - a node representing an image in a rich text editor.
2050
+ * @param {number} startOffset - The position within the text node where the caret is located.
2051
+ * @returns {boolean} a boolean value, which indicates whether the caret position is at the start of the RTETextNode.
2052
+ */
2053
+ isCaretPositionAtTextBlockEnd(textBlock, node, startOffset) {
2054
+ const lastNode = textBlock.children[textBlock.children.length - 1];
2055
+ return node === lastNode && (node.isEmpty() || startOffset === lastNode.text.length);
2056
+ }
2057
+ /**
2058
+ * Checks if the caret position is at the end of a given decorator node.
2059
+ *
2060
+ * @param {RTEBlock} target - The image block.
2061
+ * @param {RTENode} node - `node` is a RTEDecoratorNode or non-editable text node.
2062
+ * @param {number} startOffset - The position within the `RTEDecoratorNode` where the caret is located.
2063
+ * @returns {boolean}Returns a boolean value indicating whether the caret position is at the end of the `RTEDecoratorNode`.
2064
+ */
2065
+ isCaretPositionAtDecoratorBlockEnd(target, node, startOffset) {
2066
+ return node === target.children[target.children.length - 1] && startOffset !== 0;
2067
+ }
2068
+ /**
2069
+ * Determines if the custom style annotation includes any the custom style.
2070
+ *
2071
+ * @param {CustomStyleAnnotation} customStyleAnnotation - custom style annotation
2072
+ * @param {string[]} styleKeys - custom style keys, for examples ['fontSize', 'fontWeight'].
2073
+ * @returns {boolean} - True if the custom key includes the custom style, false otherwise.
2074
+ */
2075
+ isCustomStyle(customStyleAnnotation, styleKeys) {
2076
+ return styleKeys.some((item) => Object.keys(customStyleAnnotation.customStyle).includes(item));
2077
+ }
2078
+ }
2079
+
2080
+ /**
2081
+ * Split the corresponding link group nodes *
2082
+ */
2083
+ class LinkGroupNodeSplitAction extends ModifyContentAction {
2084
+ constructor(splittedTextNodes) {
2085
+ super();
2086
+ this.type = ModifyContentActionType.LINK_GROUP_NODE_SPLIT;
2087
+ this.splittedTextNodes = splittedTextNodes;
2088
+ }
2089
+ }
2090
+
2091
+ /**
2092
+ * Split the text node into two or there nodes according to the rules.
2093
+ */
2094
+ class NodeSplitTextStrategy extends ActionHandleStrategy {
2095
+ constructor() {
2096
+ super(...arguments);
2097
+ // The new create node that need apply annotation or the current target. This property used to export after the execute method invoke.
2098
+ this.applyTargetNode = null;
2099
+ }
2100
+ /**
2101
+ * Split the text node.
2102
+ *
2103
+ * @param {TextSplittableAction} action - The split action.
2104
+ * @param {RTETextNode} target - The text node that need to be splited.
2105
+ * @returns {Nullable<RTETextNode>} - The new insert text node or the current text node that need to apply the action.
2106
+ */
2107
+ handleAction(action, target) {
2108
+ const selectionRangeAnnotation = target.getAnnotationByType(InternalAnnotationTypeEnum.SELECTION_RANGE);
2109
+ this.setApplyTargetNode(null);
2110
+ if (action instanceof TextSplittableAction && action.doSplit && selectionRangeAnnotation) {
2111
+ const { startContainer, endContainer, startOffset, endOffset } = selectionRangeAnnotation.range;
2112
+ const noTextRangeSelected = startContainer === endContainer && startOffset === endOffset;
2113
+ target.parent.children = target.parent.children.flatMap((item) => {
2114
+ if (item.id === target.id) {
2115
+ if (noTextRangeSelected) {
2116
+ return this.insertNewNode(startOffset, target);
2117
+ }
2118
+ if (this.shouldSplitSelection(selectionRangeAnnotation.range) &&
2119
+ target.isContentEditable()) {
2120
+ const splittedTextNodes = this.splitTextNode(selectionRangeAnnotation.range, target);
2121
+ if (item.annotationMap.has('LINK')) {
2122
+ item.apply(new LinkGroupNodeSplitAction(splittedTextNodes));
2123
+ }
2124
+ return splittedTextNodes;
2125
+ }
2126
+ else {
2127
+ this.setApplyTargetNode(target);
2128
+ return target;
2129
+ }
2130
+ }
2131
+ return item;
2132
+ });
2133
+ }
2134
+ return this.applyTargetNode;
2135
+ }
2136
+ /**
2137
+ * Insert the new node at the start offset
2138
+ *
2139
+ * @param {number} startOffset - The start position offset
2140
+ * @param {RTETextNode} target - RTETextNode
2141
+ * @returns {RTETextNode[]} - RTETextNode array
2142
+ */
2143
+ insertNewNode(startOffset, target) {
2144
+ const newNode = target.cloneWithText('');
2145
+ this.setApplyTargetNode(newNode);
2146
+ const index = target.parent.children.findIndex((node) => node === target);
2147
+ if (startOffset === 0 || (!target.isContentEditable() && startOffset === index)) {
2148
+ return [newNode, target];
2149
+ }
2150
+ if (startOffset === target.text.length ||
2151
+ (!target.isContentEditable() && startOffset === index + 1)) {
2152
+ return [target, newNode];
2153
+ }
2154
+ const beforeNode = target.cloneWithText(target.text.substring(0, startOffset));
2155
+ const afterNode = target.cloneWithText(target.text.substring(startOffset));
2156
+ return [beforeNode, newNode, afterNode];
2157
+ }
2158
+ /**
2159
+ * Whether a given range should be split based on various conditions within the range.
2160
+ *
2161
+ * @param {Range} range - Selection range
2162
+ * @returns {boolean} Returns a boolean value indicating whether the selection range should be split.
2163
+ */
2164
+ shouldSplitSelection(range) {
2165
+ const { startContainer, endContainer, startOffset, endOffset } = range;
2166
+ const isCrossNode = startContainer !== endContainer;
2167
+ const isPartialStart = startOffset > 0;
2168
+ const isPartialEnd = endOffset < (endContainer.textContent ? endContainer.textContent.length : 0);
2169
+ const isPartialSelection = isPartialStart || isPartialEnd;
2170
+ return isCrossNode || isPartialSelection;
2171
+ }
2172
+ /**
2173
+ * Split text node with range
2174
+ *
2175
+ * @param {Range} range - Selection range
2176
+ * @param {RTETextNode} target - RTETextNode
2177
+ * @returns {RTETextNode[] | RTETextNode} RTETextNode array
2178
+ */
2179
+ splitTextNode(range, target) {
2180
+ const { startContainer, endContainer, startOffset } = range;
2181
+ const startNode = startContainer.parentElement;
2182
+ const endNode = endContainer.parentElement;
2183
+ /**
2184
+ * Split the text from the start offset to the end offset
2185
+ *
2186
+ * @param {string} text - The text string
2187
+ * @param {number} startOffset - The start offset position
2188
+ * @param {number} endOffset - The end offset position
2189
+ * @returns {RTETextNode[]} - The split text node array
2190
+ */
2191
+ const splitText = (text, startOffset, endOffset) => {
2192
+ const beforeText = text.substring(0, startOffset);
2193
+ const selectedText = text.substring(startOffset, endOffset);
2194
+ const afterText = text.substring(endOffset);
2195
+ return [
2196
+ target.cloneWithText(beforeText),
2197
+ target.cloneWithText(selectedText),
2198
+ target.cloneWithText(afterText),
2199
+ ];
2200
+ };
2201
+ const startItemDto = startNode && stateEntityRenderingRegistry.getEntityByDOM(startNode);
2202
+ const endItemDto = endNode && stateEntityRenderingRegistry.getEntityByDOM(endNode);
2203
+ if (startItemDto && startItemDto.id === target.id) {
2204
+ const endOffset = startContainer === endContainer ? range.endOffset : target.text.length;
2205
+ const [beforeNode, selectedNode, afterNode] = splitText(target.text, startOffset, endOffset);
2206
+ this.setApplyTargetNode(selectedNode);
2207
+ return [beforeNode, selectedNode, afterNode].filter((node) => !!node.text);
2208
+ }
2209
+ else if (endItemDto && endItemDto.id === target.id) {
2210
+ const [beforeNode, selectedNode, afterNode] = splitText(target.text, 0, range.endOffset);
2211
+ this.setApplyTargetNode(selectedNode);
2212
+ return [beforeNode, selectedNode, afterNode].filter((node) => !!node.text);
2213
+ }
2214
+ else {
2215
+ this.setApplyTargetNode(target);
2216
+ return target;
2217
+ }
2218
+ }
2219
+ /**
2220
+ * Store the text node which need to apply the annotation. Clear the value if the input is null.
2221
+ *
2222
+ * @param {RTETextNode | null} node - The new text node.
2223
+ */
2224
+ setApplyTargetNode(node) {
2225
+ this.applyTargetNode = node;
2226
+ }
2227
+ }
2228
+
2229
+ /**
2230
+ * Action to toggle bold annotation
2231
+ */
2232
+ class BoldAnnotationAction extends TextSplittableAction {
2233
+ constructor(bold) {
2234
+ super();
2235
+ this.isFlushable = true;
2236
+ this.bold = bold;
2237
+ }
2238
+ /**
2239
+ * Converts the action to an annotation
2240
+ *
2241
+ * @returns {BoldAnnotation} the annotation
2242
+ */
2243
+ toAnnotation() {
2244
+ return new BoldAnnotation(this.bold);
2245
+ }
2246
+ }
2247
+
2248
+ /**
2249
+ * Annotation to host which annotations will be clear formatting
2250
+ */
2251
+ class ClearFormattingAnnotation extends Annotation {
2252
+ constructor() {
2253
+ super(...arguments);
2254
+ this.type = InternalAnnotationTypeEnum.CLEAR_FORMATTING;
2255
+ this.items = [
2256
+ NodeAnnotationTypeEnum.BOLD,
2257
+ NodeAnnotationTypeEnum.ITALIC,
2258
+ NodeAnnotationTypeEnum.UNDERLINE,
2259
+ NodeAnnotationTypeEnum.STRIKETHROUGH,
2260
+ NodeAnnotationTypeEnum.TEXT_COLOR,
2261
+ NodeAnnotationTypeEnum.CODE,
2262
+ CommonAnnotationTypeEnum.CUSTOM_STYLE,
2263
+ ];
2264
+ }
2265
+ }
2266
+
2267
+ /**
2268
+ * Action to toggle clear formatting
2269
+ */
2270
+ class ClearFormattingAnnotationAction extends TextSplittableAction {
2271
+ constructor() {
2272
+ super(...arguments);
2273
+ this.isFlushable = true;
2274
+ }
2275
+ /**
2276
+ * Converts the action to an annotation
2277
+ *
2278
+ * @returns {Annotation} the annotation
2279
+ */
2280
+ toAnnotation() {
2281
+ return new ClearFormattingAnnotation();
2282
+ }
2283
+ }
2284
+
2285
+ /**
2286
+ * Action to toggle code annotation
2287
+ */
2288
+ class CodeAnnotationAction extends TextSplittableAction {
2289
+ constructor(code) {
2290
+ super();
2291
+ this.isFlushable = true;
2292
+ this.code = code;
2293
+ }
2294
+ /**
2295
+ * Converts the action to an annotation
2296
+ *
2297
+ * @returns {CodeAnnotation} the annotation
2298
+ */
2299
+ toAnnotation() {
2300
+ return new CodeAnnotation(this.code);
2301
+ }
2302
+ }
2303
+
2304
+ /**
2305
+ * Delete the node annotation by type
2306
+ */
2307
+ class DeleteNodeAnnotationAction extends AnnotationAction {
2308
+ constructor(annotationType) {
2309
+ super();
2310
+ this.isFlushable = true;
2311
+ this.annotationType = annotationType;
2312
+ }
2313
+ /**
2314
+ * Don't need this for this action
2315
+ *
2316
+ * @returns {Nullable<Annotation>} undefined
2317
+ */
2318
+ toAnnotation() {
2319
+ return undefined;
2320
+ }
2321
+ }
2322
+
2323
+ /**
2324
+ * Action to toggle the italic annotation
2325
+ */
2326
+ class ItalicAnnotationAction extends TextSplittableAction {
2327
+ constructor(italic) {
2328
+ super();
2329
+ this.isFlushable = true;
2330
+ this.italic = italic;
2331
+ }
2332
+ /**
2333
+ * Converts the action to an annotation
2334
+ *
2335
+ * @returns {ItalicAnnotation} The annotation
2336
+ */
2337
+ toAnnotation() {
2338
+ return new ItalicAnnotation(this.italic);
2339
+ }
2340
+ }
2341
+
2342
+ /**
2343
+ * Action to toggle link annotation
2344
+ */
2345
+ class LinkAnnotationAction extends TextSplittableAction {
2346
+ constructor({ link, newText, needMergeNode, doSplit, type, }) {
2347
+ super();
2348
+ this.isFlushable = true;
2349
+ this.link = link;
2350
+ this.needMergeNode = needMergeNode;
2351
+ this.newText = newText;
2352
+ this.type = type;
2353
+ if (isNonNullable(doSplit)) {
2354
+ this.doSplit = doSplit;
2355
+ }
2356
+ }
2357
+ /**
2358
+ * Converts the action to an annotation
2359
+ *
2360
+ * @returns {LinkAnnotation} the annotation
2361
+ */
2362
+ toAnnotation() {
2363
+ return new LinkAnnotation(this.link);
2364
+ }
2365
+ }
2366
+
2367
+ /**
2368
+ * Action to toggle the strikethrough annotation
2369
+ */
2370
+ class StrikethroughAnnotationAction extends TextSplittableAction {
2371
+ constructor(underline) {
2372
+ super();
2373
+ this.isFlushable = true;
2374
+ this.strikethrough = underline;
2375
+ }
2376
+ /**
2377
+ * Converts the action to an annotation
2378
+ *
2379
+ * @returns {Annotation} the annotation
2380
+ */
2381
+ toAnnotation() {
2382
+ return new StrikethroughAnnotation(this.strikethrough);
2383
+ }
2384
+ }
2385
+
2386
+ /**
2387
+ * Action to toggle the underline annotation
2388
+ */
2389
+ class UnderlineAnnotationAction extends TextSplittableAction {
2390
+ constructor(underline) {
2391
+ super();
2392
+ this.isFlushable = true;
2393
+ this.underline = underline;
2394
+ }
2395
+ /**
2396
+ * Converts the action to an annotation
2397
+ *
2398
+ * @returns {Annotation} the annotation
2399
+ */
2400
+ toAnnotation() {
2401
+ return new UnderlineAnnotation(this.underline);
2402
+ }
2403
+ }
2404
+
2405
+ /**
2406
+ * The current strategy used to modify the text node annotation map.
2407
+ */
2408
+ class NodeUpdateAnnotationMapStrategy extends ActionHandleStrategy {
2409
+ /**
2410
+ * Remove or set annotation to the text node annotation map.
2411
+ *
2412
+ * @param {AnnotationAction} action - The annotation action instance.
2413
+ * @param {RTETextNode} target - The current text node.
2414
+ */
2415
+ handleAction(action, target) {
2416
+ const annotation = action.toAnnotation();
2417
+ if (action instanceof DeleteNodeAnnotationAction) {
2418
+ target.annotationMap.delete(action.annotationType);
2419
+ return;
2420
+ }
2421
+ if (annotation instanceof ClearFormattingAnnotation) {
2422
+ annotation.items.forEach((item) => {
2423
+ target.deleteAnnotationByType(item);
2424
+ });
2425
+ return;
2426
+ }
2427
+ if (annotation instanceof NodeAnnotation || annotation instanceof SelectionRangeAnnotation) {
2428
+ if (action instanceof LinkAnnotationAction) {
2429
+ if (isNonNullable(action.newText)) {
2430
+ target.text = action.newText;
2431
+ }
2432
+ target.parent.apply(new LinkGroupAnnotationAction(action.link.groupKey, [target], action.type));
2433
+ }
2434
+ if (action instanceof CodeAnnotationAction) {
2435
+ this.handleAction(new ClearFormattingAnnotationAction(), target);
2436
+ }
2437
+ if (action instanceof BoldAnnotationAction) {
2438
+ this.updateCustomStyleAnnotation(target, ['fontWeight']);
2439
+ }
2440
+ if (action instanceof ItalicAnnotationAction) {
2441
+ this.updateCustomStyleAnnotation(target, ['fontStyle']);
2442
+ }
2443
+ if (action instanceof UnderlineAnnotationAction ||
2444
+ action instanceof StrikethroughAnnotationAction) {
2445
+ this.updateCustomStyleAnnotation(target, ['textDecoration']);
2446
+ }
2447
+ target.annotationMap.set(annotation.type, annotation);
2448
+ return;
2449
+ }
2450
+ }
2451
+ }
2452
+
2453
+ /**
2454
+ * Delete the corresponding link group according to the text node *
2455
+ */
2456
+ class DeleteLinkGroupAction extends ModifyContentAction {
2457
+ constructor() {
2458
+ super(...arguments);
2459
+ this.type = ModifyContentActionType.DELETE_LINK_GROUP;
2460
+ }
2461
+ }
2462
+
2463
+ /**
2464
+ * Update the editor text node text content strategy.
2465
+ */
2466
+ class NodeUpdateTextStrategy extends ActionHandleStrategy {
2467
+ /**
2468
+ * Updates the text content of a node and unlink the node if it is a link node and the text is deleted.
2469
+ *
2470
+ * @param {UpdateTextAction} action - The update text action instance.
2471
+ * @param {RTETextNode} target - The text node instance which need update the text.
2472
+ */
2473
+ handleAction(action, target) {
2474
+ target.text = action.newTextContent;
2475
+ // The link node should unlink when delete all text
2476
+ if (!target.text && target.annotationMap.has('LINK')) {
2477
+ target.apply(new DeleteLinkGroupAction());
2478
+ }
2479
+ }
2480
+ }
2481
+
2482
+ /**
2483
+ * Update the text node property text action
2484
+ *
2485
+ * @example textNode.apply(new UpdateTextAction(newText))
2486
+ */
2487
+ class UpdateTextAction extends ModifyContentAction {
2488
+ constructor(text) {
2489
+ super();
2490
+ this.type = ModifyContentActionType.UPDATE_TEXT;
2491
+ this.newTextContent = '';
2492
+ this.newTextContent = text;
2493
+ }
2494
+ }
2495
+
2496
+ /**
2497
+ * Replaces the rich text node selected text strategy.
2498
+ */
2499
+ class NodeReplaceSelectedTextStrategy extends ActionHandleStrategy {
2500
+ /**
2501
+ * @inheritDoc
2502
+ */
2503
+ handleAction(action, target) {
2504
+ this.replaceSelectedText(action.textToBeInsert, action.currentRange, target);
2505
+ }
2506
+ /**
2507
+ * Replaces the selected text within a given range with a new text in a TypeScript class.
2508
+ *
2509
+ * @param {string} text - The new text that will replace the currently selected text within the specified range.
2510
+ * @param {RTERange} currentRange - A range of text within a Rich Text Editor (RTE).
2511
+ * @param {RTETextNode} target - The RTE text node instance.
2512
+ */
2513
+ replaceSelectedText(text, currentRange, target) {
2514
+ if (currentRange && currentRange.startContainer && currentRange.endContainer) {
2515
+ const { startContainer, endContainer, startOffset, endOffset } = currentRange;
2516
+ let newText = target.text;
2517
+ if (startContainer === endContainer && startOffset === endOffset && text) {
2518
+ newText = target.text.slice(0, startOffset) + text + target.text.slice(startOffset);
2519
+ }
2520
+ else {
2521
+ const startNode = startContainer.parentElement;
2522
+ const endNode = endContainer.parentElement;
2523
+ const startItemDto = startNode && stateEntityRenderingRegistry.getEntityByDOM(startNode);
2524
+ const endItemDto = endNode && stateEntityRenderingRegistry.getEntityByDOM(endNode);
2525
+ let startIndex = 0, endIndex = target.text.length;
2526
+ if (startItemDto && startItemDto === target) {
2527
+ startIndex = startOffset;
2528
+ endIndex = startContainer === endContainer ? endOffset : endIndex;
2529
+ }
2530
+ else if (endItemDto && endItemDto === target) {
2531
+ endIndex = endOffset;
2532
+ }
2533
+ newText = target.text.slice(0, startIndex) + text + target.text.slice(endIndex);
2534
+ }
2535
+ target.apply(new UpdateTextAction(newText));
2536
+ }
2537
+ }
2538
+ }
2539
+
2540
+ /**
2541
+ * Inline HTML annotation
2542
+ */
2543
+ class InlineHtmlAnnotation extends Annotation {
2544
+ constructor(htmlTag) {
2545
+ super();
2546
+ this.type = NodeAnnotationTypeEnum.INLINE_HTML;
2547
+ this.htmlTag = htmlTag;
2548
+ }
2549
+ /**
2550
+ * Generate the map item for the annotation
2551
+ *
2552
+ * @param {VegaInlineHtmlSchema} inlineHtml - Inline HTML node
2553
+ * @returns {[NodeAnnotationTypeEnum.INLINE_HTML, InlineHtmlAnnotation]} Map item for the annotation
2554
+ */
2555
+ static from(inlineHtml) {
2556
+ const { htmlTag, child, customStyle, customClass, customAttribute } = inlineHtml;
2557
+ const inlineHtmlAnnotation = new InlineHtmlAnnotation(htmlTag);
2558
+ inlineHtmlAnnotation.child = child ? InlineHtmlAnnotation.from(child)[1] : undefined;
2559
+ inlineHtmlAnnotation.customAttribute = customAttribute
2560
+ ? CustomAttributeAnnotation.from(customAttribute)[1]
2561
+ : undefined;
2562
+ inlineHtmlAnnotation.customClass = customClass
2563
+ ? CustomClassAnnotation.from(customClass)[1]
2564
+ : undefined;
2565
+ inlineHtmlAnnotation.customStyle = customStyle
2566
+ ? CustomStyleAnnotation.from(customStyle)[1]
2567
+ : undefined;
2568
+ return [NodeAnnotationTypeEnum.INLINE_HTML, inlineHtmlAnnotation];
2569
+ }
2570
+ /**
2571
+ * Create a new inline HTML annotation
2572
+ *
2573
+ * @returns {InlineHtmlAnnotation} - Inline HTML annotation
2574
+ */
2575
+ clone() {
2576
+ var _a, _b, _c, _d;
2577
+ const inlineHtmlAnnotation = new InlineHtmlAnnotation(this.htmlTag);
2578
+ inlineHtmlAnnotation.child = (_a = this.child) === null || _a === void 0 ? void 0 : _a.clone();
2579
+ inlineHtmlAnnotation.customAttribute = (_b = this.customAttribute) === null || _b === void 0 ? void 0 : _b.clone();
2580
+ inlineHtmlAnnotation.customClass = (_c = this.customClass) === null || _c === void 0 ? void 0 : _c.clone();
2581
+ inlineHtmlAnnotation.customStyle = (_d = this.customStyle) === null || _d === void 0 ? void 0 : _d.clone();
2582
+ return inlineHtmlAnnotation;
2583
+ }
2584
+ /**
2585
+ * Generate the JSON representation of the annotation
2586
+ *
2587
+ * @returns {Record<string, unknown>} JSON representation of the annotation
2588
+ */
2589
+ toJSON() {
2590
+ var _a, _b, _c, _d;
2591
+ return {
2592
+ inlineHtml: cleanObject({
2593
+ htmlTag: this.htmlTag,
2594
+ child: (_a = this.child) === null || _a === void 0 ? void 0 : _a.toJSON().inlineHtml,
2595
+ customAttribute: (_b = this.customAttribute) === null || _b === void 0 ? void 0 : _b.toJSON().customAttribute,
2596
+ customClass: (_c = this.customClass) === null || _c === void 0 ? void 0 : _c.toJSON().customClass,
2597
+ customStyle: (_d = this.customStyle) === null || _d === void 0 ? void 0 : _d.toJSON().customStyle,
2598
+ }),
2599
+ };
2600
+ }
2601
+ }
2602
+
2603
+ /**
2604
+ * Split the link nodes in the corresponding link group
2605
+ */
2606
+ class LinkGroupNodeSplitStrategy extends ActionHandleStrategy {
2607
+ /**
2608
+ * Split the text node.
2609
+ *
2610
+ * @param {LinkGroupNodeSplitAction} action - The split action.
2611
+ * @param {RTETextNode} target - The text node that need to be splitted.
2612
+ */
2613
+ handleAction(action, target) {
2614
+ const linkGroupAnnotation = target.parent.getAnnotationByType(InternalAnnotationTypeEnum.LINK_GROUP);
2615
+ if (linkGroupAnnotation) {
2616
+ const currentGroupKey = target.annotationMap.get('LINK').link
2617
+ .groupKey;
2618
+ const currentLinkGroup = linkGroupAnnotation.linkGroups.get(currentGroupKey);
2619
+ if (currentLinkGroup) {
2620
+ const index = currentLinkGroup.indexOf(target);
2621
+ if (index !== -1) {
2622
+ /* istanbul ignore next */
2623
+ currentLinkGroup.splice(index, 1, ...(Array.isArray(action.splittedTextNodes)
2624
+ ? action.splittedTextNodes
2625
+ : [action.splittedTextNodes]));
2626
+ linkGroupAnnotation.linkGroups.set(currentGroupKey, currentLinkGroup);
2627
+ }
2628
+ }
2629
+ }
2630
+ }
2631
+ }
2632
+
2633
+ /**
2634
+ * Delete the corresponding link group
2635
+ */
2636
+ class DeleteLinkGroupStrategy extends ActionHandleStrategy {
2637
+ /**
2638
+ * Delete the corresponding link group
2639
+ *
2640
+ * @param {DeleteLinkGroupAction} _action - The delete link group action.
2641
+ * @param {RTETextNode} target - The text node that need to remove link annotation.
2642
+ */
2643
+ handleAction(_action, target) {
2644
+ const linkGroupAnnotation = target.parent.getAnnotationByType(InternalAnnotationTypeEnum.LINK_GROUP);
2645
+ if (linkGroupAnnotation) {
2646
+ const currentGroupKey = target.annotationMap.get(NodeAnnotationTypeEnum.LINK).link.groupKey;
2647
+ const currentLinkGroup = linkGroupAnnotation.linkGroups.get(currentGroupKey);
2648
+ if (currentLinkGroup) {
2649
+ const index = currentLinkGroup.indexOf(target);
2650
+ if (index !== -1) {
2651
+ currentLinkGroup.splice(index, 1);
2652
+ }
2653
+ if (currentLinkGroup.length === 0) {
2654
+ linkGroupAnnotation.linkGroups.delete(currentGroupKey);
2655
+ }
2656
+ if (linkGroupAnnotation.linkGroups.size === 0) {
2657
+ target.parent.annotationMap.delete(InternalAnnotationTypeEnum.LINK_GROUP);
2658
+ }
2659
+ }
2660
+ }
2661
+ target.annotationMap.delete(NodeAnnotationTypeEnum.LINK);
2662
+ }
2663
+ }
2664
+
2665
+ /**
2666
+ * Annotation to make text as plain text
2667
+ */
2668
+ class PlainTextAnnotation extends NodeAnnotation {
2669
+ constructor(plainText) {
2670
+ super();
2671
+ this.type = NodeAnnotationTypeEnum.PLAIN_TEXT;
2672
+ this.plainText = true;
2673
+ this.plainText = plainText;
2674
+ }
2675
+ /**
2676
+ * @inheritDoc
2677
+ */
2678
+ static from(plainText) {
2679
+ return [NodeAnnotationTypeEnum.PLAIN_TEXT, new PlainTextAnnotation(plainText)];
2680
+ }
2681
+ /**
2682
+ * @inheritDoc
2683
+ */
2684
+ clone() {
2685
+ return new PlainTextAnnotation(this.plainText);
2686
+ }
2687
+ /**
2688
+ * @inheritDoc
2689
+ */
2690
+ renderClass() {
2691
+ return undefined;
2692
+ }
2693
+ /**
2694
+ * @inheritDoc
2695
+ */
2696
+ renderStyle() {
2697
+ return undefined;
2698
+ }
2699
+ /**
2700
+ * @inheritDoc
2701
+ */
2702
+ toJSON() {
2703
+ return this.plainText ? { plainText: this.plainText } : undefined;
2704
+ }
2705
+ }
2706
+
2707
+ /**
2708
+ * Action to toggle the text color annotation visibility/state.
2709
+ */
2710
+ class TextColorAnnotationAction extends TextSplittableAction {
2711
+ constructor(textColor) {
2712
+ super();
2713
+ this.isFlushable = true;
2714
+ this.textColor = textColor;
2715
+ }
2716
+ /**
2717
+ * Converts the action into a text color annotation.
2718
+ *
2719
+ * @returns {Annotation} the annotation
2720
+ */
2721
+ toAnnotation() {
2722
+ return new TextColorAnnotation(this.textColor);
2723
+ }
2724
+ }
2725
+
2726
+ /**
2727
+ * Text node
2728
+ */
2729
+ class RTETextNode extends RTENode {
2730
+ constructor(id, text, parentBlock, annotationMap) {
2731
+ super(id, annotationMap);
2732
+ this.type = NodeTypeEnum.TEXT;
2733
+ this.parent = parentBlock;
2734
+ this.text = text;
2735
+ this.registerModifyStrategy();
2736
+ }
2737
+ /**
2738
+ * Determines if the given HTML tag is supported by the RTETextNode.
2739
+ *
2740
+ * @param {string} tag - The HTML tag to check.
2741
+ * @returns {boolean} `true` if the tag is supported, otherwise `false`.
2742
+ */
2743
+ static supportsHtmlTag(tag) {
2744
+ return ['span', 'code'].includes(tag);
2745
+ }
2746
+ /**
2747
+ * Creates an RTETextNode from a VegaRTETextNode with annotations and a parent RTETextBlock.
2748
+ *
2749
+ * @param {VegaRTETextNode} richText - A rich text node
2750
+ * @param {RTETextBlock} parentBlock - Parent block
2751
+ * @param {VegaRTETransformOptions} options - Optional transformation options.
2752
+ * @returns {RTETextNode} an RTETextNode
2753
+ */
2754
+ static from(richText, parentBlock, options = { autoMatchFormat: true }) {
2755
+ const textNode = new RTETextNode(richText.id, richText.text, parentBlock);
2756
+ const { annotations } = richText;
2757
+ if (annotations) {
2758
+ textNode.annotationMap = this.generateTextAnnotationMap(annotations, options, parentBlock, textNode);
2759
+ }
2760
+ return textNode;
2761
+ }
2762
+ /**
2763
+ * Generates a map of text annotations for the given set of annotations.
2764
+ *
2765
+ * @param {VegaRTETextAnnotations} annotations - The annotations to be converted into a map.
2766
+ * @param {VegaRTETransformOptions} options - Optional transformation options.
2767
+ * @param {RTETextBlock} parentBlock - The parent text block.
2768
+ * @param {RTETextNode} textNode - The text node.
2769
+ * @returns {NodeAnnotations} The map of text annotations.
2770
+ */
2771
+ static generateTextAnnotationMap(annotations, options, parentBlock, textNode) {
2772
+ return new Map(Object.keys(annotations)
2773
+ .map((type) => {
2774
+ if (type === 'link' && annotations.link && parentBlock && textNode) {
2775
+ parentBlock.apply(new LinkGroupAnnotationAction(annotations.link.groupKey, [textNode], 'link'));
2776
+ }
2777
+ return this.createAnnotationEntity(type, annotations[type], options);
2778
+ })
2779
+ .filter(isNonNullable));
2780
+ }
2781
+ /**
2782
+ * Creates different types of text annotations based on the provided type and value.
2783
+ *
2784
+ * @param {keyof VegaRTETextAnnotations} type - The key of the type.
2785
+ * @param {unknown} value - The value that will be used to create the specific type of annotation entity based on the `type` provided.
2786
+ * @param {VegaRTETransformOptions} [options] - Optional transformation options that may be used for creating the annotation entity.
2787
+ * @returns {Nullable<[RTENodeAnnotationMapKey, RTENodeAnnotationMapValue]>} Returning a nullable tuple containing a key and a
2788
+ * value from the `RTENodeAnnotationMapKey` and `RTENodeAnnotationMapValue` types.
2789
+ */
2790
+ static createAnnotationEntity(type, value, options) {
2791
+ const autoMatchFormat = !!(options && options.autoMatchFormat);
2792
+ switch (type) {
2793
+ case 'bold':
2794
+ return BoldAnnotation.from(value);
2795
+ case 'italic':
2796
+ return ItalicAnnotation.from(value);
2797
+ case 'underline':
2798
+ return UnderlineAnnotation.from(value);
2799
+ case 'strikethrough':
2800
+ return StrikethroughAnnotation.from(value);
2801
+ case 'code':
2802
+ return CodeAnnotation.from(value, autoMatchFormat);
2803
+ case 'textColor':
2804
+ return TextColorAnnotation.from(value);
2805
+ case 'link':
2806
+ return LinkAnnotation.from(value, autoMatchFormat);
2807
+ case 'inlineHtml': {
2808
+ return InlineHtmlAnnotation.from(value);
2809
+ }
2810
+ case 'plainText': {
2811
+ return PlainTextAnnotation.from(value);
2812
+ }
2813
+ }
2814
+ return RTENode.createAnnotationEntity(type, value);
2815
+ }
2816
+ /**
2817
+ * @inheritDoc
2818
+ */
2819
+ toJSON() {
2820
+ const annotations = Array.from(this.annotationMap.values())
2821
+ .filter((annotation) => annotation instanceof NodeAnnotation ||
2822
+ annotation instanceof CommonAnnotation ||
2823
+ annotation instanceof InlineHtmlAnnotation)
2824
+ .reduce((record, annotation) => {
2825
+ return Object.assign(Object.assign({}, record), annotation.toJSON());
2826
+ }, {});
2827
+ return Object.assign(Object.assign({ id: this.id }, (Object.keys(annotations).length > 0 ? { annotations } : {})), { type: 'text', text: this.text });
2828
+ }
2829
+ /**
2830
+ * @inheritDoc
2831
+ */
2832
+ toHtml() {
2833
+ const inlineHtmlAnnotation = this.getAnnotationByType(NodeAnnotationTypeEnum.INLINE_HTML);
2834
+ return inlineHtmlAnnotation ? this.renderWithWrapperStr(inlineHtmlAnnotation) : this.renderTextStr();
2835
+ }
2836
+ /**
2837
+ * Creates a new RTETextNode with the specified text and copies the parent block and annotation map from the original node.
2838
+ *
2839
+ * @param {string} text - The text content of the RTETextNode that will be created.
2840
+ * @returns {RTETextNode} An new RTETextNode
2841
+ */
2842
+ cloneWithText(text) {
2843
+ const cloned = new RTETextNode(generateUUID(), text, this.parent, super.cloneAnnotations());
2844
+ return cloned;
2845
+ }
2846
+ /**
2847
+ * @inheritDoc
2848
+ */
2849
+ clone(parent) {
2850
+ const cloned = new RTETextNode(this.id, this.text, parent, super.cloneAnnotations());
2851
+ return cloned;
2852
+ }
2853
+ /**
2854
+ * Checks if a node is empty
2855
+ *
2856
+ * @returns {boolean} It returns `true` if the node is empty
2857
+ */
2858
+ isEmpty() {
2859
+ return !this.text || this.text === ZERO_WIDTH_SPACE || this.text === '\n';
2860
+ }
2861
+ /**
2862
+ * @inheritDoc
2863
+ */
2864
+ isTextNode() {
2865
+ return true;
2866
+ }
2867
+ /**
2868
+ * @inheritDoc
2869
+ */
2870
+ getRangeEndOffset() {
2871
+ if (!this.isContentEditable() && this.parent) {
2872
+ const parent = this.parent;
2873
+ const nodeIndex = parent.children.indexOf(this);
2874
+ return nodeIndex + 1; // place the cursor after the non-editable text node;
2875
+ }
2876
+ return this.text === '\n' ? 0 : this.text.length;
2877
+ }
2878
+ /**
2879
+ * @inheritDoc
2880
+ */
2881
+ getRangeContainer() {
2882
+ const element = this.getElementRef();
2883
+ if (element) {
2884
+ if (this.isContentEditable()) {
2885
+ return element.firstChild;
2886
+ }
2887
+ else {
2888
+ return element.parentElement;
2889
+ }
2890
+ }
2891
+ }
2892
+ /**
2893
+ * @inheritDoc
2894
+ */
2895
+ isContentEditable() {
2896
+ return true;
2897
+ }
2898
+ /**
2899
+ * Registers the action strategies for the RTETextNode.
2900
+ */
2901
+ registerModifyStrategy() {
2902
+ const dtoClassName = this.constructor.name;
2903
+ if (!RTETextNode.registerActionStrategyStatus[dtoClassName]) {
2904
+ if (this.isContentEditable()) {
2905
+ ActionHandleStrategyRegistry.register(ModifyContentActionType.UPDATE_TEXT, dtoClassName, new NodeUpdateTextStrategy());
2906
+ ActionHandleStrategyRegistry.register(ModifyContentActionType.REPLACE_SELECTED_TEXT, dtoClassName, new NodeReplaceSelectedTextStrategy());
2907
+ ActionHandleStrategyRegistry.register(ModifyContentActionType.LINK_GROUP_NODE_SPLIT, dtoClassName, new LinkGroupNodeSplitStrategy());
2908
+ ActionHandleStrategyRegistry.register(LinkAnnotationAction.name, dtoClassName, new NodeUpdateAnnotationMapStrategy());
2909
+ }
2910
+ ActionHandleStrategyRegistry.register(TextSplittableAction.name, dtoClassName, new NodeSplitTextStrategy());
2911
+ ActionHandleStrategyRegistry.register(ModifyContentActionType.DELETE_LINK_GROUP, dtoClassName, new DeleteLinkGroupStrategy());
2912
+ ActionHandleStrategyRegistry.register(BoldAnnotationAction.name, dtoClassName, new NodeUpdateAnnotationMapStrategy());
2913
+ ActionHandleStrategyRegistry.register(ClearFormattingAnnotationAction.name, dtoClassName, new NodeUpdateAnnotationMapStrategy());
2914
+ ActionHandleStrategyRegistry.register(ItalicAnnotationAction.name, dtoClassName, new NodeUpdateAnnotationMapStrategy());
2915
+ ActionHandleStrategyRegistry.register(UnderlineAnnotationAction.name, dtoClassName, new NodeUpdateAnnotationMapStrategy());
2916
+ ActionHandleStrategyRegistry.register(TextColorAnnotationAction.name, dtoClassName, new NodeUpdateAnnotationMapStrategy());
2917
+ ActionHandleStrategyRegistry.register(StrikethroughAnnotationAction.name, dtoClassName, new NodeUpdateAnnotationMapStrategy());
2918
+ ActionHandleStrategyRegistry.register(CodeAnnotationAction.name, dtoClassName, new NodeUpdateAnnotationMapStrategy());
2919
+ ActionHandleStrategyRegistry.register(AnnotationAction.name, dtoClassName, new NodeUpdateAnnotationMapStrategy());
2920
+ RTETextNode.registerActionStrategyStatus[dtoClassName] = true;
2921
+ }
2922
+ }
2923
+ /**
2924
+ * @inheritDoc
2925
+ */
2926
+ doAnnotationActionApply(action) {
2927
+ const selectionRangeAnnotation = this.getAnnotationByType(InternalAnnotationTypeEnum.SELECTION_RANGE);
2928
+ if (action instanceof TextSplittableAction && action.doSplit && selectionRangeAnnotation) {
2929
+ const splitStrategy = ActionHandleStrategyRegistry.get(TextSplittableAction.name, this.constructor.name);
2930
+ if (splitStrategy) {
2931
+ const newNode = splitStrategy.execute(action, this);
2932
+ if (newNode) {
2933
+ this.applyActionToNode(newNode, action);
2934
+ }
2935
+ }
2936
+ }
2937
+ else {
2938
+ this.applyActionToNode(this, action);
2939
+ }
2940
+ if (typeof this.parent.mergeNodes === 'function') {
2941
+ this.parent.mergeNodes(action);
2942
+ }
2943
+ }
2944
+ /**
2945
+ * @inheritDoc
2946
+ */
2947
+ doModifyActionApply(action) {
2948
+ ActionHandleStrategyRegistry.executeTheStrategy(action, this);
2949
+ }
2950
+ /**
2951
+ * Apply action to node
2952
+ *
2953
+ * @param {RTETextNode} node - Text node
2954
+ * @param {AnnotationAction} action - AnnotationAction
2955
+ */
2956
+ applyActionToNode(node, action) {
2957
+ const annotation = action.toAnnotation();
2958
+ if (action instanceof SyncUpSelectionAction) {
2959
+ this.syncUpSelectedNodes(node);
2960
+ return;
2961
+ }
2962
+ // Sync up RTETextNode selected state to selection controller for any action apply, except selection range change.
2963
+ if (!(annotation instanceof SelectionRangeAnnotation)) {
2964
+ this.syncUpSelectedNodes(node);
2965
+ }
2966
+ /**
2967
+ * 1. Try to get the specific strategy for the action and node type first (e.g., LinkAnnotationAction on RTETextNode).
2968
+ * 2. If no specific strategy found, try to get the generic NodeUpdateAnnotationMapStrategy for AnnotationAction on RTETextNode.
2969
+ */
2970
+ const strategy = ActionHandleStrategyRegistry.get(action.constructor.name, node.constructor.name);
2971
+ if (strategy) {
2972
+ strategy.execute(action, node);
2973
+ return;
2974
+ }
2975
+ const updateAnnotationMapStrategy = ActionHandleStrategyRegistry.get(AnnotationAction.name, RTETextNode.name);
2976
+ if (updateAnnotationMapStrategy) {
2977
+ updateAnnotationMapStrategy.execute(action, node);
2978
+ return;
2979
+ }
2980
+ }
2981
+ /**
2982
+ * Sync up the selected node by change manager
2983
+ *
2984
+ * @param {RTETextNode} selectedNode - The selected node
2985
+ */
2986
+ syncUpSelectedNodes(selectedNode) {
2987
+ const currentNodeDom = this.getElementRef();
2988
+ if (currentNodeDom) {
2989
+ const nodeSubject = domNodeSubjectFactory.getSubjectFromParentNodeByEventId(currentNodeDom, VegaInternalRichTextEditorSelectionRangeChange);
2990
+ if (nodeSubject) {
2991
+ ChangeManager.notify(nodeSubject, { node: selectedNode });
2992
+ }
2993
+ }
2994
+ }
2995
+ /**
2996
+ * Render the text node with the inline HTML wrapper.
2997
+ *
2998
+ * @param {VegaInlineHtmlSchema} inlineHtmlNode - The inline HTML schema to wrap the text node.
2999
+ * @returns {string} The HTML string representation of the text node wrapped with the inline HTML.
3000
+ */
3001
+ renderWithWrapperStr(inlineHtmlNode) {
3002
+ const { htmlTag, customAttribute, customClass, customStyle, child } = inlineHtmlNode;
3003
+ const attrs = [
3004
+ ...((customAttribute === null || customAttribute === void 0 ? void 0 : customAttribute.toString()) || []),
3005
+ customClass === null || customClass === void 0 ? void 0 : customClass.toString(),
3006
+ customStyle === null || customStyle === void 0 ? void 0 : customStyle.toString(),
3007
+ ].filter(isNonNullable);
3008
+ const attrStr = attrs.length > 0 ? ` ${attrs.join(' ')}` : '';
3009
+ if (!child) {
3010
+ return `<${htmlTag}${attrStr}>${this.renderTextStr()}</${htmlTag}>`;
3011
+ }
3012
+ return `<${htmlTag}${attrStr}>${this.renderWithWrapperStr(child)}</${htmlTag}>`;
3013
+ }
3014
+ /**
3015
+ * Generates the HTML representation of the text node.
3016
+ *
3017
+ * @returns {string} The HTML string representation of the text node.
3018
+ */
3019
+ renderTextStr() {
3020
+ var _a;
3021
+ const NodeTag = ((_a = this.getAnnotationByType(NodeAnnotationTypeEnum.CODE)) === null || _a === void 0 ? void 0 : _a.code)
3022
+ ? 'code'
3023
+ : 'span';
3024
+ const attrStr = super.generateAttributeString();
3025
+ // If the text contains a newline character, we need to replace it with a <br> tag.
3026
+ if (this.text === '\n') {
3027
+ return `<br>`;
3028
+ }
3029
+ return this.shouldRenderAsPlainText() ? this.text : `<${NodeTag}${attrStr}>${this.text}</${NodeTag}>`;
3030
+ }
3031
+ /**
3032
+ * Determines if the text node should be rendered as plain text.
3033
+ *
3034
+ * @returns {boolean} `true` if the text node should be rendered as plain text, otherwise `false`.
3035
+ */
3036
+ shouldRenderAsPlainText() {
3037
+ const plainTextAnnotation = super.getAnnotationByType(NodeAnnotationTypeEnum.PLAIN_TEXT);
3038
+ if (plainTextAnnotation) {
3039
+ return (plainTextAnnotation.plainText &&
3040
+ Array.from(this.annotationMap.values()).filter((annotation) => (annotation instanceof NodeAnnotation &&
3041
+ !(annotation instanceof LinkAnnotation) &&
3042
+ !(annotation instanceof PlainTextAnnotation)) ||
3043
+ annotation instanceof CommonAnnotation).length === 0);
3044
+ }
3045
+ else {
3046
+ return false;
3047
+ }
3048
+ }
3049
+ }
3050
+ RTETextNode.registerActionStrategyStatus = {};
3051
+ RTETextNode.htmlTag = 'span';
3052
+
3053
+ /**
3054
+ * Append children to a block or rte content
3055
+ *
3056
+ * @example parent.apply(new AppendChildrenAction([newChildren]))
3057
+ */
3058
+ class AppendChildrenAction extends ModifyContentAction {
3059
+ constructor(childNodes) {
3060
+ super();
3061
+ this.type = ModifyContentActionType.APPEND_CHILDREN;
3062
+ this.entityToBeAppended = childNodes;
3063
+ }
3064
+ }
3065
+
3066
+ /**
3067
+ * Text style annotation
3068
+ */
3069
+ class TextStyleAnnotation extends BlockAnnotation {
3070
+ constructor(textStyle) {
3071
+ super();
3072
+ this.type = BlockAnnotationTypeEnum.TEXT_STYLE;
3073
+ this.textStyle = textStyle;
3074
+ }
3075
+ /**
3076
+ * Generate the map item for the annotations
3077
+ *
3078
+ * @param {VegaRTETextStyleType} textStyle - the text style type
3079
+ * @returns {[BlockAnnotationTypeEnum.TEXT_STYLE, TextStyleAnnotation]} Map item for the annotation
3080
+ */
3081
+ static from(textStyle) {
3082
+ return [BlockAnnotationTypeEnum.TEXT_STYLE, new TextStyleAnnotation(textStyle)];
3083
+ }
3084
+ /**
3085
+ * Get the default styles for a given text style type.
3086
+ *
3087
+ * @param {VegaRTETextStyleType} textStyle - The text style type.
3088
+ * @returns {Nullable<AnnotationStyle>} The default styles for the given text style type.
3089
+ */
3090
+ static getDefaultStyles(textStyle) {
3091
+ const textStyleBase = {
3092
+ fontFamily: 'Inter',
3093
+ fontSize: '16px',
3094
+ lineHeight: '22px',
3095
+ minHeight: '22px',
3096
+ fontWeight: '500',
3097
+ };
3098
+ const paragraphStyle = Object.assign(Object.assign({}, textStyleBase), { marginTop: '0px', marginBottom: '0px' });
3099
+ switch (textStyle) {
3100
+ case 'paragraph': {
3101
+ return paragraphStyle;
3102
+ }
3103
+ case 'title': {
3104
+ return Object.assign(Object.assign({}, textStyleBase), { fontSize: '36px', lineHeight: '40px', minHeight: '40px' });
3105
+ }
3106
+ case 'subtitle': {
3107
+ return Object.assign(Object.assign({}, textStyleBase), { fontSize: '28px', lineHeight: '32px', minHeight: '32px' });
3108
+ }
3109
+ case 'heading-1': {
3110
+ return Object.assign(Object.assign({}, paragraphStyle), { fontSize: '22px', lineHeight: '24px', minHeight: '24px' });
3111
+ }
3112
+ case 'heading-2': {
3113
+ return Object.assign(Object.assign({}, paragraphStyle), { fontSize: '20px', lineHeight: '24px', minHeight: '24px' });
3114
+ }
3115
+ case 'heading-3': {
3116
+ return Object.assign(Object.assign({}, paragraphStyle), { fontSize: '18px' });
3117
+ }
3118
+ case 'heading-4': {
3119
+ return Object.assign({}, paragraphStyle);
3120
+ }
3121
+ case 'heading-5': {
3122
+ return Object.assign(Object.assign({}, paragraphStyle), { fontSize: '14px' });
3123
+ }
3124
+ case 'heading-6': {
3125
+ return Object.assign(Object.assign({}, paragraphStyle), { fontSize: '12px' });
3126
+ }
3127
+ default:
3128
+ return null;
3129
+ }
3130
+ }
3131
+ /**
3132
+ * Generate the JSON representation of the annotation
3133
+ *
3134
+ * @returns {Nullable<Record<string, unknown>>} JSON representation of the annotation
3135
+ */
3136
+ toJSON() {
3137
+ return { textStyle: this.textStyle };
3138
+ }
3139
+ /**
3140
+ * @inheritDoc
3141
+ */
3142
+ clone() {
3143
+ return new TextStyleAnnotation(this.textStyle);
3144
+ }
3145
+ /**
3146
+ * @inheritDoc
3147
+ */
3148
+ renderClass(options) {
3149
+ if (options === null || options === void 0 ? void 0 : options.standalone)
3150
+ return null;
3151
+ return this.textStyle ? `v-rte--text-style-${this.textStyle}` : null;
3152
+ }
3153
+ /**
3154
+ * @inheritDoc
3155
+ */
3156
+ renderStyle(options) {
3157
+ if (!(options === null || options === void 0 ? void 0 : options.standalone))
3158
+ return null;
3159
+ return this.textStyle ? TextStyleAnnotation.getDefaultStyles(this.textStyle) : null;
3160
+ }
3161
+ }
3162
+
3163
+ /**
3164
+ * Action to change the text style of a block
3165
+ */
3166
+ class TextStyleAnnotationAction extends AnnotationAction {
3167
+ constructor(textStyle, bold) {
3168
+ super();
3169
+ this.isFlushable = true;
3170
+ this.textStyle = textStyle;
3171
+ this.bold = bold;
3172
+ }
3173
+ /**
3174
+ * Converts the action to a block annotation
3175
+ *
3176
+ * @returns {BlockAnnotation} the block annotation
3177
+ */
3178
+ toAnnotation() {
3179
+ return new TextStyleAnnotation(this.textStyle);
3180
+ }
3181
+ }
3182
+
3183
+ /**
3184
+ * Update the text block text style strategy.
3185
+ */
3186
+ class BlockUpdateTextStyleStrategy extends ActionHandleStrategy {
3187
+ /**
3188
+ * Update the text block type and add or remove the bold style from child nodes.
3189
+ *
3190
+ * @param {TextStyleAnnotationAction} action - The text style annotation action.
3191
+ * @param {RTETextBlock} target - The current text block.
3192
+ */
3193
+ handleAction(action, target) {
3194
+ if (target.type !== 'list-item') {
3195
+ target.type = action.textStyle;
3196
+ }
3197
+ if (action.bold) {
3198
+ target.children.forEach((node) => {
3199
+ const boldAnnotationAction = new BoldAnnotationAction(true);
3200
+ boldAnnotationAction.doSplit = false;
3201
+ node.apply(boldAnnotationAction);
3202
+ });
3203
+ }
3204
+ else {
3205
+ target.children.forEach((node) => {
3206
+ node.apply(new DeleteNodeAnnotationAction(NodeAnnotationTypeEnum.BOLD));
3207
+ });
3208
+ }
3209
+ this.updateCustomStyleAnnotation(target, ['fontFamily', 'lineHeight', 'fontWeight', 'fontSize']);
3210
+ }
3211
+ }
3212
+
3213
+ /**
3214
+ * Update the text block link group annotation strategy.
3215
+ */
3216
+ class BlockUpdateLinkGroupStrategy extends ActionHandleStrategy {
3217
+ /**
3218
+ * Update link group after the child link node update.
3219
+ *
3220
+ * @param {LinkGroupAnnotationAction} action - The link group annotation action instance.
3221
+ * @param {RTETextBlock} target - The current text block.
3222
+ */
3223
+ handleAction(action, target) {
3224
+ let linkGroupAnnotation = target.getAnnotationByType(InternalAnnotationTypeEnum.LINK_GROUP);
3225
+ if (action.type === 'update_link') {
3226
+ if (linkGroupAnnotation) {
3227
+ const linkGroup = linkGroupAnnotation.linkGroups.get(action.groupKey);
3228
+ if (linkGroup) {
3229
+ linkGroupAnnotation.linkGroups.set(action.groupKey, [linkGroup[0]]);
3230
+ }
3231
+ }
3232
+ }
3233
+ else {
3234
+ if (linkGroupAnnotation) {
3235
+ const linkGroup = linkGroupAnnotation.linkGroups.get(action.groupKey) || [];
3236
+ linkGroupAnnotation.linkGroups.set(action.groupKey, [...linkGroup, ...action.nodes]);
3237
+ }
3238
+ else {
3239
+ linkGroupAnnotation = action.toAnnotation();
3240
+ linkGroupAnnotation.linkGroups.set(action.groupKey, [...action.nodes]);
3241
+ }
3242
+ target.annotationMap.set(InternalAnnotationTypeEnum.LINK_GROUP, linkGroupAnnotation);
3243
+ }
3244
+ }
3245
+ }
3246
+
3247
+ /**
3248
+ * Insert a new children after a existing children
3249
+ *
3250
+ * @example parent.apply(new InsertChildrenAfterAction(existingChildren, newChildren, ...))
3251
+ */
3252
+ class InsertChildrenAfterAction extends ModifyContentAction {
3253
+ constructor(referBlock, ...blocksToBeInserted) {
3254
+ super();
3255
+ this.type = ModifyContentActionType.INSERT_CHILDREN_AFTER;
3256
+ this.referChildren = referBlock;
3257
+ this.childrenToBeInserted = blocksToBeInserted;
3258
+ }
3259
+ }
3260
+
3261
+ /**
3262
+ * Clear the current block nodes and append new nodes
3263
+ *
3264
+ * @example block.apply(new ReplaceChildNodesAction(newNodes))
3265
+ */
3266
+ class ReplaceChildNodesAction extends ModifyContentAction {
3267
+ constructor(newChildNodes) {
3268
+ super();
3269
+ this.type = ModifyContentActionType.REPLACE_CHILD_NODES;
3270
+ this.newChildNodes = newChildNodes;
3271
+ }
3272
+ }
3273
+
3274
+ /**
3275
+ * Split the current node with a special position strategy.
3276
+ */
3277
+ class BlockSplitWithTextNodeStrategy extends ActionHandleStrategy {
3278
+ /**
3279
+ * @inheritDoc
3280
+ */
3281
+ handleAction(action, target) {
3282
+ action.newBlock = this.splitTextNodeBlock(action.splitPointNode, action.startOffsetOfNode, target);
3283
+ }
3284
+ /**
3285
+ * Splits a text node at a specified offset within a block of nodes and returns a new block with the split nodes.
3286
+ *
3287
+ * @param {RTETextNode} splitNode - The text node that will be split
3288
+ * @param {number} startOffsetOfNode - The index at which will split the text content of the `splitNode`.
3289
+ * @param {RTETextBlock} textBlock - The text block need to be splited.
3290
+ * @returns {Nullable<RTEBlock>} return either an RTEBlock object or null.
3291
+ */
3292
+ splitTextNodeBlock(splitNode, startOffsetOfNode, textBlock) {
3293
+ if (splitNode) {
3294
+ const beforeText = splitNode.text.slice(0, startOffsetOfNode);
3295
+ const afterText = splitNode.text.slice(startOffsetOfNode);
3296
+ const nodesSplitIndex = textBlock.children.indexOf(splitNode);
3297
+ if (nodesSplitIndex > -1) {
3298
+ const beforeNodes = textBlock.children.slice(0, nodesSplitIndex);
3299
+ const afterNodes = textBlock.children.slice(nodesSplitIndex + 1);
3300
+ if (beforeText) {
3301
+ beforeNodes.push(splitNode.cloneWithText(beforeText));
3302
+ }
3303
+ if (afterText) {
3304
+ afterNodes.unshift(splitNode.cloneWithText(afterText));
3305
+ }
3306
+ textBlock.apply(new ReplaceChildNodesAction(beforeNodes));
3307
+ const newBlock = textBlock.cloneWithNodes(afterNodes);
3308
+ textBlock.parent.apply(new InsertChildrenAfterAction(textBlock, newBlock));
3309
+ return newBlock;
3310
+ }
3311
+ }
3312
+ }
3313
+ }
3314
+
3315
+ /**
3316
+ * Remove all nodes and append new nodes strategy.
3317
+ */
3318
+ class BlockReplaceNodesStrategy extends ActionHandleStrategy {
3319
+ /**
3320
+ * Empty the text block or image block nodes and add new nodes.
3321
+ *
3322
+ * @param {ReplaceChildNodesAction} action - The replace child nodes action instance.
3323
+ * @param {RTETextBlock | RTEImageBlock} target - The text block or the image block.
3324
+ */
3325
+ handleAction(action, target) {
3326
+ target.children = [];
3327
+ target.apply(new AppendChildrenAction(action.newChildNodes));
3328
+ }
3329
+ }
3330
+
3331
+ /**
3332
+ * Remove a children from the current block
3333
+ *
3334
+ * @example needRemovedChildren.parent.apply(new RemoveChildrenAction(needRemovedChildren))
3335
+ */
3336
+ class RemoveChildrenAction extends ModifyContentAction {
3337
+ constructor(childNode) {
3338
+ super();
3339
+ this.type = ModifyContentActionType.DELETE_CHILDREN;
3340
+ this.entityToBeRemoved = childNode;
3341
+ }
3342
+ }
3343
+
3344
+ /**
3345
+ * Append the second block child nodes to the first block child nodes and remove the second block strategy.
3346
+ */
3347
+ class BlockMergeNodesStrategy extends ActionHandleStrategy {
3348
+ /**
3349
+ * Merges the child nodes of two RTEBlocks if they have the same type or both are not images.
3350
+ *
3351
+ * @param {MergeTwoBlocksNodesAction} action - The merge block nodes action instance.
3352
+ * @param {RTETextBlock | RTEImageBlock} target - The first text block or image block.
3353
+ */
3354
+ handleAction(action, target) {
3355
+ const anotherBlock = action.blockNeedToBeMerged;
3356
+ if (target.type === anotherBlock.type || (target.type !== 'image' && anotherBlock.type !== 'image')) {
3357
+ let shouldMergeNodes = anotherBlock.children;
3358
+ if (anotherBlock.type !== 'image') {
3359
+ shouldMergeNodes = anotherBlock.children.filter((node) => node.text);
3360
+ }
3361
+ target.apply(new AppendChildrenAction(shouldMergeNodes));
3362
+ anotherBlock.parent.apply(new RemoveChildrenAction(anotherBlock));
3363
+ }
3364
+ }
3365
+ }
3366
+
3367
+ /**
3368
+ * Insert a line break node into current text block at special position strategy.
3369
+ */
3370
+ class BlockInsertLineBreakStrategy extends ActionHandleStrategy {
3371
+ /**
3372
+ * @inheritDoc
3373
+ */
3374
+ handleAction(action, target) {
3375
+ action.lineBreakNode = this.lineBreakSingleBlock(action.startContainerNode, action.startOffset, target);
3376
+ }
3377
+ /**
3378
+ * lineBreakSingleBlock
3379
+ *
3380
+ * @param {RTETextNode} splitNode -
3381
+ * @param {number} startOffsetOfNode -
3382
+ * @param {RTETextBlock} target -
3383
+ * @returns {Nullable<RTETextNode>} Nullable<RTETextNode>
3384
+ */
3385
+ lineBreakSingleBlock(splitNode, startOffsetOfNode, target) {
3386
+ if (splitNode) {
3387
+ const lineBreakNode = new RTETextNode(generateUUID(), '\n', target);
3388
+ const beforeText = splitNode.text.slice(0, startOffsetOfNode);
3389
+ const afterText = splitNode.text.slice(startOffsetOfNode);
3390
+ const nodesSplitIndex = target.children.indexOf(splitNode);
3391
+ if (nodesSplitIndex > -1) {
3392
+ const beforeNodes = target.children.slice(0, nodesSplitIndex);
3393
+ const afterNodes = target.children.slice(nodesSplitIndex + 1);
3394
+ if (beforeText) {
3395
+ beforeNodes.push(splitNode.cloneWithText(beforeText));
3396
+ }
3397
+ if (afterText) {
3398
+ afterNodes.unshift(splitNode.cloneWithText(afterText));
3399
+ }
3400
+ this.mergeLineBreakNodes(beforeNodes, lineBreakNode, afterNodes, target);
3401
+ }
3402
+ return lineBreakNode;
3403
+ }
3404
+ }
3405
+ /**
3406
+ * mergeLineBreakNodes
3407
+ *
3408
+ * @param {RTENode[]} beforeNodes -
3409
+ * @param {RTETextNode} lineBreakNode -
3410
+ * @param {RTENode[]} afterNodes -
3411
+ * @param {RTETextBlock} target -
3412
+ */
3413
+ mergeLineBreakNodes(beforeNodes, lineBreakNode, afterNodes, target) {
3414
+ if (afterNodes.length === 0 || (afterNodes[0] && afterNodes[0].text === '')) {
3415
+ afterNodes.push(new RTETextNode(generateUUID(), '\n', target, beforeNodes[beforeNodes.length - 1] && beforeNodes[beforeNodes.length - 1].annotationMap));
3416
+ }
3417
+ target.apply(new ReplaceChildNodesAction([...beforeNodes, lineBreakNode, ...afterNodes]));
3418
+ }
3419
+ }
3420
+
3421
+ /**
3422
+ * Insert a line break node into multiple blocks selection at special position strategy.
3423
+ */
3424
+ class BlockInsertLineBreakWithBlocksStrategy extends ActionHandleStrategy {
3425
+ /**
3426
+ * @inheritDoc
3427
+ */
3428
+ handleAction(action, target) {
3429
+ action.lineBreakNode = this.lineBreakMultipleBlocks(action.selectedBlocks, target);
3430
+ }
3431
+ /**
3432
+ * lineBreakMultipleBlocks
3433
+ *
3434
+ * @param {RTEBlock[]} selectedBlocks -
3435
+ * @param {RTETextBlock} target -
3436
+ * @returns {Nullable<RTETextNode>} Nullable<RTETextNode>
3437
+ */
3438
+ lineBreakMultipleBlocks(selectedBlocks, target) {
3439
+ const beforeNodes = target.children;
3440
+ const lineBreakNode = new RTETextNode(generateUUID(), '\n', target);
3441
+ const afterNodes = this.concatBlocksNodes(selectedBlocks.slice(1));
3442
+ this.mergeLineBreakNodes(beforeNodes, lineBreakNode, afterNodes, target);
3443
+ return lineBreakNode;
3444
+ }
3445
+ /**
3446
+ * Concat the child nodes of multiple RTEBlocks if both are not images.
3447
+ *
3448
+ * @param {RTEBlock[]} blocks - multiple block of content in a rich text editor, such as a paragraph, heading, image, etc.
3449
+ * @returns {RTENode[]} Array of connected block nodes
3450
+ */
3451
+ concatBlocksNodes(blocks) {
3452
+ const nodes = [];
3453
+ blocks.map((block) => {
3454
+ if (block.type !== 'image') {
3455
+ nodes.push(...block.children);
3456
+ block.parent.apply(new RemoveChildrenAction(block));
3457
+ }
3458
+ });
3459
+ return nodes;
3460
+ }
3461
+ /**
3462
+ * mergeLineBreakNodes
3463
+ *
3464
+ * @param {RTENode[]} beforeNodes -
3465
+ * @param {RTETextNode} lineBreakNode -
3466
+ * @param {RTENode[]} afterNodes -
3467
+ * @param {RTETextBlock} target -
3468
+ */
3469
+ mergeLineBreakNodes(beforeNodes, lineBreakNode, afterNodes, target) {
3470
+ if (afterNodes.length === 0 || (afterNodes[0] && afterNodes[0].text === '')) {
3471
+ afterNodes.push(new RTETextNode(generateUUID(), '\n', target, beforeNodes[beforeNodes.length - 1] && beforeNodes[beforeNodes.length - 1].annotationMap));
3472
+ }
3473
+ target.apply(new ReplaceChildNodesAction([...beforeNodes, lineBreakNode, ...afterNodes]));
3474
+ }
3475
+ }
3476
+
3477
+ /**
3478
+ * Insert a children before a existing children
3479
+ *
3480
+ * @example parent.apply(new InsertChildrenBeforeAction(existingChildren, newChildren, ...))
3481
+ */
3482
+ class InsertChildrenBeforeAction extends ModifyContentAction {
3483
+ constructor(referChildren, ...childrenToBeInserted) {
3484
+ super();
3485
+ this.type = ModifyContentActionType.INSERT_CHILDREN_BEFORE;
3486
+ this.referChildren = referChildren;
3487
+ this.childrenToBeInserted = childrenToBeInserted;
3488
+ }
3489
+ }
3490
+
3491
+ /**
3492
+ * Split the block with a split point node.
3493
+ * The property `newBlock` use to store the new create block if need.
3494
+ *
3495
+ * @example block.apply(new SplitBlockWithNodeAction(node, offset))
3496
+ */
3497
+ class SplitBlockWithNodeAction extends ModifyContentAction {
3498
+ constructor(splitPointNode, startOffsetOfNode) {
3499
+ super();
3500
+ this.type = ModifyContentActionType.SPLIT_BLOCK_WITH_NODE;
3501
+ this.splitPointNode = splitPointNode;
3502
+ this.startOffsetOfNode = startOffsetOfNode;
3503
+ }
3504
+ }
3505
+
3506
+ /**
3507
+ * Insert a image block into the text block at special position strategy.
3508
+ */
3509
+ class BlockInsertImageIntoTextStrategy extends ActionHandleStrategy {
3510
+ /**
3511
+ * insertImage
3512
+ *
3513
+ * @param {InsertImageToBlockAction} action - Insert image action instance.
3514
+ * @param {RTETextBlock} target - The text block.
3515
+ */
3516
+ handleAction(action, target) {
3517
+ const splitNode = action.splitPointNode;
3518
+ const startOffsetOfNode = action.startOffsetOfNode;
3519
+ const newImageBlock = action.imageBlockToBeInserted;
3520
+ if (this.isCaretPositionAtBlockEnd(target, splitNode, startOffsetOfNode)) {
3521
+ target.parent.apply(new InsertChildrenAfterAction(target, newImageBlock));
3522
+ }
3523
+ else if (this.isCaretPositionAtBlockStart(target, splitNode, startOffsetOfNode)) {
3524
+ target.parent.apply(new InsertChildrenBeforeAction(target, newImageBlock));
3525
+ }
3526
+ else {
3527
+ const splitBlockAction = new SplitBlockWithNodeAction(splitNode, startOffsetOfNode);
3528
+ target.apply(splitBlockAction);
3529
+ target.parent.apply(new InsertChildrenAfterAction(target, newImageBlock));
3530
+ }
3531
+ }
3532
+ }
3533
+
3534
+ /**
3535
+ * Convert the selected blocks to list strategy.
3536
+ */
3537
+ class BlockTransformToListStrategy extends ActionHandleStrategy {
3538
+ /**
3539
+ * This method will create a empty list block and append all selected blocks as list item block.
3540
+ *
3541
+ * @param {TransformListAction} action - The transform list action instance.
3542
+ * @param {RTETextBlock} target - The first item of the selected block.
3543
+ */
3544
+ handleAction(action, target) {
3545
+ const contentState = target.parent;
3546
+ const bulletList = contentState.createList(action.listType);
3547
+ const selectedBlocks = action.selectedBlocks;
3548
+ const listItems = selectedBlocks.map((block) => contentState.toListItem(block));
3549
+ bulletList.apply(new AppendChildrenAction(listItems));
3550
+ contentState.apply(new InsertChildrenAfterAction(action.selectedBlocks[0], bulletList));
3551
+ selectedBlocks.forEach((block) => {
3552
+ block.parent.apply(new RemoveChildrenAction(block));
3553
+ });
3554
+ }
3555
+ }
3556
+
3557
+ /**
3558
+ * Action to toggle block horizontal alignment annotation
3559
+ */
3560
+ class HorizontalAlignmentAnnotationAction extends AnnotationAction {
3561
+ constructor(textAlign) {
3562
+ super();
3563
+ this.isFlushable = true;
3564
+ this.textAlign = textAlign;
3565
+ }
3566
+ /**
3567
+ * Converts the action to an annotation
3568
+ *
3569
+ * @returns {HorizontalAlignmentAnnotation} The annotation
3570
+ */
3571
+ toAnnotation() {
3572
+ return new HorizontalAlignmentAnnotation(this.textAlign);
3573
+ }
3574
+ }
3575
+
3576
+ /**
3577
+ * Update the text block and image block horizontal alignment strategy.
3578
+ */
3579
+ class BlockUpdateHorizontalAlignmentStrategy extends ActionHandleStrategy {
3580
+ /**
3581
+ * Updating the horizontal alignment of a block requires cascading updates to the custom style.
3582
+ *
3583
+ * @param {HorizontalAlignmentAnnotationAction} _action - The horizontal alignment annotation action.
3584
+ * @param {RTETextBlock} target - The current text block.
3585
+ */
3586
+ handleAction(_action, target) {
3587
+ this.updateCustomStyleAnnotation(target, ['textAlign']);
3588
+ }
3589
+ }
3590
+
3591
+ /**
3592
+ * Update the text block and image block horizontal alignment strategy.
3593
+ */
3594
+ class BlockUpdateIndentStrategy extends ActionHandleStrategy {
3595
+ /**
3596
+ * Updating the indent of a block requires cascading updates to the custom style.
3597
+ *
3598
+ * @param {IndentAnnotationAction} _action - The indent annotation action.
3599
+ * @param {RTETextBlock} target - The current text block.
3600
+ */
3601
+ handleAction(_action, target) {
3602
+ this.updateCustomStyleAnnotation(target, ['marginLeft']);
3603
+ }
3604
+ }
3605
+
3606
+ /**
3607
+ * Action to toggle block indent annotation
3608
+ */
3609
+ class IndentAnnotationAction extends AnnotationAction {
3610
+ constructor(indent) {
3611
+ super();
3612
+ this.isFlushable = true;
3613
+ this.indent = indent;
3614
+ }
3615
+ /**
3616
+ * Converts the action to an annotation
3617
+ *
3618
+ * @returns {Annotation} The annotation
3619
+ */
3620
+ toAnnotation() {
3621
+ return new IndentAnnotation(this.indent);
3622
+ }
3623
+ }
3624
+
3625
+ /**
3626
+ * Unlink the text block link group annotation strategy.
3627
+ */
3628
+ class BlockUnlinkLinkGroupStrategy extends ActionHandleStrategy {
3629
+ /**
3630
+ * Unlink the link group based on group key
3631
+ *
3632
+ * @param {UnlinkLinkGroupAction} action - The unlink link group action instance.
3633
+ * @param {RTETextBlock} target - The current text block.
3634
+ */
3635
+ handleAction(action, target) {
3636
+ const linkGroupAnnotation = target.getAnnotationByType(InternalAnnotationTypeEnum.LINK_GROUP);
3637
+ if (linkGroupAnnotation) {
3638
+ if (linkGroupAnnotation.linkGroups.size > 1) {
3639
+ linkGroupAnnotation.linkGroups.delete(action.groupKey);
3640
+ }
3641
+ else {
3642
+ target.annotationMap.delete(InternalAnnotationTypeEnum.LINK_GROUP);
3643
+ }
3644
+ }
3645
+ }
3646
+ }
3647
+
3648
+ /**
3649
+ * Text block
3650
+ */
3651
+ class RTETextBlock extends RTEBlock {
3652
+ constructor(id, type, options) {
3653
+ super(id);
3654
+ this.children = [];
3655
+ this.type = type;
3656
+ const { autoMatchFormat } = options || { autoMatchFormat: true };
3657
+ if (autoMatchFormat) {
3658
+ if (RTETextBlock.isAcceptableTextStyle(type)) {
3659
+ this.annotationMap = new Map([TextStyleAnnotation.from(type)]);
3660
+ }
3661
+ else {
3662
+ this.annotationMap = new Map([TextStyleAnnotation.from('paragraph')]);
3663
+ }
3664
+ }
3665
+ }
3666
+ /**
3667
+ * Converts a VegaRTETextBlock into an RTETextBlock.
3668
+ *
3669
+ * @param {VegaRTETextBlock} block - The block object
3670
+ * @param {VegaRTETransformOptions} options - Optional transformation options.
3671
+ * @returns {RTETextBlock} A RTETextBlock class
3672
+ */
3673
+ static from(block, options = { autoMatchFormat: true }) {
3674
+ var _a, _b;
3675
+ const textBlock = new RTETextBlock(block.id, block.type, options);
3676
+ const annotations = options.autoMatchFormat
3677
+ ? Object.assign(Object.assign({}, block.annotations), { textStyle: (_b = (_a = block.annotations) === null || _a === void 0 ? void 0 : _a.textStyle) !== null && _b !== void 0 ? _b : textBlock.type }) : block.annotations;
3678
+ textBlock.children = block.nodes
3679
+ .map((richText) => {
3680
+ const NodeClass = RTEDTOClassManager$1.getRTENodeClass(richText.type);
3681
+ if (NodeClass) {
3682
+ return NodeClass.from(richText, textBlock, options);
3683
+ }
3684
+ })
3685
+ .filter(isNonNullable);
3686
+ if (annotations) {
3687
+ super.convertAnnotationsToMap(textBlock.annotationMap, annotations);
3688
+ }
3689
+ return textBlock;
3690
+ }
3691
+ /**
3692
+ * The function `createAnnotationEntity` creates a block annotation entity based on the provided type
3693
+ * and value.
3694
+ *
3695
+ * @param {keyof VegaRTEBlockAnnotations} type - The `type` parameter is a key of the `VegaRTEBlockAnnotations` enum, which specifies
3696
+ * the type of annotation entity to create.
3697
+ * @param {unknown} value - The `value` parameter in the `createAnnotationEntity` function is the value
3698
+ * that will be used to create the annotation entity. It can be of any type depending on the specific
3699
+ * annotation being created.
3700
+ * @returns {Nullable<BlockAnnotationsEntity>} The `createAnnotationEntity` function returns a nullable tuple containing a
3701
+ * `BlockAnnotationTypeEnum` and a `BlockAnnotation` object.
3702
+ */
3703
+ static createAnnotationEntity(type, value) {
3704
+ if (type === 'textStyle') {
3705
+ return TextStyleAnnotation.from(value);
3706
+ }
3707
+ else {
3708
+ return super.createAnnotationEntity(type, value);
3709
+ }
3710
+ }
3711
+ /**
3712
+ * Checks if a given text block type is one of the acceptable text styles.
3713
+ *
3714
+ * @param {VegaRTETextBlockType} type - The text block type
3715
+ * @returns {boolean} Return a boolean value indicating whether the `type` parameter is valid.
3716
+ */
3717
+ static isAcceptableTextStyle(type) {
3718
+ return [
3719
+ 'title',
3720
+ 'subtitle',
3721
+ 'paragraph',
3722
+ 'heading-1',
3723
+ 'heading-2',
3724
+ 'heading-3',
3725
+ 'heading-4',
3726
+ 'heading-5',
3727
+ 'heading-6',
3728
+ ].includes(type);
3729
+ }
3730
+ /**
3731
+ * Merges RTETextNode nodes based on certain conditions.
3732
+ *
3733
+ * @param {AnnotationAction} action - AnnotationAction
3734
+ */
3735
+ mergeNodes(action) {
3736
+ this.children = this.children.reduce((prev, cur) => {
3737
+ const lastNode = prev.at(-1);
3738
+ if (action instanceof LinkAnnotationAction && action.needMergeNode) {
3739
+ const lastNodeLinkAnnotation = lastNode === null || lastNode === void 0 ? void 0 : lastNode.getAnnotationByType(NodeAnnotationTypeEnum.LINK);
3740
+ const curNodeLinkAnnotation = cur.getAnnotationByType(NodeAnnotationTypeEnum.LINK);
3741
+ if (lastNodeLinkAnnotation &&
3742
+ curNodeLinkAnnotation &&
3743
+ lastNodeLinkAnnotation.toEqual(curNodeLinkAnnotation)) {
3744
+ return prev;
3745
+ }
3746
+ }
3747
+ // TODO: handle other cases like merge bold nodes
3748
+ return [...prev, cur];
3749
+ }, []);
3750
+ }
3751
+ /**
3752
+ * @inheritDoc
3753
+ */
3754
+ toJSON() {
3755
+ return Object.assign(Object.assign({}, super.toJSON()), { type: this.type, nodes: this.children.map((node) => node.toJSON()) });
3756
+ }
3757
+ /**
3758
+ * @inheritDoc
3759
+ */
3760
+ toHtml() {
3761
+ const BlockTag = this.getBlockTag();
3762
+ const attrStr = super.generateAttributeString();
3763
+ const nodesHtml = this.getChildrenHtml();
3764
+ return super.shouldRenderAsInternalWrapper()
3765
+ ? nodesHtml
3766
+ : [`<${BlockTag}${attrStr}>`, nodesHtml, `</${BlockTag}>`].join('');
3767
+ }
3768
+ /**
3769
+ * Clone the nodes to a new block
3770
+ *
3771
+ * @param {RTEBlock} nodes - The nodes will be copied
3772
+ * @returns {RTETextBlock} New block
3773
+ */
3774
+ cloneWithNodes(nodes) {
3775
+ const block = new RTETextBlock(generateUUID(), this.type);
3776
+ block.annotationMap = super.cloneAnnotations();
3777
+ block.apply(new AppendChildrenAction(nodes));
3778
+ return block;
3779
+ }
3780
+ /**
3781
+ * @inheritDoc
3782
+ */
3783
+ clone(parent) {
3784
+ const clonedBlock = new RTETextBlock(this.id, this.type);
3785
+ clonedBlock.children = this.children.map((node) => node.clone(clonedBlock));
3786
+ clonedBlock.annotationMap = super.cloneAnnotations();
3787
+ clonedBlock.parent = parent;
3788
+ return clonedBlock;
3789
+ }
3790
+ /**
3791
+ * @inheritDoc
3792
+ */
3793
+ isNotEmpty() {
3794
+ return this.children.length > 0 && this.children.some((node) => !node.isEmpty());
3795
+ }
3796
+ /**
3797
+ * @inheritDoc
3798
+ */
3799
+ getLastNode() {
3800
+ return this.children[this.children.length - 1];
3801
+ }
3802
+ /**
3803
+ * Get the HTML tag for the block based on its type.
3804
+ *
3805
+ * @returns {RTETextBlockTagType} The HTML tag for the block.
3806
+ */
3807
+ getBlockTag() {
3808
+ switch (this.type) {
3809
+ case 'title':
3810
+ case 'subtitle':
3811
+ return `div`;
3812
+ case 'heading-1':
3813
+ return `h1`;
3814
+ case 'heading-2':
3815
+ return `h2`;
3816
+ case 'heading-3':
3817
+ return `h3`;
3818
+ case 'heading-4':
3819
+ return `h4`;
3820
+ case 'heading-5':
3821
+ return `h5`;
3822
+ case 'heading-6':
3823
+ return `h6`;
3824
+ case 'paragraph':
3825
+ default:
3826
+ return 'p';
3827
+ }
3828
+ }
3829
+ /**
3830
+ * Get the HTML string for the children nodes, including handling link group annotations.
3831
+ *
3832
+ * @returns {string} The HTML string representing the children nodes.
3833
+ */
3834
+ getChildrenHtml() {
3835
+ const linkGroupAnnotation = this.getAnnotationByType(InternalAnnotationTypeEnum.LINK_GROUP);
3836
+ let nodesHtml = this.children.map((node) => node.toHtml()).join('');
3837
+ if (linkGroupAnnotation && this.children.length > 0) {
3838
+ nodesHtml = this.generateLinkHtml(linkGroupAnnotation, nodesHtml);
3839
+ }
3840
+ return nodesHtml;
3841
+ }
3842
+ /**
3843
+ * @inheritDoc
3844
+ */
3845
+ doAnnotationActionApply(action) {
3846
+ const strategy = ActionHandleStrategyRegistry.get(action.constructor.name, RTETextBlock.name);
3847
+ if (strategy) {
3848
+ strategy.execute(action, this);
3849
+ }
3850
+ }
3851
+ /**
3852
+ * Generate Link Html
3853
+ *
3854
+ * @param {LinkGroupAnnotation} linkGroupAnnotation - linkGroupAnnotation
3855
+ * @param {string} nodesHtml - The nodes html
3856
+ * @returns {string} link html
3857
+ */
3858
+ generateLinkHtml(linkGroupAnnotation, nodesHtml) {
3859
+ nodesHtml = '';
3860
+ let linkGroupNodes = [];
3861
+ for (let i = 0; i < this.children.length; i++) {
3862
+ const currentLinkAnnotation = this.children[i].getAnnotationByType(NodeAnnotationTypeEnum.LINK);
3863
+ const nextLinkAnnotation = this.children[i + 1]
3864
+ ? this.children[i + 1].getAnnotationByType(NodeAnnotationTypeEnum.LINK)
3865
+ : null;
3866
+ if (currentLinkAnnotation) {
3867
+ linkGroupNodes.push(this.children[i]);
3868
+ if (!nextLinkAnnotation ||
3869
+ currentLinkAnnotation.link.groupKey !== nextLinkAnnotation.link.groupKey) {
3870
+ const linkAttributes = linkGroupAnnotation.toString(currentLinkAnnotation, {
3871
+ standalone: true,
3872
+ });
3873
+ nodesHtml += [
3874
+ `<a${linkAttributes ? ` ${linkAttributes}` : ''}>`,
3875
+ linkGroupNodes.map((linkNode) => linkNode.toHtml()).join(''),
3876
+ `</a>`,
3877
+ ].join('');
3878
+ linkGroupNodes = [];
3879
+ }
3880
+ }
3881
+ else {
3882
+ nodesHtml += this.children[i].toHtml();
3883
+ }
3884
+ }
3885
+ return nodesHtml;
3886
+ }
3887
+ }
3888
+ (() => {
3889
+ ActionHandleStrategyRegistry.register(TextStyleAnnotationAction.name, RTETextBlock.name, new BlockUpdateTextStyleStrategy());
3890
+ ActionHandleStrategyRegistry.register(HorizontalAlignmentAnnotationAction.name, RTETextBlock.name, new BlockUpdateHorizontalAlignmentStrategy());
3891
+ ActionHandleStrategyRegistry.register(IndentAnnotationAction.name, RTETextBlock.name, new BlockUpdateIndentStrategy());
3892
+ ActionHandleStrategyRegistry.register(LinkGroupAnnotationAction.name, RTETextBlock.name, new BlockUpdateLinkGroupStrategy());
3893
+ ActionHandleStrategyRegistry.register(ModifyContentActionType.UNLINK_LINK_GROUP, RTETextBlock.name, new BlockUnlinkLinkGroupStrategy());
3894
+ ActionHandleStrategyRegistry.register(ModifyContentActionType.SPLIT_BLOCK_WITH_NODE, RTETextBlock.name, new BlockSplitWithTextNodeStrategy());
3895
+ ActionHandleStrategyRegistry.register(ModifyContentActionType.REPLACE_CHILD_NODES, RTETextBlock.name, new BlockReplaceNodesStrategy());
3896
+ ActionHandleStrategyRegistry.register(ModifyContentActionType.MERGE_TWO_BLOCKS_NODES, RTETextBlock.name, new BlockMergeNodesStrategy());
3897
+ ActionHandleStrategyRegistry.register(ModifyContentActionType.LINE_BREAK_SINGLE_BLOCK, RTETextBlock.name, new BlockInsertLineBreakStrategy());
3898
+ ActionHandleStrategyRegistry.register(ModifyContentActionType.LINE_BREAK_MULTIPLE_BLOCKS, RTETextBlock.name, new BlockInsertLineBreakWithBlocksStrategy());
3899
+ ActionHandleStrategyRegistry.register(ModifyContentActionType.INSERT_IMAGE_TO_BLOCK, RTETextBlock.name, new BlockInsertImageIntoTextStrategy());
3900
+ ActionHandleStrategyRegistry.register(ModifyContentActionType.TRANSFORM_LIST_BLOCK, RTETextBlock.name, new BlockTransformToListStrategy());
3901
+ })();
3902
+
3903
+ /**
3904
+ * The delete node content contains some common functions that used for image block delete the image node or text block delete text node.
3905
+ */
3906
+ class BlockDeleteNodeContentStrategy extends ActionHandleStrategy {
3907
+ /**
3908
+ * Returns the previous node relative to the current node in a rich text editor structure.
3909
+ *
3910
+ * @param {RTENode} currentNode - An object of type `RTENode`.
3911
+ * @returns {Nullable<RTENode>} the previous block last node
3912
+ */
3913
+ getPreviousNode(currentNode) {
3914
+ const currentBlock = currentNode.parent;
3915
+ const currentIndex = currentBlock.children.indexOf(currentNode);
3916
+ if (currentIndex > 0) {
3917
+ return currentBlock.children[currentIndex - 1];
3918
+ }
3919
+ else if (currentBlock.parent) {
3920
+ const previousBlock = this.getPreviousBlock(currentBlock);
3921
+ if (previousBlock) {
3922
+ return this.getBlockLastNode(previousBlock);
3923
+ }
3924
+ }
3925
+ }
3926
+ /**
3927
+ * Returns the next node relative to the current node in a rich text editor structure.
3928
+ *
3929
+ * @param {RTENode} currentNode - An object of type `RTENode`.
3930
+ * @returns {Nullable<RTENode>} the next block first node
3931
+ */
3932
+ getNextNode(currentNode) {
3933
+ const currentBlock = currentNode.parent;
3934
+ const currentIndex = currentBlock.children.indexOf(currentNode);
3935
+ if (currentBlock.children[currentIndex + 1]) {
3936
+ return currentBlock.children[currentIndex + 1];
3937
+ }
3938
+ else if (currentBlock.parent) {
3939
+ const nextBlock = this.getNextBlock(currentBlock);
3940
+ if (nextBlock) {
3941
+ return this.getBlockFirstNode(nextBlock);
3942
+ }
3943
+ }
3944
+ }
3945
+ /**
3946
+ * Determines if a given node is the first node within the current state.
3947
+ *
3948
+ * @param {RTENode} currentNode - An object representing a node in a rich text editor (RTE).
3949
+ * @returns {boolean} True or false;
3950
+ */
3951
+ isContentFirstNode(currentNode) {
3952
+ const currentBlock = currentNode.parent;
3953
+ const currentIndex = currentBlock.children.indexOf(currentNode);
3954
+ const parent = currentBlock.parent;
3955
+ if (currentBlock.isListItemBlock()) {
3956
+ const listParent = parent.parent;
3957
+ return (currentIndex === 0 &&
3958
+ Array.isArray(parent.children) &&
3959
+ parent.children[0] === currentBlock &&
3960
+ listParent['type'] !== 'list-item' &&
3961
+ Array.isArray(listParent.children) &&
3962
+ listParent.children[0] === parent);
3963
+ }
3964
+ else {
3965
+ return (currentIndex === 0 && Array.isArray(parent.children) && parent.children[0] === currentBlock);
3966
+ }
3967
+ }
3968
+ /**
3969
+ * TODO: The getPreviousBlock add nest list support
3970
+ * This function retrieves the previous block in a rich text editor, considering different scenarios such as being in a bullet list.
3971
+ *
3972
+ * @param {RTEBlock} currentBlock - Used to retrieve the previous block relative to the given `currentBlock` within a rich text editor context.
3973
+ * @returns {Nullable<RTEBlock>} The previous block if existing
3974
+ */
3975
+ getPreviousBlock(currentBlock) {
3976
+ if (currentBlock && currentBlock.parent && currentBlock.parent.children) {
3977
+ const currentBlockIndex = currentBlock.parent.children.indexOf(currentBlock);
3978
+ if (currentBlockIndex > 0) {
3979
+ return currentBlock.parent.children[currentBlockIndex - 1];
3980
+ }
3981
+ else if (this.isRTEBlock(currentBlock.parent) && currentBlockIndex === 0) {
3982
+ return this.getPreviousBlock(currentBlock.parent);
3983
+ }
3984
+ }
3985
+ }
3986
+ /**
3987
+ * Returns the last node within a given RTE block, handling different block types accordingly.
3988
+ *
3989
+ * @param {RTEBlock} currentBlock - Returns the last node within that block.
3990
+ * @returns {Nullable<RTENode>} Returns the last node of the given `currentBlock` object.
3991
+ */
3992
+ getBlockLastNode(currentBlock) {
3993
+ return currentBlock.getLastNode();
3994
+ }
3995
+ /**
3996
+ * Returns the first node within a given RTE block, handling different block types accordingly.
3997
+ *
3998
+ * @param {RTEBlock} currentBlock - Returns the first node within that block.
3999
+ * @returns {Nullable<RTENode>} Returns the first node of the given `currentBlock` object.
4000
+ */
4001
+ getBlockFirstNode(currentBlock) {
4002
+ if (currentBlock.type === 'number-list' || currentBlock.type === 'bullet-list') {
4003
+ if (currentBlock.children) {
4004
+ const firstListItem = currentBlock.children[0];
4005
+ return this.getBlockFirstNode(firstListItem);
4006
+ }
4007
+ }
4008
+ else {
4009
+ if (currentBlock.children) {
4010
+ return currentBlock.children[0];
4011
+ }
4012
+ }
4013
+ }
4014
+ /**
4015
+ * This function retrieves the next block in a rich text editor, considering different scenarios such as being in a bullet list.
4016
+ *
4017
+ * @param {RTEBlock} currentBlock - Used to retrieve the next block relative to the given `currentBlock` within a rich text editor context.
4018
+ * @returns {Nullable<RTEBlock>} The next block if existing
4019
+ */
4020
+ getNextBlock(currentBlock) {
4021
+ if (currentBlock && currentBlock.parent && currentBlock.parent.children) {
4022
+ const currentBlockIndex = currentBlock.parent.children.indexOf(currentBlock);
4023
+ if (currentBlock.parent.children[currentBlockIndex + 1]) {
4024
+ return currentBlock.parent.children[currentBlockIndex + 1];
4025
+ }
4026
+ else if (currentBlock.type === 'list-item' &&
4027
+ currentBlock.parent.children.length === currentBlockIndex + 1) {
4028
+ return this.getNextBlock(currentBlock.parent);
4029
+ }
4030
+ }
4031
+ }
4032
+ /**
4033
+ * Checks if the given instance is not the root content block.
4034
+ *
4035
+ * @param {RTEBlock | VegaRTEContent} block - The instance to check.
4036
+ * @returns {boolean} True if the block is not the root content block, false otherwise.
4037
+ */
4038
+ isRTEBlock(block) {
4039
+ return block && block.constructor.name !== 'VegaRTEContent';
4040
+ }
4041
+ }
4042
+
4043
+ /**
4044
+ * Remove the code block from the value, call this action if want to flush value after action.
4045
+ */
4046
+ class CodeBlockRemoveSelfStrategy extends BlockDeleteNodeContentStrategy {
4047
+ /**
4048
+ * @inheritDoc
4049
+ */
4050
+ handleAction(_action, target) {
4051
+ const node = target.children[0];
4052
+ const parent = target.parent;
4053
+ if (parent) {
4054
+ let focusNode = this.getPreviousNode(node);
4055
+ let offset = this.getRTENodeEndOffset(focusNode);
4056
+ if (!focusNode) {
4057
+ focusNode = this.getNextNode(node);
4058
+ offset = 0;
4059
+ }
4060
+ parent.apply(new RemoveChildrenAction(target));
4061
+ const focusElement = focusNode
4062
+ ? stateEntityRenderingRegistry.getDOMByEntity(focusNode)
4063
+ : null;
4064
+ if (parent.children.length === 0) {
4065
+ const defaultParagraph = RTETextBlock.from({
4066
+ id: generateUUID(),
4067
+ type: 'paragraph',
4068
+ nodes: [{ id: generateUUID(), type: 'text', text: '' }],
4069
+ });
4070
+ target.parent.apply(new AppendChildrenAction([defaultParagraph]));
4071
+ focusNode = defaultParagraph.children[0];
4072
+ offset = 0;
4073
+ }
4074
+ this.notifyUpdateSelection(focusNode, focusElement, offset, target);
4075
+ }
4076
+ }
4077
+ /**
4078
+ * Update the rich text next selection range.
4079
+ *
4080
+ * @param {RTENode} focusNode - The next focus node dto.
4081
+ * @param {Nullable<HTMLElement>} focusElement - The next focus element. The update selection task could run directly when the element is exist.
4082
+ * @param {number} offset - The next focus text offset.
4083
+ * @param {RTECodeBlock} target - The code block dto.
4084
+ */
4085
+ notifyUpdateSelection(focusNode, focusElement, offset, target) {
4086
+ const targetDom = stateEntityRenderingRegistry.getDOMByEntity(target);
4087
+ if (targetDom) {
4088
+ const nodeSubject = domNodeSubjectFactory.getSubjectFromParentNodeByEventId(targetDom, VegaInternalRichTextEditorSelectionRangeChange);
4089
+ if (nodeSubject) {
4090
+ ChangeManager.notify(nodeSubject, {
4091
+ node: focusNode,
4092
+ updateDirectly: focusElement ? true : false,
4093
+ offset,
4094
+ });
4095
+ }
4096
+ }
4097
+ }
4098
+ /**
4099
+ * Get the node content end offset.
4100
+ *
4101
+ * @param {Nullable<RTENode>} node - The RTENode.
4102
+ * @returns {number} - The number value.
4103
+ */
4104
+ getRTENodeEndOffset(node) {
4105
+ if (node) {
4106
+ return node.getRangeEndOffset();
4107
+ }
4108
+ return 0;
4109
+ }
4110
+ }
4111
+
4112
+ /**
4113
+ * Update the code block content or language action.
4114
+ *
4115
+ * @example codeNode.apply(new UpdateCodeBlockAction(content, language))
4116
+ */
4117
+ class UpdateCodeBlockAction extends ModifyContentAction {
4118
+ constructor(content, language) {
4119
+ super();
4120
+ this.isFlushable = true;
4121
+ this.type = ModifyContentActionType.UPDATE_CODE_BLOCK;
4122
+ this.content = content;
4123
+ this.language = language;
4124
+ }
4125
+ }
4126
+
4127
+ /**
4128
+ * Remove the line break and insert new paragraph after code block.
4129
+ */
4130
+ class SwitchOutFromCodeBlockStrategy extends ActionHandleStrategy {
4131
+ /**
4132
+ * @inheritDoc
4133
+ */
4134
+ handleAction(action, target) {
4135
+ const { content, language } = action;
4136
+ const textArray = content.split('\n');
4137
+ const updateAction = new UpdateCodeBlockAction(textArray.slice(0, textArray.length - 2).join('\n'), language);
4138
+ updateAction.isFlushable = false;
4139
+ target.children[0].apply(updateAction);
4140
+ const textBlock = RTETextBlock.from({
4141
+ id: generateUUID(),
4142
+ type: 'paragraph',
4143
+ nodes: [{ id: generateUUID(), text: '', type: 'text' }],
4144
+ });
4145
+ target.parent.apply(new InsertChildrenAfterAction(target, textBlock));
4146
+ // Focus the next text node after value update.
4147
+ const currentNodeDom = stateEntityRenderingRegistry.getDOMByEntity(target);
4148
+ if (currentNodeDom) {
4149
+ const nodeSubject = domNodeSubjectFactory.getSubjectFromParentNodeByEventId(currentNodeDom, VegaInternalRichTextEditorSelectionRangeChange);
4150
+ if (nodeSubject) {
4151
+ ChangeManager.notify(nodeSubject, { node: textBlock.children[0] });
4152
+ }
4153
+ }
4154
+ }
4155
+ }
4156
+
4157
+ /**
4158
+ * Update the language or content of code block strategy.
4159
+ */
4160
+ class UpdateCodeBlockStrategy extends ActionHandleStrategy {
4161
+ /**
4162
+ * @inheritDoc
4163
+ */
4164
+ handleAction(action, target) {
4165
+ const { content, language } = action;
4166
+ target.language = language;
4167
+ target.text = content;
4168
+ }
4169
+ }
4170
+
4171
+ /**
4172
+ * Action to change the selection range
4173
+ */
4174
+ class SelectionChangeAction extends AnnotationAction {
4175
+ constructor(range) {
4176
+ super();
4177
+ this.isFlushable = false;
4178
+ this.range = range;
4179
+ }
4180
+ /**
4181
+ * Converts the action to an annotation
4182
+ *
4183
+ * @returns {SelectionRangeAnnotation} The annotation
4184
+ */
4185
+ toAnnotation() {
4186
+ return new SelectionRangeAnnotation(this.range);
4187
+ }
4188
+ }
4189
+
4190
+ /**
4191
+ * Update the code block node annotation map strategy.
4192
+ */
4193
+ class CodeNodeSetSelectionRangeAnnotationStrategy extends ActionHandleStrategy {
4194
+ /**
4195
+ * @inheritDoc
4196
+ */
4197
+ handleAction(action, target) {
4198
+ target.annotationMap.set(InternalAnnotationTypeEnum.SELECTION_RANGE, action.toAnnotation());
4199
+ }
4200
+ }
4201
+
4202
+ /**
4203
+ * Abstract class for decorator nodes. A decorator node modifies content like an image node that will delete the whole node when the delete button is pressed.
4204
+ */
4205
+ class RTEDecoratorNode extends RTENode {
4206
+ constructor() {
4207
+ super(...arguments);
4208
+ this.type = 'decorator-node';
4209
+ this.isSelected = false;
4210
+ }
4211
+ /**
4212
+ * Check the element is a decorator node container.
4213
+ *
4214
+ * @param {HTMLElement} element - The checked element.
4215
+ * @returns {boolean} - The result of the check.
4216
+ */
4217
+ static isDecoratorNodeContainerElement(element) {
4218
+ return element && element.classList.contains(RTEDecoratorNode.DECORATOR_CONTAINER_CLASS);
4219
+ }
4220
+ /**
4221
+ * Get the decorator node element within the container.
4222
+ *
4223
+ * @param {HTMLElement} container - The container element.
4224
+ * @returns {Nullable<HTMLElement>} - The decorator node element, if found.
4225
+ */
4226
+ static getDecoratorNodeElement(container) {
4227
+ return container.querySelector(`.${RTEDecoratorNode.DECORATOR_NODE_CLASS}`);
4228
+ }
4229
+ /**
4230
+ * @inheritDoc
4231
+ */
4232
+ getRangeEndOffset() {
4233
+ return 1;
4234
+ }
4235
+ /**
4236
+ * @inheritDoc
4237
+ */
4238
+ getRangeContainer() {
4239
+ const element = this.getElementRef();
4240
+ if (element) {
4241
+ return findParent(element, `.${RTEDecoratorNode.DECORATOR_CONTAINER_CLASS}`);
4242
+ }
4243
+ }
4244
+ /**
4245
+ * The decorator node is not content editable from the outside.
4246
+ *
4247
+ * @returns {boolean} - Always returns false for decorator nodes.
4248
+ */
4249
+ isContentEditable() {
4250
+ return false;
4251
+ }
4252
+ }
4253
+ // CSS class names for the decorator node parent element
4254
+ RTEDecoratorNode.DECORATOR_CONTAINER_CLASS = 'v-internal-decorator-container';
4255
+ // CSS class names for the decorator node element
4256
+ RTEDecoratorNode.DECORATOR_NODE_CLASS = 'v-internal-decorator-node';
4257
+
4258
+ /**
4259
+ * RTE code node DTO class.
4260
+ */
4261
+ class RTECodeBlockNode extends RTEDecoratorNode {
4262
+ constructor(id, content, language, parentBlock) {
4263
+ super(id);
4264
+ this.type = NodeTypeEnum.CODE_BLOCK_NODE;
4265
+ this.text = '';
4266
+ this.annotationMap = new Map();
4267
+ this.text = content;
4268
+ this.parent = parentBlock;
4269
+ this.language = language;
4270
+ }
4271
+ /**
4272
+ * The code node toJSON method will called internal.
4273
+ *
4274
+ * @returns {VegaRTECodeNode} - An object contains content property.
4275
+ */
4276
+ toJSON() {
4277
+ return { id: this.id, type: 'text', text: this.text, language: this.language };
4278
+ }
4279
+ /**
4280
+ * @inheritDoc
4281
+ */
4282
+ toHtml() {
4283
+ return `<code style='box-sizing: border-box;color: rgba(var(--v-text-primary, 32, 54, 69, 1));text-align: left;font-family: "Roboto Mono";font-weight: 400;line-height: 22px;font-size: 16px;white-space: pre-wrap;min-height: 22px;tab-size: 2px;'>${this.text}</code>`;
4284
+ }
4285
+ /**
4286
+ * @inheritDoc
4287
+ */
4288
+ clone(parent) {
4289
+ const cloned = new RTECodeBlockNode(this.id, this.text, this.language, parent);
4290
+ return cloned;
4291
+ }
4292
+ /**
4293
+ * @inheritDoc
4294
+ */
4295
+ doAnnotationActionApply(action) {
4296
+ ActionHandleStrategyRegistry.executeTheStrategy(action, this);
4297
+ }
4298
+ /**
4299
+ * @inheritDoc
4300
+ */
4301
+ doModifyActionApply(action) {
4302
+ ActionHandleStrategyRegistry.executeTheStrategy(action, this);
4303
+ }
4304
+ }
4305
+ (() => {
4306
+ ActionHandleStrategyRegistry.register(ModifyContentActionType.UPDATE_CODE_BLOCK, RTECodeBlockNode.name, new UpdateCodeBlockStrategy());
4307
+ ActionHandleStrategyRegistry.register(SelectionChangeAction.name, RTECodeBlockNode.name, new CodeNodeSetSelectionRangeAnnotationStrategy());
4308
+ })();
4309
+
4310
+ /**
4311
+ * Insert image behind after code block strategy.
4312
+ */
4313
+ class CodeBlockInsertImageStrategy extends ActionHandleStrategy {
4314
+ /**
4315
+ * Insert image block at behind of the RTE code block.
4316
+ *
4317
+ * @param {InsertImageToBlockAction} action - The insert image action instance.
4318
+ * @param {RTECodeBlock} target - The code block.
4319
+ */
4320
+ handleAction(action, target) {
4321
+ const imageBlock = action.imageBlockToBeInserted;
4322
+ target.parent.apply(new InsertChildrenAfterAction(target, imageBlock));
4323
+ }
4324
+ }
4325
+
4326
+ var CodeLanguage;
4327
+ (function (CodeLanguage) {
4328
+ CodeLanguage["CSS"] = "css";
4329
+ CodeLanguage["HTML"] = "html";
4330
+ CodeLanguage["JavaScript"] = "js";
4331
+ CodeLanguage["JSX"] = "jsx";
4332
+ CodeLanguage["Plain Text"] = "plainText";
4333
+ CodeLanguage["TypeScript"] = "ts";
4334
+ CodeLanguage["TSX"] = "tsx";
4335
+ })(CodeLanguage || (CodeLanguage = {}));
4336
+
4337
+ /**
4338
+ * Remove the node from the text block or image block strategy.
4339
+ */
4340
+ class RemoveChildrenStrategy extends ActionHandleStrategy {
4341
+ /**
4342
+ * Remove the node or block from the parent.
4343
+ * Remove the block if the block children is empty after delete the current element.
4344
+ *
4345
+ * @param {RemoveChildrenAction} action - The remove child action instance.
4346
+ * @param {RTEBlock | VegaRTEContent} target - The parent block of the node that will be removed.
4347
+ */
4348
+ handleAction(action, target) {
4349
+ const arrayFixed = target.children;
4350
+ target.children = arrayFixed.filter((node) => node !== action.entityToBeRemoved);
4351
+ if (target.children.length === 0 && 'parent' in target && target.parent) {
4352
+ if (!target.isListItemBlock()) {
4353
+ target.parent.apply(new RemoveChildrenAction(target));
4354
+ }
4355
+ else if (!target.nestList || !target.nestList.length) {
4356
+ target.parent.apply(new RemoveChildrenAction(target));
4357
+ }
4358
+ }
4359
+ }
4360
+ }
4361
+
4362
+ /**
4363
+ * The code block DTO class.
4364
+ */
4365
+ class RTECodeBlock extends RTEBlock {
4366
+ constructor(id, content, language) {
4367
+ super(id);
4368
+ this.type = 'code-block';
4369
+ this.children = [new RTECodeBlockNode(`${id}-1`, content, language, this)];
4370
+ }
4371
+ /**
4372
+ * Converts a VegaRTECodeBlock into an RTECodeBlock.
4373
+ *
4374
+ * @param {VegaRTECodeBlock} block - The block object
4375
+ * @returns {RTECodeBlock} A RTECodeBlock class
4376
+ */
4377
+ static from(block) {
4378
+ return new RTECodeBlock(block.id, block.content, block.language);
4379
+ }
4380
+ /**
4381
+ * @inheritDoc
4382
+ */
4383
+ toJSON() {
4384
+ const { language, text } = this.children[0];
4385
+ return {
4386
+ id: this.id,
4387
+ type: 'code-block',
4388
+ content: text,
4389
+ language,
4390
+ };
4391
+ }
4392
+ /**
4393
+ * @inheritDoc
4394
+ */
4395
+ toHtml() {
4396
+ const { language = CodeLanguage['Plain Text'] } = this.children[0];
4397
+ return `<pre data-language="${language}" style="background-color: rgba(var(--v-bg-secondary, 245, 247, 247, 1)); padding: 12px">${this.children.map((node) => node.toHtml())}</pre>`;
4398
+ }
4399
+ /**
4400
+ * @inheritDoc
4401
+ */
4402
+ clone(parent) {
4403
+ const cloneCodeBlock = RTECodeBlock.from(this.toJSON());
4404
+ cloneCodeBlock.parent = parent;
4405
+ return cloneCodeBlock;
4406
+ }
4407
+ /**
4408
+ * Apply action to block
4409
+ *
4410
+ * @param {ModifyContentAction} action - modify content action.
4411
+ */
4412
+ apply(action) {
4413
+ if (action instanceof ModifyContentAction) {
4414
+ ActionHandleStrategyRegistry.executeTheStrategy(action, this);
4415
+ }
4416
+ if (action.isFlushable) {
4417
+ const domNode = stateEntityRenderingRegistry.getDOMByEntity(this);
4418
+ if (domNode) {
4419
+ const nodeSubject = domNodeSubjectFactory.getSubjectFromParentNodeByEventId(domNode, VegaInternalRichTextEditorFlushChanges);
4420
+ if (nodeSubject) {
4421
+ ChangeManager.notify(nodeSubject, {});
4422
+ }
4423
+ }
4424
+ }
4425
+ }
4426
+ /**
4427
+ * @inheritDoc
4428
+ */
4429
+ isNotEmpty() {
4430
+ return !!this.children.length;
4431
+ }
4432
+ /**
4433
+ * @inheritDoc
4434
+ */
4435
+ getLastNode() {
4436
+ return this.children[0];
4437
+ }
4438
+ /**
4439
+ * The code block is selected or not.
4440
+ *
4441
+ * @returns {boolean} - The boolean result.
4442
+ */
4443
+ isSelected() {
4444
+ return this.children[0].annotationMap.has(InternalAnnotationTypeEnum.SELECTION_RANGE);
4445
+ }
4446
+ }
4447
+ (() => {
4448
+ ActionHandleStrategyRegistry.register(ModifyContentActionType.DELETE_CODE_BLOCK, RTECodeBlock.name, new CodeBlockRemoveSelfStrategy());
4449
+ ActionHandleStrategyRegistry.register(ModifyContentActionType.DELETE_CHILDREN, RTECodeBlock.name, new RemoveChildrenStrategy());
4450
+ ActionHandleStrategyRegistry.register(ModifyContentActionType.SWITCH_OUT_FROM_CODE_BLOCK, RTECodeBlock.name, new SwitchOutFromCodeBlockStrategy());
4451
+ ActionHandleStrategyRegistry.register(ModifyContentActionType.INSERT_IMAGE_TO_BLOCK, RTECodeBlock.name, new CodeBlockInsertImageStrategy());
4452
+ })();
4453
+ RTECodeBlock.CODE_BLOCK_PLACEHOLDER_CLASS_NAME = 'code-block-placeholder-element';
4454
+
4455
+ export { TextStyleAnnotation as $, ActionHandleStrategyRegistry as A, BlockAnnotation as B, CommonAnnotationTypeEnum as C, NodeAnnotationTypeEnum as D, RTEDecoratorNode as E, NodeTypeEnum as F, CommonAnnotation as G, HorizontalAlignmentAnnotationAction as H, InsertChildrenAfterAction as I, ReplaceChildNodesAction as J, SplitBlockWithNodeAction as K, BlockDeleteNodeContentStrategy as L, ModifyContentAction as M, NodeAnnotation as N, RemoveChildrenStrategy as O, BOLD_FONT_WEIGHT_KEYWORD as P, BOLD_FONT_WEIGHT as Q, RTEDTOClassManager$1 as R, SyncUpSelectionAction as S, TextStyleAnnotationAction as T, UpdateTextAction as U, VegaRTEPresetToolbarItems as V, RTE_TEXT_COLORS as W, RTE_DEFAULT_TEXT_COLOR as X, ITALIC_FONT_STYLE as Y, STRIKETHROUGH_TEXT_DECORATION as Z, UNDERLINE_TEXT_DECORATION as _, ActionHandlerInterceptorRegistry as a, HorizontalAlignmentAnnotation as a0, CodeAnnotation as a1, LinkGroupAnnotation as a2, CodeLanguage as a3, ZERO_WIDTH_SPACE as a4, LinkAnnotationAction as a5, UpdateCodeBlockAction as a6, SelectionChangeAction as a7, TextColorAnnotationAction as a8, RTECodeBlockNode as a9, BoldAnnotationAction as aa, ItalicAnnotationAction as ab, UnderlineAnnotationAction as ac, BoldAnnotation as ad, ClearFormattingAnnotationAction as ae, CodeAnnotationAction as af, StrikethroughAnnotationAction as ag, IndentAnnotationAction as ah, RTETextNode as b, RTEBlock as c, RTETextBlock as d, RTEAnnotationStyle as e, ActionHandleStrategy as f, AppendChildrenAction as g, RTENode as h, InsertChildrenBeforeAction as i, InternalAnnotationTypeEnum as j, ModifyContentActionType as k, AnnotationAction as l, RemoveChildrenAction as m, CustomAttributeAnnotation as n, BlockUpdateTextStyleStrategy as o, BlockUpdateHorizontalAlignmentStrategy as p, BlockInsertLineBreakStrategy as q, BlockInsertLineBreakWithBlocksStrategy as r, stateEntityRenderingRegistry as s, BlockSplitWithTextNodeStrategy as t, BlockReplaceNodesStrategy as u, BlockMergeNodesStrategy as v, BlockAnnotationTypeEnum as w, CustomStyleAnnotation as x, CustomClassAnnotation as y, RTECodeBlock as z };