@heartlandone/vega 2.73.0 → 2.74.0-RTE-table-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 (702) hide show
  1. package/dist/cjs/align-left-4a76df69.js +22 -0
  2. package/dist/cjs/{app-globals-cc162173.js → app-globals-be2e868e.js} +18 -17
  3. package/dist/cjs/{code-block-823cd481.js → code-block-22ee2550.js} +35 -4
  4. package/dist/cjs/{component-value-history-controller-slimmer.abstract-e2e0c6f3.js → component-value-history-controller-slimmer.abstract-3486cbc0.js} +26 -5
  5. package/dist/cjs/{dto-renderer-manager-bd2bd447.js → content-state-0be6fda3.js} +33 -60
  6. package/dist/cjs/{design-token-11656685.js → design-token-505997df.js} +1 -1
  7. package/dist/cjs/dto-renderer-manager-ae5fcbba.js +58 -0
  8. package/dist/cjs/{element-appender-slimmer-12f40b8b.js → element-appender-slimmer-26420c09.js} +6 -6
  9. package/dist/cjs/{form-field-controller-slimmer-6e3e14fd.js → form-field-controller-slimmer-56c551ea.js} +2 -2
  10. package/dist/cjs/{image-annotation-action-7408a4b3.js → image-annotation-action-462fd073.js} +3 -3
  11. package/dist/cjs/index-58ea899e.js +4 -0
  12. package/dist/cjs/{index-638a0f0d.js → index-fc538f17.js} +1 -1
  13. package/dist/cjs/index.cjs.js +43 -38
  14. package/dist/cjs/{language-extension-716015a5.js → language-extension-414149c2.js} +8 -8
  15. package/dist/cjs/loader.cjs.js +13 -8
  16. package/dist/cjs/{public-rules-2950f1fc.js → public-rules-2d18cf41.js} +4 -4
  17. package/dist/cjs/{range-c3c48132.js → range-439a0c0c.js} +1 -1
  18. package/dist/cjs/{responsive-format-facade-96c5f598.js → responsive-format-facade-0ececeb3.js} +3 -3
  19. package/dist/cjs/{rich-text-editor-required-rule-4aab05a3.js → rich-text-editor-required-rule-5a4f3626.js} +2 -2
  20. package/dist/cjs/{string-input-formatter-slimmer-338bbd73.js → string-input-formatter-slimmer-a8f4a9b1.js} +2 -2
  21. package/dist/cjs/{style-formatter-9c42d41b.js → style-formatter-142500c0.js} +1 -1
  22. package/dist/cjs/styles.constants-3aff0b56.js +1306 -0
  23. package/dist/cjs/{sub-state-notify-slimmer-1efa69c4.js → sub-state-notify-slimmer-011866d9.js} +1 -1
  24. package/dist/cjs/{sub-state-observer-slimmer-6afa62f5.js → sub-state-observer-slimmer-23d43f1e.js} +1 -1
  25. package/dist/cjs/table-extension-2a20da57.js +6018 -0
  26. package/dist/cjs/vega-accordion.cjs.entry.js +10 -6
  27. package/dist/cjs/vega-app-header-button.cjs.entry.js +10 -6
  28. package/dist/cjs/vega-box.cjs.entry.js +11 -7
  29. package/dist/cjs/vega-button-circle.cjs.entry.js +10 -6
  30. package/dist/cjs/vega-button-group_2.cjs.entry.js +3 -3
  31. package/dist/cjs/vega-button.cjs.entry.js +9 -5
  32. package/dist/cjs/vega-calendar_4.cjs.entry.js +3 -3
  33. package/dist/cjs/vega-card.cjs.entry.js +10 -6
  34. package/dist/cjs/vega-carousel.cjs.entry.js +9 -5
  35. package/dist/cjs/vega-checkbox_2.cjs.entry.js +3 -3
  36. package/dist/cjs/vega-chip.cjs.entry.js +10 -6
  37. package/dist/cjs/vega-code-block.cjs.entry.js +4 -4
  38. package/dist/cjs/vega-color-picker.cjs.entry.js +3 -3
  39. package/dist/cjs/vega-combo-box.cjs.entry.js +3 -3
  40. package/dist/cjs/vega-date-picker_2.cjs.entry.js +15 -11
  41. package/dist/cjs/vega-dialog_2.cjs.entry.js +17 -13
  42. package/dist/cjs/vega-divider.cjs.entry.js +10 -6
  43. package/dist/cjs/vega-dropdown_5.cjs.entry.js +24 -11
  44. package/dist/cjs/vega-env-manager-23b8b23c.js +2 -2
  45. package/dist/cjs/vega-file-uploader.cjs.entry.js +3 -3
  46. package/dist/cjs/vega-flag-icon.cjs.entry.js +10 -6
  47. package/dist/cjs/vega-flex.cjs.entry.js +11 -7
  48. package/dist/cjs/vega-font.cjs.entry.js +10 -6
  49. package/dist/cjs/vega-form.cjs.entry.js +4 -4
  50. package/dist/cjs/vega-grid.cjs.entry.js +10 -6
  51. package/dist/cjs/vega-icon.cjs.entry.js +10 -6
  52. package/dist/cjs/vega-image-uploader.cjs.entry.js +12 -8
  53. package/dist/cjs/vega-input-credit-card.cjs.entry.js +3 -3
  54. package/dist/cjs/vega-input-numeric.cjs.entry.js +4 -4
  55. package/dist/cjs/vega-input-passcode.cjs.entry.js +3 -3
  56. package/dist/cjs/vega-input-phone-number.cjs.entry.js +10 -6
  57. package/dist/cjs/vega-input-range.cjs.entry.js +3 -3
  58. package/dist/cjs/vega-input-select.cjs.entry.js +181 -50
  59. package/dist/cjs/vega-input.cjs.entry.js +5 -5
  60. package/dist/cjs/{vega-internal-event-id-f2465f1b.js → vega-internal-event-id-73334b4b.js} +4 -0
  61. package/dist/cjs/vega-left-nav_5.cjs.entry.js +17 -13
  62. package/dist/cjs/vega-loader-wrapper_2.cjs.entry.js +11 -7
  63. package/dist/cjs/vega-pagination-page-selector-mobile.cjs.entry.js +1 -1
  64. package/dist/cjs/vega-pagination-page-size-selector-mobile.cjs.entry.js +1 -1
  65. package/dist/cjs/vega-pagination.cjs.entry.js +9 -5
  66. package/dist/cjs/vega-popover_2.cjs.entry.js +11 -7
  67. package/dist/cjs/vega-progress-tracker_2.cjs.entry.js +11 -7
  68. package/dist/cjs/vega-radio_2.cjs.entry.js +3 -3
  69. package/dist/cjs/vega-rich-text-content.cjs.entry.js +10 -9
  70. package/dist/cjs/vega-rich-text-editor_4.cjs.entry.js +70 -54
  71. package/dist/cjs/vega-rich-text-table-properties_3.cjs.entry.js +1313 -0
  72. package/dist/cjs/vega-selection-chip_2.cjs.entry.js +12 -8
  73. package/dist/cjs/vega-selection-tile_2.cjs.entry.js +4 -4
  74. package/dist/cjs/vega-sidenav_3.cjs.entry.js +15 -11
  75. package/dist/cjs/vega-signature-capture.cjs.entry.js +12 -8
  76. package/dist/cjs/vega-stepper.cjs.entry.js +3 -3
  77. package/dist/cjs/vega-table_11.cjs.entry.js +16 -13
  78. package/dist/cjs/vega-textarea.cjs.entry.js +3 -3
  79. package/dist/cjs/vega-time-picker_2.cjs.entry.js +12 -8
  80. package/dist/cjs/vega-toggle-switch.cjs.entry.js +3 -3
  81. package/dist/cjs/vega-tooltip_2.cjs.entry.js +10 -6
  82. package/dist/cjs/vega.cjs.js +13 -8
  83. package/dist/collection/collection-manifest.json +10 -0
  84. package/dist/collection/components/vega-dropdown/slimmers/renderers/vega-dropdown-list-renderer.js +6 -3
  85. package/dist/collection/components/vega-dropdown/vega-dropdown.js +31 -0
  86. package/dist/collection/components/vega-input-select/slimmers/controllers/vega-input-select-item-controller.js +89 -0
  87. package/dist/collection/components/vega-input-select/slimmers/controllers/vega-input-select-source-controller.js +4 -0
  88. package/dist/collection/components/vega-input-select/slimmers/controllers/vega-input-select-value-controller.js +4 -0
  89. package/dist/collection/components/vega-input-select/slimmers/renderers/vega-input-select-dropdown-renderer.js +33 -13
  90. package/dist/collection/components/vega-input-select/vega-input-select.js +27 -7
  91. package/dist/collection/components/vega-popover/slimmers/controllers/vega-popover-appender-controller.js +1 -0
  92. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/action-handle-strategy.abstract.js +10 -0
  93. package/dist/collection/components/vega-rich-text-editor/dto/annotations/plain-text-annotation.js +1 -1
  94. package/dist/collection/components/vega-rich-text-editor/dto/blocks/block.abstract.js +24 -2
  95. package/dist/collection/components/vega-rich-text-editor/dto/content-state.js +18 -2
  96. package/dist/collection/components/vega-rich-text-editor/extensions/base-extension-renderer.js +2 -1
  97. package/dist/collection/components/vega-rich-text-editor/extensions/extension.abstract.js +18 -1
  98. package/dist/collection/components/vega-rich-text-editor/extensions/table/action-handler-interceptors/prevent-cell-children-remove-interceptor.js +42 -0
  99. package/dist/collection/components/vega-rich-text-editor/extensions/table/action-handler-interceptors/prevent-cell-content-delete-interceptor.js +26 -0
  100. package/dist/collection/components/vega-rich-text-editor/extensions/table/action-handler-interceptors/prevent-row-insert-interceptor.js +23 -0
  101. package/dist/collection/components/vega-rich-text-editor/extensions/table/action-handler-strategies/delete-table-block-strategy.js +25 -0
  102. package/dist/collection/components/vega-rich-text-editor/extensions/table/action-handler-strategies/delete-table-column-strategy.js +57 -0
  103. package/dist/collection/components/vega-rich-text-editor/extensions/table/action-handler-strategies/delete-table-row-strategy.js +57 -0
  104. package/dist/collection/components/vega-rich-text-editor/extensions/table/action-handler-strategies/insert-table-block-strategy.js +54 -0
  105. package/dist/collection/components/vega-rich-text-editor/extensions/table/action-handler-strategies/insert-table-column-strategy.js +42 -0
  106. package/dist/collection/components/vega-rich-text-editor/extensions/table/action-handler-strategies/insert-table-row-strategy.js +117 -0
  107. package/dist/collection/components/vega-rich-text-editor/extensions/table/action-handler-strategies/select-table-column-strategy.js +22 -0
  108. package/dist/collection/components/vega-rich-text-editor/extensions/table/action-handler-strategies/table-column-strategy.abstract.js +19 -0
  109. package/dist/collection/components/vega-rich-text-editor/extensions/table/action-handler-strategies/toggle-header-row-strategy.js +133 -0
  110. package/dist/collection/components/vega-rich-text-editor/extensions/table/action-handler-strategies/toggle-header-table-column-strategy.js +99 -0
  111. package/dist/collection/components/vega-rich-text-editor/extensions/table/action-handler-strategies/update-table-cell-properties-strategy.js +23 -0
  112. package/dist/collection/components/vega-rich-text-editor/extensions/table/action-handler-strategies/update-table-properties-strategy.js +29 -0
  113. package/dist/collection/components/vega-rich-text-editor/extensions/table/actions/delete-table-block-action.js +13 -0
  114. package/dist/collection/components/vega-rich-text-editor/extensions/table/actions/delete-table-column-action.js +13 -0
  115. package/dist/collection/components/vega-rich-text-editor/extensions/table/actions/delete-table-row-action.js +18 -0
  116. package/dist/collection/components/vega-rich-text-editor/extensions/table/actions/insert-table-block-action.js +13 -0
  117. package/dist/collection/components/vega-rich-text-editor/extensions/table/actions/insert-table-column-action.js +19 -0
  118. package/dist/collection/components/vega-rich-text-editor/extensions/table/actions/insert-table-row-action.js +26 -0
  119. package/dist/collection/components/vega-rich-text-editor/extensions/table/actions/select-table-column-action.js +13 -0
  120. package/dist/collection/components/vega-rich-text-editor/extensions/table/actions/table-annotations-action.js +18 -0
  121. package/dist/collection/components/vega-rich-text-editor/extensions/table/actions/table-caption-action.js +13 -0
  122. package/dist/collection/components/vega-rich-text-editor/extensions/table/actions/table-cell-annotations-action.js +18 -0
  123. package/dist/collection/components/vega-rich-text-editor/extensions/table/actions/table-head-cell-annotations-action.js +18 -0
  124. package/dist/collection/components/vega-rich-text-editor/extensions/table/actions/toggle-header-row-action.js +13 -0
  125. package/dist/collection/components/vega-rich-text-editor/extensions/table/actions/toggle-header-table-column-action.js +15 -0
  126. package/dist/collection/components/vega-rich-text-editor/extensions/table/actions/update-table-properties-action.js +38 -0
  127. package/dist/collection/components/vega-rich-text-editor/extensions/table/annotation-handler/table-annotation-handler-base.js +97 -0
  128. package/dist/collection/components/vega-rich-text-editor/extensions/table/annotation-handler/table-annotation-handler.js +69 -0
  129. package/dist/collection/components/vega-rich-text-editor/extensions/table/annotation-handler/table-cell-annotation-handler.js +82 -0
  130. package/dist/collection/components/vega-rich-text-editor/extensions/table/annotation-handler/table-head-cell-annotation-handler.js +14 -0
  131. package/dist/collection/components/vega-rich-text-editor/extensions/table/annotations/table-annotation.js +91 -0
  132. package/dist/collection/components/vega-rich-text-editor/extensions/table/annotations/table-caption-annotation.js +57 -0
  133. package/dist/collection/components/vega-rich-text-editor/extensions/table/annotations/table-cell-annotation.js +121 -0
  134. package/dist/collection/components/vega-rich-text-editor/extensions/table/annotations/table-head-cell-annotation.js +40 -0
  135. package/dist/collection/components/vega-rich-text-editor/extensions/table/constants/styles.constants.js +21 -0
  136. package/dist/collection/components/vega-rich-text-editor/extensions/table/dto/table-block.js +119 -0
  137. package/dist/collection/components/vega-rich-text-editor/extensions/table/dto/table-body-block.js +56 -0
  138. package/dist/collection/components/vega-rich-text-editor/extensions/table/dto/table-caption-block.js +69 -0
  139. package/dist/collection/components/vega-rich-text-editor/extensions/table/dto/table-cell-block.js +66 -0
  140. package/dist/collection/components/vega-rich-text-editor/extensions/table/dto/table-head-block.js +60 -0
  141. package/dist/collection/components/vega-rich-text-editor/extensions/table/dto/table-head-cell-block.js +53 -0
  142. package/dist/collection/components/vega-rich-text-editor/extensions/table/dto/table-row-block.js +60 -0
  143. package/dist/collection/components/vega-rich-text-editor/extensions/table/element-to-dto-strategies/caption-to-caption-block-strategy.js +50 -0
  144. package/dist/collection/components/vega-rich-text-editor/extensions/table/element-to-dto-strategies/table-to-table-block-strategy.js +42 -0
  145. package/dist/collection/components/vega-rich-text-editor/extensions/table/element-to-dto-strategies/tbody-to-table-body-block-strategy.js +42 -0
  146. package/dist/collection/components/vega-rich-text-editor/extensions/table/element-to-dto-strategies/td-to-table-cell-block-strategy.js +71 -0
  147. package/dist/collection/components/vega-rich-text-editor/extensions/table/element-to-dto-strategies/thead-to-table-head-block-strategy.js +42 -0
  148. package/dist/collection/components/vega-rich-text-editor/extensions/table/element-to-dto-strategies/tr-to-table-row-block-strategy.js +42 -0
  149. package/dist/collection/components/vega-rich-text-editor/extensions/table/renderers/table-body-renderer.js +15 -0
  150. package/dist/collection/components/vega-rich-text-editor/extensions/table/renderers/table-caption-renderer.js +22 -0
  151. package/dist/collection/components/vega-rich-text-editor/extensions/table/renderers/table-cell-renderer.js +74 -0
  152. package/dist/collection/components/vega-rich-text-editor/extensions/table/renderers/table-dynamic-popover-renderer.js +254 -0
  153. package/dist/collection/components/vega-rich-text-editor/extensions/table/renderers/table-head-cell-renderer.js +12 -0
  154. package/dist/collection/components/vega-rich-text-editor/extensions/table/renderers/table-head-renderer.js +15 -0
  155. package/dist/collection/components/vega-rich-text-editor/extensions/table/renderers/table-renderer.js +149 -0
  156. package/dist/collection/components/vega-rich-text-editor/extensions/table/renderers/table-row-renderer.js +15 -0
  157. package/dist/collection/components/vega-rich-text-editor/extensions/table/renderers/table-setting-popover-renderer.js +148 -0
  158. package/dist/collection/components/vega-rich-text-editor/extensions/table/setting-event-handlers/caption-operation.js +78 -0
  159. package/dist/collection/components/vega-rich-text-editor/extensions/table/setting-event-handlers/cell-properties-cancel-event-handler.js +17 -0
  160. package/dist/collection/components/vega-rich-text-editor/extensions/table/setting-event-handlers/cell-properties-change-event-handler.js +15 -0
  161. package/dist/collection/components/vega-rich-text-editor/extensions/table/setting-event-handlers/cell-properties-save-event-handler.js +19 -0
  162. package/dist/collection/components/vega-rich-text-editor/extensions/table/setting-event-handlers/cell-properties.js +131 -0
  163. package/dist/collection/components/vega-rich-text-editor/extensions/table/setting-event-handlers/column-operation.js +109 -0
  164. package/dist/collection/components/vega-rich-text-editor/extensions/table/setting-event-handlers/row-operation.js +132 -0
  165. package/dist/collection/components/vega-rich-text-editor/extensions/table/setting-event-handlers/setting-event-handler.abstract.js +44 -0
  166. package/dist/collection/components/vega-rich-text-editor/extensions/table/setting-event-handlers/table-properties-cancel-event-handler.js +19 -0
  167. package/dist/collection/components/vega-rich-text-editor/extensions/table/setting-event-handlers/table-properties-change-event-handler.js +20 -0
  168. package/dist/collection/components/vega-rich-text-editor/extensions/table/setting-event-handlers/table-properties-save-event-handler.js +20 -0
  169. package/dist/collection/components/vega-rich-text-editor/extensions/table/setting-event-handlers/table-properties.js +50 -0
  170. package/dist/collection/components/vega-rich-text-editor/extensions/table/table-extension.js +152 -0
  171. package/dist/collection/components/vega-rich-text-editor/extensions/table/table-icon.js +3 -0
  172. package/dist/collection/components/vega-rich-text-editor/extensions/table/table-selection.js +371 -0
  173. package/dist/collection/components/vega-rich-text-editor/extensions/table/table-toolbar-button-renderer.js +234 -0
  174. package/dist/collection/components/vega-rich-text-editor/extensions/table/utils/utils.js +102 -0
  175. package/dist/collection/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-properties/assets/align-bottom.js +3 -0
  176. package/dist/collection/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-properties/assets/align-middle.js +3 -0
  177. package/dist/collection/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-properties/assets/align-top.js +3 -0
  178. package/dist/collection/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-properties/assets/objects-align-center-horizontal.js +3 -0
  179. package/dist/collection/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-properties/assets/objects-align-left.js +3 -0
  180. package/dist/collection/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-properties/assets/objects-align-right.js +3 -0
  181. 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 +27 -0
  182. 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
  183. 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 +259 -0
  184. 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
  185. 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 +93 -0
  186. package/dist/collection/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-properties/vega-rich-text-table-properties.css +148 -0
  187. package/dist/collection/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-properties/vega-rich-text-table-properties.js +241 -0
  188. 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
  189. package/dist/collection/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-selection-widget/slimmers/renderers/selection-widget-renderer.js +83 -0
  190. 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
  191. 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
  192. package/dist/collection/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-setting/assets/icon.js +20 -0
  193. package/dist/collection/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-setting/slimmers/renderers/caption-button-slimmer.js +27 -0
  194. package/dist/collection/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-setting/slimmers/renderers/cell-properties-button-slimmer.js +26 -0
  195. package/dist/collection/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-setting/slimmers/renderers/column-button-slimmer.js +86 -0
  196. package/dist/collection/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-setting/slimmers/renderers/row-button-slimmer.js +101 -0
  197. package/dist/collection/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-setting/slimmers/renderers/table-properties-button-slimmer.js +26 -0
  198. package/dist/collection/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-setting/slimmers/renderers/table-setting-button-slimmer.abstract.js +75 -0
  199. package/dist/collection/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-setting/slimmers/renderers/vega-rich-text-table-setting-renderer.js +50 -0
  200. package/dist/collection/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-setting/vega-rich-text-table-setting.css +20 -0
  201. package/dist/collection/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-setting/vega-rich-text-table-setting.js +215 -0
  202. package/dist/collection/components/vega-rich-text-editor/public-api.js +1 -0
  203. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/extension-controller.js +21 -1
  204. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/annotation-handler/html-element-to-annotation-generator.js +10 -0
  205. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/selection-controller.js +23 -2
  206. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/value-controller.js +6 -2
  207. package/dist/collection/components/vega-rich-text-editor/slimmers/renderers/tools/source-edit-toolbar-button-slimmer.js +6 -0
  208. package/dist/collection/components/vega-rich-text-editor/test/dto/content-state.test.js +257 -0
  209. package/dist/collection/components/vega-rich-text-editor/test/extensions/table/annotation-handler/annotation-handler-registration.test.js +164 -0
  210. package/dist/collection/components/vega-rich-text-editor/test/extensions/table/annotation-handler/table-annotation-handler.test.js +293 -0
  211. package/dist/collection/components/vega-rich-text-editor/test/extensions/table/annotation-handler/table-cell-annotation-handler.test.js +295 -0
  212. package/dist/collection/components/vega-rich-text-editor/test/extensions/table/annotation-handler/table-head-cell-annotation-handler.test.js +415 -0
  213. package/dist/collection/components/vega-rich-text-editor/test/extensions/table/caption-operation.test.js +99 -0
  214. package/dist/collection/components/vega-rich-text-editor/test/extensions/table/table-annotation.test.js +89 -0
  215. package/dist/collection/components/vega-rich-text-editor/test/extensions/table/table-caption-annotations.test.js +79 -0
  216. package/dist/collection/components/vega-rich-text-editor/test/extensions/table/table-cell-annotation.test.js +128 -0
  217. package/dist/collection/components/vega-rich-text-editor/test/extensions/table/table-dto.test.js +517 -0
  218. package/dist/collection/components/vega-rich-text-editor/test/extensions/table/table-element-to-dto-strategies.test.js +1450 -0
  219. package/dist/collection/components/vega-rich-text-editor/test/extensions/table/table-test-utils.js +172 -0
  220. package/dist/collection/components/vega-rich-text-editor/test/spec-utils.js +5 -2
  221. package/dist/collection/components/vega-rich-text-editor/vega-rich-text-editor.css +4 -0
  222. package/dist/collection/global/scripts/before-vega-load.js +2 -0
  223. package/dist/collection/helpers/event-manager/event-id/vega-internal-event-id.js +2 -0
  224. package/dist/collection/utils/spec-utils.js +4 -3
  225. package/dist/esm/align-left-7f959adf.js +17 -0
  226. package/dist/esm/{app-globals-949d2e18.js → app-globals-8b873b6f.js} +7 -6
  227. package/dist/esm/{child-nodes-event-prevent-slimmer-e6f98de5.js → child-nodes-event-prevent-slimmer-a6afdb1e.js} +1 -1
  228. package/dist/esm/{code-block-666674d7.js → code-block-76b29be1.js} +37 -6
  229. package/dist/esm/{component-value-history-controller-slimmer.abstract-171dda08.js → component-value-history-controller-slimmer.abstract-e1b0e163.js} +27 -6
  230. package/dist/esm/{dto-renderer-manager-49ae5d56.js → content-state-03f1d302.js} +32 -61
  231. package/dist/esm/{design-token-9b510e59.js → design-token-8fedb532.js} +1 -1
  232. package/dist/esm/{dom-node-subject-observer-factory-1aaa1159.js → dom-node-subject-observer-factory-e998eba4.js} +1 -1
  233. package/dist/esm/dto-renderer-manager-12bc9121.js +56 -0
  234. package/dist/esm/{element-appender-slimmer-b9890dcb.js → element-appender-slimmer-7b9326e2.js} +4 -4
  235. package/dist/esm/{event-emit-slimmer-2d791d0e.js → event-emit-slimmer-bbf6668c.js} +2 -2
  236. package/dist/esm/{form-field-controller-slimmer-257928c1.js → form-field-controller-slimmer-a0cff4d3.js} +3 -3
  237. package/dist/esm/{image-annotation-action-b3eea6a2.js → image-annotation-action-47cdc068.js} +3 -3
  238. package/dist/esm/index-090d31ca.js +4 -0
  239. package/dist/esm/{index-0d487fae.js → index-da7e5fe5.js} +2 -2
  240. package/dist/esm/index.js +17 -13
  241. package/dist/esm/{internal-vega-event-manager-fdee2a0a.js → internal-vega-event-manager-e799c54a.js} +1 -1
  242. package/dist/esm/{language-extension-b3f836d4.js → language-extension-de6e6caf.js} +2 -2
  243. package/dist/esm/loader.js +15 -10
  244. package/dist/esm/polyfills/core-js.js +0 -0
  245. package/dist/esm/polyfills/dom.js +0 -0
  246. package/dist/esm/polyfills/es5-html-element.js +0 -0
  247. package/dist/esm/polyfills/index.js +0 -0
  248. package/dist/esm/polyfills/system.js +0 -0
  249. package/dist/esm/{public-rules-b164e40e.js → public-rules-c48cc5c9.js} +5 -5
  250. package/dist/esm/{range-9cc1422b.js → range-af6150a8.js} +1 -1
  251. package/dist/esm/{responsive-format-facade-94897ae8.js → responsive-format-facade-16da4623.js} +3 -3
  252. package/dist/esm/{rich-text-editor-required-rule-2131f21c.js → rich-text-editor-required-rule-7255832e.js} +1 -1
  253. package/dist/esm/{string-input-formatter-slimmer-3a42d9b8.js → string-input-formatter-slimmer-82f85b0b.js} +3 -3
  254. package/dist/esm/{style-formatter-bb5aec96.js → style-formatter-6ca58f6b.js} +1 -1
  255. package/dist/esm/styles.constants-0dd6f7fa.js +1277 -0
  256. package/dist/esm/{sub-state-notify-slimmer-71b9bbd5.js → sub-state-notify-slimmer-4060c333.js} +2 -2
  257. package/dist/esm/{sub-state-observer-slimmer-41a1b380.js → sub-state-observer-slimmer-bfa5e63e.js} +2 -2
  258. package/dist/esm/table-extension-c83b7a56.js +5998 -0
  259. package/dist/esm/vega-accordion.entry.js +13 -9
  260. package/dist/esm/vega-app-header-button.entry.js +14 -10
  261. package/dist/esm/vega-banner.entry.js +3 -3
  262. package/dist/esm/vega-box.entry.js +13 -9
  263. package/dist/esm/vega-breadcrumb.entry.js +4 -4
  264. package/dist/esm/vega-button-circle.entry.js +14 -10
  265. package/dist/esm/vega-button-group_2.entry.js +7 -7
  266. package/dist/esm/vega-button-link.entry.js +4 -4
  267. package/dist/esm/vega-button.entry.js +13 -9
  268. package/dist/esm/vega-calendar_4.entry.js +7 -7
  269. package/dist/esm/vega-card.entry.js +12 -8
  270. package/dist/esm/vega-carousel.entry.js +12 -8
  271. package/dist/esm/vega-checkbox_2.entry.js +7 -7
  272. package/dist/esm/vega-chip.entry.js +14 -10
  273. package/dist/esm/vega-code-block.entry.js +8 -8
  274. package/dist/esm/vega-color-picker.entry.js +6 -6
  275. package/dist/esm/vega-combo-box.entry.js +7 -7
  276. package/dist/esm/vega-date-picker_2.entry.js +19 -15
  277. package/dist/esm/vega-dialog_2.entry.js +14 -10
  278. package/dist/esm/vega-divider.entry.js +12 -8
  279. package/dist/esm/vega-dropdown_5.entry.js +28 -15
  280. package/dist/esm/vega-env-manager-8f8dc473.js +2 -2
  281. package/dist/esm/vega-field-label.entry.js +3 -3
  282. package/dist/esm/vega-file-uploader.entry.js +6 -6
  283. package/dist/esm/vega-flag-icon.entry.js +12 -8
  284. package/dist/esm/vega-flex.entry.js +13 -9
  285. package/dist/esm/vega-font.entry.js +12 -8
  286. package/dist/esm/vega-form.entry.js +8 -8
  287. package/dist/esm/vega-grid.entry.js +12 -8
  288. package/dist/esm/vega-icon.entry.js +12 -8
  289. package/dist/esm/vega-image-uploader.entry.js +15 -11
  290. package/dist/esm/vega-input-credit-card.entry.js +7 -7
  291. package/dist/esm/vega-input-numeric.entry.js +8 -8
  292. package/dist/esm/vega-input-passcode.entry.js +7 -7
  293. package/dist/esm/vega-input-phone-number.entry.js +14 -10
  294. package/dist/esm/vega-input-range.entry.js +7 -7
  295. package/dist/esm/vega-input-select.entry.js +185 -54
  296. package/dist/esm/vega-input.entry.js +8 -8
  297. package/dist/esm/{vega-internal-event-id-4a06d705.js → vega-internal-event-id-3edc9b4e.js} +3 -1
  298. package/dist/esm/vega-item-toggle.entry.js +3 -3
  299. package/dist/esm/vega-left-nav_5.entry.js +16 -12
  300. package/dist/esm/vega-loader-wrapper_2.entry.js +11 -7
  301. package/dist/esm/vega-page-notification_2.entry.js +1 -1
  302. package/dist/esm/vega-pagination-page-selector-mobile.entry.js +4 -4
  303. package/dist/esm/vega-pagination-page-size-selector-mobile.entry.js +2 -2
  304. package/dist/esm/vega-pagination.entry.js +13 -9
  305. package/dist/esm/vega-popover_2.entry.js +14 -10
  306. package/dist/esm/vega-progress-tracker_2.entry.js +14 -10
  307. package/dist/esm/vega-radio_2.entry.js +7 -7
  308. package/dist/esm/vega-rich-text-content.entry.js +8 -7
  309. package/dist/esm/vega-rich-text-editor_4.entry.js +53 -37
  310. package/dist/esm/vega-rich-text-table-properties_3.entry.js +1307 -0
  311. package/dist/esm/vega-segment-control.entry.js +3 -3
  312. package/dist/esm/vega-selection-chip_2.entry.js +16 -12
  313. package/dist/esm/vega-selection-tile_2.entry.js +8 -8
  314. package/dist/esm/vega-sidenav_3.entry.js +14 -10
  315. package/dist/esm/vega-signature-capture.entry.js +15 -11
  316. package/dist/esm/vega-stepper.entry.js +7 -7
  317. package/dist/esm/vega-tab-group_2.entry.js +4 -4
  318. package/dist/esm/vega-table_11.entry.js +14 -11
  319. package/dist/esm/vega-textarea.entry.js +7 -7
  320. package/dist/esm/vega-time-picker_2.entry.js +16 -12
  321. package/dist/esm/vega-toggle-switch.entry.js +6 -6
  322. package/dist/esm/vega-tooltip_2.entry.js +12 -8
  323. package/dist/esm/vega.js +15 -10
  324. package/dist/sri/vega-sri-manifest.json +696 -296
  325. package/dist/types/components/vega-dropdown/slimmers/renderers/vega-dropdown-list-renderer.d.ts +1 -0
  326. package/dist/types/components/vega-dropdown/vega-dropdown.d.ts +8 -1
  327. package/dist/types/components/vega-input-select/slimmers/controllers/vega-input-select-item-controller.d.ts +29 -0
  328. package/dist/types/components/vega-input-select/slimmers/controllers/vega-input-select-source-controller.d.ts +1 -0
  329. package/dist/types/components/vega-input-select/slimmers/controllers/vega-input-select-value-controller.d.ts +1 -0
  330. package/dist/types/components/vega-input-select/slimmers/renderers/vega-input-select-dropdown-renderer.d.ts +1 -1
  331. package/dist/types/components/vega-input-select/types.d.ts +5 -0
  332. package/dist/types/components/vega-input-select/vega-input-select.d.ts +12 -4
  333. package/dist/types/components/vega-popover/slimmers/controllers/vega-popover-appender-controller.d.ts +1 -0
  334. package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/action-handle-strategy.abstract.d.ts +7 -0
  335. package/dist/types/components/vega-rich-text-editor/dto/annotations/annotation.abstract.d.ts +2 -5
  336. package/dist/types/components/vega-rich-text-editor/dto/annotations/block-annotation.abstract.d.ts +3 -3
  337. package/dist/types/components/vega-rich-text-editor/dto/blocks/block.abstract.d.ts +10 -6
  338. package/dist/types/components/vega-rich-text-editor/dto/content-state.d.ts +8 -1
  339. package/dist/types/components/vega-rich-text-editor/extensions/extension.abstract.d.ts +15 -2
  340. package/dist/types/components/vega-rich-text-editor/extensions/table/action-handler-interceptors/prevent-cell-children-remove-interceptor.d.ts +25 -0
  341. package/dist/types/components/vega-rich-text-editor/extensions/table/action-handler-interceptors/prevent-cell-content-delete-interceptor.d.ts +20 -0
  342. package/dist/types/components/vega-rich-text-editor/extensions/table/action-handler-interceptors/prevent-row-insert-interceptor.d.ts +19 -0
  343. package/dist/types/components/vega-rich-text-editor/extensions/table/action-handler-strategies/delete-table-block-strategy.d.ts +14 -0
  344. package/dist/types/components/vega-rich-text-editor/extensions/table/action-handler-strategies/delete-table-column-strategy.d.ts +31 -0
  345. package/dist/types/components/vega-rich-text-editor/extensions/table/action-handler-strategies/delete-table-row-strategy.d.ts +28 -0
  346. package/dist/types/components/vega-rich-text-editor/extensions/table/action-handler-strategies/insert-table-block-strategy.d.ts +27 -0
  347. package/dist/types/components/vega-rich-text-editor/extensions/table/action-handler-strategies/insert-table-column-strategy.d.ts +19 -0
  348. package/dist/types/components/vega-rich-text-editor/extensions/table/action-handler-strategies/insert-table-row-strategy.d.ts +27 -0
  349. package/dist/types/components/vega-rich-text-editor/extensions/table/action-handler-strategies/select-table-column-strategy.d.ts +12 -0
  350. package/dist/types/components/vega-rich-text-editor/extensions/table/action-handler-strategies/table-column-strategy.abstract.d.ts +20 -0
  351. package/dist/types/components/vega-rich-text-editor/extensions/table/action-handler-strategies/toggle-header-row-strategy.d.ts +41 -0
  352. package/dist/types/components/vega-rich-text-editor/extensions/table/action-handler-strategies/toggle-header-table-column-strategy.d.ts +45 -0
  353. package/dist/types/components/vega-rich-text-editor/extensions/table/action-handler-strategies/update-table-cell-properties-strategy.d.ts +13 -0
  354. package/dist/types/components/vega-rich-text-editor/extensions/table/action-handler-strategies/update-table-properties-strategy.d.ts +12 -0
  355. package/dist/types/components/vega-rich-text-editor/extensions/table/actions/delete-table-block-action.d.ts +12 -0
  356. package/dist/types/components/vega-rich-text-editor/extensions/table/actions/delete-table-column-action.d.ts +15 -0
  357. package/dist/types/components/vega-rich-text-editor/extensions/table/actions/delete-table-row-action.d.ts +17 -0
  358. package/dist/types/components/vega-rich-text-editor/extensions/table/actions/insert-table-block-action.d.ts +20 -0
  359. package/dist/types/components/vega-rich-text-editor/extensions/table/actions/insert-table-column-action.d.ts +23 -0
  360. package/dist/types/components/vega-rich-text-editor/extensions/table/actions/insert-table-row-action.d.ts +23 -0
  361. package/dist/types/components/vega-rich-text-editor/extensions/table/actions/select-table-column-action.d.ts +18 -0
  362. package/dist/types/components/vega-rich-text-editor/extensions/table/actions/table-annotations-action.d.ts +16 -0
  363. package/dist/types/components/vega-rich-text-editor/extensions/table/actions/table-caption-action.d.ts +14 -0
  364. package/dist/types/components/vega-rich-text-editor/extensions/table/actions/table-cell-annotations-action.d.ts +14 -0
  365. package/dist/types/components/vega-rich-text-editor/extensions/table/actions/table-head-cell-annotations-action.d.ts +15 -0
  366. package/dist/types/components/vega-rich-text-editor/extensions/table/actions/toggle-header-row-action.d.ts +12 -0
  367. package/dist/types/components/vega-rich-text-editor/extensions/table/actions/toggle-header-table-column-action.d.ts +16 -0
  368. package/dist/types/components/vega-rich-text-editor/extensions/table/actions/update-table-properties-action.d.ts +18 -0
  369. package/dist/types/components/vega-rich-text-editor/extensions/table/annotation-handler/table-annotation-handler-base.d.ts +43 -0
  370. package/dist/types/components/vega-rich-text-editor/extensions/table/annotation-handler/table-annotation-handler.d.ts +26 -0
  371. package/dist/types/components/vega-rich-text-editor/extensions/table/annotation-handler/table-cell-annotation-handler.d.ts +42 -0
  372. package/dist/types/components/vega-rich-text-editor/extensions/table/annotation-handler/table-head-cell-annotation-handler.d.ts +13 -0
  373. package/dist/types/components/vega-rich-text-editor/extensions/table/annotations/table-annotation.d.ts +64 -0
  374. package/dist/types/components/vega-rich-text-editor/extensions/table/annotations/table-caption-annotation.d.ts +26 -0
  375. package/dist/types/components/vega-rich-text-editor/extensions/table/annotations/table-cell-annotation.d.ts +67 -0
  376. package/dist/types/components/vega-rich-text-editor/extensions/table/annotations/table-head-cell-annotation.d.ts +22 -0
  377. package/dist/types/components/vega-rich-text-editor/extensions/table/constants/styles.constants.d.ts +3 -0
  378. package/dist/types/components/vega-rich-text-editor/extensions/table/dto/table-block.d.ts +79 -0
  379. package/dist/types/components/vega-rich-text-editor/extensions/table/dto/table-body-block.d.ts +42 -0
  380. package/dist/types/components/vega-rich-text-editor/extensions/table/dto/table-caption-block.d.ts +41 -0
  381. package/dist/types/components/vega-rich-text-editor/extensions/table/dto/table-cell-block.d.ts +45 -0
  382. package/dist/types/components/vega-rich-text-editor/extensions/table/dto/table-head-block.d.ts +42 -0
  383. package/dist/types/components/vega-rich-text-editor/extensions/table/dto/table-head-cell-block.d.ts +34 -0
  384. package/dist/types/components/vega-rich-text-editor/extensions/table/dto/table-row-block.d.ts +44 -0
  385. package/dist/types/components/vega-rich-text-editor/extensions/table/element-to-dto-strategies/caption-to-caption-block-strategy.d.ts +29 -0
  386. package/dist/types/components/vega-rich-text-editor/extensions/table/element-to-dto-strategies/table-to-table-block-strategy.d.ts +26 -0
  387. package/dist/types/components/vega-rich-text-editor/extensions/table/element-to-dto-strategies/tbody-to-table-body-block-strategy.d.ts +26 -0
  388. package/dist/types/components/vega-rich-text-editor/extensions/table/element-to-dto-strategies/td-to-table-cell-block-strategy.d.ts +27 -0
  389. package/dist/types/components/vega-rich-text-editor/extensions/table/element-to-dto-strategies/thead-to-table-head-block-strategy.d.ts +26 -0
  390. package/dist/types/components/vega-rich-text-editor/extensions/table/element-to-dto-strategies/tr-to-table-row-block-strategy.d.ts +26 -0
  391. package/dist/types/components/vega-rich-text-editor/extensions/table/renderers/table-body-renderer.d.ts +12 -0
  392. package/dist/types/components/vega-rich-text-editor/extensions/table/renderers/table-caption-renderer.d.ts +13 -0
  393. package/dist/types/components/vega-rich-text-editor/extensions/table/renderers/table-cell-renderer.d.ts +37 -0
  394. package/dist/types/components/vega-rich-text-editor/extensions/table/renderers/table-dynamic-popover-renderer.d.ts +88 -0
  395. package/dist/types/components/vega-rich-text-editor/extensions/table/renderers/table-head-cell-renderer.d.ts +12 -0
  396. package/dist/types/components/vega-rich-text-editor/extensions/table/renderers/table-head-renderer.d.ts +12 -0
  397. package/dist/types/components/vega-rich-text-editor/extensions/table/renderers/table-renderer.d.ts +61 -0
  398. package/dist/types/components/vega-rich-text-editor/extensions/table/renderers/table-row-renderer.d.ts +12 -0
  399. package/dist/types/components/vega-rich-text-editor/extensions/table/renderers/table-setting-popover-renderer.d.ts +66 -0
  400. package/dist/types/components/vega-rich-text-editor/extensions/table/setting-event-handlers/caption-operation.d.ts +36 -0
  401. package/dist/types/components/vega-rich-text-editor/extensions/table/setting-event-handlers/cell-properties-cancel-event-handler.d.ts +17 -0
  402. package/dist/types/components/vega-rich-text-editor/extensions/table/setting-event-handlers/cell-properties-change-event-handler.d.ts +15 -0
  403. package/dist/types/components/vega-rich-text-editor/extensions/table/setting-event-handlers/cell-properties-save-event-handler.d.ts +17 -0
  404. package/dist/types/components/vega-rich-text-editor/extensions/table/setting-event-handlers/cell-properties.d.ts +62 -0
  405. package/dist/types/components/vega-rich-text-editor/extensions/table/setting-event-handlers/column-operation.d.ts +55 -0
  406. package/dist/types/components/vega-rich-text-editor/extensions/table/setting-event-handlers/row-operation.d.ts +61 -0
  407. package/dist/types/components/vega-rich-text-editor/extensions/table/setting-event-handlers/setting-event-handler.abstract.d.ts +47 -0
  408. package/dist/types/components/vega-rich-text-editor/extensions/table/setting-event-handlers/table-properties-cancel-event-handler.d.ts +19 -0
  409. package/dist/types/components/vega-rich-text-editor/extensions/table/setting-event-handlers/table-properties-change-event-handler.d.ts +17 -0
  410. package/dist/types/components/vega-rich-text-editor/extensions/table/setting-event-handlers/table-properties-save-event-handler.d.ts +17 -0
  411. package/dist/types/components/vega-rich-text-editor/extensions/table/setting-event-handlers/table-properties.d.ts +33 -0
  412. package/dist/types/components/vega-rich-text-editor/extensions/table/table-extension.d.ts +36 -0
  413. package/dist/types/components/vega-rich-text-editor/extensions/table/table-icon.d.ts +3 -0
  414. package/dist/types/components/vega-rich-text-editor/extensions/table/table-selection.d.ts +149 -0
  415. package/dist/types/components/vega-rich-text-editor/extensions/table/table-toolbar-button-renderer.d.ts +86 -0
  416. package/dist/types/components/vega-rich-text-editor/extensions/table/utils/utils.d.ts +53 -0
  417. package/dist/types/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-properties/assets/align-bottom.d.ts +3 -0
  418. package/dist/types/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-properties/assets/align-middle.d.ts +3 -0
  419. package/dist/types/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-properties/assets/align-top.d.ts +3 -0
  420. package/dist/types/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-properties/assets/objects-align-center-horizontal.d.ts +3 -0
  421. package/dist/types/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-properties/assets/objects-align-left.d.ts +3 -0
  422. package/dist/types/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-properties/assets/objects-align-right.d.ts +3 -0
  423. 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 +14 -0
  424. 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
  425. 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 +99 -0
  426. 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
  427. 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 +33 -0
  428. package/dist/types/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-properties/vega-rich-text-table-properties.d.ts +57 -0
  429. 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
  430. 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
  431. 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
  432. package/dist/types/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-setting/assets/icon.d.ts +2 -0
  433. package/dist/types/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-setting/slimmers/renderers/caption-button-slimmer.d.ts +11 -0
  434. 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
  435. package/dist/types/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-setting/slimmers/renderers/column-button-slimmer.d.ts +28 -0
  436. package/dist/types/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-setting/slimmers/renderers/row-button-slimmer.d.ts +36 -0
  437. 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
  438. 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
  439. 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 +11 -0
  440. package/dist/types/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-setting/vega-rich-text-table-setting.d.ts +55 -0
  441. package/dist/types/components/vega-rich-text-editor/interface.d.ts +39 -2
  442. package/dist/types/components/vega-rich-text-editor/public-api.d.ts +1 -0
  443. package/dist/types/components/vega-rich-text-editor/slimmers/controllers/extension-controller.d.ts +4 -0
  444. package/dist/types/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/annotation-handler/html-element-to-annotation-generator.d.ts +9 -0
  445. package/dist/types/components/vega-rich-text-editor/slimmers/controllers/selection-controller.d.ts +19 -6
  446. package/dist/types/components/vega-rich-text-editor/slimmers/controllers/value-controller.d.ts +1 -0
  447. package/dist/types/components/vega-rich-text-editor/slimmers/renderers/tools/source-edit-toolbar-button-slimmer.d.ts +1 -0
  448. package/dist/types/components/vega-rich-text-editor/test/extensions/table/annotation-handler/annotation-handler-registration.test.d.ts +1 -0
  449. package/dist/types/components/vega-rich-text-editor/test/extensions/table/annotation-handler/table-annotation-handler.test.d.ts +1 -0
  450. package/dist/types/components/vega-rich-text-editor/test/extensions/table/annotation-handler/table-cell-annotation-handler.test.d.ts +1 -0
  451. package/dist/types/components/vega-rich-text-editor/test/extensions/table/annotation-handler/table-head-cell-annotation-handler.test.d.ts +1 -0
  452. package/dist/types/components/vega-rich-text-editor/test/extensions/table/caption-operation.test.d.ts +1 -0
  453. package/dist/types/components/vega-rich-text-editor/test/extensions/table/table-annotation.test.d.ts +1 -0
  454. package/dist/types/components/vega-rich-text-editor/test/extensions/table/table-caption-annotations.test.d.ts +1 -0
  455. package/dist/types/components/vega-rich-text-editor/test/extensions/table/table-cell-annotation.test.d.ts +1 -0
  456. package/dist/types/components/vega-rich-text-editor/test/extensions/table/table-dto.test.d.ts +1 -0
  457. package/dist/types/components/vega-rich-text-editor/test/extensions/table/table-element-to-dto-strategies.test.d.ts +1 -0
  458. package/dist/types/components/vega-rich-text-editor/test/extensions/table/table-test-utils.d.ts +11 -0
  459. package/dist/types/components/vega-rich-text-editor/test/spec-utils.d.ts +4 -0
  460. package/dist/types/components.d.ts +155 -6
  461. package/dist/types/helpers/event-manager/event-id/vega-internal-event-id.d.ts +2 -0
  462. package/dist/types/types/components.type.d.ts +5 -0
  463. package/dist/types/utils/spec-utils.d.ts +2 -3
  464. package/dist/vega/app-globals-955a2b3b.js +427 -0
  465. package/dist/vega/child-nodes-event-prevent-slimmer-a604a6dd.js +156 -0
  466. package/dist/vega/design-token-56b26205.js +402 -0
  467. package/dist/vega/element-appender-slimmer-8355fb28.js +1508 -0
  468. package/dist/vega/event-emit-slimmer-7a14f5e9.js +265 -0
  469. package/dist/vega/index.esm.js +57 -1
  470. package/dist/vega/internal-vega-event-manager-8c62c88e.js +458 -0
  471. package/dist/vega/p-068ee55e.entry.js +1 -0
  472. package/dist/vega/p-088f4613.entry.js +1 -0
  473. package/dist/vega/{p-3162a7fd.entry.js → p-08b4d097.entry.js} +1 -1
  474. package/dist/vega/p-0e4cecbd.entry.js +1 -0
  475. package/dist/vega/p-10ffb765.js +1 -0
  476. package/dist/vega/{p-ead1da57.entry.js → p-12a97dad.entry.js} +1 -1
  477. package/dist/vega/p-151b1deb.js +1 -0
  478. package/dist/vega/{p-30e7544c.js → p-16af7681.js} +1 -1
  479. package/dist/vega/p-1b44db34.js +1 -0
  480. package/dist/vega/p-1bda4016.entry.js +1 -0
  481. package/dist/vega/{p-6e84e451.entry.js → p-1f4a814e.entry.js} +1 -1
  482. package/dist/vega/{p-2ae5ad30.entry.js → p-206245d2.entry.js} +1 -1
  483. package/dist/vega/p-213be5e9.entry.js +1 -0
  484. package/dist/vega/{p-7a8c4cf8.entry.js → p-216f3436.entry.js} +1 -1
  485. package/dist/vega/p-224a4f3f.entry.js +1 -0
  486. package/dist/vega/p-22c76be7.entry.js +1 -0
  487. package/dist/vega/p-22da15d7.entry.js +1 -0
  488. package/dist/vega/{p-2409a475.entry.js → p-24766b9d.entry.js} +1 -1
  489. package/dist/vega/p-29a9c8f5.entry.js +1 -0
  490. package/dist/vega/p-34a994a1.entry.js +1 -0
  491. package/dist/vega/p-39d56e3d.js +1 -0
  492. package/dist/vega/{p-c7194674.entry.js → p-3bc7e162.entry.js} +1 -1
  493. package/dist/vega/p-40660c09.js +1 -0
  494. package/dist/vega/p-50a506ea.entry.js +1 -0
  495. package/dist/vega/{p-f2c8c363.js → p-5367eaab.js} +1 -1
  496. package/dist/vega/p-550ce71a.entry.js +1 -0
  497. package/dist/vega/p-5d2704c1.entry.js +1 -0
  498. package/dist/vega/p-5f377954.js +1 -1
  499. package/dist/vega/p-61ae4e9c.entry.js +1 -0
  500. package/dist/vega/{p-2971b17a.js → p-63246470.js} +1 -1
  501. package/dist/vega/p-6665d083.entry.js +1 -0
  502. package/dist/vega/p-69af3422.entry.js +1 -0
  503. package/dist/vega/p-6d9731c1.entry.js +1 -0
  504. package/dist/vega/p-6f08e3e1.entry.js +1 -0
  505. package/dist/vega/p-7172332a.entry.js +1 -0
  506. package/dist/vega/{p-9d8e2939.entry.js → p-73688c4e.entry.js} +1 -1
  507. package/dist/vega/p-73689ec0.entry.js +1 -0
  508. package/dist/vega/{p-9fb71d8c.entry.js → p-780cbfb0.entry.js} +1 -1
  509. package/dist/vega/p-79e8236a.entry.js +1 -0
  510. package/dist/vega/{p-8fba7f9a.js → p-7ca9f6f1.js} +1 -1
  511. package/dist/vega/{p-f6cd7a08.entry.js → p-813b2915.entry.js} +1 -1
  512. package/dist/vega/{p-e88f2dc3.js → p-8162980c.js} +1 -1
  513. package/dist/vega/p-82ec9721.entry.js +1 -0
  514. package/dist/vega/{p-7f9acdf7.entry.js → p-86caa739.entry.js} +1 -1
  515. package/dist/vega/p-8a4d8139.entry.js +1 -0
  516. package/dist/vega/{p-be0b67b8.entry.js → p-8ac453cb.entry.js} +1 -1
  517. package/dist/vega/p-98b78c75.entry.js +1 -0
  518. package/dist/vega/{p-76e6c13a.js → p-99e3dcab.js} +1 -1
  519. package/dist/vega/{p-44bc9ea9.entry.js → p-9aac9879.entry.js} +1 -1
  520. package/dist/vega/p-a007b493.entry.js +1 -0
  521. package/dist/vega/p-a439e59b.entry.js +1 -0
  522. package/dist/vega/p-a4d0ab07.js +1 -0
  523. package/dist/vega/{p-f38a4be2.entry.js → p-a6e03df4.entry.js} +1 -1
  524. package/dist/vega/{p-4957f07a.entry.js → p-a924c1e2.entry.js} +1 -1
  525. package/dist/vega/p-ab0e013c.entry.js +1 -0
  526. package/dist/vega/p-abf871cd.entry.js +1 -0
  527. package/dist/vega/{p-9dfe2bbc.js → p-ac4bd1f8.js} +1 -1
  528. package/dist/vega/{p-3566ad76.js → p-b91c2c9d.js} +1 -1
  529. package/dist/vega/{p-184d8443.js → p-c00adad9.js} +1 -1
  530. package/dist/vega/{p-697eb0e1.js → p-c335088c.js} +1 -1
  531. package/dist/vega/{p-623c3911.entry.js → p-c3d388b5.entry.js} +1 -1
  532. package/dist/vega/p-c674b07c.js +1 -0
  533. package/dist/vega/p-c6d98c60.entry.js +1 -0
  534. package/dist/vega/p-c78fe943.js +1 -0
  535. package/dist/vega/{p-7f86b3c8.js → p-c8ad47c9.js} +1 -1
  536. package/dist/vega/{p-96797fee.entry.js → p-c9541fc2.entry.js} +1 -1
  537. package/dist/vega/{p-a58bdbad.entry.js → p-d07d04e0.entry.js} +1 -1
  538. package/dist/vega/p-d1349401.entry.js +1 -0
  539. package/dist/vega/{p-c0036e71.js → p-d2033624.js} +1 -1
  540. package/dist/vega/{p-74a77cad.js → p-d466baf7.js} +1 -1
  541. package/dist/vega/p-d4719c14.entry.js +1 -0
  542. package/dist/vega/{p-82dbff54.entry.js → p-d4e35d2e.entry.js} +1 -1
  543. package/dist/vega/p-d55365b9.entry.js +1 -0
  544. package/dist/vega/p-db482ee1.js +1 -0
  545. package/dist/vega/p-dc2813eb.entry.js +1 -0
  546. package/dist/vega/{p-676eaf3f.entry.js → p-dd5d917b.entry.js} +1 -1
  547. package/dist/vega/{p-5be29f14.js → p-ddf81373.js} +1 -1
  548. package/dist/vega/p-e0cefd90.entry.js +1 -0
  549. package/dist/vega/p-e13c163c.entry.js +1 -0
  550. package/dist/vega/{p-a5d4d168.entry.js → p-e788598a.entry.js} +1 -1
  551. package/dist/vega/{p-6b9d2996.entry.js → p-e797bf8d.entry.js} +1 -1
  552. package/dist/vega/p-f4b46f6b.entry.js +1 -0
  553. package/dist/vega/p-f519cdc3.entry.js +1 -0
  554. package/dist/vega/{p-9b673fd4.entry.js → p-f6eab527.entry.js} +1 -1
  555. package/dist/vega/{p-c7f292dd.entry.js → p-fa34ace2.entry.js} +1 -1
  556. package/dist/vega/p-fbfb4c70.entry.js +1 -0
  557. package/dist/vega/p-fcabf0dc.js +1 -0
  558. package/dist/vega/{p-8bd496b4.js → p-ff57c872.js} +1 -1
  559. package/dist/vega/p-ff921d10.js +1 -0
  560. package/dist/vega/p-ff9a0e6e.js +1 -0
  561. package/dist/vega/public-api-8dd022fa.js +6043 -0
  562. package/dist/vega/public-api-baaf7593.js +4 -0
  563. package/dist/vega/responsive-format-facade-98596535.js +913 -0
  564. package/dist/vega/style-formatter-0ae102e9.js +32 -0
  565. package/dist/vega/vega-accordion.entry.js +291 -0
  566. package/dist/vega/vega-app-header-button.entry.js +452 -0
  567. package/dist/vega/vega-banner.entry.js +351 -0
  568. package/dist/vega/vega-box.entry.js +353 -0
  569. package/dist/vega/vega-breadcrumb.entry.js +249 -0
  570. package/dist/vega/vega-button-circle.entry.js +245 -0
  571. package/dist/vega/vega-button-group.entry.js +203 -0
  572. package/dist/vega/vega-button-link.entry.js +226 -0
  573. package/dist/vega/vega-button.entry.js +259 -0
  574. package/dist/vega/vega-calendar.entry.js +3884 -0
  575. package/dist/vega/vega-card.entry.js +226 -0
  576. package/dist/vega/vega-carousel.entry.js +540 -0
  577. package/dist/vega/vega-checkbox-group.entry.js +266 -0
  578. package/dist/vega/vega-checkbox.entry.js +335 -0
  579. package/dist/vega/vega-chip.entry.js +321 -0
  580. package/dist/vega/vega-code-block.entry.js +4372 -0
  581. package/dist/vega/vega-color-picker.entry.js +258 -0
  582. package/dist/vega/vega-combo-box.entry.js +748 -0
  583. package/dist/vega/vega-date-picker-calendar.entry.js +1381 -0
  584. package/dist/vega/vega-date-picker.entry.js +1646 -0
  585. package/dist/vega/vega-dialog.entry.js +158 -0
  586. package/dist/vega/vega-divider.entry.js +179 -0
  587. package/dist/vega/vega-dropdown-content-box.entry.js +57 -0
  588. package/dist/vega/vega-dropdown-item.entry.js +352 -0
  589. package/dist/vega/vega-dropdown.entry.js +2136 -0
  590. package/dist/vega/vega-field-label.entry.js +182 -0
  591. package/dist/vega/vega-file-uploader.entry.js +751 -0
  592. package/dist/vega/vega-flag-icon.entry.js +216 -0
  593. package/dist/vega/vega-flex.entry.js +224 -0
  594. package/dist/vega/vega-font.entry.js +327 -0
  595. package/dist/vega/vega-form.entry.js +1008 -0
  596. package/dist/vega/vega-grid.entry.js +129 -0
  597. package/dist/vega/vega-icon.entry.js +256 -0
  598. package/dist/vega/vega-image-uploader.entry.js +977 -0
  599. package/dist/vega/vega-input-credit-card.entry.js +549 -0
  600. package/dist/vega/vega-input-numeric.entry.js +471 -0
  601. package/dist/vega/vega-input-passcode.entry.js +728 -0
  602. package/dist/vega/vega-input-phone-number.entry.js +9143 -0
  603. package/dist/vega/vega-input-range.entry.js +693 -0
  604. package/dist/vega/vega-input-select.entry.js +1268 -0
  605. package/dist/vega/vega-input.entry.js +1735 -0
  606. package/dist/vega/vega-item-toggle.entry.js +190 -0
  607. package/dist/vega/vega-left-nav-group.entry.js +433 -0
  608. package/dist/vega/vega-left-nav-link.entry.js +317 -0
  609. package/dist/vega/vega-left-nav-section.entry.js +97 -0
  610. package/dist/vega/vega-left-nav.entry.js +654 -0
  611. package/dist/vega/vega-loading-indicator.entry.js +209 -0
  612. package/dist/vega/vega-modal.entry.js +1287 -0
  613. package/dist/vega/vega-nav-card.entry.js +163 -0
  614. package/dist/vega/vega-pagination-page-selector-mobile.entry.js +214 -0
  615. package/dist/vega/vega-pagination.entry.js +629 -0
  616. package/dist/vega/vega-popover-content-box.entry.js +101 -0
  617. package/dist/vega/vega-popover.entry.js +362 -0
  618. package/dist/vega/vega-progress-tracker.entry.js +757 -0
  619. package/dist/vega/vega-radio-group.entry.js +496 -0
  620. package/dist/vega/vega-radio.entry.js +272 -0
  621. package/dist/vega/vega-rich-text-editor-toolbar-button.entry.js +169 -0
  622. package/dist/vega/vega-rich-text-editor.entry.js +4107 -0
  623. package/dist/vega/vega-rich-text-image-editor.entry.js +216 -0
  624. package/dist/vega/vega-rich-text-link-editor.entry.js +238 -0
  625. package/dist/vega/vega-rich-text-table-properties.entry.js +641 -0
  626. package/dist/vega/vega-rich-text-table-setting.entry.js +525 -0
  627. package/dist/vega/vega-segment-control.entry.js +350 -0
  628. package/dist/vega/vega-selection-chip-group.entry.js +447 -0
  629. package/dist/vega/vega-selection-chip.entry.js +443 -0
  630. package/dist/vega/vega-selection-tile-group.entry.js +438 -0
  631. package/dist/vega/vega-selection-tile.entry.js +409 -0
  632. package/dist/vega/vega-sidenav-link.entry.js +160 -0
  633. package/dist/vega/vega-sidenav.entry.js +766 -0
  634. package/dist/vega/vega-signature-capture.entry.js +589 -0
  635. package/dist/vega/vega-stepper.entry.js +292 -0
  636. package/dist/vega/vega-tab-group-panel.entry.js +79 -0
  637. package/dist/vega/vega-tab-group.entry.js +1281 -0
  638. package/dist/vega/vega-table-body.entry.js +48 -0
  639. package/dist/vega/vega-table-cell.entry.js +243 -0
  640. package/dist/vega/vega-table-foot-cell.entry.js +169 -0
  641. package/dist/vega/vega-table-foot-row.entry.js +219 -0
  642. package/dist/vega/vega-table-foot.entry.js +136 -0
  643. package/dist/vega/vega-table-head-cell.entry.js +339 -0
  644. package/dist/vega/vega-table-head-row.entry.js +416 -0
  645. package/dist/vega/vega-table-head.entry.js +113 -0
  646. package/dist/vega/vega-table-row.entry.js +666 -0
  647. package/dist/vega/vega-table.entry.js +3707 -0
  648. package/dist/vega/vega-textarea.entry.js +329 -0
  649. package/dist/vega/vega-time-picker.entry.js +2039 -0
  650. package/dist/vega/vega-toggle-switch.entry.js +194 -0
  651. package/dist/vega/vega-tooltip.entry.js +339 -0
  652. package/dist/vega/vega.esm.js +172 -1
  653. package/package.json +1 -1
  654. package/style/vega-icons.css +17266 -0
  655. package/dist/cjs/function-extension-78ec27e0.js +0 -2927
  656. package/dist/esm/function-extension-8b06c6f8.js +0 -2908
  657. package/dist/vega/p-03e16a05.entry.js +0 -1
  658. package/dist/vega/p-0ad59141.entry.js +0 -1
  659. package/dist/vega/p-0ba0f83d.entry.js +0 -1
  660. package/dist/vega/p-114c6df8.entry.js +0 -1
  661. package/dist/vega/p-1e019406.js +0 -1
  662. package/dist/vega/p-1faef917.entry.js +0 -1
  663. package/dist/vega/p-21cba83b.entry.js +0 -1
  664. package/dist/vega/p-21e7808a.entry.js +0 -1
  665. package/dist/vega/p-2b20a215.entry.js +0 -1
  666. package/dist/vega/p-2bc4f7d9.entry.js +0 -1
  667. package/dist/vega/p-2e0deef6.js +0 -1
  668. package/dist/vega/p-2f592078.entry.js +0 -1
  669. package/dist/vega/p-38ed3d59.entry.js +0 -1
  670. package/dist/vega/p-3938880f.entry.js +0 -1
  671. package/dist/vega/p-398220f5.entry.js +0 -1
  672. package/dist/vega/p-40561fa0.entry.js +0 -1
  673. package/dist/vega/p-42a283b5.entry.js +0 -1
  674. package/dist/vega/p-524ffc12.entry.js +0 -1
  675. package/dist/vega/p-59fa3f68.js +0 -1
  676. package/dist/vega/p-5b71c85e.js +0 -1
  677. package/dist/vega/p-5f09868d.entry.js +0 -1
  678. package/dist/vega/p-6e701542.entry.js +0 -1
  679. package/dist/vega/p-70b2906a.entry.js +0 -1
  680. package/dist/vega/p-721b2981.entry.js +0 -1
  681. package/dist/vega/p-75d91ee9.entry.js +0 -1
  682. package/dist/vega/p-79a544d6.js +0 -1
  683. package/dist/vega/p-7b337fd4.entry.js +0 -1
  684. package/dist/vega/p-7be3aefc.entry.js +0 -1
  685. package/dist/vega/p-94cf46ca.entry.js +0 -1
  686. package/dist/vega/p-a125cfec.entry.js +0 -1
  687. package/dist/vega/p-a3c4fa30.entry.js +0 -1
  688. package/dist/vega/p-aab0deab.js +0 -1
  689. package/dist/vega/p-adc615a4.entry.js +0 -1
  690. package/dist/vega/p-b007d0d5.entry.js +0 -1
  691. package/dist/vega/p-b406a846.entry.js +0 -1
  692. package/dist/vega/p-bd60c72e.entry.js +0 -1
  693. package/dist/vega/p-bf61d136.js +0 -1
  694. package/dist/vega/p-c2ac6b47.entry.js +0 -1
  695. package/dist/vega/p-c4700277.entry.js +0 -1
  696. package/dist/vega/p-ce2ffff7.js +0 -1
  697. package/dist/vega/p-d01fe83d.entry.js +0 -1
  698. package/dist/vega/p-db62b038.entry.js +0 -1
  699. package/dist/vega/p-dd72ad9e.js +0 -1
  700. package/dist/vega/p-e39aa2ea.entry.js +0 -1
  701. package/dist/vega/p-f3831dc9.entry.js +0 -1
  702. package/dist/vega/p-f427d88c.entry.js +0 -1
