@heartlandone/vega 2.34.1 → 2.35.0-RTE-preview

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 (487) hide show
  1. package/dist/cjs/{app-globals-48582633.js → app-globals-fb3693cc.js} +22 -21
  2. package/dist/cjs/{change-manager-bda1d107.js → change-manager-a297e4d2.js} +1 -1
  3. package/dist/cjs/{child-nodes-event-prevent-slimmer-e1a6e5ad.js → child-nodes-event-prevent-slimmer-96c3c4ae.js} +3 -3
  4. package/dist/cjs/{child-nodes-notify-observer-slimmer-03a3f79e.js → child-nodes-notify-observer-slimmer-be92f366.js} +5 -5
  5. package/dist/cjs/{component-63af66ea.js → component-73a88c4e.js} +1 -1
  6. package/dist/cjs/{component-global-style-slimmer-6b64a26c.js → component-global-style-slimmer-6749808c.js} +1 -1
  7. package/dist/cjs/{component-usage-runtime-metrics-019d3c00.js → component-usage-runtime-metrics-dcb32c24.js} +1 -1
  8. package/dist/cjs/content-state-3e4467a3.js +134 -0
  9. package/dist/cjs/{create-public-api-runtime-metrics-slimmer-8c6a8fb7.js → create-public-api-runtime-metrics-slimmer-54c3f73b.js} +2 -2
  10. package/dist/cjs/{date-ffe382a4.js → date-0a6bb035.js} +1 -1
  11. package/dist/cjs/{deprecated-property-slimmer-f36e3779.js → deprecated-property-slimmer-fc729fd9.js} +2 -2
  12. package/dist/cjs/{design-token-908e3f69.js → design-token-30c069c1.js} +3 -3
  13. package/dist/cjs/{dom-node-subject-observer-factory-093462f1.js → dom-node-subject-factory-3ec114b8.js} +1 -41
  14. package/dist/cjs/dom-node-subject-observer-factory-5f0eae19.js +44 -0
  15. package/dist/cjs/{dynamic-slimmer-dc30600a.js → dynamic-slimmer-f31fdfd7.js} +1 -1
  16. package/dist/cjs/{element-appender-slimmer-0dd70e61.js → element-appender-slimmer-700b7004.js} +6 -6
  17. package/dist/cjs/{event-emit-slimmer-a46bb411.js → event-emit-slimmer-9c223f73.js} +7 -6
  18. package/dist/cjs/{feature-flag-controller-e97b5f29.js → feature-flag-controller-7b22e598.js} +1 -1
  19. package/dist/cjs/{form-field-controller-slimmer-9aeabcdc.js → form-field-controller-slimmer-7ef32059.js} +16 -15
  20. package/dist/cjs/global-slimmer-registry-b3bce7e0.js +297 -0
  21. package/dist/cjs/{icon-manager-36dcfb65.js → icon-manager-edc2400b.js} +2 -2
  22. package/dist/cjs/{text-color-toolbar-button-slimmer-21a166e4.js → image-annotation-action-d3e1699c.js} +78 -27
  23. package/dist/cjs/{global-slimmer-registry-dd2691b8.js → index-09acd3c9.js} +282 -296
  24. package/dist/cjs/index.cjs.js +27 -28
  25. package/dist/cjs/{inject-keyboard-manager-af37c861.js → inject-keyboard-manager-4a5c27a2.js} +1 -1
  26. package/dist/cjs/{internal-icon-manager-2282a62f.js → internal-icon-manager-5ccb9443.js} +1 -1
  27. package/dist/cjs/{internal-vega-event-manager-d7643ec6.js → internal-vega-event-manager-e5e4bcf4.js} +72 -72
  28. package/dist/cjs/{internal-vega-z-index-manager-e24e4309.js → internal-vega-z-index-manager-f03ddb37.js} +1 -1
  29. package/dist/cjs/{keyboard-manager-5afbc8f1.js → keyboard-manager-2df53b2f.js} +1 -1
  30. package/dist/cjs/{keyboard-manager-slimmer-9be2a880.js → keyboard-manager-slimmer-feba3a83.js} +2 -2
  31. package/dist/cjs/{content-state-6a5b9736.js → list-block-91116257.js} +1346 -402
  32. package/dist/cjs/loader.cjs.js +21 -21
  33. package/dist/cjs/{mutation-observer-slimmer-98bbbdf0.js → mutation-observer-slimmer-895b3d3e.js} +1 -1
  34. package/dist/cjs/{node.abstract-f8075f84.js → node-annotation.abstract-e5d3a859.js} +37 -48
  35. package/dist/cjs/{page-resize-observer-slimmer-e54fa9d4.js → page-resize-observer-slimmer-bb1eaebe.js} +1 -1
  36. package/dist/cjs/{remote-invocation-registry-71a45468.js → remote-invocation-registry-ff9af278.js} +3 -3
  37. package/dist/cjs/{responsive-format-facade-74079f1b.js → responsive-format-facade-4363a00d.js} +1 -1
  38. package/dist/cjs/{state-background-color-formatter-d32a1098.js → state-background-color-formatter-e585a027.js} +1 -1
  39. package/dist/cjs/{string-input-formatter-slimmer-297765c0.js → string-input-formatter-slimmer-6155c9f5.js} +1 -1
  40. package/dist/cjs/{style-formatter-5deb065f.js → style-formatter-63218b76.js} +1 -1
  41. package/dist/cjs/{sub-state-notify-slimmer-73201c53.js → sub-state-notify-slimmer-c2e08e06.js} +8 -8
  42. package/dist/cjs/{sub-state-observer-slimmer-10c0d402.js → sub-state-observer-slimmer-b97e46b5.js} +8 -8
  43. package/dist/cjs/{translation-f6b7ee84.js → translation-b9be41e0.js} +3 -3
  44. package/dist/cjs/{translation-slimmer-90f9f71f.js → translation-slimmer-ec76c5a2.js} +2 -2
  45. package/dist/cjs/{ui-b5906704.js → ui-5fd9b267.js} +1 -1
  46. package/dist/cjs/vega-accordion.cjs.entry.js +41 -39
  47. package/dist/cjs/vega-app-footer.cjs.entry.js +13 -12
  48. package/dist/cjs/vega-app-header-button.cjs.entry.js +42 -40
  49. package/dist/cjs/vega-backdrop.cjs.entry.js +9 -8
  50. package/dist/cjs/vega-banner.cjs.entry.js +36 -34
  51. package/dist/cjs/vega-bar-chart.cjs.entry.js +6 -5
  52. package/dist/cjs/vega-box.cjs.entry.js +13 -12
  53. package/dist/cjs/vega-breadcrumb.cjs.entry.js +34 -32
  54. package/dist/cjs/vega-button-circle.cjs.entry.js +25 -23
  55. package/dist/cjs/vega-button-group_2.cjs.entry.js +32 -30
  56. package/dist/cjs/vega-button-link.cjs.entry.js +26 -24
  57. package/dist/cjs/vega-button.cjs.entry.js +26 -24
  58. package/dist/cjs/vega-calendar_3.cjs.entry.js +135 -133
  59. package/dist/cjs/vega-card.cjs.entry.js +11 -10
  60. package/dist/cjs/vega-carousel.cjs.entry.js +25 -23
  61. package/dist/cjs/vega-checkbox_2.cjs.entry.js +46 -44
  62. package/dist/cjs/vega-chip.cjs.entry.js +36 -34
  63. package/dist/cjs/vega-color-picker.cjs.entry.js +26 -24
  64. package/dist/cjs/vega-combo-box.cjs.entry.js +46 -44
  65. package/dist/cjs/vega-counter-badge.cjs.entry.js +10 -9
  66. package/dist/cjs/vega-date-picker_2.cjs.entry.js +56 -54
  67. package/dist/cjs/{vega-dialog-controller-aaf1f43e.js → vega-dialog-controller-fe610705.js} +2 -2
  68. package/dist/cjs/vega-dialog_2.cjs.entry.js +47 -45
  69. package/dist/cjs/vega-divider.cjs.entry.js +11 -10
  70. package/dist/cjs/vega-dropdown_5.cjs.entry.js +132 -130
  71. package/dist/cjs/vega-env-manager-23b8b23c.js +2 -2
  72. package/dist/cjs/vega-field-error.cjs.entry.js +8 -7
  73. package/dist/cjs/vega-field-label.cjs.entry.js +22 -20
  74. package/dist/cjs/vega-file-uploader.cjs.entry.js +67 -65
  75. package/dist/cjs/vega-flex.cjs.entry.js +14 -13
  76. package/dist/cjs/vega-font.cjs.entry.js +14 -13
  77. package/dist/cjs/vega-form.cjs.entry.js +38 -36
  78. package/dist/cjs/vega-grid.cjs.entry.js +11 -10
  79. package/dist/cjs/vega-hint.cjs.entry.js +7 -6
  80. package/dist/cjs/vega-icon.cjs.entry.js +16 -15
  81. package/dist/cjs/vega-image-uploader.cjs.entry.js +51 -49
  82. package/dist/cjs/vega-input-credit-card.cjs.entry.js +37 -35
  83. package/dist/cjs/vega-input-numeric.cjs.entry.js +30 -28
  84. package/dist/cjs/vega-input-phone-number.cjs.entry.js +49 -47
  85. package/dist/cjs/vega-input-range.cjs.entry.js +40 -38
  86. package/dist/cjs/vega-input-select.cjs.entry.js +62 -60
  87. package/dist/cjs/vega-input.cjs.entry.js +46 -44
  88. package/dist/cjs/vega-item-toggle.cjs.entry.js +21 -19
  89. package/dist/cjs/vega-left-nav_5.cjs.entry.js +102 -100
  90. package/dist/cjs/vega-line-chart.cjs.entry.js +7 -6
  91. package/dist/cjs/vega-loader-wrapper_2.cjs.entry.js +16 -15
  92. package/dist/cjs/vega-page-notification_2.cjs.entry.js +20 -18
  93. package/dist/cjs/vega-pagination.cjs.entry.js +52 -50
  94. package/dist/cjs/vega-pie-chart.cjs.entry.js +7 -6
  95. package/dist/cjs/vega-popover_2.cjs.entry.js +34 -32
  96. package/dist/cjs/vega-progress-tracker.cjs.entry.js +29 -27
  97. package/dist/cjs/vega-radio_2.cjs.entry.js +50 -48
  98. package/dist/cjs/vega-rich-text-content.cjs.entry.js +321 -23
  99. package/dist/cjs/vega-rich-text-editor_4.cjs.entry.js +336 -334
  100. package/dist/cjs/vega-section-title.cjs.entry.js +15 -14
  101. package/dist/cjs/vega-segment-control.cjs.entry.js +24 -22
  102. package/dist/cjs/vega-selection-chip_2.cjs.entry.js +49 -47
  103. package/dist/cjs/vega-selection-tile_2.cjs.entry.js +61 -59
  104. package/dist/cjs/vega-sidenav_3.cjs.entry.js +46 -44
  105. package/dist/cjs/vega-signature-capture.cjs.entry.js +40 -38
  106. package/dist/cjs/{block-annotation.abstract-4d88b939.js → vega-skeleton-loader-controller-7dac484f.js} +7 -21
  107. package/dist/cjs/vega-skeleton.cjs.entry.js +26 -25
  108. package/dist/cjs/vega-slot-container.cjs.entry.js +6 -5
  109. package/dist/cjs/vega-stepper.cjs.entry.js +34 -32
  110. package/dist/cjs/vega-tab-group_2.cjs.entry.js +54 -52
  111. package/dist/cjs/vega-table_8.cjs.entry.js +184 -182
  112. package/dist/cjs/vega-text.cjs.entry.js +9 -8
  113. package/dist/cjs/vega-textarea.cjs.entry.js +34 -32
  114. package/dist/cjs/vega-time-picker_2.cjs.entry.js +83 -81
  115. package/dist/cjs/vega-toggle-switch.cjs.entry.js +23 -21
  116. package/dist/cjs/vega-tooltip_2.cjs.entry.js +20 -19
  117. package/dist/cjs/vega.cjs.js +21 -21
  118. package/dist/collection/components/vega-rich-text-content/slimmers/renderers/vega-rich-text-content-renderer.js +22 -1
  119. package/dist/collection/components/vega-rich-text-editor/dto/annotations/link-group-annotation.js +0 -90
  120. package/dist/collection/components/vega-rich-text-editor/dto/blocks/block.abstract.js +0 -24
  121. package/dist/collection/components/vega-rich-text-editor/dto/blocks/image-block.js +67 -13
  122. package/dist/collection/components/vega-rich-text-editor/dto/blocks/list-block.js +45 -12
  123. package/dist/collection/components/vega-rich-text-editor/dto/blocks/list-item-block.js +68 -8
  124. package/dist/collection/components/vega-rich-text-editor/dto/blocks/text-block.js +111 -36
  125. package/dist/collection/components/vega-rich-text-editor/dto/nodes/image-node.js +23 -50
  126. package/dist/collection/components/vega-rich-text-editor/dto/nodes/node.abstract.js +0 -25
  127. package/dist/collection/components/vega-rich-text-editor/dto/nodes/text-node.js +95 -19
  128. package/dist/collection/components/vega-rich-text-editor/dto/renderers/blocks/block-renderer.abstract.js +37 -0
  129. package/dist/collection/components/vega-rich-text-editor/dto/renderers/blocks/image-block-renderer.js +13 -0
  130. package/dist/collection/components/vega-rich-text-editor/dto/renderers/blocks/list-block-renderer.js +12 -0
  131. package/dist/collection/components/vega-rich-text-editor/dto/renderers/blocks/list-item-block-renderer.js +16 -0
  132. package/dist/collection/components/vega-rich-text-editor/dto/renderers/blocks/text-block-renderer.js +123 -0
  133. package/dist/collection/components/vega-rich-text-editor/dto/renderers/nodes/image-node-renderer.js +48 -0
  134. package/dist/collection/components/vega-rich-text-editor/dto/renderers/nodes/node-renderer.abstract.js +37 -0
  135. package/dist/collection/components/vega-rich-text-editor/dto/renderers/nodes/text-node-renderer.js +26 -0
  136. package/dist/collection/components/vega-rich-text-editor/test/dto/blocks/image-block.test.js +0 -10
  137. package/dist/collection/components/vega-rich-text-editor/test/dto/blocks/list-block.test.js +0 -48
  138. package/dist/collection/components/vega-rich-text-editor/test/dto/blocks/list-item.test.js +0 -40
  139. package/dist/collection/components/vega-rich-text-editor/test/dto/blocks/text-block.test.js +0 -39
  140. package/dist/collection/components/vega-rich-text-editor/test/dto/nodes/image-node.test.js +0 -14
  141. package/dist/collection/components/vega-rich-text-editor/test/dto/nodes/text-node.test.js +0 -34
  142. package/dist/esm/{app-globals-48531a04.js → app-globals-5b154b6d.js} +13 -12
  143. package/dist/esm/{change-manager-8f5b72c2.js → change-manager-6a7eb88c.js} +1 -1
  144. package/dist/esm/{child-nodes-event-prevent-slimmer-8ceabe63.js → child-nodes-event-prevent-slimmer-97aae8a8.js} +3 -3
  145. package/dist/esm/{child-nodes-notify-observer-slimmer-afc15e00.js → child-nodes-notify-observer-slimmer-289caacc.js} +4 -4
  146. package/dist/esm/{component-051a594c.js → component-cae24190.js} +1 -1
  147. package/dist/esm/{component-global-style-slimmer-631f956f.js → component-global-style-slimmer-000e0c11.js} +1 -1
  148. package/dist/esm/{component-usage-runtime-metrics-21813c36.js → component-usage-runtime-metrics-385c7124.js} +1 -1
  149. package/dist/esm/content-state-f39c4bbf.js +132 -0
  150. package/dist/esm/{create-public-api-runtime-metrics-slimmer-14cb4599.js → create-public-api-runtime-metrics-slimmer-9ab05523.js} +2 -2
  151. package/dist/esm/{date-655c0af8.js → date-732bc749.js} +1 -1
  152. package/dist/esm/{deprecated-property-slimmer-9ea5019c.js → deprecated-property-slimmer-43d184b3.js} +2 -2
  153. package/dist/esm/{design-token-20fdba82.js → design-token-d06bc718.js} +3 -3
  154. package/dist/esm/{dom-node-subject-observer-factory-80358591.js → dom-node-subject-factory-5831cdd4.js} +2 -41
  155. package/dist/esm/dom-node-subject-observer-factory-dc486a8b.js +42 -0
  156. package/dist/esm/{dynamic-slimmer-85746483.js → dynamic-slimmer-90b8af32.js} +1 -1
  157. package/dist/esm/{element-appender-slimmer-4dfa326d.js → element-appender-slimmer-d71e3109.js} +6 -6
  158. package/dist/esm/{event-emit-slimmer-c03cf145.js → event-emit-slimmer-f285e3ac.js} +6 -5
  159. package/dist/esm/{feature-flag-controller-dfde0cfa.js → feature-flag-controller-4b3fe6f8.js} +1 -1
  160. package/dist/esm/{form-field-controller-slimmer-de5fe574.js → form-field-controller-slimmer-af969d03.js} +10 -9
  161. package/dist/esm/global-slimmer-registry-17c4efd4.js +283 -0
  162. package/dist/esm/{icon-manager-3cef32e7.js → icon-manager-b889176b.js} +2 -2
  163. package/dist/esm/{text-color-toolbar-button-slimmer-b2270b64.js → image-annotation-action-a8e00f28.js} +55 -6
  164. package/dist/esm/{global-slimmer-registry-6887a59f.js → index-187f71d1.js} +283 -284
  165. package/dist/esm/index.js +20 -21
  166. package/dist/esm/{inject-keyboard-manager-45309420.js → inject-keyboard-manager-b0135018.js} +1 -1
  167. package/dist/esm/{internal-icon-manager-7fc7535a.js → internal-icon-manager-900a5bb4.js} +1 -1
  168. package/dist/esm/{internal-vega-event-manager-3a3815d3.js → internal-vega-event-manager-07e1b3d9.js} +2 -2
  169. package/dist/esm/{internal-vega-z-index-manager-89e8b6f5.js → internal-vega-z-index-manager-7d2b54c3.js} +1 -1
  170. package/dist/esm/{keyboard-manager-2c06eafe.js → keyboard-manager-4c898a0d.js} +1 -1
  171. package/dist/esm/{keyboard-manager-slimmer-fd177285.js → keyboard-manager-slimmer-f80d6835.js} +2 -2
  172. package/dist/esm/{content-state-4b036bf1.js → list-block-ba82c846.js} +1225 -299
  173. package/dist/esm/loader.js +19 -19
  174. package/dist/esm/{mutation-observer-slimmer-ca2cb2e8.js → mutation-observer-slimmer-6cef9549.js} +1 -1
  175. package/dist/esm/{node.abstract-93746055.js → node-annotation.abstract-d7d52bce.js} +35 -47
  176. package/dist/esm/{page-resize-observer-slimmer-8589ebc8.js → page-resize-observer-slimmer-beb7b0bd.js} +1 -1
  177. package/dist/esm/polyfills/core-js.js +0 -0
  178. package/dist/esm/polyfills/dom.js +0 -0
  179. package/dist/esm/polyfills/es5-html-element.js +0 -0
  180. package/dist/esm/polyfills/index.js +0 -0
  181. package/dist/esm/polyfills/system.js +0 -0
  182. package/dist/esm/{remote-invocation-registry-2ec6936d.js → remote-invocation-registry-d97fa3bc.js} +2 -2
  183. package/dist/esm/{responsive-format-facade-559ec469.js → responsive-format-facade-c2ab9c87.js} +1 -1
  184. package/dist/esm/{state-background-color-formatter-16031a43.js → state-background-color-formatter-121ae7d3.js} +1 -1
  185. package/dist/esm/{string-input-formatter-slimmer-c9fb1fa1.js → string-input-formatter-slimmer-73fa06e6.js} +1 -1
  186. package/dist/esm/{style-formatter-51845b6d.js → style-formatter-f91471e8.js} +1 -1
  187. package/dist/esm/{sub-state-notify-slimmer-6e97a58a.js → sub-state-notify-slimmer-48bad548.js} +4 -4
  188. package/dist/esm/{sub-state-observer-slimmer-0968ce04.js → sub-state-observer-slimmer-403cc4e7.js} +4 -4
  189. package/dist/esm/{translation-b3fe8e74.js → translation-a98970d8.js} +3 -3
  190. package/dist/esm/{translation-slimmer-860cd766.js → translation-slimmer-5ee9912b.js} +2 -2
  191. package/dist/esm/{ui-5600b48f.js → ui-62e4be97.js} +1 -1
  192. package/dist/esm/vega-accordion.entry.js +17 -15
  193. package/dist/esm/vega-app-footer.entry.js +4 -3
  194. package/dist/esm/vega-app-header-button.entry.js +20 -18
  195. package/dist/esm/vega-backdrop.entry.js +5 -4
  196. package/dist/esm/vega-banner.entry.js +15 -13
  197. package/dist/esm/vega-bar-chart.entry.js +3 -2
  198. package/dist/esm/vega-box.entry.js +10 -9
  199. package/dist/esm/vega-breadcrumb.entry.js +13 -11
  200. package/dist/esm/vega-button-circle.entry.js +16 -14
  201. package/dist/esm/vega-button-group_2.entry.js +15 -13
  202. package/dist/esm/vega-button-link.entry.js +13 -11
  203. package/dist/esm/vega-button.entry.js +15 -13
  204. package/dist/esm/vega-calendar_3.entry.js +23 -21
  205. package/dist/esm/vega-card.entry.js +8 -7
  206. package/dist/esm/vega-carousel.entry.js +14 -12
  207. package/dist/esm/vega-checkbox_2.entry.js +19 -17
  208. package/dist/esm/vega-chip.entry.js +17 -15
  209. package/dist/esm/vega-color-picker.entry.js +16 -14
  210. package/dist/esm/vega-combo-box.entry.js +20 -18
  211. package/dist/esm/vega-counter-badge.entry.js +4 -3
  212. package/dist/esm/vega-date-picker_2.entry.js +31 -29
  213. package/dist/esm/{vega-dialog-controller-5b23f68c.js → vega-dialog-controller-34eb8967.js} +2 -2
  214. package/dist/esm/vega-dialog_2.entry.js +20 -18
  215. package/dist/esm/vega-divider.entry.js +8 -7
  216. package/dist/esm/vega-dropdown_5.entry.js +27 -25
  217. package/dist/esm/vega-env-manager-8f8dc473.js +2 -2
  218. package/dist/esm/vega-field-error.entry.js +5 -4
  219. package/dist/esm/vega-field-label.entry.js +11 -9
  220. package/dist/esm/vega-file-uploader.entry.js +19 -17
  221. package/dist/esm/vega-flex.entry.js +11 -10
  222. package/dist/esm/vega-font.entry.js +9 -8
  223. package/dist/esm/vega-form.entry.js +19 -17
  224. package/dist/esm/vega-grid.entry.js +8 -7
  225. package/dist/esm/vega-hint.entry.js +4 -3
  226. package/dist/esm/vega-icon.entry.js +11 -10
  227. package/dist/esm/vega-image-uploader.entry.js +21 -19
  228. package/dist/esm/vega-input-credit-card.entry.js +20 -18
  229. package/dist/esm/vega-input-numeric.entry.js +21 -19
  230. package/dist/esm/vega-input-phone-number.entry.js +21 -19
  231. package/dist/esm/vega-input-range.entry.js +19 -17
  232. package/dist/esm/vega-input-select.entry.js +22 -20
  233. package/dist/esm/vega-input.entry.js +18 -16
  234. package/dist/esm/vega-item-toggle.entry.js +12 -10
  235. package/dist/esm/vega-left-nav_5.entry.js +24 -22
  236. package/dist/esm/vega-line-chart.entry.js +4 -3
  237. package/dist/esm/vega-loader-wrapper_2.entry.js +7 -6
  238. package/dist/esm/vega-page-notification_2.entry.js +8 -6
  239. package/dist/esm/vega-pagination.entry.js +16 -14
  240. package/dist/esm/vega-pie-chart.entry.js +4 -3
  241. package/dist/esm/vega-popover_2.entry.js +18 -16
  242. package/dist/esm/vega-progress-tracker.entry.js +12 -10
  243. package/dist/esm/vega-radio_2.entry.js +21 -19
  244. package/dist/esm/vega-rich-text-content.entry.js +315 -17
  245. package/dist/esm/vega-rich-text-editor_4.entry.js +31 -29
  246. package/dist/esm/vega-section-title.entry.js +4 -3
  247. package/dist/esm/vega-segment-control.entry.js +12 -10
  248. package/dist/esm/vega-selection-chip_2.entry.js +21 -19
  249. package/dist/esm/vega-selection-tile_2.entry.js +21 -19
  250. package/dist/esm/vega-sidenav_3.entry.js +19 -17
  251. package/dist/esm/vega-signature-capture.entry.js +22 -20
  252. package/dist/esm/{block-annotation.abstract-b0554e2b.js → vega-skeleton-loader-controller-0aaaf1fa.js} +8 -21
  253. package/dist/esm/vega-skeleton.entry.js +4 -3
  254. package/dist/esm/vega-slot-container.entry.js +3 -2
  255. package/dist/esm/vega-stepper.entry.js +18 -16
  256. package/dist/esm/vega-tab-group_2.entry.js +14 -12
  257. package/dist/esm/vega-table_8.entry.js +25 -23
  258. package/dist/esm/vega-text.entry.js +5 -4
  259. package/dist/esm/vega-textarea.entry.js +18 -16
  260. package/dist/esm/vega-time-picker_2.entry.js +25 -23
  261. package/dist/esm/vega-toggle-switch.entry.js +16 -14
  262. package/dist/esm/vega-tooltip_2.entry.js +13 -12
  263. package/dist/esm/vega.js +19 -19
  264. package/dist/types/components/vega-rich-text-content/slimmers/renderers/vega-rich-text-content-renderer.d.ts +1 -0
  265. package/dist/types/components/vega-rich-text-editor/dto/annotations/link-group-annotation.d.ts +0 -6
  266. package/dist/types/components/vega-rich-text-editor/dto/blocks/block.abstract.d.ts +2 -15
  267. package/dist/types/components/vega-rich-text-editor/dto/blocks/image-block.d.ts +68 -4
  268. package/dist/types/components/vega-rich-text-editor/dto/blocks/list-block.d.ts +45 -3
  269. package/dist/types/components/vega-rich-text-editor/dto/blocks/list-item-block.d.ts +68 -3
  270. package/dist/types/components/vega-rich-text-editor/dto/blocks/text-block.d.ts +110 -5
  271. package/dist/types/components/vega-rich-text-editor/dto/nodes/image-node.d.ts +21 -5
  272. package/dist/types/components/vega-rich-text-editor/dto/nodes/node.abstract.d.ts +1 -14
  273. package/dist/types/components/vega-rich-text-editor/dto/nodes/text-node.d.ts +86 -2
  274. package/dist/types/components/vega-rich-text-editor/dto/renderers/blocks/block-renderer.abstract.d.ts +22 -0
  275. package/dist/types/components/vega-rich-text-editor/dto/renderers/blocks/image-block-renderer.d.ts +8 -0
  276. package/dist/types/components/vega-rich-text-editor/dto/renderers/blocks/list-block-renderer.d.ts +8 -0
  277. package/dist/types/components/vega-rich-text-editor/dto/renderers/blocks/list-item-block-renderer.d.ts +9 -0
  278. package/dist/types/components/vega-rich-text-editor/dto/renderers/blocks/text-block-renderer.d.ts +15 -0
  279. package/dist/types/components/vega-rich-text-editor/dto/renderers/nodes/image-node-renderer.d.ts +10 -0
  280. package/dist/types/components/vega-rich-text-editor/dto/renderers/nodes/node-renderer.abstract.d.ts +22 -0
  281. package/dist/types/components/vega-rich-text-editor/dto/renderers/nodes/text-node-renderer.d.ts +10 -0
  282. package/dist/vega/index.esm.js +1 -1
  283. package/dist/vega/p-000b3ab0.js +1 -0
  284. package/dist/vega/p-00738ae9.entry.js +1 -0
  285. package/dist/vega/p-01d0dbe6.entry.js +1 -0
  286. package/dist/vega/{p-b3f9cc3a.entry.js → p-0283712e.entry.js} +2 -2
  287. package/dist/vega/p-032df16f.js +1 -0
  288. package/dist/vega/p-05f5e22b.entry.js +1 -0
  289. package/dist/vega/p-0945a58d.entry.js +1 -0
  290. package/dist/vega/p-09c5de7f.entry.js +1 -0
  291. package/dist/vega/p-0a8b91f5.entry.js +1 -0
  292. package/dist/vega/{p-f763e2eb.js → p-0af4bda9.js} +1 -1
  293. package/dist/vega/p-0bd9b1d9.entry.js +1 -0
  294. package/dist/vega/p-0c2eb135.entry.js +1 -0
  295. package/dist/vega/p-0da2de05.entry.js +1 -0
  296. package/dist/vega/p-0ee10fd7.js +1 -0
  297. package/dist/vega/p-12ad8ada.entry.js +1 -0
  298. package/dist/vega/p-14514252.entry.js +1 -0
  299. package/dist/vega/{p-11a19ca0.js → p-149d2801.js} +1 -1
  300. package/dist/vega/p-14f85e30.entry.js +1 -0
  301. package/dist/vega/p-19556584.entry.js +1 -0
  302. package/dist/vega/p-1b3e0a9f.entry.js +1 -0
  303. package/dist/vega/p-1c298d5a.js +2 -0
  304. package/dist/vega/p-1d805cc0.entry.js +1 -0
  305. package/dist/vega/p-1dd9f841.entry.js +1 -0
  306. package/dist/vega/p-211df22a.entry.js +1 -0
  307. package/dist/vega/p-2205ee4c.js +1 -0
  308. package/dist/vega/p-29b09aad.js +1 -0
  309. package/dist/vega/{p-443ad3b3.js → p-2d0d575f.js} +1 -1
  310. package/dist/vega/p-2f32a9ba.js +1 -0
  311. package/dist/vega/{p-368d0060.js → p-2fbda931.js} +1 -1
  312. package/dist/vega/p-33b62194.js +1 -0
  313. package/dist/vega/p-36db2554.entry.js +1 -0
  314. package/dist/vega/p-3a6c9b9d.entry.js +1 -0
  315. package/dist/vega/p-42df8a42.js +1 -0
  316. package/dist/vega/{p-8f93242a.js → p-4387d550.js} +1 -1
  317. package/dist/vega/p-45c88f7f.entry.js +1 -0
  318. package/dist/vega/p-45dd4698.entry.js +1 -0
  319. package/dist/vega/p-465fa96d.entry.js +1 -0
  320. package/dist/vega/{p-3b4bde3e.js → p-4b500240.js} +1 -1
  321. package/dist/vega/{p-e0b25eaf.js → p-4f0b56fc.js} +1 -1
  322. package/dist/vega/p-5298fd92.entry.js +1 -0
  323. package/dist/vega/p-5915634b.js +1 -0
  324. package/dist/vega/p-5f377954.js +1 -1
  325. package/dist/vega/{p-70151c27.js → p-5f589974.js} +1 -1
  326. package/dist/vega/p-61116634.entry.js +1 -0
  327. package/dist/vega/p-618b35e4.entry.js +1 -0
  328. package/dist/vega/p-625771d7.entry.js +1 -0
  329. package/dist/vega/p-6661a462.entry.js +1 -0
  330. package/dist/vega/{p-62774231.js → p-6705c68a.js} +1 -1
  331. package/dist/vega/p-68f0aa72.entry.js +1 -0
  332. package/dist/vega/{p-59bdf9b8.js → p-6a334573.js} +1 -1
  333. package/dist/vega/p-6a3989dd.js +1 -0
  334. package/dist/vega/{p-0e0c47ad.js → p-6a5a5c7b.js} +1 -1
  335. package/dist/vega/p-6c09b79a.entry.js +1 -0
  336. package/dist/vega/p-6d23c08b.entry.js +1 -0
  337. package/dist/vega/p-6d43b123.entry.js +1 -0
  338. package/dist/vega/p-6e1ab235.js +1 -0
  339. package/dist/vega/p-71eeb279.entry.js +1 -0
  340. package/dist/vega/p-72eee5e2.js +1 -0
  341. package/dist/vega/{p-eac38d87.js → p-781fd6e0.js} +1 -1
  342. package/dist/vega/{p-1995e98e.js → p-79ec5d69.js} +1 -1
  343. package/dist/vega/p-8067bd31.entry.js +1 -0
  344. package/dist/vega/{p-3f1b542a.js → p-81dbada7.js} +1 -1
  345. package/dist/vega/{p-a6a7d0c9.js → p-8284a445.js} +1 -1
  346. package/dist/vega/p-84113217.entry.js +1 -0
  347. package/dist/vega/p-843b13e6.entry.js +1 -0
  348. package/dist/vega/p-84f2f342.js +1 -0
  349. package/dist/vega/p-85365f8b.js +1 -0
  350. package/dist/vega/p-8ab356e8.entry.js +1 -0
  351. package/dist/vega/p-8ba43640.entry.js +1 -0
  352. package/dist/vega/p-8be7b62c.entry.js +1 -0
  353. package/dist/vega/p-8d69f9ef.entry.js +1 -0
  354. package/dist/vega/p-91aa058f.entry.js +1 -0
  355. package/dist/vega/{p-8c26227e.js → p-926596cc.js} +1 -1
  356. package/dist/vega/p-92707b74.entry.js +1 -0
  357. package/dist/vega/p-96f0ef53.entry.js +1 -0
  358. package/dist/vega/p-97453cd8.entry.js +1 -0
  359. package/dist/vega/{p-843a0c1c.js → p-987fbbd0.js} +1 -1
  360. package/dist/vega/{p-296cc56b.js → p-9b797118.js} +1 -1
  361. package/dist/vega/p-a01f149d.entry.js +1 -0
  362. package/dist/vega/p-a0e90d5d.entry.js +1 -0
  363. package/dist/vega/{p-3953c705.js → p-af7a3154.js} +1 -1
  364. package/dist/vega/p-b2bca332.entry.js +1 -0
  365. package/dist/vega/p-b450bf46.entry.js +1 -0
  366. package/dist/vega/p-b5990090.js +1 -0
  367. package/dist/vega/p-b64981de.entry.js +1 -0
  368. package/dist/vega/p-b6815874.js +1 -0
  369. package/dist/vega/p-b688a71b.js +1 -0
  370. package/dist/vega/p-b9a09a76.js +1 -0
  371. package/dist/vega/p-bcb10ae3.entry.js +1 -0
  372. package/dist/vega/{p-39836361.js → p-be12fa36.js} +1 -1
  373. package/dist/vega/p-c02f650e.entry.js +1 -0
  374. package/dist/vega/p-c2b276f7.entry.js +1 -0
  375. package/dist/vega/p-c51a3e3c.entry.js +1 -0
  376. package/dist/vega/p-c88acd87.entry.js +1 -0
  377. package/dist/vega/p-cb8f8458.entry.js +1 -0
  378. package/dist/vega/p-cda26bdf.entry.js +1 -0
  379. package/dist/vega/p-d09d153f.entry.js +1 -0
  380. package/dist/vega/p-d994874a.entry.js +1 -0
  381. package/dist/vega/p-dbec03ed.entry.js +1 -0
  382. package/dist/vega/p-dcdac4d0.entry.js +1 -0
  383. package/dist/vega/p-de13b747.entry.js +1 -0
  384. package/dist/vega/p-de25326f.js +1 -0
  385. package/dist/vega/{p-e1e1fcf0.js → p-de664bdd.js} +1 -1
  386. package/dist/vega/p-e04d4ba3.entry.js +1 -0
  387. package/dist/vega/p-e8f540d8.js +1 -0
  388. package/dist/vega/p-e923637d.entry.js +1 -0
  389. package/dist/vega/p-efbea85a.entry.js +1 -0
  390. package/dist/vega/{p-81ead59a.js → p-f31bb1fd.js} +1 -1
  391. package/dist/vega/p-f690539e.entry.js +1 -0
  392. package/dist/vega/p-f6b89936.entry.js +1 -0
  393. package/dist/vega/p-f84fd31c.js +1 -0
  394. package/dist/vega/p-fe388812.entry.js +1 -0
  395. package/dist/vega/{p-acf7f903.js → p-ff4bafa3.js} +1 -1
  396. package/dist/vega/p-ff50c204.entry.js +1 -0
  397. package/dist/vega/vega.esm.js +1 -1
  398. package/package.json +3 -2
  399. package/dist/cjs/text-node-494856f3.js +0 -955
  400. package/dist/esm/text-node-a652ca87.js +0 -933
  401. package/dist/vega/p-0190095c.entry.js +0 -1
  402. package/dist/vega/p-034e6348.entry.js +0 -1
  403. package/dist/vega/p-0cd2b50f.entry.js +0 -1
  404. package/dist/vega/p-10393104.js +0 -1
  405. package/dist/vega/p-109a00cf.entry.js +0 -1
  406. package/dist/vega/p-11cb477b.js +0 -1
  407. package/dist/vega/p-1564cc4d.entry.js +0 -1
  408. package/dist/vega/p-18886765.entry.js +0 -1
  409. package/dist/vega/p-19b26168.entry.js +0 -1
  410. package/dist/vega/p-21992602.entry.js +0 -1
  411. package/dist/vega/p-22563151.entry.js +0 -1
  412. package/dist/vega/p-23795da1.entry.js +0 -1
  413. package/dist/vega/p-29277e41.entry.js +0 -1
  414. package/dist/vega/p-2a7e9422.entry.js +0 -1
  415. package/dist/vega/p-2ca6d977.entry.js +0 -1
  416. package/dist/vega/p-2e419309.entry.js +0 -1
  417. package/dist/vega/p-3039bef8.js +0 -1
  418. package/dist/vega/p-34939c97.entry.js +0 -1
  419. package/dist/vega/p-3897bb2d.entry.js +0 -1
  420. package/dist/vega/p-390c5236.entry.js +0 -1
  421. package/dist/vega/p-3ce31dc3.js +0 -1
  422. package/dist/vega/p-452e284a.js +0 -1
  423. package/dist/vega/p-4c41dd64.js +0 -1
  424. package/dist/vega/p-55beac7f.entry.js +0 -1
  425. package/dist/vega/p-57405834.entry.js +0 -1
  426. package/dist/vega/p-584dcd9b.js +0 -1
  427. package/dist/vega/p-589e6041.entry.js +0 -1
  428. package/dist/vega/p-5e95402a.entry.js +0 -1
  429. package/dist/vega/p-5eee21b4.entry.js +0 -1
  430. package/dist/vega/p-62cea2e7.entry.js +0 -1
  431. package/dist/vega/p-65b79fd7.js +0 -1
  432. package/dist/vega/p-6741e2b9.entry.js +0 -1
  433. package/dist/vega/p-6a084fe1.entry.js +0 -1
  434. package/dist/vega/p-6b286226.entry.js +0 -1
  435. package/dist/vega/p-6b722905.entry.js +0 -1
  436. package/dist/vega/p-6e4b2752.entry.js +0 -1
  437. package/dist/vega/p-7209d03b.js +0 -1
  438. package/dist/vega/p-734ea281.entry.js +0 -1
  439. package/dist/vega/p-76fc408e.entry.js +0 -1
  440. package/dist/vega/p-7a9f453e.entry.js +0 -1
  441. package/dist/vega/p-80ccd894.entry.js +0 -1
  442. package/dist/vega/p-84c597c8.entry.js +0 -1
  443. package/dist/vega/p-8836c1b9.js +0 -1
  444. package/dist/vega/p-8b78c6a3.entry.js +0 -1
  445. package/dist/vega/p-8be45a45.entry.js +0 -1
  446. package/dist/vega/p-8d7b45f7.entry.js +0 -1
  447. package/dist/vega/p-8e17b9dd.entry.js +0 -1
  448. package/dist/vega/p-8f004647.entry.js +0 -1
  449. package/dist/vega/p-925a2137.js +0 -1
  450. package/dist/vega/p-92f88033.entry.js +0 -1
  451. package/dist/vega/p-94de7a02.entry.js +0 -1
  452. package/dist/vega/p-9968e71d.entry.js +0 -1
  453. package/dist/vega/p-9c1eeff2.js +0 -2
  454. package/dist/vega/p-9d1b9e70.entry.js +0 -1
  455. package/dist/vega/p-9e732a26.entry.js +0 -1
  456. package/dist/vega/p-9f39dd10.js +0 -1
  457. package/dist/vega/p-a5ffe912.js +0 -1
  458. package/dist/vega/p-a6104aa7.js +0 -1
  459. package/dist/vega/p-a6169ad6.entry.js +0 -1
  460. package/dist/vega/p-a8bf559a.js +0 -1
  461. package/dist/vega/p-afec17ad.entry.js +0 -1
  462. package/dist/vega/p-b693c1ac.entry.js +0 -1
  463. package/dist/vega/p-b9e2add4.entry.js +0 -1
  464. package/dist/vega/p-bd894860.entry.js +0 -1
  465. package/dist/vega/p-c0d6a587.entry.js +0 -1
  466. package/dist/vega/p-c26e6820.entry.js +0 -1
  467. package/dist/vega/p-c34487e1.entry.js +0 -1
  468. package/dist/vega/p-c532b132.entry.js +0 -1
  469. package/dist/vega/p-ca2fb711.js +0 -1
  470. package/dist/vega/p-cebf93f1.entry.js +0 -1
  471. package/dist/vega/p-cfdc148a.entry.js +0 -1
  472. package/dist/vega/p-d0351d71.entry.js +0 -1
  473. package/dist/vega/p-d2ab6096.entry.js +0 -1
  474. package/dist/vega/p-d35643c5.entry.js +0 -1
  475. package/dist/vega/p-d400a1d9.entry.js +0 -1
  476. package/dist/vega/p-d6732a72.entry.js +0 -1
  477. package/dist/vega/p-d720b06a.entry.js +0 -1
  478. package/dist/vega/p-d987e404.entry.js +0 -1
  479. package/dist/vega/p-d9b86108.entry.js +0 -1
  480. package/dist/vega/p-e27e115d.entry.js +0 -1
  481. package/dist/vega/p-e65c8ac7.entry.js +0 -1
  482. package/dist/vega/p-e79057cc.js +0 -1
  483. package/dist/vega/p-e89e9769.entry.js +0 -1
  484. package/dist/vega/p-ecd64c7f.entry.js +0 -1
  485. package/dist/vega/p-f5b2e72a.entry.js +0 -1
  486. package/dist/vega/p-f6af3749.js +0 -1
  487. package/dist/vega/p-fc622a75.js +0 -1
