@globalpayments/vega 2.97.0 → 2.99.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (628) hide show
  1. package/dist/cjs/{action-color-accessibility-validator-24498816.js → action-color-accessibility-validator-b8a9ef0f.js} +2 -2
  2. package/dist/cjs/{app-globals-3f57f7b9.js → app-globals-a306dce6.js} +10 -10
  3. package/dist/cjs/{aria-dialog-focusable-trap-slimmer-73b4c0cb.js → aria-dialog-focusable-trap-slimmer-62147489.js} +1 -1
  4. package/dist/cjs/{code-block-28a7732e.js → code-block-ea1f5eb3.js} +58 -14
  5. package/dist/cjs/{component-global-style-slimmer-93c5fb50.js → component-global-style-slimmer-ba588eb4.js} +1 -1
  6. package/dist/cjs/{component-value-history-controller-slimmer.abstract-50cdba6e.js → component-value-history-controller-slimmer.abstract-7071b064.js} +25 -6
  7. package/dist/cjs/constants-907d7d89.js +16 -0
  8. package/dist/cjs/{content-state-e2ab0f06.js → content-state-8d07d530.js} +61 -9
  9. package/dist/cjs/{dark-mode-style-controller-32d4054a.js → dark-mode-style-controller-f3da3342.js} +2 -2
  10. package/dist/cjs/{date-required-rule-5250f26d.js → date-required-rule-c0c498ad.js} +1 -1
  11. package/dist/cjs/{design-token-74674ee7.js → design-token-58bf7fe8.js} +3 -3
  12. package/dist/cjs/{element-appender-slimmer-ccb2e3c2.js → element-appender-slimmer-a0269315.js} +3 -3
  13. package/dist/cjs/{form-field-controller-slimmer-58621b5e.js → form-field-controller-slimmer-f73f200e.js} +4 -4
  14. package/dist/cjs/{image-annotation-action-b54dc669.js → image-annotation-action-2a28038e.js} +3 -3
  15. package/dist/cjs/{image-extension-1e3eeaa3.js → image-extension-9659708b.js} +2 -2
  16. package/dist/cjs/{index-592b4052.js → index-5d1adcd1.js} +86 -0
  17. package/dist/cjs/index.cjs.js +20 -20
  18. package/dist/cjs/{inject-keyboard-manager-6a6f5c9f.js → inject-keyboard-manager-4fa45f9c.js} +1 -1
  19. package/dist/cjs/{internal-calendar-period-factory-dfcdd3f6.js → internal-calendar-period-factory-6196bc80.js} +1 -1
  20. package/dist/cjs/{internal-translation-controller-1dac2df8.js → internal-translation-controller-51f7f865.js} +2 -0
  21. package/dist/cjs/{keyboard-manager-c56033b1.js → keyboard-manager-482fe257.js} +1 -1
  22. package/dist/cjs/{keyboard-manager-slimmer-7043a106.js → keyboard-manager-slimmer-a19430dd.js} +1 -1
  23. package/dist/cjs/{link-extension-71c27ff3.js → link-extension-11340e1c.js} +26 -7
  24. package/dist/cjs/loader.cjs.js +15 -15
  25. package/dist/cjs/{month-view-generator-7b704a80.js → month-view-generator-1a534451.js} +1 -1
  26. package/dist/cjs/{public-rules-55e34d2e.js → public-rules-6c77b545.js} +10 -10
  27. package/dist/cjs/{range-eebe0e3c.js → range-22ddd452.js} +1 -1
  28. package/dist/cjs/{responsive-format-facade-493d1763.js → responsive-format-facade-74e6d791.js} +1 -1
  29. package/dist/cjs/{rich-text-editor-required-rule-4fdee376.js → rich-text-editor-required-rule-09d1093a.js} +1 -1
  30. package/dist/cjs/{split-cell-operation-51097409.js → split-cell-operation-11bfb305.js} +14 -4
  31. package/dist/cjs/{state-border-formatter-711c7aaa.js → state-border-formatter-bf4f9f1c.js} +1 -1
  32. package/dist/cjs/{string-format-strategy.abstract-b61bdcbd.js → string-format-strategy.abstract-bf37b14c.js} +1 -1
  33. package/dist/cjs/{string-input-formatter-slimmer-18d45942.js → string-input-formatter-slimmer-ffeb18a6.js} +3 -3
  34. package/dist/cjs/{string-mask-strategy-ad3fa0ac.js → string-mask-strategy-7f394726.js} +2 -2
  35. package/dist/cjs/{style-formatter-8f711cb0.js → style-formatter-4ac63910.js} +2 -2
  36. package/dist/cjs/{sub-state-notify-slimmer-18891389.js → sub-state-notify-slimmer-e264a120.js} +1 -1
  37. package/dist/cjs/{sub-state-observer-slimmer-eee2f0ae.js → sub-state-observer-slimmer-6033b824.js} +1 -1
  38. package/dist/cjs/{time-required-rule-87417359.js → time-required-rule-e2a50003.js} +1 -1
  39. package/dist/cjs/{token-extension-608bbf7b.js → token-extension-4686cb3b.js} +2921 -158
  40. package/dist/cjs/{translation-slimmer-77c7f37d.js → translation-slimmer-e4997f8f.js} +1 -1
  41. package/dist/cjs/{type-guard-a57ef3ac.js → type-guard-b8d7bb3f.js} +1 -1
  42. package/dist/cjs/{valid-credit-card-number-rule-4c0a3040.js → valid-credit-card-number-rule-f5a6f009.js} +1 -1
  43. package/dist/cjs/vega-accordion.cjs.entry.js +6 -6
  44. package/dist/cjs/vega-app-footer.cjs.entry.js +2 -2
  45. package/dist/cjs/vega-app-header-button.cjs.entry.js +5 -5
  46. package/dist/cjs/vega-box.cjs.entry.js +7 -7
  47. package/dist/cjs/vega-brand-logo.cjs.entry.js +2 -2
  48. package/dist/cjs/vega-breadcrumb.cjs.entry.js +2 -2
  49. package/dist/cjs/vega-button-circle.cjs.entry.js +7 -7
  50. package/dist/cjs/vega-button-group_2.cjs.entry.js +3 -3
  51. package/dist/cjs/vega-button-link.cjs.entry.js +1 -1
  52. package/dist/cjs/vega-button.cjs.entry.js +5 -5
  53. package/dist/cjs/vega-calendar_5.cjs.entry.js +24 -13
  54. package/dist/cjs/vega-card.cjs.entry.js +5 -5
  55. package/dist/cjs/vega-carousel.cjs.entry.js +3 -3
  56. package/dist/cjs/vega-checkbox_2.cjs.entry.js +5 -5
  57. package/dist/cjs/vega-chip.cjs.entry.js +5 -5
  58. package/dist/cjs/vega-code-block.cjs.entry.js +16 -29
  59. package/dist/cjs/vega-color-picker.cjs.entry.js +5 -5
  60. package/dist/cjs/vega-color-swatch-picker.cjs.entry.js +6 -6
  61. package/dist/cjs/vega-color-swatch.cjs.entry.js +2 -2
  62. package/dist/cjs/vega-combo-box.cjs.entry.js +11 -11
  63. package/dist/cjs/vega-counter-badge.cjs.entry.js +2 -2
  64. package/dist/cjs/vega-date-picker_2.cjs.entry.js +18 -18
  65. package/dist/cjs/vega-dialog_2.cjs.entry.js +7 -7
  66. package/dist/cjs/vega-divider.cjs.entry.js +5 -5
  67. package/dist/cjs/vega-dropdown_5.cjs.entry.js +46 -31
  68. package/dist/cjs/vega-env-manager-23b8b23c.js +2 -2
  69. package/dist/cjs/vega-field-label.cjs.entry.js +3 -3
  70. package/dist/cjs/vega-file-uploader.cjs.entry.js +41 -8
  71. package/dist/cjs/vega-flag-icon.cjs.entry.js +5 -5
  72. package/dist/cjs/vega-flex.cjs.entry.js +6 -6
  73. package/dist/cjs/vega-font.cjs.entry.js +5 -5
  74. package/dist/cjs/vega-form.cjs.entry.js +5 -5
  75. package/dist/cjs/vega-grid.cjs.entry.js +5 -5
  76. package/dist/cjs/vega-icon.cjs.entry.js +6 -6
  77. package/dist/cjs/vega-image-uploader.cjs.entry.js +9 -9
  78. package/dist/cjs/vega-input-credit-card.cjs.entry.js +9 -9
  79. package/dist/cjs/vega-input-numeric.cjs.entry.js +9 -9
  80. package/dist/cjs/vega-input-passcode.cjs.entry.js +8 -8
  81. package/dist/cjs/vega-input-phone-number.cjs.entry.js +7 -7
  82. package/dist/cjs/vega-input-range.cjs.entry.js +6 -6
  83. package/dist/cjs/vega-input-select.cjs.entry.js +8 -8
  84. package/dist/cjs/vega-input.cjs.entry.js +17 -12
  85. package/dist/cjs/{vega-internal-event-id-ecc5b87a.js → vega-internal-event-id-f4d33037.js} +2 -0
  86. package/dist/cjs/vega-left-nav_5.cjs.entry.js +13 -13
  87. package/dist/cjs/vega-loader-wrapper_2.cjs.entry.js +3 -3
  88. package/dist/cjs/vega-pagination-page-selector-mobile.cjs.entry.js +1 -1
  89. package/dist/cjs/vega-pagination-page-size-selector-mobile.cjs.entry.js +3 -3
  90. package/dist/cjs/vega-pagination.cjs.entry.js +5 -5
  91. package/dist/cjs/vega-popover_2.cjs.entry.js +10 -10
  92. package/dist/cjs/vega-progress-tracker_2.cjs.entry.js +6 -6
  93. package/dist/cjs/vega-radio_2.cjs.entry.js +8 -8
  94. package/dist/cjs/vega-rich-text-content.cjs.entry.js +42 -14
  95. package/dist/cjs/vega-rich-text-editor_4.cjs.entry.js +83 -26
  96. package/dist/cjs/vega-rich-text-find-replace-panel.cjs.entry.js +1 -1
  97. package/dist/cjs/vega-rich-text-special-characters-panel.cjs.entry.js +5 -5
  98. package/dist/cjs/vega-rich-text-table-properties_3.cjs.entry.js +11 -11
  99. package/dist/cjs/vega-selection-chip_2.cjs.entry.js +8 -8
  100. package/dist/cjs/vega-selection-tile_2.cjs.entry.js +6 -6
  101. package/dist/cjs/vega-sidenav_3.cjs.entry.js +6 -6
  102. package/dist/cjs/vega-signature-capture.cjs.entry.js +10 -10
  103. package/dist/cjs/vega-stepper.cjs.entry.js +5 -5
  104. package/dist/cjs/vega-tab-group_2.cjs.entry.js +21 -8
  105. package/dist/cjs/vega-table_11.cjs.entry.js +1219 -489
  106. package/dist/cjs/vega-textarea.cjs.entry.js +5 -5
  107. package/dist/cjs/vega-time-picker_2.cjs.entry.js +12 -12
  108. package/dist/cjs/vega-toggle-switch.cjs.entry.js +5 -5
  109. package/dist/cjs/vega-tooltip_2.cjs.entry.js +7 -7
  110. package/dist/cjs/vega.cjs.js +15 -15
  111. package/dist/cjs/{wait-for-component-did-render-02ca4bee.js → wait-for-component-did-render-44d006ee.js} +1 -1
  112. package/dist/collection/components/vega-accordion/vega-accordion.js +2 -0
  113. package/dist/collection/components/vega-app-footer/vega-app-footer.js +2 -0
  114. package/dist/collection/components/vega-app-header-button/vega-app-header-button.js +2 -0
  115. package/dist/collection/components/vega-banner/vega-banner.js +2 -0
  116. package/dist/collection/components/vega-box/vega-box.js +2 -0
  117. package/dist/collection/components/vega-brand-logo/vega-brand-logo.js +2 -0
  118. package/dist/collection/components/vega-breadcrumb/vega-breadcrumb.js +2 -0
  119. package/dist/collection/components/vega-button/vega-button.js +2 -0
  120. package/dist/collection/components/vega-button-circle/vega-button-circle.js +2 -0
  121. package/dist/collection/components/vega-button-group/vega-button-group.js +2 -0
  122. package/dist/collection/components/vega-button-link/vega-button-link.js +2 -0
  123. package/dist/collection/components/vega-calendar/slimmers/common/renderers/vega-calendar-event-item-renderer.js +5 -2
  124. package/dist/collection/components/vega-calendar/vega-calendar-event-preview/slimmers/renderers/vega-calendar-event-preview-detail-renderer.js +9 -1
  125. package/dist/collection/components/vega-calendar/vega-calendar.js +2 -0
  126. package/dist/collection/components/vega-card/vega-card.js +2 -0
  127. package/dist/collection/components/vega-carousel/vega-carousel.js +2 -0
  128. package/dist/collection/components/vega-checkbox/vega-checkbox.js +2 -0
  129. package/dist/collection/components/vega-chip/vega-chip.js +2 -0
  130. package/dist/collection/components/vega-code-block/slimmers/controllers/code-highlight-parser.abstract.js +4 -17
  131. package/dist/collection/components/vega-color-picker/vega-color-picker.js +2 -0
  132. package/dist/collection/components/vega-combo-box/vega-combo-box.js +2 -0
  133. package/dist/collection/components/vega-counter-badge/vega-counter-badge.js +4 -2
  134. package/dist/collection/components/vega-date-picker/vega-date-picker.js +2 -0
  135. package/dist/collection/components/vega-divider/vega-divider.js +2 -0
  136. package/dist/collection/components/vega-dropdown/constants.js +10 -0
  137. package/dist/collection/components/vega-dropdown/vega-dropdown-group/slimmers/renderers/vega-dropdown-group-renderer.js +6 -4
  138. package/dist/collection/components/vega-dropdown/vega-dropdown-item/slimmers/renderers/vega-dropdown-item-renderer.js +10 -2
  139. package/dist/collection/components/vega-dropdown/vega-dropdown.js +45 -14
  140. package/dist/collection/components/vega-field-error/vega-field-error.js +2 -0
  141. package/dist/collection/components/vega-field-label/vega-field-label.css +1 -0
  142. package/dist/collection/components/vega-file-uploader/slimmers/renderers/vega-file-uploader-file-list-renderer.js +22 -2
  143. package/dist/collection/components/vega-file-uploader/vega-file-uploader.js +63 -6
  144. package/dist/collection/components/vega-flag-icon/vega-flag-icon.js +2 -0
  145. package/dist/collection/components/vega-flex/vega-flex.js +2 -0
  146. package/dist/collection/components/vega-font/vega-font.js +2 -0
  147. package/dist/collection/components/vega-form/vega-form.js +2 -0
  148. package/dist/collection/components/vega-grid/vega-grid.js +2 -0
  149. package/dist/collection/components/vega-icon/vega-icon.js +2 -0
  150. package/dist/collection/components/vega-image-uploader/vega-image-uploader.js +2 -0
  151. package/dist/collection/components/vega-input/slimmers/renderers/vega-input-input-suggestions-renderer.js +7 -2
  152. package/dist/collection/components/vega-input/vega-input.js +2 -0
  153. package/dist/collection/components/vega-input-credit-card/vega-input-credit-card.js +2 -0
  154. package/dist/collection/components/vega-input-numeric/vega-input-numeric.js +2 -0
  155. package/dist/collection/components/vega-input-passcode/vega-input-passcode.js +2 -0
  156. package/dist/collection/components/vega-input-phone-number/vega-input-phone-number.js +2 -0
  157. package/dist/collection/components/vega-input-range/vega-input-range.js +2 -0
  158. package/dist/collection/components/vega-input-select/vega-input-select.js +2 -0
  159. package/dist/collection/components/vega-item-toggle/vega-item-toggle.js +2 -0
  160. package/dist/collection/components/vega-loading-indicator/vega-loading-indicator.js +2 -0
  161. package/dist/collection/components/vega-modal/vega-modal.js +2 -0
  162. package/dist/collection/components/vega-page-notification/vega-page-notification.js +2 -0
  163. package/dist/collection/components/vega-pagination/vega-pagination.js +2 -0
  164. package/dist/collection/components/vega-popover/vega-popover.js +2 -0
  165. package/dist/collection/components/vega-progress-tracker/vega-progress-tracker.js +2 -0
  166. package/dist/collection/components/vega-radio/vega-radio.js +2 -0
  167. package/dist/collection/components/vega-rich-text-editor/constants/constant.js +16 -0
  168. package/dist/collection/components/vega-rich-text-editor/dto/annotations/text-style-default-styles.js +2 -1
  169. package/dist/collection/components/vega-rich-text-editor/dto/blocks/block.abstract.js +11 -0
  170. package/dist/collection/components/vega-rich-text-editor/dto/blocks/text-block.js +3 -0
  171. package/dist/collection/components/vega-rich-text-editor/dto/filter-styles-strategies/filter-styles-strategy-registry.js +2 -1
  172. package/dist/collection/components/vega-rich-text-editor/dto/filter-styles-strategies/filter-styles-strategy.abstract.js +5 -2
  173. package/dist/collection/components/vega-rich-text-editor/dto/filter-styles-strategies/text-node/title-heading-node-filter-styles-strategy.js +36 -2
  174. package/dist/collection/components/vega-rich-text-editor/dto/nodes/code-block-node.js +2 -1
  175. package/dist/collection/components/vega-rich-text-editor/dto/renderers/blocks/block-text-nodes-renderer.abstract.js +20 -3
  176. package/dist/collection/components/vega-rich-text-editor/dto/renderers/nodes/text-node-renderer.js +12 -0
  177. package/dist/collection/components/vega-rich-text-editor/extensions/block-boundary-registry.js +34 -0
  178. package/dist/collection/components/vega-rich-text-editor/extensions/extension.abstract.js +20 -0
  179. package/dist/collection/components/vega-rich-text-editor/extensions/functions/action-handler-strategies/insert-function-block-strategy.js +3 -2
  180. package/dist/collection/components/vega-rich-text-editor/extensions/functions/constants.js +8 -0
  181. package/dist/collection/components/vega-rich-text-editor/extensions/functions/dto/function-block.js +14 -3
  182. package/dist/collection/components/vega-rich-text-editor/extensions/functions/dto/logic-control-block.js +2 -1
  183. package/dist/collection/components/vega-rich-text-editor/extensions/functions/element-to-dto-strategies/div-containing-function-block-strategy.js +19 -0
  184. package/dist/collection/components/vega-rich-text-editor/extensions/functions/element-to-dto-strategies/div-to-function-block-strategy.js +9 -5
  185. package/dist/collection/components/vega-rich-text-editor/extensions/functions/element-to-dto-strategies/div-to-function-content-strategy.js +3 -3
  186. package/dist/collection/components/vega-rich-text-editor/extensions/functions/element-to-dto-strategies/div-to-logic-control-block-strategy.js +4 -2
  187. package/dist/collection/components/vega-rich-text-editor/extensions/functions/function-extension.js +18 -0
  188. package/dist/collection/components/vega-rich-text-editor/extensions/functions/renderers/function-block-renderer.js +5 -2
  189. package/dist/collection/components/vega-rich-text-editor/extensions/functions/renderers/logic-control-block-renderer.js +2 -1
  190. package/dist/collection/components/vega-rich-text-editor/extensions/functions/utils.js +36 -0
  191. package/dist/collection/components/vega-rich-text-editor/extensions/languages/language-extension.js +1 -0
  192. package/dist/collection/components/vega-rich-text-editor/extensions/paste/action-handler-strategies/image-replace-src-strategy.js +21 -0
  193. package/dist/collection/components/vega-rich-text-editor/extensions/paste/actions/image-replace-src-action.js +13 -0
  194. package/dist/collection/components/vega-rich-text-editor/extensions/paste/parse-local-images-helper/paste-image-parser.js +295 -0
  195. package/dist/collection/components/vega-rich-text-editor/extensions/paste/parse-local-images-helper/pending-image-registry.js +116 -0
  196. package/dist/collection/components/vega-rich-text-editor/extensions/paste/paste-chooser-ui.js +13 -4
  197. package/dist/collection/components/vega-rich-text-editor/extensions/paste/paste-extension.js +70 -7
  198. package/dist/collection/components/vega-rich-text-editor/extensions/paste/strategies/default-paste-strategy.js +38 -0
  199. package/dist/collection/components/vega-rich-text-editor/extensions/paste/strategies/paste-processing-strategy.abstract.js +55 -0
  200. package/dist/collection/components/vega-rich-text-editor/extensions/paste/strategies/paste-strategy-selector.js +59 -0
  201. package/dist/collection/components/vega-rich-text-editor/extensions/paste/strategies/word-paste-strategy.js +416 -0
  202. package/dist/collection/components/vega-rich-text-editor/extensions/paste/word-paste-transformers/word-structure-code-block-transformer.js +106 -0
  203. package/dist/collection/components/vega-rich-text-editor/extensions/paste/word-paste-transformers/word-structure-image-transformer.js +198 -0
  204. package/dist/collection/components/vega-rich-text-editor/extensions/paste/word-paste-transformers/word-structure-list-transformer.js +591 -0
  205. package/dist/collection/components/vega-rich-text-editor/extensions/paste/word-paste-transformers/word-structure-paragraph-transformer.js +112 -0
  206. package/dist/collection/components/vega-rich-text-editor/extensions/paste/word-paste-transformers/word-structure-table-transformer.js +551 -0
  207. package/dist/collection/components/vega-rich-text-editor/extensions/paste/word-paste-transformers/word-structure-transformer.js +7 -0
  208. package/dist/collection/components/vega-rich-text-editor/extensions/table/dto/table-block.js +10 -0
  209. package/dist/collection/components/vega-rich-text-editor/extensions/tokens/span-to-token-node-strategy.js +4 -2
  210. package/dist/collection/components/vega-rich-text-editor/extensions/tokens/token-node.js +44 -0
  211. package/dist/collection/components/vega-rich-text-editor/helpers/utils.js +10 -6
  212. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/extension-controller.js +2 -0
  213. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/annotation-handler/text-style-annotation-handler.js +7 -4
  214. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/continue-inline-to-rte-text-block-strategy.js +17 -0
  215. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/input-event-handler/insert-paste-handler.js +18 -4
  216. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/selection-controller.js +21 -2
  217. package/dist/collection/components/vega-rich-text-editor/slimmers/renderers/tools/source-edit-toolbar-button-slimmer.js +7 -0
  218. package/dist/collection/components/vega-rich-text-editor/slimmers/renderers/vega-rich-text-editor-source-view-renderer.js +5 -2
  219. package/dist/collection/components/vega-rich-text-editor/vega-rich-text-editor.js +2 -0
  220. package/dist/collection/components/vega-section-title/vega-section-title.js +2 -0
  221. package/dist/collection/components/vega-segment-control/vega-segment-control.js +2 -0
  222. package/dist/collection/components/vega-selection-chip/vega-selection-chip.js +2 -0
  223. package/dist/collection/components/vega-selection-tile/vega-selection-tile.js +2 -0
  224. package/dist/collection/components/vega-sidenav/vega-sidenav.js +2 -0
  225. package/dist/collection/components/vega-signature-capture/vega-signature-capture.js +2 -0
  226. package/dist/collection/components/vega-skeleton/vega-skeleton.js +2 -0
  227. package/dist/collection/components/vega-stepper/vega-stepper.js +2 -0
  228. package/dist/collection/components/vega-tab-group/slimmers/vega-tab-group/renderers/vega-tab-group-tab-list-renderer.js +14 -7
  229. package/dist/collection/components/vega-tab-group/vega-tab-group.css +6 -0
  230. package/dist/collection/components/vega-tab-group/vega-tab-group.js +7 -0
  231. package/dist/collection/components/vega-table/slimmers/controllers/vega-table-body-col-span-controller.js +31 -1
  232. package/dist/collection/components/vega-table/slimmers/controllers/vega-table-column-structure-model-controller.js +17 -7
  233. package/dist/collection/components/vega-table/slimmers/controllers/vega-table-head-template-structure-controller.js +440 -0
  234. package/dist/collection/components/vega-table/slimmers/controllers/vega-table-render-input-controller.js +11 -3
  235. package/dist/collection/components/vega-table/slimmers/renderers/vega-table-body-col-span-resolver.js +18 -11
  236. package/dist/collection/components/vega-table/slimmers/renderers/vega-table-pinned-renderer.js +207 -17
  237. package/dist/collection/components/vega-table/vega-table-foot/vega-table-foot.css +1 -0
  238. package/dist/collection/components/vega-table/vega-table-foot-cell/slimmers/renderers/vega-table-foot-cell-renderer.js +4 -1
  239. package/dist/collection/components/vega-table/vega-table-foot-cell/vega-table-foot-cell.css +15 -0
  240. package/dist/collection/components/vega-table/vega-table-foot-cell/vega-table-foot-cell.js +1 -1
  241. package/dist/collection/components/vega-table/vega-table-head-cell/slimmers/controllers/vega-table-head-cell-template-structure-controller.js +28 -0
  242. package/dist/collection/components/vega-table/vega-table-head-cell/vega-table-head-cell.css +1 -0
  243. package/dist/collection/components/vega-table/vega-table-head-cell/vega-table-head-cell.js +68 -4
  244. package/dist/collection/components/vega-table/vega-table.js +15 -0
  245. package/dist/collection/components/vega-textarea/vega-textarea.js +2 -0
  246. package/dist/collection/components/vega-time-picker/vega-time-picker.js +2 -0
  247. package/dist/collection/components/vega-toggle-switch/vega-toggle-switch.js +2 -0
  248. package/dist/collection/components/vega-tooltip/vega-tooltip.js +2 -0
  249. package/dist/collection/helpers/event-manager/event-id/vega-internal-event-id.js +1 -0
  250. package/dist/collection/helpers/translation/locales/en.js +2 -0
  251. package/dist/collection/utils/sanitize/index.js +3 -2
  252. package/dist/collection/utils/sanitize/strategies/index.js +1 -0
  253. package/dist/collection/utils/sanitize/strategies/label-sanitize-strategy.js +14 -0
  254. package/dist/collection/utils/sanitize/strategies/plain-text-sanitize-strategy.js +70 -0
  255. package/dist/esm/{action-color-accessibility-validator-ce55cb07.js → action-color-accessibility-validator-08877515.js} +2 -2
  256. package/dist/esm/{app-globals-d3991e53.js → app-globals-c59364c2.js} +10 -10
  257. package/dist/esm/{aria-dialog-focusable-trap-slimmer-9eae86c6.js → aria-dialog-focusable-trap-slimmer-f069f54d.js} +1 -1
  258. package/dist/esm/{code-block-8df86434.js → code-block-e6443949.js} +54 -15
  259. package/dist/esm/{component-global-style-slimmer-ac703085.js → component-global-style-slimmer-7d60a04a.js} +1 -1
  260. package/dist/esm/{component-value-history-controller-slimmer.abstract-e4b95997.js → component-value-history-controller-slimmer.abstract-ee393213.js} +25 -6
  261. package/dist/esm/constants-4725f97f.js +13 -0
  262. package/dist/esm/{content-state-c63fbeda.js → content-state-43cdacff.js} +61 -10
  263. package/dist/esm/{dark-mode-style-controller-ca5afd2d.js → dark-mode-style-controller-352f15ff.js} +2 -2
  264. package/dist/esm/{date-required-rule-85334d0c.js → date-required-rule-b5b67498.js} +1 -1
  265. package/dist/esm/{design-token-10ff79b5.js → design-token-8319bb59.js} +3 -3
  266. package/dist/esm/{element-appender-slimmer-24be8e94.js → element-appender-slimmer-c81d1fe3.js} +3 -3
  267. package/dist/esm/{form-field-controller-slimmer-d8628837.js → form-field-controller-slimmer-511b7ac5.js} +4 -4
  268. package/dist/esm/{image-annotation-action-fcceff95.js → image-annotation-action-d7cb80aa.js} +3 -3
  269. package/dist/esm/{image-extension-3280bdb0.js → image-extension-9b8abd0d.js} +2 -2
  270. package/dist/esm/{index-3b327f29.js → index-35451d12.js} +86 -1
  271. package/dist/esm/index.js +20 -20
  272. package/dist/esm/{inject-keyboard-manager-ea1aad5b.js → inject-keyboard-manager-dd368d56.js} +1 -1
  273. package/dist/esm/{internal-calendar-period-factory-7b294fb6.js → internal-calendar-period-factory-d58f35c6.js} +1 -1
  274. package/dist/esm/{internal-translation-controller-fac22598.js → internal-translation-controller-b33430c6.js} +2 -0
  275. package/dist/esm/{keyboard-manager-50da85d7.js → keyboard-manager-b4a0d97d.js} +1 -1
  276. package/dist/esm/{keyboard-manager-slimmer-1f7c8bfb.js → keyboard-manager-slimmer-0517fc70.js} +1 -1
  277. package/dist/esm/{link-extension-f92c06ef.js → link-extension-230bae8d.js} +26 -7
  278. package/dist/esm/loader.js +15 -15
  279. package/dist/esm/{month-view-generator-a1a9a4ec.js → month-view-generator-f470caac.js} +1 -1
  280. package/dist/esm/{public-rules-3695aaf7.js → public-rules-28ef32d3.js} +10 -10
  281. package/dist/esm/{range-717d552d.js → range-efad2578.js} +1 -1
  282. package/dist/esm/{responsive-format-facade-f19b601c.js → responsive-format-facade-dec87e46.js} +1 -1
  283. package/dist/esm/{rich-text-editor-required-rule-2e39264a.js → rich-text-editor-required-rule-a697e5bd.js} +1 -1
  284. package/dist/esm/{split-cell-operation-6c26af91.js → split-cell-operation-89b91a38.js} +14 -4
  285. package/dist/esm/{state-border-formatter-bfda33aa.js → state-border-formatter-1e900a2f.js} +1 -1
  286. package/dist/esm/{string-format-strategy.abstract-1f4ff1b3.js → string-format-strategy.abstract-d0ce3f65.js} +1 -1
  287. package/dist/esm/{string-input-formatter-slimmer-68b2af39.js → string-input-formatter-slimmer-6546cfc7.js} +3 -3
  288. package/dist/esm/{string-mask-strategy-bbbcdbef.js → string-mask-strategy-dd13ae21.js} +2 -2
  289. package/dist/esm/{style-formatter-e9adc8f4.js → style-formatter-057d7120.js} +2 -2
  290. package/dist/esm/{sub-state-notify-slimmer-0f72ce74.js → sub-state-notify-slimmer-23b7d0e8.js} +1 -1
  291. package/dist/esm/{sub-state-observer-slimmer-64532d94.js → sub-state-observer-slimmer-722f6b92.js} +1 -1
  292. package/dist/esm/{time-required-rule-1ce2d0a0.js → time-required-rule-73753a54.js} +1 -1
  293. package/dist/esm/{token-extension-5082a4d2.js → token-extension-74a0eeb1.js} +2919 -156
  294. package/dist/esm/{translation-slimmer-ee0f0e76.js → translation-slimmer-ef970ffc.js} +1 -1
  295. package/dist/esm/{type-guard-f2624334.js → type-guard-6fc96870.js} +1 -1
  296. package/dist/esm/{valid-credit-card-number-rule-60212b1d.js → valid-credit-card-number-rule-b54a31e7.js} +1 -1
  297. package/dist/esm/vega-accordion.entry.js +6 -6
  298. package/dist/esm/vega-app-footer.entry.js +2 -2
  299. package/dist/esm/vega-app-header-button.entry.js +5 -5
  300. package/dist/esm/vega-box.entry.js +7 -7
  301. package/dist/esm/vega-brand-logo.entry.js +2 -2
  302. package/dist/esm/vega-breadcrumb.entry.js +2 -2
  303. package/dist/esm/vega-button-circle.entry.js +7 -7
  304. package/dist/esm/vega-button-group_2.entry.js +3 -3
  305. package/dist/esm/vega-button-link.entry.js +1 -1
  306. package/dist/esm/vega-button.entry.js +5 -5
  307. package/dist/esm/vega-calendar_5.entry.js +24 -13
  308. package/dist/esm/vega-card.entry.js +5 -5
  309. package/dist/esm/vega-carousel.entry.js +3 -3
  310. package/dist/esm/vega-checkbox_2.entry.js +5 -5
  311. package/dist/esm/vega-chip.entry.js +5 -5
  312. package/dist/esm/vega-code-block.entry.js +16 -29
  313. package/dist/esm/vega-color-picker.entry.js +5 -5
  314. package/dist/esm/vega-color-swatch-picker.entry.js +6 -6
  315. package/dist/esm/vega-color-swatch.entry.js +2 -2
  316. package/dist/esm/vega-combo-box.entry.js +11 -11
  317. package/dist/esm/vega-counter-badge.entry.js +2 -2
  318. package/dist/esm/vega-date-picker_2.entry.js +18 -18
  319. package/dist/esm/vega-dialog_2.entry.js +7 -7
  320. package/dist/esm/vega-divider.entry.js +5 -5
  321. package/dist/esm/vega-dropdown_5.entry.js +42 -27
  322. package/dist/esm/vega-env-manager-8f8dc473.js +2 -2
  323. package/dist/esm/vega-field-label.entry.js +3 -3
  324. package/dist/esm/vega-file-uploader.entry.js +41 -8
  325. package/dist/esm/vega-flag-icon.entry.js +5 -5
  326. package/dist/esm/vega-flex.entry.js +6 -6
  327. package/dist/esm/vega-font.entry.js +5 -5
  328. package/dist/esm/vega-form.entry.js +5 -5
  329. package/dist/esm/vega-grid.entry.js +5 -5
  330. package/dist/esm/vega-icon.entry.js +6 -6
  331. package/dist/esm/vega-image-uploader.entry.js +9 -9
  332. package/dist/esm/vega-input-credit-card.entry.js +9 -9
  333. package/dist/esm/vega-input-numeric.entry.js +9 -9
  334. package/dist/esm/vega-input-passcode.entry.js +8 -8
  335. package/dist/esm/vega-input-phone-number.entry.js +7 -7
  336. package/dist/esm/vega-input-range.entry.js +6 -6
  337. package/dist/esm/vega-input-select.entry.js +8 -8
  338. package/dist/esm/vega-input.entry.js +17 -12
  339. package/dist/esm/{vega-internal-event-id-827eb1ce.js → vega-internal-event-id-86fce049.js} +2 -1
  340. package/dist/esm/vega-left-nav_5.entry.js +13 -13
  341. package/dist/esm/vega-loader-wrapper_2.entry.js +3 -3
  342. package/dist/esm/vega-pagination-page-selector-mobile.entry.js +1 -1
  343. package/dist/esm/vega-pagination-page-size-selector-mobile.entry.js +3 -3
  344. package/dist/esm/vega-pagination.entry.js +5 -5
  345. package/dist/esm/vega-popover_2.entry.js +10 -10
  346. package/dist/esm/vega-progress-tracker_2.entry.js +6 -6
  347. package/dist/esm/vega-radio_2.entry.js +8 -8
  348. package/dist/esm/vega-rich-text-content.entry.js +42 -14
  349. package/dist/esm/vega-rich-text-editor_4.entry.js +83 -26
  350. package/dist/esm/vega-rich-text-find-replace-panel.entry.js +1 -1
  351. package/dist/esm/vega-rich-text-special-characters-panel.entry.js +5 -5
  352. package/dist/esm/vega-rich-text-table-properties_3.entry.js +11 -11
  353. package/dist/esm/vega-selection-chip_2.entry.js +8 -8
  354. package/dist/esm/vega-selection-tile_2.entry.js +6 -6
  355. package/dist/esm/vega-sidenav_3.entry.js +6 -6
  356. package/dist/esm/vega-signature-capture.entry.js +10 -10
  357. package/dist/esm/vega-stepper.entry.js +5 -5
  358. package/dist/esm/vega-tab-group_2.entry.js +21 -8
  359. package/dist/esm/vega-table_11.entry.js +1194 -464
  360. package/dist/esm/vega-textarea.entry.js +5 -5
  361. package/dist/esm/vega-time-picker_2.entry.js +12 -12
  362. package/dist/esm/vega-toggle-switch.entry.js +5 -5
  363. package/dist/esm/vega-tooltip_2.entry.js +7 -7
  364. package/dist/esm/vega.js +15 -15
  365. package/dist/esm/{wait-for-component-did-render-0c237cb8.js → wait-for-component-did-render-ff7062aa.js} +1 -1
  366. package/dist/sri/vega-sri-manifest.json +371 -367
  367. package/dist/types/components/vega-accordion/vega-accordion.d.ts +2 -0
  368. package/dist/types/components/vega-app-footer/vega-app-footer.d.ts +2 -0
  369. package/dist/types/components/vega-app-header-button/vega-app-header-button.d.ts +2 -0
  370. package/dist/types/components/vega-banner/vega-banner.d.ts +2 -0
  371. package/dist/types/components/vega-box/vega-box.d.ts +2 -0
  372. package/dist/types/components/vega-brand-logo/vega-brand-logo.d.ts +2 -0
  373. package/dist/types/components/vega-breadcrumb/vega-breadcrumb.d.ts +2 -0
  374. package/dist/types/components/vega-button/vega-button.d.ts +2 -0
  375. package/dist/types/components/vega-button-circle/vega-button-circle.d.ts +2 -0
  376. package/dist/types/components/vega-button-group/vega-button-group.d.ts +2 -0
  377. package/dist/types/components/vega-button-link/vega-button-link.d.ts +2 -0
  378. package/dist/types/components/vega-calendar/vega-calendar-event-preview/slimmers/renderers/vega-calendar-event-preview-detail-renderer.d.ts +2 -0
  379. package/dist/types/components/vega-calendar/vega-calendar.d.ts +2 -0
  380. package/dist/types/components/vega-card/vega-card.d.ts +2 -0
  381. package/dist/types/components/vega-carousel/vega-carousel.d.ts +2 -0
  382. package/dist/types/components/vega-checkbox/vega-checkbox.d.ts +2 -0
  383. package/dist/types/components/vega-chip/vega-chip.d.ts +2 -0
  384. package/dist/types/components/vega-code-block/slimmers/controllers/code-highlight-parser.abstract.d.ts +2 -1
  385. package/dist/types/components/vega-color-picker/vega-color-picker.d.ts +2 -0
  386. package/dist/types/components/vega-combo-box/vega-combo-box.d.ts +2 -0
  387. package/dist/types/components/vega-counter-badge/vega-counter-badge.d.ts +2 -0
  388. package/dist/types/components/vega-date-picker/vega-date-picker.d.ts +2 -0
  389. package/dist/types/components/vega-divider/vega-divider.d.ts +2 -0
  390. package/dist/types/components/vega-dropdown/constants.d.ts +12 -0
  391. package/dist/types/components/vega-dropdown/vega-dropdown-item/slimmers/renderers/vega-dropdown-item-renderer.d.ts +1 -0
  392. package/dist/types/components/vega-dropdown/vega-dropdown.d.ts +9 -0
  393. package/dist/types/components/vega-field-error/vega-field-error.d.ts +2 -0
  394. package/dist/types/components/vega-file-uploader/slimmers/renderers/vega-file-uploader-file-list-renderer.d.ts +10 -0
  395. package/dist/types/components/vega-file-uploader/types.d.ts +4 -0
  396. package/dist/types/components/vega-file-uploader/vega-file-uploader.d.ts +15 -0
  397. package/dist/types/components/vega-flag-icon/vega-flag-icon.d.ts +2 -0
  398. package/dist/types/components/vega-flex/vega-flex.d.ts +2 -0
  399. package/dist/types/components/vega-font/vega-font.d.ts +2 -0
  400. package/dist/types/components/vega-form/vega-form.d.ts +2 -0
  401. package/dist/types/components/vega-grid/vega-grid.d.ts +2 -0
  402. package/dist/types/components/vega-icon/vega-icon.d.ts +2 -0
  403. package/dist/types/components/vega-image-uploader/vega-image-uploader.d.ts +2 -0
  404. package/dist/types/components/vega-input/types.d.ts +11 -1
  405. package/dist/types/components/vega-input/vega-input.d.ts +2 -0
  406. package/dist/types/components/vega-input-credit-card/vega-input-credit-card.d.ts +2 -0
  407. package/dist/types/components/vega-input-numeric/vega-input-numeric.d.ts +2 -0
  408. package/dist/types/components/vega-input-passcode/vega-input-passcode.d.ts +2 -0
  409. package/dist/types/components/vega-input-phone-number/vega-input-phone-number.d.ts +2 -0
  410. package/dist/types/components/vega-input-range/vega-input-range.d.ts +2 -0
  411. package/dist/types/components/vega-input-select/vega-input-select.d.ts +2 -0
  412. package/dist/types/components/vega-item-toggle/vega-item-toggle.d.ts +2 -0
  413. package/dist/types/components/vega-loading-indicator/vega-loading-indicator.d.ts +2 -0
  414. package/dist/types/components/vega-modal/vega-modal.d.ts +2 -0
  415. package/dist/types/components/vega-page-notification/vega-page-notification.d.ts +2 -0
  416. package/dist/types/components/vega-pagination/vega-pagination.d.ts +2 -0
  417. package/dist/types/components/vega-popover/vega-popover.d.ts +2 -0
  418. package/dist/types/components/vega-progress-tracker/vega-progress-tracker.d.ts +2 -0
  419. package/dist/types/components/vega-radio/vega-radio.d.ts +2 -0
  420. package/dist/types/components/vega-rich-text-editor/constants/constant.d.ts +16 -0
  421. package/dist/types/components/vega-rich-text-editor/dto/annotations/text-style-default-styles.d.ts +1 -0
  422. package/dist/types/components/vega-rich-text-editor/dto/blocks/block.abstract.d.ts +9 -0
  423. package/dist/types/components/vega-rich-text-editor/dto/filter-styles-strategies/filter-styles-strategy-registry.d.ts +1 -0
  424. package/dist/types/components/vega-rich-text-editor/dto/filter-styles-strategies/filter-styles-strategy.abstract.d.ts +3 -2
  425. package/dist/types/components/vega-rich-text-editor/dto/filter-styles-strategies/text-node/title-heading-node-filter-styles-strategy.d.ts +25 -3
  426. package/dist/types/components/vega-rich-text-editor/dto/renderers/blocks/block-text-nodes-renderer.abstract.d.ts +7 -0
  427. package/dist/types/components/vega-rich-text-editor/dto/renderers/nodes/text-node-renderer.d.ts +11 -0
  428. package/dist/types/components/vega-rich-text-editor/extensions/block-boundary-registry.d.ts +21 -0
  429. package/dist/types/components/vega-rich-text-editor/extensions/extension.abstract.d.ts +15 -0
  430. package/dist/types/components/vega-rich-text-editor/extensions/functions/constants.d.ts +4 -0
  431. package/dist/types/components/vega-rich-text-editor/extensions/functions/dto/function-block.d.ts +7 -0
  432. package/dist/types/components/vega-rich-text-editor/extensions/functions/element-to-dto-strategies/div-containing-function-block-strategy.d.ts +8 -0
  433. package/dist/types/components/vega-rich-text-editor/extensions/functions/function-extension.d.ts +6 -0
  434. package/dist/types/components/vega-rich-text-editor/extensions/functions/utils.d.ts +29 -0
  435. package/dist/types/components/vega-rich-text-editor/extensions/paste/action-handler-strategies/image-replace-src-strategy.d.ts +12 -0
  436. package/dist/types/components/vega-rich-text-editor/extensions/paste/actions/image-replace-src-action.d.ts +11 -0
  437. package/dist/types/components/vega-rich-text-editor/extensions/paste/parse-local-images-helper/paste-image-parser.d.ts +136 -0
  438. package/dist/types/components/vega-rich-text-editor/extensions/paste/parse-local-images-helper/pending-image-registry.d.ts +68 -0
  439. package/dist/types/components/vega-rich-text-editor/extensions/paste/paste-chooser-ui.d.ts +9 -4
  440. package/dist/types/components/vega-rich-text-editor/extensions/paste/paste-extension.d.ts +39 -2
  441. package/dist/types/components/vega-rich-text-editor/extensions/paste/strategies/default-paste-strategy.d.ts +29 -0
  442. package/dist/types/components/vega-rich-text-editor/extensions/paste/strategies/paste-processing-strategy.abstract.d.ts +61 -0
  443. package/dist/types/components/vega-rich-text-editor/extensions/paste/strategies/paste-strategy-selector.d.ts +45 -0
  444. package/dist/types/components/vega-rich-text-editor/extensions/paste/strategies/word-paste-strategy.d.ts +186 -0
  445. package/dist/types/components/vega-rich-text-editor/extensions/paste/word-paste-transformers/word-structure-code-block-transformer.d.ts +51 -0
  446. package/dist/types/components/vega-rich-text-editor/extensions/paste/word-paste-transformers/word-structure-image-transformer.d.ts +86 -0
  447. package/dist/types/components/vega-rich-text-editor/extensions/paste/word-paste-transformers/word-structure-list-transformer.d.ts +271 -0
  448. package/dist/types/components/vega-rich-text-editor/extensions/paste/word-paste-transformers/word-structure-paragraph-transformer.d.ts +25 -0
  449. package/dist/types/components/vega-rich-text-editor/extensions/paste/word-paste-transformers/word-structure-table-transformer.d.ts +240 -0
  450. package/dist/types/components/vega-rich-text-editor/extensions/paste/word-paste-transformers/word-structure-transformer.d.ts +36 -0
  451. package/dist/types/components/vega-rich-text-editor/extensions/table/dto/table-block.d.ts +8 -0
  452. package/dist/types/components/vega-rich-text-editor/extensions/tokens/span-to-token-node-strategy.d.ts +2 -2
  453. package/dist/types/components/vega-rich-text-editor/extensions/tokens/token-node.d.ts +19 -1
  454. package/dist/types/components/vega-rich-text-editor/helpers/utils.d.ts +7 -0
  455. package/dist/types/components/vega-rich-text-editor/interface.d.ts +10 -0
  456. package/dist/types/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/annotation-handler/text-style-annotation-handler.d.ts +4 -1
  457. package/dist/types/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/continue-inline-to-rte-text-block-strategy.d.ts +8 -0
  458. package/dist/types/components/vega-rich-text-editor/slimmers/renderers/tools/source-edit-toolbar-button-slimmer.d.ts +1 -0
  459. package/dist/types/components/vega-rich-text-editor/vega-rich-text-editor.d.ts +2 -0
  460. package/dist/types/components/vega-section-title/vega-section-title.d.ts +2 -0
  461. package/dist/types/components/vega-segment-control/vega-segment-control.d.ts +2 -0
  462. package/dist/types/components/vega-selection-chip/vega-selection-chip.d.ts +2 -0
  463. package/dist/types/components/vega-selection-tile/vega-selection-tile.d.ts +2 -0
  464. package/dist/types/components/vega-sidenav/vega-sidenav.d.ts +2 -0
  465. package/dist/types/components/vega-signature-capture/vega-signature-capture.d.ts +2 -0
  466. package/dist/types/components/vega-skeleton/vega-skeleton.d.ts +2 -0
  467. package/dist/types/components/vega-stepper/vega-stepper.d.ts +2 -0
  468. package/dist/types/components/vega-tab-group/slimmers/vega-tab-group/renderers/vega-tab-group-tab-list-renderer.d.ts +1 -0
  469. package/dist/types/components/vega-tab-group/types.d.ts +3 -1
  470. package/dist/types/components/vega-tab-group/vega-tab-group.d.ts +4 -0
  471. package/dist/types/components/vega-table/interface.d.ts +4 -4
  472. package/dist/types/components/vega-table/slimmers/controllers/vega-table-body-col-span-controller.d.ts +16 -0
  473. package/dist/types/components/vega-table/slimmers/controllers/vega-table-column-structure-model-controller.d.ts +8 -4
  474. package/dist/types/components/vega-table/slimmers/controllers/vega-table-head-template-structure-controller.d.ts +168 -0
  475. package/dist/types/components/vega-table/slimmers/controllers/vega-table-render-input-controller.d.ts +8 -1
  476. package/dist/types/components/vega-table/slimmers/renderers/vega-table-body-col-span-resolver.d.ts +8 -10
  477. package/dist/types/components/vega-table/slimmers/renderers/vega-table-pinned-renderer.d.ts +76 -0
  478. package/dist/types/components/vega-table/vega-table-foot-cell/slimmers/renderers/vega-table-foot-cell-renderer.d.ts +1 -0
  479. package/dist/types/components/vega-table/vega-table-head-cell/slimmers/controllers/vega-table-head-cell-template-structure-controller.d.ts +12 -0
  480. package/dist/types/components/vega-table/vega-table-head-cell/vega-table-head-cell.d.ts +19 -0
  481. package/dist/types/components/vega-table/vega-table.d.ts +6 -0
  482. package/dist/types/components/vega-textarea/vega-textarea.d.ts +2 -0
  483. package/dist/types/components/vega-time-picker/vega-time-picker.d.ts +2 -0
  484. package/dist/types/components/vega-toggle-switch/vega-toggle-switch.d.ts +2 -0
  485. package/dist/types/components/vega-tooltip/vega-tooltip.d.ts +2 -0
  486. package/dist/types/components.d.ts +54 -0
  487. package/dist/types/helpers/event-manager/event-id/vega-internal-event-id.d.ts +1 -0
  488. package/dist/types/helpers/translation/interface.d.ts +3 -1
  489. package/dist/types/types/public-api.d.ts +1 -0
  490. package/dist/types/utils/sanitize/index.d.ts +3 -2
  491. package/dist/types/utils/sanitize/strategies/index.d.ts +1 -0
  492. package/dist/types/utils/sanitize/strategies/label-sanitize-strategy.d.ts +9 -0
  493. package/dist/types/utils/sanitize/strategies/plain-text-sanitize-strategy.d.ts +36 -0
  494. package/dist/vega/index.esm.js +1 -1
  495. package/dist/vega/{p-36c89520.entry.js → p-024db952.entry.js} +1 -1
  496. package/dist/vega/p-0b2c4c0b.js +1 -0
  497. package/dist/vega/{p-c2277448.entry.js → p-0ca3b4bf.entry.js} +1 -1
  498. package/dist/vega/{p-363ee8a5.entry.js → p-1a37d63c.entry.js} +1 -1
  499. package/dist/vega/{p-b622c455.js → p-1fa22fda.js} +1 -1
  500. package/dist/vega/{p-d609c3fd.js → p-2044eba9.js} +1 -1
  501. package/dist/vega/{p-e1029acc.js → p-22edd3cc.js} +1 -1
  502. package/dist/vega/{p-5f96e741.entry.js → p-23c1f378.entry.js} +1 -1
  503. package/dist/vega/{p-6c95a6a3.js → p-2529820e.js} +1 -1
  504. package/dist/vega/{p-8d96f0e8.entry.js → p-2af1d8b8.entry.js} +1 -1
  505. package/dist/vega/{p-4c3a08be.entry.js → p-2f89ee14.entry.js} +1 -1
  506. package/dist/vega/{p-2bb5a232.js → p-3091b105.js} +1 -1
  507. package/dist/vega/{p-3af5e87b.entry.js → p-328ebbdb.entry.js} +1 -1
  508. package/dist/vega/p-35628af4.js +1 -0
  509. package/dist/vega/{p-9abf7d0a.entry.js → p-35d37477.entry.js} +1 -1
  510. package/dist/vega/{p-26760c66.entry.js → p-3a230d4b.entry.js} +1 -1
  511. package/dist/vega/{p-040ea356.entry.js → p-3c152bad.entry.js} +1 -1
  512. package/dist/vega/p-3c559c8b.js +1 -0
  513. package/dist/vega/{p-e3fdb65c.entry.js → p-3c8421d5.entry.js} +1 -1
  514. package/dist/vega/{p-b594a11c.entry.js → p-4022412e.entry.js} +1 -1
  515. package/dist/vega/{p-046203cb.entry.js → p-433b1395.entry.js} +1 -1
  516. package/dist/vega/{p-b98ead05.entry.js → p-4370b954.entry.js} +1 -1
  517. package/dist/vega/p-444e24c6.js +1 -0
  518. package/dist/vega/p-4473d8b1.js +3 -0
  519. package/dist/vega/{p-a484e32d.entry.js → p-44999c88.entry.js} +1 -1
  520. package/dist/vega/{p-f29ea345.entry.js → p-47a48329.entry.js} +1 -1
  521. package/dist/vega/{p-0cf3b5c1.entry.js → p-49d7cfed.entry.js} +1 -1
  522. package/dist/vega/p-4a2fe3a4.js +1 -0
  523. package/dist/vega/{p-92528dc9.entry.js → p-4afd6715.entry.js} +1 -1
  524. package/dist/vega/{p-461100b8.entry.js → p-4f6aaac5.entry.js} +1 -1
  525. package/dist/vega/p-50eda925.js +1 -0
  526. package/dist/vega/{p-ae2abdfa.js → p-5110c84f.js} +1 -1
  527. package/dist/vega/{p-deaf037a.entry.js → p-5147c30d.entry.js} +1 -1
  528. package/dist/vega/{p-874e5624.js → p-52878ea9.js} +1 -1
  529. package/dist/vega/{p-b00ec194.entry.js → p-55dc3053.entry.js} +1 -1
  530. package/dist/vega/p-5af312f8.js +1 -0
  531. package/dist/vega/{p-3e09aeed.js → p-5b3c8a56.js} +1 -1
  532. package/dist/vega/{p-2acf9b42.entry.js → p-5e9e04f3.entry.js} +1 -1
  533. package/dist/vega/p-5f377954.js +1 -1
  534. package/dist/vega/p-6493f13a.entry.js +1 -0
  535. package/dist/vega/{p-8611465f.entry.js → p-6659c910.entry.js} +1 -1
  536. package/dist/vega/{p-9c4c474e.entry.js → p-66728dd4.entry.js} +1 -1
  537. package/dist/vega/{p-21f608e8.entry.js → p-66a785d0.entry.js} +1 -1
  538. package/dist/vega/{p-0499e65a.entry.js → p-66fe8b4e.entry.js} +1 -1
  539. package/dist/vega/p-67e88cd7.entry.js +1 -0
  540. package/dist/vega/p-67eaf77e.js +1 -0
  541. package/dist/vega/{p-456f678b.js → p-691bdc20.js} +1 -1
  542. package/dist/vega/{p-1132a74e.entry.js → p-6d6b4495.entry.js} +1 -1
  543. package/dist/vega/p-6db1b9ac.js +1 -0
  544. package/dist/vega/p-7754b10f.entry.js +1 -0
  545. package/dist/vega/{p-d2cbcf5e.entry.js → p-77fb3971.entry.js} +1 -1
  546. package/dist/vega/{p-e7e963ba.entry.js → p-7977352b.entry.js} +1 -1
  547. package/dist/vega/{p-a91927eb.entry.js → p-7b133734.entry.js} +1 -1
  548. package/dist/vega/p-7b84a943.entry.js +1 -0
  549. package/dist/vega/{p-a2bd621e.js → p-83ad8988.js} +1 -1
  550. package/dist/vega/{p-2eb8e167.entry.js → p-840444c9.entry.js} +1 -1
  551. package/dist/vega/{p-703ac992.entry.js → p-860e76f5.entry.js} +1 -1
  552. package/dist/vega/p-867cc602.entry.js +1 -0
  553. package/dist/vega/p-8d2a9012.js +1 -0
  554. package/dist/vega/{p-5e37b041.js → p-8d4be607.js} +1 -1
  555. package/dist/vega/p-8d77c7cf.js +1 -0
  556. package/dist/vega/{p-c29934ef.js → p-8f3b93db.js} +1 -1
  557. package/dist/vega/{p-56417ec5.entry.js → p-944e284d.entry.js} +1 -1
  558. package/dist/vega/{p-0809c651.js → p-94b54a95.js} +1 -1
  559. package/dist/vega/p-9c2b3279.js +1 -0
  560. package/dist/vega/{p-aeb50cad.entry.js → p-9c5289dc.entry.js} +1 -1
  561. package/dist/vega/{p-d25c1a48.js → p-9c9b0629.js} +1 -1
  562. package/dist/vega/{p-abbceebf.entry.js → p-9c9ff871.entry.js} +1 -1
  563. package/dist/vega/{p-a034dfc0.entry.js → p-9d90e271.entry.js} +1 -1
  564. package/dist/vega/{p-d319ebb5.js → p-9e9f49f4.js} +1 -1
  565. package/dist/vega/{p-dcd3e3a7.js → p-a1f220ca.js} +1 -1
  566. package/dist/vega/{p-3488a3f1.entry.js → p-a4360b7e.entry.js} +1 -1
  567. package/dist/vega/{p-2540fd1c.entry.js → p-a7517760.entry.js} +1 -1
  568. package/dist/vega/{p-8ed3b2b6.entry.js → p-aa433430.entry.js} +1 -1
  569. package/dist/vega/{p-c3646101.entry.js → p-aa914dbd.entry.js} +1 -1
  570. package/dist/vega/{p-72ab5cd5.entry.js → p-b12de1bf.entry.js} +1 -1
  571. package/dist/vega/p-b21cc390.entry.js +1 -0
  572. package/dist/vega/{p-dbb4b1d1.js → p-b3c4943b.js} +1 -1
  573. package/dist/vega/{p-98fc5821.entry.js → p-ba6881da.entry.js} +1 -1
  574. package/dist/vega/p-bd7725f7.entry.js +1 -0
  575. package/dist/vega/{p-dad7d2ac.js → p-c348eaf5.js} +1 -1
  576. package/dist/vega/{p-29e3eb12.js → p-c41a2d4a.js} +1 -1
  577. package/dist/vega/{p-ccbe3f1b.entry.js → p-c8ad7207.entry.js} +1 -1
  578. package/dist/vega/{p-b3733762.entry.js → p-c8fb3aac.entry.js} +1 -1
  579. package/dist/vega/p-cc569b54.js +1 -0
  580. package/dist/vega/{p-53fd3c41.entry.js → p-ccbed811.entry.js} +1 -1
  581. package/dist/vega/{p-8ff92914.entry.js → p-ce82d6bb.entry.js} +1 -1
  582. package/dist/vega/{p-f1078e63.js → p-cede3535.js} +1 -1
  583. package/dist/vega/{p-775ecfad.entry.js → p-cf4b3d40.entry.js} +1 -1
  584. package/dist/vega/p-d35a31a5.entry.js +1 -0
  585. package/dist/vega/{p-ac94ba1b.entry.js → p-d4d90ce2.entry.js} +1 -1
  586. package/dist/vega/{p-f5095035.entry.js → p-d6023dc0.entry.js} +1 -1
  587. package/dist/vega/{p-a8174ad8.entry.js → p-d62e618a.entry.js} +1 -1
  588. package/dist/vega/{p-3f183b52.js → p-daba4af1.js} +1 -1
  589. package/dist/vega/{p-1ea9ad9a.js → p-dd0bd78b.js} +1 -1
  590. package/dist/vega/{p-36d2df7a.entry.js → p-ded1ecc1.entry.js} +1 -1
  591. package/dist/vega/p-df63c2fb.entry.js +1 -0
  592. package/dist/vega/{p-d3413a78.entry.js → p-e1a65e06.entry.js} +1 -1
  593. package/dist/vega/{p-39c5054b.js → p-e1c82ca9.js} +1 -1
  594. package/dist/vega/{p-6b76b572.entry.js → p-e469ba27.entry.js} +1 -1
  595. package/dist/vega/{p-e9d09211.js → p-e4c5cb4f.js} +1 -1
  596. package/dist/vega/{p-ec64cc59.entry.js → p-f0a0fc77.entry.js} +1 -1
  597. package/dist/vega/{p-12e8a1b2.js → p-f13b39d8.js} +1 -1
  598. package/dist/vega/{p-21626b93.entry.js → p-f2384411.entry.js} +1 -1
  599. package/dist/vega/{p-09524fec.js → p-f9a3805d.js} +1 -1
  600. package/dist/vega/{p-1e0a8fd3.js → p-fa5cd8b1.js} +1 -1
  601. package/dist/vega/{p-56d19601.entry.js → p-fb9475ab.entry.js} +1 -1
  602. package/dist/vega/{p-2c2e8615.js → p-fcb6b499.js} +1 -1
  603. package/dist/vega/vega.esm.js +1 -1
  604. package/package.json +1 -1
  605. package/dist/collection/components/vega-rich-text-editor/extensions/paste/paste-constants.js +0 -6
  606. package/dist/types/components/vega-rich-text-editor/extensions/paste/paste-constants.d.ts +0 -6
  607. package/dist/vega/p-10d43a80.entry.js +0 -1
  608. package/dist/vega/p-1250b1ab.entry.js +0 -1
  609. package/dist/vega/p-1d5e05d9.js +0 -3
  610. package/dist/vega/p-2bb60f89.js +0 -1
  611. package/dist/vega/p-2d158cbd.js +0 -1
  612. package/dist/vega/p-2d7388c9.entry.js +0 -1
  613. package/dist/vega/p-2ff4ae1c.js +0 -1
  614. package/dist/vega/p-3980dfa8.entry.js +0 -1
  615. package/dist/vega/p-3a68b729.js +0 -1
  616. package/dist/vega/p-781b7a54.js +0 -1
  617. package/dist/vega/p-81d4dfcb.entry.js +0 -1
  618. package/dist/vega/p-88a6c89a.js +0 -1
  619. package/dist/vega/p-8e7932bc.js +0 -1
  620. package/dist/vega/p-9664e914.entry.js +0 -1
  621. package/dist/vega/p-9be02fa5.js +0 -1
  622. package/dist/vega/p-ca270da3.entry.js +0 -1
  623. package/dist/vega/p-cd69aeae.js +0 -1
  624. package/dist/vega/p-de8f0d98.js +0 -1
  625. package/dist/vega/p-e9b005df.js +0 -1
  626. package/dist/vega/p-f0e828d8.js +0 -1
  627. package/dist/vega/p-f95d8d10.entry.js +0 -1
  628. package/dist/vega/p-fa65956c.entry.js +0 -1
