@globalpayments/vega 2.101.0 → 2.103.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-275ea7c7.js → app-globals-85986306.js} +13 -12
- package/dist/cjs/{child-nodes-event-prevent-slimmer-d720d7e9.js → child-nodes-event-prevent-slimmer-574a6a1a.js} +1 -1
- package/dist/cjs/{code-block-c598832d.js → code-block-72de6c4d.js} +270 -103
- package/dist/cjs/{component-usage-runtime-metrics-389d1548.js → component-usage-runtime-metrics-77f7be9f.js} +8 -5
- package/dist/cjs/{component-value-history-controller-slimmer.abstract-4bd47aa1.js → component-value-history-controller-slimmer.abstract-23d2b3d8.js} +3 -3
- package/dist/cjs/{content-state-da23e822.js → content-state-ff40bdc6.js} +125 -90
- package/dist/cjs/{date-required-rule-45c802d3.js → date-required-rule-608e704b.js} +1 -1
- package/dist/cjs/{design-token-9d762da0.js → design-token-a101a8d0.js} +3 -3
- package/dist/cjs/{create-public-api-runtime-metrics-slimmer-91b0cbfb.js → discriminated-3b8e72d5.js} +63 -1
- package/dist/cjs/{element-appender-slimmer-2aaf8e24.js → element-appender-slimmer-b93cc564.js} +2 -2
- package/dist/cjs/{event-emit-slimmer-67b5c186.js → event-emit-slimmer-6bc675f6.js} +1 -1
- package/dist/cjs/{form-field-controller-slimmer-ac9337f4.js → form-field-controller-slimmer-124d54ea.js} +1 -1
- package/dist/cjs/{icon-manager-be358b32.js → icon-manager-7d20b0ab.js} +6 -4
- package/dist/cjs/{image-annotation-action-378838c2.js → image-annotation-action-1ee41bc7.js} +6 -5
- package/dist/cjs/image-extension-6a92c524.js +1451 -0
- package/dist/cjs/index-58ea899e.js +4 -0
- package/dist/cjs/index.cjs.js +29 -27
- package/dist/cjs/{inject-keyboard-manager-540f0876.js → inject-keyboard-manager-32d7dd0e.js} +1 -1
- package/dist/cjs/{internal-calendar-period-factory-b11918ee.js → internal-calendar-period-factory-c3198ea7.js} +1 -1
- package/dist/cjs/{internal-icon-manager-40bcac72.js → internal-icon-manager-b9702049.js} +1 -1
- package/dist/cjs/{internal-translation-controller-27bfc8c7.js → internal-translation-controller-0d67ca4d.js} +12 -0
- package/dist/cjs/{internal-vega-event-manager-976b9526.js → internal-vega-event-manager-0c256d63.js} +2 -1
- package/dist/cjs/{keyboard-manager-16e96b62.js → keyboard-manager-332eec89.js} +1 -1
- package/dist/cjs/{keyboard-manager-slimmer-0a4e556d.js → keyboard-manager-slimmer-a2872981.js} +1 -1
- package/dist/cjs/{link-extension-f493e432.js → link-extension-1b4ed437.js} +9 -8
- package/dist/cjs/loader.cjs.js +20 -19
- package/dist/cjs/{month-view-generator-0a3e04de.js → month-view-generator-b6a2b8be.js} +1 -1
- package/dist/cjs/{public-rules-bae12c47.js → public-rules-2066613c.js} +9 -7
- package/dist/cjs/{range-9f42fb40.js → range-712fe703.js} +1 -1
- package/dist/cjs/{responsive-format-facade-c6d7f0a1.js → responsive-format-facade-44d33457.js} +1 -1
- package/dist/cjs/{rich-text-editor-required-rule-bb232741.js → rich-text-editor-required-rule-1aa75d22.js} +1 -1
- package/dist/cjs/{split-cell-operation-0d33123e.js → split-cell-operation-afc82323.js} +16 -20
- package/dist/cjs/{state-border-formatter-dda9109a.js → state-border-formatter-49984fd6.js} +1 -1
- package/dist/cjs/{string-format-strategy.abstract-3a968a59.js → string-format-strategy.abstract-bd563c01.js} +1 -1
- package/dist/cjs/{string-input-formatter-slimmer-2e0a838e.js → string-input-formatter-slimmer-4faebac9.js} +1 -1
- package/dist/cjs/{string-mask-strategy-d9f85c21.js → string-mask-strategy-624c4398.js} +2 -2
- package/dist/cjs/{style-formatter-d21a9784.js → style-formatter-151d89a3.js} +2 -2
- package/dist/cjs/{time-required-rule-580cbd3d.js → time-required-rule-8cd8f9b9.js} +1 -1
- package/dist/cjs/{token-extension-4badb962.js → token-extension-72d0cb08.js} +1196 -1280
- package/dist/cjs/{translation-slimmer-31cd5a57.js → translation-slimmer-1771d01f.js} +1 -1
- package/dist/cjs/{type-guard-00b8efc0.js → type-guard-cce6fe1f.js} +1 -1
- package/dist/cjs/{valid-credit-card-number-rule-70885128.js → valid-credit-card-number-rule-b13c2fc4.js} +1 -1
- package/dist/cjs/vega-accordion.cjs.entry.js +14 -14
- package/dist/cjs/vega-app-footer.cjs.entry.js +5 -5
- package/dist/cjs/vega-app-header-button.cjs.entry.js +14 -14
- package/dist/cjs/vega-backdrop.cjs.entry.js +2 -2
- package/dist/cjs/vega-banner.cjs.entry.js +8 -8
- package/dist/cjs/vega-bar-chart.cjs.entry.js +2 -2
- package/dist/cjs/vega-box.cjs.entry.js +8 -8
- package/dist/cjs/vega-brand-logo.cjs.entry.js +5 -5
- package/dist/cjs/vega-breadcrumb.cjs.entry.js +6 -6
- package/dist/cjs/vega-button-circle.cjs.entry.js +11 -11
- package/dist/cjs/vega-button-group_2.cjs.entry.js +7 -7
- package/dist/cjs/vega-button-link.cjs.entry.js +6 -6
- package/dist/cjs/vega-button.cjs.entry.js +9 -9
- package/dist/cjs/vega-calendar_5.cjs.entry.js +73 -32
- package/dist/cjs/vega-card.cjs.entry.js +7 -7
- package/dist/cjs/vega-carousel.cjs.entry.js +8 -8
- package/dist/cjs/vega-checkbox_2.cjs.entry.js +9 -9
- package/dist/cjs/vega-chip.cjs.entry.js +11 -11
- package/dist/cjs/vega-code-block.cjs.entry.js +17 -17
- package/dist/cjs/vega-color-picker.cjs.entry.js +7 -7
- package/dist/cjs/vega-color-swatch-picker.cjs.entry.js +12 -12
- package/dist/cjs/vega-color-swatch.cjs.entry.js +7 -7
- package/dist/cjs/vega-combo-box.cjs.entry.js +14 -14
- package/dist/cjs/vega-counter-badge.cjs.entry.js +2 -2
- package/dist/cjs/vega-date-picker_2.cjs.entry.js +23 -23
- package/dist/cjs/{vega-dialog-controller-16be85d5.js → vega-dialog-controller-efc46dba.js} +6 -4
- package/dist/cjs/vega-dialog_2.cjs.entry.js +10 -10
- package/dist/cjs/vega-divider.cjs.entry.js +7 -7
- package/dist/cjs/vega-dropdown_5.cjs.entry.js +17 -17
- package/dist/cjs/vega-env-manager-23b8b23c.js +2 -2
- package/dist/cjs/{vega-event-id-987a170c.js → vega-event-id-b5abf7c9.js} +2 -0
- package/dist/cjs/vega-field-error.cjs.entry.js +2 -2
- package/dist/cjs/vega-field-label.cjs.entry.js +7 -7
- package/dist/cjs/vega-file-uploader.cjs.entry.js +11 -11
- package/dist/cjs/vega-flag-icon.cjs.entry.js +10 -10
- package/dist/cjs/vega-flex.cjs.entry.js +8 -8
- package/dist/cjs/vega-font.cjs.entry.js +7 -7
- package/dist/cjs/vega-form.cjs.entry.js +8 -8
- package/dist/cjs/vega-grid.cjs.entry.js +7 -7
- package/dist/cjs/vega-hint.cjs.entry.js +2 -2
- package/dist/cjs/vega-icon.cjs.entry.js +9 -9
- package/dist/cjs/vega-image-uploader.cjs.entry.js +13 -13
- package/dist/cjs/vega-input-credit-card.cjs.entry.js +15 -15
- package/dist/cjs/vega-input-numeric.cjs.entry.js +18 -20
- package/dist/cjs/vega-input-passcode.cjs.entry.js +11 -11
- package/dist/cjs/vega-input-phone-number.cjs.entry.js +10 -10
- package/dist/cjs/vega-input-range.cjs.entry.js +9 -9
- package/dist/cjs/vega-input-select.cjs.entry.js +14 -14
- package/dist/cjs/vega-input.cjs.entry.js +39 -35
- package/dist/cjs/vega-item-toggle.cjs.entry.js +5 -5
- package/dist/cjs/vega-left-nav_5.cjs.entry.js +19 -19
- package/dist/cjs/vega-line-chart.cjs.entry.js +2 -2
- package/dist/cjs/vega-loader-wrapper_2.cjs.entry.js +6 -6
- package/dist/cjs/vega-page-notification_2.cjs.entry.js +4 -4
- package/dist/cjs/vega-pagination-page-selector-mobile.cjs.entry.js +5 -5
- package/dist/cjs/vega-pagination-page-size-selector-mobile.cjs.entry.js +5 -5
- package/dist/cjs/vega-pagination.cjs.entry.js +10 -10
- package/dist/cjs/vega-pie-chart.cjs.entry.js +2 -2
- package/dist/cjs/vega-popover_2.cjs.entry.js +14 -14
- package/dist/cjs/vega-progress-tracker_2.cjs.entry.js +9 -9
- package/dist/cjs/vega-radio_2.cjs.entry.js +12 -12
- package/dist/cjs/vega-rich-text-bookmark-editor.cjs.entry.js +445 -0
- package/dist/cjs/vega-rich-text-content.cjs.entry.js +49 -17
- package/dist/cjs/vega-rich-text-editor_4.cjs.entry.js +699 -244
- package/dist/cjs/vega-rich-text-find-replace-panel.cjs.entry.js +9 -9
- package/dist/cjs/vega-rich-text-special-characters-panel.cjs.entry.js +10 -10
- package/dist/cjs/vega-rich-text-table-properties_3.cjs.entry.js +18 -18
- package/dist/cjs/vega-section-title.cjs.entry.js +2 -2
- package/dist/cjs/vega-segment-control.cjs.entry.js +5 -5
- package/dist/cjs/vega-selection-chip_2.cjs.entry.js +11 -11
- package/dist/cjs/vega-selection-tile_2.cjs.entry.js +9 -9
- package/dist/cjs/vega-sidenav_3.cjs.entry.js +13 -13
- package/dist/cjs/vega-signature-capture.cjs.entry.js +15 -15
- package/dist/cjs/vega-skeleton.cjs.entry.js +2 -2
- package/dist/cjs/vega-slot-container.cjs.entry.js +2 -2
- package/dist/cjs/vega-stepper.cjs.entry.js +8 -8
- package/dist/cjs/vega-tab-group_2.cjs.entry.js +398 -108
- package/dist/cjs/vega-table_11.cjs.entry.js +23 -23
- package/dist/cjs/vega-text.cjs.entry.js +2 -2
- package/dist/cjs/vega-textarea.cjs.entry.js +8 -8
- package/dist/cjs/vega-time-picker_2.cjs.entry.js +16 -16
- package/dist/cjs/vega-toggle-switch.cjs.entry.js +7 -7
- package/dist/cjs/vega-tooltip_2.cjs.entry.js +9 -9
- package/dist/cjs/vega.cjs.js +20 -19
- package/dist/collection/collection-manifest.json +6 -0
- package/dist/collection/components/vega-accordion/vega-accordion.js +1 -1
- package/dist/collection/components/vega-app-footer/vega-app-footer.js +1 -1
- package/dist/collection/components/vega-app-header-button/vega-app-header-button.js +1 -1
- package/dist/collection/components/vega-backdrop/vega-backdrop.js +1 -1
- package/dist/collection/components/vega-banner/vega-banner.js +1 -1
- package/dist/collection/components/vega-box/vega-box.js +1 -1
- package/dist/collection/components/vega-brand-logo/vega-brand-logo.js +1 -1
- package/dist/collection/components/vega-breadcrumb/vega-breadcrumb.js +1 -1
- package/dist/collection/components/vega-button/vega-button.js +1 -1
- package/dist/collection/components/vega-button-circle/vega-button-circle.js +1 -1
- package/dist/collection/components/vega-button-group/vega-button-group-item/vega-button-group-item.js +1 -1
- package/dist/collection/components/vega-button-group/vega-button-group.js +1 -1
- package/dist/collection/components/vega-button-link/vega-button-link.js +1 -1
- package/dist/collection/components/vega-calendar/slimmers/common/controllers/vega-calendar-event-preview-actions-controller.js +33 -11
- package/dist/collection/components/vega-calendar/vega-calendar-event/vega-calendar-event.js +1 -1
- package/dist/collection/components/vega-calendar/vega-calendar-event-preview/assets/delete.js +3 -0
- package/dist/collection/components/vega-calendar/vega-calendar-event-preview/slimmers/renderers/vega-calendar-event-preview-detail-renderer.js +5 -1
- package/dist/collection/components/vega-calendar/vega-calendar-event-preview/vega-calendar-event-preview.js +1 -1
- package/dist/collection/components/vega-calendar/vega-calendar-event-slot/vega-calendar-event-slot.js +1 -1
- package/dist/collection/components/vega-calendar/vega-calendar-period-switcher/vega-calendar-period-switcher.js +1 -1
- package/dist/collection/components/vega-calendar/vega-calendar.js +82 -2
- package/dist/collection/components/vega-card/vega-card.js +1 -1
- package/dist/collection/components/vega-carousel/vega-carousel.js +1 -1
- package/dist/collection/components/vega-chart/vega-bar-chart/vega-bar-chart.js +1 -1
- package/dist/collection/components/vega-chart/vega-line-chart/vega-line-chart.js +1 -1
- package/dist/collection/components/vega-chart/vega-pie-chart/vega-pie-chart.js +1 -1
- package/dist/collection/components/vega-checkbox/vega-checkbox-group/vega-checkbox-group.js +1 -1
- package/dist/collection/components/vega-checkbox/vega-checkbox.js +1 -1
- package/dist/collection/components/vega-chip/vega-chip.js +1 -1
- package/dist/collection/components/vega-code-block/vega-code-block.js +1 -1
- package/dist/collection/components/vega-color-picker/vega-color-picker.js +1 -1
- package/dist/collection/components/vega-color-swatch/vega-color-swatch-picker/vega-color-swatch-picker.js +1 -1
- package/dist/collection/components/vega-color-swatch/vega-color-swatch.js +1 -1
- package/dist/collection/components/vega-combo-box/vega-combo-box.js +1 -1
- package/dist/collection/components/vega-counter-badge/vega-counter-badge.js +1 -1
- package/dist/collection/components/vega-date-picker/vega-date-picker-calendar/vega-date-picker-calendar.js +1 -1
- package/dist/collection/components/vega-date-picker/vega-date-picker.js +1 -1
- package/dist/collection/components/vega-dialog/vega-dialog.js +1 -1
- package/dist/collection/components/vega-divider/vega-divider.js +1 -1
- package/dist/collection/components/vega-dropdown/vega-dropdown-content-box/vega-dropdown-content-box.js +1 -1
- package/dist/collection/components/vega-dropdown/vega-dropdown-group/vega-dropdown-group.js +1 -1
- package/dist/collection/components/vega-dropdown/vega-dropdown-item/vega-dropdown-item.js +1 -1
- package/dist/collection/components/vega-dropdown/vega-dropdown.js +1 -1
- package/dist/collection/components/vega-field-error/vega-field-error.js +1 -1
- package/dist/collection/components/vega-field-label/vega-field-label.js +1 -1
- package/dist/collection/components/vega-file-uploader/vega-file-uploader.js +1 -1
- package/dist/collection/components/vega-flag-icon/vega-flag-icon.js +1 -1
- package/dist/collection/components/vega-flex/vega-flex.js +1 -1
- package/dist/collection/components/vega-font/vega-font.js +1 -1
- package/dist/collection/components/vega-form/vega-form.js +1 -1
- package/dist/collection/components/vega-grid/vega-grid.js +1 -1
- package/dist/collection/components/vega-hint/vega-hint.js +1 -1
- package/dist/collection/components/vega-icon/vega-icon.js +1 -1
- package/dist/collection/components/vega-image-uploader/vega-image-uploader.js +1 -1
- package/dist/collection/components/vega-input/slimmers/controllers/vega-input-state-controller.js +0 -14
- package/dist/collection/components/vega-input/slimmers/renderers/vega-input-input-container-renderer.js +11 -2
- package/dist/collection/components/vega-input/slimmers/renderers/vega-input-input-renderer.js +11 -1
- package/dist/collection/components/vega-input/vega-input.js +53 -9
- package/dist/collection/components/vega-input-credit-card/vega-input-credit-card.js +1 -1
- package/dist/collection/components/vega-input-numeric/slimmers/renderers/vega-input-numeric-renderer.js +7 -1
- package/dist/collection/components/vega-input-numeric/vega-input-numeric.js +1 -9
- package/dist/collection/components/vega-input-passcode/vega-input-passcode.js +1 -1
- package/dist/collection/components/vega-input-phone-number/vega-input-phone-number.js +1 -1
- package/dist/collection/components/vega-input-range/vega-input-range.js +1 -1
- package/dist/collection/components/vega-input-select/vega-input-select.js +1 -1
- package/dist/collection/components/vega-item-toggle/vega-item-toggle.js +1 -1
- package/dist/collection/components/vega-loader-wrapper/vega-loader-wrapper.js +1 -1
- package/dist/collection/components/vega-loading-indicator/vega-loading-indicator.js +1 -1
- package/dist/collection/components/vega-modal/vega-modal.js +1 -1
- package/dist/collection/components/vega-nav/vega-left-nav/vega-left-nav.js +1 -1
- package/dist/collection/components/vega-nav/vega-left-nav-group/vega-left-nav-group.js +1 -1
- package/dist/collection/components/vega-nav/vega-left-nav-link/vega-left-nav-link.js +1 -1
- package/dist/collection/components/vega-nav/vega-left-nav-section/vega-left-nav-section.js +1 -1
- package/dist/collection/components/vega-nav/vega-nav-card/vega-nav-card.js +1 -1
- package/dist/collection/components/vega-page-notification/vega-page-notification-list/vega-page-notification-list.js +1 -1
- package/dist/collection/components/vega-page-notification/vega-page-notification.js +1 -1
- package/dist/collection/components/vega-pagination/vega-pagination-page-selector-mobile/vega-pagination-page-selector-mobile.js +1 -1
- package/dist/collection/components/vega-pagination/vega-pagination-page-size-selector-mobile/vega-pagination-page-size-selector-mobile.js +1 -1
- package/dist/collection/components/vega-pagination/vega-pagination.js +1 -1
- package/dist/collection/components/vega-popover/vega-popover-content-box/vega-popover-content-box.js +1 -1
- package/dist/collection/components/vega-popover/vega-popover.js +1 -1
- package/dist/collection/components/vega-progress-tracker/vega-progress-tracker-step/vega-progress-tracker-step.js +1 -1
- package/dist/collection/components/vega-progress-tracker/vega-progress-tracker.js +1 -1
- package/dist/collection/components/vega-radio/vega-radio-group/vega-radio-group.js +1 -1
- package/dist/collection/components/vega-radio/vega-radio.js +1 -1
- package/dist/collection/components/vega-rich-text-content/vega-rich-text-content.js +1 -1
- package/dist/collection/components/vega-rich-text-editor/constants/constant.js +4 -0
- package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/action-handle-interceptor-registry.js +2 -2
- package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/action-handle-strategy-registry.js +4 -4
- package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/action-handle-strategy.abstract.js +4 -2
- package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-delete-node-content-strategy.js +1 -1
- package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/list-transform-selection.js +3 -3
- package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/list-transform-to-paragraph-strategy.js +2 -2
- package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/paste-content-strategy.js +1 -1
- package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/sequential-composition-strategy.js +31 -0
- package/dist/collection/components/vega-rich-text-editor/dto/actions/annotation-action.abstract.js +3 -1
- package/dist/collection/components/vega-rich-text-editor/dto/actions/bold-annotation-action.js +1 -0
- package/dist/collection/components/vega-rich-text-editor/dto/actions/clear-formatting-annotation-action.js +1 -0
- package/dist/collection/components/vega-rich-text-editor/dto/actions/code-annotation-action.js +1 -0
- package/dist/collection/components/vega-rich-text-editor/dto/actions/custom-style-annotation-action.js +1 -0
- package/dist/collection/components/vega-rich-text-editor/dto/actions/delete-node-annotation-action.js +1 -0
- package/dist/collection/components/vega-rich-text-editor/dto/actions/horizontal-alignment-annotation-action.js +1 -0
- package/dist/collection/components/vega-rich-text-editor/dto/actions/image-annotation-action.js +1 -0
- package/dist/collection/components/vega-rich-text-editor/dto/actions/indent-annotation-action.js +1 -0
- package/dist/collection/components/vega-rich-text-editor/dto/actions/italic-annotation-action.js +1 -0
- package/dist/collection/components/vega-rich-text-editor/dto/actions/link-annotation-action.js +1 -0
- package/dist/collection/components/vega-rich-text-editor/dto/actions/link-group-annotation-action.js +1 -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/selection-change-action.js +1 -0
- package/dist/collection/components/vega-rich-text-editor/dto/actions/sequential-composition-action.js +14 -0
- package/dist/collection/components/vega-rich-text-editor/dto/actions/splittable-action.abstract.js +1 -0
- package/dist/collection/components/vega-rich-text-editor/dto/actions/strikethrough-annotation-action.js +1 -0
- package/dist/collection/components/vega-rich-text-editor/dto/actions/sync-up-selection-action.js +1 -0
- package/dist/collection/components/vega-rich-text-editor/dto/actions/text-color-annotation-action.js +1 -0
- package/dist/collection/components/vega-rich-text-editor/dto/actions/text-style-annotation-action.js +1 -0
- package/dist/collection/components/vega-rich-text-editor/dto/actions/underline-annotation-action.js +1 -0
- package/dist/collection/components/vega-rich-text-editor/dto/annotations/annotation.abstract.js +8 -0
- package/dist/collection/components/vega-rich-text-editor/dto/annotations/bold-annotation.js +6 -0
- package/dist/collection/components/vega-rich-text-editor/dto/annotations/code-annotation.js +6 -0
- package/dist/collection/components/vega-rich-text-editor/dto/annotations/italic-annotation.js +6 -0
- package/dist/collection/components/vega-rich-text-editor/dto/annotations/link-group-annotation.js +3 -1
- package/dist/collection/components/vega-rich-text-editor/dto/annotations/plain-text-annotation.js +6 -0
- package/dist/collection/components/vega-rich-text-editor/dto/annotations/selection-range-annotation.js +6 -0
- package/dist/collection/components/vega-rich-text-editor/dto/annotations/strikethrough-annotation.js +6 -0
- package/dist/collection/components/vega-rich-text-editor/dto/annotations/text-color-annotation.js +6 -0
- package/dist/collection/components/vega-rich-text-editor/dto/annotations/underline-annotation.js +6 -0
- package/dist/collection/components/vega-rich-text-editor/dto/blocks/block.abstract.js +6 -8
- package/dist/collection/components/vega-rich-text-editor/dto/blocks/code-block.js +6 -6
- package/dist/collection/components/vega-rich-text-editor/dto/blocks/html-block.js +1 -2
- package/dist/collection/components/vega-rich-text-editor/dto/blocks/image-block.js +9 -9
- package/dist/collection/components/vega-rich-text-editor/dto/blocks/list-block.js +7 -7
- package/dist/collection/components/vega-rich-text-editor/dto/blocks/list-item-block.js +13 -12
- package/dist/collection/components/vega-rich-text-editor/dto/blocks/text-block.js +16 -16
- package/dist/collection/components/vega-rich-text-editor/dto/content-state.js +18 -13
- package/dist/collection/components/vega-rich-text-editor/dto/filter-styles-strategies/code-block/code-block-filter-styles-strategy.js +1 -1
- package/dist/collection/components/vega-rich-text-editor/dto/filter-styles-strategies/filter-styles-strategy-registry.js +2 -2
- package/dist/collection/components/vega-rich-text-editor/dto/filter-styles-strategies/list-block/list-block-filter-styles-strategy.js +1 -1
- package/dist/collection/components/vega-rich-text-editor/dto/filter-styles-strategies/list-block/list-heading-item-block-filter-styles-strategy.js +1 -1
- package/dist/collection/components/vega-rich-text-editor/dto/filter-styles-strategies/list-block/list-item-block-filter-styles-strategy.js +1 -1
- package/dist/collection/components/vega-rich-text-editor/dto/filter-styles-strategies/list-block/list-title-item-block-filter-styles-strategy.js +1 -1
- package/dist/collection/components/vega-rich-text-editor/dto/filter-styles-strategies/predicate.js +4 -4
- package/dist/collection/components/vega-rich-text-editor/dto/filter-styles-strategies/text-block/paragraph-filter-styles-strategy.js +1 -1
- package/dist/collection/components/vega-rich-text-editor/dto/filter-styles-strategies/text-node/title-heading-node-filter-styles-strategy.js +1 -1
- package/dist/collection/components/vega-rich-text-editor/dto/flush-changes-payload.js +1 -0
- package/dist/collection/components/vega-rich-text-editor/dto/nodes/code-block-node.js +4 -4
- package/dist/collection/components/vega-rich-text-editor/dto/nodes/decorator-node.js +1 -0
- package/dist/collection/components/vega-rich-text-editor/dto/nodes/image-node.js +8 -7
- package/dist/collection/components/vega-rich-text-editor/dto/nodes/node.abstract.js +5 -7
- package/dist/collection/components/vega-rich-text-editor/dto/nodes/text-node.js +30 -16
- package/dist/collection/components/vega-rich-text-editor/dto/renderers/base-renderer.js +3 -1
- package/dist/collection/components/vega-rich-text-editor/dto/renderers/blocks/block-renderer.abstract.js +1 -0
- package/dist/collection/components/vega-rich-text-editor/dto/renderers/blocks/block-text-nodes-renderer.abstract.js +1 -0
- package/dist/collection/components/vega-rich-text-editor/dto/renderers/blocks/code-block-renderer.js +1 -0
- package/dist/collection/components/vega-rich-text-editor/dto/renderers/blocks/html-block-renderer.js +1 -0
- package/dist/collection/components/vega-rich-text-editor/dto/renderers/blocks/image-block-renderer.js +1 -0
- package/dist/collection/components/vega-rich-text-editor/dto/renderers/blocks/link-wrapper-renderer.js +25 -5
- package/dist/collection/components/vega-rich-text-editor/dto/renderers/blocks/list-block-renderer.js +1 -0
- package/dist/collection/components/vega-rich-text-editor/dto/renderers/blocks/list-item-block-renderer.js +1 -0
- package/dist/collection/components/vega-rich-text-editor/dto/renderers/blocks/text-block-renderer.js +1 -0
- package/dist/collection/components/vega-rich-text-editor/dto/renderers/nodes/code-block-node-renderer.js +1 -0
- package/dist/collection/components/vega-rich-text-editor/dto/renderers/nodes/image-node-renderer.js +1 -0
- package/dist/collection/components/vega-rich-text-editor/dto/renderers/nodes/node-renderer.abstract.js +1 -0
- package/dist/collection/components/vega-rich-text-editor/dto/renderers/nodes/text-node-renderer.js +1 -0
- package/dist/collection/components/vega-rich-text-editor/dto/setup.js +34 -34
- package/dist/collection/components/vega-rich-text-editor/extensions/base-extension-renderer.js +1 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/blockquote/blockquote-extension.js +7 -7
- package/dist/collection/components/vega-rich-text-editor/extensions/blockquote/dto/rte-blockquote-block.js +1 -2
- package/dist/collection/components/vega-rich-text-editor/extensions/blockquote/filter-styles-strategies/blockquote-block/blockquote-filter-styles-strategy.js +1 -1
- package/dist/collection/components/vega-rich-text-editor/extensions/blockquote/renderers/blockquote-block-renderer.js +1 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/bookmark/action-handler-interceptors/delete-bookmark-before-text-interceptor.js +40 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/bookmark/action-handler-strategies/insert-bookmark-node-strategy.js +20 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/bookmark/action-handler-strategies/update-bookmark-name-strategy.js +12 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/bookmark/actions/insert-bookmark-node-action.js +17 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/bookmark/actions/update-bookmark-name-action.js +14 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/bookmark/anchor-to-bookmark-node-strategy.js +79 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/bookmark/assets/bookmark.js +5 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/bookmark/bookmark-extension.js +52 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/bookmark/bookmark-node.js +91 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/bookmark/renderers/bookmark-node-renderer.js +316 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/bookmark/renderers/bookmark-toolbar-button-renderer.js +137 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/bookmark/utils.js +47 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/bookmark/vega-rich-text-bookmark-editor/slimmers/controllers/bookmark-editor-controller.js +217 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/bookmark/vega-rich-text-bookmark-editor/slimmers/renderers/vega-rich-text-bookmark-editor-renderer.js +116 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/bookmark/vega-rich-text-bookmark-editor/vega-rich-text-bookmark-editor.css +3 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/bookmark/vega-rich-text-bookmark-editor/vega-rich-text-bookmark-editor.js +261 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/copy/copy-extension.js +1 -1
- package/dist/collection/components/vega-rich-text-editor/extensions/find-replace/vega-rich-text-find-replace-panel/vega-rich-text-find-replace-panel.js +1 -1
- package/dist/collection/components/vega-rich-text-editor/extensions/functions/dto/function-block.js +31 -2
- package/dist/collection/components/vega-rich-text-editor/extensions/functions/dto/logic-control-block.js +1 -2
- package/dist/collection/components/vega-rich-text-editor/extensions/functions/dto/logic-control-node.js +1 -2
- package/dist/collection/components/vega-rich-text-editor/extensions/functions/element-to-dto-strategies/div-to-function-block-strategy.js +1 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/functions/function-extension.js +15 -15
- package/dist/collection/components/vega-rich-text-editor/extensions/functions/renderers/function-block-renderer.js +1 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/functions/renderers/logic-control-block-renderer.js +1 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/horizontal-line/dto/horizontal-line-block.js +1 -2
- package/dist/collection/components/vega-rich-text-editor/extensions/horizontal-line/dto/horizontal-line-node.js +1 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/horizontal-line/filter-styles-strategies/horizontal-line-block/horizontal-line-filter-styles-strategy.js +1 -1
- package/dist/collection/components/vega-rich-text-editor/extensions/horizontal-line/horizontal-line-extension.js +6 -6
- package/dist/collection/components/vega-rich-text-editor/extensions/horizontal-line/renderers/horizontal-line-block-renderer.js +1 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/line-height/actions/line-height-annotation-action.js +1 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/line-height/element-to-dto-strategies/line-height-annotation-handler.js +3 -3
- package/dist/collection/components/vega-rich-text-editor/extensions/line-height/line-height-extension.js +2 -2
- package/dist/collection/components/vega-rich-text-editor/extensions/line-height/line-height-toolbar-button-renderer.js +1 -1
- package/dist/collection/components/vega-rich-text-editor/extensions/paste/controllers/chooser-positioner.js +107 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/paste/controllers/paste-chooser-controller.js +91 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/paste/controllers/paste-event-interceptor.js +47 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/paste/controllers/selection-snapshot-service.js +54 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/paste/parse-local-images-helper/image-extractor.js +17 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/paste/paste-chooser-ui.js +3 -1
- package/dist/collection/components/vega-rich-text-editor/extensions/paste/paste-extension.js +42 -355
- package/dist/collection/components/vega-rich-text-editor/extensions/paste/pipeline/data-transfer-builder.js +36 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/paste/pipeline/paste-dispatcher.js +23 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/paste/pipeline/paste-processing-pipeline.js +30 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/paste/strategies/paste-processing-strategy.abstract.js +34 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/paste/strategies/paste-strategy-selector.js +19 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/paste/strategies/plain-paste-strategy.js +74 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/paste/type.js +1 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/special-characters/vega-rich-text-special-characters-panel/vega-rich-text-special-characters-panel.js +1 -1
- package/dist/collection/components/vega-rich-text-editor/extensions/table/actions/table-annotations-action.js +1 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/table/actions/table-cell-annotations-action.js +1 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/table/actions/table-head-cell-annotations-action.js +1 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/table/actions/update-table-properties-action.js +1 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/table/annotation-handler/table-annotation-handler.js +1 -1
- package/dist/collection/components/vega-rich-text-editor/extensions/table/annotation-handler/table-cell-annotation-handler.js +1 -1
- package/dist/collection/components/vega-rich-text-editor/extensions/table/annotation-handler/table-head-cell-annotation-handler.js +1 -1
- package/dist/collection/components/vega-rich-text-editor/extensions/table/dto/table-block.js +1 -2
- package/dist/collection/components/vega-rich-text-editor/extensions/table/dto/table-body-block.js +1 -2
- package/dist/collection/components/vega-rich-text-editor/extensions/table/dto/table-caption-block.js +4 -4
- package/dist/collection/components/vega-rich-text-editor/extensions/table/dto/table-cell-block.js +1 -2
- package/dist/collection/components/vega-rich-text-editor/extensions/table/dto/table-head-block.js +1 -2
- package/dist/collection/components/vega-rich-text-editor/extensions/table/dto/table-head-cell-block.js +1 -2
- package/dist/collection/components/vega-rich-text-editor/extensions/table/dto/table-row-block.js +1 -2
- package/dist/collection/components/vega-rich-text-editor/extensions/table/filter-styles-strategies/table-block/table-block-filter-styles-strategy.js +1 -1
- package/dist/collection/components/vega-rich-text-editor/extensions/table/filter-styles-strategies/table-caption/table-caption-filter-styles-strategy.js +1 -1
- package/dist/collection/components/vega-rich-text-editor/extensions/table/filter-styles-strategies/table-cell/table-cell-filter-styles-strategy.js +1 -1
- package/dist/collection/components/vega-rich-text-editor/extensions/table/renderers/table-body-renderer.js +1 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/table/renderers/table-caption-renderer.js +1 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/table/renderers/table-cell-renderer.js +1 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/table/renderers/table-head-cell-renderer.js +1 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/table/renderers/table-head-renderer.js +1 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/table/renderers/table-renderer.js +1 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/table/renderers/table-row-renderer.js +1 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/table/table-extension.js +38 -38
- package/dist/collection/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-properties/vega-rich-text-table-properties.js +1 -1
- package/dist/collection/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-selection-widget/vega-rich-text-table-selection-widget.js +1 -1
- package/dist/collection/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-setting/vega-rich-text-table-setting.js +1 -1
- package/dist/collection/components/vega-rich-text-editor/extensions/tokens/token-extension.js +2 -2
- package/dist/collection/components/vega-rich-text-editor/extensions/tokens/token-node-renderer.js +1 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/tokens/token-node.js +1 -2
- package/dist/collection/components/vega-rich-text-editor/extensions/word-count/word-count-extension.js +1 -1
- package/dist/collection/components/vega-rich-text-editor/helpers/utils.js +67 -0
- package/dist/collection/components/vega-rich-text-editor/public-api.js +1 -0
- package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/focus-controller.js +26 -4
- package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/annotation-handler/bold-annotaion-handler.js +1 -1
- package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/annotation-handler/code-annotation-handler.js +1 -1
- package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/annotation-handler/color-annotation-handler.js +1 -1
- package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/annotation-handler/html-element-to-annotation-generator.js +3 -3
- package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/annotation-handler/image-alt-annotation-handler.js +1 -1
- package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/annotation-handler/image-size-annotation-handler.js +1 -1
- package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/annotation-handler/indent-annotation-handler.js +1 -1
- package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/annotation-handler/inline-html-annotation-handler.js +1 -1
- package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/annotation-handler/italic-annotation-handler.js +1 -1
- package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/annotation-handler/link-annotation-handler.js +1 -1
- package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/annotation-handler/strike-through-annotation-handler.js +1 -1
- package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/annotation-handler/text-align-annotation-handler.js +1 -1
- package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/annotation-handler/text-style-annotation-handler.js +1 -1
- package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/annotation-handler/underline-annotation-handler.js +1 -1
- package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/input-event-handler/abstract-delete-content-handler.js +67 -11
- package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/input-event-handler/backward-delete-content-handler.js +4 -17
- package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/input-event-handler/base-handler.js +34 -1
- package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/input-event-handler/forward-delete-content-handler.js +13 -32
- package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/input-event-handler/insert-line-break-handler.js +60 -25
- package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/input-event-handler/insert-paragraph-handler.js +55 -19
- package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/input-event-handler/insert-paste-handler.js +165 -59
- package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/input-event-handler/insert-text-handler.js +55 -21
- package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/state-entity-rendering-registry.js +1 -1
- package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/user-input-controller.js +2 -16
- package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/value-controller.js +11 -1
- package/dist/collection/components/vega-rich-text-editor/slimmers/renderers/tools/bold-toolbar-button-slimmer.js +1 -1
- package/dist/collection/components/vega-rich-text-editor/slimmers/renderers/tools/clear-style-toolbar-button-slimmer.js +1 -1
- package/dist/collection/components/vega-rich-text-editor/slimmers/renderers/tools/code-toolbar-button-slimmer.js +1 -1
- package/dist/collection/components/vega-rich-text-editor/slimmers/renderers/tools/horizontal-alignment/horizontal-alignment-toolbar-button-slimmer.js +1 -1
- package/dist/collection/components/vega-rich-text-editor/slimmers/renderers/tools/italic-toolbar-button-slimmer.js +1 -1
- package/dist/collection/components/vega-rich-text-editor/slimmers/renderers/tools/less-indent-toolbar-button-slimmer.js +1 -1
- package/dist/collection/components/vega-rich-text-editor/slimmers/renderers/tools/link-toolbar-button-slimmer.js +1 -1
- package/dist/collection/components/vega-rich-text-editor/slimmers/renderers/tools/more-indent-toolbar-button-slimmer.js +1 -1
- package/dist/collection/components/vega-rich-text-editor/slimmers/renderers/tools/source-edit-toolbar-button-slimmer.js +3 -0
- package/dist/collection/components/vega-rich-text-editor/slimmers/renderers/tools/strikethrough-toolbar-button-slimmer.js +1 -1
- package/dist/collection/components/vega-rich-text-editor/slimmers/renderers/tools/text-color-toolbar-button-slimmer.js +1 -1
- package/dist/collection/components/vega-rich-text-editor/slimmers/renderers/tools/text-styles-toolbar-button-slimmer.js +1 -1
- package/dist/collection/components/vega-rich-text-editor/slimmers/renderers/tools/underline-toolbar-button-slimmer.js +1 -1
- package/dist/collection/components/vega-rich-text-editor/utils/html-to-plain-text-utils.js +240 -0
- package/dist/collection/components/vega-rich-text-editor/vega-rich-text-editor-toolbar-button/vega-rich-text-editor-toolbar-button.js +1 -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/slimmers/controllers/link-editor-controller.js +69 -5
- package/dist/collection/components/vega-rich-text-editor/vega-rich-text-link-editor/slimmers/controllers/link-type-config-controller.js +45 -1
- package/dist/collection/components/vega-rich-text-editor/vega-rich-text-link-editor/slimmers/renderers/vega-rich-text-link-editor-renderer.js +61 -2
- 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-section-title/vega-section-title.js +1 -1
- package/dist/collection/components/vega-segment-control/vega-segment-control.js +1 -1
- package/dist/collection/components/vega-selection-chip/vega-selection-chip-group/vega-selection-chip-group.js +1 -1
- package/dist/collection/components/vega-selection-chip/vega-selection-chip.js +1 -1
- package/dist/collection/components/vega-selection-tile/vega-selection-tile-group/vega-selection-tile-group.js +1 -1
- package/dist/collection/components/vega-selection-tile/vega-selection-tile.js +1 -1
- package/dist/collection/components/vega-sidenav/vega-sidenav-group/vega-sidenav-group.js +1 -1
- package/dist/collection/components/vega-sidenav/vega-sidenav-link/vega-sidenav-link.js +1 -1
- package/dist/collection/components/vega-sidenav/vega-sidenav.js +1 -1
- package/dist/collection/components/vega-signature-capture/vega-signature-capture.js +1 -1
- package/dist/collection/components/vega-skeleton/vega-skeleton.js +1 -1
- package/dist/collection/components/vega-slot-container/vega-slot-container.js +1 -1
- package/dist/collection/components/vega-stepper/vega-stepper.js +1 -1
- package/dist/collection/components/vega-tab-group/helpers/vega-tab-group-width-layout-helper.js +91 -0
- package/dist/collection/components/vega-tab-group/slimmers/vega-tab-group/controllers/vega-tab-group-pages-controller.js +90 -16
- package/dist/collection/components/vega-tab-group/slimmers/vega-tab-group/controllers/vega-tab-group-slider-state-controller.js +16 -1
- package/dist/collection/components/vega-tab-group/slimmers/vega-tab-group/renderers/vega-tab-group-constrained-tab-label-renderer.js +52 -0
- package/dist/collection/components/vega-tab-group/slimmers/vega-tab-group/renderers/vega-tab-group-tab-list-renderer.js +52 -10
- package/dist/collection/components/vega-tab-group/vega-tab-group-panel/vega-tab-group-panel.js +1 -1
- package/dist/collection/components/vega-tab-group/vega-tab-group.css +51 -1
- package/dist/collection/components/vega-tab-group/vega-tab-group.js +46 -1
- package/dist/collection/components/vega-table/vega-table-body/vega-table-body.js +1 -1
- package/dist/collection/components/vega-table/vega-table-cell/vega-table-cell.js +1 -1
- package/dist/collection/components/vega-table/vega-table-expand-row/vega-table-expand-row.js +1 -1
- package/dist/collection/components/vega-table/vega-table-foot/vega-table-foot.js +1 -1
- package/dist/collection/components/vega-table/vega-table-foot-cell/vega-table-foot-cell.js +1 -1
- package/dist/collection/components/vega-table/vega-table-foot-row/vega-table-foot-row.js +1 -1
- package/dist/collection/components/vega-table/vega-table-head/vega-table-head.js +1 -1
- package/dist/collection/components/vega-table/vega-table-head-cell/vega-table-head-cell.js +1 -1
- package/dist/collection/components/vega-table/vega-table-head-row/vega-table-head-row.js +1 -1
- package/dist/collection/components/vega-table/vega-table-row/vega-table-row.js +1 -1
- package/dist/collection/components/vega-table/vega-table.js +1 -1
- package/dist/collection/components/vega-text/vega-text.js +1 -1
- package/dist/collection/components/vega-textarea/vega-textarea.js +1 -1
- package/dist/collection/components/vega-time-picker/vega-time-picker-dropdown/vega-time-picker-dropdown.js +1 -1
- package/dist/collection/components/vega-time-picker/vega-time-picker.js +1 -1
- package/dist/collection/components/vega-toggle-switch/vega-toggle-switch.js +1 -1
- package/dist/collection/components/vega-tooltip/vega-tooltip-content-box/vega-tooltip-content-box.js +1 -1
- package/dist/collection/components/vega-tooltip/vega-tooltip.js +1 -1
- package/dist/collection/components/vega-virtual-scroll/vega-virtual-scroll.js +1 -1
- package/dist/collection/constants/ui.js +1 -0
- package/dist/collection/global/scripts/before-vega-load.js +2 -0
- package/dist/collection/helpers/common/wait-for-vega-handler.js +5 -2
- package/dist/collection/helpers/dialog/vega-dialog-controller.js +5 -2
- package/dist/collection/helpers/discriminator/discriminated.js +77 -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/event-manager/vega-event-manager.js +5 -2
- package/dist/collection/helpers/icon/icon-manager.js +5 -2
- package/dist/collection/helpers/loading-indicator/vega-loader-controller.js +5 -2
- package/dist/collection/helpers/notify/vega-notify-controller.js +5 -2
- package/dist/collection/helpers/rte-manager/dto-action-strategy-manager.js +2 -2
- package/dist/collection/helpers/rte-manager/dto-renderer-manager.js +2 -4
- package/dist/collection/helpers/skeleton-loader/vega-skeleton-loader-controller.js +5 -2
- package/dist/collection/helpers/slimmers/runtime-metrics/create-public-api-runtime-metrics-slimmer.js +1 -1
- package/dist/collection/helpers/theme/theme-manager.js +5 -2
- package/dist/collection/helpers/translation/locales/en.js +12 -0
- package/dist/collection/helpers/translation/translation.js +5 -2
- package/dist/collection/helpers/zindex/vega-z-index-manager.js +5 -2
- package/dist/esm/{app-globals-ad3c7cea.js → app-globals-8cdfc5c9.js} +13 -12
- package/dist/esm/{child-nodes-event-prevent-slimmer-0ebcbf47.js → child-nodes-event-prevent-slimmer-3ae5c7db.js} +1 -1
- package/dist/esm/{code-block-1cdf7a51.js → code-block-9360c331.js} +262 -104
- package/dist/esm/{component-usage-runtime-metrics-4b1afd04.js → component-usage-runtime-metrics-adfc80c6.js} +8 -5
- package/dist/esm/{component-value-history-controller-slimmer.abstract-bdeeb43f.js → component-value-history-controller-slimmer.abstract-9ea58806.js} +3 -3
- package/dist/esm/{content-state-6eb610b8.js → content-state-67a12e74.js} +125 -90
- package/dist/esm/{date-required-rule-2ea3aec8.js → date-required-rule-66b5bf02.js} +1 -1
- package/dist/esm/{design-token-82a4e107.js → design-token-acd1efeb.js} +3 -3
- package/dist/esm/{create-public-api-runtime-metrics-slimmer-48f85199.js → discriminated-fe5bf3c8.js} +63 -2
- package/dist/esm/{element-appender-slimmer-dd4e2908.js → element-appender-slimmer-7e5bc1e9.js} +2 -2
- package/dist/esm/{event-emit-slimmer-12ee1593.js → event-emit-slimmer-aa7f4c6e.js} +1 -1
- package/dist/esm/{form-field-controller-slimmer-5c794b4d.js → form-field-controller-slimmer-d653c494.js} +1 -1
- package/dist/esm/{icon-manager-4ef3f6dd.js → icon-manager-236d6c23.js} +5 -3
- package/dist/esm/{image-annotation-action-cdd50dcc.js → image-annotation-action-9525be48.js} +6 -5
- package/dist/esm/image-extension-aea75132.js +1440 -0
- package/dist/esm/index-090d31ca.js +4 -0
- package/dist/esm/index.js +25 -24
- package/dist/esm/{inject-keyboard-manager-6a10c9b7.js → inject-keyboard-manager-f6522d2f.js} +1 -1
- package/dist/esm/{internal-calendar-period-factory-d1a60f81.js → internal-calendar-period-factory-261df2f2.js} +1 -1
- package/dist/esm/{internal-icon-manager-e7c57096.js → internal-icon-manager-d4d534d2.js} +1 -1
- package/dist/esm/{internal-translation-controller-fff376d2.js → internal-translation-controller-3637e47e.js} +12 -0
- package/dist/esm/{internal-vega-event-manager-0c381f3b.js → internal-vega-event-manager-6eebe8f8.js} +2 -1
- package/dist/esm/{keyboard-manager-a58288df.js → keyboard-manager-53e8d8d0.js} +1 -1
- package/dist/esm/{keyboard-manager-slimmer-133b86cd.js → keyboard-manager-slimmer-b3de042d.js} +1 -1
- package/dist/esm/{link-extension-bc234cf7.js → link-extension-57ba9520.js} +9 -8
- package/dist/esm/loader.js +20 -19
- package/dist/esm/{month-view-generator-20e32b22.js → month-view-generator-15215a09.js} +1 -1
- package/dist/esm/{public-rules-8dc3fb00.js → public-rules-c77a1550.js} +9 -7
- package/dist/esm/{range-d2439ba7.js → range-3c74e1c8.js} +1 -1
- package/dist/esm/{responsive-format-facade-07843ec3.js → responsive-format-facade-1b325d06.js} +1 -1
- package/dist/esm/{rich-text-editor-required-rule-a0663a84.js → rich-text-editor-required-rule-cfd32ba2.js} +1 -1
- package/dist/esm/{split-cell-operation-1a889fa0.js → split-cell-operation-85a036f9.js} +14 -18
- package/dist/esm/{state-border-formatter-3b3dcfe8.js → state-border-formatter-ce3495b0.js} +1 -1
- package/dist/esm/{string-format-strategy.abstract-44381dcb.js → string-format-strategy.abstract-8ce04558.js} +1 -1
- package/dist/esm/{string-input-formatter-slimmer-69887c40.js → string-input-formatter-slimmer-0d60ba7d.js} +1 -1
- package/dist/esm/{string-mask-strategy-999fba4b.js → string-mask-strategy-cabc1d50.js} +2 -2
- package/dist/esm/{style-formatter-c4192c99.js → style-formatter-00fe4f1c.js} +2 -2
- package/dist/esm/{time-required-rule-0554b114.js → time-required-rule-57ceeae9.js} +1 -1
- package/dist/esm/{token-extension-530d9bde.js → token-extension-645a9520.js} +1172 -1253
- package/dist/esm/{translation-slimmer-77022f2e.js → translation-slimmer-b69057eb.js} +1 -1
- package/dist/esm/{type-guard-26d83e7e.js → type-guard-204094c6.js} +1 -1
- package/dist/esm/{valid-credit-card-number-rule-f60b6904.js → valid-credit-card-number-rule-0874e19f.js} +1 -1
- package/dist/esm/vega-accordion.entry.js +14 -14
- package/dist/esm/vega-app-footer.entry.js +5 -5
- package/dist/esm/vega-app-header-button.entry.js +14 -14
- package/dist/esm/vega-backdrop.entry.js +2 -2
- package/dist/esm/vega-banner.entry.js +8 -8
- package/dist/esm/vega-bar-chart.entry.js +2 -2
- package/dist/esm/vega-box.entry.js +8 -8
- package/dist/esm/vega-brand-logo.entry.js +5 -5
- package/dist/esm/vega-breadcrumb.entry.js +6 -6
- package/dist/esm/vega-button-circle.entry.js +11 -11
- package/dist/esm/vega-button-group_2.entry.js +7 -7
- package/dist/esm/vega-button-link.entry.js +6 -6
- package/dist/esm/vega-button.entry.js +9 -9
- package/dist/esm/vega-calendar_5.entry.js +73 -32
- package/dist/esm/vega-card.entry.js +7 -7
- package/dist/esm/vega-carousel.entry.js +8 -8
- package/dist/esm/vega-checkbox_2.entry.js +9 -9
- package/dist/esm/vega-chip.entry.js +11 -11
- package/dist/esm/vega-code-block.entry.js +17 -17
- package/dist/esm/vega-color-picker.entry.js +7 -7
- package/dist/esm/vega-color-swatch-picker.entry.js +12 -12
- package/dist/esm/vega-color-swatch.entry.js +7 -7
- package/dist/esm/vega-combo-box.entry.js +14 -14
- package/dist/esm/vega-counter-badge.entry.js +2 -2
- package/dist/esm/vega-date-picker_2.entry.js +23 -23
- package/dist/esm/{vega-dialog-controller-726b74f9.js → vega-dialog-controller-f2d3b6c9.js} +5 -3
- package/dist/esm/vega-dialog_2.entry.js +10 -10
- package/dist/esm/vega-divider.entry.js +7 -7
- package/dist/esm/vega-dropdown_5.entry.js +17 -17
- package/dist/esm/vega-env-manager-8f8dc473.js +2 -2
- package/dist/esm/{vega-event-id-59cd9297.js → vega-event-id-6b4db259.js} +2 -1
- package/dist/esm/vega-field-error.entry.js +2 -2
- package/dist/esm/vega-field-label.entry.js +7 -7
- package/dist/esm/vega-file-uploader.entry.js +11 -11
- package/dist/esm/vega-flag-icon.entry.js +10 -10
- package/dist/esm/vega-flex.entry.js +8 -8
- package/dist/esm/vega-font.entry.js +7 -7
- package/dist/esm/vega-form.entry.js +8 -8
- package/dist/esm/vega-grid.entry.js +7 -7
- package/dist/esm/vega-hint.entry.js +2 -2
- package/dist/esm/vega-icon.entry.js +9 -9
- package/dist/esm/vega-image-uploader.entry.js +13 -13
- package/dist/esm/vega-input-credit-card.entry.js +15 -15
- package/dist/esm/vega-input-numeric.entry.js +18 -20
- package/dist/esm/vega-input-passcode.entry.js +11 -11
- package/dist/esm/vega-input-phone-number.entry.js +10 -10
- package/dist/esm/vega-input-range.entry.js +9 -9
- package/dist/esm/vega-input-select.entry.js +14 -14
- package/dist/esm/vega-input.entry.js +39 -35
- package/dist/esm/vega-item-toggle.entry.js +5 -5
- package/dist/esm/vega-left-nav_5.entry.js +19 -19
- package/dist/esm/vega-line-chart.entry.js +2 -2
- package/dist/esm/vega-loader-wrapper_2.entry.js +6 -6
- package/dist/esm/vega-page-notification_2.entry.js +4 -4
- package/dist/esm/vega-pagination-page-selector-mobile.entry.js +5 -5
- package/dist/esm/vega-pagination-page-size-selector-mobile.entry.js +5 -5
- package/dist/esm/vega-pagination.entry.js +10 -10
- package/dist/esm/vega-pie-chart.entry.js +2 -2
- package/dist/esm/vega-popover_2.entry.js +14 -14
- package/dist/esm/vega-progress-tracker_2.entry.js +9 -9
- package/dist/esm/vega-radio_2.entry.js +12 -12
- package/dist/esm/vega-rich-text-bookmark-editor.entry.js +441 -0
- package/dist/esm/vega-rich-text-content.entry.js +49 -17
- package/dist/esm/vega-rich-text-editor_4.entry.js +699 -244
- package/dist/esm/vega-rich-text-find-replace-panel.entry.js +9 -9
- package/dist/esm/vega-rich-text-special-characters-panel.entry.js +10 -10
- package/dist/esm/vega-rich-text-table-properties_3.entry.js +18 -18
- package/dist/esm/vega-section-title.entry.js +2 -2
- package/dist/esm/vega-segment-control.entry.js +5 -5
- package/dist/esm/vega-selection-chip_2.entry.js +11 -11
- package/dist/esm/vega-selection-tile_2.entry.js +9 -9
- package/dist/esm/vega-sidenav_3.entry.js +13 -13
- package/dist/esm/vega-signature-capture.entry.js +15 -15
- package/dist/esm/vega-skeleton.entry.js +2 -2
- package/dist/esm/vega-slot-container.entry.js +2 -2
- package/dist/esm/vega-stepper.entry.js +8 -8
- package/dist/esm/vega-tab-group_2.entry.js +398 -108
- package/dist/esm/vega-table_11.entry.js +23 -23
- package/dist/esm/vega-text.entry.js +2 -2
- package/dist/esm/vega-textarea.entry.js +8 -8
- package/dist/esm/vega-time-picker_2.entry.js +16 -16
- package/dist/esm/vega-toggle-switch.entry.js +7 -7
- package/dist/esm/vega-tooltip_2.entry.js +9 -9
- package/dist/esm/vega.js +20 -19
- package/dist/sri/vega-sri-manifest.json +417 -413
- package/dist/types/components/vega-calendar/slimmers/common/controllers/vega-calendar-event-preview-actions-controller.d.ts +2 -0
- package/dist/types/components/vega-calendar/types.d.ts +6 -0
- package/dist/types/components/vega-calendar/vega-calendar-event-preview/assets/delete.d.ts +3 -0
- package/dist/types/components/vega-calendar/vega-calendar-event-preview/slimmers/renderers/vega-calendar-event-preview-detail-renderer.d.ts +1 -0
- package/dist/types/components/vega-calendar/vega-calendar.d.ts +21 -1
- package/dist/types/components/vega-input/slimmers/controllers/vega-input-state-controller.d.ts +0 -2
- package/dist/types/components/vega-input/slimmers/renderers/vega-input-input-container-renderer.d.ts +4 -0
- package/dist/types/components/vega-input/slimmers/renderers/vega-input-input-renderer.d.ts +2 -0
- package/dist/types/components/vega-input/vega-input.d.ts +15 -3
- package/dist/types/components/vega-input-numeric/slimmers/renderers/vega-input-numeric-renderer.d.ts +2 -0
- package/dist/types/components/vega-input-numeric/vega-input-numeric.d.ts +0 -2
- package/dist/types/components/vega-rich-text-editor/constants/constant.d.ts +4 -0
- package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/sequential-composition-strategy.d.ts +14 -0
- package/dist/types/components/vega-rich-text-editor/dto/actions/annotation-action.abstract.d.ts +3 -1
- package/dist/types/components/vega-rich-text-editor/dto/actions/bold-annotation-action.d.ts +1 -0
- package/dist/types/components/vega-rich-text-editor/dto/actions/clear-formatting-annotation-action.d.ts +1 -0
- package/dist/types/components/vega-rich-text-editor/dto/actions/code-annotation-action.d.ts +1 -0
- package/dist/types/components/vega-rich-text-editor/dto/actions/custom-style-annotation-action.d.ts +1 -0
- package/dist/types/components/vega-rich-text-editor/dto/actions/delete-node-annotation-action.d.ts +1 -0
- package/dist/types/components/vega-rich-text-editor/dto/actions/horizontal-alignment-annotation-action.d.ts +1 -0
- package/dist/types/components/vega-rich-text-editor/dto/actions/image-annotation-action.d.ts +1 -0
- package/dist/types/components/vega-rich-text-editor/dto/actions/indent-annotation-action.d.ts +1 -0
- package/dist/types/components/vega-rich-text-editor/dto/actions/italic-annotation-action.d.ts +1 -0
- package/dist/types/components/vega-rich-text-editor/dto/actions/link-annotation-action.d.ts +1 -0
- package/dist/types/components/vega-rich-text-editor/dto/actions/link-group-annotation-action.d.ts +1 -0
- package/dist/types/components/vega-rich-text-editor/dto/actions/modify-content-action.abstract.d.ts +4 -1
- package/dist/types/components/vega-rich-text-editor/dto/actions/selection-change-action.d.ts +1 -0
- package/dist/types/components/vega-rich-text-editor/dto/actions/sequential-composition-action.d.ts +30 -0
- package/dist/types/components/vega-rich-text-editor/dto/actions/splittable-action.abstract.d.ts +1 -0
- package/dist/types/components/vega-rich-text-editor/dto/actions/strikethrough-annotation-action.d.ts +1 -0
- package/dist/types/components/vega-rich-text-editor/dto/actions/sync-up-selection-action.d.ts +1 -0
- package/dist/types/components/vega-rich-text-editor/dto/actions/text-color-annotation-action.d.ts +1 -0
- package/dist/types/components/vega-rich-text-editor/dto/actions/text-style-annotation-action.d.ts +1 -0
- package/dist/types/components/vega-rich-text-editor/dto/actions/underline-annotation-action.d.ts +1 -0
- package/dist/types/components/vega-rich-text-editor/dto/annotations/annotation.abstract.d.ts +6 -0
- package/dist/types/components/vega-rich-text-editor/dto/annotations/bold-annotation.d.ts +4 -0
- package/dist/types/components/vega-rich-text-editor/dto/annotations/code-annotation.d.ts +4 -0
- package/dist/types/components/vega-rich-text-editor/dto/annotations/italic-annotation.d.ts +4 -0
- package/dist/types/components/vega-rich-text-editor/dto/annotations/plain-text-annotation.d.ts +4 -0
- package/dist/types/components/vega-rich-text-editor/dto/annotations/selection-range-annotation.d.ts +4 -0
- package/dist/types/components/vega-rich-text-editor/dto/annotations/strikethrough-annotation.d.ts +4 -0
- package/dist/types/components/vega-rich-text-editor/dto/annotations/text-color-annotation.d.ts +4 -0
- package/dist/types/components/vega-rich-text-editor/dto/annotations/underline-annotation.d.ts +4 -0
- package/dist/types/components/vega-rich-text-editor/dto/blocks/block.abstract.d.ts +3 -6
- package/dist/types/components/vega-rich-text-editor/dto/blocks/code-block.d.ts +1 -2
- package/dist/types/components/vega-rich-text-editor/dto/blocks/html-block.d.ts +1 -2
- package/dist/types/components/vega-rich-text-editor/dto/blocks/image-block.d.ts +1 -2
- package/dist/types/components/vega-rich-text-editor/dto/blocks/list-block.d.ts +1 -2
- package/dist/types/components/vega-rich-text-editor/dto/blocks/list-item-block.d.ts +1 -2
- package/dist/types/components/vega-rich-text-editor/dto/blocks/text-block.d.ts +2 -3
- package/dist/types/components/vega-rich-text-editor/dto/content-state.d.ts +3 -3
- package/dist/types/components/vega-rich-text-editor/dto/filter-styles-strategies/filter-styles-strategy-registry.d.ts +1 -1
- package/dist/types/components/vega-rich-text-editor/dto/flush-changes-payload.d.ts +16 -0
- package/dist/types/components/vega-rich-text-editor/dto/nodes/code-block-node.d.ts +1 -2
- package/dist/types/components/vega-rich-text-editor/dto/nodes/decorator-node.d.ts +1 -0
- package/dist/types/components/vega-rich-text-editor/dto/nodes/image-node.d.ts +1 -2
- package/dist/types/components/vega-rich-text-editor/dto/nodes/node.abstract.d.ts +3 -6
- package/dist/types/components/vega-rich-text-editor/dto/nodes/text-node.d.ts +9 -2
- package/dist/types/components/vega-rich-text-editor/dto/renderers/base-renderer.d.ts +3 -1
- package/dist/types/components/vega-rich-text-editor/dto/renderers/blocks/block-renderer.abstract.d.ts +1 -0
- package/dist/types/components/vega-rich-text-editor/dto/renderers/blocks/block-text-nodes-renderer.abstract.d.ts +1 -0
- package/dist/types/components/vega-rich-text-editor/dto/renderers/blocks/code-block-renderer.d.ts +1 -0
- package/dist/types/components/vega-rich-text-editor/dto/renderers/blocks/html-block-renderer.d.ts +1 -0
- package/dist/types/components/vega-rich-text-editor/dto/renderers/blocks/image-block-renderer.d.ts +1 -0
- package/dist/types/components/vega-rich-text-editor/dto/renderers/blocks/link-wrapper-renderer.d.ts +2 -1
- package/dist/types/components/vega-rich-text-editor/dto/renderers/blocks/list-block-renderer.d.ts +1 -0
- package/dist/types/components/vega-rich-text-editor/dto/renderers/blocks/list-item-block-renderer.d.ts +1 -0
- package/dist/types/components/vega-rich-text-editor/dto/renderers/blocks/text-block-renderer.d.ts +1 -0
- package/dist/types/components/vega-rich-text-editor/dto/renderers/nodes/code-block-node-renderer.d.ts +1 -0
- package/dist/types/components/vega-rich-text-editor/dto/renderers/nodes/image-node-renderer.d.ts +1 -0
- package/dist/types/components/vega-rich-text-editor/dto/renderers/nodes/node-renderer.abstract.d.ts +1 -0
- package/dist/types/components/vega-rich-text-editor/dto/renderers/nodes/text-node-renderer.d.ts +1 -0
- package/dist/types/components/vega-rich-text-editor/extensions/base-extension-renderer.d.ts +1 -0
- package/dist/types/components/vega-rich-text-editor/extensions/blockquote/dto/rte-blockquote-block.d.ts +1 -2
- package/dist/types/components/vega-rich-text-editor/extensions/blockquote/renderers/blockquote-block-renderer.d.ts +1 -0
- package/dist/types/components/vega-rich-text-editor/extensions/bookmark/action-handler-interceptors/delete-bookmark-before-text-interceptor.d.ts +16 -0
- package/dist/types/components/vega-rich-text-editor/extensions/bookmark/action-handler-strategies/insert-bookmark-node-strategy.d.ts +12 -0
- package/dist/types/components/vega-rich-text-editor/extensions/bookmark/action-handler-strategies/update-bookmark-name-strategy.d.ts +12 -0
- package/dist/types/components/vega-rich-text-editor/extensions/bookmark/actions/insert-bookmark-node-action.d.ts +16 -0
- package/dist/types/components/vega-rich-text-editor/extensions/bookmark/actions/update-bookmark-name-action.d.ts +12 -0
- package/dist/types/components/vega-rich-text-editor/extensions/bookmark/anchor-to-bookmark-node-strategy.d.ts +52 -0
- package/dist/types/components/vega-rich-text-editor/extensions/bookmark/assets/bookmark.d.ts +5 -0
- package/dist/types/components/vega-rich-text-editor/extensions/bookmark/bookmark-extension.d.ts +16 -0
- package/dist/types/components/vega-rich-text-editor/extensions/bookmark/bookmark-node.d.ts +62 -0
- package/dist/types/components/vega-rich-text-editor/extensions/bookmark/renderers/bookmark-node-renderer.d.ts +128 -0
- package/dist/types/components/vega-rich-text-editor/extensions/bookmark/renderers/bookmark-toolbar-button-renderer.d.ts +46 -0
- package/dist/types/components/vega-rich-text-editor/extensions/bookmark/utils.d.ts +18 -0
- package/dist/types/components/vega-rich-text-editor/extensions/bookmark/vega-rich-text-bookmark-editor/slimmers/controllers/bookmark-editor-controller.d.ts +86 -0
- package/dist/types/components/vega-rich-text-editor/extensions/bookmark/vega-rich-text-bookmark-editor/slimmers/renderers/vega-rich-text-bookmark-editor-renderer.d.ts +28 -0
- package/dist/types/components/vega-rich-text-editor/extensions/bookmark/vega-rich-text-bookmark-editor/types.d.ts +7 -0
- package/dist/types/components/vega-rich-text-editor/extensions/bookmark/vega-rich-text-bookmark-editor/vega-rich-text-bookmark-editor.d.ts +77 -0
- package/dist/types/components/vega-rich-text-editor/extensions/functions/dto/function-block.d.ts +8 -2
- package/dist/types/components/vega-rich-text-editor/extensions/functions/dto/logic-control-block.d.ts +1 -2
- package/dist/types/components/vega-rich-text-editor/extensions/functions/dto/logic-control-node.d.ts +1 -2
- package/dist/types/components/vega-rich-text-editor/extensions/functions/renderers/function-block-renderer.d.ts +1 -0
- package/dist/types/components/vega-rich-text-editor/extensions/functions/renderers/logic-control-block-renderer.d.ts +1 -0
- package/dist/types/components/vega-rich-text-editor/extensions/horizontal-line/dto/horizontal-line-block.d.ts +1 -2
- package/dist/types/components/vega-rich-text-editor/extensions/horizontal-line/dto/horizontal-line-node.d.ts +1 -0
- package/dist/types/components/vega-rich-text-editor/extensions/horizontal-line/renderers/horizontal-line-block-renderer.d.ts +1 -0
- package/dist/types/components/vega-rich-text-editor/extensions/line-height/actions/line-height-annotation-action.d.ts +1 -0
- package/dist/types/components/vega-rich-text-editor/extensions/paste/controllers/chooser-positioner.d.ts +33 -0
- package/dist/types/components/vega-rich-text-editor/extensions/paste/controllers/paste-chooser-controller.d.ts +43 -0
- package/dist/types/components/vega-rich-text-editor/extensions/paste/controllers/paste-event-interceptor.d.ts +22 -0
- package/dist/types/components/vega-rich-text-editor/extensions/paste/controllers/selection-snapshot-service.d.ts +29 -0
- package/dist/types/components/vega-rich-text-editor/extensions/paste/parse-local-images-helper/image-extractor.d.ts +13 -0
- package/dist/types/components/vega-rich-text-editor/extensions/paste/parse-local-images-helper/paste-image-parser.d.ts +1 -1
- package/dist/types/components/vega-rich-text-editor/extensions/paste/parse-local-images-helper/pending-image-registry.d.ts +1 -1
- package/dist/types/components/vega-rich-text-editor/extensions/paste/paste-chooser-ui.d.ts +1 -0
- package/dist/types/components/vega-rich-text-editor/extensions/paste/paste-extension.d.ts +28 -93
- package/dist/types/components/vega-rich-text-editor/extensions/paste/pipeline/data-transfer-builder.d.ts +10 -0
- package/dist/types/components/vega-rich-text-editor/extensions/paste/pipeline/paste-dispatcher.d.ts +8 -0
- package/dist/types/components/vega-rich-text-editor/extensions/paste/pipeline/paste-processing-pipeline.d.ts +18 -0
- package/dist/types/components/vega-rich-text-editor/extensions/paste/strategies/paste-processing-strategy.abstract.d.ts +28 -6
- package/dist/types/components/vega-rich-text-editor/extensions/paste/strategies/paste-strategy-selector.d.ts +13 -0
- package/dist/types/components/vega-rich-text-editor/extensions/paste/strategies/plain-paste-strategy.d.ts +29 -0
- package/dist/types/components/vega-rich-text-editor/extensions/paste/type.d.ts +35 -0
- package/dist/types/components/vega-rich-text-editor/extensions/table/actions/table-annotations-action.d.ts +1 -0
- package/dist/types/components/vega-rich-text-editor/extensions/table/actions/table-cell-annotations-action.d.ts +1 -0
- package/dist/types/components/vega-rich-text-editor/extensions/table/actions/table-head-cell-annotations-action.d.ts +1 -0
- package/dist/types/components/vega-rich-text-editor/extensions/table/actions/update-table-properties-action.d.ts +1 -0
- package/dist/types/components/vega-rich-text-editor/extensions/table/dto/table-block.d.ts +1 -2
- package/dist/types/components/vega-rich-text-editor/extensions/table/dto/table-body-block.d.ts +1 -2
- package/dist/types/components/vega-rich-text-editor/extensions/table/dto/table-caption-block.d.ts +1 -2
- package/dist/types/components/vega-rich-text-editor/extensions/table/dto/table-cell-block.d.ts +1 -2
- package/dist/types/components/vega-rich-text-editor/extensions/table/dto/table-head-block.d.ts +1 -2
- package/dist/types/components/vega-rich-text-editor/extensions/table/dto/table-head-cell-block.d.ts +1 -2
- package/dist/types/components/vega-rich-text-editor/extensions/table/dto/table-row-block.d.ts +1 -2
- package/dist/types/components/vega-rich-text-editor/extensions/table/renderers/table-body-renderer.d.ts +1 -0
- package/dist/types/components/vega-rich-text-editor/extensions/table/renderers/table-caption-renderer.d.ts +1 -0
- package/dist/types/components/vega-rich-text-editor/extensions/table/renderers/table-cell-renderer.d.ts +1 -0
- package/dist/types/components/vega-rich-text-editor/extensions/table/renderers/table-head-cell-renderer.d.ts +1 -0
- package/dist/types/components/vega-rich-text-editor/extensions/table/renderers/table-head-renderer.d.ts +1 -0
- package/dist/types/components/vega-rich-text-editor/extensions/table/renderers/table-renderer.d.ts +1 -0
- package/dist/types/components/vega-rich-text-editor/extensions/table/renderers/table-row-renderer.d.ts +1 -0
- package/dist/types/components/vega-rich-text-editor/extensions/tokens/token-node-renderer.d.ts +1 -0
- package/dist/types/components/vega-rich-text-editor/extensions/tokens/token-node.d.ts +1 -2
- package/dist/types/components/vega-rich-text-editor/helpers/utils.d.ts +47 -0
- package/dist/types/components/vega-rich-text-editor/interface.d.ts +15 -0
- package/dist/types/components/vega-rich-text-editor/public-api.d.ts +1 -0
- package/dist/types/components/vega-rich-text-editor/slimmers/controllers/focus-controller.d.ts +12 -0
- package/dist/types/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/annotation-handler/html-element-to-annotation-generator.d.ts +1 -1
- package/dist/types/components/vega-rich-text-editor/slimmers/controllers/helper/input-event-handler/abstract-delete-content-handler.d.ts +17 -6
- package/dist/types/components/vega-rich-text-editor/slimmers/controllers/helper/input-event-handler/backward-delete-content-handler.d.ts +5 -1
- package/dist/types/components/vega-rich-text-editor/slimmers/controllers/helper/input-event-handler/base-handler.d.ts +30 -1
- package/dist/types/components/vega-rich-text-editor/slimmers/controllers/helper/input-event-handler/forward-delete-content-handler.d.ts +5 -1
- package/dist/types/components/vega-rich-text-editor/slimmers/controllers/helper/input-event-handler/insert-line-break-handler.d.ts +21 -4
- package/dist/types/components/vega-rich-text-editor/slimmers/controllers/helper/input-event-handler/insert-paragraph-handler.d.ts +12 -4
- package/dist/types/components/vega-rich-text-editor/slimmers/controllers/helper/input-event-handler/insert-paste-handler.d.ts +38 -5
- package/dist/types/components/vega-rich-text-editor/slimmers/controllers/helper/input-event-handler/insert-text-handler.d.ts +7 -2
- package/dist/types/components/vega-rich-text-editor/slimmers/controllers/user-input-controller.d.ts +2 -0
- package/dist/types/components/vega-rich-text-editor/utils/html-to-plain-text-utils.d.ts +31 -0
- package/dist/types/components/vega-rich-text-editor/vega-rich-text-link-editor/slimmers/controllers/link-editor-controller.d.ts +11 -0
- package/dist/types/components/vega-rich-text-editor/vega-rich-text-link-editor/slimmers/controllers/link-type-config-controller.d.ts +26 -0
- package/dist/types/components/vega-rich-text-editor/vega-rich-text-link-editor/slimmers/renderers/vega-rich-text-link-editor-renderer.d.ts +8 -0
- package/dist/types/components/vega-tab-group/helpers/vega-tab-group-width-layout-helper.d.ts +63 -0
- package/dist/types/components/vega-tab-group/slimmers/vega-tab-group/controllers/vega-tab-group-pages-controller.d.ts +14 -0
- package/dist/types/components/vega-tab-group/slimmers/vega-tab-group/controllers/vega-tab-group-slider-state-controller.d.ts +3 -0
- package/dist/types/components/vega-tab-group/slimmers/vega-tab-group/renderers/vega-tab-group-constrained-tab-label-renderer.d.ts +17 -0
- package/dist/types/components/vega-tab-group/slimmers/vega-tab-group/renderers/vega-tab-group-tab-list-renderer.d.ts +3 -0
- package/dist/types/components/vega-tab-group/types.d.ts +10 -0
- package/dist/types/components/vega-tab-group/vega-tab-group.d.ts +22 -0
- package/dist/types/components.d.ts +135 -1
- package/dist/types/constants/ui.d.ts +1 -1
- package/dist/types/helpers/dialog/vega-dialog-controller.d.ts +3 -2
- package/dist/types/helpers/discriminator/discriminated.d.ts +75 -0
- package/dist/types/helpers/event-manager/event-id/vega-event-id.d.ts +1 -0
- package/dist/types/helpers/event-manager/vega-event-manager.d.ts +3 -1
- package/dist/types/helpers/icon/icon-manager.d.ts +3 -1
- package/dist/types/helpers/loading-indicator/vega-loader-controller.d.ts +3 -1
- package/dist/types/helpers/notify/vega-notify-controller.d.ts +3 -1
- package/dist/types/helpers/skeleton-loader/vega-skeleton-loader-controller.d.ts +3 -1
- package/dist/types/helpers/slimmers/runtime-metrics/create-public-api-runtime-metrics-slimmer.d.ts +1 -1
- package/dist/types/helpers/theme/theme-manager.d.ts +3 -1
- package/dist/types/helpers/translation/interface.d.ts +12 -0
- package/dist/types/helpers/translation/translation.d.ts +3 -1
- package/dist/types/helpers/zindex/vega-z-index-manager.d.ts +3 -1
- package/dist/types/types/components.type.d.ts +2 -0
- package/dist/types/types/public-api.d.ts +2 -1
- package/dist/types/vega-slimmer/src/common/helpers/global-slimmer-registry.d.ts +10 -3
- package/dist/vega/index.esm.js +1 -1
- package/dist/vega/{p-68ca8d3c.entry.js → p-013939ea.entry.js} +1 -1
- package/dist/vega/p-0169f71c.entry.js +1 -0
- package/dist/vega/p-018bb83b.entry.js +1 -0
- package/dist/vega/p-08bf08d2.js +1 -0
- package/dist/vega/p-0b33753f.entry.js +1 -0
- package/dist/vega/p-1537b1e4.js +1 -0
- package/dist/vega/{p-cb1cd15f.entry.js → p-17f6dc94.entry.js} +1 -1
- package/dist/vega/p-1a4d1991.entry.js +1 -0
- package/dist/vega/{p-178634f3.js → p-1b2e5898.js} +1 -1
- package/dist/vega/p-1f1f93bf.entry.js +1 -0
- package/dist/vega/{p-6e9e7131.js → p-1fb953f8.js} +1 -1
- package/dist/vega/{p-6ae93679.entry.js → p-2171b571.entry.js} +1 -1
- package/dist/vega/p-255fe20b.js +1 -0
- package/dist/vega/{p-c34f4cbc.js → p-261cf764.js} +1 -1
- package/dist/vega/p-27e77ea1.entry.js +1 -0
- package/dist/vega/p-28acbe42.entry.js +1 -0
- package/dist/vega/p-29584bb5.js +1 -0
- package/dist/vega/p-2acc600a.entry.js +1 -0
- package/dist/vega/p-2fc2299f.js +1 -0
- package/dist/vega/p-2ff659a1.entry.js +1 -0
- package/dist/vega/p-322da1eb.entry.js +1 -0
- package/dist/vega/{p-0eea1ca8.js → p-3283fa2f.js} +1 -1
- package/dist/vega/p-3567dc55.entry.js +1 -0
- package/dist/vega/p-36b795c6.entry.js +1 -0
- package/dist/vega/p-372436a4.entry.js +1 -0
- package/dist/vega/{p-8ebe30a8.js → p-37714a3a.js} +1 -1
- package/dist/vega/p-38c551a9.entry.js +1 -0
- package/dist/vega/p-3b4e2ba0.js +1 -0
- package/dist/vega/{p-4ea477d5.js → p-3b6a6f08.js} +1 -1
- package/dist/vega/p-3b911043.entry.js +1 -0
- package/dist/vega/p-3bb7114b.js +1 -0
- package/dist/vega/p-3e270b65.entry.js +1 -0
- package/dist/vega/{p-58c8a4ac.js → p-4043508a.js} +1 -1
- package/dist/vega/p-4151d4a8.js +1 -0
- package/dist/vega/p-436bd1af.entry.js +1 -0
- package/dist/vega/{p-6031bed1.js → p-44245a36.js} +1 -1
- package/dist/vega/{p-306720b8.entry.js → p-44e31581.entry.js} +1 -1
- package/dist/vega/{p-3911e760.entry.js → p-4503f5b9.entry.js} +1 -1
- package/dist/vega/{p-f01bc6a2.js → p-45af801f.js} +1 -1
- package/dist/vega/{p-d6bd3ce4.entry.js → p-467e27af.entry.js} +1 -1
- package/dist/vega/p-48c2150b.entry.js +1 -0
- package/dist/vega/p-4b253f74.entry.js +1 -0
- package/dist/vega/p-4cdc064d.entry.js +1 -0
- package/dist/vega/{p-764b4e51.entry.js → p-4e4b50f3.entry.js} +1 -1
- package/dist/vega/{p-cab890be.entry.js → p-564110ba.entry.js} +1 -1
- package/dist/vega/p-5c285374.js +1 -0
- package/dist/vega/p-5c8e4e8f.js +1 -0
- package/dist/vega/p-5d427a47.entry.js +1 -0
- package/dist/vega/p-5f377954.js +1 -1
- package/dist/vega/p-608d3559.entry.js +1 -0
- package/dist/vega/p-64eb05d3.entry.js +1 -0
- package/dist/vega/p-66bf209b.entry.js +1 -0
- package/dist/vega/{p-45ad2d90.entry.js → p-69eadbd8.entry.js} +1 -1
- package/dist/vega/p-6c4edee8.entry.js +1 -0
- package/dist/vega/p-6d4f6031.entry.js +1 -0
- package/dist/vega/p-6e16bb3a.js +1 -0
- package/dist/vega/p-76f4fdba.entry.js +1 -0
- package/dist/vega/p-7874055b.entry.js +1 -0
- package/dist/vega/p-7d3d24f6.entry.js +1 -0
- package/dist/vega/{p-f48519d2.js → p-7f9ad7bc.js} +1 -1
- package/dist/vega/p-80321148.entry.js +1 -0
- package/dist/vega/p-8193f4ef.entry.js +1 -0
- package/dist/vega/{p-b97ed9f7.entry.js → p-8197d172.entry.js} +1 -1
- package/dist/vega/{p-60010f14.entry.js → p-82411b76.entry.js} +1 -1
- package/dist/vega/{p-65fee02f.entry.js → p-8a38746d.entry.js} +1 -1
- package/dist/vega/{p-be783294.entry.js → p-8a6e378a.entry.js} +1 -1
- package/dist/vega/p-8ac0b1b2.entry.js +1 -0
- package/dist/vega/{p-f8d13d01.entry.js → p-8bd29577.entry.js} +1 -1
- package/dist/vega/{p-942f9ea6.entry.js → p-8c61db9d.entry.js} +1 -1
- package/dist/vega/{p-5c9c0c0d.entry.js → p-8de29082.entry.js} +1 -1
- package/dist/vega/{p-d3e99d4a.entry.js → p-8e59606f.entry.js} +1 -1
- package/dist/vega/p-8ea41806.js +1 -0
- package/dist/vega/p-9153c2f5.entry.js +1 -0
- package/dist/vega/p-916da3ce.entry.js +1 -0
- package/dist/vega/p-92411f56.entry.js +1 -0
- package/dist/vega/p-94d65dcf.entry.js +1 -0
- package/dist/vega/{p-9fb3aeeb.entry.js → p-9a0e17b2.entry.js} +1 -1
- package/dist/vega/{p-e48b7a8a.entry.js → p-9a96fb05.entry.js} +1 -1
- package/dist/vega/{p-638b6a7d.js → p-9fcfd738.js} +1 -1
- package/dist/vega/p-9fd547f3.entry.js +1 -0
- package/dist/vega/{p-e14323f3.js → p-a2c7a3bc.js} +1 -1
- package/dist/vega/p-a2dcde12.js +1 -0
- package/dist/vega/p-a2fa8c93.entry.js +1 -0
- package/dist/vega/{p-c576e846.js → p-a60d75d9.js} +1 -1
- package/dist/vega/{p-6a6c1279.js → p-a83cef5a.js} +1 -1
- package/dist/vega/{p-069bbb4a.js → p-a9fc4043.js} +1 -1
- package/dist/vega/{p-5536146c.js → p-abad8ffd.js} +1 -1
- package/dist/vega/p-abe5f7f0.entry.js +1 -0
- package/dist/vega/p-ac98c189.entry.js +1 -0
- package/dist/vega/{p-32f5a6dd.entry.js → p-ade903b3.entry.js} +1 -1
- package/dist/vega/{p-f485448a.js → p-affb40e8.js} +1 -1
- package/dist/vega/{p-b2a4314a.js → p-b3a1cd22.js} +1 -1
- package/dist/vega/p-b63a90b3.entry.js +1 -0
- package/dist/vega/p-ba050d63.entry.js +1 -0
- package/dist/vega/{p-4b35c748.js → p-ba67eb96.js} +1 -1
- package/dist/vega/p-bec0e08a.entry.js +1 -0
- package/dist/vega/p-c08ac33f.entry.js +1 -0
- package/dist/vega/{p-55c2c0df.entry.js → p-c7ec97d1.entry.js} +1 -1
- package/dist/vega/p-ca1fe571.entry.js +1 -0
- package/dist/vega/{p-c04a90d8.entry.js → p-cb68a43a.entry.js} +1 -1
- package/dist/vega/p-cc9fc36a.entry.js +1 -0
- package/dist/vega/p-d044d54f.entry.js +1 -0
- package/dist/vega/p-d1d91f1a.js +1 -0
- package/dist/vega/{p-a54ed341.entry.js → p-d3a9355c.entry.js} +1 -1
- package/dist/vega/p-d5a75228.js +1 -0
- package/dist/vega/p-dc83fa6b.entry.js +1 -0
- package/dist/vega/p-dcfce26e.entry.js +1 -0
- package/dist/vega/p-df9585f6.js +3 -0
- package/dist/vega/{p-71813a9e.entry.js → p-e2c8a470.entry.js} +1 -1
- package/dist/vega/{p-60a74fb7.js → p-e33a954f.js} +1 -1
- package/dist/vega/p-e5fc6583.entry.js +1 -0
- package/dist/vega/p-e668cf11.js +1 -0
- package/dist/vega/{p-2dda5c65.entry.js → p-e6b0a292.entry.js} +1 -1
- package/dist/vega/{p-96c090c4.js → p-e84c2589.js} +1 -1
- package/dist/vega/{p-a8a246e8.entry.js → p-eb945d34.entry.js} +1 -1
- package/dist/vega/p-ebe1dd2b.entry.js +1 -0
- package/dist/vega/p-f5874834.entry.js +1 -0
- package/dist/vega/p-f818bb20.entry.js +1 -0
- package/dist/vega/p-f981cf2c.js +1 -0
- package/dist/vega/p-f9d09b0c.js +1 -0
- package/dist/vega/{p-941a83db.js → p-fdbdf12f.js} +1 -1
- package/dist/vega/{p-6d90d28d.entry.js → p-fee080b9.entry.js} +1 -1
- package/dist/vega/vega.esm.js +1 -1
- package/package.json +2 -2
- package/dist/cjs/image-extension-673ebe7f.js +0 -56
- package/dist/esm/image-extension-f6dbd70c.js +0 -53
- package/dist/vega/p-022cbf8a.js +0 -1
- package/dist/vega/p-02c1284e.entry.js +0 -1
- package/dist/vega/p-08fd229c.js +0 -1
- package/dist/vega/p-0e298ee8.entry.js +0 -1
- package/dist/vega/p-131ce9df.entry.js +0 -1
- package/dist/vega/p-143ee395.entry.js +0 -1
- package/dist/vega/p-1dbf8d1f.js +0 -1
- package/dist/vega/p-2b26e182.entry.js +0 -1
- package/dist/vega/p-30010c41.entry.js +0 -1
- package/dist/vega/p-3460a1c5.entry.js +0 -1
- package/dist/vega/p-34b523da.entry.js +0 -1
- package/dist/vega/p-357c0226.entry.js +0 -1
- package/dist/vega/p-37d5c37e.entry.js +0 -1
- package/dist/vega/p-3d6a43df.entry.js +0 -1
- package/dist/vega/p-4b117bfd.entry.js +0 -1
- package/dist/vega/p-4e23e56c.entry.js +0 -1
- package/dist/vega/p-4e70836a.entry.js +0 -1
- package/dist/vega/p-50e8e24f.entry.js +0 -1
- package/dist/vega/p-522a6eec.entry.js +0 -1
- package/dist/vega/p-587130f6.entry.js +0 -1
- package/dist/vega/p-594cb986.entry.js +0 -1
- package/dist/vega/p-5c17ddda.entry.js +0 -1
- package/dist/vega/p-6098c4bb.js +0 -1
- package/dist/vega/p-61e63c0e.entry.js +0 -1
- package/dist/vega/p-62254dc7.entry.js +0 -1
- package/dist/vega/p-62ae9327.entry.js +0 -1
- package/dist/vega/p-66245bc0.entry.js +0 -1
- package/dist/vega/p-6fae6768.js +0 -1
- package/dist/vega/p-729529d6.entry.js +0 -1
- package/dist/vega/p-75bfbffe.entry.js +0 -1
- package/dist/vega/p-77bcdd35.js +0 -1
- package/dist/vega/p-853a05eb.js +0 -1
- package/dist/vega/p-8ce9e214.js +0 -1
- package/dist/vega/p-8e8b5790.entry.js +0 -1
- package/dist/vega/p-8f00dfe6.js +0 -1
- package/dist/vega/p-9236b8d9.entry.js +0 -1
- package/dist/vega/p-9402f32f.js +0 -1
- package/dist/vega/p-9fdf66a8.entry.js +0 -1
- package/dist/vega/p-a2c45173.entry.js +0 -1
- package/dist/vega/p-a6a89f09.entry.js +0 -1
- package/dist/vega/p-ab9d53e9.js +0 -1
- package/dist/vega/p-adc64ff6.entry.js +0 -1
- package/dist/vega/p-af0cfea0.entry.js +0 -1
- package/dist/vega/p-af0e9bd5.entry.js +0 -1
- package/dist/vega/p-afcd8f04.js +0 -1
- package/dist/vega/p-b21cc390.entry.js +0 -1
- package/dist/vega/p-b94f164a.entry.js +0 -1
- package/dist/vega/p-bbfffe6b.entry.js +0 -1
- package/dist/vega/p-beccc38c.entry.js +0 -1
- package/dist/vega/p-c51de680.js +0 -3
- package/dist/vega/p-c601eea6.js +0 -1
- package/dist/vega/p-c6d2513c.entry.js +0 -1
- package/dist/vega/p-ca6bd3a0.entry.js +0 -1
- package/dist/vega/p-d37d2ea4.entry.js +0 -1
- package/dist/vega/p-d7838f6e.entry.js +0 -1
- package/dist/vega/p-d8c9ea46.entry.js +0 -1
- package/dist/vega/p-d9588b3f.entry.js +0 -1
- package/dist/vega/p-db69a5c9.entry.js +0 -1
- package/dist/vega/p-de1d0284.js +0 -1
- package/dist/vega/p-de6fc52c.js +0 -1
- package/dist/vega/p-e5226de6.entry.js +0 -1
- package/dist/vega/p-e8e3bf74.entry.js +0 -1
- package/dist/vega/p-e8f50fc5.js +0 -1
- package/dist/vega/p-eadc10bc.entry.js +0 -1
- package/dist/vega/p-ee329596.entry.js +0 -1
- package/dist/vega/p-f324e90e.js +0 -1
- package/dist/vega/p-f8b2dbb9.entry.js +0 -1
- package/dist/vega/p-f902305d.entry.js +0 -1
- package/dist/vega/p-f99f054c.entry.js +0 -1
- package/dist/vega/p-fe41e3b6.entry.js +0 -1
- package/dist/vega/p-ffdc25ec.js +0 -1
|
@@ -1,32 +1,32 @@
|
|
|
1
1
|
import { g as generateUUID } from './misc-9fdbcfbb.js';
|
|
2
2
|
import { a as arrayToClassString, g as getDeviceType, D as DeviceType, f as findParent, r as rgbToHex, b as getDeepActiveElementInShadow } from './ui-80e610f4.js';
|
|
3
3
|
import { L as LogUtility, I as InjectVegaSlimmer } from './global-slimmer-registry-17c4efd4.js';
|
|
4
|
-
import { I as InjectVegaTelemetrySlimmer, c as createPublicAPIRuntimeMetricsSlimmer } from './
|
|
4
|
+
import { I as InjectVegaTelemetrySlimmer, D as Discriminated, c as createPublicAPIRuntimeMetricsSlimmer } from './discriminated-fe5bf3c8.js';
|
|
5
5
|
import { I as InternalVegaZIndexManager } from './internal-vega-z-index-manager-7d2b54c3.js';
|
|
6
6
|
import { c as createDynamicSlimmer } from './dynamic-slimmer-90b8af32.js';
|
|
7
7
|
import { P as PageResizeObserverSlimmer } from './page-resize-observer-slimmer-e24d36c5.js';
|
|
8
|
-
import { i as internalVegaEventManager } from './internal-vega-event-manager-
|
|
9
|
-
import { V as VegaInternalTranslation } from './internal-translation-controller-
|
|
10
|
-
import { I as InternalCalendarPeriodConverter } from './internal-calendar-period-factory-
|
|
11
|
-
import { M as ModifyContentAction, A as ActionHandleStrategyRegistry, R as RTETextNode, H as HTML_VOID_TAGS, a as
|
|
12
|
-
import { U as UpdateCursorPositionAction, V as VegaRTEContent, B as BlockToRTEBlockStrategyAbstract, E as ElementToDTOStrategy, h as htmlElementToAnnotationGenerator, H as HtmlBlockStrategy, I as InsertNewParagraphAction, R as RTEImageBlock, a as InsertChildrenBeforeStrategy, P as PasteContentStrategy, A as AnnotationGeneratorStrategyAbstract, S as StylePreservator, b as RTEImageNode, C as COMMIT_VALUE } from './content-state-
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
8
|
+
import { i as internalVegaEventManager } from './internal-vega-event-manager-6eebe8f8.js';
|
|
9
|
+
import { V as VegaInternalTranslation } from './internal-translation-controller-3637e47e.js';
|
|
10
|
+
import { I as InternalCalendarPeriodConverter } from './internal-calendar-period-factory-261df2f2.js';
|
|
11
|
+
import { M as ModifyContentAction, A as ActionHandleStrategyRegistry, R as RTETextNode, H as HTML_VOID_TAGS, a as RTENode, s as stateEntityRenderingRegistry, b as RTEBlock, c as RTETextBlock, N as NodeAnnotationTypeEnum, d as RTE_BLOCK_BOUNDARY_ATTRIBUTE, e as RTEAnnotationStyle, f as ActionHandleStrategy, I as InsertChildrenAfterAction, g as AppendChildrenAction, h as InsertChildrenBeforeAction, i as InternalAnnotationTypeEnum, j as ModifyContentActionType, B as BlockAnnotation, k as AnnotationAction, l as RemoveChildrenAction, C as CommonAnnotationTypeEnum, m as CustomAttributeAnnotation, n as RTEDTOClassManager, o as RTEFilterStylesStrategy, p as RTEDecoratorNode, S as SplitBlockWithNodeAction, U as UpdateTextAction, q as RTECodeBlock, r as RTEListItemBlock, t as RTECodeBlockNode, u as CustomStyleAnnotation, v as RTEFilterStylesStrategyRegistry, w as plainPasteLinesToHtml, x as toPlainPasteLines, y as RTE_PRESERVED_WHITESPACE_DATA_TYPE, z as RTE_PASTE_MODE_DATA_TYPE, D as RTE_WORD_COUNT_KEY } from './code-block-9360c331.js';
|
|
12
|
+
import { U as UpdateCursorPositionAction, V as VegaRTEContent, B as BlockToRTEBlockStrategyAbstract, E as ElementToDTOStrategy, h as htmlElementToAnnotationGenerator, H as HtmlBlockStrategy, I as InsertNewParagraphAction, R as RTEImageBlock, a as InsertChildrenBeforeStrategy, P as PasteContentStrategy, A as AnnotationGeneratorStrategyAbstract, S as StylePreservator, b as RTEImageNode, C as COMMIT_VALUE } from './content-state-67a12e74.js';
|
|
13
|
+
import { a as VegaRTEExtensionRenderer, b as VegaRTEExtension, e as extensionContextManager } from './link-extension-57ba9520.js';
|
|
14
|
+
import { V as VegaInternalIconManager } from './internal-icon-manager-d4d534d2.js';
|
|
15
|
+
import { i as isNonNullable } from './type-guard-204094c6.js';
|
|
16
16
|
import { v as vegaNonceManager } from './vega-nonce-manager-497e5eb5.js';
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import { R as RTETableExtensionAnnotationTypeEnum, a as RTE_TABLE_HEAD_DEFAULT_BACKGROUND_COLOR, S as SettingEventHandler, T as TableSettingType, b as RTETableAnnotation, c as RTETableCellAnnotation, d as RTETableHeadCellBlock, e as RowOperationEventHandler, C as ColumnOperationEventHandler, M as MergeCellsOperationEventHandler, f as SplitCellOperationEventHandler, g as RTETableColorManager, h as RTETableBlock, i as generateTableBody, j as RTETableCellBlock, k as RTETableHeadBlock, l as RTETableBodyBlock, m as getParentBlockByType, n as RTETableHeadCellAnnotation, o as TableColumnStrategy, p as getAllTableRows, q as buildTableGrid, s as setSpanAttributes, r as findCellBlockById, t as getDefaultCellBlockTemplate, I as InsertTableColumnDirection, u as buildCellStartColumnMap, v as getTableColumnCount, w as getFirstNode, x as getCellSpan, y as createNewCell, z as MergeCellsOperationType, A as RTETableRowBlock, B as getActualColumnPosition, D as InsertTableRowDirection, E as RTE_TABLE_DEFAULT_COLORS, F as INSERT_TABLE_ROW_INTO_DIFFERENT_SECTION, G as INSERT_TABLE_ROW_INTO_SAME_SECTION, H as DELETE_TABLE_ROW, J as TOGGLE_HEADER_ROW, K as INSERT_TABLE_COLUMN, L as DELETE_TABLE_COLUMN, N as TOGGLE_HEADER_TABLE_COLUMN, O as ToggleHeaderTableColumnStrategy, P as SPLIT_TABLE_CELL, Q as REPLACE_TABLE_CELL, U as SPLIT_CELL_HORIZONTALLY, W as SPLIT_CELL_VERTICALLY, X as SELECT_TABLE_COLUMN, Y as MERGE_CELLS } from './split-cell-operation-1a889fa0.js';
|
|
17
|
+
import { b as VegaRTEToolbarButtonRenderer, A as ActionHandlerInterceptor, R as ReplaceSelectedTextAction, h as htmlContainsTable, c as htmlToPlainText, I as InsertNodeToNearestRootAction } from './image-extension-aea75132.js';
|
|
18
|
+
import { R as RTETableExtensionAnnotationTypeEnum, a as RTE_TABLE_HEAD_DEFAULT_BACKGROUND_COLOR, S as SettingEventHandler, T as TableSettingType, b as RTETableAnnotation, c as RTETableCellAnnotation, d as RTETableHeadCellBlock, e as RowOperationEventHandler, C as ColumnOperationEventHandler, M as MergeCellsOperationEventHandler, f as SplitCellOperationEventHandler, g as RTETableColorManager, h as RTETableBlock, i as generateTableBody, j as RTETableCellBlock, k as RTETableHeadBlock, l as RTETableBodyBlock, m as getParentBlockByType, n as RTETableHeadCellAnnotation, o as TableColumnStrategy, p as getAllTableRows, q as buildTableGrid, s as setSpanAttributes, r as findCellBlockById, t as getDefaultCellBlockTemplate, I as InsertTableColumnDirection, u as buildCellStartColumnMap, v as getTableColumnCount, w as getFirstNode, x as getCellSpan, y as createNewCell, z as MergeCellsOperationType, A as RTETableRowBlock, B as getActualColumnPosition, D as InsertTableRowDirection, E as RTE_TABLE_DEFAULT_COLORS, F as INSERT_TABLE_ROW_INTO_DIFFERENT_SECTION, G as INSERT_TABLE_ROW_INTO_SAME_SECTION, H as DELETE_TABLE_ROW, J as TOGGLE_HEADER_ROW, K as INSERT_TABLE_COLUMN, L as DELETE_TABLE_COLUMN, N as TOGGLE_HEADER_TABLE_COLUMN, O as ToggleHeaderTableColumnStrategy, P as SPLIT_TABLE_CELL, Q as REPLACE_TABLE_CELL, U as SPLIT_CELL_HORIZONTALLY, W as SPLIT_CELL_VERTICALLY, X as SELECT_TABLE_COLUMN, Y as MERGE_CELLS } from './split-cell-operation-85a036f9.js';
|
|
20
19
|
import { C as ChangeManager } from './change-manager-6a7eb88c.js';
|
|
20
|
+
import { D as DomNodeSubjectObserverFactory, d as domNodeSubjectFactory } from './dom-node-subject-observer-factory-bb7e68a0.js';
|
|
21
21
|
import { V as VegaInternalRTEExtensionTableCellsSelectionAnchor, a as VegaInternalPopoverUpdateTarget, b as VegaInternalRTEExtensionTableCellSelectionChange } from './vega-internal-event-id-02093067.js';
|
|
22
22
|
import { r as remoteInvocationRegistry } from './remote-invocation-registry-d69245c2.js';
|
|
23
23
|
import { V as VegaInternalThemeManager, a as VegaDarkModeStyleController } from './dark-mode-style-controller-4e04a2d3.js';
|
|
24
|
+
import { V as VegaPopoverHide, a as VegaPopoverShow, b as VegaClick, c as VegaChange } from './vega-event-id-6b4db259.js';
|
|
24
25
|
import { t as tryGetDocument } from './try-get-document-bef0f526.js';
|
|
25
26
|
import { p as parseToPixelString } from './pixel-f32c07ce.js';
|
|
26
27
|
import { c as cleanObject } from './object-0c277f57.js';
|
|
27
28
|
import { d as debounce } from './timer-9321173b.js';
|
|
28
29
|
import { c as camelToDashCase } from './string-a953eafc.js';
|
|
29
|
-
import { R as ReplaceSelectedTextAction } from './image-extension-f6dbd70c.js';
|
|
30
30
|
import { c as copy } from './copy-54e45e2d.js';
|
|
31
31
|
|
|
32
32
|
const VegaLoaderRuntimeMetricsPayloadDefinition = [
|
|
@@ -81,9 +81,10 @@ var __decorate$6 = (undefined && undefined.__decorate) || function (decorators,
|
|
|
81
81
|
/**
|
|
82
82
|
* Vega loader controller to control the loading indicator
|
|
83
83
|
*/
|
|
84
|
-
class VegaLoaderController {
|
|
84
|
+
class VegaLoaderController extends Discriminated {
|
|
85
85
|
constructor() {
|
|
86
|
-
|
|
86
|
+
super(...arguments);
|
|
87
|
+
this.vegaPublicAPIRuntimeMetricsSlimmer = createPublicAPIRuntimeMetricsSlimmer(VegaLoaderController, ['load', 'close'], VegaLoaderRuntimeMetricsPayloadDefinition, VegaLoaderController.typeName);
|
|
87
88
|
}
|
|
88
89
|
/**
|
|
89
90
|
* Create a loading indicator and append it to the container
|
|
@@ -193,6 +194,7 @@ class VegaLoaderController {
|
|
|
193
194
|
}
|
|
194
195
|
}
|
|
195
196
|
}
|
|
197
|
+
VegaLoaderController.typeName = 'VegaLoaderController';
|
|
196
198
|
VegaLoaderController.SPECIAL_ELEMENT_TO_WRAP_FULL_BODY = ['VEGA-MODAL'];
|
|
197
199
|
__decorate$6([
|
|
198
200
|
InjectVegaTelemetrySlimmer()
|
|
@@ -271,8 +273,9 @@ var __decorate$5 = (undefined && undefined.__decorate) || function (decorators,
|
|
|
271
273
|
/**
|
|
272
274
|
* The page notification controller
|
|
273
275
|
*/
|
|
274
|
-
class VegaNotifyController {
|
|
276
|
+
class VegaNotifyController extends Discriminated {
|
|
275
277
|
constructor() {
|
|
278
|
+
super(...arguments);
|
|
276
279
|
this.resizeObserverSlimmer = createDynamicSlimmer(VegaNotifyController, PageResizeObserverSlimmer, [], [{ mapFrom: 'connectResizeObserver', mapTo: 'connectResizeObserver' }], [
|
|
277
280
|
{
|
|
278
281
|
// eslint-disable-next-line jsdoc/require-jsdoc
|
|
@@ -289,7 +292,7 @@ class VegaNotifyController {
|
|
|
289
292
|
target: () => this.container,
|
|
290
293
|
},
|
|
291
294
|
]);
|
|
292
|
-
this.vegaPublicAPIRuntimeMetricsSlimmer = createPublicAPIRuntimeMetricsSlimmer(VegaNotifyController, ['open', 'close', 'closeAll'], VegaNotifyRuntimeMetricsPayloadDefinition,
|
|
295
|
+
this.vegaPublicAPIRuntimeMetricsSlimmer = createPublicAPIRuntimeMetricsSlimmer(VegaNotifyController, ['open', 'close', 'closeAll'], VegaNotifyRuntimeMetricsPayloadDefinition, VegaNotifyController.typeName);
|
|
293
296
|
}
|
|
294
297
|
/**
|
|
295
298
|
* It creates a new notification element, adds it to the container, and returns the notification's ID
|
|
@@ -373,6 +376,7 @@ class VegaNotifyController {
|
|
|
373
376
|
return this.container;
|
|
374
377
|
}
|
|
375
378
|
}
|
|
379
|
+
VegaNotifyController.typeName = 'VegaNotifyController';
|
|
376
380
|
__decorate$5([
|
|
377
381
|
InjectVegaSlimmer()
|
|
378
382
|
], VegaNotifyController.prototype, "resizeObserverSlimmer", void 0);
|
|
@@ -605,9 +609,10 @@ var __decorate$4 = (undefined && undefined.__decorate) || function (decorators,
|
|
|
605
609
|
* The VegaEventManager class provides methods for setting and retrieving event semantics configuration,
|
|
606
610
|
* as well as getting the corresponding native event name for a given event.
|
|
607
611
|
*/
|
|
608
|
-
class VegaEventManager {
|
|
612
|
+
class VegaEventManager extends Discriminated {
|
|
609
613
|
constructor() {
|
|
610
|
-
|
|
614
|
+
super(...arguments);
|
|
615
|
+
this.vegaPublicAPIRuntimeMetricsSlimmer = createPublicAPIRuntimeMetricsSlimmer(VegaEventManager, ['setSemantics', 'getSemantics', 'getEnabledEventIdsByComponent'], VegaEventManagerRuntimeMetricsPayloadDefinition, VegaEventManager.typeName);
|
|
611
616
|
}
|
|
612
617
|
/**
|
|
613
618
|
* The function sets the semantics configuration for event management.
|
|
@@ -645,6 +650,7 @@ class VegaEventManager {
|
|
|
645
650
|
return internalVegaEventManager.getEnabledEventIdsByComponent(componentName);
|
|
646
651
|
}
|
|
647
652
|
}
|
|
653
|
+
VegaEventManager.typeName = 'VegaEventManager';
|
|
648
654
|
__decorate$4([
|
|
649
655
|
InjectVegaTelemetrySlimmer()
|
|
650
656
|
], VegaEventManager.prototype, "vegaPublicAPIRuntimeMetricsSlimmer", void 0);
|
|
@@ -704,9 +710,10 @@ var __decorate$3 = (undefined && undefined.__decorate) || function (decorators,
|
|
|
704
710
|
* The VegaZIndexManager class calls a method in the ZIndexManager class to
|
|
705
711
|
* change z-index values based on the input.
|
|
706
712
|
*/
|
|
707
|
-
class VegaZIndexManager {
|
|
713
|
+
class VegaZIndexManager extends Discriminated {
|
|
708
714
|
constructor() {
|
|
709
|
-
|
|
715
|
+
super(...arguments);
|
|
716
|
+
this.vegaPublicAPIRuntimeMetricsSlimmer = createPublicAPIRuntimeMetricsSlimmer(VegaZIndexManager, ['overrideZIndexBasicValues'], ZIndexManagerRuntimeMetricsPayloadDefinition, VegaZIndexManager.typeName);
|
|
710
717
|
}
|
|
711
718
|
/**
|
|
712
719
|
* The function "overrideZIndexBasicValues" calls a method in the "ZIndexManager" class to change the
|
|
@@ -719,6 +726,7 @@ class VegaZIndexManager {
|
|
|
719
726
|
InternalVegaZIndexManager.overrideZIndexBasicValues(input);
|
|
720
727
|
}
|
|
721
728
|
}
|
|
729
|
+
VegaZIndexManager.typeName = 'VegaZIndexManager';
|
|
722
730
|
__decorate$3([
|
|
723
731
|
InjectVegaTelemetrySlimmer()
|
|
724
732
|
], VegaZIndexManager.prototype, "vegaPublicAPIRuntimeMetricsSlimmer", void 0);
|
|
@@ -756,9 +764,10 @@ var __decorate$2 = (undefined && undefined.__decorate) || function (decorators,
|
|
|
756
764
|
/**
|
|
757
765
|
* WaitForVegaHandler to check whether the vega component has been loaded.
|
|
758
766
|
*/
|
|
759
|
-
class WaitForVegaHandler {
|
|
767
|
+
class WaitForVegaHandler extends Discriminated {
|
|
760
768
|
constructor() {
|
|
761
|
-
|
|
769
|
+
super(...arguments);
|
|
770
|
+
this.vegaPublicAPIRuntimeMetricsSlimmer = createPublicAPIRuntimeMetricsSlimmer(WaitForVegaHandler, ['handle'], WaitForVegaPayloadDefinition, WaitForVegaHandler.typeName);
|
|
762
771
|
}
|
|
763
772
|
/* istanbul ignore next */
|
|
764
773
|
/**
|
|
@@ -776,6 +785,7 @@ class WaitForVegaHandler {
|
|
|
776
785
|
.map((item) => { var _a; return (_a = item.componentOnReady) === null || _a === void 0 ? void 0 : _a.call(item); }));
|
|
777
786
|
}
|
|
778
787
|
}
|
|
788
|
+
WaitForVegaHandler.typeName = 'WaitForVegaHandler';
|
|
779
789
|
__decorate$2([
|
|
780
790
|
InjectVegaTelemetrySlimmer()
|
|
781
791
|
], WaitForVegaHandler.prototype, "vegaPublicAPIRuntimeMetricsSlimmer", void 0);
|
|
@@ -864,9 +874,10 @@ var __decorate$1 = (undefined && undefined.__decorate) || function (decorators,
|
|
|
864
874
|
/**
|
|
865
875
|
* Vega Skeleton Loader Controller to show skeletons in the target elements
|
|
866
876
|
*/
|
|
867
|
-
class VegaSkeletonLoaderController {
|
|
877
|
+
class VegaSkeletonLoaderController extends Discriminated {
|
|
868
878
|
constructor() {
|
|
869
|
-
|
|
879
|
+
super(...arguments);
|
|
880
|
+
this.vegaPublicAPIRuntimeMetricsSlimmer = createPublicAPIRuntimeMetricsSlimmer(VegaSkeletonLoaderController, ['load', 'unLoad', 'unLoadAll'], VegaSkeletonRuntimeMetricsPayloadDefinition, VegaSkeletonLoaderController.typeName);
|
|
870
881
|
this.loaderMap = new Map();
|
|
871
882
|
}
|
|
872
883
|
/**
|
|
@@ -953,6 +964,7 @@ class VegaSkeletonLoaderController {
|
|
|
953
964
|
return skeletonContainer;
|
|
954
965
|
}
|
|
955
966
|
}
|
|
967
|
+
VegaSkeletonLoaderController.typeName = 'VegaSkeletonLoaderController';
|
|
956
968
|
VegaSkeletonLoaderController.LOADER_DATA_SET_KEY = 'vegaSkeletonLoaderKey';
|
|
957
969
|
__decorate$1([
|
|
958
970
|
InjectVegaTelemetrySlimmer()
|
|
@@ -1013,9 +1025,10 @@ var __decorate = (undefined && undefined.__decorate) || function (decorators, ta
|
|
|
1013
1025
|
*
|
|
1014
1026
|
* @vegaVersion 2.27.0
|
|
1015
1027
|
*/
|
|
1016
|
-
class TranslationController {
|
|
1028
|
+
class TranslationController extends Discriminated {
|
|
1017
1029
|
constructor() {
|
|
1018
|
-
|
|
1030
|
+
super(...arguments);
|
|
1031
|
+
this.vegaPublicAPIRuntimeMetricsSlimmer = createPublicAPIRuntimeMetricsSlimmer(TranslationController, ['init', 'changeLanguage'], VegaTranslationRuntimeMetricsPayloadDefinition, TranslationController.typeName);
|
|
1019
1032
|
}
|
|
1020
1033
|
/**
|
|
1021
1034
|
* Get current language
|
|
@@ -1045,6 +1058,7 @@ class TranslationController {
|
|
|
1045
1058
|
VegaInternalTranslation.changeLanguage(language);
|
|
1046
1059
|
}
|
|
1047
1060
|
}
|
|
1061
|
+
TranslationController.typeName = 'TranslationController';
|
|
1048
1062
|
__decorate([
|
|
1049
1063
|
InjectVegaTelemetrySlimmer()
|
|
1050
1064
|
], TranslationController.prototype, "vegaPublicAPIRuntimeMetricsSlimmer", void 0);
|
|
@@ -1069,336 +1083,6 @@ class VegaCalendarPeriodFactory {
|
|
|
1069
1083
|
}
|
|
1070
1084
|
}
|
|
1071
1085
|
|
|
1072
|
-
/**
|
|
1073
|
-
* Base class for rendering extension toolbar button in the rich text editor.
|
|
1074
|
-
* The renderer provides common functionalities for rendering toolbar buttons, including:
|
|
1075
|
-
* - Rendering a button with an icon, label, and optional arrow icon.
|
|
1076
|
-
* - Rendering a dropdown with a list of items.
|
|
1077
|
-
* - Rendering dropdown items.
|
|
1078
|
-
* - Rendering template for dropdown list.
|
|
1079
|
-
* - Determining if the button should be disabled based on the editor context.
|
|
1080
|
-
* - Handling button and dropdown click events.
|
|
1081
|
-
* Override the methods to customize the rendering and behavior of the button.
|
|
1082
|
-
*/
|
|
1083
|
-
class VegaRTEToolbarButtonRenderer {
|
|
1084
|
-
constructor() {
|
|
1085
|
-
this.dropdownEl = null;
|
|
1086
|
-
this.itemsContainerEl = null;
|
|
1087
|
-
this.buttonEl = null;
|
|
1088
|
-
}
|
|
1089
|
-
/**
|
|
1090
|
-
* Checks if the button should be hidden.
|
|
1091
|
-
*
|
|
1092
|
-
* @param {VegaRTEToolbarRenderContext} editorContext The render context for the editor.
|
|
1093
|
-
* @returns {boolean} True if the button is hidden, false otherwise.
|
|
1094
|
-
*/
|
|
1095
|
-
isHidden(editorContext) {
|
|
1096
|
-
return editorContext.sourceEditMode;
|
|
1097
|
-
}
|
|
1098
|
-
/**
|
|
1099
|
-
* Get the extension context for the given rich text editor host element.
|
|
1100
|
-
*
|
|
1101
|
-
* @typedef HTMLVegaRichTextEditorElement - The type definition for the rich text editor host element.
|
|
1102
|
-
* @param {HTMLVegaRichTextEditorElement} el - The host rich text editor element.
|
|
1103
|
-
* @returns {Nullable<RTEExtensionContext>} - The extension context associated with the host.
|
|
1104
|
-
*/
|
|
1105
|
-
getExtensionContext(el) {
|
|
1106
|
-
return extensionContextManager.getExtensionContext(el);
|
|
1107
|
-
}
|
|
1108
|
-
/**
|
|
1109
|
-
* Renders a dropdown component with the specified properties and children.
|
|
1110
|
-
*
|
|
1111
|
-
* @param {VegaRTECreateElementFunction} h - Create element function.
|
|
1112
|
-
* @param {VegaRTEToolbarRenderContext} editorContext - The render context for the editor.
|
|
1113
|
-
* @param {RTEToolbarDropdownProps} dropdownProps - The properties for the dropdown.
|
|
1114
|
-
* @param {VegaRTERenderResult[]} children - The children elements for the dropdown.
|
|
1115
|
-
* @returns {VegaRTERenderResult} - The render result for the dropdown.
|
|
1116
|
-
*/
|
|
1117
|
-
renderDropdown(h, editorContext, dropdownProps, children) {
|
|
1118
|
-
return h('vega-dropdown', Object.assign({ trigger: 'click', searchable: false, maxWidth: '200', itemDisplayRule: 'ellipsis', isScreenPosition: true, role: 'presentation',
|
|
1119
|
-
// eslint-disable-next-line jsdoc/require-jsdoc
|
|
1120
|
-
ref: (el) => {
|
|
1121
|
-
this.dropdownEl = el;
|
|
1122
|
-
DomNodeSubjectObserverFactory.addUniqueObserverToNode(el, VegaDropdownClick, (input) => {
|
|
1123
|
-
const payload = input;
|
|
1124
|
-
this.handleDropdownClick(payload.detail, editorContext);
|
|
1125
|
-
});
|
|
1126
|
-
} }, dropdownProps), children);
|
|
1127
|
-
}
|
|
1128
|
-
/**
|
|
1129
|
-
* Renders the dropdown list template.
|
|
1130
|
-
*
|
|
1131
|
-
* @param {VegaRTECreateElementFunction} h - Create element function.
|
|
1132
|
-
* @param {(RTEDropdownListItem | RTEDropdownListGroup)[]} itemList - The list of dropdown items.
|
|
1133
|
-
* @param {VegaRTEToolbarRenderContext} editorContext - The render context for the editor.
|
|
1134
|
-
* @returns {VegaRTERenderResult} - The render result for the dropdown list.
|
|
1135
|
-
*/
|
|
1136
|
-
renderDropdownListTemplate(h, itemList, editorContext) {
|
|
1137
|
-
return h('div', {
|
|
1138
|
-
slot: 'items',
|
|
1139
|
-
onMouseDown: this.preventDefault,
|
|
1140
|
-
// eslint-disable-next-line jsdoc/require-jsdoc
|
|
1141
|
-
onKeyDown: (e) => this.handleItemsKeyDown(e),
|
|
1142
|
-
// eslint-disable-next-line jsdoc/require-jsdoc
|
|
1143
|
-
ref: (el) => {
|
|
1144
|
-
this.itemsContainerEl = el;
|
|
1145
|
-
},
|
|
1146
|
-
class: 'rte-dropdown-list',
|
|
1147
|
-
}, [
|
|
1148
|
-
h('style', { nonce: vegaNonceManager.nonce }, '.rte-dropdown-list vega-dropdown-group vega-dropdown-group { padding-left: 4px }'),
|
|
1149
|
-
...itemList.map((item) => {
|
|
1150
|
-
return 'children' in item
|
|
1151
|
-
? this.renderDropdownGroup(h, item, editorContext)
|
|
1152
|
-
: this.renderDropdownItem(h, item, editorContext);
|
|
1153
|
-
}),
|
|
1154
|
-
]);
|
|
1155
|
-
}
|
|
1156
|
-
/**
|
|
1157
|
-
* Renders a dropdown item for the toolbar button.
|
|
1158
|
-
*
|
|
1159
|
-
* @param {VegaRTECreateElementFunction} h - Create element function.
|
|
1160
|
-
* @param {RTEDropdownListItem} item - The dropdown item.
|
|
1161
|
-
* @param {VegaRTEToolbarRenderContext} editorContext - The render context for the editor.
|
|
1162
|
-
* @returns {VegaRTERenderResult} - The render result for the dropdown item.
|
|
1163
|
-
*/
|
|
1164
|
-
renderDropdownItem(h, item, editorContext) {
|
|
1165
|
-
return h('vega-dropdown-item', {
|
|
1166
|
-
key: item.key,
|
|
1167
|
-
itemKey: item.key,
|
|
1168
|
-
label: editorContext.translation.t(item.label),
|
|
1169
|
-
prefixIcon: item.icon,
|
|
1170
|
-
});
|
|
1171
|
-
}
|
|
1172
|
-
/**
|
|
1173
|
-
* Renders a dropdown group for the toolbar button.
|
|
1174
|
-
*
|
|
1175
|
-
* @param {VegaRTECreateElementFunction} h - Create element function.
|
|
1176
|
-
* @param {RTEDropdownListGroup} item - The dropdown group.
|
|
1177
|
-
* @param {VegaRTEToolbarRenderContext} editorContext - The render context for the editor.
|
|
1178
|
-
* @returns {VegaRTERenderResult} - The render result for the dropdown group.
|
|
1179
|
-
*/
|
|
1180
|
-
renderDropdownGroup(h, item, editorContext) {
|
|
1181
|
-
return h('vega-dropdown-group', {
|
|
1182
|
-
key: item.key,
|
|
1183
|
-
label: editorContext.translation.t(item.label),
|
|
1184
|
-
divide: false,
|
|
1185
|
-
}, item.children.map((child) => {
|
|
1186
|
-
return 'children' in child
|
|
1187
|
-
? this.renderDropdownGroup(h, child, editorContext)
|
|
1188
|
-
: this.renderDropdownItem(h, child, editorContext);
|
|
1189
|
-
}));
|
|
1190
|
-
}
|
|
1191
|
-
/**
|
|
1192
|
-
* Renders a common toolbar button with optional icon, label, and arrow icon.
|
|
1193
|
-
* When a tooltip is provided via `buttonProps.tooltip`, the button is wrapped
|
|
1194
|
-
* in a `vega-tooltip` element, matching the behavior of default toolbar buttons.
|
|
1195
|
-
*
|
|
1196
|
-
* @param {VegaRTECreateElementFunction} h - Create element function.
|
|
1197
|
-
* @param {VegaRTEToolbarRenderContext} editorContext - The render context for the editor.
|
|
1198
|
-
* @param {RTEToolbarButtonProps} buttonProps - The properties for the button.
|
|
1199
|
-
* @returns {VegaRTERenderResult} - The render result for the button.
|
|
1200
|
-
*/
|
|
1201
|
-
renderButton(h, editorContext, buttonProps) {
|
|
1202
|
-
const { icon, label, showArrowIcon, tooltip, ariaLabel } = buttonProps;
|
|
1203
|
-
const isDisabled = this.isDisabled(editorContext);
|
|
1204
|
-
const button = h('vega-rich-text-editor-toolbar-button', {
|
|
1205
|
-
'disabled': isDisabled,
|
|
1206
|
-
'icon': icon,
|
|
1207
|
-
'data-aria-label': ariaLabel !== null && ariaLabel !== void 0 ? ariaLabel : label,
|
|
1208
|
-
'hidden': this.isHidden(editorContext),
|
|
1209
|
-
'selected': this.isSelected(editorContext),
|
|
1210
|
-
// eslint-disable-next-line jsdoc/require-jsdoc
|
|
1211
|
-
'ref': (el) => {
|
|
1212
|
-
this.buttonEl = el;
|
|
1213
|
-
DomNodeSubjectObserverFactory.addUniqueObserverToNode(el, VegaClick, () => this.handleButtonClick(editorContext));
|
|
1214
|
-
},
|
|
1215
|
-
'onMouseDown': this.preventDefault,
|
|
1216
|
-
// eslint-disable-next-line jsdoc/require-jsdoc
|
|
1217
|
-
'onKeyDown': (e) => this.handleButtonKeyDown(e),
|
|
1218
|
-
}, [
|
|
1219
|
-
this.renderButtonLabel(h, editorContext, label),
|
|
1220
|
-
showArrowIcon
|
|
1221
|
-
? h('vega-icon', {
|
|
1222
|
-
'size': 'size-8',
|
|
1223
|
-
'color': isDisabled ? 'text-disabled' : 'text-secondary',
|
|
1224
|
-
'style': { marginLeft: '8px' },
|
|
1225
|
-
'aria-hidden': 'true',
|
|
1226
|
-
'icon': VegaInternalIconManager.getIconKey('chevron-down'),
|
|
1227
|
-
})
|
|
1228
|
-
: null,
|
|
1229
|
-
].filter(isNonNullable));
|
|
1230
|
-
if (tooltip === null || tooltip === void 0 ? void 0 : tooltip.text) {
|
|
1231
|
-
return h('vega-tooltip', { text: editorContext.translation.t(tooltip.text), placement: ['bottom', 'top'] }, [button]);
|
|
1232
|
-
}
|
|
1233
|
-
return button;
|
|
1234
|
-
}
|
|
1235
|
-
/**
|
|
1236
|
-
* Renders the button label.
|
|
1237
|
-
*
|
|
1238
|
-
* @param {VegaRTECreateElementFunction} h - Create element function.
|
|
1239
|
-
* @param {VegaRTEToolbarRenderContext} editorContext - The render context for the editor.
|
|
1240
|
-
* @param {Nullable<string>} label - The button label if exist.
|
|
1241
|
-
* @returns {Nullable<VegaRTERenderResult>} - The render result for the button.
|
|
1242
|
-
*/
|
|
1243
|
-
renderButtonLabel(h, editorContext, label) {
|
|
1244
|
-
if (label) {
|
|
1245
|
-
const isDisabled = this.isDisabled(editorContext);
|
|
1246
|
-
return h('vega-font', {
|
|
1247
|
-
'variant': 'font-field-label-sm',
|
|
1248
|
-
'color': isDisabled ? 'text-disabled' : 'text-primary',
|
|
1249
|
-
'aria-hidden': 'true',
|
|
1250
|
-
}, editorContext.translation.t(label));
|
|
1251
|
-
}
|
|
1252
|
-
return null;
|
|
1253
|
-
}
|
|
1254
|
-
/**
|
|
1255
|
-
* Determines if the button should be disabled based on the editor context.
|
|
1256
|
-
*
|
|
1257
|
-
* @param {VegaRTEToolbarRenderContext} editorContext - The render context for the editor.
|
|
1258
|
-
* @returns {boolean} - True if the button should be disabled, false otherwise.
|
|
1259
|
-
*/
|
|
1260
|
-
isDisabled(editorContext) {
|
|
1261
|
-
return editorContext.host.disabled;
|
|
1262
|
-
}
|
|
1263
|
-
/**
|
|
1264
|
-
* Checks if the button should be selected.
|
|
1265
|
-
*
|
|
1266
|
-
* @param {VegaRTEToolbarRenderContext} _editorContext The render context for the editor.
|
|
1267
|
-
* @returns {boolean} True if the button is selected, false otherwise.
|
|
1268
|
-
*/
|
|
1269
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
1270
|
-
isSelected(_editorContext) {
|
|
1271
|
-
return false;
|
|
1272
|
-
}
|
|
1273
|
-
/**
|
|
1274
|
-
* Prevents the default action of the click event. This is to avoid losing focus from the editor when the button is clicked.
|
|
1275
|
-
*
|
|
1276
|
-
* @param {MouseEvent} e The mouse event to prevent default action for.
|
|
1277
|
-
*/
|
|
1278
|
-
preventDefault(e) {
|
|
1279
|
-
e.preventDefault();
|
|
1280
|
-
}
|
|
1281
|
-
/**
|
|
1282
|
-
* Moves focus to the toolbar button. Targets the inner focusable `<button>`
|
|
1283
|
-
* inside the button's shadow root, falling back to the host element.
|
|
1284
|
-
*/
|
|
1285
|
-
focusToolbarButton() {
|
|
1286
|
-
var _a, _b, _c, _d;
|
|
1287
|
-
const innerButton = (_c = (_b = (_a = this.buttonEl) === null || _a === void 0 ? void 0 : _a.shadowRoot) === null || _b === void 0 ? void 0 : _b.querySelector('button')) !== null && _c !== void 0 ? _c : null;
|
|
1288
|
-
(_d = (innerButton !== null && innerButton !== void 0 ? innerButton : this.buttonEl)) === null || _d === void 0 ? void 0 : _d.focus();
|
|
1289
|
-
}
|
|
1290
|
-
/**
|
|
1291
|
-
* Recursively searches for a dropdown list item by its key.
|
|
1292
|
-
*
|
|
1293
|
-
* @param {(RTEDropdownListItem | RTEDropdownListGroup)[]} itemList The list of dropdown items or groups to search through.
|
|
1294
|
-
* @param {string} key The key of the item to find.
|
|
1295
|
-
* @returns {Nullable<RTEDropdownListItem>} The dropdown list item if found, otherwise null.
|
|
1296
|
-
*/
|
|
1297
|
-
getListItemByKey(itemList, key) {
|
|
1298
|
-
for (const item of itemList) {
|
|
1299
|
-
if ('children' in item) {
|
|
1300
|
-
const foundItem = this.getListItemByKey(item.children, key);
|
|
1301
|
-
if (foundItem) {
|
|
1302
|
-
return foundItem;
|
|
1303
|
-
}
|
|
1304
|
-
}
|
|
1305
|
-
else if (item.key === key) {
|
|
1306
|
-
return item;
|
|
1307
|
-
}
|
|
1308
|
-
}
|
|
1309
|
-
return null;
|
|
1310
|
-
}
|
|
1311
|
-
/**
|
|
1312
|
-
* Handles keyboard events on the toolbar button to support dropdown keyboard accessibility.
|
|
1313
|
-
* - Enter / Space: Toggles the dropdown open/closed.
|
|
1314
|
-
* - ArrowDown / ArrowUp: Opens the dropdown and focuses the first/last item.
|
|
1315
|
-
*
|
|
1316
|
-
* @param {KeyboardEvent} e The keyboard event.
|
|
1317
|
-
*/
|
|
1318
|
-
handleButtonKeyDown(e) {
|
|
1319
|
-
if (!this.dropdownEl) {
|
|
1320
|
-
return;
|
|
1321
|
-
}
|
|
1322
|
-
if (e.code === 'Enter' || e.code === 'Space') {
|
|
1323
|
-
e.preventDefault();
|
|
1324
|
-
e.stopPropagation();
|
|
1325
|
-
this.dropdownEl.dispatchEvent(new MouseEvent('click', { bubbles: true }));
|
|
1326
|
-
}
|
|
1327
|
-
else if (e.code === 'ArrowDown' || e.code === 'ArrowUp') {
|
|
1328
|
-
e.preventDefault();
|
|
1329
|
-
e.stopPropagation();
|
|
1330
|
-
void this.dropdownEl.show().then(() => {
|
|
1331
|
-
this.focusDropdownItem(e.code === 'ArrowDown' ? 'first' : 'last');
|
|
1332
|
-
});
|
|
1333
|
-
}
|
|
1334
|
-
}
|
|
1335
|
-
/**
|
|
1336
|
-
* Handles keyboard navigation within the dropdown items container.
|
|
1337
|
-
* - ArrowDown/ArrowUp: Moves focus to the next/previous non-disabled item.
|
|
1338
|
-
* - Escape: Closes the dropdown and returns focus to the toolbar button.
|
|
1339
|
-
*
|
|
1340
|
-
* @param {KeyboardEvent} e The keyboard event.
|
|
1341
|
-
*/
|
|
1342
|
-
handleItemsKeyDown(e) {
|
|
1343
|
-
var _a, _b;
|
|
1344
|
-
if (e.code === 'Escape') {
|
|
1345
|
-
e.preventDefault();
|
|
1346
|
-
e.stopPropagation();
|
|
1347
|
-
if (this.dropdownEl) {
|
|
1348
|
-
void this.dropdownEl.hide();
|
|
1349
|
-
}
|
|
1350
|
-
this.focusToolbarButton();
|
|
1351
|
-
return;
|
|
1352
|
-
}
|
|
1353
|
-
if (e.code !== 'ArrowDown' && e.code !== 'ArrowUp') {
|
|
1354
|
-
return;
|
|
1355
|
-
}
|
|
1356
|
-
e.preventDefault();
|
|
1357
|
-
e.stopPropagation();
|
|
1358
|
-
const items = this.getDropdownItems();
|
|
1359
|
-
if (items.length === 0) {
|
|
1360
|
-
return;
|
|
1361
|
-
}
|
|
1362
|
-
const currentIndex = items.findIndex((item) => { var _a, _b; return ((_a = item.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('li')) === ((_b = item.shadowRoot) === null || _b === void 0 ? void 0 : _b.activeElement); });
|
|
1363
|
-
const direction = e.code === 'ArrowDown' ? 1 : -1;
|
|
1364
|
-
const startIndex = currentIndex === -1 ? (e.code === 'ArrowDown' ? 0 : items.length - 1) : currentIndex + direction;
|
|
1365
|
-
for (let offset = 0; offset < items.length; offset++) {
|
|
1366
|
-
const index = (startIndex + offset * direction + items.length) % items.length;
|
|
1367
|
-
if (!items[index].disabled) {
|
|
1368
|
-
(_b = (_a = items[index].shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('li')) === null || _b === void 0 ? void 0 : _b.focus();
|
|
1369
|
-
return;
|
|
1370
|
-
}
|
|
1371
|
-
}
|
|
1372
|
-
}
|
|
1373
|
-
/**
|
|
1374
|
-
* Focuses the first or last non-disabled dropdown item.
|
|
1375
|
-
*
|
|
1376
|
-
* @param {'first' | 'last'} position Whether to focus the first or last item.
|
|
1377
|
-
*/
|
|
1378
|
-
focusDropdownItem(position) {
|
|
1379
|
-
var _a, _b;
|
|
1380
|
-
const items = this.getDropdownItems();
|
|
1381
|
-
const orderedItems = position === 'first' ? items : [...items].reverse();
|
|
1382
|
-
for (const item of orderedItems) {
|
|
1383
|
-
if (!item.disabled) {
|
|
1384
|
-
(_b = (_a = item.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('li')) === null || _b === void 0 ? void 0 : _b.focus();
|
|
1385
|
-
return;
|
|
1386
|
-
}
|
|
1387
|
-
}
|
|
1388
|
-
}
|
|
1389
|
-
/**
|
|
1390
|
-
* Gets all dropdown items from the items container.
|
|
1391
|
-
*
|
|
1392
|
-
* @returns {HTMLVegaDropdownItemElement[]} Array of dropdown item elements.
|
|
1393
|
-
*/
|
|
1394
|
-
getDropdownItems() {
|
|
1395
|
-
if (!this.itemsContainerEl) {
|
|
1396
|
-
return [];
|
|
1397
|
-
}
|
|
1398
|
-
return Array.from(this.itemsContainerEl.querySelectorAll('vega-dropdown-item'));
|
|
1399
|
-
}
|
|
1400
|
-
}
|
|
1401
|
-
|
|
1402
1086
|
/**
|
|
1403
1087
|
* Action to insert a token node at a specified range in the Rich Text Editor.
|
|
1404
1088
|
*
|
|
@@ -1506,7 +1190,6 @@ class RTETokenToolbarButtonRenderer extends VegaRTEToolbarButtonRenderer {
|
|
|
1506
1190
|
class RTETokenNode extends RTETextNode {
|
|
1507
1191
|
constructor(id, token, text, parentBlock, annotations) {
|
|
1508
1192
|
super(id, text, parentBlock, annotations);
|
|
1509
|
-
this.dtoName = RTETokenNode.dtoName;
|
|
1510
1193
|
this.type = 'token';
|
|
1511
1194
|
this.token = token;
|
|
1512
1195
|
this.text = text;
|
|
@@ -1597,7 +1280,7 @@ class RTETokenNode extends RTETextNode {
|
|
|
1597
1280
|
return attrs.length > 0 ? ` ${attrs.join(' ')}` : '';
|
|
1598
1281
|
}
|
|
1599
1282
|
}
|
|
1600
|
-
RTETokenNode.
|
|
1283
|
+
RTETokenNode.typeName = 'RTETokenNode';
|
|
1601
1284
|
|
|
1602
1285
|
/**
|
|
1603
1286
|
* Token node renderer for the rich text editor.
|
|
@@ -1659,6 +1342,7 @@ class RTETokenNodeRenderer extends VegaRTEExtensionRenderer {
|
|
|
1659
1342
|
return result;
|
|
1660
1343
|
}
|
|
1661
1344
|
}
|
|
1345
|
+
RTETokenNodeRenderer.typeName = 'RTETokenNodeRenderer';
|
|
1662
1346
|
|
|
1663
1347
|
/**
|
|
1664
1348
|
* Toolbar button renderer for language selection in Vega Rich Text Editor.
|
|
@@ -1945,98 +1629,273 @@ const FUNCTION_ELEMENT_CLASSES = [
|
|
|
1945
1629
|
];
|
|
1946
1630
|
|
|
1947
1631
|
/**
|
|
1948
|
-
*
|
|
1632
|
+
* Class representing a logic control node in the rich text editor.
|
|
1949
1633
|
*/
|
|
1950
|
-
class
|
|
1951
|
-
constructor(id) {
|
|
1634
|
+
class RTELogicControlNode extends RTENode {
|
|
1635
|
+
constructor(id, text, parent) {
|
|
1952
1636
|
super(id);
|
|
1953
|
-
this.
|
|
1954
|
-
this.
|
|
1955
|
-
this.
|
|
1637
|
+
this.type = 'logic-control-node';
|
|
1638
|
+
this.text = '';
|
|
1639
|
+
this.text = text;
|
|
1640
|
+
this.parent = parent;
|
|
1956
1641
|
}
|
|
1957
1642
|
/**
|
|
1958
|
-
*
|
|
1643
|
+
* Clone the current node instance.
|
|
1959
1644
|
*
|
|
1960
|
-
* @
|
|
1961
|
-
* @param {VegaRTETransformOptions} [options] - Optional transformation options.
|
|
1962
|
-
* @returns {RTEFunctionBlock} The resulting RTEFunctionBlock.
|
|
1645
|
+
* @returns {RTELogicControlNode} - A new instance of RTELogicControlNode.
|
|
1963
1646
|
*/
|
|
1964
|
-
|
|
1965
|
-
|
|
1966
|
-
const defaultAnnotation = { customClass: [FUNCTION_BLOCK_CLASS] };
|
|
1967
|
-
let { annotations } = block;
|
|
1968
|
-
annotations = annotations
|
|
1969
|
-
? Object.assign(Object.assign({}, annotations), defaultAnnotation) : defaultAnnotation;
|
|
1970
|
-
super.convertAnnotationsToMap(functionBlock.annotationMap, annotations);
|
|
1971
|
-
functionBlock.children = this.generateBlockChildren(block.children, options, functionBlock);
|
|
1972
|
-
return functionBlock;
|
|
1647
|
+
clone() {
|
|
1648
|
+
return new RTELogicControlNode(this.id, this.text, this.parent);
|
|
1973
1649
|
}
|
|
1974
1650
|
/**
|
|
1975
|
-
*
|
|
1651
|
+
* Convert the node to its HTML representation.
|
|
1976
1652
|
*
|
|
1977
|
-
* @returns {string} The HTML string
|
|
1653
|
+
* @returns {string} - The HTML string of the logic control node.
|
|
1978
1654
|
*/
|
|
1979
1655
|
toHtml() {
|
|
1980
|
-
|
|
1981
|
-
.map((child) => {
|
|
1982
|
-
if (child instanceof RTETextBlock) {
|
|
1983
|
-
const attrStr = this.getFunctionContentStyle(child);
|
|
1984
|
-
return `<div class="${FUNCTION_CONTENT_CLASS}"${attrStr}>${child.getChildrenHtml()}</div>`;
|
|
1985
|
-
}
|
|
1986
|
-
else {
|
|
1987
|
-
return child.toHtml();
|
|
1988
|
-
}
|
|
1989
|
-
})
|
|
1990
|
-
.join('');
|
|
1991
|
-
return `<div class="${FUNCTION_BLOCK_CLASS}" ${RTE_BLOCK_BOUNDARY_ATTRIBUTE}>${childrenHtml}</div>`;
|
|
1656
|
+
return this.text;
|
|
1992
1657
|
}
|
|
1993
1658
|
/**
|
|
1994
|
-
*
|
|
1659
|
+
* Convert the node to a JSON representation.
|
|
1660
|
+
*
|
|
1661
|
+
* @returns {unknown} - The JSON object of the statement syntax node.
|
|
1995
1662
|
*/
|
|
1996
|
-
|
|
1997
|
-
|
|
1998
|
-
|
|
1999
|
-
|
|
2000
|
-
|
|
2001
|
-
|
|
2002
|
-
});
|
|
2003
|
-
clonedBlock.annotationMap = super.cloneAnnotations();
|
|
2004
|
-
return clonedBlock;
|
|
1663
|
+
toJSON() {
|
|
1664
|
+
return {
|
|
1665
|
+
id: this.id,
|
|
1666
|
+
type: this.type,
|
|
1667
|
+
text: this.text,
|
|
1668
|
+
};
|
|
2005
1669
|
}
|
|
2006
1670
|
/**
|
|
2007
|
-
*
|
|
1671
|
+
* Get the end offset of the node's range.
|
|
1672
|
+
*
|
|
1673
|
+
* @returns {number} - The end offset of the node's range.
|
|
2008
1674
|
*/
|
|
2009
|
-
|
|
2010
|
-
return
|
|
1675
|
+
getRangeEndOffset() {
|
|
1676
|
+
return 1;
|
|
2011
1677
|
}
|
|
2012
1678
|
/**
|
|
2013
|
-
*
|
|
2014
|
-
* `contenteditable="false"` logic-control node instead of staying anchored to the block.
|
|
1679
|
+
* Get the container element for the node's range.
|
|
2015
1680
|
*
|
|
2016
|
-
* @
|
|
1681
|
+
* @returns {Nullable<Node>} - The container node for the range.
|
|
2017
1682
|
*/
|
|
2018
|
-
|
|
2019
|
-
|
|
1683
|
+
getRangeContainer() {
|
|
1684
|
+
const element = stateEntityRenderingRegistry.getDOMByEntity(this);
|
|
1685
|
+
if (element) {
|
|
1686
|
+
return element.parentElement;
|
|
1687
|
+
}
|
|
2020
1688
|
}
|
|
2021
1689
|
/**
|
|
2022
|
-
*
|
|
1690
|
+
* Get the content editable state of the node.
|
|
1691
|
+
*
|
|
1692
|
+
* @returns {boolean} - The content editable state of the node.
|
|
2023
1693
|
*/
|
|
2024
|
-
|
|
2025
|
-
return
|
|
1694
|
+
isContentEditable() {
|
|
1695
|
+
return false;
|
|
2026
1696
|
}
|
|
2027
1697
|
/**
|
|
2028
1698
|
* @inheritDoc
|
|
2029
1699
|
*/
|
|
2030
|
-
|
|
2031
|
-
return
|
|
1700
|
+
getPlainText() {
|
|
1701
|
+
return this.text;
|
|
2032
1702
|
}
|
|
2033
|
-
|
|
2034
|
-
|
|
2035
|
-
|
|
2036
|
-
|
|
2037
|
-
|
|
2038
|
-
|
|
2039
|
-
|
|
1703
|
+
}
|
|
1704
|
+
RTELogicControlNode.typeName = 'RTELogicControlNode';
|
|
1705
|
+
|
|
1706
|
+
/**
|
|
1707
|
+
* Class representing a logic control block in the rich text editor.
|
|
1708
|
+
*/
|
|
1709
|
+
class RTELogicControlBlock extends RTEBlock {
|
|
1710
|
+
constructor(id, statementText, parent) {
|
|
1711
|
+
super(id);
|
|
1712
|
+
this.type = 'logic-control-block';
|
|
1713
|
+
this.children = [];
|
|
1714
|
+
this.statementText = '';
|
|
1715
|
+
this.statementText = statementText;
|
|
1716
|
+
this.children = [new RTELogicControlNode(`${id}-node-1`, statementText, this)];
|
|
1717
|
+
if (parent) {
|
|
1718
|
+
this.parent = parent;
|
|
1719
|
+
}
|
|
1720
|
+
}
|
|
1721
|
+
/**
|
|
1722
|
+
* Create a logic control block from a JSON representation.
|
|
1723
|
+
*
|
|
1724
|
+
* @param {VegaRTELogicControlBlock} json - The JSON object representing the logic control block.
|
|
1725
|
+
* @returns {RTELogicControlBlock} - The created logic control block.
|
|
1726
|
+
*/
|
|
1727
|
+
static from(json) {
|
|
1728
|
+
const block = new RTELogicControlBlock(json.id, json.statementText);
|
|
1729
|
+
return block;
|
|
1730
|
+
}
|
|
1731
|
+
/**
|
|
1732
|
+
* Check the block is not empty.
|
|
1733
|
+
*
|
|
1734
|
+
* @returns {boolean} - Always true for logic control block.
|
|
1735
|
+
*/
|
|
1736
|
+
isNotEmpty() {
|
|
1737
|
+
return true;
|
|
1738
|
+
}
|
|
1739
|
+
/**
|
|
1740
|
+
* Get the last node of the block.
|
|
1741
|
+
*
|
|
1742
|
+
* @returns {RTELogicControlNode} - The last node in the block.
|
|
1743
|
+
*/
|
|
1744
|
+
getLastNode() {
|
|
1745
|
+
return this.children[this.children.length - 1];
|
|
1746
|
+
}
|
|
1747
|
+
/**
|
|
1748
|
+
* Convert the block to its HTML representation.
|
|
1749
|
+
*
|
|
1750
|
+
* @returns {string} - The HTML string of the logic control block.
|
|
1751
|
+
*/
|
|
1752
|
+
toHtml() {
|
|
1753
|
+
return `<div class='${FUNCTION_SYNTAX_CLASS}' contenteditable='false'>${this.statementText}</div>`;
|
|
1754
|
+
}
|
|
1755
|
+
/**
|
|
1756
|
+
* Clone the current block instance.
|
|
1757
|
+
*
|
|
1758
|
+
* @param { RTEFunctionBlock } parent - The parent function block for the cloned instance.
|
|
1759
|
+
* @returns {RTELogicControlBlock} - A new instance of RTEStatementSyntaxBlock.
|
|
1760
|
+
*/
|
|
1761
|
+
clone(parent) {
|
|
1762
|
+
return new RTELogicControlBlock(this.id, this.statementText, parent);
|
|
1763
|
+
}
|
|
1764
|
+
/**
|
|
1765
|
+
* Get the JSON representation of the block.
|
|
1766
|
+
*
|
|
1767
|
+
* @returns {VegaRTELogicControlBlock} - The JSON object of the logic control block.
|
|
1768
|
+
*/
|
|
1769
|
+
toJSON() {
|
|
1770
|
+
return {
|
|
1771
|
+
id: this.id,
|
|
1772
|
+
type: this.type,
|
|
1773
|
+
statementText: this.statementText,
|
|
1774
|
+
};
|
|
1775
|
+
}
|
|
1776
|
+
}
|
|
1777
|
+
RTELogicControlBlock.typeName = 'RTELogicControlBlock';
|
|
1778
|
+
|
|
1779
|
+
/**
|
|
1780
|
+
* RTE Function Block
|
|
1781
|
+
*/
|
|
1782
|
+
class RTEFunctionBlock extends RTEBlock {
|
|
1783
|
+
constructor(id) {
|
|
1784
|
+
super(id);
|
|
1785
|
+
this.type = 'function-block';
|
|
1786
|
+
this.children = [];
|
|
1787
|
+
}
|
|
1788
|
+
/**
|
|
1789
|
+
* Creates an RTEFunctionBlock from a VegaFunctionBlock.
|
|
1790
|
+
*
|
|
1791
|
+
* @param {VegaFunctionBlock} block - The custom block to convert.
|
|
1792
|
+
* @param {VegaRTETransformOptions} [options] - Optional transformation options.
|
|
1793
|
+
* @returns {RTEFunctionBlock} The resulting RTEFunctionBlock.
|
|
1794
|
+
*/
|
|
1795
|
+
static from(block, options) {
|
|
1796
|
+
const functionBlock = new RTEFunctionBlock(block.id);
|
|
1797
|
+
const defaultAnnotation = { customClass: [FUNCTION_BLOCK_CLASS] };
|
|
1798
|
+
let { annotations } = block;
|
|
1799
|
+
annotations = annotations
|
|
1800
|
+
? Object.assign(Object.assign({}, annotations), defaultAnnotation) : defaultAnnotation;
|
|
1801
|
+
super.convertAnnotationsToMap(functionBlock.annotationMap, annotations);
|
|
1802
|
+
functionBlock.children = this.generateBlockChildren(block.children, options, functionBlock);
|
|
1803
|
+
this.unwrapForeachContent(functionBlock.children);
|
|
1804
|
+
return functionBlock;
|
|
1805
|
+
}
|
|
1806
|
+
/**
|
|
1807
|
+
* Removes a redundant div wrapper from FOREACH content so it is rendered inline
|
|
1808
|
+
* with the FOREACH control. SHOW content retains its wrapper to preserve line breaks.
|
|
1809
|
+
*
|
|
1810
|
+
* @param {RTEFunctionBlockChild[]} children - The function block children to normalize.
|
|
1811
|
+
*/
|
|
1812
|
+
static unwrapForeachContent(children) {
|
|
1813
|
+
children.forEach((logicControlBlock, index) => {
|
|
1814
|
+
const contentBlock = children[index + 1];
|
|
1815
|
+
if (!(logicControlBlock instanceof RTELogicControlBlock) ||
|
|
1816
|
+
logicControlBlock.statementText !== 'FOREACH' ||
|
|
1817
|
+
!(contentBlock instanceof RTETextBlock)) {
|
|
1818
|
+
return;
|
|
1819
|
+
}
|
|
1820
|
+
contentBlock.children.forEach((node) => {
|
|
1821
|
+
const inlineHtml = node.getAnnotationByType(NodeAnnotationTypeEnum.INLINE_HTML);
|
|
1822
|
+
if ((inlineHtml === null || inlineHtml === void 0 ? void 0 : inlineHtml.htmlTag) !== 'div')
|
|
1823
|
+
return;
|
|
1824
|
+
if (inlineHtml.child) {
|
|
1825
|
+
node.annotationMap.set(NodeAnnotationTypeEnum.INLINE_HTML, inlineHtml.child);
|
|
1826
|
+
}
|
|
1827
|
+
else {
|
|
1828
|
+
node.annotationMap.delete(NodeAnnotationTypeEnum.INLINE_HTML);
|
|
1829
|
+
}
|
|
1830
|
+
});
|
|
1831
|
+
});
|
|
1832
|
+
}
|
|
1833
|
+
/**
|
|
1834
|
+
* Converts the RTEFunctionBlock and its children to an HTML string.
|
|
1835
|
+
*
|
|
1836
|
+
* @returns {string} The HTML string representation of the function block.
|
|
1837
|
+
*/
|
|
1838
|
+
toHtml() {
|
|
1839
|
+
const childrenHtml = this.children
|
|
1840
|
+
.map((child) => {
|
|
1841
|
+
if (child instanceof RTETextBlock) {
|
|
1842
|
+
const attrStr = this.getFunctionContentStyle(child);
|
|
1843
|
+
return `<div class="${FUNCTION_CONTENT_CLASS}"${attrStr}>${child.getChildrenHtml()}</div>`;
|
|
1844
|
+
}
|
|
1845
|
+
else {
|
|
1846
|
+
return child.toHtml();
|
|
1847
|
+
}
|
|
1848
|
+
})
|
|
1849
|
+
.join('');
|
|
1850
|
+
return `<div class="${FUNCTION_BLOCK_CLASS}" ${RTE_BLOCK_BOUNDARY_ATTRIBUTE}>${childrenHtml}</div>`;
|
|
1851
|
+
}
|
|
1852
|
+
/**
|
|
1853
|
+
* @inheritDoc
|
|
1854
|
+
*/
|
|
1855
|
+
clone(parent) {
|
|
1856
|
+
const clonedBlock = new RTEFunctionBlock(generateUUID());
|
|
1857
|
+
clonedBlock.parent = parent;
|
|
1858
|
+
clonedBlock.children = this.children.map((child) => {
|
|
1859
|
+
const clonedChild = child.clone(clonedBlock);
|
|
1860
|
+
return clonedChild;
|
|
1861
|
+
});
|
|
1862
|
+
clonedBlock.annotationMap = super.cloneAnnotations();
|
|
1863
|
+
return clonedBlock;
|
|
1864
|
+
}
|
|
1865
|
+
/**
|
|
1866
|
+
* @inheritDoc
|
|
1867
|
+
*/
|
|
1868
|
+
getLastNode() {
|
|
1869
|
+
return this.children[this.children.length - 1].getLastNode();
|
|
1870
|
+
}
|
|
1871
|
+
/**
|
|
1872
|
+
* The function block is an atomic caret boundary: descending would resolve the caret onto a
|
|
1873
|
+
* `contenteditable="false"` logic-control node instead of staying anchored to the block.
|
|
1874
|
+
*
|
|
1875
|
+
* @inheritDoc
|
|
1876
|
+
*/
|
|
1877
|
+
allowsCaretDescend() {
|
|
1878
|
+
return false;
|
|
1879
|
+
}
|
|
1880
|
+
/**
|
|
1881
|
+
* @inheritDoc
|
|
1882
|
+
*/
|
|
1883
|
+
isNotEmpty() {
|
|
1884
|
+
return this.children.length > 0;
|
|
1885
|
+
}
|
|
1886
|
+
/**
|
|
1887
|
+
* @inheritDoc
|
|
1888
|
+
*/
|
|
1889
|
+
toJSON() {
|
|
1890
|
+
return Object.assign(Object.assign({}, super.toJSON()), { id: this.id, type: this.type, children: this.children.map((child) => child.toJSON()) });
|
|
1891
|
+
}
|
|
1892
|
+
/**
|
|
1893
|
+
* Get the style string for function content block, excluding default paragraph styles.
|
|
1894
|
+
*
|
|
1895
|
+
* @param {RTETextBlock} block - The text block to extract styles from
|
|
1896
|
+
* @returns {string} - The style attribute string
|
|
1897
|
+
*/
|
|
1898
|
+
getFunctionContentStyle(block) {
|
|
2040
1899
|
const blockAnnotationStyle = new RTEAnnotationStyle(block);
|
|
2041
1900
|
let styles = blockAnnotationStyle.toCssText({ standalone: true });
|
|
2042
1901
|
const textStyleAnnotation = block.getAnnotationByType('TEXT_STYLE');
|
|
@@ -2047,7 +1906,7 @@ class RTEFunctionBlock extends RTEBlock {
|
|
|
2047
1906
|
return styles ? ` style="${styles}"` : '';
|
|
2048
1907
|
}
|
|
2049
1908
|
}
|
|
2050
|
-
RTEFunctionBlock.
|
|
1909
|
+
RTEFunctionBlock.typeName = 'RTEFunctionBlock';
|
|
2051
1910
|
|
|
2052
1911
|
/**
|
|
2053
1912
|
* Strategy to handle the insertion of a function block into the rich text editor.
|
|
@@ -2144,202 +2003,52 @@ class InsertFunctionBlockStrategy extends ActionHandleStrategy {
|
|
|
2144
2003
|
}
|
|
2145
2004
|
|
|
2146
2005
|
/**
|
|
2147
|
-
*
|
|
2006
|
+
* Function toolbar button renderer class.
|
|
2148
2007
|
*/
|
|
2149
|
-
class
|
|
2150
|
-
constructor(id, text, parent) {
|
|
2151
|
-
super(id);
|
|
2152
|
-
this.dtoName = RTELogicControlNode.dtoName;
|
|
2153
|
-
this.type = 'logic-control-node';
|
|
2154
|
-
this.text = '';
|
|
2155
|
-
this.text = text;
|
|
2156
|
-
this.parent = parent;
|
|
2157
|
-
}
|
|
2158
|
-
/**
|
|
2159
|
-
* Clone the current node instance.
|
|
2160
|
-
*
|
|
2161
|
-
* @returns {RTELogicControlNode} - A new instance of RTELogicControlNode.
|
|
2162
|
-
*/
|
|
2163
|
-
clone() {
|
|
2164
|
-
return new RTELogicControlNode(this.id, this.text, this.parent);
|
|
2165
|
-
}
|
|
2008
|
+
class FunctionToolbarButtonRenderer extends VegaRTEToolbarButtonRenderer {
|
|
2166
2009
|
/**
|
|
2167
|
-
*
|
|
2168
|
-
*
|
|
2169
|
-
* @returns {string} - The HTML string of the logic control node.
|
|
2010
|
+
* @inheritDoc
|
|
2170
2011
|
*/
|
|
2171
|
-
|
|
2172
|
-
return this.
|
|
2012
|
+
render(h, editorContext) {
|
|
2013
|
+
return this.renderDropdown(h, editorContext, {}, [
|
|
2014
|
+
this.renderButton(h, editorContext, {
|
|
2015
|
+
label: 'Functions',
|
|
2016
|
+
ariaLabel: 'Functions',
|
|
2017
|
+
showArrowIcon: true,
|
|
2018
|
+
tooltip: { text: 'Insert function' },
|
|
2019
|
+
}),
|
|
2020
|
+
this.renderDropdownListTemplate(h, FunctionToolbarButtonRenderer.FUNCTION_LIST, editorContext),
|
|
2021
|
+
]);
|
|
2173
2022
|
}
|
|
2174
2023
|
/**
|
|
2175
|
-
*
|
|
2024
|
+
* Overrides the isDisabled method to determine if the button should be disabled.
|
|
2176
2025
|
*
|
|
2177
|
-
* @
|
|
2026
|
+
* @param {VegaRTEToolbarRenderContext} editorContext The render context for the editor.
|
|
2027
|
+
* @returns {boolean} - true if the button should be disabled, false otherwise.
|
|
2178
2028
|
*/
|
|
2179
|
-
|
|
2180
|
-
|
|
2181
|
-
|
|
2182
|
-
|
|
2183
|
-
|
|
2184
|
-
|
|
2029
|
+
isDisabled(editorContext) {
|
|
2030
|
+
const context = this.getExtensionContext(editorContext.host);
|
|
2031
|
+
if (context) {
|
|
2032
|
+
const { host, getSelectedNodes } = context;
|
|
2033
|
+
const focusNode = getSelectedNodes()[0];
|
|
2034
|
+
let enableInsert = true;
|
|
2035
|
+
if (focusNode) {
|
|
2036
|
+
enableInsert = ActionHandleStrategyRegistry.canHandle(INSERT_FUNCTION_BLOCK, focusNode.parent);
|
|
2037
|
+
}
|
|
2038
|
+
return host.disabled || !enableInsert;
|
|
2039
|
+
}
|
|
2040
|
+
return false;
|
|
2185
2041
|
}
|
|
2186
|
-
|
|
2187
|
-
|
|
2188
|
-
|
|
2189
|
-
|
|
2190
|
-
*/
|
|
2191
|
-
getRangeEndOffset() {
|
|
2192
|
-
return 1;
|
|
2042
|
+
/* istanbul ignore next */
|
|
2043
|
+
// eslint-disable-next-line jsdoc/require-jsdoc
|
|
2044
|
+
handleButtonClick() {
|
|
2045
|
+
throw new Error('Method not implemented.');
|
|
2193
2046
|
}
|
|
2194
2047
|
/**
|
|
2195
|
-
*
|
|
2048
|
+
* Handles dropdown click event
|
|
2196
2049
|
*
|
|
2197
|
-
* @
|
|
2198
|
-
|
|
2199
|
-
getRangeContainer() {
|
|
2200
|
-
const element = stateEntityRenderingRegistry.getDOMByEntity(this);
|
|
2201
|
-
if (element) {
|
|
2202
|
-
return element.parentElement;
|
|
2203
|
-
}
|
|
2204
|
-
}
|
|
2205
|
-
/**
|
|
2206
|
-
* Get the content editable state of the node.
|
|
2207
|
-
*
|
|
2208
|
-
* @returns {boolean} - The content editable state of the node.
|
|
2209
|
-
*/
|
|
2210
|
-
isContentEditable() {
|
|
2211
|
-
return false;
|
|
2212
|
-
}
|
|
2213
|
-
/**
|
|
2214
|
-
* @inheritDoc
|
|
2215
|
-
*/
|
|
2216
|
-
getPlainText() {
|
|
2217
|
-
return this.text;
|
|
2218
|
-
}
|
|
2219
|
-
}
|
|
2220
|
-
RTELogicControlNode.dtoName = 'RTELogicControlNode';
|
|
2221
|
-
|
|
2222
|
-
/**
|
|
2223
|
-
* Class representing a logic control block in the rich text editor.
|
|
2224
|
-
*/
|
|
2225
|
-
class RTELogicControlBlock extends RTEBlock {
|
|
2226
|
-
constructor(id, statementText, parent) {
|
|
2227
|
-
super(id);
|
|
2228
|
-
this.dtoName = RTELogicControlBlock.dtoName;
|
|
2229
|
-
this.type = 'logic-control-block';
|
|
2230
|
-
this.children = [];
|
|
2231
|
-
this.statementText = '';
|
|
2232
|
-
this.statementText = statementText;
|
|
2233
|
-
this.children = [new RTELogicControlNode(`${id}-node-1`, statementText, this)];
|
|
2234
|
-
if (parent) {
|
|
2235
|
-
this.parent = parent;
|
|
2236
|
-
}
|
|
2237
|
-
}
|
|
2238
|
-
/**
|
|
2239
|
-
* Create a logic control block from a JSON representation.
|
|
2240
|
-
*
|
|
2241
|
-
* @param {VegaRTELogicControlBlock} json - The JSON object representing the logic control block.
|
|
2242
|
-
* @returns {RTELogicControlBlock} - The created logic control block.
|
|
2243
|
-
*/
|
|
2244
|
-
static from(json) {
|
|
2245
|
-
const block = new RTELogicControlBlock(json.id, json.statementText);
|
|
2246
|
-
return block;
|
|
2247
|
-
}
|
|
2248
|
-
/**
|
|
2249
|
-
* Check the block is not empty.
|
|
2250
|
-
*
|
|
2251
|
-
* @returns {boolean} - Always true for logic control block.
|
|
2252
|
-
*/
|
|
2253
|
-
isNotEmpty() {
|
|
2254
|
-
return true;
|
|
2255
|
-
}
|
|
2256
|
-
/**
|
|
2257
|
-
* Get the last node of the block.
|
|
2258
|
-
*
|
|
2259
|
-
* @returns {RTELogicControlNode} - The last node in the block.
|
|
2260
|
-
*/
|
|
2261
|
-
getLastNode() {
|
|
2262
|
-
return this.children[this.children.length - 1];
|
|
2263
|
-
}
|
|
2264
|
-
/**
|
|
2265
|
-
* Convert the block to its HTML representation.
|
|
2266
|
-
*
|
|
2267
|
-
* @returns {string} - The HTML string of the logic control block.
|
|
2268
|
-
*/
|
|
2269
|
-
toHtml() {
|
|
2270
|
-
return `<div class='${FUNCTION_SYNTAX_CLASS}' contenteditable='false'>${this.statementText}</div>`;
|
|
2271
|
-
}
|
|
2272
|
-
/**
|
|
2273
|
-
* Clone the current block instance.
|
|
2274
|
-
*
|
|
2275
|
-
* @param { RTEFunctionBlock } parent - The parent function block for the cloned instance.
|
|
2276
|
-
* @returns {RTELogicControlBlock} - A new instance of RTEStatementSyntaxBlock.
|
|
2277
|
-
*/
|
|
2278
|
-
clone(parent) {
|
|
2279
|
-
return new RTELogicControlBlock(this.id, this.statementText, parent);
|
|
2280
|
-
}
|
|
2281
|
-
/**
|
|
2282
|
-
* Get the JSON representation of the block.
|
|
2283
|
-
*
|
|
2284
|
-
* @returns {VegaRTELogicControlBlock} - The JSON object of the logic control block.
|
|
2285
|
-
*/
|
|
2286
|
-
toJSON() {
|
|
2287
|
-
return {
|
|
2288
|
-
id: this.id,
|
|
2289
|
-
type: this.type,
|
|
2290
|
-
statementText: this.statementText,
|
|
2291
|
-
};
|
|
2292
|
-
}
|
|
2293
|
-
}
|
|
2294
|
-
RTELogicControlBlock.dtoName = 'RTELogicControlBlock';
|
|
2295
|
-
|
|
2296
|
-
/**
|
|
2297
|
-
* Function toolbar button renderer class.
|
|
2298
|
-
*/
|
|
2299
|
-
class FunctionToolbarButtonRenderer extends VegaRTEToolbarButtonRenderer {
|
|
2300
|
-
/**
|
|
2301
|
-
* @inheritDoc
|
|
2302
|
-
*/
|
|
2303
|
-
render(h, editorContext) {
|
|
2304
|
-
return this.renderDropdown(h, editorContext, {}, [
|
|
2305
|
-
this.renderButton(h, editorContext, {
|
|
2306
|
-
label: 'Functions',
|
|
2307
|
-
ariaLabel: 'Functions',
|
|
2308
|
-
showArrowIcon: true,
|
|
2309
|
-
tooltip: { text: 'Insert function' },
|
|
2310
|
-
}),
|
|
2311
|
-
this.renderDropdownListTemplate(h, FunctionToolbarButtonRenderer.FUNCTION_LIST, editorContext),
|
|
2312
|
-
]);
|
|
2313
|
-
}
|
|
2314
|
-
/**
|
|
2315
|
-
* Overrides the isDisabled method to determine if the button should be disabled.
|
|
2316
|
-
*
|
|
2317
|
-
* @param {VegaRTEToolbarRenderContext} editorContext The render context for the editor.
|
|
2318
|
-
* @returns {boolean} - true if the button should be disabled, false otherwise.
|
|
2319
|
-
*/
|
|
2320
|
-
isDisabled(editorContext) {
|
|
2321
|
-
const context = this.getExtensionContext(editorContext.host);
|
|
2322
|
-
if (context) {
|
|
2323
|
-
const { host, getSelectedNodes } = context;
|
|
2324
|
-
const focusNode = getSelectedNodes()[0];
|
|
2325
|
-
let enableInsert = true;
|
|
2326
|
-
if (focusNode) {
|
|
2327
|
-
enableInsert = ActionHandleStrategyRegistry.canHandle(INSERT_FUNCTION_BLOCK, focusNode.parent);
|
|
2328
|
-
}
|
|
2329
|
-
return host.disabled || !enableInsert;
|
|
2330
|
-
}
|
|
2331
|
-
return false;
|
|
2332
|
-
}
|
|
2333
|
-
/* istanbul ignore next */
|
|
2334
|
-
// eslint-disable-next-line jsdoc/require-jsdoc
|
|
2335
|
-
handleButtonClick() {
|
|
2336
|
-
throw new Error('Method not implemented.');
|
|
2337
|
-
}
|
|
2338
|
-
/**
|
|
2339
|
-
* Handles dropdown click event
|
|
2340
|
-
*
|
|
2341
|
-
* @param {RTEExtensionFunctionType} itemKey - key of the clicked item
|
|
2342
|
-
* @param {VegaRTEToolbarRenderContext} editorContext The render context for the editor.
|
|
2050
|
+
* @param {RTEExtensionFunctionType} itemKey - key of the clicked item
|
|
2051
|
+
* @param {VegaRTEToolbarRenderContext} editorContext The render context for the editor.
|
|
2343
2052
|
*/
|
|
2344
2053
|
handleDropdownClick(itemKey, editorContext) {
|
|
2345
2054
|
if (editorContext) {
|
|
@@ -2385,6 +2094,7 @@ class RTELogicControlBlockRenderer extends VegaRTEExtensionRenderer {
|
|
|
2385
2094
|
}, renderData.statementText));
|
|
2386
2095
|
}
|
|
2387
2096
|
}
|
|
2097
|
+
RTELogicControlBlockRenderer.typeName = 'RTELogicControlBlockRenderer';
|
|
2388
2098
|
|
|
2389
2099
|
/**
|
|
2390
2100
|
* Returns true when the element belongs to function extension blocks by semantic
|
|
@@ -2510,6 +2220,7 @@ class DivToFunctionBlockStrategy extends ElementToDTOStrategy {
|
|
|
2510
2220
|
* @inheritDoc
|
|
2511
2221
|
*/
|
|
2512
2222
|
appendChildBlocks(currentBlock, childBlocks) {
|
|
2223
|
+
RTEFunctionBlock.unwrapForeachContent(childBlocks);
|
|
2513
2224
|
currentBlock.children = childBlocks.map((block) => {
|
|
2514
2225
|
block.parent = currentBlock;
|
|
2515
2226
|
return block;
|
|
@@ -2601,12 +2312,7 @@ class RTEFunctionBlockRenderer extends VegaRTEExtensionRenderer {
|
|
|
2601
2312
|
return classes.trim();
|
|
2602
2313
|
}
|
|
2603
2314
|
}
|
|
2604
|
-
|
|
2605
|
-
/**
|
|
2606
|
-
* Abstract class for action handler interceptors, which can intercept actions before they are handled.
|
|
2607
|
-
*/
|
|
2608
|
-
class ActionHandlerInterceptor {
|
|
2609
|
-
}
|
|
2315
|
+
RTEFunctionBlockRenderer.typeName = 'RTEFunctionBlockRenderer';
|
|
2610
2316
|
|
|
2611
2317
|
/**
|
|
2612
2318
|
* Prevent special type input in function block.
|
|
@@ -2778,8 +2484,8 @@ class VegaRTEFunctionExtension extends VegaRTEExtension {
|
|
|
2778
2484
|
constructor() {
|
|
2779
2485
|
super();
|
|
2780
2486
|
this.unregisterBlockBoundaryPredicate = null;
|
|
2781
|
-
this.registerBlockBasicStrategies(RTELogicControlBlock.
|
|
2782
|
-
this.registerBlockBasicStrategies(RTEFunctionBlock.
|
|
2487
|
+
this.registerBlockBasicStrategies(RTELogicControlBlock.typeName);
|
|
2488
|
+
this.registerBlockBasicStrategies(RTEFunctionBlock.typeName);
|
|
2783
2489
|
this.preventFunctionBlockDefaultInsertNewParagraph();
|
|
2784
2490
|
this.registerNode('logic-control-block', RTELogicControlBlock);
|
|
2785
2491
|
this.registerRenderer('logic-control-block', new RTELogicControlBlockRenderer());
|
|
@@ -2811,23 +2517,23 @@ class VegaRTEFunctionExtension extends VegaRTEExtension {
|
|
|
2811
2517
|
* Remove the appen children strategies to prevent default insert new paragraph logic in function block
|
|
2812
2518
|
*/
|
|
2813
2519
|
preventFunctionBlockDefaultInsertNewParagraph() {
|
|
2814
|
-
this.unRegisterStrategy(ModifyContentActionType.INSERT_NEW_PARAGRAPH, RTELogicControlBlock.
|
|
2815
|
-
this.unRegisterStrategy(ModifyContentActionType.APPEND_CHILDREN, RTEFunctionBlock.
|
|
2816
|
-
this.unRegisterStrategy(ModifyContentActionType.INSERT_CHILDREN_AFTER, RTEFunctionBlock.
|
|
2817
|
-
this.unRegisterStrategy(ModifyContentActionType.INSERT_CHILDREN_BEFORE, RTEFunctionBlock.
|
|
2818
|
-
this.unRegisterStrategy(ModifyContentActionType.PASTE_CONTENT, RTELogicControlBlock.
|
|
2819
|
-
VegaRTEExtension.registerActionHandleStrategy(RTEFunctionBlock.
|
|
2520
|
+
this.unRegisterStrategy(ModifyContentActionType.INSERT_NEW_PARAGRAPH, RTELogicControlBlock.typeName);
|
|
2521
|
+
this.unRegisterStrategy(ModifyContentActionType.APPEND_CHILDREN, RTEFunctionBlock.typeName);
|
|
2522
|
+
this.unRegisterStrategy(ModifyContentActionType.INSERT_CHILDREN_AFTER, RTEFunctionBlock.typeName);
|
|
2523
|
+
this.unRegisterStrategy(ModifyContentActionType.INSERT_CHILDREN_BEFORE, RTEFunctionBlock.typeName);
|
|
2524
|
+
this.unRegisterStrategy(ModifyContentActionType.PASTE_CONTENT, RTELogicControlBlock.typeName);
|
|
2525
|
+
VegaRTEExtension.registerActionHandleStrategy(RTEFunctionBlock.typeName, ModifyContentActionType.INSERT_NEW_PARAGRAPH, new FunctionBlockInsertParagraphStrategy());
|
|
2820
2526
|
}
|
|
2821
2527
|
}
|
|
2822
2528
|
(() => {
|
|
2823
2529
|
const insertFunctionBlockStrategy = new InsertFunctionBlockStrategy();
|
|
2824
|
-
VegaRTEExtension.registerActionHandleStrategy(VegaRTEContent.
|
|
2825
|
-
VegaRTEExtension.registerActionHandleStrategy(RTETextBlock.
|
|
2826
|
-
VegaRTEExtension.registerActionHandleStrategy(RTEImageBlock.
|
|
2827
|
-
VegaRTEExtension.registerActionHandleStrategy(RTELogicControlBlock.
|
|
2828
|
-
VegaRTEExtension.registerActionHandleStrategy(RTETextBlock.
|
|
2829
|
-
VegaRTEExtension.registerActionHandlerInterceptor(RTETextBlock.
|
|
2830
|
-
VegaRTEExtension.registerActionHandlerInterceptor(RTETextBlock.
|
|
2530
|
+
VegaRTEExtension.registerActionHandleStrategy(VegaRTEContent.typeName, INSERT_FUNCTION_BLOCK, insertFunctionBlockStrategy);
|
|
2531
|
+
VegaRTEExtension.registerActionHandleStrategy(RTETextBlock.typeName, INSERT_FUNCTION_BLOCK, insertFunctionBlockStrategy);
|
|
2532
|
+
VegaRTEExtension.registerActionHandleStrategy(RTEImageBlock.typeName, INSERT_FUNCTION_BLOCK, insertFunctionBlockStrategy);
|
|
2533
|
+
VegaRTEExtension.registerActionHandleStrategy(RTELogicControlBlock.typeName, INSERT_FUNCTION_BLOCK, insertFunctionBlockStrategy);
|
|
2534
|
+
VegaRTEExtension.registerActionHandleStrategy(RTETextBlock.typeName, PASTE_PLAIN_TEXT, new PastePlainTextStrategy());
|
|
2535
|
+
VegaRTEExtension.registerActionHandlerInterceptor(RTETextBlock.typeName, ModifyContentActionType.INSERT_NEW_PARAGRAPH, new PreventNewParagraphInterceptor());
|
|
2536
|
+
VegaRTEExtension.registerActionHandlerInterceptor(RTETextBlock.typeName, ModifyContentActionType.PASTE_CONTENT, new PreventPasteContentInterceptor());
|
|
2831
2537
|
})();
|
|
2832
2538
|
VegaRTEFunctionExtension.TOOLBAR_BUTTON_KEY = 'functions';
|
|
2833
2539
|
|
|
@@ -2928,7 +2634,6 @@ var __rest$3 = (undefined && undefined.__rest) || function (s, e) {
|
|
|
2928
2634
|
class RTETableCaptionBlock extends RTEBlock {
|
|
2929
2635
|
constructor(id, options) {
|
|
2930
2636
|
super(id);
|
|
2931
|
-
this.dtoName = RTETableCaptionBlock.dtoName;
|
|
2932
2637
|
this.type = 'table-caption';
|
|
2933
2638
|
const { autoMatchFormat } = options || { autoMatchFormat: true };
|
|
2934
2639
|
if (autoMatchFormat) {
|
|
@@ -2987,11 +2692,12 @@ class RTETableCaptionBlock extends RTEBlock {
|
|
|
2987
2692
|
return Object.assign(Object.assign({}, super.toJSON()), { type: this.type, children: this.children.map((child) => child.toJSON()) });
|
|
2988
2693
|
}
|
|
2989
2694
|
}
|
|
2695
|
+
RTETableCaptionBlock.typeName = 'RTETableCaptionBlock';
|
|
2696
|
+
// eslint-disable-next-line @globalpayments/vega-eslint/vega-class-member-order-rule
|
|
2990
2697
|
(() => {
|
|
2991
|
-
ActionHandleStrategyRegistry.register(ModifyContentActionType.INSERT_CHILDREN_BEFORE, RTETableCaptionBlock.
|
|
2992
|
-
ActionHandleStrategyRegistry.register(ModifyContentActionType.PASTE_CONTENT, RTETableCaptionBlock.
|
|
2698
|
+
ActionHandleStrategyRegistry.register(ModifyContentActionType.INSERT_CHILDREN_BEFORE, RTETableCaptionBlock.typeName, new InsertChildrenBeforeStrategy());
|
|
2699
|
+
ActionHandleStrategyRegistry.register(ModifyContentActionType.PASTE_CONTENT, RTETableCaptionBlock.typeName, new PasteContentStrategy());
|
|
2993
2700
|
})();
|
|
2994
|
-
RTETableCaptionBlock.dtoName = 'RTETableCaptionBlock';
|
|
2995
2701
|
|
|
2996
2702
|
const TOGGLE_TABLE_CAPTION = 'TOGGLE_TABLE_CAPTION';
|
|
2997
2703
|
/**
|
|
@@ -3164,6 +2870,7 @@ class UpdateTablePropertiesAction extends AnnotationAction {
|
|
|
3164
2870
|
return new RTETableAnnotation(this.tableProperties);
|
|
3165
2871
|
}
|
|
3166
2872
|
}
|
|
2873
|
+
UpdateTablePropertiesAction.typeName = 'UpdateTablePropertiesAction';
|
|
3167
2874
|
|
|
3168
2875
|
/**
|
|
3169
2876
|
* Cancel Event handler for the table properties.
|
|
@@ -3249,6 +2956,7 @@ class RTETableCellAnnotationsAction extends AnnotationAction {
|
|
|
3249
2956
|
});
|
|
3250
2957
|
}
|
|
3251
2958
|
}
|
|
2959
|
+
RTETableCellAnnotationsAction.typeName = 'RTETableCellAnnotationsAction';
|
|
3252
2960
|
|
|
3253
2961
|
/**
|
|
3254
2962
|
* Action to apply annotations to a table head cell.
|
|
@@ -3266,6 +2974,7 @@ class RTETableHeadCellAnnotationsAction extends RTETableCellAnnotationsAction {
|
|
|
3266
2974
|
return this.originAnnotation;
|
|
3267
2975
|
}
|
|
3268
2976
|
}
|
|
2977
|
+
RTETableHeadCellAnnotationsAction.typeName = 'RTETableHeadCellAnnotationsAction';
|
|
3269
2978
|
|
|
3270
2979
|
var __rest$1 = (undefined && undefined.__rest) || function (s, e) {
|
|
3271
2980
|
var t = {};
|
|
@@ -4515,6 +4224,7 @@ class RTETableBlockRenderer extends VegaRTEExtensionRenderer {
|
|
|
4515
4224
|
this.tableToolbar = null;
|
|
4516
4225
|
}
|
|
4517
4226
|
}
|
|
4227
|
+
RTETableBlockRenderer.typeName = 'RTETableBlockRenderer';
|
|
4518
4228
|
|
|
4519
4229
|
/**
|
|
4520
4230
|
* Renders a logic control block in the rich text editor.
|
|
@@ -4530,6 +4240,7 @@ class RTETableHeadRenderer extends VegaRTEExtensionRenderer {
|
|
|
4530
4240
|
});
|
|
4531
4241
|
}
|
|
4532
4242
|
}
|
|
4243
|
+
RTETableHeadRenderer.typeName = 'RTETableHeadRenderer';
|
|
4533
4244
|
|
|
4534
4245
|
/**
|
|
4535
4246
|
* Renders a logic control block in the rich text editor.
|
|
@@ -4545,6 +4256,7 @@ class RTETableRowBlockRenderer extends VegaRTEExtensionRenderer {
|
|
|
4545
4256
|
});
|
|
4546
4257
|
}
|
|
4547
4258
|
}
|
|
4259
|
+
RTETableRowBlockRenderer.typeName = 'RTETableRowBlockRenderer';
|
|
4548
4260
|
|
|
4549
4261
|
/**
|
|
4550
4262
|
* Renders a table cell block in the rich text editor.
|
|
@@ -4616,6 +4328,7 @@ class RTETableCellRenderer extends VegaRTEExtensionRenderer {
|
|
|
4616
4328
|
};
|
|
4617
4329
|
}
|
|
4618
4330
|
}
|
|
4331
|
+
RTETableCellRenderer.typeName = 'RTETableCellRenderer';
|
|
4619
4332
|
|
|
4620
4333
|
/**
|
|
4621
4334
|
* Renders a table body block in the rich text editor.
|
|
@@ -4631,6 +4344,7 @@ class RTETableBodyRenderer extends VegaRTEExtensionRenderer {
|
|
|
4631
4344
|
});
|
|
4632
4345
|
}
|
|
4633
4346
|
}
|
|
4347
|
+
RTETableBodyRenderer.typeName = 'RTETableBodyRenderer';
|
|
4634
4348
|
|
|
4635
4349
|
/**
|
|
4636
4350
|
* Renders a head cell block in the rich text editor.
|
|
@@ -4643,6 +4357,7 @@ class RTETableHeadCellRenderer extends RTETableCellRenderer {
|
|
|
4643
4357
|
return super.renderByCellType(h, renderData, rteContext, 'th');
|
|
4644
4358
|
}
|
|
4645
4359
|
}
|
|
4360
|
+
RTETableHeadCellRenderer.typeName = 'RTETableHeadCellRenderer';
|
|
4646
4361
|
|
|
4647
4362
|
const INSERT_TABLE_BLOCK = 'INSERT_TABLE_BLOCK';
|
|
4648
4363
|
/**
|
|
@@ -5035,6 +4750,7 @@ class RTETableCaptionRenderer extends VegaRTEExtensionRenderer {
|
|
|
5035
4750
|
.join(' '), 'data-placeholder': TABLE_CAPTION_PLACEHOLDER_TEXT }));
|
|
5036
4751
|
}
|
|
5037
4752
|
}
|
|
4753
|
+
RTETableCaptionRenderer.typeName = 'RTETableCaptionRenderer';
|
|
5038
4754
|
|
|
5039
4755
|
/**
|
|
5040
4756
|
* Abstract base strategy for table row actions. Provides common utilities for row manipulations.
|
|
@@ -7227,7 +6943,7 @@ class TableAnnotationHandler extends TableAnnotationHandlerBase {
|
|
|
7227
6943
|
* @inheritDoc
|
|
7228
6944
|
*/
|
|
7229
6945
|
canHandle(targetDto) {
|
|
7230
|
-
return targetDto.
|
|
6946
|
+
return targetDto.typeName === 'RTETableBlock';
|
|
7231
6947
|
}
|
|
7232
6948
|
/**
|
|
7233
6949
|
* Handle annotation extraction from table element.
|
|
@@ -7295,7 +7011,7 @@ class TableCellAnnotationHandler extends TableAnnotationHandlerBase {
|
|
|
7295
7011
|
* @inheritDoc
|
|
7296
7012
|
*/
|
|
7297
7013
|
canHandle(targetDto) {
|
|
7298
|
-
return targetDto.
|
|
7014
|
+
return targetDto.typeName === 'RTETableCellBlock';
|
|
7299
7015
|
}
|
|
7300
7016
|
/**
|
|
7301
7017
|
* Handle annotation extraction from table cell element.
|
|
@@ -7404,7 +7120,7 @@ class TableHeadCellAnnotationHandler extends TableCellAnnotationHandler {
|
|
|
7404
7120
|
* @inheritDoc
|
|
7405
7121
|
*/
|
|
7406
7122
|
canHandle(targetDto) {
|
|
7407
|
-
return targetDto.
|
|
7123
|
+
return targetDto.typeName === 'RTETableHeadCellBlock';
|
|
7408
7124
|
}
|
|
7409
7125
|
}
|
|
7410
7126
|
|
|
@@ -7884,7 +7600,7 @@ class TableBlockFilterStylesStrategy extends RTEFilterStylesStrategy {
|
|
|
7884
7600
|
* @inheritDoc
|
|
7885
7601
|
*/
|
|
7886
7602
|
canFilter(blockOrNodeInstance) {
|
|
7887
|
-
return this.isTableBlock(blockOrNodeInstance.
|
|
7603
|
+
return this.isTableBlock(blockOrNodeInstance.typeName);
|
|
7888
7604
|
}
|
|
7889
7605
|
/**
|
|
7890
7606
|
* @inheritDoc
|
|
@@ -7922,7 +7638,7 @@ class TableCaptionFilterStylesStrategy extends RTEFilterStylesStrategy {
|
|
|
7922
7638
|
* @inheritDoc
|
|
7923
7639
|
*/
|
|
7924
7640
|
canFilter(blockOrNodeInstance) {
|
|
7925
|
-
return this.isTableCaption(blockOrNodeInstance.
|
|
7641
|
+
return this.isTableCaption(blockOrNodeInstance.typeName);
|
|
7926
7642
|
}
|
|
7927
7643
|
/**
|
|
7928
7644
|
* @inheritDoc
|
|
@@ -7964,7 +7680,7 @@ class TableCellFilterStylesStrategy extends RTEFilterStylesStrategy {
|
|
|
7964
7680
|
* @inheritDoc
|
|
7965
7681
|
*/
|
|
7966
7682
|
canFilter(blockOrNodeInstance) {
|
|
7967
|
-
return this.isTableCell(blockOrNodeInstance.
|
|
7683
|
+
return this.isTableCell(blockOrNodeInstance.typeName);
|
|
7968
7684
|
}
|
|
7969
7685
|
/**
|
|
7970
7686
|
* The table cell border color can be represented in different formats (e.g., hex, rgb), so we need to ensure that we can handle both cases.
|
|
@@ -8028,12 +7744,12 @@ class VegaRTETableExtension extends VegaRTEExtension {
|
|
|
8028
7744
|
this.tableSelection = new RTETableSelection();
|
|
8029
7745
|
RTETableColorManager.setTableColors(colors);
|
|
8030
7746
|
this.registerToolbarButtonRenderer(VegaRTETableExtension.TOOLBAR_BUTTON_KEY, this.toolbarButtonRenderer);
|
|
8031
|
-
this.registerBlockBasicStrategies(RTETableBlock.
|
|
8032
|
-
this.registerBlockBasicStrategies(RTETableHeadBlock.
|
|
8033
|
-
this.registerBlockBasicStrategies(RTETableHeadCellBlock.
|
|
8034
|
-
this.registerBlockBasicStrategies(RTETableRowBlock.
|
|
8035
|
-
this.registerBlockBasicStrategies(RTETableCellBlock.
|
|
8036
|
-
this.registerBlockBasicStrategies(RTETableBodyBlock.
|
|
7747
|
+
this.registerBlockBasicStrategies(RTETableBlock.typeName);
|
|
7748
|
+
this.registerBlockBasicStrategies(RTETableHeadBlock.typeName);
|
|
7749
|
+
this.registerBlockBasicStrategies(RTETableHeadCellBlock.typeName);
|
|
7750
|
+
this.registerBlockBasicStrategies(RTETableRowBlock.typeName);
|
|
7751
|
+
this.registerBlockBasicStrategies(RTETableCellBlock.typeName);
|
|
7752
|
+
this.registerBlockBasicStrategies(RTETableBodyBlock.typeName);
|
|
8037
7753
|
this.registerRenderer('table-block', this.tableBlockRenderer);
|
|
8038
7754
|
this.registerRenderer('table-head', new RTETableHeadRenderer());
|
|
8039
7755
|
this.registerRenderer('table-head-cell', this.tableHeadCellRenderer);
|
|
@@ -8080,41 +7796,41 @@ class VegaRTETableExtension extends VegaRTEExtension {
|
|
|
8080
7796
|
(() => {
|
|
8081
7797
|
const insertTableBlockStrategy = new InsertTableBlockStrategy();
|
|
8082
7798
|
const deleteTableBlockStrategy = new DeleteTableBlockStrategy();
|
|
8083
|
-
VegaRTEExtension.registerActionHandleStrategy(VegaRTEContent.
|
|
7799
|
+
VegaRTEExtension.registerActionHandleStrategy(VegaRTEContent.typeName, INSERT_TABLE_BLOCK, insertTableBlockStrategy);
|
|
8084
7800
|
// Registered on the table block itself (not its parent) so a table can always be
|
|
8085
7801
|
// deleted regardless of which block type it is nested in (root content, table cell,
|
|
8086
7802
|
// blockquote, or any future container).
|
|
8087
|
-
VegaRTEExtension.registerActionHandleStrategy(RTETableBlock.
|
|
8088
|
-
VegaRTEExtension.registerActionHandleStrategy(RTETextBlock.
|
|
8089
|
-
VegaRTEExtension.registerActionHandleStrategy(RTEImageBlock.
|
|
8090
|
-
VegaRTEExtension.registerActionHandleStrategy(RTETableBlock.
|
|
8091
|
-
VegaRTEExtension.registerActionHandleStrategy(RTETableBlock.
|
|
8092
|
-
VegaRTEExtension.registerActionHandleStrategy(RTETableBlock.
|
|
8093
|
-
VegaRTEExtension.registerActionHandleStrategy(RTETableBlock.
|
|
8094
|
-
VegaRTEExtension.registerActionHandleStrategy(RTETableBlock.
|
|
8095
|
-
VegaRTEExtension.registerActionHandleStrategy(RTETableBlock.
|
|
8096
|
-
VegaRTEExtension.registerActionHandleStrategy(RTETableBlock.
|
|
8097
|
-
VegaRTEExtension.registerActionHandleStrategy(RTETableRowBlock.
|
|
8098
|
-
VegaRTEExtension.registerActionHandleStrategy(RTETableRowBlock.
|
|
8099
|
-
VegaRTEExtension.registerActionHandleStrategy(RTETableRowBlock.
|
|
8100
|
-
VegaRTEExtension.registerActionHandleStrategy(RTETableCellBlock.
|
|
8101
|
-
VegaRTEExtension.registerActionHandleStrategy(RTETableCellBlock.
|
|
8102
|
-
VegaRTEExtension.registerActionHandleStrategy(RTETableHeadCellBlock.
|
|
8103
|
-
VegaRTEExtension.registerActionHandleStrategy(RTETableHeadCellBlock.
|
|
8104
|
-
VegaRTEExtension.registerActionHandleStrategy(RTETableBlock.
|
|
8105
|
-
VegaRTEExtension.registerActionHandleStrategy(RTETableBlock.
|
|
8106
|
-
VegaRTEExtension.registerActionHandleStrategy(RTETableBlock.
|
|
8107
|
-
VegaRTEExtension.registerActionHandleStrategy(RTETableCellBlock.
|
|
8108
|
-
VegaRTEExtension.registerActionHandleStrategy(RTETableHeadCellBlock.
|
|
8109
|
-
VegaRTEExtension.registerActionHandlerInterceptor(RTETextBlock.
|
|
8110
|
-
VegaRTEExtension.registerActionHandlerInterceptor(RTETableRowBlock.
|
|
8111
|
-
VegaRTEExtension.registerActionHandlerInterceptor(RTETableCellBlock.
|
|
8112
|
-
VegaRTEExtension.registerActionHandlerInterceptor(RTETableHeadCellBlock.
|
|
8113
|
-
VegaRTEExtension.registerActionHandlerInterceptor(RTETableBlock.
|
|
8114
|
-
VegaRTEExtension.registerFilterStylesStrategy(RTETableBlock.
|
|
8115
|
-
VegaRTEExtension.registerFilterStylesStrategy(RTETableCaptionBlock.
|
|
8116
|
-
VegaRTEExtension.registerFilterStylesStrategy(RTETableCellBlock.
|
|
8117
|
-
VegaRTEExtension.registerFilterStylesStrategy(RTETableHeadCellBlock.
|
|
7803
|
+
VegaRTEExtension.registerActionHandleStrategy(RTETableBlock.typeName, DELETE_TABLE_BLOCK, deleteTableBlockStrategy);
|
|
7804
|
+
VegaRTEExtension.registerActionHandleStrategy(RTETextBlock.typeName, INSERT_TABLE_BLOCK, insertTableBlockStrategy);
|
|
7805
|
+
VegaRTEExtension.registerActionHandleStrategy(RTEImageBlock.typeName, INSERT_TABLE_BLOCK, insertTableBlockStrategy);
|
|
7806
|
+
VegaRTEExtension.registerActionHandleStrategy(RTETableBlock.typeName, INSERT_TABLE_ROW_INTO_DIFFERENT_SECTION, new InsertTableRowIntoDifferentSectionStrategy());
|
|
7807
|
+
VegaRTEExtension.registerActionHandleStrategy(RTETableBlock.typeName, INSERT_TABLE_ROW_INTO_SAME_SECTION, new InsertTableRowIntoSameSectionStrategy());
|
|
7808
|
+
VegaRTEExtension.registerActionHandleStrategy(RTETableBlock.typeName, DELETE_TABLE_ROW, new DeleteTableRowStrategy());
|
|
7809
|
+
VegaRTEExtension.registerActionHandleStrategy(RTETableBlock.typeName, TOGGLE_HEADER_ROW, new ToggleHeaderRowStrategy());
|
|
7810
|
+
VegaRTEExtension.registerActionHandleStrategy(RTETableBlock.typeName, INSERT_TABLE_COLUMN, new InsertTableColumnStrategy());
|
|
7811
|
+
VegaRTEExtension.registerActionHandleStrategy(RTETableBlock.typeName, DELETE_TABLE_COLUMN, new DeleteTableColumnStrategy());
|
|
7812
|
+
VegaRTEExtension.registerActionHandleStrategy(RTETableBlock.typeName, TOGGLE_HEADER_TABLE_COLUMN, new ToggleHeaderTableColumnStrategy());
|
|
7813
|
+
VegaRTEExtension.registerActionHandleStrategy(RTETableRowBlock.typeName, SPLIT_TABLE_CELL, new SplitTableCellStrategy());
|
|
7814
|
+
VegaRTEExtension.registerActionHandleStrategy(RTETableRowBlock.typeName, CREATE_SEGMENT_TABLE_CELL, new CreateSegmentTableCellStrategy());
|
|
7815
|
+
VegaRTEExtension.registerActionHandleStrategy(RTETableRowBlock.typeName, REPLACE_TABLE_CELL, new ReplaceTableCellStrategy());
|
|
7816
|
+
VegaRTEExtension.registerActionHandleStrategy(RTETableCellBlock.typeName, SPLIT_CELL_HORIZONTALLY, new SplitCellHorizontallyStrategy());
|
|
7817
|
+
VegaRTEExtension.registerActionHandleStrategy(RTETableCellBlock.typeName, SPLIT_CELL_VERTICALLY, new SplitCellVerticallyStrategy());
|
|
7818
|
+
VegaRTEExtension.registerActionHandleStrategy(RTETableHeadCellBlock.typeName, SPLIT_CELL_HORIZONTALLY, new SplitCellHorizontallyStrategy());
|
|
7819
|
+
VegaRTEExtension.registerActionHandleStrategy(RTETableHeadCellBlock.typeName, SPLIT_CELL_VERTICALLY, new SplitCellVerticallyStrategy());
|
|
7820
|
+
VegaRTEExtension.registerActionHandleStrategy(RTETableBlock.typeName, SELECT_TABLE_COLUMN, new SelectTableColumnStrategy());
|
|
7821
|
+
VegaRTEExtension.registerActionHandleStrategy(RTETableBlock.typeName, MERGE_CELLS, new MergeCellsStrategy());
|
|
7822
|
+
VegaRTEExtension.registerActionHandleStrategy(RTETableBlock.typeName, UpdateTablePropertiesAction.typeName, new UpdateTablePropertiesStrategy());
|
|
7823
|
+
VegaRTEExtension.registerActionHandleStrategy(RTETableCellBlock.typeName, RTETableCellAnnotationsAction.typeName, new UpdateTableCellPropertiesStrategy());
|
|
7824
|
+
VegaRTEExtension.registerActionHandleStrategy(RTETableHeadCellBlock.typeName, RTETableHeadCellAnnotationsAction.typeName, new UpdateTableCellPropertiesStrategy());
|
|
7825
|
+
VegaRTEExtension.registerActionHandlerInterceptor(RTETextBlock.typeName, ModifyContentActionType.DELETE_BLOCK_CONTENT, new PreventCellContentDeleteInterceptor());
|
|
7826
|
+
VegaRTEExtension.registerActionHandlerInterceptor(RTETableRowBlock.typeName, ModifyContentActionType.INSERT_CHILDREN_BEFORE, new PreventRowInsertInterceptor());
|
|
7827
|
+
VegaRTEExtension.registerActionHandlerInterceptor(RTETableCellBlock.typeName, ModifyContentActionType.DELETE_CHILDREN, new PreventCellChildrenRemoveInterceptor());
|
|
7828
|
+
VegaRTEExtension.registerActionHandlerInterceptor(RTETableHeadCellBlock.typeName, ModifyContentActionType.DELETE_CHILDREN, new PreventCellChildrenRemoveInterceptor());
|
|
7829
|
+
VegaRTEExtension.registerActionHandlerInterceptor(RTETableBlock.typeName, ModifyContentActionType.INSERT_NEW_PARAGRAPH, new PreventTableInsertParagraphInterceptor());
|
|
7830
|
+
VegaRTEExtension.registerFilterStylesStrategy(RTETableBlock.typeName, new TableBlockFilterStylesStrategy());
|
|
7831
|
+
VegaRTEExtension.registerFilterStylesStrategy(RTETableCaptionBlock.typeName, new TableCaptionFilterStylesStrategy());
|
|
7832
|
+
VegaRTEExtension.registerFilterStylesStrategy(RTETableCellBlock.typeName, new TableCellFilterStylesStrategy());
|
|
7833
|
+
VegaRTEExtension.registerFilterStylesStrategy(RTETableHeadCellBlock.typeName, new TableCellFilterStylesStrategy('th'));
|
|
8118
7834
|
})();
|
|
8119
7835
|
VegaRTETableExtension.TOOLBAR_BUTTON_KEY = 'table';
|
|
8120
7836
|
|
|
@@ -8149,6 +7865,7 @@ class RTEHorizontalLineNode extends RTEDecoratorNode {
|
|
|
8149
7865
|
return '<hr>';
|
|
8150
7866
|
}
|
|
8151
7867
|
}
|
|
7868
|
+
RTEHorizontalLineNode.typeName = 'RTEHorizontalLineNode';
|
|
8152
7869
|
|
|
8153
7870
|
/**
|
|
8154
7871
|
* Predicate class provides static methods to check specific conditions on HTML elements or dto instances.
|
|
@@ -8193,7 +7910,7 @@ class HorizontalLineFilterStylesStrategy extends RTEFilterStylesStrategy {
|
|
|
8193
7910
|
* @inheritDoc
|
|
8194
7911
|
*/
|
|
8195
7912
|
canFilter(blockOrNodeInstance) {
|
|
8196
|
-
return Predicate.isHorizontalLineBlock(blockOrNodeInstance.
|
|
7913
|
+
return Predicate.isHorizontalLineBlock(blockOrNodeInstance.typeName);
|
|
8197
7914
|
}
|
|
8198
7915
|
/**
|
|
8199
7916
|
* @inheritDoc
|
|
@@ -8277,7 +7994,6 @@ class HorizontalLineAnnotation extends BlockAnnotation {
|
|
|
8277
7994
|
class RTEHorizontalLineBlock extends RTEBlock {
|
|
8278
7995
|
constructor(id, options) {
|
|
8279
7996
|
super(id);
|
|
8280
|
-
this.dtoName = RTEHorizontalLineBlock.dtoName;
|
|
8281
7997
|
this.type = 'horizontal-line';
|
|
8282
7998
|
this.children = [];
|
|
8283
7999
|
const { autoMatchFormat = true } = options !== null && options !== void 0 ? options : {};
|
|
@@ -8355,7 +8071,7 @@ class RTEHorizontalLineBlock extends RTEBlock {
|
|
|
8355
8071
|
return clonedBlock;
|
|
8356
8072
|
}
|
|
8357
8073
|
}
|
|
8358
|
-
RTEHorizontalLineBlock.
|
|
8074
|
+
RTEHorizontalLineBlock.typeName = 'RTEHorizontalLineBlock';
|
|
8359
8075
|
|
|
8360
8076
|
const horizontalLineBlockStylesCss = ".v-rte-horizontal-line{padding:8px 0;overflow:hidden}.v-rte-horizontal-line .v-rte-horizontal-line-hr{display:inline-block;width:100%;height:4px;border-width:0px;background-color:rgb(222, 222, 222)}";
|
|
8361
8077
|
|
|
@@ -8393,6 +8109,7 @@ class RTEHorizontalLineBlockRenderer extends VegaRTEExtensionRenderer {
|
|
|
8393
8109
|
return horizontalLineBlockStylesCss;
|
|
8394
8110
|
}
|
|
8395
8111
|
}
|
|
8112
|
+
RTEHorizontalLineBlockRenderer.typeName = 'RTEHorizontalLineBlockRenderer';
|
|
8396
8113
|
|
|
8397
8114
|
const HorizontalLine = {
|
|
8398
8115
|
icon: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512"><!--! Font Awesome Pro 6.3.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --><path fill="currentColor" d="M0 224H32 608h32v64H608 32 0V224z"/></svg>`,
|
|
@@ -8609,7 +8326,7 @@ class VegaRTEHorizontalLineExtension extends VegaRTEExtension {
|
|
|
8609
8326
|
this.blockRenderer = new RTEHorizontalLineBlockRenderer();
|
|
8610
8327
|
this.toolbarButtonRenderer = new RTEHorizontalLineToolbarButtonRenderer();
|
|
8611
8328
|
// Register basic block strategies (delete, append, paste, etc.)
|
|
8612
|
-
this.registerBlockBasicStrategies(RTEHorizontalLineBlock.
|
|
8329
|
+
this.registerBlockBasicStrategies(RTEHorizontalLineBlock.typeName);
|
|
8613
8330
|
// Register the block DTO class
|
|
8614
8331
|
this.registerNode('horizontal-line', RTEHorizontalLineBlock);
|
|
8615
8332
|
// Register the renderer
|
|
@@ -8619,16 +8336,16 @@ class VegaRTEHorizontalLineExtension extends VegaRTEExtension {
|
|
|
8619
8336
|
// Register HTML → DTO conversion strategy
|
|
8620
8337
|
this.registerElementToBlockDTOClassStrategy(new HrToHorizontalLineBlockStrategy());
|
|
8621
8338
|
// Register filter styles strategy for source edit round-trip
|
|
8622
|
-
VegaRTEExtension.registerFilterStylesStrategy(RTEHorizontalLineBlock.
|
|
8339
|
+
VegaRTEExtension.registerFilterStylesStrategy(RTEHorizontalLineBlock.typeName, new HorizontalLineFilterStylesStrategy());
|
|
8623
8340
|
}
|
|
8624
8341
|
}
|
|
8625
8342
|
(() => {
|
|
8626
8343
|
const insertStrategy = new InsertHorizontalLineBlockStrategy();
|
|
8627
8344
|
// Register insert strategy for all block types that can be a target
|
|
8628
|
-
VegaRTEExtension.registerActionHandleStrategy(VegaRTEContent.
|
|
8629
|
-
VegaRTEExtension.registerActionHandleStrategy(RTETextBlock.
|
|
8630
|
-
VegaRTEExtension.registerActionHandleStrategy(RTEImageBlock.
|
|
8631
|
-
VegaRTEExtension.registerActionHandleStrategy(RTEHorizontalLineBlock.
|
|
8345
|
+
VegaRTEExtension.registerActionHandleStrategy(VegaRTEContent.typeName, INSERT_HORIZONTAL_LINE_BLOCK, insertStrategy);
|
|
8346
|
+
VegaRTEExtension.registerActionHandleStrategy(RTETextBlock.typeName, INSERT_HORIZONTAL_LINE_BLOCK, insertStrategy);
|
|
8347
|
+
VegaRTEExtension.registerActionHandleStrategy(RTEImageBlock.typeName, INSERT_HORIZONTAL_LINE_BLOCK, insertStrategy);
|
|
8348
|
+
VegaRTEExtension.registerActionHandleStrategy(RTEHorizontalLineBlock.typeName, INSERT_HORIZONTAL_LINE_BLOCK, insertStrategy);
|
|
8632
8349
|
})();
|
|
8633
8350
|
VegaRTEHorizontalLineExtension.TOOLBAR_BUTTON_KEY = 'horizontalLine';
|
|
8634
8351
|
|
|
@@ -8713,7 +8430,6 @@ class BlockquoteAnnotation extends BlockAnnotation {
|
|
|
8713
8430
|
class RTEBlockquoteBlock extends RTEBlock {
|
|
8714
8431
|
constructor(id, options) {
|
|
8715
8432
|
super(id);
|
|
8716
|
-
this.dtoName = RTEBlockquoteBlock.dtoName;
|
|
8717
8433
|
this.type = 'blockquote';
|
|
8718
8434
|
this.children = [];
|
|
8719
8435
|
const { autoMatchFormat = true } = options !== null && options !== void 0 ? options : {};
|
|
@@ -8774,7 +8490,7 @@ class RTEBlockquoteBlock extends RTEBlock {
|
|
|
8774
8490
|
return Object.assign(Object.assign({}, super.toJSON()), { id: this.id, type: 'blockquote', children: this.children.map((child) => child.toJSON()) });
|
|
8775
8491
|
}
|
|
8776
8492
|
}
|
|
8777
|
-
RTEBlockquoteBlock.
|
|
8493
|
+
RTEBlockquoteBlock.typeName = 'RTEBlockquoteBlock';
|
|
8778
8494
|
|
|
8779
8495
|
/**
|
|
8780
8496
|
* Wrap the selected blocks into a new `<blockquote>` block while preserving
|
|
@@ -8992,6 +8708,7 @@ class RTEBlockquoteBlockRenderer extends VegaRTEExtensionRenderer {
|
|
|
8992
8708
|
return BlockquoteAnnotation.getDefaultCssText();
|
|
8993
8709
|
}
|
|
8994
8710
|
}
|
|
8711
|
+
RTEBlockquoteBlockRenderer.typeName = 'RTEBlockquoteBlockRenderer';
|
|
8995
8712
|
const RTEBlockquoteBlockRenderer$1 = new RTEBlockquoteBlockRenderer();
|
|
8996
8713
|
|
|
8997
8714
|
// FontAwesome 7.2.0 — `quote-left` (solid).
|
|
@@ -9273,7 +8990,7 @@ class BlockquoteFilterStylesStrategy extends RTEFilterStylesStrategy {
|
|
|
9273
8990
|
* @inheritDoc
|
|
9274
8991
|
*/
|
|
9275
8992
|
canFilter(blockOrNodeInstance) {
|
|
9276
|
-
return BlockquoteFilterStylesStrategy.isBlockquoteBlock(blockOrNodeInstance.
|
|
8993
|
+
return BlockquoteFilterStylesStrategy.isBlockquoteBlock(blockOrNodeInstance.typeName);
|
|
9277
8994
|
}
|
|
9278
8995
|
/**
|
|
9279
8996
|
* @inheritDoc
|
|
@@ -9296,28 +9013,28 @@ class VegaRTEBlockquoteExtension extends VegaRTEExtension {
|
|
|
9296
9013
|
constructor() {
|
|
9297
9014
|
super();
|
|
9298
9015
|
this.toolbarButtonRenderer = new RTEBlockquoteToolbarButtonRenderer();
|
|
9299
|
-
this.registerBlockBasicStrategies(RTEBlockquoteBlock.
|
|
9016
|
+
this.registerBlockBasicStrategies(RTEBlockquoteBlock.typeName);
|
|
9300
9017
|
this.registerNode('blockquote', RTEBlockquoteBlock);
|
|
9301
9018
|
this.registerRenderer('blockquote', RTEBlockquoteBlockRenderer$1);
|
|
9302
9019
|
this.registerToolbarButtonRenderer(VegaRTEBlockquoteExtension.TOOLBAR_BUTTON_KEY, this.toolbarButtonRenderer);
|
|
9303
9020
|
this.registerElementToBlockDTOClassStrategy(new BlockquoteToBlockquoteBlockStrategy());
|
|
9304
9021
|
// Register filter styles strategy for source edit round-trip.
|
|
9305
|
-
VegaRTEExtension.registerFilterStylesStrategy(RTEBlockquoteBlock.
|
|
9022
|
+
VegaRTEExtension.registerFilterStylesStrategy(RTEBlockquoteBlock.typeName, new BlockquoteFilterStylesStrategy());
|
|
9306
9023
|
}
|
|
9307
9024
|
}
|
|
9308
9025
|
(() => {
|
|
9309
9026
|
const wrapStrategy = new BlockTransformToBlockquoteStrategy();
|
|
9310
9027
|
// Root container — wrap top-level blocks.
|
|
9311
|
-
VegaRTEExtension.registerActionHandleStrategy(VegaRTEContent.
|
|
9028
|
+
VegaRTEExtension.registerActionHandleStrategy(VegaRTEContent.typeName, TRANSFORM_TO_BLOCKQUOTE, wrapStrategy);
|
|
9312
9029
|
// Table cells (body + header) — wrap is scoped to the closest cell.
|
|
9313
9030
|
// Other container blocks (code, list item, function) are intentionally
|
|
9314
9031
|
// not registered, so the toolbar stays disabled inside them.
|
|
9315
|
-
VegaRTEExtension.registerActionHandleStrategy(RTETableCellBlock.
|
|
9316
|
-
VegaRTEExtension.registerActionHandleStrategy(RTETableHeadCellBlock.
|
|
9317
|
-
VegaRTEExtension.registerActionHandleStrategy(RTEBlockquoteBlock.
|
|
9032
|
+
VegaRTEExtension.registerActionHandleStrategy(RTETableCellBlock.typeName, TRANSFORM_TO_BLOCKQUOTE, wrapStrategy);
|
|
9033
|
+
VegaRTEExtension.registerActionHandleStrategy(RTETableHeadCellBlock.typeName, TRANSFORM_TO_BLOCKQUOTE, wrapStrategy);
|
|
9034
|
+
VegaRTEExtension.registerActionHandleStrategy(RTEBlockquoteBlock.typeName, REMOVE_BLOCKQUOTE, new RemoveBlockquoteStrategy());
|
|
9318
9035
|
// Enables exiting the blockquote via the keyboard: pressing Enter on an empty
|
|
9319
9036
|
// trailing paragraph breaks out to a new paragraph after the blockquote.
|
|
9320
|
-
VegaRTEExtension.registerActionHandlerInterceptor(RTETextBlock.
|
|
9037
|
+
VegaRTEExtension.registerActionHandlerInterceptor(RTETextBlock.typeName, ModifyContentActionType.INSERT_NEW_PARAGRAPH, new BlockquoteExitOnEnterInterceptor());
|
|
9321
9038
|
})();
|
|
9322
9039
|
VegaRTEBlockquoteExtension.TOOLBAR_BUTTON_KEY = 'blockquote';
|
|
9323
9040
|
|
|
@@ -11200,6 +10917,7 @@ class LineHeightAnnotationAction extends AnnotationAction {
|
|
|
11200
10917
|
return new LineHeightAnnotation(this.lineHeight);
|
|
11201
10918
|
}
|
|
11202
10919
|
}
|
|
10920
|
+
LineHeightAnnotationAction.typeName = 'LineHeightAnnotationAction';
|
|
11203
10921
|
|
|
11204
10922
|
/**
|
|
11205
10923
|
* Update the block line height strategy.
|
|
@@ -11296,7 +11014,7 @@ class RTELineHeightToolbarButtonRenderer extends VegaRTEToolbarButtonRenderer {
|
|
|
11296
11014
|
const selectedBlocks = this.getSelectedBlocks(editorContext);
|
|
11297
11015
|
return selectedBlocks.some((block) => block instanceof RTECodeBlock ||
|
|
11298
11016
|
block instanceof RTEImageBlock ||
|
|
11299
|
-
!ActionHandleStrategyRegistry.canHandle(LineHeightAnnotationAction.
|
|
11017
|
+
!ActionHandleStrategyRegistry.canHandle(LineHeightAnnotationAction.typeName, block));
|
|
11300
11018
|
}
|
|
11301
11019
|
/**
|
|
11302
11020
|
* @inheritDoc
|
|
@@ -11361,8 +11079,8 @@ class RTELineHeightToolbarButtonRenderer extends VegaRTEToolbarButtonRenderer {
|
|
|
11361
11079
|
})();
|
|
11362
11080
|
|
|
11363
11081
|
const LINE_HEIGHT_AWARE_BLOCK_NAMES = new Set([
|
|
11364
|
-
RTETextBlock.
|
|
11365
|
-
RTEListItemBlock.
|
|
11082
|
+
RTETextBlock.typeName,
|
|
11083
|
+
RTEListItemBlock.typeName,
|
|
11366
11084
|
]);
|
|
11367
11085
|
/** Handle line height annotation. */
|
|
11368
11086
|
class LineHeightAnnotationHandler extends AnnotationGeneratorStrategyAbstract {
|
|
@@ -11377,7 +11095,7 @@ class LineHeightAnnotationHandler extends AnnotationGeneratorStrategyAbstract {
|
|
|
11377
11095
|
* @returns {boolean} Whether the target DTO supports line-height annotations.
|
|
11378
11096
|
*/
|
|
11379
11097
|
canHandle(targetDto) {
|
|
11380
|
-
return LINE_HEIGHT_AWARE_BLOCK_NAMES.has(targetDto.
|
|
11098
|
+
return LINE_HEIGHT_AWARE_BLOCK_NAMES.has(targetDto.typeName);
|
|
11381
11099
|
}
|
|
11382
11100
|
/**
|
|
11383
11101
|
* Extract inline `line-height` as a semantic `lineHeight` annotation.
|
|
@@ -11529,8 +11247,8 @@ class VegaRTELineHeightExtension extends VegaRTEExtension {
|
|
|
11529
11247
|
}
|
|
11530
11248
|
(() => {
|
|
11531
11249
|
[RTETextBlock, RTEListItemBlock].forEach((BlockClass) => {
|
|
11532
|
-
VegaRTEExtension.registerActionHandleStrategy(BlockClass.
|
|
11533
|
-
RTEFilterStylesStrategyRegistry.register(BlockClass.
|
|
11250
|
+
VegaRTEExtension.registerActionHandleStrategy(BlockClass.typeName, LineHeightAnnotationAction.typeName, new BlockUpdateLineHeightStrategy());
|
|
11251
|
+
RTEFilterStylesStrategyRegistry.register(BlockClass.typeName, new LineHeightFilterStylesStrategy());
|
|
11534
11252
|
attachLineHeightFromJson(BlockClass);
|
|
11535
11253
|
});
|
|
11536
11254
|
})();
|
|
@@ -11803,6 +11521,7 @@ VegaRTEFullscreenExtension.controllerStore = VegaRTEFullscreenExtension.createSt
|
|
|
11803
11521
|
var RTEPasteMode;
|
|
11804
11522
|
(function (RTEPasteMode) {
|
|
11805
11523
|
RTEPasteMode["RICH"] = "rich";
|
|
11524
|
+
RTEPasteMode["PLAIN"] = "plain";
|
|
11806
11525
|
RTEPasteMode["WORD"] = "word";
|
|
11807
11526
|
})(RTEPasteMode || (RTEPasteMode = {}));
|
|
11808
11527
|
/**
|
|
@@ -11854,185 +11573,63 @@ class AbstractPasteProcessingStrategy {
|
|
|
11854
11573
|
get supportsImageProcessing() {
|
|
11855
11574
|
return false;
|
|
11856
11575
|
}
|
|
11857
|
-
}
|
|
11858
|
-
|
|
11859
|
-
|
|
11860
|
-
icon: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--! Font Awesome Pro 6.3.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --><path fill="currentColor" d="M80 96v16c0 17.7 14.3 32 32 32h60.8c16.6-28.7 47.6-48 83.2-48h62c-7.1-27.6-32.2-48-62-48H215.4C211.6 20.9 188.2 0 160 0s-51.6 20.9-55.4 48H64C28.7 48 0 76.7 0 112V384c0 35.3 28.7 64 64 64h96V400H64c-8.8 0-16-7.2-16-16V112c0-8.8 7.2-16 16-16H80zm64-40a16 16 0 1 1 32 0 16 16 0 1 1 -32 0zM256 464c-8.8 0-16-7.2-16-16V192c0-8.8 7.2-16 16-16H384v48c0 17.7 14.3 32 32 32h48V448c0 8.8-7.2 16-16 16H256zm192 48c35.3 0 64-28.7 64-64V227.9c0-12.7-5.1-24.9-14.1-33.9l-51.9-51.9c-9-9-21.2-14.1-33.9-14.1H256c-35.3 0-64 28.7-64 64V448c0 35.3 28.7 64 64 64H448z"/></svg>`,
|
|
11861
|
-
};
|
|
11862
|
-
|
|
11863
|
-
/**
|
|
11864
|
-
* Renders and manages the paste format chooser UI.
|
|
11865
|
-
*/
|
|
11866
|
-
class RTEPasteChooserUI {
|
|
11867
|
-
constructor(hostRoot, callbacks, options = {}) {
|
|
11868
|
-
this.hostRoot = hostRoot;
|
|
11869
|
-
this.callbacks = callbacks;
|
|
11870
|
-
this.options = options;
|
|
11871
|
-
this.chooserEl = null;
|
|
11872
|
-
this.dropdownEl = null;
|
|
11873
|
-
this.triggerButtonEl = null;
|
|
11576
|
+
/** @returns {boolean} Whether this strategy consumes `text/plain` instead of `text/html` (default: false). */
|
|
11577
|
+
get consumesPlainText() {
|
|
11578
|
+
return false;
|
|
11874
11579
|
}
|
|
11875
11580
|
/**
|
|
11876
|
-
*
|
|
11581
|
+
* Owns the complete content policy for this paste mode. Subclasses that
|
|
11582
|
+
* only need a different source string should override {@link getSourceContent}
|
|
11583
|
+
* instead of re-implementing this method.
|
|
11877
11584
|
*
|
|
11878
|
-
* @param {
|
|
11585
|
+
* @param {PasteInput} input Complete clipboard payload.
|
|
11586
|
+
* @returns {PasteOutput} Complete downstream paste contract.
|
|
11879
11587
|
*/
|
|
11880
|
-
|
|
11881
|
-
this.
|
|
11882
|
-
|
|
11883
|
-
|
|
11884
|
-
|
|
11885
|
-
|
|
11886
|
-
|
|
11887
|
-
|
|
11888
|
-
|
|
11889
|
-
|
|
11890
|
-
dropdownEl.placement = position.placement;
|
|
11891
|
-
chooser.append(dropdownEl);
|
|
11892
|
-
this.hostRoot.appendChild(chooser);
|
|
11893
|
-
this.chooserEl = chooser;
|
|
11894
|
-
this.dropdownEl = dropdownEl;
|
|
11895
|
-
dropdownEl.addEventListener('vegaShow', () => {
|
|
11896
|
-
if (this.triggerButtonEl) {
|
|
11897
|
-
this.triggerButtonEl.selected = true;
|
|
11898
|
-
}
|
|
11899
|
-
});
|
|
11900
|
-
dropdownEl.addEventListener('vegaHide', () => {
|
|
11901
|
-
if (this.triggerButtonEl) {
|
|
11902
|
-
this.triggerButtonEl.selected = false;
|
|
11903
|
-
}
|
|
11904
|
-
});
|
|
11588
|
+
transform(input) {
|
|
11589
|
+
const content = this.getSourceContent(input);
|
|
11590
|
+
return {
|
|
11591
|
+
html: this.process(content),
|
|
11592
|
+
text: this.consumesPlainText ? content : input.text,
|
|
11593
|
+
mode: this.type,
|
|
11594
|
+
markers: {},
|
|
11595
|
+
extractImages: this.supportsImageProcessing,
|
|
11596
|
+
imagesToExtract: this.supportsImageProcessing ? input.files : [],
|
|
11597
|
+
};
|
|
11905
11598
|
}
|
|
11906
11599
|
/**
|
|
11907
|
-
*
|
|
11600
|
+
* Resolves the source string passed to {@link process}. Defaults to
|
|
11601
|
+
* `input.text` when {@link consumesPlainText} is true, otherwise `input.html`.
|
|
11602
|
+
*
|
|
11603
|
+
* @param {PasteInput} input Complete clipboard payload.
|
|
11604
|
+
* @returns {string} Content to feed into `process`.
|
|
11908
11605
|
*/
|
|
11909
|
-
|
|
11910
|
-
|
|
11911
|
-
if (this.dropdownEl && typeof this.dropdownEl.hide === 'function') {
|
|
11912
|
-
void this.dropdownEl.hide();
|
|
11913
|
-
}
|
|
11914
|
-
if ((_a = this.chooserEl) === null || _a === void 0 ? void 0 : _a.parentNode) {
|
|
11915
|
-
this.chooserEl.parentNode.removeChild(this.chooserEl);
|
|
11916
|
-
}
|
|
11917
|
-
if (this.triggerButtonEl) {
|
|
11918
|
-
this.triggerButtonEl.selected = false;
|
|
11919
|
-
}
|
|
11920
|
-
this.dropdownEl = null;
|
|
11921
|
-
this.chooserEl = null;
|
|
11922
|
-
this.triggerButtonEl = null;
|
|
11606
|
+
getSourceContent(input) {
|
|
11607
|
+
return this.consumesPlainText ? input.text : input.html;
|
|
11923
11608
|
}
|
|
11609
|
+
}
|
|
11610
|
+
|
|
11611
|
+
/**
|
|
11612
|
+
* Default paste processing strategy that acts as a fallback when no other
|
|
11613
|
+
* strategy matches. This strategy always accepts the content and passes it
|
|
11614
|
+
* through unchanged — the normal RTE paste pipeline (DOMParser +
|
|
11615
|
+
* ElementToDtoStrategyProcessor) handles the rest.
|
|
11616
|
+
*/
|
|
11617
|
+
class DefaultPasteProcessingStrategy extends AbstractPasteProcessingStrategy {
|
|
11924
11618
|
/**
|
|
11925
|
-
*
|
|
11619
|
+
* Always matches as the terminal fallback strategy.
|
|
11926
11620
|
*
|
|
11927
|
-
* @param {
|
|
11928
|
-
* @returns {boolean} `true
|
|
11621
|
+
* @param {string} html Raw clipboard HTML.
|
|
11622
|
+
* @returns {boolean} Always `true`.
|
|
11929
11623
|
*/
|
|
11930
|
-
|
|
11931
|
-
|
|
11932
|
-
|
|
11933
|
-
}
|
|
11934
|
-
const isDropdownContentClick = eventPath.some((target) => {
|
|
11935
|
-
return 'tagName' in target && target.tagName === 'VEGA-DROPDOWN-CONTENT-BOX';
|
|
11936
|
-
});
|
|
11937
|
-
return eventPath.includes(this.chooserEl) || isDropdownContentClick;
|
|
11624
|
+
canHandle(html) {
|
|
11625
|
+
// Default strategy is the fallback — always returns true.
|
|
11626
|
+
return html !== undefined;
|
|
11938
11627
|
}
|
|
11939
11628
|
/**
|
|
11940
|
-
*
|
|
11629
|
+
* Returns the original HTML unchanged.
|
|
11941
11630
|
*
|
|
11942
|
-
* @param {
|
|
11943
|
-
* @
|
|
11944
|
-
* @returns {HTMLElement} Configured dropdown element.
|
|
11945
|
-
*/
|
|
11946
|
-
createPasteChooserDropdown(doc, placement) {
|
|
11947
|
-
const dropdownEl = doc.createElement('vega-dropdown');
|
|
11948
|
-
dropdownEl.trigger = 'click';
|
|
11949
|
-
dropdownEl.selectType = 'single';
|
|
11950
|
-
dropdownEl.selectedSourceKey = 'rich';
|
|
11951
|
-
dropdownEl.maxWidth = 220;
|
|
11952
|
-
dropdownEl.alignment = 'start';
|
|
11953
|
-
dropdownEl.itemDisplayRule = 'ellipsis';
|
|
11954
|
-
dropdownEl.isScreenPosition = true;
|
|
11955
|
-
const triggerButton = doc.createElement('vega-rich-text-editor-toolbar-button');
|
|
11956
|
-
const arrowIcon = placement[0] === 'top' ? 'chevron-up' : 'chevron-down';
|
|
11957
|
-
triggerButton.setAttribute(RTEPasteChooserUI.CHOOSER_TRIGGER_ATTR, 'true');
|
|
11958
|
-
triggerButton.setAttribute('aria-label', VegaInternalTranslation.t('Paste options'));
|
|
11959
|
-
triggerButton.setAttribute('arrow-icon', arrowIcon);
|
|
11960
|
-
triggerButton.icon = 'rte-paste';
|
|
11961
|
-
triggerButton.showArrowIcon = true;
|
|
11962
|
-
triggerButton.selected = false;
|
|
11963
|
-
this.triggerButtonEl = triggerButton;
|
|
11964
|
-
const tooltipEl = doc.createElement('vega-tooltip');
|
|
11965
|
-
tooltipEl.text = VegaInternalTranslation.t('Paste options');
|
|
11966
|
-
tooltipEl.placement = ['bottom', 'top'];
|
|
11967
|
-
tooltipEl.append(triggerButton);
|
|
11968
|
-
dropdownEl.append(tooltipEl);
|
|
11969
|
-
const itemsContainer = doc.createElement('div');
|
|
11970
|
-
itemsContainer.setAttribute('slot', 'items');
|
|
11971
|
-
const dropdownItems = [
|
|
11972
|
-
this.createDropdownItem(doc, RTEPasteMode.RICH, VegaInternalTranslation.t('Use rich text'), RTEPasteChooserUI.CHOOSER_RICH_ATTR),
|
|
11973
|
-
];
|
|
11974
|
-
if (this.options.showWordOption) {
|
|
11975
|
-
dropdownItems.push(this.createDropdownItem(doc, RTEPasteMode.WORD, VegaInternalTranslation.t('Use Word'), RTEPasteChooserUI.CHOOSER_WORD_ATTR));
|
|
11976
|
-
}
|
|
11977
|
-
itemsContainer.append(...dropdownItems);
|
|
11978
|
-
dropdownEl.append(itemsContainer);
|
|
11979
|
-
dropdownEl.addEventListener('vegaDropdownClick', (event) => {
|
|
11980
|
-
const mode = event.detail;
|
|
11981
|
-
if (mode === RTEPasteMode.RICH || mode === RTEPasteMode.WORD) {
|
|
11982
|
-
this.callbacks.onModeSelect(mode);
|
|
11983
|
-
}
|
|
11984
|
-
});
|
|
11985
|
-
return dropdownEl;
|
|
11986
|
-
}
|
|
11987
|
-
/**
|
|
11988
|
-
* Creates a single dropdown item element for a paste mode.
|
|
11989
|
-
*
|
|
11990
|
-
* @param {Document} doc Document used to create the element.
|
|
11991
|
-
* @param {RTEPasteMode} key Paste mode key for the item.
|
|
11992
|
-
* @param {string} label Display label for the item.
|
|
11993
|
-
* @param {string} dataAttrName Data attribute marker for the item.
|
|
11994
|
-
* @returns {HTMLVegaDropdownItemElement} Configured dropdown item element.
|
|
11995
|
-
*/
|
|
11996
|
-
createDropdownItem(doc, key, label, dataAttrName) {
|
|
11997
|
-
const itemEl = doc.createElement('vega-dropdown-item');
|
|
11998
|
-
itemEl.itemKey = key;
|
|
11999
|
-
itemEl.label = label;
|
|
12000
|
-
itemEl.setAttribute(dataAttrName, 'true');
|
|
12001
|
-
return itemEl;
|
|
12002
|
-
}
|
|
12003
|
-
}
|
|
12004
|
-
(() => {
|
|
12005
|
-
VegaInternalIconManager.register({
|
|
12006
|
-
'rte-paste': paste,
|
|
12007
|
-
});
|
|
12008
|
-
})();
|
|
12009
|
-
RTEPasteChooserUI.CHOOSER_ATTR = 'data-rte-paste-chooser';
|
|
12010
|
-
RTEPasteChooserUI.CHOOSER_RICH_ATTR = 'data-rte-paste-type-rich';
|
|
12011
|
-
RTEPasteChooserUI.CHOOSER_WORD_ATTR = 'data-rte-paste-type-word';
|
|
12012
|
-
RTEPasteChooserUI.CHOOSER_TRIGGER_ATTR = 'data-rte-paste-trigger';
|
|
12013
|
-
|
|
12014
|
-
/**
|
|
12015
|
-
* Default paste processing strategy that acts as a fallback when no other
|
|
12016
|
-
* strategy matches. This strategy always accepts the content and passes it
|
|
12017
|
-
* through unchanged — the normal RTE paste pipeline (DOMParser +
|
|
12018
|
-
* ElementToDtoStrategyProcessor) handles the rest.
|
|
12019
|
-
*/
|
|
12020
|
-
class DefaultPasteProcessingStrategy extends AbstractPasteProcessingStrategy {
|
|
12021
|
-
/**
|
|
12022
|
-
* Always matches as the terminal fallback strategy.
|
|
12023
|
-
*
|
|
12024
|
-
* @param {string} html Raw clipboard HTML.
|
|
12025
|
-
* @returns {boolean} Always `true`.
|
|
12026
|
-
*/
|
|
12027
|
-
canHandle(html) {
|
|
12028
|
-
// Default strategy is the fallback — always returns true.
|
|
12029
|
-
return html !== undefined;
|
|
12030
|
-
}
|
|
12031
|
-
/**
|
|
12032
|
-
* Returns the original HTML unchanged.
|
|
12033
|
-
*
|
|
12034
|
-
* @param {string} html Raw clipboard HTML.
|
|
12035
|
-
* @returns {string} Unchanged HTML.
|
|
11631
|
+
* @param {string} html Raw clipboard HTML.
|
|
11632
|
+
* @returns {string} Unchanged HTML.
|
|
12036
11633
|
*/
|
|
12037
11634
|
process(html) {
|
|
12038
11635
|
// Current default behavior: pass through unchanged
|
|
@@ -14028,6 +13625,76 @@ WordPasteProcessingStrategy.WORD_SIGNATURE_PATTERNS = [
|
|
|
14028
13625
|
/<\/?o:p>/i,
|
|
14029
13626
|
];
|
|
14030
13627
|
|
|
13628
|
+
/** Converts plain-text clipboard to paragraph-per-line HTML. */
|
|
13629
|
+
class PlainPasteProcessingStrategy extends AbstractPasteProcessingStrategy {
|
|
13630
|
+
/** @returns {RTEPasteMode} Plain-text paste mode. */
|
|
13631
|
+
get type() {
|
|
13632
|
+
return RTEPasteMode.PLAIN;
|
|
13633
|
+
}
|
|
13634
|
+
/** @returns {boolean} Always `true`; consumes `text/plain` instead of `text/html`. */
|
|
13635
|
+
get consumesPlainText() {
|
|
13636
|
+
return true;
|
|
13637
|
+
}
|
|
13638
|
+
/** @returns {boolean} Always `false`; never auto-selected. */
|
|
13639
|
+
canHandle() {
|
|
13640
|
+
return false;
|
|
13641
|
+
}
|
|
13642
|
+
/**
|
|
13643
|
+
* Converts plain text to paragraph HTML; every `\n` starts a new paragraph.
|
|
13644
|
+
*
|
|
13645
|
+
* @param {string} text - Clipboard `text/plain` payload.
|
|
13646
|
+
* @param {boolean} decodeEncodedWhitespace - Decode markers emitted by HTML conversion.
|
|
13647
|
+
* @returns {string} Paragraph HTML.
|
|
13648
|
+
*/
|
|
13649
|
+
process(text, decodeEncodedWhitespace = false) {
|
|
13650
|
+
if (!text) {
|
|
13651
|
+
return '';
|
|
13652
|
+
}
|
|
13653
|
+
const safeDocument = tryGetDocument();
|
|
13654
|
+
if (!safeDocument) {
|
|
13655
|
+
return '';
|
|
13656
|
+
}
|
|
13657
|
+
// Line splitting and boundary whitespace handling live in `toPlainPasteLines` so the
|
|
13658
|
+
// emitted HTML and the RTE nodes built by `InsertPasteHandler` share one conversion.
|
|
13659
|
+
return plainPasteLinesToHtml(toPlainPasteLines(text, decodeEncodedWhitespace));
|
|
13660
|
+
}
|
|
13661
|
+
/**
|
|
13662
|
+
* @param {PasteInput} input Complete clipboard payload.
|
|
13663
|
+
* @returns {PasteOutput} Plain HTML, canonical text, and whitespace marker contract.
|
|
13664
|
+
*/
|
|
13665
|
+
transform(input) {
|
|
13666
|
+
const source = this.getPlainTextSource(input);
|
|
13667
|
+
return {
|
|
13668
|
+
html: this.process(source.text, source.hasEncodedWhitespace),
|
|
13669
|
+
text: source.text,
|
|
13670
|
+
mode: this.type,
|
|
13671
|
+
markers: source.hasEncodedWhitespace ? { [RTE_PRESERVED_WHITESPACE_DATA_TYPE]: 'true' } : {},
|
|
13672
|
+
extractImages: false,
|
|
13673
|
+
imagesToExtract: [],
|
|
13674
|
+
};
|
|
13675
|
+
}
|
|
13676
|
+
/**
|
|
13677
|
+
* @param {PasteInput} input Clipboard content used to derive canonical plain text.
|
|
13678
|
+
* @returns {PlainTextSource} Canonical text and whether it contains whitespace sentinels.
|
|
13679
|
+
*/
|
|
13680
|
+
getPlainTextSource(input) {
|
|
13681
|
+
if (!input.html) {
|
|
13682
|
+
return { text: input.text || '', hasEncodedWhitespace: false };
|
|
13683
|
+
}
|
|
13684
|
+
const containsTable = htmlContainsTable(input.html);
|
|
13685
|
+
if (input.text && input.text.includes('\t') && containsTable) {
|
|
13686
|
+
return { text: input.text, hasEncodedWhitespace: false };
|
|
13687
|
+
}
|
|
13688
|
+
const derived = htmlToPlainText(input.html, {
|
|
13689
|
+
preserveBoundaryBlankLines: !containsTable,
|
|
13690
|
+
keepPreservedWhitespaceMarkers: true,
|
|
13691
|
+
});
|
|
13692
|
+
return derived
|
|
13693
|
+
? { text: derived, hasEncodedWhitespace: true }
|
|
13694
|
+
: { text: input.text || '', hasEncodedWhitespace: false };
|
|
13695
|
+
}
|
|
13696
|
+
}
|
|
13697
|
+
|
|
14031
13698
|
/**
|
|
14032
13699
|
* Centralized selector for paste processing strategies.
|
|
14033
13700
|
*
|
|
@@ -14040,10 +13707,27 @@ class PasteStrategySelector {
|
|
|
14040
13707
|
constructor() {
|
|
14041
13708
|
this.defaultStrategy = new DefaultPasteProcessingStrategy();
|
|
14042
13709
|
this.strategies = [
|
|
13710
|
+
new PlainPasteProcessingStrategy(),
|
|
14043
13711
|
new WordPasteProcessingStrategy(),
|
|
14044
13712
|
this.defaultStrategy, // Fallback
|
|
14045
13713
|
];
|
|
14046
13714
|
}
|
|
13715
|
+
/**
|
|
13716
|
+
* Selects the strategy that will process this paste.
|
|
13717
|
+
*
|
|
13718
|
+
* When `explicitMode` is provided and not `rich`, the strategy registered for that mode
|
|
13719
|
+
* is used. Otherwise the highest-priority strategy whose `canHandle` matches the HTML
|
|
13720
|
+
* wins, falling back to the default pass-through strategy.
|
|
13721
|
+
*
|
|
13722
|
+
* @param {PasteInput} input Captured clipboard payload used for auto-detection.
|
|
13723
|
+
* @param {RTEPasteMode} [explicitMode] Paste mode the user picked from the chooser.
|
|
13724
|
+
* @returns {AbstractPasteProcessingStrategy} Strategy to run for this paste.
|
|
13725
|
+
*/
|
|
13726
|
+
select(input, explicitMode) {
|
|
13727
|
+
return explicitMode && explicitMode !== RTEPasteMode.RICH
|
|
13728
|
+
? this.selectStrategyByType(explicitMode)
|
|
13729
|
+
: this.selectStrategy(input.html);
|
|
13730
|
+
}
|
|
14047
13731
|
/**
|
|
14048
13732
|
* Select the appropriate strategy for the given HTML content.
|
|
14049
13733
|
* Returns the highest-priority strategy that can handle the content.
|
|
@@ -14511,24 +14195,591 @@ class PendingImageRegistry {
|
|
|
14511
14195
|
imageNode && imageNode.apply(new ImageReplaceSrcAction(imageElement, url));
|
|
14512
14196
|
}
|
|
14513
14197
|
}
|
|
14514
|
-
const pending = PendingImageRegistry.pendingImages.get(imageId);
|
|
14515
|
-
if (pending) {
|
|
14516
|
-
if (pending.objectUrl.startsWith('blob:')) {
|
|
14517
|
-
URL.revokeObjectURL(pending.objectUrl);
|
|
14518
|
-
}
|
|
14519
|
-
PendingImageRegistry.pendingImages.delete(imageId);
|
|
14520
|
-
this.ownedImageIds.delete(imageId);
|
|
14198
|
+
const pending = PendingImageRegistry.pendingImages.get(imageId);
|
|
14199
|
+
if (pending) {
|
|
14200
|
+
if (pending.objectUrl.startsWith('blob:')) {
|
|
14201
|
+
URL.revokeObjectURL(pending.objectUrl);
|
|
14202
|
+
}
|
|
14203
|
+
PendingImageRegistry.pendingImages.delete(imageId);
|
|
14204
|
+
this.ownedImageIds.delete(imageId);
|
|
14205
|
+
}
|
|
14206
|
+
}
|
|
14207
|
+
}
|
|
14208
|
+
/**
|
|
14209
|
+
* Pasted images awaiting upload, keyed by their {@link VegaRTEPasteImage.id}.
|
|
14210
|
+
*
|
|
14211
|
+
* Shared statically across instances so previews survive a paste-extension
|
|
14212
|
+
* re-instantiation: the consumer may resolve `replaceUrl` after the editor
|
|
14213
|
+
* has re-mounted and created a new extension/registry instance.
|
|
14214
|
+
*/
|
|
14215
|
+
PendingImageRegistry.pendingImages = new Map();
|
|
14216
|
+
|
|
14217
|
+
/** Computes paste chooser placement from the paste pointer or saved caret range. */
|
|
14218
|
+
class ChooserPositioner {
|
|
14219
|
+
constructor(getHostElement, getSelectionRange) {
|
|
14220
|
+
this.getHostElement = getHostElement;
|
|
14221
|
+
this.getSelectionRange = getSelectionRange;
|
|
14222
|
+
}
|
|
14223
|
+
/**
|
|
14224
|
+
* @param {ClipboardEvent} event Originating paste event.
|
|
14225
|
+
* @returns {ChooserPosition} Position in viewport coordinates.
|
|
14226
|
+
*/
|
|
14227
|
+
compute(event) {
|
|
14228
|
+
var _a, _b, _c;
|
|
14229
|
+
const hostEl = this.getHostElement();
|
|
14230
|
+
if (!hostEl) {
|
|
14231
|
+
return { left: 0, top: 0, placement: ['bottom', 'top'] };
|
|
14232
|
+
}
|
|
14233
|
+
const hostRect = hostEl.getBoundingClientRect();
|
|
14234
|
+
const viewportHeight = (_b = (_a = hostEl.ownerDocument.defaultView) === null || _a === void 0 ? void 0 : _a.innerHeight) !== null && _b !== void 0 ? _b : window.innerHeight;
|
|
14235
|
+
const pointerEvent = event;
|
|
14236
|
+
const hasPointer = typeof pointerEvent.clientX === 'number' &&
|
|
14237
|
+
pointerEvent.clientX > 0 &&
|
|
14238
|
+
typeof pointerEvent.clientY === 'number' &&
|
|
14239
|
+
pointerEvent.clientY > 0;
|
|
14240
|
+
const caretRect = hasPointer ? null : this.getCaretRect();
|
|
14241
|
+
const CHOOSER_GAP_PX = 8;
|
|
14242
|
+
const CHOOSER_MIN_MARGIN_PX = 12;
|
|
14243
|
+
const CHOOSER_WIDTH_PX = 220;
|
|
14244
|
+
const CHOOSER_FALLBACK_OFFSET_PX = 40;
|
|
14245
|
+
const CHOOSER_MIN_VISIBLE_BELOW_SPACE_PX = 88;
|
|
14246
|
+
const baseLeft = hasPointer
|
|
14247
|
+
? pointerEvent.clientX
|
|
14248
|
+
: (_c = caretRect === null || caretRect === void 0 ? void 0 : caretRect.left) !== null && _c !== void 0 ? _c : hostRect.left + CHOOSER_MIN_MARGIN_PX;
|
|
14249
|
+
const baseTop = hasPointer
|
|
14250
|
+
? pointerEvent.clientY
|
|
14251
|
+
: caretRect
|
|
14252
|
+
? caretRect.bottom
|
|
14253
|
+
: hostRect.top + CHOOSER_FALLBACK_OFFSET_PX;
|
|
14254
|
+
const maxLeft = Math.max(hostRect.left + CHOOSER_MIN_MARGIN_PX, hostRect.right - CHOOSER_WIDTH_PX);
|
|
14255
|
+
const left = Math.min(Math.max(baseLeft, hostRect.left + CHOOSER_MIN_MARGIN_PX), maxLeft);
|
|
14256
|
+
const top = Math.max(baseTop + CHOOSER_GAP_PX, hostRect.top + CHOOSER_MIN_MARGIN_PX);
|
|
14257
|
+
const availableBelow = viewportHeight - top - CHOOSER_MIN_MARGIN_PX;
|
|
14258
|
+
const availableAbove = top - CHOOSER_MIN_MARGIN_PX;
|
|
14259
|
+
const placement = availableBelow >= CHOOSER_MIN_VISIBLE_BELOW_SPACE_PX || availableBelow >= availableAbove
|
|
14260
|
+
? ['bottom', 'top']
|
|
14261
|
+
: ['top', 'bottom'];
|
|
14262
|
+
return { left, top, placement };
|
|
14263
|
+
}
|
|
14264
|
+
/** @returns {DOMRect | null} Best available caret rectangle. */
|
|
14265
|
+
getCaretRect() {
|
|
14266
|
+
const range = this.getSelectionRange();
|
|
14267
|
+
if (!range) {
|
|
14268
|
+
return null;
|
|
14269
|
+
}
|
|
14270
|
+
const rect = range.getBoundingClientRect();
|
|
14271
|
+
if (!this.isUnavailableRect(rect)) {
|
|
14272
|
+
return rect;
|
|
14273
|
+
}
|
|
14274
|
+
const domRectList = range.getClientRects();
|
|
14275
|
+
if (domRectList.length > 0) {
|
|
14276
|
+
return domRectList[0];
|
|
14277
|
+
}
|
|
14278
|
+
return this.getRangeContainerRect(range);
|
|
14279
|
+
}
|
|
14280
|
+
/**
|
|
14281
|
+
* @param {DOMRect} rect Rectangle to inspect.
|
|
14282
|
+
* @returns {boolean} Whether the rectangle has no usable position or dimensions.
|
|
14283
|
+
*/
|
|
14284
|
+
isUnavailableRect(rect) {
|
|
14285
|
+
return rect.width === 0 && rect.height === 0 && rect.left === 0 && rect.top === 0;
|
|
14286
|
+
}
|
|
14287
|
+
/**
|
|
14288
|
+
* @param {Range} range Selection range whose container should be measured.
|
|
14289
|
+
* @returns {DOMRect | null} Best available rectangle for the range container.
|
|
14290
|
+
*/
|
|
14291
|
+
getRangeContainerRect(range) {
|
|
14292
|
+
var _a, _b, _c, _d, _e, _f;
|
|
14293
|
+
const containerNode = (_a = range.startContainer) !== null && _a !== void 0 ? _a : null;
|
|
14294
|
+
if (!containerNode) {
|
|
14295
|
+
return null;
|
|
14296
|
+
}
|
|
14297
|
+
if (containerNode.nodeType === Node.ELEMENT_NODE) {
|
|
14298
|
+
const containerElement = containerNode;
|
|
14299
|
+
const previousNode = (_b = containerElement.childNodes[range.startOffset - 1]) !== null && _b !== void 0 ? _b : null;
|
|
14300
|
+
const currentNode = (_c = containerElement.childNodes[range.startOffset]) !== null && _c !== void 0 ? _c : null;
|
|
14301
|
+
return ((_e = (_d = this.getNodeRect(previousNode)) !== null && _d !== void 0 ? _d : this.getNodeRect(currentNode)) !== null && _e !== void 0 ? _e : this.getNodeRect(containerElement));
|
|
14302
|
+
}
|
|
14303
|
+
return (_f = this.getNodeRect(containerNode)) !== null && _f !== void 0 ? _f : this.getNodeRect(containerNode.parentNode);
|
|
14304
|
+
}
|
|
14305
|
+
/**
|
|
14306
|
+
* @param {Node | null} node DOM node to measure.
|
|
14307
|
+
* @returns {DOMRect | null} Element-backed rectangle for the node.
|
|
14308
|
+
*/
|
|
14309
|
+
getNodeRect(node) {
|
|
14310
|
+
var _a, _b;
|
|
14311
|
+
if (!node) {
|
|
14312
|
+
return null;
|
|
14313
|
+
}
|
|
14314
|
+
if (node.nodeType === Node.TEXT_NODE) {
|
|
14315
|
+
return (_b = (_a = node.parentElement) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect()) !== null && _b !== void 0 ? _b : null;
|
|
14316
|
+
}
|
|
14317
|
+
if (node.nodeType === Node.ELEMENT_NODE) {
|
|
14318
|
+
const rect = node.getBoundingClientRect();
|
|
14319
|
+
return this.isUnavailableRect(rect) ? null : rect;
|
|
14320
|
+
}
|
|
14321
|
+
return null;
|
|
14322
|
+
}
|
|
14323
|
+
}
|
|
14324
|
+
|
|
14325
|
+
/** Extracts local image previews from strategy output. */
|
|
14326
|
+
class ImageExtractor {
|
|
14327
|
+
constructor(parser = new PasteImageParser()) {
|
|
14328
|
+
this.parser = parser;
|
|
14329
|
+
}
|
|
14330
|
+
/**
|
|
14331
|
+
* @param {string} html HTML content containing local image references.
|
|
14332
|
+
* @param {File[]} files Clipboard image files.
|
|
14333
|
+
* @param {string} rtf Rich text clipboard content used to resolve images.
|
|
14334
|
+
* @returns {ParseLocalImagesResult} HTML and extracted local image previews.
|
|
14335
|
+
*/
|
|
14336
|
+
extract(html, files, rtf) {
|
|
14337
|
+
const clipboardFileContent = { files, rtf };
|
|
14338
|
+
return this.parser.parseLocalImages(html, clipboardFileContent);
|
|
14339
|
+
}
|
|
14340
|
+
}
|
|
14341
|
+
|
|
14342
|
+
/** Selects and executes one paste strategy, then performs declared post-processing. */
|
|
14343
|
+
class PasteProcessingPipeline {
|
|
14344
|
+
constructor(selector, imageExtractor, pendingImageRegistry) {
|
|
14345
|
+
this.selector = selector;
|
|
14346
|
+
this.imageExtractor = imageExtractor;
|
|
14347
|
+
this.pendingImageRegistry = pendingImageRegistry;
|
|
14348
|
+
}
|
|
14349
|
+
/**
|
|
14350
|
+
* @param {PendingPastePayload} payload Captured clipboard and selection data.
|
|
14351
|
+
* @param {RTEPasteMode} explicitMode Paste mode selected by the user.
|
|
14352
|
+
* @returns {PasteOutput} Processed paste output and image extraction metadata.
|
|
14353
|
+
*/
|
|
14354
|
+
process(payload, explicitMode) {
|
|
14355
|
+
const input = {
|
|
14356
|
+
html: payload.html,
|
|
14357
|
+
text: payload.text,
|
|
14358
|
+
files: payload.files,
|
|
14359
|
+
rtf: payload.rtf,
|
|
14360
|
+
};
|
|
14361
|
+
const output = this.selector.select(input, explicitMode).transform(input);
|
|
14362
|
+
if (!output.extractImages) {
|
|
14363
|
+
return output;
|
|
14364
|
+
}
|
|
14365
|
+
const extraction = this.imageExtractor.extract(output.html, output.imagesToExtract, input.rtf);
|
|
14366
|
+
if (extraction.previews.length > 0) {
|
|
14367
|
+
this.pendingImageRegistry.register(extraction.previews);
|
|
14368
|
+
}
|
|
14369
|
+
return Object.assign(Object.assign({}, output), { html: extraction.html });
|
|
14370
|
+
}
|
|
14371
|
+
}
|
|
14372
|
+
|
|
14373
|
+
/** Builds the DataTransfer contract consumed by InsertPasteHandler. */
|
|
14374
|
+
class PasteDataTransferBuilder {
|
|
14375
|
+
/**
|
|
14376
|
+
* @param {PasteOutput} output Processed paste output to serialize.
|
|
14377
|
+
* @returns {DataTransfer} Data transfer payload consumed by the paste handler.
|
|
14378
|
+
*/
|
|
14379
|
+
build(output) {
|
|
14380
|
+
// Reserved keys always win over `markers` so a strategy cannot clobber the base contract.
|
|
14381
|
+
const safeMarkers = Object.assign({}, output.markers);
|
|
14382
|
+
PasteDataTransferBuilder.RESERVED_KEYS.forEach((key) => delete safeMarkers[key]);
|
|
14383
|
+
const values = Object.assign(Object.assign({}, safeMarkers), { 'text/html': output.html, 'text/plain': output.text, [RTE_PASTE_MODE_DATA_TYPE]: output.mode });
|
|
14384
|
+
if (typeof DataTransfer !== 'undefined') {
|
|
14385
|
+
const dataTransfer = new DataTransfer();
|
|
14386
|
+
Object.keys(values).forEach((type) => {
|
|
14387
|
+
const value = values[type];
|
|
14388
|
+
if (value) {
|
|
14389
|
+
dataTransfer.setData(type, value);
|
|
14390
|
+
}
|
|
14391
|
+
});
|
|
14392
|
+
return dataTransfer;
|
|
14393
|
+
}
|
|
14394
|
+
return {
|
|
14395
|
+
/**
|
|
14396
|
+
* @param {string} type Clipboard data type to read.
|
|
14397
|
+
* @returns {string} Clipboard value for the requested type.
|
|
14398
|
+
*/
|
|
14399
|
+
getData: (type) => { var _a; return (_a = values[type]) !== null && _a !== void 0 ? _a : ''; },
|
|
14400
|
+
};
|
|
14401
|
+
}
|
|
14402
|
+
}
|
|
14403
|
+
PasteDataTransferBuilder.RESERVED_KEYS = [
|
|
14404
|
+
'text/html',
|
|
14405
|
+
'text/plain',
|
|
14406
|
+
RTE_PASTE_MODE_DATA_TYPE,
|
|
14407
|
+
];
|
|
14408
|
+
|
|
14409
|
+
/** Dispatches processed paste data through the editor's existing beforeinput pipeline. */
|
|
14410
|
+
class PasteDispatcher {
|
|
14411
|
+
/**
|
|
14412
|
+
* @param {HTMLDivElement} editableEl Editable content element receiving the event.
|
|
14413
|
+
* @param {DataTransfer} dataTransfer Processed clipboard payload.
|
|
14414
|
+
*/
|
|
14415
|
+
dispatch(editableEl, dataTransfer) {
|
|
14416
|
+
const beforeInputEvent = new CustomEvent('beforeinput', {
|
|
14417
|
+
bubbles: true,
|
|
14418
|
+
cancelable: true,
|
|
14419
|
+
});
|
|
14420
|
+
try {
|
|
14421
|
+
Object.defineProperties(beforeInputEvent, {
|
|
14422
|
+
inputType: { value: 'insertFromPaste', configurable: true },
|
|
14423
|
+
dataTransfer: { value: dataTransfer, configurable: true },
|
|
14424
|
+
});
|
|
14425
|
+
}
|
|
14426
|
+
catch (_a) {
|
|
14427
|
+
Object.assign(beforeInputEvent, { inputType: 'insertFromPaste', dataTransfer });
|
|
14428
|
+
}
|
|
14429
|
+
editableEl.dispatchEvent(beforeInputEvent);
|
|
14430
|
+
}
|
|
14431
|
+
}
|
|
14432
|
+
|
|
14433
|
+
/** Captures and restores native and editor selection state around chooser interaction. */
|
|
14434
|
+
class SelectionSnapshotService {
|
|
14435
|
+
constructor(getContext) {
|
|
14436
|
+
this.getContext = getContext;
|
|
14437
|
+
}
|
|
14438
|
+
/**
|
|
14439
|
+
* @returns {SelectionSnapshot} Captured native and editor selection state.
|
|
14440
|
+
*/
|
|
14441
|
+
capture() {
|
|
14442
|
+
var _a;
|
|
14443
|
+
const context = this.getContext();
|
|
14444
|
+
const selection = context === null || context === void 0 ? void 0 : context.getSelection();
|
|
14445
|
+
const range = selection && selection.rangeCount > 0 ? selection.getRangeAt(0).cloneRange() : null;
|
|
14446
|
+
const selectedNodes = ((_a = context === null || context === void 0 ? void 0 : context.getSelectedNodes) === null || _a === void 0 ? void 0 : _a.call(context)) || [];
|
|
14447
|
+
return { range, selectedNodes: [...selectedNodes] };
|
|
14448
|
+
}
|
|
14449
|
+
/**
|
|
14450
|
+
* @param {PendingPastePayload} payload Paste payload containing captured selection state.
|
|
14451
|
+
*/
|
|
14452
|
+
restore(payload) {
|
|
14453
|
+
this.restoreRange(payload.range);
|
|
14454
|
+
this.restoreControllerState(payload);
|
|
14455
|
+
}
|
|
14456
|
+
/**
|
|
14457
|
+
* @param {PendingPastePayload} payload Paste payload containing editor selection state.
|
|
14458
|
+
*/
|
|
14459
|
+
restoreControllerState(payload) {
|
|
14460
|
+
const context = this.getContext();
|
|
14461
|
+
if (!payload.range || !context) {
|
|
14462
|
+
return;
|
|
14463
|
+
}
|
|
14464
|
+
const rangeOptions = {
|
|
14465
|
+
startNode: payload.range.startContainer,
|
|
14466
|
+
endNode: payload.range.endContainer,
|
|
14467
|
+
startOffset: payload.range.startOffset,
|
|
14468
|
+
endOffset: payload.range.endOffset,
|
|
14469
|
+
};
|
|
14470
|
+
context.setSelectedNodes(payload.selectedNodes || [], rangeOptions);
|
|
14471
|
+
}
|
|
14472
|
+
/**
|
|
14473
|
+
* @param {Range | null} range Native selection range to restore.
|
|
14474
|
+
*/
|
|
14475
|
+
restoreRange(range) {
|
|
14476
|
+
var _a;
|
|
14477
|
+
if (!range) {
|
|
14478
|
+
return;
|
|
14479
|
+
}
|
|
14480
|
+
const selection = (_a = this.getContext()) === null || _a === void 0 ? void 0 : _a.getSelection();
|
|
14481
|
+
if (selection) {
|
|
14482
|
+
selection.removeAllRanges();
|
|
14483
|
+
selection.addRange(range);
|
|
14484
|
+
}
|
|
14485
|
+
}
|
|
14486
|
+
}
|
|
14487
|
+
|
|
14488
|
+
/** Owns the native paste listener and synchronous clipboard payload capture. */
|
|
14489
|
+
class PasteEventInterceptor {
|
|
14490
|
+
constructor(selectionSnapshotService, onPasteCaptured) {
|
|
14491
|
+
this.selectionSnapshotService = selectionSnapshotService;
|
|
14492
|
+
this.onPasteCaptured = onPasteCaptured;
|
|
14493
|
+
this.editableEl = null;
|
|
14494
|
+
/**
|
|
14495
|
+
* @param {ClipboardEvent} event Native paste event to capture.
|
|
14496
|
+
*/
|
|
14497
|
+
this.handlePasteEvent = (event) => {
|
|
14498
|
+
const clipboardData = event.clipboardData;
|
|
14499
|
+
if (!clipboardData) {
|
|
14500
|
+
return;
|
|
14501
|
+
}
|
|
14502
|
+
const html = clipboardData.getData('text/html') || '';
|
|
14503
|
+
const text = clipboardData.getData('text/plain') || '';
|
|
14504
|
+
const rtf = clipboardData.getData('text/rtf') || '';
|
|
14505
|
+
if (!html && !text) {
|
|
14506
|
+
event.preventDefault();
|
|
14507
|
+
event.stopPropagation();
|
|
14508
|
+
return;
|
|
14509
|
+
}
|
|
14510
|
+
event.preventDefault();
|
|
14511
|
+
event.stopPropagation();
|
|
14512
|
+
const snapshot = this.selectionSnapshotService.capture();
|
|
14513
|
+
const files = clipboardData.files ? Array.from(clipboardData.files) : [];
|
|
14514
|
+
this.onPasteCaptured({ html, text, range: snapshot.range, selectedNodes: snapshot.selectedNodes, files, rtf }, event);
|
|
14515
|
+
};
|
|
14516
|
+
}
|
|
14517
|
+
/**
|
|
14518
|
+
* @param {HTMLDivElement | null} editableEl Editable content element to observe.
|
|
14519
|
+
*/
|
|
14520
|
+
attach(editableEl) {
|
|
14521
|
+
var _a;
|
|
14522
|
+
this.detach();
|
|
14523
|
+
this.editableEl = editableEl;
|
|
14524
|
+
(_a = this.editableEl) === null || _a === void 0 ? void 0 : _a.addEventListener('paste', this.handlePasteEvent);
|
|
14525
|
+
}
|
|
14526
|
+
/**
|
|
14527
|
+
* Detaches the current native paste listener.
|
|
14528
|
+
*/
|
|
14529
|
+
detach() {
|
|
14530
|
+
var _a;
|
|
14531
|
+
(_a = this.editableEl) === null || _a === void 0 ? void 0 : _a.removeEventListener('paste', this.handlePasteEvent);
|
|
14532
|
+
this.editableEl = null;
|
|
14533
|
+
}
|
|
14534
|
+
}
|
|
14535
|
+
|
|
14536
|
+
const paste = {
|
|
14537
|
+
icon: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--! Font Awesome Pro 6.3.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --><path fill="currentColor" d="M80 96v16c0 17.7 14.3 32 32 32h60.8c16.6-28.7 47.6-48 83.2-48h62c-7.1-27.6-32.2-48-62-48H215.4C211.6 20.9 188.2 0 160 0s-51.6 20.9-55.4 48H64C28.7 48 0 76.7 0 112V384c0 35.3 28.7 64 64 64h96V400H64c-8.8 0-16-7.2-16-16V112c0-8.8 7.2-16 16-16H80zm64-40a16 16 0 1 1 32 0 16 16 0 1 1 -32 0zM256 464c-8.8 0-16-7.2-16-16V192c0-8.8 7.2-16 16-16H384v48c0 17.7 14.3 32 32 32h48V448c0 8.8-7.2 16-16 16H256zm192 48c35.3 0 64-28.7 64-64V227.9c0-12.7-5.1-24.9-14.1-33.9l-51.9-51.9c-9-9-21.2-14.1-33.9-14.1H256c-35.3 0-64 28.7-64 64V448c0 35.3 28.7 64 64 64H448z"/></svg>`,
|
|
14538
|
+
};
|
|
14539
|
+
|
|
14540
|
+
/**
|
|
14541
|
+
* Renders and manages the paste format chooser UI.
|
|
14542
|
+
*/
|
|
14543
|
+
class RTEPasteChooserUI {
|
|
14544
|
+
constructor(hostRoot, callbacks, options = {}) {
|
|
14545
|
+
this.hostRoot = hostRoot;
|
|
14546
|
+
this.callbacks = callbacks;
|
|
14547
|
+
this.options = options;
|
|
14548
|
+
this.chooserEl = null;
|
|
14549
|
+
this.dropdownEl = null;
|
|
14550
|
+
this.triggerButtonEl = null;
|
|
14551
|
+
}
|
|
14552
|
+
/**
|
|
14553
|
+
* Opens the paste-mode chooser at the given position.
|
|
14554
|
+
*
|
|
14555
|
+
* @param {PasteChooserPosition} position Viewport position for the chooser.
|
|
14556
|
+
*/
|
|
14557
|
+
open(position) {
|
|
14558
|
+
this.destroy();
|
|
14559
|
+
const doc = this.hostRoot.ownerDocument;
|
|
14560
|
+
const chooser = doc.createElement('div');
|
|
14561
|
+
chooser.setAttribute(RTEPasteChooserUI.CHOOSER_ATTR, 'true');
|
|
14562
|
+
chooser.style.position = 'fixed';
|
|
14563
|
+
chooser.style.zIndex = '1000';
|
|
14564
|
+
chooser.style.left = `${position.left}px`;
|
|
14565
|
+
chooser.style.top = `${position.top}px`;
|
|
14566
|
+
const dropdownEl = this.createPasteChooserDropdown(doc, position.placement);
|
|
14567
|
+
dropdownEl.placement = position.placement;
|
|
14568
|
+
chooser.append(dropdownEl);
|
|
14569
|
+
this.hostRoot.appendChild(chooser);
|
|
14570
|
+
this.chooserEl = chooser;
|
|
14571
|
+
this.dropdownEl = dropdownEl;
|
|
14572
|
+
dropdownEl.addEventListener('vegaShow', () => {
|
|
14573
|
+
if (this.triggerButtonEl) {
|
|
14574
|
+
this.triggerButtonEl.selected = true;
|
|
14575
|
+
}
|
|
14576
|
+
});
|
|
14577
|
+
dropdownEl.addEventListener('vegaHide', () => {
|
|
14578
|
+
if (this.triggerButtonEl) {
|
|
14579
|
+
this.triggerButtonEl.selected = false;
|
|
14580
|
+
}
|
|
14581
|
+
});
|
|
14582
|
+
}
|
|
14583
|
+
/**
|
|
14584
|
+
* Removes the chooser from the DOM.
|
|
14585
|
+
*/
|
|
14586
|
+
destroy() {
|
|
14587
|
+
var _a;
|
|
14588
|
+
if (this.dropdownEl && typeof this.dropdownEl.hide === 'function') {
|
|
14589
|
+
void this.dropdownEl.hide();
|
|
14590
|
+
}
|
|
14591
|
+
if ((_a = this.chooserEl) === null || _a === void 0 ? void 0 : _a.parentNode) {
|
|
14592
|
+
this.chooserEl.parentNode.removeChild(this.chooserEl);
|
|
14593
|
+
}
|
|
14594
|
+
if (this.triggerButtonEl) {
|
|
14595
|
+
this.triggerButtonEl.selected = false;
|
|
14596
|
+
}
|
|
14597
|
+
this.dropdownEl = null;
|
|
14598
|
+
this.chooserEl = null;
|
|
14599
|
+
this.triggerButtonEl = null;
|
|
14600
|
+
}
|
|
14601
|
+
/**
|
|
14602
|
+
* Determines whether the given event path targets the chooser.
|
|
14603
|
+
*
|
|
14604
|
+
* @param {EventTarget[]} eventPath Composed path of an event.
|
|
14605
|
+
* @returns {boolean} `true` when the path includes the chooser.
|
|
14606
|
+
*/
|
|
14607
|
+
includesEventPath(eventPath) {
|
|
14608
|
+
if (!this.chooserEl) {
|
|
14609
|
+
return false;
|
|
14610
|
+
}
|
|
14611
|
+
const isDropdownContentClick = eventPath.some((target) => {
|
|
14612
|
+
return 'tagName' in target && target.tagName === 'VEGA-DROPDOWN-CONTENT-BOX';
|
|
14613
|
+
});
|
|
14614
|
+
return eventPath.includes(this.chooserEl) || isDropdownContentClick;
|
|
14615
|
+
}
|
|
14616
|
+
/**
|
|
14617
|
+
* Builds the dropdown element with the rich text paste option.
|
|
14618
|
+
*
|
|
14619
|
+
* @param {Document} doc Document used to create elements.
|
|
14620
|
+
* @param {['bottom', 'top'] | ['top', 'bottom']} placement Preferred placement order.
|
|
14621
|
+
* @returns {HTMLElement} Configured dropdown element.
|
|
14622
|
+
*/
|
|
14623
|
+
createPasteChooserDropdown(doc, placement) {
|
|
14624
|
+
const dropdownEl = doc.createElement('vega-dropdown');
|
|
14625
|
+
dropdownEl.trigger = 'click';
|
|
14626
|
+
dropdownEl.selectType = 'single';
|
|
14627
|
+
dropdownEl.selectedSourceKey = 'rich';
|
|
14628
|
+
dropdownEl.maxWidth = 220;
|
|
14629
|
+
dropdownEl.alignment = 'start';
|
|
14630
|
+
dropdownEl.itemDisplayRule = 'ellipsis';
|
|
14631
|
+
dropdownEl.isScreenPosition = true;
|
|
14632
|
+
const triggerButton = doc.createElement('vega-rich-text-editor-toolbar-button');
|
|
14633
|
+
const arrowIcon = placement[0] === 'top' ? 'chevron-up' : 'chevron-down';
|
|
14634
|
+
triggerButton.setAttribute(RTEPasteChooserUI.CHOOSER_TRIGGER_ATTR, 'true');
|
|
14635
|
+
triggerButton.setAttribute('aria-label', VegaInternalTranslation.t('Paste options'));
|
|
14636
|
+
triggerButton.setAttribute('arrow-icon', arrowIcon);
|
|
14637
|
+
triggerButton.icon = 'rte-paste';
|
|
14638
|
+
triggerButton.showArrowIcon = true;
|
|
14639
|
+
triggerButton.selected = false;
|
|
14640
|
+
this.triggerButtonEl = triggerButton;
|
|
14641
|
+
const tooltipEl = doc.createElement('vega-tooltip');
|
|
14642
|
+
tooltipEl.text = VegaInternalTranslation.t('Paste options');
|
|
14643
|
+
tooltipEl.placement = ['bottom', 'top'];
|
|
14644
|
+
tooltipEl.append(triggerButton);
|
|
14645
|
+
dropdownEl.append(tooltipEl);
|
|
14646
|
+
const itemsContainer = doc.createElement('div');
|
|
14647
|
+
itemsContainer.setAttribute('slot', 'items');
|
|
14648
|
+
const dropdownItems = [
|
|
14649
|
+
this.createDropdownItem(doc, RTEPasteMode.RICH, VegaInternalTranslation.t('Use rich text'), RTEPasteChooserUI.CHOOSER_RICH_ATTR),
|
|
14650
|
+
this.createDropdownItem(doc, RTEPasteMode.PLAIN, VegaInternalTranslation.t('Use plain text'), RTEPasteChooserUI.CHOOSER_PLAIN_ATTR),
|
|
14651
|
+
];
|
|
14652
|
+
if (this.options.showWordOption) {
|
|
14653
|
+
dropdownItems.push(this.createDropdownItem(doc, RTEPasteMode.WORD, VegaInternalTranslation.t('Use Word'), RTEPasteChooserUI.CHOOSER_WORD_ATTR));
|
|
14654
|
+
}
|
|
14655
|
+
itemsContainer.append(...dropdownItems);
|
|
14656
|
+
dropdownEl.append(itemsContainer);
|
|
14657
|
+
dropdownEl.addEventListener('vegaDropdownClick', (event) => {
|
|
14658
|
+
const mode = event.detail;
|
|
14659
|
+
if (mode === RTEPasteMode.RICH || mode === RTEPasteMode.PLAIN || mode === RTEPasteMode.WORD) {
|
|
14660
|
+
this.callbacks.onModeSelect(mode);
|
|
14661
|
+
}
|
|
14662
|
+
});
|
|
14663
|
+
return dropdownEl;
|
|
14664
|
+
}
|
|
14665
|
+
/**
|
|
14666
|
+
* Creates a single dropdown item element for a paste mode.
|
|
14667
|
+
*
|
|
14668
|
+
* @param {Document} doc Document used to create the element.
|
|
14669
|
+
* @param {RTEPasteMode} key Paste mode key for the item.
|
|
14670
|
+
* @param {string} label Display label for the item.
|
|
14671
|
+
* @param {string} dataAttrName Data attribute marker for the item.
|
|
14672
|
+
* @returns {HTMLVegaDropdownItemElement} Configured dropdown item element.
|
|
14673
|
+
*/
|
|
14674
|
+
createDropdownItem(doc, key, label, dataAttrName) {
|
|
14675
|
+
const itemEl = doc.createElement('vega-dropdown-item');
|
|
14676
|
+
itemEl.itemKey = key;
|
|
14677
|
+
itemEl.label = label;
|
|
14678
|
+
itemEl.setAttribute(dataAttrName, 'true');
|
|
14679
|
+
return itemEl;
|
|
14680
|
+
}
|
|
14681
|
+
}
|
|
14682
|
+
(() => {
|
|
14683
|
+
VegaInternalIconManager.register({
|
|
14684
|
+
'rte-paste': paste,
|
|
14685
|
+
});
|
|
14686
|
+
})();
|
|
14687
|
+
RTEPasteChooserUI.CHOOSER_ATTR = 'data-rte-paste-chooser';
|
|
14688
|
+
RTEPasteChooserUI.CHOOSER_RICH_ATTR = 'data-rte-paste-type-rich';
|
|
14689
|
+
RTEPasteChooserUI.CHOOSER_PLAIN_ATTR = 'data-rte-paste-type-plain';
|
|
14690
|
+
RTEPasteChooserUI.CHOOSER_WORD_ATTR = 'data-rte-paste-type-word';
|
|
14691
|
+
RTEPasteChooserUI.CHOOSER_TRIGGER_ATTR = 'data-rte-paste-trigger';
|
|
14692
|
+
|
|
14693
|
+
/** Owns chooser rendering and all listener bookkeeping used to dismiss it. */
|
|
14694
|
+
class PasteChooserController {
|
|
14695
|
+
constructor(positioner, onModeSelect, onClearPayload) {
|
|
14696
|
+
this.positioner = positioner;
|
|
14697
|
+
this.onModeSelect = onModeSelect;
|
|
14698
|
+
this.onClearPayload = onClearPayload;
|
|
14699
|
+
this.chooserUI = null;
|
|
14700
|
+
this.listenerDocument = null;
|
|
14701
|
+
this.listenerWindow = null;
|
|
14702
|
+
this.contentHostEl = null;
|
|
14703
|
+
/**
|
|
14704
|
+
* @param {Event} event Pointer event captured on the document.
|
|
14705
|
+
*/
|
|
14706
|
+
this.handleOutsidePointerDown = (event) => {
|
|
14707
|
+
if (!this.chooserUI) {
|
|
14708
|
+
return;
|
|
14709
|
+
}
|
|
14710
|
+
const eventPath = typeof event.composedPath === 'function' ? event.composedPath() : [];
|
|
14711
|
+
if (!this.chooserUI.includesEventPath(eventPath)) {
|
|
14712
|
+
this.clear();
|
|
14713
|
+
}
|
|
14714
|
+
};
|
|
14715
|
+
/**
|
|
14716
|
+
* @param {KeyboardEvent} event Keyboard event captured on the document.
|
|
14717
|
+
*/
|
|
14718
|
+
this.handleOutsideKeyDown = (event) => {
|
|
14719
|
+
if (event.key === 'Escape') {
|
|
14720
|
+
this.clear();
|
|
14721
|
+
}
|
|
14722
|
+
};
|
|
14723
|
+
/**
|
|
14724
|
+
* Clears the chooser when a relevant scroll container scrolls.
|
|
14725
|
+
*
|
|
14726
|
+
* @returns {void}
|
|
14727
|
+
*/
|
|
14728
|
+
this.handleOutsideScroll = () => this.clear();
|
|
14729
|
+
}
|
|
14730
|
+
/**
|
|
14731
|
+
* @returns {RTEPasteChooserUI | null} Current chooser UI, or `null` when closed.
|
|
14732
|
+
*/
|
|
14733
|
+
get ui() {
|
|
14734
|
+
return this.chooserUI;
|
|
14735
|
+
}
|
|
14736
|
+
/**
|
|
14737
|
+
* @param {HTMLElement | null} hostEl Rich text editor host element.
|
|
14738
|
+
* @param {HTMLElement | null} contentHostEl Scrollable content host element.
|
|
14739
|
+
* @param {ClipboardEvent} pasteEvent Originating paste event used for positioning.
|
|
14740
|
+
* @param {boolean} showWordOption Whether to display the Word paste option.
|
|
14741
|
+
*/
|
|
14742
|
+
open(hostEl, contentHostEl, pasteEvent, showWordOption) {
|
|
14743
|
+
var _a, _b, _c;
|
|
14744
|
+
const hostRoot = (_a = hostEl === null || hostEl === void 0 ? void 0 : hostEl.shadowRoot) !== null && _a !== void 0 ? _a : null;
|
|
14745
|
+
if (!hostRoot || !hostEl) {
|
|
14746
|
+
return;
|
|
14747
|
+
}
|
|
14748
|
+
this.clear(false);
|
|
14749
|
+
const position = this.positioner.compute(pasteEvent);
|
|
14750
|
+
this.chooserUI = new RTEPasteChooserUI(hostRoot, { onModeSelect: this.onModeSelect }, { showWordOption });
|
|
14751
|
+
this.chooserUI.open(position);
|
|
14752
|
+
this.contentHostEl = contentHostEl;
|
|
14753
|
+
this.listenerDocument = hostEl.ownerDocument;
|
|
14754
|
+
this.listenerWindow = this.listenerDocument.defaultView;
|
|
14755
|
+
this.listenerDocument.addEventListener('mousedown', this.handleOutsidePointerDown, true);
|
|
14756
|
+
this.listenerDocument.addEventListener('keydown', this.handleOutsideKeyDown, true);
|
|
14757
|
+
this.listenerDocument.addEventListener('scroll', this.handleOutsideScroll, true);
|
|
14758
|
+
(_b = this.listenerWindow) === null || _b === void 0 ? void 0 : _b.addEventListener('scroll', this.handleOutsideScroll, true);
|
|
14759
|
+
(_c = this.contentHostEl) === null || _c === void 0 ? void 0 : _c.addEventListener('scroll', this.handleOutsideScroll);
|
|
14760
|
+
}
|
|
14761
|
+
/**
|
|
14762
|
+
* @param {boolean} [clearPayload] Whether to also clear the pending paste payload.
|
|
14763
|
+
*/
|
|
14764
|
+
clear(clearPayload = true) {
|
|
14765
|
+
var _a, _b, _c;
|
|
14766
|
+
(_a = this.contentHostEl) === null || _a === void 0 ? void 0 : _a.removeEventListener('scroll', this.handleOutsideScroll);
|
|
14767
|
+
this.contentHostEl = null;
|
|
14768
|
+
(_b = this.listenerWindow) === null || _b === void 0 ? void 0 : _b.removeEventListener('scroll', this.handleOutsideScroll, true);
|
|
14769
|
+
this.listenerWindow = null;
|
|
14770
|
+
if (this.listenerDocument) {
|
|
14771
|
+
this.listenerDocument.removeEventListener('mousedown', this.handleOutsidePointerDown, true);
|
|
14772
|
+
this.listenerDocument.removeEventListener('keydown', this.handleOutsideKeyDown, true);
|
|
14773
|
+
this.listenerDocument.removeEventListener('scroll', this.handleOutsideScroll, true);
|
|
14774
|
+
this.listenerDocument = null;
|
|
14775
|
+
}
|
|
14776
|
+
(_c = this.chooserUI) === null || _c === void 0 ? void 0 : _c.destroy();
|
|
14777
|
+
this.chooserUI = null;
|
|
14778
|
+
if (clearPayload) {
|
|
14779
|
+
this.onClearPayload();
|
|
14521
14780
|
}
|
|
14522
14781
|
}
|
|
14523
14782
|
}
|
|
14524
|
-
/**
|
|
14525
|
-
* Pasted images awaiting upload, keyed by their {@link VegaRTEPasteImage.id}.
|
|
14526
|
-
*
|
|
14527
|
-
* Shared statically across instances so previews survive a paste-extension
|
|
14528
|
-
* re-instantiation: the consumer may resolve `replaceUrl` after the editor
|
|
14529
|
-
* has re-mounted and created a new extension/registry instance.
|
|
14530
|
-
*/
|
|
14531
|
-
PendingImageRegistry.pendingImages = new Map();
|
|
14532
14783
|
|
|
14533
14784
|
/**
|
|
14534
14785
|
* Vega Rich Text Editor paste extension.
|
|
@@ -14539,16 +14790,7 @@ class VegaRTEPasteExtension extends VegaRTEExtension {
|
|
|
14539
14790
|
super();
|
|
14540
14791
|
this.editableEl = null;
|
|
14541
14792
|
this.contentHostEl = null;
|
|
14542
|
-
this.chooserUI = null;
|
|
14543
14793
|
this.pendingPastePayload = null;
|
|
14544
|
-
this.listenerDocument = null;
|
|
14545
|
-
this.listenerWindow = null;
|
|
14546
|
-
this.options = {};
|
|
14547
|
-
this.strategySelector = new PasteStrategySelector();
|
|
14548
|
-
this.clipboardFileContent = null;
|
|
14549
|
-
this.imageParser = new PasteImageParser();
|
|
14550
|
-
/** Owns pending pasted-image previews awaiting upload and their URL replacement. */
|
|
14551
|
-
this.pendingImageRegistry = new PendingImageRegistry();
|
|
14552
14794
|
/**
|
|
14553
14795
|
* Handles a native paste event by capturing the clipboard payload and
|
|
14554
14796
|
* rendering the paste-mode chooser.
|
|
@@ -14556,33 +14798,7 @@ class VegaRTEPasteExtension extends VegaRTEExtension {
|
|
|
14556
14798
|
* @param {ClipboardEvent} event Native clipboard paste event.
|
|
14557
14799
|
*/
|
|
14558
14800
|
this.handlePasteEvent = (event) => {
|
|
14559
|
-
|
|
14560
|
-
const clipboardData = event.clipboardData;
|
|
14561
|
-
if (!clipboardData) {
|
|
14562
|
-
return;
|
|
14563
|
-
}
|
|
14564
|
-
// HTML is sanitized via DOMParser and ElementToDtoStrategyProcessor pipeline
|
|
14565
|
-
const html = clipboardData.getData('text/html') || '';
|
|
14566
|
-
const text = clipboardData.getData('text/plain') || '';
|
|
14567
|
-
// RTF must be read synchronously here: the paste event's DataTransfer is only
|
|
14568
|
-
// readable during event dispatch, so reading it later (after the chooser) returns ''.
|
|
14569
|
-
const rtf = clipboardData.getData('text/rtf') || '';
|
|
14570
|
-
if (!html && !text) {
|
|
14571
|
-
// Empty clipboard paste should not mutate editor content.
|
|
14572
|
-
event.preventDefault();
|
|
14573
|
-
event.stopPropagation();
|
|
14574
|
-
return;
|
|
14575
|
-
}
|
|
14576
|
-
event.preventDefault();
|
|
14577
|
-
event.stopPropagation();
|
|
14578
|
-
const range = this.cloneCurrentSelectionRange();
|
|
14579
|
-
const selectedNodes = ((_b = (_a = this.extensionContext) === null || _a === void 0 ? void 0 : _a.getSelectedNodes) === null || _b === void 0 ? void 0 : _b.call(_a)) || [];
|
|
14580
|
-
this.pendingPastePayload = { html, text, range, selectedNodes: [...selectedNodes] };
|
|
14581
|
-
this.clipboardFileContent = {
|
|
14582
|
-
files: clipboardData.files ? Array.from(clipboardData.files) : [],
|
|
14583
|
-
rtf,
|
|
14584
|
-
};
|
|
14585
|
-
this.renderPasteChooser(event);
|
|
14801
|
+
this.pasteEventInterceptor.handlePasteEvent(event);
|
|
14586
14802
|
};
|
|
14587
14803
|
/**
|
|
14588
14804
|
* Dismisses the chooser when a pointer interaction occurs outside of it.
|
|
@@ -14590,14 +14806,7 @@ class VegaRTEPasteExtension extends VegaRTEExtension {
|
|
|
14590
14806
|
* @param {Event} event Pointer event captured on the document.
|
|
14591
14807
|
*/
|
|
14592
14808
|
this.handleOutsidePointerDown = (event) => {
|
|
14593
|
-
|
|
14594
|
-
return;
|
|
14595
|
-
}
|
|
14596
|
-
const eventPath = typeof event.composedPath === 'function' ? event.composedPath() : [];
|
|
14597
|
-
if (this.chooserUI.includesEventPath(eventPath)) {
|
|
14598
|
-
return;
|
|
14599
|
-
}
|
|
14600
|
-
this.clearPasteChooser();
|
|
14809
|
+
this.pasteChooserController.handleOutsidePointerDown(event);
|
|
14601
14810
|
};
|
|
14602
14811
|
/**
|
|
14603
14812
|
* Dismisses the chooser when the Escape key is pressed.
|
|
@@ -14605,17 +14814,30 @@ class VegaRTEPasteExtension extends VegaRTEExtension {
|
|
|
14605
14814
|
* @param {KeyboardEvent} event Keyboard event captured on the document.
|
|
14606
14815
|
*/
|
|
14607
14816
|
this.handleOutsideKeyDown = (event) => {
|
|
14608
|
-
|
|
14609
|
-
this.clearPasteChooser();
|
|
14610
|
-
}
|
|
14817
|
+
this.pasteChooserController.handleOutsideKeyDown(event);
|
|
14611
14818
|
};
|
|
14612
14819
|
/**
|
|
14613
14820
|
* Dismisses the chooser when any relevant scroll container scrolls.
|
|
14614
14821
|
*/
|
|
14615
14822
|
this.handleOutsideScroll = () => {
|
|
14616
|
-
this.
|
|
14823
|
+
this.pasteChooserController.handleOutsideScroll();
|
|
14617
14824
|
};
|
|
14618
14825
|
this.options = options;
|
|
14826
|
+
this.strategySelector = new PasteStrategySelector();
|
|
14827
|
+
this.imageParser = new PasteImageParser();
|
|
14828
|
+
this.pendingImageRegistry = new PendingImageRegistry();
|
|
14829
|
+
this.chooserPositioner = new ChooserPositioner(() => this.hostEl, () => { var _a, _b; return (_b = (_a = this.pendingPastePayload) === null || _a === void 0 ? void 0 : _a.range) !== null && _b !== void 0 ? _b : this.cloneCurrentSelectionRange(); });
|
|
14830
|
+
this.processingPipeline = new PasteProcessingPipeline(this.strategySelector, new ImageExtractor(this.imageParser), this.pendingImageRegistry);
|
|
14831
|
+
this.dataTransferBuilder = new PasteDataTransferBuilder();
|
|
14832
|
+
this.pasteDispatcher = new PasteDispatcher();
|
|
14833
|
+
this.selectionSnapshotService = new SelectionSnapshotService(() => this.extensionContext);
|
|
14834
|
+
this.pasteEventInterceptor = new PasteEventInterceptor(this.selectionSnapshotService, (payload, event) => {
|
|
14835
|
+
this.pendingPastePayload = payload;
|
|
14836
|
+
this.renderPasteChooser(event);
|
|
14837
|
+
});
|
|
14838
|
+
this.pasteChooserController = new PasteChooserController(this.chooserPositioner, (mode) => this.applyPasteMode(mode), () => {
|
|
14839
|
+
this.pendingPastePayload = null;
|
|
14840
|
+
});
|
|
14619
14841
|
}
|
|
14620
14842
|
/** @inheritDoc */
|
|
14621
14843
|
initialExtensionAfterLoad(context) {
|
|
@@ -14629,6 +14851,10 @@ class VegaRTEPasteExtension extends VegaRTEExtension {
|
|
|
14629
14851
|
this.clearPasteChooser();
|
|
14630
14852
|
this.pendingImageRegistry.discardUnsentPreviews();
|
|
14631
14853
|
}
|
|
14854
|
+
/** @returns {RTEPasteChooserUI | null} Currently open chooser UI, or `null` when closed. */
|
|
14855
|
+
get chooserUI() {
|
|
14856
|
+
return this.pasteChooserController.ui;
|
|
14857
|
+
}
|
|
14632
14858
|
/**
|
|
14633
14859
|
* Attaches the paste listener to the editable element.
|
|
14634
14860
|
*/
|
|
@@ -14636,17 +14862,13 @@ class VegaRTEPasteExtension extends VegaRTEExtension {
|
|
|
14636
14862
|
const { editableEl, contentHostEl, } = this.getEditorElements();
|
|
14637
14863
|
this.editableEl = editableEl;
|
|
14638
14864
|
this.contentHostEl = contentHostEl;
|
|
14639
|
-
|
|
14640
|
-
this.editableEl.addEventListener('paste', this.handlePasteEvent);
|
|
14641
|
-
}
|
|
14865
|
+
this.pasteEventInterceptor.attach(this.editableEl);
|
|
14642
14866
|
}
|
|
14643
14867
|
/**
|
|
14644
14868
|
* Detaches the paste listener from the editable element.
|
|
14645
14869
|
*/
|
|
14646
14870
|
detachPasteListener() {
|
|
14647
|
-
|
|
14648
|
-
this.editableEl.removeEventListener('paste', this.handlePasteEvent);
|
|
14649
|
-
}
|
|
14871
|
+
this.pasteEventInterceptor.detach();
|
|
14650
14872
|
this.editableEl = null;
|
|
14651
14873
|
this.contentHostEl = null;
|
|
14652
14874
|
}
|
|
@@ -14677,12 +14899,7 @@ class VegaRTEPasteExtension extends VegaRTEExtension {
|
|
|
14677
14899
|
* @returns {Range | null} Cloned range or `null` when there is no selection.
|
|
14678
14900
|
*/
|
|
14679
14901
|
cloneCurrentSelectionRange() {
|
|
14680
|
-
|
|
14681
|
-
const selection = (_a = this.extensionContext) === null || _a === void 0 ? void 0 : _a.getSelection();
|
|
14682
|
-
if (selection && selection.rangeCount > 0) {
|
|
14683
|
-
return selection.getRangeAt(0).cloneRange();
|
|
14684
|
-
}
|
|
14685
|
-
return null;
|
|
14902
|
+
return this.selectionSnapshotService.capture().range;
|
|
14686
14903
|
}
|
|
14687
14904
|
/**
|
|
14688
14905
|
* Renders the paste-mode chooser and wires up dismissal listeners.
|
|
@@ -14690,145 +14907,8 @@ class VegaRTEPasteExtension extends VegaRTEExtension {
|
|
|
14690
14907
|
* @param {ClipboardEvent} pasteEvent Originating paste event used for positioning.
|
|
14691
14908
|
*/
|
|
14692
14909
|
renderPasteChooser(pasteEvent) {
|
|
14693
|
-
var _a
|
|
14694
|
-
|
|
14695
|
-
if (!hostRoot) {
|
|
14696
|
-
return;
|
|
14697
|
-
}
|
|
14698
|
-
this.clearPasteChooser(false);
|
|
14699
|
-
const position = this.computeChooserPosition(pasteEvent);
|
|
14700
|
-
this.chooserUI = new RTEPasteChooserUI(hostRoot, {
|
|
14701
|
-
// eslint-disable-next-line jsdoc/require-jsdoc
|
|
14702
|
-
onModeSelect: (mode) => {
|
|
14703
|
-
this.applyPasteMode(mode);
|
|
14704
|
-
},
|
|
14705
|
-
}, {
|
|
14706
|
-
showWordOption: ((_c = this.options) === null || _c === void 0 ? void 0 : _c.enableWordPaste) === true,
|
|
14707
|
-
});
|
|
14708
|
-
this.chooserUI.open(position);
|
|
14709
|
-
this.listenerDocument = this.hostEl.ownerDocument;
|
|
14710
|
-
this.listenerWindow = this.listenerDocument.defaultView;
|
|
14711
|
-
this.listenerDocument.addEventListener('mousedown', this.handleOutsidePointerDown, true);
|
|
14712
|
-
this.listenerDocument.addEventListener('keydown', this.handleOutsideKeyDown, true);
|
|
14713
|
-
this.listenerDocument.addEventListener('scroll', this.handleOutsideScroll, true);
|
|
14714
|
-
if (this.listenerWindow) {
|
|
14715
|
-
this.listenerWindow.addEventListener('scroll', this.handleOutsideScroll, true);
|
|
14716
|
-
}
|
|
14717
|
-
if (this.contentHostEl) {
|
|
14718
|
-
this.contentHostEl.addEventListener('scroll', this.handleOutsideScroll);
|
|
14719
|
-
}
|
|
14720
|
-
}
|
|
14721
|
-
/**
|
|
14722
|
-
* Computes the on-screen position for the chooser based on pointer or caret.
|
|
14723
|
-
*
|
|
14724
|
-
* @param {ClipboardEvent} event Originating paste event.
|
|
14725
|
-
* @returns {ChooserPosition} Position in viewport coordinates.
|
|
14726
|
-
*/
|
|
14727
|
-
computeChooserPosition(event) {
|
|
14728
|
-
var _a, _b, _c;
|
|
14729
|
-
const hostRect = this.hostEl.getBoundingClientRect();
|
|
14730
|
-
const viewportHeight = (_b = (_a = this.hostEl.ownerDocument.defaultView) === null || _a === void 0 ? void 0 : _a.innerHeight) !== null && _b !== void 0 ? _b : window.innerHeight;
|
|
14731
|
-
const pointerEvent = event;
|
|
14732
|
-
const hasPointer = typeof pointerEvent.clientX === 'number' &&
|
|
14733
|
-
pointerEvent.clientX > 0 &&
|
|
14734
|
-
typeof pointerEvent.clientY === 'number' &&
|
|
14735
|
-
pointerEvent.clientY > 0;
|
|
14736
|
-
// For keyboard-initiated paste (Command/Control+V) clientX/Y are 0, so anchor
|
|
14737
|
-
// the chooser to the current caret instead of a fixed host-relative spot.
|
|
14738
|
-
const caretRect = hasPointer ? null : this.getCaretRect();
|
|
14739
|
-
const CHOOSER_GAP_PX = 8;
|
|
14740
|
-
const CHOOSER_MIN_MARGIN_PX = 12;
|
|
14741
|
-
const CHOOSER_WIDTH_PX = 220;
|
|
14742
|
-
const CHOOSER_FALLBACK_OFFSET_PX = 40;
|
|
14743
|
-
const CHOOSER_MIN_VISIBLE_BELOW_SPACE_PX = 88;
|
|
14744
|
-
const baseLeft = hasPointer
|
|
14745
|
-
? pointerEvent.clientX
|
|
14746
|
-
: (_c = caretRect === null || caretRect === void 0 ? void 0 : caretRect.left) !== null && _c !== void 0 ? _c : hostRect.left + CHOOSER_MIN_MARGIN_PX;
|
|
14747
|
-
const baseTop = hasPointer
|
|
14748
|
-
? pointerEvent.clientY
|
|
14749
|
-
: caretRect
|
|
14750
|
-
? caretRect.bottom
|
|
14751
|
-
: hostRect.top + CHOOSER_FALLBACK_OFFSET_PX;
|
|
14752
|
-
const maxLeft = Math.max(hostRect.left + CHOOSER_MIN_MARGIN_PX, hostRect.right - CHOOSER_WIDTH_PX);
|
|
14753
|
-
const left = Math.min(Math.max(baseLeft, hostRect.left + CHOOSER_MIN_MARGIN_PX), maxLeft);
|
|
14754
|
-
const top = Math.max(baseTop + CHOOSER_GAP_PX, hostRect.top + CHOOSER_MIN_MARGIN_PX);
|
|
14755
|
-
const availableBelow = viewportHeight - top - CHOOSER_MIN_MARGIN_PX;
|
|
14756
|
-
const availableAbove = top - CHOOSER_MIN_MARGIN_PX;
|
|
14757
|
-
const placement = availableBelow >= CHOOSER_MIN_VISIBLE_BELOW_SPACE_PX || availableBelow >= availableAbove
|
|
14758
|
-
? ['bottom', 'top']
|
|
14759
|
-
: ['top', 'bottom'];
|
|
14760
|
-
return { left, top, placement };
|
|
14761
|
-
}
|
|
14762
|
-
/**
|
|
14763
|
-
* Resolves the bounding rect of the pending caret position.
|
|
14764
|
-
*
|
|
14765
|
-
* @returns {DOMRect | null} Caret rect or `null` when it cannot be determined.
|
|
14766
|
-
*/
|
|
14767
|
-
getCaretRect() {
|
|
14768
|
-
var _a, _b;
|
|
14769
|
-
const range = (_b = (_a = this.pendingPastePayload) === null || _a === void 0 ? void 0 : _a.range) !== null && _b !== void 0 ? _b : this.cloneCurrentSelectionRange();
|
|
14770
|
-
if (!range) {
|
|
14771
|
-
return null;
|
|
14772
|
-
}
|
|
14773
|
-
const rect = range.getBoundingClientRect();
|
|
14774
|
-
if (this.isUnavailableRect(rect)) {
|
|
14775
|
-
// eslint-disable-next-line spellcheck/spell-checker
|
|
14776
|
-
const domRectList = range.getClientRects();
|
|
14777
|
-
if (domRectList.length > 0) {
|
|
14778
|
-
return domRectList[0];
|
|
14779
|
-
}
|
|
14780
|
-
return this.getRangeContainerRect(range);
|
|
14781
|
-
}
|
|
14782
|
-
return rect;
|
|
14783
|
-
}
|
|
14784
|
-
/**
|
|
14785
|
-
* Returns whether the browser could not resolve a meaningful caret rectangle.
|
|
14786
|
-
*
|
|
14787
|
-
* @param {DOMRect} rect Candidate caret rect.
|
|
14788
|
-
* @returns {boolean} Whether the rect is unusable.
|
|
14789
|
-
*/
|
|
14790
|
-
isUnavailableRect(rect) {
|
|
14791
|
-
return rect.width === 0 && rect.height === 0 && rect.left === 0 && rect.top === 0;
|
|
14792
|
-
}
|
|
14793
|
-
/**
|
|
14794
|
-
* Falls back to the range container or neighbor child node bounds.
|
|
14795
|
-
*
|
|
14796
|
-
* @param {Range} range Caret/selection range.
|
|
14797
|
-
* @returns {DOMRect | null} Best-effort caret anchor rectangle.
|
|
14798
|
-
*/
|
|
14799
|
-
getRangeContainerRect(range) {
|
|
14800
|
-
var _a, _b, _c, _d, _e, _f;
|
|
14801
|
-
const containerNode = (_a = range.startContainer) !== null && _a !== void 0 ? _a : null;
|
|
14802
|
-
if (!containerNode) {
|
|
14803
|
-
return null;
|
|
14804
|
-
}
|
|
14805
|
-
if (containerNode.nodeType === Node.ELEMENT_NODE) {
|
|
14806
|
-
const containerElement = containerNode;
|
|
14807
|
-
const previousNode = (_b = containerElement.childNodes[range.startOffset - 1]) !== null && _b !== void 0 ? _b : null;
|
|
14808
|
-
const currentNode = (_c = containerElement.childNodes[range.startOffset]) !== null && _c !== void 0 ? _c : null;
|
|
14809
|
-
return ((_e = (_d = this.getNodeRect(previousNode)) !== null && _d !== void 0 ? _d : this.getNodeRect(currentNode)) !== null && _e !== void 0 ? _e : this.getNodeRect(containerElement));
|
|
14810
|
-
}
|
|
14811
|
-
return (_f = this.getNodeRect(containerNode)) !== null && _f !== void 0 ? _f : this.getNodeRect(containerNode.parentNode);
|
|
14812
|
-
}
|
|
14813
|
-
/**
|
|
14814
|
-
* Returns an element-backed rectangle from a DOM node.
|
|
14815
|
-
*
|
|
14816
|
-
* @param {Node | null} node Candidate node.
|
|
14817
|
-
* @returns {DOMRect | null} Node rectangle when resolvable.
|
|
14818
|
-
*/
|
|
14819
|
-
getNodeRect(node) {
|
|
14820
|
-
var _a, _b;
|
|
14821
|
-
if (!node) {
|
|
14822
|
-
return null;
|
|
14823
|
-
}
|
|
14824
|
-
if (node.nodeType === Node.TEXT_NODE) {
|
|
14825
|
-
return (_b = (_a = node.parentElement) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect()) !== null && _b !== void 0 ? _b : null;
|
|
14826
|
-
}
|
|
14827
|
-
if (node.nodeType === Node.ELEMENT_NODE) {
|
|
14828
|
-
const rect = node.getBoundingClientRect();
|
|
14829
|
-
return this.isUnavailableRect(rect) ? null : rect;
|
|
14830
|
-
}
|
|
14831
|
-
return null;
|
|
14910
|
+
var _a;
|
|
14911
|
+
this.pasteChooserController.open(this.hostEl, this.contentHostEl, pasteEvent, ((_a = this.options) === null || _a === void 0 ? void 0 : _a.enableWordPaste) === true);
|
|
14832
14912
|
}
|
|
14833
14913
|
/**
|
|
14834
14914
|
* Applies the chosen paste mode by dispatching a synthetic paste input event.
|
|
@@ -14850,36 +14930,13 @@ class VegaRTEPasteExtension extends VegaRTEExtension {
|
|
|
14850
14930
|
return;
|
|
14851
14931
|
}
|
|
14852
14932
|
editableEl.focus();
|
|
14853
|
-
this.
|
|
14854
|
-
this.
|
|
14855
|
-
const
|
|
14856
|
-
|
|
14857
|
-
: this.strategySelector.selectStrategyByType(mode);
|
|
14858
|
-
let processedHtml = strategy.process(this.pendingPastePayload.html);
|
|
14859
|
-
// If the strategy supports image processing and there is clipboard file content, parse local images.
|
|
14860
|
-
if (strategy.supportsImageProcessing && this.clipboardFileContent) {
|
|
14861
|
-
processedHtml = this.parseLocalImages(processedHtml, this.clipboardFileContent);
|
|
14862
|
-
}
|
|
14863
|
-
this.clipboardFileContent = null;
|
|
14864
|
-
const dataTransfer = this.createDataTransfer(processedHtml, this.pendingPastePayload.text, strategy.type);
|
|
14865
|
-
this.dispatchBeforeInputPaste(editableEl, dataTransfer);
|
|
14933
|
+
this.selectionSnapshotService.restore(this.pendingPastePayload);
|
|
14934
|
+
const output = this.processingPipeline.process(this.pendingPastePayload, mode);
|
|
14935
|
+
const dataTransfer = this.dataTransferBuilder.build(output);
|
|
14936
|
+
this.pasteDispatcher.dispatch(editableEl, dataTransfer);
|
|
14866
14937
|
this.clearPasteChooser();
|
|
14867
14938
|
this.emitLocalImageInsertedEvent();
|
|
14868
14939
|
}
|
|
14869
|
-
/**
|
|
14870
|
-
* Parses local images from the HTML and emits events for further processing.
|
|
14871
|
-
*
|
|
14872
|
-
* @param {string} html HTML content to parse.
|
|
14873
|
-
* @param {ClipboardFileContent} clipboardFileContent Clipboard file content for image extraction.
|
|
14874
|
-
* @returns {string} Processed HTML with local image references replaced.
|
|
14875
|
-
*/
|
|
14876
|
-
parseLocalImages(html, clipboardFileContent) {
|
|
14877
|
-
const { html: result, previews } = this.imageParser.parseLocalImages(html, clipboardFileContent);
|
|
14878
|
-
if (previews.length > 0) {
|
|
14879
|
-
this.pendingImageRegistry.register(previews);
|
|
14880
|
-
}
|
|
14881
|
-
return result;
|
|
14882
|
-
}
|
|
14883
14940
|
/**
|
|
14884
14941
|
* Emits the `imageInsertedCallback` for any pending previews, allowing the
|
|
14885
14942
|
* consumer to upload them and resolve their URLs.
|
|
@@ -14889,141 +14946,17 @@ class VegaRTEPasteExtension extends VegaRTEExtension {
|
|
|
14889
14946
|
this.pendingImageRegistry.notifyInserted(this.options.imageInsertedCallback, () => { var _a; return (_a = this.editableEl) !== null && _a !== void 0 ? _a : this.getEditableElement(); }, (imageElement) => this.getDTOEntityByDom(imageElement));
|
|
14890
14947
|
}
|
|
14891
14948
|
}
|
|
14892
|
-
/**
|
|
14893
|
-
* Restores SelectionController state from the captured selection so synthetic
|
|
14894
|
-
* beforeinput paste can replace the selected content instead of appending.
|
|
14895
|
-
*
|
|
14896
|
-
* @param {PendingPastePayload} payload Pending paste payload.
|
|
14897
|
-
*/
|
|
14898
|
-
restoreSelectionControllerState(payload) {
|
|
14899
|
-
if (!payload.range || !this.extensionContext) {
|
|
14900
|
-
return;
|
|
14901
|
-
}
|
|
14902
|
-
const rangeOptions = {
|
|
14903
|
-
startNode: payload.range.startContainer,
|
|
14904
|
-
endNode: payload.range.endContainer,
|
|
14905
|
-
startOffset: payload.range.startOffset,
|
|
14906
|
-
endOffset: payload.range.endOffset,
|
|
14907
|
-
};
|
|
14908
|
-
this.extensionContext.setSelectedNodes(payload.selectedNodes || [], rangeOptions);
|
|
14909
|
-
}
|
|
14910
|
-
/**
|
|
14911
|
-
* Restores a previously cloned selection range.
|
|
14912
|
-
*
|
|
14913
|
-
* @param {Range | null} range Range to restore.
|
|
14914
|
-
*/
|
|
14915
|
-
restoreSelectionRange(range) {
|
|
14916
|
-
var _a;
|
|
14917
|
-
if (!range) {
|
|
14918
|
-
return;
|
|
14919
|
-
}
|
|
14920
|
-
const selection = (_a = this.extensionContext) === null || _a === void 0 ? void 0 : _a.getSelection();
|
|
14921
|
-
if (selection) {
|
|
14922
|
-
selection.removeAllRanges();
|
|
14923
|
-
selection.addRange(range);
|
|
14924
|
-
}
|
|
14925
|
-
}
|
|
14926
|
-
/**
|
|
14927
|
-
* Dispatches a synthetic `beforeinput` paste event into the editor pipeline.
|
|
14928
|
-
*
|
|
14929
|
-
* @param {HTMLDivElement} editableEl Editable content element.
|
|
14930
|
-
* @param {DataTransfer} dataTransfer Clipboard payload for the paste.
|
|
14931
|
-
*/
|
|
14932
|
-
dispatchBeforeInputPaste(editableEl, dataTransfer) {
|
|
14933
|
-
// This synthetic beforeinput event intentionally reuses the existing
|
|
14934
|
-
// UserInputController -> insertFromPaste -> InsertPasteHandler pipeline.
|
|
14935
|
-
const beforeInputEvent = new CustomEvent('beforeinput', {
|
|
14936
|
-
bubbles: true,
|
|
14937
|
-
cancelable: true,
|
|
14938
|
-
});
|
|
14939
|
-
try {
|
|
14940
|
-
Object.defineProperties(beforeInputEvent, {
|
|
14941
|
-
inputType: {
|
|
14942
|
-
value: 'insertFromPaste',
|
|
14943
|
-
configurable: true,
|
|
14944
|
-
},
|
|
14945
|
-
dataTransfer: {
|
|
14946
|
-
value: dataTransfer,
|
|
14947
|
-
configurable: true,
|
|
14948
|
-
},
|
|
14949
|
-
});
|
|
14950
|
-
}
|
|
14951
|
-
catch (_a) {
|
|
14952
|
-
Object.assign(beforeInputEvent, {
|
|
14953
|
-
inputType: 'insertFromPaste',
|
|
14954
|
-
dataTransfer,
|
|
14955
|
-
});
|
|
14956
|
-
}
|
|
14957
|
-
editableEl.dispatchEvent(beforeInputEvent);
|
|
14958
|
-
}
|
|
14959
|
-
/**
|
|
14960
|
-
* Builds a `DataTransfer` payload carrying the paste content and mode marker.
|
|
14961
|
-
*
|
|
14962
|
-
* @param {string} html HTML clipboard content.
|
|
14963
|
-
* @param {string} text Plain text clipboard content.
|
|
14964
|
-
* @param {RTEPasteMode} [mode] Selected paste mode marker.
|
|
14965
|
-
* @returns {DataTransfer} Populated data transfer payload.
|
|
14966
|
-
*/
|
|
14967
|
-
createDataTransfer(html, text, mode) {
|
|
14968
|
-
if (typeof DataTransfer !== 'undefined') {
|
|
14969
|
-
const dataTransfer = new DataTransfer();
|
|
14970
|
-
if (html) {
|
|
14971
|
-
dataTransfer.setData('text/html', html);
|
|
14972
|
-
}
|
|
14973
|
-
if (text) {
|
|
14974
|
-
dataTransfer.setData('text/plain', text);
|
|
14975
|
-
}
|
|
14976
|
-
if (mode) {
|
|
14977
|
-
dataTransfer.setData(RTE_PASTE_MODE_DATA_TYPE, mode);
|
|
14978
|
-
}
|
|
14979
|
-
return dataTransfer;
|
|
14980
|
-
}
|
|
14981
|
-
return {
|
|
14982
|
-
// eslint-disable-next-line jsdoc/require-jsdoc
|
|
14983
|
-
getData: (type) => {
|
|
14984
|
-
if (type === 'text/html') {
|
|
14985
|
-
return html;
|
|
14986
|
-
}
|
|
14987
|
-
if (type === 'text/plain') {
|
|
14988
|
-
return text;
|
|
14989
|
-
}
|
|
14990
|
-
if (type === RTE_PASTE_MODE_DATA_TYPE) {
|
|
14991
|
-
return mode !== null && mode !== void 0 ? mode : '';
|
|
14992
|
-
}
|
|
14993
|
-
return '';
|
|
14994
|
-
},
|
|
14995
|
-
};
|
|
14996
|
-
}
|
|
14997
14949
|
/**
|
|
14998
14950
|
* Tears down the chooser UI and removes dismissal listeners.
|
|
14999
14951
|
*
|
|
15000
14952
|
* @param {boolean} [clearPayload] Whether to also clear the pending payload.
|
|
15001
14953
|
*/
|
|
15002
14954
|
clearPasteChooser(clearPayload = true) {
|
|
15003
|
-
|
|
15004
|
-
this.contentHostEl.removeEventListener('scroll', this.handleOutsideScroll);
|
|
15005
|
-
}
|
|
15006
|
-
if (this.listenerWindow) {
|
|
15007
|
-
this.listenerWindow.removeEventListener('scroll', this.handleOutsideScroll, true);
|
|
15008
|
-
this.listenerWindow = null;
|
|
15009
|
-
}
|
|
15010
|
-
if (this.listenerDocument) {
|
|
15011
|
-
this.listenerDocument.removeEventListener('mousedown', this.handleOutsidePointerDown, true);
|
|
15012
|
-
this.listenerDocument.removeEventListener('keydown', this.handleOutsideKeyDown, true);
|
|
15013
|
-
this.listenerDocument.removeEventListener('scroll', this.handleOutsideScroll, true);
|
|
15014
|
-
this.listenerDocument = null;
|
|
15015
|
-
}
|
|
15016
|
-
if (this.chooserUI) {
|
|
15017
|
-
this.chooserUI.destroy();
|
|
15018
|
-
}
|
|
15019
|
-
this.chooserUI = null;
|
|
15020
|
-
if (clearPayload) {
|
|
15021
|
-
this.pendingPastePayload = null;
|
|
15022
|
-
}
|
|
14955
|
+
this.pasteChooserController.clear(clearPayload);
|
|
15023
14956
|
}
|
|
15024
14957
|
}
|
|
15025
14958
|
(() => {
|
|
15026
|
-
VegaRTEExtension.registerActionHandleStrategy(RTEImageNode.
|
|
14959
|
+
VegaRTEExtension.registerActionHandleStrategy(RTEImageNode.typeName, REPLACE_IMAGE_SRC, new ImageReplaceSrcStrategy());
|
|
15027
14960
|
})();
|
|
15028
14961
|
|
|
15029
14962
|
/**
|
|
@@ -15336,7 +15269,7 @@ class VegaRTECopyExtension extends VegaRTEExtension {
|
|
|
15336
15269
|
}
|
|
15337
15270
|
}
|
|
15338
15271
|
(() => {
|
|
15339
|
-
ActionHandleStrategyRegistry.register('COPY_SELECTED_CONTENT_ACTION', VegaRTEContent.
|
|
15272
|
+
ActionHandleStrategyRegistry.register('COPY_SELECTED_CONTENT_ACTION', VegaRTEContent.typeName, new CopySelectedContentStrategy());
|
|
15340
15273
|
})();
|
|
15341
15274
|
// The unique key for the copy toolbar button, used for registration and retrieval.
|
|
15342
15275
|
VegaRTECopyExtension.TOOLBAR_BUTTON_KEY = 'copy';
|
|
@@ -15538,23 +15471,9 @@ class VegaRTEWordCountExtension extends VegaRTEExtension {
|
|
|
15538
15471
|
}
|
|
15539
15472
|
(() => {
|
|
15540
15473
|
// Gate over-limit commits through the shared action-interceptor pipeline.
|
|
15541
|
-
VegaRTEExtension.registerActionHandlerInterceptor(VegaRTEContent.
|
|
15474
|
+
VegaRTEExtension.registerActionHandlerInterceptor(VegaRTEContent.typeName, COMMIT_VALUE, new PreventHardLimitExceedInterceptor());
|
|
15542
15475
|
})();
|
|
15543
15476
|
|
|
15544
|
-
/**
|
|
15545
|
-
* Insert a new children to the nearest position of the parent container
|
|
15546
|
-
*
|
|
15547
|
-
* @example parent.apply(new InsertNodeToNearestRoot(rteRange, nodeToBeInserted))
|
|
15548
|
-
*/
|
|
15549
|
-
class InsertNodeToNearestRootAction extends ModifyContentAction {
|
|
15550
|
-
constructor(rteRange, nodeToBeInserted) {
|
|
15551
|
-
super();
|
|
15552
|
-
this.type = ModifyContentActionType.INSERT_NODE_TO_NEAREST_ROOT;
|
|
15553
|
-
this.rteRange = rteRange;
|
|
15554
|
-
this.nodeToBeInserted = nodeToBeInserted;
|
|
15555
|
-
}
|
|
15556
|
-
}
|
|
15557
|
-
|
|
15558
15477
|
/**
|
|
15559
15478
|
* Strategy to handle the insertion of a token node into the nearest root block.
|
|
15560
15479
|
*/
|
|
@@ -15666,9 +15585,9 @@ class VegaRTETokenExtension extends VegaRTEExtension {
|
|
|
15666
15585
|
}
|
|
15667
15586
|
(() => {
|
|
15668
15587
|
const insertTokenNodeStrategy = new InsertTokenNodeStrategy();
|
|
15669
|
-
VegaRTEExtension.registerActionHandleStrategy(RTETextBlock.
|
|
15670
|
-
VegaRTEExtension.registerActionHandleStrategy(RTEListItemBlock.
|
|
15588
|
+
VegaRTEExtension.registerActionHandleStrategy(RTETextBlock.typeName, 'INSERT_TOKEN_NODE', insertTokenNodeStrategy);
|
|
15589
|
+
VegaRTEExtension.registerActionHandleStrategy(RTEListItemBlock.typeName, 'INSERT_TOKEN_NODE', insertTokenNodeStrategy);
|
|
15671
15590
|
})();
|
|
15672
15591
|
VegaRTETokenExtension.TOOLBAR_BUTTON_KEY = 'token';
|
|
15673
15592
|
|
|
15674
|
-
export { VegaRTEWordCountExtension as A, VegaCalendarPeriodFactory as B,
|
|
15593
|
+
export { VegaRTEWordCountExtension as A, VegaCalendarPeriodFactory as B, RTETokenNode as C, RTETokenNodeRenderer as D, RTELanguageToolbarButtonRenderer as E, RTEBlockquoteBlock as F, DeleteSelectedContentAction as G, RTETokenToolbarButtonRenderer as R, VegaLoader as V, VegaNotify as a, VegaEventManager$1 as b, VegaZIndexManager$1 as c, VegaSkeletonLoader as d, VegaTranslation as e, VegaRTETokenExtension as f, VegaRTELanguageExtension as g, VegaRTEDefaultLineHeightOptions as h, VegaRTEFunctionExtension as i, VegaRTETableExtension as j, VegaRTEHorizontalLineExtension as k, VegaRTEBlockquoteExtension as l, VegaRTESpecialCharactersExtension as m, VegaRTEFindReplaceExtension as n, VegaRTESpecialCharactersEssentials as o, VegaRTESpecialCharactersLatin as p, VegaRTESpecialCharactersMathematical as q, VegaRTESpecialCharactersArrows as r, VegaRTESpecialCharactersCurrency as s, VegaRTESpecialCharactersText as t, VegaRTELineHeightExtension as u, VegaRTEPasteExtension as v, waitForVega as w, VegaRTEFullscreenExtension as x, VegaRTECopyExtension as y, VegaRTECutExtension as z };
|