@@ -1,933 +0,0 @@
1
- import { W as WaitForVega, A as Annotation, I as InternalAnnotationTypeEnum, N as NodeAnnotation, a as NodeAnnotationTypeEnum, V as VegaThemeManager, M as ModifyContentAction, b as ModifyContentActionType, R as RTENode, c as NodeTypeEnum, s as stateEntityRenderingRegistry } from './node.abstract-93746055.js';
2
- import { O as Observer, d as domNodeSubjectFactory, D as DomNodeSubjectObserverFactory, V as VegaChange } from './dom-node-subject-observer-factory-80358591.js';
3
- import { C as ChangeManager } from './change-manager-8f5b72c2.js';
4
- import { a as VegaInternalComponentDidRender, b as VegaInternalRichTextEditorSelectionRangeChange } from './vega-internal-event-id-4af5c6e9.js';
5
- import { h } from './global-slimmer-registry-6887a59f.js';
6
- import { g as generateUUID } from './create-public-api-runtime-metrics-slimmer-14cb4599.js';
7
- import { i as isNonNullable } from './type-guard-158f6d7a.js';
8
- import { c as createEnterKeyHandlerToTriggerClick } from './accessibility-e5fd0fab.js';
9
-
10
- /* istanbul ignore next */
11
- /**
12
- * Wait for all vega elements to be ready.
13
- *
14
- * The below method is e2e-test covered in @see{module:wait-for-vega-should-work-as-expected}
15
- */
16
- const waitForVega = async () => {
17
- return WaitForVega.handle();
18
- };
19
- /**
20
- * Wait for the component has been rendered.
21
- *
22
- * @param {HTMLStencilElement} componentRef - The reference to the component that needs to be rendered.
23
- * @returns {Promise<unknown>} A promise that resolves when the component has been rendered.
24
- */
25
- const waitForComponentDidRender = async (componentRef) => {
26
- return new Promise((resolve) => {
27
- const observer = new Observer(isAcceptableComponentDidRender.bind(null), () => {
28
- ChangeManager.unregister(domNodeSubjectFactory.getSubject(componentRef, VegaInternalComponentDidRender), observer);
29
- resolve(null);
30
- });
31
- ChangeManager.register(domNodeSubjectFactory.getSubject(componentRef, VegaInternalComponentDidRender), observer);
32
- });
33
- };
34
- /**
35
- * Determines whether the observer should accept changes.
36
- *
37
- * @returns {boolean} Always returns true in the current implementation.
38
- */
39
- const isAcceptableComponentDidRender = () => {
40
- return true;
41
- };
42
-
43
- const RTE_TEXT_COLORS = [
44
- {
45
- key: 'black',
46
- light: '#111128',
47
- dark: '#E3E3E8',
48
- },
49
- {
50
- key: 'gray',
51
- light: '#5E5E6D',
52
- dark: '#B9B9C1',
53
- },
54
- {
55
- key: 'green',
56
- light: '#01801F',
57
- dark: '#59D977',
58
- },
59
- {
60
- key: 'red',
61
- light: '#BD2947',
62
- dark: '#FFB2B5',
63
- },
64
- {
65
- key: 'purple',
66
- light: '#563D82',
67
- dark: '#BEB2FF',
68
- },
69
- {
70
- key: 'teal',
71
- light: '#17758F',
72
- dark: '#4CD8FF',
73
- },
74
- ];
75
- const ZERO_WIDTH_SPACE = '\u200b';
76
-
77
- /**
78
- * Abstract class for annotation actions
79
- */
80
- class AnnotationAction {
81
- }
82
-
83
- /**
84
- * Abstract class for which can be splittable
85
- */
86
- class TextSplittableAction extends AnnotationAction {
87
- constructor() {
88
- super(...arguments);
89
- /**
90
- * Whether the action should split the node
91
- */
92
- this.doSplit = true;
93
- }
94
- }
95
-
96
- /**
97
- * Annotation to represent a selection range
98
- */
99
- class SelectionRangeAnnotation extends Annotation {
100
- constructor(range) {
101
- super();
102
- this.type = InternalAnnotationTypeEnum.SELECTION_RANGE;
103
- this.range = range;
104
- }
105
- }
106
-
107
- /**
108
- * This class is responsible for keeping track of the DOM elements.
109
- */
110
- class TextNodeRenderingRegistry {
111
- constructor() {
112
- this.textNodeElements = new Map();
113
- }
114
- /**
115
- * Registers a DOM element and the color annotation of the DOM element.
116
- *
117
- * @param {HTMLElement} dom The DOM element to register.
118
- * @param {TextColorAnnotation} textColorAnnotation The text color annotation of text node to register.
119
- */
120
- register(dom, textColorAnnotation) {
121
- this.textNodeElements.set(dom, textColorAnnotation);
122
- }
123
- /**
124
- * Retrieves the text node elements.
125
- *
126
- * @returns {HTMLElement[]} The text node elements, or empty array.
127
- */
128
- getTextNodeElements() {
129
- return this.textNodeElements;
130
- }
131
- }
132
- const TextNodeRenderingRegistry$1 = new TextNodeRenderingRegistry();
133
-
134
- /**
135
- * Annotation to make text with strikethrough
136
- */
137
- class StrikethroughAnnotation extends NodeAnnotation {
138
- constructor(underline) {
139
- super();
140
- this.type = NodeAnnotationTypeEnum.STRIKETHROUGH;
141
- this.strikethrough = underline;
142
- }
143
- /**
144
- * Generate the map item for the annotation
145
- *
146
- * @param {Nullable<boolean>} strikethrough - Strikethrough annotation
147
- * @returns {[NodeAnnotationTypeEnum.STRIKETHROUGH, StrikethroughAnnotation]} Map item for the annotation
148
- */
149
- static from(strikethrough) {
150
- return [NodeAnnotationTypeEnum.STRIKETHROUGH, new StrikethroughAnnotation(strikethrough)];
151
- }
152
- /**
153
- * Generate the JSON representation of the annotation
154
- *
155
- * @returns {Record<string, unknown>} JSON representation of the annotation
156
- */
157
- toJSON() {
158
- return {
159
- strikethrough: this.strikethrough,
160
- };
161
- }
162
- /**
163
- * Generate the class for the annotation
164
- *
165
- * @returns {Nullable<string>} - Annotation class
166
- */
167
- renderClass() {
168
- return this.strikethrough ? 'v-rte--strikethrough' : null;
169
- }
170
- /**
171
- * Generate the style for the annotation
172
- *
173
- * @returns {Nullable<AnnotationStyle>} - Annotation style
174
- */
175
- render() {
176
- return null;
177
- }
178
- }
179
-
180
- /**
181
- * Annotation to make text with underline
182
- */
183
- class UnderlineAnnotation extends NodeAnnotation {
184
- constructor(underline) {
185
- super();
186
- this.type = NodeAnnotationTypeEnum.UNDERLINE;
187
- this.underline = underline;
188
- }
189
- /**
190
- * Generate the map item for the annotation
191
- *
192
- * @param {boolean} underline - Underline annotation
193
- * @returns {[NodeAnnotationTypeEnum.UNDERLINE, UnderlineAnnotation]} Map item for the annotation
194
- */
195
- static from(underline) {
196
- return [NodeAnnotationTypeEnum.UNDERLINE, new UnderlineAnnotation(underline)];
197
- }
198
- /**
199
- * Generate the JSON representation of the annotation
200
- *
201
- * @returns {Record<string, unknown>} JSON representation of the annotation
202
- */
203
- toJSON() {
204
- return {
205
- underline: this.underline,
206
- };
207
- }
208
- /**
209
- * Generate the class for the annotation
210
- *
211
- * @returns {Nullable<string>} - Annotation class
212
- */
213
- renderClass() {
214
- return this.underline ? 'v-rte--underline' : null;
215
- }
216
- /**
217
- * Generate the style for the annotation
218
- *
219
- * @returns {Nullable<AnnotationStyle>} - Annotation style
220
- */
221
- render() {
222
- return null;
223
- }
224
- }
225
-
226
- /**
227
- * Annotation to make text Italic
228
- */
229
- class ItalicAnnotation extends NodeAnnotation {
230
- constructor(italic) {
231
- super();
232
- this.type = NodeAnnotationTypeEnum.ITALIC;
233
- this.italic = italic;
234
- }
235
- /**
236
- * Generate the map item for the annotation
237
- *
238
- * @param {boolean} italic - Italic annotation
239
- * @returns {Nullable<[NodeAnnotationTypeEnum.ITALIC, ItalicAnnotation]>} Map item for the annotation
240
- */
241
- static from(italic) {
242
- return [NodeAnnotationTypeEnum.ITALIC, new ItalicAnnotation(italic)];
243
- }
244
- /**
245
- * Generate the JSON representation of the annotation
246
- *
247
- * @returns {Record<string, unknown>} JSON representation of the annotation
248
- */
249
- toJSON() {
250
- return {
251
- italic: this.italic,
252
- };
253
- }
254
- /**
255
- * Generate the style for the annotation
256
- *
257
- * @returns {Nullable<AnnotationStyle>} Italic style
258
- */
259
- render() {
260
- return this.italic ? { 'font-style': 'italic' } : null;
261
- }
262
- }
263
-
264
- /**
265
- * Annotation to make text bold
266
- */
267
- class BoldAnnotation extends NodeAnnotation {
268
- constructor(bold) {
269
- super();
270
- this.type = NodeAnnotationTypeEnum.BOLD;
271
- this.bold = bold;
272
- }
273
- /**
274
- * Generate the map item for the annotation
275
- *
276
- * @param {boolean} bold - Bold annotation
277
- * @returns {[NodeAnnotationTypeEnum.BOLD, BoldAnnotation]} Map item for the annotation
278
- */
279
- static from(bold) {
280
- return [NodeAnnotationTypeEnum.BOLD, new BoldAnnotation(bold)];
281
- }
282
- /**
283
- * Generate the JSON representation of the annotation
284
- *
285
- * @returns {Record<string, unknown>} JSON representation of the annotation
286
- */
287
- toJSON() {
288
- return {
289
- bold: this.bold,
290
- };
291
- }
292
- /**
293
- * Generate the style for the annotation
294
- *
295
- * @returns {Nullable<AnnotationStyle>} Bold style
296
- */
297
- render() {
298
- return this.bold ? { 'font-weight': '700' } : null;
299
- }
300
- }
301
-
302
- /**
303
- * Annotation to host which annotations will be clear formatting
304
- */
305
- class ClearFormattingAnnotation extends Annotation {
306
- constructor() {
307
- super(...arguments);
308
- this.type = InternalAnnotationTypeEnum.CLEAR_FORMATTING;
309
- this.items = [
310
- NodeAnnotationTypeEnum.BOLD,
311
- NodeAnnotationTypeEnum.ITALIC,
312
- NodeAnnotationTypeEnum.UNDERLINE,
313
- NodeAnnotationTypeEnum.STRIKETHROUGH,
314
- NodeAnnotationTypeEnum.TEXT_COLOR,
315
- NodeAnnotationTypeEnum.CODE,
316
- ];
317
- }
318
- }
319
-
320
- /**
321
- * Annotation to make text code
322
- */
323
- class CodeAnnotation extends NodeAnnotation {
324
- constructor(code) {
325
- super();
326
- this.type = NodeAnnotationTypeEnum.CODE;
327
- this.code = code;
328
- }
329
- /**
330
- * Generate the map item for the annotation
331
- *
332
- * @param {boolean} code - Bold annotation
333
- * @returns {[NodeAnnotationTypeEnum.CODE, CodeAnnotation]} Map item for the annotation
334
- */
335
- static from(code) {
336
- return [NodeAnnotationTypeEnum.CODE, new CodeAnnotation(code)];
337
- }
338
- /**
339
- * Generate the JSON representation of the annotation
340
- *
341
- * @returns {Record<string, unknown>} JSON representation of the annotation
342
- */
343
- toJSON() {
344
- return {
345
- code: this.code,
346
- };
347
- }
348
- /**
349
- * Generate the class for the annotation
350
- *
351
- * @returns {Nullable<string>} - Annotation class
352
- */
353
- renderClass() {
354
- return this.code ? 'v-rte--code' : null;
355
- }
356
- /**
357
- * Generate the style for the annotation
358
- *
359
- * @returns {Nullable<AnnotationStyle>} Bold style
360
- */
361
- render() {
362
- return null;
363
- }
364
- }
365
-
366
- /**
367
- * Annotation to make text with text color
368
- */
369
- class TextColorAnnotation extends NodeAnnotation {
370
- constructor(textColor) {
371
- super();
372
- this.type = NodeAnnotationTypeEnum.TEXT_COLOR;
373
- this.textColor = this.formatTextColor(textColor);
374
- }
375
- /**
376
- * Generate the map item for the annotation
377
- *
378
- * @param {string} textColor - text color annotation
379
- * @returns {[NodeAnnotationTypeEnum.TEXT_COLOR, TextColorAnnotation]} Map item for the annotation
380
- */
381
- static from(textColor) {
382
- return [NodeAnnotationTypeEnum.TEXT_COLOR, new TextColorAnnotation(textColor)];
383
- }
384
- /**
385
- * Generate the JSON representation of the annotation
386
- *
387
- * @returns {Record<string, unknown>} JSON representation of the annotation
388
- */
389
- toJSON() {
390
- return {
391
- textColor: this.textColor.key,
392
- };
393
- }
394
- /**
395
- * Generate the class for the annotation
396
- *
397
- * @returns {Nullable<string>} - Annotation class
398
- */
399
- renderClass() {
400
- return null;
401
- }
402
- /**
403
- * Generate the style for the annotation
404
- *
405
- * @returns {Nullable<AnnotationStyle>} - Annotation style
406
- */
407
- render() {
408
- return {
409
- color: VegaThemeManager.isDarkMode() ? this.textColor.dark : this.textColor.light,
410
- };
411
- }
412
- /**
413
- * format text color
414
- *
415
- * @param {string} textColor - text color
416
- * @returns {VegaRTEColorSchema} - VegaRTEColorSchema
417
- */
418
- formatTextColor(textColor) {
419
- return (RTE_TEXT_COLORS.find((item) => item.key === textColor) || RTE_TEXT_COLORS[0]);
420
- }
421
- }
422
-
423
- /**
424
- * Annotation to make text a link
425
- */
426
- class LinkAnnotation extends NodeAnnotation {
427
- constructor(link) {
428
- super();
429
- this.type = NodeAnnotationTypeEnum.LINK;
430
- this.link = link;
431
- }
432
- /**
433
- * Generate the map item for the annotation
434
- *
435
- * @param {VegaRTELink} link - Bold annotation
436
- * @returns {[NodeAnnotationTypeEnum.LINK, LinkAnnotation]} Map item for the annotation
437
- */
438
- static from(link) {
439
- return [
440
- NodeAnnotationTypeEnum.LINK,
441
- new LinkAnnotation({ href: link.href, groupKey: link.groupKey }),
442
- ];
443
- }
444
- /**
445
- * Generate the JSON representation of the annotation
446
- *
447
- * @returns {Record<string, unknown>} JSON representation of the annotation
448
- */
449
- toJSON() {
450
- return { link: { href: this.link.href, groupKey: this.link.groupKey } };
451
- }
452
- /**
453
- * Verify whether two link annotation is same or not
454
- *
455
- * @param {LinkAnnotation} annotation - Compared annotation
456
- * @returns {boolean} Whether two link annotation is same or not
457
- */
458
- toEqual(annotation) {
459
- return this.link.groupKey === annotation.link.groupKey;
460
- }
461
- /**
462
- * Generate the style for the annotation
463
- *
464
- * @returns {Nullable<AnnotationStyle>} Link style
465
- */
466
- render() {
467
- return null;
468
- }
469
- }
470
-
471
- /**
472
- * Action to toggle link annotation
473
- */
474
- class LinkAnnotationAction extends TextSplittableAction {
475
- constructor({ link, newText, needMergeNode, doSplit, }) {
476
- super();
477
- this.isFlushable = true;
478
- this.link = link;
479
- this.needMergeNode = needMergeNode;
480
- this.newText = newText;
481
- if (isNonNullable(doSplit)) {
482
- this.doSplit = doSplit;
483
- }
484
- }
485
- /**
486
- * Converts the action to an annotation
487
- *
488
- * @returns {LinkAnnotation} the annotation
489
- */
490
- toAnnotation() {
491
- return new LinkAnnotation(this.link);
492
- }
493
- }
494
-
495
- /**
496
- * Action to toggle code annotation
497
- */
498
- class CodeAnnotationAction extends TextSplittableAction {
499
- constructor(code) {
500
- super();
501
- this.isFlushable = true;
502
- this.code = code;
503
- }
504
- /**
505
- * Converts the action to an annotation
506
- *
507
- * @returns {CodeAnnotation} the annotation
508
- */
509
- toAnnotation() {
510
- return new CodeAnnotation(this.code);
511
- }
512
- }
513
-
514
- /**
515
- * Action to toggle clear formatting
516
- */
517
- class ClearFormattingAnnotationAction extends TextSplittableAction {
518
- constructor() {
519
- super(...arguments);
520
- this.isFlushable = true;
521
- }
522
- /**
523
- * Converts the action to an annotation
524
- *
525
- * @returns {ClearFormattingAnnotation} the annotation
526
- */
527
- toAnnotation() {
528
- return new ClearFormattingAnnotation();
529
- }
530
- }
531
-
532
- /**
533
- * Update the text node property text action
534
- *
535
- * @example textNode.apply(new UpdateTextAction(newText))
536
- */
537
- class UpdateTextAction extends ModifyContentAction {
538
- constructor(text) {
539
- super();
540
- this.type = ModifyContentActionType.UPDATE_TEXT;
541
- this.newTextContent = '';
542
- this.newTextContent = text;
543
- }
544
- }
545
-
546
- /**
547
- * Annotation to represent a link of grouped nodes
548
- */
549
- class LinkGroupAnnotation extends Annotation {
550
- constructor(groupKey) {
551
- super();
552
- this.type = InternalAnnotationTypeEnum.LINK_GROUP;
553
- this.linkGroups = new Map();
554
- this.linkGroups = new Map([[groupKey, []]]);
555
- }
556
- renderNodes(nodes, { editable }) {
557
- const blockNodes = this.groupNodesByLink(nodes);
558
- return blockNodes.flatMap((item) => {
559
- if (this.isLinkGroup(item)) {
560
- const linkAnnotation = item[0].getAnnotationByType(NodeAnnotationTypeEnum.LINK);
561
- return editable
562
- ? this.renderLinkEditorWrapper(item, linkAnnotation)
563
- : this.renderLink(item, linkAnnotation);
564
- }
565
- return item.render();
566
- });
567
- }
568
- renderLinkEditorWrapper(linkNodes, linkAnnotation) {
569
- const { href } = linkAnnotation.link;
570
- const textFromNodes = linkNodes.map((node) => node.text).join('');
571
- const handleChange = ({ detail, }) => {
572
- switch (detail.action) {
573
- case 'link': {
574
- const { url, text } = detail.payload;
575
- const textChanged = text !== textFromNodes;
576
- const groupKey = generateUUID();
577
- linkNodes.forEach((node) => {
578
- const linkAnnotationAction = new LinkAnnotationAction({
579
- link: { href: url, groupKey: groupKey },
580
- newText: textChanged ? text : undefined,
581
- needMergeNode: textChanged && linkNodes.length > 1,
582
- doSplit: false,
583
- });
584
- node.apply(linkAnnotationAction);
585
- });
586
- return;
587
- }
588
- case 'unlink': {
589
- linkNodes.forEach((node) => node.deleteAnnotationByType(NodeAnnotationTypeEnum.LINK));
590
- return;
591
- }
592
- }
593
- };
594
- let linkWrapperRef;
595
- return (h("span", { class: "link-editor-wrapper", role: "link", tabIndex: 0, onKeyDown: createEnterKeyHandlerToTriggerClick(), ref: (ref) => {
596
- if (ref) {
597
- linkWrapperRef = ref;
598
- }
599
- } },
600
- this.renderLink(linkNodes, linkAnnotation),
601
- h("vega-rich-text-link-editor", { record: {
602
- text: textFromNodes,
603
- url: href,
604
- }, ref: (ref) => {
605
- if (ref) {
606
- ref.target = linkWrapperRef;
607
- DomNodeSubjectObserverFactory.addUniqueObserverToNode(ref, VegaChange, handleChange);
608
- }
609
- } })));
610
- }
611
- renderLink(linkNodes, linkAnnotation) {
612
- const { href } = linkAnnotation.link;
613
- return (h("a", { class: "v-rte--link", href: href, target: "_blank" }, linkNodes.map((node) => node.render())));
614
- }
615
- isLinkGroup(item) {
616
- return Array.isArray(item);
617
- }
618
- groupNodesByLink(nodes) {
619
- return nodes.reduce((acc, node) => {
620
- const nodeLinkAnnotation = node.getAnnotationByType(NodeAnnotationTypeEnum.LINK);
621
- const lastGroup = acc[acc.length - 1];
622
- if (isNonNullable(nodeLinkAnnotation)) {
623
- if (lastGroup &&
624
- this.isLinkGroup(lastGroup) &&
625
- lastGroup[0].getAnnotationByType(NodeAnnotationTypeEnum.LINK).toEqual(nodeLinkAnnotation)) {
626
- lastGroup.push(node);
627
- }
628
- else {
629
- acc.push([node]);
630
- }
631
- }
632
- else {
633
- acc.push(node);
634
- }
635
- return acc;
636
- }, []);
637
- }
638
- }
639
-
640
- /**
641
- * Action to link a group of nodes
642
- */
643
- class LinkGroupAnnotationAction extends AnnotationAction {
644
- constructor(groupKey, nodes) {
645
- super();
646
- this.isFlushable = false;
647
- this.groupKey = groupKey;
648
- this.nodes = nodes;
649
- }
650
- /**
651
- * Converts the action to an annotation
652
- *
653
- * @returns {LinkGroupAnnotation} The annotation
654
- */
655
- toAnnotation() {
656
- return new LinkGroupAnnotation(this.groupKey);
657
- }
658
- }
659
-
660
- /**
661
- * Sync up selection action
662
- */
663
- class SyncUpSelectionAction extends AnnotationAction {
664
- constructor() {
665
- super();
666
- this.isFlushable = false;
667
- }
668
- /**
669
- * annotation null
670
- *
671
- * @returns {Nullable<Annotation>} null
672
- */
673
- toAnnotation() {
674
- return null;
675
- }
676
- }
677
-
678
- /**
679
- * Delete the node annotation by type
680
- */
681
- class DeleteNodeAnnotationAction extends AnnotationAction {
682
- constructor(annotationType) {
683
- super();
684
- this.isFlushable = true;
685
- this.annotationType = annotationType;
686
- }
687
- /**
688
- * Don't need this for this action
689
- *
690
- * @returns {Nullable<Annotation>} undefined
691
- */
692
- toAnnotation() {
693
- return undefined;
694
- }
695
- }
696
-
697
- class RTETextNode extends RTENode {
698
- constructor(id, text, parentBlock, annotationMap) {
699
- super(id, annotationMap);
700
- this.type = NodeTypeEnum.TEXT;
701
- this.parentBlock = parentBlock;
702
- this.text = text;
703
- }
704
- static from(richText, parentBlock) {
705
- const textNode = new RTETextNode(richText.id, richText.text, parentBlock);
706
- const { annotations } = richText;
707
- if (annotations) {
708
- textNode.annotationMap = new Map(Object.keys(annotations)
709
- .map((type) => {
710
- if (annotations.link) {
711
- parentBlock.apply(new LinkGroupAnnotationAction(annotations.link.groupKey, [textNode]));
712
- }
713
- return this.createAnnotationEntity(type, annotations[type]);
714
- })
715
- .filter(isNonNullable));
716
- }
717
- return textNode;
718
- }
719
- static createAnnotationEntity(type, value) {
720
- switch (type) {
721
- case 'bold':
722
- return BoldAnnotation.from(value);
723
- case 'italic':
724
- return ItalicAnnotation.from(value);
725
- case 'underline':
726
- return UnderlineAnnotation.from(value);
727
- case 'strikethrough':
728
- return StrikethroughAnnotation.from(value);
729
- case 'code':
730
- return CodeAnnotation.from(value);
731
- case 'textColor':
732
- return TextColorAnnotation.from(value);
733
- case 'link':
734
- return LinkAnnotation.from(value);
735
- }
736
- }
737
- toJSON() {
738
- const annotations = Array.from(this.annotationMap.values())
739
- .filter((annotation) => annotation instanceof NodeAnnotation)
740
- .reduce((record, annotation) => {
741
- return Object.assign(Object.assign({}, record), annotation.toJSON());
742
- }, {});
743
- return Object.assign(Object.assign({ id: this.id }, (Object.keys(annotations).length > 0 ? { annotations } : {})), { type: 'text', text: this.text });
744
- }
745
- cloneWithText(text) {
746
- return new RTETextNode(generateUUID(), text, this.parentBlock, new Map(this.annotationMap));
747
- }
748
- isEmpty() {
749
- return !this.text || this.text === ZERO_WIDTH_SPACE || this.text === '\n';
750
- }
751
- render() {
752
- const codeAnnotation = this.annotationMap.get(NodeAnnotationTypeEnum.CODE);
753
- if (codeAnnotation === null || codeAnnotation === void 0 ? void 0 : codeAnnotation.code) {
754
- return (h("code", { style: this.getStyles(), class: this.getClasses(), ref: this.registerRef.bind(this) }, this.text || ZERO_WIDTH_SPACE));
755
- }
756
- return (h("span", { style: this.getStyles(), class: this.getClasses(), ref: this.registerRef.bind(this) }, this.text || ZERO_WIDTH_SPACE));
757
- }
758
- doAnnotationActionApply(action) {
759
- const selectionRangeAnnotation = this.getAnnotationByType(InternalAnnotationTypeEnum.SELECTION_RANGE);
760
- if (action instanceof TextSplittableAction && action.doSplit && selectionRangeAnnotation) {
761
- const { startContainer, endContainer, startOffset, endOffset } = selectionRangeAnnotation.range;
762
- const noTextRangeSelected = startContainer === endContainer && startOffset === endOffset;
763
- this.parentBlock.nodes = this.parentBlock.nodes.flatMap((item) => {
764
- if (item.id === this.id) {
765
- if (noTextRangeSelected) {
766
- return this.insertNewNode(startOffset, action);
767
- }
768
- if (this.shouldSplitSelection(selectionRangeAnnotation.range)) {
769
- return this.splitTextNode(action, selectionRangeAnnotation.range);
770
- }
771
- else {
772
- this.applyActionToNode(this, action);
773
- return this;
774
- }
775
- }
776
- return item;
777
- });
778
- }
779
- else {
780
- this.applyActionToNode(this, action);
781
- }
782
- this.parentBlock.mergeNodes(action);
783
- }
784
- doModifyActionApply(action) {
785
- switch (action.type) {
786
- case ModifyContentActionType.UPDATE_TEXT:
787
- this.updateText(action.newTextContent);
788
- break;
789
- case ModifyContentActionType.REPLACE_SELECTED_TEXT:
790
- this.replaceSelectedText(action.textToBeInsert, action.currentRange);
791
- break;
792
- }
793
- }
794
- registerRef(ref) {
795
- if (ref) {
796
- stateEntityRenderingRegistry.register(ref, this);
797
- const textColorAnnotation = this.getAnnotationByType('TEXT_COLOR');
798
- if (textColorAnnotation) {
799
- TextNodeRenderingRegistry$1.register(ref, textColorAnnotation);
800
- }
801
- }
802
- }
803
- splitTextNode(action, range) {
804
- const { startContainer, endContainer, startOffset } = range;
805
- const startNode = startContainer.parentElement;
806
- const endNode = endContainer.parentElement;
807
- const splitText = (text, startOffset, endOffset) => {
808
- const beforeText = text.substring(0, startOffset);
809
- const selectedText = text.substring(startOffset, endOffset);
810
- const afterText = text.substring(endOffset);
811
- return [
812
- this.cloneWithText(beforeText),
813
- this.cloneWithText(selectedText),
814
- this.cloneWithText(afterText),
815
- ];
816
- };
817
- const startItemDto = startNode && stateEntityRenderingRegistry.getEntityByDOM(startNode);
818
- const endItemDto = endNode && stateEntityRenderingRegistry.getEntityByDOM(endNode);
819
- if (startItemDto && startItemDto.id === this.id) {
820
- const endOffset = startContainer === endContainer ? range.endOffset : this.text.length;
821
- const [beforeNode, selectedNode, afterNode] = splitText(this.text, startOffset, endOffset);
822
- this.applyActionToNode(selectedNode, action);
823
- return [beforeNode, selectedNode, afterNode].filter((node) => !!node.text);
824
- }
825
- else if (endItemDto && endItemDto.id === this.id) {
826
- const [beforeNode, selectedNode, afterNode] = splitText(this.text, 0, range.endOffset);
827
- this.applyActionToNode(selectedNode, action);
828
- return [beforeNode, selectedNode, afterNode].filter((node) => !!node.text);
829
- }
830
- else {
831
- this.applyActionToNode(this, action);
832
- return this;
833
- }
834
- }
835
- applyActionToNode(node, action) {
836
- const annotation = action.toAnnotation();
837
- if (action instanceof SyncUpSelectionAction) {
838
- this.syncUpSelectedNodes(node);
839
- return;
840
- }
841
- // Sync up RTETextNode selected state to selection controller for any action apply, except selection range change.
842
- if (!(annotation instanceof SelectionRangeAnnotation)) {
843
- this.syncUpSelectedNodes(node);
844
- }
845
- if (action instanceof DeleteNodeAnnotationAction) {
846
- this.annotationMap.delete(action.annotationType);
847
- return;
848
- }
849
- if (annotation instanceof ClearFormattingAnnotation) {
850
- annotation.items.forEach((item) => {
851
- node.deleteAnnotationByType(item);
852
- });
853
- return;
854
- }
855
- if (annotation instanceof NodeAnnotation || annotation instanceof SelectionRangeAnnotation) {
856
- if (action instanceof LinkAnnotationAction) {
857
- if (isNonNullable(action.newText)) {
858
- node.text = action.newText;
859
- }
860
- this.parentBlock.apply(new LinkGroupAnnotationAction(action.link.groupKey, [node]));
861
- }
862
- if (action instanceof CodeAnnotationAction) {
863
- this.applyActionToNode(node, new ClearFormattingAnnotationAction());
864
- }
865
- node.annotationMap.set(annotation.type, annotation);
866
- return;
867
- }
868
- }
869
- replaceSelectedText(text, currentRange) {
870
- if (currentRange && currentRange.startContainer && currentRange.endContainer) {
871
- const { startContainer, endContainer, startOffset, endOffset } = currentRange;
872
- const startNode = startContainer.parentElement;
873
- const endNode = endContainer.parentElement;
874
- const startItemDto = startNode && stateEntityRenderingRegistry.getEntityByDOM(startNode);
875
- const endItemDto = endNode && stateEntityRenderingRegistry.getEntityByDOM(endNode);
876
- let startIndex = 0, endIndex = this.text.length;
877
- if (startItemDto && startItemDto === this) {
878
- startIndex = startOffset;
879
- endIndex = startContainer === endContainer ? endOffset : endIndex;
880
- }
881
- else if (endItemDto && endItemDto === this) {
882
- endIndex = endOffset;
883
- }
884
- this.apply(new UpdateTextAction(this.text.slice(0, startIndex) + text + this.text.slice(endIndex)));
885
- }
886
- }
887
- updateText(newText) {
888
- this.text = newText;
889
- // The link node should be unlink when delete all text
890
- if (!this.text && this.isLinkNode()) {
891
- this.annotationMap.delete(NodeAnnotationTypeEnum.LINK);
892
- }
893
- }
894
- isLinkNode() {
895
- return this.annotationMap.has('LINK');
896
- }
897
- shouldSplitSelection(range) {
898
- const { startContainer, endContainer, startOffset, endOffset } = range;
899
- const isCrossNode = startContainer !== endContainer;
900
- const isPartialStart = startOffset > 0;
901
- const isPartialEnd = endOffset < (endContainer.textContent ? endContainer.textContent.length : 0);
902
- const isPartialSelection = isPartialStart || isPartialEnd;
903
- return isCrossNode || isPartialSelection;
904
- }
905
- syncUpSelectedNodes(selectedNode) {
906
- const currentNodeDom = stateEntityRenderingRegistry.getDOMByEntity(this);
907
- if (currentNodeDom) {
908
- const nodeSubject = domNodeSubjectFactory.getSubjectFromParentNodeByEventId(currentNodeDom, VegaInternalRichTextEditorSelectionRangeChange);
909
- if (nodeSubject) {
910
- ChangeManager.notify(nodeSubject, { node: selectedNode });
911
- }
912
- }
913
- }
914
- insertNewNode(startOffset, action) {
915
- if (startOffset === 0) {
916
- const newNode = this.cloneWithText('');
917
- this.applyActionToNode(newNode, action);
918
- return [newNode, this];
919
- }
920
- if (startOffset === this.text.length) {
921
- const newNode = this.cloneWithText('');
922
- this.applyActionToNode(newNode, action);
923
- return [this, newNode];
924
- }
925
- const beforeNode = this.cloneWithText(this.text.substring(0, startOffset));
926
- const newNode = this.cloneWithText('');
927
- const afterNode = this.cloneWithText(this.text.substring(startOffset));
928
- this.applyActionToNode(newNode, action);
929
- return [beforeNode, newNode, afterNode];
930
- }
931
- }
932
-
933
- export { AnnotationAction as A, BoldAnnotation as B, ClearFormattingAnnotationAction as C, DeleteNodeAnnotationAction as D, ItalicAnnotation as I, LinkAnnotationAction as L, RTETextNode as R, SyncUpSelectionAction as S, TextSplittableAction as T, UpdateTextAction as U, ZERO_WIDTH_SPACE as Z, LinkGroupAnnotationAction as a, waitForComponentDidRender as b, TextColorAnnotation as c, RTE_TEXT_COLORS as d, UnderlineAnnotation as e, CodeAnnotationAction as f, StrikethroughAnnotation as g, SelectionRangeAnnotation as h, TextNodeRenderingRegistry$1 as i, waitForVega as w };