@@ -1,2927 +0,0 @@
1
- 'use strict';
2
-
3
- const createPublicApiRuntimeMetricsSlimmer = require('./create-public-api-runtime-metrics-slimmer-e2e274e1.js');
4
- const ui = require('./ui-9e181079.js');
5
- const globalSlimmerRegistry = require('./global-slimmer-registry-b3bce7e0.js');
6
- const dynamicSlimmer = require('./dynamic-slimmer-f31fdfd7.js');
7
- const pageResizeObserverSlimmer = require('./page-resize-observer-slimmer-11937d6f.js');
8
- const darkModeStyleController = require('./dark-mode-style-controller-c21172aa.js');
9
- const internalVegaEventManager = require('./internal-vega-event-manager-d587a33c.js');
10
- const number = require('./number-4816603d.js');
11
- const dtoRendererManager = require('./dto-renderer-manager-bd2bd447.js');
12
- const codeBlock = require('./code-block-823cd481.js');
13
- const typeGuard = require('./type-guard-69d2cf01.js');
14
- require('./translation-5f9f9c0c.js');
15
- const internalIconManager = require('./internal-icon-manager-32f9ed63.js');
16
- const object = require('./object-e2e28e3d.js');
17
- const baseRenderer = require('./base-renderer-0a3b62b7.js');
18
- const domNodeSubjectObserverFactory = require('./dom-node-subject-observer-factory-1c8f7880.js');
19
-
20
- const VegaLoaderRuntimeMetricsPayloadDefinition = [
21
- {
22
- payloadKey: 'IS_LOAD_METHOD_CALLED',
23
- payloadDescription: 'Indicate if the method load of public API VegaLoaderController is called',
24
- /**
25
- * Indicate whether the method is collected when the method been called .
26
- *
27
- * @param {string} scope - The class name of public api
28
- * @param {string} methodName - The method name called by the public api
29
- * @returns {boolean} A boolean value
30
- */
31
- canAccept: (scope, methodName) => scope === 'VegaLoaderController' && methodName === 'load',
32
- /**
33
- * The function checks if the method name is load.
34
- *
35
- * @returns {boolean} A boolean value
36
- */
37
- payloadValue: () => {
38
- return true;
39
- },
40
- },
41
- {
42
- payloadKey: 'IS_CLOSE_METHOD_CALLED',
43
- payloadDescription: 'Indicate if the method close of public API VegaLoaderController is called',
44
- /**
45
- * Indicate whether the method is collected when the method been called .
46
- *
47
- * @param {string} scope - The class name of public api
48
- * @param {string} methodName - The method name called by the public api
49
- * @returns {boolean} A boolean value
50
- */
51
- canAccept: (scope, methodName) => scope === 'VegaLoaderController' && methodName === 'close',
52
- /**
53
- * The function checks if the method name is close.
54
- *
55
- * @returns {boolean} A boolean value
56
- */
57
- payloadValue: () => {
58
- return true;
59
- },
60
- },
61
- ];
62
-
63
- var __decorate$6 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
64
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
65
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
66
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
67
- return c > 3 && r && Object.defineProperty(target, key, r), r;
68
- };
69
- /**
70
- * Vega loader controller to control the loading indicator
71
- */
72
- class VegaLoaderController {
73
- constructor() {
74
- this.vegaPublicAPIRuntimeMetricsSlimmer = createPublicApiRuntimeMetricsSlimmer.createPublicAPIRuntimeMetricsSlimmer(VegaLoaderController, ['load', 'close'], VegaLoaderRuntimeMetricsPayloadDefinition);
75
- }
76
- /**
77
- * Create a loading indicator and append it to the container
78
- *
79
- * @param {VegaLoaderIndicatorOptions} options - VegaLoaderOptions = {} options of the method
80
- * @returns {Nullable<string>} The uuid of the loader.
81
- * @vegaVersion 1.16.0
82
- */
83
- load(options = {}) {
84
- let containerSelector = options.containerSelector || 'body';
85
- let containerElement = document.querySelector(containerSelector);
86
- if (containerElement &&
87
- VegaLoaderController.SPECIAL_ELEMENT_TO_WRAP_FULL_BODY.includes(containerElement.tagName)) {
88
- containerSelector = 'body';
89
- containerElement = document.querySelector('body');
90
- }
91
- if (!containerElement) {
92
- globalSlimmerRegistry.LogUtility.error('Container is not found by selector: ', containerSelector);
93
- return null;
94
- }
95
- const loadingIndicator = this.createLoadingIndicator(options.indicatorOptions);
96
- const loader = this.createLoader(containerSelector);
97
- loader.append(loadingIndicator);
98
- return this.appendLoader(loader, containerElement);
99
- }
100
- /**
101
- * Close the loader by id
102
- *
103
- * @param {string} id - The id of the loader.
104
- * @vegaVersion 1.16.0
105
- */
106
- close(id) {
107
- const loader = this.findLoader(id);
108
- if (loader) {
109
- if (loader.dataset.container) {
110
- const container = document.querySelector(loader.dataset.container);
111
- if (container) {
112
- if (container.dataset['vegaLoaderOriginPosition']) {
113
- container.style.position = container.dataset['vegaLoaderOriginPosition'];
114
- }
115
- }
116
- }
117
- loader.remove();
118
- }
119
- }
120
- /**
121
- * Find loader by id, if the id include '>>>' it will find inside shadowRoot
122
- *
123
- * @param {string} id - The id of the loader.
124
- * @returns {Nullable<HTMLElement>} The loader found by id.
125
- */
126
- findLoader(id) {
127
- var _a, _b;
128
- let loader;
129
- if (id.includes('>>>')) {
130
- const [containerSelector, loaderSelector] = id.split('>>>');
131
- loader = (_b = (_a = document.querySelector(containerSelector)) === null || _a === void 0 ? void 0 : _a.shadowRoot) === null || _b === void 0 ? void 0 : _b.getElementById(loaderSelector);
132
- }
133
- else {
134
- loader = document.getElementById(id);
135
- }
136
- return loader;
137
- }
138
- /**
139
- * Create a loader for loading indicator
140
- *
141
- * @param {string} containerSelector The container which you want to append
142
- * @returns {HTMLElement} a wrapper for loader
143
- */
144
- createLoader(containerSelector) {
145
- const loader = document.createElement('vega-loader-wrapper');
146
- loader.className = ui.arrayToClassString([
147
- containerSelector === 'body' ? 'fixed-wrapper' : 'absolute-wrapper',
148
- ]);
149
- loader.dataset['container'] = containerSelector;
150
- loader.id = `vega-loader-${createPublicApiRuntimeMetricsSlimmer.generateUUID()}`;
151
- return loader;
152
- }
153
- /**
154
- * Create a loading indicator
155
- *
156
- * @param {VegaLoaderIndicatorOptions} indicatorOptions the props of vega loading indicator
157
- * @returns {HTMLVegaLoadingIndicatorElement} vega-loading-indicator component template
158
- */
159
- createLoadingIndicator(indicatorOptions = {}) {
160
- const loadingIndicator = document.createElement('vega-loading-indicator');
161
- Object.assign(loadingIndicator, indicatorOptions);
162
- return loadingIndicator;
163
- }
164
- /**
165
- * Append the loader to the container
166
- *
167
- * @param {HTMLElement} loader A loader with loading indicator
168
- * @param {string} containerElement The container which you want to append the loader to
169
- * @returns {string} The uuid of the loader.
170
- */
171
- appendLoader(loader, containerElement) {
172
- containerElement.dataset['vegaLoaderOriginPosition'] = containerElement.style.position;
173
- containerElement.style.position = 'relative';
174
- if (containerElement.shadowRoot) {
175
- containerElement.shadowRoot.append(loader);
176
- return `${loader.dataset['container']}>>>${loader.id}`;
177
- }
178
- else {
179
- containerElement.append(loader);
180
- return loader.id;
181
- }
182
- }
183
- }
184
- VegaLoaderController.SPECIAL_ELEMENT_TO_WRAP_FULL_BODY = ['VEGA-MODAL'];
185
- __decorate$6([
186
- createPublicApiRuntimeMetricsSlimmer.InjectVegaTelemetrySlimmer()
187
- ], VegaLoaderController.prototype, "vegaPublicAPIRuntimeMetricsSlimmer", void 0);
188
- const VegaLoader = new VegaLoaderController();
189
-
190
- const BASE_BASIC_Z_INDEX = 10000;
191
- const TOP_BASIC_Z_INDEX = 11000;
192
- /**
193
- * Base level is for custom element such as modal, tooltip, dropdown, sidenav and header.
194
- * the z-index of current showing element is highly than already show.
195
- * Top level is for element that always display to top, such as notification.
196
- */
197
- class InternalVegaZIndexManager {
198
- constructor() {
199
- this.baseBasicZIndex = BASE_BASIC_Z_INDEX;
200
- this.topBasicZIndex = TOP_BASIC_Z_INDEX;
201
- this.levelEntry = {
202
- base: {
203
- zIndex: this.baseBasicZIndex,
204
- elements: [],
205
- },
206
- top: {
207
- zIndex: this.topBasicZIndex,
208
- elements: [],
209
- },
210
- };
211
- }
212
- /**
213
- * "If the element is not already the current element, then increment the z-index and set the element
214
- * to the current element."
215
- *
216
- * The function is a little more complicated than that, but not much. The function takes an element and
217
- * a level. The level is optional and defaults to 'base'. The level is used to keep track of the
218
- * z-index for each level. The function uses a private variable, levelStatus, to keep track of the
219
- * current element and z-index for each level
220
- *
221
- * @param {HTMLElement} element - The element to set the z-index of.
222
- * @param {ZIndexLevelType} [level=base] - The level of the element.
223
- * @returns {void}
224
- */
225
- setZIndex(element, level = 'base') {
226
- if (element === null)
227
- return;
228
- this.removeZIndex(element, level);
229
- const zIndexEntry = this.levelEntry[level];
230
- if (element && zIndexEntry) {
231
- if (level === 'base' && this.isBaseLevelOver()) {
232
- globalSlimmerRegistry.LogUtility.warn(`The max 'z-index' of base level is '11000', but the current 'z-index' is over, Please optimize the use of 'z-index', otherwise there will be some performance overhead.`);
233
- this.increaseTopEntry();
234
- }
235
- zIndexEntry.elements.push(element);
236
- zIndexEntry.zIndex += 1;
237
- element.style.zIndex = zIndexEntry.zIndex.toString();
238
- }
239
- }
240
- /**
241
- * It removes the element from the level's array of elements, and then decrements the z-index of all
242
- * elements after the removed element
243
- *
244
- * @param {HTMLElement} element - HTMLElement - The element to move
245
- * @param {ZIndexLevelType} [level=base] - Level = 'base'
246
- * @returns {void}
247
- */
248
- removeZIndex(element, level = 'base') {
249
- if (element === null)
250
- return;
251
- const zIndexEntry = this.levelEntry[level];
252
- if (element && zIndexEntry) {
253
- let startAt = -1;
254
- zIndexEntry.elements.forEach((e, index) => {
255
- if (e === element)
256
- startAt = index;
257
- if (startAt >= 0 && index > startAt) {
258
- e.style.zIndex = `${number.convertToNumber(e.style.zIndex) - 1}`;
259
- }
260
- });
261
- if (startAt >= 0) {
262
- element.style.removeProperty('z-index');
263
- zIndexEntry.elements.splice(startAt, 1);
264
- zIndexEntry.zIndex -= 1;
265
- }
266
- }
267
- }
268
- /**
269
- * The function "overrideZIndexBasicValues" updates the base and top basic z-index values based on the
270
- * input provided.
271
- *
272
- * @param {ZIndexBasicValues} input - The input parameter is of type ZIndexBasicValues, which is an
273
- * object with two properties: base and top. Both properties are optional and can be either a number or
274
- * undefined.
275
- */
276
- overrideZIndexBasicValues(input) {
277
- const basicValues = this.formatZIndexBasicValues(input);
278
- if (this.validBasicValues(basicValues)) {
279
- this.updateBasicValues(basicValues);
280
- }
281
- }
282
- /**
283
- * The function `formatZIndexBasicValues` takes an input object and returns a new object with additional
284
- * properties `base` and `top` added to it.
285
- *
286
- * @param {ZIndexBasicValues} input - The input parameter is of type ZIndexBasicValues. It is an object
287
- * that contains properties for base and top.
288
- * @returns {ZIndexBasicValues} - an object that combines the properties of the input object `input` with the properties
289
- * `base` and `top`. The values of `base` and `top` are taken from the `this.baseBasicZIndex` and
290
- * `this.topBasicZIndex` variables respectively.
291
- */
292
- formatZIndexBasicValues(input) {
293
- return Object.assign({
294
- base: this.baseBasicZIndex,
295
- top: this.topBasicZIndex,
296
- }, input);
297
- }
298
- /**
299
- * The function checks if the input values for base and top levels of a z-index are valid.
300
- *
301
- * @param {ZIndexBasicValues} input - The input parameter is an object of type ZIndexBasicValues. It
302
- * has two properties: base and top. Both properties should be of type number.
303
- * @returns {boolean} a boolean value.
304
- */
305
- validBasicValues(input) {
306
- if (typeof input.base !== 'number' || typeof input.top !== 'number') {
307
- globalSlimmerRegistry.LogUtility.error('Change z-index basic value failed, both base level and top level should be of type number!');
308
- return false;
309
- }
310
- else if (input.base >= input.top) {
311
- globalSlimmerRegistry.LogUtility.error('Change z-index basic value failed, the base level should be smaller than the top level!');
312
- return false;
313
- }
314
- return true;
315
- }
316
- /**
317
- * The function updates the z-index values of elements based on the input values.
318
- *
319
- * @param {ZIndexBasicValues} input - The input parameter is an object of type ZIndexBasicValues. It
320
- * has two properties: base and top, both of which are optional and can be of type number.
321
- */
322
- updateBasicValues(input) {
323
- // update basic z-index value
324
- this.baseBasicZIndex = input.base;
325
- this.topBasicZIndex = input.top;
326
- // update base level entry
327
- const baseLevel = this.levelEntry.base;
328
- baseLevel.elements.forEach((element, index) => {
329
- element.style.zIndex = `${this.baseBasicZIndex + index + 1}`;
330
- });
331
- baseLevel.zIndex = this.baseBasicZIndex + baseLevel.elements.length;
332
- // update top level entry
333
- const topLevel = this.levelEntry.top;
334
- topLevel.elements.forEach((element, index) => {
335
- element.style.zIndex = `${this.topBasicZIndex + index + 1}`;
336
- });
337
- topLevel.zIndex = this.topBasicZIndex + topLevel.elements.length;
338
- }
339
- /**
340
- * It increases the z-index of all the elements in the top entry by 1
341
- *
342
- * @returns {void}
343
- */
344
- increaseTopEntry() {
345
- const topEntry = this.levelEntry['top'];
346
- topEntry.elements.forEach((element) => {
347
- element.style.zIndex = `${number.convertToNumber(element.style.zIndex) + 1}`;
348
- });
349
- topEntry.zIndex += 1;
350
- }
351
- /**
352
- * If the z-index of the level is over 1000 greater than the basic z-index of the level, then return
353
- * true.
354
- *
355
- * @returns {boolean} - The zIndexEntry.zIndex - this.getBasicZIndexByLevel(level) >= 1000 is being returned.
356
- */
357
- isBaseLevelOver() {
358
- const baseEntry = this.levelEntry['base'];
359
- return baseEntry.zIndex >= this.topBasicZIndex;
360
- }
361
- }
362
- const InternalVegaZIndexManager$1 = new InternalVegaZIndexManager();
363
-
364
- const VegaNotifyRuntimeMetricsPayloadDefinition = [
365
- {
366
- payloadKey: 'IS_OPEN_METHOD_CALLED',
367
- payloadDescription: 'Indicate if the method open of public API VegaNotifyController is called',
368
- /**
369
- * Indicate whether the method is collected when the method been called .
370
- *
371
- * @param {string} scope - The class name of public api
372
- * @param {string} methodName - The method name called by the public api
373
- * @returns {boolean} A boolean value
374
- */
375
- canAccept: (scope, methodName) => scope === 'VegaNotifyController' && methodName === 'open',
376
- /**
377
- * The function checks if the method name is open.
378
- *
379
- * @returns {boolean} A boolean value
380
- */
381
- payloadValue: () => {
382
- return true;
383
- },
384
- },
385
- {
386
- payloadKey: 'IS_CLOSE_METHOD_CALLED',
387
- payloadDescription: 'Indicate if the method close of public API VegaNotifyController is called',
388
- /**
389
- * Indicate whether the method is collected when the method been called .
390
- *
391
- * @param {string} scope - The class name of public api
392
- * @param {string} methodName - The method name called by the public api
393
- * @returns {boolean} A boolean value
394
- */
395
- canAccept: (scope, methodName) => scope === 'VegaNotifyController' && methodName === 'close',
396
- /**
397
- * The function checks if the method name is close.
398
- *
399
- * @returns {boolean} A boolean value
400
- */
401
- payloadValue: () => {
402
- return true;
403
- },
404
- },
405
- {
406
- payloadKey: 'IS_CLOSEALL_METHOD_CALLED',
407
- payloadDescription: 'Indicate if the method closeAll of public API VegaNotifyController is called',
408
- /**
409
- * Indicate whether the method is collected when the method been called .
410
- *
411
- * @param {string} scope - The class name of public api
412
- * @param {string} methodName - The method name called by the public api
413
- * @returns {boolean} A boolean value
414
- */
415
- canAccept: (scope, methodName) => scope === 'VegaNotifyController' && methodName === 'closeAll',
416
- /**
417
- * The function checks if the method name is closeAll.
418
- *
419
- * @returns {boolean} A boolean value
420
- */
421
- payloadValue: () => {
422
- return true;
423
- },
424
- },
425
- ];
426
-
427
- var __decorate$5 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
428
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
429
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
430
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
431
- return c > 3 && r && Object.defineProperty(target, key, r), r;
432
- };
433
- /**
434
- * The page notification controller
435
- */
436
- class VegaNotifyController {
437
- constructor() {
438
- this.resizeObserverSlimmer = dynamicSlimmer.createDynamicSlimmer(VegaNotifyController, pageResizeObserverSlimmer.PageResizeObserverSlimmer, [], [{ mapFrom: 'connectResizeObserver', mapTo: 'connectResizeObserver' }], [
439
- {
440
- // eslint-disable-next-line jsdoc/require-jsdoc
441
- callback: (entries) => {
442
- var _a;
443
- const currentVisible = entries[0].contentRect.height > 0;
444
- if (!currentVisible && ((_a = this.container) === null || _a === void 0 ? void 0 : _a.classList.contains('hydrated'))) {
445
- InternalVegaZIndexManager$1.removeZIndex(this.container, 'top');
446
- this.container.remove();
447
- this.container = null;
448
- }
449
- },
450
- // eslint-disable-next-line jsdoc/require-jsdoc
451
- target: () => this.container,
452
- },
453
- ]);
454
- this.vegaPublicAPIRuntimeMetricsSlimmer = createPublicApiRuntimeMetricsSlimmer.createPublicAPIRuntimeMetricsSlimmer(VegaNotifyController, ['open', 'close', 'closeAll'], VegaNotifyRuntimeMetricsPayloadDefinition);
455
- }
456
- /**
457
- * It creates a new notification element, adds it to the container, and returns the notification's ID
458
- *
459
- * @param {VegaNotifyOption} options - VegaNotifyProps
460
- * @returns {Promise<string>} The ID of the notification.
461
- * @vegaVersion 1.17.0
462
- */
463
- async open(options) {
464
- const pageNotification = this.createPageNotification(options);
465
- this.getContainer().append(pageNotification);
466
- return pageNotification.id;
467
- }
468
- /**
469
- * It closes all notifications
470
- *
471
- * @vegaVersion 1.17.0
472
- */
473
- async closeAll() {
474
- this.container &&
475
- Array.from(this.container.children).forEach((item) => {
476
- void item.close();
477
- });
478
- }
479
- /**
480
- * It closes the notification with the given id
481
- *
482
- * @param {string} id - The id of the notification to close.
483
- * @vegaVersion 1.17.0
484
- */
485
- async close(id) {
486
- // eslint-disable-next-line no-restricted-globals
487
- await document.getElementById(id).close();
488
- }
489
- /**
490
- * The function "connectResizeObserver" is used to connect a resize observer.
491
- *
492
- * @vegaVersion 1.17.0
493
- */
494
- connectResizeObserver() {
495
- }
496
- /**
497
- * It creates a new page notification element, sets its properties, and returns it
498
- *
499
- * @param {VegaNotifyOption} props - VegaNotifyProps - the properties of the notification
500
- * @returns {HTMLVegaPageNotificationElement} A function that takes in a props object and returns a pageNotification element.
501
- */
502
- createPageNotification(props) {
503
- const pageNotification =
504
- // eslint-disable-next-line no-restricted-globals
505
- document.createElement('vega-page-notification');
506
- Object.keys(props).forEach((propName) => {
507
- props[propName] !== undefined && (pageNotification[propName] = props[propName]);
508
- });
509
- pageNotification.style.marginBottom = ui.getDeviceType() === ui.DeviceType.MOBILE ? '12px' : '16px';
510
- pageNotification.id = `vega-page-notification-${createPublicApiRuntimeMetricsSlimmer.generateUUID()}`;
511
- return pageNotification;
512
- }
513
- /**
514
- * It creates a div element, sets its z-index to be on top of everything else, adds a class to it, and
515
- * then adds it to the body of the page
516
- *
517
- * @returns {HTMLVegaPageNotificationListElement} The container is being returned.
518
- */
519
- getContainer() {
520
- if (this.container) {
521
- return this.container;
522
- }
523
- // eslint-disable-next-line no-restricted-globals
524
- this.container = document.createElement('vega-page-notification-list');
525
- InternalVegaZIndexManager$1.setZIndex(this.container, 'top');
526
- if (ui.getDeviceType() === ui.DeviceType.MOBILE) {
527
- this.container.classList.add('vega-page-notification-list-bottom');
528
- }
529
- else {
530
- this.container.classList.add('vega-page-notification-list-topRight');
531
- }
532
- // eslint-disable-next-line no-restricted-globals
533
- document.body.append(this.container);
534
- this.connectResizeObserver();
535
- return this.container;
536
- }
537
- }
538
- __decorate$5([
539
- globalSlimmerRegistry.InjectVegaSlimmer()
540
- ], VegaNotifyController.prototype, "resizeObserverSlimmer", void 0);
541
- __decorate$5([
542
- createPublicApiRuntimeMetricsSlimmer.InjectVegaTelemetrySlimmer()
543
- ], VegaNotifyController.prototype, "vegaPublicAPIRuntimeMetricsSlimmer", void 0);
544
- const VegaNotify = new VegaNotifyController();
545
-
546
- const ThemeManagerRuntimeMetricsPayloadDefinition = [
547
- {
548
- payloadKey: 'IS_OVERRIDECOLORS_METHOD_CALLED',
549
- payloadDescription: 'Indicate if the method overrideColors of public API ThemeManager is called',
550
- /**
551
- * Indicate whether the method is collected when the method been called .
552
- *
553
- * @param {string} scope - The class name of public api
554
- * @param {string} methodName - The method name called by the public api
555
- * @returns {boolean} A boolean value
556
- */
557
- canAccept: (scope, methodName) => scope === 'ThemeManager' && methodName === 'overrideColors',
558
- /**
559
- * The function checks if the method is be called.
560
- *
561
- * @returns {boolean} A boolean value
562
- */
563
- payloadValue: () => {
564
- return true;
565
- },
566
- },
567
- {
568
- payloadKey: 'IS_RESET_METHOD_CALLED',
569
- payloadDescription: 'Indicate if the method reset of public API ThemeManager is called',
570
- /**
571
- * Indicate whether the method is collected when the method been called .
572
- *
573
- * @param {string} scope - The class name of public api
574
- * @param {string} methodName - The method name called by the public api
575
- * @returns {boolean} A boolean value
576
- */
577
- canAccept: (scope, methodName) => scope === 'ThemeManager' && methodName === 'reset',
578
- /**
579
- * The function checks if the method is be called.
580
- *
581
- * @returns {boolean} A boolean value
582
- */
583
- payloadValue: () => {
584
- return true;
585
- },
586
- },
587
- {
588
- payloadKey: 'IS_TOGGLEDARKMODE_METHOD_CALLED',
589
- payloadDescription: 'Indicate if the method toggleDarkMode of public API ThemeManager is called',
590
- /**
591
- * Indicate whether the method is collected when the method been called .
592
- *
593
- * @param {string} scope - The class name of public api
594
- * @param {string} methodName - The method name called by the public api
595
- * @returns {boolean} A boolean value
596
- */
597
- canAccept: (scope, methodName) => scope === 'ThemeManager' && methodName === 'toggleDarkMode',
598
- /**
599
- * The function checks if the method is be called.
600
- *
601
- * @returns {boolean} A boolean value
602
- */
603
- payloadValue: () => {
604
- return true;
605
- },
606
- },
607
- {
608
- payloadKey: 'IS_ISDARKMODE_METHOD_CALLED',
609
- payloadDescription: 'Indicate if the method isDarkMode of public API ThemeManager is called',
610
- /**
611
- * Indicate whether the method is collected when the method been called .
612
- *
613
- * @param {string} scope - The class name of public api
614
- * @param {string} methodName - The method name called by the public api
615
- * @returns {boolean} A boolean value
616
- */
617
- canAccept: (scope, methodName) => scope === 'ThemeManager' && methodName === 'isDarkMode',
618
- /**
619
- * The function checks if the method is be called.
620
- *
621
- * @returns {boolean} A boolean value
622
- */
623
- payloadValue: () => {
624
- return true;
625
- },
626
- },
627
- {
628
- payloadKey: 'IS_APPLY_BRANDING_METHOD_CALLED',
629
- payloadDescription: 'Indicate if the method applyBranding of public API ThemeManager is called',
630
- /**
631
- * Indicate whether the method is collected when the method been called .
632
- *
633
- * @param {string} scope - The class name of public api
634
- * @param {string} methodName - The method name called by the public api
635
- * @returns {boolean} A boolean value
636
- */
637
- canAccept: (scope, methodName) => scope === 'ThemeManager' && methodName === 'applyBranding',
638
- /**
639
- * The function checks if the method is be called.
640
- *
641
- * @returns {boolean} A boolean value
642
- */
643
- payloadValue: () => {
644
- return true;
645
- },
646
- },
647
- ];
648
-
649
- var __decorate$4 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
650
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
651
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
652
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
653
- return c > 3 && r && Object.defineProperty(target, key, r), r;
654
- };
655
- /**
656
- * Vega components theme manager
657
- */
658
- class ThemeManager {
659
- constructor() {
660
- this.vegaPublicAPIRuntimeMetricsSlimmer = createPublicApiRuntimeMetricsSlimmer.createPublicAPIRuntimeMetricsSlimmer(ThemeManager, ['overrideColors', 'reset', 'toggleDarkMode', 'isDarkMode', 'applyBranding'], ThemeManagerRuntimeMetricsPayloadDefinition);
661
- }
662
- /**
663
- * It takes the colors you passed in, parses them into the correct format, and then applies them to the theme
664
- *
665
- * @param {VegaThemeOverrideColors} overrideColors - OverrideColors - This is the object that you pass to the function.
666
- * @vegaVersion 1.20.0
667
- */
668
- async overrideColors(overrideColors) {
669
- void darkModeStyleController.VegaInternalThemeManager.overrideColors(overrideColors);
670
- }
671
- /**
672
- * It removes all the custom override theme styles from the DOM
673
- *
674
- * @vegaVersion 1.20.0
675
- */
676
- async reset() {
677
- void darkModeStyleController.VegaInternalThemeManager.reset();
678
- }
679
- /**
680
- * This function toggles the dark mode of a webpage by adding or removing a 'dark' class to the HTML element.
681
- *
682
- * @param {boolean | undefined} darkMode - A boolean or undefined value that determines whether to enable or disable dark mode.
683
- * If it is true, dark mode is enabled.
684
- * If it is false, dark mode is disabled.
685
- * @vegaVersion 1.32.0
686
- */
687
- toggleDarkMode(darkMode) {
688
- darkModeStyleController.VegaInternalThemeManager.toggleDarkMode(darkMode);
689
- }
690
- /**
691
- * The function checks if the HTML element has a class of "dark" and returns a boolean value accordingly.
692
- *
693
- * @returns {boolean} A boolean value indicating whether the HTML element has a class of "dark", which is
694
- * typically used to indicate that the website is in dark mode.
695
- * @vegaVersion 1.32.0
696
- */
697
- isDarkMode() {
698
- return darkModeStyleController.VegaInternalThemeManager.isDarkMode();
699
- }
700
- /**
701
- * This function switches the Vega theme to a brand theme based on the provided options.
702
- *
703
- * @param {BrandOptions} options - The options includes 'gp', 'genius' and 'heartland' options
704
- * @vegaVersion 2.47.0
705
- */
706
- applyBranding(options) {
707
- darkModeStyleController.VegaInternalThemeManager.applyBranding(options);
708
- }
709
- }
710
- __decorate$4([
711
- createPublicApiRuntimeMetricsSlimmer.InjectVegaTelemetrySlimmer()
712
- ], ThemeManager.prototype, "vegaPublicAPIRuntimeMetricsSlimmer", void 0);
713
- const VegaThemeManager = new ThemeManager();
714
-
715
- const VegaDialogRuntimeMetricsPayloadDefinition = [
716
- {
717
- payloadKey: 'IS_OPEN_METHOD_CALLED',
718
- payloadDescription: 'Indicate if the method open of public API VegaDialogController is called',
719
- /**
720
- * Indicate whether the method is collected when the method been called .
721
- *
722
- * @param {string} scope - The class name of public api
723
- * @param {string} methodName - The method name called by the public api
724
- * @returns {boolean} A boolean value
725
- */
726
- canAccept: (scope, methodName) => scope === 'VegaDialogController' && methodName === 'open',
727
- /**
728
- * The function checks if the method name is open.
729
- *
730
- * @returns {boolean} A boolean value
731
- */
732
- payloadValue: () => {
733
- return true;
734
- },
735
- },
736
- ];
737
-
738
- var __decorate$3 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
739
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
740
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
741
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
742
- return c > 3 && r && Object.defineProperty(target, key, r), r;
743
- };
744
- var __rest$1 = (undefined && undefined.__rest) || function (s, e) {
745
- var t = {};
746
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
747
- t[p] = s[p];
748
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
749
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
750
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
751
- t[p[i]] = s[p[i]];
752
- }
753
- return t;
754
- };
755
- /**
756
- * The dialog controller
757
- */
758
- class VegaDialogController {
759
- constructor() {
760
- this.vegaPublicAPIRuntimeMetricsSlimmer = createPublicApiRuntimeMetricsSlimmer.createPublicAPIRuntimeMetricsSlimmer(VegaDialogController, ['open'], VegaDialogRuntimeMetricsPayloadDefinition);
761
- }
762
- /**
763
- *
764
- * It creates a new `vega-dialog` element, sets its properties, appends it to the DOM, and opens it
765
- *
766
- * @param {VegaDialogOption} options - VegaDialogOption
767
- * @returns {HTMLVegaDialogElement} The dialog reference.
768
- * @vegaVersion 1.24.0
769
- */
770
- open(options) {
771
- // eslint-disable-next-line no-restricted-globals
772
- const dialog = document.createElement('vega-dialog');
773
- const { isVerticallyCenter, isVerticallyCentered, showCloseButton, size, title, handleClose } = options, dialogProps = __rest$1(options, ["isVerticallyCenter", "isVerticallyCentered", "showCloseButton", "size", "title", "handleClose"]);
774
- dialog.id = `vega-dialog-${createPublicApiRuntimeMetricsSlimmer.generateUUID()}`;
775
- dialog.dialogTitle = title;
776
- dialog.modalProps = { isVerticallyCenter, isVerticallyCentered, showCloseButton, size, handleClose };
777
- Object.keys(dialogProps).forEach((propName) => {
778
- if (dialogProps[propName] !== undefined) {
779
- dialog[propName] = dialogProps[propName];
780
- }
781
- });
782
- // eslint-disable-next-line no-restricted-globals
783
- document.body.append(dialog);
784
- return dialog;
785
- }
786
- }
787
- __decorate$3([
788
- createPublicApiRuntimeMetricsSlimmer.InjectVegaTelemetrySlimmer()
789
- ], VegaDialogController.prototype, "vegaPublicAPIRuntimeMetricsSlimmer", void 0);
790
- const VegaDialog = new VegaDialogController();
791
-
792
- /* istanbul ignore next */
793
- const VegaEventManagerRuntimeMetricsPayloadDefinition = [
794
- {
795
- payloadKey: 'IS_SETSEMANTICS_METHOD_CALLED',
796
- payloadDescription: 'Indicate if the method setSemantics of public API VegaEventManager is called',
797
- /**
798
- * Indicate whether the method is collected when the method been called .
799
- *
800
- * @param {string} scope - The class name of public api
801
- * @param {string} methodName - The method name called by the public api
802
- * @returns {boolean} A boolean value
803
- */
804
- canAccept: (scope, methodName) => scope === 'VegaEventManager' && methodName === 'setSemantics',
805
- /**
806
- * The function checks if the method is been called.
807
- *
808
- * @returns {boolean} A boolean value
809
- */
810
- payloadValue: () => {
811
- return true;
812
- },
813
- },
814
- {
815
- payloadKey: 'IS_GETSEMANTICS_METHOD_CALLED',
816
- payloadDescription: 'Indicate if the method getSemantics of public API VegaEventManager is called',
817
- /**
818
- * Indicate whether the method is collected when the method been called .
819
- *
820
- * @param {string} scope - The class name of public api
821
- * @param {string} methodName - The method name called by the public api
822
- * @returns {boolean} A boolean value
823
- */
824
- canAccept: (scope, methodName) => scope === 'VegaEventManager' && methodName === 'getSemantics',
825
- /**
826
- * The function checks if the method is been called.
827
- *
828
- * @returns {boolean} A boolean value
829
- */
830
- payloadValue: () => {
831
- return true;
832
- },
833
- },
834
- {
835
- payloadKey: 'IS_GETENABLEDEVENTIDSBYCOMPONENT_METHOD_CALLED',
836
- payloadDescription: 'Indicate if the method getEnabledEventIdsByComponent of public API VegaEventManager is called',
837
- /**
838
- * Indicate whether the method is collected when the method been called .
839
- *
840
- * @param {string} scope - The class name of public api
841
- * @param {string} methodName - The method name called by the public api
842
- * @returns {boolean} A boolean value
843
- */
844
- canAccept: (scope, methodName) => scope === 'VegaEventManager' && methodName === 'getEnabledEventIdsByComponent',
845
- /**
846
- * The function checks if the method is been called.
847
- *
848
- * @returns {boolean} A boolean value
849
- */
850
- payloadValue: () => {
851
- return true;
852
- },
853
- },
854
- {
855
- payloadKey: 'globalEventIsNative',
856
- payloadDescription: 'Indicate if the vega components will emit events without the vega prefix',
857
- /**
858
- * Indicate whether the method is collected when the method been called .
859
- *
860
- * @param {string} scope - The class name of public api
861
- * @param {string} methodName - The method name called by the public api
862
- * @returns {boolean} A boolean value
863
- */
864
- canAccept: (scope, methodName) => scope === 'VegaEventManager' && methodName === 'setSemantics',
865
- /**
866
- * The function checks if the method is been called.
867
- *
868
- * @param {unknown[]} args - The args parameter is an object
869
- * @returns {boolean} A boolean value
870
- */
871
- payloadValue: (args) => {
872
- const config = args;
873
- return !!(config.global && config.global.namespace === 'native');
874
- },
875
- },
876
- {
877
- payloadKey: 'eventOfSpecificComponentsIsNative',
878
- payloadDescription: 'Indicate if the vega components will emit events with the vega prefix, but special components will emit events without vega prefix',
879
- /**
880
- * Indicate whether the method is collected when the method been called .
881
- *
882
- * @param {string} scope - The class name of public api
883
- * @param {string} methodName - The method name called by the public api
884
- * @returns {boolean} A boolean value
885
- */
886
- canAccept: (scope, methodName) => scope === 'VegaEventManager' && methodName === 'setSemantics',
887
- /**
888
- * The function checks if the method is been called.
889
- *
890
- * @param {unknown[]} args - The args parameter is an object
891
- * @returns {boolean} A boolean value
892
- */
893
- payloadValue: (args) => {
894
- const config = args;
895
- if (config.components) {
896
- const specialComponents = Object.keys(config.components);
897
- return !!(specialComponents.length > 0 &&
898
- config.components[specialComponents[0]].namespace === 'native');
899
- }
900
- return false;
901
- },
902
- },
903
- {
904
- payloadKey: 'eventOfSpecificComponentsIsVega',
905
- payloadDescription: 'Indicate if the vega components will emit events without the vega prefix, but special components will emit events with vega prefix',
906
- /**
907
- * Indicate whether the method is collected when the method been called .
908
- *
909
- * @param {string} scope - The class name of public api
910
- * @param {string} methodName - The method name called by the public api
911
- * @returns {boolean} A boolean value
912
- */
913
- canAccept: (scope, methodName) => scope === 'VegaEventManager' && methodName === 'setSemantics',
914
- /**
915
- * The function checks if the method is been called.
916
- *
917
- * @param {unknown[]} args - The args parameter is an object
918
- * @returns {boolean} A boolean value
919
- */
920
- payloadValue: (args) => {
921
- const config = args;
922
- if (config.global && config.components) {
923
- const specialComponents = Object.keys(config.components);
924
- return !!(config.global.namespace === 'native' &&
925
- specialComponents.length > 0 &&
926
- config.components[specialComponents[0]].namespace === 'vega');
927
- }
928
- return false;
929
- },
930
- },
931
- {
932
- payloadKey: 'globalJqueryDelegatedEventIsTrue',
933
- payloadDescription: 'Indicate if the use jQuery with event delegation',
934
- /**
935
- * Indicate whether the method is collected when the method been called .
936
- *
937
- * @param {string} scope - The class name of public api
938
- * @param {string} methodName - The method name called by the public api
939
- * @returns {boolean} A boolean value
940
- */
941
- canAccept: (scope, methodName) => scope === 'VegaEventManager' && methodName === 'setSemantics',
942
- /**
943
- * The function checks if the method is been called.
944
- *
945
- * @param {unknown[]} args - The args parameter is an object
946
- * @returns {boolean} A boolean value
947
- */
948
- payloadValue: (args) => {
949
- const config = args;
950
- return !!(config.global && config.global.jqueryDelegatedEvent === true);
951
- },
952
- },
953
- {
954
- payloadKey: 'jqueryDelegatedEventIsCustomStrategy',
955
- payloadDescription: 'Indicate if the use jQuery with event delegation',
956
- /**
957
- * Indicate whether the method is collected when the method been called .
958
- *
959
- * @param {string} scope - The class name of public api
960
- * @param {string} methodName - The method name called by the public api
961
- * @returns {boolean} A boolean value
962
- */
963
- canAccept: (scope, methodName) => scope === 'VegaEventManager' && methodName === 'setSemantics',
964
- /**
965
- * The function checks if the method is been called.
966
- *
967
- * @param {unknown[]} args - The args parameter is an object
968
- * @returns {boolean} A boolean value
969
- */
970
- payloadValue: (args) => {
971
- const config = args;
972
- return !!(config.global &&
973
- Array.isArray(config.global.jqueryDelegatedEvent) &&
974
- config.global.jqueryDelegatedEvent.length > 0);
975
- },
976
- },
977
- {
978
- payloadKey: 'jqueryDelegatedEventOfSpecialComponentsIsTrue',
979
- payloadDescription: 'Indicate if the use jQuery with event delegation',
980
- /**
981
- * Indicate whether the method is collected when the method been called .
982
- *
983
- * @param {string} scope - The class name of public api
984
- * @param {string} methodName - The method name called by the public api
985
- * @returns {boolean} A boolean value
986
- */
987
- canAccept: (scope, methodName) => scope === 'VegaEventManager' && methodName === 'setSemantics',
988
- /**
989
- * The function checks if the method is been called.
990
- *
991
- * @param {unknown[]} args - The args parameter is an object
992
- * @returns {boolean} A boolean value
993
- */
994
- payloadValue: (args) => {
995
- const config = args;
996
- if (config.components) {
997
- const specialComponents = Object.keys(config.components);
998
- return !!(specialComponents.length > 0 &&
999
- config.components[specialComponents[0]].jqueryDelegatedEvent === true);
1000
- }
1001
- return false;
1002
- },
1003
- },
1004
- ];
1005
-
1006
- var __decorate$2 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
1007
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
1008
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
1009
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
1010
- return c > 3 && r && Object.defineProperty(target, key, r), r;
1011
- };
1012
- /**
1013
- * The VegaEventManager class provides methods for setting and retrieving event semantics configuration,
1014
- * as well as getting the corresponding native event name for a given event.
1015
- */
1016
- class VegaEventManager {
1017
- constructor() {
1018
- this.vegaPublicAPIRuntimeMetricsSlimmer = createPublicApiRuntimeMetricsSlimmer.createPublicAPIRuntimeMetricsSlimmer(VegaEventManager, ['setSemantics', 'getSemantics', 'getEnabledEventIdsByComponent'], VegaEventManagerRuntimeMetricsPayloadDefinition);
1019
- }
1020
- /**
1021
- * The function sets the semantics configuration for event management.
1022
- *
1023
- * @param {EventSemanticsConfig} config - The config parameter is an object that contains the
1024
- * configuration settings for the event semantics. It may include properties such as the event type,
1025
- * event source, event target, event data, and any other relevant information for setting up the
1026
- * semantics of the event.
1027
- * @vegaVersion 2.0.0
1028
- */
1029
- setSemantics(config) {
1030
- internalVegaEventManager.internalVegaEventManager.setSemantics(config);
1031
- }
1032
- /**
1033
- * The function "getSemantics" returns the event semantics of an HTML element.
1034
- *
1035
- * @param {HTMLElement} host - The host parameter is an HTMLElement, which represents an HTML element
1036
- * in the DOM (Document Object Model). It can be any valid HTML element such as a div, span, button,
1037
- * etc.
1038
- * @returns {EventSemantics} an object of type EventSemantics.
1039
- * @vegaVersion 2.0.0
1040
- */
1041
- getSemantics(host) {
1042
- return internalVegaEventManager.internalVegaEventManager.getSemantics(host);
1043
- }
1044
- /**
1045
- * The function "getEnabledEventIdsByComponent" returns the all eventIds in component.
1046
- *
1047
- * @param {VegaComponentName} componentName - The component name,
1048
- * etc.
1049
- * @returns {Nullable<VegaEventID[]>} All eventIds.
1050
- * @vegaVersion 2.0.0
1051
- */
1052
- getEnabledEventIdsByComponent(componentName) {
1053
- return internalVegaEventManager.internalVegaEventManager.getEnabledEventIdsByComponent(componentName);
1054
- }
1055
- }
1056
- __decorate$2([
1057
- createPublicApiRuntimeMetricsSlimmer.InjectVegaTelemetrySlimmer()
1058
- ], VegaEventManager.prototype, "vegaPublicAPIRuntimeMetricsSlimmer", void 0);
1059
- const VegaEventManager$1 = new VegaEventManager();
1060
-
1061
- const ZIndexManagerRuntimeMetricsPayloadDefinition = [
1062
- {
1063
- payloadKey: 'IS_OVERRIDEZINDEXBASICVALUES_METHOD_CALLED',
1064
- payloadDescription: 'Indicate if the method overrideZIndexBasicValues of public API ZIndexManager is called',
1065
- /**
1066
- * Indicate whether the method is collected when the method been called .
1067
- *
1068
- * @param {string} scope - The class name of public api
1069
- * @param {string} methodName - The method name called by the public api
1070
- * @returns {boolean} A boolean value
1071
- */
1072
- canAccept: (scope, methodName) => scope === 'VegaZIndexManager' && methodName === 'overrideZIndexBasicValues',
1073
- /**
1074
- * The function checks if the method name is load.
1075
- *
1076
- * @returns {boolean} A boolean value
1077
- */
1078
- payloadValue: () => {
1079
- return true;
1080
- },
1081
- },
1082
- {
1083
- payloadKey: 'zIndexBasicValuesGreatThanTenThousand',
1084
- payloadDescription: 'Indicate if the basic z-index value is great than ten thousand',
1085
- /**
1086
- * Indicate whether the method is collected when the method been called .
1087
- *
1088
- * @param {string} scope - The class name of public api
1089
- * @param {string} methodName - The method name called by the public api
1090
- * @returns {boolean} A boolean value
1091
- */
1092
- canAccept: (scope, methodName) => scope === 'VegaZIndexManager' && methodName === 'overrideZIndexBasicValues',
1093
- /**
1094
- * The function checks if the method name is load.
1095
- *
1096
- * @param {unknown[]} args - The parameter of slimmer method
1097
- * @returns {boolean} A boolean value
1098
- */
1099
- payloadValue: (args) => {
1100
- return args['base'] > 10000;
1101
- },
1102
- },
1103
- ];
1104
-
1105
- var __decorate$1 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
1106
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
1107
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
1108
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
1109
- return c > 3 && r && Object.defineProperty(target, key, r), r;
1110
- };
1111
- /**
1112
- * The VegaZIndexManager class calls a method in the ZIndexManager class to
1113
- * change z-index values based on the input.
1114
- */
1115
- class VegaZIndexManager {
1116
- constructor() {
1117
- this.vegaPublicAPIRuntimeMetricsSlimmer = createPublicApiRuntimeMetricsSlimmer.createPublicAPIRuntimeMetricsSlimmer(VegaZIndexManager, ['overrideZIndexBasicValues'], ZIndexManagerRuntimeMetricsPayloadDefinition);
1118
- }
1119
- /**
1120
- * The function "overrideZIndexBasicValues" calls a method in the "ZIndexManager" class to change the
1121
- * z-index values based on the input.
1122
- *
1123
- * @param {ZIndexBasicValues} input - The input parameter is of type ZIndexBasicValues.
1124
- * @vegaVersion 2.3.0
1125
- */
1126
- overrideZIndexBasicValues(input) {
1127
- InternalVegaZIndexManager$1.overrideZIndexBasicValues(input);
1128
- }
1129
- }
1130
- __decorate$1([
1131
- createPublicApiRuntimeMetricsSlimmer.InjectVegaTelemetrySlimmer()
1132
- ], VegaZIndexManager.prototype, "vegaPublicAPIRuntimeMetricsSlimmer", void 0);
1133
- const VegaZIndexManager$1 = new VegaZIndexManager();
1134
-
1135
- const VegaSkeletonRuntimeMetricsPayloadDefinition = [
1136
- {
1137
- payloadKey: 'IS_LOAD_METHOD_CALLED',
1138
- payloadDescription: 'Indicate if the method load of public API VegaSkeletonLoaderController is called',
1139
- /**
1140
- * Indicate whether the method is collected when the method been called .
1141
- *
1142
- * @param {string} scope - The class name of public api
1143
- * @param {string} methodName - The method name called by the public api
1144
- * @returns {boolean} A boolean value
1145
- */
1146
- canAccept: (scope, methodName) => scope === 'VegaSkeletonLoaderController' && methodName === 'load',
1147
- /**
1148
- * The function checks if the method name is load.
1149
- *
1150
- * @returns {boolean} A boolean value
1151
- */
1152
- payloadValue: () => {
1153
- return true;
1154
- },
1155
- },
1156
- {
1157
- payloadKey: 'IS_UNLOAD_METHOD_CALLED',
1158
- payloadDescription: 'Indicate if the method unLoad of public API VegaSkeletonLoaderController is called',
1159
- /**
1160
- * Indicate whether the method is collected when the method been called .
1161
- *
1162
- * @param {string} scope - The class name of public api
1163
- * @param {string} methodName - The method name called by the public api
1164
- * @returns {boolean} A boolean value
1165
- */
1166
- canAccept: (scope, methodName) => scope === 'VegaSkeletonLoaderController' && methodName === 'unLoad',
1167
- /**
1168
- * The function checks if the method name is unLoad.
1169
- *
1170
- * @returns {boolean} A boolean value
1171
- */
1172
- payloadValue: () => {
1173
- return true;
1174
- },
1175
- },
1176
- {
1177
- payloadKey: 'IS_UNLOADALL_METHOD_CALLED',
1178
- payloadDescription: 'Indicate if the method unLoadAll of public API VegaSkeletonLoaderController is called',
1179
- /**
1180
- * Indicate whether the method is collected when the method been called .
1181
- *
1182
- * @param {string} scope - The class name of public api
1183
- * @param {string} methodName - The method name called by the public api
1184
- * @returns {boolean} A boolean value
1185
- */
1186
- canAccept: (scope, methodName) => scope === 'VegaSkeletonLoaderController' && methodName === 'unLoadAll',
1187
- /**
1188
- * The function checks if the method name is unLoadAll.
1189
- *
1190
- * @returns {boolean} A boolean value
1191
- */
1192
- payloadValue: () => {
1193
- return true;
1194
- },
1195
- },
1196
- ];
1197
-
1198
- var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
1199
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
1200
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
1201
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
1202
- return c > 3 && r && Object.defineProperty(target, key, r), r;
1203
- };
1204
- /**
1205
- * Vega Skeleton Loader Controller to show skeletons in the target elements
1206
- */
1207
- class VegaSkeletonLoaderController {
1208
- constructor() {
1209
- this.vegaPublicAPIRuntimeMetricsSlimmer = createPublicApiRuntimeMetricsSlimmer.createPublicAPIRuntimeMetricsSlimmer(VegaSkeletonLoaderController, ['load', 'unLoad', 'unLoadAll'], VegaSkeletonRuntimeMetricsPayloadDefinition);
1210
- this.loaderMap = new Map();
1211
- }
1212
- /**
1213
- * Load the skeletons in the target elements
1214
- *
1215
- * @param { VegaSkeletonLoaderConfig } config - Configuration for the loading function
1216
- * @param {string} config.target - Target elements to show the skeletons.
1217
- * @param {VegaSkeletonLoaderConfig.type} [config.type = 'text'] - Type of the skeleton.
1218
- * @param {VegaSkeletonLoaderConfig.width} config.width - Width of the skeleton.
1219
- * @param {VegaSkeletonLoaderConfig.height} config.height - Height of the skeleton.
1220
- * @param {VegaSkeletonLoaderConfig.items} config.items - Configuration for multiple skeleton items.
1221
- * @param {VegaSkeletonLoaderConfig.layout} config.layout - Layout of the skeleton items.
1222
- * @returns { string } - Key of the loaded skeleton items.
1223
- * @vegaVersion 2.16.0
1224
- */
1225
- load({ target, type = 'text', width, height, items, layout }) {
1226
- // eslint-disable-next-line no-restricted-globals
1227
- const targets = Array.from(document.body.querySelectorAll(target));
1228
- const key = `vega-skeleton-loader-${createPublicApiRuntimeMetricsSlimmer.generateUUID()}`;
1229
- const loaderItems = [];
1230
- targets.forEach((target) => {
1231
- const skeletonsLoaders = !items
1232
- ? [this.createSkeleton({ type, width, height })]
1233
- : items.map(this.createSkeleton);
1234
- const itemsWithKey = (layout ? [this.wrapLayout(skeletonsLoaders, layout)] : skeletonsLoaders).map((item) => {
1235
- item.dataset[VegaSkeletonLoaderController.LOADER_DATA_SET_KEY] = key;
1236
- return item;
1237
- });
1238
- loaderItems.push(...itemsWithKey);
1239
- target.append(...itemsWithKey);
1240
- });
1241
- this.loaderMap.set(key, loaderItems);
1242
- return key;
1243
- }
1244
- /**
1245
- * Remove the skeletons from the dom.
1246
- *
1247
- * @param {string} key - The key returned from {@link VegaSkeletonLoaderController.load}.
1248
- * @vegaVersion 2.16.0
1249
- */
1250
- unLoad(key) {
1251
- if (this.loaderMap.has(key)) {
1252
- this.loaderMap.get(key).forEach((item) => item.remove());
1253
- this.loaderMap.delete(key);
1254
- }
1255
- }
1256
- /**
1257
- * Remove all the skeletons from the dom.
1258
- *
1259
- * @vegaVersion 2.16.0
1260
- */
1261
- unLoadAll() {
1262
- for (const items of this.loaderMap.values()) {
1263
- items.forEach((item) => item.remove());
1264
- }
1265
- this.loaderMap.clear();
1266
- }
1267
- /**
1268
- * Create a skeleton item. The skeleton animated always be true
1269
- *
1270
- * @param {VegaSkeletonLoaderItem} config - Configuration for the skeleton item.
1271
- * @returns {HTMLVegaSkeletonElement} - Skeleton item.
1272
- */
1273
- createSkeleton(config) {
1274
- const { type, width, height } = config;
1275
- // eslint-disable-next-line no-restricted-globals
1276
- const skeleton = document.createElement('vega-skeleton');
1277
- Object.assign(skeleton, { animated: true, type, width, height });
1278
- return skeleton;
1279
- }
1280
- /**
1281
- * Wrap the flex layout for the skeletons.
1282
- *
1283
- * @param {HTMLElement[]} skeletons - Skeleton elements of the loader.
1284
- * @param {VegaSkeletonLoaderLayout} layout - Flex properties for the layout.
1285
- * @returns {HTMLVegaFlexElement} - Container wrapping the skeletons in the specified flex layout.
1286
- */
1287
- wrapLayout(skeletons, layout) {
1288
- // eslint-disable-next-line no-restricted-globals
1289
- const skeletonContainer = document.createElement('vega-flex');
1290
- Object.assign(skeletonContainer, Object.assign({ className: 'vega-skeleton-loader-template-container' }, layout.props));
1291
- Object.assign(skeletonContainer.style, layout.style);
1292
- skeletonContainer.append(...skeletons);
1293
- return skeletonContainer;
1294
- }
1295
- }
1296
- VegaSkeletonLoaderController.LOADER_DATA_SET_KEY = 'vegaSkeletonLoaderKey';
1297
- __decorate([
1298
- createPublicApiRuntimeMetricsSlimmer.InjectVegaTelemetrySlimmer()
1299
- ], VegaSkeletonLoaderController.prototype, "vegaPublicAPIRuntimeMetricsSlimmer", void 0);
1300
- const VegaSkeletonLoader = new VegaSkeletonLoaderController();
1301
-
1302
- /**
1303
- * Base renderer for Vega Rich Text Editor.
1304
- */
1305
- class VegaRTEExtensionRenderer extends baseRenderer.VegaRTEBaseRenderer {
1306
- /**
1307
- * Returns the styles to be injected into the RTE scope.
1308
- * Override this method to provide custom styles for the custom blocks or nodes.
1309
- *
1310
- * @returns {string} - The styles as a string.
1311
- */
1312
- injectRTEScopeStyles() {
1313
- return '';
1314
- }
1315
- /**
1316
- * Renders the given data as a DOM element.
1317
- *
1318
- * @param {RTEBlock | RTENode} renderData - The data to render, which can be a block or a node.
1319
- * @param {RTERenderContext} rteContext - The rte editor context.
1320
- * @param {VegaRTECreateElementFunction} createElement - The function to create a DOM element.
1321
- * @returns {VegaRTERenderResult} - The rendered DOM element.
1322
- */
1323
- render(renderData, rteContext, createElement) {
1324
- const element = this.doRender(createElement, renderData, rteContext);
1325
- this.fallbackRegisterRef(element, renderData);
1326
- this.appendChildren(element, renderData, rteContext, createElement);
1327
- return element;
1328
- }
1329
- /**
1330
- * Register the reference of the element in the rendering registry.
1331
- *
1332
- * @param {RTEBlock | RTENode} renderData - The data to register with the element.
1333
- * @returns {VegaRTEUseRef} - The function to register the element.
1334
- */
1335
- useRef(renderData) {
1336
- renderData[VegaRTEExtensionRenderer.REGISTER_REF_FLAG] = true;
1337
- return function (element) {
1338
- if (element) {
1339
- codeBlock.stateEntityRenderingRegistry.register(element, renderData);
1340
- }
1341
- };
1342
- }
1343
- /**
1344
- * Get a registered renderer by its key.
1345
- *
1346
- * @param {string} key - The key of the renderer.
1347
- * @returns {Nullable<BaseRenderer>} - The registered renderer or null if not found.
1348
- */
1349
- getDTORenderer(key) {
1350
- return dtoRendererManager.RTEDTORendererManager.getRTERenderer(key);
1351
- }
1352
- /**
1353
- * Auto render the block children if the block element is not exist
1354
- *
1355
- * @param {VegaRTERenderResult} parentElement - The parent element to append children to.
1356
- * @param {RTEBlock | RTENode} renderData - The data to render children for.
1357
- * @param {RTERenderContext} rteContext - The render context.
1358
- * @param {VegaRTECreateElementFunction} createElement - The function to create a DOM element.
1359
- */
1360
- appendChildren(parentElement, renderData, rteContext, createElement) {
1361
- if (Array.isArray(renderData['children']) &&
1362
- renderData['children'].length &&
1363
- !parentElement['$children$']) {
1364
- parentElement['$children$'] = renderData['children']
1365
- .map((child) => {
1366
- return this.renderChildren(child, rteContext, createElement);
1367
- })
1368
- .filter(typeGuard.isNonNullable);
1369
- }
1370
- }
1371
- /**
1372
- * Render the children node.
1373
- *
1374
- * @param {RTENode | RTEBlock} renderData - The node to render children for.
1375
- * @param {RTERenderContext} rteContext - The render context.
1376
- * @param {VegaRTECreateElementFunction} createElement - The function to create a DOM element.
1377
- * @returns {Nullable<VegaRTERenderResult>} - The rendered DOM element.
1378
- */
1379
- renderChildren(renderData, rteContext, createElement) {
1380
- const renderer = this.getDTORenderer(renderData.type);
1381
- if (renderer) {
1382
- return renderer.render(renderData, rteContext, createElement);
1383
- }
1384
- }
1385
- /**
1386
- * Fallback register reference for the element.
1387
- *
1388
- * @param {VegaRTERenderResult} element - The rendered DOM element.
1389
- * @param {RTEBlock | RTENode} renderData - The data to register with the element.
1390
- */
1391
- fallbackRegisterRef(element, renderData) {
1392
- if (!renderData[VegaRTEExtensionRenderer.REGISTER_REF_FLAG] &&
1393
- element['$attrs$'] &&
1394
- !element['$attrs$']['ref']) {
1395
- // eslint-disable-next-line jsdoc/require-jsdoc
1396
- element['$attrs$']['ref'] = this.useRef(renderData);
1397
- }
1398
- }
1399
- }
1400
- VegaRTEExtensionRenderer.REGISTER_REF_FLAG = '__registeredRef__';
1401
-
1402
- /**
1403
- * Abstract class for Vega Rich Text Editor extensions.
1404
- */
1405
- class VegaRTEExtension {
1406
- constructor() {
1407
- /**
1408
- * The context of the RTE extension, which may include references to the host editor and other relevant information.
1409
- */
1410
- this.extensionContext = null;
1411
- this.hasCustomStylesRenderers = new Set();
1412
- }
1413
- /**
1414
- * Registers an action handle strategy for a specific node or block class.
1415
- *
1416
- * @param {string} nodeOrBlockClassName - The name of the node or block class.
1417
- * @param {string} actionType - The type of the action.
1418
- * @param {ActionHandleStrategy<ModifyContentAction, RTENode | RTEBlock | VegaRTEContent>} strategy - The strategy to register.
1419
- */
1420
- static registerActionHandleStrategy(nodeOrBlockClassName, actionType, strategy) {
1421
- codeBlock.ActionHandleStrategyRegistry.register(actionType, nodeOrBlockClassName, strategy);
1422
- }
1423
- /**
1424
- * Registers an action handler interceptor for a specific node or block class.
1425
- *
1426
- * @param {string} nodeOrBlockClassName - The name of the node or block class.
1427
- * @param {string} actionType - The type of the action.
1428
- * @param {ActionHandlerInterceptor<ModifyContentAction, RTENode | RTEBlock | VegaRTEContent>} strategy - The interceptor to register.
1429
- */
1430
- static registerActionHandlerInterceptor(nodeOrBlockClassName, actionType, strategy) {
1431
- codeBlock.ActionHandlerInterceptorRegistry.register(actionType, nodeOrBlockClassName, strategy);
1432
- }
1433
- /**
1434
- * Initializes the RTE extension with the provided context.
1435
- *
1436
- * @param {RTEExtensionContext} context - The context of the RTE extension.
1437
- */
1438
- initialExtension(context) {
1439
- this.extensionContext = context;
1440
- }
1441
- /**
1442
- * Collect custom styles for the extension renderers.
1443
- * If custom nodes have special styles, override this method to provide the styles.
1444
- *
1445
- * @returns {string} - The custom styles as a string.
1446
- */
1447
- collectExtensionRendererStyles() {
1448
- let styles = '';
1449
- if (this.hasCustomStylesRenderers.size > 0) {
1450
- this.hasCustomStylesRenderers.forEach((renderer) => {
1451
- styles += `${renderer.injectRTEScopeStyles()}\n`;
1452
- });
1453
- }
1454
- return styles;
1455
- }
1456
- /**
1457
- * Register a node type with the extension.
1458
- *
1459
- * @param {string} type - The type of the node or block. The type should be a string that uniquely identifies the node or block.
1460
- * @param {ClassType<RTEBlock | RTENode>} DTOClass - The DTO class to register.
1461
- */
1462
- registerNode(type, DTOClass) {
1463
- codeBlock.RTEDTOClassManager.registerRTEDTOClass(type, DTOClass);
1464
- }
1465
- /**
1466
- * Register a renderer for a node type with the extension.
1467
- *
1468
- * @param {string} type - The type of the node or block. The type should be a string that uniquely identifies the node or block.
1469
- * @param {BaseRenderer} renderer - The renderer to register.
1470
- */
1471
- registerRenderer(type, renderer) {
1472
- dtoRendererManager.RTEDTORendererManager.registerRTEDTORenderer(type, renderer);
1473
- if (renderer instanceof VegaRTEExtensionRenderer && renderer.injectRTEScopeStyles()) {
1474
- this.hasCustomStylesRenderers.add(renderer);
1475
- }
1476
- }
1477
- /**
1478
- * Register a toolbar button renderer for the extension.
1479
- *
1480
- * @param {string} type - The type of the toolbar button.
1481
- * @param {VegaRTEToolbarButtonRenderer} renderer - The renderer to register.
1482
- */
1483
- registerToolbarButtonRenderer(type, renderer) {
1484
- dtoRendererManager.RTEDTORendererManager.registerRTEToolbarButtonRenderer(type, renderer);
1485
- }
1486
- /**
1487
- * This is a helper method that utilizes RTEUtils to register common strategies.
1488
- * Call the method with the class name of the block to make it support basic strategies like:
1489
- * - Delete children
1490
- * - Append the children
1491
- * - Delete the block children content
1492
- *
1493
- * @param {string} blockClassName - The class name of the block to register strategies for.
1494
- */
1495
- registerBlockBasicStrategies(blockClassName) {
1496
- dtoRendererManager.RTEDTOActionStrategyManager.registerBlockBasicStrategies(blockClassName);
1497
- }
1498
- /**
1499
- * Unregister a strategy for a specific action type and block class if not need.
1500
- *
1501
- * @param {string} actionType - The special action type or the action class name.
1502
- * @param {string} blockClassName - The class name of the block to unregister the strategy for.
1503
- */
1504
- unRegisterStrategy(actionType, blockClassName) {
1505
- codeBlock.ActionHandleStrategyRegistry.unregister(actionType, blockClassName);
1506
- }
1507
- /**
1508
- * Unregister a strategy for a specific action type and block class if not need.
1509
- *
1510
- * @param {string} actionType - The special action type or the action class name.
1511
- * @param {string} blockClassName - The class name of the block to unregister the strategy for.
1512
- * @param {ActionHandlerInterceptor<ModifyContentAction, RTENode | RTEBlock | VegaRTEContent>} strategy - The interceptor to unregister.
1513
- */
1514
- unRegisterInterceptor(actionType, blockClassName, strategy) {
1515
- codeBlock.ActionHandlerInterceptorRegistry.unregister(actionType, blockClassName, strategy);
1516
- }
1517
- /**
1518
- * Register an element to block DTO class strategy.
1519
- *
1520
- * @param {ElementToDTOStrategy} strategy - The strategy to register.
1521
- */
1522
- registerElementToBlockDTOClassStrategy(strategy) {
1523
- dtoRendererManager.ElementToDTOClassStrategyManager.registerElementToBlockStrategy(strategy);
1524
- }
1525
- /**
1526
- * Register an element to node DTO class strategy.
1527
- *
1528
- * @param {ElementToDTOStrategy} strategy - The strategy to register.
1529
- */
1530
- registerElementToNodeDTOClassStrategy(strategy) {
1531
- dtoRendererManager.ElementToDTOClassStrategyManager.registerElementToNodeStrategy(strategy);
1532
- }
1533
- /**
1534
- * Get the registered element to node DTO class strategies.
1535
- *
1536
- * @returns {ElementToDTOStrategy[]} - The registered element to node DTO class strategies.
1537
- */
1538
- getElementToNodeDTOClassStrategies() {
1539
- return dtoRendererManager.ElementToDTOClassStrategyManager.getElementToNodeStrategies();
1540
- }
1541
- }
1542
-
1543
- /**
1544
- * Base class for rendering extension toolbar button in the rich text editor.
1545
- * The renderer provides common functionalities for rendering toolbar buttons, including:
1546
- * - Rendering a button with an icon, label, and optional arrow icon.
1547
- * - Rendering a dropdown with a list of items.
1548
- * - Rendering dropdown items.
1549
- * - Rendering template for dropdown list.
1550
- * - Determining if the button should be disabled based on the editor context.
1551
- * - Handling button and dropdown click events.
1552
- * Override the methods to customize the rendering and behavior of the button.
1553
- */
1554
- class VegaRTEToolbarButtonRenderer {
1555
- /**
1556
- * Checks if the button should be hidden.
1557
- *
1558
- * @param {VegaRTEToolbarRenderContext} editorContext The render context for the editor.
1559
- * @returns {boolean} True if the button is hidden, false otherwise.
1560
- */
1561
- isHidden(editorContext) {
1562
- return editorContext.sourceEditMode;
1563
- }
1564
- /**
1565
- * Renders a dropdown component with the specified properties and children.
1566
- *
1567
- * @param {VegaRTECreateElementFunction} h - Create element function.
1568
- * @param {VegaRTEToolbarRenderContext} editorContext - The render context for the editor.
1569
- * @param {RTEToolbarDropdownProps} dropdownProps - The properties for the dropdown.
1570
- * @param {VegaRTERenderResult[]} children - The children elements for the dropdown.
1571
- * @returns {VegaRTERenderResult} - The render result for the dropdown.
1572
- */
1573
- renderDropdown(h, editorContext, dropdownProps, children) {
1574
- return h('vega-dropdown', Object.assign({ trigger: 'click', searchable: false, maxWidth: '200', itemDisplayRule: 'ellipsis',
1575
- // eslint-disable-next-line jsdoc/require-jsdoc
1576
- ref: (el) => {
1577
- domNodeSubjectObserverFactory.DomNodeSubjectObserverFactory.addUniqueObserverToNode(el, domNodeSubjectObserverFactory.VegaDropdownClick, (input) => this.handleDropdownClick(input.detail, editorContext));
1578
- } }, dropdownProps), children);
1579
- }
1580
- /**
1581
- * Renders the dropdown list template.
1582
- *
1583
- * @param {VegaRTECreateElementFunction} h - Create element function.
1584
- * @param {(RTEDropdownListItem | RTEDropdownListGroup)[]} itemList - The list of dropdown items.
1585
- * @returns {VegaRTERenderResult} - The render result for the dropdown list.
1586
- */
1587
- renderDropdownListTemplate(h, itemList) {
1588
- return h('div', {
1589
- slot: 'items',
1590
- onMouseDown: this.preventDefault,
1591
- }, itemList.map((item) => {
1592
- return 'children' in item
1593
- ? this.renderDropdownGroup(h, item)
1594
- : this.renderDropdownItem(h, item);
1595
- }));
1596
- }
1597
- /**
1598
- * Renders a dropdown item for the toolbar button.
1599
- *
1600
- * @param {VegaRTECreateElementFunction} h - Create element function.
1601
- * @param {RTEDropdownListItem} item - The dropdown item.
1602
- * @returns {VegaRTERenderResult} - The render result for the dropdown item.
1603
- */
1604
- renderDropdownItem(h, item) {
1605
- return h('vega-dropdown-item', {
1606
- key: item.key,
1607
- itemKey: item.key,
1608
- label: item.label,
1609
- prefixIcon: item.icon,
1610
- });
1611
- }
1612
- /**
1613
- * Renders a dropdown item for the toolbar button.
1614
- *
1615
- * @param {VegaRTECreateElementFunction} h - Create element function.
1616
- * @param {RTEDropdownListGroup} item - The dropdown group.
1617
- * @returns {VegaRTERenderResult} - The render result for the dropdown item.
1618
- */
1619
- renderDropdownGroup(h, item) {
1620
- return h('vega-dropdown-group', {
1621
- key: item.key,
1622
- label: item.label,
1623
- divide: false,
1624
- }, item.children.map((child) => {
1625
- return 'children' in child
1626
- ? this.renderDropdownGroup(h, child)
1627
- : this.renderDropdownItem(h, child);
1628
- }));
1629
- }
1630
- /**
1631
- * Renders a common toolbar button with optional icon, label, and arrow icon.
1632
- *
1633
- * @param {VegaRTECreateElementFunction} h - Create element function.
1634
- * @param {VegaRTEToolbarRenderContext} editorContext - The render context for the editor.
1635
- * @param {RTEToolbarButtonProps} buttonProps - The properties for the button.
1636
- * @returns {VegaRTERenderResult} - The render result for the button.
1637
- */
1638
- renderButton(h, editorContext, buttonProps) {
1639
- const { icon, label, showArrowIcon } = buttonProps;
1640
- const isDisabled = this.isDisabled(editorContext);
1641
- return h('vega-rich-text-editor-toolbar-button', {
1642
- disabled: isDisabled,
1643
- icon: icon,
1644
- hidden: this.isHidden(editorContext),
1645
- selected: this.isSelected(editorContext),
1646
- // eslint-disable-next-line jsdoc/require-jsdoc
1647
- ref: (el) => {
1648
- domNodeSubjectObserverFactory.DomNodeSubjectObserverFactory.addUniqueObserverToNode(el, domNodeSubjectObserverFactory.VegaClick, () => this.handleButtonClick(editorContext));
1649
- },
1650
- onMouseDown: this.preventDefault,
1651
- }, [
1652
- this.renderButtonLabel(h, editorContext, label),
1653
- showArrowIcon
1654
- ? h('vega-icon', {
1655
- size: 'size-8',
1656
- color: isDisabled ? 'text-disabled' : 'text-secondary',
1657
- style: { marginLeft: '8px' },
1658
- icon: internalIconManager.VegaInternalIconManager.getIconKey('chevron-down'),
1659
- })
1660
- : null,
1661
- ].filter(typeGuard.isNonNullable));
1662
- }
1663
- /**
1664
- * Renders the button label.
1665
- *
1666
- * @param {VegaRTECreateElementFunction} h - Create element function.
1667
- * @param {VegaRTEToolbarRenderContext} editorContext - The render context for the editor.
1668
- * @param {Nullable<string>} label - The button label if exist.
1669
- * @returns {Nullable<VegaRTERenderResult>} - The render result for the button.
1670
- */
1671
- renderButtonLabel(h, editorContext, label) {
1672
- if (label) {
1673
- const isDisabled = this.isDisabled(editorContext);
1674
- return h('vega-font', {
1675
- variant: 'font-field-label-sm',
1676
- color: isDisabled ? 'text-disabled' : 'text-primary',
1677
- }, label);
1678
- }
1679
- return null;
1680
- }
1681
- /**
1682
- * Determines if the button should be disabled based on the editor context.
1683
- *
1684
- * @param {VegaRTEToolbarRenderContext} editorContext - The render context for the editor.
1685
- * @returns {boolean} - True if the button should be disabled, false otherwise.
1686
- */
1687
- isDisabled(editorContext) {
1688
- return editorContext.host.disabled;
1689
- }
1690
- /**
1691
- * Checks if the button should be selected.
1692
- *
1693
- * @param {VegaRTEToolbarRenderContext} _editorContext The render context for the editor.
1694
- * @returns {boolean} True if the button is selected, false otherwise.
1695
- */
1696
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
1697
- isSelected(_editorContext) {
1698
- return false;
1699
- }
1700
- /**
1701
- * Prevents the default action of the click event. This is to avoid losing focus from the editor when the button is clicked.
1702
- *
1703
- * @param {MouseEvent} e The mouse event to prevent default action for.
1704
- */
1705
- preventDefault(e) {
1706
- e.preventDefault();
1707
- }
1708
- /**
1709
- * Recursively searches for a dropdown list item by its key.
1710
- *
1711
- * @param {(RTEDropdownListItem | RTEDropdownListGroup)[]} itemList The list of dropdown items or groups to search through.
1712
- * @param {string} key The key of the item to find.
1713
- * @returns {Nullable<RTEDropdownListItem>} The dropdown list item if found, otherwise null.
1714
- */
1715
- getListItemByKey(itemList, key) {
1716
- for (const item of itemList) {
1717
- if ('children' in item) {
1718
- const foundItem = this.getListItemByKey(item.children, key);
1719
- if (foundItem) {
1720
- return foundItem;
1721
- }
1722
- }
1723
- else if (item.key === key) {
1724
- return item;
1725
- }
1726
- }
1727
- return null;
1728
- }
1729
- }
1730
-
1731
- /**
1732
- * Action to insert a token node at a specified range in the Rich Text Editor.
1733
- *
1734
- * @example block.apply(new InsertTokenNodeAction(rteRange, tokenNode));
1735
- */
1736
- class InsertTokenNodeAction extends codeBlock.ModifyContentAction {
1737
- constructor(rteRange, token) {
1738
- super();
1739
- this.type = 'INSERT_TOKEN_NODE';
1740
- this.rteRange = null;
1741
- this.actionHandleResult = false;
1742
- this.rteRange = rteRange;
1743
- this.token = token;
1744
- }
1745
- }
1746
-
1747
- /**
1748
- * Renderer for the token toolbar button in the Vega Rich Text Editor.
1749
- */
1750
- class RTETokenToolbarButtonRenderer extends VegaRTEToolbarButtonRenderer {
1751
- constructor(tokenList) {
1752
- super();
1753
- this.tokenList = [];
1754
- this.extensionContext = null;
1755
- this.tokenList = tokenList;
1756
- }
1757
- /**
1758
- * Sets the RTE extension context.
1759
- *
1760
- * @param {RTEExtensionContext} context - The context of the RTE extension.
1761
- */
1762
- injectExtensionContext(context) {
1763
- this.extensionContext = context;
1764
- }
1765
- /**
1766
- * Renders the token toolbar button.
1767
- *
1768
- * @param {VegaRTECreateElementFunction} createElement Function to create elements in the rich text editor.
1769
- * @param {VegaRTEToolbarRenderContext} editorContext The render context for the editor.
1770
- * @returns {VegaRTERenderResult} Token toolbar button.
1771
- */
1772
- render(createElement, editorContext) {
1773
- return this.renderDropdown(createElement, editorContext, {}, [
1774
- this.renderButton(createElement, editorContext, { label: 'Tokens', showArrowIcon: true }),
1775
- this.renderDropdownListTemplate(createElement, this.tokenList),
1776
- ]);
1777
- }
1778
- /**
1779
- * Checks if the token toolbar button is disabled.
1780
- *
1781
- * @returns {boolean} True if the button is disabled, false otherwise.
1782
- */
1783
- isDisabled() {
1784
- if (this.extensionContext) {
1785
- const { host, getSelectedNodes } = this.extensionContext;
1786
- const [startNode] = getSelectedNodes();
1787
- return startNode
1788
- ? host.disabled ||
1789
- !codeBlock.ActionHandleStrategyRegistry.canHandle('INSERT_TOKEN_NODE', startNode.parent)
1790
- : host.disabled;
1791
- }
1792
- return false;
1793
- }
1794
- /* istanbul ignore next */
1795
- /**
1796
- * Handles the button click event. No need this method for token button.
1797
- *
1798
- * @param {VegaRTEToolbarRenderContext} editorContext - The render context for the editor.
1799
- */
1800
- handleButtonClick(editorContext) {
1801
- }
1802
- /**
1803
- * Handles the token item click event from the dropdown.
1804
- *
1805
- * @param {string} itemKey - The key of the clicked token item.
1806
- * @param {VegaRTEToolbarRenderContext} editorContext - The render context for the editor.
1807
- */
1808
- handleDropdownClick(itemKey, editorContext) {
1809
- const token = this.getListItemByKey(this.tokenList, itemKey);
1810
- const { rteRange } = editorContext;
1811
- const { startNode } = rteRange;
1812
- if (startNode && startNode.parent) {
1813
- const action = new InsertTokenNodeAction(rteRange, token);
1814
- startNode.parent.apply(action);
1815
- if (action.actionHandleResult) {
1816
- this.flushEditorUI();
1817
- }
1818
- }
1819
- }
1820
- /**
1821
- * Refreshes the editor UI.
1822
- */
1823
- flushEditorUI() {
1824
- if (this.extensionContext) {
1825
- const { host, flushValue } = this.extensionContext;
1826
- flushValue(host.value);
1827
- }
1828
- }
1829
- }
1830
-
1831
- /**
1832
- * Token node for the Vega Rich Text Editor.
1833
- */
1834
- class RTETokenNode extends codeBlock.RTETextNode {
1835
- constructor(id, token, text, parentBlock, annotations) {
1836
- super(id, text, parentBlock, annotations);
1837
- this.type = 'token';
1838
- this.token = token;
1839
- this.text = text;
1840
- }
1841
- /**
1842
- * @inheritDoc
1843
- */
1844
- static from(value, parent) {
1845
- const node = new RTETokenNode(value.id, value.token, value.text, parent);
1846
- if (value.annotations) {
1847
- node.annotationMap = this.generateTextAnnotationMap(value.annotations);
1848
- }
1849
- return node;
1850
- }
1851
- /**
1852
- * Converts the token node to a JSON representation.
1853
- *
1854
- * @returns {VegaRTETokenNode} - The JSON representation of the token node.
1855
- */
1856
- toJSON() {
1857
- const json = super.toJSON();
1858
- return Object.assign({ id: this.id, type: this.type, text: this.text, token: this.token }, (json.annotations ? { annotations: json.annotations } : {}));
1859
- }
1860
- /**
1861
- * Determines if the token node is content editable.
1862
- *
1863
- * @returns {boolean} - Always returns false for token nodes.
1864
- */
1865
- isContentEditable() {
1866
- return false;
1867
- }
1868
- /**
1869
- * Clones the token node.
1870
- *
1871
- * @param {RTETextBlock} parent - The parent block for the cloned node.
1872
- * @returns {RTETokenNode} - The cloned token node.
1873
- */
1874
- clone(parent) {
1875
- return new RTETokenNode(this.id, this.token, this.text, parent, this.annotationMap);
1876
- }
1877
- /**
1878
- * Converts the token node to an HTML representation.
1879
- *
1880
- * @returns {string} - The HTML representation of the token node.
1881
- */
1882
- toHtml() {
1883
- return `<span class="token" contenteditable="false" template-token-key="${this.token}" token-key="${this.token}"${super.generateAttributeString()}>${this.text}</span>`;
1884
- }
1885
- }
1886
-
1887
- /**
1888
- * Token node renderer for the rich text editor.
1889
- */
1890
- class RTETokenNodeRenderer extends VegaRTEExtensionRenderer {
1891
- constructor() {
1892
- super(...arguments);
1893
- this.extensionContext = null;
1894
- }
1895
- /**
1896
- * Renders the token node as a DOM element.
1897
- *
1898
- * @param {VegaRTECreateElementFunction} createElement - The function to create a DOM element.
1899
- * @param {RTETokenNode} node - The token node to render.
1900
- * @param {RTERenderContext} editorContent - The editor content context.
1901
- * @returns {VegaRTERenderResult} - The rendered DOM element.
1902
- */
1903
- doRender(createElement, node, editorContent) {
1904
- const { id, token } = node;
1905
- return createElement('span', Object.assign(Object.assign({ 'key': id, 'template-token-key': token, 'token-key': token, 'contenteditable': 'false', 'style': node.getStyles(), 'class': `token ${node.getClasses()}` }, this.additionalAttributes(node)), { 'ref': this.useRef(node),
1906
- // eslint-disable-next-line jsdoc/require-jsdoc
1907
- 'onClick': (event) => {
1908
- event.preventDefault();
1909
- if (editorContent && editorContent.editable !== false) {
1910
- this.handleTokenElementClick(event, node);
1911
- }
1912
- } }), node.text);
1913
- }
1914
- /**
1915
- * Sets the RTE extension context.
1916
- *
1917
- * @param {RTEExtensionContext} context - The context of the RTE extension.
1918
- */
1919
- injectExtensionContext(context) {
1920
- this.extensionContext = context;
1921
- }
1922
- /**
1923
- * Override to inject RTE scope styles for the token node.
1924
- *
1925
- * @returns {string} The CSS styles for the token node.
1926
- */
1927
- injectRTEScopeStyles() {
1928
- return `span[token-key]{padding: 0 2px; margin: 0 1px; background-color: rgba(var(--v-bg-status-info, 205,209,211))}`;
1929
- }
1930
- /**
1931
- * Handle the click event on the token element.
1932
- *
1933
- * @param {MouseEvent} event - The click event.
1934
- * @param {RTETokenNode} node - The token node that was clicked.
1935
- */
1936
- handleTokenElementClick(event, node) {
1937
- event.preventDefault();
1938
- if (this.extensionContext) {
1939
- this.extensionContext.host.value.apply(new dtoRendererManager.UpdateCursorPositionAction(node, undefined, true));
1940
- }
1941
- }
1942
- /**
1943
- * Additional attributes for the token node.
1944
- *
1945
- * @param {RTETokenNode} node - The token node.
1946
- * @returns {Record<string, string>} Additional attributes
1947
- */
1948
- additionalAttributes(node) {
1949
- const annotation = node.getCustomAttributesAnnotation();
1950
- let result = { wrapped: 'true' };
1951
- if (annotation) {
1952
- result = Object.assign(Object.assign({}, result), annotation.render());
1953
- }
1954
- return result;
1955
- }
1956
- }
1957
-
1958
- /**
1959
- * Insert a new children to the nearest position of the parent container
1960
- *
1961
- * @example parent.apply(new InsertNodeToNearestRoot(rteRange, nodeToBeInserted))
1962
- */
1963
- class InsertNodeToNearestRootAction extends codeBlock.ModifyContentAction {
1964
- constructor(rteRange, nodeToBeInserted) {
1965
- super();
1966
- this.type = codeBlock.ModifyContentActionType.INSERT_NODE_TO_NEAREST_ROOT;
1967
- this.rteRange = rteRange;
1968
- this.nodeToBeInserted = nodeToBeInserted;
1969
- }
1970
- }
1971
-
1972
- /**
1973
- * Strategy to handle the insertion of a token node into the nearest root block.
1974
- */
1975
- class InsertTokenNodeStrategy extends codeBlock.ActionHandleStrategy {
1976
- /**
1977
- * @inheritDoc
1978
- */
1979
- handleAction(action, block) {
1980
- const { rteRange, token } = action;
1981
- if (rteRange && rteRange.startNode) {
1982
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
1983
- const { key, label, customAttrs = { wrapped: 'true' } } = token;
1984
- const tokenNode = new RTETokenNode(createPublicApiRuntimeMetricsSlimmer.generateUUID(), key, label, block);
1985
- tokenNode.annotationMap.set('CUSTOM_ATTRIBUTE', new codeBlock.CustomAttributeAnnotation(customAttrs));
1986
- block.apply(new InsertNodeToNearestRootAction(rteRange, tokenNode));
1987
- action.actionHandleResult = true;
1988
- }
1989
- }
1990
- }
1991
-
1992
- var __rest = (undefined && undefined.__rest) || function (s, e) {
1993
- var t = {};
1994
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
1995
- t[p] = s[p];
1996
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
1997
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
1998
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
1999
- t[p[i]] = s[p[i]];
2000
- }
2001
- return t;
2002
- };
2003
- /**
2004
- * Strategy to convert <span class="token" token-key="...">...</span> to a token node
2005
- */
2006
- class SpanToTokenNodeStrategy extends dtoRendererManager.ElementToDTOStrategy {
2007
- /**
2008
- * @inheritDoc
2009
- */
2010
- canHandle(elementsArray, currentIndex) {
2011
- const element = elementsArray[currentIndex];
2012
- if (element.nodeName === 'SPAN' &&
2013
- element.classList.contains('token') &&
2014
- element.hasAttribute('token-key')) {
2015
- return 1;
2016
- }
2017
- return 0;
2018
- }
2019
- /**
2020
- * @inheritDoc
2021
- */
2022
- handle(elementsArray) {
2023
- const element = elementsArray[0];
2024
- const tokenKey = element.getAttribute('token-key');
2025
- const text = element.textContent;
2026
- const annotations = dtoRendererManager.htmlElementToAnnotationGenerator.generate(codeBlock.RTETextNode, element);
2027
- // Exclude customAttribute and customClass from annotations
2028
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
2029
- const { customAttribute, customClass } = annotations, restAnnotations = __rest(annotations, ["customAttribute", "customClass"]);
2030
- return {
2031
- id: createPublicApiRuntimeMetricsSlimmer.generateUUID(),
2032
- type: 'token',
2033
- token: tokenKey,
2034
- text,
2035
- annotations: Object.assign(Object.assign({}, restAnnotations), { customAttribute: this.createCustomAttrs(customAttribute) }),
2036
- };
2037
- }
2038
- /**
2039
- * @inheritDoc
2040
- */
2041
- // eslint-disable-next-line @typescript-eslint/no-empty-function
2042
- appendChildBlocks() { }
2043
- /**
2044
- * @inheritDoc
2045
- */
2046
- shouldProceedToElementChildren() {
2047
- return false;
2048
- }
2049
- /**
2050
- * Creates custom attributes record from the given custom attribute object, clean some fixed attributes.
2051
- *
2052
- * @param {Record<string, string>} customAttribute - The custom attribute object
2053
- * @returns {Record<string, string>} The processed custom attributes
2054
- */
2055
- createCustomAttrs(customAttribute) {
2056
- const result = Object.assign(Object.assign({}, customAttribute), { 'contenteditable': null, 'template-token-key': null, 'token-key': null, 'wrapped': customAttribute.wrapped === 'false' ? 'false' : 'true' });
2057
- return object.cleanObject(result);
2058
- }
2059
- }
2060
-
2061
- const spanToTokenNodeStrategy = new SpanToTokenNodeStrategy();
2062
- /**
2063
- * Vega Rich Text Editor Token Extension
2064
- */
2065
- class VegaRTETokenExtension extends VegaRTEExtension {
2066
- constructor(tokenList = []) {
2067
- super();
2068
- this.tokenRenderer = new RTETokenNodeRenderer();
2069
- this.registerNode('token', RTETokenNode);
2070
- this.registerRenderer('token', this.tokenRenderer);
2071
- this.tokenToolbarButtonRenderer = new RTETokenToolbarButtonRenderer(tokenList);
2072
- this.registerToolbarButtonRenderer('token', this.tokenToolbarButtonRenderer);
2073
- this.registerElementToNodeDTOClassStrategy(spanToTokenNodeStrategy);
2074
- }
2075
- /**
2076
- * @inheritDoc
2077
- */
2078
- initialExtension(context) {
2079
- super.initialExtension(context);
2080
- this.tokenRenderer.injectExtensionContext(context);
2081
- if (this.tokenToolbarButtonRenderer) {
2082
- this.tokenToolbarButtonRenderer.injectExtensionContext(context);
2083
- }
2084
- }
2085
- }
2086
- (() => {
2087
- const insertTokenNodeStrategy = new InsertTokenNodeStrategy();
2088
- VegaRTEExtension.registerActionHandleStrategy(codeBlock.RTETextBlock.name, 'INSERT_TOKEN_NODE', insertTokenNodeStrategy);
2089
- VegaRTEExtension.registerActionHandleStrategy(dtoRendererManager.RTEListItemBlock.name, 'INSERT_TOKEN_NODE', insertTokenNodeStrategy);
2090
- })();
2091
-
2092
- const INSERT_FUNCTION_BLOCK = 'INSERT_FUNCTION_BLOCK';
2093
- /**
2094
- * Action to insert a function block into the rich text editor.
2095
- *
2096
- * @example focusedBlock.apply(new InsertFunctionBlockAction('IF'))
2097
- * @example host.value.apply(new InsertFunctionBlockAction('IF'))
2098
- */
2099
- class InsertFunctionBlockAction extends codeBlock.ModifyContentAction {
2100
- constructor(functionType) {
2101
- super();
2102
- this.type = INSERT_FUNCTION_BLOCK;
2103
- this.functionType = functionType;
2104
- }
2105
- }
2106
-
2107
- /**
2108
- * RTE Function Block
2109
- */
2110
- class RTEFunctionBlock extends codeBlock.RTEBlock {
2111
- constructor(id) {
2112
- super(id);
2113
- this.type = 'function-block';
2114
- this.children = [];
2115
- }
2116
- /**
2117
- * Creates an RTEFunctionBlock from a VegaFunctionBlock.
2118
- *
2119
- * @param {VegaFunctionBlock} block - The custom block to convert.
2120
- * @param {VegaRTETransformOptions} [options] - Optional transformation options.
2121
- * @returns {RTEFunctionBlock} The resulting RTEFunctionBlock.
2122
- */
2123
- static from(block, options) {
2124
- const functionBlock = new RTEFunctionBlock(block.id);
2125
- const defaultAnnotation = { customClass: ['statement'] };
2126
- let { annotations } = block;
2127
- annotations = annotations
2128
- ? Object.assign(Object.assign({}, annotations), defaultAnnotation) : defaultAnnotation;
2129
- super.convertAnnotationsToMap(functionBlock.annotationMap, annotations);
2130
- functionBlock.children = this.generateBlockChildren(block.children, options, functionBlock);
2131
- return functionBlock;
2132
- }
2133
- /**
2134
- * Converts the RTEFunctionBlock and its children to an HTML string.
2135
- *
2136
- * @returns {string} The HTML string representation of the function block.
2137
- */
2138
- toHtml() {
2139
- const childrenHtml = this.children
2140
- .map((child) => {
2141
- if (child instanceof codeBlock.RTETextBlock) {
2142
- const attrStr = this.getFunctionContentStyle(child);
2143
- return `<div class="statementelement"${attrStr}>${child.getChildrenHtml()}</div>`;
2144
- }
2145
- else {
2146
- return child.toHtml();
2147
- }
2148
- })
2149
- .join('');
2150
- return `<div class="statement">${childrenHtml}</div>`;
2151
- }
2152
- /**
2153
- * @inheritDoc
2154
- */
2155
- clone(parent) {
2156
- const clonedBlock = new RTEFunctionBlock(createPublicApiRuntimeMetricsSlimmer.generateUUID());
2157
- clonedBlock.parent = parent;
2158
- clonedBlock.children = this.children.map((child) => {
2159
- const clonedChild = child.clone(clonedBlock);
2160
- return clonedChild;
2161
- });
2162
- clonedBlock.annotationMap = super.cloneAnnotations();
2163
- return clonedBlock;
2164
- }
2165
- /**
2166
- * @inheritDoc
2167
- */
2168
- getLastNode() {
2169
- return this.children[this.children.length - 1].getLastNode();
2170
- }
2171
- /**
2172
- * @inheritDoc
2173
- */
2174
- isNotEmpty() {
2175
- return this.children.length > 0;
2176
- }
2177
- /**
2178
- * @inheritDoc
2179
- */
2180
- toJSON() {
2181
- return Object.assign(Object.assign({}, super.toJSON()), { id: this.id, type: this.type, children: this.children.map((child) => child.toJSON()) });
2182
- }
2183
- /**
2184
- * Get the style string for function content block, excluding default paragraph styles.
2185
- *
2186
- * @param {RTETextBlock} block - The text block to extract styles from
2187
- * @returns {string} - The style attribute string
2188
- */
2189
- getFunctionContentStyle(block) {
2190
- const blockAnnotationStyle = new codeBlock.RTEAnnotationStyle(block);
2191
- let styles = blockAnnotationStyle.toCssText({ standalone: true });
2192
- const textStyleAnnotation = block.getAnnotationByType('TEXT_STYLE');
2193
- if (textStyleAnnotation && textStyleAnnotation.textStyle === 'paragraph') {
2194
- const defaultParagraphStyles = blockAnnotationStyle.toCssText(undefined, undefined, textStyleAnnotation.renderStyle({ standalone: true }));
2195
- styles = styles.replace(defaultParagraphStyles, '').trim();
2196
- }
2197
- return styles ? ` style="${styles}"` : '';
2198
- }
2199
- }
2200
-
2201
- /**
2202
- * Strategy to handle the insertion of a function block into the rich text editor.
2203
- */
2204
- class InsertFunctionBlockStrategy extends codeBlock.ActionHandleStrategy {
2205
- /**
2206
- * @inheritDoc
2207
- */
2208
- handleAction(action, target) {
2209
- const { functionType } = action;
2210
- const functionBlock = this.getFunctionBlock(functionType);
2211
- const emptyParagraph = this.createNewParagraph('');
2212
- const referenceBlock = this.getReferenceBlock(target);
2213
- if (referenceBlock) {
2214
- referenceBlock.parent.apply(new codeBlock.InsertChildrenAfterAction(referenceBlock, functionBlock, emptyParagraph));
2215
- }
2216
- else {
2217
- target.apply(new codeBlock.AppendChildrenAction([functionBlock, emptyParagraph]));
2218
- }
2219
- if (emptyParagraph) {
2220
- action.nextFocusNode = emptyParagraph.children[0];
2221
- }
2222
- }
2223
- /**
2224
- * Get a function block based on the specified type.
2225
- *
2226
- * @param {string} type - The type of function block to create.
2227
- * @returns {RTEFunctionBlock} The function block instance.
2228
- */
2229
- getFunctionBlock(type) {
2230
- const id = createPublicApiRuntimeMetricsSlimmer.generateUUID();
2231
- return RTEFunctionBlock.from({
2232
- id: id,
2233
- type: 'function-block',
2234
- children: [
2235
- {
2236
- id: `${id}-1`,
2237
- type: 'logic-control-block',
2238
- statementText: type.toUpperCase(),
2239
- },
2240
- {
2241
- id: `${id}-2`,
2242
- annotations: {
2243
- customClass: ['statementelement'],
2244
- },
2245
- type: 'paragraph',
2246
- nodes: [
2247
- {
2248
- id: `${id}-2-1`,
2249
- type: 'text',
2250
- text: ' ',
2251
- },
2252
- ],
2253
- },
2254
- {
2255
- id: `${id}-3`,
2256
- type: 'logic-control-block',
2257
- statementText: 'SHOW',
2258
- },
2259
- {
2260
- id: `${id}-4`,
2261
- annotations: {
2262
- customClass: ['statementelement'],
2263
- },
2264
- type: 'paragraph',
2265
- nodes: [
2266
- {
2267
- id: `${id}-4-1`,
2268
- type: 'text',
2269
- text: ' ',
2270
- },
2271
- ],
2272
- },
2273
- ],
2274
- });
2275
- }
2276
- /**
2277
- * We need to get the correct block if the current target is a function block element to avoid nesting function blocks.
2278
- *
2279
- * @param {RTEBlock | VegaRTEContent} currentTarget - The current target block or content.
2280
- * @returns {Nullable<RTEBlock>} The reference block.
2281
- */
2282
- getReferenceBlock(currentTarget) {
2283
- if (!(currentTarget instanceof dtoRendererManager.VegaRTEContent)) {
2284
- const parentBlock = currentTarget.parent;
2285
- if (parentBlock instanceof RTEFunctionBlock) {
2286
- return parentBlock;
2287
- }
2288
- else {
2289
- return currentTarget;
2290
- }
2291
- }
2292
- }
2293
- }
2294
-
2295
- /**
2296
- * Class representing a logic control node in the rich text editor.
2297
- */
2298
- class RTELogicControlNode extends codeBlock.RTENode {
2299
- constructor(id, text, parent) {
2300
- super(id);
2301
- this.type = 'logic-control-node';
2302
- this.text = '';
2303
- this.text = text;
2304
- this.parent = parent;
2305
- }
2306
- /**
2307
- * Clone the current node instance.
2308
- *
2309
- * @returns {RTELogicControlNode} - A new instance of RTELogicControlNode.
2310
- */
2311
- clone() {
2312
- return new RTELogicControlNode(this.id, this.text, this.parent);
2313
- }
2314
- /**
2315
- * Convert the node to its HTML representation.
2316
- *
2317
- * @returns {string} - The HTML string of the logic control node.
2318
- */
2319
- toHtml() {
2320
- return this.text;
2321
- }
2322
- /**
2323
- * Convert the node to a JSON representation.
2324
- *
2325
- * @returns {unknown} - The JSON object of the statement syntax node.
2326
- */
2327
- toJSON() {
2328
- return {
2329
- id: this.id,
2330
- type: this.type,
2331
- text: this.text,
2332
- };
2333
- }
2334
- /**
2335
- * Get the end offset of the node's range.
2336
- *
2337
- * @returns {number} - The end offset of the node's range.
2338
- */
2339
- getRangeEndOffset() {
2340
- return 1;
2341
- }
2342
- /**
2343
- * Get the container element for the node's range.
2344
- *
2345
- * @returns {Nullable<Node>} - The container node for the range.
2346
- */
2347
- getRangeContainer() {
2348
- const element = codeBlock.stateEntityRenderingRegistry.getDOMByEntity(this);
2349
- if (element) {
2350
- return element.parentElement;
2351
- }
2352
- }
2353
- /**
2354
- * Get the content editable state of the node.
2355
- *
2356
- * @returns {boolean} - The content editable state of the node.
2357
- */
2358
- isContentEditable() {
2359
- return false;
2360
- }
2361
- }
2362
-
2363
- /**
2364
- * Class representing a logic control block in the rich text editor.
2365
- */
2366
- class RTELogicControlBlock extends codeBlock.RTEBlock {
2367
- constructor(id, statementText, parent) {
2368
- super(id);
2369
- this.type = 'logic-control-block';
2370
- this.children = [];
2371
- this.statementText = '';
2372
- this.statementText = statementText;
2373
- this.children = [new RTELogicControlNode(`${id}-node-1`, statementText, this)];
2374
- if (parent) {
2375
- this.parent = parent;
2376
- }
2377
- }
2378
- /**
2379
- * Create a logic control block from a JSON representation.
2380
- *
2381
- * @param {VegaRTELogicControlBlock} json - The JSON object representing the logic control block.
2382
- * @returns {RTELogicControlBlock} - The created logic control block.
2383
- */
2384
- static from(json) {
2385
- const block = new RTELogicControlBlock(json.id, json.statementText);
2386
- return block;
2387
- }
2388
- /**
2389
- * Check the block is not empty.
2390
- *
2391
- * @returns {boolean} - Always true for logic control block.
2392
- */
2393
- isNotEmpty() {
2394
- return true;
2395
- }
2396
- /**
2397
- * Get the last node of the block.
2398
- *
2399
- * @returns {RTELogicControlNode} - The last node in the block.
2400
- */
2401
- getLastNode() {
2402
- return this.children[this.children.length - 1];
2403
- }
2404
- /**
2405
- * Convert the block to its HTML representation.
2406
- *
2407
- * @returns {string} - The HTML string of the logic control block.
2408
- */
2409
- toHtml() {
2410
- return `<div class='statementsyntax' contenteditable='false'>${this.statementText}</div>`;
2411
- }
2412
- /**
2413
- * Clone the current block instance.
2414
- *
2415
- * @param { RTEFunctionBlock } parent - The parent function block for the cloned instance.
2416
- * @returns {RTELogicControlBlock} - A new instance of RTEStatementSyntaxBlock.
2417
- */
2418
- clone(parent) {
2419
- return new RTELogicControlBlock(this.id, this.statementText, parent);
2420
- }
2421
- /**
2422
- * Get the JSON representation of the block.
2423
- *
2424
- * @returns {VegaRTELogicControlBlock} - The JSON object of the logic control block.
2425
- */
2426
- toJSON() {
2427
- return {
2428
- id: this.id,
2429
- type: this.type,
2430
- statementText: this.statementText,
2431
- };
2432
- }
2433
- }
2434
-
2435
- /**
2436
- * Function toolbar button renderer class.
2437
- */
2438
- class FunctionToolbarButtonRenderer extends VegaRTEToolbarButtonRenderer {
2439
- /**
2440
- * Injects the extension context
2441
- *
2442
- * @param {RTEExtensionContext} context - extension context
2443
- */
2444
- injectExtensionContext(context) {
2445
- this.extensionContext = context;
2446
- }
2447
- /**
2448
- * @inheritDoc
2449
- */
2450
- render(h, editorContext) {
2451
- return this.renderDropdown(h, editorContext, {}, [
2452
- this.renderButton(h, editorContext, {
2453
- label: 'Functions',
2454
- showArrowIcon: true,
2455
- }),
2456
- this.renderDropdownListTemplate(h, FunctionToolbarButtonRenderer.FUNCTION_LIST),
2457
- ]);
2458
- }
2459
- /**
2460
- * Overrides the isDisabled method to determine if the button should be disabled.
2461
- *
2462
- * @returns {boolean} - true if the button should be disabled, false otherwise.
2463
- */
2464
- isDisabled() {
2465
- if (this.extensionContext) {
2466
- const { host, getSelectedNodes } = this.extensionContext;
2467
- const focusNode = getSelectedNodes()[0];
2468
- let enableInsert = true;
2469
- if (focusNode) {
2470
- enableInsert = codeBlock.ActionHandleStrategyRegistry.canHandle(INSERT_FUNCTION_BLOCK, focusNode.parent);
2471
- }
2472
- return host.disabled || !enableInsert;
2473
- }
2474
- return false;
2475
- }
2476
- /* istanbul ignore next */
2477
- // eslint-disable-next-line jsdoc/require-jsdoc
2478
- handleButtonClick() {
2479
- throw new Error('Method not implemented.');
2480
- }
2481
- /**
2482
- * Handles dropdown click event
2483
- *
2484
- * @param {RTEExtensionFunctionType} itemKey - key of the clicked item
2485
- */
2486
- handleDropdownClick(itemKey) {
2487
- const { host, getSelectedNodes } = this.extensionContext;
2488
- const focusNode = getSelectedNodes()[0];
2489
- const action = new InsertFunctionBlockAction(itemKey);
2490
- if (!focusNode) {
2491
- host.value.apply(action);
2492
- }
2493
- else if (focusNode.parent) {
2494
- focusNode.parent.apply(action);
2495
- }
2496
- if (action.nextFocusNode) {
2497
- host.value.apply(new dtoRendererManager.UpdateCursorPositionAction(action.nextFocusNode, 1));
2498
- }
2499
- }
2500
- }
2501
- FunctionToolbarButtonRenderer.FUNCTION_LIST = [
2502
- { key: 'IF', label: 'Conditional' },
2503
- { key: 'FOREACH', label: 'Foreach' },
2504
- ];
2505
-
2506
- /**
2507
- * Renders a logic control block in the rich text editor.
2508
- */
2509
- class RTELogicControlBlockRenderer extends VegaRTEExtensionRenderer {
2510
- /**
2511
- * @inheritDoc
2512
- */
2513
- doRender(h, renderData) {
2514
- return h('div', {
2515
- key: renderData.id,
2516
- class: 'statementsyntax',
2517
- ref: this.useRef(renderData),
2518
- }, h('span', {
2519
- key: `${renderData.id}-1`,
2520
- contenteditable: 'false',
2521
- ref: this.useRef(renderData.children[0]),
2522
- }, renderData.statementText));
2523
- }
2524
- }
2525
-
2526
- /**
2527
- * Strategy to convert a div with class 'statementsyntax' into an RTELogicControlBlock DTO.
2528
- */
2529
- class DivToLogicControlBlockStrategy extends dtoRendererManager.BlockToRTEBlockStrategyAbstract {
2530
- constructor() {
2531
- super(...arguments);
2532
- this.blockClassName = 'statementsyntax';
2533
- }
2534
- /**
2535
- * @inheritDoc
2536
- */
2537
- canHandle(elementsArray, currentIndex) {
2538
- const element = elementsArray[currentIndex];
2539
- return element &&
2540
- element.nodeType === Node.ELEMENT_NODE &&
2541
- element.classList.contains(this.blockClassName) &&
2542
- this.isFunctionBlockChild(element)
2543
- ? 1
2544
- : 0;
2545
- }
2546
- /**
2547
- * @inheritDoc
2548
- */
2549
- handle(elementsArray) {
2550
- const element = elementsArray[0];
2551
- return RTELogicControlBlock.from({
2552
- id: createPublicApiRuntimeMetricsSlimmer.generateUUID(),
2553
- type: 'logic-control-block',
2554
- statementText: element.innerText,
2555
- });
2556
- }
2557
- /**
2558
- * The logic control block does not have child blocks to append. so this method is intentionally left empty.
2559
- */
2560
- // eslint-disable-next-line @typescript-eslint/no-empty-function
2561
- appendChildBlocks() { }
2562
- /**
2563
- * @inheritDoc
2564
- */
2565
- shouldProceedToElementChildren() {
2566
- return false;
2567
- }
2568
- /**
2569
- * Checks if the given element is a child of a function block
2570
- *
2571
- * @param {HTMLElement} element - The HTML element to check
2572
- * @returns {boolean} True if the element is a child of a function block, false otherwise
2573
- */
2574
- isFunctionBlockChild(element) {
2575
- return !!(element.parentElement && element.parentElement.classList.contains('statement'));
2576
- }
2577
- }
2578
-
2579
- /**
2580
- * Strategy to convert a div with class 'statement' into an function block.
2581
- */
2582
- class DivToFunctionBlockStrategy extends dtoRendererManager.ElementToDTOStrategy {
2583
- /**
2584
- * @inheritDoc
2585
- */
2586
- canHandle(elementsArray, currentIndex) {
2587
- const element = elementsArray[currentIndex];
2588
- return element &&
2589
- element.tagName === 'DIV' &&
2590
- element.classList.contains('statement') &&
2591
- element.childNodes.length &&
2592
- element.querySelector('.statementsyntax')
2593
- ? 1
2594
- : 0;
2595
- }
2596
- /**
2597
- * @inheritDoc
2598
- */
2599
- handle() {
2600
- return RTEFunctionBlock.from({
2601
- id: createPublicApiRuntimeMetricsSlimmer.generateUUID(),
2602
- type: 'function-block',
2603
- annotations: {
2604
- customClass: ['statement'],
2605
- },
2606
- children: [],
2607
- });
2608
- }
2609
- /**
2610
- * @inheritDoc
2611
- */
2612
- appendChildBlocks(currentBlock, childBlocks) {
2613
- currentBlock.children = childBlocks.map((block) => {
2614
- block.parent = currentBlock;
2615
- return block;
2616
- });
2617
- }
2618
- /**
2619
- * @inheritDoc
2620
- */
2621
- shouldProceedToElementChildren() {
2622
- return true;
2623
- }
2624
- }
2625
-
2626
- /**
2627
- * Strategy to convert a div with class 'statementelement' into an function block.
2628
- */
2629
- class DivToFunctionContentStrategy extends DivToLogicControlBlockStrategy {
2630
- constructor() {
2631
- super(...arguments);
2632
- this.blockClassName = 'statementelement';
2633
- }
2634
- /**
2635
- * @inheritDoc
2636
- */
2637
- handle(elementsArray, options) {
2638
- const element = elementsArray[0];
2639
- const annotations = dtoRendererManager.htmlElementToAnnotationGenerator.generate(codeBlock.RTETextBlock, element);
2640
- const nodes = Array.from(elementsArray[0].childNodes);
2641
- return codeBlock.RTETextBlock.from({
2642
- id: createPublicApiRuntimeMetricsSlimmer.generateUUID(),
2643
- type: 'paragraph',
2644
- annotations: Object.assign({ customClass: [this.blockClassName] }, annotations),
2645
- nodes: this.generateChildNodes(nodes, undefined, options),
2646
- });
2647
- }
2648
- }
2649
-
2650
- const functionBlockStylesCss = "div.statement{padding:2px 4px;background:rgba(var(--v-bg-accent3-secondary, 255, 239, 200));border:1px solid rgba(var(--v-bg-accent3-primary, 255, 220, 131));border-radius:4px;display:flex;flex-direction:row;justify-content:flex-start;align-items:stretch;gap:4px}div.statement .statementsyntax{padding:3px 0;line-height:22px}.rich-text-content div.statement .statementsyntax,.rich-text-content div.statement .statementelement{display:inline-block}div.statement+div.statement{margin-top:2px}div.statement .statementsyntax span{color:rgb(38, 42, 255);font-weight:bold}div.statement .statementelement{padding:2px 4px;background:rgba(var(--v-bg-secondary, 245, 247, 247));border:1px solid rgba(var(--v-border-color-input-field, 171, 198, 216));border-radius:4px;margin:0;min-width:8px}";
2651
-
2652
- /**
2653
- * Renderer for Function Block
2654
- */
2655
- class RTEFunctionBlockRenderer extends VegaRTEExtensionRenderer {
2656
- /**
2657
- * @inheritDoc
2658
- */
2659
- doRender(createElement, renderData) {
2660
- return createElement('div', {
2661
- key: renderData.id,
2662
- class: this.getElementClassName(renderData),
2663
- ref: this.useRef(renderData),
2664
- });
2665
- }
2666
- /**
2667
- * Defines the function block styles to be injected into the RTE scope.
2668
- *
2669
- * @returns {string} - The styles as a string.
2670
- */
2671
- injectRTEScopeStyles() {
2672
- return functionBlockStylesCss;
2673
- }
2674
- /**
2675
- * Gets the class name for the function block element.
2676
- *
2677
- * @param {RTEFunctionBlock} block - The function block.
2678
- * @returns {string} The class name for the function block element.
2679
- */
2680
- getElementClassName(block) {
2681
- let classes = block.getClasses();
2682
- if (classes.indexOf('statement') < 0) {
2683
- classes = 'statement ' + classes;
2684
- }
2685
- return classes.trim();
2686
- }
2687
- }
2688
-
2689
- /**
2690
- * Abstract class for action handler interceptors, which can intercept actions before they are handled.
2691
- */
2692
- class ActionHandlerInterceptor {
2693
- }
2694
-
2695
- /**
2696
- * Prevent special type input in function block.
2697
- */
2698
- class PreventNewParagraphInterceptor extends ActionHandlerInterceptor {
2699
- /**
2700
- * Checks the target block parent whether is function block.
2701
- *
2702
- * @param {InsertNewParagraphAction} _action - the action to be intercepted
2703
- * @param {RTETextBlock} target - the target block
2704
- * @returns {boolean} - true if the target block parent is function block, false otherwise
2705
- */
2706
- canIntercept(_action, target) {
2707
- return target.parent && target.parent instanceof RTEFunctionBlock;
2708
- }
2709
- /**
2710
- * Insert a new paragraph behind of the function block instead of the target block.
2711
- *
2712
- * @param {ActionHandlerExecution} _execution - the original execution function
2713
- * @param {ModifyContentAction} _action - the action to be intercepted
2714
- * @param {RTETextBlock} target - the target block
2715
- */
2716
- intercept(_execution, _action, target) {
2717
- const insertParagraphAction = new dtoRendererManager.InsertNewParagraphAction(target.children[0], 0);
2718
- insertParagraphAction.isFlushable = true;
2719
- target.parent.apply(insertParagraphAction);
2720
- }
2721
- }
2722
-
2723
- /**
2724
- * Insert a new paragraph behind of current function block strategy.
2725
- */
2726
- class FunctionBlockInsertParagraphStrategy extends codeBlock.ActionHandleStrategy {
2727
- /**
2728
- * @inheritDoc
2729
- */
2730
- handleAction(action, target) {
2731
- const newParagraph = this.createNewParagraph('');
2732
- if (newParagraph) {
2733
- target.parent.apply(new codeBlock.InsertChildrenAfterAction(target, newParagraph));
2734
- action.newBlock = newParagraph;
2735
- this.focusToNextLine(newParagraph);
2736
- }
2737
- }
2738
- /**
2739
- * Focus to next paragraph.
2740
- *
2741
- * @param {RTETextBlock} block - The paragraph need to focus.
2742
- */
2743
- focusToNextLine(block) {
2744
- const root = this.getRootContent(block);
2745
- if (root) {
2746
- root.apply(new dtoRendererManager.UpdateCursorPositionAction(block.children[0], 1));
2747
- }
2748
- }
2749
- }
2750
-
2751
- const PASTE_PLAIN_TEXT = 'PASTE_PLAIN_TEXT';
2752
- /**
2753
- * Action to paste plain text content into function block.
2754
- *
2755
- * @example functionBlock.apply(new PastePlainTextAction('content', range))
2756
- * @example host.value.apply(new PastePlainTextAction('content', range))
2757
- */
2758
- class PastePlainTextAction extends codeBlock.ModifyContentAction {
2759
- constructor(blocksToBeInserted, startNode, startOffset) {
2760
- super();
2761
- this.type = PASTE_PLAIN_TEXT;
2762
- this.blocksToBeInserted = blocksToBeInserted;
2763
- this.startNode = startNode;
2764
- this.startOffset = startOffset;
2765
- }
2766
- }
2767
-
2768
- /**
2769
- * Prevent special type input in function block.
2770
- */
2771
- class PreventPasteContentInterceptor extends PreventNewParagraphInterceptor {
2772
- /**
2773
- * Paste plain text into text block.
2774
- *
2775
- * @param {ActionHandlerExecution} _execution - the original execution function
2776
- * @param {ModifyContentAction} action - the action to be intercepted
2777
- * @param {RTETextBlock} target - the target block
2778
- */
2779
- intercept(_execution, action, target) {
2780
- const { blocksToBeInserted, rteRange } = action;
2781
- let { startNode, startOffset } = action;
2782
- // Set the start offset from rteRange if available, this is to handle the paste issue https://gethired.atlassian.net/browse/VD-7779
2783
- if (rteRange) {
2784
- startNode = rteRange.startNode;
2785
- startOffset = rteRange.startOffset;
2786
- }
2787
- const pastePlainTextAction = new PastePlainTextAction(blocksToBeInserted, startNode, startOffset);
2788
- target.apply(pastePlainTextAction);
2789
- }
2790
- }
2791
-
2792
- /**
2793
- * Strategy to handle the paste content into function block.
2794
- */
2795
- class PastePlainTextStrategy extends codeBlock.ActionHandleStrategy {
2796
- /**
2797
- * @inheritDoc
2798
- */
2799
- handleAction(action, target) {
2800
- const { blocksToBeInserted, startNode, startOffset } = action;
2801
- if (startNode instanceof codeBlock.RTETextNode) {
2802
- const textNodes = blocksToBeInserted.flatMap((block) => {
2803
- if (block instanceof codeBlock.RTETextBlock) {
2804
- this.copyLinkGroupAnnotations(target.annotationMap, block.annotationMap);
2805
- return block.children;
2806
- }
2807
- return [];
2808
- });
2809
- if (textNodes.length > 0) {
2810
- if (startOffset > 0) {
2811
- target.apply(new codeBlock.InsertChildrenAfterAction(startNode, ...textNodes));
2812
- }
2813
- else {
2814
- target.apply(new codeBlock.InsertChildrenBeforeAction(startNode, ...textNodes));
2815
- }
2816
- this.focusToNextLine(textNodes[textNodes.length - 1], textNodes[textNodes.length - 1].getRangeEndOffset());
2817
- }
2818
- }
2819
- }
2820
- /**
2821
- * Focus to next paragraph.
2822
- *
2823
- * @param {RTETextNode} node - The text node need to focus.
2824
- * @param {number} startOffset - The offset need to focus.
2825
- */
2826
- focusToNextLine(node, startOffset) {
2827
- const root = this.getRootContent(node);
2828
- if (root) {
2829
- root.apply(new dtoRendererManager.UpdateCursorPositionAction(node, startOffset));
2830
- }
2831
- }
2832
- /**
2833
- * Copy link group annotations from copied block to target block.
2834
- *
2835
- * @param {BlockAnnotations} blockAnnotationMap - The target block annotation map.
2836
- * @param {BlockAnnotations} copiedAnnotationMap - The copied block annotation map.
2837
- */
2838
- copyLinkGroupAnnotations(blockAnnotationMap, copiedAnnotationMap) {
2839
- if (copiedAnnotationMap && copiedAnnotationMap.has(codeBlock.InternalAnnotationTypeEnum.LINK_GROUP)) {
2840
- const copiedLinkGroupAnnotation = copiedAnnotationMap.get(codeBlock.InternalAnnotationTypeEnum.LINK_GROUP);
2841
- if (!blockAnnotationMap.has(codeBlock.InternalAnnotationTypeEnum.LINK_GROUP)) {
2842
- blockAnnotationMap.set(codeBlock.InternalAnnotationTypeEnum.LINK_GROUP, copiedAnnotationMap.get(codeBlock.InternalAnnotationTypeEnum.LINK_GROUP));
2843
- }
2844
- else {
2845
- copiedLinkGroupAnnotation.linkGroups.forEach((nodes, groupKey) => {
2846
- const existingAnnotation = blockAnnotationMap.get(codeBlock.InternalAnnotationTypeEnum.LINK_GROUP);
2847
- existingAnnotation.linkGroups.set(groupKey, nodes);
2848
- });
2849
- }
2850
- }
2851
- }
2852
- }
2853
-
2854
- const convertLogicControlBlockStrategy = new DivToLogicControlBlockStrategy();
2855
- const convertFunctionContentStrategy = new DivToFunctionContentStrategy();
2856
- const convertFunctionBlockStrategy = new DivToFunctionBlockStrategy();
2857
- /**
2858
- * Function extension class for Vega Rich Text Editor.
2859
- */
2860
- class VegaRTEFunctionExtension extends VegaRTEExtension {
2861
- constructor() {
2862
- super();
2863
- this.toolbarButtonRenderer = new FunctionToolbarButtonRenderer();
2864
- this.registerBlockBasicStrategies(RTELogicControlBlock.name);
2865
- this.registerBlockBasicStrategies(RTEFunctionBlock.name);
2866
- this.preventFunctionBlockDefaultInsertNewParagraph();
2867
- this.registerNode('logic-control-block', RTELogicControlBlock);
2868
- this.registerRenderer('logic-control-block', new RTELogicControlBlockRenderer());
2869
- this.registerNode('function-block', RTEFunctionBlock);
2870
- this.registerRenderer('function-block', new RTEFunctionBlockRenderer());
2871
- this.registerToolbarButtonRenderer('functions', this.toolbarButtonRenderer);
2872
- this.registerElementToBlockDTOClassStrategy(convertLogicControlBlockStrategy);
2873
- this.registerElementToBlockDTOClassStrategy(convertFunctionContentStrategy);
2874
- this.registerElementToBlockDTOClassStrategy(convertFunctionBlockStrategy);
2875
- }
2876
- /**
2877
- * Initializes the extension with the given context
2878
- *
2879
- * @param {RTEExtensionContext} context - extension context
2880
- */
2881
- initialExtension(context) {
2882
- super.initialExtension(context);
2883
- if (this.toolbarButtonRenderer) {
2884
- this.toolbarButtonRenderer.injectExtensionContext(context);
2885
- }
2886
- }
2887
- /**
2888
- * Remove the appen children strategies to prevent default insert new paragraph logic in function block
2889
- */
2890
- preventFunctionBlockDefaultInsertNewParagraph() {
2891
- this.unRegisterStrategy(codeBlock.ModifyContentActionType.INSERT_NEW_PARAGRAPH, RTELogicControlBlock.name);
2892
- this.unRegisterStrategy(codeBlock.ModifyContentActionType.APPEND_CHILDREN, RTEFunctionBlock.name);
2893
- this.unRegisterStrategy(codeBlock.ModifyContentActionType.INSERT_CHILDREN_AFTER, RTEFunctionBlock.name);
2894
- this.unRegisterStrategy(codeBlock.ModifyContentActionType.INSERT_CHILDREN_BEFORE, RTEFunctionBlock.name);
2895
- this.unRegisterStrategy(codeBlock.ModifyContentActionType.PASTE_CONTENT, RTELogicControlBlock.name);
2896
- VegaRTEExtension.registerActionHandleStrategy(RTEFunctionBlock.name, codeBlock.ModifyContentActionType.INSERT_NEW_PARAGRAPH, new FunctionBlockInsertParagraphStrategy());
2897
- }
2898
- }
2899
- (() => {
2900
- const insertFunctionBlockStrategy = new InsertFunctionBlockStrategy();
2901
- VegaRTEExtension.registerActionHandleStrategy(dtoRendererManager.VegaRTEContent.name, INSERT_FUNCTION_BLOCK, insertFunctionBlockStrategy);
2902
- VegaRTEExtension.registerActionHandleStrategy(codeBlock.RTETextBlock.name, INSERT_FUNCTION_BLOCK, insertFunctionBlockStrategy);
2903
- VegaRTEExtension.registerActionHandleStrategy(dtoRendererManager.RTEImageBlock.name, INSERT_FUNCTION_BLOCK, insertFunctionBlockStrategy);
2904
- VegaRTEExtension.registerActionHandleStrategy(RTELogicControlBlock.name, INSERT_FUNCTION_BLOCK, insertFunctionBlockStrategy);
2905
- VegaRTEExtension.registerActionHandleStrategy(codeBlock.RTETextBlock.name, PASTE_PLAIN_TEXT, new PastePlainTextStrategy());
2906
- VegaRTEExtension.registerActionHandlerInterceptor(codeBlock.RTETextBlock.name, codeBlock.ModifyContentActionType.INSERT_NEW_PARAGRAPH, new PreventNewParagraphInterceptor());
2907
- VegaRTEExtension.registerActionHandlerInterceptor(codeBlock.RTETextBlock.name, codeBlock.ModifyContentActionType.PASTE_CONTENT, new PreventPasteContentInterceptor());
2908
- })();
2909
-
2910
- exports.ActionHandlerInterceptor = ActionHandlerInterceptor;
2911
- exports.InsertNodeToNearestRootAction = InsertNodeToNearestRootAction;
2912
- exports.InternalVegaZIndexManager = InternalVegaZIndexManager$1;
2913
- exports.RTETokenNode = RTETokenNode;
2914
- exports.RTETokenNodeRenderer = RTETokenNodeRenderer;
2915
- exports.RTETokenToolbarButtonRenderer = RTETokenToolbarButtonRenderer;
2916
- exports.VegaDialog = VegaDialog;
2917
- exports.VegaEventManager = VegaEventManager$1;
2918
- exports.VegaLoader = VegaLoader;
2919
- exports.VegaNotify = VegaNotify;
2920
- exports.VegaRTEExtension = VegaRTEExtension;
2921
- exports.VegaRTEExtensionRenderer = VegaRTEExtensionRenderer;
2922
- exports.VegaRTEFunctionExtension = VegaRTEFunctionExtension;
2923
- exports.VegaRTETokenExtension = VegaRTETokenExtension;
2924
- exports.VegaRTEToolbarButtonRenderer = VegaRTEToolbarButtonRenderer;
2925
- exports.VegaSkeletonLoader = VegaSkeletonLoader;
2926
- exports.VegaThemeManager = VegaThemeManager;
2927
- exports.VegaZIndexManager = VegaZIndexManager$1;