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