@@ -0,0 +1,295 @@
1
+ import { generateUUID } from '../../../../../utils/misc';
2
+ /**
3
+ * Extracts pasted image files from clipboard payloads and swaps matching
4
+ * `<img>` elements to local object-URL previews.
5
+ *
6
+ * The parser is stateless: callers own the returned {@link PasteImagePreview}
7
+ * list and decide how to track pending uploads.
8
+ */
9
+ export class PasteImageParser {
10
+ /**
11
+ * Parses local `file://` images from the HTML, swaps matching `<img>`
12
+ * elements to object-URL previews, and returns the rewritten HTML alongside
13
+ * the resolved pending previews.
14
+ *
15
+ * When no local images are resolved, the original HTML is returned unchanged
16
+ * with an empty preview list.
17
+ *
18
+ * @param {string} html HTML content to parse.
19
+ * @param {ClipboardFileContent | null} clipboardFileContent Clipboard payload for image extraction.
20
+ * @returns {ParseLocalImagesResult} Rewritten HTML and resolved previews.
21
+ */
22
+ parseLocalImages(html, clipboardFileContent) {
23
+ if (!html.includes('<img')) {
24
+ return { html, previews: [] };
25
+ }
26
+ const safeHtml = html.replace(/\s+style=/g, ' data-style=');
27
+ const parser = new DOMParser();
28
+ const parsedDoc = parser.parseFromString(safeHtml, 'text/html');
29
+ const localImageElements = Array.from(parsedDoc.querySelectorAll('img')).filter((img) => img.src.startsWith('file://'));
30
+ if (localImageElements.length === 0) {
31
+ return { html, previews: [] };
32
+ }
33
+ const imageFiles = this.extractImageFiles(clipboardFileContent, localImageElements);
34
+ if (imageFiles.length === 0) {
35
+ return { html, previews: [] };
36
+ }
37
+ const previews = this.createImagePreviews(localImageElements, imageFiles);
38
+ const rewrittenHtml = parsedDoc.body.innerHTML.replace(/ data-style=/g, ' style=');
39
+ return { html: rewrittenHtml, previews };
40
+ }
41
+ /**
42
+ * Swaps each `<img>` src to a local object-URL preview using the provided
43
+ * image files (paired by order), returning one preview per resolved image.
44
+ *
45
+ * Images that live inside a list are dropped instead of being previewed: the
46
+ * RTE does not support list images. They are removed here (after holding their
47
+ * position while the RTF images are paired by order) so the remaining images
48
+ * stay aligned with their files even when a list image is not the last one.
49
+ *
50
+ * @param {HTMLImageElement[]} images Placeholder `<img>` elements in document order.
51
+ * @param {File[]} files Image files to pair with the elements, in the same order.
52
+ * @returns {PasteImagePreview[]} Previews for the images that were resolved to a file.
53
+ */
54
+ createImagePreviews(images, files) {
55
+ const previews = [];
56
+ images.forEach((imageElement, index) => {
57
+ // List images have no editor representation, so drop them here instead of
58
+ // creating a preview. Removing them at this stage (rather than earlier)
59
+ // keeps the remaining images aligned with their files.
60
+ if (this.isListImage(imageElement)) {
61
+ imageElement.remove();
62
+ return;
63
+ }
64
+ const file = files[index];
65
+ if (!file) {
66
+ return;
67
+ }
68
+ const objectUrl = URL.createObjectURL(file);
69
+ imageElement.setAttribute('src', objectUrl);
70
+ const imageId = generateUUID();
71
+ imageElement.setAttribute(PasteImageParser.PREVIEW_IMG_KEY, imageId);
72
+ previews.push({ id: imageId, file, objectUrl });
73
+ });
74
+ return previews;
75
+ }
76
+ /**
77
+ * Extracts image files from clipboard data, preferring Word RTF-decoded
78
+ * images and falling back to the clipboard file list when RTF yields none.
79
+ *
80
+ * @param {ClipboardFileContent | null} clipboardFileContent Clipboard payload from a paste event.
81
+ * @param {HTMLElement[]} images `<img>` elements the files will be paired with.
82
+ * @returns {File[]} Image files found on the clipboard.
83
+ */
84
+ extractImageFiles(clipboardFileContent, images) {
85
+ let result = [];
86
+ if (clipboardFileContent) {
87
+ if (clipboardFileContent.rtf) {
88
+ result = this.safeExtractWordImages(clipboardFileContent.rtf, images);
89
+ }
90
+ if (result.length === 0 && clipboardFileContent.files) {
91
+ result = clipboardFileContent.files.filter((file) => file.type.startsWith('image/'));
92
+ }
93
+ }
94
+ return result;
95
+ }
96
+ /**
97
+ * Safely extracts image files from Word RTF clipboard data.
98
+ *
99
+ * @param {string} rtf Clipboard payload from a paste event.
100
+ * @param {HTMLElement[]} images Array of `<img>` elements that may be updated with staged previews.
101
+ * @returns {File[]} Image files found in the clipboard data.
102
+ */
103
+ safeExtractWordImages(rtf, images) {
104
+ // Word defines a list's picture bullet once in the list table
105
+ // (`{\*\listpicture ...}`) with no rendered counterpart. Drop that
106
+ // definition so its blip is not counted as a content image; the per-item
107
+ // `{\listtext ...}` bullet blips are kept because each still pairs with a
108
+ // preserved bullet placeholder `<img>`.
109
+ const contentRtf = this.stripListPictureDefinitions(rtf);
110
+ const fileObjects = [];
111
+ const imageRegex = /\\pngblip|\\jpegblip/g;
112
+ const matches = [...contentRtf.matchAll(imageRegex)];
113
+ matches.forEach((match, index) => {
114
+ if (index >= images.length || match.index === undefined) {
115
+ return;
116
+ }
117
+ const mimeType = match[0].includes('png') ? 'image/png' : 'image/jpeg';
118
+ const startIndex = match.index + match[0].length;
119
+ const bytes = this.extractImageBytes(contentRtf, startIndex);
120
+ if (bytes.length === 0) {
121
+ return;
122
+ }
123
+ const extension = mimeType.split('/')[1];
124
+ const file = new File(
125
+ // eslint-disable-next-line spellcheck/spell-checker
126
+ [new Uint8Array(bytes)], `word_img_${Date.now()}_${index}.${extension}`, { type: mimeType });
127
+ fileObjects.push(file);
128
+ });
129
+ return fileObjects;
130
+ }
131
+ /**
132
+ * Removes Word list-table picture-bullet definitions from the RTF so they are
133
+ * not counted as content images.
134
+ *
135
+ * Word declares a list's picture bullet once as a `{\*\listpicture ...}`
136
+ * destination inside the list table. It renders nothing on its own, so its
137
+ * blip has no matching content `<img>`; leaving it in shifts the ordinal
138
+ * pairing and makes the first real image resolve to the bullet. The per-item
139
+ * `{\listtext ...}` bullets are intentionally left untouched because each is
140
+ * kept as a placeholder `<img>` that consumes its blip downstream.
141
+ *
142
+ * @param {string} rtf Full RTF clipboard payload.
143
+ * @returns {string} RTF with list-table picture-bullet definitions removed.
144
+ */
145
+ stripListPictureDefinitions(rtf) {
146
+ // eslint-disable-next-line spellcheck/spell-checker
147
+ return this.removeBalancedGroups(rtf, '{\\*\\listpicture');
148
+ }
149
+ /**
150
+ * Removes every balanced-brace RTF group that starts with the given marker.
151
+ *
152
+ * @param {string} rtf RTF payload to scan.
153
+ * @param {string} marker Opening delimiter of the group to remove (including its `{`).
154
+ * @returns {string} RTF with the matching groups removed.
155
+ */
156
+ removeBalancedGroups(rtf, marker) {
157
+ let index = rtf.indexOf(marker);
158
+ while (index !== -1) {
159
+ const end = this.findGroupEnd(rtf, index);
160
+ rtf = rtf.slice(0, index) + rtf.slice(end);
161
+ index = rtf.indexOf(marker, index);
162
+ }
163
+ return rtf;
164
+ }
165
+ /**
166
+ * Finds the index just past the brace that closes the group opened at `start`.
167
+ *
168
+ * A backslash escapes the next character (such as `\{` or `\}`) so escaped
169
+ * braces are not counted. When the group is unbalanced the RTF length is
170
+ * returned so the trailing remainder is dropped.
171
+ *
172
+ * @param {string} rtf RTF payload to scan.
173
+ * @param {number} start Index of the group's opening `{`.
174
+ * @returns {number} Index immediately after the matching closing `}`.
175
+ */
176
+ findGroupEnd(rtf, start) {
177
+ const length = rtf.length;
178
+ let depth = 0;
179
+ let position = start;
180
+ while (position < length) {
181
+ const char = rtf[position];
182
+ if (char === '\\') {
183
+ position += 2;
184
+ continue;
185
+ }
186
+ if (char === '{') {
187
+ depth++;
188
+ }
189
+ else if (char === '}') {
190
+ depth--;
191
+ if (depth === 0) {
192
+ return position + 1;
193
+ }
194
+ }
195
+ position++;
196
+ }
197
+ return length;
198
+ }
199
+ /**
200
+ * Extracts the raw image bytes that follow a Word RTF blip marker.
201
+ *
202
+ * Starting just after the blip control word, RTF control words (such as
203
+ * `\bliptag`) and nested groups (such as `{\*\blipuid ...}`) are skipped so
204
+ * their hex is not mistaken for image data. Hex digits are decoded into bytes
205
+ * until the enclosing `{\pict}` group is closed.
206
+ *
207
+ * @param {string} rtf Full RTF clipboard payload.
208
+ * @param {number} startIndex Index immediately after the blip marker.
209
+ * @returns {number[]} Decoded image byte values.
210
+ */
211
+ extractImageBytes(rtf, startIndex) {
212
+ const length = rtf.length;
213
+ const bytes = [];
214
+ let depth = 0;
215
+ let highNibble = -1;
216
+ let position = startIndex;
217
+ while (position < length) {
218
+ const char = rtf[position];
219
+ if (char === '{') {
220
+ depth++;
221
+ position++;
222
+ continue;
223
+ }
224
+ if (char === '}') {
225
+ if (depth === 0) {
226
+ break;
227
+ }
228
+ depth--;
229
+ position++;
230
+ continue;
231
+ }
232
+ if (depth > 0) {
233
+ position++;
234
+ continue;
235
+ }
236
+ if (char === '\\') {
237
+ position++;
238
+ while (position < length && /[a-zA-Z]/.test(rtf[position])) {
239
+ position++;
240
+ }
241
+ if (position < length && rtf[position] === '-') {
242
+ position++;
243
+ }
244
+ while (position < length && /[0-9]/.test(rtf[position])) {
245
+ position++;
246
+ }
247
+ continue;
248
+ }
249
+ const nibble = this.hexNibble(char);
250
+ if (nibble >= 0) {
251
+ if (highNibble < 0) {
252
+ highNibble = nibble;
253
+ }
254
+ else {
255
+ bytes.push((highNibble << 4) | nibble);
256
+ highNibble = -1;
257
+ }
258
+ }
259
+ position++;
260
+ }
261
+ return bytes;
262
+ }
263
+ /**
264
+ * Converts a single hex character to its numeric value.
265
+ *
266
+ * @param {string} char Candidate hex character.
267
+ * @returns {number} Value in `[0, 15]`, or `-1` when not a hex digit.
268
+ */
269
+ hexNibble(char) {
270
+ if (char >= '0' && char <= '9') {
271
+ return char.charCodeAt(0) - 48;
272
+ }
273
+ if (char >= 'a' && char <= 'f') {
274
+ return char.charCodeAt(0) - 87;
275
+ }
276
+ if (char >= 'A' && char <= 'F') {
277
+ return char.charCodeAt(0) - 55;
278
+ }
279
+ return -1;
280
+ }
281
+ /**
282
+ * Returns whether an `<img>` element is nested inside list content.
283
+ *
284
+ * The Word paste sanitizer strips non-allowlisted attributes but keeps the
285
+ * `ul`/`ol`/`li` structure, so list membership is detected by DOM ancestry
286
+ * here rather than by a marker attribute set upstream.
287
+ *
288
+ * @param {HTMLImageElement} imageElement Image element to test.
289
+ * @returns {boolean} Whether the image is part of list content.
290
+ */
291
+ isListImage(imageElement) {
292
+ return Boolean(imageElement.closest('li,ul,ol'));
293
+ }
294
+ }
295
+ PasteImageParser.PREVIEW_IMG_KEY = 'data-rte-id';
@@ -0,0 +1,116 @@
1
+ import { ImageReplaceSrcAction } from '../actions/image-replace-src-action';
2
+ /**
3
+ * Owns the lifecycle of pasted images awaiting upload: it tracks their local
4
+ * object-URL previews, notifies the consumer once they are inserted, applies the
5
+ * uploaded URL back onto the live preview, and revokes object URLs on teardown.
6
+ *
7
+ * Keeping this state here rather than on the paste extension keeps the extension
8
+ * focused on clipboard capture and the chooser UI.
9
+ */
10
+ export class PendingImageRegistry {
11
+ constructor() {
12
+ /** Ids of pending images still holding an object URL owned by this registry. */
13
+ this.ownedImageIds = new Set();
14
+ /** Ids queued for the next {@link notifyInserted} call. */
15
+ this.pendingNotifyImageIds = [];
16
+ }
17
+ /**
18
+ * Registers freshly created previews so they can be notified and later
19
+ * resolved to their uploaded URLs.
20
+ *
21
+ * @param {PasteImagePreview[]} previews Previews produced for the current paste.
22
+ */
23
+ register(previews) {
24
+ this.pendingNotifyImageIds = [];
25
+ previews.forEach((preview) => {
26
+ this.pendingNotifyImageIds.push(preview.id);
27
+ this.ownedImageIds.add(preview.id);
28
+ PendingImageRegistry.pendingImages.set(preview.id, preview);
29
+ });
30
+ }
31
+ /**
32
+ * @returns {boolean} Whether previews are queued for notification.
33
+ */
34
+ hasPendingNotifications() {
35
+ return this.pendingNotifyImageIds.length > 0;
36
+ }
37
+ /**
38
+ * Notifies the consumer about newly inserted pasted images so they can upload
39
+ * them and fill in the real URLs via the supplied `replaceUrl` callback.
40
+ *
41
+ * @param {ImageInsertedCallback | undefined} callback Consumer callback to invoke.
42
+ * @param {GetEditableElement} getEditableElement Resolves the live editable element.
43
+ * @param {ResolveImageNode} resolveImageNode Resolves the DTO node for a preview element.
44
+ */
45
+ notifyInserted(callback, getEditableElement, resolveImageNode) {
46
+ const images = this.pendingNotifyImageIds
47
+ .map((id) => PendingImageRegistry.pendingImages.get(id))
48
+ .filter((preview) => !!preview);
49
+ this.pendingNotifyImageIds = [];
50
+ if (images.length && typeof callback === 'function') {
51
+ // Mark as handed to the consumer so teardown keeps them for a later replaceUrl.
52
+ images.forEach((image) => (image.notified = true));
53
+ const pasteImages = images.map((image) => ({
54
+ id: image.id,
55
+ file: image.file,
56
+ }));
57
+ callback(pasteImages, (imageId, url) => this.replaceUrl(imageId, url, getEditableElement, resolveImageNode));
58
+ }
59
+ }
60
+ /**
61
+ * Revokes and forgets only previews that were never handed to a consumer for
62
+ * upload. Previews already notified via {@link notifyInserted} are left intact
63
+ * so an async {@link replaceUrl} can still resolve them after the extension is
64
+ * recreated; that callback owns their teardown.
65
+ */
66
+ discardUnsentPreviews() {
67
+ this.ownedImageIds.forEach((imageId) => {
68
+ const pending = PendingImageRegistry.pendingImages.get(imageId);
69
+ if (pending && pending.notified) {
70
+ return;
71
+ }
72
+ if (pending && pending.objectUrl.startsWith('blob:')) {
73
+ URL.revokeObjectURL(pending.objectUrl);
74
+ }
75
+ PendingImageRegistry.pendingImages.delete(imageId);
76
+ this.ownedImageIds.delete(imageId);
77
+ });
78
+ this.pendingNotifyImageIds = [];
79
+ }
80
+ /**
81
+ * Applies the uploaded URL for a pending pasted image, replacing its local
82
+ * preview `src` and revoking the object URL.
83
+ *
84
+ * @param {string} imageId Pending image id supplied to the consumer callback.
85
+ * @param {string} url Uploaded image URL to apply.
86
+ * @param {GetEditableElement} getEditableElement Resolves the live editable element.
87
+ * @param {ResolveImageNode} resolveImageNode Resolves the DTO node for a preview element.
88
+ */
89
+ replaceUrl(imageId, url, getEditableElement, resolveImageNode) {
90
+ var _a;
91
+ const editableEl = getEditableElement();
92
+ if (editableEl) {
93
+ const imageElement = (_a = editableEl.querySelector(`img[data-rte-id="${imageId}"]`)) !== null && _a !== void 0 ? _a : null;
94
+ if (imageElement) {
95
+ const imageNode = resolveImageNode(imageElement);
96
+ imageNode && imageNode.apply(new ImageReplaceSrcAction(imageElement, url));
97
+ }
98
+ }
99
+ const pending = PendingImageRegistry.pendingImages.get(imageId);
100
+ if (pending) {
101
+ if (pending.objectUrl.startsWith('blob:')) {
102
+ URL.revokeObjectURL(pending.objectUrl);
103
+ }
104
+ PendingImageRegistry.pendingImages.delete(imageId);
105
+ this.ownedImageIds.delete(imageId);
106
+ }
107
+ }
108
+ }
109
+ /**
110
+ * Pasted images awaiting upload, keyed by their {@link VegaRTEPasteImage.id}.
111
+ *
112
+ * Shared statically across instances so previews survive a paste-extension
113
+ * re-instantiation: the consumer may resolve `replaceUrl` after the editor
114
+ * has re-mounted and created a new extension/registry instance.
115
+ */
116
+ PendingImageRegistry.pendingImages = new Map();
@@ -1,13 +1,15 @@
1
1
  import { VegaInternalIconManager } from '../../../../helpers/icon/internal-icon-manager';
