@globalpayments/vega 2.91.0 → 2.93.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.
- package/dist/cjs/{app-globals-7bb10088.js → app-globals-f7ad9275.js} +17 -10
- package/dist/cjs/{child-nodes-event-prevent-slimmer-76d19d56.js → child-nodes-event-prevent-slimmer-e67ee84c.js} +2 -2
- package/dist/cjs/{code-block-c1039791.js → code-block-2f3d0f38.js} +64 -11
- package/dist/cjs/{component-value-history-controller-slimmer.abstract-1d36641d.js → component-value-history-controller-slimmer.abstract-31d2c7aa.js} +72 -39
- package/dist/cjs/{content-state-a6105949.js → content-state-13daf87a.js} +91 -8
- package/dist/cjs/copy-d021c780.js +7 -0
- package/dist/cjs/{date-required-rule-c4997459.js → date-required-rule-e65ddd7d.js} +1 -1
- package/dist/cjs/{design-token-f65eab4a.js → design-token-47393cbb.js} +3 -3
- package/dist/cjs/{element-appender-slimmer-316668d0.js → element-appender-slimmer-29c4ac60.js} +18 -9
- package/dist/cjs/{event-emit-slimmer-5bab10c2.js → event-emit-slimmer-d234a619.js} +1 -1
- package/dist/cjs/{file-uploader-required-rule-cc51d4ab.js → file-uploader-required-rule-5520bbec.js} +1 -1
- package/dist/cjs/{form-field-controller-slimmer-b0c35330.js → form-field-controller-slimmer-3bfcf88c.js} +1 -1
- package/dist/cjs/{image-annotation-action-e4596726.js → image-annotation-action-c2b163bb.js} +3 -3
- package/dist/cjs/image-extension-4e99b620.js +39 -0
- package/dist/cjs/index-58ea899e.js +4 -0
- package/dist/cjs/index.cjs.js +30 -22
- package/dist/cjs/{inject-keyboard-manager-1f5bbb19.js → inject-keyboard-manager-4b2ebbe4.js} +1 -1
- package/dist/cjs/{internal-calendar-period-factory-9c66cf36.js → internal-calendar-period-factory-7a0ecdb1.js} +1 -1
- package/dist/cjs/{internal-translation-controller-5905469e.js → internal-translation-controller-31f2b057.js} +18 -0
- package/dist/cjs/{internal-vega-event-manager-7196a847.js → internal-vega-event-manager-13c4012b.js} +2 -1
- package/dist/cjs/{keyboard-manager-61e8ce38.js → keyboard-manager-c78b46bd.js} +1 -1
- package/dist/cjs/{keyboard-manager-slimmer-079a7e87.js → keyboard-manager-slimmer-d350c931.js} +1 -1
- package/dist/cjs/{link-extension-a7ac28f3.js → link-extension-455c02b3.js} +3 -3
- package/dist/cjs/loader.cjs.js +17 -15
- package/dist/cjs/{month-view-generator-48215a05.js → month-view-generator-006562dc.js} +1 -1
- package/dist/cjs/{public-rules-66540638.js → public-rules-c59eba88.js} +10 -10
- package/dist/cjs/{range-dea19a90.js → range-bf80fa40.js} +25 -3
- package/dist/cjs/{replace-selected-text-action-6d1ebbf9.js → replace-selected-text-action-a80f5a6a.js} +1 -1
- package/dist/cjs/{required-field-rule-b12a29e1.js → required-field-rule-400690c3.js} +1 -1
- package/dist/cjs/{responsive-format-facade-10ff730e.js → responsive-format-facade-1af54330.js} +2 -2
- package/dist/cjs/{rich-text-editor-required-rule-63492ca3.js → rich-text-editor-required-rule-1085c71a.js} +1 -1
- package/dist/cjs/{split-cell-operation-30e5dd4a.js → split-cell-operation-2fa5c9e4.js} +3 -3
- package/dist/cjs/{state-border-formatter-e7779964.js → state-border-formatter-501f6645.js} +1 -1
- package/dist/cjs/{string-format-strategy.abstract-a22f0cb1.js → string-format-strategy.abstract-a02bf002.js} +1 -1
- package/dist/cjs/{string-input-formatter-slimmer-8179eb40.js → string-input-formatter-slimmer-9cca6151.js} +1 -1
- package/dist/cjs/{string-mask-strategy-8b9bb0c1.js → string-mask-strategy-4c174ebf.js} +2 -2
- package/dist/cjs/{style-formatter-380b9a86.js → style-formatter-2c749500.js} +2 -2
- package/dist/cjs/{time-required-rule-080d975b.js → time-required-rule-04994a5e.js} +1 -1
- package/dist/cjs/{token-extension-619379a3.js → token-extension-d217914d.js} +3622 -742
- package/dist/cjs/{translation-slimmer-2af6f141.js → translation-slimmer-7fb6e94c.js} +1 -1
- package/dist/cjs/{type-guard-0171e779.js → type-guard-1c3770d4.js} +1 -1
- package/dist/cjs/{valid-credit-card-number-rule-fdfca83e.js → valid-credit-card-number-rule-f719a8c6.js} +1 -1
- package/dist/cjs/vega-accordion.cjs.entry.js +21 -13
- package/dist/cjs/vega-app-footer.cjs.entry.js +3 -3
- package/dist/cjs/vega-app-header-button.cjs.entry.js +10 -10
- package/dist/cjs/vega-banner.cjs.entry.js +6 -9
- package/dist/cjs/vega-box.cjs.entry.js +7 -7
- package/dist/cjs/vega-breadcrumb.cjs.entry.js +5 -5
- package/dist/cjs/vega-button-circle.cjs.entry.js +10 -10
- package/dist/cjs/vega-button-group_2.cjs.entry.js +5 -5
- package/dist/cjs/vega-button-link.cjs.entry.js +5 -5
- package/dist/cjs/vega-button.cjs.entry.js +8 -8
- package/dist/cjs/vega-calendar_5.cjs.entry.js +12 -12
- package/dist/cjs/vega-card.cjs.entry.js +6 -6
- package/dist/cjs/vega-carousel.cjs.entry.js +7 -7
- package/dist/cjs/vega-checkbox_2.cjs.entry.js +8 -8
- package/dist/cjs/vega-chip.cjs.entry.js +10 -10
- package/dist/cjs/vega-code-block.cjs.entry.js +15 -18
- package/dist/cjs/vega-color-picker.cjs.entry.js +7 -7
- package/dist/cjs/vega-color-swatch-picker.cjs.entry.js +9 -9
- package/dist/cjs/vega-color-swatch.cjs.entry.js +5 -5
- package/dist/cjs/vega-combo-box.cjs.entry.js +21 -15
- package/dist/cjs/vega-date-picker_2.cjs.entry.js +18 -18
- package/dist/cjs/vega-dialog_2.cjs.entry.js +21 -10
- package/dist/cjs/vega-divider.cjs.entry.js +6 -6
- package/dist/cjs/vega-dropdown_5.cjs.entry.js +694 -196
- package/dist/cjs/vega-env-manager-23b8b23c.js +2 -2
- package/dist/cjs/{vega-event-id-df22d80e.js → vega-event-id-58afed7a.js} +2 -0
- package/dist/cjs/vega-field-label.cjs.entry.js +16 -12
- package/dist/cjs/vega-file-uploader.cjs.entry.js +9 -9
- package/dist/cjs/vega-flag-icon.cjs.entry.js +6 -6
- package/dist/cjs/vega-flex.cjs.entry.js +7 -7
- package/dist/cjs/vega-font.cjs.entry.js +6 -6
- package/dist/cjs/vega-form.cjs.entry.js +8 -8
- package/dist/cjs/vega-grid.cjs.entry.js +6 -6
- package/dist/cjs/vega-icon.cjs.entry.js +6 -6
- package/dist/cjs/vega-image-uploader.cjs.entry.js +11 -11
- package/dist/cjs/vega-input-credit-card.cjs.entry.js +12 -12
- package/dist/cjs/vega-input-numeric.cjs.entry.js +11 -11
- package/dist/cjs/vega-input-passcode.cjs.entry.js +11 -11
- package/dist/cjs/vega-input-phone-number.cjs.entry.js +9 -9
- package/dist/cjs/vega-input-range.cjs.entry.js +8 -8
- package/dist/cjs/vega-input-select.cjs.entry.js +11 -11
- package/dist/cjs/vega-input.cjs.entry.js +12 -12
- package/dist/cjs/vega-item-toggle.cjs.entry.js +3 -3
- package/dist/cjs/vega-left-nav_5.cjs.entry.js +11 -11
- package/dist/cjs/vega-loader-wrapper_2.cjs.entry.js +4 -4
- package/dist/cjs/vega-page-notification_2.cjs.entry.js +1 -1
- package/dist/cjs/vega-pagination-page-selector-mobile.cjs.entry.js +4 -4
- package/dist/cjs/vega-pagination-page-size-selector-mobile.cjs.entry.js +3 -3
- package/dist/cjs/vega-pagination.cjs.entry.js +9 -9
- package/dist/cjs/vega-popover_2.cjs.entry.js +12 -12
- package/dist/cjs/vega-progress-tracker_2.cjs.entry.js +7 -7
- package/dist/cjs/vega-radio_2.cjs.entry.js +11 -11
- package/dist/cjs/vega-rich-text-content.cjs.entry.js +7 -7
- package/dist/cjs/vega-rich-text-editor_4.cjs.entry.js +677 -95
- package/dist/cjs/vega-rich-text-find-replace-panel.cjs.entry.js +233 -0
- package/dist/cjs/vega-rich-text-special-characters-panel.cjs.entry.js +8 -8
- package/dist/cjs/vega-rich-text-table-properties_3.cjs.entry.js +13 -13
- package/dist/cjs/vega-segment-control.cjs.entry.js +3 -3
- package/dist/cjs/vega-selection-chip_2.cjs.entry.js +10 -10
- package/dist/cjs/vega-selection-tile_2.cjs.entry.js +8 -8
- package/dist/cjs/vega-sidenav_3.cjs.entry.js +7 -7
- package/dist/cjs/vega-signature-capture.cjs.entry.js +12 -12
- package/dist/cjs/vega-stepper.cjs.entry.js +7 -7
- package/dist/cjs/vega-tab-group_2.cjs.entry.js +5 -5
- package/dist/cjs/vega-table_11.cjs.entry.js +912 -429
- package/dist/cjs/vega-textarea.cjs.entry.js +9 -11
- package/dist/cjs/vega-time-picker_2.cjs.entry.js +35 -15
- package/dist/cjs/vega-toggle-switch.cjs.entry.js +5 -5
- package/dist/cjs/vega-tooltip_2.cjs.entry.js +7 -7
- package/dist/cjs/vega.cjs.js +17 -15
- package/dist/cjs/xmark-large-faae5a80.js +7 -0
- package/dist/collection/collection-manifest.json +6 -0
- package/dist/collection/components/vega-accordion/slimmers/vega-accordion-renderer.js +11 -3
- package/dist/collection/components/vega-box/vega-box.js +3 -3
- package/dist/collection/components/vega-code-block/slimmers/renderers/vega-code-block-copy-button-renderer.js +1 -1
- package/dist/collection/components/vega-combo-box/slimmers/renderers/vega-combo-box-dropdown-renderer.js +4 -1
- package/dist/collection/components/vega-combo-box/vega-combo-box.js +7 -1
- package/dist/collection/components/vega-dialog/vega-dialog.js +1 -1
- package/dist/collection/components/vega-dropdown/constants.js +1 -0
- package/dist/collection/components/vega-dropdown/slimmers/controllers/vega-dropdown-appender-controller.js +9 -0
- package/dist/collection/components/vega-dropdown/slimmers/controllers/vega-dropdown-children-controller.js +97 -4
- package/dist/collection/components/vega-dropdown/slimmers/controllers/vega-dropdown-select-all-controller.js +219 -0
- package/dist/collection/components/vega-dropdown/slimmers/controllers/vega-dropdown-selected-controller.js +78 -13
- package/dist/collection/components/vega-dropdown/slimmers/controllers/vega-dropdown-source-controller.js +13 -1
- package/dist/collection/components/vega-dropdown/slimmers/renderers/vega-dropdown-list-renderer.js +7 -0
- package/dist/collection/components/vega-dropdown/vega-dropdown-item/slimmers/controllers/vega-dropdown-item-state-controller.js +52 -1
- package/dist/collection/components/vega-dropdown/vega-dropdown-item/slimmers/renderers/vega-dropdown-item-renderer.js +4 -1
- package/dist/collection/components/vega-dropdown/vega-dropdown-item/vega-dropdown-item.js +5 -0
- package/dist/collection/components/vega-dropdown/vega-dropdown.js +126 -1
- package/dist/collection/components/vega-field-label/slimmers/renderers/vega-field-label-suffix-element-renderer.js +5 -4
- package/dist/collection/components/vega-field-label/vega-field-label.css +20 -0
- package/dist/collection/components/vega-field-label/vega-field-label.js +7 -4
- package/dist/collection/components/vega-hint/vega-hint.js +1 -1
- package/dist/collection/components/vega-input/vega-input.css +1 -0
- package/dist/collection/components/vega-input/vega-input.js +1 -1
- package/dist/collection/components/vega-input-select/vega-input-select.js +1 -1
- package/dist/collection/components/vega-modal/slimmers/renderers/vega-modal-renderer.js +4 -1
- package/dist/collection/components/vega-modal/vega-modal.css +0 -1
- package/dist/collection/components/vega-modal/vega-modal.js +38 -0
- package/dist/collection/components/vega-rich-text-editor/assets/cut.js +3 -0
- package/dist/collection/components/vega-rich-text-editor/assets/redo.js +1 -1
- package/dist/collection/components/vega-rich-text-editor/assets/undo.js +1 -1
- package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-delete-text-or-decorator-node-strategy.js +16 -1
- package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-insert-line-break-strategy.js +11 -5
- package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-merge-nodes-strategy.js +25 -0
- package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-split-with-text-node-strategy.js +9 -4
- package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/delete-selected-content-strategy.js +16 -0
- package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/paste-content-strategy.js +61 -5
- package/dist/collection/components/vega-rich-text-editor/dto/actions/delete-selected-content-action.js +17 -0
- package/dist/collection/components/vega-rich-text-editor/dto/actions/modify-content-action.abstract.js +1 -0
- package/dist/collection/components/vega-rich-text-editor/dto/actions/paste-content-action.js +1 -0
- package/dist/collection/components/vega-rich-text-editor/dto/content-state.js +2 -0
- package/dist/collection/components/vega-rich-text-editor/dto/nodes/text-node.js +6 -1
- package/dist/collection/components/vega-rich-text-editor/dto/range.js +24 -2
- package/dist/collection/components/vega-rich-text-editor/extensions/blockquote/action-handler-interceptors/blockquote-exit-on-enter-interceptor.js +61 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/blockquote/action-handler-strategies/block-transform-to-blockquote-strategy.js +40 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/blockquote/action-handler-strategies/remove-blockquote-strategy.js +20 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/blockquote/actions/remove-blockquote-action.js +17 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/blockquote/actions/transform-to-blockquote-action.js +19 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/blockquote/assets/quote-left.js +4 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/blockquote/blockquote-extension.js +47 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/blockquote/dto/blockquote-annotation.js +76 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/blockquote/dto/rte-blockquote-block.js +70 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/blockquote/element-to-dto-strategies/blockquote-to-blockquote-block-strategy.js +53 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/blockquote/filter-styles-strategies/blockquote-block/blockquote-filter-styles-strategy.js +41 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/blockquote/renderers/blockquote-block-renderer.js +21 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/blockquote/renderers/blockquote-toolbar-button-renderer.js +260 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/copy/action-handler-strategies/copy-selected-content-strategy.js +226 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/copy/actions/copy-selected-content-action.js +21 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/copy/copy-extension.js +20 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/copy/copy-toolbar-button-renderer.js +58 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/cut/cut-extension.js +15 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/cut/cut-toolbar-button-renderer.js +44 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/find-replace/assets/find-and-replace.js +3 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/find-replace/find-replace-extension.js +18 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/find-replace/slimmer/controllers/find-controller.js +105 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/find-replace/slimmer/controllers/find-replace-controller.abstract.js +68 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/find-replace/slimmer/controllers/helper/block-search-strategies/block-search-strategy.abstract.js +8 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/find-replace/slimmer/controllers/helper/block-search-strategies/code-block-search-strategy.js +19 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/find-replace/slimmer/controllers/helper/block-search-strategies/container-block-search-strategy.js +23 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/find-replace/slimmer/controllers/helper/block-search-strategies/list-item-block-search-strategy.js +30 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/find-replace/slimmer/controllers/helper/block-search-strategies/text-block-search-strategy.js +20 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/find-replace/slimmer/controllers/helper/find-replace-highlight-manager.js +266 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/find-replace/slimmer/controllers/helper/find-replace-state.js +346 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/find-replace/slimmer/controllers/replace-controller.js +113 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/find-replace/slimmer/renderers/find-replace-toolbar-button-renderer.js +194 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/find-replace/vega-rich-text-find-replace-panel/slimmers/renderers/find-replace-panel-renderer.js +153 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/find-replace/vega-rich-text-find-replace-panel/vega-rich-text-find-replace-panel.css +50 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/find-replace/vega-rich-text-find-replace-panel/vega-rich-text-find-replace-panel.js +156 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/functions/function-extension.js +2 -1
- package/dist/collection/components/vega-rich-text-editor/extensions/horizontal-line/horizontal-line-extension.js +2 -1
- package/dist/collection/components/vega-rich-text-editor/extensions/image/image-extension.js +34 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/image/type.js +1 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/languages/language-extension.js +2 -1
- package/dist/collection/components/vega-rich-text-editor/extensions/line-height/line-height-extension.js +2 -1
- package/dist/collection/components/vega-rich-text-editor/extensions/paste/assets/paste.js +3 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/paste/paste-chooser-ui.js +144 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/paste/paste-constants.js +6 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/paste/paste-extension.js +442 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/special-characters/special-characters-extension.js +2 -1
- package/dist/collection/components/vega-rich-text-editor/extensions/table/renderers/table-renderer.js +1 -1
- package/dist/collection/components/vega-rich-text-editor/extensions/table/table-extension.js +6 -4
- package/dist/collection/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-selection-widget/slimmers/controllers/selection-widget-keyboard-controller.js +1 -1
- package/dist/collection/components/vega-rich-text-editor/extensions/tokens/token-extension.js +2 -1
- package/dist/collection/components/vega-rich-text-editor/helpers/utils.js +14 -0
- package/dist/collection/components/vega-rich-text-editor/public-api.js +7 -0
- package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/input-event-handler/abstract-delete-content-handler.js +133 -0
- package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/input-event-handler/backward-delete-content-handler.js +35 -0
- package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/input-event-handler/base-handler.js +1 -1
- package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/input-event-handler/forward-delete-content-handler.js +93 -0
- package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/input-event-handler/insert-line-break-handler.js +1 -1
- package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/input-event-handler/insert-paste-handler.js +385 -25
- package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/selection-controller.js +69 -36
- package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/user-input-controller.js +9 -3
- package/dist/collection/components/vega-rich-text-editor/slimmers/renderers/tools/image-toolbar-button-slimmer.js +59 -14
- package/dist/collection/components/vega-rich-text-editor/vega-rich-text-editor-toolbar-button/slimmers/renderers/vega-rich-text-editor-toolbar-button-renderer.js +6 -1
- package/dist/collection/components/vega-rich-text-editor/vega-rich-text-editor-toolbar-button/vega-rich-text-editor-toolbar-button.js +28 -1
- package/dist/collection/components/vega-rich-text-editor/vega-rich-text-editor.js +1 -1
- package/dist/collection/components/vega-rich-text-editor/vega-rich-text-image-editor/vega-rich-text-image-editor.js +1 -1
- package/dist/collection/components/vega-rich-text-editor/vega-rich-text-link-editor/vega-rich-text-link-editor.js +1 -1
- package/dist/collection/components/vega-table/slimmers/controllers/dto/column-render-input-model.js +32 -0
- package/dist/collection/components/vega-table/slimmers/controllers/vega-table-body-col-span-controller.js +77 -0
- package/dist/collection/components/vega-table/slimmers/renderers/vega-table-body-col-span-resolver.js +121 -0
- package/dist/collection/components/vega-table/slimmers/renderers/vega-table-cell-renderer.js +39 -14
- package/dist/collection/components/vega-table/slimmers/renderers/vega-table-pinned-renderer.js +207 -7
- package/dist/collection/components/vega-table/slimmers/renderers/vega-table-row-renderer.js +16 -3
- package/dist/collection/components/vega-table/vega-table-cell/vega-table-cell.js +24 -4
- package/dist/collection/components/vega-table/vega-table-expand-row/slimmers/controllers/vega-table-expand-row-col-span-controller.js +11 -2
- package/dist/collection/components/vega-table/vega-table-foot-cell/slimmers/renderers/vega-table-foot-cell-renderer.js +5 -1
- package/dist/collection/components/vega-table/vega-table-foot-cell/vega-table-foot-cell.js +22 -1
- package/dist/collection/components/vega-table/vega-table.css +5 -0
- package/dist/collection/components/vega-table/vega-table.js +5 -0
- package/dist/collection/components/vega-text/vega-text.js +1 -1
- package/dist/collection/components/vega-textarea/vega-textarea.js +2 -4
- package/dist/collection/components/vega-time-picker/slimmers/controllers/vega-time-picker-range-dropdown-controller.js +4 -0
- package/dist/collection/components/vega-time-picker/slimmers/controllers/vega-time-picker-single-dropdown-controller.js +4 -0
- package/dist/collection/components/vega-time-picker/vega-time-picker.js +39 -0
- package/dist/collection/constants/ui.js +1 -0
- package/dist/collection/global/scripts/before-vega-load.js +12 -0
- package/dist/collection/helpers/event-manager/event-id/component-event-id-map.js +2 -1
- package/dist/collection/helpers/event-manager/event-id/vega-event-id.js +1 -0
- package/dist/collection/helpers/slimmers/element-appender/element-appender-slimmer.js +11 -4
- package/dist/collection/helpers/translation/locales/en.js +18 -0
- package/dist/collection/helpers/ui/element-appender.js +5 -2
- package/dist/esm/{app-globals-6041f52f.js → app-globals-9950d055.js} +17 -10
- package/dist/esm/{aria-dialog-focusable-trap-slimmer-1332c071.js → aria-dialog-focusable-trap-slimmer-9eae86c6.js} +1 -1
- package/dist/esm/{child-nodes-event-prevent-slimmer-50022584.js → child-nodes-event-prevent-slimmer-96c14f5a.js} +2 -2
- package/dist/esm/{code-block-37294847.js → code-block-ae2337c2.js} +65 -13
- package/dist/esm/{component-value-history-controller-slimmer.abstract-45ccddc9.js → component-value-history-controller-slimmer.abstract-b1ee1b8e.js} +73 -40
- package/dist/esm/{content-state-67950b80.js → content-state-c3b85ae6.js} +92 -9
- package/dist/esm/copy-54e45e2d.js +5 -0
- package/dist/esm/{date-required-rule-958cf380.js → date-required-rule-e06115f8.js} +1 -1
- package/dist/esm/{design-token-e7e78f18.js → design-token-4e682056.js} +3 -3
- package/dist/esm/{element-appender-slimmer-ebda526d.js → element-appender-slimmer-a4485ef6.js} +19 -10
- package/dist/esm/{event-emit-slimmer-b94cec83.js → event-emit-slimmer-db4a82e0.js} +1 -1
- package/dist/esm/{file-uploader-required-rule-82188a61.js → file-uploader-required-rule-96952e1a.js} +1 -1
- package/dist/esm/{form-field-controller-slimmer-0a2ba886.js → form-field-controller-slimmer-a1c7b28c.js} +3 -3
- package/dist/esm/{image-annotation-action-7f7a5678.js → image-annotation-action-4c77d314.js} +3 -3
- package/dist/esm/image-extension-7108c27d.js +37 -0
- package/dist/esm/index-090d31ca.js +4 -0
- package/dist/esm/index.js +24 -23
- package/dist/esm/{inject-keyboard-manager-2b19c121.js → inject-keyboard-manager-e8ddb78d.js} +1 -1
- package/dist/esm/{internal-calendar-period-factory-fff8aaee.js → internal-calendar-period-factory-6f19d767.js} +1 -1
- package/dist/esm/{internal-translation-controller-aa09ca87.js → internal-translation-controller-09b8bd13.js} +18 -0
- package/dist/esm/{internal-vega-event-manager-956cf128.js → internal-vega-event-manager-48690e5b.js} +2 -1
- package/dist/esm/{keyboard-manager-3e5b157f.js → keyboard-manager-ec18721b.js} +1 -1
- package/dist/esm/{keyboard-manager-slimmer-ba5cc767.js → keyboard-manager-slimmer-531ddb0e.js} +1 -1
- package/dist/esm/{link-extension-afb404fb.js → link-extension-74eaa826.js} +3 -3
- package/dist/esm/loader.js +18 -16
- package/dist/esm/{month-view-generator-7a0c869c.js → month-view-generator-afd78ff8.js} +1 -1
- package/dist/esm/{public-rules-f64b0b78.js → public-rules-5fce32a5.js} +11 -11
- package/dist/esm/{range-4d09a305.js → range-8f877dbf.js} +25 -3
- package/dist/esm/{replace-selected-text-action-12bc8b82.js → replace-selected-text-action-c9278a0f.js} +1 -1
- package/dist/esm/{required-field-rule-a4634842.js → required-field-rule-897fe8d1.js} +1 -1
- package/dist/esm/{responsive-format-facade-844c5e09.js → responsive-format-facade-299e6304.js} +2 -2
- package/dist/esm/{rich-text-editor-required-rule-d62d418e.js → rich-text-editor-required-rule-3047bab0.js} +1 -1
- package/dist/esm/{split-cell-operation-c515669e.js → split-cell-operation-98d58410.js} +3 -3
- package/dist/esm/{state-border-formatter-f53847a5.js → state-border-formatter-da52b626.js} +1 -1
- package/dist/esm/{string-format-strategy.abstract-a0327405.js → string-format-strategy.abstract-a45b5ff7.js} +1 -1
- package/dist/esm/{string-input-formatter-slimmer-12de4a25.js → string-input-formatter-slimmer-4a032fed.js} +3 -3
- package/dist/esm/{string-mask-strategy-3bb03155.js → string-mask-strategy-37e53e48.js} +2 -2
- package/dist/esm/{style-formatter-df7bf8ec.js → style-formatter-3d5ddfb1.js} +2 -2
- package/dist/esm/{sub-state-notify-slimmer-7ef94141.js → sub-state-notify-slimmer-0f72ce74.js} +1 -1
- package/dist/esm/{sub-state-observer-slimmer-d9ad2bdd.js → sub-state-observer-slimmer-64532d94.js} +1 -1
- package/dist/esm/{time-required-rule-db0dee53.js → time-required-rule-355b73d2.js} +1 -1
- package/dist/esm/{token-extension-8ff92d14.js → token-extension-ecfafe94.js} +3618 -745
- package/dist/esm/{translation-slimmer-4904e7fe.js → translation-slimmer-3ea56354.js} +1 -1
- package/dist/esm/{type-guard-a2cbaae9.js → type-guard-2bfb2c7b.js} +1 -1
- package/dist/esm/{valid-credit-card-number-rule-a3f9858d.js → valid-credit-card-number-rule-52c6b029.js} +1 -1
- package/dist/esm/vega-accordion.entry.js +21 -13
- package/dist/esm/vega-app-footer.entry.js +3 -3
- package/dist/esm/vega-app-header-button.entry.js +10 -10
- package/dist/esm/vega-banner.entry.js +5 -8
- package/dist/esm/vega-box.entry.js +7 -7
- package/dist/esm/vega-breadcrumb.entry.js +5 -5
- package/dist/esm/vega-button-circle.entry.js +11 -11
- package/dist/esm/vega-button-group_2.entry.js +8 -8
- package/dist/esm/vega-button-link.entry.js +5 -5
- package/dist/esm/vega-button.entry.js +9 -9
- package/dist/esm/vega-calendar_5.entry.js +15 -15
- package/dist/esm/vega-card.entry.js +6 -6
- package/dist/esm/vega-carousel.entry.js +7 -7
- package/dist/esm/vega-checkbox_2.entry.js +10 -10
- package/dist/esm/vega-chip.entry.js +10 -10
- package/dist/esm/vega-code-block.entry.js +15 -18
- package/dist/esm/vega-color-picker.entry.js +9 -9
- package/dist/esm/vega-color-swatch-picker.entry.js +11 -11
- package/dist/esm/vega-color-swatch.entry.js +5 -5
- package/dist/esm/vega-combo-box.entry.js +23 -17
- package/dist/esm/vega-date-picker_2.entry.js +22 -22
- package/dist/esm/vega-dialog_2.entry.js +23 -12
- package/dist/esm/vega-divider.entry.js +6 -6
- package/dist/esm/vega-dropdown_5.entry.js +700 -202
- package/dist/esm/vega-env-manager-8f8dc473.js +2 -2
- package/dist/esm/{vega-event-id-268f8def.js → vega-event-id-270fe47e.js} +2 -1
- package/dist/esm/vega-field-label.entry.js +16 -12
- package/dist/esm/vega-file-uploader.entry.js +11 -11
- package/dist/esm/vega-flag-icon.entry.js +6 -6
- package/dist/esm/vega-flex.entry.js +7 -7
- package/dist/esm/vega-font.entry.js +6 -6
- package/dist/esm/vega-form.entry.js +11 -11
- package/dist/esm/vega-grid.entry.js +6 -6
- package/dist/esm/vega-icon.entry.js +6 -6
- package/dist/esm/vega-image-uploader.entry.js +13 -13
- package/dist/esm/vega-input-credit-card.entry.js +14 -14
- package/dist/esm/vega-input-numeric.entry.js +14 -14
- package/dist/esm/vega-input-passcode.entry.js +13 -13
- package/dist/esm/vega-input-phone-number.entry.js +11 -11
- package/dist/esm/vega-input-range.entry.js +10 -10
- package/dist/esm/vega-input-select.entry.js +13 -13
- package/dist/esm/vega-input.entry.js +15 -15
- package/dist/esm/{vega-internal-event-id-22151a4d.js → vega-internal-event-id-827eb1ce.js} +1 -1
- package/dist/esm/vega-item-toggle.entry.js +3 -3
- package/dist/esm/vega-left-nav_5.entry.js +14 -14
- package/dist/esm/vega-loader-wrapper_2.entry.js +4 -4
- package/dist/esm/vega-page-notification_2.entry.js +1 -1
- package/dist/esm/vega-pagination-page-selector-mobile.entry.js +5 -5
- package/dist/esm/vega-pagination-page-size-selector-mobile.entry.js +4 -4
- package/dist/esm/vega-pagination.entry.js +10 -10
- package/dist/esm/vega-popover_2.entry.js +14 -14
- package/dist/esm/vega-progress-tracker_2.entry.js +10 -10
- package/dist/esm/vega-radio_2.entry.js +13 -13
- package/dist/esm/vega-rich-text-content.entry.js +10 -10
- package/dist/esm/vega-rich-text-editor_4.entry.js +681 -99
- package/dist/esm/vega-rich-text-find-replace-panel.entry.js +229 -0
- package/dist/esm/vega-rich-text-special-characters-panel.entry.js +8 -8
- package/dist/esm/vega-rich-text-table-properties_3.entry.js +14 -14
- package/dist/esm/vega-segment-control.entry.js +3 -3
- package/dist/esm/vega-selection-chip_2.entry.js +13 -13
- package/dist/esm/vega-selection-tile_2.entry.js +11 -11
- package/dist/esm/vega-sidenav_3.entry.js +10 -10
- package/dist/esm/vega-signature-capture.entry.js +14 -14
- package/dist/esm/vega-stepper.entry.js +9 -9
- package/dist/esm/vega-tab-group_2.entry.js +5 -5
- package/dist/esm/vega-table_11.entry.js +915 -432
- package/dist/esm/vega-textarea.entry.js +11 -13
- package/dist/esm/vega-time-picker_2.entry.js +37 -17
- package/dist/esm/vega-toggle-switch.entry.js +7 -7
- package/dist/esm/vega-tooltip_2.entry.js +8 -8
- package/dist/esm/vega.js +18 -16
- package/dist/esm/{wait-for-component-did-render-0488922a.js → wait-for-component-did-render-0c237cb8.js} +1 -1
- package/dist/esm/xmark-large-c5ae7944.js +5 -0
- package/dist/sri/vega-sri-manifest.json +392 -376
- package/dist/types/components/vega-accordion/slimmers/vega-accordion-renderer.d.ts +2 -0
- package/dist/types/components/vega-combo-box/types.d.ts +6 -1
- package/dist/types/components/vega-combo-box/vega-combo-box.d.ts +1 -0
- package/dist/types/components/vega-dropdown/constants.d.ts +1 -0
- package/dist/types/components/vega-dropdown/slimmers/controllers/vega-dropdown-appender-controller.d.ts +2 -0
- package/dist/types/components/vega-dropdown/slimmers/controllers/vega-dropdown-children-controller.d.ts +36 -0
- package/dist/types/components/vega-dropdown/slimmers/controllers/vega-dropdown-select-all-controller.d.ts +107 -0
- package/dist/types/components/vega-dropdown/slimmers/controllers/vega-dropdown-selected-controller.d.ts +17 -0
- package/dist/types/components/vega-dropdown/slimmers/controllers/vega-dropdown-source-controller.d.ts +5 -0
- package/dist/types/components/vega-dropdown/slimmers/renderers/vega-dropdown-list-renderer.d.ts +2 -0
- package/dist/types/components/vega-dropdown/types.d.ts +8 -0
- package/dist/types/components/vega-dropdown/vega-dropdown-item/slimmers/controllers/vega-dropdown-item-state-controller.d.ts +25 -0
- package/dist/types/components/vega-dropdown/vega-dropdown-item/slimmers/renderers/vega-dropdown-item-renderer.d.ts +1 -0
- package/dist/types/components/vega-dropdown/vega-dropdown-item/vega-dropdown-item.d.ts +4 -0
- package/dist/types/components/vega-dropdown/vega-dropdown.d.ts +48 -0
- package/dist/types/components/vega-field-label/slimmers/renderers/vega-field-label-suffix-element-renderer.d.ts +1 -0
- package/dist/types/components/vega-field-label/types.d.ts +12 -0
- package/dist/types/components/vega-modal/slimmers/renderers/vega-modal-renderer.d.ts +2 -1
- package/dist/types/components/vega-modal/vega-modal.d.ts +9 -1
- package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-merge-nodes-strategy.d.ts +9 -0
- package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/delete-selected-content-strategy.d.ts +13 -0
- package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/paste-content-strategy.d.ts +14 -4
- package/dist/types/components/vega-rich-text-editor/dto/actions/delete-selected-content-action.d.ts +12 -0
- package/dist/types/components/vega-rich-text-editor/dto/actions/modify-content-action.abstract.d.ts +2 -1
- package/dist/types/components/vega-rich-text-editor/dto/actions/paste-content-action.d.ts +7 -0
- package/dist/types/components/vega-rich-text-editor/dto/range.d.ts +16 -0
- package/dist/types/components/vega-rich-text-editor/extensions/blockquote/action-handler-interceptors/blockquote-exit-on-enter-interceptor.d.ts +34 -0
- package/dist/types/components/vega-rich-text-editor/extensions/blockquote/action-handler-strategies/block-transform-to-blockquote-strategy.d.ts +13 -0
- package/dist/types/components/vega-rich-text-editor/extensions/blockquote/action-handler-strategies/remove-blockquote-strategy.d.ts +13 -0
- package/dist/types/components/vega-rich-text-editor/extensions/blockquote/actions/remove-blockquote-action.d.ts +14 -0
- package/dist/types/components/vega-rich-text-editor/extensions/blockquote/actions/transform-to-blockquote-action.d.ts +18 -0
- package/dist/types/components/vega-rich-text-editor/extensions/blockquote/assets/quote-left.d.ts +3 -0
- package/dist/types/components/vega-rich-text-editor/extensions/blockquote/blockquote-extension.d.ts +9 -0
- package/dist/types/components/vega-rich-text-editor/extensions/blockquote/dto/blockquote-annotation.d.ts +48 -0
- package/dist/types/components/vega-rich-text-editor/extensions/blockquote/dto/rte-blockquote-block.d.ts +56 -0
- package/dist/types/components/vega-rich-text-editor/extensions/blockquote/element-to-dto-strategies/blockquote-to-blockquote-block-strategy.d.ts +35 -0
- package/dist/types/components/vega-rich-text-editor/extensions/blockquote/filter-styles-strategies/blockquote-block/blockquote-filter-styles-strategy.d.ts +31 -0
- package/dist/types/components/vega-rich-text-editor/extensions/blockquote/renderers/blockquote-block-renderer.d.ts +18 -0
- package/dist/types/components/vega-rich-text-editor/extensions/blockquote/renderers/blockquote-toolbar-button-renderer.d.ts +113 -0
- package/dist/types/components/vega-rich-text-editor/extensions/copy/action-handler-strategies/copy-selected-content-strategy.d.ts +79 -0
- package/dist/types/components/vega-rich-text-editor/extensions/copy/actions/copy-selected-content-action.d.ts +18 -0
- package/dist/types/components/vega-rich-text-editor/extensions/copy/copy-extension.d.ts +10 -0
- package/dist/types/components/vega-rich-text-editor/extensions/copy/copy-toolbar-button-renderer.d.ts +36 -0
- package/dist/types/components/vega-rich-text-editor/extensions/cut/cut-extension.d.ts +11 -0
- package/dist/types/components/vega-rich-text-editor/extensions/cut/cut-toolbar-button-renderer.d.ts +24 -0
- package/dist/types/components/vega-rich-text-editor/extensions/find-replace/assets/find-and-replace.d.ts +3 -0
- package/dist/types/components/vega-rich-text-editor/extensions/find-replace/find-replace-extension.d.ts +15 -0
- package/dist/types/components/vega-rich-text-editor/extensions/find-replace/slimmer/controllers/find-controller.d.ts +65 -0
- package/dist/types/components/vega-rich-text-editor/extensions/find-replace/slimmer/controllers/find-replace-controller.abstract.d.ts +65 -0
- package/dist/types/components/vega-rich-text-editor/extensions/find-replace/slimmer/controllers/helper/block-search-strategies/block-search-strategy.abstract.d.ts +29 -0
- package/dist/types/components/vega-rich-text-editor/extensions/find-replace/slimmer/controllers/helper/block-search-strategies/code-block-search-strategy.d.ts +17 -0
- package/dist/types/components/vega-rich-text-editor/extensions/find-replace/slimmer/controllers/helper/block-search-strategies/container-block-search-strategy.d.ts +21 -0
- package/dist/types/components/vega-rich-text-editor/extensions/find-replace/slimmer/controllers/helper/block-search-strategies/list-item-block-search-strategy.d.ts +21 -0
- package/dist/types/components/vega-rich-text-editor/extensions/find-replace/slimmer/controllers/helper/block-search-strategies/text-block-search-strategy.d.ts +18 -0
- package/dist/types/components/vega-rich-text-editor/extensions/find-replace/slimmer/controllers/helper/find-replace-highlight-manager.d.ts +88 -0
- package/dist/types/components/vega-rich-text-editor/extensions/find-replace/slimmer/controllers/helper/find-replace-state.d.ts +200 -0
- package/dist/types/components/vega-rich-text-editor/extensions/find-replace/slimmer/controllers/replace-controller.d.ts +73 -0
- package/dist/types/components/vega-rich-text-editor/extensions/find-replace/slimmer/renderers/find-replace-toolbar-button-renderer.d.ts +64 -0
- package/dist/types/components/vega-rich-text-editor/extensions/find-replace/vega-rich-text-find-replace-panel/slimmers/renderers/find-replace-panel-renderer.d.ts +28 -0
- package/dist/types/components/vega-rich-text-editor/extensions/find-replace/vega-rich-text-find-replace-panel/vega-rich-text-find-replace-panel.d.ts +56 -0
- package/dist/types/components/vega-rich-text-editor/extensions/functions/function-extension.d.ts +1 -0
- package/dist/types/components/vega-rich-text-editor/extensions/horizontal-line/horizontal-line-extension.d.ts +1 -0
- package/dist/types/components/vega-rich-text-editor/extensions/image/image-extension.d.ts +27 -0
- package/dist/types/components/vega-rich-text-editor/extensions/image/type.d.ts +13 -0
- package/dist/types/components/vega-rich-text-editor/extensions/languages/language-extension.d.ts +1 -0
- package/dist/types/components/vega-rich-text-editor/extensions/line-height/line-height-extension.d.ts +1 -0
- package/dist/types/components/vega-rich-text-editor/extensions/paste/assets/paste.d.ts +3 -0
- package/dist/types/components/vega-rich-text-editor/extensions/paste/paste-chooser-ui.d.ts +58 -0
- package/dist/types/components/vega-rich-text-editor/extensions/paste/paste-constants.d.ts +6 -0
- package/dist/types/components/vega-rich-text-editor/extensions/paste/paste-extension.d.ts +150 -0
- package/dist/types/components/vega-rich-text-editor/extensions/special-characters/special-characters-extension.d.ts +1 -0
- package/dist/types/components/vega-rich-text-editor/extensions/table/table-extension.d.ts +1 -0
- package/dist/types/components/vega-rich-text-editor/extensions/tokens/token-extension.d.ts +1 -0
- package/dist/types/components/vega-rich-text-editor/helpers/utils.d.ts +7 -0
- package/dist/types/components/vega-rich-text-editor/public-api.d.ts +7 -0
- package/dist/types/components/vega-rich-text-editor/slimmers/controllers/helper/input-event-handler/abstract-delete-content-handler.d.ts +60 -0
- package/dist/types/components/vega-rich-text-editor/slimmers/controllers/helper/input-event-handler/backward-delete-content-handler.d.ts +8 -0
- package/dist/types/components/vega-rich-text-editor/slimmers/controllers/helper/input-event-handler/forward-delete-content-handler.d.ts +8 -0
- package/dist/types/components/vega-rich-text-editor/slimmers/controllers/helper/input-event-handler/insert-paste-handler.d.ts +114 -3
- package/dist/types/components/vega-rich-text-editor/slimmers/controllers/selection-controller.d.ts +22 -13
- package/dist/types/components/vega-rich-text-editor/slimmers/controllers/user-input-controller.d.ts +2 -1
- package/dist/types/components/vega-rich-text-editor/slimmers/renderers/tools/image-toolbar-button-slimmer.d.ts +10 -2
- package/dist/types/components/vega-rich-text-editor/vega-rich-text-editor-toolbar-button/slimmers/renderers/vega-rich-text-editor-toolbar-button-renderer.d.ts +1 -0
- package/dist/types/components/vega-rich-text-editor/vega-rich-text-editor-toolbar-button/vega-rich-text-editor-toolbar-button.d.ts +6 -0
- package/dist/types/components/vega-rich-text-editor/vega-rich-text-editor.d.ts +4 -4
- package/dist/types/components/vega-rich-text-editor/vega-rich-text-image-editor/vega-rich-text-image-editor.d.ts +1 -1
- package/dist/types/components/vega-rich-text-editor/vega-rich-text-link-editor/vega-rich-text-link-editor.d.ts +1 -1
- package/dist/types/components/vega-table/interface.d.ts +18 -0
- package/dist/types/components/vega-table/slimmers/controllers/dto/column-render-input-model.d.ts +13 -0
- package/dist/types/components/vega-table/slimmers/controllers/vega-table-body-col-span-controller.d.ts +43 -0
- package/dist/types/components/vega-table/slimmers/renderers/vega-table-body-col-span-resolver.d.ts +38 -0
- package/dist/types/components/vega-table/slimmers/renderers/vega-table-cell-renderer.d.ts +11 -2
- package/dist/types/components/vega-table/slimmers/renderers/vega-table-pinned-renderer.d.ts +4 -0
- package/dist/types/components/vega-table/slimmers/renderers/vega-table-row-renderer.d.ts +1 -0
- package/dist/types/components/vega-table/vega-table-cell/slimmers/controllers/vega-table-row-state-subscriber.d.ts +1 -1
- package/dist/types/components/vega-table/vega-table-cell/vega-table-cell.d.ts +9 -0
- package/dist/types/components/vega-table/vega-table-foot-cell/slimmers/renderers/vega-table-foot-cell-renderer.d.ts +1 -0
- package/dist/types/components/vega-table/vega-table-foot-cell/vega-table-foot-cell.d.ts +9 -0
- package/dist/types/components/vega-table/vega-table.d.ts +2 -0
- package/dist/types/components/vega-time-picker/slimmers/controllers/vega-time-picker-range-dropdown-controller.d.ts +1 -0
- package/dist/types/components/vega-time-picker/slimmers/controllers/vega-time-picker-single-dropdown-controller.d.ts +1 -0
- package/dist/types/components/vega-time-picker/types.d.ts +7 -0
- package/dist/types/components/vega-time-picker/vega-time-picker.d.ts +11 -1
- package/dist/types/components.d.ts +114 -3
- package/dist/types/constants/ui.d.ts +1 -1
- package/dist/types/global/icons/copy.d.ts +3 -0
- package/dist/types/helpers/event-manager/event-id/vega-event-id.d.ts +1 -0
- package/dist/types/helpers/translation/interface.d.ts +20 -1
- package/dist/types/helpers/ui/element-appender.d.ts +4 -1
- package/dist/types/types/components.type.d.ts +5 -1
- package/dist/types/types/ui.type.d.ts +1 -1
- package/dist/vega/index.esm.js +1 -1
- package/dist/vega/{p-94845302.entry.js → p-05f937c5.entry.js} +1 -1
- package/dist/vega/p-07562b9c.js +1 -0
- package/dist/vega/p-09d50f59.entry.js +1 -0
- package/dist/vega/{p-cc8bf6e7.entry.js → p-0cb78838.entry.js} +1 -1
- package/dist/vega/p-0e607b44.js +1 -0
- package/dist/vega/{p-1acd5f04.entry.js → p-0f1d6ceb.entry.js} +1 -1
- package/dist/vega/{p-ef44d516.js → p-140616fe.js} +1 -1
- package/dist/vega/{p-e75e75c9.entry.js → p-1818f399.entry.js} +1 -1
- package/dist/vega/{p-4037126d.js → p-18a5e8bc.js} +1 -1
- package/dist/vega/{p-2b22091e.js → p-19c42e30.js} +1 -1
- package/dist/vega/{p-c87c7ef4.js → p-1efab41b.js} +1 -1
- package/dist/vega/{p-cd2a1ffb.js → p-21e21f51.js} +1 -1
- package/dist/vega/{p-4644ccf9.entry.js → p-26c7fe8b.entry.js} +1 -1
- package/dist/vega/p-282b37cb.js +1 -0
- package/dist/vega/p-29e3eb12.js +1 -0
- package/dist/vega/{p-6ecb3c7d.entry.js → p-2dc5edd0.entry.js} +1 -1
- package/dist/vega/{p-014e2cf9.js → p-2de61f1b.js} +1 -1
- package/dist/vega/{p-b77e85e0.entry.js → p-2de88b4a.entry.js} +1 -1
- package/dist/vega/{p-12b5c5e3.entry.js → p-2fcc604c.entry.js} +1 -1
- package/dist/vega/{p-73b9868f.js → p-32a67ba1.js} +1 -1
- package/dist/vega/p-392e049c.entry.js +1 -0
- package/dist/vega/{p-70352240.entry.js → p-3932f964.entry.js} +1 -1
- package/dist/vega/{p-5ffc7cb8.js → p-3a68b729.js} +1 -1
- package/dist/vega/{p-9e327397.entry.js → p-3c9da3cd.entry.js} +1 -1
- package/dist/vega/{p-4cef4812.js → p-3f183b52.js} +1 -1
- package/dist/vega/{p-216ef41e.entry.js → p-3f7b10b9.entry.js} +1 -1
- package/dist/vega/{p-64b5fe2a.entry.js → p-422d88ae.entry.js} +1 -1
- package/dist/vega/p-4256252c.js +3 -0
- package/dist/vega/{p-329c808e.entry.js → p-44439ecc.entry.js} +1 -1
- package/dist/vega/p-45e8424a.entry.js +1 -0
- package/dist/vega/p-4c49b2e3.js +1 -0
- package/dist/vega/{p-a14d8767.js → p-4d9562bc.js} +1 -1
- package/dist/vega/p-4e1aa86f.js +1 -0
- package/dist/vega/p-4ef5c4a7.entry.js +1 -0
- package/dist/vega/{p-7f086e54.entry.js → p-4f327808.entry.js} +1 -1
- package/dist/vega/{p-8019c156.js → p-5139e516.js} +1 -1
- package/dist/vega/{p-5bed3fd2.entry.js → p-56c4e349.entry.js} +1 -1
- package/dist/vega/{p-fea33425.js → p-5dbfffcd.js} +1 -1
- package/dist/vega/p-5f377954.js +1 -1
- package/dist/vega/p-615a2b8c.entry.js +1 -0
- package/dist/vega/{p-aaa6e976.entry.js → p-63101cb4.entry.js} +1 -1
- package/dist/vega/{p-a4826f3f.entry.js → p-653a6dd8.entry.js} +1 -1
- package/dist/vega/{p-044496e0.entry.js → p-66b7d1c7.entry.js} +1 -1
- package/dist/vega/{p-42a1d300.entry.js → p-6712a9c7.entry.js} +1 -1
- package/dist/vega/p-698fbd73.js +1 -0
- package/dist/vega/p-6ad7144a.entry.js +1 -0
- package/dist/vega/{p-6e7c1b19.entry.js → p-6b1893f6.entry.js} +1 -1
- package/dist/vega/{p-cec8ffdc.js → p-6d40635e.js} +1 -1
- package/dist/vega/{p-81591449.entry.js → p-73fd18d9.entry.js} +1 -1
- package/dist/vega/p-751a5cd6.entry.js +1 -0
- package/dist/vega/{p-42f3c0b1.entry.js → p-7b93a756.entry.js} +1 -1
- package/dist/vega/p-7c8e579e.entry.js +1 -0
- package/dist/vega/{p-0707aa21.js → p-7d54e9c1.js} +1 -1
- package/dist/vega/p-832d1a72.entry.js +1 -0
- package/dist/vega/p-846b1ab9.entry.js +1 -0
- package/dist/vega/p-88863658.js +1 -0
- package/dist/vega/p-88a6c89a.js +1 -0
- package/dist/vega/p-890a5254.js +1 -0
- package/dist/vega/{p-14bfc113.js → p-8bc15ed0.js} +1 -1
- package/dist/vega/{p-50d7a1c4.entry.js → p-8c1a5fa4.entry.js} +1 -1
- package/dist/vega/p-8d27b9cc.js +1 -0
- package/dist/vega/{p-3863187f.entry.js → p-944b43ce.entry.js} +1 -1
- package/dist/vega/{p-aea912ac.js → p-95d6c85f.js} +1 -1
- package/dist/vega/{p-da067259.entry.js → p-99b699be.entry.js} +1 -1
- package/dist/vega/{p-d00b3910.js → p-9a01be93.js} +1 -1
- package/dist/vega/p-9a472a04.entry.js +1 -0
- package/dist/vega/{p-e9a82603.entry.js → p-9cafbc26.entry.js} +1 -1
- package/dist/vega/{p-cd21adb8.js → p-a2bd621e.js} +1 -1
- package/dist/vega/{p-5a4e598f.js → p-a359e53c.js} +1 -1
- package/dist/vega/p-a9a87b9a.js +1 -0
- package/dist/vega/p-acbba6da.entry.js +1 -0
- package/dist/vega/{p-c75872a4.entry.js → p-ad35dea4.entry.js} +1 -1
- package/dist/vega/{p-8bc23bcf.entry.js → p-af98539f.entry.js} +1 -1
- package/dist/vega/{p-141f74ff.js → p-afb96938.js} +1 -1
- package/dist/vega/{p-6820b488.entry.js → p-b042e3b4.entry.js} +1 -1
- package/dist/vega/{p-822f70b0.js → p-b1ff70bf.js} +1 -1
- package/dist/vega/{p-c65a5778.entry.js → p-b39d4a88.entry.js} +1 -1
- package/dist/vega/{p-5df53125.entry.js → p-b5bee669.entry.js} +1 -1
- package/dist/vega/p-b5f308ee.entry.js +1 -0
- package/dist/vega/p-b6225d01.js +1 -0
- package/dist/vega/{p-8982796b.entry.js → p-bbabb1c8.entry.js} +1 -1
- package/dist/vega/p-bbf1f988.entry.js +1 -0
- package/dist/vega/{p-5fcb825c.entry.js → p-c2d28797.entry.js} +1 -1
- package/dist/vega/{p-42ed76ee.entry.js → p-c3c0e415.entry.js} +1 -1
- package/dist/vega/{p-5e282e41.js → p-c553d37e.js} +1 -1
- package/dist/vega/{p-2f48162f.entry.js → p-c5ecbc53.entry.js} +1 -1
- package/dist/vega/p-c9c6daa6.entry.js +1 -0
- package/dist/vega/p-cb81fc2a.entry.js +1 -0
- package/dist/vega/p-ccb9bf86.js +1 -0
- package/dist/vega/{p-49b4ab2b.js → p-ccf7518b.js} +1 -1
- package/dist/vega/{p-da2b1fd0.entry.js → p-cf8d5b3f.entry.js} +1 -1
- package/dist/vega/{p-bb0040d4.entry.js → p-d3a36d19.entry.js} +1 -1
- package/dist/vega/{p-ce27c273.entry.js → p-d44943e2.entry.js} +1 -1
- package/dist/vega/{p-ae728041.entry.js → p-d4bb6f93.entry.js} +1 -1
- package/dist/vega/p-d62b85ff.entry.js +1 -0
- package/dist/vega/p-d7f32ccf.entry.js +1 -0
- package/dist/vega/{p-d0060bdb.js → p-dca3278f.js} +1 -1
- package/dist/vega/{p-15da9d58.entry.js → p-ddd28a8e.entry.js} +1 -1
- package/dist/vega/p-ddf03de1.entry.js +1 -0
- package/dist/vega/{p-21775cc7.js → p-e0ecafca.js} +1 -1
- package/dist/vega/p-e33e1e90.js +1 -0
- package/dist/vega/{p-316a1e5c.entry.js → p-e410c4ad.entry.js} +1 -1
- package/dist/vega/p-e4309574.js +1 -0
- package/dist/vega/p-e5187a86.entry.js +1 -0
- package/dist/vega/{p-335e3237.entry.js → p-e86c6802.entry.js} +1 -1
- package/dist/vega/{p-4979fd7d.js → p-ef605271.js} +1 -1
- package/dist/vega/{p-0e03daa6.js → p-f0d4c78c.js} +1 -1
- package/dist/vega/p-f2f22b5d.entry.js +1 -0
- package/dist/vega/{p-58a00869.entry.js → p-f8a29127.entry.js} +1 -1
- package/dist/vega/{p-a04b95aa.entry.js → p-fbd3be00.entry.js} +1 -1
- package/dist/vega/p-fd70418f.js +1 -0
- package/dist/vega/{p-9756c6b9.entry.js → p-fda6e2cc.entry.js} +1 -1
- package/dist/vega/p-ff8dd200.js +1 -0
- package/dist/vega/{p-522dd15f.entry.js → p-ffdacaf9.entry.js} +1 -1
- package/dist/vega/vega.esm.js +1 -1
- package/package.json +2 -16
- package/readme.md +0 -5
- package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/input-event-handler/delete-content-handler.js +0 -92
- package/dist/types/components/vega-rich-text-editor/slimmers/controllers/helper/input-event-handler/delete-content-handler.d.ts +0 -26
- package/dist/vega/p-0605c656.entry.js +0 -1
- package/dist/vega/p-144d4b30.js +0 -1
- package/dist/vega/p-2944c76e.entry.js +0 -1
- package/dist/vega/p-3372f34a.entry.js +0 -1
- package/dist/vega/p-3cf298a4.entry.js +0 -1
- package/dist/vega/p-3fe43f7a.entry.js +0 -1
- package/dist/vega/p-507612f6.entry.js +0 -1
- package/dist/vega/p-53ed3b1f.js +0 -1
- package/dist/vega/p-57f7c257.js +0 -1
- package/dist/vega/p-5e1cd1cc.js +0 -1
- package/dist/vega/p-5e1ec2b8.entry.js +0 -1
- package/dist/vega/p-61d42e9b.entry.js +0 -1
- package/dist/vega/p-63ae5ada.entry.js +0 -1
- package/dist/vega/p-66905cbf.js +0 -1
- package/dist/vega/p-689070f9.entry.js +0 -1
- package/dist/vega/p-74fa0f5b.entry.js +0 -1
- package/dist/vega/p-7bb39b97.js +0 -1
- package/dist/vega/p-7f139b74.js +0 -1
- package/dist/vega/p-85d78ac1.js +0 -1
- package/dist/vega/p-92a144bc.js +0 -1
- package/dist/vega/p-9f608b97.js +0 -1
- package/dist/vega/p-aca134a3.entry.js +0 -1
- package/dist/vega/p-b2f89dbd.js +0 -1
- package/dist/vega/p-b2f9698a.entry.js +0 -1
- package/dist/vega/p-b504a8b4.entry.js +0 -1
- package/dist/vega/p-b7b0930a.entry.js +0 -1
- package/dist/vega/p-bd94b904.entry.js +0 -1
- package/dist/vega/p-c0c2a917.js +0 -3
- package/dist/vega/p-c40555c4.entry.js +0 -1
- package/dist/vega/p-cb4033ef.js +0 -1
- package/dist/vega/p-d14ddf80.js +0 -1
- package/dist/vega/p-dc78e8d6.js +0 -1
- package/dist/vega/p-ddc2d219.js +0 -1
- package/dist/vega/p-f362c07b.entry.js +0 -1
- package/dist/vega/p-fb1ef3e6.entry.js +0 -1
- package/dist/vega/p-fc103347.entry.js +0 -1
- /package/dist/cjs/{feature-flag-controller-438a1510.js → feature-flag-controller-c19d0b58.js} +0 -0
- /package/dist/collection/{components/vega-code-block/assets → global/icons}/copy.js +0 -0
- /package/dist/esm/{feature-flag-controller-2a89f20c.js → feature-flag-controller-3fd04ea9.js} +0 -0
- /package/dist/types/components/{vega-code-block/assets/copy.d.ts → vega-rich-text-editor/assets/cut.d.ts} +0 -0
- /package/dist/vega/{p-bc73ce30.js → p-87a4d75f.js} +0 -0
|
@@ -5,33 +5,35 @@ import { s as sanitizeVegaComponent } from './component-7d906393.js';
|
|
|
5
5
|
import { c as createEnterKeyHandlerToTriggerClick } from './accessibility-6af5cf2e.js';
|
|
6
6
|
import { C as ChangeManager } from './change-manager-6a7eb88c.js';
|
|
7
7
|
import { d as domNodeSubjectFactory, D as DomNodeSubjectObserverFactory } from './dom-node-subject-observer-factory-ddff8662.js';
|
|
8
|
-
import {
|
|
9
|
-
import { ai as VegaRTEOneRowHeightPx, R as RTETextNode, aj as BoldAnnotationAction, N as NodeAnnotationTypeEnum, ak as ItalicAnnotationAction, al as UnderlineAnnotationAction, b as RTETextBlock, T as TextStyleAnnotationAction,
|
|
10
|
-
import { d as RTEDTORendererManager, V as VegaRTELinkExtension } from './link-extension-
|
|
11
|
-
import { i as isNonNullable } from './type-guard-
|
|
8
|
+
import { t as VegaInternalComponentDidRender, e as VegaInternalRichTextEditorFlushChanges, d as VegaInternalRichTextEditDeleteSelectedNodes, H as VegaInternalRichTextImageClick, I as VegaInternalRichTextImageDeleteButtonClicked, z as VegaInternalCodeBlockBlur, a as VegaInternalPopoverUpdateTarget } from './vega-internal-event-id-827eb1ce.js';
|
|
9
|
+
import { ai as VegaRTEOneRowHeightPx, R as RTETextNode, aj as BoldAnnotationAction, N as NodeAnnotationTypeEnum, ak as ItalicAnnotationAction, al as UnderlineAnnotationAction, b as RTETextBlock, T as TextStyleAnnotationAction, a3 as TextStyleAnnotation, am as BoldAnnotation, F as BlockAnnotationTypeEnum, an as ClearFormattingAnnotationAction, ao as CodeAnnotationAction, ap as StrikethroughAnnotationAction, ag as SelectionChangeAction, ae as LinkAnnotationAction, aq as IndentAnnotationAction, M as ModifyContentAction, i as ModifyContentActionType, q as RTECodeBlockNode, A as ActionHandleStrategyRegistry, H as HorizontalAlignmentAnnotationAction, s as stateEntityRenderingRegistry, e as AppendChildrenAction, ad as ZERO_WIDTH_SPACE, U as UpdateTextAction, g as InsertChildrenBeforeAction, S as SplitBlockWithNodeAction, f as RTENode, a as RTEBlock, k as RemoveChildrenAction, O as ReplaceChildNodesAction, ar as escapeHtml, p as RTECodeBlock, I as InsertChildrenAfterAction, V as VegaRTEPresetToolbarItems, ac as VegaRTEDefaultTextStyleItems } from './code-block-ae2337c2.js';
|
|
10
|
+
import { d as RTEDTORendererManager, V as VegaRTELinkExtension } from './link-extension-74eaa826.js';
|
|
11
|
+
import { i as isNonNullable } from './type-guard-2bfb2c7b.js';
|
|
12
12
|
import { V as VegaInternalIconManager } from './internal-icon-manager-e7c57096.js';
|
|
13
|
-
import { V as VisualModeToolbarButtonSlimmer, I as ImageAnnotationAction, a as ToolbarButtonSlimmer, T as TextColorToolbarButtonSlimmer, n as normalizeUrlByDefaultProtocol } from './image-annotation-action-
|
|
14
|
-
import { V as VegaDropdownClick,
|
|
13
|
+
import { V as VisualModeToolbarButtonSlimmer, I as ImageAnnotationAction, a as ToolbarButtonSlimmer, T as TextColorToolbarButtonSlimmer, n as normalizeUrlByDefaultProtocol } from './image-annotation-action-4c77d314.js';
|
|
14
|
+
import { V as VegaDropdownClick, d as VegaChange, a as VegaClick, a0 as VegaImageInserted, a1 as VegaSourceCodeChange, c as VegaPopoverShow, b as VegaPopoverHide } from './vega-event-id-270fe47e.js';
|
|
15
15
|
import { g as generateUUID } from './misc-9fdbcfbb.js';
|
|
16
|
-
import { w as waitForComponentDidRender } from './wait-for-component-did-render-
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import { c as
|
|
20
|
-
import {
|
|
16
|
+
import { w as waitForComponentDidRender } from './wait-for-component-did-render-0c237cb8.js';
|
|
17
|
+
import { V as VegaRTEImageExtension } from './image-extension-7108c27d.js';
|
|
18
|
+
import { F as FormFieldControllerSlimmer } from './form-field-controller-slimmer-a1c7b28c.js';
|
|
19
|
+
import { c as createEventEmitSlimmer } from './event-emit-slimmer-db4a82e0.js';
|
|
20
|
+
import { c as createSubStateNotifySlimmer } from './sub-state-notify-slimmer-0f72ce74.js';
|
|
21
|
+
import { f as RTEImageNode, b as RTEListItemBlock, V as VegaRTEContent, M as MergeTwoBlocksNodesAction, I as InsertNewParagraphAction, S as StylePreservator, i as ElementToDtoStrategyProcessor, R as RTEImageBlock } from './content-state-c3b85ae6.js';
|
|
21
22
|
import { b as AlignLeft, A as AlignCenter, c as AlignRight, a as AlignJustify } from './align-left-7f959adf.js';
|
|
22
|
-
import { R as RTESelectionState, C as ComponentValueHistoryControllerSlimmer, a as SelectionController } from './component-value-history-controller-slimmer.abstract-
|
|
23
|
+
import { R as RTESelectionState, C as ComponentValueHistoryControllerSlimmer, a as SelectionController } from './component-value-history-controller-slimmer.abstract-b1ee1b8e.js';
|
|
23
24
|
import { F as FORM_ELEMENT_VALUE_CHANGE } from './static-subject-title-1c86e974.js';
|
|
24
25
|
import { O as Observer } from './observer-3959f9dd.js';
|
|
25
26
|
import { d as debounce } from './timer-9321173b.js';
|
|
26
27
|
import { D as DarkModeStateControllerSlimmer } from './dark-mode-state-controller-slimmer-778dd929.js';
|
|
27
|
-
import { R as ReplaceSelectedTextAction } from './replace-selected-text-action-
|
|
28
|
-
import { R as RichTextEditorRequiredRule } from './rich-text-editor-required-rule-
|
|
29
|
-
import { C as ChildNodesEventPreventSlimmer } from './child-nodes-event-prevent-slimmer-
|
|
30
|
-
import { T as TranslationSlimmer } from './translation-slimmer-
|
|
28
|
+
import { R as ReplaceSelectedTextAction } from './replace-selected-text-action-c9278a0f.js';
|
|
29
|
+
import { R as RichTextEditorRequiredRule } from './rich-text-editor-required-rule-3047bab0.js';
|
|
30
|
+
import { C as ChildNodesEventPreventSlimmer } from './child-nodes-event-prevent-slimmer-96c14f5a.js';
|
|
31
|
+
import { T as TranslationSlimmer } from './translation-slimmer-3ea56354.js';
|
|
31
32
|
import { V as VegaInternalThemeManager } from './dark-mode-style-controller-ca5afd2d.js';
|
|
32
33
|
import { A as AutoRunWhenReRenderTaskQueueSlimmer } from './auto-run-when-re-render-task-queue-slimmer.abstract-27820d4c.js';
|
|
33
34
|
import { i as isArrayEqual } from './array-7888f339.js';
|
|
34
35
|
import { c as chevronDown } from './chevron-down-4a75d28e.js';
|
|
36
|
+
import { c as chevronUp } from './chevron-up-b1989751.js';
|
|
35
37
|
import { t as trashCan } from './trash-can-8819a939.js';
|
|
36
38
|
import { f as findParent } from './ui-d73f756a.js';
|
|
37
39
|
import { r as remoteInvocationRegistry } from './remote-invocation-registry-d69245c2.js';
|
|
@@ -40,7 +42,7 @@ import './typography-19c3b9be.js';
|
|
|
40
42
|
import './object-0c277f57.js';
|
|
41
43
|
import './breakpoints-d9faf11c.js';
|
|
42
44
|
import './ui-93922c59.js';
|
|
43
|
-
import './internal-translation-controller-
|
|
45
|
+
import './internal-translation-controller-09b8bd13.js';
|
|
44
46
|
import './icon-manager-4ef3f6dd.js';
|
|
45
47
|
import './create-public-api-runtime-metrics-slimmer-48f85199.js';
|
|
46
48
|
import './dynamic-slimmer-90b8af32.js';
|
|
@@ -51,13 +53,13 @@ import './breakpoints-332702ed.js';
|
|
|
51
53
|
import './internal-form-field-validation-rule.abstract-f5b6bdbf.js';
|
|
52
54
|
import './mutation-observer-slimmer-58ebc13c.js';
|
|
53
55
|
import './mutation-observer-filters-1a054fb0.js';
|
|
54
|
-
import './sub-state-observer-slimmer-
|
|
55
|
-
import './internal-vega-event-manager-
|
|
56
|
-
import './range-
|
|
57
|
-
import './keyboard-manager-slimmer-
|
|
58
|
-
import './keyboard-manager-
|
|
56
|
+
import './sub-state-observer-slimmer-64532d94.js';
|
|
57
|
+
import './internal-vega-event-manager-48690e5b.js';
|
|
58
|
+
import './range-8f877dbf.js';
|
|
59
|
+
import './keyboard-manager-slimmer-531ddb0e.js';
|
|
60
|
+
import './keyboard-manager-ec18721b.js';
|
|
59
61
|
import './vega-env-manager-8f8dc473.js';
|
|
60
|
-
import './feature-flag-controller-
|
|
62
|
+
import './feature-flag-controller-3fd04ea9.js';
|
|
61
63
|
import './index-9c9865c0.js';
|
|
62
64
|
import './tinycolor-polyfill-7be0eb93.js';
|
|
63
65
|
import './vega-nonce-manager-497e5eb5.js';
|
|
@@ -1033,6 +1035,7 @@ class ImageToolbarButtonSlimmer extends VisualModeToolbarButtonSlimmer {
|
|
|
1033
1035
|
super({
|
|
1034
1036
|
icon: 'image',
|
|
1035
1037
|
tooltip: { text: 'Image' },
|
|
1038
|
+
autoFocusOnClick: false,
|
|
1036
1039
|
});
|
|
1037
1040
|
this.insertURLImage = async () => {
|
|
1038
1041
|
const url = this.normalizeSafeImageUrl(this.insertURLInputRef.value);
|
|
@@ -1045,18 +1048,21 @@ class ImageToolbarButtonSlimmer extends VisualModeToolbarButtonSlimmer {
|
|
|
1045
1048
|
this.uploadInputRef.click();
|
|
1046
1049
|
break;
|
|
1047
1050
|
case 'url':
|
|
1048
|
-
|
|
1049
|
-
this.currentSelectedNodes = this.selectionController.getSelectedNodes();
|
|
1050
|
-
this.currentSelectedBlocks = this.selectionController.getSelectedBlocks();
|
|
1051
|
-
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
1052
|
-
this.host.parentElement.append(this.insertURLModalRef);
|
|
1053
|
-
this.insertURLInputRef.value = '';
|
|
1054
|
-
await this.insertURLModalRef.modal('show');
|
|
1055
|
-
await this.insertURLInputRef.doFocus();
|
|
1051
|
+
await this.openInsertURLModal();
|
|
1056
1052
|
break;
|
|
1057
1053
|
}
|
|
1058
1054
|
await this.dropdownRef.hide();
|
|
1059
1055
|
};
|
|
1056
|
+
this.openInsertURLModal = async () => {
|
|
1057
|
+
this.currentRange = this.selectionController.getCurrentRange();
|
|
1058
|
+
this.currentSelectedNodes = this.selectionController.getSelectedNodes();
|
|
1059
|
+
this.currentSelectedBlocks = this.selectionController.getSelectedBlocks();
|
|
1060
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
1061
|
+
this.host.parentElement.append(this.insertURLModalRef);
|
|
1062
|
+
this.insertURLInputRef.value = '';
|
|
1063
|
+
await this.insertURLModalRef.modal('show');
|
|
1064
|
+
await this.insertURLInputRef.doFocus();
|
|
1065
|
+
};
|
|
1060
1066
|
/**
|
|
1061
1067
|
* The below method is e2e-test covered in
|
|
1062
1068
|
* @see{module:should-update-url-properly-when-upload-images}
|
|
@@ -1078,15 +1084,33 @@ class ImageToolbarButtonSlimmer extends VisualModeToolbarButtonSlimmer {
|
|
|
1078
1084
|
};
|
|
1079
1085
|
}
|
|
1080
1086
|
renderBtnWrapper(renderBtn) {
|
|
1087
|
+
const shouldRenderDropdown = this.shouldRenderDropdown();
|
|
1088
|
+
const shouldRenderUpload = this.isImageUploadEnabled();
|
|
1089
|
+
const shouldRenderUrlInsertion = this.isImageURLInsertionEnabled();
|
|
1090
|
+
if (!shouldRenderUpload && !shouldRenderUrlInsertion) {
|
|
1091
|
+
return null;
|
|
1092
|
+
}
|
|
1081
1093
|
return (h("vega-box", null,
|
|
1082
|
-
h("vega-dropdown", { selectType: "none", trigger: "click", alignment: "center", ref: (ref) => {
|
|
1094
|
+
shouldRenderDropdown ? (h("vega-dropdown", { selectType: "none", trigger: "click", alignment: "center", ref: (ref) => {
|
|
1083
1095
|
this.dropdownRef = ref;
|
|
1084
1096
|
this.addDropdownObserver(ref);
|
|
1085
1097
|
} },
|
|
1086
1098
|
renderBtn({ showArrowIcon: true }),
|
|
1087
|
-
h("div", Object.assign({ slot: "items" }, super.preventLostFocus()), this.renderDropdownContent())),
|
|
1088
|
-
this.renderUploadInput(),
|
|
1089
|
-
this.renderInsertURLModal()));
|
|
1099
|
+
h("div", Object.assign({ slot: "items" }, super.preventLostFocus()), this.renderDropdownContent()))) : (renderBtn({})),
|
|
1100
|
+
shouldRenderUpload ? this.renderUploadInput() : null,
|
|
1101
|
+
shouldRenderUrlInsertion ? this.renderInsertURLModal() : null));
|
|
1102
|
+
}
|
|
1103
|
+
onClick() {
|
|
1104
|
+
if (this.shouldRenderDropdown()) {
|
|
1105
|
+
return;
|
|
1106
|
+
}
|
|
1107
|
+
if (this.isImageURLInsertionEnabled()) {
|
|
1108
|
+
void this.openInsertURLModal();
|
|
1109
|
+
return;
|
|
1110
|
+
}
|
|
1111
|
+
if (this.isImageUploadEnabled()) {
|
|
1112
|
+
this.uploadInputRef.click();
|
|
1113
|
+
}
|
|
1090
1114
|
}
|
|
1091
1115
|
isSelected() {
|
|
1092
1116
|
return false;
|
|
@@ -1099,10 +1123,20 @@ class ImageToolbarButtonSlimmer extends VisualModeToolbarButtonSlimmer {
|
|
|
1099
1123
|
this.shouldDisabledToolbar(selectedBlock, ModifyContentActionType.INSERT_IMAGE_TO_BLOCK));
|
|
1100
1124
|
}
|
|
1101
1125
|
renderDropdownContent() {
|
|
1102
|
-
return (h(Fragment, null,
|
|
1126
|
+
return (h(Fragment, null, this.getItems().map((item) => {
|
|
1103
1127
|
return (h("vega-dropdown-item", { key: item.key, itemKey: item.key }, this.translationSlimmer.t(item.label)));
|
|
1104
1128
|
})));
|
|
1105
1129
|
}
|
|
1130
|
+
getItems() {
|
|
1131
|
+
return ImageToolbarButtonSlimmer.allItems.filter((item) => {
|
|
1132
|
+
if (item.key === 'upload') {
|
|
1133
|
+
return this.isImageUploadEnabled();
|
|
1134
|
+
}
|
|
1135
|
+
else {
|
|
1136
|
+
return this.isImageURLInsertionEnabled();
|
|
1137
|
+
}
|
|
1138
|
+
});
|
|
1139
|
+
}
|
|
1106
1140
|
renderUploadInput() {
|
|
1107
1141
|
return (h("input", { type: "file", style: { display: 'none' }, ref: (node) => (this.uploadInputRef = node), accept: "image/*", onChange: this.fileInputChange }));
|
|
1108
1142
|
}
|
|
@@ -1135,6 +1169,18 @@ class ImageToolbarButtonSlimmer extends VisualModeToolbarButtonSlimmer {
|
|
|
1135
1169
|
addModalInsertObserver(buttonRef) {
|
|
1136
1170
|
DomNodeSubjectObserverFactory.addUniqueObserverToNode(buttonRef, VegaClick, this.insertURLImage);
|
|
1137
1171
|
}
|
|
1172
|
+
getImageExtensionConfig() {
|
|
1173
|
+
return VegaRTEImageExtension.configStore.get(this.host) || {};
|
|
1174
|
+
}
|
|
1175
|
+
isImageUploadEnabled() {
|
|
1176
|
+
return this.getImageExtensionConfig().enableImageUpload !== false;
|
|
1177
|
+
}
|
|
1178
|
+
isImageURLInsertionEnabled() {
|
|
1179
|
+
return this.getImageExtensionConfig().enableImageURLInsertion !== false;
|
|
1180
|
+
}
|
|
1181
|
+
shouldRenderDropdown() {
|
|
1182
|
+
return this.getItems().length > 1;
|
|
1183
|
+
}
|
|
1138
1184
|
/**
|
|
1139
1185
|
* The below method is e2e-test covered in
|
|
1140
1186
|
* @see{module:should-update-url-properly-when-upload-images}
|
|
@@ -1167,7 +1213,7 @@ class ImageToolbarButtonSlimmer extends VisualModeToolbarButtonSlimmer {
|
|
|
1167
1213
|
(() => {
|
|
1168
1214
|
VegaInternalIconManager.register({ image: image });
|
|
1169
1215
|
})();
|
|
1170
|
-
ImageToolbarButtonSlimmer.
|
|
1216
|
+
ImageToolbarButtonSlimmer.allItems = [
|
|
1171
1217
|
{
|
|
1172
1218
|
key: 'upload',
|
|
1173
1219
|
label: 'Upload from computer',
|
|
@@ -1893,7 +1939,7 @@ class BaseHandler {
|
|
|
1893
1939
|
* @returns {boolean} boolean result
|
|
1894
1940
|
*/
|
|
1895
1941
|
isEmptyParagraph(node) {
|
|
1896
|
-
return node && node.childNodes && node.childNodes.length === 0;
|
|
1942
|
+
return node && node.nodeType === Node.ELEMENT_NODE && node.childNodes && node.childNodes.length === 0;
|
|
1897
1943
|
}
|
|
1898
1944
|
/**
|
|
1899
1945
|
* Removes selected nodes within a range in a rich text editor content.
|
|
@@ -2254,7 +2300,7 @@ class InsertLineBreakHandler extends BaseHandler {
|
|
|
2254
2300
|
getNextRTENode(lineBreakNode) {
|
|
2255
2301
|
const index = lineBreakNode.parent.children.indexOf(lineBreakNode);
|
|
2256
2302
|
const nextNode = lineBreakNode.parent.children[index + 1];
|
|
2257
|
-
return nextNode
|
|
2303
|
+
return nextNode && nextNode.isContentEditable() ? nextNode : lineBreakNode;
|
|
2258
2304
|
}
|
|
2259
2305
|
}
|
|
2260
2306
|
|
|
@@ -2272,48 +2318,89 @@ class DeleteBlockContentAction extends ModifyContentAction {
|
|
|
2272
2318
|
}
|
|
2273
2319
|
}
|
|
2274
2320
|
|
|
2275
|
-
/**
|
|
2276
|
-
|
|
2321
|
+
/**
|
|
2322
|
+
* Hosts the deletion logic shared by the forward and backward delete handlers. Subclasses implement
|
|
2323
|
+
* the single-block deletion behaviour for their specific direction. User press backspace or delete
|
|
2324
|
+
* will trigger one of those subclasses.
|
|
2325
|
+
*/
|
|
2326
|
+
class AbstractDeleteContentHandler extends BaseHandler {
|
|
2277
2327
|
/**
|
|
2278
|
-
* Delete the selected node from the current state.
|
|
2328
|
+
* Delete the selected node(s) from the current state.
|
|
2279
2329
|
*/
|
|
2280
2330
|
handleEvent() {
|
|
2281
2331
|
const selectedBlocks = this.selectionController.getSelectedBlocks();
|
|
2282
|
-
if (selectedBlocks.length
|
|
2283
|
-
this.
|
|
2332
|
+
if (selectedBlocks.length >= 2) {
|
|
2333
|
+
this.deleteContentWithMultipleNodes();
|
|
2284
2334
|
}
|
|
2285
2335
|
else {
|
|
2286
|
-
this.
|
|
2336
|
+
this.deleteContentWithSingleBlock();
|
|
2287
2337
|
}
|
|
2288
2338
|
}
|
|
2289
2339
|
/**
|
|
2290
|
-
*
|
|
2340
|
+
* Computes the caret position one step to the right, used to translate a forward delete into a backspace.
|
|
2341
|
+
*
|
|
2342
|
+
* @param {Nullable<RTENode>} node - The node the caret is currently in.
|
|
2343
|
+
* @param {number} offset - The current caret offset within the node.
|
|
2344
|
+
* @returns {Nullable<ForwardDeletePosition>} The shifted position, or null when the caret is at the end of the content.
|
|
2291
2345
|
*/
|
|
2292
|
-
|
|
2293
|
-
|
|
2294
|
-
|
|
2295
|
-
const selectedBlocks = this.selectionController.getSelectedBlocks();
|
|
2296
|
-
const selectedNodes = this.selectionController.getSelectedNodes();
|
|
2297
|
-
if (startOffset !== endOffset || startContainer !== endContainer) {
|
|
2298
|
-
this.deleteContentWithMultipleNodes();
|
|
2346
|
+
getForwardDeletePosition(node, offset) {
|
|
2347
|
+
if (!node) {
|
|
2348
|
+
return null;
|
|
2299
2349
|
}
|
|
2300
|
-
|
|
2301
|
-
|
|
2302
|
-
|
|
2303
|
-
|
|
2304
|
-
|
|
2305
|
-
|
|
2306
|
-
|
|
2307
|
-
|
|
2308
|
-
}
|
|
2309
|
-
else if (deleteAction.nextNode) {
|
|
2310
|
-
this.selectionController.enqueueSelectionRangeFutureState(deleteAction.nextNode, 0);
|
|
2311
|
-
}
|
|
2312
|
-
else if (this.currentState.children.length === 0) {
|
|
2313
|
-
// Add a empty paragraph if delete all content to make sure the caret position
|
|
2314
|
-
this.insertDefaultParagraph();
|
|
2315
|
-
}
|
|
2350
|
+
// Delete the character to the right within the same node.
|
|
2351
|
+
if (offset < node.getRangeEndOffset()) {
|
|
2352
|
+
return { node, offset: offset + 1 };
|
|
2353
|
+
}
|
|
2354
|
+
// The caret is at the end of the node, move to the next node.
|
|
2355
|
+
const nextNode = this.getNextNode(node);
|
|
2356
|
+
if (!nextNode) {
|
|
2357
|
+
return null;
|
|
2316
2358
|
}
|
|
2359
|
+
// When the next node lives in the same block, the end of the current node and the
|
|
2360
|
+
// start of the next node are the same caret position, so the character to delete is
|
|
2361
|
+
// the first character of the next node, mirroring a backspace at offset 1.
|
|
2362
|
+
if (nextNode.parent === node.parent) {
|
|
2363
|
+
return { node: nextNode, offset: 1 };
|
|
2364
|
+
}
|
|
2365
|
+
// The next node lives in a different block, so deleting forward should merge that
|
|
2366
|
+
// block or remove the next line break, mirroring a backspace at the block start.
|
|
2367
|
+
return { node: nextNode, offset: 0 };
|
|
2368
|
+
}
|
|
2369
|
+
/**
|
|
2370
|
+
* Returns the next node relative to the given node, crossing block boundaries when needed.
|
|
2371
|
+
*
|
|
2372
|
+
* @param {RTENode} node - The current node.
|
|
2373
|
+
* @returns {Nullable<RTENode>} The next node, or null when the given node is the last node of the content.
|
|
2374
|
+
*/
|
|
2375
|
+
getNextNode(node) {
|
|
2376
|
+
const block = node.parent;
|
|
2377
|
+
const nodeIndex = block.children.indexOf(node);
|
|
2378
|
+
if (nodeIndex >= 0 && nodeIndex < block.children.length - 1) {
|
|
2379
|
+
return block.children[nodeIndex + 1];
|
|
2380
|
+
}
|
|
2381
|
+
const nextBlock = this.getNextBlock(block);
|
|
2382
|
+
return nextBlock ? nextBlock.getFirstNode() : null;
|
|
2383
|
+
}
|
|
2384
|
+
/**
|
|
2385
|
+
* Returns the next block relative to the given block, ascending out of nested list structures when needed.
|
|
2386
|
+
*
|
|
2387
|
+
* @param {RTEBlock} block - The current block.
|
|
2388
|
+
* @returns {Nullable<RTEBlock>} The next block, or null when the given block is the last block of the content.
|
|
2389
|
+
*/
|
|
2390
|
+
getNextBlock(block) {
|
|
2391
|
+
const parent = block.parent;
|
|
2392
|
+
if (!parent || !parent.children) {
|
|
2393
|
+
return null;
|
|
2394
|
+
}
|
|
2395
|
+
const siblings = parent.children;
|
|
2396
|
+
const blockIndex = siblings.indexOf(block);
|
|
2397
|
+
if (blockIndex >= 0 && siblings[blockIndex + 1]) {
|
|
2398
|
+
return siblings[blockIndex + 1];
|
|
2399
|
+
}
|
|
2400
|
+
if (parent instanceof RTEBlock) {
|
|
2401
|
+
return this.getNextBlock(parent);
|
|
2402
|
+
}
|
|
2403
|
+
return null;
|
|
2317
2404
|
}
|
|
2318
2405
|
/**
|
|
2319
2406
|
* Deletes the content within multiple nodes selected by the user.
|
|
@@ -2357,6 +2444,132 @@ class DeleteContentHandler extends BaseHandler {
|
|
|
2357
2444
|
}
|
|
2358
2445
|
}
|
|
2359
2446
|
|
|
2447
|
+
/** Handles a delete (rightward) deletion of content within a VegaRTE editor. User press delete will trigger this method */
|
|
2448
|
+
class ForwardDeleteContentHandler extends AbstractDeleteContentHandler {
|
|
2449
|
+
/**
|
|
2450
|
+
* Handles a delete (rightward) deletion of content within a single block in an RTE editor.
|
|
2451
|
+
*/
|
|
2452
|
+
deleteContentWithSingleBlock() {
|
|
2453
|
+
const range = this.selectionController.getCurrentRange();
|
|
2454
|
+
const { startOffset, endOffset, startContainer, endContainer } = range;
|
|
2455
|
+
if (startOffset !== endOffset || startContainer !== endContainer) {
|
|
2456
|
+
this.deleteContentWithMultipleNodes();
|
|
2457
|
+
return;
|
|
2458
|
+
}
|
|
2459
|
+
const targetNode = this.selectionController.getSelectedNodes()[0];
|
|
2460
|
+
// The node that should hold the caret after a forward delete removes a non-editable
|
|
2461
|
+
// leading node (e.g. a function keyword or a token), so the caret stays put instead of
|
|
2462
|
+
// jumping backward to the previous block. Captured before the deletion detaches it.
|
|
2463
|
+
let forwardCaretAnchor = null;
|
|
2464
|
+
let resolvedNode = targetNode;
|
|
2465
|
+
let resolvedOffset = startOffset;
|
|
2466
|
+
// A forward delete on an empty node (e.g. an emptied function-block input box) mirrors
|
|
2467
|
+
// a backspace: the empty node itself is removed instead of shifting the caret into the
|
|
2468
|
+
// following block. Without this, the forward delete falls into the heterogeneous block
|
|
2469
|
+
// boundary branch below and only moves the caret, so an emptied input box could never
|
|
2470
|
+
// be removed with Delete even though Backspace removes it. The caret then lands on the
|
|
2471
|
+
// following content that shifts up into the emptied node's place.
|
|
2472
|
+
if (targetNode && targetNode.isTextNode() && targetNode.isEmpty()) {
|
|
2473
|
+
forwardCaretAnchor = this.getNextNode(targetNode);
|
|
2474
|
+
}
|
|
2475
|
+
else {
|
|
2476
|
+
// A forward delete is equivalent to moving the caret one step to the right and
|
|
2477
|
+
// then performing a backspace, so we can reuse the existing backspace logic.
|
|
2478
|
+
const forwardPosition = this.getForwardDeletePosition(targetNode, startOffset);
|
|
2479
|
+
// The caret is at the very end of the content, there is nothing to delete forward.
|
|
2480
|
+
if (!forwardPosition) {
|
|
2481
|
+
return;
|
|
2482
|
+
}
|
|
2483
|
+
// Mirror backspace at heterogeneous block boundaries: a forward delete that crosses
|
|
2484
|
+
// into a following block of a different type (e.g. paragraph → list-item, or into an
|
|
2485
|
+
// image block) only moves the caret onto that block first; the next forward delete then
|
|
2486
|
+
// removes it, keeping Delete and Backspace consistent. When the following block is the
|
|
2487
|
+
// same type (e.g. a token at the start of the next paragraph) we let the deletion
|
|
2488
|
+
// proceed so the two blocks merge, mirroring a backspace at the start of that block.
|
|
2489
|
+
if (targetNode &&
|
|
2490
|
+
forwardPosition.node.parent !== targetNode.parent &&
|
|
2491
|
+
forwardPosition.node.parent.type !== targetNode.parent.type) {
|
|
2492
|
+
this.selectionController.enqueueSelectionRangeFutureState(forwardPosition.node, 0);
|
|
2493
|
+
return;
|
|
2494
|
+
}
|
|
2495
|
+
// When the caret sits at the start of a non-editable leading node (e.g. a function
|
|
2496
|
+
// keyword or a token), a forward delete removes that node. Visually the caret stays
|
|
2497
|
+
// put while the following content shifts up into its place, so the caret should land
|
|
2498
|
+
// on that next node rather than following the backspace's leftward move to the
|
|
2499
|
+
// previous block.
|
|
2500
|
+
if (targetNode && !targetNode.isContentEditable() && startOffset === 0) {
|
|
2501
|
+
forwardCaretAnchor = this.getNextNode(targetNode);
|
|
2502
|
+
}
|
|
2503
|
+
resolvedNode = forwardPosition.node;
|
|
2504
|
+
resolvedOffset = forwardPosition.offset;
|
|
2505
|
+
}
|
|
2506
|
+
/* istanbul ignore next */
|
|
2507
|
+
if (!resolvedNode) {
|
|
2508
|
+
return;
|
|
2509
|
+
}
|
|
2510
|
+
const deleteAction = new DeleteBlockContentAction(resolvedNode, resolvedOffset);
|
|
2511
|
+
resolvedNode.parent.apply(deleteAction);
|
|
2512
|
+
if (forwardCaretAnchor) {
|
|
2513
|
+
// A non-editable anchor (e.g. a token) expresses its caret position at the
|
|
2514
|
+
// parent-block level: its range container is the parent element, so an offset of
|
|
2515
|
+
// 0 would put the caret at the very start of the block (jumping to the far left)
|
|
2516
|
+
// instead of just before the anchor. Use the anchor's index within its parent so
|
|
2517
|
+
// the caret lands right before it, on the spot the deleted node used to occupy.
|
|
2518
|
+
const forwardCaretOffset = forwardCaretAnchor.isContentEditable()
|
|
2519
|
+
? 0
|
|
2520
|
+
: forwardCaretAnchor.parent.children.indexOf(forwardCaretAnchor);
|
|
2521
|
+
this.selectionController.enqueueSelectionRangeFutureState(forwardCaretAnchor, forwardCaretOffset);
|
|
2522
|
+
}
|
|
2523
|
+
else if (deleteAction.previousNode) {
|
|
2524
|
+
const nextOffset = deleteAction.previousNode === resolvedNode
|
|
2525
|
+
? Math.max(0, resolvedOffset - 1)
|
|
2526
|
+
: deleteAction.previousNode.getRangeEndOffset();
|
|
2527
|
+
this.selectionController.enqueueSelectionRangeFutureState(deleteAction.previousNode, nextOffset);
|
|
2528
|
+
}
|
|
2529
|
+
else if (deleteAction.nextNode) {
|
|
2530
|
+
this.selectionController.enqueueSelectionRangeFutureState(deleteAction.nextNode, 0);
|
|
2531
|
+
}
|
|
2532
|
+
else if (this.currentState.children.length === 0) {
|
|
2533
|
+
// Add a empty paragraph if delete all content to make sure the caret position
|
|
2534
|
+
this.insertDefaultParagraph();
|
|
2535
|
+
}
|
|
2536
|
+
}
|
|
2537
|
+
}
|
|
2538
|
+
|
|
2539
|
+
/** Handles a backspace (leftward) deletion of content within a VegaRTE editor. User press backspace will trigger this method */
|
|
2540
|
+
class BackwardDeleteContentHandler extends AbstractDeleteContentHandler {
|
|
2541
|
+
/**
|
|
2542
|
+
* Handles a backspace (leftward) deletion of content within a single block in an RTE editor.
|
|
2543
|
+
*/
|
|
2544
|
+
deleteContentWithSingleBlock() {
|
|
2545
|
+
const range = this.selectionController.getCurrentRange();
|
|
2546
|
+
const { startOffset, endOffset, startContainer, endContainer } = range;
|
|
2547
|
+
if (startOffset !== endOffset || startContainer !== endContainer) {
|
|
2548
|
+
this.deleteContentWithMultipleNodes();
|
|
2549
|
+
return;
|
|
2550
|
+
}
|
|
2551
|
+
const targetNode = this.selectionController.getSelectedNodes()[0];
|
|
2552
|
+
if (!targetNode) {
|
|
2553
|
+
return;
|
|
2554
|
+
}
|
|
2555
|
+
const deleteAction = new DeleteBlockContentAction(targetNode, startOffset);
|
|
2556
|
+
targetNode.parent.apply(deleteAction);
|
|
2557
|
+
if (deleteAction.previousNode) {
|
|
2558
|
+
const nextOffset = deleteAction.previousNode === targetNode
|
|
2559
|
+
? Math.max(0, startOffset - 1)
|
|
2560
|
+
: deleteAction.previousNode.getRangeEndOffset();
|
|
2561
|
+
this.selectionController.enqueueSelectionRangeFutureState(deleteAction.previousNode, nextOffset);
|
|
2562
|
+
}
|
|
2563
|
+
else if (deleteAction.nextNode) {
|
|
2564
|
+
this.selectionController.enqueueSelectionRangeFutureState(deleteAction.nextNode, 0);
|
|
2565
|
+
}
|
|
2566
|
+
else if (this.currentState.children.length === 0) {
|
|
2567
|
+
// Add a empty paragraph if delete all content to make sure the caret position
|
|
2568
|
+
this.insertDefaultParagraph();
|
|
2569
|
+
}
|
|
2570
|
+
}
|
|
2571
|
+
}
|
|
2572
|
+
|
|
2360
2573
|
/**
|
|
2361
2574
|
* Action to paste new content into current block.
|
|
2362
2575
|
*
|
|
@@ -2367,6 +2580,7 @@ class PasteContentAction extends ModifyContentAction {
|
|
|
2367
2580
|
constructor(blocksToBeInserted, startNode, startOffset, rteRange) {
|
|
2368
2581
|
super();
|
|
2369
2582
|
this.type = ModifyContentActionType.PASTE_CONTENT;
|
|
2583
|
+
this.futureFocusAtEnd = false;
|
|
2370
2584
|
this.blocksToBeInserted = blocksToBeInserted;
|
|
2371
2585
|
this.startNode = startNode;
|
|
2372
2586
|
this.startOffset = startOffset;
|
|
@@ -2384,18 +2598,107 @@ class InsertPasteHandler extends BaseHandler {
|
|
|
2384
2598
|
* @param {InputEvent} event - Paste event.
|
|
2385
2599
|
*/
|
|
2386
2600
|
handleEvent(event) {
|
|
2601
|
+
const currentRange = this.selectionController.getCurrentRange();
|
|
2602
|
+
const payload = this.getPastePayload(event);
|
|
2603
|
+
if (this.insertPlainTextInline(payload, currentRange)) {
|
|
2604
|
+
return;
|
|
2605
|
+
}
|
|
2387
2606
|
const blocks = this.parsePastedElements(event);
|
|
2388
|
-
const
|
|
2389
|
-
if (
|
|
2607
|
+
const startContainer = (currentRange === null || currentRange === void 0 ? void 0 : currentRange.startContainer) || undefined;
|
|
2608
|
+
if (!startContainer) {
|
|
2609
|
+
// When the selection/range is unavailable (e.g. the caret was lost while
|
|
2610
|
+
// the paste-mode chooser had focus), still append the pasted content to
|
|
2611
|
+
// the root so the paste is never silently dropped.
|
|
2612
|
+
this.insertBlocksToRoot(blocks);
|
|
2613
|
+
}
|
|
2614
|
+
else if (this.isRootContainer(startContainer)) {
|
|
2390
2615
|
this.insertBlocksToRoot(blocks);
|
|
2391
2616
|
// TODO: Need to check below logic, it seems not correct https://gethired.atlassian.net/browse/VD-7779
|
|
2392
2617
|
}
|
|
2393
2618
|
else if (this.isEmptyParagraph(startContainer)) {
|
|
2394
|
-
this.insertBlocksBeforeEmptyBlock(blocks);
|
|
2619
|
+
this.insertBlocksBeforeEmptyBlock(blocks, currentRange);
|
|
2395
2620
|
}
|
|
2396
2621
|
else {
|
|
2397
|
-
this.insertBlocksToContent(blocks);
|
|
2622
|
+
this.insertBlocksToContent(blocks, currentRange);
|
|
2623
|
+
}
|
|
2624
|
+
}
|
|
2625
|
+
/**
|
|
2626
|
+
* Inserts plain-text paste content into the current text node at caret position.
|
|
2627
|
+
*
|
|
2628
|
+
* @param {RTEPastePayload} payload - Clipboard payload.
|
|
2629
|
+
* @param {RTERange} currentRange - Current selection range.
|
|
2630
|
+
* @returns {boolean} True when inline insertion is handled.
|
|
2631
|
+
*/
|
|
2632
|
+
insertPlainTextInline(payload, currentRange) {
|
|
2633
|
+
var _a, _b;
|
|
2634
|
+
const selectedNodes = ((_b = (_a = this.selectionController).getSelectedNodes) === null || _b === void 0 ? void 0 : _b.call(_a)) || [];
|
|
2635
|
+
if (!this.shouldPasteAsInlinePlainText(payload, currentRange, selectedNodes)) {
|
|
2636
|
+
return false;
|
|
2637
|
+
}
|
|
2638
|
+
const text = payload.text.replace(/\r\n?/g, '\n');
|
|
2639
|
+
const cursorNode = selectedNodes.find((node) => node instanceof RTETextNode) || currentRange.startNode;
|
|
2640
|
+
if (!(cursorNode instanceof RTETextNode)) {
|
|
2641
|
+
return false;
|
|
2642
|
+
}
|
|
2643
|
+
cursorNode.apply(new ReplaceSelectedTextAction(text, currentRange));
|
|
2644
|
+
this.selectionController.enqueueSelectionRangeFutureState(cursorNode, currentRange.startOffset + text.length);
|
|
2645
|
+
return true;
|
|
2646
|
+
}
|
|
2647
|
+
/**
|
|
2648
|
+
* Determines whether the payload should be inserted as inline plain text.
|
|
2649
|
+
*
|
|
2650
|
+
* @param {RTEPastePayload} payload - Clipboard payload.
|
|
2651
|
+
* @param {RTERange} currentRange - Current selection range.
|
|
2652
|
+
* @param {RTENode[]} selectedNodes - Currently selected nodes.
|
|
2653
|
+
* @returns {boolean} True when inline plain-text insertion should be used.
|
|
2654
|
+
*/
|
|
2655
|
+
shouldPasteAsInlinePlainText(payload, currentRange, selectedNodes = []) {
|
|
2656
|
+
if (!currentRange || !currentRange.startContainer) {
|
|
2657
|
+
return false;
|
|
2658
|
+
}
|
|
2659
|
+
if (this.isRootContainer(currentRange.startContainer)) {
|
|
2660
|
+
return false;
|
|
2661
|
+
}
|
|
2662
|
+
const text = (payload.text || '').replace(/\r\n?/g, '\n');
|
|
2663
|
+
if (!text) {
|
|
2664
|
+
return false;
|
|
2665
|
+
}
|
|
2666
|
+
const html = payload.html || '';
|
|
2667
|
+
if (!html) {
|
|
2668
|
+
return true;
|
|
2398
2669
|
}
|
|
2670
|
+
const hasTextNodeSelection = selectedNodes.some((node) => node instanceof RTETextNode) ||
|
|
2671
|
+
currentRange.startNode instanceof RTETextNode;
|
|
2672
|
+
if (!hasTextNodeSelection) {
|
|
2673
|
+
return false;
|
|
2674
|
+
}
|
|
2675
|
+
// Use the inline plain‑text path only when HTML and plain text match exactly and no formatting exists;
|
|
2676
|
+
// otherwise route through the block path to preserve styles.
|
|
2677
|
+
const analysis = this.analyzeHtmlContent(html);
|
|
2678
|
+
return analysis.plainText === text && !analysis.hasFormatting;
|
|
2679
|
+
}
|
|
2680
|
+
/**
|
|
2681
|
+
* Analyzes HTML content to extract plain text and detect inline formatting,
|
|
2682
|
+
* parsing the HTML once to avoid redundant StylePreservation and DOMParser calls.
|
|
2683
|
+
*
|
|
2684
|
+
* @param {string} html - Clipboard text/html payload.
|
|
2685
|
+
* @returns {HtmlAnalysisResult} Analysis result with plainText and hasFormatting properties.
|
|
2686
|
+
*/
|
|
2687
|
+
analyzeHtmlContent(html) {
|
|
2688
|
+
const safeHtml = StylePreservator.preserve(html).getProcessedHtml();
|
|
2689
|
+
const parsedDoc = new DOMParser().parseFromString(safeHtml, 'text/html');
|
|
2690
|
+
const body = parsedDoc.body;
|
|
2691
|
+
// Extract plain text from the parsed document
|
|
2692
|
+
const plainText = (body.textContent || '').replace(/\r\n?/g, '\n');
|
|
2693
|
+
// Check for rich inline formatting
|
|
2694
|
+
let hasFormatting = Boolean(body.querySelector('b,strong,i,em,s,del,strike,u,mark'));
|
|
2695
|
+
if (!hasFormatting) {
|
|
2696
|
+
hasFormatting = Array.from(body.querySelectorAll('span')).some((span) => {
|
|
2697
|
+
const style = span.getAttribute('style') || span.getAttribute('data-style') || '';
|
|
2698
|
+
return this.styleContainsRichFormatting(style);
|
|
2699
|
+
});
|
|
2700
|
+
}
|
|
2701
|
+
return { plainText, hasFormatting };
|
|
2399
2702
|
}
|
|
2400
2703
|
/**
|
|
2401
2704
|
* Insert the blocks to root
|
|
@@ -2406,37 +2709,54 @@ class InsertPasteHandler extends BaseHandler {
|
|
|
2406
2709
|
this.currentState.apply(new AppendChildrenAction(blocks));
|
|
2407
2710
|
}
|
|
2408
2711
|
/**
|
|
2409
|
-
* Insert the blocks
|
|
2712
|
+
* Insert the blocks into the current content block at the specified range.
|
|
2410
2713
|
*
|
|
2411
2714
|
* @param { RTEContentBlock[]} blocks - blocks
|
|
2715
|
+
* @param { RTERange } rteRange - rteRange
|
|
2412
2716
|
*/
|
|
2413
|
-
insertBlocksToContent(blocks) {
|
|
2414
|
-
|
|
2717
|
+
insertBlocksToContent(blocks, rteRange) {
|
|
2718
|
+
var _a;
|
|
2719
|
+
const isCollapsedRange = rteRange.startNode === rteRange.endNode && rteRange.startOffset === rteRange.endOffset;
|
|
2720
|
+
const cursorNode = isCollapsedRange
|
|
2721
|
+
? rteRange.startNode
|
|
2722
|
+
: this.removeSelectionRange();
|
|
2415
2723
|
if (cursorNode && cursorNode.parent) {
|
|
2416
|
-
const
|
|
2417
|
-
const pasteAction = new PasteContentAction(blocks, cursorNode, startOffset);
|
|
2724
|
+
const pasteAction = new PasteContentAction(blocks, cursorNode, rteRange.startOffset, rteRange);
|
|
2418
2725
|
cursorNode.parent.apply(pasteAction);
|
|
2419
|
-
if (pasteAction.
|
|
2420
|
-
this.
|
|
2726
|
+
if (pasteAction.futureFocusNode) {
|
|
2727
|
+
this.selectionController.enqueueSelectionRangeFutureState(pasteAction.futureFocusNode, (_a = pasteAction.futureFocusNodeOffset) !== null && _a !== void 0 ? _a : 0);
|
|
2728
|
+
}
|
|
2729
|
+
else if (pasteAction.futureFocusBlock) {
|
|
2730
|
+
this.switchCaretPositionToNextElement(pasteAction.futureFocusBlock, pasteAction.futureFocusAtEnd);
|
|
2421
2731
|
}
|
|
2422
2732
|
}
|
|
2733
|
+
else {
|
|
2734
|
+
// No resolvable cursor position: fall back to appending at the root so
|
|
2735
|
+
// the pasted content is preserved instead of being discarded.
|
|
2736
|
+
this.insertBlocksToRoot(blocks);
|
|
2737
|
+
}
|
|
2423
2738
|
}
|
|
2424
2739
|
/**
|
|
2425
2740
|
* Insert the blocks before to current block
|
|
2426
2741
|
*
|
|
2427
2742
|
* @param { RTEContentBlock[]} blocks - blocks
|
|
2743
|
+
* @param { RTERange } rteRange - rteRange
|
|
2428
2744
|
*/
|
|
2429
|
-
insertBlocksBeforeEmptyBlock(blocks) {
|
|
2745
|
+
insertBlocksBeforeEmptyBlock(blocks, rteRange) {
|
|
2430
2746
|
const cursorNode = this.removeSelectionRange();
|
|
2431
|
-
/* istanbul ignore next */
|
|
2432
2747
|
const currentBlock = cursorNode === null || cursorNode === void 0 ? void 0 : cursorNode.parent;
|
|
2433
2748
|
if (currentBlock) {
|
|
2434
|
-
const pasteAction = new PasteContentAction(blocks,
|
|
2749
|
+
const pasteAction = new PasteContentAction(blocks, cursorNode, 0, rteRange);
|
|
2435
2750
|
currentBlock.apply(pasteAction);
|
|
2436
2751
|
if (pasteAction.futureFocusBlock) {
|
|
2437
|
-
this.switchCaretPositionToNextElement(pasteAction.futureFocusBlock);
|
|
2752
|
+
this.switchCaretPositionToNextElement(pasteAction.futureFocusBlock, pasteAction.futureFocusAtEnd);
|
|
2438
2753
|
}
|
|
2439
2754
|
}
|
|
2755
|
+
else {
|
|
2756
|
+
// No resolvable empty block: fall back to appending at the root so the
|
|
2757
|
+
// pasted content is preserved instead of being discarded.
|
|
2758
|
+
this.insertBlocksToRoot(blocks);
|
|
2759
|
+
}
|
|
2440
2760
|
}
|
|
2441
2761
|
/**
|
|
2442
2762
|
* Format and parse elements from user paste with simple style preservation.
|
|
@@ -2445,30 +2765,76 @@ class InsertPasteHandler extends BaseHandler {
|
|
|
2445
2765
|
* @returns {RTEContentBlock[]} - RTEContentBlock.
|
|
2446
2766
|
*/
|
|
2447
2767
|
parsePastedElements(event) {
|
|
2448
|
-
|
|
2768
|
+
const payload = this.getPastePayload(event);
|
|
2769
|
+
let pastedHTML = payload.html || '';
|
|
2449
2770
|
if (!pastedHTML) {
|
|
2450
|
-
|
|
2451
|
-
|
|
2771
|
+
pastedHTML = this.parsePlainText(payload.text || '');
|
|
2772
|
+
}
|
|
2773
|
+
else if (this.shouldTreatAsPlainTextPayload(pastedHTML)) {
|
|
2774
|
+
const plainSource = payload.text || this.extractPlainTextFromHtml(pastedHTML);
|
|
2775
|
+
pastedHTML = this.parsePlainText(plainSource);
|
|
2452
2776
|
}
|
|
2453
2777
|
const context = StylePreservator.preserve(pastedHTML);
|
|
2454
2778
|
const safeHtml = context.getProcessedHtml();
|
|
2455
2779
|
const parser = new DOMParser();
|
|
2456
2780
|
const parsedDoc = parser.parseFromString(safeHtml, 'text/html');
|
|
2781
|
+
const rootElements = Array.from(parsedDoc.body.childNodes);
|
|
2782
|
+
context.restore(rootElements);
|
|
2783
|
+
this.normalizeImportedHtmlArtifacts(parsedDoc.body);
|
|
2457
2784
|
const htmlElements = Array.from(parsedDoc.body.childNodes);
|
|
2458
|
-
|
|
2459
|
-
return ElementToDtoStrategyProcessor.process(htmlElements)
|
|
2785
|
+
const resultBlocks = ElementToDtoStrategyProcessor.process(htmlElements)
|
|
2460
2786
|
.filter(Boolean)
|
|
2461
2787
|
.map((output) => output.toDto())
|
|
2462
2788
|
.filter(Boolean);
|
|
2789
|
+
// Fallback for synthetic payloads: if strategy conversion yields no blocks
|
|
2790
|
+
// but we still have plain text, create paragraph/text blocks directly.
|
|
2791
|
+
if (resultBlocks.length === 0 && (payload.text || '').trim() !== '') {
|
|
2792
|
+
return this.buildPlainTextFallbackBlocks(payload.text);
|
|
2793
|
+
}
|
|
2794
|
+
return resultBlocks;
|
|
2463
2795
|
}
|
|
2464
2796
|
/**
|
|
2465
|
-
*
|
|
2797
|
+
* Extracts readable plain text from clipboard HTML.
|
|
2466
2798
|
*
|
|
2467
|
-
* @param {
|
|
2799
|
+
* @param {string} html - Clipboard text/html payload.
|
|
2800
|
+
* @returns {string} - Plain text extracted from HTML.
|
|
2468
2801
|
*/
|
|
2469
|
-
|
|
2802
|
+
extractPlainTextFromHtml(html) {
|
|
2803
|
+
// Preserve inline styles before parsing to avoid style-src-attr CSP violations.
|
|
2804
|
+
const safeHtml = StylePreservator.preserve(html).getProcessedHtml();
|
|
2805
|
+
const parsedDoc = new DOMParser().parseFromString(safeHtml, 'text/html');
|
|
2806
|
+
return (parsedDoc.body.textContent || '').replace(/\r\n?/g, '\n');
|
|
2807
|
+
}
|
|
2808
|
+
/**
|
|
2809
|
+
* Builds plain-text paragraph blocks when element strategy parsing returns no output.
|
|
2810
|
+
*
|
|
2811
|
+
* @param {string} text - Plain text clipboard content.
|
|
2812
|
+
* @returns {RTEContentBlock[]} Fallback text blocks.
|
|
2813
|
+
*/
|
|
2814
|
+
buildPlainTextFallbackBlocks(text) {
|
|
2815
|
+
return text.split('\n').map((line) => {
|
|
2816
|
+
const paragraph = new RTETextBlock(generateUUID(), 'paragraph');
|
|
2817
|
+
const textNode = new RTETextNode(`${paragraph.id}1`, line, paragraph);
|
|
2818
|
+
paragraph.apply(new AppendChildrenAction([textNode]));
|
|
2819
|
+
return paragraph;
|
|
2820
|
+
});
|
|
2821
|
+
}
|
|
2822
|
+
/**
|
|
2823
|
+
* Moves the caret to a block element in a rich text editor after paste.
|
|
2824
|
+
*
|
|
2825
|
+
* @param {RTEBlock} newBlock - Block element to move the caret to.
|
|
2826
|
+
* @param {boolean} atEnd - When true, places the caret after the last character of the block's last node; otherwise at offset 0 of the first node.
|
|
2827
|
+
*/
|
|
2828
|
+
switchCaretPositionToNextElement(newBlock, atEnd = false) {
|
|
2829
|
+
var _a, _b;
|
|
2470
2830
|
if (newBlock && newBlock.children) {
|
|
2471
|
-
|
|
2831
|
+
if (atEnd) {
|
|
2832
|
+
const lastNode = newBlock.children[newBlock.children.length - 1];
|
|
2833
|
+
this.selectionController.enqueueSelectionRangeFutureState(lastNode, (_b = (_a = lastNode.text) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0);
|
|
2834
|
+
}
|
|
2835
|
+
else {
|
|
2836
|
+
this.selectionController.enqueueSelectionRangeFutureState(newBlock.children[0], 0);
|
|
2837
|
+
}
|
|
2472
2838
|
}
|
|
2473
2839
|
}
|
|
2474
2840
|
/**
|
|
@@ -2478,16 +2844,217 @@ class InsertPasteHandler extends BaseHandler {
|
|
|
2478
2844
|
* @returns {string} - The formatted HTML string.
|
|
2479
2845
|
*/
|
|
2480
2846
|
parsePlainText(content) {
|
|
2847
|
+
if (this.shouldRenderAsCodeBlock(content)) {
|
|
2848
|
+
return `<pre><code>${escapeHtml(content)}</code></pre>`;
|
|
2849
|
+
}
|
|
2481
2850
|
const lines = content.split('\n');
|
|
2482
2851
|
return lines
|
|
2483
2852
|
.map((line) => {
|
|
2484
2853
|
if (line === '') {
|
|
2485
2854
|
return '<p>\n</p>';
|
|
2486
2855
|
}
|
|
2487
|
-
return `<p>${line}</p>`;
|
|
2856
|
+
return `<p>${escapeHtml(line)}</p>`;
|
|
2488
2857
|
})
|
|
2489
2858
|
.join('');
|
|
2490
2859
|
}
|
|
2860
|
+
/**
|
|
2861
|
+
* Detects whether plain text likely represents source code.
|
|
2862
|
+
*
|
|
2863
|
+
* @param {string} content - Clipboard plain text content.
|
|
2864
|
+
* @returns {boolean} True when the content should render as a code block.
|
|
2865
|
+
*/
|
|
2866
|
+
shouldRenderAsCodeBlock(content) {
|
|
2867
|
+
const normalized = content.replace(/\r\n?/g, '\n').trim();
|
|
2868
|
+
if (!normalized) {
|
|
2869
|
+
return false;
|
|
2870
|
+
}
|
|
2871
|
+
const hasMultipleLines = normalized.includes('\n');
|
|
2872
|
+
const hasHtmlLikeTag = /<\/?[a-z][\w:-]*[^>]*>/i.test(normalized);
|
|
2873
|
+
const hasCodeFence = normalized.startsWith('```') && normalized.endsWith('```');
|
|
2874
|
+
const hasProgrammingTokens = /[{};]|=>|\b(function|const|let|var|class|import|export|return)\b/.test(normalized);
|
|
2875
|
+
if (hasCodeFence) {
|
|
2876
|
+
return true;
|
|
2877
|
+
}
|
|
2878
|
+
return hasHtmlLikeTag || (hasMultipleLines && hasProgrammingTokens);
|
|
2879
|
+
}
|
|
2880
|
+
/**
|
|
2881
|
+
* Removes pasted website artifacts that can cause visual regressions in the editor,
|
|
2882
|
+
* such as heading anchor tooltips and empty wrappers.
|
|
2883
|
+
*
|
|
2884
|
+
* @param {HTMLElement} body - Parsed clipboard html body.
|
|
2885
|
+
*/
|
|
2886
|
+
normalizeImportedHtmlArtifacts(body) {
|
|
2887
|
+
this.removeHeadingArtifacts(body);
|
|
2888
|
+
this.removeEmptyBlocks(body);
|
|
2889
|
+
}
|
|
2890
|
+
/**
|
|
2891
|
+
* Removes heading copy-link/tooltip artifacts copied from documentation pages.
|
|
2892
|
+
*
|
|
2893
|
+
* @param {HTMLElement} body - Parsed clipboard html body.
|
|
2894
|
+
*/
|
|
2895
|
+
removeHeadingArtifacts(body) {
|
|
2896
|
+
const selectors = [
|
|
2897
|
+
'a.js-heading-link',
|
|
2898
|
+
'a.c-heading-link',
|
|
2899
|
+
'.js-tooltip-popover',
|
|
2900
|
+
'.c-tooltip-popover',
|
|
2901
|
+
'[role="tooltip"]',
|
|
2902
|
+
];
|
|
2903
|
+
body.querySelectorAll(selectors.join(',')).forEach((element) => element.remove());
|
|
2904
|
+
}
|
|
2905
|
+
/**
|
|
2906
|
+
* Removes empty block wrappers introduced by web copy/paste.
|
|
2907
|
+
*
|
|
2908
|
+
* @param {HTMLElement} body - Parsed clipboard html body.
|
|
2909
|
+
*/
|
|
2910
|
+
removeEmptyBlocks(body) {
|
|
2911
|
+
const blockSelectors = ['p', 'div', 'section', 'article'];
|
|
2912
|
+
body.querySelectorAll(blockSelectors.join(',')).forEach((element) => {
|
|
2913
|
+
if (this.isEmptyVisualBlock(element)) {
|
|
2914
|
+
element.remove();
|
|
2915
|
+
}
|
|
2916
|
+
});
|
|
2917
|
+
}
|
|
2918
|
+
/**
|
|
2919
|
+
* Checks whether a block is visually empty and safe to remove.
|
|
2920
|
+
*
|
|
2921
|
+
* @param {HTMLElement} element - Block element to inspect.
|
|
2922
|
+
* @returns {boolean} True when the block has no visible content.
|
|
2923
|
+
*/
|
|
2924
|
+
isEmptyVisualBlock(element) {
|
|
2925
|
+
if (element.tagName === 'DIV' && element.classList.contains('doc')) {
|
|
2926
|
+
return false;
|
|
2927
|
+
}
|
|
2928
|
+
const hasVisualChild = Boolean(element.querySelector('img,video,audio,iframe,canvas,svg,table,hr,pre,code,blockquote'));
|
|
2929
|
+
if (hasVisualChild) {
|
|
2930
|
+
return false;
|
|
2931
|
+
}
|
|
2932
|
+
return (element.textContent || '').trim() === '';
|
|
2933
|
+
}
|
|
2934
|
+
/**
|
|
2935
|
+
* Checks whether a text/html payload is effectively plain text.
|
|
2936
|
+
*
|
|
2937
|
+
* Some sources (e.g. terminals, code editors) place the copied text inside an
|
|
2938
|
+
* off-screen / visually hidden wrapper such as
|
|
2939
|
+
* `<pre><div style="position: absolute; left: -9999px;">text</div></pre>`.
|
|
2940
|
+
* Preserving that markup as rich content would render the pasted text
|
|
2941
|
+
* off-screen (appearing empty), so such payloads are treated as plain text.
|
|
2942
|
+
*
|
|
2943
|
+
* @param {string} html - Clipboard text/html payload.
|
|
2944
|
+
* @returns {boolean} True when the payload has no visible rich content.
|
|
2945
|
+
*/
|
|
2946
|
+
shouldTreatAsPlainTextPayload(html) {
|
|
2947
|
+
// Preserve inline styles before parsing to avoid style-src-attr CSP violations
|
|
2948
|
+
// triggered by DOMParser processing HTML with style= attributes.
|
|
2949
|
+
const safeHtml = StylePreservator.preserve(html).getProcessedHtml();
|
|
2950
|
+
const parsedDoc = new DOMParser().parseFromString(safeHtml, 'text/html');
|
|
2951
|
+
const body = parsedDoc.body;
|
|
2952
|
+
if (body.children.length === 0) {
|
|
2953
|
+
return true;
|
|
2954
|
+
}
|
|
2955
|
+
const visibleClone = body.cloneNode(true);
|
|
2956
|
+
visibleClone.querySelectorAll('[style],[data-style]').forEach((element) => {
|
|
2957
|
+
if (this.isVisuallyHiddenElement(element)) {
|
|
2958
|
+
element.remove();
|
|
2959
|
+
}
|
|
2960
|
+
});
|
|
2961
|
+
if ((visibleClone.textContent || '').trim() !== '') {
|
|
2962
|
+
return false;
|
|
2963
|
+
}
|
|
2964
|
+
const hasVisibleMedia = Boolean(visibleClone.querySelector('img,video,audio,iframe,table,svg,canvas,math,object,embed'));
|
|
2965
|
+
if (hasVisibleMedia) {
|
|
2966
|
+
return false;
|
|
2967
|
+
}
|
|
2968
|
+
// If no visible text/media remains but original HTML contained text, it was
|
|
2969
|
+
// likely wrapped in hidden/off-screen containers and should be treated as plain text.
|
|
2970
|
+
return (body.textContent || '').trim() !== '';
|
|
2971
|
+
}
|
|
2972
|
+
/**
|
|
2973
|
+
* Returns true when a CSS style string contains bold, italic, underline,
|
|
2974
|
+
* strikethrough, or color declarations.
|
|
2975
|
+
*
|
|
2976
|
+
* @param {string} style - Inline CSS style string.
|
|
2977
|
+
* @returns {boolean} True when the style contains rich formatting.
|
|
2978
|
+
*/
|
|
2979
|
+
styleContainsRichFormatting(style) {
|
|
2980
|
+
if (!style.trim()) {
|
|
2981
|
+
return false;
|
|
2982
|
+
}
|
|
2983
|
+
for (const declaration of style.split(';')) {
|
|
2984
|
+
const colonIndex = declaration.indexOf(':');
|
|
2985
|
+
if (colonIndex === -1) {
|
|
2986
|
+
continue;
|
|
2987
|
+
}
|
|
2988
|
+
const prop = declaration.slice(0, colonIndex).trim().toLowerCase();
|
|
2989
|
+
const value = declaration
|
|
2990
|
+
.slice(colonIndex + 1)
|
|
2991
|
+
.trim()
|
|
2992
|
+
.toLowerCase();
|
|
2993
|
+
switch (prop) {
|
|
2994
|
+
case 'font-weight':
|
|
2995
|
+
if (/bold|[5-9]\d{2}|1000/.test(value)) {
|
|
2996
|
+
return true;
|
|
2997
|
+
}
|
|
2998
|
+
break;
|
|
2999
|
+
case 'font-style':
|
|
3000
|
+
if (/italic|oblique/.test(value)) {
|
|
3001
|
+
return true;
|
|
3002
|
+
}
|
|
3003
|
+
break;
|
|
3004
|
+
case 'text-decoration':
|
|
3005
|
+
case 'text-decoration-line':
|
|
3006
|
+
if (/underline|line-through/.test(value)) {
|
|
3007
|
+
return true;
|
|
3008
|
+
}
|
|
3009
|
+
break;
|
|
3010
|
+
case 'color':
|
|
3011
|
+
case 'background-color':
|
|
3012
|
+
return true;
|
|
3013
|
+
}
|
|
3014
|
+
}
|
|
3015
|
+
return false;
|
|
3016
|
+
}
|
|
3017
|
+
/**
|
|
3018
|
+
* Determines whether an element is visually hidden or rendered off-screen
|
|
3019
|
+
* via its inline style, indicating a clipboard plain-text wrapper.
|
|
3020
|
+
*
|
|
3021
|
+
* @param {HTMLElement} element - Element to inspect.
|
|
3022
|
+
* @returns {boolean} True when the element is hidden or off-screen.
|
|
3023
|
+
*/
|
|
3024
|
+
isVisuallyHiddenElement(element) {
|
|
3025
|
+
const style = (element.getAttribute('style') ||
|
|
3026
|
+
element.getAttribute('data-style') ||
|
|
3027
|
+
'').toLowerCase();
|
|
3028
|
+
if (!style) {
|
|
3029
|
+
return false;
|
|
3030
|
+
}
|
|
3031
|
+
if (/display\s*:\s*none/.test(style) || /visibility\s*:\s*hidden/.test(style)) {
|
|
3032
|
+
return true;
|
|
3033
|
+
}
|
|
3034
|
+
if (/clip\s*:\s*rect\(\s*0/.test(style) || style.includes('clip-path')) {
|
|
3035
|
+
return true;
|
|
3036
|
+
}
|
|
3037
|
+
const isPositioned = /position\s*:\s*(absolute|fixed)/.test(style);
|
|
3038
|
+
const isOffScreen = /(left|top|right|bottom)\s*:\s*-\d{3,}px/.test(style);
|
|
3039
|
+
return isPositioned && isOffScreen;
|
|
3040
|
+
}
|
|
3041
|
+
/**
|
|
3042
|
+
* Resolves paste payload from DataTransfer and synthetic-event fallback payload.
|
|
3043
|
+
*
|
|
3044
|
+
* @param {InputEvent} event - Paste event.
|
|
3045
|
+
* @returns {RTEPastePayload} - Paste payload.
|
|
3046
|
+
*/
|
|
3047
|
+
getPastePayload(event) {
|
|
3048
|
+
const eventPayload = event
|
|
3049
|
+
.rtePastePayload || { html: '', text: '' };
|
|
3050
|
+
if (!event.dataTransfer) {
|
|
3051
|
+
return eventPayload;
|
|
3052
|
+
}
|
|
3053
|
+
return {
|
|
3054
|
+
html: event.dataTransfer.getData('text/html') || eventPayload.html || '',
|
|
3055
|
+
text: event.dataTransfer.getData('text/plain') || eventPayload.text || '',
|
|
3056
|
+
};
|
|
3057
|
+
}
|
|
2491
3058
|
}
|
|
2492
3059
|
|
|
2493
3060
|
var __decorate$i = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
@@ -2503,7 +3070,8 @@ class UserInputController extends VegaSlimmer {
|
|
|
2503
3070
|
this.insertTextHandler = new InsertTextHandler();
|
|
2504
3071
|
this.insertParagraphHandler = new InsertParagraphHandler();
|
|
2505
3072
|
this.insertLineBreakHandler = new InsertLineBreakHandler();
|
|
2506
|
-
this.
|
|
3073
|
+
this.forwardDeleteContentHandler = new ForwardDeleteContentHandler();
|
|
3074
|
+
this.backwardDeleteContentHandler = new BackwardDeleteContentHandler();
|
|
2507
3075
|
this.insertPasteHandler = new InsertPasteHandler();
|
|
2508
3076
|
/**
|
|
2509
3077
|
* When a user performs an input action within the editable element, this function is triggered.
|
|
@@ -2534,9 +3102,13 @@ class UserInputController extends VegaSlimmer {
|
|
|
2534
3102
|
updateFlag = true;
|
|
2535
3103
|
this.insertLineBreakHandler.execute(this.value, this.selectionController, this.host, e);
|
|
2536
3104
|
break;
|
|
3105
|
+
case 'deleteContentForward':
|
|
3106
|
+
updateFlag = true;
|
|
3107
|
+
this.forwardDeleteContentHandler.execute(this.value, this.selectionController, this.host, e);
|
|
3108
|
+
break;
|
|
2537
3109
|
case 'deleteContentBackward':
|
|
2538
3110
|
updateFlag = true;
|
|
2539
|
-
this.
|
|
3111
|
+
this.backwardDeleteContentHandler.execute(this.value, this.selectionController, this.host, e);
|
|
2540
3112
|
break;
|
|
2541
3113
|
case 'insertFromPaste':
|
|
2542
3114
|
updateFlag = true;
|
|
@@ -3491,7 +4063,7 @@ __decorate$c([
|
|
|
3491
4063
|
], CodeBlockToolbarButtonSlimmer.prototype, "value", void 0);
|
|
3492
4064
|
|
|
3493
4065
|
const undoIcon = {
|
|
3494
|
-
icon: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--! Font Awesome Pro 7.2.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright
|
|
4066
|
+
icon: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--! Font Awesome Pro 7.2.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2026 Fonticons, Inc. --><path fill="currentColor" d="M464 424c0 13.3 10.7 24 24 24s24-10.7 24-24l0-96c0-53-43-96-96-96l-334.1 0 95-95c9.4-9.4 9.4-24.6 0-33.9s-24.6-9.4-33.9 0L7 239c-4.5 4.5-7 10.6-7 17s2.5 12.5 7 17L143 409c9.4 9.4 24.6 9.4 33.9 0s9.4-24.6 0-33.9l-95-95 334.1 0c26.5 0 48 21.5 48 48l0 96z"/></svg>`,
|
|
3495
4067
|
};
|
|
3496
4068
|
|
|
3497
4069
|
var __decorate$b = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
@@ -3528,7 +4100,7 @@ __decorate$b([
|
|
|
3528
4100
|
], UndoToolbarButtonSlimmer.prototype, "historyController", void 0);
|
|
3529
4101
|
|
|
3530
4102
|
const redoIcon = {
|
|
3531
|
-
icon: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--! Font Awesome Pro 7.2.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright
|
|
4103
|
+
icon: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--! Font Awesome Pro 7.2.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2026 Fonticons, Inc. --><path fill="currentColor" d="M48 424c0 13.3-10.7 24-24 24S0 437.3 0 424l0-96c0-53 43-96 96-96l334.1 0-95-95c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0L505 239c4.5 4.5 7 10.6 7 17s-2.5 12.5-7 17L369 409c-9.4 9.4-24.6 9.4-33.9 0s-9.4-24.6 0-33.9l95-95-334.1 0c-26.5 0-48 21.5-48 48l0 96z"/></svg>`,
|
|
3532
4104
|
};
|
|
3533
4105
|
|
|
3534
4106
|
var __decorate$a = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
@@ -4533,13 +5105,14 @@ class VegaRichTextEditorToolbarButtonRenderer extends VegaSlimmer {
|
|
|
4533
5105
|
}, onClick: this.handleClick, disabled: this.disabled, hidden: this.hidden },
|
|
4534
5106
|
h("vega-flex", { gap: "size-8", justifyContent: "center", alignItems: "center" },
|
|
4535
5107
|
this.icon && (h("vega-icon", { size: "size-16", color: this.iconColor, icon: VegaInternalIconManager.getIconKey(this.icon) })),
|
|
4536
|
-
this.showArrowIcon && (h("vega-icon", { size: "size-8", color: "text-secondary", icon: VegaInternalIconManager.getIconKey('chevron-down') }))),
|
|
5108
|
+
this.showArrowIcon && (h("vega-icon", { size: "size-8", color: "text-secondary", icon: VegaInternalIconManager.getIconKey(this.arrowIcon || 'chevron-down') }))),
|
|
4537
5109
|
h("slot", null)));
|
|
4538
5110
|
}
|
|
4539
5111
|
}
|
|
4540
5112
|
(() => {
|
|
4541
5113
|
VegaInternalIconManager.register({
|
|
4542
5114
|
'chevron-down': chevronDown,
|
|
5115
|
+
'chevron-up': chevronUp,
|
|
4543
5116
|
});
|
|
4544
5117
|
})();
|
|
4545
5118
|
__decorate$5([
|
|
@@ -4554,6 +5127,9 @@ __decorate$5([
|
|
|
4554
5127
|
__decorate$5([
|
|
4555
5128
|
MapToComponentField()
|
|
4556
5129
|
], VegaRichTextEditorToolbarButtonRenderer.prototype, "showArrowIcon", void 0);
|
|
5130
|
+
__decorate$5([
|
|
5131
|
+
MapToComponentField()
|
|
5132
|
+
], VegaRichTextEditorToolbarButtonRenderer.prototype, "arrowIcon", void 0);
|
|
4557
5133
|
__decorate$5([
|
|
4558
5134
|
MapToComponentField()
|
|
4559
5135
|
], VegaRichTextEditorToolbarButtonRenderer.prototype, "icon", void 0);
|
|
@@ -4617,6 +5193,12 @@ const VegaRichTextEditorToolbarButton = class {
|
|
|
4617
5193
|
* @vegaVersion 2.34.0
|
|
4618
5194
|
*/
|
|
4619
5195
|
this.showArrowIcon = false;
|
|
5196
|
+
/**
|
|
5197
|
+
* Specifies the arrow icon name when `showArrowIcon` is enabled.
|
|
5198
|
+
*
|
|
5199
|
+
* @vegaVersion 2.93.0
|
|
5200
|
+
*/
|
|
5201
|
+
this.arrowIcon = 'chevron-down';
|
|
4620
5202
|
/**
|
|
4621
5203
|
* Specifies whether the toolbar button in the rich text editor is represented by an icon.
|
|
4622
5204
|
*
|