@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
|
@@ -2,13 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
const changeManager = require('./change-manager-a297e4d2.js');
|
|
4
4
|
const domNodeSubjectObserverFactory = require('./dom-node-subject-observer-factory-c82df135.js');
|
|
5
|
-
const vegaInternalEventId = require('./vega-internal-event-id-
|
|
5
|
+
const vegaInternalEventId = require('./vega-internal-event-id-98d499d7.js');
|
|
6
6
|
const string = require('./string-39438062.js');
|
|
7
7
|
const globalSlimmerRegistry = require('./global-slimmer-registry-b3bce7e0.js');
|
|
8
|
-
const typeGuard = require('./type-guard-
|
|
8
|
+
const typeGuard = require('./type-guard-29e01bd4.js');
|
|
9
9
|
const typography = require('./typography-3ea4fe41.js');
|
|
10
|
+
const discriminated = require('./discriminated-3b8e72d5.js');
|
|
10
11
|
const misc = require('./misc-3d30df91.js');
|
|
11
|
-
const darkModeStyleController = require('./dark-mode-style-controller-
|
|
12
|
+
const darkModeStyleController = require('./dark-mode-style-controller-ec04ece9.js');
|
|
12
13
|
const object = require('./object-b53e9416.js');
|
|
13
14
|
const ui = require('./ui-c91c37a7.js');
|
|
14
15
|
|
|
@@ -22,6 +23,14 @@ exports.InternalAnnotationTypeEnum = void 0;
|
|
|
22
23
|
* Abstract class for all annotations
|
|
23
24
|
*/
|
|
24
25
|
class Annotation {
|
|
26
|
+
/**
|
|
27
|
+
* Whether the annotation only represents transient formatting state.
|
|
28
|
+
*
|
|
29
|
+
* @returns {boolean} True when the annotation should be treated as formatting-only.
|
|
30
|
+
*/
|
|
31
|
+
get isFormattingOnly() {
|
|
32
|
+
return false;
|
|
33
|
+
}
|
|
25
34
|
}
|
|
26
35
|
|
|
27
36
|
exports.BlockAnnotationTypeEnum = void 0;
|
|
@@ -116,7 +125,7 @@ class StateEntityRenderingRegistry {
|
|
|
116
125
|
* @returns {entity is VegaRTEContent} - True if the entity is a VegaRTEContent instance, false otherwise.
|
|
117
126
|
*/
|
|
118
127
|
isVegaRTEContent(entity) {
|
|
119
|
-
return entity && entity.
|
|
128
|
+
return entity && entity.typeName === 'VegaRTEContent';
|
|
120
129
|
}
|
|
121
130
|
}
|
|
122
131
|
const stateEntityRenderingRegistry = new StateEntityRenderingRegistry();
|
|
@@ -537,7 +546,7 @@ class Predicate {
|
|
|
537
546
|
* @returns {boolean} True if the block or node instance is a text node and has a link annotation, false otherwise.
|
|
538
547
|
*/
|
|
539
548
|
static isLinkNode(blockOrNodeInstance) {
|
|
540
|
-
return (this.isTextNode(blockOrNodeInstance.
|
|
549
|
+
return (this.isTextNode(blockOrNodeInstance.typeName) &&
|
|
541
550
|
!!blockOrNodeInstance.getAnnotationByType(exports.NodeAnnotationTypeEnum.LINK));
|
|
542
551
|
}
|
|
543
552
|
/**
|
|
@@ -547,7 +556,7 @@ class Predicate {
|
|
|
547
556
|
* @returns {boolean} True if the block or node instance is a code node, false otherwise.
|
|
548
557
|
*/
|
|
549
558
|
static isCodeNode(blockOrNodeInstance) {
|
|
550
|
-
if (this.isTextNode(blockOrNodeInstance.
|
|
559
|
+
if (this.isTextNode(blockOrNodeInstance.typeName)) {
|
|
551
560
|
const codeAnnotation = blockOrNodeInstance.getAnnotationByType(exports.NodeAnnotationTypeEnum.CODE);
|
|
552
561
|
return !!codeAnnotation && codeAnnotation.code;
|
|
553
562
|
}
|
|
@@ -560,7 +569,7 @@ class Predicate {
|
|
|
560
569
|
* @returns {boolean} True if the block or node instance is an image node, false otherwise.
|
|
561
570
|
*/
|
|
562
571
|
static isImageNode(blockOrNodeInstance) {
|
|
563
|
-
return blockOrNodeInstance.
|
|
572
|
+
return blockOrNodeInstance.typeName === 'RTEImageNode';
|
|
564
573
|
}
|
|
565
574
|
/**
|
|
566
575
|
* Check if the given block or node instance is a code block node, which is defined as an instance of RTECodeBlockNode.
|
|
@@ -569,7 +578,7 @@ class Predicate {
|
|
|
569
578
|
* @returns {boolean} True if the block or node instance is a code block node, false otherwise.
|
|
570
579
|
*/
|
|
571
580
|
static isCodeBlockNode(blockOrNodeInstance) {
|
|
572
|
-
return blockOrNodeInstance.
|
|
581
|
+
return blockOrNodeInstance.typeName === 'RTECodeBlockNode';
|
|
573
582
|
}
|
|
574
583
|
}
|
|
575
584
|
Predicate.RTE_TEXT_NODE_CLASS_NAME = 'RTETextNode';
|
|
@@ -749,7 +758,9 @@ class LinkGroupAnnotation extends Annotation {
|
|
|
749
758
|
getAttribute(linkAnnotation) {
|
|
750
759
|
const { href, customAttribute = {} } = linkAnnotation.link;
|
|
751
760
|
const useInternalStyle = linkAnnotation.useInternalStyle;
|
|
752
|
-
const target =
|
|
761
|
+
const target = (href === null || href === void 0 ? void 0 : href.startsWith('#'))
|
|
762
|
+
? '_self'
|
|
763
|
+
: customAttribute.target || (useInternalStyle ? '_blank' : '');
|
|
753
764
|
return Object.assign(Object.assign(Object.assign({}, customAttribute), (href ? { href } : useInternalStyle ? { href } : {})), (target ? { target } : {}));
|
|
754
765
|
}
|
|
755
766
|
/**
|
|
@@ -939,8 +950,8 @@ class ActionHandlerInterceptorRegistry {
|
|
|
939
950
|
* @returns {Nullable<ActionHandlerInterceptor<T, target>>} - The action handler interceptor instance or null if not found.
|
|
940
951
|
*/
|
|
941
952
|
static get(action, targetClass) {
|
|
942
|
-
const targetClassName = targetClass.
|
|
943
|
-
const actionType = action instanceof ModifyContentAction ? action.type : action.
|
|
953
|
+
const targetClassName = targetClass.typeName;
|
|
954
|
+
const actionType = action instanceof ModifyContentAction ? action.type : action.typeName;
|
|
944
955
|
const strategyMap = this.registry.get(targetClassName);
|
|
945
956
|
if (strategyMap) {
|
|
946
957
|
const set = strategyMap.get(actionType);
|
|
@@ -1010,14 +1021,14 @@ class ActionHandleStrategyRegistry {
|
|
|
1010
1021
|
const interceptor = ActionHandlerInterceptorRegistry.get(action, RTEInstance);
|
|
1011
1022
|
// eslint-disable-next-line jsdoc/require-jsdoc
|
|
1012
1023
|
const executeStrategy = () => {
|
|
1013
|
-
const actionType = action instanceof ModifyContentAction ? action.type : action.
|
|
1014
|
-
const strategy = ActionHandleStrategyRegistry.get(actionType, RTEInstance.
|
|
1024
|
+
const actionType = action instanceof ModifyContentAction ? action.type : action.typeName;
|
|
1025
|
+
const strategy = ActionHandleStrategyRegistry.get(actionType, RTEInstance.typeName);
|
|
1015
1026
|
if (strategy) {
|
|
1016
1027
|
action['executedFlag'] = true;
|
|
1017
1028
|
return strategy.execute(action, RTEInstance);
|
|
1018
1029
|
}
|
|
1019
1030
|
else {
|
|
1020
|
-
globalSlimmerRegistry.LogUtility.warn(`Type ${actionType} action handle strategy is not registered in class ${RTEInstance.
|
|
1031
|
+
globalSlimmerRegistry.LogUtility.warn(`Type ${actionType} action handle strategy is not registered in class ${RTEInstance.typeName}`);
|
|
1021
1032
|
}
|
|
1022
1033
|
};
|
|
1023
1034
|
if (interceptor) {
|
|
@@ -1035,7 +1046,7 @@ class ActionHandleStrategyRegistry {
|
|
|
1035
1046
|
* @returns {boolean} - Whether the action type can be handled by the strategy.
|
|
1036
1047
|
*/
|
|
1037
1048
|
static canHandle(actionType, RTEInstance) {
|
|
1038
|
-
const strategy = ActionHandleStrategyRegistry.get(actionType, RTEInstance.
|
|
1049
|
+
const strategy = ActionHandleStrategyRegistry.get(actionType, RTEInstance.typeName);
|
|
1039
1050
|
return strategy ? true : false;
|
|
1040
1051
|
}
|
|
1041
1052
|
}
|
|
@@ -1390,7 +1401,7 @@ class RTEFilterStylesStrategyRegistry {
|
|
|
1390
1401
|
* Registers a filter styles strategy for a specific DTO class name.
|
|
1391
1402
|
* Duplicate strategy instances are ignored.
|
|
1392
1403
|
*
|
|
1393
|
-
* @param {string} dtoClassName - The DTO class name (e.g. `RTEListBlock.
|
|
1404
|
+
* @param {string} dtoClassName - The DTO class name (e.g. `RTEListBlock.typeName`).
|
|
1394
1405
|
* @param {RTEFilterStylesStrategy} strategy - The strategy instance to register.
|
|
1395
1406
|
*/
|
|
1396
1407
|
static register(dtoClassName, strategy) {
|
|
@@ -1419,7 +1430,7 @@ class RTEFilterStylesStrategyRegistry {
|
|
|
1419
1430
|
* The instance is also passed to matched strategies so they can make decisions from DTO annotations.
|
|
1420
1431
|
*/
|
|
1421
1432
|
static executeTheStrategyFilterAction(blockOrNodeInstance, styles, classNames) {
|
|
1422
|
-
const dtoClassName = blockOrNodeInstance.
|
|
1433
|
+
const dtoClassName = blockOrNodeInstance.typeName;
|
|
1423
1434
|
const strategies = this.getStrategies(dtoClassName);
|
|
1424
1435
|
const matchedStrategies = strategies.filter((strategy) => {
|
|
1425
1436
|
return strategy.canFilter(blockOrNodeInstance);
|
|
@@ -1485,14 +1496,10 @@ exports.NodeTypeEnum = void 0;
|
|
|
1485
1496
|
/**
|
|
1486
1497
|
* Abstract class for all nodes
|
|
1487
1498
|
*/
|
|
1488
|
-
class RTENode {
|
|
1499
|
+
class RTENode extends discriminated.Discriminated {
|
|
1489
1500
|
constructor(id, annotationMap) {
|
|
1501
|
+
super();
|
|
1490
1502
|
this.annotationMap = new Map();
|
|
1491
|
-
/**
|
|
1492
|
-
* Minimize-safe type discriminator. Each concrete sub-class declares its own
|
|
1493
|
-
* `static readonly dtoName = 'ClassName'`.
|
|
1494
|
-
*/
|
|
1495
|
-
this.dtoName = this.constructor.name;
|
|
1496
1503
|
this.id = id;
|
|
1497
1504
|
if (annotationMap) {
|
|
1498
1505
|
this.annotationMap = annotationMap;
|
|
@@ -1506,7 +1513,7 @@ class RTENode {
|
|
|
1506
1513
|
* @param {VegaRTETransformOptions} options - Options for transforming the node.
|
|
1507
1514
|
*/
|
|
1508
1515
|
static from(json, parentBlock, options) {
|
|
1509
|
-
throw new Error(`[Vega] ${this.
|
|
1516
|
+
throw new Error(`[Vega] ${this.typeName}.from(${JSON.stringify(json)}, ${parentBlock}, ${options}) is not implemented. Please implement this method in the subclass.`);
|
|
1510
1517
|
}
|
|
1511
1518
|
/**
|
|
1512
1519
|
* Creates different types of text annotations based on the provided type and value.
|
|
@@ -1695,6 +1702,7 @@ class RTENode {
|
|
|
1695
1702
|
doModifyActionApply(action) {
|
|
1696
1703
|
}
|
|
1697
1704
|
}
|
|
1705
|
+
RTENode.typeName = 'RTENode';
|
|
1698
1706
|
|
|
1699
1707
|
/**
|
|
1700
1708
|
* RTEDTOClassManager is a singleton class that manages the registration and retrieval of RTE DTO classes.
|
|
@@ -1749,14 +1757,10 @@ const RTEDTOClassManager$1 = new RTEDTOClassManager();
|
|
|
1749
1757
|
/**
|
|
1750
1758
|
* Abstract class for block
|
|
1751
1759
|
*/
|
|
1752
|
-
class RTEBlock {
|
|
1760
|
+
class RTEBlock extends discriminated.Discriminated {
|
|
1753
1761
|
constructor(id) {
|
|
1762
|
+
super();
|
|
1754
1763
|
this.annotationMap = new Map();
|
|
1755
|
-
/**
|
|
1756
|
-
* Minimize-safe type discriminator. Each concrete sub-class declares its own
|
|
1757
|
-
* `static readonly dtoName = 'ClassName'`.
|
|
1758
|
-
*/
|
|
1759
|
-
this.dtoName = this.constructor.name;
|
|
1760
1764
|
this.id = id;
|
|
1761
1765
|
}
|
|
1762
1766
|
/**
|
|
@@ -1766,7 +1770,7 @@ class RTEBlock {
|
|
|
1766
1770
|
* @param {VegaRTETransformOptions} options - Options for transforming the block.
|
|
1767
1771
|
*/
|
|
1768
1772
|
static from(json, options) {
|
|
1769
|
-
throw new Error(`[Vega] ${this.
|
|
1773
|
+
throw new Error(`[Vega] ${this.typeName}.from(${JSON.stringify(json)}, ${options}) is not implemented. Please implement this method in the subclass.`);
|
|
1770
1774
|
}
|
|
1771
1775
|
/**
|
|
1772
1776
|
* Generates block children from an array of VegaRTEContentBlock.
|
|
@@ -2019,7 +2023,7 @@ class RTEBlock {
|
|
|
2019
2023
|
this.doAnnotationActionApply(action);
|
|
2020
2024
|
}
|
|
2021
2025
|
else {
|
|
2022
|
-
const strategy = ActionHandleStrategyRegistry.get(action.
|
|
2026
|
+
const strategy = ActionHandleStrategyRegistry.get(action.typeName, this.typeName);
|
|
2023
2027
|
if (strategy) {
|
|
2024
2028
|
strategy.execute(action, this);
|
|
2025
2029
|
}
|
|
@@ -2034,101 +2038,84 @@ class RTEBlock {
|
|
|
2034
2038
|
return new Map(Array.from(this.annotationMap.entries()).map(([key, value]) => [key, value.clone()]));
|
|
2035
2039
|
}
|
|
2036
2040
|
}
|
|
2041
|
+
RTEBlock.typeName = 'RTEBlock';
|
|
2037
2042
|
|
|
2038
2043
|
/**
|
|
2039
|
-
*
|
|
2040
|
-
|
|
2041
|
-
|
|
2042
|
-
}
|
|
2043
|
-
|
|
2044
|
-
/**
|
|
2045
|
-
* Abstract class for which can be splittable
|
|
2044
|
+
* Append children to a block or rte content
|
|
2045
|
+
*
|
|
2046
|
+
* @example parent.apply(new AppendChildrenAction([newChildren]))
|
|
2046
2047
|
*/
|
|
2047
|
-
class
|
|
2048
|
-
constructor() {
|
|
2049
|
-
super(
|
|
2050
|
-
|
|
2051
|
-
|
|
2052
|
-
*/
|
|
2053
|
-
this.doSplit = true;
|
|
2048
|
+
class AppendChildrenAction extends ModifyContentAction {
|
|
2049
|
+
constructor(childNodes) {
|
|
2050
|
+
super();
|
|
2051
|
+
this.type = exports.ModifyContentActionType.APPEND_CHILDREN;
|
|
2052
|
+
this.entityToBeAppended = childNodes;
|
|
2054
2053
|
}
|
|
2055
2054
|
}
|
|
2056
2055
|
|
|
2056
|
+
const TEXT_STYLE_DEFAULT_FONT_WEIGHT = '500';
|
|
2057
|
+
const TEXT_STYLE_BASE = {
|
|
2058
|
+
fontFamily: 'Inter',
|
|
2059
|
+
fontSize: '16px',
|
|
2060
|
+
lineHeight: '22px',
|
|
2061
|
+
minHeight: '22px',
|
|
2062
|
+
fontWeight: TEXT_STYLE_DEFAULT_FONT_WEIGHT,
|
|
2063
|
+
};
|
|
2064
|
+
const PARAGRAPH_TEXT_STYLE = Object.assign(Object.assign({}, TEXT_STYLE_BASE), { marginTop: '0px', marginBottom: '0px' });
|
|
2065
|
+
const TEXT_STYLE_DEFAULTS = {
|
|
2066
|
+
'paragraph': PARAGRAPH_TEXT_STYLE,
|
|
2067
|
+
'title': Object.assign(Object.assign({}, TEXT_STYLE_BASE), { fontSize: '36px', lineHeight: '40px', minHeight: '40px' }),
|
|
2068
|
+
'subtitle': Object.assign(Object.assign({}, TEXT_STYLE_BASE), { fontSize: '28px', lineHeight: '32px', minHeight: '32px' }),
|
|
2069
|
+
'heading-1': Object.assign(Object.assign({}, PARAGRAPH_TEXT_STYLE), { fontSize: '22px', lineHeight: '24px', minHeight: '24px' }),
|
|
2070
|
+
'heading-2': Object.assign(Object.assign({}, PARAGRAPH_TEXT_STYLE), { fontSize: '20px', lineHeight: '24px', minHeight: '24px' }),
|
|
2071
|
+
'heading-3': Object.assign(Object.assign({}, PARAGRAPH_TEXT_STYLE), { fontSize: '18px' }),
|
|
2072
|
+
'heading-4': Object.assign({}, PARAGRAPH_TEXT_STYLE),
|
|
2073
|
+
'heading-5': Object.assign(Object.assign({}, PARAGRAPH_TEXT_STYLE), { fontSize: '14px' }),
|
|
2074
|
+
'heading-6': Object.assign(Object.assign({}, PARAGRAPH_TEXT_STYLE), { fontSize: '12px' }),
|
|
2075
|
+
};
|
|
2076
|
+
|
|
2057
2077
|
/**
|
|
2058
|
-
*
|
|
2078
|
+
* Text style annotation
|
|
2059
2079
|
*/
|
|
2060
|
-
class
|
|
2061
|
-
constructor(
|
|
2080
|
+
class TextStyleAnnotation extends BlockAnnotation {
|
|
2081
|
+
constructor(textStyle) {
|
|
2062
2082
|
super();
|
|
2063
|
-
this.type = exports.
|
|
2064
|
-
this.
|
|
2083
|
+
this.type = exports.BlockAnnotationTypeEnum.TEXT_STYLE;
|
|
2084
|
+
this.textStyle = textStyle;
|
|
2065
2085
|
}
|
|
2066
2086
|
/**
|
|
2067
|
-
*
|
|
2087
|
+
* Generate the map item for the annotations
|
|
2068
2088
|
*
|
|
2069
|
-
* @
|
|
2089
|
+
* @param {VegaRTETextStyleType} textStyle - the text style type
|
|
2090
|
+
* @returns {[BlockAnnotationTypeEnum.TEXT_STYLE, TextStyleAnnotation]} Map item for the annotation
|
|
2070
2091
|
*/
|
|
2071
|
-
|
|
2072
|
-
return new
|
|
2073
|
-
}
|
|
2074
|
-
}
|
|
2075
|
-
|
|
2076
|
-
/**
|
|
2077
|
-
* Default CSS style values produced by inline text-formatting annotations.
|
|
2078
|
-
*
|
|
2079
|
-
* These constants are the single source of truth for the CSS values that
|
|
2080
|
-
* bold, italic, underline and strikethrough semantic annotations render as
|
|
2081
|
-
* (in standalone mode) and that annotation handlers / filter strategies use
|
|
2082
|
-
* to detect or remove redundant inline styles.
|
|
2083
|
-
*/
|
|
2084
|
-
/** CSS `font-weight` value rendered by the bold annotation. */
|
|
2085
|
-
const BOLD_FONT_WEIGHT = '700';
|
|
2086
|
-
/** Alternative `font-weight` keyword that browsers report for bold elements. */
|
|
2087
|
-
const BOLD_FONT_WEIGHT_KEYWORD = 'bold';
|
|
2088
|
-
/** CSS `font-style` value rendered by the italic annotation. */
|
|
2089
|
-
const ITALIC_FONT_STYLE = 'italic';
|
|
2090
|
-
/** CSS `text-decoration` token rendered by the underline annotation. */
|
|
2091
|
-
const UNDERLINE_TEXT_DECORATION = 'underline';
|
|
2092
|
-
/** CSS `text-decoration` token rendered by the strikethrough annotation. */
|
|
2093
|
-
const STRIKETHROUGH_TEXT_DECORATION = 'line-through';
|
|
2094
|
-
/** CSS `font-family` value rendered by the code annotation. */
|
|
2095
|
-
const CODE_FONT_FAMILY = 'Roboto Mono';
|
|
2096
|
-
/** CSS `white-space` value rendered by the code annotation. */
|
|
2097
|
-
const CODE_WHITE_SPACE = 'pre-wrap';
|
|
2098
|
-
|
|
2099
|
-
/**
|
|
2100
|
-
* Annotation to make text with strikethrough
|
|
2101
|
-
*/
|
|
2102
|
-
class StrikethroughAnnotation extends NodeAnnotation {
|
|
2103
|
-
constructor(underline) {
|
|
2104
|
-
super();
|
|
2105
|
-
this.type = exports.NodeAnnotationTypeEnum.STRIKETHROUGH;
|
|
2106
|
-
this.strikethrough = underline;
|
|
2092
|
+
static from(textStyle) {
|
|
2093
|
+
return [exports.BlockAnnotationTypeEnum.TEXT_STYLE, new TextStyleAnnotation(textStyle)];
|
|
2107
2094
|
}
|
|
2108
2095
|
/**
|
|
2109
|
-
*
|
|
2096
|
+
* Get the default styles for a given text style type.
|
|
2110
2097
|
*
|
|
2111
|
-
* @param {
|
|
2112
|
-
* @returns {
|
|
2098
|
+
* @param {VegaRTETextStyleType} textStyle - The text style type.
|
|
2099
|
+
* @returns {Nullable<AnnotationStyle>} The default styles for the given text style type.
|
|
2113
2100
|
*/
|
|
2114
|
-
static
|
|
2115
|
-
|
|
2101
|
+
static getDefaultStyles(textStyle) {
|
|
2102
|
+
if (!textStyle)
|
|
2103
|
+
return null;
|
|
2104
|
+
return TEXT_STYLE_DEFAULTS[textStyle];
|
|
2116
2105
|
}
|
|
2117
2106
|
/**
|
|
2118
2107
|
* Generate the JSON representation of the annotation
|
|
2119
2108
|
*
|
|
2120
|
-
* @returns {Record<string, unknown
|
|
2109
|
+
* @returns {Nullable<Record<string, unknown>>} JSON representation of the annotation
|
|
2121
2110
|
*/
|
|
2122
2111
|
toJSON() {
|
|
2123
|
-
return {
|
|
2124
|
-
strikethrough: this.strikethrough,
|
|
2125
|
-
};
|
|
2112
|
+
return { textStyle: this.textStyle };
|
|
2126
2113
|
}
|
|
2127
2114
|
/**
|
|
2128
2115
|
* @inheritDoc
|
|
2129
2116
|
*/
|
|
2130
2117
|
clone() {
|
|
2131
|
-
return new
|
|
2118
|
+
return new TextStyleAnnotation(this.textStyle);
|
|
2132
2119
|
}
|
|
2133
2120
|
/**
|
|
2134
2121
|
* @inheritDoc
|
|
@@ -2136,7 +2123,7 @@ class StrikethroughAnnotation extends NodeAnnotation {
|
|
|
2136
2123
|
renderClass(options) {
|
|
2137
2124
|
if (options === null || options === void 0 ? void 0 : options.standalone)
|
|
2138
2125
|
return null;
|
|
2139
|
-
return this.
|
|
2126
|
+
return this.textStyle ? `v-rte--text-style-${this.textStyle}` : null;
|
|
2140
2127
|
}
|
|
2141
2128
|
/**
|
|
2142
2129
|
* @inheritDoc
|
|
@@ -2144,131 +2131,628 @@ class StrikethroughAnnotation extends NodeAnnotation {
|
|
|
2144
2131
|
renderStyle(options) {
|
|
2145
2132
|
if (!(options === null || options === void 0 ? void 0 : options.standalone))
|
|
2146
2133
|
return null;
|
|
2147
|
-
return this.
|
|
2134
|
+
return this.textStyle ? TextStyleAnnotation.getDefaultStyles(this.textStyle) : null;
|
|
2148
2135
|
}
|
|
2149
2136
|
}
|
|
2150
2137
|
|
|
2151
2138
|
/**
|
|
2152
|
-
*
|
|
2139
|
+
* Abstract class for annotation actions
|
|
2153
2140
|
*/
|
|
2154
|
-
class
|
|
2155
|
-
|
|
2141
|
+
class AnnotationAction extends discriminated.Discriminated {
|
|
2142
|
+
}
|
|
2143
|
+
AnnotationAction.typeName = 'AnnotationAction';
|
|
2144
|
+
|
|
2145
|
+
/**
|
|
2146
|
+
* Action to change the text style of a block
|
|
2147
|
+
*/
|
|
2148
|
+
class TextStyleAnnotationAction extends AnnotationAction {
|
|
2149
|
+
constructor(textStyle, bold) {
|
|
2156
2150
|
super();
|
|
2157
|
-
this.
|
|
2158
|
-
this.
|
|
2159
|
-
|
|
2160
|
-
/**
|
|
2161
|
-
* Generate the map item for the annotation
|
|
2162
|
-
*
|
|
2163
|
-
* @param {boolean} underline - Underline annotation
|
|
2164
|
-
* @returns {[NodeAnnotationTypeEnum.UNDERLINE, UnderlineAnnotation]} Map item for the annotation
|
|
2165
|
-
*/
|
|
2166
|
-
static from(underline) {
|
|
2167
|
-
return [exports.NodeAnnotationTypeEnum.UNDERLINE, new UnderlineAnnotation(underline)];
|
|
2151
|
+
this.isFlushable = true;
|
|
2152
|
+
this.textStyle = textStyle;
|
|
2153
|
+
this.bold = bold;
|
|
2168
2154
|
}
|
|
2169
2155
|
/**
|
|
2170
|
-
*
|
|
2156
|
+
* Converts the action to a block annotation
|
|
2171
2157
|
*
|
|
2172
|
-
* @returns {
|
|
2173
|
-
*/
|
|
2174
|
-
toJSON() {
|
|
2175
|
-
return {
|
|
2176
|
-
underline: this.underline,
|
|
2177
|
-
};
|
|
2178
|
-
}
|
|
2179
|
-
/**
|
|
2180
|
-
* @inheritDoc
|
|
2181
|
-
*/
|
|
2182
|
-
clone() {
|
|
2183
|
-
return new UnderlineAnnotation(this.underline);
|
|
2184
|
-
}
|
|
2185
|
-
/**
|
|
2186
|
-
* @inheritDoc
|
|
2187
|
-
*/
|
|
2188
|
-
renderClass(options) {
|
|
2189
|
-
if (options === null || options === void 0 ? void 0 : options.standalone)
|
|
2190
|
-
return null;
|
|
2191
|
-
return this.underline ? 'v-rte--underline' : null;
|
|
2192
|
-
}
|
|
2193
|
-
/**
|
|
2194
|
-
* @inheritDoc
|
|
2158
|
+
* @returns {BlockAnnotation} the block annotation
|
|
2195
2159
|
*/
|
|
2196
|
-
|
|
2197
|
-
|
|
2198
|
-
return null;
|
|
2199
|
-
return this.underline ? { textDecoration: UNDERLINE_TEXT_DECORATION } : null;
|
|
2160
|
+
toAnnotation() {
|
|
2161
|
+
return new TextStyleAnnotation(this.textStyle);
|
|
2200
2162
|
}
|
|
2201
2163
|
}
|
|
2164
|
+
TextStyleAnnotationAction.typeName = 'TextStyleAnnotationAction';
|
|
2202
2165
|
|
|
2203
2166
|
/**
|
|
2204
|
-
* Annotation to make text
|
|
2167
|
+
* Annotation to make text a link
|
|
2205
2168
|
*/
|
|
2206
|
-
class
|
|
2207
|
-
constructor(
|
|
2169
|
+
class LinkAnnotation extends NodeAnnotation {
|
|
2170
|
+
constructor(link, useInternalStyle = true) {
|
|
2208
2171
|
super();
|
|
2209
|
-
this.type = exports.NodeAnnotationTypeEnum.
|
|
2210
|
-
this.
|
|
2172
|
+
this.type = exports.NodeAnnotationTypeEnum.LINK;
|
|
2173
|
+
this.link = link;
|
|
2174
|
+
this.useInternalStyle = useInternalStyle;
|
|
2211
2175
|
}
|
|
2212
2176
|
/**
|
|
2213
2177
|
* Generate the map item for the annotation
|
|
2214
2178
|
*
|
|
2215
|
-
* @param {
|
|
2216
|
-
* @
|
|
2179
|
+
* @param {VegaRTELink} link - Bold annotation
|
|
2180
|
+
* @param {boolean} useInternalStyle - Whether to use default style for the link
|
|
2181
|
+
* @returns {[NodeAnnotationTypeEnum.LINK, LinkAnnotation]} Map item for the annotation
|
|
2217
2182
|
*/
|
|
2218
|
-
static from(
|
|
2219
|
-
return [exports.NodeAnnotationTypeEnum.
|
|
2183
|
+
static from(link, useInternalStyle = true) {
|
|
2184
|
+
return [exports.NodeAnnotationTypeEnum.LINK, new LinkAnnotation(link, useInternalStyle)];
|
|
2220
2185
|
}
|
|
2221
2186
|
/**
|
|
2222
2187
|
* Generate the JSON representation of the annotation
|
|
2223
2188
|
*
|
|
2224
|
-
* @returns {Record<
|
|
2189
|
+
* @returns {Record<'link', VegaRTELink>} JSON representation of the annotation
|
|
2225
2190
|
*/
|
|
2226
2191
|
toJSON() {
|
|
2227
2192
|
return {
|
|
2228
|
-
|
|
2193
|
+
link: this.link,
|
|
2229
2194
|
};
|
|
2230
2195
|
}
|
|
2231
2196
|
/**
|
|
2232
2197
|
* @inheritDoc
|
|
2233
2198
|
*/
|
|
2234
2199
|
clone() {
|
|
2235
|
-
return new
|
|
2200
|
+
return new LinkAnnotation(this.link, this.useInternalStyle);
|
|
2201
|
+
}
|
|
2202
|
+
/**
|
|
2203
|
+
* Verify whether two link annotation is same or not
|
|
2204
|
+
*
|
|
2205
|
+
* @param {LinkAnnotation} annotation - Compared annotation
|
|
2206
|
+
* @returns {boolean} Whether two link annotation is same or not
|
|
2207
|
+
*/
|
|
2208
|
+
toEqual(annotation) {
|
|
2209
|
+
return this.link.groupKey === annotation.link.groupKey;
|
|
2236
2210
|
}
|
|
2237
2211
|
/**
|
|
2238
2212
|
* @inheritDoc
|
|
2239
2213
|
*/
|
|
2240
|
-
renderClass(
|
|
2241
|
-
|
|
2242
|
-
return null;
|
|
2243
|
-
return this.italic ? 'v-rte--italic' : null;
|
|
2214
|
+
renderClass() {
|
|
2215
|
+
return null;
|
|
2244
2216
|
}
|
|
2245
2217
|
/**
|
|
2246
2218
|
* @inheritDoc
|
|
2247
2219
|
*/
|
|
2248
|
-
renderStyle(
|
|
2249
|
-
|
|
2250
|
-
return null;
|
|
2251
|
-
return this.italic ? { fontStyle: ITALIC_FONT_STYLE } : null;
|
|
2220
|
+
renderStyle() {
|
|
2221
|
+
return null;
|
|
2252
2222
|
}
|
|
2253
2223
|
}
|
|
2254
2224
|
|
|
2255
2225
|
/**
|
|
2256
|
-
*
|
|
2226
|
+
* Abstract class for which can be splittable
|
|
2257
2227
|
*/
|
|
2258
|
-
class
|
|
2259
|
-
constructor(
|
|
2260
|
-
super();
|
|
2261
|
-
|
|
2262
|
-
|
|
2228
|
+
class TextSplittableAction extends AnnotationAction {
|
|
2229
|
+
constructor() {
|
|
2230
|
+
super(...arguments);
|
|
2231
|
+
/**
|
|
2232
|
+
* Whether the action should split the node
|
|
2233
|
+
*/
|
|
2234
|
+
this.doSplit = true;
|
|
2263
2235
|
}
|
|
2264
|
-
|
|
2265
|
-
|
|
2266
|
-
|
|
2267
|
-
|
|
2268
|
-
|
|
2269
|
-
|
|
2270
|
-
|
|
2271
|
-
|
|
2236
|
+
}
|
|
2237
|
+
TextSplittableAction.typeName = 'TextSplittableAction';
|
|
2238
|
+
|
|
2239
|
+
/**
|
|
2240
|
+
* Action to toggle link annotation
|
|
2241
|
+
*/
|
|
2242
|
+
class LinkAnnotationAction extends TextSplittableAction {
|
|
2243
|
+
constructor({ link, newText, needMergeNode, doSplit, type, }) {
|
|
2244
|
+
super();
|
|
2245
|
+
this.isFlushable = true;
|
|
2246
|
+
this.link = link;
|
|
2247
|
+
this.needMergeNode = needMergeNode;
|
|
2248
|
+
this.newText = newText;
|
|
2249
|
+
this.type = type;
|
|
2250
|
+
if (typeGuard.isNonNullable(doSplit)) {
|
|
2251
|
+
this.doSplit = doSplit;
|
|
2252
|
+
}
|
|
2253
|
+
}
|
|
2254
|
+
/**
|
|
2255
|
+
* Converts the action to an annotation
|
|
2256
|
+
*
|
|
2257
|
+
* @returns {LinkAnnotation} the annotation
|
|
2258
|
+
*/
|
|
2259
|
+
toAnnotation() {
|
|
2260
|
+
return new LinkAnnotation(this.link);
|
|
2261
|
+
}
|
|
2262
|
+
}
|
|
2263
|
+
LinkAnnotationAction.typeName = 'LinkAnnotationAction';
|
|
2264
|
+
|
|
2265
|
+
/**
|
|
2266
|
+
* Action to link a group of nodes
|
|
2267
|
+
*/
|
|
2268
|
+
class LinkGroupAnnotationAction extends AnnotationAction {
|
|
2269
|
+
constructor(groupKey, nodes, type) {
|
|
2270
|
+
super();
|
|
2271
|
+
this.isFlushable = false;
|
|
2272
|
+
this.groupKey = groupKey;
|
|
2273
|
+
this.nodes = nodes;
|
|
2274
|
+
this.type = type;
|
|
2275
|
+
}
|
|
2276
|
+
/**
|
|
2277
|
+
* Converts the action to an annotation
|
|
2278
|
+
*
|
|
2279
|
+
* @returns {Annotation} The annotation
|
|
2280
|
+
*/
|
|
2281
|
+
toAnnotation() {
|
|
2282
|
+
return new LinkGroupAnnotation(this.groupKey);
|
|
2283
|
+
}
|
|
2284
|
+
}
|
|
2285
|
+
LinkGroupAnnotationAction.typeName = 'LinkGroupAnnotationAction';
|
|
2286
|
+
|
|
2287
|
+
/**
|
|
2288
|
+
* Default CSS style values produced by inline text-formatting annotations.
|
|
2289
|
+
*
|
|
2290
|
+
* These constants are the single source of truth for the CSS values that
|
|
2291
|
+
* bold, italic, underline and strikethrough semantic annotations render as
|
|
2292
|
+
* (in standalone mode) and that annotation handlers / filter strategies use
|
|
2293
|
+
* to detect or remove redundant inline styles.
|
|
2294
|
+
*/
|
|
2295
|
+
/** CSS `font-weight` value rendered by the bold annotation. */
|
|
2296
|
+
const BOLD_FONT_WEIGHT = '700';
|
|
2297
|
+
/** Alternative `font-weight` keyword that browsers report for bold elements. */
|
|
2298
|
+
const BOLD_FONT_WEIGHT_KEYWORD = 'bold';
|
|
2299
|
+
/** CSS `font-style` value rendered by the italic annotation. */
|
|
2300
|
+
const ITALIC_FONT_STYLE = 'italic';
|
|
2301
|
+
/** CSS `text-decoration` token rendered by the underline annotation. */
|
|
2302
|
+
const UNDERLINE_TEXT_DECORATION = 'underline';
|
|
2303
|
+
/** CSS `text-decoration` token rendered by the strikethrough annotation. */
|
|
2304
|
+
const STRIKETHROUGH_TEXT_DECORATION = 'line-through';
|
|
2305
|
+
/** CSS `font-family` value rendered by the code annotation. */
|
|
2306
|
+
const CODE_FONT_FAMILY = 'Roboto Mono';
|
|
2307
|
+
/** CSS `white-space` value rendered by the code annotation. */
|
|
2308
|
+
const CODE_WHITE_SPACE = 'pre-wrap';
|
|
2309
|
+
|
|
2310
|
+
/**
|
|
2311
|
+
* Annotation to make text bold
|
|
2312
|
+
*/
|
|
2313
|
+
class BoldAnnotation extends NodeAnnotation {
|
|
2314
|
+
constructor(bold) {
|
|
2315
|
+
super();
|
|
2316
|
+
this.type = exports.NodeAnnotationTypeEnum.BOLD;
|
|
2317
|
+
this.bold = bold;
|
|
2318
|
+
}
|
|
2319
|
+
/**
|
|
2320
|
+
* Generate the map item for the annotation
|
|
2321
|
+
*
|
|
2322
|
+
* @param {boolean} bold - Bold annotation
|
|
2323
|
+
* @returns {[NodeAnnotationTypeEnum.BOLD, BoldAnnotation]} Map item for the annotation
|
|
2324
|
+
*/
|
|
2325
|
+
static from(bold) {
|
|
2326
|
+
return [exports.NodeAnnotationTypeEnum.BOLD, new BoldAnnotation(bold)];
|
|
2327
|
+
}
|
|
2328
|
+
/**
|
|
2329
|
+
* @inheritDoc
|
|
2330
|
+
*/
|
|
2331
|
+
get isFormattingOnly() {
|
|
2332
|
+
return true;
|
|
2333
|
+
}
|
|
2334
|
+
/**
|
|
2335
|
+
* Generate the JSON representation of the annotation
|
|
2336
|
+
*
|
|
2337
|
+
* @returns {Record<string, unknown>} JSON representation of the annotation
|
|
2338
|
+
*/
|
|
2339
|
+
toJSON() {
|
|
2340
|
+
return {
|
|
2341
|
+
bold: this.bold,
|
|
2342
|
+
};
|
|
2343
|
+
}
|
|
2344
|
+
/**
|
|
2345
|
+
* @inheritDoc
|
|
2346
|
+
*/
|
|
2347
|
+
clone() {
|
|
2348
|
+
return new BoldAnnotation(this.bold);
|
|
2349
|
+
}
|
|
2350
|
+
/**
|
|
2351
|
+
* @inheritDoc
|
|
2352
|
+
*/
|
|
2353
|
+
renderClass(options) {
|
|
2354
|
+
if (options === null || options === void 0 ? void 0 : options.standalone)
|
|
2355
|
+
return null;
|
|
2356
|
+
return this.bold ? 'v-rte--bold' : null;
|
|
2357
|
+
}
|
|
2358
|
+
/**
|
|
2359
|
+
* @inheritDoc
|
|
2360
|
+
*/
|
|
2361
|
+
renderStyle(options) {
|
|
2362
|
+
if (!(options === null || options === void 0 ? void 0 : options.standalone))
|
|
2363
|
+
return null;
|
|
2364
|
+
return this.bold ? { fontWeight: BOLD_FONT_WEIGHT } : null;
|
|
2365
|
+
}
|
|
2366
|
+
}
|
|
2367
|
+
|
|
2368
|
+
/**
|
|
2369
|
+
* Action to toggle bold annotation
|
|
2370
|
+
*/
|
|
2371
|
+
class BoldAnnotationAction extends TextSplittableAction {
|
|
2372
|
+
constructor(bold) {
|
|
2373
|
+
super();
|
|
2374
|
+
this.isFlushable = true;
|
|
2375
|
+
this.bold = bold;
|
|
2376
|
+
}
|
|
2377
|
+
/**
|
|
2378
|
+
* Converts the action to an annotation
|
|
2379
|
+
*
|
|
2380
|
+
* @returns {BoldAnnotation} the annotation
|
|
2381
|
+
*/
|
|
2382
|
+
toAnnotation() {
|
|
2383
|
+
return new BoldAnnotation(this.bold);
|
|
2384
|
+
}
|
|
2385
|
+
}
|
|
2386
|
+
BoldAnnotationAction.typeName = 'BoldAnnotationAction';
|
|
2387
|
+
|
|
2388
|
+
/**
|
|
2389
|
+
* Delete the node annotation by type
|
|
2390
|
+
*/
|
|
2391
|
+
class DeleteNodeAnnotationAction extends AnnotationAction {
|
|
2392
|
+
constructor(annotationType) {
|
|
2393
|
+
super();
|
|
2394
|
+
this.isFlushable = true;
|
|
2395
|
+
this.annotationType = annotationType;
|
|
2396
|
+
}
|
|
2397
|
+
/**
|
|
2398
|
+
* Don't need this for this action
|
|
2399
|
+
*
|
|
2400
|
+
* @returns {Nullable<Annotation>} undefined
|
|
2401
|
+
*/
|
|
2402
|
+
toAnnotation() {
|
|
2403
|
+
return undefined;
|
|
2404
|
+
}
|
|
2405
|
+
}
|
|
2406
|
+
DeleteNodeAnnotationAction.typeName = 'DeleteNodeAnnotationAction';
|
|
2407
|
+
|
|
2408
|
+
/**
|
|
2409
|
+
* The base action handle strategy class, use to modify the rich text node content or modify the annotation.
|
|
2410
|
+
*/
|
|
2411
|
+
class ActionHandleStrategy {
|
|
2412
|
+
/**
|
|
2413
|
+
* Public method to invoke the handle logic.
|
|
2414
|
+
*
|
|
2415
|
+
* @typedef R generic type
|
|
2416
|
+
* @param {ModifyContentAction | AnnotationAction} action - The action instance. Contains the action type and necessary params.
|
|
2417
|
+
* @param {RTENode | RTEBlock | VegaRTEContent} target - The rich text node instance that will be modified.
|
|
2418
|
+
* @returns {R} - The invoke result in special strategy.
|
|
2419
|
+
*/
|
|
2420
|
+
execute(action, target) {
|
|
2421
|
+
const actionType = action instanceof ModifyContentAction ? action.type : action.typeName;
|
|
2422
|
+
globalSlimmerRegistry.LogUtility.log(`Executing action ${actionType} on ${target.typeName} ${target['id']}`);
|
|
2423
|
+
return this.handleAction(action, target);
|
|
2424
|
+
}
|
|
2425
|
+
/**
|
|
2426
|
+
* Update the custom style annotation of a block or node
|
|
2427
|
+
*
|
|
2428
|
+
* @param {RTEBlock | RTETextNode} item - block or node
|
|
2429
|
+
* @param {string[]} styleKeys - custom style keys, for examples ['fontSize', 'fontWeight'].
|
|
2430
|
+
*/
|
|
2431
|
+
updateCustomStyleAnnotation(item, styleKeys) {
|
|
2432
|
+
const customStyleAnnotation = item.annotationMap.get(exports.CommonAnnotationTypeEnum.CUSTOM_STYLE);
|
|
2433
|
+
if (customStyleAnnotation && this.isCustomStyle(customStyleAnnotation, styleKeys)) {
|
|
2434
|
+
item.annotationMap.set(customStyleAnnotation.type, new CustomStyleAnnotation(customStyleAnnotation.removeStyles(styleKeys)));
|
|
2435
|
+
}
|
|
2436
|
+
}
|
|
2437
|
+
/**
|
|
2438
|
+
* Create a new paragraph block with the given text.
|
|
2439
|
+
*
|
|
2440
|
+
* @param {string} text - The text content for the new paragraph.
|
|
2441
|
+
* @returns {Nullable<RTETextBlock>} - The newly created paragraph block, or null if creation failed.
|
|
2442
|
+
*/
|
|
2443
|
+
createNewParagraph(text) {
|
|
2444
|
+
const dtoClass = RTEDTOClassManager$1.getRTEBlockClass('paragraph');
|
|
2445
|
+
if (dtoClass) {
|
|
2446
|
+
const newParagraph = dtoClass.from({
|
|
2447
|
+
id: misc.generateUUID(),
|
|
2448
|
+
type: 'paragraph',
|
|
2449
|
+
nodes: [{ id: misc.generateUUID(), type: 'text', text }],
|
|
2450
|
+
});
|
|
2451
|
+
return newParagraph;
|
|
2452
|
+
}
|
|
2453
|
+
}
|
|
2454
|
+
/**
|
|
2455
|
+
* Get the root content from a child block or node.
|
|
2456
|
+
*
|
|
2457
|
+
* @param {RTEBlock | RTENode} child - The child block or node.
|
|
2458
|
+
* @returns {Nullable<VegaRTEContent>} The root content, if found.
|
|
2459
|
+
*/
|
|
2460
|
+
getRootContent(child) {
|
|
2461
|
+
const parent = child.parent;
|
|
2462
|
+
if (parent) {
|
|
2463
|
+
if (parent.typeName === 'VegaRTEContent') {
|
|
2464
|
+
return parent;
|
|
2465
|
+
}
|
|
2466
|
+
else {
|
|
2467
|
+
return this.getRootContent(parent);
|
|
2468
|
+
}
|
|
2469
|
+
}
|
|
2470
|
+
}
|
|
2471
|
+
/**
|
|
2472
|
+
* Check the caret position at the start of a block.
|
|
2473
|
+
*
|
|
2474
|
+
* @param {RTEBlock} block - The RTE Block.
|
|
2475
|
+
* @param {RTENode} node - The RTE Node.
|
|
2476
|
+
* @param {number} offset - The offset position.
|
|
2477
|
+
* @returns {boolean} - Whether the caret is at the start of the block.
|
|
2478
|
+
*/
|
|
2479
|
+
isCaretPositionAtBlockStart(block, node, offset) {
|
|
2480
|
+
return node === block.children[0] && offset === 0;
|
|
2481
|
+
}
|
|
2482
|
+
/**
|
|
2483
|
+
* Check the caret position at the end of a block.
|
|
2484
|
+
*
|
|
2485
|
+
* @param {RTEBlock} block - The RTE Block.
|
|
2486
|
+
* @param {RTENode} node - The RTE Node.
|
|
2487
|
+
* @param {number} offset - The offset position.
|
|
2488
|
+
* @returns {boolean} - Whether the caret is at the end of the block.
|
|
2489
|
+
*/
|
|
2490
|
+
isCaretPositionAtBlockEnd(block, node, offset) {
|
|
2491
|
+
if (!node.isContentEditable()) {
|
|
2492
|
+
return this.isCaretPositionAtDecoratorBlockEnd(block, node, offset);
|
|
2493
|
+
}
|
|
2494
|
+
else {
|
|
2495
|
+
return this.isCaretPositionAtTextBlockEnd(block, node, offset);
|
|
2496
|
+
}
|
|
2497
|
+
}
|
|
2498
|
+
/**
|
|
2499
|
+
* Get the registered DOM element by the RTE entity.
|
|
2500
|
+
*
|
|
2501
|
+
* @param {RTEBlock | RTENode} instance - The RTE block or node instance.
|
|
2502
|
+
* @returns {Nullable<HTMLElement>} The registered DOM element.
|
|
2503
|
+
*/
|
|
2504
|
+
getDOMByEntity(instance) {
|
|
2505
|
+
return stateEntityRenderingRegistry.getDOMByEntity(instance);
|
|
2506
|
+
}
|
|
2507
|
+
/**
|
|
2508
|
+
* Checks if the caret position is at the end of a specified RTETextNode.
|
|
2509
|
+
*
|
|
2510
|
+
* @param {RTETextBlock} textBlock - `RTETextBlock` - a text block.
|
|
2511
|
+
* @param {RTETextNode} node - `RTETextNode` - a node representing an image in a rich text editor.
|
|
2512
|
+
* @param {number} startOffset - The position within the text node where the caret is located.
|
|
2513
|
+
* @returns {boolean} a boolean value, which indicates whether the caret position is at the start of the RTETextNode.
|
|
2514
|
+
*/
|
|
2515
|
+
isCaretPositionAtTextBlockEnd(textBlock, node, startOffset) {
|
|
2516
|
+
const lastNode = textBlock.children[textBlock.children.length - 1];
|
|
2517
|
+
return node === lastNode && (node.isEmpty() || startOffset === lastNode.text.length);
|
|
2518
|
+
}
|
|
2519
|
+
/**
|
|
2520
|
+
* Checks if the caret position is at the end of a given decorator node.
|
|
2521
|
+
*
|
|
2522
|
+
* @param {RTEBlock} target - The image block.
|
|
2523
|
+
* @param {RTENode} node - `node` is a RTEDecoratorNode or non-editable text node.
|
|
2524
|
+
* @param {number} startOffset - The position within the `RTEDecoratorNode` where the caret is located.
|
|
2525
|
+
* @returns {boolean}Returns a boolean value indicating whether the caret position is at the end of the `RTEDecoratorNode`.
|
|
2526
|
+
*/
|
|
2527
|
+
isCaretPositionAtDecoratorBlockEnd(target, node, startOffset) {
|
|
2528
|
+
return node === target.children[target.children.length - 1] && startOffset !== 0;
|
|
2529
|
+
}
|
|
2530
|
+
/**
|
|
2531
|
+
* Determines if the custom style annotation includes any the custom style.
|
|
2532
|
+
*
|
|
2533
|
+
* @param {CustomStyleAnnotation} customStyleAnnotation - custom style annotation
|
|
2534
|
+
* @param {string[]} styleKeys - custom style keys, for examples ['fontSize', 'fontWeight'].
|
|
2535
|
+
* @returns {boolean} - True if the custom key includes the custom style, false otherwise.
|
|
2536
|
+
*/
|
|
2537
|
+
isCustomStyle(customStyleAnnotation, styleKeys) {
|
|
2538
|
+
return styleKeys.some((item) => Object.keys(customStyleAnnotation.customStyle).includes(item));
|
|
2539
|
+
}
|
|
2540
|
+
}
|
|
2541
|
+
|
|
2542
|
+
/**
|
|
2543
|
+
* Update the text block text style strategy.
|
|
2544
|
+
*/
|
|
2545
|
+
class BlockUpdateTextStyleStrategy extends ActionHandleStrategy {
|
|
2546
|
+
/**
|
|
2547
|
+
* Update the text block type and add or remove the bold style from child nodes.
|
|
2548
|
+
*
|
|
2549
|
+
* @param {TextStyleAnnotationAction} action - The text style annotation action.
|
|
2550
|
+
* @param {RTETextBlock} target - The current text block.
|
|
2551
|
+
*/
|
|
2552
|
+
handleAction(action, target) {
|
|
2553
|
+
if (target.type !== 'list-item') {
|
|
2554
|
+
target.type = action.textStyle;
|
|
2555
|
+
}
|
|
2556
|
+
if (action.bold) {
|
|
2557
|
+
target.children.forEach((node) => {
|
|
2558
|
+
const boldAnnotationAction = new BoldAnnotationAction(true);
|
|
2559
|
+
boldAnnotationAction.doSplit = false;
|
|
2560
|
+
node.apply(boldAnnotationAction);
|
|
2561
|
+
});
|
|
2562
|
+
}
|
|
2563
|
+
else {
|
|
2564
|
+
target.children.forEach((node) => {
|
|
2565
|
+
node.apply(new DeleteNodeAnnotationAction(exports.NodeAnnotationTypeEnum.BOLD));
|
|
2566
|
+
});
|
|
2567
|
+
}
|
|
2568
|
+
this.updateCustomStyleAnnotation(target, ['fontFamily', 'lineHeight', 'fontWeight', 'fontSize']);
|
|
2569
|
+
}
|
|
2570
|
+
}
|
|
2571
|
+
|
|
2572
|
+
/**
|
|
2573
|
+
* Update the text block link group annotation strategy.
|
|
2574
|
+
*/
|
|
2575
|
+
class BlockUpdateLinkGroupStrategy extends ActionHandleStrategy {
|
|
2576
|
+
/**
|
|
2577
|
+
* Update link group after the child link node update.
|
|
2578
|
+
*
|
|
2579
|
+
* @param {LinkGroupAnnotationAction} action - The link group annotation action instance.
|
|
2580
|
+
* @param {RTETextBlock} target - The current text block.
|
|
2581
|
+
*/
|
|
2582
|
+
handleAction(action, target) {
|
|
2583
|
+
let linkGroupAnnotation = target.getAnnotationByType(exports.InternalAnnotationTypeEnum.LINK_GROUP);
|
|
2584
|
+
if (action.type === 'update_link') {
|
|
2585
|
+
if (linkGroupAnnotation) {
|
|
2586
|
+
const linkGroup = linkGroupAnnotation.linkGroups.get(action.groupKey);
|
|
2587
|
+
if (linkGroup) {
|
|
2588
|
+
linkGroupAnnotation.linkGroups.set(action.groupKey, [linkGroup[0]]);
|
|
2589
|
+
}
|
|
2590
|
+
}
|
|
2591
|
+
}
|
|
2592
|
+
else {
|
|
2593
|
+
if (linkGroupAnnotation) {
|
|
2594
|
+
const linkGroup = linkGroupAnnotation.linkGroups.get(action.groupKey) || [];
|
|
2595
|
+
linkGroupAnnotation.linkGroups.set(action.groupKey, [...linkGroup, ...action.nodes]);
|
|
2596
|
+
}
|
|
2597
|
+
else {
|
|
2598
|
+
linkGroupAnnotation = action.toAnnotation();
|
|
2599
|
+
linkGroupAnnotation.linkGroups.set(action.groupKey, [...action.nodes]);
|
|
2600
|
+
}
|
|
2601
|
+
target.annotationMap.set(exports.InternalAnnotationTypeEnum.LINK_GROUP, linkGroupAnnotation);
|
|
2602
|
+
}
|
|
2603
|
+
}
|
|
2604
|
+
}
|
|
2605
|
+
|
|
2606
|
+
/**
|
|
2607
|
+
* Insert a new children after a existing children
|
|
2608
|
+
*
|
|
2609
|
+
* @example parent.apply(new InsertChildrenAfterAction(existingChildren, newChildren, ...))
|
|
2610
|
+
*/
|
|
2611
|
+
class InsertChildrenAfterAction extends ModifyContentAction {
|
|
2612
|
+
constructor(referBlock, ...blocksToBeInserted) {
|
|
2613
|
+
super();
|
|
2614
|
+
this.type = exports.ModifyContentActionType.INSERT_CHILDREN_AFTER;
|
|
2615
|
+
this.referChildren = referBlock;
|
|
2616
|
+
this.childrenToBeInserted = blocksToBeInserted;
|
|
2617
|
+
}
|
|
2618
|
+
}
|
|
2619
|
+
|
|
2620
|
+
/**
|
|
2621
|
+
* Clear the current block nodes and append new nodes
|
|
2622
|
+
*
|
|
2623
|
+
* @example block.apply(new ReplaceChildNodesAction(newNodes))
|
|
2624
|
+
*/
|
|
2625
|
+
class ReplaceChildNodesAction extends ModifyContentAction {
|
|
2626
|
+
constructor(newChildNodes) {
|
|
2627
|
+
super();
|
|
2628
|
+
this.type = exports.ModifyContentActionType.REPLACE_CHILD_NODES;
|
|
2629
|
+
this.newChildNodes = newChildNodes;
|
|
2630
|
+
}
|
|
2631
|
+
}
|
|
2632
|
+
|
|
2633
|
+
/**
|
|
2634
|
+
* Split the current node with a special position strategy.
|
|
2635
|
+
*/
|
|
2636
|
+
class BlockSplitWithTextNodeStrategy extends ActionHandleStrategy {
|
|
2637
|
+
/**
|
|
2638
|
+
* @inheritDoc
|
|
2639
|
+
*/
|
|
2640
|
+
handleAction(action, target) {
|
|
2641
|
+
action.newBlock = this.splitTextNodeBlock(action.splitPointNode, action.startOffsetOfNode, target);
|
|
2642
|
+
}
|
|
2643
|
+
/**
|
|
2644
|
+
* Splits a text node at a specified offset within a block of nodes and returns a new block with the split nodes.
|
|
2645
|
+
*
|
|
2646
|
+
* @param {RTETextNode} splitNode - The text node that will be split
|
|
2647
|
+
* @param {number} startOffsetOfNode - The index at which will split the text content of the `splitNode`.
|
|
2648
|
+
* @param {RTETextBlock} textBlock - The text block need to be splited.
|
|
2649
|
+
* @returns {Nullable<RTEBlock>} return either an RTEBlock object or null.
|
|
2650
|
+
*/
|
|
2651
|
+
splitTextNodeBlock(splitNode, startOffsetOfNode, textBlock) {
|
|
2652
|
+
if (splitNode) {
|
|
2653
|
+
const beforeText = splitNode.text.slice(0, startOffsetOfNode);
|
|
2654
|
+
const afterText = splitNode.text.slice(startOffsetOfNode);
|
|
2655
|
+
const nodesSplitIndex = textBlock.children.indexOf(splitNode);
|
|
2656
|
+
if (nodesSplitIndex > -1) {
|
|
2657
|
+
const beforeNodes = textBlock.children.slice(0, nodesSplitIndex);
|
|
2658
|
+
const afterNodes = textBlock.children.slice(nodesSplitIndex + 1);
|
|
2659
|
+
if (splitNode.isContentEditable()) {
|
|
2660
|
+
if (beforeText) {
|
|
2661
|
+
beforeNodes.push(splitNode.cloneWithText(beforeText));
|
|
2662
|
+
}
|
|
2663
|
+
if (afterText) {
|
|
2664
|
+
afterNodes.unshift(splitNode.cloneWithText(afterText));
|
|
2665
|
+
}
|
|
2666
|
+
}
|
|
2667
|
+
else {
|
|
2668
|
+
startOffsetOfNode > 0 ? beforeNodes.push(splitNode) : afterNodes.unshift(splitNode);
|
|
2669
|
+
}
|
|
2670
|
+
textBlock.apply(new ReplaceChildNodesAction(beforeNodes));
|
|
2671
|
+
const newBlock = textBlock.cloneWithNodes(afterNodes);
|
|
2672
|
+
textBlock.parent.apply(new InsertChildrenAfterAction(textBlock, newBlock));
|
|
2673
|
+
return newBlock;
|
|
2674
|
+
}
|
|
2675
|
+
}
|
|
2676
|
+
}
|
|
2677
|
+
}
|
|
2678
|
+
|
|
2679
|
+
/**
|
|
2680
|
+
* Remove all nodes and append new nodes strategy.
|
|
2681
|
+
*/
|
|
2682
|
+
class BlockReplaceNodesStrategy extends ActionHandleStrategy {
|
|
2683
|
+
/**
|
|
2684
|
+
* Empty the text block or image block nodes and add new nodes.
|
|
2685
|
+
*
|
|
2686
|
+
* @param {ReplaceChildNodesAction} action - The replace child nodes action instance.
|
|
2687
|
+
* @param {RTETextBlock | RTEImageBlock} target - The text block or the image block.
|
|
2688
|
+
*/
|
|
2689
|
+
handleAction(action, target) {
|
|
2690
|
+
target.children = [];
|
|
2691
|
+
target.apply(new AppendChildrenAction(action.newChildNodes));
|
|
2692
|
+
}
|
|
2693
|
+
}
|
|
2694
|
+
|
|
2695
|
+
/**
|
|
2696
|
+
* Remove a children from the current block
|
|
2697
|
+
*
|
|
2698
|
+
* @example needRemovedChildren.parent.apply(new RemoveChildrenAction(needRemovedChildren))
|
|
2699
|
+
*/
|
|
2700
|
+
class RemoveChildrenAction extends ModifyContentAction {
|
|
2701
|
+
constructor(childNode) {
|
|
2702
|
+
super();
|
|
2703
|
+
this.type = exports.ModifyContentActionType.DELETE_CHILDREN;
|
|
2704
|
+
this.entityToBeRemoved = childNode;
|
|
2705
|
+
}
|
|
2706
|
+
}
|
|
2707
|
+
|
|
2708
|
+
/**
|
|
2709
|
+
* Annotation to represent a selection range
|
|
2710
|
+
*/
|
|
2711
|
+
class SelectionRangeAnnotation extends Annotation {
|
|
2712
|
+
constructor(range) {
|
|
2713
|
+
super();
|
|
2714
|
+
this.type = exports.InternalAnnotationTypeEnum.SELECTION_RANGE;
|
|
2715
|
+
this.range = range;
|
|
2716
|
+
}
|
|
2717
|
+
/**
|
|
2718
|
+
* @inheritDoc
|
|
2719
|
+
*/
|
|
2720
|
+
get isFormattingOnly() {
|
|
2721
|
+
return true;
|
|
2722
|
+
}
|
|
2723
|
+
/**
|
|
2724
|
+
* Clone the selection range annotation
|
|
2725
|
+
*
|
|
2726
|
+
* @returns {SelectionRangeAnnotation} A cloned instance of the selection range annotation
|
|
2727
|
+
*/
|
|
2728
|
+
clone() {
|
|
2729
|
+
return new SelectionRangeAnnotation(this.range);
|
|
2730
|
+
}
|
|
2731
|
+
}
|
|
2732
|
+
|
|
2733
|
+
/**
|
|
2734
|
+
* Annotation to make text with strikethrough
|
|
2735
|
+
*/
|
|
2736
|
+
class StrikethroughAnnotation extends NodeAnnotation {
|
|
2737
|
+
constructor(underline) {
|
|
2738
|
+
super();
|
|
2739
|
+
this.type = exports.NodeAnnotationTypeEnum.STRIKETHROUGH;
|
|
2740
|
+
this.strikethrough = underline;
|
|
2741
|
+
}
|
|
2742
|
+
/**
|
|
2743
|
+
* Generate the map item for the annotation
|
|
2744
|
+
*
|
|
2745
|
+
* @param {Nullable<boolean>} strikethrough - Strikethrough annotation
|
|
2746
|
+
* @returns {[NodeAnnotationTypeEnum.STRIKETHROUGH, StrikethroughAnnotation]} Map item for the annotation
|
|
2747
|
+
*/
|
|
2748
|
+
static from(strikethrough) {
|
|
2749
|
+
return [exports.NodeAnnotationTypeEnum.STRIKETHROUGH, new StrikethroughAnnotation(strikethrough)];
|
|
2750
|
+
}
|
|
2751
|
+
/**
|
|
2752
|
+
* @inheritDoc
|
|
2753
|
+
*/
|
|
2754
|
+
get isFormattingOnly() {
|
|
2755
|
+
return true;
|
|
2272
2756
|
}
|
|
2273
2757
|
/**
|
|
2274
2758
|
* Generate the JSON representation of the annotation
|
|
@@ -2277,14 +2761,14 @@ class BoldAnnotation extends NodeAnnotation {
|
|
|
2277
2761
|
*/
|
|
2278
2762
|
toJSON() {
|
|
2279
2763
|
return {
|
|
2280
|
-
|
|
2764
|
+
strikethrough: this.strikethrough,
|
|
2281
2765
|
};
|
|
2282
2766
|
}
|
|
2283
2767
|
/**
|
|
2284
2768
|
* @inheritDoc
|
|
2285
2769
|
*/
|
|
2286
2770
|
clone() {
|
|
2287
|
-
return new
|
|
2771
|
+
return new StrikethroughAnnotation(this.strikethrough);
|
|
2288
2772
|
}
|
|
2289
2773
|
/**
|
|
2290
2774
|
* @inheritDoc
|
|
@@ -2292,7 +2776,7 @@ class BoldAnnotation extends NodeAnnotation {
|
|
|
2292
2776
|
renderClass(options) {
|
|
2293
2777
|
if (options === null || options === void 0 ? void 0 : options.standalone)
|
|
2294
2778
|
return null;
|
|
2295
|
-
return this.
|
|
2779
|
+
return this.strikethrough ? 'v-rte--strikethrough' : null;
|
|
2296
2780
|
}
|
|
2297
2781
|
/**
|
|
2298
2782
|
* @inheritDoc
|
|
@@ -2300,7 +2784,123 @@ class BoldAnnotation extends NodeAnnotation {
|
|
|
2300
2784
|
renderStyle(options) {
|
|
2301
2785
|
if (!(options === null || options === void 0 ? void 0 : options.standalone))
|
|
2302
2786
|
return null;
|
|
2303
|
-
return this.
|
|
2787
|
+
return this.strikethrough ? { textDecoration: STRIKETHROUGH_TEXT_DECORATION } : null;
|
|
2788
|
+
}
|
|
2789
|
+
}
|
|
2790
|
+
|
|
2791
|
+
/**
|
|
2792
|
+
* Annotation to make text with underline
|
|
2793
|
+
*/
|
|
2794
|
+
class UnderlineAnnotation extends NodeAnnotation {
|
|
2795
|
+
constructor(underline) {
|
|
2796
|
+
super();
|
|
2797
|
+
this.type = exports.NodeAnnotationTypeEnum.UNDERLINE;
|
|
2798
|
+
this.underline = underline;
|
|
2799
|
+
}
|
|
2800
|
+
/**
|
|
2801
|
+
* Generate the map item for the annotation
|
|
2802
|
+
*
|
|
2803
|
+
* @param {boolean} underline - Underline annotation
|
|
2804
|
+
* @returns {[NodeAnnotationTypeEnum.UNDERLINE, UnderlineAnnotation]} Map item for the annotation
|
|
2805
|
+
*/
|
|
2806
|
+
static from(underline) {
|
|
2807
|
+
return [exports.NodeAnnotationTypeEnum.UNDERLINE, new UnderlineAnnotation(underline)];
|
|
2808
|
+
}
|
|
2809
|
+
/**
|
|
2810
|
+
* @inheritDoc
|
|
2811
|
+
*/
|
|
2812
|
+
get isFormattingOnly() {
|
|
2813
|
+
return true;
|
|
2814
|
+
}
|
|
2815
|
+
/**
|
|
2816
|
+
* Generate the JSON representation of the annotation
|
|
2817
|
+
*
|
|
2818
|
+
* @returns {Record<string, unknown>} JSON representation of the annotation
|
|
2819
|
+
*/
|
|
2820
|
+
toJSON() {
|
|
2821
|
+
return {
|
|
2822
|
+
underline: this.underline,
|
|
2823
|
+
};
|
|
2824
|
+
}
|
|
2825
|
+
/**
|
|
2826
|
+
* @inheritDoc
|
|
2827
|
+
*/
|
|
2828
|
+
clone() {
|
|
2829
|
+
return new UnderlineAnnotation(this.underline);
|
|
2830
|
+
}
|
|
2831
|
+
/**
|
|
2832
|
+
* @inheritDoc
|
|
2833
|
+
*/
|
|
2834
|
+
renderClass(options) {
|
|
2835
|
+
if (options === null || options === void 0 ? void 0 : options.standalone)
|
|
2836
|
+
return null;
|
|
2837
|
+
return this.underline ? 'v-rte--underline' : null;
|
|
2838
|
+
}
|
|
2839
|
+
/**
|
|
2840
|
+
* @inheritDoc
|
|
2841
|
+
*/
|
|
2842
|
+
renderStyle(options) {
|
|
2843
|
+
if (!(options === null || options === void 0 ? void 0 : options.standalone))
|
|
2844
|
+
return null;
|
|
2845
|
+
return this.underline ? { textDecoration: UNDERLINE_TEXT_DECORATION } : null;
|
|
2846
|
+
}
|
|
2847
|
+
}
|
|
2848
|
+
|
|
2849
|
+
/**
|
|
2850
|
+
* Annotation to make text Italic
|
|
2851
|
+
*/
|
|
2852
|
+
class ItalicAnnotation extends NodeAnnotation {
|
|
2853
|
+
constructor(italic) {
|
|
2854
|
+
super();
|
|
2855
|
+
this.type = exports.NodeAnnotationTypeEnum.ITALIC;
|
|
2856
|
+
this.italic = italic;
|
|
2857
|
+
}
|
|
2858
|
+
/**
|
|
2859
|
+
* Generate the map item for the annotation
|
|
2860
|
+
*
|
|
2861
|
+
* @param {boolean} italic - Italic annotation
|
|
2862
|
+
* @returns {[NodeAnnotationTypeEnum.ITALIC, ItalicAnnotation]} Map item for the annotation
|
|
2863
|
+
*/
|
|
2864
|
+
static from(italic) {
|
|
2865
|
+
return [exports.NodeAnnotationTypeEnum.ITALIC, new ItalicAnnotation(italic)];
|
|
2866
|
+
}
|
|
2867
|
+
/**
|
|
2868
|
+
* @inheritDoc
|
|
2869
|
+
*/
|
|
2870
|
+
get isFormattingOnly() {
|
|
2871
|
+
return true;
|
|
2872
|
+
}
|
|
2873
|
+
/**
|
|
2874
|
+
* Generate the JSON representation of the annotation
|
|
2875
|
+
*
|
|
2876
|
+
* @returns {Record<string, unknown>} JSON representation of the annotation
|
|
2877
|
+
*/
|
|
2878
|
+
toJSON() {
|
|
2879
|
+
return {
|
|
2880
|
+
italic: this.italic,
|
|
2881
|
+
};
|
|
2882
|
+
}
|
|
2883
|
+
/**
|
|
2884
|
+
* @inheritDoc
|
|
2885
|
+
*/
|
|
2886
|
+
clone() {
|
|
2887
|
+
return new ItalicAnnotation(this.italic);
|
|
2888
|
+
}
|
|
2889
|
+
/**
|
|
2890
|
+
* @inheritDoc
|
|
2891
|
+
*/
|
|
2892
|
+
renderClass(options) {
|
|
2893
|
+
if (options === null || options === void 0 ? void 0 : options.standalone)
|
|
2894
|
+
return null;
|
|
2895
|
+
return this.italic ? 'v-rte--italic' : null;
|
|
2896
|
+
}
|
|
2897
|
+
/**
|
|
2898
|
+
* @inheritDoc
|
|
2899
|
+
*/
|
|
2900
|
+
renderStyle(options) {
|
|
2901
|
+
if (!(options === null || options === void 0 ? void 0 : options.standalone))
|
|
2902
|
+
return null;
|
|
2903
|
+
return this.italic ? { fontStyle: ITALIC_FONT_STYLE } : null;
|
|
2304
2904
|
}
|
|
2305
2905
|
}
|
|
2306
2906
|
|
|
@@ -2335,6 +2935,12 @@ class CodeAnnotation extends NodeAnnotation {
|
|
|
2335
2935
|
whiteSpace: CODE_WHITE_SPACE,
|
|
2336
2936
|
};
|
|
2337
2937
|
}
|
|
2938
|
+
/**
|
|
2939
|
+
* @inheritDoc
|
|
2940
|
+
*/
|
|
2941
|
+
get isFormattingOnly() {
|
|
2942
|
+
return true;
|
|
2943
|
+
}
|
|
2338
2944
|
/**
|
|
2339
2945
|
* Generate the JSON representation of the annotation
|
|
2340
2946
|
*
|
|
@@ -2476,108 +3082,44 @@ const RTE_PASTE_MODE_WORD = 'word';
|
|
|
2476
3082
|
const RTE_WORD_COUNT_KEY = 'rte-word-count';
|
|
2477
3083
|
|
|
2478
3084
|
/**
|
|
2479
|
-
* Annotation to make text with text color
|
|
2480
|
-
*/
|
|
2481
|
-
class TextColorAnnotation extends NodeAnnotation {
|
|
2482
|
-
constructor(textColor) {
|
|
2483
|
-
super();
|
|
2484
|
-
this.type = exports.NodeAnnotationTypeEnum.TEXT_COLOR;
|
|
2485
|
-
this.textColor = this.formatTextColor(textColor);
|
|
2486
|
-
}
|
|
2487
|
-
/**
|
|
2488
|
-
* Generate the map item for the annotation
|
|
2489
|
-
*
|
|
2490
|
-
* @param {string} textColor - text color annotation
|
|
2491
|
-
* @returns {[NodeAnnotationTypeEnum.TEXT_COLOR, TextColorAnnotation]} Map item for the annotation
|
|
2492
|
-
*/
|
|
2493
|
-
static from(textColor) {
|
|
2494
|
-
return [exports.NodeAnnotationTypeEnum.TEXT_COLOR, new TextColorAnnotation(textColor)];
|
|
2495
|
-
}
|
|
2496
|
-
/**
|
|
2497
|
-
* Generate the JSON representation of the annotation
|
|
2498
|
-
*
|
|
2499
|
-
* @returns {Record<string, unknown>} JSON representation of the annotation
|
|
2500
|
-
*/
|
|
2501
|
-
toJSON() {
|
|
2502
|
-
return {
|
|
2503
|
-
textColor: this.textColor.key,
|
|
2504
|
-
};
|
|
2505
|
-
}
|
|
2506
|
-
/**
|
|
2507
|
-
* @inheritDoc
|
|
2508
|
-
*/
|
|
2509
|
-
clone() {
|
|
2510
|
-
return new TextColorAnnotation(this.textColor.key);
|
|
2511
|
-
}
|
|
2512
|
-
/**
|
|
2513
|
-
* @inheritDoc
|
|
2514
|
-
*/
|
|
2515
|
-
renderClass() {
|
|
2516
|
-
return null;
|
|
2517
|
-
}
|
|
2518
|
-
/**
|
|
2519
|
-
* @inheritDoc
|
|
2520
|
-
*/
|
|
2521
|
-
renderStyle() {
|
|
2522
|
-
return {
|
|
2523
|
-
color: darkModeStyleController.VegaInternalThemeManager.isDarkMode() ? this.textColor.dark : this.textColor.light,
|
|
2524
|
-
};
|
|
2525
|
-
}
|
|
2526
|
-
/**
|
|
2527
|
-
* format text color
|
|
2528
|
-
*
|
|
2529
|
-
* @param {string} textColor - text color
|
|
2530
|
-
* @returns {VegaRTEColorSchema} - VegaRTEColorSchema
|
|
2531
|
-
*/
|
|
2532
|
-
formatTextColor(textColor) {
|
|
2533
|
-
return (RTE_TEXT_COLORS.find((item) => item.key === textColor) || RTE_TEXT_COLORS[0]);
|
|
2534
|
-
}
|
|
2535
|
-
}
|
|
2536
|
-
|
|
2537
|
-
/**
|
|
2538
|
-
* Annotation to make text a link
|
|
3085
|
+
* Annotation to make text with text color
|
|
2539
3086
|
*/
|
|
2540
|
-
class
|
|
2541
|
-
constructor(
|
|
3087
|
+
class TextColorAnnotation extends NodeAnnotation {
|
|
3088
|
+
constructor(textColor) {
|
|
2542
3089
|
super();
|
|
2543
|
-
this.type = exports.NodeAnnotationTypeEnum.
|
|
2544
|
-
this.
|
|
2545
|
-
this.useInternalStyle = useInternalStyle;
|
|
3090
|
+
this.type = exports.NodeAnnotationTypeEnum.TEXT_COLOR;
|
|
3091
|
+
this.textColor = this.formatTextColor(textColor);
|
|
2546
3092
|
}
|
|
2547
3093
|
/**
|
|
2548
3094
|
* Generate the map item for the annotation
|
|
2549
3095
|
*
|
|
2550
|
-
* @param {
|
|
2551
|
-
* @
|
|
2552
|
-
* @returns {[NodeAnnotationTypeEnum.LINK, LinkAnnotation]} Map item for the annotation
|
|
3096
|
+
* @param {string} textColor - text color annotation
|
|
3097
|
+
* @returns {[NodeAnnotationTypeEnum.TEXT_COLOR, TextColorAnnotation]} Map item for the annotation
|
|
2553
3098
|
*/
|
|
2554
|
-
static from(
|
|
2555
|
-
return [exports.NodeAnnotationTypeEnum.
|
|
3099
|
+
static from(textColor) {
|
|
3100
|
+
return [exports.NodeAnnotationTypeEnum.TEXT_COLOR, new TextColorAnnotation(textColor)];
|
|
3101
|
+
}
|
|
3102
|
+
/**
|
|
3103
|
+
* @inheritDoc
|
|
3104
|
+
*/
|
|
3105
|
+
get isFormattingOnly() {
|
|
3106
|
+
return true;
|
|
2556
3107
|
}
|
|
2557
3108
|
/**
|
|
2558
3109
|
* Generate the JSON representation of the annotation
|
|
2559
3110
|
*
|
|
2560
|
-
* @returns {Record<
|
|
3111
|
+
* @returns {Record<string, unknown>} JSON representation of the annotation
|
|
2561
3112
|
*/
|
|
2562
3113
|
toJSON() {
|
|
2563
3114
|
return {
|
|
2564
|
-
|
|
3115
|
+
textColor: this.textColor.key,
|
|
2565
3116
|
};
|
|
2566
3117
|
}
|
|
2567
3118
|
/**
|
|
2568
3119
|
* @inheritDoc
|
|
2569
3120
|
*/
|
|
2570
3121
|
clone() {
|
|
2571
|
-
return new
|
|
2572
|
-
}
|
|
2573
|
-
/**
|
|
2574
|
-
* Verify whether two link annotation is same or not
|
|
2575
|
-
*
|
|
2576
|
-
* @param {LinkAnnotation} annotation - Compared annotation
|
|
2577
|
-
* @returns {boolean} Whether two link annotation is same or not
|
|
2578
|
-
*/
|
|
2579
|
-
toEqual(annotation) {
|
|
2580
|
-
return this.link.groupKey === annotation.link.groupKey;
|
|
3122
|
+
return new TextColorAnnotation(this.textColor.key);
|
|
2581
3123
|
}
|
|
2582
3124
|
/**
|
|
2583
3125
|
* @inheritDoc
|
|
@@ -2589,28 +3131,18 @@ class LinkAnnotation extends NodeAnnotation {
|
|
|
2589
3131
|
* @inheritDoc
|
|
2590
3132
|
*/
|
|
2591
3133
|
renderStyle() {
|
|
2592
|
-
return
|
|
2593
|
-
|
|
2594
|
-
}
|
|
2595
|
-
|
|
2596
|
-
/**
|
|
2597
|
-
* Action to link a group of nodes
|
|
2598
|
-
*/
|
|
2599
|
-
class LinkGroupAnnotationAction extends AnnotationAction {
|
|
2600
|
-
constructor(groupKey, nodes, type) {
|
|
2601
|
-
super();
|
|
2602
|
-
this.isFlushable = false;
|
|
2603
|
-
this.groupKey = groupKey;
|
|
2604
|
-
this.nodes = nodes;
|
|
2605
|
-
this.type = type;
|
|
3134
|
+
return {
|
|
3135
|
+
color: darkModeStyleController.VegaInternalThemeManager.isDarkMode() ? this.textColor.dark : this.textColor.light,
|
|
3136
|
+
};
|
|
2606
3137
|
}
|
|
2607
3138
|
/**
|
|
2608
|
-
*
|
|
3139
|
+
* format text color
|
|
2609
3140
|
*
|
|
2610
|
-
* @
|
|
3141
|
+
* @param {string} textColor - text color
|
|
3142
|
+
* @returns {VegaRTEColorSchema} - VegaRTEColorSchema
|
|
2611
3143
|
*/
|
|
2612
|
-
|
|
2613
|
-
return
|
|
3144
|
+
formatTextColor(textColor) {
|
|
3145
|
+
return (RTE_TEXT_COLORS.find((item) => item.key === textColor) || RTE_TEXT_COLORS[0]);
|
|
2614
3146
|
}
|
|
2615
3147
|
}
|
|
2616
3148
|
|
|
@@ -2631,139 +3163,7 @@ class SyncUpSelectionAction extends AnnotationAction {
|
|
|
2631
3163
|
return null;
|
|
2632
3164
|
}
|
|
2633
3165
|
}
|
|
2634
|
-
|
|
2635
|
-
/**
|
|
2636
|
-
* The base action handle strategy class, use to modify the rich text node content or modify the annotation.
|
|
2637
|
-
*/
|
|
2638
|
-
class ActionHandleStrategy {
|
|
2639
|
-
/**
|
|
2640
|
-
* Public method to invoke the handle logic.
|
|
2641
|
-
*
|
|
2642
|
-
* @typedef R generic type
|
|
2643
|
-
* @param {ModifyContentAction | AnnotationAction} action - The action instance. Contains the action type and necessary params.
|
|
2644
|
-
* @param {RTENode | RTEBlock | VegaRTEContent} target - The rich text node instance that will be modified.
|
|
2645
|
-
* @returns {R} - The invoke result in special strategy.
|
|
2646
|
-
*/
|
|
2647
|
-
execute(action, target) {
|
|
2648
|
-
globalSlimmerRegistry.LogUtility.log(`Executing action ${action.constructor.name} on ${target.constructor.name} ${target['id']}`);
|
|
2649
|
-
return this.handleAction(action, target);
|
|
2650
|
-
}
|
|
2651
|
-
/**
|
|
2652
|
-
* Update the custom style annotation of a block or node
|
|
2653
|
-
*
|
|
2654
|
-
* @param {RTEBlock | RTETextNode} item - block or node
|
|
2655
|
-
* @param {string[]} styleKeys - custom style keys, for examples ['fontSize', 'fontWeight'].
|
|
2656
|
-
*/
|
|
2657
|
-
updateCustomStyleAnnotation(item, styleKeys) {
|
|
2658
|
-
const customStyleAnnotation = item.annotationMap.get(exports.CommonAnnotationTypeEnum.CUSTOM_STYLE);
|
|
2659
|
-
if (customStyleAnnotation && this.isCustomStyle(customStyleAnnotation, styleKeys)) {
|
|
2660
|
-
item.annotationMap.set(customStyleAnnotation.type, new CustomStyleAnnotation(customStyleAnnotation.removeStyles(styleKeys)));
|
|
2661
|
-
}
|
|
2662
|
-
}
|
|
2663
|
-
/**
|
|
2664
|
-
* Create a new paragraph block with the given text.
|
|
2665
|
-
*
|
|
2666
|
-
* @param {string} text - The text content for the new paragraph.
|
|
2667
|
-
* @returns {Nullable<RTETextBlock>} - The newly created paragraph block, or null if creation failed.
|
|
2668
|
-
*/
|
|
2669
|
-
createNewParagraph(text) {
|
|
2670
|
-
const dtoClass = RTEDTOClassManager$1.getRTEBlockClass('paragraph');
|
|
2671
|
-
if (dtoClass) {
|
|
2672
|
-
const newParagraph = dtoClass.from({
|
|
2673
|
-
id: misc.generateUUID(),
|
|
2674
|
-
type: 'paragraph',
|
|
2675
|
-
nodes: [{ id: misc.generateUUID(), type: 'text', text }],
|
|
2676
|
-
});
|
|
2677
|
-
return newParagraph;
|
|
2678
|
-
}
|
|
2679
|
-
}
|
|
2680
|
-
/**
|
|
2681
|
-
* Get the root content from a child block or node.
|
|
2682
|
-
*
|
|
2683
|
-
* @param {RTEBlock | RTENode} child - The child block or node.
|
|
2684
|
-
* @returns {Nullable<VegaRTEContent>} The root content, if found.
|
|
2685
|
-
*/
|
|
2686
|
-
getRootContent(child) {
|
|
2687
|
-
const parent = child.parent;
|
|
2688
|
-
if (parent) {
|
|
2689
|
-
if (parent.dtoName === 'VegaRTEContent') {
|
|
2690
|
-
return parent;
|
|
2691
|
-
}
|
|
2692
|
-
else {
|
|
2693
|
-
return this.getRootContent(parent);
|
|
2694
|
-
}
|
|
2695
|
-
}
|
|
2696
|
-
}
|
|
2697
|
-
/**
|
|
2698
|
-
* Check the caret position at the start of a block.
|
|
2699
|
-
*
|
|
2700
|
-
* @param {RTEBlock} block - The RTE Block.
|
|
2701
|
-
* @param {RTENode} node - The RTE Node.
|
|
2702
|
-
* @param {number} offset - The offset position.
|
|
2703
|
-
* @returns {boolean} - Whether the caret is at the start of the block.
|
|
2704
|
-
*/
|
|
2705
|
-
isCaretPositionAtBlockStart(block, node, offset) {
|
|
2706
|
-
return node === block.children[0] && offset === 0;
|
|
2707
|
-
}
|
|
2708
|
-
/**
|
|
2709
|
-
* Check the caret position at the end of a block.
|
|
2710
|
-
*
|
|
2711
|
-
* @param {RTEBlock} block - The RTE Block.
|
|
2712
|
-
* @param {RTENode} node - The RTE Node.
|
|
2713
|
-
* @param {number} offset - The offset position.
|
|
2714
|
-
* @returns {boolean} - Whether the caret is at the end of the block.
|
|
2715
|
-
*/
|
|
2716
|
-
isCaretPositionAtBlockEnd(block, node, offset) {
|
|
2717
|
-
if (!node.isContentEditable()) {
|
|
2718
|
-
return this.isCaretPositionAtDecoratorBlockEnd(block, node, offset);
|
|
2719
|
-
}
|
|
2720
|
-
else {
|
|
2721
|
-
return this.isCaretPositionAtTextBlockEnd(block, node, offset);
|
|
2722
|
-
}
|
|
2723
|
-
}
|
|
2724
|
-
/**
|
|
2725
|
-
* Get the registered DOM element by the RTE entity.
|
|
2726
|
-
*
|
|
2727
|
-
* @param {RTEBlock | RTENode} instance - The RTE block or node instance.
|
|
2728
|
-
* @returns {Nullable<HTMLElement>} The registered DOM element.
|
|
2729
|
-
*/
|
|
2730
|
-
getDOMByEntity(instance) {
|
|
2731
|
-
return stateEntityRenderingRegistry.getDOMByEntity(instance);
|
|
2732
|
-
}
|
|
2733
|
-
/**
|
|
2734
|
-
* Checks if the caret position is at the end of a specified RTETextNode.
|
|
2735
|
-
*
|
|
2736
|
-
* @param {RTETextBlock} textBlock - `RTETextBlock` - a text block.
|
|
2737
|
-
* @param {RTETextNode} node - `RTETextNode` - a node representing an image in a rich text editor.
|
|
2738
|
-
* @param {number} startOffset - The position within the text node where the caret is located.
|
|
2739
|
-
* @returns {boolean} a boolean value, which indicates whether the caret position is at the start of the RTETextNode.
|
|
2740
|
-
*/
|
|
2741
|
-
isCaretPositionAtTextBlockEnd(textBlock, node, startOffset) {
|
|
2742
|
-
const lastNode = textBlock.children[textBlock.children.length - 1];
|
|
2743
|
-
return node === lastNode && (node.isEmpty() || startOffset === lastNode.text.length);
|
|
2744
|
-
}
|
|
2745
|
-
/**
|
|
2746
|
-
* Checks if the caret position is at the end of a given decorator node.
|
|
2747
|
-
*
|
|
2748
|
-
* @param {RTEBlock} target - The image block.
|
|
2749
|
-
* @param {RTENode} node - `node` is a RTEDecoratorNode or non-editable text node.
|
|
2750
|
-
* @param {number} startOffset - The position within the `RTEDecoratorNode` where the caret is located.
|
|
2751
|
-
* @returns {boolean}Returns a boolean value indicating whether the caret position is at the end of the `RTEDecoratorNode`.
|
|
2752
|
-
*/
|
|
2753
|
-
isCaretPositionAtDecoratorBlockEnd(target, node, startOffset) {
|
|
2754
|
-
return node === target.children[target.children.length - 1] && startOffset !== 0;
|
|
2755
|
-
}
|
|
2756
|
-
/**
|
|
2757
|
-
* Determines if the custom style annotation includes any the custom style.
|
|
2758
|
-
*
|
|
2759
|
-
* @param {CustomStyleAnnotation} customStyleAnnotation - custom style annotation
|
|
2760
|
-
* @param {string[]} styleKeys - custom style keys, for examples ['fontSize', 'fontWeight'].
|
|
2761
|
-
* @returns {boolean} - True if the custom key includes the custom style, false otherwise.
|
|
2762
|
-
*/
|
|
2763
|
-
isCustomStyle(customStyleAnnotation, styleKeys) {
|
|
2764
|
-
return styleKeys.some((item) => Object.keys(customStyleAnnotation.customStyle).includes(item));
|
|
2765
|
-
}
|
|
2766
|
-
}
|
|
3166
|
+
SyncUpSelectionAction.typeName = 'SyncUpSelectionAction';
|
|
2767
3167
|
|
|
2768
3168
|
/**
|
|
2769
3169
|
* Split the corresponding link group nodes *
|
|
@@ -2914,25 +3314,6 @@ class NodeSplitTextStrategy extends ActionHandleStrategy {
|
|
|
2914
3314
|
}
|
|
2915
3315
|
}
|
|
2916
3316
|
|
|
2917
|
-
/**
|
|
2918
|
-
* Action to toggle bold annotation
|
|
2919
|
-
*/
|
|
2920
|
-
class BoldAnnotationAction extends TextSplittableAction {
|
|
2921
|
-
constructor(bold) {
|
|
2922
|
-
super();
|
|
2923
|
-
this.isFlushable = true;
|
|
2924
|
-
this.bold = bold;
|
|
2925
|
-
}
|
|
2926
|
-
/**
|
|
2927
|
-
* Converts the action to an annotation
|
|
2928
|
-
*
|
|
2929
|
-
* @returns {BoldAnnotation} the annotation
|
|
2930
|
-
*/
|
|
2931
|
-
toAnnotation() {
|
|
2932
|
-
return new BoldAnnotation(this.bold);
|
|
2933
|
-
}
|
|
2934
|
-
}
|
|
2935
|
-
|
|
2936
3317
|
/**
|
|
2937
3318
|
* Annotation to host which annotations will be clear formatting
|
|
2938
3319
|
*/
|
|
@@ -2969,6 +3350,7 @@ class ClearFormattingAnnotationAction extends TextSplittableAction {
|
|
|
2969
3350
|
return new ClearFormattingAnnotation();
|
|
2970
3351
|
}
|
|
2971
3352
|
}
|
|
3353
|
+
ClearFormattingAnnotationAction.typeName = 'ClearFormattingAnnotationAction';
|
|
2972
3354
|
|
|
2973
3355
|
/**
|
|
2974
3356
|
* Action to toggle code annotation
|
|
@@ -2988,69 +3370,27 @@ class CodeAnnotationAction extends TextSplittableAction {
|
|
|
2988
3370
|
return new CodeAnnotation(this.code);
|
|
2989
3371
|
}
|
|
2990
3372
|
}
|
|
2991
|
-
|
|
2992
|
-
/**
|
|
2993
|
-
* Delete the node annotation by type
|
|
2994
|
-
*/
|
|
2995
|
-
class DeleteNodeAnnotationAction extends AnnotationAction {
|
|
2996
|
-
constructor(annotationType) {
|
|
2997
|
-
super();
|
|
2998
|
-
this.isFlushable = true;
|
|
2999
|
-
this.annotationType = annotationType;
|
|
3000
|
-
}
|
|
3001
|
-
/**
|
|
3002
|
-
* Don't need this for this action
|
|
3003
|
-
*
|
|
3004
|
-
* @returns {Nullable<Annotation>} undefined
|
|
3005
|
-
*/
|
|
3006
|
-
toAnnotation() {
|
|
3007
|
-
return undefined;
|
|
3008
|
-
}
|
|
3009
|
-
}
|
|
3373
|
+
CodeAnnotationAction.typeName = 'CodeAnnotationAction';
|
|
3010
3374
|
|
|
3011
3375
|
/**
|
|
3012
3376
|
* Action to toggle the italic annotation
|
|
3013
|
-
*/
|
|
3014
|
-
class ItalicAnnotationAction extends TextSplittableAction {
|
|
3015
|
-
constructor(italic) {
|
|
3016
|
-
super();
|
|
3017
|
-
this.isFlushable = true;
|
|
3018
|
-
this.italic = italic;
|
|
3019
|
-
}
|
|
3020
|
-
/**
|
|
3021
|
-
* Converts the action to an annotation
|
|
3022
|
-
*
|
|
3023
|
-
* @returns {ItalicAnnotation} The annotation
|
|
3024
|
-
*/
|
|
3025
|
-
toAnnotation() {
|
|
3026
|
-
return new ItalicAnnotation(this.italic);
|
|
3027
|
-
}
|
|
3028
|
-
}
|
|
3029
|
-
|
|
3030
|
-
/**
|
|
3031
|
-
* Action to toggle link annotation
|
|
3032
|
-
*/
|
|
3033
|
-
class LinkAnnotationAction extends TextSplittableAction {
|
|
3034
|
-
constructor({ link, newText, needMergeNode, doSplit, type, }) {
|
|
3377
|
+
*/
|
|
3378
|
+
class ItalicAnnotationAction extends TextSplittableAction {
|
|
3379
|
+
constructor(italic) {
|
|
3035
3380
|
super();
|
|
3036
3381
|
this.isFlushable = true;
|
|
3037
|
-
this.
|
|
3038
|
-
this.needMergeNode = needMergeNode;
|
|
3039
|
-
this.newText = newText;
|
|
3040
|
-
this.type = type;
|
|
3041
|
-
if (typeGuard.isNonNullable(doSplit)) {
|
|
3042
|
-
this.doSplit = doSplit;
|
|
3043
|
-
}
|
|
3382
|
+
this.italic = italic;
|
|
3044
3383
|
}
|
|
3045
3384
|
/**
|
|
3046
3385
|
* Converts the action to an annotation
|
|
3047
3386
|
*
|
|
3048
|
-
* @returns {
|
|
3387
|
+
* @returns {ItalicAnnotation} The annotation
|
|
3049
3388
|
*/
|
|
3050
3389
|
toAnnotation() {
|
|
3051
|
-
return new
|
|
3390
|
+
return new ItalicAnnotation(this.italic);
|
|
3052
3391
|
}
|
|
3053
3392
|
}
|
|
3393
|
+
ItalicAnnotationAction.typeName = 'ItalicAnnotationAction';
|
|
3054
3394
|
|
|
3055
3395
|
/**
|
|
3056
3396
|
* Action to toggle the strikethrough annotation
|
|
@@ -3070,6 +3410,7 @@ class StrikethroughAnnotationAction extends TextSplittableAction {
|
|
|
3070
3410
|
return new StrikethroughAnnotation(this.strikethrough);
|
|
3071
3411
|
}
|
|
3072
3412
|
}
|
|
3413
|
+
StrikethroughAnnotationAction.typeName = 'StrikethroughAnnotationAction';
|
|
3073
3414
|
|
|
3074
3415
|
/**
|
|
3075
3416
|
* Action to toggle the underline annotation
|
|
@@ -3089,6 +3430,7 @@ class UnderlineAnnotationAction extends TextSplittableAction {
|
|
|
3089
3430
|
return new UnderlineAnnotation(this.underline);
|
|
3090
3431
|
}
|
|
3091
3432
|
}
|
|
3433
|
+
UnderlineAnnotationAction.typeName = 'UnderlineAnnotationAction';
|
|
3092
3434
|
|
|
3093
3435
|
/**
|
|
3094
3436
|
* The current strategy used to modify the text node annotation map.
|
|
@@ -3378,6 +3720,12 @@ class PlainTextAnnotation extends NodeAnnotation {
|
|
|
3378
3720
|
static from(plainText) {
|
|
3379
3721
|
return [exports.NodeAnnotationTypeEnum.PLAIN_TEXT, new PlainTextAnnotation(plainText)];
|
|
3380
3722
|
}
|
|
3723
|
+
/**
|
|
3724
|
+
* @inheritDoc
|
|
3725
|
+
*/
|
|
3726
|
+
get isFormattingOnly() {
|
|
3727
|
+
return true;
|
|
3728
|
+
}
|
|
3381
3729
|
/**
|
|
3382
3730
|
* @inheritDoc
|
|
3383
3731
|
*/
|
|
@@ -3422,6 +3770,7 @@ class TextColorAnnotationAction extends TextSplittableAction {
|
|
|
3422
3770
|
return new TextColorAnnotation(this.textColor);
|
|
3423
3771
|
}
|
|
3424
3772
|
}
|
|
3773
|
+
TextColorAnnotationAction.typeName = 'TextColorAnnotationAction';
|
|
3425
3774
|
|
|
3426
3775
|
/**
|
|
3427
3776
|
* Text node
|
|
@@ -3429,7 +3778,6 @@ class TextColorAnnotationAction extends TextSplittableAction {
|
|
|
3429
3778
|
class RTETextNode extends RTENode {
|
|
3430
3779
|
constructor(id, text, parentBlock, annotationMap) {
|
|
3431
3780
|
super(id, annotationMap);
|
|
3432
|
-
this.dtoName = RTETextNode.dtoName;
|
|
3433
3781
|
this.type = exports.NodeTypeEnum.TEXT;
|
|
3434
3782
|
this.parent = parentBlock;
|
|
3435
3783
|
this.text = text;
|
|
@@ -3665,24 +4013,24 @@ class RTETextNode extends RTENode {
|
|
|
3665
4013
|
* Registers the action strategies for the RTETextNode.
|
|
3666
4014
|
*/
|
|
3667
4015
|
registerModifyStrategy() {
|
|
3668
|
-
const dtoClassName = this.
|
|
4016
|
+
const dtoClassName = this.typeName;
|
|
3669
4017
|
if (!RTETextNode.registerActionStrategyStatus[dtoClassName]) {
|
|
3670
4018
|
if (this.isContentEditable()) {
|
|
3671
4019
|
ActionHandleStrategyRegistry.register(exports.ModifyContentActionType.UPDATE_TEXT, dtoClassName, new NodeUpdateTextStrategy());
|
|
3672
4020
|
ActionHandleStrategyRegistry.register(exports.ModifyContentActionType.REPLACE_SELECTED_TEXT, dtoClassName, new NodeReplaceSelectedTextStrategy());
|
|
3673
4021
|
ActionHandleStrategyRegistry.register(exports.ModifyContentActionType.LINK_GROUP_NODE_SPLIT, dtoClassName, new LinkGroupNodeSplitStrategy());
|
|
3674
|
-
ActionHandleStrategyRegistry.register(LinkAnnotationAction.
|
|
4022
|
+
ActionHandleStrategyRegistry.register(LinkAnnotationAction.typeName, dtoClassName, new NodeUpdateAnnotationMapStrategy());
|
|
3675
4023
|
}
|
|
3676
|
-
ActionHandleStrategyRegistry.register(TextSplittableAction.
|
|
4024
|
+
ActionHandleStrategyRegistry.register(TextSplittableAction.typeName, dtoClassName, new NodeSplitTextStrategy());
|
|
3677
4025
|
ActionHandleStrategyRegistry.register(exports.ModifyContentActionType.DELETE_LINK_GROUP, dtoClassName, new DeleteLinkGroupStrategy());
|
|
3678
|
-
ActionHandleStrategyRegistry.register(BoldAnnotationAction.
|
|
3679
|
-
ActionHandleStrategyRegistry.register(ClearFormattingAnnotationAction.
|
|
3680
|
-
ActionHandleStrategyRegistry.register(ItalicAnnotationAction.
|
|
3681
|
-
ActionHandleStrategyRegistry.register(UnderlineAnnotationAction.
|
|
3682
|
-
ActionHandleStrategyRegistry.register(TextColorAnnotationAction.
|
|
3683
|
-
ActionHandleStrategyRegistry.register(StrikethroughAnnotationAction.
|
|
3684
|
-
ActionHandleStrategyRegistry.register(CodeAnnotationAction.
|
|
3685
|
-
ActionHandleStrategyRegistry.register(AnnotationAction.
|
|
4026
|
+
ActionHandleStrategyRegistry.register(BoldAnnotationAction.typeName, dtoClassName, new NodeUpdateAnnotationMapStrategy());
|
|
4027
|
+
ActionHandleStrategyRegistry.register(ClearFormattingAnnotationAction.typeName, dtoClassName, new NodeUpdateAnnotationMapStrategy());
|
|
4028
|
+
ActionHandleStrategyRegistry.register(ItalicAnnotationAction.typeName, dtoClassName, new NodeUpdateAnnotationMapStrategy());
|
|
4029
|
+
ActionHandleStrategyRegistry.register(UnderlineAnnotationAction.typeName, dtoClassName, new NodeUpdateAnnotationMapStrategy());
|
|
4030
|
+
ActionHandleStrategyRegistry.register(TextColorAnnotationAction.typeName, dtoClassName, new NodeUpdateAnnotationMapStrategy());
|
|
4031
|
+
ActionHandleStrategyRegistry.register(StrikethroughAnnotationAction.typeName, dtoClassName, new NodeUpdateAnnotationMapStrategy());
|
|
4032
|
+
ActionHandleStrategyRegistry.register(CodeAnnotationAction.typeName, dtoClassName, new NodeUpdateAnnotationMapStrategy());
|
|
4033
|
+
ActionHandleStrategyRegistry.register(AnnotationAction.typeName, dtoClassName, new NodeUpdateAnnotationMapStrategy());
|
|
3686
4034
|
RTETextNode.registerActionStrategyStatus[dtoClassName] = true;
|
|
3687
4035
|
}
|
|
3688
4036
|
}
|
|
@@ -3692,7 +4040,7 @@ class RTETextNode extends RTENode {
|
|
|
3692
4040
|
doAnnotationActionApply(action) {
|
|
3693
4041
|
const selectionRangeAnnotation = this.getAnnotationByType(exports.InternalAnnotationTypeEnum.SELECTION_RANGE);
|
|
3694
4042
|
if (action instanceof TextSplittableAction && action.doSplit && selectionRangeAnnotation) {
|
|
3695
|
-
const splitStrategy = ActionHandleStrategyRegistry.get(TextSplittableAction.
|
|
4043
|
+
const splitStrategy = ActionHandleStrategyRegistry.get(TextSplittableAction.typeName, this.typeName);
|
|
3696
4044
|
if (splitStrategy) {
|
|
3697
4045
|
const newNode = splitStrategy.execute(action, this);
|
|
3698
4046
|
if (newNode) {
|
|
@@ -3702,421 +4050,155 @@ class RTETextNode extends RTENode {
|
|
|
3702
4050
|
}
|
|
3703
4051
|
else {
|
|
3704
4052
|
this.applyActionToNode(this, action);
|
|
3705
|
-
}
|
|
3706
|
-
if (typeof this.parent.mergeNodes === 'function') {
|
|
3707
|
-
this.parent.mergeNodes(action);
|
|
3708
|
-
}
|
|
3709
|
-
}
|
|
3710
|
-
/**
|
|
3711
|
-
* @inheritDoc
|
|
3712
|
-
*/
|
|
3713
|
-
doModifyActionApply(action) {
|
|
3714
|
-
ActionHandleStrategyRegistry.executeTheStrategy(action, this);
|
|
3715
|
-
}
|
|
3716
|
-
/**
|
|
3717
|
-
* Apply action to node
|
|
3718
|
-
*
|
|
3719
|
-
* @param {RTETextNode} node - Text node
|
|
3720
|
-
* @param {AnnotationAction} action - AnnotationAction
|
|
3721
|
-
*/
|
|
3722
|
-
applyActionToNode(node, action) {
|
|
3723
|
-
const annotation = action.toAnnotation();
|
|
3724
|
-
if (action instanceof SyncUpSelectionAction) {
|
|
3725
|
-
this.syncUpSelectedNodes(node);
|
|
3726
|
-
return;
|
|
3727
|
-
}
|
|
3728
|
-
// Sync up RTETextNode selected state to selection controller for any action apply, except selection range change.
|
|
3729
|
-
if (!(annotation instanceof SelectionRangeAnnotation)) {
|
|
3730
|
-
this.syncUpSelectedNodes(node);
|
|
3731
|
-
}
|
|
3732
|
-
/**
|
|
3733
|
-
* 1. Try to get the specific strategy for the action and node type first (e.g., LinkAnnotationAction on RTETextNode).
|
|
3734
|
-
* 2. If no specific strategy found, try to get the generic NodeUpdateAnnotationMapStrategy for AnnotationAction on RTETextNode.
|
|
3735
|
-
*/
|
|
3736
|
-
const strategy = ActionHandleStrategyRegistry.get(action.constructor.name, node.constructor.name);
|
|
3737
|
-
if (strategy) {
|
|
3738
|
-
strategy.execute(action, node);
|
|
3739
|
-
return;
|
|
3740
|
-
}
|
|
3741
|
-
const updateAnnotationMapStrategy = ActionHandleStrategyRegistry.get(AnnotationAction.name, RTETextNode.name);
|
|
3742
|
-
if (updateAnnotationMapStrategy) {
|
|
3743
|
-
updateAnnotationMapStrategy.execute(action, node);
|
|
3744
|
-
return;
|
|
3745
|
-
}
|
|
3746
|
-
}
|
|
3747
|
-
/**
|
|
3748
|
-
* Sync up the selected node by change manager
|
|
3749
|
-
*
|
|
3750
|
-
* @param {RTETextNode} selectedNode - The selected node
|
|
3751
|
-
*/
|
|
3752
|
-
syncUpSelectedNodes(selectedNode) {
|
|
3753
|
-
const currentNodeDom = this.getElementRef();
|
|
3754
|
-
if (currentNodeDom) {
|
|
3755
|
-
const nodeSubject = domNodeSubjectObserverFactory.domNodeSubjectFactory.getSubjectFromParentNodeByEventId(currentNodeDom, vegaInternalEventId.VegaInternalRichTextEditorSelectionRangeChange);
|
|
3756
|
-
if (nodeSubject) {
|
|
3757
|
-
changeManager.ChangeManager.notify(nodeSubject, { node: selectedNode });
|
|
3758
|
-
}
|
|
3759
|
-
}
|
|
3760
|
-
}
|
|
3761
|
-
/**
|
|
3762
|
-
* @param {InlineHtmlAnnotation} inlineHtmlNode - The inline HTML annotation to wrap the text node.
|
|
3763
|
-
* @param {VegaRTETransformOptions} [options] - Optional conversion options that may affect how the text node is rendered as HTML.
|
|
3764
|
-
* @returns {string} The HTML string representation of the text node wrapped with the inline HTML.
|
|
3765
|
-
*/
|
|
3766
|
-
renderWithWrapperStr(inlineHtmlNode, options) {
|
|
3767
|
-
const { htmlTag, child } = inlineHtmlNode;
|
|
3768
|
-
const attrStr = this.annotationAttrStr(inlineHtmlNode);
|
|
3769
|
-
if (!child) {
|
|
3770
|
-
if (HTML_VOID_TAGS.has(htmlTag)) {
|
|
3771
|
-
return `<${htmlTag}${attrStr}>`;
|
|
3772
|
-
}
|
|
3773
|
-
if (!this.text) {
|
|
3774
|
-
return `<${htmlTag}${attrStr}></${htmlTag}>`;
|
|
3775
|
-
}
|
|
3776
|
-
return `<${htmlTag}${attrStr}>${this.renderTextStr(options)}</${htmlTag}>`;
|
|
3777
|
-
}
|
|
3778
|
-
return `<${htmlTag}${attrStr}>${this.renderWithWrapperStr(child, options)}</${htmlTag}>`;
|
|
3779
|
-
}
|
|
3780
|
-
/**
|
|
3781
|
-
* Generate the attribute string for the inline HTML annotation
|
|
3782
|
-
*
|
|
3783
|
-
* @param {InlineHtmlAnnotation} annotation - The inline HTML annotation
|
|
3784
|
-
* @returns {string} The attribute string for the inline HTML annotation
|
|
3785
|
-
*/
|
|
3786
|
-
annotationAttrStr(annotation) {
|
|
3787
|
-
const { customAttribute, customClass, customStyle } = annotation;
|
|
3788
|
-
const attrs = [
|
|
3789
|
-
...((customAttribute === null || customAttribute === void 0 ? void 0 : customAttribute.toString()) || []),
|
|
3790
|
-
customClass === null || customClass === void 0 ? void 0 : customClass.toString(),
|
|
3791
|
-
customStyle === null || customStyle === void 0 ? void 0 : customStyle.toString(),
|
|
3792
|
-
].filter(typeGuard.isNonNullable);
|
|
3793
|
-
return attrs.length > 0 ? ` ${attrs.join(' ')}` : '';
|
|
3794
|
-
}
|
|
3795
|
-
/**
|
|
3796
|
-
* Generates the HTML representation of the text node.
|
|
3797
|
-
*
|
|
3798
|
-
* @param {VegaRTETransformOptions} [options] - Optional conversion options that may affect how the text node is rendered as HTML.
|
|
3799
|
-
* @returns {string} The HTML string representation of the text node.
|
|
3800
|
-
*/
|
|
3801
|
-
renderTextStr(options) {
|
|
3802
|
-
var _a;
|
|
3803
|
-
const NodeTag = ((_a = this.getAnnotationByType(exports.NodeAnnotationTypeEnum.CODE)) === null || _a === void 0 ? void 0 : _a.code)
|
|
3804
|
-
? 'code'
|
|
3805
|
-
: 'span';
|
|
3806
|
-
const attrStr = super.generateAttributeString(options);
|
|
3807
|
-
// If the text contains a newline character, we need to replace it with a <br> tag.
|
|
3808
|
-
if (this.text === '\n') {
|
|
3809
|
-
return `<br>`;
|
|
3810
|
-
}
|
|
3811
|
-
if (this.shouldRenderAsPlainText()) {
|
|
3812
|
-
return this.text;
|
|
3813
|
-
}
|
|
3814
|
-
const content = NodeTag === 'code' ? escapeHtml(this.text) : this.text;
|
|
3815
|
-
return `<${NodeTag}${attrStr}>${content}</${NodeTag}>`;
|
|
3816
|
-
}
|
|
3817
|
-
/**
|
|
3818
|
-
* Determines if the text node should be rendered as plain text.
|
|
3819
|
-
*
|
|
3820
|
-
* @returns {boolean} `true` if the text node should be rendered as plain text, otherwise `false`.
|
|
3821
|
-
*/
|
|
3822
|
-
shouldRenderAsPlainText() {
|
|
3823
|
-
const plainTextAnnotation = super.getAnnotationByType(exports.NodeAnnotationTypeEnum.PLAIN_TEXT);
|
|
3824
|
-
if (plainTextAnnotation) {
|
|
3825
|
-
return (plainTextAnnotation.plainText &&
|
|
3826
|
-
Array.from(this.annotationMap.values()).filter((annotation) => (annotation instanceof NodeAnnotation &&
|
|
3827
|
-
!(annotation instanceof LinkAnnotation) &&
|
|
3828
|
-
!(annotation instanceof PlainTextAnnotation)) ||
|
|
3829
|
-
annotation instanceof CommonAnnotation).length === 0);
|
|
3830
|
-
}
|
|
3831
|
-
else {
|
|
3832
|
-
return false;
|
|
3833
|
-
}
|
|
3834
|
-
}
|
|
3835
|
-
}
|
|
3836
|
-
RTETextNode.registerActionStrategyStatus = {};
|
|
3837
|
-
RTETextNode.htmlTag = 'span';
|
|
3838
|
-
RTETextNode.dtoName = 'RTETextNode';
|
|
3839
|
-
|
|
3840
|
-
/**
|
|
3841
|
-
* Append children to a block or rte content
|
|
3842
|
-
*
|
|
3843
|
-
* @example parent.apply(new AppendChildrenAction([newChildren]))
|
|
3844
|
-
*/
|
|
3845
|
-
class AppendChildrenAction extends ModifyContentAction {
|
|
3846
|
-
constructor(childNodes) {
|
|
3847
|
-
super();
|
|
3848
|
-
this.type = exports.ModifyContentActionType.APPEND_CHILDREN;
|
|
3849
|
-
this.entityToBeAppended = childNodes;
|
|
3850
|
-
}
|
|
3851
|
-
}
|
|
3852
|
-
|
|
3853
|
-
const TEXT_STYLE_DEFAULT_FONT_WEIGHT = '500';
|
|
3854
|
-
const TEXT_STYLE_BASE = {
|
|
3855
|
-
fontFamily: 'Inter',
|
|
3856
|
-
fontSize: '16px',
|
|
3857
|
-
lineHeight: '22px',
|
|
3858
|
-
minHeight: '22px',
|
|
3859
|
-
fontWeight: TEXT_STYLE_DEFAULT_FONT_WEIGHT,
|
|
3860
|
-
};
|
|
3861
|
-
const PARAGRAPH_TEXT_STYLE = Object.assign(Object.assign({}, TEXT_STYLE_BASE), { marginTop: '0px', marginBottom: '0px' });
|
|
3862
|
-
const TEXT_STYLE_DEFAULTS = {
|
|
3863
|
-
'paragraph': PARAGRAPH_TEXT_STYLE,
|
|
3864
|
-
'title': Object.assign(Object.assign({}, TEXT_STYLE_BASE), { fontSize: '36px', lineHeight: '40px', minHeight: '40px' }),
|
|
3865
|
-
'subtitle': Object.assign(Object.assign({}, TEXT_STYLE_BASE), { fontSize: '28px', lineHeight: '32px', minHeight: '32px' }),
|
|
3866
|
-
'heading-1': Object.assign(Object.assign({}, PARAGRAPH_TEXT_STYLE), { fontSize: '22px', lineHeight: '24px', minHeight: '24px' }),
|
|
3867
|
-
'heading-2': Object.assign(Object.assign({}, PARAGRAPH_TEXT_STYLE), { fontSize: '20px', lineHeight: '24px', minHeight: '24px' }),
|
|
3868
|
-
'heading-3': Object.assign(Object.assign({}, PARAGRAPH_TEXT_STYLE), { fontSize: '18px' }),
|
|
3869
|
-
'heading-4': Object.assign({}, PARAGRAPH_TEXT_STYLE),
|
|
3870
|
-
'heading-5': Object.assign(Object.assign({}, PARAGRAPH_TEXT_STYLE), { fontSize: '14px' }),
|
|
3871
|
-
'heading-6': Object.assign(Object.assign({}, PARAGRAPH_TEXT_STYLE), { fontSize: '12px' }),
|
|
3872
|
-
};
|
|
3873
|
-
|
|
3874
|
-
/**
|
|
3875
|
-
* Text style annotation
|
|
3876
|
-
*/
|
|
3877
|
-
class TextStyleAnnotation extends BlockAnnotation {
|
|
3878
|
-
constructor(textStyle) {
|
|
3879
|
-
super();
|
|
3880
|
-
this.type = exports.BlockAnnotationTypeEnum.TEXT_STYLE;
|
|
3881
|
-
this.textStyle = textStyle;
|
|
3882
|
-
}
|
|
3883
|
-
/**
|
|
3884
|
-
* Generate the map item for the annotations
|
|
3885
|
-
*
|
|
3886
|
-
* @param {VegaRTETextStyleType} textStyle - the text style type
|
|
3887
|
-
* @returns {[BlockAnnotationTypeEnum.TEXT_STYLE, TextStyleAnnotation]} Map item for the annotation
|
|
3888
|
-
*/
|
|
3889
|
-
static from(textStyle) {
|
|
3890
|
-
return [exports.BlockAnnotationTypeEnum.TEXT_STYLE, new TextStyleAnnotation(textStyle)];
|
|
3891
|
-
}
|
|
3892
|
-
/**
|
|
3893
|
-
* Get the default styles for a given text style type.
|
|
3894
|
-
*
|
|
3895
|
-
* @param {VegaRTETextStyleType} textStyle - The text style type.
|
|
3896
|
-
* @returns {Nullable<AnnotationStyle>} The default styles for the given text style type.
|
|
3897
|
-
*/
|
|
3898
|
-
static getDefaultStyles(textStyle) {
|
|
3899
|
-
if (!textStyle)
|
|
3900
|
-
return null;
|
|
3901
|
-
return TEXT_STYLE_DEFAULTS[textStyle];
|
|
3902
|
-
}
|
|
3903
|
-
/**
|
|
3904
|
-
* Generate the JSON representation of the annotation
|
|
3905
|
-
*
|
|
3906
|
-
* @returns {Nullable<Record<string, unknown>>} JSON representation of the annotation
|
|
3907
|
-
*/
|
|
3908
|
-
toJSON() {
|
|
3909
|
-
return { textStyle: this.textStyle };
|
|
3910
|
-
}
|
|
3911
|
-
/**
|
|
3912
|
-
* @inheritDoc
|
|
3913
|
-
*/
|
|
3914
|
-
clone() {
|
|
3915
|
-
return new TextStyleAnnotation(this.textStyle);
|
|
3916
|
-
}
|
|
3917
|
-
/**
|
|
3918
|
-
* @inheritDoc
|
|
3919
|
-
*/
|
|
3920
|
-
renderClass(options) {
|
|
3921
|
-
if (options === null || options === void 0 ? void 0 : options.standalone)
|
|
3922
|
-
return null;
|
|
3923
|
-
return this.textStyle ? `v-rte--text-style-${this.textStyle}` : null;
|
|
3924
|
-
}
|
|
3925
|
-
/**
|
|
3926
|
-
* @inheritDoc
|
|
3927
|
-
*/
|
|
3928
|
-
renderStyle(options) {
|
|
3929
|
-
if (!(options === null || options === void 0 ? void 0 : options.standalone))
|
|
3930
|
-
return null;
|
|
3931
|
-
return this.textStyle ? TextStyleAnnotation.getDefaultStyles(this.textStyle) : null;
|
|
3932
|
-
}
|
|
3933
|
-
}
|
|
3934
|
-
|
|
3935
|
-
/**
|
|
3936
|
-
* Action to change the text style of a block
|
|
3937
|
-
*/
|
|
3938
|
-
class TextStyleAnnotationAction extends AnnotationAction {
|
|
3939
|
-
constructor(textStyle, bold) {
|
|
3940
|
-
super();
|
|
3941
|
-
this.isFlushable = true;
|
|
3942
|
-
this.textStyle = textStyle;
|
|
3943
|
-
this.bold = bold;
|
|
4053
|
+
}
|
|
4054
|
+
if (typeof this.parent.mergeNodes === 'function') {
|
|
4055
|
+
this.parent.mergeNodes(action);
|
|
4056
|
+
}
|
|
3944
4057
|
}
|
|
3945
4058
|
/**
|
|
3946
|
-
*
|
|
3947
|
-
*
|
|
3948
|
-
* @returns {BlockAnnotation} the block annotation
|
|
4059
|
+
* @inheritDoc
|
|
3949
4060
|
*/
|
|
3950
|
-
|
|
3951
|
-
|
|
4061
|
+
doModifyActionApply(action) {
|
|
4062
|
+
ActionHandleStrategyRegistry.executeTheStrategy(action, this);
|
|
3952
4063
|
}
|
|
3953
|
-
}
|
|
3954
|
-
|
|
3955
|
-
/**
|
|
3956
|
-
* Update the text block text style strategy.
|
|
3957
|
-
*/
|
|
3958
|
-
class BlockUpdateTextStyleStrategy extends ActionHandleStrategy {
|
|
3959
4064
|
/**
|
|
3960
|
-
*
|
|
4065
|
+
* Apply action to node
|
|
3961
4066
|
*
|
|
3962
|
-
* @param {
|
|
3963
|
-
* @param {
|
|
4067
|
+
* @param {RTETextNode} node - Text node
|
|
4068
|
+
* @param {AnnotationAction} action - AnnotationAction
|
|
3964
4069
|
*/
|
|
3965
|
-
|
|
3966
|
-
|
|
3967
|
-
|
|
4070
|
+
applyActionToNode(node, action) {
|
|
4071
|
+
const annotation = action.toAnnotation();
|
|
4072
|
+
if (action instanceof SyncUpSelectionAction) {
|
|
4073
|
+
this.syncUpSelectedNodes(node);
|
|
4074
|
+
return;
|
|
3968
4075
|
}
|
|
3969
|
-
|
|
3970
|
-
|
|
3971
|
-
|
|
3972
|
-
boldAnnotationAction.doSplit = false;
|
|
3973
|
-
node.apply(boldAnnotationAction);
|
|
3974
|
-
});
|
|
4076
|
+
// Sync up RTETextNode selected state to selection controller for any action apply, except selection range change.
|
|
4077
|
+
if (!(annotation instanceof SelectionRangeAnnotation)) {
|
|
4078
|
+
this.syncUpSelectedNodes(node);
|
|
3975
4079
|
}
|
|
3976
|
-
|
|
3977
|
-
|
|
3978
|
-
|
|
3979
|
-
|
|
4080
|
+
/**
|
|
4081
|
+
* 1. Try to get the specific strategy for the action and node type first (e.g., LinkAnnotationAction on RTETextNode).
|
|
4082
|
+
* 2. If no specific strategy found, try to get the generic NodeUpdateAnnotationMapStrategy for AnnotationAction on RTETextNode.
|
|
4083
|
+
*/
|
|
4084
|
+
const strategy = ActionHandleStrategyRegistry.get(action.typeName, node.typeName);
|
|
4085
|
+
if (strategy) {
|
|
4086
|
+
strategy.execute(action, node);
|
|
4087
|
+
return;
|
|
4088
|
+
}
|
|
4089
|
+
const updateAnnotationMapStrategy = ActionHandleStrategyRegistry.get(AnnotationAction.typeName, RTETextNode.typeName);
|
|
4090
|
+
if (updateAnnotationMapStrategy) {
|
|
4091
|
+
updateAnnotationMapStrategy.execute(action, node);
|
|
4092
|
+
return;
|
|
3980
4093
|
}
|
|
3981
|
-
this.updateCustomStyleAnnotation(target, ['fontFamily', 'lineHeight', 'fontWeight', 'fontSize']);
|
|
3982
4094
|
}
|
|
3983
|
-
}
|
|
3984
|
-
|
|
3985
|
-
/**
|
|
3986
|
-
* Update the text block link group annotation strategy.
|
|
3987
|
-
*/
|
|
3988
|
-
class BlockUpdateLinkGroupStrategy extends ActionHandleStrategy {
|
|
3989
4095
|
/**
|
|
3990
|
-
*
|
|
4096
|
+
* Sync up the selected node by change manager
|
|
3991
4097
|
*
|
|
3992
|
-
* @param {
|
|
3993
|
-
* @param {RTETextBlock} target - The current text block.
|
|
4098
|
+
* @param {RTETextNode} selectedNode - The selected node
|
|
3994
4099
|
*/
|
|
3995
|
-
|
|
3996
|
-
|
|
3997
|
-
if (
|
|
3998
|
-
|
|
3999
|
-
|
|
4000
|
-
|
|
4001
|
-
linkGroupAnnotation.linkGroups.set(action.groupKey, [linkGroup[0]]);
|
|
4002
|
-
}
|
|
4100
|
+
syncUpSelectedNodes(selectedNode) {
|
|
4101
|
+
const currentNodeDom = this.getElementRef();
|
|
4102
|
+
if (currentNodeDom) {
|
|
4103
|
+
const nodeSubject = domNodeSubjectObserverFactory.domNodeSubjectFactory.getSubjectFromParentNodeByEventId(currentNodeDom, vegaInternalEventId.VegaInternalRichTextEditorSelectionRangeChange);
|
|
4104
|
+
if (nodeSubject) {
|
|
4105
|
+
changeManager.ChangeManager.notify(nodeSubject, { node: selectedNode });
|
|
4003
4106
|
}
|
|
4004
4107
|
}
|
|
4005
|
-
|
|
4006
|
-
|
|
4007
|
-
|
|
4008
|
-
|
|
4108
|
+
}
|
|
4109
|
+
/**
|
|
4110
|
+
* @param {InlineHtmlAnnotation} inlineHtmlNode - The inline HTML annotation to wrap the text node.
|
|
4111
|
+
* @param {VegaRTETransformOptions} [options] - Optional conversion options that may affect how the text node is rendered as HTML.
|
|
4112
|
+
* @returns {string} The HTML string representation of the text node wrapped with the inline HTML.
|
|
4113
|
+
*/
|
|
4114
|
+
renderWithWrapperStr(inlineHtmlNode, options) {
|
|
4115
|
+
const { htmlTag, child } = inlineHtmlNode;
|
|
4116
|
+
const attrStr = this.annotationAttrStr(inlineHtmlNode);
|
|
4117
|
+
if (!child) {
|
|
4118
|
+
if (HTML_VOID_TAGS.has(htmlTag)) {
|
|
4119
|
+
return `<${htmlTag}${attrStr}>`;
|
|
4009
4120
|
}
|
|
4010
|
-
|
|
4011
|
-
|
|
4012
|
-
linkGroupAnnotation.linkGroups.set(action.groupKey, [...action.nodes]);
|
|
4121
|
+
if (!this.text) {
|
|
4122
|
+
return `<${htmlTag}${attrStr}></${htmlTag}>`;
|
|
4013
4123
|
}
|
|
4014
|
-
|
|
4124
|
+
return `<${htmlTag}${attrStr}>${this.renderTextStr(options)}</${htmlTag}>`;
|
|
4015
4125
|
}
|
|
4126
|
+
return `<${htmlTag}${attrStr}>${this.renderWithWrapperStr(child, options)}</${htmlTag}>`;
|
|
4016
4127
|
}
|
|
4017
|
-
}
|
|
4018
|
-
|
|
4019
|
-
/**
|
|
4020
|
-
* Insert a new children after a existing children
|
|
4021
|
-
*
|
|
4022
|
-
* @example parent.apply(new InsertChildrenAfterAction(existingChildren, newChildren, ...))
|
|
4023
|
-
*/
|
|
4024
|
-
class InsertChildrenAfterAction extends ModifyContentAction {
|
|
4025
|
-
constructor(referBlock, ...blocksToBeInserted) {
|
|
4026
|
-
super();
|
|
4027
|
-
this.type = exports.ModifyContentActionType.INSERT_CHILDREN_AFTER;
|
|
4028
|
-
this.referChildren = referBlock;
|
|
4029
|
-
this.childrenToBeInserted = blocksToBeInserted;
|
|
4030
|
-
}
|
|
4031
|
-
}
|
|
4032
|
-
|
|
4033
|
-
/**
|
|
4034
|
-
* Clear the current block nodes and append new nodes
|
|
4035
|
-
*
|
|
4036
|
-
* @example block.apply(new ReplaceChildNodesAction(newNodes))
|
|
4037
|
-
*/
|
|
4038
|
-
class ReplaceChildNodesAction extends ModifyContentAction {
|
|
4039
|
-
constructor(newChildNodes) {
|
|
4040
|
-
super();
|
|
4041
|
-
this.type = exports.ModifyContentActionType.REPLACE_CHILD_NODES;
|
|
4042
|
-
this.newChildNodes = newChildNodes;
|
|
4043
|
-
}
|
|
4044
|
-
}
|
|
4045
|
-
|
|
4046
|
-
/**
|
|
4047
|
-
* Split the current node with a special position strategy.
|
|
4048
|
-
*/
|
|
4049
|
-
class BlockSplitWithTextNodeStrategy extends ActionHandleStrategy {
|
|
4050
4128
|
/**
|
|
4051
|
-
*
|
|
4129
|
+
* Generate the attribute string for the inline HTML annotation
|
|
4130
|
+
*
|
|
4131
|
+
* @param {InlineHtmlAnnotation} annotation - The inline HTML annotation
|
|
4132
|
+
* @returns {string} The attribute string for the inline HTML annotation
|
|
4052
4133
|
*/
|
|
4053
|
-
|
|
4054
|
-
|
|
4134
|
+
annotationAttrStr(annotation) {
|
|
4135
|
+
const { customAttribute, customClass, customStyle } = annotation;
|
|
4136
|
+
const attrs = [
|
|
4137
|
+
...((customAttribute === null || customAttribute === void 0 ? void 0 : customAttribute.toString()) || []),
|
|
4138
|
+
customClass === null || customClass === void 0 ? void 0 : customClass.toString(),
|
|
4139
|
+
customStyle === null || customStyle === void 0 ? void 0 : customStyle.toString(),
|
|
4140
|
+
].filter(typeGuard.isNonNullable);
|
|
4141
|
+
return attrs.length > 0 ? ` ${attrs.join(' ')}` : '';
|
|
4055
4142
|
}
|
|
4056
4143
|
/**
|
|
4057
|
-
*
|
|
4144
|
+
* Generates the HTML representation of the text node.
|
|
4058
4145
|
*
|
|
4059
|
-
* @param {
|
|
4060
|
-
* @
|
|
4061
|
-
* @param {RTETextBlock} textBlock - The text block need to be splited.
|
|
4062
|
-
* @returns {Nullable<RTEBlock>} return either an RTEBlock object or null.
|
|
4146
|
+
* @param {VegaRTETransformOptions} [options] - Optional conversion options that may affect how the text node is rendered as HTML.
|
|
4147
|
+
* @returns {string} The HTML string representation of the text node.
|
|
4063
4148
|
*/
|
|
4064
|
-
|
|
4065
|
-
|
|
4066
|
-
|
|
4067
|
-
|
|
4068
|
-
|
|
4069
|
-
|
|
4070
|
-
|
|
4071
|
-
|
|
4072
|
-
|
|
4073
|
-
|
|
4074
|
-
|
|
4075
|
-
|
|
4076
|
-
if (afterText) {
|
|
4077
|
-
afterNodes.unshift(splitNode.cloneWithText(afterText));
|
|
4078
|
-
}
|
|
4079
|
-
}
|
|
4080
|
-
else {
|
|
4081
|
-
startOffsetOfNode > 0 ? beforeNodes.push(splitNode) : afterNodes.unshift(splitNode);
|
|
4082
|
-
}
|
|
4083
|
-
textBlock.apply(new ReplaceChildNodesAction(beforeNodes));
|
|
4084
|
-
const newBlock = textBlock.cloneWithNodes(afterNodes);
|
|
4085
|
-
textBlock.parent.apply(new InsertChildrenAfterAction(textBlock, newBlock));
|
|
4086
|
-
return newBlock;
|
|
4087
|
-
}
|
|
4149
|
+
renderTextStr(options) {
|
|
4150
|
+
var _a;
|
|
4151
|
+
const NodeTag = ((_a = this.getAnnotationByType(exports.NodeAnnotationTypeEnum.CODE)) === null || _a === void 0 ? void 0 : _a.code)
|
|
4152
|
+
? 'code'
|
|
4153
|
+
: 'span';
|
|
4154
|
+
const attrStr = super.generateAttributeString(options);
|
|
4155
|
+
// If the text contains a newline character, we need to replace it with a <br> tag.
|
|
4156
|
+
if (this.text === '\n') {
|
|
4157
|
+
return `<br>`;
|
|
4158
|
+
}
|
|
4159
|
+
if (this.shouldSkipEmptyFormattingMarker()) {
|
|
4160
|
+
return '';
|
|
4088
4161
|
}
|
|
4162
|
+
if (this.shouldRenderAsPlainText()) {
|
|
4163
|
+
return this.text;
|
|
4164
|
+
}
|
|
4165
|
+
const content = NodeTag === 'code' ? escapeHtml(this.text) : this.text;
|
|
4166
|
+
return `<${NodeTag}${attrStr}>${content}</${NodeTag}>`;
|
|
4089
4167
|
}
|
|
4090
|
-
}
|
|
4091
|
-
|
|
4092
|
-
/**
|
|
4093
|
-
* Remove all nodes and append new nodes strategy.
|
|
4094
|
-
*/
|
|
4095
|
-
class BlockReplaceNodesStrategy extends ActionHandleStrategy {
|
|
4096
4168
|
/**
|
|
4097
|
-
*
|
|
4169
|
+
* Formatting toggles at a collapsed caret intentionally keep empty marker
|
|
4170
|
+
* nodes in the live model so future typing inherits the pending style. Those
|
|
4171
|
+
* nodes are not semantic content and should not appear in serialized HTML.
|
|
4098
4172
|
*
|
|
4099
|
-
* @
|
|
4100
|
-
* @param {RTETextBlock | RTEImageBlock} target - The text block or the image block.
|
|
4173
|
+
* @returns {boolean} True when the node is an empty formatting-only marker that should be omitted from serialized HTML.
|
|
4101
4174
|
*/
|
|
4102
|
-
|
|
4103
|
-
|
|
4104
|
-
|
|
4175
|
+
shouldSkipEmptyFormattingMarker() {
|
|
4176
|
+
return (this.text === '' &&
|
|
4177
|
+
this.annotationMap.size > 0 &&
|
|
4178
|
+
Array.from(this.annotationMap.values()).every((annotation) => annotation.isFormattingOnly));
|
|
4105
4179
|
}
|
|
4106
|
-
|
|
4107
|
-
|
|
4108
|
-
|
|
4109
|
-
|
|
4110
|
-
|
|
4111
|
-
|
|
4112
|
-
|
|
4113
|
-
|
|
4114
|
-
|
|
4115
|
-
|
|
4116
|
-
|
|
4117
|
-
|
|
4180
|
+
/**
|
|
4181
|
+
* Determines if the text node should be rendered as plain text.
|
|
4182
|
+
*
|
|
4183
|
+
* @returns {boolean} `true` if the text node should be rendered as plain text, otherwise `false`.
|
|
4184
|
+
*/
|
|
4185
|
+
shouldRenderAsPlainText() {
|
|
4186
|
+
const plainTextAnnotation = super.getAnnotationByType(exports.NodeAnnotationTypeEnum.PLAIN_TEXT);
|
|
4187
|
+
if (plainTextAnnotation) {
|
|
4188
|
+
return (plainTextAnnotation.plainText &&
|
|
4189
|
+
Array.from(this.annotationMap.values()).filter((annotation) => (annotation instanceof NodeAnnotation &&
|
|
4190
|
+
!(annotation instanceof LinkAnnotation) &&
|
|
4191
|
+
!(annotation instanceof PlainTextAnnotation)) ||
|
|
4192
|
+
annotation instanceof CommonAnnotation).length === 0);
|
|
4193
|
+
}
|
|
4194
|
+
else {
|
|
4195
|
+
return false;
|
|
4196
|
+
}
|
|
4118
4197
|
}
|
|
4119
4198
|
}
|
|
4199
|
+
RTETextNode.registerActionStrategyStatus = {};
|
|
4200
|
+
RTETextNode.htmlTag = 'span';
|
|
4201
|
+
RTETextNode.typeName = 'RTETextNode';
|
|
4120
4202
|
|
|
4121
4203
|
/**
|
|
4122
4204
|
* Append the second block child nodes to the first block child nodes and remove the second block strategy.
|
|
@@ -4349,13 +4431,13 @@ class BlockInsertImageIntoTextStrategy extends ActionHandleStrategy {
|
|
|
4349
4431
|
* @returns {RTEBlock[]} Top-level selected blocks to emit into the rebuilt list.
|
|
4350
4432
|
*/
|
|
4351
4433
|
function normalizeMixedListSelection(selectedBlocks, listType) {
|
|
4352
|
-
const selectedListItems = new Set(selectedBlocks.filter((block) => block.
|
|
4434
|
+
const selectedListItems = new Set(selectedBlocks.filter((block) => block.typeName === 'RTEListItemBlock'));
|
|
4353
4435
|
return selectedBlocks.filter((block) => {
|
|
4354
|
-
if (!(block.
|
|
4436
|
+
if (!(block.typeName === 'RTEListItemBlock')) {
|
|
4355
4437
|
return true;
|
|
4356
4438
|
}
|
|
4357
4439
|
let parentList = block.parent;
|
|
4358
|
-
while (parentList.parent && parentList.parent.
|
|
4440
|
+
while (parentList.parent && parentList.parent.typeName === 'RTEListItemBlock') {
|
|
4359
4441
|
const ownerItem = parentList.parent;
|
|
4360
4442
|
if (selectedListItems.has(ownerItem)) {
|
|
4361
4443
|
block.parent.type = listType;
|
|
@@ -4412,6 +4494,7 @@ class HorizontalAlignmentAnnotationAction extends AnnotationAction {
|
|
|
4412
4494
|
return new HorizontalAlignmentAnnotation(this.textAlign);
|
|
4413
4495
|
}
|
|
4414
4496
|
}
|
|
4497
|
+
HorizontalAlignmentAnnotationAction.typeName = 'HorizontalAlignmentAnnotationAction';
|
|
4415
4498
|
|
|
4416
4499
|
/**
|
|
4417
4500
|
* Update the text block and image block horizontal alignment strategy.
|
|
@@ -4461,6 +4544,7 @@ class IndentAnnotationAction extends AnnotationAction {
|
|
|
4461
4544
|
return new IndentAnnotation(this.indent);
|
|
4462
4545
|
}
|
|
4463
4546
|
}
|
|
4547
|
+
IndentAnnotationAction.typeName = 'IndentAnnotationAction';
|
|
4464
4548
|
|
|
4465
4549
|
/**
|
|
4466
4550
|
* Unlink the text block link group annotation strategy.
|
|
@@ -4491,7 +4575,6 @@ class BlockUnlinkLinkGroupStrategy extends ActionHandleStrategy {
|
|
|
4491
4575
|
class RTETextBlock extends RTEBlock {
|
|
4492
4576
|
constructor(id, type, options) {
|
|
4493
4577
|
super(id);
|
|
4494
|
-
this.dtoName = RTETextBlock.dtoName;
|
|
4495
4578
|
this.children = [];
|
|
4496
4579
|
this.type = type;
|
|
4497
4580
|
const { autoMatchFormat } = options || { autoMatchFormat: true };
|
|
@@ -4516,18 +4599,30 @@ class RTETextBlock extends RTEBlock {
|
|
|
4516
4599
|
const textBlock = new RTETextBlock(block.id, block.type, options);
|
|
4517
4600
|
const annotations = options.autoMatchFormat
|
|
4518
4601
|
? 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;
|
|
4519
|
-
textBlock.children = block.nodes
|
|
4602
|
+
textBlock.children = RTETextBlock.convertNodes(block.nodes, textBlock, options);
|
|
4603
|
+
if (annotations) {
|
|
4604
|
+
super.convertAnnotationsToMap(textBlock.annotationMap, annotations);
|
|
4605
|
+
}
|
|
4606
|
+
return textBlock;
|
|
4607
|
+
}
|
|
4608
|
+
/**
|
|
4609
|
+
* Convert raw node payloads to their registered `RTENode` subclasses via
|
|
4610
|
+
* `RTEDTOClassManager`, preserving custom types (e.g. `RTETokenNode`, `RTEBookmarkNode`).
|
|
4611
|
+
*
|
|
4612
|
+
* @param {VegaRTETextNode[]} nodes - Raw node payloads.
|
|
4613
|
+
* @param {RTETextBlock} parent - Parent block for the converted nodes.
|
|
4614
|
+
* @param {VegaRTETransformOptions} [options] - Optional transform options.
|
|
4615
|
+
* @returns {RTETextNode[]} Converted nodes; unregistered types are dropped.
|
|
4616
|
+
*/
|
|
4617
|
+
static convertNodes(nodes, parent, options) {
|
|
4618
|
+
return nodes
|
|
4520
4619
|
.map((richText) => {
|
|
4521
4620
|
const NodeClass = RTEDTOClassManager$1.getRTENodeClass(richText.type);
|
|
4522
4621
|
if (NodeClass) {
|
|
4523
|
-
return NodeClass.from(richText,
|
|
4622
|
+
return NodeClass.from(richText, parent, options);
|
|
4524
4623
|
}
|
|
4525
4624
|
})
|
|
4526
4625
|
.filter(typeGuard.isNonNullable);
|
|
4527
|
-
if (annotations) {
|
|
4528
|
-
super.convertAnnotationsToMap(textBlock.annotationMap, annotations);
|
|
4529
|
-
}
|
|
4530
|
-
return textBlock;
|
|
4531
4626
|
}
|
|
4532
4627
|
/**
|
|
4533
4628
|
* The function `createAnnotationEntity` creates a block annotation entity based on the provided type
|
|
@@ -4688,7 +4783,7 @@ class RTETextBlock extends RTEBlock {
|
|
|
4688
4783
|
* @inheritDoc
|
|
4689
4784
|
*/
|
|
4690
4785
|
doAnnotationActionApply(action) {
|
|
4691
|
-
const strategy = ActionHandleStrategyRegistry.get(action.
|
|
4786
|
+
const strategy = ActionHandleStrategyRegistry.get(action.typeName, RTETextBlock.typeName);
|
|
4692
4787
|
if (strategy) {
|
|
4693
4788
|
strategy.execute(action, this);
|
|
4694
4789
|
}
|
|
@@ -4770,21 +4865,22 @@ class RTETextBlock extends RTEBlock {
|
|
|
4770
4865
|
return nodesHtml;
|
|
4771
4866
|
}
|
|
4772
4867
|
}
|
|
4868
|
+
RTETextBlock.typeName = 'RTETextBlock';
|
|
4869
|
+
// eslint-disable-next-line @globalpayments/vega-eslint/vega-class-member-order-rule
|
|
4773
4870
|
(() => {
|
|
4774
|
-
ActionHandleStrategyRegistry.register(TextStyleAnnotationAction.
|
|
4775
|
-
ActionHandleStrategyRegistry.register(HorizontalAlignmentAnnotationAction.
|
|
4776
|
-
ActionHandleStrategyRegistry.register(IndentAnnotationAction.
|
|
4777
|
-
ActionHandleStrategyRegistry.register(LinkGroupAnnotationAction.
|
|
4778
|
-
ActionHandleStrategyRegistry.register(exports.ModifyContentActionType.UNLINK_LINK_GROUP, RTETextBlock.
|
|
4779
|
-
ActionHandleStrategyRegistry.register(exports.ModifyContentActionType.SPLIT_BLOCK_WITH_NODE, RTETextBlock.
|
|
4780
|
-
ActionHandleStrategyRegistry.register(exports.ModifyContentActionType.REPLACE_CHILD_NODES, RTETextBlock.
|
|
4781
|
-
ActionHandleStrategyRegistry.register(exports.ModifyContentActionType.MERGE_TWO_BLOCKS_NODES, RTETextBlock.
|
|
4782
|
-
ActionHandleStrategyRegistry.register(exports.ModifyContentActionType.LINE_BREAK_SINGLE_BLOCK, RTETextBlock.
|
|
4783
|
-
ActionHandleStrategyRegistry.register(exports.ModifyContentActionType.LINE_BREAK_MULTIPLE_BLOCKS, RTETextBlock.
|
|
4784
|
-
ActionHandleStrategyRegistry.register(exports.ModifyContentActionType.INSERT_IMAGE_TO_BLOCK, RTETextBlock.
|
|
4785
|
-
ActionHandleStrategyRegistry.register(exports.ModifyContentActionType.TRANSFORM_LIST_BLOCK, RTETextBlock.
|
|
4871
|
+
ActionHandleStrategyRegistry.register(TextStyleAnnotationAction.typeName, RTETextBlock.typeName, new BlockUpdateTextStyleStrategy());
|
|
4872
|
+
ActionHandleStrategyRegistry.register(HorizontalAlignmentAnnotationAction.typeName, RTETextBlock.typeName, new BlockUpdateHorizontalAlignmentStrategy());
|
|
4873
|
+
ActionHandleStrategyRegistry.register(IndentAnnotationAction.typeName, RTETextBlock.typeName, new BlockUpdateIndentStrategy());
|
|
4874
|
+
ActionHandleStrategyRegistry.register(LinkGroupAnnotationAction.typeName, RTETextBlock.typeName, new BlockUpdateLinkGroupStrategy());
|
|
4875
|
+
ActionHandleStrategyRegistry.register(exports.ModifyContentActionType.UNLINK_LINK_GROUP, RTETextBlock.typeName, new BlockUnlinkLinkGroupStrategy());
|
|
4876
|
+
ActionHandleStrategyRegistry.register(exports.ModifyContentActionType.SPLIT_BLOCK_WITH_NODE, RTETextBlock.typeName, new BlockSplitWithTextNodeStrategy());
|
|
4877
|
+
ActionHandleStrategyRegistry.register(exports.ModifyContentActionType.REPLACE_CHILD_NODES, RTETextBlock.typeName, new BlockReplaceNodesStrategy());
|
|
4878
|
+
ActionHandleStrategyRegistry.register(exports.ModifyContentActionType.MERGE_TWO_BLOCKS_NODES, RTETextBlock.typeName, new BlockMergeNodesStrategy());
|
|
4879
|
+
ActionHandleStrategyRegistry.register(exports.ModifyContentActionType.LINE_BREAK_SINGLE_BLOCK, RTETextBlock.typeName, new BlockInsertLineBreakStrategy());
|
|
4880
|
+
ActionHandleStrategyRegistry.register(exports.ModifyContentActionType.LINE_BREAK_MULTIPLE_BLOCKS, RTETextBlock.typeName, new BlockInsertLineBreakWithBlocksStrategy());
|
|
4881
|
+
ActionHandleStrategyRegistry.register(exports.ModifyContentActionType.INSERT_IMAGE_TO_BLOCK, RTETextBlock.typeName, new BlockInsertImageIntoTextStrategy());
|
|
4882
|
+
ActionHandleStrategyRegistry.register(exports.ModifyContentActionType.TRANSFORM_LIST_BLOCK, RTETextBlock.typeName, new BlockTransformToListStrategy());
|
|
4786
4883
|
})();
|
|
4787
|
-
RTETextBlock.dtoName = 'RTETextBlock';
|
|
4788
4884
|
|
|
4789
4885
|
/**
|
|
4790
4886
|
* Remove list item nest list block strategy.
|
|
@@ -4940,7 +5036,6 @@ class ListItemInsertImageStrategy extends ActionHandleStrategy {
|
|
|
4940
5036
|
class RTEListItemBlock extends RTETextBlock {
|
|
4941
5037
|
constructor(id, nestList, options) {
|
|
4942
5038
|
super(id, 'list-item', options);
|
|
4943
|
-
this.dtoName = RTEListItemBlock.dtoName;
|
|
4944
5039
|
/**
|
|
4945
5040
|
* TODO: Refactor the list item properties children and nestList, merge two properties together.
|
|
4946
5041
|
*
|
|
@@ -4959,7 +5054,8 @@ class RTEListItemBlock extends RTETextBlock {
|
|
|
4959
5054
|
*/
|
|
4960
5055
|
static from(block, options = { autoMatchFormat: true }) {
|
|
4961
5056
|
const listItemBlock = new RTEListItemBlock(block.id, undefined, options);
|
|
4962
|
-
|
|
5057
|
+
// Do not coerce list nodes to text; bookmarks, tokens and other extension nodes are polymorphic text nodes.
|
|
5058
|
+
listItemBlock.children = RTEListItemBlock.convertNodes(block.nodes, listItemBlock, options);
|
|
4963
5059
|
if (block.children) {
|
|
4964
5060
|
listItemBlock.nestList = block.children.map((child) => {
|
|
4965
5061
|
const listBlock = RTEListBlock.from(child, options);
|
|
@@ -5046,19 +5142,20 @@ class RTEListItemBlock extends RTETextBlock {
|
|
|
5046
5142
|
return block;
|
|
5047
5143
|
}
|
|
5048
5144
|
}
|
|
5145
|
+
RTEListItemBlock.typeName = 'RTEListItemBlock';
|
|
5146
|
+
// eslint-disable-next-line @globalpayments/vega-eslint/vega-class-member-order-rule
|
|
5049
5147
|
(() => {
|
|
5050
|
-
ActionHandleStrategyRegistry.register(TextStyleAnnotationAction.
|
|
5051
|
-
ActionHandleStrategyRegistry.register(HorizontalAlignmentAnnotationAction.
|
|
5052
|
-
ActionHandleStrategyRegistry.register(exports.ModifyContentActionType.LINE_BREAK_SINGLE_BLOCK, RTEListItemBlock.
|
|
5053
|
-
ActionHandleStrategyRegistry.register(exports.ModifyContentActionType.LINE_BREAK_MULTIPLE_BLOCKS, RTEListItemBlock.
|
|
5054
|
-
ActionHandleStrategyRegistry.register(exports.ModifyContentActionType.DELETE_NEST_LIST, RTEListItemBlock.
|
|
5055
|
-
ActionHandleStrategyRegistry.register(exports.ModifyContentActionType.SPLIT_BLOCK_WITH_NODE, RTEListItemBlock.
|
|
5056
|
-
ActionHandleStrategyRegistry.register(exports.ModifyContentActionType.REPLACE_CHILD_NODES, RTEListItemBlock.
|
|
5057
|
-
ActionHandleStrategyRegistry.register(exports.ModifyContentActionType.REPLACE_NEST_LIST, RTEListItemBlock.
|
|
5058
|
-
ActionHandleStrategyRegistry.register(exports.ModifyContentActionType.MERGE_TWO_BLOCKS_NODES, RTEListItemBlock.
|
|
5059
|
-
ActionHandleStrategyRegistry.register(exports.ModifyContentActionType.INSERT_IMAGE_TO_BLOCK, RTEListItemBlock.
|
|
5148
|
+
ActionHandleStrategyRegistry.register(TextStyleAnnotationAction.typeName, RTEListItemBlock.typeName, new BlockUpdateTextStyleStrategy());
|
|
5149
|
+
ActionHandleStrategyRegistry.register(HorizontalAlignmentAnnotationAction.typeName, RTEListItemBlock.typeName, new BlockUpdateHorizontalAlignmentStrategy());
|
|
5150
|
+
ActionHandleStrategyRegistry.register(exports.ModifyContentActionType.LINE_BREAK_SINGLE_BLOCK, RTEListItemBlock.typeName, new BlockInsertLineBreakStrategy());
|
|
5151
|
+
ActionHandleStrategyRegistry.register(exports.ModifyContentActionType.LINE_BREAK_MULTIPLE_BLOCKS, RTEListItemBlock.typeName, new BlockInsertLineBreakWithBlocksStrategy());
|
|
5152
|
+
ActionHandleStrategyRegistry.register(exports.ModifyContentActionType.DELETE_NEST_LIST, RTEListItemBlock.typeName, new ListItemRemoveNestListStrategy());
|
|
5153
|
+
ActionHandleStrategyRegistry.register(exports.ModifyContentActionType.SPLIT_BLOCK_WITH_NODE, RTEListItemBlock.typeName, new BlockSplitWithTextNodeStrategy());
|
|
5154
|
+
ActionHandleStrategyRegistry.register(exports.ModifyContentActionType.REPLACE_CHILD_NODES, RTEListItemBlock.typeName, new BlockReplaceNodesStrategy());
|
|
5155
|
+
ActionHandleStrategyRegistry.register(exports.ModifyContentActionType.REPLACE_NEST_LIST, RTEListItemBlock.typeName, new ListItemReplaceNestListStrategy());
|
|
5156
|
+
ActionHandleStrategyRegistry.register(exports.ModifyContentActionType.MERGE_TWO_BLOCKS_NODES, RTEListItemBlock.typeName, new BlockMergeNodesStrategy());
|
|
5157
|
+
ActionHandleStrategyRegistry.register(exports.ModifyContentActionType.INSERT_IMAGE_TO_BLOCK, RTEListItemBlock.typeName, new ListItemInsertImageStrategy());
|
|
5060
5158
|
})();
|
|
5061
|
-
RTEListItemBlock.dtoName = 'RTEListItemBlock';
|
|
5062
5159
|
|
|
5063
5160
|
/**
|
|
5064
5161
|
* Replace the nest list with new list array
|
|
@@ -5270,7 +5367,6 @@ class TransformParagraphAction extends ModifyContentAction {
|
|
|
5270
5367
|
class RTEHtmlBlock extends RTEBlock {
|
|
5271
5368
|
constructor(id, htmlTag) {
|
|
5272
5369
|
super(id);
|
|
5273
|
-
this.dtoName = RTEHtmlBlock.dtoName;
|
|
5274
5370
|
this.type = 'html-block';
|
|
5275
5371
|
this.children = [];
|
|
5276
5372
|
this.htmlTag = htmlTag;
|
|
@@ -5341,7 +5437,7 @@ class RTEHtmlBlock extends RTEBlock {
|
|
|
5341
5437
|
return Object.assign(Object.assign({}, super.toJSON()), { id: this.id, type: this.type, htmlTag: this.htmlTag, children: this.children.map((child) => child.toJSON()) });
|
|
5342
5438
|
}
|
|
5343
5439
|
}
|
|
5344
|
-
RTEHtmlBlock.
|
|
5440
|
+
RTEHtmlBlock.typeName = 'RTEHtmlBlock';
|
|
5345
5441
|
|
|
5346
5442
|
/**
|
|
5347
5443
|
* Convert the selected list block to paragraph strategy.
|
|
@@ -5649,8 +5745,8 @@ class ListTransformToParagraphStrategy extends ListAnnotationStrategy {
|
|
|
5649
5745
|
return null;
|
|
5650
5746
|
}
|
|
5651
5747
|
path.unshift(itemIndex);
|
|
5652
|
-
if (currentList.parent.
|
|
5653
|
-
currentList.parent.
|
|
5748
|
+
if (currentList.parent.typeName === 'VegaRTEContent' ||
|
|
5749
|
+
currentList.parent.typeName === 'RTEHtmlBlock') {
|
|
5654
5750
|
const containerPath = this.getContainerPath(currentList);
|
|
5655
5751
|
return containerPath ? [...containerPath, ...path] : null;
|
|
5656
5752
|
}
|
|
@@ -6061,7 +6157,6 @@ class ListAnnotation extends BlockAnnotation {
|
|
|
6061
6157
|
class RTEListBlock extends RTEBlock {
|
|
6062
6158
|
constructor(id, type, options) {
|
|
6063
6159
|
super(id);
|
|
6064
|
-
this.dtoName = RTEListBlock.dtoName;
|
|
6065
6160
|
this.type = 'bullet-list';
|
|
6066
6161
|
this.children = [];
|
|
6067
6162
|
this.type = type;
|
|
@@ -6166,14 +6261,15 @@ class RTEListBlock extends RTEBlock {
|
|
|
6166
6261
|
return this.type === 'number-list' ? 'ol' : 'ul';
|
|
6167
6262
|
}
|
|
6168
6263
|
}
|
|
6264
|
+
RTEListBlock.typeName = 'RTEListBlock';
|
|
6265
|
+
// eslint-disable-next-line @globalpayments/vega-eslint/vega-class-member-order-rule
|
|
6169
6266
|
(() => {
|
|
6170
|
-
ActionHandleStrategyRegistry.register(exports.ModifyContentActionType.TRANSFORM_LIST_BLOCK, RTEListBlock.
|
|
6171
|
-
ActionHandleStrategyRegistry.register(exports.ModifyContentActionType.TRANSFORM_PARAGRAPH_BLOCK, RTEListBlock.
|
|
6172
|
-
ActionHandleStrategyRegistry.register(exports.ModifyContentActionType.INSERT_IMAGE_TO_BLOCK, RTEListBlock.
|
|
6173
|
-
ActionHandleStrategyRegistry.register(exports.ModifyContentActionType.NEST_LIST_ITEMS, RTEListBlock.
|
|
6174
|
-
ActionHandleStrategyRegistry.register(exports.ModifyContentActionType.UNNEST_LIST_ITEMS, RTEListBlock.
|
|
6267
|
+
ActionHandleStrategyRegistry.register(exports.ModifyContentActionType.TRANSFORM_LIST_BLOCK, RTEListBlock.typeName, new ListTransformToListStrategy());
|
|
6268
|
+
ActionHandleStrategyRegistry.register(exports.ModifyContentActionType.TRANSFORM_PARAGRAPH_BLOCK, RTEListBlock.typeName, new ListTransformToParagraphStrategy());
|
|
6269
|
+
ActionHandleStrategyRegistry.register(exports.ModifyContentActionType.INSERT_IMAGE_TO_BLOCK, RTEListBlock.typeName, new ListInsertImageStrategy());
|
|
6270
|
+
ActionHandleStrategyRegistry.register(exports.ModifyContentActionType.NEST_LIST_ITEMS, RTEListBlock.typeName, new ListNestItemsStrategy());
|
|
6271
|
+
ActionHandleStrategyRegistry.register(exports.ModifyContentActionType.UNNEST_LIST_ITEMS, RTEListBlock.typeName, new ListUnnestItemsStrategy());
|
|
6175
6272
|
})();
|
|
6176
|
-
RTEListBlock.dtoName = 'RTEListBlock';
|
|
6177
6273
|
|
|
6178
6274
|
/**
|
|
6179
6275
|
* The delete node content contains some common functions that used for image block delete the image node or text block delete text node.
|
|
@@ -6339,7 +6435,7 @@ class BlockDeleteNodeContentStrategy extends ActionHandleStrategy {
|
|
|
6339
6435
|
* @returns {boolean} True if the block is not the root content block, false otherwise.
|
|
6340
6436
|
*/
|
|
6341
6437
|
isRTEBlock(block) {
|
|
6342
|
-
return block && block.
|
|
6438
|
+
return block && block.typeName !== 'VegaRTEContent';
|
|
6343
6439
|
}
|
|
6344
6440
|
}
|
|
6345
6441
|
|
|
@@ -6489,6 +6585,7 @@ class SelectionChangeAction extends AnnotationAction {
|
|
|
6489
6585
|
return new SelectionRangeAnnotation(this.range);
|
|
6490
6586
|
}
|
|
6491
6587
|
}
|
|
6588
|
+
SelectionChangeAction.typeName = 'SelectionChangeAction';
|
|
6492
6589
|
|
|
6493
6590
|
/**
|
|
6494
6591
|
* Update the code block node annotation map strategy.
|
|
@@ -6553,6 +6650,7 @@ class RTEDecoratorNode extends RTENode {
|
|
|
6553
6650
|
return false;
|
|
6554
6651
|
}
|
|
6555
6652
|
}
|
|
6653
|
+
RTEDecoratorNode.typeName = 'RTEDecoratorNode';
|
|
6556
6654
|
// CSS class names for the decorator node parent element
|
|
6557
6655
|
RTEDecoratorNode.DECORATOR_CONTAINER_CLASS = 'v-internal-decorator-container';
|
|
6558
6656
|
// CSS class names for the decorator node element
|
|
@@ -6610,7 +6708,6 @@ CodeBlockNodeFilterStylesStrategy.STYLES = {
|
|
|
6610
6708
|
class RTECodeBlockNode extends RTEDecoratorNode {
|
|
6611
6709
|
constructor(id, content, language, parentBlock) {
|
|
6612
6710
|
super(id);
|
|
6613
|
-
this.dtoName = RTECodeBlockNode.dtoName;
|
|
6614
6711
|
this.type = exports.NodeTypeEnum.CODE_BLOCK_NODE;
|
|
6615
6712
|
this.text = '';
|
|
6616
6713
|
this.annotationMap = new Map();
|
|
@@ -6660,11 +6757,12 @@ class RTECodeBlockNode extends RTEDecoratorNode {
|
|
|
6660
6757
|
ActionHandleStrategyRegistry.executeTheStrategy(action, this);
|
|
6661
6758
|
}
|
|
6662
6759
|
}
|
|
6760
|
+
RTECodeBlockNode.typeName = 'RTECodeBlockNode';
|
|
6761
|
+
// eslint-disable-next-line @globalpayments/vega-eslint/vega-class-member-order-rule
|
|
6663
6762
|
(() => {
|
|
6664
|
-
ActionHandleStrategyRegistry.register(exports.ModifyContentActionType.UPDATE_CODE_BLOCK, RTECodeBlockNode.
|
|
6665
|
-
ActionHandleStrategyRegistry.register(SelectionChangeAction.
|
|
6763
|
+
ActionHandleStrategyRegistry.register(exports.ModifyContentActionType.UPDATE_CODE_BLOCK, RTECodeBlockNode.typeName, new UpdateCodeBlockStrategy());
|
|
6764
|
+
ActionHandleStrategyRegistry.register(SelectionChangeAction.typeName, RTECodeBlockNode.typeName, new CodeNodeSetSelectionRangeAnnotationStrategy());
|
|
6666
6765
|
})();
|
|
6667
|
-
RTECodeBlockNode.dtoName = 'RTECodeBlockNode';
|
|
6668
6766
|
|
|
6669
6767
|
/**
|
|
6670
6768
|
* Insert image behind after code block strategy.
|
|
@@ -6731,7 +6829,7 @@ class CodeBlockFilterStylesStrategy extends RTEFilterStylesStrategy {
|
|
|
6731
6829
|
* @inheritDoc
|
|
6732
6830
|
*/
|
|
6733
6831
|
canFilter(blockOrNodeInstance) {
|
|
6734
|
-
return Predicate.isCodeBlock(blockOrNodeInstance.
|
|
6832
|
+
return Predicate.isCodeBlock(blockOrNodeInstance.typeName);
|
|
6735
6833
|
}
|
|
6736
6834
|
/**
|
|
6737
6835
|
* 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.
|
|
@@ -6762,7 +6860,6 @@ CodeBlockFilterStylesStrategy.STYLES = {
|
|
|
6762
6860
|
class RTECodeBlock extends RTEBlock {
|
|
6763
6861
|
constructor(id, content, language) {
|
|
6764
6862
|
super(id);
|
|
6765
|
-
this.dtoName = RTECodeBlock.dtoName;
|
|
6766
6863
|
this.type = 'code-block';
|
|
6767
6864
|
this.annotationMap = new Map([CustomStyleAnnotation.from(CodeBlockFilterStylesStrategy.STYLES)]);
|
|
6768
6865
|
this.children = [new RTECodeBlockNode(`${id}-1`, content, language, this)];
|
|
@@ -6844,14 +6941,15 @@ class RTECodeBlock extends RTEBlock {
|
|
|
6844
6941
|
return this.children[0].annotationMap.has(exports.InternalAnnotationTypeEnum.SELECTION_RANGE);
|
|
6845
6942
|
}
|
|
6846
6943
|
}
|
|
6944
|
+
RTECodeBlock.typeName = 'RTECodeBlock';
|
|
6945
|
+
// eslint-disable-next-line @globalpayments/vega-eslint/vega-class-member-order-rule
|
|
6847
6946
|
(() => {
|
|
6848
|
-
ActionHandleStrategyRegistry.register(exports.ModifyContentActionType.DELETE_CODE_BLOCK, RTECodeBlock.
|
|
6849
|
-
ActionHandleStrategyRegistry.register(exports.ModifyContentActionType.DELETE_CHILDREN, RTECodeBlock.
|
|
6850
|
-
ActionHandleStrategyRegistry.register(exports.ModifyContentActionType.SWITCH_OUT_FROM_CODE_BLOCK, RTECodeBlock.
|
|
6851
|
-
ActionHandleStrategyRegistry.register(exports.ModifyContentActionType.INSERT_IMAGE_TO_BLOCK, RTECodeBlock.
|
|
6947
|
+
ActionHandleStrategyRegistry.register(exports.ModifyContentActionType.DELETE_CODE_BLOCK, RTECodeBlock.typeName, new CodeBlockRemoveSelfStrategy());
|
|
6948
|
+
ActionHandleStrategyRegistry.register(exports.ModifyContentActionType.DELETE_CHILDREN, RTECodeBlock.typeName, new RemoveChildrenStrategy());
|
|
6949
|
+
ActionHandleStrategyRegistry.register(exports.ModifyContentActionType.SWITCH_OUT_FROM_CODE_BLOCK, RTECodeBlock.typeName, new SwitchOutFromCodeBlockStrategy());
|
|
6950
|
+
ActionHandleStrategyRegistry.register(exports.ModifyContentActionType.INSERT_IMAGE_TO_BLOCK, RTECodeBlock.typeName, new CodeBlockInsertImageStrategy());
|
|
6852
6951
|
})();
|
|
6853
6952
|
RTECodeBlock.CODE_BLOCK_PLACEHOLDER_CLASS_NAME = 'code-block-placeholder-element';
|
|
6854
|
-
RTECodeBlock.dtoName = 'RTECodeBlock';
|
|
6855
6953
|
|
|
6856
6954
|
exports.ActionHandleStrategy = ActionHandleStrategy;
|
|
6857
6955
|
exports.ActionHandleStrategyRegistry = ActionHandleStrategyRegistry;
|
|
@@ -6876,6 +6974,7 @@ exports.CommonAnnotation = CommonAnnotation;
|
|
|
6876
6974
|
exports.CustomAttributeAnnotation = CustomAttributeAnnotation;
|
|
6877
6975
|
exports.CustomClassAnnotation = CustomClassAnnotation;
|
|
6878
6976
|
exports.CustomStyleAnnotation = CustomStyleAnnotation;
|
|
6977
|
+
exports.DeleteNodeAnnotationAction = DeleteNodeAnnotationAction;
|
|
6879
6978
|
exports.HTML_VOID_TAGS = HTML_VOID_TAGS;
|
|
6880
6979
|
exports.HorizontalAlignmentAnnotation = HorizontalAlignmentAnnotation;
|
|
6881
6980
|
exports.HorizontalAlignmentAnnotationAction = HorizontalAlignmentAnnotationAction;
|
|
@@ -6939,4 +7038,5 @@ exports.VegaRTEPresetToolbarItems = VegaRTEPresetToolbarItems;
|
|
|
6939
7038
|
exports.ZERO_WIDTH_SPACE = ZERO_WIDTH_SPACE;
|
|
6940
7039
|
exports.createStyleMapFromElement = createStyleMapFromElement;
|
|
6941
7040
|
exports.escapeHtml = escapeHtml;
|
|
7041
|
+
exports.escapeHtmlAttribute = escapeHtmlAttribute;
|
|
6942
7042
|
exports.stateEntityRenderingRegistry = stateEntityRenderingRegistry;
|