2
2
  import { VegaInternalTranslation } from '../../../../helpers/translation/internal-translation-controller';
3
+ import { RTEPasteMode } from './strategies/paste-processing-strategy.abstract';
3
4
  import paste from './assets/paste';
4
5
  /**
5
6
  * Renders and manages the paste format chooser UI.
6
7
  */
7
8
  export class RTEPasteChooserUI {
8
- constructor(hostRoot, callbacks) {
9
+ constructor(hostRoot, callbacks, options = {}) {
9
10
  this.hostRoot = hostRoot;
10
11
  this.callbacks = callbacks;
12
+ this.options = options;
11
13
  this.chooserEl = null;
12
14
  this.dropdownEl = null;
13
15
  this.triggerButtonEl = null;
@@ -108,11 +110,17 @@ export class RTEPasteChooserUI {
108
110
  dropdownEl.append(tooltipEl);
109
111
  const itemsContainer = doc.createElement('div');
110
112
  itemsContainer.setAttribute('slot', 'items');
111
- itemsContainer.append(this.createDropdownItem(doc, 'rich', VegaInternalTranslation.t('Use rich text'), RTEPasteChooserUI.CHOOSER_RICH_ATTR));
113
+ const dropdownItems = [
114
+ this.createDropdownItem(doc, RTEPasteMode.RICH, VegaInternalTranslation.t('Use rich text'), RTEPasteChooserUI.CHOOSER_RICH_ATTR),
115
+ ];
116
+ if (this.options.showWordOption) {
117
+ dropdownItems.push(this.createDropdownItem(doc, RTEPasteMode.WORD, VegaInternalTranslation.t('Use Word'), RTEPasteChooserUI.CHOOSER_WORD_ATTR));
118
+ }
119
+ itemsContainer.append(...dropdownItems);
112
120
  dropdownEl.append(itemsContainer);
113
121
  dropdownEl.addEventListener('vegaDropdownClick', (event) => {
114
122
  const mode = event.detail;
115
- if (mode === 'rich') {
123
+ if (mode === RTEPasteMode.RICH || mode === RTEPasteMode.WORD) {
116
124
  this.callbacks.onModeSelect(mode);
117
125
  }
118
126
  });
@@ -122,7 +130,7 @@ export class RTEPasteChooserUI {
122
130
  * Creates a single dropdown item element for a paste mode.
123
131
  *
124
132
  * @param {Document} doc Document used to create the element.
125
- * @param {PasteMode} key Paste mode key for the item.
133
+ * @param {RTEPasteMode} key Paste mode key for the item.
126
134
  * @param {string} label Display label for the item.
127
135
  * @param {string} dataAttrName Data attribute marker for the item.
128
136
  * @returns {HTMLVegaDropdownItemElement} Configured dropdown item element.
@@ -142,4 +150,5 @@ export class RTEPasteChooserUI {
142
150
  })();
143
151
  RTEPasteChooserUI.CHOOSER_ATTR = 'data-rte-paste-chooser';
144
152
  RTEPasteChooserUI.CHOOSER_RICH_ATTR = 'data-rte-paste-type-rich';
153
+ RTEPasteChooserUI.CHOOSER_WORD_ATTR = 'data-rte-paste-type-word';
145
154
  RTEPasteChooserUI.CHOOSER_TRIGGER_ATTR = 'data-rte-paste-trigger';
@@ -1,19 +1,32 @@
1
1
  import { VegaRTEExtension } from '../extension.abstract';
2
2
  import { RTEPasteChooserUI } from './paste-chooser-ui';
3
- import { RTE_PASTE_MODE_DATA_TYPE } from './paste-constants';
3
+ import { RTE_PASTE_MODE_DATA_TYPE } from '../../constants/constant';
4
+ import { PasteStrategySelector } from './strategies/paste-strategy-selector';
5
+ import { RTEPasteMode, } from './strategies/paste-processing-strategy.abstract';
6
+ import { PasteImageParser } from './parse-local-images-helper/paste-image-parser';
7
+ import { RTEImageNode } from '../../dto/nodes/image-node';
8
+ import { REPLACE_IMAGE_SRC } from './actions/image-replace-src-action';
9
+ import { ImageReplaceSrcStrategy } from './action-handler-strategies/image-replace-src-strategy';
10
+ import { PendingImageRegistry } from './parse-local-images-helper/pending-image-registry';
4
11
  /**
5
12
  * Vega Rich Text Editor paste extension.
6
13
  * Intercepts keyboard paste and allows users to choose paste mode.
7
14
  */
8
15
  export class VegaRTEPasteExtension extends VegaRTEExtension {
9
- constructor() {
10
- super(...arguments);
16
+ constructor(options = {}) {
17
+ super();
11
18
  this.editableEl = null;
12
19
  this.contentHostEl = null;
13
20
  this.chooserUI = null;
14
21
  this.pendingPastePayload = null;
15
22
  this.listenerDocument = null;
16
23
  this.listenerWindow = null;
24
+ this.options = {};
25
+ this.strategySelector = new PasteStrategySelector();
26
+ this.clipboardFileContent = null;
27
+ this.imageParser = new PasteImageParser();
28
+ /** Owns pending pasted-image previews awaiting upload and their URL replacement. */
29
+ this.pendingImageRegistry = new PendingImageRegistry();
17
30
  /**
18
31
  * Handles a native paste event by capturing the clipboard payload and
19
32
  * rendering the paste-mode chooser.
@@ -29,6 +42,9 @@ export class VegaRTEPasteExtension extends VegaRTEExtension {
29
42
  // HTML is sanitized via DOMParser and ElementToDtoStrategyProcessor pipeline
30
43
  const html = clipboardData.getData('text/html') || '';
31
44
  const text = clipboardData.getData('text/plain') || '';
45
+ // RTF must be read synchronously here: the paste event's DataTransfer is only
46
+ // readable during event dispatch, so reading it later (after the chooser) returns ''.
47
+ const rtf = clipboardData.getData('text/rtf') || '';
32
48
  if (!html && !text) {
33
49
  // Empty clipboard paste should not mutate editor content.
34
50
  event.preventDefault();
@@ -40,6 +56,10 @@ export class VegaRTEPasteExtension extends VegaRTEExtension {
40
56
  const range = this.cloneCurrentSelectionRange();
41
57
  const selectedNodes = ((_b = (_a = this.extensionContext) === null || _a === void 0 ? void 0 : _a.getSelectedNodes) === null || _b === void 0 ? void 0 : _b.call(_a)) || [];
42
58
  this.pendingPastePayload = { html, text, range, selectedNodes: [...selectedNodes] };
59
+ this.clipboardFileContent = {
60
+ files: clipboardData.files ? Array.from(clipboardData.files) : [],
61
+ rtf,
62
+ };
43
63
  this.renderPasteChooser(event);
44
64
  };
45
65
  /**
@@ -73,6 +93,7 @@ export class VegaRTEPasteExtension extends VegaRTEExtension {
73
93
  this.handleOutsideScroll = () => {
74
94
  this.clearPasteChooser();
75
95
  };
96
+ this.options = options;
76
97
  }
77
98
  /** @inheritDoc */
78
99
  initialExtensionAfterLoad(context) {
@@ -84,6 +105,7 @@ export class VegaRTEPasteExtension extends VegaRTEExtension {
84
105
  destroyExtension() {
85
106
  this.detachPasteListener();
86
107
  this.clearPasteChooser();
108
+ this.pendingImageRegistry.discardUnsentPreviews();
87
109
  }
88
110
  /**
89
111
  * Attaches the paste listener to the editable element.
@@ -146,7 +168,7 @@ export class VegaRTEPasteExtension extends VegaRTEExtension {
146
168
  * @param {ClipboardEvent} pasteEvent Originating paste event used for positioning.
147
169
  */
148
170
  renderPasteChooser(pasteEvent) {
149
- var _a, _b;
171
+ var _a, _b, _c;
150
172
  const hostRoot = (_b = (_a = this.hostEl) === null || _a === void 0 ? void 0 : _a.shadowRoot) !== null && _b !== void 0 ? _b : null;
151
173
  if (!hostRoot) {
152
174
  return;
@@ -158,6 +180,8 @@ export class VegaRTEPasteExtension extends VegaRTEExtension {
158
180
  onModeSelect: (mode) => {
159
181
  this.applyPasteMode(mode);
160
182
  },
183
+ }, {
184
+ showWordOption: ((_c = this.options) === null || _c === void 0 ? void 0 : _c.enableWordPaste) === true,
161
185
  });
162
186
  this.chooserUI.open(position);
163
187
  this.listenerDocument = this.hostEl.ownerDocument;
@@ -287,7 +311,10 @@ export class VegaRTEPasteExtension extends VegaRTEExtension {
287
311
  /**
288
312
  * Applies the chosen paste mode by dispatching a synthetic paste input event.
289
313
  *
290
- * @param {PasteMode} mode Selected paste mode.
314
+ * `rich` keeps auto-detection enabled; any other explicit mode forces the
315
+ * corresponding registered strategy.
316
+ *
317
+ * @param {RTEPasteMode} mode Selected paste mode.
291
318
  */
292
319
  applyPasteMode(mode) {
293
320
  var _a;
@@ -303,9 +330,42 @@ export class VegaRTEPasteExtension extends VegaRTEExtension {
303
330
  editableEl.focus();
304
331
  this.restoreSelectionRange(this.pendingPastePayload.range);
305
332
  this.restoreSelectionControllerState(this.pendingPastePayload);
306
- const dataTransfer = this.createDataTransfer(this.pendingPastePayload.html, this.pendingPastePayload.text, mode);
333
+ const strategy = mode === RTEPasteMode.RICH
334
+ ? this.strategySelector.selectStrategy(this.pendingPastePayload.html)
335
+ : this.strategySelector.selectStrategyByType(mode);
336
+ let processedHtml = strategy.process(this.pendingPastePayload.html);
337
+ // If the strategy supports image processing and there is clipboard file content, parse local images.
338
+ if (strategy.supportsImageProcessing && this.clipboardFileContent) {
339
+ processedHtml = this.parseLocalImages(processedHtml, this.clipboardFileContent);
340
+ }
341
+ this.clipboardFileContent = null;
342
+ const dataTransfer = this.createDataTransfer(processedHtml, this.pendingPastePayload.text, strategy.type);
307
343
  this.dispatchBeforeInputPaste(editableEl, dataTransfer);
308
344
  this.clearPasteChooser();
345
+ this.emitLocalImageInsertedEvent();
346
+ }
347
+ /**
348
+ * Parses local images from the HTML and emits events for further processing.
349
+ *
350
+ * @param {string} html HTML content to parse.
351
+ * @param {ClipboardFileContent} clipboardFileContent Clipboard file content for image extraction.
352
+ * @returns {string} Processed HTML with local image references replaced.
353
+ */
354
+ parseLocalImages(html, clipboardFileContent) {
355
+ const { html: result, previews } = this.imageParser.parseLocalImages(html, clipboardFileContent);
356
+ if (previews.length > 0) {
357
+ this.pendingImageRegistry.register(previews);
358
+ }
359
+ return result;
360
+ }
361
+ /**
362
+ * Emits the `imageInsertedCallback` for any pending previews, allowing the
363
+ * consumer to upload them and resolve their URLs.
364
+ */
365
+ emitLocalImageInsertedEvent() {
366
+ if (this.pendingImageRegistry.hasPendingNotifications()) {
367
+ this.pendingImageRegistry.notifyInserted(this.options.imageInsertedCallback, () => { var _a; return (_a = this.editableEl) !== null && _a !== void 0 ? _a : this.getEditableElement(); }, (imageElement) => this.getDTOEntityByDom(imageElement));
368
+ }
309
369
  }
310
370
  /**
311
371
  * Restores SelectionController state from the captured selection so synthetic
@@ -379,7 +439,7 @@ export class VegaRTEPasteExtension extends VegaRTEExtension {
379
439
  *
380
440
  * @param {string} html HTML clipboard content.
381
441
  * @param {string} text Plain text clipboard content.
382
- * @param {PasteMode} [mode] Selected paste mode marker.
442
+ * @param {RTEPasteMode} [mode] Selected paste mode marker.
383
443
  * @returns {DataTransfer} Populated data transfer payload.
384
444
  */
385
445
  createDataTransfer(html, text, mode) {
@@ -440,3 +500,6 @@ export class VegaRTEPasteExtension extends VegaRTEExtension {
440
500
  }
441
501
  }
442
502
  }
503
+ (() => {
504
+ VegaRTEExtension.registerActionHandleStrategy(RTEImageNode.name, REPLACE_IMAGE_SRC, new ImageReplaceSrcStrategy());
505
+ })();
@@ -0,0 +1,38 @@
1
+ import { AbstractPasteProcessingStrategy, PasteProcessingStrategyPriority, } from './paste-processing-strategy.abstract';
2
+ /**
3
+ * Default paste processing strategy that acts as a fallback when no other
4
+ * strategy matches. This strategy always accepts the content and passes it
5
+ * through unchanged — the normal RTE paste pipeline (DOMParser +
6
+ * ElementToDtoStrategyProcessor) handles the rest.
7
+ */
8
+ export class DefaultPasteProcessingStrategy extends AbstractPasteProcessingStrategy {
9
+ /**
10
+ * Always matches as the terminal fallback strategy.
11
+ *
12
+ * @param {string} html Raw clipboard HTML.
13
+ * @returns {boolean} Always `true`.
14
+ */
15
+ canHandle(html) {
16
+ // Default strategy is the fallback — always returns true.
17
+ return html !== undefined;
18
+ }
19
+ /**
20
+ * Returns the original HTML unchanged.
21
+ *
22
+ * @param {string} html Raw clipboard HTML.
23
+ * @returns {string} Unchanged HTML.
24
+ */
25
+ process(html) {
26
+ // Current default behavior: pass through unchanged
27
+ // (DOMParser + ElementToDtoStrategyProcessor handles the rest)
28
+ return html;
29
+ }
30
+ /**
31
+ * Fallback priority so other strategies can win when matched.
32
+ *
33
+ * @returns {number} Strategy priority.
34
+ */
35
+ get priority() {
36
+ return PasteProcessingStrategyPriority.DEFAULT_FALLBACK;
37
+ }
38
+ }