@heartlandone/vega 2.100.0 → 2.102.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/{action-color-accessibility-validator-b8a9ef0f.js → action-color-accessibility-validator-61af71ae.js} +1 -1
- package/dist/cjs/{app-globals-48d067a7.js → app-globals-49c2a999.js} +21 -12
- package/dist/cjs/{aria-dialog-focusable-trap-slimmer-62147489.js → aria-dialog-focusable-trap-slimmer-c79cc3f8.js} +1 -1
- package/dist/cjs/{child-nodes-event-prevent-slimmer-e0ac8467.js → child-nodes-event-prevent-slimmer-574a6a1a.js} +1 -1
- package/dist/cjs/{code-block-3b42c364.js → code-block-06e6591f.js} +1037 -937
- 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-bbe3bcaf.js → component-value-history-controller-slimmer.abstract-f29908f8.js} +4 -4
- package/dist/cjs/{content-state-87a06c1a.js → content-state-8c862e5e.js} +90 -88
- package/dist/cjs/countries-a8e3812a.js +251 -0
- package/dist/cjs/{dark-mode-style-controller-f3da3342.js → dark-mode-style-controller-ec04ece9.js} +45 -45
- package/dist/cjs/{date-required-rule-45c802d3.js → date-required-rule-b672c432.js} +1 -1
- package/dist/cjs/{design-token-9d762da0.js → design-token-351ffd2c.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-f7ba5d9a.js → element-appender-slimmer-f932b166.js} +22 -3
- package/dist/cjs/{event-emit-slimmer-34aa195e.js → event-emit-slimmer-6bc675f6.js} +1 -1
- package/dist/cjs/{form-field-controller-slimmer-fbaddc91.js → form-field-controller-slimmer-5adb86ae.js} +3 -3
- package/dist/cjs/{icon-manager-be358b32.js → icon-manager-7d20b0ab.js} +6 -4
- package/dist/cjs/{image-annotation-action-03d3e01a.js → image-annotation-action-25907d6b.js} +7 -6
- package/dist/cjs/image-extension-1cf84f27.js +1209 -0
- package/dist/cjs/index-58ea899e.js +4 -0
- package/dist/cjs/index.cjs.js +33 -29
- package/dist/cjs/{inject-keyboard-manager-540f0876.js → inject-keyboard-manager-84d33920.js} +1 -1
- package/dist/cjs/{internal-calendar-period-factory-b11918ee.js → internal-calendar-period-factory-3c5236be.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-eae8a8de.js} +11 -0
- package/dist/cjs/{internal-vega-event-manager-7003c84a.js → internal-vega-event-manager-0c256d63.js} +11 -2
- package/dist/cjs/{keyboard-manager-16e96b62.js → keyboard-manager-baa83a61.js} +1 -1
- package/dist/cjs/{keyboard-manager-slimmer-0a4e556d.js → keyboard-manager-slimmer-d1974b28.js} +1 -1
- package/dist/cjs/{link-extension-71eeaa9f.js → link-extension-2a6133b7.js} +9 -8
- package/dist/cjs/loader.cjs.js +23 -21
- package/dist/cjs/{month-view-generator-0a3e04de.js → month-view-generator-a6827548.js} +1 -1
- package/dist/cjs/{public-rules-3dc5d02d.js → public-rules-7f26e0ae.js} +11 -9
- package/dist/cjs/{range-d29751e3.js → range-518b95a2.js} +1 -1
- package/dist/cjs/{responsive-format-facade-c6d7f0a1.js → responsive-format-facade-95c54444.js} +1 -1
- package/dist/cjs/{rich-text-editor-required-rule-05de7f0c.js → rich-text-editor-required-rule-5d0c76ec.js} +1 -1
- package/dist/cjs/{split-cell-operation-ef783850.js → split-cell-operation-28f6f8d9.js} +17 -21
- package/dist/cjs/{state-border-formatter-dda9109a.js → state-border-formatter-6c284859.js} +1 -1
- package/dist/cjs/{string-format-strategy.abstract-3a968a59.js → string-format-strategy.abstract-f15b6196.js} +1 -1
- package/dist/cjs/{string-input-formatter-slimmer-9747039f.js → string-input-formatter-slimmer-5a3f1b55.js} +3 -3
- package/dist/cjs/{string-mask-strategy-d9f85c21.js → string-mask-strategy-af6f3ba0.js} +2 -2
- package/dist/cjs/{style-formatter-d21a9784.js → style-formatter-324211fd.js} +2 -2
- package/dist/cjs/{sub-state-notify-slimmer-e264a120.js → sub-state-notify-slimmer-3b33e31c.js} +1 -1
- package/dist/cjs/{sub-state-observer-slimmer-6033b824.js → sub-state-observer-slimmer-5b68ba3f.js} +1 -1
- package/dist/cjs/{time-required-rule-580cbd3d.js → time-required-rule-9e714442.js} +1 -1
- package/dist/cjs/{token-extension-8d7bd451.js → token-extension-86723cad.js} +181 -509
- package/dist/cjs/{translation-slimmer-31cd5a57.js → translation-slimmer-0227ee24.js} +1 -1
- package/dist/cjs/{type-guard-00b8efc0.js → type-guard-29e01bd4.js} +1 -1
- package/dist/cjs/{valid-credit-card-number-rule-70885128.js → valid-credit-card-number-rule-4ec364af.js} +1 -1
- package/dist/cjs/vega-accordion.cjs.entry.js +14 -14
- package/dist/cjs/vega-app-footer.cjs.entry.js +6 -6
- 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 +6 -6
- package/dist/cjs/vega-breadcrumb.cjs.entry.js +6 -6
- package/dist/cjs/vega-button-circle.cjs.entry.js +13 -13
- package/dist/cjs/vega-button-group_2.cjs.entry.js +10 -10
- package/dist/cjs/vega-button-link.cjs.entry.js +7 -7
- package/dist/cjs/vega-button.cjs.entry.js +11 -11
- package/dist/cjs/vega-calendar_5.cjs.entry.js +191 -44
- 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 +11 -11
- package/dist/cjs/vega-chip.cjs.entry.js +11 -11
- package/dist/cjs/vega-code-block.cjs.entry.js +19 -19
- package/dist/cjs/vega-color-picker.cjs.entry.js +9 -9
- package/dist/cjs/vega-color-swatch-picker.cjs.entry.js +14 -14
- package/dist/cjs/vega-color-swatch.cjs.entry.js +7 -7
- package/dist/cjs/vega-combo-box.cjs.entry.js +16 -16
- package/dist/cjs/vega-counter-badge.cjs.entry.js +2 -2
- package/dist/cjs/vega-date-picker_2.cjs.entry.js +27 -27
- package/dist/cjs/{vega-dialog-controller-16be85d5.js → vega-dialog-controller-efc46dba.js} +6 -4
- package/dist/cjs/vega-dialog_2.cjs.entry.js +12 -12
- package/dist/cjs/vega-divider.cjs.entry.js +7 -7
- package/dist/cjs/vega-dropdown_5.cjs.entry.js +21 -21
- package/dist/cjs/vega-env-manager-23b8b23c.js +2 -2
- package/dist/cjs/{vega-event-id-58afed7a.js → vega-event-id-b5abf7c9.js} +4 -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 +13 -13
- package/dist/cjs/vega-flag-icon.cjs.entry.js +16 -16
- 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 +11 -11
- 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 +16 -16
- package/dist/cjs/vega-input-credit-card.cjs.entry.js +17 -17
- package/dist/cjs/vega-input-numeric.cjs.entry.js +14 -14
- package/dist/cjs/vega-input-passcode.cjs.entry.js +13 -13
- package/dist/cjs/vega-input-phone-number.cjs.entry.js +21 -274
- package/dist/cjs/vega-input-range.cjs.entry.js +11 -11
- package/dist/cjs/vega-input-select.cjs.entry.js +25 -42
- package/dist/cjs/vega-input.cjs.entry.js +17 -17
- package/dist/cjs/{vega-internal-event-id-f4d33037.js → vega-internal-event-id-98d499d7.js} +6 -2
- package/dist/cjs/vega-item-toggle.cjs.entry.js +5 -5
- package/dist/cjs/vega-left-nav_5.cjs.entry.js +23 -23
- 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 +6 -6
- package/dist/cjs/vega-pagination-page-size-selector-mobile.cjs.entry.js +6 -6
- package/dist/cjs/vega-pagination.cjs.entry.js +11 -11
- package/dist/cjs/vega-pie-chart.cjs.entry.js +2 -2
- package/dist/cjs/vega-popover_2.cjs.entry.js +16 -16
- package/dist/cjs/vega-progress-tracker_2.cjs.entry.js +12 -12
- package/dist/cjs/vega-radio_2.cjs.entry.js +14 -14
- package/dist/cjs/vega-rich-text-bookmark-editor.cjs.entry.js +445 -0
- package/dist/cjs/vega-rich-text-content.cjs.entry.js +53 -21
- package/dist/cjs/vega-rich-text-editor_4.cjs.entry.js +244 -56
- 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 +20 -20
- package/dist/cjs/vega-section-title.cjs.entry.js +2 -2
- package/dist/cjs/vega-segment-control.cjs.entry.js +13 -6
- package/dist/cjs/vega-selection-chip_2.cjs.entry.js +14 -14
- package/dist/cjs/vega-selection-tile_2.cjs.entry.js +12 -12
- package/dist/cjs/vega-sidenav_3.cjs.entry.js +16 -16
- package/dist/cjs/vega-signature-capture.cjs.entry.js +17 -17
- 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 +10 -10
- package/dist/cjs/vega-tab-group_2.cjs.entry.js +398 -108
- package/dist/cjs/vega-table_11.cjs.entry.js +639 -680
- package/dist/cjs/vega-text.cjs.entry.js +2 -2
- package/dist/cjs/vega-textarea.cjs.entry.js +10 -10
- package/dist/cjs/vega-time-picker_2.cjs.entry.js +18 -18
- package/dist/cjs/vega-toggle-switch.cjs.entry.js +9 -9
- package/dist/cjs/vega-tooltip_2.cjs.entry.js +10 -10
- package/dist/cjs/vega.cjs.js +23 -21
- package/dist/cjs/{wait-for-component-did-render-44d006ee.js → wait-for-component-did-render-90edbc1a.js} +1 -1
- 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.css +3 -3
- package/dist/collection/components/vega-button/vega-button.js +1 -1
- package/dist/collection/components/vega-button-circle/vega-button-circle.css +3 -3
- 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.css +4 -4
- 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/slimmers/common/renderers/vega-calendar-event-item-renderer.js +45 -5
- package/dist/collection/components/vega-calendar/slimmers/common/renderers/vega-calendar-event-preview-popover-renderer.js +43 -1
- package/dist/collection/components/vega-calendar/slimmers/month-view/renderers/vega-calendar-month-event-renderer.js +23 -4
- 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 +158 -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/slimmers/controllers/vega-flag-icon-controller.js +6 -6
- 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/vega-input.js +1 -1
- package/dist/collection/components/vega-input-credit-card/vega-input-credit-card.js +1 -1
- package/dist/collection/components/vega-input-numeric/vega-input-numeric.js +1 -1
- package/dist/collection/components/vega-input-passcode/vega-input-passcode.js +1 -1
- package/dist/collection/components/vega-input-phone-number/slimmers/renderers/country-select-renderer.js +4 -8
- 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/slimmers/renderers/vega-input-select-prefix-icon-renderer.js +8 -28
- package/dist/collection/components/vega-input-select/vega-input-select.js +4 -2
- 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/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/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/selection-change-action.js +1 -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 +14 -14
- package/dist/collection/components/vega-rich-text-editor/dto/blocks/text-block.js +33 -21
- package/dist/collection/components/vega-rich-text-editor/dto/content-state.js +14 -12
- 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/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 +5 -5
- 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 +1 -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/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/paste-extension.js +1 -1
- 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/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/state-entity-rendering-registry.js +1 -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/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/slimmers/renderers/vega-segment-renderer.js +8 -1
- package/dist/collection/components/vega-segment-control/vega-segment-control.js +24 -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/slimmers/controllers/dto/column-render-input-model.js +25 -8
- package/dist/collection/components/vega-table/slimmers/controllers/dto/row-render-input-model.js +41 -0
- package/dist/collection/components/vega-table/slimmers/controllers/vega-table-head-template-structure-controller.js +1 -0
- package/dist/collection/components/vega-table/slimmers/controllers/vega-table-render-input-controller.js +316 -18
- package/dist/collection/components/vega-table/slimmers/renderers/vega-table-body-renderer.js +6 -1
- package/dist/collection/components/vega-table/slimmers/renderers/vega-table-header-renderer.js +1 -0
- package/dist/collection/components/vega-table/slimmers/renderers/vega-table-pinned-renderer.js +33 -530
- package/dist/collection/components/vega-table/slimmers/renderers/vega-table-row-renderer.js +1 -0
- 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.css +10 -0
- package/dist/collection/components/vega-table/vega-table-cell/vega-table-cell.js +26 -9
- package/dist/collection/components/vega-table/vega-table-expand-row/slimmers/renderers/vega-table-expand-row-renderer.js +14 -6
- package/dist/collection/components/vega-table/vega-table-expand-row/vega-table-expand-row.css +20 -0
- package/dist/collection/components/vega-table/vega-table-expand-row/vega-table-expand-row.js +8 -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/slimmers/renderers/vega-table-foot-cell-renderer.js +21 -2
- package/dist/collection/components/vega-table/vega-table-foot-cell/vega-table-foot-cell.css +10 -0
- package/dist/collection/components/vega-table/vega-table-foot-cell/vega-table-foot-cell.js +13 -2
- package/dist/collection/components/vega-table/vega-table-foot-row/slimmers/renderers/vega-table-foot-row-renderer.js +20 -13
- package/dist/collection/components/vega-table/vega-table-foot-row/vega-table-foot-row.css +26 -0
- package/dist/collection/components/vega-table/vega-table-foot-row/vega-table-foot-row.js +13 -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.css +10 -0
- package/dist/collection/components/vega-table/vega-table-head-cell/vega-table-head-cell.js +20 -7
- package/dist/collection/components/vega-table/vega-table-head-row/slimmers/renderers/vega-table-head-row-renderer.js +21 -46
- package/dist/collection/components/vega-table/vega-table-head-row/vega-table-head-row.css +16 -7
- package/dist/collection/components/vega-table/vega-table-head-row/vega-table-head-row.js +10 -3
- package/dist/collection/components/vega-table/vega-table-row/slimmers/renderers/vega-table-row-renderer.js +28 -13
- package/dist/collection/components/vega-table/vega-table-row/vega-table-row.css +26 -0
- package/dist/collection/components/vega-table/vega-table-row/vega-table-row.js +12 -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/tokens/themes/v2-new-brand/dark-mode-border-tokens.js +1 -1
- package/dist/collection/constants/tokens/themes/v2-new-brand/dark-mode-color-tokens.js +20 -20
- package/dist/collection/constants/tokens/themes/v2-new-brand/dark-mode-ring-tokens.js +1 -1
- package/dist/collection/constants/tokens/themes/v2-new-brand/dark-mode-shadow-tokens.js +1 -1
- package/dist/collection/constants/tokens/themes/v2-new-brand/light-mode-border-tokens.js +1 -1
- package/dist/collection/constants/tokens/themes/v2-new-brand/light-mode-color-tokens.js +19 -19
- package/dist/collection/constants/tokens/themes/v2-new-brand/light-mode-shadow-tokens.js +1 -1
- package/dist/collection/constants/ui.js +2 -0
- package/dist/collection/global/scripts/before-vega-load.js +10 -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 +11 -2
- package/dist/collection/helpers/event-manager/event-id/vega-event-id.js +2 -0
- package/dist/collection/helpers/event-manager/event-id/vega-internal-event-id.js +3 -1
- 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/public-api.js +1 -0
- 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/position-calculation/position-calculation-controller.js +8 -0
- package/dist/collection/helpers/slimmers/position-calculation/screen-position-calculation-strategy.js +10 -0
- package/dist/collection/helpers/slimmers/runtime-metrics/create-public-api-runtime-metrics-slimmer.js +1 -1
- package/dist/collection/helpers/slimmers/vega-table-child-render-input-consumer-slimmer.js +2 -0
- package/dist/collection/helpers/theme/theme-manager.js +5 -2
- package/dist/collection/helpers/translation/locales/en.js +11 -0
- package/dist/collection/helpers/translation/translation.js +5 -2
- package/dist/collection/helpers/ui/element-appender.js +1 -0
- package/dist/collection/helpers/zindex/vega-z-index-manager.js +5 -2
- package/dist/esm/{action-color-accessibility-validator-08877515.js → action-color-accessibility-validator-3e824a59.js} +1 -1
- package/dist/esm/{app-globals-1e1371d5.js → app-globals-da5c83c2.js} +21 -12
- package/dist/esm/{aria-dialog-focusable-trap-slimmer-b2a24a45.js → aria-dialog-focusable-trap-slimmer-27a6aa19.js} +1 -1
- package/dist/esm/{child-nodes-event-prevent-slimmer-82626871.js → child-nodes-event-prevent-slimmer-3ae5c7db.js} +1 -1
- package/dist/esm/{code-block-741d6b8e.js → code-block-d8f83d85.js} +1036 -938
- 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-2bcd749e.js → component-value-history-controller-slimmer.abstract-642e7147.js} +4 -4
- package/dist/esm/{content-state-2f6f4204.js → content-state-486eae1d.js} +90 -88
- package/dist/esm/countries-50d3339b.js +249 -0
- package/dist/esm/{dark-mode-style-controller-352f15ff.js → dark-mode-style-controller-4e04a2d3.js} +45 -45
- package/dist/esm/{date-required-rule-2ea3aec8.js → date-required-rule-08695d25.js} +1 -1
- package/dist/esm/{design-token-82a4e107.js → design-token-df3331d9.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-c820c0bf.js → element-appender-slimmer-f02a227f.js} +22 -3
- package/dist/esm/{event-emit-slimmer-e8bb2292.js → event-emit-slimmer-aa7f4c6e.js} +1 -1
- package/dist/esm/{form-field-controller-slimmer-02165dbe.js → form-field-controller-slimmer-a7c0a0f8.js} +3 -3
- package/dist/esm/{icon-manager-4ef3f6dd.js → icon-manager-236d6c23.js} +5 -3
- package/dist/esm/{image-annotation-action-972c1074.js → image-annotation-action-df744ba5.js} +7 -6
- package/dist/esm/image-extension-20b39140.js +1200 -0
- package/dist/esm/index-090d31ca.js +4 -0
- package/dist/esm/index.js +28 -26
- package/dist/esm/{inject-keyboard-manager-6a10c9b7.js → inject-keyboard-manager-399ed867.js} +1 -1
- package/dist/esm/{internal-calendar-period-factory-d1a60f81.js → internal-calendar-period-factory-7b866c3b.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-4a7ee4d5.js} +11 -0
- package/dist/esm/{internal-vega-event-manager-2ecc9186.js → internal-vega-event-manager-6eebe8f8.js} +11 -2
- package/dist/esm/{keyboard-manager-a58288df.js → keyboard-manager-f5d13a34.js} +1 -1
- package/dist/esm/{keyboard-manager-slimmer-133b86cd.js → keyboard-manager-slimmer-f40dcb54.js} +1 -1
- package/dist/esm/{link-extension-e89acb5c.js → link-extension-3f93d70d.js} +9 -8
- package/dist/esm/loader.js +23 -21
- package/dist/esm/{month-view-generator-20e32b22.js → month-view-generator-0c665987.js} +1 -1
- package/dist/esm/{public-rules-c154201b.js → public-rules-470a1dac.js} +11 -9
- package/dist/esm/{range-c818a1eb.js → range-8e89fb54.js} +1 -1
- package/dist/esm/{responsive-format-facade-07843ec3.js → responsive-format-facade-55131a33.js} +1 -1
- package/dist/esm/{rich-text-editor-required-rule-878e91c6.js → rich-text-editor-required-rule-06caf383.js} +1 -1
- package/dist/esm/{split-cell-operation-cc0cdf90.js → split-cell-operation-e158366a.js} +15 -19
- package/dist/esm/{state-border-formatter-3b3dcfe8.js → state-border-formatter-2b73fa08.js} +1 -1
- package/dist/esm/{string-format-strategy.abstract-44381dcb.js → string-format-strategy.abstract-8c7937e3.js} +1 -1
- package/dist/esm/{string-input-formatter-slimmer-76fe52d3.js → string-input-formatter-slimmer-681c6b71.js} +3 -3
- package/dist/esm/{string-mask-strategy-999fba4b.js → string-mask-strategy-b8cceee6.js} +2 -2
- package/dist/esm/{style-formatter-c4192c99.js → style-formatter-fcd70869.js} +2 -2
- package/dist/esm/{sub-state-notify-slimmer-e306c849.js → sub-state-notify-slimmer-ba72f30b.js} +1 -1
- package/dist/esm/{sub-state-observer-slimmer-bd85f381.js → sub-state-observer-slimmer-bee1c7fa.js} +1 -1
- package/dist/esm/{time-required-rule-0554b114.js → time-required-rule-ce50859b.js} +1 -1
- package/dist/esm/{token-extension-35c66684.js → token-extension-2401e753.js} +156 -481
- package/dist/esm/{translation-slimmer-77022f2e.js → translation-slimmer-b3f3cf65.js} +1 -1
- package/dist/esm/{type-guard-26d83e7e.js → type-guard-08c82e08.js} +1 -1
- package/dist/esm/{valid-credit-card-number-rule-f60b6904.js → valid-credit-card-number-rule-66bad519.js} +1 -1
- package/dist/esm/vega-accordion.entry.js +14 -14
- package/dist/esm/vega-app-footer.entry.js +6 -6
- 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 +6 -6
- package/dist/esm/vega-breadcrumb.entry.js +6 -6
- package/dist/esm/vega-button-circle.entry.js +13 -13
- package/dist/esm/vega-button-group_2.entry.js +10 -10
- package/dist/esm/vega-button-link.entry.js +7 -7
- package/dist/esm/vega-button.entry.js +11 -11
- package/dist/esm/vega-calendar_5.entry.js +191 -44
- 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 +11 -11
- package/dist/esm/vega-chip.entry.js +11 -11
- package/dist/esm/vega-code-block.entry.js +19 -19
- package/dist/esm/vega-color-picker.entry.js +9 -9
- package/dist/esm/vega-color-swatch-picker.entry.js +14 -14
- package/dist/esm/vega-color-swatch.entry.js +7 -7
- package/dist/esm/vega-combo-box.entry.js +16 -16
- package/dist/esm/vega-counter-badge.entry.js +2 -2
- package/dist/esm/vega-date-picker_2.entry.js +27 -27
- package/dist/esm/{vega-dialog-controller-726b74f9.js → vega-dialog-controller-f2d3b6c9.js} +5 -3
- package/dist/esm/vega-dialog_2.entry.js +12 -12
- package/dist/esm/vega-divider.entry.js +7 -7
- package/dist/esm/vega-dropdown_5.entry.js +21 -21
- package/dist/esm/vega-env-manager-8f8dc473.js +2 -2
- package/dist/esm/{vega-event-id-f55f6977.js → vega-event-id-6b4db259.js} +3 -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 +13 -13
- package/dist/esm/vega-flag-icon.entry.js +16 -16
- 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 +11 -11
- 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 +16 -16
- package/dist/esm/vega-input-credit-card.entry.js +17 -17
- package/dist/esm/vega-input-numeric.entry.js +14 -14
- package/dist/esm/vega-input-passcode.entry.js +13 -13
- package/dist/esm/vega-input-phone-number.entry.js +18 -271
- package/dist/esm/vega-input-range.entry.js +11 -11
- package/dist/esm/vega-input-select.entry.js +26 -43
- package/dist/esm/vega-input.entry.js +17 -17
- package/dist/esm/{vega-internal-event-id-86fce049.js → vega-internal-event-id-02093067.js} +4 -2
- package/dist/esm/vega-item-toggle.entry.js +5 -5
- package/dist/esm/vega-left-nav_5.entry.js +23 -23
- 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 +6 -6
- package/dist/esm/vega-pagination-page-size-selector-mobile.entry.js +6 -6
- package/dist/esm/vega-pagination.entry.js +11 -11
- package/dist/esm/vega-pie-chart.entry.js +2 -2
- package/dist/esm/vega-popover_2.entry.js +16 -16
- package/dist/esm/vega-progress-tracker_2.entry.js +12 -12
- package/dist/esm/vega-radio_2.entry.js +14 -14
- package/dist/esm/vega-rich-text-bookmark-editor.entry.js +441 -0
- package/dist/esm/vega-rich-text-content.entry.js +53 -21
- package/dist/esm/vega-rich-text-editor_4.entry.js +244 -56
- 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 +20 -20
- package/dist/esm/vega-section-title.entry.js +2 -2
- package/dist/esm/vega-segment-control.entry.js +13 -6
- package/dist/esm/vega-selection-chip_2.entry.js +14 -14
- package/dist/esm/vega-selection-tile_2.entry.js +12 -12
- package/dist/esm/vega-sidenav_3.entry.js +16 -16
- package/dist/esm/vega-signature-capture.entry.js +17 -17
- 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 +10 -10
- package/dist/esm/vega-tab-group_2.entry.js +398 -108
- package/dist/esm/vega-table_11.entry.js +639 -680
- package/dist/esm/vega-text.entry.js +2 -2
- package/dist/esm/vega-textarea.entry.js +10 -10
- package/dist/esm/vega-time-picker_2.entry.js +18 -18
- package/dist/esm/vega-toggle-switch.entry.js +9 -9
- package/dist/esm/vega-tooltip_2.entry.js +10 -10
- package/dist/esm/vega.js +23 -21
- package/dist/esm/{wait-for-component-did-render-9b91a826.js → wait-for-component-did-render-9e84d92d.js} +1 -1
- package/dist/sri/vega-sri-manifest.json +432 -424
- 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/slimmers/common/renderers/vega-calendar-event-item-renderer.d.ts +18 -0
- package/dist/types/components/vega-calendar/slimmers/common/renderers/vega-calendar-event-preview-popover-renderer.d.ts +9 -0
- package/dist/types/components/vega-calendar/slimmers/month-view/renderers/vega-calendar-month-event-renderer.d.ts +9 -1
- package/dist/types/components/vega-calendar/types.d.ts +28 -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 +43 -1
- package/dist/types/components/vega-flag-icon/slimmers/controllers/vega-flag-icon-controller.d.ts +2 -2
- package/dist/types/components/vega-input-phone-number/slimmers/renderers/country-select-renderer.d.ts +0 -1
- package/dist/types/components/vega-input-select/slimmers/renderers/vega-input-select-prefix-icon-renderer.d.ts +2 -14
- package/dist/types/components/vega-input-select/vega-input-select.d.ts +1 -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/selection-change-action.d.ts +1 -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 +12 -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/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 +1 -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/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/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/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-segment-control/slimmers/renderers/vega-segment-renderer.d.ts +1 -0
- package/dist/types/components/vega-segment-control/types.d.ts +2 -0
- package/dist/types/components/vega-segment-control/vega-segment-control.d.ts +7 -1
- 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/vega-table/slimmers/controllers/dto/column-render-input-model.d.ts +17 -0
- package/dist/types/components/vega-table/slimmers/controllers/dto/row-render-input-model.d.ts +39 -0
- package/dist/types/components/vega-table/slimmers/controllers/vega-table-render-input-controller.d.ts +71 -7
- package/dist/types/components/vega-table/slimmers/renderers/vega-table-body-renderer.d.ts +1 -0
- package/dist/types/components/vega-table/slimmers/renderers/vega-table-pinned-renderer.d.ts +3 -88
- package/dist/types/components/vega-table/vega-table-expand-row/slimmers/renderers/vega-table-expand-row-renderer.d.ts +1 -1
- package/dist/types/components/vega-table/vega-table-expand-row/vega-table-expand-row.d.ts +5 -0
- package/dist/types/components/vega-table/vega-table-foot-cell/slimmers/renderers/vega-table-foot-cell-renderer.d.ts +1 -0
- package/dist/types/components/vega-table/vega-table-foot-cell/vega-table-foot-cell.d.ts +5 -0
- package/dist/types/components/vega-table/vega-table-foot-row/slimmers/renderers/vega-table-foot-row-renderer.d.ts +1 -3
- package/dist/types/components/vega-table/vega-table-foot-row/vega-table-foot-row.d.ts +5 -0
- package/dist/types/components/vega-table/vega-table-head-row/slimmers/renderers/vega-table-head-row-renderer.d.ts +0 -4
- package/dist/types/components/vega-table/vega-table-head-row/vega-table-head-row.d.ts +2 -2
- package/dist/types/components/vega-table/vega-table-row/slimmers/renderers/vega-table-row-renderer.d.ts +2 -3
- package/dist/types/components/vega-table/vega-table-row/vega-table-row.d.ts +4 -0
- package/dist/types/components.d.ts +143 -2
- 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 +2 -0
- package/dist/types/helpers/event-manager/event-id/vega-internal-event-id.d.ts +3 -1
- 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/public-api.d.ts +1 -0
- package/dist/types/helpers/skeleton-loader/vega-skeleton-loader-controller.d.ts +3 -1
- package/dist/types/helpers/slimmers/position-calculation/position-calculation-controller.d.ts +6 -0
- package/dist/types/helpers/slimmers/position-calculation/screen-position-calculation-strategy.d.ts +6 -0
- package/dist/types/helpers/slimmers/position-calculation/screen-scroll-position-update.d.ts +2 -1
- package/dist/types/helpers/slimmers/runtime-metrics/create-public-api-runtime-metrics-slimmer.d.ts +1 -1
- package/dist/types/helpers/slimmers/vega-table-child-render-input-consumer-slimmer.d.ts +2 -1
- package/dist/types/helpers/theme/theme-manager.d.ts +3 -1
- package/dist/types/helpers/translation/interface.d.ts +11 -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 +9 -1
- package/dist/types/types/public-api.d.ts +1 -0
- 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-46f22f6c.entry.js → p-013939ea.entry.js} +1 -1
- package/dist/vega/p-0338f621.entry.js +1 -0
- package/dist/vega/{p-61ed7268.entry.js → p-03efc67a.entry.js} +1 -1
- package/dist/vega/p-040bd9ca.js +1 -0
- package/dist/vega/p-049e64b1.entry.js +1 -0
- package/dist/vega/p-061a76c3.entry.js +1 -0
- package/dist/vega/{p-6fd8f14b.js → p-087240db.js} +1 -1
- package/dist/vega/{p-ab253867.entry.js → p-0e0e66c9.entry.js} +1 -1
- package/dist/vega/p-109f0e33.entry.js +1 -0
- package/dist/vega/p-15052b2e.entry.js +1 -0
- package/dist/vega/{p-9e9f49f4.js → p-1836a6a5.js} +1 -1
- package/dist/vega/p-18ddc6a4.entry.js +1 -0
- package/dist/vega/p-197388a5.entry.js +1 -0
- package/dist/vega/{p-0f344e02.entry.js → p-1b97e751.entry.js} +1 -1
- package/dist/vega/{p-bfe5dff7.entry.js → p-1d8a8507.entry.js} +1 -1
- package/dist/vega/p-2256eb09.entry.js +1 -0
- package/dist/vega/{p-60a74fb7.js → p-23781e76.js} +1 -1
- package/dist/vega/p-25e51acb.js +1 -0
- package/dist/vega/{p-b2a4314a.js → p-277aab9b.js} +1 -1
- package/dist/vega/p-27c9c2a5.entry.js +1 -0
- package/dist/vega/p-28c16885.js +1 -0
- package/dist/vega/p-29584bb5.js +1 -0
- package/dist/vega/p-2f5c4b61.entry.js +1 -0
- package/dist/vega/{p-7f395622.entry.js → p-30cc31dd.entry.js} +1 -1
- package/dist/vega/{p-76999ea1.entry.js → p-325b804d.entry.js} +1 -1
- package/dist/vega/p-361f8996.js +1 -0
- package/dist/vega/p-36ee9d54.js +1 -0
- package/dist/vega/p-372436a4.entry.js +1 -0
- package/dist/vega/{p-96c090c4.js → p-381d8781.js} +1 -1
- package/dist/vega/p-38c551a9.entry.js +1 -0
- package/dist/vega/{p-8fc0a820.js → p-3b6a6f08.js} +1 -1
- package/dist/vega/p-3bb7114b.js +1 -0
- package/dist/vega/{p-493108d5.js → p-3bfb53e3.js} +1 -1
- package/dist/vega/p-3ce7521e.entry.js +1 -0
- package/dist/vega/p-3d060d2f.entry.js +1 -0
- package/dist/vega/{p-853a05eb.js → p-3ec4d710.js} +1 -1
- package/dist/vega/p-408c3ad4.entry.js +1 -0
- package/dist/vega/p-436bd1af.entry.js +1 -0
- package/dist/vega/p-43ea1e86.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-7cc8855d.entry.js → p-467e27af.entry.js} +1 -1
- package/dist/vega/{p-5789690b.entry.js → p-46be74fc.entry.js} +1 -1
- package/dist/vega/{p-c7d46740.entry.js → p-48100d38.entry.js} +1 -1
- package/dist/vega/{p-aaaf21eb.entry.js → p-4c6989ae.entry.js} +1 -1
- package/dist/vega/{p-941a83db.js → p-4d20a56f.js} +1 -1
- package/dist/vega/p-527c3211.entry.js +1 -0
- package/dist/vega/p-53e3f259.js +1 -0
- package/dist/vega/{p-02b5d4ac.entry.js → p-553510d8.entry.js} +1 -1
- package/dist/vega/p-557b64bd.js +1 -0
- package/dist/vega/{p-a488447f.js → p-5a347a15.js} +1 -1
- package/dist/vega/p-5c285374.js +1 -0
- package/dist/vega/p-5c6d36ef.entry.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-634b138c.entry.js +1 -0
- package/dist/vega/p-6beaf1c8.entry.js +1 -0
- package/dist/vega/p-6d4f6031.entry.js +1 -0
- package/dist/vega/{p-638b6a7d.js → p-7044bb48.js} +1 -1
- package/dist/vega/p-7228088b.entry.js +1 -0
- package/dist/vega/p-741e064e.entry.js +1 -0
- package/dist/vega/p-75c7f8ea.entry.js +1 -0
- package/dist/vega/p-76135e80.entry.js +1 -0
- package/dist/vega/{p-5c3649f9.js → p-7d3419c7.js} +1 -1
- package/dist/vega/p-7d748545.entry.js +1 -0
- package/dist/vega/p-7dfb1481.entry.js +1 -0
- package/dist/vega/p-7f711049.js +1 -0
- package/dist/vega/p-7fd15dd1.js +1 -0
- package/dist/vega/p-80321148.entry.js +1 -0
- package/dist/vega/{p-b97ed9f7.entry.js → p-816064f2.entry.js} +1 -1
- package/dist/vega/p-82411b76.entry.js +1 -0
- package/dist/vega/{p-3f2a4b34.entry.js → p-83f5ef3a.entry.js} +1 -1
- package/dist/vega/{p-ab9d53e9.js → p-85695819.js} +1 -1
- package/dist/vega/p-85a940c0.entry.js +1 -0
- package/dist/vega/{p-65fee02f.entry.js → p-8a38746d.entry.js} +1 -1
- package/dist/vega/p-8a4cc7c2.entry.js +1 -0
- package/dist/vega/{p-be783294.entry.js → p-8a6e378a.entry.js} +1 -1
- package/dist/vega/{p-35d37477.entry.js → p-8bd29577.entry.js} +1 -1
- package/dist/vega/p-8e1f30ec.entry.js +1 -0
- package/dist/vega/p-916da3ce.entry.js +1 -0
- package/dist/vega/p-92efdbf0.entry.js +1 -0
- package/dist/vega/p-9680dfe6.js +1 -0
- package/dist/vega/{p-9fb3aeeb.entry.js → p-9a0e17b2.entry.js} +1 -1
- package/dist/vega/p-9fd547f3.entry.js +1 -0
- package/dist/vega/p-a0c87e88.entry.js +1 -0
- package/dist/vega/{p-efc08027.entry.js → p-a261a675.entry.js} +1 -1
- package/dist/vega/p-a2fa8c93.entry.js +1 -0
- package/dist/vega/p-a5fa260b.js +1 -0
- package/dist/vega/p-a83cef5a.js +1 -0
- package/dist/vega/{p-2c737fc8.js → p-abad8ffd.js} +1 -1
- package/dist/vega/p-ae12cc3f.js +3 -0
- package/dist/vega/p-b1557bbe.js +1 -0
- package/dist/vega/{p-e14323f3.js → p-b1e1c7d0.js} +1 -1
- package/dist/vega/p-b48caf90.entry.js +1 -0
- package/dist/vega/{p-379736e2.js → p-b68f55e2.js} +1 -1
- package/dist/vega/{p-c576e846.js → p-be0eb72f.js} +1 -1
- package/dist/vega/p-bec0e08a.entry.js +1 -0
- package/dist/vega/p-bec31ffc.entry.js +1 -0
- package/dist/vega/{p-4b35c748.js → p-bf0b46c1.js} +1 -1
- package/dist/vega/p-c0823f32.js +1 -0
- package/dist/vega/{p-f485448a.js → p-c0eb8c58.js} +1 -1
- package/dist/vega/p-c5af2ecc.entry.js +1 -0
- package/dist/vega/p-c6419eb3.entry.js +1 -0
- package/dist/vega/p-c66c6fd2.entry.js +1 -0
- package/dist/vega/p-c6b6987e.js +1 -0
- package/dist/vega/p-ca60a74b.entry.js +1 -0
- package/dist/vega/{p-c04a90d8.entry.js → p-cb68a43a.entry.js} +1 -1
- package/dist/vega/{p-c34f4cbc.js → p-cf5c5515.js} +1 -1
- package/dist/vega/p-d1d91f1a.js +1 -0
- package/dist/vega/p-d1f47512.js +1 -0
- package/dist/vega/p-d7e59f31.js +1 -0
- package/dist/vega/{p-6e9e7131.js → p-d86e0b01.js} +1 -1
- package/dist/vega/p-d8a0e3e0.entry.js +1 -0
- package/dist/vega/{p-411cadbc.entry.js → p-d8fa2f19.entry.js} +1 -1
- package/dist/vega/p-dd273d89.entry.js +1 -0
- package/dist/vega/p-dd673eb4.entry.js +1 -0
- package/dist/vega/{p-0eea1ca8.js → p-dffe47db.js} +1 -1
- package/dist/vega/p-e577dda8.entry.js +1 -0
- package/dist/vega/{p-d897acd5.js → p-e6f67a44.js} +1 -1
- package/dist/vega/p-efef0dfe.entry.js +1 -0
- package/dist/vega/p-effbfc50.entry.js +1 -0
- package/dist/vega/p-f0b49ae4.entry.js +1 -0
- package/dist/vega/{p-5006404e.entry.js → p-f0c6e9c5.entry.js} +1 -1
- package/dist/vega/p-f5874834.entry.js +1 -0
- package/dist/vega/{p-8cfdd0e8.entry.js → p-f5f26b44.entry.js} +1 -1
- package/dist/vega/p-f9f96030.entry.js +1 -0
- package/dist/vega/{p-85de755f.js → p-fa43272c.js} +1 -1
- package/dist/vega/p-ff9090af.entry.js +1 -0
- package/dist/vega/vega.esm.js +1 -1
- package/package.json +2 -2
- package/dist/cjs/image-extension-ccda26d3.js +0 -56
- package/dist/esm/image-extension-59484e9a.js +0 -53
- package/dist/vega/p-01ca92e6.entry.js +0 -1
- package/dist/vega/p-06a42a9f.entry.js +0 -1
- package/dist/vega/p-0cd362f3.entry.js +0 -1
- package/dist/vega/p-0e10798b.entry.js +0 -1
- package/dist/vega/p-0e298ee8.entry.js +0 -1
- package/dist/vega/p-23db0a92.entry.js +0 -1
- package/dist/vega/p-284a8828.entry.js +0 -1
- package/dist/vega/p-2b26e182.entry.js +0 -1
- package/dist/vega/p-2c8dc0d2.entry.js +0 -1
- package/dist/vega/p-3abb793c.entry.js +0 -1
- package/dist/vega/p-3d6a43df.entry.js +0 -1
- package/dist/vega/p-401c6764.js +0 -1
- package/dist/vega/p-49de5559.entry.js +0 -1
- package/dist/vega/p-4a2fe3a4.js +0 -1
- package/dist/vega/p-4d1896e0.entry.js +0 -1
- package/dist/vega/p-4e23e56c.entry.js +0 -1
- package/dist/vega/p-5447a8e8.js +0 -1
- package/dist/vega/p-594cb986.entry.js +0 -1
- package/dist/vega/p-5a086e93.js +0 -1
- package/dist/vega/p-5b3c8a56.js +0 -1
- package/dist/vega/p-5b9b1631.entry.js +0 -1
- package/dist/vega/p-5d9be870.entry.js +0 -1
- package/dist/vega/p-6336d446.entry.js +0 -1
- package/dist/vega/p-7469d0d1.entry.js +0 -1
- package/dist/vega/p-74b20563.entry.js +0 -1
- package/dist/vega/p-77bcdd35.js +0 -1
- package/dist/vega/p-79b49e8d.entry.js +0 -1
- package/dist/vega/p-7a03ef96.entry.js +0 -1
- package/dist/vega/p-7ae4cf82.entry.js +0 -1
- package/dist/vega/p-7ddc0bec.entry.js +0 -1
- package/dist/vega/p-7e22610b.entry.js +0 -1
- package/dist/vega/p-816b5fd2.entry.js +0 -1
- package/dist/vega/p-844ad6aa.entry.js +0 -1
- package/dist/vega/p-8663314e.js +0 -1
- package/dist/vega/p-86fb46d2.entry.js +0 -1
- package/dist/vega/p-8c30a60d.js +0 -1
- package/dist/vega/p-8ce9e214.js +0 -1
- package/dist/vega/p-8ebe30a8.js +0 -1
- package/dist/vega/p-8f00dfe6.js +0 -1
- package/dist/vega/p-9034f709.js +0 -1
- package/dist/vega/p-9ba2fdff.js +0 -1
- package/dist/vega/p-9efa5d76.js +0 -1
- package/dist/vega/p-a306bb39.js +0 -1
- package/dist/vega/p-a48468b5.entry.js +0 -1
- package/dist/vega/p-a647c856.entry.js +0 -1
- package/dist/vega/p-a6a89f09.entry.js +0 -1
- package/dist/vega/p-a92cd703.js +0 -1
- package/dist/vega/p-ad367b48.entry.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-afcd8f04.js +0 -1
- package/dist/vega/p-b07f587a.entry.js +0 -1
- package/dist/vega/p-b21cc390.entry.js +0 -1
- package/dist/vega/p-b52d7724.js +0 -3
- package/dist/vega/p-bc0e5598.entry.js +0 -1
- package/dist/vega/p-bc119e75.entry.js +0 -1
- package/dist/vega/p-bedb575c.entry.js +0 -1
- package/dist/vega/p-c032f626.entry.js +0 -1
- package/dist/vega/p-c422ee02.entry.js +0 -1
- package/dist/vega/p-cd04b149.entry.js +0 -1
- package/dist/vega/p-cd0a108b.entry.js +0 -1
- package/dist/vega/p-d1bb6e7a.entry.js +0 -1
- package/dist/vega/p-d340ee3d.entry.js +0 -1
- package/dist/vega/p-debf9e06.entry.js +0 -1
- package/dist/vega/p-e0a51e49.js +0 -1
- package/dist/vega/p-e11c6ec4.entry.js +0 -1
- package/dist/vega/p-e5226de6.entry.js +0 -1
- package/dist/vega/p-e5abc288.entry.js +0 -1
- package/dist/vega/p-e8f50fc5.js +0 -1
- package/dist/vega/p-ea1a0046.entry.js +0 -1
- package/dist/vega/p-edd7aa92.entry.js +0 -1
- package/dist/vega/p-ef1bbf14.js +0 -1
- package/dist/vega/p-f8b2dbb9.entry.js +0 -1
- package/dist/vega/p-f8bf379c.entry.js +0 -1
- package/dist/vega/p-f902305d.entry.js +0 -1
- package/dist/vega/p-fe985b52.js +0 -1
- package/dist/vega/p-ffdc25ec.js +0 -1
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { C as ChangeManager } from './change-manager-6a7eb88c.js';
|
|
2
2
|
import { d as domNodeSubjectFactory } from './dom-node-subject-observer-factory-bb7e68a0.js';
|
|
3
|
-
import { e as VegaInternalRichTextEditorFlushChanges, f as VegaInternalRichTextEditorSelectionRangeChange } from './vega-internal-event-id-
|
|
3
|
+
import { e as VegaInternalRichTextEditorFlushChanges, f as VegaInternalRichTextEditorSelectionRangeChange } from './vega-internal-event-id-02093067.js';
|
|
4
4
|
import { d as dashCaseToCamel, c as camelToDashCase } from './string-a953eafc.js';
|
|
5
5
|
import { L as LogUtility } from './global-slimmer-registry-17c4efd4.js';
|
|
6
|
-
import { i as isNonNullable } from './type-guard-
|
|
6
|
+
import { i as isNonNullable } from './type-guard-08c82e08.js';
|
|
7
7
|
import { T as TypographyUrls } from './typography-19c3b9be.js';
|
|
8
|
+
import { D as Discriminated } from './discriminated-fe5bf3c8.js';
|
|
8
9
|
import { g as generateUUID } from './misc-9fdbcfbb.js';
|
|
9
|
-
import { V as VegaInternalThemeManager } from './dark-mode-style-controller-
|
|
10
|
+
import { V as VegaInternalThemeManager } from './dark-mode-style-controller-4e04a2d3.js';
|
|
10
11
|
import { c as cleanObject } from './object-0c277f57.js';
|
|
11
12
|
import { f as findParent } from './ui-80e610f4.js';
|
|
12
13
|
|
|
@@ -20,6 +21,14 @@ var InternalAnnotationTypeEnum;
|
|
|
20
21
|
* Abstract class for all annotations
|
|
21
22
|
*/
|
|
22
23
|
class Annotation {
|
|
24
|
+
/**
|
|
25
|
+
* Whether the annotation only represents transient formatting state.
|
|
26
|
+
*
|
|
27
|
+
* @returns {boolean} True when the annotation should be treated as formatting-only.
|
|
28
|
+
*/
|
|
29
|
+
get isFormattingOnly() {
|
|
30
|
+
return false;
|
|
31
|
+
}
|
|
23
32
|
}
|
|
24
33
|
|
|
25
34
|
var BlockAnnotationTypeEnum;
|
|
@@ -114,7 +123,7 @@ class StateEntityRenderingRegistry {
|
|
|
114
123
|
* @returns {entity is VegaRTEContent} - True if the entity is a VegaRTEContent instance, false otherwise.
|
|
115
124
|
*/
|
|
116
125
|
isVegaRTEContent(entity) {
|
|
117
|
-
return entity && entity.
|
|
126
|
+
return entity && entity.typeName === 'VegaRTEContent';
|
|
118
127
|
}
|
|
119
128
|
}
|
|
120
129
|
const stateEntityRenderingRegistry = new StateEntityRenderingRegistry();
|
|
@@ -535,7 +544,7 @@ class Predicate {
|
|
|
535
544
|
* @returns {boolean} True if the block or node instance is a text node and has a link annotation, false otherwise.
|
|
536
545
|
*/
|
|
537
546
|
static isLinkNode(blockOrNodeInstance) {
|
|
538
|
-
return (this.isTextNode(blockOrNodeInstance.
|
|
547
|
+
return (this.isTextNode(blockOrNodeInstance.typeName) &&
|
|
539
548
|
!!blockOrNodeInstance.getAnnotationByType(NodeAnnotationTypeEnum.LINK));
|
|
540
549
|
}
|
|
541
550
|
/**
|
|
@@ -545,7 +554,7 @@ class Predicate {
|
|
|
545
554
|
* @returns {boolean} True if the block or node instance is a code node, false otherwise.
|
|
546
555
|
*/
|
|
547
556
|
static isCodeNode(blockOrNodeInstance) {
|
|
548
|
-
if (this.isTextNode(blockOrNodeInstance.
|
|
557
|
+
if (this.isTextNode(blockOrNodeInstance.typeName)) {
|
|
549
558
|
const codeAnnotation = blockOrNodeInstance.getAnnotationByType(NodeAnnotationTypeEnum.CODE);
|
|
550
559
|
return !!codeAnnotation && codeAnnotation.code;
|
|
551
560
|
}
|
|
@@ -558,7 +567,7 @@ class Predicate {
|
|
|
558
567
|
* @returns {boolean} True if the block or node instance is an image node, false otherwise.
|
|
559
568
|
*/
|
|
560
569
|
static isImageNode(blockOrNodeInstance) {
|
|
561
|
-
return blockOrNodeInstance.
|
|
570
|
+
return blockOrNodeInstance.typeName === 'RTEImageNode';
|
|
562
571
|
}
|
|
563
572
|
/**
|
|
564
573
|
* Check if the given block or node instance is a code block node, which is defined as an instance of RTECodeBlockNode.
|
|
@@ -567,7 +576,7 @@ class Predicate {
|
|
|
567
576
|
* @returns {boolean} True if the block or node instance is a code block node, false otherwise.
|
|
568
577
|
*/
|
|
569
578
|
static isCodeBlockNode(blockOrNodeInstance) {
|
|
570
|
-
return blockOrNodeInstance.
|
|
579
|
+
return blockOrNodeInstance.typeName === 'RTECodeBlockNode';
|
|
571
580
|
}
|
|
572
581
|
}
|
|
573
582
|
Predicate.RTE_TEXT_NODE_CLASS_NAME = 'RTETextNode';
|
|
@@ -747,7 +756,9 @@ class LinkGroupAnnotation extends Annotation {
|
|
|
747
756
|
getAttribute(linkAnnotation) {
|
|
748
757
|
const { href, customAttribute = {} } = linkAnnotation.link;
|
|
749
758
|
const useInternalStyle = linkAnnotation.useInternalStyle;
|
|
750
|
-
const target =
|
|
759
|
+
const target = (href === null || href === void 0 ? void 0 : href.startsWith('#'))
|
|
760
|
+
? '_self'
|
|
761
|
+
: customAttribute.target || (useInternalStyle ? '_blank' : '');
|
|
751
762
|
return Object.assign(Object.assign(Object.assign({}, customAttribute), (href ? { href } : useInternalStyle ? { href } : {})), (target ? { target } : {}));
|
|
752
763
|
}
|
|
753
764
|
/**
|
|
@@ -937,8 +948,8 @@ class ActionHandlerInterceptorRegistry {
|
|
|
937
948
|
* @returns {Nullable<ActionHandlerInterceptor<T, target>>} - The action handler interceptor instance or null if not found.
|
|
938
949
|
*/
|
|
939
950
|
static get(action, targetClass) {
|
|
940
|
-
const targetClassName = targetClass.
|
|
941
|
-
const actionType = action instanceof ModifyContentAction ? action.type : action.
|
|
951
|
+
const targetClassName = targetClass.typeName;
|
|
952
|
+
const actionType = action instanceof ModifyContentAction ? action.type : action.typeName;
|
|
942
953
|
const strategyMap = this.registry.get(targetClassName);
|
|
943
954
|
if (strategyMap) {
|
|
944
955
|
const set = strategyMap.get(actionType);
|
|
@@ -1008,14 +1019,14 @@ class ActionHandleStrategyRegistry {
|
|
|
1008
1019
|
const interceptor = ActionHandlerInterceptorRegistry.get(action, RTEInstance);
|
|
1009
1020
|
// eslint-disable-next-line jsdoc/require-jsdoc
|
|
1010
1021
|
const executeStrategy = () => {
|
|
1011
|
-
const actionType = action instanceof ModifyContentAction ? action.type : action.
|
|
1012
|
-
const strategy = ActionHandleStrategyRegistry.get(actionType, RTEInstance.
|
|
1022
|
+
const actionType = action instanceof ModifyContentAction ? action.type : action.typeName;
|
|
1023
|
+
const strategy = ActionHandleStrategyRegistry.get(actionType, RTEInstance.typeName);
|
|
1013
1024
|
if (strategy) {
|
|
1014
1025
|
action['executedFlag'] = true;
|
|
1015
1026
|
return strategy.execute(action, RTEInstance);
|
|
1016
1027
|
}
|
|
1017
1028
|
else {
|
|
1018
|
-
LogUtility.warn(`Type ${actionType} action handle strategy is not registered in class ${RTEInstance.
|
|
1029
|
+
LogUtility.warn(`Type ${actionType} action handle strategy is not registered in class ${RTEInstance.typeName}`);
|
|
1019
1030
|
}
|
|
1020
1031
|
};
|
|
1021
1032
|
if (interceptor) {
|
|
@@ -1033,7 +1044,7 @@ class ActionHandleStrategyRegistry {
|
|
|
1033
1044
|
* @returns {boolean} - Whether the action type can be handled by the strategy.
|
|
1034
1045
|
*/
|
|
1035
1046
|
static canHandle(actionType, RTEInstance) {
|
|
1036
|
-
const strategy = ActionHandleStrategyRegistry.get(actionType, RTEInstance.
|
|
1047
|
+
const strategy = ActionHandleStrategyRegistry.get(actionType, RTEInstance.typeName);
|
|
1037
1048
|
return strategy ? true : false;
|
|
1038
1049
|
}
|
|
1039
1050
|
}
|
|
@@ -1388,7 +1399,7 @@ class RTEFilterStylesStrategyRegistry {
|
|
|
1388
1399
|
* Registers a filter styles strategy for a specific DTO class name.
|
|
1389
1400
|
* Duplicate strategy instances are ignored.
|
|
1390
1401
|
*
|
|
1391
|
-
* @param {string} dtoClassName - The DTO class name (e.g. `RTEListBlock.
|
|
1402
|
+
* @param {string} dtoClassName - The DTO class name (e.g. `RTEListBlock.typeName`).
|
|
1392
1403
|
* @param {RTEFilterStylesStrategy} strategy - The strategy instance to register.
|
|
1393
1404
|
*/
|
|
1394
1405
|
static register(dtoClassName, strategy) {
|
|
@@ -1417,7 +1428,7 @@ class RTEFilterStylesStrategyRegistry {
|
|
|
1417
1428
|
* The instance is also passed to matched strategies so they can make decisions from DTO annotations.
|
|
1418
1429
|
*/
|
|
1419
1430
|
static executeTheStrategyFilterAction(blockOrNodeInstance, styles, classNames) {
|
|
1420
|
-
const dtoClassName = blockOrNodeInstance.
|
|
1431
|
+
const dtoClassName = blockOrNodeInstance.typeName;
|
|
1421
1432
|
const strategies = this.getStrategies(dtoClassName);
|
|
1422
1433
|
const matchedStrategies = strategies.filter((strategy) => {
|
|
1423
1434
|
return strategy.canFilter(blockOrNodeInstance);
|
|
@@ -1483,14 +1494,10 @@ var NodeTypeEnum;
|
|
|
1483
1494
|
/**
|
|
1484
1495
|
* Abstract class for all nodes
|
|
1485
1496
|
*/
|
|
1486
|
-
class RTENode {
|
|
1497
|
+
class RTENode extends Discriminated {
|
|
1487
1498
|
constructor(id, annotationMap) {
|
|
1499
|
+
super();
|
|
1488
1500
|
this.annotationMap = new Map();
|
|
1489
|
-
/**
|
|
1490
|
-
* Minimize-safe type discriminator. Each concrete sub-class declares its own
|
|
1491
|
-
* `static readonly dtoName = 'ClassName'`.
|
|
1492
|
-
*/
|
|
1493
|
-
this.dtoName = this.constructor.name;
|
|
1494
1501
|
this.id = id;
|
|
1495
1502
|
if (annotationMap) {
|
|
1496
1503
|
this.annotationMap = annotationMap;
|
|
@@ -1504,7 +1511,7 @@ class RTENode {
|
|
|
1504
1511
|
* @param {VegaRTETransformOptions} options - Options for transforming the node.
|
|
1505
1512
|
*/
|
|
1506
1513
|
static from(json, parentBlock, options) {
|
|
1507
|
-
throw new Error(`[Vega] ${this.
|
|
1514
|
+
throw new Error(`[Vega] ${this.typeName}.from(${JSON.stringify(json)}, ${parentBlock}, ${options}) is not implemented. Please implement this method in the subclass.`);
|
|
1508
1515
|
}
|
|
1509
1516
|
/**
|
|
1510
1517
|
* Creates different types of text annotations based on the provided type and value.
|
|
@@ -1693,6 +1700,7 @@ class RTENode {
|
|
|
1693
1700
|
doModifyActionApply(action) {
|
|
1694
1701
|
}
|
|
1695
1702
|
}
|
|
1703
|
+
RTENode.typeName = 'RTENode';
|
|
1696
1704
|
|
|
1697
1705
|
/**
|
|
1698
1706
|
* RTEDTOClassManager is a singleton class that manages the registration and retrieval of RTE DTO classes.
|
|
@@ -1747,14 +1755,10 @@ const RTEDTOClassManager$1 = new RTEDTOClassManager();
|
|
|
1747
1755
|
/**
|
|
1748
1756
|
* Abstract class for block
|
|
1749
1757
|
*/
|
|
1750
|
-
class RTEBlock {
|
|
1758
|
+
class RTEBlock extends Discriminated {
|
|
1751
1759
|
constructor(id) {
|
|
1760
|
+
super();
|
|
1752
1761
|
this.annotationMap = new Map();
|
|
1753
|
-
/**
|
|
1754
|
-
* Minimize-safe type discriminator. Each concrete sub-class declares its own
|
|
1755
|
-
* `static readonly dtoName = 'ClassName'`.
|
|
1756
|
-
*/
|
|
1757
|
-
this.dtoName = this.constructor.name;
|
|
1758
1762
|
this.id = id;
|
|
1759
1763
|
}
|
|
1760
1764
|
/**
|
|
@@ -1764,7 +1768,7 @@ class RTEBlock {
|
|
|
1764
1768
|
* @param {VegaRTETransformOptions} options - Options for transforming the block.
|
|
1765
1769
|
*/
|
|
1766
1770
|
static from(json, options) {
|
|
1767
|
-
throw new Error(`[Vega] ${this.
|
|
1771
|
+
throw new Error(`[Vega] ${this.typeName}.from(${JSON.stringify(json)}, ${options}) is not implemented. Please implement this method in the subclass.`);
|
|
1768
1772
|
}
|
|
1769
1773
|
/**
|
|
1770
1774
|
* Generates block children from an array of VegaRTEContentBlock.
|
|
@@ -2017,7 +2021,7 @@ class RTEBlock {
|
|
|
2017
2021
|
this.doAnnotationActionApply(action);
|
|
2018
2022
|
}
|
|
2019
2023
|
else {
|
|
2020
|
-
const strategy = ActionHandleStrategyRegistry.get(action.
|
|
2024
|
+
const strategy = ActionHandleStrategyRegistry.get(action.typeName, this.typeName);
|
|
2021
2025
|
if (strategy) {
|
|
2022
2026
|
strategy.execute(action, this);
|
|
2023
2027
|
}
|
|
@@ -2032,101 +2036,84 @@ class RTEBlock {
|
|
|
2032
2036
|
return new Map(Array.from(this.annotationMap.entries()).map(([key, value]) => [key, value.clone()]));
|
|
2033
2037
|
}
|
|
2034
2038
|
}
|
|
2039
|
+
RTEBlock.typeName = 'RTEBlock';
|
|
2035
2040
|
|
|
2036
2041
|
/**
|
|
2037
|
-
*
|
|
2038
|
-
|
|
2039
|
-
|
|
2040
|
-
}
|
|
2041
|
-
|
|
2042
|
-
/**
|
|
2043
|
-
* Abstract class for which can be splittable
|
|
2042
|
+
* Append children to a block or rte content
|
|
2043
|
+
*
|
|
2044
|
+
* @example parent.apply(new AppendChildrenAction([newChildren]))
|
|
2044
2045
|
*/
|
|
2045
|
-
class
|
|
2046
|
-
constructor() {
|
|
2047
|
-
super(
|
|
2048
|
-
|
|
2049
|
-
|
|
2050
|
-
*/
|
|
2051
|
-
this.doSplit = true;
|
|
2046
|
+
class AppendChildrenAction extends ModifyContentAction {
|
|
2047
|
+
constructor(childNodes) {
|
|
2048
|
+
super();
|
|
2049
|
+
this.type = ModifyContentActionType.APPEND_CHILDREN;
|
|
2050
|
+
this.entityToBeAppended = childNodes;
|
|
2052
2051
|
}
|
|
2053
2052
|
}
|
|
2054
2053
|
|
|
2054
|
+
const TEXT_STYLE_DEFAULT_FONT_WEIGHT = '500';
|
|
2055
|
+
const TEXT_STYLE_BASE = {
|
|
2056
|
+
fontFamily: 'Inter',
|
|
2057
|
+
fontSize: '16px',
|
|
2058
|
+
lineHeight: '22px',
|
|
2059
|
+
minHeight: '22px',
|
|
2060
|
+
fontWeight: TEXT_STYLE_DEFAULT_FONT_WEIGHT,
|
|
2061
|
+
};
|
|
2062
|
+
const PARAGRAPH_TEXT_STYLE = Object.assign(Object.assign({}, TEXT_STYLE_BASE), { marginTop: '0px', marginBottom: '0px' });
|
|
2063
|
+
const TEXT_STYLE_DEFAULTS = {
|
|
2064
|
+
'paragraph': PARAGRAPH_TEXT_STYLE,
|
|
2065
|
+
'title': Object.assign(Object.assign({}, TEXT_STYLE_BASE), { fontSize: '36px', lineHeight: '40px', minHeight: '40px' }),
|
|
2066
|
+
'subtitle': Object.assign(Object.assign({}, TEXT_STYLE_BASE), { fontSize: '28px', lineHeight: '32px', minHeight: '32px' }),
|
|
2067
|
+
'heading-1': Object.assign(Object.assign({}, PARAGRAPH_TEXT_STYLE), { fontSize: '22px', lineHeight: '24px', minHeight: '24px' }),
|
|
2068
|
+
'heading-2': Object.assign(Object.assign({}, PARAGRAPH_TEXT_STYLE), { fontSize: '20px', lineHeight: '24px', minHeight: '24px' }),
|
|
2069
|
+
'heading-3': Object.assign(Object.assign({}, PARAGRAPH_TEXT_STYLE), { fontSize: '18px' }),
|
|
2070
|
+
'heading-4': Object.assign({}, PARAGRAPH_TEXT_STYLE),
|
|
2071
|
+
'heading-5': Object.assign(Object.assign({}, PARAGRAPH_TEXT_STYLE), { fontSize: '14px' }),
|
|
2072
|
+
'heading-6': Object.assign(Object.assign({}, PARAGRAPH_TEXT_STYLE), { fontSize: '12px' }),
|
|
2073
|
+
};
|
|
2074
|
+
|
|
2055
2075
|
/**
|
|
2056
|
-
*
|
|
2076
|
+
* Text style annotation
|
|
2057
2077
|
*/
|
|
2058
|
-
class
|
|
2059
|
-
constructor(
|
|
2078
|
+
class TextStyleAnnotation extends BlockAnnotation {
|
|
2079
|
+
constructor(textStyle) {
|
|
2060
2080
|
super();
|
|
2061
|
-
this.type =
|
|
2062
|
-
this.
|
|
2081
|
+
this.type = BlockAnnotationTypeEnum.TEXT_STYLE;
|
|
2082
|
+
this.textStyle = textStyle;
|
|
2063
2083
|
}
|
|
2064
2084
|
/**
|
|
2065
|
-
*
|
|
2085
|
+
* Generate the map item for the annotations
|
|
2066
2086
|
*
|
|
2067
|
-
* @
|
|
2087
|
+
* @param {VegaRTETextStyleType} textStyle - the text style type
|
|
2088
|
+
* @returns {[BlockAnnotationTypeEnum.TEXT_STYLE, TextStyleAnnotation]} Map item for the annotation
|
|
2068
2089
|
*/
|
|
2069
|
-
|
|
2070
|
-
return new
|
|
2071
|
-
}
|
|
2072
|
-
}
|
|
2073
|
-
|
|
2074
|
-
/**
|
|
2075
|
-
* Default CSS style values produced by inline text-formatting annotations.
|
|
2076
|
-
*
|
|
2077
|
-
* These constants are the single source of truth for the CSS values that
|
|
2078
|
-
* bold, italic, underline and strikethrough semantic annotations render as
|
|
2079
|
-
* (in standalone mode) and that annotation handlers / filter strategies use
|
|
2080
|
-
* to detect or remove redundant inline styles.
|
|
2081
|
-
*/
|
|
2082
|
-
/** CSS `font-weight` value rendered by the bold annotation. */
|
|
2083
|
-
const BOLD_FONT_WEIGHT = '700';
|
|
2084
|
-
/** Alternative `font-weight` keyword that browsers report for bold elements. */
|
|
2085
|
-
const BOLD_FONT_WEIGHT_KEYWORD = 'bold';
|
|
2086
|
-
/** CSS `font-style` value rendered by the italic annotation. */
|
|
2087
|
-
const ITALIC_FONT_STYLE = 'italic';
|
|
2088
|
-
/** CSS `text-decoration` token rendered by the underline annotation. */
|
|
2089
|
-
const UNDERLINE_TEXT_DECORATION = 'underline';
|
|
2090
|
-
/** CSS `text-decoration` token rendered by the strikethrough annotation. */
|
|
2091
|
-
const STRIKETHROUGH_TEXT_DECORATION = 'line-through';
|
|
2092
|
-
/** CSS `font-family` value rendered by the code annotation. */
|
|
2093
|
-
const CODE_FONT_FAMILY = 'Roboto Mono';
|
|
2094
|
-
/** CSS `white-space` value rendered by the code annotation. */
|
|
2095
|
-
const CODE_WHITE_SPACE = 'pre-wrap';
|
|
2096
|
-
|
|
2097
|
-
/**
|
|
2098
|
-
* Annotation to make text with strikethrough
|
|
2099
|
-
*/
|
|
2100
|
-
class StrikethroughAnnotation extends NodeAnnotation {
|
|
2101
|
-
constructor(underline) {
|
|
2102
|
-
super();
|
|
2103
|
-
this.type = NodeAnnotationTypeEnum.STRIKETHROUGH;
|
|
2104
|
-
this.strikethrough = underline;
|
|
2090
|
+
static from(textStyle) {
|
|
2091
|
+
return [BlockAnnotationTypeEnum.TEXT_STYLE, new TextStyleAnnotation(textStyle)];
|
|
2105
2092
|
}
|
|
2106
2093
|
/**
|
|
2107
|
-
*
|
|
2094
|
+
* Get the default styles for a given text style type.
|
|
2108
2095
|
*
|
|
2109
|
-
* @param {
|
|
2110
|
-
* @returns {
|
|
2096
|
+
* @param {VegaRTETextStyleType} textStyle - The text style type.
|
|
2097
|
+
* @returns {Nullable<AnnotationStyle>} The default styles for the given text style type.
|
|
2111
2098
|
*/
|
|
2112
|
-
static
|
|
2113
|
-
|
|
2099
|
+
static getDefaultStyles(textStyle) {
|
|
2100
|
+
if (!textStyle)
|
|
2101
|
+
return null;
|
|
2102
|
+
return TEXT_STYLE_DEFAULTS[textStyle];
|
|
2114
2103
|
}
|
|
2115
2104
|
/**
|
|
2116
2105
|
* Generate the JSON representation of the annotation
|
|
2117
2106
|
*
|
|
2118
|
-
* @returns {Record<string, unknown
|
|
2107
|
+
* @returns {Nullable<Record<string, unknown>>} JSON representation of the annotation
|
|
2119
2108
|
*/
|
|
2120
2109
|
toJSON() {
|
|
2121
|
-
return {
|
|
2122
|
-
strikethrough: this.strikethrough,
|
|
2123
|
-
};
|
|
2110
|
+
return { textStyle: this.textStyle };
|
|
2124
2111
|
}
|
|
2125
2112
|
/**
|
|
2126
2113
|
* @inheritDoc
|
|
2127
2114
|
*/
|
|
2128
2115
|
clone() {
|
|
2129
|
-
return new
|
|
2116
|
+
return new TextStyleAnnotation(this.textStyle);
|
|
2130
2117
|
}
|
|
2131
2118
|
/**
|
|
2132
2119
|
* @inheritDoc
|
|
@@ -2134,7 +2121,7 @@ class StrikethroughAnnotation extends NodeAnnotation {
|
|
|
2134
2121
|
renderClass(options) {
|
|
2135
2122
|
if (options === null || options === void 0 ? void 0 : options.standalone)
|
|
2136
2123
|
return null;
|
|
2137
|
-
return this.
|
|
2124
|
+
return this.textStyle ? `v-rte--text-style-${this.textStyle}` : null;
|
|
2138
2125
|
}
|
|
2139
2126
|
/**
|
|
2140
2127
|
* @inheritDoc
|
|
@@ -2142,131 +2129,628 @@ class StrikethroughAnnotation extends NodeAnnotation {
|
|
|
2142
2129
|
renderStyle(options) {
|
|
2143
2130
|
if (!(options === null || options === void 0 ? void 0 : options.standalone))
|
|
2144
2131
|
return null;
|
|
2145
|
-
return this.
|
|
2132
|
+
return this.textStyle ? TextStyleAnnotation.getDefaultStyles(this.textStyle) : null;
|
|
2146
2133
|
}
|
|
2147
2134
|
}
|
|
2148
2135
|
|
|
2149
2136
|
/**
|
|
2150
|
-
*
|
|
2137
|
+
* Abstract class for annotation actions
|
|
2151
2138
|
*/
|
|
2152
|
-
class
|
|
2153
|
-
|
|
2139
|
+
class AnnotationAction extends Discriminated {
|
|
2140
|
+
}
|
|
2141
|
+
AnnotationAction.typeName = 'AnnotationAction';
|
|
2142
|
+
|
|
2143
|
+
/**
|
|
2144
|
+
* Action to change the text style of a block
|
|
2145
|
+
*/
|
|
2146
|
+
class TextStyleAnnotationAction extends AnnotationAction {
|
|
2147
|
+
constructor(textStyle, bold) {
|
|
2154
2148
|
super();
|
|
2155
|
-
this.
|
|
2156
|
-
this.
|
|
2157
|
-
|
|
2158
|
-
/**
|
|
2159
|
-
* Generate the map item for the annotation
|
|
2160
|
-
*
|
|
2161
|
-
* @param {boolean} underline - Underline annotation
|
|
2162
|
-
* @returns {[NodeAnnotationTypeEnum.UNDERLINE, UnderlineAnnotation]} Map item for the annotation
|
|
2163
|
-
*/
|
|
2164
|
-
static from(underline) {
|
|
2165
|
-
return [NodeAnnotationTypeEnum.UNDERLINE, new UnderlineAnnotation(underline)];
|
|
2149
|
+
this.isFlushable = true;
|
|
2150
|
+
this.textStyle = textStyle;
|
|
2151
|
+
this.bold = bold;
|
|
2166
2152
|
}
|
|
2167
2153
|
/**
|
|
2168
|
-
*
|
|
2154
|
+
* Converts the action to a block annotation
|
|
2169
2155
|
*
|
|
2170
|
-
* @returns {
|
|
2171
|
-
*/
|
|
2172
|
-
toJSON() {
|
|
2173
|
-
return {
|
|
2174
|
-
underline: this.underline,
|
|
2175
|
-
};
|
|
2176
|
-
}
|
|
2177
|
-
/**
|
|
2178
|
-
* @inheritDoc
|
|
2179
|
-
*/
|
|
2180
|
-
clone() {
|
|
2181
|
-
return new UnderlineAnnotation(this.underline);
|
|
2182
|
-
}
|
|
2183
|
-
/**
|
|
2184
|
-
* @inheritDoc
|
|
2185
|
-
*/
|
|
2186
|
-
renderClass(options) {
|
|
2187
|
-
if (options === null || options === void 0 ? void 0 : options.standalone)
|
|
2188
|
-
return null;
|
|
2189
|
-
return this.underline ? 'v-rte--underline' : null;
|
|
2190
|
-
}
|
|
2191
|
-
/**
|
|
2192
|
-
* @inheritDoc
|
|
2156
|
+
* @returns {BlockAnnotation} the block annotation
|
|
2193
2157
|
*/
|
|
2194
|
-
|
|
2195
|
-
|
|
2196
|
-
return null;
|
|
2197
|
-
return this.underline ? { textDecoration: UNDERLINE_TEXT_DECORATION } : null;
|
|
2158
|
+
toAnnotation() {
|
|
2159
|
+
return new TextStyleAnnotation(this.textStyle);
|
|
2198
2160
|
}
|
|
2199
2161
|
}
|
|
2162
|
+
TextStyleAnnotationAction.typeName = 'TextStyleAnnotationAction';
|
|
2200
2163
|
|
|
2201
2164
|
/**
|
|
2202
|
-
* Annotation to make text
|
|
2165
|
+
* Annotation to make text a link
|
|
2203
2166
|
*/
|
|
2204
|
-
class
|
|
2205
|
-
constructor(
|
|
2167
|
+
class LinkAnnotation extends NodeAnnotation {
|
|
2168
|
+
constructor(link, useInternalStyle = true) {
|
|
2206
2169
|
super();
|
|
2207
|
-
this.type = NodeAnnotationTypeEnum.
|
|
2208
|
-
this.
|
|
2170
|
+
this.type = NodeAnnotationTypeEnum.LINK;
|
|
2171
|
+
this.link = link;
|
|
2172
|
+
this.useInternalStyle = useInternalStyle;
|
|
2209
2173
|
}
|
|
2210
2174
|
/**
|
|
2211
2175
|
* Generate the map item for the annotation
|
|
2212
2176
|
*
|
|
2213
|
-
* @param {
|
|
2214
|
-
* @
|
|
2177
|
+
* @param {VegaRTELink} link - Bold annotation
|
|
2178
|
+
* @param {boolean} useInternalStyle - Whether to use default style for the link
|
|
2179
|
+
* @returns {[NodeAnnotationTypeEnum.LINK, LinkAnnotation]} Map item for the annotation
|
|
2215
2180
|
*/
|
|
2216
|
-
static from(
|
|
2217
|
-
return [NodeAnnotationTypeEnum.
|
|
2181
|
+
static from(link, useInternalStyle = true) {
|
|
2182
|
+
return [NodeAnnotationTypeEnum.LINK, new LinkAnnotation(link, useInternalStyle)];
|
|
2218
2183
|
}
|
|
2219
2184
|
/**
|
|
2220
2185
|
* Generate the JSON representation of the annotation
|
|
2221
2186
|
*
|
|
2222
|
-
* @returns {Record<
|
|
2187
|
+
* @returns {Record<'link', VegaRTELink>} JSON representation of the annotation
|
|
2223
2188
|
*/
|
|
2224
2189
|
toJSON() {
|
|
2225
2190
|
return {
|
|
2226
|
-
|
|
2191
|
+
link: this.link,
|
|
2227
2192
|
};
|
|
2228
2193
|
}
|
|
2229
2194
|
/**
|
|
2230
2195
|
* @inheritDoc
|
|
2231
2196
|
*/
|
|
2232
2197
|
clone() {
|
|
2233
|
-
return new
|
|
2198
|
+
return new LinkAnnotation(this.link, this.useInternalStyle);
|
|
2199
|
+
}
|
|
2200
|
+
/**
|
|
2201
|
+
* Verify whether two link annotation is same or not
|
|
2202
|
+
*
|
|
2203
|
+
* @param {LinkAnnotation} annotation - Compared annotation
|
|
2204
|
+
* @returns {boolean} Whether two link annotation is same or not
|
|
2205
|
+
*/
|
|
2206
|
+
toEqual(annotation) {
|
|
2207
|
+
return this.link.groupKey === annotation.link.groupKey;
|
|
2234
2208
|
}
|
|
2235
2209
|
/**
|
|
2236
2210
|
* @inheritDoc
|
|
2237
2211
|
*/
|
|
2238
|
-
renderClass(
|
|
2239
|
-
|
|
2240
|
-
return null;
|
|
2241
|
-
return this.italic ? 'v-rte--italic' : null;
|
|
2212
|
+
renderClass() {
|
|
2213
|
+
return null;
|
|
2242
2214
|
}
|
|
2243
2215
|
/**
|
|
2244
2216
|
* @inheritDoc
|
|
2245
2217
|
*/
|
|
2246
|
-
renderStyle(
|
|
2247
|
-
|
|
2248
|
-
return null;
|
|
2249
|
-
return this.italic ? { fontStyle: ITALIC_FONT_STYLE } : null;
|
|
2218
|
+
renderStyle() {
|
|
2219
|
+
return null;
|
|
2250
2220
|
}
|
|
2251
2221
|
}
|
|
2252
2222
|
|
|
2253
2223
|
/**
|
|
2254
|
-
*
|
|
2224
|
+
* Abstract class for which can be splittable
|
|
2255
2225
|
*/
|
|
2256
|
-
class
|
|
2257
|
-
constructor(
|
|
2258
|
-
super();
|
|
2259
|
-
|
|
2260
|
-
|
|
2226
|
+
class TextSplittableAction extends AnnotationAction {
|
|
2227
|
+
constructor() {
|
|
2228
|
+
super(...arguments);
|
|
2229
|
+
/**
|
|
2230
|
+
* Whether the action should split the node
|
|
2231
|
+
*/
|
|
2232
|
+
this.doSplit = true;
|
|
2261
2233
|
}
|
|
2262
|
-
|
|
2263
|
-
|
|
2264
|
-
|
|
2265
|
-
|
|
2266
|
-
|
|
2267
|
-
|
|
2268
|
-
|
|
2269
|
-
|
|
2234
|
+
}
|
|
2235
|
+
TextSplittableAction.typeName = 'TextSplittableAction';
|
|
2236
|
+
|
|
2237
|
+
/**
|
|
2238
|
+
* Action to toggle link annotation
|
|
2239
|
+
*/
|
|
2240
|
+
class LinkAnnotationAction extends TextSplittableAction {
|
|
2241
|
+
constructor({ link, newText, needMergeNode, doSplit, type, }) {
|
|
2242
|
+
super();
|
|
2243
|
+
this.isFlushable = true;
|
|
2244
|
+
this.link = link;
|
|
2245
|
+
this.needMergeNode = needMergeNode;
|
|
2246
|
+
this.newText = newText;
|
|
2247
|
+
this.type = type;
|
|
2248
|
+
if (isNonNullable(doSplit)) {
|
|
2249
|
+
this.doSplit = doSplit;
|
|
2250
|
+
}
|
|
2251
|
+
}
|
|
2252
|
+
/**
|
|
2253
|
+
* Converts the action to an annotation
|
|
2254
|
+
*
|
|
2255
|
+
* @returns {LinkAnnotation} the annotation
|
|
2256
|
+
*/
|
|
2257
|
+
toAnnotation() {
|
|
2258
|
+
return new LinkAnnotation(this.link);
|
|
2259
|
+
}
|
|
2260
|
+
}
|
|
2261
|
+
LinkAnnotationAction.typeName = 'LinkAnnotationAction';
|
|
2262
|
+
|
|
2263
|
+
/**
|
|
2264
|
+
* Action to link a group of nodes
|
|
2265
|
+
*/
|
|
2266
|
+
class LinkGroupAnnotationAction extends AnnotationAction {
|
|
2267
|
+
constructor(groupKey, nodes, type) {
|
|
2268
|
+
super();
|
|
2269
|
+
this.isFlushable = false;
|
|
2270
|
+
this.groupKey = groupKey;
|
|
2271
|
+
this.nodes = nodes;
|
|
2272
|
+
this.type = type;
|
|
2273
|
+
}
|
|
2274
|
+
/**
|
|
2275
|
+
* Converts the action to an annotation
|
|
2276
|
+
*
|
|
2277
|
+
* @returns {Annotation} The annotation
|
|
2278
|
+
*/
|
|
2279
|
+
toAnnotation() {
|
|
2280
|
+
return new LinkGroupAnnotation(this.groupKey);
|
|
2281
|
+
}
|
|
2282
|
+
}
|
|
2283
|
+
LinkGroupAnnotationAction.typeName = 'LinkGroupAnnotationAction';
|
|
2284
|
+
|
|
2285
|
+
/**
|
|
2286
|
+
* Default CSS style values produced by inline text-formatting annotations.
|
|
2287
|
+
*
|
|
2288
|
+
* These constants are the single source of truth for the CSS values that
|
|
2289
|
+
* bold, italic, underline and strikethrough semantic annotations render as
|
|
2290
|
+
* (in standalone mode) and that annotation handlers / filter strategies use
|
|
2291
|
+
* to detect or remove redundant inline styles.
|
|
2292
|
+
*/
|
|
2293
|
+
/** CSS `font-weight` value rendered by the bold annotation. */
|
|
2294
|
+
const BOLD_FONT_WEIGHT = '700';
|
|
2295
|
+
/** Alternative `font-weight` keyword that browsers report for bold elements. */
|
|
2296
|
+
const BOLD_FONT_WEIGHT_KEYWORD = 'bold';
|
|
2297
|
+
/** CSS `font-style` value rendered by the italic annotation. */
|
|
2298
|
+
const ITALIC_FONT_STYLE = 'italic';
|
|
2299
|
+
/** CSS `text-decoration` token rendered by the underline annotation. */
|
|
2300
|
+
const UNDERLINE_TEXT_DECORATION = 'underline';
|
|
2301
|
+
/** CSS `text-decoration` token rendered by the strikethrough annotation. */
|
|
2302
|
+
const STRIKETHROUGH_TEXT_DECORATION = 'line-through';
|
|
2303
|
+
/** CSS `font-family` value rendered by the code annotation. */
|
|
2304
|
+
const CODE_FONT_FAMILY = 'Roboto Mono';
|
|
2305
|
+
/** CSS `white-space` value rendered by the code annotation. */
|
|
2306
|
+
const CODE_WHITE_SPACE = 'pre-wrap';
|
|
2307
|
+
|
|
2308
|
+
/**
|
|
2309
|
+
* Annotation to make text bold
|
|
2310
|
+
*/
|
|
2311
|
+
class BoldAnnotation extends NodeAnnotation {
|
|
2312
|
+
constructor(bold) {
|
|
2313
|
+
super();
|
|
2314
|
+
this.type = NodeAnnotationTypeEnum.BOLD;
|
|
2315
|
+
this.bold = bold;
|
|
2316
|
+
}
|
|
2317
|
+
/**
|
|
2318
|
+
* Generate the map item for the annotation
|
|
2319
|
+
*
|
|
2320
|
+
* @param {boolean} bold - Bold annotation
|
|
2321
|
+
* @returns {[NodeAnnotationTypeEnum.BOLD, BoldAnnotation]} Map item for the annotation
|
|
2322
|
+
*/
|
|
2323
|
+
static from(bold) {
|
|
2324
|
+
return [NodeAnnotationTypeEnum.BOLD, new BoldAnnotation(bold)];
|
|
2325
|
+
}
|
|
2326
|
+
/**
|
|
2327
|
+
* @inheritDoc
|
|
2328
|
+
*/
|
|
2329
|
+
get isFormattingOnly() {
|
|
2330
|
+
return true;
|
|
2331
|
+
}
|
|
2332
|
+
/**
|
|
2333
|
+
* Generate the JSON representation of the annotation
|
|
2334
|
+
*
|
|
2335
|
+
* @returns {Record<string, unknown>} JSON representation of the annotation
|
|
2336
|
+
*/
|
|
2337
|
+
toJSON() {
|
|
2338
|
+
return {
|
|
2339
|
+
bold: this.bold,
|
|
2340
|
+
};
|
|
2341
|
+
}
|
|
2342
|
+
/**
|
|
2343
|
+
* @inheritDoc
|
|
2344
|
+
*/
|
|
2345
|
+
clone() {
|
|
2346
|
+
return new BoldAnnotation(this.bold);
|
|
2347
|
+
}
|
|
2348
|
+
/**
|
|
2349
|
+
* @inheritDoc
|
|
2350
|
+
*/
|
|
2351
|
+
renderClass(options) {
|
|
2352
|
+
if (options === null || options === void 0 ? void 0 : options.standalone)
|
|
2353
|
+
return null;
|
|
2354
|
+
return this.bold ? 'v-rte--bold' : null;
|
|
2355
|
+
}
|
|
2356
|
+
/**
|
|
2357
|
+
* @inheritDoc
|
|
2358
|
+
*/
|
|
2359
|
+
renderStyle(options) {
|
|
2360
|
+
if (!(options === null || options === void 0 ? void 0 : options.standalone))
|
|
2361
|
+
return null;
|
|
2362
|
+
return this.bold ? { fontWeight: BOLD_FONT_WEIGHT } : null;
|
|
2363
|
+
}
|
|
2364
|
+
}
|
|
2365
|
+
|
|
2366
|
+
/**
|
|
2367
|
+
* Action to toggle bold annotation
|
|
2368
|
+
*/
|
|
2369
|
+
class BoldAnnotationAction extends TextSplittableAction {
|
|
2370
|
+
constructor(bold) {
|
|
2371
|
+
super();
|
|
2372
|
+
this.isFlushable = true;
|
|
2373
|
+
this.bold = bold;
|
|
2374
|
+
}
|
|
2375
|
+
/**
|
|
2376
|
+
* Converts the action to an annotation
|
|
2377
|
+
*
|
|
2378
|
+
* @returns {BoldAnnotation} the annotation
|
|
2379
|
+
*/
|
|
2380
|
+
toAnnotation() {
|
|
2381
|
+
return new BoldAnnotation(this.bold);
|
|
2382
|
+
}
|
|
2383
|
+
}
|
|
2384
|
+
BoldAnnotationAction.typeName = 'BoldAnnotationAction';
|
|
2385
|
+
|
|
2386
|
+
/**
|
|
2387
|
+
* Delete the node annotation by type
|
|
2388
|
+
*/
|
|
2389
|
+
class DeleteNodeAnnotationAction extends AnnotationAction {
|
|
2390
|
+
constructor(annotationType) {
|
|
2391
|
+
super();
|
|
2392
|
+
this.isFlushable = true;
|
|
2393
|
+
this.annotationType = annotationType;
|
|
2394
|
+
}
|
|
2395
|
+
/**
|
|
2396
|
+
* Don't need this for this action
|
|
2397
|
+
*
|
|
2398
|
+
* @returns {Nullable<Annotation>} undefined
|
|
2399
|
+
*/
|
|
2400
|
+
toAnnotation() {
|
|
2401
|
+
return undefined;
|
|
2402
|
+
}
|
|
2403
|
+
}
|
|
2404
|
+
DeleteNodeAnnotationAction.typeName = 'DeleteNodeAnnotationAction';
|
|
2405
|
+
|
|
2406
|
+
/**
|
|
2407
|
+
* The base action handle strategy class, use to modify the rich text node content or modify the annotation.
|
|
2408
|
+
*/
|
|
2409
|
+
class ActionHandleStrategy {
|
|
2410
|
+
/**
|
|
2411
|
+
* Public method to invoke the handle logic.
|
|
2412
|
+
*
|
|
2413
|
+
* @typedef R generic type
|
|
2414
|
+
* @param {ModifyContentAction | AnnotationAction} action - The action instance. Contains the action type and necessary params.
|
|
2415
|
+
* @param {RTENode | RTEBlock | VegaRTEContent} target - The rich text node instance that will be modified.
|
|
2416
|
+
* @returns {R} - The invoke result in special strategy.
|
|
2417
|
+
*/
|
|
2418
|
+
execute(action, target) {
|
|
2419
|
+
const actionType = action instanceof ModifyContentAction ? action.type : action.typeName;
|
|
2420
|
+
LogUtility.log(`Executing action ${actionType} on ${target.typeName} ${target['id']}`);
|
|
2421
|
+
return this.handleAction(action, target);
|
|
2422
|
+
}
|
|
2423
|
+
/**
|
|
2424
|
+
* Update the custom style annotation of a block or node
|
|
2425
|
+
*
|
|
2426
|
+
* @param {RTEBlock | RTETextNode} item - block or node
|
|
2427
|
+
* @param {string[]} styleKeys - custom style keys, for examples ['fontSize', 'fontWeight'].
|
|
2428
|
+
*/
|
|
2429
|
+
updateCustomStyleAnnotation(item, styleKeys) {
|
|
2430
|
+
const customStyleAnnotation = item.annotationMap.get(CommonAnnotationTypeEnum.CUSTOM_STYLE);
|
|
2431
|
+
if (customStyleAnnotation && this.isCustomStyle(customStyleAnnotation, styleKeys)) {
|
|
2432
|
+
item.annotationMap.set(customStyleAnnotation.type, new CustomStyleAnnotation(customStyleAnnotation.removeStyles(styleKeys)));
|
|
2433
|
+
}
|
|
2434
|
+
}
|
|
2435
|
+
/**
|
|
2436
|
+
* Create a new paragraph block with the given text.
|
|
2437
|
+
*
|
|
2438
|
+
* @param {string} text - The text content for the new paragraph.
|
|
2439
|
+
* @returns {Nullable<RTETextBlock>} - The newly created paragraph block, or null if creation failed.
|
|
2440
|
+
*/
|
|
2441
|
+
createNewParagraph(text) {
|
|
2442
|
+
const dtoClass = RTEDTOClassManager$1.getRTEBlockClass('paragraph');
|
|
2443
|
+
if (dtoClass) {
|
|
2444
|
+
const newParagraph = dtoClass.from({
|
|
2445
|
+
id: generateUUID(),
|
|
2446
|
+
type: 'paragraph',
|
|
2447
|
+
nodes: [{ id: generateUUID(), type: 'text', text }],
|
|
2448
|
+
});
|
|
2449
|
+
return newParagraph;
|
|
2450
|
+
}
|
|
2451
|
+
}
|
|
2452
|
+
/**
|
|
2453
|
+
* Get the root content from a child block or node.
|
|
2454
|
+
*
|
|
2455
|
+
* @param {RTEBlock | RTENode} child - The child block or node.
|
|
2456
|
+
* @returns {Nullable<VegaRTEContent>} The root content, if found.
|
|
2457
|
+
*/
|
|
2458
|
+
getRootContent(child) {
|
|
2459
|
+
const parent = child.parent;
|
|
2460
|
+
if (parent) {
|
|
2461
|
+
if (parent.typeName === 'VegaRTEContent') {
|
|
2462
|
+
return parent;
|
|
2463
|
+
}
|
|
2464
|
+
else {
|
|
2465
|
+
return this.getRootContent(parent);
|
|
2466
|
+
}
|
|
2467
|
+
}
|
|
2468
|
+
}
|
|
2469
|
+
/**
|
|
2470
|
+
* Check the caret position at the start of a block.
|
|
2471
|
+
*
|
|
2472
|
+
* @param {RTEBlock} block - The RTE Block.
|
|
2473
|
+
* @param {RTENode} node - The RTE Node.
|
|
2474
|
+
* @param {number} offset - The offset position.
|
|
2475
|
+
* @returns {boolean} - Whether the caret is at the start of the block.
|
|
2476
|
+
*/
|
|
2477
|
+
isCaretPositionAtBlockStart(block, node, offset) {
|
|
2478
|
+
return node === block.children[0] && offset === 0;
|
|
2479
|
+
}
|
|
2480
|
+
/**
|
|
2481
|
+
* Check the caret position at the end of a block.
|
|
2482
|
+
*
|
|
2483
|
+
* @param {RTEBlock} block - The RTE Block.
|
|
2484
|
+
* @param {RTENode} node - The RTE Node.
|
|
2485
|
+
* @param {number} offset - The offset position.
|
|
2486
|
+
* @returns {boolean} - Whether the caret is at the end of the block.
|
|
2487
|
+
*/
|
|
2488
|
+
isCaretPositionAtBlockEnd(block, node, offset) {
|
|
2489
|
+
if (!node.isContentEditable()) {
|
|
2490
|
+
return this.isCaretPositionAtDecoratorBlockEnd(block, node, offset);
|
|
2491
|
+
}
|
|
2492
|
+
else {
|
|
2493
|
+
return this.isCaretPositionAtTextBlockEnd(block, node, offset);
|
|
2494
|
+
}
|
|
2495
|
+
}
|
|
2496
|
+
/**
|
|
2497
|
+
* Get the registered DOM element by the RTE entity.
|
|
2498
|
+
*
|
|
2499
|
+
* @param {RTEBlock | RTENode} instance - The RTE block or node instance.
|
|
2500
|
+
* @returns {Nullable<HTMLElement>} The registered DOM element.
|
|
2501
|
+
*/
|
|
2502
|
+
getDOMByEntity(instance) {
|
|
2503
|
+
return stateEntityRenderingRegistry.getDOMByEntity(instance);
|
|
2504
|
+
}
|
|
2505
|
+
/**
|
|
2506
|
+
* Checks if the caret position is at the end of a specified RTETextNode.
|
|
2507
|
+
*
|
|
2508
|
+
* @param {RTETextBlock} textBlock - `RTETextBlock` - a text block.
|
|
2509
|
+
* @param {RTETextNode} node - `RTETextNode` - a node representing an image in a rich text editor.
|
|
2510
|
+
* @param {number} startOffset - The position within the text node where the caret is located.
|
|
2511
|
+
* @returns {boolean} a boolean value, which indicates whether the caret position is at the start of the RTETextNode.
|
|
2512
|
+
*/
|
|
2513
|
+
isCaretPositionAtTextBlockEnd(textBlock, node, startOffset) {
|
|
2514
|
+
const lastNode = textBlock.children[textBlock.children.length - 1];
|
|
2515
|
+
return node === lastNode && (node.isEmpty() || startOffset === lastNode.text.length);
|
|
2516
|
+
}
|
|
2517
|
+
/**
|
|
2518
|
+
* Checks if the caret position is at the end of a given decorator node.
|
|
2519
|
+
*
|
|
2520
|
+
* @param {RTEBlock} target - The image block.
|
|
2521
|
+
* @param {RTENode} node - `node` is a RTEDecoratorNode or non-editable text node.
|
|
2522
|
+
* @param {number} startOffset - The position within the `RTEDecoratorNode` where the caret is located.
|
|
2523
|
+
* @returns {boolean}Returns a boolean value indicating whether the caret position is at the end of the `RTEDecoratorNode`.
|
|
2524
|
+
*/
|
|
2525
|
+
isCaretPositionAtDecoratorBlockEnd(target, node, startOffset) {
|
|
2526
|
+
return node === target.children[target.children.length - 1] && startOffset !== 0;
|
|
2527
|
+
}
|
|
2528
|
+
/**
|
|
2529
|
+
* Determines if the custom style annotation includes any the custom style.
|
|
2530
|
+
*
|
|
2531
|
+
* @param {CustomStyleAnnotation} customStyleAnnotation - custom style annotation
|
|
2532
|
+
* @param {string[]} styleKeys - custom style keys, for examples ['fontSize', 'fontWeight'].
|
|
2533
|
+
* @returns {boolean} - True if the custom key includes the custom style, false otherwise.
|
|
2534
|
+
*/
|
|
2535
|
+
isCustomStyle(customStyleAnnotation, styleKeys) {
|
|
2536
|
+
return styleKeys.some((item) => Object.keys(customStyleAnnotation.customStyle).includes(item));
|
|
2537
|
+
}
|
|
2538
|
+
}
|
|
2539
|
+
|
|
2540
|
+
/**
|
|
2541
|
+
* Update the text block text style strategy.
|
|
2542
|
+
*/
|
|
2543
|
+
class BlockUpdateTextStyleStrategy extends ActionHandleStrategy {
|
|
2544
|
+
/**
|
|
2545
|
+
* Update the text block type and add or remove the bold style from child nodes.
|
|
2546
|
+
*
|
|
2547
|
+
* @param {TextStyleAnnotationAction} action - The text style annotation action.
|
|
2548
|
+
* @param {RTETextBlock} target - The current text block.
|
|
2549
|
+
*/
|
|
2550
|
+
handleAction(action, target) {
|
|
2551
|
+
if (target.type !== 'list-item') {
|
|
2552
|
+
target.type = action.textStyle;
|
|
2553
|
+
}
|
|
2554
|
+
if (action.bold) {
|
|
2555
|
+
target.children.forEach((node) => {
|
|
2556
|
+
const boldAnnotationAction = new BoldAnnotationAction(true);
|
|
2557
|
+
boldAnnotationAction.doSplit = false;
|
|
2558
|
+
node.apply(boldAnnotationAction);
|
|
2559
|
+
});
|
|
2560
|
+
}
|
|
2561
|
+
else {
|
|
2562
|
+
target.children.forEach((node) => {
|
|
2563
|
+
node.apply(new DeleteNodeAnnotationAction(NodeAnnotationTypeEnum.BOLD));
|
|
2564
|
+
});
|
|
2565
|
+
}
|
|
2566
|
+
this.updateCustomStyleAnnotation(target, ['fontFamily', 'lineHeight', 'fontWeight', 'fontSize']);
|
|
2567
|
+
}
|
|
2568
|
+
}
|
|
2569
|
+
|
|
2570
|
+
/**
|
|
2571
|
+
* Update the text block link group annotation strategy.
|
|
2572
|
+
*/
|
|
2573
|
+
class BlockUpdateLinkGroupStrategy extends ActionHandleStrategy {
|
|
2574
|
+
/**
|
|
2575
|
+
* Update link group after the child link node update.
|
|
2576
|
+
*
|
|
2577
|
+
* @param {LinkGroupAnnotationAction} action - The link group annotation action instance.
|
|
2578
|
+
* @param {RTETextBlock} target - The current text block.
|
|
2579
|
+
*/
|
|
2580
|
+
handleAction(action, target) {
|
|
2581
|
+
let linkGroupAnnotation = target.getAnnotationByType(InternalAnnotationTypeEnum.LINK_GROUP);
|
|
2582
|
+
if (action.type === 'update_link') {
|
|
2583
|
+
if (linkGroupAnnotation) {
|
|
2584
|
+
const linkGroup = linkGroupAnnotation.linkGroups.get(action.groupKey);
|
|
2585
|
+
if (linkGroup) {
|
|
2586
|
+
linkGroupAnnotation.linkGroups.set(action.groupKey, [linkGroup[0]]);
|
|
2587
|
+
}
|
|
2588
|
+
}
|
|
2589
|
+
}
|
|
2590
|
+
else {
|
|
2591
|
+
if (linkGroupAnnotation) {
|
|
2592
|
+
const linkGroup = linkGroupAnnotation.linkGroups.get(action.groupKey) || [];
|
|
2593
|
+
linkGroupAnnotation.linkGroups.set(action.groupKey, [...linkGroup, ...action.nodes]);
|
|
2594
|
+
}
|
|
2595
|
+
else {
|
|
2596
|
+
linkGroupAnnotation = action.toAnnotation();
|
|
2597
|
+
linkGroupAnnotation.linkGroups.set(action.groupKey, [...action.nodes]);
|
|
2598
|
+
}
|
|
2599
|
+
target.annotationMap.set(InternalAnnotationTypeEnum.LINK_GROUP, linkGroupAnnotation);
|
|
2600
|
+
}
|
|
2601
|
+
}
|
|
2602
|
+
}
|
|
2603
|
+
|
|
2604
|
+
/**
|
|
2605
|
+
* Insert a new children after a existing children
|
|
2606
|
+
*
|
|
2607
|
+
* @example parent.apply(new InsertChildrenAfterAction(existingChildren, newChildren, ...))
|
|
2608
|
+
*/
|
|
2609
|
+
class InsertChildrenAfterAction extends ModifyContentAction {
|
|
2610
|
+
constructor(referBlock, ...blocksToBeInserted) {
|
|
2611
|
+
super();
|
|
2612
|
+
this.type = ModifyContentActionType.INSERT_CHILDREN_AFTER;
|
|
2613
|
+
this.referChildren = referBlock;
|
|
2614
|
+
this.childrenToBeInserted = blocksToBeInserted;
|
|
2615
|
+
}
|
|
2616
|
+
}
|
|
2617
|
+
|
|
2618
|
+
/**
|
|
2619
|
+
* Clear the current block nodes and append new nodes
|
|
2620
|
+
*
|
|
2621
|
+
* @example block.apply(new ReplaceChildNodesAction(newNodes))
|
|
2622
|
+
*/
|
|
2623
|
+
class ReplaceChildNodesAction extends ModifyContentAction {
|
|
2624
|
+
constructor(newChildNodes) {
|
|
2625
|
+
super();
|
|
2626
|
+
this.type = ModifyContentActionType.REPLACE_CHILD_NODES;
|
|
2627
|
+
this.newChildNodes = newChildNodes;
|
|
2628
|
+
}
|
|
2629
|
+
}
|
|
2630
|
+
|
|
2631
|
+
/**
|
|
2632
|
+
* Split the current node with a special position strategy.
|
|
2633
|
+
*/
|
|
2634
|
+
class BlockSplitWithTextNodeStrategy extends ActionHandleStrategy {
|
|
2635
|
+
/**
|
|
2636
|
+
* @inheritDoc
|
|
2637
|
+
*/
|
|
2638
|
+
handleAction(action, target) {
|
|
2639
|
+
action.newBlock = this.splitTextNodeBlock(action.splitPointNode, action.startOffsetOfNode, target);
|
|
2640
|
+
}
|
|
2641
|
+
/**
|
|
2642
|
+
* Splits a text node at a specified offset within a block of nodes and returns a new block with the split nodes.
|
|
2643
|
+
*
|
|
2644
|
+
* @param {RTETextNode} splitNode - The text node that will be split
|
|
2645
|
+
* @param {number} startOffsetOfNode - The index at which will split the text content of the `splitNode`.
|
|
2646
|
+
* @param {RTETextBlock} textBlock - The text block need to be splited.
|
|
2647
|
+
* @returns {Nullable<RTEBlock>} return either an RTEBlock object or null.
|
|
2648
|
+
*/
|
|
2649
|
+
splitTextNodeBlock(splitNode, startOffsetOfNode, textBlock) {
|
|
2650
|
+
if (splitNode) {
|
|
2651
|
+
const beforeText = splitNode.text.slice(0, startOffsetOfNode);
|
|
2652
|
+
const afterText = splitNode.text.slice(startOffsetOfNode);
|
|
2653
|
+
const nodesSplitIndex = textBlock.children.indexOf(splitNode);
|
|
2654
|
+
if (nodesSplitIndex > -1) {
|
|
2655
|
+
const beforeNodes = textBlock.children.slice(0, nodesSplitIndex);
|
|
2656
|
+
const afterNodes = textBlock.children.slice(nodesSplitIndex + 1);
|
|
2657
|
+
if (splitNode.isContentEditable()) {
|
|
2658
|
+
if (beforeText) {
|
|
2659
|
+
beforeNodes.push(splitNode.cloneWithText(beforeText));
|
|
2660
|
+
}
|
|
2661
|
+
if (afterText) {
|
|
2662
|
+
afterNodes.unshift(splitNode.cloneWithText(afterText));
|
|
2663
|
+
}
|
|
2664
|
+
}
|
|
2665
|
+
else {
|
|
2666
|
+
startOffsetOfNode > 0 ? beforeNodes.push(splitNode) : afterNodes.unshift(splitNode);
|
|
2667
|
+
}
|
|
2668
|
+
textBlock.apply(new ReplaceChildNodesAction(beforeNodes));
|
|
2669
|
+
const newBlock = textBlock.cloneWithNodes(afterNodes);
|
|
2670
|
+
textBlock.parent.apply(new InsertChildrenAfterAction(textBlock, newBlock));
|
|
2671
|
+
return newBlock;
|
|
2672
|
+
}
|
|
2673
|
+
}
|
|
2674
|
+
}
|
|
2675
|
+
}
|
|
2676
|
+
|
|
2677
|
+
/**
|
|
2678
|
+
* Remove all nodes and append new nodes strategy.
|
|
2679
|
+
*/
|
|
2680
|
+
class BlockReplaceNodesStrategy extends ActionHandleStrategy {
|
|
2681
|
+
/**
|
|
2682
|
+
* Empty the text block or image block nodes and add new nodes.
|
|
2683
|
+
*
|
|
2684
|
+
* @param {ReplaceChildNodesAction} action - The replace child nodes action instance.
|
|
2685
|
+
* @param {RTETextBlock | RTEImageBlock} target - The text block or the image block.
|
|
2686
|
+
*/
|
|
2687
|
+
handleAction(action, target) {
|
|
2688
|
+
target.children = [];
|
|
2689
|
+
target.apply(new AppendChildrenAction(action.newChildNodes));
|
|
2690
|
+
}
|
|
2691
|
+
}
|
|
2692
|
+
|
|
2693
|
+
/**
|
|
2694
|
+
* Remove a children from the current block
|
|
2695
|
+
*
|
|
2696
|
+
* @example needRemovedChildren.parent.apply(new RemoveChildrenAction(needRemovedChildren))
|
|
2697
|
+
*/
|
|
2698
|
+
class RemoveChildrenAction extends ModifyContentAction {
|
|
2699
|
+
constructor(childNode) {
|
|
2700
|
+
super();
|
|
2701
|
+
this.type = ModifyContentActionType.DELETE_CHILDREN;
|
|
2702
|
+
this.entityToBeRemoved = childNode;
|
|
2703
|
+
}
|
|
2704
|
+
}
|
|
2705
|
+
|
|
2706
|
+
/**
|
|
2707
|
+
* Annotation to represent a selection range
|
|
2708
|
+
*/
|
|
2709
|
+
class SelectionRangeAnnotation extends Annotation {
|
|
2710
|
+
constructor(range) {
|
|
2711
|
+
super();
|
|
2712
|
+
this.type = InternalAnnotationTypeEnum.SELECTION_RANGE;
|
|
2713
|
+
this.range = range;
|
|
2714
|
+
}
|
|
2715
|
+
/**
|
|
2716
|
+
* @inheritDoc
|
|
2717
|
+
*/
|
|
2718
|
+
get isFormattingOnly() {
|
|
2719
|
+
return true;
|
|
2720
|
+
}
|
|
2721
|
+
/**
|
|
2722
|
+
* Clone the selection range annotation
|
|
2723
|
+
*
|
|
2724
|
+
* @returns {SelectionRangeAnnotation} A cloned instance of the selection range annotation
|
|
2725
|
+
*/
|
|
2726
|
+
clone() {
|
|
2727
|
+
return new SelectionRangeAnnotation(this.range);
|
|
2728
|
+
}
|
|
2729
|
+
}
|
|
2730
|
+
|
|
2731
|
+
/**
|
|
2732
|
+
* Annotation to make text with strikethrough
|
|
2733
|
+
*/
|
|
2734
|
+
class StrikethroughAnnotation extends NodeAnnotation {
|
|
2735
|
+
constructor(underline) {
|
|
2736
|
+
super();
|
|
2737
|
+
this.type = NodeAnnotationTypeEnum.STRIKETHROUGH;
|
|
2738
|
+
this.strikethrough = underline;
|
|
2739
|
+
}
|
|
2740
|
+
/**
|
|
2741
|
+
* Generate the map item for the annotation
|
|
2742
|
+
*
|
|
2743
|
+
* @param {Nullable<boolean>} strikethrough - Strikethrough annotation
|
|
2744
|
+
* @returns {[NodeAnnotationTypeEnum.STRIKETHROUGH, StrikethroughAnnotation]} Map item for the annotation
|
|
2745
|
+
*/
|
|
2746
|
+
static from(strikethrough) {
|
|
2747
|
+
return [NodeAnnotationTypeEnum.STRIKETHROUGH, new StrikethroughAnnotation(strikethrough)];
|
|
2748
|
+
}
|
|
2749
|
+
/**
|
|
2750
|
+
* @inheritDoc
|
|
2751
|
+
*/
|
|
2752
|
+
get isFormattingOnly() {
|
|
2753
|
+
return true;
|
|
2270
2754
|
}
|
|
2271
2755
|
/**
|
|
2272
2756
|
* Generate the JSON representation of the annotation
|
|
@@ -2275,14 +2759,14 @@ class BoldAnnotation extends NodeAnnotation {
|
|
|
2275
2759
|
*/
|
|
2276
2760
|
toJSON() {
|
|
2277
2761
|
return {
|
|
2278
|
-
|
|
2762
|
+
strikethrough: this.strikethrough,
|
|
2279
2763
|
};
|
|
2280
2764
|
}
|
|
2281
2765
|
/**
|
|
2282
2766
|
* @inheritDoc
|
|
2283
2767
|
*/
|
|
2284
2768
|
clone() {
|
|
2285
|
-
return new
|
|
2769
|
+
return new StrikethroughAnnotation(this.strikethrough);
|
|
2286
2770
|
}
|
|
2287
2771
|
/**
|
|
2288
2772
|
* @inheritDoc
|
|
@@ -2290,7 +2774,7 @@ class BoldAnnotation extends NodeAnnotation {
|
|
|
2290
2774
|
renderClass(options) {
|
|
2291
2775
|
if (options === null || options === void 0 ? void 0 : options.standalone)
|
|
2292
2776
|
return null;
|
|
2293
|
-
return this.
|
|
2777
|
+
return this.strikethrough ? 'v-rte--strikethrough' : null;
|
|
2294
2778
|
}
|
|
2295
2779
|
/**
|
|
2296
2780
|
* @inheritDoc
|
|
@@ -2298,7 +2782,123 @@ class BoldAnnotation extends NodeAnnotation {
|
|
|
2298
2782
|
renderStyle(options) {
|
|
2299
2783
|
if (!(options === null || options === void 0 ? void 0 : options.standalone))
|
|
2300
2784
|
return null;
|
|
2301
|
-
return this.
|
|
2785
|
+
return this.strikethrough ? { textDecoration: STRIKETHROUGH_TEXT_DECORATION } : null;
|
|
2786
|
+
}
|
|
2787
|
+
}
|
|
2788
|
+
|
|
2789
|
+
/**
|
|
2790
|
+
* Annotation to make text with underline
|
|
2791
|
+
*/
|
|
2792
|
+
class UnderlineAnnotation extends NodeAnnotation {
|
|
2793
|
+
constructor(underline) {
|
|
2794
|
+
super();
|
|
2795
|
+
this.type = NodeAnnotationTypeEnum.UNDERLINE;
|
|
2796
|
+
this.underline = underline;
|
|
2797
|
+
}
|
|
2798
|
+
/**
|
|
2799
|
+
* Generate the map item for the annotation
|
|
2800
|
+
*
|
|
2801
|
+
* @param {boolean} underline - Underline annotation
|
|
2802
|
+
* @returns {[NodeAnnotationTypeEnum.UNDERLINE, UnderlineAnnotation]} Map item for the annotation
|
|
2803
|
+
*/
|
|
2804
|
+
static from(underline) {
|
|
2805
|
+
return [NodeAnnotationTypeEnum.UNDERLINE, new UnderlineAnnotation(underline)];
|
|
2806
|
+
}
|
|
2807
|
+
/**
|
|
2808
|
+
* @inheritDoc
|
|
2809
|
+
*/
|
|
2810
|
+
get isFormattingOnly() {
|
|
2811
|
+
return true;
|
|
2812
|
+
}
|
|
2813
|
+
/**
|
|
2814
|
+
* Generate the JSON representation of the annotation
|
|
2815
|
+
*
|
|
2816
|
+
* @returns {Record<string, unknown>} JSON representation of the annotation
|
|
2817
|
+
*/
|
|
2818
|
+
toJSON() {
|
|
2819
|
+
return {
|
|
2820
|
+
underline: this.underline,
|
|
2821
|
+
};
|
|
2822
|
+
}
|
|
2823
|
+
/**
|
|
2824
|
+
* @inheritDoc
|
|
2825
|
+
*/
|
|
2826
|
+
clone() {
|
|
2827
|
+
return new UnderlineAnnotation(this.underline);
|
|
2828
|
+
}
|
|
2829
|
+
/**
|
|
2830
|
+
* @inheritDoc
|
|
2831
|
+
*/
|
|
2832
|
+
renderClass(options) {
|
|
2833
|
+
if (options === null || options === void 0 ? void 0 : options.standalone)
|
|
2834
|
+
return null;
|
|
2835
|
+
return this.underline ? 'v-rte--underline' : null;
|
|
2836
|
+
}
|
|
2837
|
+
/**
|
|
2838
|
+
* @inheritDoc
|
|
2839
|
+
*/
|
|
2840
|
+
renderStyle(options) {
|
|
2841
|
+
if (!(options === null || options === void 0 ? void 0 : options.standalone))
|
|
2842
|
+
return null;
|
|
2843
|
+
return this.underline ? { textDecoration: UNDERLINE_TEXT_DECORATION } : null;
|
|
2844
|
+
}
|
|
2845
|
+
}
|
|
2846
|
+
|
|
2847
|
+
/**
|
|
2848
|
+
* Annotation to make text Italic
|
|
2849
|
+
*/
|
|
2850
|
+
class ItalicAnnotation extends NodeAnnotation {
|
|
2851
|
+
constructor(italic) {
|
|
2852
|
+
super();
|
|
2853
|
+
this.type = NodeAnnotationTypeEnum.ITALIC;
|
|
2854
|
+
this.italic = italic;
|
|
2855
|
+
}
|
|
2856
|
+
/**
|
|
2857
|
+
* Generate the map item for the annotation
|
|
2858
|
+
*
|
|
2859
|
+
* @param {boolean} italic - Italic annotation
|
|
2860
|
+
* @returns {[NodeAnnotationTypeEnum.ITALIC, ItalicAnnotation]} Map item for the annotation
|
|
2861
|
+
*/
|
|
2862
|
+
static from(italic) {
|
|
2863
|
+
return [NodeAnnotationTypeEnum.ITALIC, new ItalicAnnotation(italic)];
|
|
2864
|
+
}
|
|
2865
|
+
/**
|
|
2866
|
+
* @inheritDoc
|
|
2867
|
+
*/
|
|
2868
|
+
get isFormattingOnly() {
|
|
2869
|
+
return true;
|
|
2870
|
+
}
|
|
2871
|
+
/**
|
|
2872
|
+
* Generate the JSON representation of the annotation
|
|
2873
|
+
*
|
|
2874
|
+
* @returns {Record<string, unknown>} JSON representation of the annotation
|
|
2875
|
+
*/
|
|
2876
|
+
toJSON() {
|
|
2877
|
+
return {
|
|
2878
|
+
italic: this.italic,
|
|
2879
|
+
};
|
|
2880
|
+
}
|
|
2881
|
+
/**
|
|
2882
|
+
* @inheritDoc
|
|
2883
|
+
*/
|
|
2884
|
+
clone() {
|
|
2885
|
+
return new ItalicAnnotation(this.italic);
|
|
2886
|
+
}
|
|
2887
|
+
/**
|
|
2888
|
+
* @inheritDoc
|
|
2889
|
+
*/
|
|
2890
|
+
renderClass(options) {
|
|
2891
|
+
if (options === null || options === void 0 ? void 0 : options.standalone)
|
|
2892
|
+
return null;
|
|
2893
|
+
return this.italic ? 'v-rte--italic' : null;
|
|
2894
|
+
}
|
|
2895
|
+
/**
|
|
2896
|
+
* @inheritDoc
|
|
2897
|
+
*/
|
|
2898
|
+
renderStyle(options) {
|
|
2899
|
+
if (!(options === null || options === void 0 ? void 0 : options.standalone))
|
|
2900
|
+
return null;
|
|
2901
|
+
return this.italic ? { fontStyle: ITALIC_FONT_STYLE } : null;
|
|
2302
2902
|
}
|
|
2303
2903
|
}
|
|
2304
2904
|
|
|
@@ -2333,6 +2933,12 @@ class CodeAnnotation extends NodeAnnotation {
|
|
|
2333
2933
|
whiteSpace: CODE_WHITE_SPACE,
|
|
2334
2934
|
};
|
|
2335
2935
|
}
|
|
2936
|
+
/**
|
|
2937
|
+
* @inheritDoc
|
|
2938
|
+
*/
|
|
2939
|
+
get isFormattingOnly() {
|
|
2940
|
+
return true;
|
|
2941
|
+
}
|
|
2336
2942
|
/**
|
|
2337
2943
|
* Generate the JSON representation of the annotation
|
|
2338
2944
|
*
|
|
@@ -2474,108 +3080,44 @@ const RTE_PASTE_MODE_WORD = 'word';
|
|
|
2474
3080
|
const RTE_WORD_COUNT_KEY = 'rte-word-count';
|
|
2475
3081
|
|
|
2476
3082
|
/**
|
|
2477
|
-
* Annotation to make text with text color
|
|
2478
|
-
*/
|
|
2479
|
-
class TextColorAnnotation extends NodeAnnotation {
|
|
2480
|
-
constructor(textColor) {
|
|
2481
|
-
super();
|
|
2482
|
-
this.type = NodeAnnotationTypeEnum.TEXT_COLOR;
|
|
2483
|
-
this.textColor = this.formatTextColor(textColor);
|
|
2484
|
-
}
|
|
2485
|
-
/**
|
|
2486
|
-
* Generate the map item for the annotation
|
|
2487
|
-
*
|
|
2488
|
-
* @param {string} textColor - text color annotation
|
|
2489
|
-
* @returns {[NodeAnnotationTypeEnum.TEXT_COLOR, TextColorAnnotation]} Map item for the annotation
|
|
2490
|
-
*/
|
|
2491
|
-
static from(textColor) {
|
|
2492
|
-
return [NodeAnnotationTypeEnum.TEXT_COLOR, new TextColorAnnotation(textColor)];
|
|
2493
|
-
}
|
|
2494
|
-
/**
|
|
2495
|
-
* Generate the JSON representation of the annotation
|
|
2496
|
-
*
|
|
2497
|
-
* @returns {Record<string, unknown>} JSON representation of the annotation
|
|
2498
|
-
*/
|
|
2499
|
-
toJSON() {
|
|
2500
|
-
return {
|
|
2501
|
-
textColor: this.textColor.key,
|
|
2502
|
-
};
|
|
2503
|
-
}
|
|
2504
|
-
/**
|
|
2505
|
-
* @inheritDoc
|
|
2506
|
-
*/
|
|
2507
|
-
clone() {
|
|
2508
|
-
return new TextColorAnnotation(this.textColor.key);
|
|
2509
|
-
}
|
|
2510
|
-
/**
|
|
2511
|
-
* @inheritDoc
|
|
2512
|
-
*/
|
|
2513
|
-
renderClass() {
|
|
2514
|
-
return null;
|
|
2515
|
-
}
|
|
2516
|
-
/**
|
|
2517
|
-
* @inheritDoc
|
|
2518
|
-
*/
|
|
2519
|
-
renderStyle() {
|
|
2520
|
-
return {
|
|
2521
|
-
color: VegaInternalThemeManager.isDarkMode() ? this.textColor.dark : this.textColor.light,
|
|
2522
|
-
};
|
|
2523
|
-
}
|
|
2524
|
-
/**
|
|
2525
|
-
* format text color
|
|
2526
|
-
*
|
|
2527
|
-
* @param {string} textColor - text color
|
|
2528
|
-
* @returns {VegaRTEColorSchema} - VegaRTEColorSchema
|
|
2529
|
-
*/
|
|
2530
|
-
formatTextColor(textColor) {
|
|
2531
|
-
return (RTE_TEXT_COLORS.find((item) => item.key === textColor) || RTE_TEXT_COLORS[0]);
|
|
2532
|
-
}
|
|
2533
|
-
}
|
|
2534
|
-
|
|
2535
|
-
/**
|
|
2536
|
-
* Annotation to make text a link
|
|
3083
|
+
* Annotation to make text with text color
|
|
2537
3084
|
*/
|
|
2538
|
-
class
|
|
2539
|
-
constructor(
|
|
3085
|
+
class TextColorAnnotation extends NodeAnnotation {
|
|
3086
|
+
constructor(textColor) {
|
|
2540
3087
|
super();
|
|
2541
|
-
this.type = NodeAnnotationTypeEnum.
|
|
2542
|
-
this.
|
|
2543
|
-
this.useInternalStyle = useInternalStyle;
|
|
3088
|
+
this.type = NodeAnnotationTypeEnum.TEXT_COLOR;
|
|
3089
|
+
this.textColor = this.formatTextColor(textColor);
|
|
2544
3090
|
}
|
|
2545
3091
|
/**
|
|
2546
3092
|
* Generate the map item for the annotation
|
|
2547
3093
|
*
|
|
2548
|
-
* @param {
|
|
2549
|
-
* @
|
|
2550
|
-
* @returns {[NodeAnnotationTypeEnum.LINK, LinkAnnotation]} Map item for the annotation
|
|
3094
|
+
* @param {string} textColor - text color annotation
|
|
3095
|
+
* @returns {[NodeAnnotationTypeEnum.TEXT_COLOR, TextColorAnnotation]} Map item for the annotation
|
|
2551
3096
|
*/
|
|
2552
|
-
static from(
|
|
2553
|
-
return [NodeAnnotationTypeEnum.
|
|
3097
|
+
static from(textColor) {
|
|
3098
|
+
return [NodeAnnotationTypeEnum.TEXT_COLOR, new TextColorAnnotation(textColor)];
|
|
3099
|
+
}
|
|
3100
|
+
/**
|
|
3101
|
+
* @inheritDoc
|
|
3102
|
+
*/
|
|
3103
|
+
get isFormattingOnly() {
|
|
3104
|
+
return true;
|
|
2554
3105
|
}
|
|
2555
3106
|
/**
|
|
2556
3107
|
* Generate the JSON representation of the annotation
|
|
2557
3108
|
*
|
|
2558
|
-
* @returns {Record<
|
|
3109
|
+
* @returns {Record<string, unknown>} JSON representation of the annotation
|
|
2559
3110
|
*/
|
|
2560
3111
|
toJSON() {
|
|
2561
3112
|
return {
|
|
2562
|
-
|
|
3113
|
+
textColor: this.textColor.key,
|
|
2563
3114
|
};
|
|
2564
3115
|
}
|
|
2565
3116
|
/**
|
|
2566
3117
|
* @inheritDoc
|
|
2567
3118
|
*/
|
|
2568
3119
|
clone() {
|
|
2569
|
-
return new
|
|
2570
|
-
}
|
|
2571
|
-
/**
|
|
2572
|
-
* Verify whether two link annotation is same or not
|
|
2573
|
-
*
|
|
2574
|
-
* @param {LinkAnnotation} annotation - Compared annotation
|
|
2575
|
-
* @returns {boolean} Whether two link annotation is same or not
|
|
2576
|
-
*/
|
|
2577
|
-
toEqual(annotation) {
|
|
2578
|
-
return this.link.groupKey === annotation.link.groupKey;
|
|
3120
|
+
return new TextColorAnnotation(this.textColor.key);
|
|
2579
3121
|
}
|
|
2580
3122
|
/**
|
|
2581
3123
|
* @inheritDoc
|
|
@@ -2587,28 +3129,18 @@ class LinkAnnotation extends NodeAnnotation {
|
|
|
2587
3129
|
* @inheritDoc
|
|
2588
3130
|
*/
|
|
2589
3131
|
renderStyle() {
|
|
2590
|
-
return
|
|
2591
|
-
|
|
2592
|
-
}
|
|
2593
|
-
|
|
2594
|
-
/**
|
|
2595
|
-
* Action to link a group of nodes
|
|
2596
|
-
*/
|
|
2597
|
-
class LinkGroupAnnotationAction extends AnnotationAction {
|
|
2598
|
-
constructor(groupKey, nodes, type) {
|
|
2599
|
-
super();
|
|
2600
|
-
this.isFlushable = false;
|
|
2601
|
-
this.groupKey = groupKey;
|
|
2602
|
-
this.nodes = nodes;
|
|
2603
|
-
this.type = type;
|
|
3132
|
+
return {
|
|
3133
|
+
color: VegaInternalThemeManager.isDarkMode() ? this.textColor.dark : this.textColor.light,
|
|
3134
|
+
};
|
|
2604
3135
|
}
|
|
2605
3136
|
/**
|
|
2606
|
-
*
|
|
3137
|
+
* format text color
|
|
2607
3138
|
*
|
|
2608
|
-
* @
|
|
3139
|
+
* @param {string} textColor - text color
|
|
3140
|
+
* @returns {VegaRTEColorSchema} - VegaRTEColorSchema
|
|
2609
3141
|
*/
|
|
2610
|
-
|
|
2611
|
-
return
|
|
3142
|
+
formatTextColor(textColor) {
|
|
3143
|
+
return (RTE_TEXT_COLORS.find((item) => item.key === textColor) || RTE_TEXT_COLORS[0]);
|
|
2612
3144
|
}
|
|
2613
3145
|
}
|
|
2614
3146
|
|
|
@@ -2629,139 +3161,7 @@ class SyncUpSelectionAction extends AnnotationAction {
|
|
|
2629
3161
|
return null;
|
|
2630
3162
|
}
|
|
2631
3163
|
}
|
|
2632
|
-
|
|
2633
|
-
/**
|
|
2634
|
-
* The base action handle strategy class, use to modify the rich text node content or modify the annotation.
|
|
2635
|
-
*/
|
|
2636
|
-
class ActionHandleStrategy {
|
|
2637
|
-
/**
|
|
2638
|
-
* Public method to invoke the handle logic.
|
|
2639
|
-
*
|
|
2640
|
-
* @typedef R generic type
|
|
2641
|
-
* @param {ModifyContentAction | AnnotationAction} action - The action instance. Contains the action type and necessary params.
|
|
2642
|
-
* @param {RTENode | RTEBlock | VegaRTEContent} target - The rich text node instance that will be modified.
|
|
2643
|
-
* @returns {R} - The invoke result in special strategy.
|
|
2644
|
-
*/
|
|
2645
|
-
execute(action, target) {
|
|
2646
|
-
LogUtility.log(`Executing action ${action.constructor.name} on ${target.constructor.name} ${target['id']}`);
|
|
2647
|
-
return this.handleAction(action, target);
|
|
2648
|
-
}
|
|
2649
|
-
/**
|
|
2650
|
-
* Update the custom style annotation of a block or node
|
|
2651
|
-
*
|
|
2652
|
-
* @param {RTEBlock | RTETextNode} item - block or node
|
|
2653
|
-
* @param {string[]} styleKeys - custom style keys, for examples ['fontSize', 'fontWeight'].
|
|
2654
|
-
*/
|
|
2655
|
-
updateCustomStyleAnnotation(item, styleKeys) {
|
|
2656
|
-
const customStyleAnnotation = item.annotationMap.get(CommonAnnotationTypeEnum.CUSTOM_STYLE);
|
|
2657
|
-
if (customStyleAnnotation && this.isCustomStyle(customStyleAnnotation, styleKeys)) {
|
|
2658
|
-
item.annotationMap.set(customStyleAnnotation.type, new CustomStyleAnnotation(customStyleAnnotation.removeStyles(styleKeys)));
|
|
2659
|
-
}
|
|
2660
|
-
}
|
|
2661
|
-
/**
|
|
2662
|
-
* Create a new paragraph block with the given text.
|
|
2663
|
-
*
|
|
2664
|
-
* @param {string} text - The text content for the new paragraph.
|
|
2665
|
-
* @returns {Nullable<RTETextBlock>} - The newly created paragraph block, or null if creation failed.
|
|
2666
|
-
*/
|
|
2667
|
-
createNewParagraph(text) {
|
|
2668
|
-
const dtoClass = RTEDTOClassManager$1.getRTEBlockClass('paragraph');
|
|
2669
|
-
if (dtoClass) {
|
|
2670
|
-
const newParagraph = dtoClass.from({
|
|
2671
|
-
id: generateUUID(),
|
|
2672
|
-
type: 'paragraph',
|
|
2673
|
-
nodes: [{ id: generateUUID(), type: 'text', text }],
|
|
2674
|
-
});
|
|
2675
|
-
return newParagraph;
|
|
2676
|
-
}
|
|
2677
|
-
}
|
|
2678
|
-
/**
|
|
2679
|
-
* Get the root content from a child block or node.
|
|
2680
|
-
*
|
|
2681
|
-
* @param {RTEBlock | RTENode} child - The child block or node.
|
|
2682
|
-
* @returns {Nullable<VegaRTEContent>} The root content, if found.
|
|
2683
|
-
*/
|
|
2684
|
-
getRootContent(child) {
|
|
2685
|
-
const parent = child.parent;
|
|
2686
|
-
if (parent) {
|
|
2687
|
-
if (parent.dtoName === 'VegaRTEContent') {
|
|
2688
|
-
return parent;
|
|
2689
|
-
}
|
|
2690
|
-
else {
|
|
2691
|
-
return this.getRootContent(parent);
|
|
2692
|
-
}
|
|
2693
|
-
}
|
|
2694
|
-
}
|
|
2695
|
-
/**
|
|
2696
|
-
* Check the caret position at the start of a block.
|
|
2697
|
-
*
|
|
2698
|
-
* @param {RTEBlock} block - The RTE Block.
|
|
2699
|
-
* @param {RTENode} node - The RTE Node.
|
|
2700
|
-
* @param {number} offset - The offset position.
|
|
2701
|
-
* @returns {boolean} - Whether the caret is at the start of the block.
|
|
2702
|
-
*/
|
|
2703
|
-
isCaretPositionAtBlockStart(block, node, offset) {
|
|
2704
|
-
return node === block.children[0] && offset === 0;
|
|
2705
|
-
}
|
|
2706
|
-
/**
|
|
2707
|
-
* Check the caret position at the end of a block.
|
|
2708
|
-
*
|
|
2709
|
-
* @param {RTEBlock} block - The RTE Block.
|
|
2710
|
-
* @param {RTENode} node - The RTE Node.
|
|
2711
|
-
* @param {number} offset - The offset position.
|
|
2712
|
-
* @returns {boolean} - Whether the caret is at the end of the block.
|
|
2713
|
-
*/
|
|
2714
|
-
isCaretPositionAtBlockEnd(block, node, offset) {
|
|
2715
|
-
if (!node.isContentEditable()) {
|
|
2716
|
-
return this.isCaretPositionAtDecoratorBlockEnd(block, node, offset);
|
|
2717
|
-
}
|
|
2718
|
-
else {
|
|
2719
|
-
return this.isCaretPositionAtTextBlockEnd(block, node, offset);
|
|
2720
|
-
}
|
|
2721
|
-
}
|
|
2722
|
-
/**
|
|
2723
|
-
* Get the registered DOM element by the RTE entity.
|
|
2724
|
-
*
|
|
2725
|
-
* @param {RTEBlock | RTENode} instance - The RTE block or node instance.
|
|
2726
|
-
* @returns {Nullable<HTMLElement>} The registered DOM element.
|
|
2727
|
-
*/
|
|
2728
|
-
getDOMByEntity(instance) {
|
|
2729
|
-
return stateEntityRenderingRegistry.getDOMByEntity(instance);
|
|
2730
|
-
}
|
|
2731
|
-
/**
|
|
2732
|
-
* Checks if the caret position is at the end of a specified RTETextNode.
|
|
2733
|
-
*
|
|
2734
|
-
* @param {RTETextBlock} textBlock - `RTETextBlock` - a text block.
|
|
2735
|
-
* @param {RTETextNode} node - `RTETextNode` - a node representing an image in a rich text editor.
|
|
2736
|
-
* @param {number} startOffset - The position within the text node where the caret is located.
|
|
2737
|
-
* @returns {boolean} a boolean value, which indicates whether the caret position is at the start of the RTETextNode.
|
|
2738
|
-
*/
|
|
2739
|
-
isCaretPositionAtTextBlockEnd(textBlock, node, startOffset) {
|
|
2740
|
-
const lastNode = textBlock.children[textBlock.children.length - 1];
|
|
2741
|
-
return node === lastNode && (node.isEmpty() || startOffset === lastNode.text.length);
|
|
2742
|
-
}
|
|
2743
|
-
/**
|
|
2744
|
-
* Checks if the caret position is at the end of a given decorator node.
|
|
2745
|
-
*
|
|
2746
|
-
* @param {RTEBlock} target - The image block.
|
|
2747
|
-
* @param {RTENode} node - `node` is a RTEDecoratorNode or non-editable text node.
|
|
2748
|
-
* @param {number} startOffset - The position within the `RTEDecoratorNode` where the caret is located.
|
|
2749
|
-
* @returns {boolean}Returns a boolean value indicating whether the caret position is at the end of the `RTEDecoratorNode`.
|
|
2750
|
-
*/
|
|
2751
|
-
isCaretPositionAtDecoratorBlockEnd(target, node, startOffset) {
|
|
2752
|
-
return node === target.children[target.children.length - 1] && startOffset !== 0;
|
|
2753
|
-
}
|
|
2754
|
-
/**
|
|
2755
|
-
* Determines if the custom style annotation includes any the custom style.
|
|
2756
|
-
*
|
|
2757
|
-
* @param {CustomStyleAnnotation} customStyleAnnotation - custom style annotation
|
|
2758
|
-
* @param {string[]} styleKeys - custom style keys, for examples ['fontSize', 'fontWeight'].
|
|
2759
|
-
* @returns {boolean} - True if the custom key includes the custom style, false otherwise.
|
|
2760
|
-
*/
|
|
2761
|
-
isCustomStyle(customStyleAnnotation, styleKeys) {
|
|
2762
|
-
return styleKeys.some((item) => Object.keys(customStyleAnnotation.customStyle).includes(item));
|
|
2763
|
-
}
|
|
2764
|
-
}
|
|
3164
|
+
SyncUpSelectionAction.typeName = 'SyncUpSelectionAction';
|
|
2765
3165
|
|
|
2766
3166
|
/**
|
|
2767
3167
|
* Split the corresponding link group nodes *
|
|
@@ -2912,25 +3312,6 @@ class NodeSplitTextStrategy extends ActionHandleStrategy {
|
|
|
2912
3312
|
}
|
|
2913
3313
|
}
|
|
2914
3314
|
|
|
2915
|
-
/**
|
|
2916
|
-
* Action to toggle bold annotation
|
|
2917
|
-
*/
|
|
2918
|
-
class BoldAnnotationAction extends TextSplittableAction {
|
|
2919
|
-
constructor(bold) {
|
|
2920
|
-
super();
|
|
2921
|
-
this.isFlushable = true;
|
|
2922
|
-
this.bold = bold;
|
|
2923
|
-
}
|
|
2924
|
-
/**
|
|
2925
|
-
* Converts the action to an annotation
|
|
2926
|
-
*
|
|
2927
|
-
* @returns {BoldAnnotation} the annotation
|
|
2928
|
-
*/
|
|
2929
|
-
toAnnotation() {
|
|
2930
|
-
return new BoldAnnotation(this.bold);
|
|
2931
|
-
}
|
|
2932
|
-
}
|
|
2933
|
-
|
|
2934
3315
|
/**
|
|
2935
3316
|
* Annotation to host which annotations will be clear formatting
|
|
2936
3317
|
*/
|
|
@@ -2967,6 +3348,7 @@ class ClearFormattingAnnotationAction extends TextSplittableAction {
|
|
|
2967
3348
|
return new ClearFormattingAnnotation();
|
|
2968
3349
|
}
|
|
2969
3350
|
}
|
|
3351
|
+
ClearFormattingAnnotationAction.typeName = 'ClearFormattingAnnotationAction';
|
|
2970
3352
|
|
|
2971
3353
|
/**
|
|
2972
3354
|
* Action to toggle code annotation
|
|
@@ -2986,69 +3368,27 @@ class CodeAnnotationAction extends TextSplittableAction {
|
|
|
2986
3368
|
return new CodeAnnotation(this.code);
|
|
2987
3369
|
}
|
|
2988
3370
|
}
|
|
2989
|
-
|
|
2990
|
-
/**
|
|
2991
|
-
* Delete the node annotation by type
|
|
2992
|
-
*/
|
|
2993
|
-
class DeleteNodeAnnotationAction extends AnnotationAction {
|
|
2994
|
-
constructor(annotationType) {
|
|
2995
|
-
super();
|
|
2996
|
-
this.isFlushable = true;
|
|
2997
|
-
this.annotationType = annotationType;
|
|
2998
|
-
}
|
|
2999
|
-
/**
|
|
3000
|
-
* Don't need this for this action
|
|
3001
|
-
*
|
|
3002
|
-
* @returns {Nullable<Annotation>} undefined
|
|
3003
|
-
*/
|
|
3004
|
-
toAnnotation() {
|
|
3005
|
-
return undefined;
|
|
3006
|
-
}
|
|
3007
|
-
}
|
|
3371
|
+
CodeAnnotationAction.typeName = 'CodeAnnotationAction';
|
|
3008
3372
|
|
|
3009
3373
|
/**
|
|
3010
3374
|
* Action to toggle the italic annotation
|
|
3011
|
-
*/
|
|
3012
|
-
class ItalicAnnotationAction extends TextSplittableAction {
|
|
3013
|
-
constructor(italic) {
|
|
3014
|
-
super();
|
|
3015
|
-
this.isFlushable = true;
|
|
3016
|
-
this.italic = italic;
|
|
3017
|
-
}
|
|
3018
|
-
/**
|
|
3019
|
-
* Converts the action to an annotation
|
|
3020
|
-
*
|
|
3021
|
-
* @returns {ItalicAnnotation} The annotation
|
|
3022
|
-
*/
|
|
3023
|
-
toAnnotation() {
|
|
3024
|
-
return new ItalicAnnotation(this.italic);
|
|
3025
|
-
}
|
|
3026
|
-
}
|
|
3027
|
-
|
|
3028
|
-
/**
|
|
3029
|
-
* Action to toggle link annotation
|
|
3030
|
-
*/
|
|
3031
|
-
class LinkAnnotationAction extends TextSplittableAction {
|
|
3032
|
-
constructor({ link, newText, needMergeNode, doSplit, type, }) {
|
|
3375
|
+
*/
|
|
3376
|
+
class ItalicAnnotationAction extends TextSplittableAction {
|
|
3377
|
+
constructor(italic) {
|
|
3033
3378
|
super();
|
|
3034
3379
|
this.isFlushable = true;
|
|
3035
|
-
this.
|
|
3036
|
-
this.needMergeNode = needMergeNode;
|
|
3037
|
-
this.newText = newText;
|
|
3038
|
-
this.type = type;
|
|
3039
|
-
if (isNonNullable(doSplit)) {
|
|
3040
|
-
this.doSplit = doSplit;
|
|
3041
|
-
}
|
|
3380
|
+
this.italic = italic;
|
|
3042
3381
|
}
|
|
3043
3382
|
/**
|
|
3044
3383
|
* Converts the action to an annotation
|
|
3045
3384
|
*
|
|
3046
|
-
* @returns {
|
|
3385
|
+
* @returns {ItalicAnnotation} The annotation
|
|
3047
3386
|
*/
|
|
3048
3387
|
toAnnotation() {
|
|
3049
|
-
return new
|
|
3388
|
+
return new ItalicAnnotation(this.italic);
|
|
3050
3389
|
}
|
|
3051
3390
|
}
|
|
3391
|
+
ItalicAnnotationAction.typeName = 'ItalicAnnotationAction';
|
|
3052
3392
|
|
|
3053
3393
|
/**
|
|
3054
3394
|
* Action to toggle the strikethrough annotation
|
|
@@ -3068,6 +3408,7 @@ class StrikethroughAnnotationAction extends TextSplittableAction {
|
|
|
3068
3408
|
return new StrikethroughAnnotation(this.strikethrough);
|
|
3069
3409
|
}
|
|
3070
3410
|
}
|
|
3411
|
+
StrikethroughAnnotationAction.typeName = 'StrikethroughAnnotationAction';
|
|
3071
3412
|
|
|
3072
3413
|
/**
|
|
3073
3414
|
* Action to toggle the underline annotation
|
|
@@ -3087,6 +3428,7 @@ class UnderlineAnnotationAction extends TextSplittableAction {
|
|
|
3087
3428
|
return new UnderlineAnnotation(this.underline);
|
|
3088
3429
|
}
|
|
3089
3430
|
}
|
|
3431
|
+
UnderlineAnnotationAction.typeName = 'UnderlineAnnotationAction';
|
|
3090
3432
|
|
|
3091
3433
|
/**
|
|
3092
3434
|
* The current strategy used to modify the text node annotation map.
|
|
@@ -3376,6 +3718,12 @@ class PlainTextAnnotation extends NodeAnnotation {
|
|
|
3376
3718
|
static from(plainText) {
|
|
3377
3719
|
return [NodeAnnotationTypeEnum.PLAIN_TEXT, new PlainTextAnnotation(plainText)];
|
|
3378
3720
|
}
|
|
3721
|
+
/**
|
|
3722
|
+
* @inheritDoc
|
|
3723
|
+
*/
|
|
3724
|
+
get isFormattingOnly() {
|
|
3725
|
+
return true;
|
|
3726
|
+
}
|
|
3379
3727
|
/**
|
|
3380
3728
|
* @inheritDoc
|
|
3381
3729
|
*/
|
|
@@ -3420,6 +3768,7 @@ class TextColorAnnotationAction extends TextSplittableAction {
|
|
|
3420
3768
|
return new TextColorAnnotation(this.textColor);
|
|
3421
3769
|
}
|
|
3422
3770
|
}
|
|
3771
|
+
TextColorAnnotationAction.typeName = 'TextColorAnnotationAction';
|
|
3423
3772
|
|
|
3424
3773
|
/**
|
|
3425
3774
|
* Text node
|
|
@@ -3427,7 +3776,6 @@ class TextColorAnnotationAction extends TextSplittableAction {
|
|
|
3427
3776
|
class RTETextNode extends RTENode {
|
|
3428
3777
|
constructor(id, text, parentBlock, annotationMap) {
|
|
3429
3778
|
super(id, annotationMap);
|
|
3430
|
-
this.dtoName = RTETextNode.dtoName;
|
|
3431
3779
|
this.type = NodeTypeEnum.TEXT;
|
|
3432
3780
|
this.parent = parentBlock;
|
|
3433
3781
|
this.text = text;
|
|
@@ -3663,24 +4011,24 @@ class RTETextNode extends RTENode {
|
|
|
3663
4011
|
* Registers the action strategies for the RTETextNode.
|
|
3664
4012
|
*/
|
|
3665
4013
|
registerModifyStrategy() {
|
|
3666
|
-
const dtoClassName = this.
|
|
4014
|
+
const dtoClassName = this.typeName;
|
|
3667
4015
|
if (!RTETextNode.registerActionStrategyStatus[dtoClassName]) {
|
|
3668
4016
|
if (this.isContentEditable()) {
|
|
3669
4017
|
ActionHandleStrategyRegistry.register(ModifyContentActionType.UPDATE_TEXT, dtoClassName, new NodeUpdateTextStrategy());
|
|
3670
4018
|
ActionHandleStrategyRegistry.register(ModifyContentActionType.REPLACE_SELECTED_TEXT, dtoClassName, new NodeReplaceSelectedTextStrategy());
|
|
3671
4019
|
ActionHandleStrategyRegistry.register(ModifyContentActionType.LINK_GROUP_NODE_SPLIT, dtoClassName, new LinkGroupNodeSplitStrategy());
|
|
3672
|
-
ActionHandleStrategyRegistry.register(LinkAnnotationAction.
|
|
4020
|
+
ActionHandleStrategyRegistry.register(LinkAnnotationAction.typeName, dtoClassName, new NodeUpdateAnnotationMapStrategy());
|
|
3673
4021
|
}
|
|
3674
|
-
ActionHandleStrategyRegistry.register(TextSplittableAction.
|
|
4022
|
+
ActionHandleStrategyRegistry.register(TextSplittableAction.typeName, dtoClassName, new NodeSplitTextStrategy());
|
|
3675
4023
|
ActionHandleStrategyRegistry.register(ModifyContentActionType.DELETE_LINK_GROUP, dtoClassName, new DeleteLinkGroupStrategy());
|
|
3676
|
-
ActionHandleStrategyRegistry.register(BoldAnnotationAction.
|
|
3677
|
-
ActionHandleStrategyRegistry.register(ClearFormattingAnnotationAction.
|
|
3678
|
-
ActionHandleStrategyRegistry.register(ItalicAnnotationAction.
|
|
3679
|
-
ActionHandleStrategyRegistry.register(UnderlineAnnotationAction.
|
|
3680
|
-
ActionHandleStrategyRegistry.register(TextColorAnnotationAction.
|
|
3681
|
-
ActionHandleStrategyRegistry.register(StrikethroughAnnotationAction.
|
|
3682
|
-
ActionHandleStrategyRegistry.register(CodeAnnotationAction.
|
|
3683
|
-
ActionHandleStrategyRegistry.register(AnnotationAction.
|
|
4024
|
+
ActionHandleStrategyRegistry.register(BoldAnnotationAction.typeName, dtoClassName, new NodeUpdateAnnotationMapStrategy());
|
|
4025
|
+
ActionHandleStrategyRegistry.register(ClearFormattingAnnotationAction.typeName, dtoClassName, new NodeUpdateAnnotationMapStrategy());
|
|
4026
|
+
ActionHandleStrategyRegistry.register(ItalicAnnotationAction.typeName, dtoClassName, new NodeUpdateAnnotationMapStrategy());
|
|
4027
|
+
ActionHandleStrategyRegistry.register(UnderlineAnnotationAction.typeName, dtoClassName, new NodeUpdateAnnotationMapStrategy());
|
|
4028
|
+
ActionHandleStrategyRegistry.register(TextColorAnnotationAction.typeName, dtoClassName, new NodeUpdateAnnotationMapStrategy());
|
|
4029
|
+
ActionHandleStrategyRegistry.register(StrikethroughAnnotationAction.typeName, dtoClassName, new NodeUpdateAnnotationMapStrategy());
|
|
4030
|
+
ActionHandleStrategyRegistry.register(CodeAnnotationAction.typeName, dtoClassName, new NodeUpdateAnnotationMapStrategy());
|
|
4031
|
+
ActionHandleStrategyRegistry.register(AnnotationAction.typeName, dtoClassName, new NodeUpdateAnnotationMapStrategy());
|
|
3684
4032
|
RTETextNode.registerActionStrategyStatus[dtoClassName] = true;
|
|
3685
4033
|
}
|
|
3686
4034
|
}
|
|
@@ -3690,7 +4038,7 @@ class RTETextNode extends RTENode {
|
|
|
3690
4038
|
doAnnotationActionApply(action) {
|
|
3691
4039
|
const selectionRangeAnnotation = this.getAnnotationByType(InternalAnnotationTypeEnum.SELECTION_RANGE);
|
|
3692
4040
|
if (action instanceof TextSplittableAction && action.doSplit && selectionRangeAnnotation) {
|
|
3693
|
-
const splitStrategy = ActionHandleStrategyRegistry.get(TextSplittableAction.
|
|
4041
|
+
const splitStrategy = ActionHandleStrategyRegistry.get(TextSplittableAction.typeName, this.typeName);
|
|
3694
4042
|
if (splitStrategy) {
|
|
3695
4043
|
const newNode = splitStrategy.execute(action, this);
|
|
3696
4044
|
if (newNode) {
|
|
@@ -3700,421 +4048,155 @@ class RTETextNode extends RTENode {
|
|
|
3700
4048
|
}
|
|
3701
4049
|
else {
|
|
3702
4050
|
this.applyActionToNode(this, action);
|
|
3703
|
-
}
|
|
3704
|
-
if (typeof this.parent.mergeNodes === 'function') {
|
|
3705
|
-
this.parent.mergeNodes(action);
|
|
3706
|
-
}
|
|
3707
|
-
}
|
|
3708
|
-
/**
|
|
3709
|
-
* @inheritDoc
|
|
3710
|
-
*/
|
|
3711
|
-
doModifyActionApply(action) {
|
|
3712
|
-
ActionHandleStrategyRegistry.executeTheStrategy(action, this);
|
|
3713
|
-
}
|
|
3714
|
-
/**
|
|
3715
|
-
* Apply action to node
|
|
3716
|
-
*
|
|
3717
|
-
* @param {RTETextNode} node - Text node
|
|
3718
|
-
* @param {AnnotationAction} action - AnnotationAction
|
|
3719
|
-
*/
|
|
3720
|
-
applyActionToNode(node, action) {
|
|
3721
|
-
const annotation = action.toAnnotation();
|
|
3722
|
-
if (action instanceof SyncUpSelectionAction) {
|
|
3723
|
-
this.syncUpSelectedNodes(node);
|
|
3724
|
-
return;
|
|
3725
|
-
}
|
|
3726
|
-
// Sync up RTETextNode selected state to selection controller for any action apply, except selection range change.
|
|
3727
|
-
if (!(annotation instanceof SelectionRangeAnnotation)) {
|
|
3728
|
-
this.syncUpSelectedNodes(node);
|
|
3729
|
-
}
|
|
3730
|
-
/**
|
|
3731
|
-
* 1. Try to get the specific strategy for the action and node type first (e.g., LinkAnnotationAction on RTETextNode).
|
|
3732
|
-
* 2. If no specific strategy found, try to get the generic NodeUpdateAnnotationMapStrategy for AnnotationAction on RTETextNode.
|
|
3733
|
-
*/
|
|
3734
|
-
const strategy = ActionHandleStrategyRegistry.get(action.constructor.name, node.constructor.name);
|
|
3735
|
-
if (strategy) {
|
|
3736
|
-
strategy.execute(action, node);
|
|
3737
|
-
return;
|
|
3738
|
-
}
|
|
3739
|
-
const updateAnnotationMapStrategy = ActionHandleStrategyRegistry.get(AnnotationAction.name, RTETextNode.name);
|
|
3740
|
-
if (updateAnnotationMapStrategy) {
|
|
3741
|
-
updateAnnotationMapStrategy.execute(action, node);
|
|
3742
|
-
return;
|
|
3743
|
-
}
|
|
3744
|
-
}
|
|
3745
|
-
/**
|
|
3746
|
-
* Sync up the selected node by change manager
|
|
3747
|
-
*
|
|
3748
|
-
* @param {RTETextNode} selectedNode - The selected node
|
|
3749
|
-
*/
|
|
3750
|
-
syncUpSelectedNodes(selectedNode) {
|
|
3751
|
-
const currentNodeDom = this.getElementRef();
|
|
3752
|
-
if (currentNodeDom) {
|
|
3753
|
-
const nodeSubject = domNodeSubjectFactory.getSubjectFromParentNodeByEventId(currentNodeDom, VegaInternalRichTextEditorSelectionRangeChange);
|
|
3754
|
-
if (nodeSubject) {
|
|
3755
|
-
ChangeManager.notify(nodeSubject, { node: selectedNode });
|
|
3756
|
-
}
|
|
3757
|
-
}
|
|
3758
|
-
}
|
|
3759
|
-
/**
|
|
3760
|
-
* @param {InlineHtmlAnnotation} inlineHtmlNode - The inline HTML annotation to wrap the text node.
|
|
3761
|
-
* @param {VegaRTETransformOptions} [options] - Optional conversion options that may affect how the text node is rendered as HTML.
|
|
3762
|
-
* @returns {string} The HTML string representation of the text node wrapped with the inline HTML.
|
|
3763
|
-
*/
|
|
3764
|
-
renderWithWrapperStr(inlineHtmlNode, options) {
|
|
3765
|
-
const { htmlTag, child } = inlineHtmlNode;
|
|
3766
|
-
const attrStr = this.annotationAttrStr(inlineHtmlNode);
|
|
3767
|
-
if (!child) {
|
|
3768
|
-
if (HTML_VOID_TAGS.has(htmlTag)) {
|
|
3769
|
-
return `<${htmlTag}${attrStr}>`;
|
|
3770
|
-
}
|
|
3771
|
-
if (!this.text) {
|
|
3772
|
-
return `<${htmlTag}${attrStr}></${htmlTag}>`;
|
|
3773
|
-
}
|
|
3774
|
-
return `<${htmlTag}${attrStr}>${this.renderTextStr(options)}</${htmlTag}>`;
|
|
3775
|
-
}
|
|
3776
|
-
return `<${htmlTag}${attrStr}>${this.renderWithWrapperStr(child, options)}</${htmlTag}>`;
|
|
3777
|
-
}
|
|
3778
|
-
/**
|
|
3779
|
-
* Generate the attribute string for the inline HTML annotation
|
|
3780
|
-
*
|
|
3781
|
-
* @param {InlineHtmlAnnotation} annotation - The inline HTML annotation
|
|
3782
|
-
* @returns {string} The attribute string for the inline HTML annotation
|
|
3783
|
-
*/
|
|
3784
|
-
annotationAttrStr(annotation) {
|
|
3785
|
-
const { customAttribute, customClass, customStyle } = annotation;
|
|
3786
|
-
const attrs = [
|
|
3787
|
-
...((customAttribute === null || customAttribute === void 0 ? void 0 : customAttribute.toString()) || []),
|
|
3788
|
-
customClass === null || customClass === void 0 ? void 0 : customClass.toString(),
|
|
3789
|
-
customStyle === null || customStyle === void 0 ? void 0 : customStyle.toString(),
|
|
3790
|
-
].filter(isNonNullable);
|
|
3791
|
-
return attrs.length > 0 ? ` ${attrs.join(' ')}` : '';
|
|
3792
|
-
}
|
|
3793
|
-
/**
|
|
3794
|
-
* Generates the HTML representation of the text node.
|
|
3795
|
-
*
|
|
3796
|
-
* @param {VegaRTETransformOptions} [options] - Optional conversion options that may affect how the text node is rendered as HTML.
|
|
3797
|
-
* @returns {string} The HTML string representation of the text node.
|
|
3798
|
-
*/
|
|
3799
|
-
renderTextStr(options) {
|
|
3800
|
-
var _a;
|
|
3801
|
-
const NodeTag = ((_a = this.getAnnotationByType(NodeAnnotationTypeEnum.CODE)) === null || _a === void 0 ? void 0 : _a.code)
|
|
3802
|
-
? 'code'
|
|
3803
|
-
: 'span';
|
|
3804
|
-
const attrStr = super.generateAttributeString(options);
|
|
3805
|
-
// If the text contains a newline character, we need to replace it with a <br> tag.
|
|
3806
|
-
if (this.text === '\n') {
|
|
3807
|
-
return `<br>`;
|
|
3808
|
-
}
|
|
3809
|
-
if (this.shouldRenderAsPlainText()) {
|
|
3810
|
-
return this.text;
|
|
3811
|
-
}
|
|
3812
|
-
const content = NodeTag === 'code' ? escapeHtml(this.text) : this.text;
|
|
3813
|
-
return `<${NodeTag}${attrStr}>${content}</${NodeTag}>`;
|
|
3814
|
-
}
|
|
3815
|
-
/**
|
|
3816
|
-
* Determines if the text node should be rendered as plain text.
|
|
3817
|
-
*
|
|
3818
|
-
* @returns {boolean} `true` if the text node should be rendered as plain text, otherwise `false`.
|
|
3819
|
-
*/
|
|
3820
|
-
shouldRenderAsPlainText() {
|
|
3821
|
-
const plainTextAnnotation = super.getAnnotationByType(NodeAnnotationTypeEnum.PLAIN_TEXT);
|
|
3822
|
-
if (plainTextAnnotation) {
|
|
3823
|
-
return (plainTextAnnotation.plainText &&
|
|
3824
|
-
Array.from(this.annotationMap.values()).filter((annotation) => (annotation instanceof NodeAnnotation &&
|
|
3825
|
-
!(annotation instanceof LinkAnnotation) &&
|
|
3826
|
-
!(annotation instanceof PlainTextAnnotation)) ||
|
|
3827
|
-
annotation instanceof CommonAnnotation).length === 0);
|
|
3828
|
-
}
|
|
3829
|
-
else {
|
|
3830
|
-
return false;
|
|
3831
|
-
}
|
|
3832
|
-
}
|
|
3833
|
-
}
|
|
3834
|
-
RTETextNode.registerActionStrategyStatus = {};
|
|
3835
|
-
RTETextNode.htmlTag = 'span';
|
|
3836
|
-
RTETextNode.dtoName = 'RTETextNode';
|
|
3837
|
-
|
|
3838
|
-
/**
|
|
3839
|
-
* Append children to a block or rte content
|
|
3840
|
-
*
|
|
3841
|
-
* @example parent.apply(new AppendChildrenAction([newChildren]))
|
|
3842
|
-
*/
|
|
3843
|
-
class AppendChildrenAction extends ModifyContentAction {
|
|
3844
|
-
constructor(childNodes) {
|
|
3845
|
-
super();
|
|
3846
|
-
this.type = ModifyContentActionType.APPEND_CHILDREN;
|
|
3847
|
-
this.entityToBeAppended = childNodes;
|
|
3848
|
-
}
|
|
3849
|
-
}
|
|
3850
|
-
|
|
3851
|
-
const TEXT_STYLE_DEFAULT_FONT_WEIGHT = '500';
|
|
3852
|
-
const TEXT_STYLE_BASE = {
|
|
3853
|
-
fontFamily: 'Inter',
|
|
3854
|
-
fontSize: '16px',
|
|
3855
|
-
lineHeight: '22px',
|
|
3856
|
-
minHeight: '22px',
|
|
3857
|
-
fontWeight: TEXT_STYLE_DEFAULT_FONT_WEIGHT,
|
|
3858
|
-
};
|
|
3859
|
-
const PARAGRAPH_TEXT_STYLE = Object.assign(Object.assign({}, TEXT_STYLE_BASE), { marginTop: '0px', marginBottom: '0px' });
|
|
3860
|
-
const TEXT_STYLE_DEFAULTS = {
|
|
3861
|
-
'paragraph': PARAGRAPH_TEXT_STYLE,
|
|
3862
|
-
'title': Object.assign(Object.assign({}, TEXT_STYLE_BASE), { fontSize: '36px', lineHeight: '40px', minHeight: '40px' }),
|
|
3863
|
-
'subtitle': Object.assign(Object.assign({}, TEXT_STYLE_BASE), { fontSize: '28px', lineHeight: '32px', minHeight: '32px' }),
|
|
3864
|
-
'heading-1': Object.assign(Object.assign({}, PARAGRAPH_TEXT_STYLE), { fontSize: '22px', lineHeight: '24px', minHeight: '24px' }),
|
|
3865
|
-
'heading-2': Object.assign(Object.assign({}, PARAGRAPH_TEXT_STYLE), { fontSize: '20px', lineHeight: '24px', minHeight: '24px' }),
|
|
3866
|
-
'heading-3': Object.assign(Object.assign({}, PARAGRAPH_TEXT_STYLE), { fontSize: '18px' }),
|
|
3867
|
-
'heading-4': Object.assign({}, PARAGRAPH_TEXT_STYLE),
|
|
3868
|
-
'heading-5': Object.assign(Object.assign({}, PARAGRAPH_TEXT_STYLE), { fontSize: '14px' }),
|
|
3869
|
-
'heading-6': Object.assign(Object.assign({}, PARAGRAPH_TEXT_STYLE), { fontSize: '12px' }),
|
|
3870
|
-
};
|
|
3871
|
-
|
|
3872
|
-
/**
|
|
3873
|
-
* Text style annotation
|
|
3874
|
-
*/
|
|
3875
|
-
class TextStyleAnnotation extends BlockAnnotation {
|
|
3876
|
-
constructor(textStyle) {
|
|
3877
|
-
super();
|
|
3878
|
-
this.type = BlockAnnotationTypeEnum.TEXT_STYLE;
|
|
3879
|
-
this.textStyle = textStyle;
|
|
3880
|
-
}
|
|
3881
|
-
/**
|
|
3882
|
-
* Generate the map item for the annotations
|
|
3883
|
-
*
|
|
3884
|
-
* @param {VegaRTETextStyleType} textStyle - the text style type
|
|
3885
|
-
* @returns {[BlockAnnotationTypeEnum.TEXT_STYLE, TextStyleAnnotation]} Map item for the annotation
|
|
3886
|
-
*/
|
|
3887
|
-
static from(textStyle) {
|
|
3888
|
-
return [BlockAnnotationTypeEnum.TEXT_STYLE, new TextStyleAnnotation(textStyle)];
|
|
3889
|
-
}
|
|
3890
|
-
/**
|
|
3891
|
-
* Get the default styles for a given text style type.
|
|
3892
|
-
*
|
|
3893
|
-
* @param {VegaRTETextStyleType} textStyle - The text style type.
|
|
3894
|
-
* @returns {Nullable<AnnotationStyle>} The default styles for the given text style type.
|
|
3895
|
-
*/
|
|
3896
|
-
static getDefaultStyles(textStyle) {
|
|
3897
|
-
if (!textStyle)
|
|
3898
|
-
return null;
|
|
3899
|
-
return TEXT_STYLE_DEFAULTS[textStyle];
|
|
3900
|
-
}
|
|
3901
|
-
/**
|
|
3902
|
-
* Generate the JSON representation of the annotation
|
|
3903
|
-
*
|
|
3904
|
-
* @returns {Nullable<Record<string, unknown>>} JSON representation of the annotation
|
|
3905
|
-
*/
|
|
3906
|
-
toJSON() {
|
|
3907
|
-
return { textStyle: this.textStyle };
|
|
3908
|
-
}
|
|
3909
|
-
/**
|
|
3910
|
-
* @inheritDoc
|
|
3911
|
-
*/
|
|
3912
|
-
clone() {
|
|
3913
|
-
return new TextStyleAnnotation(this.textStyle);
|
|
3914
|
-
}
|
|
3915
|
-
/**
|
|
3916
|
-
* @inheritDoc
|
|
3917
|
-
*/
|
|
3918
|
-
renderClass(options) {
|
|
3919
|
-
if (options === null || options === void 0 ? void 0 : options.standalone)
|
|
3920
|
-
return null;
|
|
3921
|
-
return this.textStyle ? `v-rte--text-style-${this.textStyle}` : null;
|
|
3922
|
-
}
|
|
3923
|
-
/**
|
|
3924
|
-
* @inheritDoc
|
|
3925
|
-
*/
|
|
3926
|
-
renderStyle(options) {
|
|
3927
|
-
if (!(options === null || options === void 0 ? void 0 : options.standalone))
|
|
3928
|
-
return null;
|
|
3929
|
-
return this.textStyle ? TextStyleAnnotation.getDefaultStyles(this.textStyle) : null;
|
|
3930
|
-
}
|
|
3931
|
-
}
|
|
3932
|
-
|
|
3933
|
-
/**
|
|
3934
|
-
* Action to change the text style of a block
|
|
3935
|
-
*/
|
|
3936
|
-
class TextStyleAnnotationAction extends AnnotationAction {
|
|
3937
|
-
constructor(textStyle, bold) {
|
|
3938
|
-
super();
|
|
3939
|
-
this.isFlushable = true;
|
|
3940
|
-
this.textStyle = textStyle;
|
|
3941
|
-
this.bold = bold;
|
|
4051
|
+
}
|
|
4052
|
+
if (typeof this.parent.mergeNodes === 'function') {
|
|
4053
|
+
this.parent.mergeNodes(action);
|
|
4054
|
+
}
|
|
3942
4055
|
}
|
|
3943
4056
|
/**
|
|
3944
|
-
*
|
|
3945
|
-
*
|
|
3946
|
-
* @returns {BlockAnnotation} the block annotation
|
|
4057
|
+
* @inheritDoc
|
|
3947
4058
|
*/
|
|
3948
|
-
|
|
3949
|
-
|
|
4059
|
+
doModifyActionApply(action) {
|
|
4060
|
+
ActionHandleStrategyRegistry.executeTheStrategy(action, this);
|
|
3950
4061
|
}
|
|
3951
|
-
}
|
|
3952
|
-
|
|
3953
|
-
/**
|
|
3954
|
-
* Update the text block text style strategy.
|
|
3955
|
-
*/
|
|
3956
|
-
class BlockUpdateTextStyleStrategy extends ActionHandleStrategy {
|
|
3957
4062
|
/**
|
|
3958
|
-
*
|
|
4063
|
+
* Apply action to node
|
|
3959
4064
|
*
|
|
3960
|
-
* @param {
|
|
3961
|
-
* @param {
|
|
4065
|
+
* @param {RTETextNode} node - Text node
|
|
4066
|
+
* @param {AnnotationAction} action - AnnotationAction
|
|
3962
4067
|
*/
|
|
3963
|
-
|
|
3964
|
-
|
|
3965
|
-
|
|
4068
|
+
applyActionToNode(node, action) {
|
|
4069
|
+
const annotation = action.toAnnotation();
|
|
4070
|
+
if (action instanceof SyncUpSelectionAction) {
|
|
4071
|
+
this.syncUpSelectedNodes(node);
|
|
4072
|
+
return;
|
|
3966
4073
|
}
|
|
3967
|
-
|
|
3968
|
-
|
|
3969
|
-
|
|
3970
|
-
boldAnnotationAction.doSplit = false;
|
|
3971
|
-
node.apply(boldAnnotationAction);
|
|
3972
|
-
});
|
|
4074
|
+
// Sync up RTETextNode selected state to selection controller for any action apply, except selection range change.
|
|
4075
|
+
if (!(annotation instanceof SelectionRangeAnnotation)) {
|
|
4076
|
+
this.syncUpSelectedNodes(node);
|
|
3973
4077
|
}
|
|
3974
|
-
|
|
3975
|
-
|
|
3976
|
-
|
|
3977
|
-
|
|
4078
|
+
/**
|
|
4079
|
+
* 1. Try to get the specific strategy for the action and node type first (e.g., LinkAnnotationAction on RTETextNode).
|
|
4080
|
+
* 2. If no specific strategy found, try to get the generic NodeUpdateAnnotationMapStrategy for AnnotationAction on RTETextNode.
|
|
4081
|
+
*/
|
|
4082
|
+
const strategy = ActionHandleStrategyRegistry.get(action.typeName, node.typeName);
|
|
4083
|
+
if (strategy) {
|
|
4084
|
+
strategy.execute(action, node);
|
|
4085
|
+
return;
|
|
4086
|
+
}
|
|
4087
|
+
const updateAnnotationMapStrategy = ActionHandleStrategyRegistry.get(AnnotationAction.typeName, RTETextNode.typeName);
|
|
4088
|
+
if (updateAnnotationMapStrategy) {
|
|
4089
|
+
updateAnnotationMapStrategy.execute(action, node);
|
|
4090
|
+
return;
|
|
3978
4091
|
}
|
|
3979
|
-
this.updateCustomStyleAnnotation(target, ['fontFamily', 'lineHeight', 'fontWeight', 'fontSize']);
|
|
3980
4092
|
}
|
|
3981
|
-
}
|
|
3982
|
-
|
|
3983
|
-
/**
|
|
3984
|
-
* Update the text block link group annotation strategy.
|
|
3985
|
-
*/
|
|
3986
|
-
class BlockUpdateLinkGroupStrategy extends ActionHandleStrategy {
|
|
3987
4093
|
/**
|
|
3988
|
-
*
|
|
4094
|
+
* Sync up the selected node by change manager
|
|
3989
4095
|
*
|
|
3990
|
-
* @param {
|
|
3991
|
-
* @param {RTETextBlock} target - The current text block.
|
|
4096
|
+
* @param {RTETextNode} selectedNode - The selected node
|
|
3992
4097
|
*/
|
|
3993
|
-
|
|
3994
|
-
|
|
3995
|
-
if (
|
|
3996
|
-
|
|
3997
|
-
|
|
3998
|
-
|
|
3999
|
-
linkGroupAnnotation.linkGroups.set(action.groupKey, [linkGroup[0]]);
|
|
4000
|
-
}
|
|
4098
|
+
syncUpSelectedNodes(selectedNode) {
|
|
4099
|
+
const currentNodeDom = this.getElementRef();
|
|
4100
|
+
if (currentNodeDom) {
|
|
4101
|
+
const nodeSubject = domNodeSubjectFactory.getSubjectFromParentNodeByEventId(currentNodeDom, VegaInternalRichTextEditorSelectionRangeChange);
|
|
4102
|
+
if (nodeSubject) {
|
|
4103
|
+
ChangeManager.notify(nodeSubject, { node: selectedNode });
|
|
4001
4104
|
}
|
|
4002
4105
|
}
|
|
4003
|
-
|
|
4004
|
-
|
|
4005
|
-
|
|
4006
|
-
|
|
4106
|
+
}
|
|
4107
|
+
/**
|
|
4108
|
+
* @param {InlineHtmlAnnotation} inlineHtmlNode - The inline HTML annotation to wrap the text node.
|
|
4109
|
+
* @param {VegaRTETransformOptions} [options] - Optional conversion options that may affect how the text node is rendered as HTML.
|
|
4110
|
+
* @returns {string} The HTML string representation of the text node wrapped with the inline HTML.
|
|
4111
|
+
*/
|
|
4112
|
+
renderWithWrapperStr(inlineHtmlNode, options) {
|
|
4113
|
+
const { htmlTag, child } = inlineHtmlNode;
|
|
4114
|
+
const attrStr = this.annotationAttrStr(inlineHtmlNode);
|
|
4115
|
+
if (!child) {
|
|
4116
|
+
if (HTML_VOID_TAGS.has(htmlTag)) {
|
|
4117
|
+
return `<${htmlTag}${attrStr}>`;
|
|
4007
4118
|
}
|
|
4008
|
-
|
|
4009
|
-
|
|
4010
|
-
linkGroupAnnotation.linkGroups.set(action.groupKey, [...action.nodes]);
|
|
4119
|
+
if (!this.text) {
|
|
4120
|
+
return `<${htmlTag}${attrStr}></${htmlTag}>`;
|
|
4011
4121
|
}
|
|
4012
|
-
|
|
4122
|
+
return `<${htmlTag}${attrStr}>${this.renderTextStr(options)}</${htmlTag}>`;
|
|
4013
4123
|
}
|
|
4124
|
+
return `<${htmlTag}${attrStr}>${this.renderWithWrapperStr(child, options)}</${htmlTag}>`;
|
|
4014
4125
|
}
|
|
4015
|
-
}
|
|
4016
|
-
|
|
4017
|
-
/**
|
|
4018
|
-
* Insert a new children after a existing children
|
|
4019
|
-
*
|
|
4020
|
-
* @example parent.apply(new InsertChildrenAfterAction(existingChildren, newChildren, ...))
|
|
4021
|
-
*/
|
|
4022
|
-
class InsertChildrenAfterAction extends ModifyContentAction {
|
|
4023
|
-
constructor(referBlock, ...blocksToBeInserted) {
|
|
4024
|
-
super();
|
|
4025
|
-
this.type = ModifyContentActionType.INSERT_CHILDREN_AFTER;
|
|
4026
|
-
this.referChildren = referBlock;
|
|
4027
|
-
this.childrenToBeInserted = blocksToBeInserted;
|
|
4028
|
-
}
|
|
4029
|
-
}
|
|
4030
|
-
|
|
4031
|
-
/**
|
|
4032
|
-
* Clear the current block nodes and append new nodes
|
|
4033
|
-
*
|
|
4034
|
-
* @example block.apply(new ReplaceChildNodesAction(newNodes))
|
|
4035
|
-
*/
|
|
4036
|
-
class ReplaceChildNodesAction extends ModifyContentAction {
|
|
4037
|
-
constructor(newChildNodes) {
|
|
4038
|
-
super();
|
|
4039
|
-
this.type = ModifyContentActionType.REPLACE_CHILD_NODES;
|
|
4040
|
-
this.newChildNodes = newChildNodes;
|
|
4041
|
-
}
|
|
4042
|
-
}
|
|
4043
|
-
|
|
4044
|
-
/**
|
|
4045
|
-
* Split the current node with a special position strategy.
|
|
4046
|
-
*/
|
|
4047
|
-
class BlockSplitWithTextNodeStrategy extends ActionHandleStrategy {
|
|
4048
4126
|
/**
|
|
4049
|
-
*
|
|
4127
|
+
* Generate the attribute string for the inline HTML annotation
|
|
4128
|
+
*
|
|
4129
|
+
* @param {InlineHtmlAnnotation} annotation - The inline HTML annotation
|
|
4130
|
+
* @returns {string} The attribute string for the inline HTML annotation
|
|
4050
4131
|
*/
|
|
4051
|
-
|
|
4052
|
-
|
|
4132
|
+
annotationAttrStr(annotation) {
|
|
4133
|
+
const { customAttribute, customClass, customStyle } = annotation;
|
|
4134
|
+
const attrs = [
|
|
4135
|
+
...((customAttribute === null || customAttribute === void 0 ? void 0 : customAttribute.toString()) || []),
|
|
4136
|
+
customClass === null || customClass === void 0 ? void 0 : customClass.toString(),
|
|
4137
|
+
customStyle === null || customStyle === void 0 ? void 0 : customStyle.toString(),
|
|
4138
|
+
].filter(isNonNullable);
|
|
4139
|
+
return attrs.length > 0 ? ` ${attrs.join(' ')}` : '';
|
|
4053
4140
|
}
|
|
4054
4141
|
/**
|
|
4055
|
-
*
|
|
4142
|
+
* Generates the HTML representation of the text node.
|
|
4056
4143
|
*
|
|
4057
|
-
* @param {
|
|
4058
|
-
* @
|
|
4059
|
-
* @param {RTETextBlock} textBlock - The text block need to be splited.
|
|
4060
|
-
* @returns {Nullable<RTEBlock>} return either an RTEBlock object or null.
|
|
4144
|
+
* @param {VegaRTETransformOptions} [options] - Optional conversion options that may affect how the text node is rendered as HTML.
|
|
4145
|
+
* @returns {string} The HTML string representation of the text node.
|
|
4061
4146
|
*/
|
|
4062
|
-
|
|
4063
|
-
|
|
4064
|
-
|
|
4065
|
-
|
|
4066
|
-
|
|
4067
|
-
|
|
4068
|
-
|
|
4069
|
-
|
|
4070
|
-
|
|
4071
|
-
|
|
4072
|
-
|
|
4073
|
-
|
|
4074
|
-
if (afterText) {
|
|
4075
|
-
afterNodes.unshift(splitNode.cloneWithText(afterText));
|
|
4076
|
-
}
|
|
4077
|
-
}
|
|
4078
|
-
else {
|
|
4079
|
-
startOffsetOfNode > 0 ? beforeNodes.push(splitNode) : afterNodes.unshift(splitNode);
|
|
4080
|
-
}
|
|
4081
|
-
textBlock.apply(new ReplaceChildNodesAction(beforeNodes));
|
|
4082
|
-
const newBlock = textBlock.cloneWithNodes(afterNodes);
|
|
4083
|
-
textBlock.parent.apply(new InsertChildrenAfterAction(textBlock, newBlock));
|
|
4084
|
-
return newBlock;
|
|
4085
|
-
}
|
|
4147
|
+
renderTextStr(options) {
|
|
4148
|
+
var _a;
|
|
4149
|
+
const NodeTag = ((_a = this.getAnnotationByType(NodeAnnotationTypeEnum.CODE)) === null || _a === void 0 ? void 0 : _a.code)
|
|
4150
|
+
? 'code'
|
|
4151
|
+
: 'span';
|
|
4152
|
+
const attrStr = super.generateAttributeString(options);
|
|
4153
|
+
// If the text contains a newline character, we need to replace it with a <br> tag.
|
|
4154
|
+
if (this.text === '\n') {
|
|
4155
|
+
return `<br>`;
|
|
4156
|
+
}
|
|
4157
|
+
if (this.shouldSkipEmptyFormattingMarker()) {
|
|
4158
|
+
return '';
|
|
4086
4159
|
}
|
|
4160
|
+
if (this.shouldRenderAsPlainText()) {
|
|
4161
|
+
return this.text;
|
|
4162
|
+
}
|
|
4163
|
+
const content = NodeTag === 'code' ? escapeHtml(this.text) : this.text;
|
|
4164
|
+
return `<${NodeTag}${attrStr}>${content}</${NodeTag}>`;
|
|
4087
4165
|
}
|
|
4088
|
-
}
|
|
4089
|
-
|
|
4090
|
-
/**
|
|
4091
|
-
* Remove all nodes and append new nodes strategy.
|
|
4092
|
-
*/
|
|
4093
|
-
class BlockReplaceNodesStrategy extends ActionHandleStrategy {
|
|
4094
4166
|
/**
|
|
4095
|
-
*
|
|
4167
|
+
* Formatting toggles at a collapsed caret intentionally keep empty marker
|
|
4168
|
+
* nodes in the live model so future typing inherits the pending style. Those
|
|
4169
|
+
* nodes are not semantic content and should not appear in serialized HTML.
|
|
4096
4170
|
*
|
|
4097
|
-
* @
|
|
4098
|
-
* @param {RTETextBlock | RTEImageBlock} target - The text block or the image block.
|
|
4171
|
+
* @returns {boolean} True when the node is an empty formatting-only marker that should be omitted from serialized HTML.
|
|
4099
4172
|
*/
|
|
4100
|
-
|
|
4101
|
-
|
|
4102
|
-
|
|
4173
|
+
shouldSkipEmptyFormattingMarker() {
|
|
4174
|
+
return (this.text === '' &&
|
|
4175
|
+
this.annotationMap.size > 0 &&
|
|
4176
|
+
Array.from(this.annotationMap.values()).every((annotation) => annotation.isFormattingOnly));
|
|
4103
4177
|
}
|
|
4104
|
-
|
|
4105
|
-
|
|
4106
|
-
|
|
4107
|
-
|
|
4108
|
-
|
|
4109
|
-
|
|
4110
|
-
|
|
4111
|
-
|
|
4112
|
-
|
|
4113
|
-
|
|
4114
|
-
|
|
4115
|
-
|
|
4178
|
+
/**
|
|
4179
|
+
* Determines if the text node should be rendered as plain text.
|
|
4180
|
+
*
|
|
4181
|
+
* @returns {boolean} `true` if the text node should be rendered as plain text, otherwise `false`.
|
|
4182
|
+
*/
|
|
4183
|
+
shouldRenderAsPlainText() {
|
|
4184
|
+
const plainTextAnnotation = super.getAnnotationByType(NodeAnnotationTypeEnum.PLAIN_TEXT);
|
|
4185
|
+
if (plainTextAnnotation) {
|
|
4186
|
+
return (plainTextAnnotation.plainText &&
|
|
4187
|
+
Array.from(this.annotationMap.values()).filter((annotation) => (annotation instanceof NodeAnnotation &&
|
|
4188
|
+
!(annotation instanceof LinkAnnotation) &&
|
|
4189
|
+
!(annotation instanceof PlainTextAnnotation)) ||
|
|
4190
|
+
annotation instanceof CommonAnnotation).length === 0);
|
|
4191
|
+
}
|
|
4192
|
+
else {
|
|
4193
|
+
return false;
|
|
4194
|
+
}
|
|
4116
4195
|
}
|
|
4117
4196
|
}
|
|
4197
|
+
RTETextNode.registerActionStrategyStatus = {};
|
|
4198
|
+
RTETextNode.htmlTag = 'span';
|
|
4199
|
+
RTETextNode.typeName = 'RTETextNode';
|
|
4118
4200
|
|
|
4119
4201
|
/**
|
|
4120
4202
|
* Append the second block child nodes to the first block child nodes and remove the second block strategy.
|
|
@@ -4347,13 +4429,13 @@ class BlockInsertImageIntoTextStrategy extends ActionHandleStrategy {
|
|
|
4347
4429
|
* @returns {RTEBlock[]} Top-level selected blocks to emit into the rebuilt list.
|
|
4348
4430
|
*/
|
|
4349
4431
|
function normalizeMixedListSelection(selectedBlocks, listType) {
|
|
4350
|
-
const selectedListItems = new Set(selectedBlocks.filter((block) => block.
|
|
4432
|
+
const selectedListItems = new Set(selectedBlocks.filter((block) => block.typeName === 'RTEListItemBlock'));
|
|
4351
4433
|
return selectedBlocks.filter((block) => {
|
|
4352
|
-
if (!(block.
|
|
4434
|
+
if (!(block.typeName === 'RTEListItemBlock')) {
|
|
4353
4435
|
return true;
|
|
4354
4436
|
}
|
|
4355
4437
|
let parentList = block.parent;
|
|
4356
|
-
while (parentList.parent && parentList.parent.
|
|
4438
|
+
while (parentList.parent && parentList.parent.typeName === 'RTEListItemBlock') {
|
|
4357
4439
|
const ownerItem = parentList.parent;
|
|
4358
4440
|
if (selectedListItems.has(ownerItem)) {
|
|
4359
4441
|
block.parent.type = listType;
|
|
@@ -4410,6 +4492,7 @@ class HorizontalAlignmentAnnotationAction extends AnnotationAction {
|
|
|
4410
4492
|
return new HorizontalAlignmentAnnotation(this.textAlign);
|
|
4411
4493
|
}
|
|
4412
4494
|
}
|
|
4495
|
+
HorizontalAlignmentAnnotationAction.typeName = 'HorizontalAlignmentAnnotationAction';
|
|
4413
4496
|
|
|
4414
4497
|
/**
|
|
4415
4498
|
* Update the text block and image block horizontal alignment strategy.
|
|
@@ -4459,6 +4542,7 @@ class IndentAnnotationAction extends AnnotationAction {
|
|
|
4459
4542
|
return new IndentAnnotation(this.indent);
|
|
4460
4543
|
}
|
|
4461
4544
|
}
|
|
4545
|
+
IndentAnnotationAction.typeName = 'IndentAnnotationAction';
|
|
4462
4546
|
|
|
4463
4547
|
/**
|
|
4464
4548
|
* Unlink the text block link group annotation strategy.
|
|
@@ -4489,7 +4573,6 @@ class BlockUnlinkLinkGroupStrategy extends ActionHandleStrategy {
|
|
|
4489
4573
|
class RTETextBlock extends RTEBlock {
|
|
4490
4574
|
constructor(id, type, options) {
|
|
4491
4575
|
super(id);
|
|
4492
|
-
this.dtoName = RTETextBlock.dtoName;
|
|
4493
4576
|
this.children = [];
|
|
4494
4577
|
this.type = type;
|
|
4495
4578
|
const { autoMatchFormat } = options || { autoMatchFormat: true };
|
|
@@ -4514,18 +4597,30 @@ class RTETextBlock extends RTEBlock {
|
|
|
4514
4597
|
const textBlock = new RTETextBlock(block.id, block.type, options);
|
|
4515
4598
|
const annotations = options.autoMatchFormat
|
|
4516
4599
|
? Object.assign(Object.assign({}, block.annotations), { textStyle: (_b = (_a = block.annotations) === null || _a === void 0 ? void 0 : _a.textStyle) !== null && _b !== void 0 ? _b : textBlock.type }) : block.annotations;
|
|
4517
|
-
textBlock.children = block.nodes
|
|
4600
|
+
textBlock.children = RTETextBlock.convertNodes(block.nodes, textBlock, options);
|
|
4601
|
+
if (annotations) {
|
|
4602
|
+
super.convertAnnotationsToMap(textBlock.annotationMap, annotations);
|
|
4603
|
+
}
|
|
4604
|
+
return textBlock;
|
|
4605
|
+
}
|
|
4606
|
+
/**
|
|
4607
|
+
* Convert raw node payloads to their registered `RTENode` subclasses via
|
|
4608
|
+
* `RTEDTOClassManager`, preserving custom types (e.g. `RTETokenNode`, `RTEBookmarkNode`).
|
|
4609
|
+
*
|
|
4610
|
+
* @param {VegaRTETextNode[]} nodes - Raw node payloads.
|
|
4611
|
+
* @param {RTETextBlock} parent - Parent block for the converted nodes.
|
|
4612
|
+
* @param {VegaRTETransformOptions} [options] - Optional transform options.
|
|
4613
|
+
* @returns {RTETextNode[]} Converted nodes; unregistered types are dropped.
|
|
4614
|
+
*/
|
|
4615
|
+
static convertNodes(nodes, parent, options) {
|
|
4616
|
+
return nodes
|
|
4518
4617
|
.map((richText) => {
|
|
4519
4618
|
const NodeClass = RTEDTOClassManager$1.getRTENodeClass(richText.type);
|
|
4520
4619
|
if (NodeClass) {
|
|
4521
|
-
return NodeClass.from(richText,
|
|
4620
|
+
return NodeClass.from(richText, parent, options);
|
|
4522
4621
|
}
|
|
4523
4622
|
})
|
|
4524
4623
|
.filter(isNonNullable);
|
|
4525
|
-
if (annotations) {
|
|
4526
|
-
super.convertAnnotationsToMap(textBlock.annotationMap, annotations);
|
|
4527
|
-
}
|
|
4528
|
-
return textBlock;
|
|
4529
4624
|
}
|
|
4530
4625
|
/**
|
|
4531
4626
|
* The function `createAnnotationEntity` creates a block annotation entity based on the provided type
|
|
@@ -4686,7 +4781,7 @@ class RTETextBlock extends RTEBlock {
|
|
|
4686
4781
|
* @inheritDoc
|
|
4687
4782
|
*/
|
|
4688
4783
|
doAnnotationActionApply(action) {
|
|
4689
|
-
const strategy = ActionHandleStrategyRegistry.get(action.
|
|
4784
|
+
const strategy = ActionHandleStrategyRegistry.get(action.typeName, RTETextBlock.typeName);
|
|
4690
4785
|
if (strategy) {
|
|
4691
4786
|
strategy.execute(action, this);
|
|
4692
4787
|
}
|
|
@@ -4768,21 +4863,22 @@ class RTETextBlock extends RTEBlock {
|
|
|
4768
4863
|
return nodesHtml;
|
|
4769
4864
|
}
|
|
4770
4865
|
}
|
|
4866
|
+
RTETextBlock.typeName = 'RTETextBlock';
|
|
4867
|
+
// eslint-disable-next-line @globalpayments/vega-eslint/vega-class-member-order-rule
|
|
4771
4868
|
(() => {
|
|
4772
|
-
ActionHandleStrategyRegistry.register(TextStyleAnnotationAction.
|
|
4773
|
-
ActionHandleStrategyRegistry.register(HorizontalAlignmentAnnotationAction.
|
|
4774
|
-
ActionHandleStrategyRegistry.register(IndentAnnotationAction.
|
|
4775
|
-
ActionHandleStrategyRegistry.register(LinkGroupAnnotationAction.
|
|
4776
|
-
ActionHandleStrategyRegistry.register(ModifyContentActionType.UNLINK_LINK_GROUP, RTETextBlock.
|
|
4777
|
-
ActionHandleStrategyRegistry.register(ModifyContentActionType.SPLIT_BLOCK_WITH_NODE, RTETextBlock.
|
|
4778
|
-
ActionHandleStrategyRegistry.register(ModifyContentActionType.REPLACE_CHILD_NODES, RTETextBlock.
|
|
4779
|
-
ActionHandleStrategyRegistry.register(ModifyContentActionType.MERGE_TWO_BLOCKS_NODES, RTETextBlock.
|
|
4780
|
-
ActionHandleStrategyRegistry.register(ModifyContentActionType.LINE_BREAK_SINGLE_BLOCK, RTETextBlock.
|
|
4781
|
-
ActionHandleStrategyRegistry.register(ModifyContentActionType.LINE_BREAK_MULTIPLE_BLOCKS, RTETextBlock.
|
|
4782
|
-
ActionHandleStrategyRegistry.register(ModifyContentActionType.INSERT_IMAGE_TO_BLOCK, RTETextBlock.
|
|
4783
|
-
ActionHandleStrategyRegistry.register(ModifyContentActionType.TRANSFORM_LIST_BLOCK, RTETextBlock.
|
|
4869
|
+
ActionHandleStrategyRegistry.register(TextStyleAnnotationAction.typeName, RTETextBlock.typeName, new BlockUpdateTextStyleStrategy());
|
|
4870
|
+
ActionHandleStrategyRegistry.register(HorizontalAlignmentAnnotationAction.typeName, RTETextBlock.typeName, new BlockUpdateHorizontalAlignmentStrategy());
|
|
4871
|
+
ActionHandleStrategyRegistry.register(IndentAnnotationAction.typeName, RTETextBlock.typeName, new BlockUpdateIndentStrategy());
|
|
4872
|
+
ActionHandleStrategyRegistry.register(LinkGroupAnnotationAction.typeName, RTETextBlock.typeName, new BlockUpdateLinkGroupStrategy());
|
|
4873
|
+
ActionHandleStrategyRegistry.register(ModifyContentActionType.UNLINK_LINK_GROUP, RTETextBlock.typeName, new BlockUnlinkLinkGroupStrategy());
|
|
4874
|
+
ActionHandleStrategyRegistry.register(ModifyContentActionType.SPLIT_BLOCK_WITH_NODE, RTETextBlock.typeName, new BlockSplitWithTextNodeStrategy());
|
|
4875
|
+
ActionHandleStrategyRegistry.register(ModifyContentActionType.REPLACE_CHILD_NODES, RTETextBlock.typeName, new BlockReplaceNodesStrategy());
|
|
4876
|
+
ActionHandleStrategyRegistry.register(ModifyContentActionType.MERGE_TWO_BLOCKS_NODES, RTETextBlock.typeName, new BlockMergeNodesStrategy());
|
|
4877
|
+
ActionHandleStrategyRegistry.register(ModifyContentActionType.LINE_BREAK_SINGLE_BLOCK, RTETextBlock.typeName, new BlockInsertLineBreakStrategy());
|
|
4878
|
+
ActionHandleStrategyRegistry.register(ModifyContentActionType.LINE_BREAK_MULTIPLE_BLOCKS, RTETextBlock.typeName, new BlockInsertLineBreakWithBlocksStrategy());
|
|
4879
|
+
ActionHandleStrategyRegistry.register(ModifyContentActionType.INSERT_IMAGE_TO_BLOCK, RTETextBlock.typeName, new BlockInsertImageIntoTextStrategy());
|
|
4880
|
+
ActionHandleStrategyRegistry.register(ModifyContentActionType.TRANSFORM_LIST_BLOCK, RTETextBlock.typeName, new BlockTransformToListStrategy());
|
|
4784
4881
|
})();
|
|
4785
|
-
RTETextBlock.dtoName = 'RTETextBlock';
|
|
4786
4882
|
|
|
4787
4883
|
/**
|
|
4788
4884
|
* Remove list item nest list block strategy.
|
|
@@ -4938,7 +5034,6 @@ class ListItemInsertImageStrategy extends ActionHandleStrategy {
|
|
|
4938
5034
|
class RTEListItemBlock extends RTETextBlock {
|
|
4939
5035
|
constructor(id, nestList, options) {
|
|
4940
5036
|
super(id, 'list-item', options);
|
|
4941
|
-
this.dtoName = RTEListItemBlock.dtoName;
|
|
4942
5037
|
/**
|
|
4943
5038
|
* TODO: Refactor the list item properties children and nestList, merge two properties together.
|
|
4944
5039
|
*
|
|
@@ -4957,7 +5052,8 @@ class RTEListItemBlock extends RTETextBlock {
|
|
|
4957
5052
|
*/
|
|
4958
5053
|
static from(block, options = { autoMatchFormat: true }) {
|
|
4959
5054
|
const listItemBlock = new RTEListItemBlock(block.id, undefined, options);
|
|
4960
|
-
|
|
5055
|
+
// Do not coerce list nodes to text; bookmarks, tokens and other extension nodes are polymorphic text nodes.
|
|
5056
|
+
listItemBlock.children = RTEListItemBlock.convertNodes(block.nodes, listItemBlock, options);
|
|
4961
5057
|
if (block.children) {
|
|
4962
5058
|
listItemBlock.nestList = block.children.map((child) => {
|
|
4963
5059
|
const listBlock = RTEListBlock.from(child, options);
|
|
@@ -5044,19 +5140,20 @@ class RTEListItemBlock extends RTETextBlock {
|
|
|
5044
5140
|
return block;
|
|
5045
5141
|
}
|
|
5046
5142
|
}
|
|
5143
|
+
RTEListItemBlock.typeName = 'RTEListItemBlock';
|
|
5144
|
+
// eslint-disable-next-line @globalpayments/vega-eslint/vega-class-member-order-rule
|
|
5047
5145
|
(() => {
|
|
5048
|
-
ActionHandleStrategyRegistry.register(TextStyleAnnotationAction.
|
|
5049
|
-
ActionHandleStrategyRegistry.register(HorizontalAlignmentAnnotationAction.
|
|
5050
|
-
ActionHandleStrategyRegistry.register(ModifyContentActionType.LINE_BREAK_SINGLE_BLOCK, RTEListItemBlock.
|
|
5051
|
-
ActionHandleStrategyRegistry.register(ModifyContentActionType.LINE_BREAK_MULTIPLE_BLOCKS, RTEListItemBlock.
|
|
5052
|
-
ActionHandleStrategyRegistry.register(ModifyContentActionType.DELETE_NEST_LIST, RTEListItemBlock.
|
|
5053
|
-
ActionHandleStrategyRegistry.register(ModifyContentActionType.SPLIT_BLOCK_WITH_NODE, RTEListItemBlock.
|
|
5054
|
-
ActionHandleStrategyRegistry.register(ModifyContentActionType.REPLACE_CHILD_NODES, RTEListItemBlock.
|
|
5055
|
-
ActionHandleStrategyRegistry.register(ModifyContentActionType.REPLACE_NEST_LIST, RTEListItemBlock.
|
|
5056
|
-
ActionHandleStrategyRegistry.register(ModifyContentActionType.MERGE_TWO_BLOCKS_NODES, RTEListItemBlock.
|
|
5057
|
-
ActionHandleStrategyRegistry.register(ModifyContentActionType.INSERT_IMAGE_TO_BLOCK, RTEListItemBlock.
|
|
5146
|
+
ActionHandleStrategyRegistry.register(TextStyleAnnotationAction.typeName, RTEListItemBlock.typeName, new BlockUpdateTextStyleStrategy());
|
|
5147
|
+
ActionHandleStrategyRegistry.register(HorizontalAlignmentAnnotationAction.typeName, RTEListItemBlock.typeName, new BlockUpdateHorizontalAlignmentStrategy());
|
|
5148
|
+
ActionHandleStrategyRegistry.register(ModifyContentActionType.LINE_BREAK_SINGLE_BLOCK, RTEListItemBlock.typeName, new BlockInsertLineBreakStrategy());
|
|
5149
|
+
ActionHandleStrategyRegistry.register(ModifyContentActionType.LINE_BREAK_MULTIPLE_BLOCKS, RTEListItemBlock.typeName, new BlockInsertLineBreakWithBlocksStrategy());
|
|
5150
|
+
ActionHandleStrategyRegistry.register(ModifyContentActionType.DELETE_NEST_LIST, RTEListItemBlock.typeName, new ListItemRemoveNestListStrategy());
|
|
5151
|
+
ActionHandleStrategyRegistry.register(ModifyContentActionType.SPLIT_BLOCK_WITH_NODE, RTEListItemBlock.typeName, new BlockSplitWithTextNodeStrategy());
|
|
5152
|
+
ActionHandleStrategyRegistry.register(ModifyContentActionType.REPLACE_CHILD_NODES, RTEListItemBlock.typeName, new BlockReplaceNodesStrategy());
|
|
5153
|
+
ActionHandleStrategyRegistry.register(ModifyContentActionType.REPLACE_NEST_LIST, RTEListItemBlock.typeName, new ListItemReplaceNestListStrategy());
|
|
5154
|
+
ActionHandleStrategyRegistry.register(ModifyContentActionType.MERGE_TWO_BLOCKS_NODES, RTEListItemBlock.typeName, new BlockMergeNodesStrategy());
|
|
5155
|
+
ActionHandleStrategyRegistry.register(ModifyContentActionType.INSERT_IMAGE_TO_BLOCK, RTEListItemBlock.typeName, new ListItemInsertImageStrategy());
|
|
5058
5156
|
})();
|
|
5059
|
-
RTEListItemBlock.dtoName = 'RTEListItemBlock';
|
|
5060
5157
|
|
|
5061
5158
|
/**
|
|
5062
5159
|
* Replace the nest list with new list array
|
|
@@ -5268,7 +5365,6 @@ class TransformParagraphAction extends ModifyContentAction {
|
|
|
5268
5365
|
class RTEHtmlBlock extends RTEBlock {
|
|
5269
5366
|
constructor(id, htmlTag) {
|
|
5270
5367
|
super(id);
|
|
5271
|
-
this.dtoName = RTEHtmlBlock.dtoName;
|
|
5272
5368
|
this.type = 'html-block';
|
|
5273
5369
|
this.children = [];
|
|
5274
5370
|
this.htmlTag = htmlTag;
|
|
@@ -5339,7 +5435,7 @@ class RTEHtmlBlock extends RTEBlock {
|
|
|
5339
5435
|
return Object.assign(Object.assign({}, super.toJSON()), { id: this.id, type: this.type, htmlTag: this.htmlTag, children: this.children.map((child) => child.toJSON()) });
|
|
5340
5436
|
}
|
|
5341
5437
|
}
|
|
5342
|
-
RTEHtmlBlock.
|
|
5438
|
+
RTEHtmlBlock.typeName = 'RTEHtmlBlock';
|
|
5343
5439
|
|
|
5344
5440
|
/**
|
|
5345
5441
|
* Convert the selected list block to paragraph strategy.
|
|
@@ -5647,8 +5743,8 @@ class ListTransformToParagraphStrategy extends ListAnnotationStrategy {
|
|
|
5647
5743
|
return null;
|
|
5648
5744
|
}
|
|
5649
5745
|
path.unshift(itemIndex);
|
|
5650
|
-
if (currentList.parent.
|
|
5651
|
-
currentList.parent.
|
|
5746
|
+
if (currentList.parent.typeName === 'VegaRTEContent' ||
|
|
5747
|
+
currentList.parent.typeName === 'RTEHtmlBlock') {
|
|
5652
5748
|
const containerPath = this.getContainerPath(currentList);
|
|
5653
5749
|
return containerPath ? [...containerPath, ...path] : null;
|
|
5654
5750
|
}
|
|
@@ -6059,7 +6155,6 @@ class ListAnnotation extends BlockAnnotation {
|
|
|
6059
6155
|
class RTEListBlock extends RTEBlock {
|
|
6060
6156
|
constructor(id, type, options) {
|
|
6061
6157
|
super(id);
|
|
6062
|
-
this.dtoName = RTEListBlock.dtoName;
|
|
6063
6158
|
this.type = 'bullet-list';
|
|
6064
6159
|
this.children = [];
|
|
6065
6160
|
this.type = type;
|
|
@@ -6164,14 +6259,15 @@ class RTEListBlock extends RTEBlock {
|
|
|
6164
6259
|
return this.type === 'number-list' ? 'ol' : 'ul';
|
|
6165
6260
|
}
|
|
6166
6261
|
}
|
|
6262
|
+
RTEListBlock.typeName = 'RTEListBlock';
|
|
6263
|
+
// eslint-disable-next-line @globalpayments/vega-eslint/vega-class-member-order-rule
|
|
6167
6264
|
(() => {
|
|
6168
|
-
ActionHandleStrategyRegistry.register(ModifyContentActionType.TRANSFORM_LIST_BLOCK, RTEListBlock.
|
|
6169
|
-
ActionHandleStrategyRegistry.register(ModifyContentActionType.TRANSFORM_PARAGRAPH_BLOCK, RTEListBlock.
|
|
6170
|
-
ActionHandleStrategyRegistry.register(ModifyContentActionType.INSERT_IMAGE_TO_BLOCK, RTEListBlock.
|
|
6171
|
-
ActionHandleStrategyRegistry.register(ModifyContentActionType.NEST_LIST_ITEMS, RTEListBlock.
|
|
6172
|
-
ActionHandleStrategyRegistry.register(ModifyContentActionType.UNNEST_LIST_ITEMS, RTEListBlock.
|
|
6265
|
+
ActionHandleStrategyRegistry.register(ModifyContentActionType.TRANSFORM_LIST_BLOCK, RTEListBlock.typeName, new ListTransformToListStrategy());
|
|
6266
|
+
ActionHandleStrategyRegistry.register(ModifyContentActionType.TRANSFORM_PARAGRAPH_BLOCK, RTEListBlock.typeName, new ListTransformToParagraphStrategy());
|
|
6267
|
+
ActionHandleStrategyRegistry.register(ModifyContentActionType.INSERT_IMAGE_TO_BLOCK, RTEListBlock.typeName, new ListInsertImageStrategy());
|
|
6268
|
+
ActionHandleStrategyRegistry.register(ModifyContentActionType.NEST_LIST_ITEMS, RTEListBlock.typeName, new ListNestItemsStrategy());
|
|
6269
|
+
ActionHandleStrategyRegistry.register(ModifyContentActionType.UNNEST_LIST_ITEMS, RTEListBlock.typeName, new ListUnnestItemsStrategy());
|
|
6173
6270
|
})();
|
|
6174
|
-
RTEListBlock.dtoName = 'RTEListBlock';
|
|
6175
6271
|
|
|
6176
6272
|
/**
|
|
6177
6273
|
* The delete node content contains some common functions that used for image block delete the image node or text block delete text node.
|
|
@@ -6337,7 +6433,7 @@ class BlockDeleteNodeContentStrategy extends ActionHandleStrategy {
|
|
|
6337
6433
|
* @returns {boolean} True if the block is not the root content block, false otherwise.
|
|
6338
6434
|
*/
|
|
6339
6435
|
isRTEBlock(block) {
|
|
6340
|
-
return block && block.
|
|
6436
|
+
return block && block.typeName !== 'VegaRTEContent';
|
|
6341
6437
|
}
|
|
6342
6438
|
}
|
|
6343
6439
|
|
|
@@ -6487,6 +6583,7 @@ class SelectionChangeAction extends AnnotationAction {
|
|
|
6487
6583
|
return new SelectionRangeAnnotation(this.range);
|
|
6488
6584
|
}
|
|
6489
6585
|
}
|
|
6586
|
+
SelectionChangeAction.typeName = 'SelectionChangeAction';
|
|
6490
6587
|
|
|
6491
6588
|
/**
|
|
6492
6589
|
* Update the code block node annotation map strategy.
|
|
@@ -6551,6 +6648,7 @@ class RTEDecoratorNode extends RTENode {
|
|
|
6551
6648
|
return false;
|
|
6552
6649
|
}
|
|
6553
6650
|
}
|
|
6651
|
+
RTEDecoratorNode.typeName = 'RTEDecoratorNode';
|
|
6554
6652
|
// CSS class names for the decorator node parent element
|
|
6555
6653
|
RTEDecoratorNode.DECORATOR_CONTAINER_CLASS = 'v-internal-decorator-container';
|
|
6556
6654
|
// CSS class names for the decorator node element
|
|
@@ -6608,7 +6706,6 @@ CodeBlockNodeFilterStylesStrategy.STYLES = {
|
|
|
6608
6706
|
class RTECodeBlockNode extends RTEDecoratorNode {
|
|
6609
6707
|
constructor(id, content, language, parentBlock) {
|
|
6610
6708
|
super(id);
|
|
6611
|
-
this.dtoName = RTECodeBlockNode.dtoName;
|
|
6612
6709
|
this.type = NodeTypeEnum.CODE_BLOCK_NODE;
|
|
6613
6710
|
this.text = '';
|
|
6614
6711
|
this.annotationMap = new Map();
|
|
@@ -6658,11 +6755,12 @@ class RTECodeBlockNode extends RTEDecoratorNode {
|
|
|
6658
6755
|
ActionHandleStrategyRegistry.executeTheStrategy(action, this);
|
|
6659
6756
|
}
|
|
6660
6757
|
}
|
|
6758
|
+
RTECodeBlockNode.typeName = 'RTECodeBlockNode';
|
|
6759
|
+
// eslint-disable-next-line @globalpayments/vega-eslint/vega-class-member-order-rule
|
|
6661
6760
|
(() => {
|
|
6662
|
-
ActionHandleStrategyRegistry.register(ModifyContentActionType.UPDATE_CODE_BLOCK, RTECodeBlockNode.
|
|
6663
|
-
ActionHandleStrategyRegistry.register(SelectionChangeAction.
|
|
6761
|
+
ActionHandleStrategyRegistry.register(ModifyContentActionType.UPDATE_CODE_BLOCK, RTECodeBlockNode.typeName, new UpdateCodeBlockStrategy());
|
|
6762
|
+
ActionHandleStrategyRegistry.register(SelectionChangeAction.typeName, RTECodeBlockNode.typeName, new CodeNodeSetSelectionRangeAnnotationStrategy());
|
|
6664
6763
|
})();
|
|
6665
|
-
RTECodeBlockNode.dtoName = 'RTECodeBlockNode';
|
|
6666
6764
|
|
|
6667
6765
|
/**
|
|
6668
6766
|
* Insert image behind after code block strategy.
|
|
@@ -6729,7 +6827,7 @@ class CodeBlockFilterStylesStrategy extends RTEFilterStylesStrategy {
|
|
|
6729
6827
|
* @inheritDoc
|
|
6730
6828
|
*/
|
|
6731
6829
|
canFilter(blockOrNodeInstance) {
|
|
6732
|
-
return Predicate.isCodeBlock(blockOrNodeInstance.
|
|
6830
|
+
return Predicate.isCodeBlock(blockOrNodeInstance.typeName);
|
|
6733
6831
|
}
|
|
6734
6832
|
/**
|
|
6735
6833
|
* The code block styles is preset and will convert to vega-code-block element so we don't need to to refill styles back to element.
|
|
@@ -6760,7 +6858,6 @@ CodeBlockFilterStylesStrategy.STYLES = {
|
|
|
6760
6858
|
class RTECodeBlock extends RTEBlock {
|
|
6761
6859
|
constructor(id, content, language) {
|
|
6762
6860
|
super(id);
|
|
6763
|
-
this.dtoName = RTECodeBlock.dtoName;
|
|
6764
6861
|
this.type = 'code-block';
|
|
6765
6862
|
this.annotationMap = new Map([CustomStyleAnnotation.from(CodeBlockFilterStylesStrategy.STYLES)]);
|
|
6766
6863
|
this.children = [new RTECodeBlockNode(`${id}-1`, content, language, this)];
|
|
@@ -6842,13 +6939,14 @@ class RTECodeBlock extends RTEBlock {
|
|
|
6842
6939
|
return this.children[0].annotationMap.has(InternalAnnotationTypeEnum.SELECTION_RANGE);
|
|
6843
6940
|
}
|
|
6844
6941
|
}
|
|
6942
|
+
RTECodeBlock.typeName = 'RTECodeBlock';
|
|
6943
|
+
// eslint-disable-next-line @globalpayments/vega-eslint/vega-class-member-order-rule
|
|
6845
6944
|
(() => {
|
|
6846
|
-
ActionHandleStrategyRegistry.register(ModifyContentActionType.DELETE_CODE_BLOCK, RTECodeBlock.
|
|
6847
|
-
ActionHandleStrategyRegistry.register(ModifyContentActionType.DELETE_CHILDREN, RTECodeBlock.
|
|
6848
|
-
ActionHandleStrategyRegistry.register(ModifyContentActionType.SWITCH_OUT_FROM_CODE_BLOCK, RTECodeBlock.
|
|
6849
|
-
ActionHandleStrategyRegistry.register(ModifyContentActionType.INSERT_IMAGE_TO_BLOCK, RTECodeBlock.
|
|
6945
|
+
ActionHandleStrategyRegistry.register(ModifyContentActionType.DELETE_CODE_BLOCK, RTECodeBlock.typeName, new CodeBlockRemoveSelfStrategy());
|
|
6946
|
+
ActionHandleStrategyRegistry.register(ModifyContentActionType.DELETE_CHILDREN, RTECodeBlock.typeName, new RemoveChildrenStrategy());
|
|
6947
|
+
ActionHandleStrategyRegistry.register(ModifyContentActionType.SWITCH_OUT_FROM_CODE_BLOCK, RTECodeBlock.typeName, new SwitchOutFromCodeBlockStrategy());
|
|
6948
|
+
ActionHandleStrategyRegistry.register(ModifyContentActionType.INSERT_IMAGE_TO_BLOCK, RTECodeBlock.typeName, new CodeBlockInsertImageStrategy());
|
|
6850
6949
|
})();
|
|
6851
6950
|
RTECodeBlock.CODE_BLOCK_PLACEHOLDER_CLASS_NAME = 'code-block-placeholder-element';
|
|
6852
|
-
RTECodeBlock.dtoName = 'RTECodeBlock';
|
|
6853
6951
|
|
|
6854
|
-
export { ITALIC_FONT_STYLE as $, ActionHandleStrategyRegistry as A, BlockAnnotation as B, CommonAnnotationTypeEnum as C, CommonAnnotation as D, ReplaceChildNodesAction as E, BlockMergeNodesStrategy as F, BlockReplaceNodesStrategy as G, HTML_VOID_TAGS as H, InsertChildrenAfterAction as I, HorizontalAlignmentAnnotationAction as J, BlockUpdateHorizontalAlignmentStrategy as K, BlockDeleteNodeContentStrategy as L, ModifyContentAction as M, NodeAnnotationTypeEnum as N, RemoveChildrenStrategy as O, RemoveNestListAction as P, ReplaceNestListAction as Q, RTETextNode as R, SplitBlockWithNodeAction as S, RTEListBlock as T, UpdateTextAction as U, VegaRTEPresetToolbarItems as V, BOLD_FONT_WEIGHT_KEYWORD as W, BOLD_FONT_WEIGHT as X, createStyleMapFromElement as Y, RTE_TEXT_COLORS as Z, RTE_DEFAULT_TEXT_COLOR as _, RTEBlock as a, STRIKETHROUGH_TEXT_DECORATION as a0, UNDERLINE_TEXT_DECORATION as a1, TextStyleAnnotation as a2, RTEHtmlBlock as a3, Predicate as a4, ListAnnotation as a5, HorizontalAlignmentAnnotation as a6, CodeAnnotation as a7, TEXT_STYLE_DEFAULT_FONT_WEIGHT as a8, LinkFilterStylesStrategy as a9,
|
|
6952
|
+
export { ITALIC_FONT_STYLE as $, ActionHandleStrategyRegistry as A, BlockAnnotation as B, CommonAnnotationTypeEnum as C, CommonAnnotation as D, ReplaceChildNodesAction as E, BlockMergeNodesStrategy as F, BlockReplaceNodesStrategy as G, HTML_VOID_TAGS as H, InsertChildrenAfterAction as I, HorizontalAlignmentAnnotationAction as J, BlockUpdateHorizontalAlignmentStrategy as K, BlockDeleteNodeContentStrategy as L, ModifyContentAction as M, NodeAnnotationTypeEnum as N, RemoveChildrenStrategy as O, RemoveNestListAction as P, ReplaceNestListAction as Q, RTETextNode as R, SplitBlockWithNodeAction as S, RTEListBlock as T, UpdateTextAction as U, VegaRTEPresetToolbarItems as V, BOLD_FONT_WEIGHT_KEYWORD as W, BOLD_FONT_WEIGHT as X, createStyleMapFromElement as Y, RTE_TEXT_COLORS as Z, RTE_DEFAULT_TEXT_COLOR as _, RTEBlock as a, STRIKETHROUGH_TEXT_DECORATION as a0, UNDERLINE_TEXT_DECORATION as a1, TextStyleAnnotation as a2, RTEHtmlBlock as a3, Predicate as a4, ListAnnotation as a5, HorizontalAlignmentAnnotation as a6, CodeAnnotation as a7, TEXT_STYLE_DEFAULT_FONT_WEIGHT as a8, LinkFilterStylesStrategy as a9, RTEUpdateSource as aA, escapeHtml as aB, RTE_PASTE_MODE_WORD as aC, RTE_UPDATE_SOURCE_KEY as aD, RTE_EMAIL_LINK_TYPE_KEY as aE, RTE_DEFAULT_LINK_TYPE_KEY as aF, RTE_SUPPORTED_LINK_TYPE_KEYS as aG, CodeBlockFilterStylesStrategy as aa, CodeBlockNodeFilterStylesStrategy as ab, SyncUpSelectionAction as ac, escapeHtmlAttribute as ad, BoldAnnotationAction as ae, DeleteNodeAnnotationAction as af, ActionHandlerInterceptorRegistry as ag, CodeLanguage as ah, CustomClassAnnotation as ai, VegaRTEDefaultTextStyleItems as aj, ZERO_WIDTH_SPACE as ak, LinkAnnotationAction as al, UpdateCodeBlockAction as am, SelectionChangeAction as an, TextColorAnnotationAction as ao, VegaRTEOneRowHeightPx as ap, ItalicAnnotationAction as aq, UnderlineAnnotationAction as ar, TextStyleAnnotationAction as as, BoldAnnotation as at, BlockAnnotationTypeEnum as au, ClearFormattingAnnotationAction as av, CodeAnnotationAction as aw, StrikethroughAnnotationAction as ax, IndentAnnotationAction as ay, TransformParagraphAction as az, RTETextBlock as b, RTE_BLOCK_BOUNDARY_ATTRIBUTE as c, RTEAnnotationStyle as d, ActionHandleStrategy as e, AppendChildrenAction as f, RTENode as g, InsertChildrenBeforeAction as h, InternalAnnotationTypeEnum as i, ModifyContentActionType as j, AnnotationAction as k, RemoveChildrenAction as l, CustomAttributeAnnotation as m, RTEDTOClassManager$1 as n, RTEFilterStylesStrategy as o, RTEDecoratorNode as p, RTECodeBlock as q, RTEListItemBlock as r, stateEntityRenderingRegistry as s, RTECodeBlockNode as t, CustomStyleAnnotation as u, RTEFilterStylesStrategyRegistry as v, RTE_PASTE_MODE_DATA_TYPE as w, RTE_WORD_COUNT_KEY as x, NodeAnnotation as y, NodeTypeEnum as z };
|