@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
|
@@ -4,35 +4,35 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
const index = require('./index-58ea899e.js');
|
|
6
6
|
const globalSlimmerRegistry = require('./global-slimmer-registry-b3bce7e0.js');
|
|
7
|
-
const componentUsageRuntimeMetrics = require('./component-usage-runtime-metrics-
|
|
7
|
+
const componentUsageRuntimeMetrics = require('./component-usage-runtime-metrics-77f7be9f.js');
|
|
8
8
|
const component = require('./component-1e352960.js');
|
|
9
9
|
const accessibility = require('./accessibility-6ca2a237.js');
|
|
10
10
|
const changeManager = require('./change-manager-a297e4d2.js');
|
|
11
11
|
const domNodeSubjectObserverFactory = require('./dom-node-subject-observer-factory-c82df135.js');
|
|
12
12
|
const vegaInternalEventId = require('./vega-internal-event-id-98d499d7.js');
|
|
13
13
|
const staticSubjectTitle = require('./static-subject-title-70c73b16.js');
|
|
14
|
-
const codeBlock = require('./code-block-
|
|
15
|
-
const typeGuard = require('./type-guard-
|
|
16
|
-
const linkExtension = require('./link-extension-
|
|
17
|
-
const internalIconManager = require('./internal-icon-manager-
|
|
18
|
-
const imageAnnotationAction = require('./image-annotation-action-
|
|
19
|
-
const vegaEventId = require('./vega-event-id-
|
|
14
|
+
const codeBlock = require('./code-block-72de6c4d.js');
|
|
15
|
+
const typeGuard = require('./type-guard-cce6fe1f.js');
|
|
16
|
+
const linkExtension = require('./link-extension-1b4ed437.js');
|
|
17
|
+
const internalIconManager = require('./internal-icon-manager-b9702049.js');
|
|
18
|
+
const imageAnnotationAction = require('./image-annotation-action-1ee41bc7.js');
|
|
19
|
+
const vegaEventId = require('./vega-event-id-b5abf7c9.js');
|
|
20
20
|
const misc = require('./misc-3d30df91.js');
|
|
21
21
|
const waitForComponentDidRender = require('./wait-for-component-did-render-90edbc1a.js');
|
|
22
|
-
const imageExtension = require('./image-extension-
|
|
23
|
-
const formFieldControllerSlimmer = require('./form-field-controller-slimmer-
|
|
24
|
-
const eventEmitSlimmer = require('./event-emit-slimmer-
|
|
22
|
+
const imageExtension = require('./image-extension-6a92c524.js');
|
|
23
|
+
const formFieldControllerSlimmer = require('./form-field-controller-slimmer-124d54ea.js');
|
|
24
|
+
const eventEmitSlimmer = require('./event-emit-slimmer-6bc675f6.js');
|
|
25
25
|
const subStateNotifySlimmer = require('./sub-state-notify-slimmer-3b33e31c.js');
|
|
26
|
-
const contentState = require('./content-state-
|
|
26
|
+
const contentState = require('./content-state-ff40bdc6.js');
|
|
27
27
|
const alignLeft = require('./align-left-4a76df69.js');
|
|
28
|
-
const componentValueHistoryControllerSlimmer_abstract = require('./component-value-history-controller-slimmer.abstract-
|
|
28
|
+
const componentValueHistoryControllerSlimmer_abstract = require('./component-value-history-controller-slimmer.abstract-23d2b3d8.js');
|
|
29
29
|
const observer = require('./observer-f49483e8.js');
|
|
30
30
|
const timer = require('./timer-5f33058b.js');
|
|
31
31
|
const darkModeStateControllerSlimmer = require('./dark-mode-state-controller-slimmer-b454645a.js');
|
|
32
32
|
const ui = require('./ui-c91c37a7.js');
|
|
33
|
-
const richTextEditorRequiredRule = require('./rich-text-editor-required-rule-
|
|
34
|
-
const childNodesEventPreventSlimmer = require('./child-nodes-event-prevent-slimmer-
|
|
35
|
-
const translationSlimmer = require('./translation-slimmer-
|
|
33
|
+
const richTextEditorRequiredRule = require('./rich-text-editor-required-rule-1aa75d22.js');
|
|
34
|
+
const childNodesEventPreventSlimmer = require('./child-nodes-event-prevent-slimmer-574a6a1a.js');
|
|
35
|
+
const translationSlimmer = require('./translation-slimmer-1771d01f.js');
|
|
36
36
|
const darkModeStyleController = require('./dark-mode-style-controller-ec04ece9.js');
|
|
37
37
|
const autoRunWhenReRenderTaskQueueSlimmer_abstract = require('./auto-run-when-re-render-task-queue-slimmer.abstract-5734634d.js');
|
|
38
38
|
const array = require('./array-249289f2.js');
|
|
@@ -44,14 +44,15 @@ const trashCan = require('./trash-can-46a5e19a.js');
|
|
|
44
44
|
const remoteInvocationRegistry = require('./remote-invocation-registry-fc22fdd0.js');
|
|
45
45
|
require('./string-39438062.js');
|
|
46
46
|
require('./typography-3ea4fe41.js');
|
|
47
|
+
require('./discriminated-3b8e72d5.js');
|
|
48
|
+
require('./dynamic-slimmer-f31fdfd7.js');
|
|
47
49
|
require('./breakpoints-ebde4837.js');
|
|
48
50
|
require('./ui-32120990.js');
|
|
49
|
-
require('./internal-translation-controller-
|
|
50
|
-
require('./icon-manager-
|
|
51
|
-
require('./create-public-api-runtime-metrics-slimmer-91b0cbfb.js');
|
|
52
|
-
require('./dynamic-slimmer-f31fdfd7.js');
|
|
53
|
-
require('./index-5d1adcd1.js');
|
|
51
|
+
require('./internal-translation-controller-0d67ca4d.js');
|
|
52
|
+
require('./icon-manager-7d20b0ab.js');
|
|
54
53
|
require('./try-get-document-c0ebd39a.js');
|
|
54
|
+
require('./vega-nonce-manager-df69d3ed.js');
|
|
55
|
+
require('./index-5d1adcd1.js');
|
|
55
56
|
require('./page-resize-observer-slimmer-273d62ef.js');
|
|
56
57
|
require('./breakpoints-1cc2c4c6.js');
|
|
57
58
|
require('./internal-form-field-validation-rule.abstract-07cdff46.js');
|
|
@@ -59,15 +60,14 @@ require('./form-field-key-8d5edf75.js');
|
|
|
59
60
|
require('./mutation-observer-slimmer-749d5020.js');
|
|
60
61
|
require('./mutation-observer-filters-38cebc6d.js');
|
|
61
62
|
require('./sub-state-observer-slimmer-5b68ba3f.js');
|
|
62
|
-
require('./internal-vega-event-manager-
|
|
63
|
-
require('./range-
|
|
64
|
-
require('./keyboard-manager-slimmer-
|
|
65
|
-
require('./keyboard-manager-
|
|
63
|
+
require('./internal-vega-event-manager-0c256d63.js');
|
|
64
|
+
require('./range-712fe703.js');
|
|
65
|
+
require('./keyboard-manager-slimmer-a2872981.js');
|
|
66
|
+
require('./keyboard-manager-332eec89.js');
|
|
66
67
|
require('./vega-env-manager-23b8b23c.js');
|
|
67
68
|
require('./feature-flag-controller-c19d0b58.js');
|
|
68
69
|
require('./index-3ca118c4.js');
|
|
69
70
|
require('./tinycolor-polyfill-502efaa8.js');
|
|
70
|
-
require('./vega-nonce-manager-df69d3ed.js');
|
|
71
71
|
require('./synchronize-task-queue-1ee80e94.js');
|
|
72
72
|
require('./number-4816603d.js');
|
|
73
73
|
|
|
@@ -504,7 +504,7 @@ class BoldToolbarButtonSlimmer extends imageAnnotationAction.VisualModeToolbarBu
|
|
|
504
504
|
selectedNodes.some((node) => {
|
|
505
505
|
var _a;
|
|
506
506
|
return ((_a = node.getAnnotationByType(codeBlock.NodeAnnotationTypeEnum.CODE)) === null || _a === void 0 ? void 0 : _a.code) ||
|
|
507
|
-
this.shouldDisabledToolbar(node, codeBlock.BoldAnnotationAction.
|
|
507
|
+
this.shouldDisabledToolbar(node, codeBlock.BoldAnnotationAction.typeName);
|
|
508
508
|
}));
|
|
509
509
|
}
|
|
510
510
|
}
|
|
@@ -552,7 +552,7 @@ class ItalicToolbarButtonSlimmer extends imageAnnotationAction.VisualModeToolbar
|
|
|
552
552
|
selectedNodes.some((node) => {
|
|
553
553
|
var _a;
|
|
554
554
|
return ((_a = node.getAnnotationByType(codeBlock.NodeAnnotationTypeEnum.CODE)) === null || _a === void 0 ? void 0 : _a.code) ||
|
|
555
|
-
this.shouldDisabledToolbar(node, codeBlock.ItalicAnnotationAction.
|
|
555
|
+
this.shouldDisabledToolbar(node, codeBlock.ItalicAnnotationAction.typeName);
|
|
556
556
|
}));
|
|
557
557
|
}
|
|
558
558
|
}
|
|
@@ -603,7 +603,7 @@ class UnderlineToolbarButtonSlimmer extends imageAnnotationAction.VisualModeTool
|
|
|
603
603
|
selectedNodes.some((node) => {
|
|
604
604
|
var _a;
|
|
605
605
|
return ((_a = node.getAnnotationByType(codeBlock.NodeAnnotationTypeEnum.CODE)) === null || _a === void 0 ? void 0 : _a.code) ||
|
|
606
|
-
this.shouldDisabledToolbar(node, codeBlock.UnderlineAnnotationAction.
|
|
606
|
+
this.shouldDisabledToolbar(node, codeBlock.UnderlineAnnotationAction.typeName);
|
|
607
607
|
}));
|
|
608
608
|
}
|
|
609
609
|
}
|
|
@@ -677,7 +677,7 @@ class TextStylesToolbarButtonSlimmer extends imageAnnotationAction.VisualModeToo
|
|
|
677
677
|
isDisabled() {
|
|
678
678
|
const selectedBlocks = this.selectionController.getSelectedBlocks();
|
|
679
679
|
return (super.isDisabled() ||
|
|
680
|
-
selectedBlocks.some((node) => this.shouldDisabledToolbar(node, codeBlock.TextStyleAnnotationAction.
|
|
680
|
+
selectedBlocks.some((node) => this.shouldDisabledToolbar(node, codeBlock.TextStyleAnnotationAction.typeName)));
|
|
681
681
|
}
|
|
682
682
|
addDropdownObserver(dropdownRef) {
|
|
683
683
|
domNodeSubjectObserverFactory.DomNodeSubjectObserverFactory.addUniqueObserverToNode(dropdownRef, vegaEventId.VegaDropdownClick, this.handleDropdownItemClick);
|
|
@@ -789,7 +789,7 @@ class ClearStyleToolbarButtonSlimmer extends imageAnnotationAction.VisualModeToo
|
|
|
789
789
|
isDisabled() {
|
|
790
790
|
const selectedNodes = this.selectionController.getSelectedNodes();
|
|
791
791
|
return (super.isDisabled() ||
|
|
792
|
-
selectedNodes.some((node) => this.shouldDisabledToolbar(node, codeBlock.ClearFormattingAnnotationAction.
|
|
792
|
+
selectedNodes.some((node) => this.shouldDisabledToolbar(node, codeBlock.ClearFormattingAnnotationAction.typeName)));
|
|
793
793
|
}
|
|
794
794
|
}
|
|
795
795
|
(() => {
|
|
@@ -837,7 +837,7 @@ class CodeToolbarButtonSlimmer extends imageAnnotationAction.VisualModeToolbarBu
|
|
|
837
837
|
const selectedNodes = this.selectionController.getSelectedNodes();
|
|
838
838
|
return (super.isDisabled() ||
|
|
839
839
|
selectedNodes.some((node) => node.getAnnotationByType(codeBlock.NodeAnnotationTypeEnum.LINK) ||
|
|
840
|
-
this.shouldDisabledToolbar(node, codeBlock.CodeAnnotationAction.
|
|
840
|
+
this.shouldDisabledToolbar(node, codeBlock.CodeAnnotationAction.typeName)));
|
|
841
841
|
}
|
|
842
842
|
}
|
|
843
843
|
(() => {
|
|
@@ -887,7 +887,7 @@ class StrikethroughToolbarButtonSlimmer extends imageAnnotationAction.VisualMode
|
|
|
887
887
|
selectedNodes.some((node) => {
|
|
888
888
|
var _a;
|
|
889
889
|
return ((_a = node.getAnnotationByType(codeBlock.NodeAnnotationTypeEnum.CODE)) === null || _a === void 0 ? void 0 : _a.code) ||
|
|
890
|
-
this.shouldDisabledToolbar(node, codeBlock.StrikethroughAnnotationAction.
|
|
890
|
+
this.shouldDisabledToolbar(node, codeBlock.StrikethroughAnnotationAction.typeName);
|
|
891
891
|
}));
|
|
892
892
|
}
|
|
893
893
|
}
|
|
@@ -1067,7 +1067,7 @@ class LinkToolbarButtonSlimmer extends imageAnnotationAction.VisualModeToolbarBu
|
|
|
1067
1067
|
selectedBlocks.length > 1 ||
|
|
1068
1068
|
selectedNodes.some((node) => {
|
|
1069
1069
|
var _a;
|
|
1070
|
-
return this.shouldDisabledToolbar(node, codeBlock.LinkAnnotationAction.
|
|
1070
|
+
return this.shouldDisabledToolbar(node, codeBlock.LinkAnnotationAction.typeName) ||
|
|
1071
1071
|
node.getAnnotationByType(codeBlock.NodeAnnotationTypeEnum.LINK) ||
|
|
1072
1072
|
((_a = node.getAnnotationByType(codeBlock.NodeAnnotationTypeEnum.CODE)) === null || _a === void 0 ? void 0 : _a.code);
|
|
1073
1073
|
}));
|
|
@@ -1129,7 +1129,7 @@ class MoreIndentToolbarButtonSlimmer extends imageAnnotationAction.VisualModeToo
|
|
|
1129
1129
|
isDisabled() {
|
|
1130
1130
|
const selectedBlocks = this.selectionController.getSelectedBlocks();
|
|
1131
1131
|
return (super.isDisabled() ||
|
|
1132
|
-
selectedBlocks.some((node) => this.shouldDisabledToolbar(node, codeBlock.IndentAnnotationAction.
|
|
1132
|
+
selectedBlocks.some((node) => this.shouldDisabledToolbar(node, codeBlock.IndentAnnotationAction.typeName)));
|
|
1133
1133
|
}
|
|
1134
1134
|
onClick() {
|
|
1135
1135
|
this.selectionController.getSelectedBlocks().forEach((item) => {
|
|
@@ -1171,7 +1171,7 @@ class LessIndentToolbarButtonSlimmer extends imageAnnotationAction.VisualModeToo
|
|
|
1171
1171
|
isDisabled() {
|
|
1172
1172
|
const selectedBlocks = this.selectionController.getSelectedBlocks();
|
|
1173
1173
|
return (super.isDisabled() ||
|
|
1174
|
-
selectedBlocks.some((node) => this.shouldDisabledToolbar(node, codeBlock.IndentAnnotationAction.
|
|
1174
|
+
selectedBlocks.some((node) => this.shouldDisabledToolbar(node, codeBlock.IndentAnnotationAction.typeName)));
|
|
1175
1175
|
}
|
|
1176
1176
|
onClick() {
|
|
1177
1177
|
this.selectionController.getSelectedBlocks().forEach((item) => {
|
|
@@ -2384,7 +2384,7 @@ class HorizontalAlignmentToolbarButtonSlimmer extends imageAnnotationAction.Visu
|
|
|
2384
2384
|
return (super.isDisabled() ||
|
|
2385
2385
|
this.selectionController
|
|
2386
2386
|
.getSelectedBlocks()
|
|
2387
|
-
.some((block) => this.shouldDisabledToolbar(block, codeBlock.HorizontalAlignmentAnnotationAction.
|
|
2387
|
+
.some((block) => this.shouldDisabledToolbar(block, codeBlock.HorizontalAlignmentAnnotationAction.typeName)));
|
|
2388
2388
|
}
|
|
2389
2389
|
}
|
|
2390
2390
|
__decorate$n([
|
|
@@ -2465,7 +2465,17 @@ class ValueController extends globalSlimmerRegistry.VegaSlimmer {
|
|
|
2465
2465
|
const flushChangesWithDebounce = timer.debounce(() => {
|
|
2466
2466
|
void this.valueController.flushChanges(this.value);
|
|
2467
2467
|
}, ValueController.VALUE_CHANGE_DEBOUNCE_TIME, this);
|
|
2468
|
-
this.flushChangeObserver = new observer.Observer(this.isAcceptableFlushChange.bind(this),
|
|
2468
|
+
this.flushChangeObserver = new observer.Observer(this.isAcceptableFlushChange.bind(this), (payload) => {
|
|
2469
|
+
// When a handler asks to bypass the debounce (direct user gestures like `beforeinput`),
|
|
2470
|
+
// invoke `flushChanges` immediately with the payload as-is. Defaults live on the emitter
|
|
2471
|
+
// side (`BaseHandler.flushOptions`) — the observer trusts the payload and does not
|
|
2472
|
+
// re-apply fallback values, so there is a single source of truth.
|
|
2473
|
+
if (payload && payload.bypassDebounce) {
|
|
2474
|
+
void this.valueController.flushChanges(this.value, payload.recordHistory, payload.updateSource);
|
|
2475
|
+
return;
|
|
2476
|
+
}
|
|
2477
|
+
flushChangesWithDebounce();
|
|
2478
|
+
});
|
|
2469
2479
|
changeManager.ChangeManager.register(domNodeSubjectObserverFactory.domNodeSubjectFactory.getSubject(this.host, vegaInternalEventId.VegaInternalRichTextEditorFlushChanges), this.flushChangeObserver);
|
|
2470
2480
|
}
|
|
2471
2481
|
/**
|
|
@@ -2626,12 +2636,44 @@ class RichTextContentController {
|
|
|
2626
2636
|
}
|
|
2627
2637
|
}
|
|
2628
2638
|
|
|
2639
|
+
/**
|
|
2640
|
+
* Applies an ordered list of leaf content actions as one flushable unit, so a `beforeinput` handler
|
|
2641
|
+
* emits a single flush through the shared action pipeline instead of marking each leaf action flushable.
|
|
2642
|
+
*/
|
|
2643
|
+
class SequentialCompositionAction extends codeBlock.ModifyContentAction {
|
|
2644
|
+
constructor(steps, flushPayload = {}) {
|
|
2645
|
+
super();
|
|
2646
|
+
this.steps = steps;
|
|
2647
|
+
this.isFlushable = true;
|
|
2648
|
+
this.type = codeBlock.ModifyContentActionType.SEQUENTIAL_COMPOSITION;
|
|
2649
|
+
this.flushPayload = flushPayload;
|
|
2650
|
+
}
|
|
2651
|
+
}
|
|
2652
|
+
|
|
2629
2653
|
const ROOT_CONTAINER_CLASS_NAME = 'rich-text-content';
|
|
2630
2654
|
/** This code snippet is defining an abstract class named `BaseHandler` with an abstract method `execute`. */
|
|
2631
2655
|
class BaseHandler {
|
|
2656
|
+
constructor() {
|
|
2657
|
+
/**
|
|
2658
|
+
* Default flush payload emitted after `handleEvent` completes. This is the single source of
|
|
2659
|
+
* truth for the defaults — the observer does not re-apply any fallback values. Subclasses may override
|
|
2660
|
+
* this field to opt out of flushing (assign `undefined`) or to change the defaults. Each instance
|
|
2661
|
+
* owns its own copy so mutations from within `handleEvent` (e.g. `InsertTextHandler` updating
|
|
2662
|
+
* `updateSource`) never leak across handler instances.
|
|
2663
|
+
*/
|
|
2664
|
+
this.flushOptions = {
|
|
2665
|
+
bypassDebounce: true,
|
|
2666
|
+
recordHistory: true,
|
|
2667
|
+
updateSource: codeBlock.RTEUpdateSource.Default,
|
|
2668
|
+
};
|
|
2669
|
+
}
|
|
2632
2670
|
/**
|
|
2633
2671
|
* The function `execute` initializes the current state and selection, and then handles an event if provided.
|
|
2634
2672
|
*
|
|
2673
|
+
* Contract: `handleEvent` MUST be synchronous. A handler that mutates the value returns the
|
|
2674
|
+
* `CompositionStep[]` it applied through `applyComposition`; the flush is then routed through the
|
|
2675
|
+
* shared action pipeline. Handlers that do not mutate the value return nothing
|
|
2676
|
+
*
|
|
2635
2677
|
* @param {VegaRTEContent} currentState - The current state of the VegaRTE content.
|
|
2636
2678
|
* @param {SelectionController} selectionController - Manages the selection of items in the user interface.
|
|
2637
2679
|
* @param {HTMLElement} richTextEditor - The current rich text editor component
|
|
@@ -2640,7 +2682,20 @@ class BaseHandler {
|
|
|
2640
2682
|
execute(currentState, selectionController, richTextEditor, event) {
|
|
2641
2683
|
this.initCurrentStateAndSelection(currentState, selectionController);
|
|
2642
2684
|
this.setCurrentRichTextEditor(richTextEditor);
|
|
2643
|
-
this.handleEvent(event);
|
|
2685
|
+
const steps = this.handleEvent(event);
|
|
2686
|
+
this.applyComposition(steps);
|
|
2687
|
+
}
|
|
2688
|
+
/**
|
|
2689
|
+
* Applies the collected leaf actions as a single flushable `SequentialCompositionAction`, so the value
|
|
2690
|
+
* update and its flush run through the same action pipeline used by every other flushable operation.
|
|
2691
|
+
* Handlers call this before enqueuing selection so caret math reads post-apply node state.
|
|
2692
|
+
*
|
|
2693
|
+
* @param {CompositionStep[]} steps - The ordered leaf actions to apply against their own targets.
|
|
2694
|
+
*/
|
|
2695
|
+
applyComposition(steps) {
|
|
2696
|
+
if (Array.isArray(steps)) {
|
|
2697
|
+
this.currentState.apply(new SequentialCompositionAction(steps, this.flushOptions));
|
|
2698
|
+
}
|
|
2644
2699
|
}
|
|
2645
2700
|
/**
|
|
2646
2701
|
* The function `isRootContainer` checks if an HTML element is a root container with a class of 'rich-text-content'.
|
|
@@ -2729,25 +2784,40 @@ class InsertTextHandler extends BaseHandler {
|
|
|
2729
2784
|
* Update the state value when user type character
|
|
2730
2785
|
*
|
|
2731
2786
|
* @param {InputEvent} event - The input event object
|
|
2787
|
+
* @returns {Nullable<CompositionStep[]>} The content actions the base handler applies as one flushable unit.
|
|
2732
2788
|
*/
|
|
2733
2789
|
handleEvent(event) {
|
|
2790
|
+
// The composition input controller stamps its synthesized `beforeinput` events with the
|
|
2791
|
+
// composition update source; pick that up so the flush notification carries the right
|
|
2792
|
+
// source without the caller having to inspect the event.
|
|
2793
|
+
if (this.flushOptions) {
|
|
2794
|
+
this.flushOptions.updateSource =
|
|
2795
|
+
event[codeBlock.RTE_UPDATE_SOURCE_KEY] === codeBlock.RTEUpdateSource.Composition
|
|
2796
|
+
? codeBlock.RTEUpdateSource.Composition
|
|
2797
|
+
: codeBlock.RTEUpdateSource.Default;
|
|
2798
|
+
}
|
|
2734
2799
|
const text = event.data;
|
|
2735
2800
|
const currentRange = this.selectionController.getCurrentRange();
|
|
2736
2801
|
const { startContainer, startOffset } = currentRange;
|
|
2737
2802
|
const selectedNodes = this.selectionController.getSelectedNodes();
|
|
2803
|
+
const steps = [];
|
|
2804
|
+
// The caret move is appended as the final composition step so content + caret apply and flush atomically.
|
|
2805
|
+
let caretNode = null;
|
|
2806
|
+
let caretOffset = 0;
|
|
2807
|
+
let updateFlag = false;
|
|
2738
2808
|
if (selectedNodes.length < 2) {
|
|
2739
2809
|
if (!selectedNodes.length && this.isRootContainer(startContainer)) {
|
|
2740
|
-
|
|
2741
|
-
|
|
2810
|
+
caretNode = this.insertTextToRoot(text, steps);
|
|
2811
|
+
caretOffset = text.length;
|
|
2742
2812
|
}
|
|
2743
2813
|
else if (selectedNodes[0] instanceof codeBlock.RTETextNode) {
|
|
2744
2814
|
if (selectedNodes[0].isContentEditable()) {
|
|
2745
2815
|
let nextOffset = startOffset + text.length;
|
|
2746
|
-
let updateFlag = false;
|
|
2747
2816
|
let cursorNode = selectedNodes[0];
|
|
2748
2817
|
if (cursorNode.text === '\n') {
|
|
2749
|
-
cursorNode = this.insertTextToLineBreakNode(cursorNode, text);
|
|
2750
|
-
|
|
2818
|
+
cursorNode = this.insertTextToLineBreakNode(cursorNode, text, steps);
|
|
2819
|
+
// UpdateTextAction replaces the \n with the input, so the caret lands at the text end.
|
|
2820
|
+
nextOffset = text.length;
|
|
2751
2821
|
}
|
|
2752
2822
|
else {
|
|
2753
2823
|
if (startContainer.nodeValue === codeBlock.ZERO_WIDTH_SPACE &&
|
|
@@ -2756,40 +2826,54 @@ class InsertTextHandler extends BaseHandler {
|
|
|
2756
2826
|
startContainer.nodeValue = '';
|
|
2757
2827
|
nextOffset = nextOffset - codeBlock.ZERO_WIDTH_SPACE.length;
|
|
2758
2828
|
}
|
|
2759
|
-
|
|
2760
|
-
|
|
2761
|
-
|
|
2762
|
-
}
|
|
2829
|
+
steps.push({
|
|
2830
|
+
target: cursorNode,
|
|
2831
|
+
action: new imageExtension.ReplaceSelectedTextAction(text, currentRange),
|
|
2832
|
+
});
|
|
2763
2833
|
}
|
|
2764
|
-
|
|
2765
|
-
|
|
2834
|
+
caretNode = cursorNode;
|
|
2835
|
+
// Content applies later via the composition, so use the post-apply offset directly (no pre-apply clamp).
|
|
2836
|
+
caretOffset = nextOffset;
|
|
2766
2837
|
}
|
|
2767
2838
|
else {
|
|
2768
|
-
|
|
2839
|
+
steps.push({
|
|
2840
|
+
target: selectedNodes[0].parent,
|
|
2841
|
+
action: new InsertTextToDecoratorNodeAction(selectedNodes[0], text, startOffset),
|
|
2842
|
+
});
|
|
2769
2843
|
}
|
|
2770
2844
|
}
|
|
2771
2845
|
}
|
|
2772
2846
|
else {
|
|
2773
2847
|
// The selected nodes is multiple nodes
|
|
2774
2848
|
const cursorNode = this.removeSelectionRange(true);
|
|
2849
|
+
updateFlag = true;
|
|
2775
2850
|
if (cursorNode instanceof codeBlock.RTETextNode) {
|
|
2776
|
-
|
|
2777
|
-
|
|
2851
|
+
steps.push({ target: cursorNode, action: new imageExtension.ReplaceSelectedTextAction(text, currentRange) });
|
|
2852
|
+
caretNode = cursorNode;
|
|
2853
|
+
caretOffset = startOffset + text.length;
|
|
2778
2854
|
}
|
|
2779
2855
|
}
|
|
2856
|
+
if (caretNode) {
|
|
2857
|
+
steps.push({
|
|
2858
|
+
target: this.currentState,
|
|
2859
|
+
action: new contentState.UpdateCursorPositionAction(caretNode, caretOffset),
|
|
2860
|
+
});
|
|
2861
|
+
}
|
|
2862
|
+
return updateFlag || steps.length > 0 ? steps : undefined;
|
|
2780
2863
|
}
|
|
2781
2864
|
/**
|
|
2782
2865
|
* Insert the text in root element when root container is empty, should create text block and text node
|
|
2783
2866
|
*
|
|
2784
2867
|
* @param {string} text The insert text
|
|
2785
|
-
* @
|
|
2868
|
+
* @param {CompositionStep[]} steps The composition steps collector to append the update action to
|
|
2869
|
+
* @returns {Nullable<RTETextNode>} The new create text node
|
|
2786
2870
|
*/
|
|
2787
|
-
insertTextToRoot(text) {
|
|
2871
|
+
insertTextToRoot(text, steps) {
|
|
2788
2872
|
if (this.currentState &&
|
|
2789
2873
|
this.currentState.children[0] &&
|
|
2790
2874
|
this.currentState.children[0] instanceof codeBlock.RTETextBlock) {
|
|
2791
2875
|
const firstNode = this.currentState.children[0].children[0];
|
|
2792
|
-
|
|
2876
|
+
steps.push({ target: firstNode, action: new codeBlock.UpdateTextAction(text) });
|
|
2793
2877
|
return firstNode;
|
|
2794
2878
|
}
|
|
2795
2879
|
}
|
|
@@ -2798,20 +2882,24 @@ class InsertTextHandler extends BaseHandler {
|
|
|
2798
2882
|
*
|
|
2799
2883
|
* @param {RTETextNode} lineBreakNode The current line break node, the text value is \n
|
|
2800
2884
|
* @param {string} text The text need to insert
|
|
2885
|
+
* @param {CompositionStep[]} steps The composition steps collector to append the resulting action to
|
|
2801
2886
|
* @returns {Nullable<RTETextNode>} The new text node or the current line break node
|
|
2802
2887
|
*/
|
|
2803
|
-
insertTextToLineBreakNode(lineBreakNode, text) {
|
|
2888
|
+
insertTextToLineBreakNode(lineBreakNode, text, steps) {
|
|
2804
2889
|
const { startOffset, endOffset } = this.selectionController.getCurrentRange();
|
|
2805
2890
|
const textBlock = lineBreakNode.parent;
|
|
2806
2891
|
if (textBlock instanceof codeBlock.RTETextBlock) {
|
|
2807
2892
|
const index = textBlock.children.indexOf(lineBreakNode);
|
|
2808
2893
|
if (startOffset === 0 && startOffset === endOffset && textBlock.children[index + 1]) {
|
|
2809
2894
|
const newTextNode = lineBreakNode.cloneWithText(text);
|
|
2810
|
-
|
|
2895
|
+
steps.push({
|
|
2896
|
+
target: textBlock,
|
|
2897
|
+
action: new codeBlock.InsertChildrenBeforeAction(lineBreakNode, newTextNode),
|
|
2898
|
+
});
|
|
2811
2899
|
return newTextNode;
|
|
2812
2900
|
}
|
|
2813
2901
|
else {
|
|
2814
|
-
|
|
2902
|
+
steps.push({ target: lineBreakNode, action: new codeBlock.UpdateTextAction(text) });
|
|
2815
2903
|
return lineBreakNode;
|
|
2816
2904
|
}
|
|
2817
2905
|
}
|
|
@@ -2822,20 +2910,19 @@ class InsertTextHandler extends BaseHandler {
|
|
|
2822
2910
|
class InsertParagraphHandler extends BaseHandler {
|
|
2823
2911
|
/**
|
|
2824
2912
|
* Create new paragraph node and add node to state value
|
|
2913
|
+
*
|
|
2914
|
+
* @returns {CompositionStep[] | void} The content + caret steps applied atomically as one flushable composition.
|
|
2825
2915
|
*/
|
|
2826
2916
|
handleEvent() {
|
|
2827
2917
|
const selectedBlocks = this.selectionController.getSelectedBlocks();
|
|
2828
2918
|
if (selectedBlocks.length) {
|
|
2829
|
-
|
|
2830
|
-
this.breakSingleBlock();
|
|
2831
|
-
}
|
|
2832
|
-
else {
|
|
2833
|
-
this.breakMultipleBlocks();
|
|
2834
|
-
}
|
|
2919
|
+
return selectedBlocks.length < 2 ? this.breakSingleBlock() : this.breakMultipleBlocks();
|
|
2835
2920
|
}
|
|
2836
2921
|
}
|
|
2837
2922
|
/**
|
|
2838
2923
|
* Handles breaking blocks in an RTE editor based on the current selection and position.
|
|
2924
|
+
*
|
|
2925
|
+
* @returns {CompositionStep[]} The content + caret steps for the multi-block break.
|
|
2839
2926
|
*/
|
|
2840
2927
|
breakMultipleBlocks() {
|
|
2841
2928
|
const selectedBlocks = this.selectionController.getSelectedBlocks();
|
|
@@ -2873,36 +2960,71 @@ class InsertParagraphHandler extends BaseHandler {
|
|
|
2873
2960
|
*/
|
|
2874
2961
|
if (firstBlock.type !== lastBlock.type &&
|
|
2875
2962
|
range.startContainer.nodeType === range.endContainer.nodeType) {
|
|
2876
|
-
|
|
2877
|
-
|
|
2878
|
-
|
|
2879
|
-
|
|
2880
|
-
|
|
2963
|
+
const mergeStep = {
|
|
2964
|
+
target: firstBlock,
|
|
2965
|
+
action: new contentState.MergeTwoBlocksNodesAction(lastBlock),
|
|
2966
|
+
};
|
|
2967
|
+
// Split offset is read at apply time, after the merge step has run.
|
|
2968
|
+
// eslint-disable-next-line jsdoc/require-jsdoc
|
|
2969
|
+
const splitStep = () => ({
|
|
2970
|
+
target: firstBlock,
|
|
2971
|
+
action: new codeBlock.SplitBlockWithNodeAction(cursorNode, cursorNode['text'].length),
|
|
2972
|
+
});
|
|
2973
|
+
// eslint-disable-next-line jsdoc/require-jsdoc
|
|
2974
|
+
const caretStep = (context) => {
|
|
2975
|
+
const splitAction = context.getAction(codeBlock.ModifyContentActionType.SPLIT_BLOCK_WITH_NODE);
|
|
2976
|
+
if (splitAction) {
|
|
2977
|
+
return this.caretToNextElement(splitAction.newBlock);
|
|
2978
|
+
}
|
|
2979
|
+
};
|
|
2980
|
+
return [mergeStep, splitStep, caretStep];
|
|
2881
2981
|
}
|
|
2882
2982
|
}
|
|
2883
|
-
|
|
2983
|
+
return [
|
|
2984
|
+
{
|
|
2985
|
+
target: this.currentState,
|
|
2986
|
+
action: new contentState.UpdateCursorPositionAction(cursorNode, range.startOffset),
|
|
2987
|
+
},
|
|
2988
|
+
];
|
|
2884
2989
|
}
|
|
2885
2990
|
/**
|
|
2886
2991
|
* Handles breaking a single block in an RTE editor based on the current selection and position.
|
|
2992
|
+
*
|
|
2993
|
+
* @returns {CompositionStep[]} The content + caret steps for the single-block break.
|
|
2887
2994
|
*/
|
|
2888
2995
|
breakSingleBlock() {
|
|
2889
2996
|
const cursorNode = this.removeSelectionRange();
|
|
2890
2997
|
const currentBlock = cursorNode instanceof codeBlock.RTENode ? cursorNode.parent : cursorNode;
|
|
2891
2998
|
const { startOffset } = this.selectionController.getCurrentRange();
|
|
2999
|
+
let result = [];
|
|
2892
3000
|
if (currentBlock) {
|
|
2893
|
-
const
|
|
2894
|
-
|
|
2895
|
-
|
|
3001
|
+
const breakStep = {
|
|
3002
|
+
target: currentBlock,
|
|
3003
|
+
action: new contentState.InsertNewParagraphAction(cursorNode, startOffset),
|
|
3004
|
+
};
|
|
3005
|
+
// eslint-disable-next-line jsdoc/require-jsdoc
|
|
3006
|
+
const caretStep = (context) => {
|
|
3007
|
+
const breakAction = context.getAction(codeBlock.ModifyContentActionType.INSERT_NEW_PARAGRAPH);
|
|
3008
|
+
if (breakAction) {
|
|
3009
|
+
return this.caretToNextElement(breakAction.newBlock);
|
|
3010
|
+
}
|
|
3011
|
+
};
|
|
3012
|
+
result = [breakStep, caretStep];
|
|
2896
3013
|
}
|
|
3014
|
+
return result;
|
|
2897
3015
|
}
|
|
2898
3016
|
/**
|
|
2899
|
-
*
|
|
3017
|
+
* Builds the caret operation that moves onto the first child of the newly created block.
|
|
2900
3018
|
*
|
|
2901
|
-
* @param {RTEBlock} newBlock -
|
|
3019
|
+
* @param {Nullable<RTEBlock>} newBlock - The block created by the break, or null when none was created.
|
|
3020
|
+
* @returns {CompositionOperation | void} The caret operation, or nothing when there is no target block.
|
|
2902
3021
|
*/
|
|
2903
|
-
|
|
3022
|
+
caretToNextElement(newBlock) {
|
|
2904
3023
|
if (newBlock && newBlock.children) {
|
|
2905
|
-
|
|
3024
|
+
return {
|
|
3025
|
+
target: this.currentState,
|
|
3026
|
+
action: new contentState.UpdateCursorPositionAction(newBlock.children[0], 0),
|
|
3027
|
+
};
|
|
2906
3028
|
}
|
|
2907
3029
|
}
|
|
2908
3030
|
}
|
|
@@ -2938,20 +3060,16 @@ class lineBreakMultipleBlocksAction extends codeBlock.ModifyContentAction {
|
|
|
2938
3060
|
class InsertLineBreakHandler extends BaseHandler {
|
|
2939
3061
|
/**
|
|
2940
3062
|
* Create new line break node and add node to state value
|
|
3063
|
+
*
|
|
3064
|
+
* @returns {Nullable<CompositionStep[]>} The content + caret steps applied atomically as one flushable composition.
|
|
2941
3065
|
*/
|
|
2942
3066
|
handleEvent() {
|
|
2943
|
-
const range = this.selectionController.getCurrentRange();
|
|
2944
3067
|
const selectedBlocks = this.selectionController.getSelectedBlocks();
|
|
2945
|
-
if (this.isRootContainer(range.startContainer)) {
|
|
2946
|
-
this.breakNewBlock();
|
|
2947
|
-
}
|
|
2948
3068
|
if (selectedBlocks.length) {
|
|
2949
|
-
|
|
2950
|
-
|
|
2951
|
-
|
|
2952
|
-
|
|
2953
|
-
this.breakMultipleBlocks();
|
|
2954
|
-
}
|
|
3069
|
+
return selectedBlocks.length < 2 ? this.breakSingleBlock() : this.breakMultipleBlocks();
|
|
3070
|
+
}
|
|
3071
|
+
else if (this.isRootContainer(this.selectionController.getCurrentRange().startContainer)) {
|
|
3072
|
+
return this.breakNewBlock();
|
|
2955
3073
|
}
|
|
2956
3074
|
}
|
|
2957
3075
|
/**
|
|
@@ -2960,14 +3078,19 @@ class InsertLineBreakHandler extends BaseHandler {
|
|
|
2960
3078
|
* <span></span>
|
|
2961
3079
|
* <span></span>
|
|
2962
3080
|
* </p>
|
|
3081
|
+
*
|
|
3082
|
+
* @returns {Nullable<CompositionStep[]>} The content + caret steps for the empty root break.
|
|
2963
3083
|
*/
|
|
2964
3084
|
breakNewBlock() {
|
|
2965
3085
|
if (this.currentState &&
|
|
2966
3086
|
this.currentState.children[0] &&
|
|
2967
3087
|
this.currentState.children[0] instanceof codeBlock.RTETextBlock) {
|
|
2968
|
-
const
|
|
2969
|
-
|
|
2970
|
-
|
|
3088
|
+
const targetBlock = this.currentState.children[0];
|
|
3089
|
+
const lineBreakStep = {
|
|
3090
|
+
target: targetBlock,
|
|
3091
|
+
action: new LineBreakSingleBlockAction(targetBlock.children[0], 0),
|
|
3092
|
+
};
|
|
3093
|
+
return [lineBreakStep, this.caretToSingleBlockNextNode()];
|
|
2971
3094
|
}
|
|
2972
3095
|
}
|
|
2973
3096
|
/**
|
|
@@ -2981,36 +3104,68 @@ class InsertLineBreakHandler extends BaseHandler {
|
|
|
2981
3104
|
* <br>
|
|
2982
3105
|
* <span>xt</span>
|
|
2983
3106
|
* </p>
|
|
3107
|
+
*
|
|
3108
|
+
* @returns {CompositionStep[]} The content + caret steps for the single-block break.
|
|
2984
3109
|
*/
|
|
2985
3110
|
breakSingleBlock() {
|
|
2986
3111
|
const range = this.selectionController.getCurrentRange();
|
|
2987
3112
|
const cursorNode = this.removeSelectionRange();
|
|
2988
3113
|
const currentBlock = cursorNode.parent;
|
|
3114
|
+
let result = [];
|
|
2989
3115
|
if (currentBlock) {
|
|
2990
|
-
const
|
|
2991
|
-
|
|
2992
|
-
|
|
2993
|
-
|
|
2994
|
-
|
|
3116
|
+
const contentStep = {
|
|
3117
|
+
target: currentBlock,
|
|
3118
|
+
action: new LineBreakSingleBlockAction(cursorNode, range.startOffset),
|
|
3119
|
+
};
|
|
3120
|
+
result = [contentStep, this.caretToSingleBlockNextNode()];
|
|
2995
3121
|
}
|
|
3122
|
+
return result;
|
|
2996
3123
|
}
|
|
2997
3124
|
/**
|
|
2998
3125
|
* Handles breaking blocks in an RTE editor based on the current selection and position.
|
|
3126
|
+
*
|
|
3127
|
+
* @returns {CompositionStep[]} The content + caret steps for the multi-block break.
|
|
2999
3128
|
*/
|
|
3000
3129
|
breakMultipleBlocks() {
|
|
3001
3130
|
const selectedBlocks = this.selectionController.getSelectedBlocks();
|
|
3002
3131
|
const cursorNode = this.removeSelectionRange();
|
|
3003
|
-
const
|
|
3004
|
-
|
|
3005
|
-
|
|
3132
|
+
const contentStep = {
|
|
3133
|
+
target: cursorNode.parent,
|
|
3134
|
+
action: new lineBreakMultipleBlocksAction(selectedBlocks),
|
|
3135
|
+
};
|
|
3136
|
+
// eslint-disable-next-line jsdoc/require-jsdoc
|
|
3137
|
+
const caretStep = (context) => {
|
|
3138
|
+
const lineBreakAction = context.getAction(codeBlock.ModifyContentActionType.LINE_BREAK_MULTIPLE_BLOCKS);
|
|
3139
|
+
if (lineBreakAction && lineBreakAction.lineBreakNode) {
|
|
3140
|
+
return this.caretOperationToNextNode(lineBreakAction.lineBreakNode);
|
|
3141
|
+
}
|
|
3142
|
+
};
|
|
3143
|
+
return [contentStep, caretStep];
|
|
3144
|
+
}
|
|
3145
|
+
/**
|
|
3146
|
+
* Builds the caret step that reads the applied single-block line break to place the caret after it.
|
|
3147
|
+
*
|
|
3148
|
+
* @returns {CompositionStep} The dependent caret step.
|
|
3149
|
+
*/
|
|
3150
|
+
caretToSingleBlockNextNode() {
|
|
3151
|
+
return (context) => {
|
|
3152
|
+
const lineBreakAction = context.getAction(codeBlock.ModifyContentActionType.LINE_BREAK_SINGLE_BLOCK);
|
|
3153
|
+
if (lineBreakAction && lineBreakAction.lineBreakNode) {
|
|
3154
|
+
return this.caretOperationToNextNode(lineBreakAction.lineBreakNode);
|
|
3155
|
+
}
|
|
3156
|
+
};
|
|
3006
3157
|
}
|
|
3007
3158
|
/**
|
|
3008
|
-
*
|
|
3159
|
+
* Builds the caret operation that moves onto the node following the inserted line break.
|
|
3009
3160
|
*
|
|
3010
|
-
* @param {RTENode} lineBreakNode -
|
|
3161
|
+
* @param {RTENode} lineBreakNode - The inserted line break node.
|
|
3162
|
+
* @returns {CompositionOperation} The caret operation.
|
|
3011
3163
|
*/
|
|
3012
|
-
|
|
3013
|
-
|
|
3164
|
+
caretOperationToNextNode(lineBreakNode) {
|
|
3165
|
+
return {
|
|
3166
|
+
target: this.currentState,
|
|
3167
|
+
action: new contentState.UpdateCursorPositionAction(this.getNextRTENode(lineBreakNode), 0),
|
|
3168
|
+
};
|
|
3014
3169
|
}
|
|
3015
3170
|
/**
|
|
3016
3171
|
* Returns the next sibling node of a given block element in a rich text editor.
|
|
@@ -3047,15 +3202,76 @@ class DeleteBlockContentAction extends codeBlock.ModifyContentAction {
|
|
|
3047
3202
|
class AbstractDeleteContentHandler extends BaseHandler {
|
|
3048
3203
|
/**
|
|
3049
3204
|
* Delete the selected node(s) from the current state.
|
|
3205
|
+
*
|
|
3206
|
+
* @returns {CompositionStep[]} The content + caret steps applied atomically as one flushable composition.
|
|
3050
3207
|
*/
|
|
3051
3208
|
handleEvent() {
|
|
3052
3209
|
const selectedBlocks = this.selectionController.getSelectedBlocks();
|
|
3053
3210
|
if (selectedBlocks.length >= 2) {
|
|
3054
3211
|
this.deleteContentWithMultipleNodes();
|
|
3212
|
+
return [];
|
|
3055
3213
|
}
|
|
3056
|
-
|
|
3057
|
-
|
|
3058
|
-
|
|
3214
|
+
return this.deleteContentWithSingleBlock();
|
|
3215
|
+
}
|
|
3216
|
+
/**
|
|
3217
|
+
* Builds the ordered steps for a single-block deletion: the delete runs first, then a caret step
|
|
3218
|
+
* reads the delete action's post-apply `previousNode`/`nextNode` to decide where the caret lands.
|
|
3219
|
+
*
|
|
3220
|
+
* @param {RTENode} resolvedNode - The node the deletion is anchored on.
|
|
3221
|
+
* @param {number} resolvedOffset - The caret offset within `resolvedNode` at deletion time.
|
|
3222
|
+
* @param {Nullable<RTENode>} caretAnchor - A node the caret must stay on regardless of the delete result.
|
|
3223
|
+
* @returns {CompositionStep[]} The delete step followed by the dependent caret step.
|
|
3224
|
+
*/
|
|
3225
|
+
buildDeleteSteps(resolvedNode, resolvedOffset, caretAnchor) {
|
|
3226
|
+
// eslint-disable-next-line jsdoc/require-jsdoc
|
|
3227
|
+
const deleteStep = () => ({
|
|
3228
|
+
target: resolvedNode.parent,
|
|
3229
|
+
action: new DeleteBlockContentAction(resolvedNode, resolvedOffset),
|
|
3230
|
+
});
|
|
3231
|
+
// eslint-disable-next-line jsdoc/require-jsdoc
|
|
3232
|
+
const caretStep = (context) => {
|
|
3233
|
+
if (caretAnchor) {
|
|
3234
|
+
// A non-editable anchor (e.g. a token) expresses its caret position at the parent-block
|
|
3235
|
+
// level, so use its index within the parent to land right before it instead of jumping
|
|
3236
|
+
// to the block start.
|
|
3237
|
+
const caretOffset = caretAnchor.isContentEditable()
|
|
3238
|
+
? 0
|
|
3239
|
+
: caretAnchor.parent.children.indexOf(caretAnchor);
|
|
3240
|
+
return {
|
|
3241
|
+
target: this.currentState,
|
|
3242
|
+
action: new contentState.UpdateCursorPositionAction(caretAnchor, caretOffset),
|
|
3243
|
+
};
|
|
3244
|
+
}
|
|
3245
|
+
const deleteAction = context.getAction(codeBlock.ModifyContentActionType.DELETE_BLOCK_CONTENT);
|
|
3246
|
+
if (deleteAction && deleteAction.previousNode) {
|
|
3247
|
+
const nextOffset = deleteAction.previousNode === resolvedNode
|
|
3248
|
+
? Math.max(0, resolvedOffset - 1)
|
|
3249
|
+
: deleteAction.previousNode.getRangeEndOffset();
|
|
3250
|
+
return {
|
|
3251
|
+
target: this.currentState,
|
|
3252
|
+
action: new contentState.UpdateCursorPositionAction(deleteAction.previousNode, nextOffset),
|
|
3253
|
+
};
|
|
3254
|
+
}
|
|
3255
|
+
if (deleteAction && deleteAction.nextNode) {
|
|
3256
|
+
return {
|
|
3257
|
+
target: this.currentState,
|
|
3258
|
+
action: new contentState.UpdateCursorPositionAction(deleteAction.nextNode, 0),
|
|
3259
|
+
};
|
|
3260
|
+
}
|
|
3261
|
+
if (this.currentState.children.length === 0) {
|
|
3262
|
+
// Add an empty paragraph if the delete removed all content to keep a valid caret position.
|
|
3263
|
+
const paragraph = this.createEmptyParagraph();
|
|
3264
|
+
return [
|
|
3265
|
+
{ target: this.currentState, action: new codeBlock.AppendChildrenAction([paragraph]) },
|
|
3266
|
+
{
|
|
3267
|
+
target: this.currentState,
|
|
3268
|
+
action: new contentState.UpdateCursorPositionAction(paragraph.children[0], 1),
|
|
3269
|
+
},
|
|
3270
|
+
];
|
|
3271
|
+
}
|
|
3272
|
+
return undefined;
|
|
3273
|
+
};
|
|
3274
|
+
return [deleteStep, caretStep];
|
|
3059
3275
|
}
|
|
3060
3276
|
/**
|
|
3061
3277
|
* Computes the caret position one step to the right, used to translate a forward delete into a backspace.
|
|
@@ -3184,27 +3400,21 @@ class AbstractDeleteContentHandler extends BaseHandler {
|
|
|
3184
3400
|
block.parent.apply(new codeBlock.RemoveChildrenAction(block));
|
|
3185
3401
|
}
|
|
3186
3402
|
}
|
|
3187
|
-
/**
|
|
3188
|
-
* Creates a new paragraph element with a text node and appends it to the current state.
|
|
3189
|
-
*/
|
|
3190
|
-
insertDefaultParagraph() {
|
|
3191
|
-
const paragraph = this.createEmptyParagraph();
|
|
3192
|
-
this.currentState.apply(new codeBlock.AppendChildrenAction([paragraph]));
|
|
3193
|
-
this.selectionController.enqueueSelectionRangeFutureState(paragraph.children[0], 1);
|
|
3194
|
-
}
|
|
3195
3403
|
}
|
|
3196
3404
|
|
|
3197
3405
|
/** Handles a delete (rightward) deletion of content within a VegaRTE editor. User press delete will trigger this method */
|
|
3198
3406
|
class ForwardDeleteContentHandler extends AbstractDeleteContentHandler {
|
|
3199
3407
|
/**
|
|
3200
3408
|
* Handles a delete (rightward) deletion of content within a single block in an RTE editor.
|
|
3409
|
+
*
|
|
3410
|
+
* @returns {Nullable<CompositionStep[]>} The delete + caret steps, empty when the deletion is delegated or a no-op.
|
|
3201
3411
|
*/
|
|
3202
3412
|
deleteContentWithSingleBlock() {
|
|
3203
3413
|
const range = this.selectionController.getCurrentRange();
|
|
3204
3414
|
const { startOffset, endOffset, startContainer, endContainer } = range;
|
|
3205
3415
|
if (startOffset !== endOffset || startContainer !== endContainer) {
|
|
3206
3416
|
this.deleteContentWithMultipleNodes();
|
|
3207
|
-
return;
|
|
3417
|
+
return [];
|
|
3208
3418
|
}
|
|
3209
3419
|
const targetNode = this.selectionController.getSelectedNodes()[0];
|
|
3210
3420
|
// The node that should hold the caret after a forward delete removes a non-editable
|
|
@@ -3228,7 +3438,8 @@ class ForwardDeleteContentHandler extends AbstractDeleteContentHandler {
|
|
|
3228
3438
|
const forwardPosition = this.getForwardDeletePosition(targetNode, startOffset);
|
|
3229
3439
|
// The caret is at the very end of the content, there is nothing to delete forward.
|
|
3230
3440
|
if (!forwardPosition) {
|
|
3231
|
-
return
|
|
3441
|
+
// Nothing changes, so we return undefined to indicate no composition steps are needed.
|
|
3442
|
+
return undefined;
|
|
3232
3443
|
}
|
|
3233
3444
|
// Mirror backspace at heterogeneous block boundaries: a forward delete that crosses
|
|
3234
3445
|
// into a following block of a different type (e.g. paragraph → list-item, or into an
|
|
@@ -3239,8 +3450,11 @@ class ForwardDeleteContentHandler extends AbstractDeleteContentHandler {
|
|
|
3239
3450
|
if (targetNode &&
|
|
3240
3451
|
forwardPosition.node.parent !== targetNode.parent &&
|
|
3241
3452
|
forwardPosition.node.parent.type !== targetNode.parent.type) {
|
|
3242
|
-
|
|
3243
|
-
|
|
3453
|
+
const caretOperation = {
|
|
3454
|
+
target: this.currentState,
|
|
3455
|
+
action: new contentState.UpdateCursorPositionAction(forwardPosition.node, 0),
|
|
3456
|
+
};
|
|
3457
|
+
return [caretOperation];
|
|
3244
3458
|
}
|
|
3245
3459
|
// When the caret sits at the start of a non-editable leading node (e.g. a function
|
|
3246
3460
|
// keyword or a token), a forward delete removes that node. Visually the caret stays
|
|
@@ -3255,34 +3469,9 @@ class ForwardDeleteContentHandler extends AbstractDeleteContentHandler {
|
|
|
3255
3469
|
}
|
|
3256
3470
|
/* istanbul ignore next */
|
|
3257
3471
|
if (!resolvedNode) {
|
|
3258
|
-
return;
|
|
3259
|
-
}
|
|
3260
|
-
const deleteAction = new DeleteBlockContentAction(resolvedNode, resolvedOffset);
|
|
3261
|
-
resolvedNode.parent.apply(deleteAction);
|
|
3262
|
-
if (forwardCaretAnchor) {
|
|
3263
|
-
// A non-editable anchor (e.g. a token) expresses its caret position at the
|
|
3264
|
-
// parent-block level: its range container is the parent element, so an offset of
|
|
3265
|
-
// 0 would put the caret at the very start of the block (jumping to the far left)
|
|
3266
|
-
// instead of just before the anchor. Use the anchor's index within its parent so
|
|
3267
|
-
// the caret lands right before it, on the spot the deleted node used to occupy.
|
|
3268
|
-
const forwardCaretOffset = forwardCaretAnchor.isContentEditable()
|
|
3269
|
-
? 0
|
|
3270
|
-
: forwardCaretAnchor.parent.children.indexOf(forwardCaretAnchor);
|
|
3271
|
-
this.selectionController.enqueueSelectionRangeFutureState(forwardCaretAnchor, forwardCaretOffset);
|
|
3272
|
-
}
|
|
3273
|
-
else if (deleteAction.previousNode) {
|
|
3274
|
-
const nextOffset = deleteAction.previousNode === resolvedNode
|
|
3275
|
-
? Math.max(0, resolvedOffset - 1)
|
|
3276
|
-
: deleteAction.previousNode.getRangeEndOffset();
|
|
3277
|
-
this.selectionController.enqueueSelectionRangeFutureState(deleteAction.previousNode, nextOffset);
|
|
3278
|
-
}
|
|
3279
|
-
else if (deleteAction.nextNode) {
|
|
3280
|
-
this.selectionController.enqueueSelectionRangeFutureState(deleteAction.nextNode, 0);
|
|
3281
|
-
}
|
|
3282
|
-
else if (this.currentState.children.length === 0) {
|
|
3283
|
-
// Add a empty paragraph if delete all content to make sure the caret position
|
|
3284
|
-
this.insertDefaultParagraph();
|
|
3472
|
+
return [];
|
|
3285
3473
|
}
|
|
3474
|
+
return this.buildDeleteSteps(resolvedNode, resolvedOffset, forwardCaretAnchor);
|
|
3286
3475
|
}
|
|
3287
3476
|
}
|
|
3288
3477
|
|
|
@@ -3290,33 +3479,21 @@ class ForwardDeleteContentHandler extends AbstractDeleteContentHandler {
|
|
|
3290
3479
|
class BackwardDeleteContentHandler extends AbstractDeleteContentHandler {
|
|
3291
3480
|
/**
|
|
3292
3481
|
* Handles a backspace (leftward) deletion of content within a single block in an RTE editor.
|
|
3482
|
+
*
|
|
3483
|
+
* @returns {Nullable<CompositionStep[]>} The delete + caret steps, empty when the deletion is delegated or a no-op.
|
|
3293
3484
|
*/
|
|
3294
3485
|
deleteContentWithSingleBlock() {
|
|
3295
3486
|
const range = this.selectionController.getCurrentRange();
|
|
3296
3487
|
const { startOffset, endOffset, startContainer, endContainer } = range;
|
|
3297
3488
|
if (startOffset !== endOffset || startContainer !== endContainer) {
|
|
3298
3489
|
this.deleteContentWithMultipleNodes();
|
|
3299
|
-
return;
|
|
3490
|
+
return [];
|
|
3300
3491
|
}
|
|
3301
3492
|
const targetNode = this.selectionController.getSelectedNodes()[0];
|
|
3302
3493
|
if (!targetNode) {
|
|
3303
3494
|
return;
|
|
3304
3495
|
}
|
|
3305
|
-
|
|
3306
|
-
targetNode.parent.apply(deleteAction);
|
|
3307
|
-
if (deleteAction.previousNode) {
|
|
3308
|
-
const nextOffset = deleteAction.previousNode === targetNode
|
|
3309
|
-
? Math.max(0, startOffset - 1)
|
|
3310
|
-
: deleteAction.previousNode.getRangeEndOffset();
|
|
3311
|
-
this.selectionController.enqueueSelectionRangeFutureState(deleteAction.previousNode, nextOffset);
|
|
3312
|
-
}
|
|
3313
|
-
else if (deleteAction.nextNode) {
|
|
3314
|
-
this.selectionController.enqueueSelectionRangeFutureState(deleteAction.nextNode, 0);
|
|
3315
|
-
}
|
|
3316
|
-
else if (this.currentState.children.length === 0) {
|
|
3317
|
-
// Add a empty paragraph if delete all content to make sure the caret position
|
|
3318
|
-
this.insertDefaultParagraph();
|
|
3319
|
-
}
|
|
3496
|
+
return this.buildDeleteSteps(targetNode, startOffset, null);
|
|
3320
3497
|
}
|
|
3321
3498
|
}
|
|
3322
3499
|
|
|
@@ -3346,53 +3523,57 @@ class InsertPasteHandler extends BaseHandler {
|
|
|
3346
3523
|
* Update the state value when user paste html elements.
|
|
3347
3524
|
*
|
|
3348
3525
|
* @param {InputEvent} event - Paste event.
|
|
3526
|
+
* @returns {CompositionStep[]} The content + caret steps applied atomically as one flushable composition.
|
|
3349
3527
|
*/
|
|
3350
3528
|
handleEvent(event) {
|
|
3351
3529
|
const currentRange = this.selectionController.getCurrentRange();
|
|
3352
3530
|
const payload = this.getPastePayload(event);
|
|
3353
|
-
|
|
3354
|
-
|
|
3531
|
+
const inlineSteps = this.insertPlainTextInline(payload, currentRange);
|
|
3532
|
+
if (inlineSteps) {
|
|
3533
|
+
return inlineSteps;
|
|
3355
3534
|
}
|
|
3356
|
-
const blocks = this.parsePastedElements(event);
|
|
3535
|
+
const blocks = this.parsePastedElements(event, currentRange);
|
|
3357
3536
|
const startContainer = (currentRange === null || currentRange === void 0 ? void 0 : currentRange.startContainer) || undefined;
|
|
3358
3537
|
if (!startContainer) {
|
|
3359
3538
|
// When the selection/range is unavailable (e.g. the caret was lost while
|
|
3360
3539
|
// the paste-mode chooser had focus), still append the pasted content to
|
|
3361
3540
|
// the root so the paste is never silently dropped.
|
|
3362
|
-
this.insertBlocksToRoot(blocks);
|
|
3541
|
+
return this.insertBlocksToRoot(blocks);
|
|
3363
3542
|
}
|
|
3364
|
-
|
|
3365
|
-
this.insertBlocksToRoot(blocks);
|
|
3543
|
+
if (this.isRootContainer(startContainer)) {
|
|
3366
3544
|
// TODO: Need to check below logic, it seems not correct https://gethired.atlassian.net/browse/VD-7779
|
|
3545
|
+
return this.insertBlocksToRoot(blocks);
|
|
3367
3546
|
}
|
|
3368
|
-
|
|
3369
|
-
this.insertBlocksBeforeEmptyBlock(blocks, currentRange);
|
|
3370
|
-
}
|
|
3371
|
-
else {
|
|
3372
|
-
this.insertBlocksToContent(blocks, currentRange);
|
|
3547
|
+
if (this.isEmptyParagraph(startContainer)) {
|
|
3548
|
+
return this.insertBlocksBeforeEmptyBlock(blocks, currentRange);
|
|
3373
3549
|
}
|
|
3550
|
+
return this.insertBlocksToContent(blocks, currentRange);
|
|
3374
3551
|
}
|
|
3375
3552
|
/**
|
|
3376
3553
|
* Inserts plain-text paste content into the current text node at caret position.
|
|
3377
3554
|
*
|
|
3378
3555
|
* @param {RTEPastePayload} payload - Clipboard payload.
|
|
3379
3556
|
* @param {RTERange} currentRange - Current selection range.
|
|
3380
|
-
* @returns {
|
|
3557
|
+
* @returns {CompositionStep[] | undefined} The content + caret steps when inline insertion applies, otherwise undefined.
|
|
3381
3558
|
*/
|
|
3382
3559
|
insertPlainTextInline(payload, currentRange) {
|
|
3383
3560
|
var _a, _b;
|
|
3384
3561
|
const selectedNodes = ((_b = (_a = this.selectionController).getSelectedNodes) === null || _b === void 0 ? void 0 : _b.call(_a)) || [];
|
|
3385
3562
|
if (!this.shouldPasteAsInlinePlainText(payload, currentRange, selectedNodes)) {
|
|
3386
|
-
return
|
|
3563
|
+
return undefined;
|
|
3387
3564
|
}
|
|
3388
3565
|
const text = payload.text.replace(/\r\n?/g, '\n');
|
|
3389
3566
|
const cursorNode = selectedNodes.find((node) => node instanceof codeBlock.RTETextNode) || currentRange.startNode;
|
|
3390
3567
|
if (!(cursorNode instanceof codeBlock.RTETextNode)) {
|
|
3391
|
-
return
|
|
3568
|
+
return undefined;
|
|
3392
3569
|
}
|
|
3393
|
-
|
|
3394
|
-
|
|
3395
|
-
|
|
3570
|
+
return [
|
|
3571
|
+
{ target: cursorNode, action: new imageExtension.ReplaceSelectedTextAction(text, currentRange) },
|
|
3572
|
+
{
|
|
3573
|
+
target: this.currentState,
|
|
3574
|
+
action: new contentState.UpdateCursorPositionAction(cursorNode, currentRange.startOffset + text.length),
|
|
3575
|
+
},
|
|
3576
|
+
];
|
|
3396
3577
|
}
|
|
3397
3578
|
/**
|
|
3398
3579
|
* Determines whether the payload should be inserted as inline plain text.
|
|
@@ -3457,68 +3638,116 @@ class InsertPasteHandler extends BaseHandler {
|
|
|
3457
3638
|
* Insert the blocks to root
|
|
3458
3639
|
*
|
|
3459
3640
|
* @param { RTEContentBlock[]} blocks - blocks
|
|
3641
|
+
* @returns {CompositionStep[]} The append step for the root.
|
|
3460
3642
|
*/
|
|
3461
3643
|
insertBlocksToRoot(blocks) {
|
|
3462
|
-
this.currentState
|
|
3644
|
+
return [{ target: this.currentState, action: new codeBlock.AppendChildrenAction(blocks) }];
|
|
3463
3645
|
}
|
|
3464
3646
|
/**
|
|
3465
3647
|
* Insert the blocks into the current content block at the specified range.
|
|
3466
3648
|
*
|
|
3467
3649
|
* @param { RTEContentBlock[]} blocks - blocks
|
|
3468
3650
|
* @param { RTERange } rteRange - rteRange
|
|
3651
|
+
* @returns {CompositionStep[]} The content + caret steps for the content branch.
|
|
3469
3652
|
*/
|
|
3470
3653
|
insertBlocksToContent(blocks, rteRange) {
|
|
3471
|
-
var _a;
|
|
3472
3654
|
const isCollapsedRange = rteRange.startNode === rteRange.endNode && rteRange.startOffset === rteRange.endOffset;
|
|
3473
3655
|
const cursorNode = isCollapsedRange
|
|
3474
3656
|
? rteRange.startNode
|
|
3475
3657
|
: this.removeSelectionRange();
|
|
3476
3658
|
if (cursorNode && cursorNode.parent) {
|
|
3477
|
-
const
|
|
3478
|
-
|
|
3479
|
-
|
|
3480
|
-
|
|
3481
|
-
|
|
3482
|
-
|
|
3483
|
-
|
|
3484
|
-
|
|
3485
|
-
|
|
3486
|
-
|
|
3487
|
-
|
|
3488
|
-
|
|
3489
|
-
|
|
3659
|
+
const contentStep = {
|
|
3660
|
+
target: cursorNode.parent,
|
|
3661
|
+
action: new PasteContentAction(blocks, cursorNode, rteRange.startOffset, rteRange),
|
|
3662
|
+
};
|
|
3663
|
+
// eslint-disable-next-line jsdoc/require-jsdoc
|
|
3664
|
+
const caretStep = (context) => {
|
|
3665
|
+
var _a;
|
|
3666
|
+
const pasteAction = context.getAction(codeBlock.ModifyContentActionType.PASTE_CONTENT);
|
|
3667
|
+
if (pasteAction && pasteAction.futureFocusNode) {
|
|
3668
|
+
return {
|
|
3669
|
+
target: this.currentState,
|
|
3670
|
+
action: new contentState.UpdateCursorPositionAction(pasteAction.futureFocusNode, (_a = pasteAction.futureFocusNodeOffset) !== null && _a !== void 0 ? _a : 0),
|
|
3671
|
+
};
|
|
3672
|
+
}
|
|
3673
|
+
if (pasteAction && pasteAction.futureFocusBlock) {
|
|
3674
|
+
return this.caretToBlockOperation(pasteAction.futureFocusBlock, pasteAction.futureFocusAtEnd);
|
|
3675
|
+
}
|
|
3676
|
+
};
|
|
3677
|
+
return [contentStep, caretStep];
|
|
3490
3678
|
}
|
|
3679
|
+
// No resolvable cursor position: fall back to appending at the root so
|
|
3680
|
+
// the pasted content is preserved instead of being discarded.
|
|
3681
|
+
return this.insertBlocksToRoot(blocks);
|
|
3491
3682
|
}
|
|
3492
3683
|
/**
|
|
3493
3684
|
* Insert the blocks before to current block
|
|
3494
3685
|
*
|
|
3495
3686
|
* @param { RTEContentBlock[]} blocks - blocks
|
|
3496
3687
|
* @param { RTERange } rteRange - rteRange
|
|
3688
|
+
* @returns {CompositionStep[]} The content + caret steps for the empty-paragraph branch.
|
|
3497
3689
|
*/
|
|
3498
3690
|
insertBlocksBeforeEmptyBlock(blocks, rteRange) {
|
|
3499
3691
|
const cursorNode = this.removeSelectionRange();
|
|
3500
3692
|
const currentBlock = cursorNode === null || cursorNode === void 0 ? void 0 : cursorNode.parent;
|
|
3501
3693
|
if (currentBlock) {
|
|
3502
|
-
const
|
|
3503
|
-
|
|
3504
|
-
|
|
3505
|
-
|
|
3506
|
-
|
|
3507
|
-
|
|
3508
|
-
|
|
3509
|
-
|
|
3510
|
-
|
|
3511
|
-
|
|
3694
|
+
const contentStep = {
|
|
3695
|
+
target: currentBlock,
|
|
3696
|
+
action: new PasteContentAction(blocks, cursorNode, 0, rteRange),
|
|
3697
|
+
};
|
|
3698
|
+
// eslint-disable-next-line jsdoc/require-jsdoc
|
|
3699
|
+
const caretStep = (context) => {
|
|
3700
|
+
const pasteAction = context.getAction(codeBlock.ModifyContentActionType.PASTE_CONTENT);
|
|
3701
|
+
if (pasteAction && pasteAction.futureFocusBlock) {
|
|
3702
|
+
return this.caretToBlockOperation(pasteAction.futureFocusBlock, pasteAction.futureFocusAtEnd);
|
|
3703
|
+
}
|
|
3704
|
+
};
|
|
3705
|
+
return [contentStep, caretStep];
|
|
3512
3706
|
}
|
|
3707
|
+
// No resolvable empty block: fall back to appending at the root so the
|
|
3708
|
+
// pasted content is preserved instead of being discarded.
|
|
3709
|
+
return this.insertBlocksToRoot(blocks);
|
|
3513
3710
|
}
|
|
3514
3711
|
/**
|
|
3515
3712
|
* Format and parse elements from user paste with simple style preservation.
|
|
3516
3713
|
*
|
|
3517
3714
|
* @param {InputEvent} event - Paste event.
|
|
3715
|
+
* @param {RTERange} [currentRange] - Optional range used to resolve the paste location.
|
|
3518
3716
|
* @returns {RTEContentBlock[]} - RTEContentBlock.
|
|
3519
3717
|
*/
|
|
3520
|
-
parsePastedElements(event) {
|
|
3718
|
+
parsePastedElements(event, currentRange) {
|
|
3719
|
+
var _a;
|
|
3521
3720
|
const payload = this.getPastePayload(event);
|
|
3721
|
+
if (payload.type === codeBlock.RTE_PASTE_MODE_PLAIN) {
|
|
3722
|
+
// Native tables encode their layout as tab-separated cells (one row per line) in
|
|
3723
|
+
// text/plain, so pasting that verbatim keeps the rows/columns. Non-native tables (rich text
|
|
3724
|
+
// editor tables) put a blank line between cells in text/plain, so they derive from HTML
|
|
3725
|
+
// instead: htmlToPlainText puts each cell on its own line with no gaps while keeping in-cell breaks.
|
|
3726
|
+
let plainText;
|
|
3727
|
+
let hasEncodedWhitespace = (_a = payload.hasEncodedWhitespace) !== null && _a !== void 0 ? _a : false;
|
|
3728
|
+
if (payload.html &&
|
|
3729
|
+
payload.text &&
|
|
3730
|
+
payload.text.includes('\t') &&
|
|
3731
|
+
imageExtension.htmlContainsTable(payload.html)) {
|
|
3732
|
+
plainText = payload.text;
|
|
3733
|
+
}
|
|
3734
|
+
else if (payload.html && imageExtension.htmlContainsTable(payload.html)) {
|
|
3735
|
+
plainText = this.extractPlainTextFromHtml(payload.html, true);
|
|
3736
|
+
hasEncodedWhitespace = true;
|
|
3737
|
+
}
|
|
3738
|
+
else {
|
|
3739
|
+
plainText = '';
|
|
3740
|
+
if (payload.text) {
|
|
3741
|
+
plainText = payload.text;
|
|
3742
|
+
}
|
|
3743
|
+
else if (payload.html) {
|
|
3744
|
+
plainText = this.extractPlainTextFromHtml(payload.html, true);
|
|
3745
|
+
hasEncodedWhitespace = true;
|
|
3746
|
+
}
|
|
3747
|
+
}
|
|
3748
|
+
const styleSource = (currentRange === null || currentRange === void 0 ? void 0 : currentRange.startNode) instanceof codeBlock.RTETextNode ? currentRange.startNode : undefined;
|
|
3749
|
+
return this.buildPlainTextParagraph(plainText, styleSource, hasEncodedWhitespace);
|
|
3750
|
+
}
|
|
3522
3751
|
let pastedHTML = payload.html || '';
|
|
3523
3752
|
if (!pastedHTML) {
|
|
3524
3753
|
pastedHTML = this.parsePlainText(payload.text || '');
|
|
@@ -3556,16 +3785,21 @@ class InsertPasteHandler extends BaseHandler {
|
|
|
3556
3785
|
return resultBlocks;
|
|
3557
3786
|
}
|
|
3558
3787
|
/**
|
|
3559
|
-
* Extracts
|
|
3788
|
+
* Extracts plain text from HTML when clipboard lacks `text/plain`.
|
|
3560
3789
|
*
|
|
3561
3790
|
* @param {string} html - Clipboard text/html payload.
|
|
3791
|
+
* @param {boolean} keepPreservedWhitespaceMarkers - Keep code-block indentation as sentinels so
|
|
3792
|
+
* the plain-mode boundary collapse in `toPlainPasteLines` does not strip it (that helper decodes
|
|
3793
|
+
* the sentinels). Must stay `false` for the rich path, which feeds `parsePlainText` directly.
|
|
3562
3794
|
* @returns {string} - Plain text extracted from HTML.
|
|
3563
3795
|
*/
|
|
3564
|
-
extractPlainTextFromHtml(html) {
|
|
3796
|
+
extractPlainTextFromHtml(html, keepPreservedWhitespaceMarkers = false) {
|
|
3565
3797
|
// Preserve inline styles before parsing to avoid style-src-attr CSP violations.
|
|
3566
3798
|
const safeHtml = contentState.StylePreservator.preserve(html).getProcessedHtml();
|
|
3567
|
-
|
|
3568
|
-
|
|
3799
|
+
return imageExtension.htmlToPlainText(safeHtml, {
|
|
3800
|
+
preserveBoundaryBlankLines: true,
|
|
3801
|
+
keepPreservedWhitespaceMarkers,
|
|
3802
|
+
});
|
|
3569
3803
|
}
|
|
3570
3804
|
/**
|
|
3571
3805
|
* Builds plain-text paragraph blocks when element strategy parsing returns no output.
|
|
@@ -3574,7 +3808,7 @@ class InsertPasteHandler extends BaseHandler {
|
|
|
3574
3808
|
* @returns {RTEContentBlock[]} Fallback text blocks.
|
|
3575
3809
|
*/
|
|
3576
3810
|
buildPlainTextFallbackBlocks(text) {
|
|
3577
|
-
return
|
|
3811
|
+
return codeBlock.normalizePlainTextLines(text).map((line) => {
|
|
3578
3812
|
const paragraph = new codeBlock.RTETextBlock(misc.generateUUID(), 'paragraph');
|
|
3579
3813
|
const textNode = new codeBlock.RTETextNode(`${paragraph.id}1`, line, paragraph);
|
|
3580
3814
|
paragraph.apply(new codeBlock.AppendChildrenAction([textNode]));
|
|
@@ -3582,21 +3816,66 @@ class InsertPasteHandler extends BaseHandler {
|
|
|
3582
3816
|
});
|
|
3583
3817
|
}
|
|
3584
3818
|
/**
|
|
3585
|
-
*
|
|
3819
|
+
* Builds plain-text paragraphs by splitting on `\n`.
|
|
3820
|
+
*
|
|
3821
|
+
* Shares `toPlainPasteLines` with `PlainPasteProcessingStrategy` so both
|
|
3822
|
+
* representations of plain-mode content (HTML and RTE nodes) agree on line
|
|
3823
|
+
* boundaries and boundary whitespace.
|
|
3824
|
+
*
|
|
3825
|
+
* @param {string} text - Plain text clipboard content.
|
|
3826
|
+
* @param {RTETextNode} [styleSource] - Optional style to preserve in all nodes.
|
|
3827
|
+
* @param {boolean} decodeEncodedWhitespace - Decode HTML-derived whitespace markers.
|
|
3828
|
+
* @returns {RTEContentBlock[]} Paragraph-per-line blocks.
|
|
3829
|
+
*/
|
|
3830
|
+
buildPlainTextParagraph(text, styleSource, decodeEncodedWhitespace = false) {
|
|
3831
|
+
const lines = codeBlock.toPlainPasteLines(text, decodeEncodedWhitespace);
|
|
3832
|
+
return lines.map((line, lineIndex) => {
|
|
3833
|
+
const paragraph = new codeBlock.RTETextBlock(misc.generateUUID(), 'paragraph');
|
|
3834
|
+
// Always attach a text node (empty for blank lines) so empty paragraphs
|
|
3835
|
+
// render with a zero-width space and keep their visible line height,
|
|
3836
|
+
// instead of collapsing to an invisible zero-height `<p></p>`.
|
|
3837
|
+
const node = this.createPlainTextNode(paragraph, lineIndex, line, styleSource);
|
|
3838
|
+
paragraph.apply(new codeBlock.AppendChildrenAction([node]));
|
|
3839
|
+
return paragraph;
|
|
3840
|
+
});
|
|
3841
|
+
}
|
|
3842
|
+
/**
|
|
3843
|
+
* Creates a text node for plain paste; optionally inherits style from source node.
|
|
3844
|
+
*
|
|
3845
|
+
* @param {RTETextBlock} paragraph - Parent paragraph.
|
|
3846
|
+
* @param {number} index - Character index for node ID generation.
|
|
3847
|
+
* @param {string} text - Text content.
|
|
3848
|
+
* @param {RTETextNode} [styleSource] - Optional style to inherit.
|
|
3849
|
+
* @returns {RTETextNode} Created text node.
|
|
3850
|
+
*/
|
|
3851
|
+
createPlainTextNode(paragraph, index, text, styleSource) {
|
|
3852
|
+
const node = styleSource
|
|
3853
|
+
? styleSource.cloneWithText(text)
|
|
3854
|
+
: new codeBlock.RTETextNode(`${paragraph.id}-${index}`, text, paragraph);
|
|
3855
|
+
node.parent = paragraph;
|
|
3856
|
+
return node;
|
|
3857
|
+
}
|
|
3858
|
+
/**
|
|
3859
|
+
* Builds the caret operation that moves onto a block element in a rich text editor after paste.
|
|
3586
3860
|
*
|
|
3587
3861
|
* @param {RTEBlock} newBlock - Block element to move the caret to.
|
|
3588
3862
|
* @param {boolean} atEnd - When true, places the caret after the last character of the block's last node; otherwise at offset 0 of the first node.
|
|
3863
|
+
* @returns {CompositionOperation | void} The caret operation, or nothing when the block has no children.
|
|
3589
3864
|
*/
|
|
3590
|
-
|
|
3865
|
+
caretToBlockOperation(newBlock, atEnd = false) {
|
|
3591
3866
|
var _a, _b;
|
|
3592
3867
|
if (newBlock && newBlock.children) {
|
|
3593
3868
|
if (atEnd) {
|
|
3594
3869
|
const lastNode = newBlock.children[newBlock.children.length - 1];
|
|
3595
|
-
|
|
3596
|
-
|
|
3597
|
-
|
|
3598
|
-
|
|
3870
|
+
return {
|
|
3871
|
+
target: this.currentState,
|
|
3872
|
+
action: new contentState.UpdateCursorPositionAction(lastNode, (_b = (_a = lastNode.text) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0),
|
|
3873
|
+
};
|
|
3599
3874
|
}
|
|
3875
|
+
return {
|
|
3876
|
+
target: this.currentState,
|
|
3877
|
+
action: new contentState.UpdateCursorPositionAction(newBlock.children[0], 0),
|
|
3878
|
+
};
|
|
3600
3879
|
}
|
|
3601
3880
|
}
|
|
3602
3881
|
/**
|
|
@@ -3816,6 +4095,7 @@ class InsertPasteHandler extends BaseHandler {
|
|
|
3816
4095
|
html: event.dataTransfer.getData('text/html') || eventPayload.html || '',
|
|
3817
4096
|
text: event.dataTransfer.getData('text/plain') || eventPayload.text || '',
|
|
3818
4097
|
type: event.dataTransfer.getData(codeBlock.RTE_PASTE_MODE_DATA_TYPE) || '',
|
|
4098
|
+
hasEncodedWhitespace: event.dataTransfer.getData(codeBlock.RTE_PRESERVED_WHITESPACE_DATA_TYPE) === 'true',
|
|
3819
4099
|
};
|
|
3820
4100
|
}
|
|
3821
4101
|
}
|
|
@@ -4140,6 +4420,8 @@ class UserInputController extends globalSlimmerRegistry.VegaSlimmer {
|
|
|
4140
4420
|
};
|
|
4141
4421
|
/**
|
|
4142
4422
|
* When a user performs an input action within the editable element, this function is triggered.
|
|
4423
|
+
* Each handler owns its own `flushOptions` on `BaseHandler`, so the value update flows through
|
|
4424
|
+
* the shared flush-changes action pipeline without this method having to construct or forward it.
|
|
4143
4425
|
*
|
|
4144
4426
|
* @param {InputEvent} e the before input event object
|
|
4145
4427
|
*/
|
|
@@ -4153,41 +4435,26 @@ class UserInputController extends globalSlimmerRegistry.VegaSlimmer {
|
|
|
4153
4435
|
return;
|
|
4154
4436
|
}
|
|
4155
4437
|
this.insertCompositionTextController.removeObserver();
|
|
4156
|
-
let updateFlag = false;
|
|
4157
|
-
let updateSource = codeBlock.RTEUpdateSource.Default;
|
|
4158
4438
|
switch (inputType) {
|
|
4159
4439
|
case 'insertParagraph':
|
|
4160
|
-
updateFlag = true;
|
|
4161
4440
|
this.insertParagraphHandler.execute(this.value, this.selectionController, this.host, e);
|
|
4162
4441
|
break;
|
|
4163
4442
|
case 'insertText':
|
|
4164
|
-
updateFlag = true;
|
|
4165
|
-
updateSource =
|
|
4166
|
-
e[codeBlock.RTE_UPDATE_SOURCE_KEY] === codeBlock.RTEUpdateSource.Composition
|
|
4167
|
-
? codeBlock.RTEUpdateSource.Composition
|
|
4168
|
-
: codeBlock.RTEUpdateSource.Default;
|
|
4169
4443
|
this.insertTextHandler.execute(this.value, this.selectionController, this.host, e);
|
|
4170
4444
|
break;
|
|
4171
4445
|
case 'insertLineBreak':
|
|
4172
|
-
updateFlag = true;
|
|
4173
4446
|
this.insertLineBreakHandler.execute(this.value, this.selectionController, this.host, e);
|
|
4174
4447
|
break;
|
|
4175
4448
|
case 'deleteContentForward':
|
|
4176
|
-
updateFlag = true;
|
|
4177
4449
|
this.forwardDeleteContentHandler.execute(this.value, this.selectionController, this.host, e);
|
|
4178
4450
|
break;
|
|
4179
4451
|
case 'deleteContentBackward':
|
|
4180
|
-
updateFlag = true;
|
|
4181
4452
|
this.backwardDeleteContentHandler.execute(this.value, this.selectionController, this.host, e);
|
|
4182
4453
|
break;
|
|
4183
4454
|
case 'insertFromPaste':
|
|
4184
|
-
updateFlag = true;
|
|
4185
4455
|
this.insertPasteHandler.execute(this.value, this.selectionController, this.host, e);
|
|
4186
4456
|
break;
|
|
4187
4457
|
}
|
|
4188
|
-
if (updateFlag) {
|
|
4189
|
-
void this.valueController.flushChanges(this.value, true, updateSource);
|
|
4190
|
-
}
|
|
4191
4458
|
};
|
|
4192
4459
|
}
|
|
4193
4460
|
/**
|
|
@@ -4432,11 +4699,18 @@ class FocusController extends globalSlimmerRegistry.VegaSlimmer {
|
|
|
4432
4699
|
* @param {RTEContentBlock} lastBlock - The last block of the content
|
|
4433
4700
|
*/
|
|
4434
4701
|
this.doFocusOnLastTextNode = async (lastBlock) => {
|
|
4435
|
-
|
|
4436
|
-
|
|
4702
|
+
await this.doFocusOnTextNode(lastBlock.getLastNode());
|
|
4703
|
+
};
|
|
4704
|
+
/**
|
|
4705
|
+
* Do a focus on the provided text node.
|
|
4706
|
+
*
|
|
4707
|
+
* @param {RTENode} node - The node to focus.
|
|
4708
|
+
*/
|
|
4709
|
+
this.doFocusOnTextNode = async (node) => {
|
|
4710
|
+
const dom = codeBlock.stateEntityRenderingRegistry.getDOMByEntity(node);
|
|
4437
4711
|
if (dom) {
|
|
4438
|
-
if (!
|
|
4439
|
-
this.setCaretRangeToNodeEnd(dom.parentElement,
|
|
4712
|
+
if (!node.isContentEditable()) {
|
|
4713
|
+
this.setCaretRangeToNodeEnd(dom.parentElement, node.getRangeEndOffset());
|
|
4440
4714
|
}
|
|
4441
4715
|
else {
|
|
4442
4716
|
this.setCaretRangeToNodeEnd(dom.firstChild, dom.firstChild.nodeValue.length);
|
|
@@ -4468,6 +4742,21 @@ class FocusController extends globalSlimmerRegistry.VegaSlimmer {
|
|
|
4468
4742
|
await this.doFocusOnLastTextNode(lastBlock);
|
|
4469
4743
|
}
|
|
4470
4744
|
}
|
|
4745
|
+
/**
|
|
4746
|
+
* Restore focus to the current selection target without changing the document structure.
|
|
4747
|
+
*
|
|
4748
|
+
* @returns {Promise<void>} - A promise that resolves when the focus is set.
|
|
4749
|
+
*/
|
|
4750
|
+
async focusOnCurrentTextNode() {
|
|
4751
|
+
const currentRange = this.selectionController.getCurrentRange();
|
|
4752
|
+
if (currentRange.endNode) {
|
|
4753
|
+
await this.doFocusOnTextNode(currentRange.endNode);
|
|
4754
|
+
return;
|
|
4755
|
+
}
|
|
4756
|
+
if (currentRange.startNode) {
|
|
4757
|
+
await this.doFocusOnTextNode(currentRange.startNode);
|
|
4758
|
+
}
|
|
4759
|
+
}
|
|
4471
4760
|
/**
|
|
4472
4761
|
* Move the caret to the end of the node
|
|
4473
4762
|
*
|
|
@@ -5305,6 +5594,9 @@ class SourceEditToolbarButtonSlimmer extends imageAnnotationAction.ToolbarButton
|
|
|
5305
5594
|
// the source-edit button can be re-activated from the keyboard without
|
|
5306
5595
|
// the selection being reset out from under the user.
|
|
5307
5596
|
this.sourceView = !isSelected;
|
|
5597
|
+
if (!this.sourceView) {
|
|
5598
|
+
void this.focusController.focusOnCurrentTextNode();
|
|
5599
|
+
}
|
|
5308
5600
|
}
|
|
5309
5601
|
// VD-8789 (keyboard a11y): the default `preventLostFocus` calls
|
|
5310
5602
|
// `e.preventDefault()` on mousedown so the button never receives focus and
|
|
@@ -5931,7 +6223,7 @@ const VegaRichTextEditor = class {
|
|
|
5931
6223
|
this.imageInserted = index.createEvent(this, "imageInserted", 7);
|
|
5932
6224
|
this.vegaSourceCodeChange = index.createEvent(this, "vegaSourceCodeChange", 7);
|
|
5933
6225
|
this.sourceCodeChange = index.createEvent(this, "sourceCodeChange", 7);
|
|
5934
|
-
this.globalSlimmers =
|
|
6226
|
+
this.globalSlimmers = new Map();
|
|
5935
6227
|
this.ariaAttributesValueMapper = new ariaAttributesValueMapper.AriaAttributesValueMapper(() => this.vegaRichTextEditorRenderer.getRTEEditableElementRef(), {
|
|
5936
6228
|
'aria-label': {
|
|
5937
6229
|
dependency: ['data-aria-label', 'label'],
|
|
@@ -6403,7 +6695,7 @@ const VegaRichTextEditorToolbarButton = class {
|
|
|
6403
6695
|
index.registerInstance(this, hostRef);
|
|
6404
6696
|
this.vegaClick = index.createEvent(this, "vegaClick", 7);
|
|
6405
6697
|
this.click = index.createEvent(this, "click", 7);
|
|
6406
|
-
this.globalSlimmers =
|
|
6698
|
+
this.globalSlimmers = new Map();
|
|
6407
6699
|
this.vegaComponentUsageRuntimeMetricsSlimmer = new componentUsageRuntimeMetrics.VegaComponentUsageRuntimeMetricsSlimmer();
|
|
6408
6700
|
this.clickEventEmitter = eventEmitSlimmer.createEventEmitSlimmer(VegaRichTextEditorToolbarButton, vegaEventId.VegaClick);
|
|
6409
6701
|
this.eventPrevent = new childNodesEventPreventSlimmer.ChildNodesEventPreventSlimmer([vegaEventId.VegaClick], () => this.host, {
|
|
@@ -6641,7 +6933,7 @@ const VegaRichTextImageEditor = class {
|
|
|
6641
6933
|
index.registerInstance(this, hostRef);
|
|
6642
6934
|
this.vegaChange = index.createEvent(this, "vegaChange", 7);
|
|
6643
6935
|
this.change = index.createEvent(this, "change", 7);
|
|
6644
|
-
this.globalSlimmers =
|
|
6936
|
+
this.globalSlimmers = new Map();
|
|
6645
6937
|
this.translationSlimmer = new translationSlimmer.TranslationSlimmer();
|
|
6646
6938
|
this.vegaComponentUsageRuntimeMetricsSlimmer = new componentUsageRuntimeMetrics.VegaComponentUsageRuntimeMetricsSlimmer();
|
|
6647
6939
|
this.renderer = new VegaRichTextImageEditorRenderer();
|
|
@@ -6707,6 +6999,10 @@ class VegaRichTextLinkEditorRenderer extends globalSlimmerRegistry.VegaSlimmer {
|
|
|
6707
6999
|
this.linkEditorController.handleEditAction();
|
|
6708
7000
|
return;
|
|
6709
7001
|
}
|
|
7002
|
+
case 'bookmark': {
|
|
7003
|
+
void this.linkEditorController.handleBookmarkNavigation();
|
|
7004
|
+
return;
|
|
7005
|
+
}
|
|
6710
7006
|
case 'unlink': {
|
|
6711
7007
|
void this.linkEditorController.handleUnlinkAction();
|
|
6712
7008
|
}
|
|
@@ -6735,6 +7031,22 @@ class VegaRichTextLinkEditorRenderer extends globalSlimmerRegistry.VegaSlimmer {
|
|
|
6735
7031
|
this.handleUrlVegaChange = (e) => {
|
|
6736
7032
|
this.linkEditorController.handleUrlVegaChange(e);
|
|
6737
7033
|
};
|
|
7034
|
+
this.handleBookmarkVegaChange = (e) => {
|
|
7035
|
+
void this.linkEditorController.handleBookmarkVegaChange(e);
|
|
7036
|
+
};
|
|
7037
|
+
// Opening the Bookmark dropdown blurs the URL input; suppress its auto-validation while the
|
|
7038
|
+
// dropdown is open so the error box cannot appear, shift layout, and cancel the first item click.
|
|
7039
|
+
this.handleBookmarkInputSelectRef = (ref) => {
|
|
7040
|
+
domNodeSubjectObserverFactory.DomNodeSubjectObserverFactory.addUniqueObserverToNode(ref, vegaEventId.VegaShow, () => {
|
|
7041
|
+
this.setUrlAutoValidation(false);
|
|
7042
|
+
});
|
|
7043
|
+
domNodeSubjectObserverFactory.DomNodeSubjectObserverFactory.addUniqueObserverToNode(ref, vegaEventId.VegaHide, () => {
|
|
7044
|
+
this.setUrlAutoValidation(true);
|
|
7045
|
+
});
|
|
7046
|
+
};
|
|
7047
|
+
this.handleBookmarkMouseDown = (e) => {
|
|
7048
|
+
e.preventDefault();
|
|
7049
|
+
};
|
|
6738
7050
|
this.handleLinkTypeSelectRef = (ref) => {
|
|
6739
7051
|
domNodeSubjectObserverFactory.DomNodeSubjectObserverFactory.addUniqueObserverToNode(ref, vegaEventId.VegaChange, (payload) => {
|
|
6740
7052
|
void this.linkEditorController.handleLinkTypeChange(payload);
|
|
@@ -6775,11 +7087,23 @@ class VegaRichTextLinkEditorRenderer extends globalSlimmerRegistry.VegaSlimmer {
|
|
|
6775
7087
|
this.renderLinkEditContent())));
|
|
6776
7088
|
}
|
|
6777
7089
|
renderLinkUnlinkContent() {
|
|
7090
|
+
var _a;
|
|
7091
|
+
const bookmarkName = this.linkTypeConfigController.getBookmarkNameForUrl((_a = this.record) === null || _a === void 0 ? void 0 : _a.url);
|
|
6778
7092
|
return (index.h("vega-box", { display: this.status === 'editOrUnlinkSelection' ? 'block' : 'none' },
|
|
6779
7093
|
index.h("vega-button-group", { size: "small", variant: "tertiary", ref: this.handleButtonGroupRef, onKeyDown: this.handleLinkFieldKeyDown },
|
|
7094
|
+
bookmarkName && (index.h("vega-button-group-item", { label: this.getBookmarkLabel(bookmarkName), icon: internalIconManager.VegaInternalIconManager.getIconKey('rte-bookmark'), itemKey: "bookmark" })),
|
|
6780
7095
|
index.h("vega-button-group-item", { label: this.translationSlimmer.t('Edit'), itemKey: "edit" }),
|
|
6781
7096
|
index.h("vega-button-group-item", { label: this.translationSlimmer.t('Unlink'), itemKey: "unlink" }))));
|
|
6782
7097
|
}
|
|
7098
|
+
getBookmarkLabel(bookmarkName) {
|
|
7099
|
+
const characters = Array.from(bookmarkName);
|
|
7100
|
+
if (characters.length <= VegaRichTextLinkEditorRenderer.BOOKMARK_LABEL_MAX_LENGTH) {
|
|
7101
|
+
return bookmarkName;
|
|
7102
|
+
}
|
|
7103
|
+
return `${characters
|
|
7104
|
+
.slice(0, VegaRichTextLinkEditorRenderer.BOOKMARK_LABEL_MAX_LENGTH - 3)
|
|
7105
|
+
.join('')}...`;
|
|
7106
|
+
}
|
|
6783
7107
|
renderLinkEditContent() {
|
|
6784
7108
|
return (index.h("vega-box", { display: this.status === 'linkEdit' ? 'block' : 'none' },
|
|
6785
7109
|
index.h("vega-flex", { style: { width: '419px' }, direction: "col", gap: "size-16" },
|
|
@@ -6809,9 +7133,22 @@ class VegaRichTextLinkEditorRenderer extends globalSlimmerRegistry.VegaSlimmer {
|
|
|
6809
7133
|
];
|
|
6810
7134
|
}
|
|
6811
7135
|
renderUrlLinkEditFields() {
|
|
6812
|
-
|
|
7136
|
+
const fields = [
|
|
6813
7137
|
index.h("vega-input", { key: "url", "data-vega-form": "url", ref: this.handleUrlInputRef, size: "small", label: this.translationSlimmer.t('URL'), required: this.linkTypeConfigController.hasConfiguredLinkTypes(), onVegaChange: this.handleUrlVegaChange, onKeyDown: this.handleLinkFieldKeyDown }),
|
|
6814
7138
|
];
|
|
7139
|
+
if (this.linkTypeConfigController.isBookmarkEnabled()) {
|
|
7140
|
+
fields.push(this.renderBookmarkUrlSuggestions());
|
|
7141
|
+
}
|
|
7142
|
+
return fields;
|
|
7143
|
+
}
|
|
7144
|
+
renderBookmarkUrlSuggestions() {
|
|
7145
|
+
const bookmarkNames = this.linkTypeConfigController.getBookmarkNames();
|
|
7146
|
+
const hasBookmarks = bookmarkNames.length > 0;
|
|
7147
|
+
return (index.h("vega-accordion", { expand: false, drawsBackground: false, onMouseDown: this.handleBookmarkMouseDown },
|
|
7148
|
+
index.h("div", { slot: "title" }, this.translationSlimmer.t('Bookmark')),
|
|
7149
|
+
index.h("vega-input-select", { slot: "content", style: { marginTop: '-16px' }, "data-vega-form": "bookmark", ref: this.handleBookmarkInputSelectRef, size: "small", placeholder: hasBookmarks
|
|
7150
|
+
? this.translationSlimmer.t('Select a bookmark')
|
|
7151
|
+
: this.translationSlimmer.t('No bookmarks available'), disabled: !hasBookmarks, source: bookmarkNames.map((name) => ({ id: name, displayName: name })), onVegaChange: this.handleBookmarkVegaChange })));
|
|
6815
7152
|
}
|
|
6816
7153
|
renderLinkTypeSelector() {
|
|
6817
7154
|
if (!this.linkTypeConfigController.hasConfiguredLinkTypes()) {
|
|
@@ -6832,7 +7169,16 @@ class VegaRichTextLinkEditorRenderer extends globalSlimmerRegistry.VegaSlimmer {
|
|
|
6832
7169
|
index.h("vega-button", { variant: "secondary", label: this.translationSlimmer.t('Cancel'), ref: this.handleCancelButtonRef }),
|
|
6833
7170
|
index.h("vega-button", { label: this.translationSlimmer.t('Submit'), disabled: this.linkEditorStateManager.getIsSubmitDisabled(), ref: this.handleSubmitButtonRef })));
|
|
6834
7171
|
}
|
|
7172
|
+
setUrlAutoValidation(enabled) {
|
|
7173
|
+
if (this.urlInputRef) {
|
|
7174
|
+
this.urlInputRef.autoValidation = enabled;
|
|
7175
|
+
}
|
|
7176
|
+
}
|
|
6835
7177
|
}
|
|
7178
|
+
(() => {
|
|
7179
|
+
internalIconManager.VegaInternalIconManager.register({ 'rte-bookmark': imageExtension.bookmarkIcon });
|
|
7180
|
+
})();
|
|
7181
|
+
VegaRichTextLinkEditorRenderer.BOOKMARK_LABEL_MAX_LENGTH = 24;
|
|
6836
7182
|
__decorate$3([
|
|
6837
7183
|
globalSlimmerRegistry.MapToComponentField()
|
|
6838
7184
|
], VegaRichTextLinkEditorRenderer.prototype, "host", void 0);
|
|
@@ -6851,6 +7197,9 @@ __decorate$3([
|
|
|
6851
7197
|
__decorate$3([
|
|
6852
7198
|
globalSlimmerRegistry.MapToComponentField()
|
|
6853
7199
|
], VegaRichTextLinkEditorRenderer.prototype, "linkEditorStateManager", void 0);
|
|
7200
|
+
__decorate$3([
|
|
7201
|
+
globalSlimmerRegistry.MapToComponentField()
|
|
7202
|
+
], VegaRichTextLinkEditorRenderer.prototype, "record", void 0);
|
|
6854
7203
|
|
|
6855
7204
|
const urlLinkTypeHandler = {
|
|
6856
7205
|
key: 'url',
|
|
@@ -6996,6 +7345,9 @@ class LinkEditorController extends globalSlimmerRegistry.VegaSlimmer {
|
|
|
6996
7345
|
super(...arguments);
|
|
6997
7346
|
this.linkUrlNormalizer = new LinkUrlNormalizer();
|
|
6998
7347
|
this.linkTypeHandlers = LINK_TYPE_HANDLER_MAP;
|
|
7348
|
+
// Single-use markers to ignore the change event echoed back by our own URL/bookmark sync write.
|
|
7349
|
+
this.pendingBookmarkSyncEcho = null;
|
|
7350
|
+
this.pendingUrlSyncEcho = null;
|
|
6999
7351
|
/**
|
|
7000
7352
|
* The element the trigger click listener is currently attached to (the link
|
|
7001
7353
|
* wrapper acting as the popover target).
|
|
@@ -7059,6 +7411,9 @@ class LinkEditorController extends globalSlimmerRegistry.VegaSlimmer {
|
|
|
7059
7411
|
*/
|
|
7060
7412
|
async handlePopoverShow() {
|
|
7061
7413
|
var _a, _b, _c, _d;
|
|
7414
|
+
// Discard echoes left by the previous popover session.
|
|
7415
|
+
this.pendingBookmarkSyncEcho = null;
|
|
7416
|
+
this.pendingUrlSyncEcho = null;
|
|
7062
7417
|
this.linkTypeConfigController.invalidateConfiguredLinkTypesCache();
|
|
7063
7418
|
this.linkEditorStateManager.clearFormValues();
|
|
7064
7419
|
if (this.linkEditorStateManager.getShouldResetStatusOnNextShow()) {
|
|
@@ -7129,9 +7484,64 @@ class LinkEditorController extends globalSlimmerRegistry.VegaSlimmer {
|
|
|
7129
7484
|
* @returns {void} No return value.
|
|
7130
7485
|
*/
|
|
7131
7486
|
handleUrlVegaChange(e) {
|
|
7487
|
+
const requiredValue = e.detail;
|
|
7488
|
+
// A matching value was written by a bookmark selection, not typed by the user.
|
|
7489
|
+
const isEcho = this.pendingUrlSyncEcho === requiredValue;
|
|
7490
|
+
this.pendingUrlSyncEcho = null;
|
|
7491
|
+
if (!isEcho &&
|
|
7492
|
+
this.linkEditorStateManager.getSelectedLinkTypeKey() === codeBlock.RTE_DEFAULT_LINK_TYPE_KEY &&
|
|
7493
|
+
this.linkTypeConfigController.isBookmarkEnabled()) {
|
|
7494
|
+
const form = this.renderer.getFormRef();
|
|
7495
|
+
if (form === null || form === void 0 ? void 0 : form.setValue) {
|
|
7496
|
+
const bookmarkName = this.linkTypeConfigController.getBookmarkNameForUrl(requiredValue);
|
|
7497
|
+
// Ignore the change emitted when the select applies this value.
|
|
7498
|
+
this.pendingBookmarkSyncEcho = bookmarkName;
|
|
7499
|
+
void form.setValue({ bookmark: bookmarkName });
|
|
7500
|
+
}
|
|
7501
|
+
}
|
|
7132
7502
|
if (this.linkTypeConfigController.hasConfiguredLinkTypes()) {
|
|
7133
|
-
this.updateSubmitDisabledState(
|
|
7503
|
+
this.updateSubmitDisabledState(requiredValue);
|
|
7504
|
+
}
|
|
7505
|
+
}
|
|
7506
|
+
/**
|
|
7507
|
+
* Updates the URL field from a selected bookmark target.
|
|
7508
|
+
*
|
|
7509
|
+
* @param {CustomEvent<string | string[]>} e - Bookmark selection change event.
|
|
7510
|
+
* @returns {Promise<void>} Resolves after updating the URL field.
|
|
7511
|
+
*/
|
|
7512
|
+
async handleBookmarkVegaChange(e) {
|
|
7513
|
+
var _a, _b, _c;
|
|
7514
|
+
const bookmarkName = Array.isArray(e.detail) ? e.detail[0] || '' : e.detail;
|
|
7515
|
+
// Consume the change emitted by URL-to-bookmark synchronization.
|
|
7516
|
+
if (this.pendingBookmarkSyncEcho === bookmarkName) {
|
|
7517
|
+
this.pendingBookmarkSyncEcho = null;
|
|
7518
|
+
return;
|
|
7519
|
+
}
|
|
7520
|
+
this.pendingBookmarkSyncEcho = null;
|
|
7521
|
+
const url = bookmarkName ? `#${bookmarkName}` : '';
|
|
7522
|
+
this.pendingUrlSyncEcho = url;
|
|
7523
|
+
await ((_b = (_a = this.renderer.getFormRef()) === null || _a === void 0 ? void 0 : _a.setValue) === null || _b === void 0 ? void 0 : _b.call(_a, { url }));
|
|
7524
|
+
this.updateSubmitDisabledState(url);
|
|
7525
|
+
if (bookmarkName) {
|
|
7526
|
+
await ((_c = this.renderer.getUrlInputRef()) === null || _c === void 0 ? void 0 : _c.doFocus());
|
|
7527
|
+
}
|
|
7528
|
+
}
|
|
7529
|
+
/** Navigates to the current link's bookmark within the same rich text content root. */
|
|
7530
|
+
async handleBookmarkNavigation() {
|
|
7531
|
+
var _a, _b, _c;
|
|
7532
|
+
const bookmarkName = this.linkTypeConfigController.getBookmarkNameForUrl((_a = this.record) === null || _a === void 0 ? void 0 : _a.url);
|
|
7533
|
+
const rootNode = (_b = this.target) === null || _b === void 0 ? void 0 : _b.getRootNode();
|
|
7534
|
+
if (!bookmarkName || !rootNode || !('querySelectorAll' in rootNode)) {
|
|
7535
|
+
return;
|
|
7134
7536
|
}
|
|
7537
|
+
const bookmarkTarget = Array.from(rootNode.querySelectorAll('a.rte-bookmark[id]')).find((anchor) => anchor.id === bookmarkName);
|
|
7538
|
+
if (!bookmarkTarget) {
|
|
7539
|
+
return;
|
|
7540
|
+
}
|
|
7541
|
+
await ((_c = this.renderer.getPopoverRef()) === null || _c === void 0 ? void 0 : _c.hide());
|
|
7542
|
+
bookmarkTarget.scrollIntoView({ block: 'center', inline: 'nearest' });
|
|
7543
|
+
bookmarkTarget.focus({ preventScroll: true });
|
|
7544
|
+
bookmarkTarget.click();
|
|
7135
7545
|
}
|
|
7136
7546
|
/**
|
|
7137
7547
|
* Submits the current link when Enter is pressed or hides the popover when Escape is pressed.
|
|
@@ -7233,7 +7643,7 @@ class LinkEditorController extends globalSlimmerRegistry.VegaSlimmer {
|
|
|
7233
7643
|
* @returns {Promise<void>} Resolves when the edit form is populated.
|
|
7234
7644
|
*/
|
|
7235
7645
|
async populateEditForm() {
|
|
7236
|
-
var _a, _b, _c, _d
|
|
7646
|
+
var _a, _b, _c, _d;
|
|
7237
7647
|
const handler = this.linkTypeHandlers.get(this.linkEditorStateManager.getSelectedLinkTypeKey());
|
|
7238
7648
|
if (!handler) {
|
|
7239
7649
|
return;
|
|
@@ -7246,12 +7656,15 @@ class LinkEditorController extends globalSlimmerRegistry.VegaSlimmer {
|
|
|
7246
7656
|
? handler.getRequiredValue(this.record, deps)
|
|
7247
7657
|
: '';
|
|
7248
7658
|
const initialFormValues = handler.getInitialFormValues(this.record, deps);
|
|
7659
|
+
const bookmarkName = this.linkTypeConfigController.getBookmarkNameForUrl((_a = this.record) === null || _a === void 0 ? void 0 : _a.url);
|
|
7660
|
+
if (bookmarkName) {
|
|
7661
|
+
initialFormValues.bookmark = bookmarkName;
|
|
7662
|
+
}
|
|
7249
7663
|
this.linkEditorStateManager.setSharedTextValue(initialFormValues.text || '');
|
|
7250
|
-
await ((
|
|
7664
|
+
await ((_c = (_b = this.renderer.getFormRef()) === null || _b === void 0 ? void 0 : _b.reset) === null || _c === void 0 ? void 0 : _c.call(_b, initialFormValues));
|
|
7251
7665
|
this.syncTextInputValue(initialFormValues.text || '');
|
|
7252
7666
|
this.updateSubmitDisabledState(requiredValue);
|
|
7253
|
-
await ((_d =
|
|
7254
|
-
await ((_e = this.renderer.getUrlInputRef()) === null || _e === void 0 ? void 0 : _e.doFocus());
|
|
7667
|
+
await ((_d = this.renderer.getUrlInputRef()) === null || _d === void 0 ? void 0 : _d.doFocus());
|
|
7255
7668
|
}
|
|
7256
7669
|
/**
|
|
7257
7670
|
* Updates the popover target via the remote invocation registry.
|
|
@@ -7577,9 +7990,42 @@ class LinkTypeConfigController extends globalSlimmerRegistry.VegaSlimmer {
|
|
|
7577
7990
|
* @returns {VegaRTELinkExtensionConfig} The active link configuration.
|
|
7578
7991
|
*/
|
|
7579
7992
|
getLinkConfig() {
|
|
7580
|
-
const rteHost =
|
|
7993
|
+
const rteHost = this.getRTEHost();
|
|
7581
7994
|
return linkExtension.VegaRTELinkExtension.configStore.get(rteHost) || {};
|
|
7582
7995
|
}
|
|
7996
|
+
/**
|
|
7997
|
+
* Returns valid bookmark names from the current rich text document in document order.
|
|
7998
|
+
*
|
|
7999
|
+
* @returns {string[]} Available bookmark names.
|
|
8000
|
+
*/
|
|
8001
|
+
getBookmarkNames() {
|
|
8002
|
+
var _a;
|
|
8003
|
+
const names = imageExtension.collectBookmarkNames((_a = this.getRTEHost()) === null || _a === void 0 ? void 0 : _a.value).filter((name) => name.length > 0);
|
|
8004
|
+
return Array.from(new Set(names));
|
|
8005
|
+
}
|
|
8006
|
+
/**
|
|
8007
|
+
* Returns whether bookmark URL suggestions are enabled.
|
|
8008
|
+
*
|
|
8009
|
+
* @returns {boolean} True when bookmark suggestions are configured.
|
|
8010
|
+
*/
|
|
8011
|
+
isBookmarkEnabled() {
|
|
8012
|
+
var _a;
|
|
8013
|
+
return Boolean((_a = this.getRTEHost()) === null || _a === void 0 ? void 0 : _a.extensions.some((extension) => extension instanceof imageExtension.VegaRTEBookmarkExtension));
|
|
8014
|
+
}
|
|
8015
|
+
/**
|
|
8016
|
+
* Returns the bookmark name matching a fragment URL.
|
|
8017
|
+
*
|
|
8018
|
+
* @param {string} url - URL to match against current bookmarks.
|
|
8019
|
+
* @returns {string} The matching bookmark name, or an empty string.
|
|
8020
|
+
*/
|
|
8021
|
+
getBookmarkNameForUrl(url) {
|
|
8022
|
+
if (!this.isBookmarkEnabled()) {
|
|
8023
|
+
return '';
|
|
8024
|
+
}
|
|
8025
|
+
const normalizedUrl = (url || '').trim();
|
|
8026
|
+
const bookmarkName = normalizedUrl.startsWith('#') ? normalizedUrl.slice(1) : '';
|
|
8027
|
+
return this.getBookmarkNames().includes(bookmarkName) ? bookmarkName : '';
|
|
8028
|
+
}
|
|
7583
8029
|
/**
|
|
7584
8030
|
* Normalizes configured link types and filters unsupported entries.
|
|
7585
8031
|
*
|
|
@@ -7654,6 +8100,15 @@ class LinkTypeConfigController extends globalSlimmerRegistry.VegaSlimmer {
|
|
|
7654
8100
|
? this.translationSlimmer.t('Email')
|
|
7655
8101
|
: this.translationSlimmer.t('URL');
|
|
7656
8102
|
}
|
|
8103
|
+
/**
|
|
8104
|
+
* Returns the rich text editor containing this link editor.
|
|
8105
|
+
*
|
|
8106
|
+
* @typedef HTMLVegaRichTextEditorElement - The rich text editor host element type.
|
|
8107
|
+
* @returns {HTMLVegaRichTextEditorElement | null} The containing editor, when available.
|
|
8108
|
+
*/
|
|
8109
|
+
getRTEHost() {
|
|
8110
|
+
return ui.findParent(this.host, 'vega-rich-text-editor');
|
|
8111
|
+
}
|
|
7657
8112
|
}
|
|
7658
8113
|
LinkTypeConfigController.SUPPORTED_LINK_TYPE_KEYS = new Set(codeBlock.RTE_SUPPORTED_LINK_TYPE_KEYS);
|
|
7659
8114
|
__decorate$1([
|
|
@@ -7790,7 +8245,7 @@ const VegaRichTextLinkEditor = class {
|
|
|
7790
8245
|
index.registerInstance(this, hostRef);
|
|
7791
8246
|
this.vegaChange = index.createEvent(this, "vegaChange", 7);
|
|
7792
8247
|
this.change = index.createEvent(this, "change", 7);
|
|
7793
|
-
this.globalSlimmers =
|
|
8248
|
+
this.globalSlimmers = new Map();
|
|
7794
8249
|
this.translationSlimmer = new translationSlimmer.TranslationSlimmer();
|
|
7795
8250
|
this.vegaComponentUsageRuntimeMetricsSlimmer = new componentUsageRuntimeMetrics.VegaComponentUsageRuntimeMetricsSlimmer();
|
|
7796
8251
|
this.renderer = new VegaRichTextLinkEditorRenderer();
|