@heartlandone/vega 2.89.0 → 2.90.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{app-globals-4872f4e6.js → app-globals-08924736.js} +9 -7
- package/dist/cjs/{code-block-7c49d175.js → code-block-89850671.js} +1 -1
- package/dist/cjs/{component-value-history-controller-slimmer.abstract-aae22ddf.js → component-value-history-controller-slimmer.abstract-a8da4087.js} +3 -3
- package/dist/cjs/{content-state-76b81780.js → content-state-e1c3efe6.js} +2 -2
- package/dist/cjs/{date-required-rule-71f71b32.js → date-required-rule-3437acbc.js} +1 -1
- package/dist/cjs/{design-token-c80d3f32.js → design-token-939bf72c.js} +3 -3
- package/dist/cjs/{element-appender-slimmer-e95427b5.js → element-appender-slimmer-14e85a91.js} +2 -2
- package/dist/cjs/{form-field-controller-slimmer-430b4f02.js → form-field-controller-slimmer-c4ebee27.js} +1 -1
- package/dist/cjs/{image-annotation-action-7959fd77.js → image-annotation-action-f86690fd.js} +26 -2
- package/dist/cjs/index.cjs.js +19 -19
- package/dist/cjs/{inject-keyboard-manager-3ccf1cb6.js → inject-keyboard-manager-743de047.js} +1 -1
- package/dist/cjs/{internal-translation-controller-5582d789.js → internal-translation-controller-9785d4e8.js} +4 -0
- package/dist/cjs/{keyboard-manager-5babfda8.js → keyboard-manager-5396083a.js} +1 -1
- package/dist/cjs/{keyboard-manager-slimmer-a73354ca.js → keyboard-manager-slimmer-eedcfbc8.js} +1 -1
- package/dist/cjs/link-extension-dafeeed0.js +583 -0
- package/dist/cjs/loader.cjs.js +11 -12
- package/dist/cjs/{month-view-generator-43e75062.js → month-view-generator-c7492e06.js} +1 -1
- package/dist/cjs/{public-rules-b23ab52d.js → public-rules-b032050f.js} +7 -7
- package/dist/cjs/{range-abe1b989.js → range-efdf6f78.js} +1 -1
- package/dist/cjs/{replace-selected-text-action-ef079fed.js → replace-selected-text-action-0f7b7c78.js} +1 -1
- package/dist/cjs/{responsive-format-facade-cc368403.js → responsive-format-facade-d112aa9f.js} +1 -1
- package/dist/cjs/{rich-text-editor-required-rule-bbd727a2.js → rich-text-editor-required-rule-86d9cd4d.js} +1 -1
- package/dist/cjs/{split-cell-operation-b1fe91b5.js → split-cell-operation-b41344bd.js} +3 -3
- package/dist/cjs/{state-border-formatter-398134c1.js → state-border-formatter-c3c9b90d.js} +1 -1
- package/dist/cjs/{string-format-strategy.abstract-67421e2b.js → string-format-strategy.abstract-d51050cd.js} +1 -1
- package/dist/cjs/{string-input-formatter-slimmer-e84530b9.js → string-input-formatter-slimmer-23fdb50e.js} +1 -1
- package/dist/cjs/{string-mask-strategy-f9806f9b.js → string-mask-strategy-10fe0f6d.js} +2 -2
- package/dist/cjs/{style-formatter-da3a556b.js → style-formatter-11c95331.js} +2 -2
- package/dist/cjs/{time-required-rule-618109fa.js → time-required-rule-2fd7c828.js} +1 -1
- package/dist/cjs/{token-extension-dfee303a.js → token-extension-2e3e1631.js} +125 -498
- package/dist/cjs/{translation-slimmer-1a7a2b6d.js → translation-slimmer-e8549aff.js} +17 -1
- package/dist/cjs/{type-guard-474dec0d.js → type-guard-9917b11f.js} +1 -1
- package/dist/cjs/{valid-credit-card-number-rule-00c18527.js → valid-credit-card-number-rule-8c541bcd.js} +1 -1
- package/dist/cjs/vega-accordion.cjs.entry.js +6 -6
- package/dist/cjs/vega-app-header-button.cjs.entry.js +5 -5
- package/dist/cjs/vega-box.cjs.entry.js +6 -6
- package/dist/cjs/vega-button-circle.cjs.entry.js +5 -5
- package/dist/cjs/vega-button.cjs.entry.js +3 -3
- package/dist/cjs/vega-calendar_4.cjs.entry.js +6 -6
- package/dist/cjs/vega-card.cjs.entry.js +5 -5
- package/dist/cjs/vega-carousel.cjs.entry.js +3 -3
- package/dist/cjs/vega-checkbox_2.cjs.entry.js +14 -7
- package/dist/cjs/vega-chip.cjs.entry.js +5 -5
- package/dist/cjs/vega-code-block.cjs.entry.js +8 -8
- package/dist/cjs/vega-color-picker.cjs.entry.js +2 -2
- package/dist/cjs/vega-color-swatch-picker.cjs.entry.js +3 -3
- package/dist/cjs/vega-color-swatch.cjs.entry.js +2 -2
- package/dist/cjs/vega-combo-box.cjs.entry.js +8 -8
- package/dist/cjs/vega-date-picker_2.cjs.entry.js +13 -13
- package/dist/cjs/vega-dialog_2.cjs.entry.js +3 -3
- package/dist/cjs/vega-divider.cjs.entry.js +5 -5
- package/dist/cjs/vega-dropdown_5.cjs.entry.js +7 -7
- package/dist/cjs/vega-env-manager-23b8b23c.js +2 -2
- package/dist/cjs/vega-field-label.cjs.entry.js +3 -3
- package/dist/cjs/vega-file-uploader.cjs.entry.js +3 -3
- package/dist/cjs/vega-flag-icon.cjs.entry.js +5 -5
- package/dist/cjs/vega-flex.cjs.entry.js +6 -6
- package/dist/cjs/vega-font.cjs.entry.js +5 -5
- package/dist/cjs/vega-form.cjs.entry.js +3 -3
- package/dist/cjs/vega-grid.cjs.entry.js +5 -5
- package/dist/cjs/vega-icon.cjs.entry.js +5 -5
- package/dist/cjs/vega-image-uploader.cjs.entry.js +5 -5
- package/dist/cjs/vega-input-credit-card.cjs.entry.js +17 -7
- package/dist/cjs/vega-input-numeric.cjs.entry.js +5 -5
- package/dist/cjs/vega-input-passcode.cjs.entry.js +5 -5
- package/dist/cjs/vega-input-phone-number.cjs.entry.js +4 -4
- package/dist/cjs/vega-input-range.cjs.entry.js +3 -3
- package/dist/cjs/vega-input-select.cjs.entry.js +5 -5
- package/dist/cjs/vega-input.cjs.entry.js +6 -6
- package/dist/cjs/vega-left-nav_5.cjs.entry.js +7 -7
- package/dist/cjs/vega-loader-wrapper_2.cjs.entry.js +3 -3
- package/dist/cjs/vega-pagination-page-size-selector-mobile.cjs.entry.js +2 -2
- package/dist/cjs/vega-pagination.cjs.entry.js +4 -4
- package/dist/cjs/vega-popover_2.cjs.entry.js +8 -8
- package/dist/cjs/vega-progress-tracker_2.cjs.entry.js +3 -3
- package/dist/cjs/vega-radio_2.cjs.entry.js +17 -10
- package/dist/cjs/vega-rich-text-content.cjs.entry.js +63 -31
- package/dist/cjs/vega-rich-text-editor_4.cjs.entry.js +65 -22
- package/dist/cjs/vega-rich-text-special-characters-panel.cjs.entry.js +5 -5
- package/dist/cjs/vega-rich-text-table-properties_3.cjs.entry.js +8 -8
- package/dist/cjs/vega-selection-chip_2.cjs.entry.js +18 -5
- package/dist/cjs/vega-selection-tile_2.cjs.entry.js +2 -2
- package/dist/cjs/vega-sidenav_3.cjs.entry.js +3 -3
- package/dist/cjs/vega-signature-capture.cjs.entry.js +7 -7
- package/dist/cjs/vega-stepper.cjs.entry.js +2 -2
- package/dist/cjs/vega-tab-group_2.cjs.entry.js +8 -5
- package/dist/cjs/vega-table_11.cjs.entry.js +4 -4
- package/dist/cjs/vega-textarea.cjs.entry.js +2 -2
- package/dist/cjs/vega-time-picker_2.cjs.entry.js +9 -9
- package/dist/cjs/vega-toggle-switch.cjs.entry.js +2 -2
- package/dist/cjs/vega-tooltip_2.cjs.entry.js +6 -6
- package/dist/cjs/vega.cjs.js +11 -12
- package/dist/collection/components/vega-checkbox/vega-checkbox-group/vega-checkbox-group.css +8 -11
- package/dist/collection/components/vega-checkbox/vega-checkbox-group/vega-checkbox-group.js +35 -7
- package/dist/collection/components/vega-field-label/vega-field-label.js +2 -2
- package/dist/collection/components/vega-input-credit-card/vega-input-credit-card.js +35 -1
- package/dist/collection/components/vega-radio/vega-radio-group/vega-radio-group.css +8 -11
- package/dist/collection/components/vega-radio/vega-radio-group/vega-radio-group.js +35 -7
- package/dist/collection/components/vega-rich-text-editor/dto/renderers/blocks/link-wrapper-renderer.js +36 -1
- package/dist/collection/components/vega-rich-text-editor/extensions/base-toolbar-button-renderer.js +15 -12
- package/dist/collection/components/vega-rich-text-editor/extensions/extension.abstract.js +11 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/functions/renderers/function-toolbar-button-renderer.js +1 -1
- package/dist/collection/components/vega-rich-text-editor/extensions/languages/language-toolbar-button-renderer.js +30 -16
- 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/link/link-extension.js +34 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/link/type.js +1 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/link/utils.js +22 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/rte-extension-state-store.js +37 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/tokens/token-toolbar-button-renderer.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/renderers/toolbar-renderer.js +5 -3
- package/dist/collection/components/vega-rich-text-editor/vega-rich-text-editor.js +39 -1
- package/dist/collection/components/vega-rich-text-editor/vega-rich-text-link-editor/slimmers/renderers/vega-rich-text-link-editor-renderer.js +13 -4
- package/dist/collection/components/vega-selection-chip/vega-selection-chip-group/slimmers/renderers/vega-selection-chip-group-renderer.js +4 -1
- package/dist/collection/components/vega-selection-chip/vega-selection-chip-group/vega-selection-chip-group.js +34 -0
- package/dist/collection/components/vega-tab-group/slimmers/vega-tab-group/controllers/vega-tab-group-pages-controller.js +4 -2
- package/dist/collection/components/vega-tab-group/vega-tab-group.js +5 -4
- package/dist/collection/global/scripts/before-vega-load.js +2 -0
- package/dist/collection/helpers/slimmers/translation/translation-slimmer.js +16 -0
- package/dist/collection/helpers/translation/locales/en.js +4 -0
- package/dist/esm/{app-globals-081bbfd9.js → app-globals-a4134d21.js} +9 -7
- package/dist/esm/{code-block-17f596fc.js → code-block-9a17d89b.js} +2 -2
- package/dist/esm/{component-value-history-controller-slimmer.abstract-21e9126a.js → component-value-history-controller-slimmer.abstract-a64c3678.js} +3 -3
- package/dist/esm/{content-state-96741bb0.js → content-state-d59b4560.js} +3 -3
- package/dist/esm/{date-required-rule-d6ce832c.js → date-required-rule-cb960229.js} +1 -1
- package/dist/esm/{design-token-0a575bf2.js → design-token-f73ebce9.js} +3 -3
- package/dist/esm/{element-appender-slimmer-44bbb5c6.js → element-appender-slimmer-c62cf540.js} +2 -2
- package/dist/esm/{form-field-controller-slimmer-03894a51.js → form-field-controller-slimmer-514a3195.js} +1 -1
- package/dist/esm/{image-annotation-action-e8ab7b64.js → image-annotation-action-f4ea265c.js} +26 -3
- package/dist/esm/index.js +16 -17
- package/dist/esm/{inject-keyboard-manager-e5874185.js → inject-keyboard-manager-6522df5c.js} +1 -1
- package/dist/esm/{internal-translation-controller-84958bc9.js → internal-translation-controller-653bd7e3.js} +4 -0
- package/dist/esm/{keyboard-manager-404b9c17.js → keyboard-manager-9615fa9b.js} +1 -1
- package/dist/esm/{keyboard-manager-slimmer-c8fcfe60.js → keyboard-manager-slimmer-21bdc3a4.js} +1 -1
- package/dist/esm/link-extension-be164793.js +576 -0
- package/dist/esm/loader.js +11 -12
- package/dist/esm/{month-view-generator-d341fa5a.js → month-view-generator-1b7c9bb8.js} +1 -1
- package/dist/esm/{public-rules-09387dcf.js → public-rules-58f31834.js} +7 -7
- package/dist/esm/{range-47d9f95e.js → range-1c1c20fa.js} +1 -1
- package/dist/esm/{replace-selected-text-action-a217dc89.js → replace-selected-text-action-1abc5200.js} +1 -1
- package/dist/esm/{responsive-format-facade-51c0c2e1.js → responsive-format-facade-12697af2.js} +1 -1
- package/dist/esm/{rich-text-editor-required-rule-cca16fd0.js → rich-text-editor-required-rule-050d292b.js} +1 -1
- package/dist/esm/{split-cell-operation-ddde4106.js → split-cell-operation-8251d2a1.js} +3 -3
- package/dist/esm/{state-border-formatter-50394e9c.js → state-border-formatter-55cee24d.js} +1 -1
- package/dist/esm/{string-format-strategy.abstract-de17b899.js → string-format-strategy.abstract-14c1e874.js} +1 -1
- package/dist/esm/{string-input-formatter-slimmer-c3d483ef.js → string-input-formatter-slimmer-ec297247.js} +1 -1
- package/dist/esm/{string-mask-strategy-87efdb9e.js → string-mask-strategy-18760123.js} +2 -2
- package/dist/esm/{style-formatter-c20c1988.js → style-formatter-6073ae27.js} +2 -2
- package/dist/esm/{time-required-rule-026c17a1.js → time-required-rule-9b775d24.js} +1 -1
- package/dist/esm/{token-extension-76323d76.js → token-extension-6cb7dcb2.js} +58 -429
- package/dist/esm/{translation-slimmer-7f195ba8.js → translation-slimmer-d32eb861.js} +17 -1
- package/dist/esm/{type-guard-30eec79c.js → type-guard-fd1f4760.js} +1 -1
- package/dist/esm/{valid-credit-card-number-rule-1ac471e8.js → valid-credit-card-number-rule-dfd3e0a6.js} +1 -1
- package/dist/esm/vega-accordion.entry.js +6 -6
- package/dist/esm/vega-app-header-button.entry.js +5 -5
- package/dist/esm/vega-box.entry.js +6 -6
- package/dist/esm/vega-button-circle.entry.js +5 -5
- package/dist/esm/vega-button.entry.js +3 -3
- package/dist/esm/vega-calendar_4.entry.js +6 -6
- package/dist/esm/vega-card.entry.js +5 -5
- package/dist/esm/vega-carousel.entry.js +3 -3
- package/dist/esm/vega-checkbox_2.entry.js +14 -7
- package/dist/esm/vega-chip.entry.js +5 -5
- package/dist/esm/vega-code-block.entry.js +8 -8
- package/dist/esm/vega-color-picker.entry.js +2 -2
- package/dist/esm/vega-color-swatch-picker.entry.js +3 -3
- package/dist/esm/vega-color-swatch.entry.js +2 -2
- package/dist/esm/vega-combo-box.entry.js +8 -8
- package/dist/esm/vega-date-picker_2.entry.js +13 -13
- package/dist/esm/vega-dialog_2.entry.js +3 -3
- package/dist/esm/vega-divider.entry.js +5 -5
- package/dist/esm/vega-dropdown_5.entry.js +7 -7
- package/dist/esm/vega-env-manager-8f8dc473.js +2 -2
- package/dist/esm/vega-field-label.entry.js +3 -3
- package/dist/esm/vega-file-uploader.entry.js +3 -3
- package/dist/esm/vega-flag-icon.entry.js +5 -5
- package/dist/esm/vega-flex.entry.js +6 -6
- package/dist/esm/vega-font.entry.js +5 -5
- package/dist/esm/vega-form.entry.js +3 -3
- package/dist/esm/vega-grid.entry.js +5 -5
- package/dist/esm/vega-icon.entry.js +5 -5
- package/dist/esm/vega-image-uploader.entry.js +5 -5
- package/dist/esm/vega-input-credit-card.entry.js +17 -7
- package/dist/esm/vega-input-numeric.entry.js +5 -5
- package/dist/esm/vega-input-passcode.entry.js +5 -5
- package/dist/esm/vega-input-phone-number.entry.js +4 -4
- package/dist/esm/vega-input-range.entry.js +3 -3
- package/dist/esm/vega-input-select.entry.js +5 -5
- package/dist/esm/vega-input.entry.js +6 -6
- package/dist/esm/vega-left-nav_5.entry.js +7 -7
- package/dist/esm/vega-loader-wrapper_2.entry.js +3 -3
- package/dist/esm/vega-pagination-page-size-selector-mobile.entry.js +2 -2
- package/dist/esm/vega-pagination.entry.js +4 -4
- package/dist/esm/vega-popover_2.entry.js +8 -8
- package/dist/esm/vega-progress-tracker_2.entry.js +3 -3
- package/dist/esm/vega-radio_2.entry.js +17 -10
- package/dist/esm/vega-rich-text-content.entry.js +40 -8
- package/dist/esm/vega-rich-text-editor_4.entry.js +64 -21
- package/dist/esm/vega-rich-text-special-characters-panel.entry.js +5 -5
- package/dist/esm/vega-rich-text-table-properties_3.entry.js +8 -8
- package/dist/esm/vega-selection-chip_2.entry.js +18 -5
- package/dist/esm/vega-selection-tile_2.entry.js +2 -2
- package/dist/esm/vega-sidenav_3.entry.js +3 -3
- package/dist/esm/vega-signature-capture.entry.js +7 -7
- package/dist/esm/vega-stepper.entry.js +2 -2
- package/dist/esm/vega-tab-group_2.entry.js +8 -5
- package/dist/esm/vega-table_11.entry.js +4 -4
- package/dist/esm/vega-textarea.entry.js +2 -2
- package/dist/esm/vega-time-picker_2.entry.js +9 -9
- package/dist/esm/vega-toggle-switch.entry.js +2 -2
- package/dist/esm/vega-tooltip_2.entry.js +6 -6
- package/dist/esm/vega.js +11 -12
- package/dist/sri/vega-sri-manifest.json +302 -306
- package/dist/types/components/vega-checkbox/vega-checkbox-group/vega-checkbox-group.d.ts +10 -1
- package/dist/types/components/vega-input-credit-card/vega-input-credit-card.d.ts +10 -0
- package/dist/types/components/vega-radio/vega-radio-group/vega-radio-group.d.ts +10 -1
- package/dist/types/components/vega-rich-text-editor/dto/renderers/blocks/link-wrapper-renderer.d.ts +3 -1
- package/dist/types/components/vega-rich-text-editor/extensions/base-toolbar-button-renderer.d.ts +8 -5
- package/dist/types/components/vega-rich-text-editor/extensions/extension.abstract.d.ts +9 -0
- package/dist/types/components/vega-rich-text-editor/extensions/languages/language-toolbar-button-renderer.d.ts +16 -12
- package/dist/types/components/vega-rich-text-editor/extensions/link/link-extension.d.ts +27 -0
- package/dist/types/components/vega-rich-text-editor/extensions/link/type.d.ts +15 -0
- package/dist/types/components/vega-rich-text-editor/extensions/link/utils.d.ts +8 -0
- package/dist/types/components/vega-rich-text-editor/extensions/rte-extension-state-store.d.ts +30 -0
- package/dist/types/components/vega-rich-text-editor/public-api.d.ts +2 -0
- package/dist/types/components/vega-rich-text-editor/slimmers/renderers/toolbar-renderer.d.ts +1 -1
- package/dist/types/components/vega-rich-text-editor/vega-rich-text-editor.d.ts +22 -0
- package/dist/types/components/vega-rich-text-editor/vega-rich-text-link-editor/slimmers/renderers/vega-rich-text-link-editor-renderer.d.ts +1 -0
- package/dist/types/components/vega-selection-chip/vega-selection-chip-group/slimmers/renderers/vega-selection-chip-group-renderer.d.ts +1 -0
- package/dist/types/components/vega-selection-chip/vega-selection-chip-group/vega-selection-chip-group.d.ts +10 -0
- package/dist/types/components/vega-tab-group/slimmers/vega-tab-group/controllers/vega-tab-group-pages-controller.d.ts +3 -2
- package/dist/types/components/vega-tab-group/vega-tab-group.d.ts +4 -3
- package/dist/types/components.d.ts +50 -2
- package/dist/types/helpers/slimmers/translation/translation-slimmer.d.ts +11 -0
- package/dist/types/helpers/translation/interface.d.ts +4 -0
- package/dist/vega/index.esm.js +1 -1
- package/dist/vega/p-02492864.entry.js +1 -0
- package/dist/vega/{p-df3a649c.entry.js → p-0278cd2b.entry.js} +1 -1
- package/dist/vega/{p-630cd479.js → p-0542b8ac.js} +1 -1
- package/dist/vega/p-0a1c7f80.js +1 -0
- package/dist/vega/{p-b9bd85d6.entry.js → p-0cc4a052.entry.js} +1 -1
- package/dist/vega/{p-976536c7.entry.js → p-1b4abd76.entry.js} +1 -1
- package/dist/vega/{p-efe6e4e6.entry.js → p-1ee185d9.entry.js} +1 -1
- package/dist/vega/{p-c3be0c29.entry.js → p-203f4ce9.entry.js} +1 -1
- package/dist/vega/p-2620a164.js +1 -0
- package/dist/vega/{p-2abdca42.js → p-277c306b.js} +1 -1
- package/dist/vega/{p-2c5352fe.entry.js → p-285e5e52.entry.js} +1 -1
- package/dist/vega/p-2c7e1bcb.js +1 -0
- package/dist/vega/{p-1ab4c08d.js → p-30487f0e.js} +1 -1
- package/dist/vega/{p-c016b230.entry.js → p-30a6b7aa.entry.js} +1 -1
- package/dist/vega/p-350d1b75.entry.js +1 -0
- package/dist/vega/{p-4c6baf92.entry.js → p-355ea330.entry.js} +1 -1
- package/dist/vega/{p-50e7020c.js → p-35d617d5.js} +1 -1
- package/dist/vega/{p-6c484462.entry.js → p-3755d8d3.entry.js} +1 -1
- package/dist/vega/{p-61536fcf.entry.js → p-3e956269.entry.js} +1 -1
- package/dist/vega/{p-fae4d64e.js → p-3ed6a602.js} +1 -1
- package/dist/vega/{p-a0705cd0.entry.js → p-4386625c.entry.js} +1 -1
- package/dist/vega/{p-b66d46ce.js → p-44f39eee.js} +1 -1
- package/dist/vega/{p-df71c830.entry.js → p-44f81987.entry.js} +1 -1
- package/dist/vega/{p-d93574dd.entry.js → p-456890f5.entry.js} +1 -1
- package/dist/vega/p-465590d1.entry.js +1 -0
- package/dist/vega/{p-f764b62e.entry.js → p-47ffdc0f.entry.js} +1 -1
- package/dist/vega/p-4fdd0a71.js +1 -0
- package/dist/vega/{p-9a562813.entry.js → p-54141828.entry.js} +1 -1
- package/dist/vega/{p-35e800ac.js → p-566ba295.js} +1 -1
- package/dist/vega/{p-baef217a.entry.js → p-581d89bb.entry.js} +1 -1
- package/dist/vega/p-5f048811.entry.js +1 -0
- package/dist/vega/p-5f377954.js +1 -1
- package/dist/vega/{p-8ce92f5f.entry.js → p-616d7096.entry.js} +1 -1
- package/dist/vega/{p-dbb02b32.entry.js → p-6528739f.entry.js} +1 -1
- package/dist/vega/{p-b3b22e36.entry.js → p-667c980d.entry.js} +1 -1
- package/dist/vega/{p-f597b65e.entry.js → p-6845ed5c.entry.js} +1 -1
- package/dist/vega/p-6cedb325.js +1 -0
- package/dist/vega/{p-78a6e741.entry.js → p-6d99a0b3.entry.js} +1 -1
- package/dist/vega/{p-43af604c.entry.js → p-6fec4d46.entry.js} +1 -1
- package/dist/vega/{p-337440ce.entry.js → p-716a393e.entry.js} +1 -1
- package/dist/vega/p-73ce8fef.js +1 -0
- package/dist/vega/p-788a7a5a.js +1 -0
- package/dist/vega/{p-ed0cc518.entry.js → p-7fe292af.entry.js} +1 -1
- package/dist/vega/{p-ad89f499.js → p-820ff54c.js} +1 -1
- package/dist/vega/p-82c133aa.js +1 -0
- package/dist/vega/{p-f7e8081e.js → p-844b7826.js} +1 -1
- package/dist/vega/{p-93cbc231.entry.js → p-850ea38b.entry.js} +1 -1
- package/dist/vega/p-85dcd07b.js +3 -0
- package/dist/vega/{p-3a49089e.js → p-881622fd.js} +1 -1
- package/dist/vega/{p-6a3ea3f0.entry.js → p-88c29aae.entry.js} +1 -1
- package/dist/vega/{p-a9b6ce74.js → p-8a054a13.js} +1 -1
- package/dist/vega/{p-bd5566e3.entry.js → p-8d9c4338.entry.js} +1 -1
- package/dist/vega/{p-26a54a73.entry.js → p-939c486f.entry.js} +1 -1
- package/dist/vega/{p-76454c9a.js → p-97e7da55.js} +1 -1
- package/dist/vega/{p-89d55444.entry.js → p-99545fd7.entry.js} +1 -1
- package/dist/vega/{p-157a2459.entry.js → p-99ea0fa0.entry.js} +1 -1
- package/dist/vega/{p-be6c1415.js → p-a809b33a.js} +1 -1
- package/dist/vega/{p-8865613a.entry.js → p-a9a70696.entry.js} +1 -1
- package/dist/vega/{p-9cb92fa3.entry.js → p-aae71499.entry.js} +1 -1
- package/dist/vega/{p-b2488adb.js → p-b0f55f5f.js} +1 -1
- package/dist/vega/{p-09deb867.entry.js → p-b5c08306.entry.js} +1 -1
- package/dist/vega/{p-c91e0a43.js → p-b7c90543.js} +1 -1
- package/dist/vega/{p-fc0ce3b5.entry.js → p-bcd3bd79.entry.js} +1 -1
- package/dist/vega/{p-8457b6b7.entry.js → p-bce9f489.entry.js} +1 -1
- package/dist/vega/{p-57b34bf9.entry.js → p-c0a6ed53.entry.js} +1 -1
- package/dist/vega/{p-48ea74b5.entry.js → p-c1c5bd2c.entry.js} +1 -1
- package/dist/vega/{p-f7cab150.entry.js → p-c5621f60.entry.js} +1 -1
- package/dist/vega/{p-94a064a3.js → p-c596bb49.js} +1 -1
- package/dist/vega/{p-dd529875.js → p-c9c42a07.js} +1 -1
- package/dist/vega/{p-d1cc3544.entry.js → p-d0e7c14b.entry.js} +1 -1
- package/dist/vega/{p-cdde6e64.entry.js → p-d6422004.entry.js} +1 -1
- package/dist/vega/{p-1e68e217.entry.js → p-d76cb9da.entry.js} +1 -1
- package/dist/vega/{p-c4bd6cf8.entry.js → p-d871e8eb.entry.js} +1 -1
- package/dist/vega/p-d905159c.entry.js +1 -0
- package/dist/vega/{p-285b161c.entry.js → p-dfda6e01.entry.js} +1 -1
- package/dist/vega/{p-3390bb20.js → p-e30a4f3e.js} +1 -1
- package/dist/vega/{p-059ba5f5.entry.js → p-e8c5a446.entry.js} +1 -1
- package/dist/vega/{p-091fbc35.js → p-eb927e2b.js} +1 -1
- package/dist/vega/{p-fbde6153.js → p-ecea4d24.js} +1 -1
- package/dist/vega/{p-44d2f9e7.entry.js → p-ed1dbc98.entry.js} +1 -1
- package/dist/vega/p-f0b99c3a.entry.js +1 -0
- package/dist/vega/{p-363e453b.js → p-f0d6e2f2.js} +1 -1
- package/dist/vega/{p-4b34df4c.entry.js → p-f251a907.entry.js} +1 -1
- package/dist/vega/{p-9a35a34f.entry.js → p-f5c8024e.entry.js} +1 -1
- package/dist/vega/{p-fa398acc.entry.js → p-f70cfac5.entry.js} +1 -1
- package/dist/vega/p-f830deb8.js +1 -0
- package/dist/vega/{p-2f2201d6.entry.js → p-f9ae396b.entry.js} +1 -1
- package/dist/vega/{p-e80e7cd9.entry.js → p-fd2a49be.entry.js} +1 -1
- package/dist/vega/{p-3ef9c69d.entry.js → p-fe573f85.entry.js} +1 -1
- package/dist/vega/vega.esm.js +1 -1
- package/package.json +1 -1
- package/dist/cjs/base-renderer-0a3b62b7.js +0 -9
- package/dist/cjs/dto-renderer-manager-7eb5c5ce.js +0 -98
- package/dist/esm/base-renderer-101f6d04.js +0 -7
- package/dist/esm/dto-renderer-manager-abc7eb5f.js +0 -96
- package/dist/vega/p-2e86aee5.js +0 -1
- package/dist/vega/p-3a5737fa.js +0 -1
- package/dist/vega/p-5f09aba8.js +0 -1
- package/dist/vega/p-5fd29f29.entry.js +0 -1
- package/dist/vega/p-66b2a285.entry.js +0 -1
- package/dist/vega/p-73508c24.js +0 -1
- package/dist/vega/p-7fbd11b0.js +0 -1
- package/dist/vega/p-894fb9c9.entry.js +0 -1
- package/dist/vega/p-89947a43.js +0 -1
- package/dist/vega/p-8a3d12e6.js +0 -1
- package/dist/vega/p-a18d280f.js +0 -3
- package/dist/vega/p-a7b5f497.js +0 -1
- package/dist/vega/p-b6c3ce6d.js +0 -1
- package/dist/vega/p-ca4773c3.entry.js +0 -1
- package/dist/vega/p-efe48ed5.entry.js +0 -1
- package/dist/vega/p-f7c6af07.js +0 -1
- package/dist/vega/p-ff24b342.entry.js +0 -1
|
@@ -8,17 +8,16 @@ const internalVegaZIndexManager = require('./internal-vega-z-index-manager-f03dd
|
|
|
8
8
|
const dynamicSlimmer = require('./dynamic-slimmer-f31fdfd7.js');
|
|
9
9
|
const pageResizeObserverSlimmer = require('./page-resize-observer-slimmer-273d62ef.js');
|
|
10
10
|
const internalVegaEventManager = require('./internal-vega-event-manager-6e49d1ca.js');
|
|
11
|
-
const internalTranslationController = require('./internal-translation-controller-
|
|
12
|
-
const contentState = require('./content-state-
|
|
13
|
-
const
|
|
14
|
-
const
|
|
15
|
-
const
|
|
16
|
-
const baseRenderer = require('./base-renderer-0a3b62b7.js');
|
|
11
|
+
const internalTranslationController = require('./internal-translation-controller-9785d4e8.js');
|
|
12
|
+
const contentState = require('./content-state-e1c3efe6.js');
|
|
13
|
+
const linkExtension = require('./link-extension-dafeeed0.js');
|
|
14
|
+
const codeBlock = require('./code-block-89850671.js');
|
|
15
|
+
const typeGuard = require('./type-guard-9917b11f.js');
|
|
17
16
|
const internalIconManager = require('./internal-icon-manager-66c48800.js');
|
|
18
17
|
const vegaNonceManager = require('./vega-nonce-manager-df69d3ed.js');
|
|
19
18
|
const domNodeSubjectObserverFactory = require('./dom-node-subject-observer-factory-c82df135.js');
|
|
20
19
|
const vegaEventId = require('./vega-event-id-37c1716f.js');
|
|
21
|
-
const splitCellOperation = require('./split-cell-operation-
|
|
20
|
+
const splitCellOperation = require('./split-cell-operation-b41344bd.js');
|
|
22
21
|
const changeManager = require('./change-manager-a297e4d2.js');
|
|
23
22
|
const vegaInternalEventId = require('./vega-internal-event-id-e138d4d6.js');
|
|
24
23
|
const remoteInvocationRegistry = require('./remote-invocation-registry-fc22fdd0.js');
|
|
@@ -27,7 +26,7 @@ const tryGetDocument = require('./try-get-document-c0ebd39a.js');
|
|
|
27
26
|
const pixel = require('./pixel-98f2a10c.js');
|
|
28
27
|
const object = require('./object-b53e9416.js');
|
|
29
28
|
const timer = require('./timer-5f33058b.js');
|
|
30
|
-
const replaceSelectedTextAction = require('./replace-selected-text-action-
|
|
29
|
+
const replaceSelectedTextAction = require('./replace-selected-text-action-0f7b7c78.js');
|
|
31
30
|
|
|
32
31
|
const VegaLoaderRuntimeMetricsPayloadDefinition = [
|
|
33
32
|
{
|
|
@@ -1050,393 +1049,6 @@ __decorate([
|
|
|
1050
1049
|
], TranslationController.prototype, "vegaPublicAPIRuntimeMetricsSlimmer", void 0);
|
|
1051
1050
|
const VegaTranslation = new TranslationController();
|
|
1052
1051
|
|
|
1053
|
-
/**
|
|
1054
|
-
* Manager for storing and retrieving the extension context associated with each rich text editor host element.
|
|
1055
|
-
*
|
|
1056
|
-
* @todo Currently, there are three types of contexts in RTE: toolbar render context, extension context, and DTO render context. The second and third types are bound to the extension context via host props. We are considering optimizing these three types of contexts to make the program more flexible and easier to maintain.
|
|
1057
|
-
*/
|
|
1058
|
-
class RTEExtensionContextManager {
|
|
1059
|
-
constructor() {
|
|
1060
|
-
this.extensionContextMap = new WeakMap();
|
|
1061
|
-
}
|
|
1062
|
-
/**
|
|
1063
|
-
* Store the extension context for the given rich text editor host element.
|
|
1064
|
-
*
|
|
1065
|
-
* @param {RTEExtensionContext} context - The extension context to store.
|
|
1066
|
-
*/
|
|
1067
|
-
updateExtensionContext(context) {
|
|
1068
|
-
if (context && context.host) {
|
|
1069
|
-
let newContext = context;
|
|
1070
|
-
const existingContext = this.extensionContextMap.get(context.host);
|
|
1071
|
-
// If there is already an existing context for the host, merge the new context with the existing one to avoid overwriting any properties that are not included in the new context.
|
|
1072
|
-
if (existingContext) {
|
|
1073
|
-
newContext = Object.assign(Object.assign({}, existingContext), context);
|
|
1074
|
-
}
|
|
1075
|
-
this.extensionContextMap.set(context.host, newContext);
|
|
1076
|
-
}
|
|
1077
|
-
}
|
|
1078
|
-
/**
|
|
1079
|
-
* Get the extension context for the given rich text editor host element.
|
|
1080
|
-
*
|
|
1081
|
-
* @typedef HTMLVegaRichTextEditorElement - The type definition for the rich text editor host element.
|
|
1082
|
-
* @param {Nullable<HTMLVegaRichTextEditorElement>} el - The host rich text editor element.
|
|
1083
|
-
* @returns {Nullable<RTEExtensionContext>} - The extension context associated with the host.
|
|
1084
|
-
*/
|
|
1085
|
-
getExtensionContext(el) {
|
|
1086
|
-
return el ? this.extensionContextMap.get(el) : null;
|
|
1087
|
-
}
|
|
1088
|
-
}
|
|
1089
|
-
const RTEExtensionContextManager$1 = new RTEExtensionContextManager();
|
|
1090
|
-
|
|
1091
|
-
/**
|
|
1092
|
-
* Base renderer for Vega Rich Text Editor.
|
|
1093
|
-
*/
|
|
1094
|
-
class VegaRTEExtensionRenderer extends baseRenderer.VegaRTEBaseRenderer {
|
|
1095
|
-
/**
|
|
1096
|
-
* Returns the styles to be injected into the RTE scope.
|
|
1097
|
-
* Override this method to provide custom styles for the custom blocks or nodes.
|
|
1098
|
-
*
|
|
1099
|
-
* @returns {string} - The styles as a string.
|
|
1100
|
-
*/
|
|
1101
|
-
injectRTEScopeStyles() {
|
|
1102
|
-
return '';
|
|
1103
|
-
}
|
|
1104
|
-
/**
|
|
1105
|
-
* Renders the given data as a DOM element.
|
|
1106
|
-
*
|
|
1107
|
-
* @param {RTEBlock | RTENode} renderData - The data to render, which can be a block or a node.
|
|
1108
|
-
* @param {RTERenderContext} rteContext - The rte editor context.
|
|
1109
|
-
* @param {VegaRTECreateElementFunction} createElement - The function to create a DOM element.
|
|
1110
|
-
* @returns {VegaRTERenderResult} - The rendered DOM element.
|
|
1111
|
-
*/
|
|
1112
|
-
render(renderData, rteContext, createElement) {
|
|
1113
|
-
var _a;
|
|
1114
|
-
const element = this.doRender(createElement, renderData, rteContext);
|
|
1115
|
-
this.fallbackRegisterRef(element, renderData);
|
|
1116
|
-
this.appendChildren(((_a = element.childrenContainerGetter) === null || _a === void 0 ? void 0 : _a.call(element)) || element, renderData, rteContext, createElement);
|
|
1117
|
-
return element;
|
|
1118
|
-
}
|
|
1119
|
-
/**
|
|
1120
|
-
* Register the reference of the element in the rendering registry.
|
|
1121
|
-
*
|
|
1122
|
-
* @param {RTEBlock | RTENode} renderData - The data to register with the element.
|
|
1123
|
-
* @returns {VegaRTEUseRef} - The function to register the element.
|
|
1124
|
-
*/
|
|
1125
|
-
useRef(renderData) {
|
|
1126
|
-
renderData[VegaRTEExtensionRenderer.REGISTER_REF_FLAG] = true;
|
|
1127
|
-
return function (element) {
|
|
1128
|
-
if (element) {
|
|
1129
|
-
codeBlock.stateEntityRenderingRegistry.register(element, renderData);
|
|
1130
|
-
}
|
|
1131
|
-
};
|
|
1132
|
-
}
|
|
1133
|
-
/**
|
|
1134
|
-
* Get a registered renderer by its key.
|
|
1135
|
-
*
|
|
1136
|
-
* @param {string} key - The key of the renderer.
|
|
1137
|
-
* @returns {Nullable<BaseRenderer>} - The registered renderer or null if not found.
|
|
1138
|
-
*/
|
|
1139
|
-
getDTORenderer(key) {
|
|
1140
|
-
return dtoRendererManager.RTEDTORendererManager.getRTERenderer(key);
|
|
1141
|
-
}
|
|
1142
|
-
/**
|
|
1143
|
-
* Get the extension context for the given rich text editor host element.
|
|
1144
|
-
*
|
|
1145
|
-
* @typedef HTMLVegaRichTextEditorElement - The type definition for the rich text editor host element.
|
|
1146
|
-
* @param {HTMLVegaRichTextEditorElement} el - The host rich text editor element.
|
|
1147
|
-
* @returns {Nullable<RTEExtensionContext>} - The extension context associated with the host.
|
|
1148
|
-
*/
|
|
1149
|
-
getExtensionContext(el) {
|
|
1150
|
-
return RTEExtensionContextManager$1.getExtensionContext(el);
|
|
1151
|
-
}
|
|
1152
|
-
/**
|
|
1153
|
-
* Auto render the block children if the block element is not exist
|
|
1154
|
-
*
|
|
1155
|
-
* @param {VegaRTERenderResult} parentElement - The parent element to append children to.
|
|
1156
|
-
* @param {RTEBlock | RTENode} renderData - The data to render children for.
|
|
1157
|
-
* @param {RTERenderContext} rteContext - The render context.
|
|
1158
|
-
* @param {VegaRTECreateElementFunction} createElement - The function to create a DOM element.
|
|
1159
|
-
*/
|
|
1160
|
-
appendChildren(parentElement, renderData, rteContext, createElement) {
|
|
1161
|
-
if (Array.isArray(renderData['children']) &&
|
|
1162
|
-
renderData['children'].length &&
|
|
1163
|
-
!parentElement['$children$']) {
|
|
1164
|
-
parentElement['$children$'] = renderData['children']
|
|
1165
|
-
.map((child) => {
|
|
1166
|
-
return this.renderChildren(child, rteContext, createElement);
|
|
1167
|
-
})
|
|
1168
|
-
.filter(typeGuard.isNonNullable);
|
|
1169
|
-
}
|
|
1170
|
-
}
|
|
1171
|
-
/**
|
|
1172
|
-
* Render the children node.
|
|
1173
|
-
*
|
|
1174
|
-
* @param {RTENode | RTEBlock} renderData - The node to render children for.
|
|
1175
|
-
* @param {RTERenderContext} rteContext - The render context.
|
|
1176
|
-
* @param {VegaRTECreateElementFunction} createElement - The function to create a DOM element.
|
|
1177
|
-
* @returns {Nullable<VegaRTERenderResult>} - The rendered DOM element.
|
|
1178
|
-
*/
|
|
1179
|
-
renderChildren(renderData, rteContext, createElement) {
|
|
1180
|
-
const renderer = this.getDTORenderer(renderData.type);
|
|
1181
|
-
if (renderer) {
|
|
1182
|
-
return renderer.render(renderData, rteContext, createElement);
|
|
1183
|
-
}
|
|
1184
|
-
}
|
|
1185
|
-
/**
|
|
1186
|
-
* Fallback register reference for the element.
|
|
1187
|
-
*
|
|
1188
|
-
* @param {VegaRTERenderResult} element - The rendered DOM element.
|
|
1189
|
-
* @param {RTEBlock | RTENode} renderData - The data to register with the element.
|
|
1190
|
-
*/
|
|
1191
|
-
fallbackRegisterRef(element, renderData) {
|
|
1192
|
-
if (!renderData[VegaRTEExtensionRenderer.REGISTER_REF_FLAG] &&
|
|
1193
|
-
element['$attrs$'] &&
|
|
1194
|
-
!element['$attrs$']['ref']) {
|
|
1195
|
-
// eslint-disable-next-line jsdoc/require-jsdoc
|
|
1196
|
-
element['$attrs$']['ref'] = this.useRef(renderData);
|
|
1197
|
-
}
|
|
1198
|
-
}
|
|
1199
|
-
}
|
|
1200
|
-
VegaRTEExtensionRenderer.REGISTER_REF_FLAG = '__registeredRef__';
|
|
1201
|
-
|
|
1202
|
-
const patchedBlockClasses = new WeakSet();
|
|
1203
|
-
const annotationHandlersByClass = new WeakMap();
|
|
1204
|
-
/**
|
|
1205
|
-
* Abstract class for Vega Rich Text Editor extensions.
|
|
1206
|
-
*/
|
|
1207
|
-
class VegaRTEExtension {
|
|
1208
|
-
constructor() {
|
|
1209
|
-
/**
|
|
1210
|
-
* The context of the RTE extension, which may include references to the host editor and other relevant information.
|
|
1211
|
-
*/
|
|
1212
|
-
this.extensionContext = null;
|
|
1213
|
-
this.hasCustomStylesRenderers = new Set();
|
|
1214
|
-
}
|
|
1215
|
-
/**
|
|
1216
|
-
* Registers an action handle strategy for a specific node or block class.
|
|
1217
|
-
*
|
|
1218
|
-
* @param {string} nodeOrBlockClassName - The name of the node or block class.
|
|
1219
|
-
* @param {string} actionType - The type of the action.
|
|
1220
|
-
* @param {ActionHandleStrategy<ModifyContentAction | AnnotationAction, RTENode | RTEBlock | VegaRTEContent>} strategy - The strategy to register.
|
|
1221
|
-
*/
|
|
1222
|
-
static registerActionHandleStrategy(nodeOrBlockClassName, actionType, strategy) {
|
|
1223
|
-
codeBlock.ActionHandleStrategyRegistry.register(actionType, nodeOrBlockClassName, strategy);
|
|
1224
|
-
}
|
|
1225
|
-
/**
|
|
1226
|
-
* Registers an action handler interceptor for a specific node or block class.
|
|
1227
|
-
*
|
|
1228
|
-
* @param {string} nodeOrBlockClassName - The name of the node or block class.
|
|
1229
|
-
* @param {string} actionType - The type of the action.
|
|
1230
|
-
* @param {ActionHandlerInterceptor<ModifyContentAction, RTENode | RTEBlock | VegaRTEContent>} strategy - The interceptor to register.
|
|
1231
|
-
*/
|
|
1232
|
-
static registerActionHandlerInterceptor(nodeOrBlockClassName, actionType, strategy) {
|
|
1233
|
-
codeBlock.ActionHandlerInterceptorRegistry.register(actionType, nodeOrBlockClassName, strategy);
|
|
1234
|
-
}
|
|
1235
|
-
/**
|
|
1236
|
-
* Registers a filter styles strategy for a specific block or node class.
|
|
1237
|
-
*
|
|
1238
|
-
* @param {string} blockOrNodeClassName - The name of the block or node class.
|
|
1239
|
-
* @param {RTEFilterStylesStrategy} strategy - The filter styles strategy to register.
|
|
1240
|
-
*/
|
|
1241
|
-
static registerFilterStylesStrategy(blockOrNodeClassName, strategy) {
|
|
1242
|
-
codeBlock.RTEFilterStylesStrategyRegistry.register(blockOrNodeClassName, strategy);
|
|
1243
|
-
}
|
|
1244
|
-
/**
|
|
1245
|
-
* Attach a custom JSON annotation handler to a block DTO class's static `from` flow.
|
|
1246
|
-
*
|
|
1247
|
-
* This is a reusable extension point: any extension can register a handler for an
|
|
1248
|
-
* annotation key and transform the value into block annotations during JSON parsing.
|
|
1249
|
-
*
|
|
1250
|
-
* Safe to call multiple times per class/key/handler — duplicate registrations are no-ops.
|
|
1251
|
-
*
|
|
1252
|
-
* @param {BlockClassWithFrom} BlockClass - Block DTO class to patch.
|
|
1253
|
-
* @param {string} annotationKey - JSON annotation key to read from `block.annotations`.
|
|
1254
|
-
* @param {AnnotationFromJsonHandler} handler - Handler that applies annotation logic to the instance.
|
|
1255
|
-
*/
|
|
1256
|
-
static attachAnnotationFromJson(BlockClass, annotationKey, handler) {
|
|
1257
|
-
var _a, _b;
|
|
1258
|
-
const handlerMap = (_a = annotationHandlersByClass.get(BlockClass)) !== null && _a !== void 0 ? _a : new Map();
|
|
1259
|
-
const handlers = (_b = handlerMap.get(annotationKey)) !== null && _b !== void 0 ? _b : new Set();
|
|
1260
|
-
handlers.add(handler);
|
|
1261
|
-
handlerMap.set(annotationKey, handlers);
|
|
1262
|
-
annotationHandlersByClass.set(BlockClass, handlerMap);
|
|
1263
|
-
if (patchedBlockClasses.has(BlockClass)) {
|
|
1264
|
-
return;
|
|
1265
|
-
}
|
|
1266
|
-
patchedBlockClasses.add(BlockClass);
|
|
1267
|
-
const originalFrom = BlockClass.from.bind(BlockClass);
|
|
1268
|
-
/**
|
|
1269
|
-
* Wrapped static `from` that preserves original behavior and then applies
|
|
1270
|
-
* all registered annotation-from-json handlers for this BlockClass.
|
|
1271
|
-
*
|
|
1272
|
-
* @param {VegaRTEBlockBase} block - Raw JSON block payload.
|
|
1273
|
-
* @param {VegaRTETransformOptions} [options] - Optional transform options.
|
|
1274
|
-
* @returns {RTEBlock} The transformed block instance.
|
|
1275
|
-
*/
|
|
1276
|
-
BlockClass.from = function patchedFrom(block, options) {
|
|
1277
|
-
const instance = originalFrom(block, options);
|
|
1278
|
-
const annotations = block.annotations;
|
|
1279
|
-
const currentHandlerMap = annotationHandlersByClass.get(BlockClass);
|
|
1280
|
-
if (annotations && currentHandlerMap) {
|
|
1281
|
-
currentHandlerMap.forEach((registeredHandlers, key) => {
|
|
1282
|
-
const value = annotations[key];
|
|
1283
|
-
registeredHandlers.forEach((registeredHandler) => {
|
|
1284
|
-
registeredHandler(instance, value, block, options);
|
|
1285
|
-
});
|
|
1286
|
-
});
|
|
1287
|
-
}
|
|
1288
|
-
return instance;
|
|
1289
|
-
};
|
|
1290
|
-
}
|
|
1291
|
-
/**
|
|
1292
|
-
* Lifecycle hook called by the rich text editor before the first render
|
|
1293
|
-
* (during `componentWillLoad`). Override this method to perform per-host
|
|
1294
|
-
* pre-render setup — for example, registering a host-specific toolbar button
|
|
1295
|
-
* renderer via {@link registerToolbarButtonRenderer} so that each editor on
|
|
1296
|
-
* the page gets its own isolated renderer instance.
|
|
1297
|
-
*
|
|
1298
|
-
* The default implementation is a no-op; subclasses may override selectively.
|
|
1299
|
-
*
|
|
1300
|
-
* @typedef HTMLVegaRichTextEditorElement - The type of the host rich text editor element.
|
|
1301
|
-
* @param {HTMLVegaRichTextEditorElement} host - The host rich text editor element that is about to load.
|
|
1302
|
-
*/
|
|
1303
|
-
prepareBeforeLoad(host) {
|
|
1304
|
-
}
|
|
1305
|
-
/**
|
|
1306
|
-
* Initializes the RTE extension with the provided context.
|
|
1307
|
-
*
|
|
1308
|
-
* @param {RTEExtensionContext} context - The context of the RTE extension.
|
|
1309
|
-
*/
|
|
1310
|
-
initialExtensionAfterLoad(context) {
|
|
1311
|
-
this.extensionContext = context;
|
|
1312
|
-
RTEExtensionContextManager$1.updateExtensionContext(context);
|
|
1313
|
-
}
|
|
1314
|
-
/**
|
|
1315
|
-
* Callback method invoked when the extension is destroyed.
|
|
1316
|
-
* Override this method to perform any necessary cleanup.
|
|
1317
|
-
*/
|
|
1318
|
-
destroyExtension() {
|
|
1319
|
-
}
|
|
1320
|
-
/**
|
|
1321
|
-
* Collect custom styles for the extension renderers.
|
|
1322
|
-
* If custom nodes have special styles, override this method to provide the styles.
|
|
1323
|
-
*
|
|
1324
|
-
* @returns {string} - The custom styles as a string.
|
|
1325
|
-
*/
|
|
1326
|
-
collectExtensionRendererStyles() {
|
|
1327
|
-
let styles = '';
|
|
1328
|
-
if (this.hasCustomStylesRenderers.size > 0) {
|
|
1329
|
-
this.hasCustomStylesRenderers.forEach((renderer) => {
|
|
1330
|
-
styles += `${renderer.injectRTEScopeStyles()}\n`;
|
|
1331
|
-
});
|
|
1332
|
-
}
|
|
1333
|
-
return styles;
|
|
1334
|
-
}
|
|
1335
|
-
/**
|
|
1336
|
-
* Register a node type with the extension.
|
|
1337
|
-
*
|
|
1338
|
-
* @param {string} type - The type of the node or block. The type should be a string that uniquely identifies the node or block.
|
|
1339
|
-
* @param {ClassType<RTEBlock | RTENode>} DTOClass - The DTO class to register.
|
|
1340
|
-
*/
|
|
1341
|
-
registerNode(type, DTOClass) {
|
|
1342
|
-
codeBlock.RTEDTOClassManager.registerRTEDTOClass(type, DTOClass);
|
|
1343
|
-
}
|
|
1344
|
-
/**
|
|
1345
|
-
* Register a renderer for a node type with the extension.
|
|
1346
|
-
*
|
|
1347
|
-
* @param {string} type - The type of the node or block. The type should be a string that uniquely identifies the node or block.
|
|
1348
|
-
* @param {BaseRenderer} renderer - The renderer to register.
|
|
1349
|
-
*/
|
|
1350
|
-
registerRenderer(type, renderer) {
|
|
1351
|
-
dtoRendererManager.RTEDTORendererManager.registerRTEDTORenderer(type, renderer);
|
|
1352
|
-
if (renderer instanceof VegaRTEExtensionRenderer && renderer.injectRTEScopeStyles()) {
|
|
1353
|
-
this.hasCustomStylesRenderers.add(renderer);
|
|
1354
|
-
}
|
|
1355
|
-
}
|
|
1356
|
-
/**
|
|
1357
|
-
* Register a toolbar button renderer for the extension.
|
|
1358
|
-
* When a `host` element is provided the renderer is registered in the per-host map
|
|
1359
|
-
* (via {@link RTEDTORendererManager#registerRTEToolbarButtonRendererForHost}), giving
|
|
1360
|
-
* that host an isolated renderer instance that takes precedence over the global singleton.
|
|
1361
|
-
* Omit `host` to fall back to the global registration (backwards-compatible default).
|
|
1362
|
-
*
|
|
1363
|
-
* @param {string} type - The type of the toolbar button.
|
|
1364
|
-
* @param {VegaRTEToolbarButtonRenderer} renderer - The renderer to register.
|
|
1365
|
-
* @param {HTMLVegaRichTextEditorElement} [host] - Optional host element for per-host isolation.
|
|
1366
|
-
*/
|
|
1367
|
-
registerToolbarButtonRenderer(type, renderer, host) {
|
|
1368
|
-
if (host) {
|
|
1369
|
-
dtoRendererManager.RTEDTORendererManager.registerRTEToolbarButtonRendererForHost(host, type, renderer);
|
|
1370
|
-
}
|
|
1371
|
-
else {
|
|
1372
|
-
dtoRendererManager.RTEDTORendererManager.registerRTEToolbarButtonRenderer(type, renderer);
|
|
1373
|
-
}
|
|
1374
|
-
}
|
|
1375
|
-
/**
|
|
1376
|
-
* This is a helper method that utilizes RTEUtils to register common strategies.
|
|
1377
|
-
* Call the method with the class name of the block to make it support basic strategies like:
|
|
1378
|
-
* - Delete children
|
|
1379
|
-
* - Append the children
|
|
1380
|
-
* - Delete the block children content
|
|
1381
|
-
*
|
|
1382
|
-
* @param {string} blockClassName - The class name of the block to register strategies for.
|
|
1383
|
-
*/
|
|
1384
|
-
registerBlockBasicStrategies(blockClassName) {
|
|
1385
|
-
contentState.RTEDTOActionStrategyManager.registerBlockBasicStrategies(blockClassName);
|
|
1386
|
-
}
|
|
1387
|
-
/**
|
|
1388
|
-
* Unregister a strategy for a specific action type and block class if not need.
|
|
1389
|
-
*
|
|
1390
|
-
* @param {string} actionType - The special action type or the action class name.
|
|
1391
|
-
* @param {string} blockClassName - The class name of the block to unregister the strategy for.
|
|
1392
|
-
*/
|
|
1393
|
-
unRegisterStrategy(actionType, blockClassName) {
|
|
1394
|
-
codeBlock.ActionHandleStrategyRegistry.unregister(actionType, blockClassName);
|
|
1395
|
-
}
|
|
1396
|
-
/**
|
|
1397
|
-
* Unregister a strategy for a specific action type and block class if not need.
|
|
1398
|
-
*
|
|
1399
|
-
* @param {string} actionType - The special action type or the action class name.
|
|
1400
|
-
* @param {string} blockClassName - The class name of the block to unregister the strategy for.
|
|
1401
|
-
* @param {ActionHandlerInterceptor<ModifyContentAction, RTENode | RTEBlock | VegaRTEContent>} strategy - The interceptor to unregister.
|
|
1402
|
-
*/
|
|
1403
|
-
unRegisterInterceptor(actionType, blockClassName, strategy) {
|
|
1404
|
-
codeBlock.ActionHandlerInterceptorRegistry.unregister(actionType, blockClassName, strategy);
|
|
1405
|
-
}
|
|
1406
|
-
/**
|
|
1407
|
-
* Register an element to block DTO class strategy.
|
|
1408
|
-
*
|
|
1409
|
-
* @param {ElementToDTOStrategy} strategy - The strategy to register.
|
|
1410
|
-
*/
|
|
1411
|
-
registerElementToBlockDTOClassStrategy(strategy) {
|
|
1412
|
-
contentState.ElementToDTOClassStrategyManager.registerElementToBlockStrategy(strategy);
|
|
1413
|
-
}
|
|
1414
|
-
/**
|
|
1415
|
-
* Register an element to node DTO class strategy.
|
|
1416
|
-
*
|
|
1417
|
-
* @param {ElementToDTOStrategy} strategy - The strategy to register.
|
|
1418
|
-
*/
|
|
1419
|
-
registerElementToNodeDTOClassStrategy(strategy) {
|
|
1420
|
-
contentState.ElementToDTOClassStrategyManager.registerElementToNodeStrategy(strategy);
|
|
1421
|
-
}
|
|
1422
|
-
/**
|
|
1423
|
-
* Get the registered element to node DTO class strategies.
|
|
1424
|
-
*
|
|
1425
|
-
* @returns {ElementToDTOStrategy[]} - The registered element to node DTO class strategies.
|
|
1426
|
-
*/
|
|
1427
|
-
getElementToNodeDTOClassStrategies() {
|
|
1428
|
-
return contentState.ElementToDTOClassStrategyManager.getElementToNodeStrategies();
|
|
1429
|
-
}
|
|
1430
|
-
/**
|
|
1431
|
-
* Register a custom annotation handler for HTML to DTO conversion.
|
|
1432
|
-
*
|
|
1433
|
-
* @param {AnnotationGeneratorStrategyAbstract} handler - The annotation handler to register.
|
|
1434
|
-
*/
|
|
1435
|
-
registerAnnotationHandler(handler) {
|
|
1436
|
-
contentState.htmlElementToAnnotationGenerator.registerHandler(handler);
|
|
1437
|
-
}
|
|
1438
|
-
}
|
|
1439
|
-
|
|
1440
1052
|
/**
|
|
1441
1053
|
* Base class for rendering extension toolbar button in the rich text editor.
|
|
1442
1054
|
* The renderer provides common functionalities for rendering toolbar buttons, including:
|
|
@@ -1471,7 +1083,7 @@ class VegaRTEToolbarButtonRenderer {
|
|
|
1471
1083
|
* @returns {Nullable<RTEExtensionContext>} - The extension context associated with the host.
|
|
1472
1084
|
*/
|
|
1473
1085
|
getExtensionContext(el) {
|
|
1474
|
-
return RTEExtensionContextManager
|
|
1086
|
+
return linkExtension.RTEExtensionContextManager.getExtensionContext(el);
|
|
1475
1087
|
}
|
|
1476
1088
|
/**
|
|
1477
1089
|
* Renders a dropdown component with the specified properties and children.
|
|
@@ -1498,9 +1110,10 @@ class VegaRTEToolbarButtonRenderer {
|
|
|
1498
1110
|
*
|
|
1499
1111
|
* @param {VegaRTECreateElementFunction} h - Create element function.
|
|
1500
1112
|
* @param {(RTEDropdownListItem | RTEDropdownListGroup)[]} itemList - The list of dropdown items.
|
|
1113
|
+
* @param {VegaRTEToolbarRenderContext} editorContext - The render context for the editor.
|
|
1501
1114
|
* @returns {VegaRTERenderResult} - The render result for the dropdown list.
|
|
1502
1115
|
*/
|
|
1503
|
-
renderDropdownListTemplate(h, itemList) {
|
|
1116
|
+
renderDropdownListTemplate(h, itemList, editorContext) {
|
|
1504
1117
|
return h('div', {
|
|
1505
1118
|
slot: 'items',
|
|
1506
1119
|
onMouseDown: this.preventDefault,
|
|
@@ -1515,8 +1128,8 @@ class VegaRTEToolbarButtonRenderer {
|
|
|
1515
1128
|
h('style', { nonce: vegaNonceManager.vegaNonceManager.nonce }, '.rte-dropdown-list vega-dropdown-group vega-dropdown-group { padding-left: 4px }'),
|
|
1516
1129
|
...itemList.map((item) => {
|
|
1517
1130
|
return 'children' in item
|
|
1518
|
-
? this.renderDropdownGroup(h, item)
|
|
1519
|
-
: this.renderDropdownItem(h, item);
|
|
1131
|
+
? this.renderDropdownGroup(h, item, editorContext)
|
|
1132
|
+
: this.renderDropdownItem(h, item, editorContext);
|
|
1520
1133
|
}),
|
|
1521
1134
|
]);
|
|
1522
1135
|
}
|
|
@@ -1525,32 +1138,34 @@ class VegaRTEToolbarButtonRenderer {
|
|
|
1525
1138
|
*
|
|
1526
1139
|
* @param {VegaRTECreateElementFunction} h - Create element function.
|
|
1527
1140
|
* @param {RTEDropdownListItem} item - The dropdown item.
|
|
1141
|
+
* @param {VegaRTEToolbarRenderContext} editorContext - The render context for the editor.
|
|
1528
1142
|
* @returns {VegaRTERenderResult} - The render result for the dropdown item.
|
|
1529
1143
|
*/
|
|
1530
|
-
renderDropdownItem(h, item) {
|
|
1144
|
+
renderDropdownItem(h, item, editorContext) {
|
|
1531
1145
|
return h('vega-dropdown-item', {
|
|
1532
1146
|
key: item.key,
|
|
1533
1147
|
itemKey: item.key,
|
|
1534
|
-
label: item.label,
|
|
1148
|
+
label: editorContext.translation.t(item.label),
|
|
1535
1149
|
prefixIcon: item.icon,
|
|
1536
1150
|
});
|
|
1537
1151
|
}
|
|
1538
1152
|
/**
|
|
1539
|
-
* Renders a dropdown
|
|
1153
|
+
* Renders a dropdown group for the toolbar button.
|
|
1540
1154
|
*
|
|
1541
1155
|
* @param {VegaRTECreateElementFunction} h - Create element function.
|
|
1542
1156
|
* @param {RTEDropdownListGroup} item - The dropdown group.
|
|
1543
|
-
* @
|
|
1157
|
+
* @param {VegaRTEToolbarRenderContext} editorContext - The render context for the editor.
|
|
1158
|
+
* @returns {VegaRTERenderResult} - The render result for the dropdown group.
|
|
1544
1159
|
*/
|
|
1545
|
-
renderDropdownGroup(h, item) {
|
|
1160
|
+
renderDropdownGroup(h, item, editorContext) {
|
|
1546
1161
|
return h('vega-dropdown-group', {
|
|
1547
1162
|
key: item.key,
|
|
1548
|
-
label: item.label,
|
|
1163
|
+
label: editorContext.translation.t(item.label),
|
|
1549
1164
|
divide: false,
|
|
1550
1165
|
}, item.children.map((child) => {
|
|
1551
1166
|
return 'children' in child
|
|
1552
|
-
? this.renderDropdownGroup(h, child)
|
|
1553
|
-
: this.renderDropdownItem(h, child);
|
|
1167
|
+
? this.renderDropdownGroup(h, child, editorContext)
|
|
1168
|
+
: this.renderDropdownItem(h, child, editorContext);
|
|
1554
1169
|
}));
|
|
1555
1170
|
}
|
|
1556
1171
|
/**
|
|
@@ -1609,7 +1224,7 @@ class VegaRTEToolbarButtonRenderer {
|
|
|
1609
1224
|
return h('vega-font', {
|
|
1610
1225
|
variant: 'font-field-label-sm',
|
|
1611
1226
|
color: isDisabled ? 'text-disabled' : 'text-primary',
|
|
1612
|
-
}, label);
|
|
1227
|
+
}, editorContext.translation.t(label));
|
|
1613
1228
|
}
|
|
1614
1229
|
return null;
|
|
1615
1230
|
}
|
|
@@ -1791,7 +1406,7 @@ class RTETokenToolbarButtonRenderer extends VegaRTEToolbarButtonRenderer {
|
|
|
1791
1406
|
showArrowIcon: true,
|
|
1792
1407
|
tooltip: { text: 'Insert token' },
|
|
1793
1408
|
}),
|
|
1794
|
-
this.renderDropdownListTemplate(createElement, this.tokenList),
|
|
1409
|
+
this.renderDropdownListTemplate(createElement, this.tokenList, editorContext),
|
|
1795
1410
|
]);
|
|
1796
1411
|
}
|
|
1797
1412
|
/**
|
|
@@ -1913,7 +1528,7 @@ RTETokenNode.dtoName = 'RTETokenNode';
|
|
|
1913
1528
|
/**
|
|
1914
1529
|
* Token node renderer for the rich text editor.
|
|
1915
1530
|
*/
|
|
1916
|
-
class RTETokenNodeRenderer extends VegaRTEExtensionRenderer {
|
|
1531
|
+
class RTETokenNodeRenderer extends linkExtension.VegaRTEExtensionRenderer {
|
|
1917
1532
|
/**
|
|
1918
1533
|
* Renders the token node as a DOM element.
|
|
1919
1534
|
*
|
|
@@ -1973,13 +1588,8 @@ class RTETokenNodeRenderer extends VegaRTEExtensionRenderer {
|
|
|
1973
1588
|
|
|
1974
1589
|
/**
|
|
1975
1590
|
* Toolbar button renderer for language selection in Vega Rich Text Editor.
|
|
1976
|
-
*
|
|
1977
|
-
*
|
|
1978
|
-
* **own** instance of this renderer, registered in the per-host map inside
|
|
1979
|
-
* {@link RTEDTORendererManager} via {@link VegaRTEExtension#prepareBeforeLoad}. Because
|
|
1980
|
-
* every editor has a dedicated renderer, all state (label DOM ref, selected language, and
|
|
1981
|
-
* the language-change callback) is held in plain instance fields — no WeakMaps or shared
|
|
1982
|
-
* singletons are required.
|
|
1591
|
+
* Each editor host gets its own instance, registered via
|
|
1592
|
+
* {@link VegaRTEExtension#prepareBeforeLoad}, so renderer state is held in plain fields.
|
|
1983
1593
|
*/
|
|
1984
1594
|
class RTELanguageToolbarButtonRenderer extends VegaRTEToolbarButtonRenderer {
|
|
1985
1595
|
constructor(languageList, languageChangeCallback, selectedLanguage = '') {
|
|
@@ -1988,10 +1598,9 @@ class RTELanguageToolbarButtonRenderer extends VegaRTEToolbarButtonRenderer {
|
|
|
1988
1598
|
this.languageChangeCallback = null;
|
|
1989
1599
|
this.selectedLanguage = '';
|
|
1990
1600
|
this.labelRef = null;
|
|
1601
|
+
this.translation = null;
|
|
1991
1602
|
/**
|
|
1992
|
-
* Handles the language selection event.
|
|
1993
|
-
* Because each editor has its own renderer instance, the language-change callback
|
|
1994
|
-
* is stored directly on this instance — no indirect context lookup is needed.
|
|
1603
|
+
* Handles the language selection event from the dropdown.
|
|
1995
1604
|
*
|
|
1996
1605
|
* @param {string} itemKey - The key of the selected language item.
|
|
1997
1606
|
*/
|
|
@@ -2006,15 +1615,18 @@ class RTELanguageToolbarButtonRenderer extends VegaRTEToolbarButtonRenderer {
|
|
|
2006
1615
|
this.selectedLanguage = selectedLanguage;
|
|
2007
1616
|
}
|
|
2008
1617
|
/**
|
|
2009
|
-
* Updates the selected language and refreshes the button label text in-place
|
|
2010
|
-
* without
|
|
1618
|
+
* Updates the selected language and refreshes the button label text in-place
|
|
1619
|
+
* without a full toolbar re-render. The label is routed through the translation
|
|
1620
|
+
* helper so localization is preserved on imperative updates.
|
|
2011
1621
|
*
|
|
2012
1622
|
* @param {string} language The language key to set as selected.
|
|
2013
1623
|
*/
|
|
2014
1624
|
setSelectedLanguage(language) {
|
|
1625
|
+
var _a;
|
|
2015
1626
|
this.selectedLanguage = language;
|
|
2016
|
-
if (this.labelRef) {
|
|
2017
|
-
|
|
1627
|
+
if (((_a = this.labelRef) === null || _a === void 0 ? void 0 : _a.firstChild) && this.translation) {
|
|
1628
|
+
const label = this.getLanguageLabelByKey(language);
|
|
1629
|
+
this.labelRef.firstChild.nodeValue = this.translation.t(label);
|
|
2018
1630
|
}
|
|
2019
1631
|
}
|
|
2020
1632
|
/**
|
|
@@ -2029,7 +1641,8 @@ class RTELanguageToolbarButtonRenderer extends VegaRTEToolbarButtonRenderer {
|
|
|
2029
1641
|
* @inheritDoc
|
|
2030
1642
|
*/
|
|
2031
1643
|
render(createElement, editorContext) {
|
|
2032
|
-
|
|
1644
|
+
const translatedSource = this.languageList.map((item) => this.translateDropdownEntry(item, editorContext));
|
|
1645
|
+
return this.renderDropdown(createElement, editorContext, { source: translatedSource }, [
|
|
2033
1646
|
this.renderButton(createElement, editorContext, {
|
|
2034
1647
|
label: this.getLanguageLabelByKey(this.selectedLanguage),
|
|
2035
1648
|
showArrowIcon: true,
|
|
@@ -2044,6 +1657,7 @@ class RTELanguageToolbarButtonRenderer extends VegaRTEToolbarButtonRenderer {
|
|
|
2044
1657
|
* @inheritDoc
|
|
2045
1658
|
*/
|
|
2046
1659
|
renderButtonLabel(h, editorContext, label) {
|
|
1660
|
+
this.translation = editorContext.translation;
|
|
2047
1661
|
const isDisabled = this.isDisabled(editorContext);
|
|
2048
1662
|
return h('vega-font', {
|
|
2049
1663
|
variant: 'font-field-label-sm',
|
|
@@ -2052,7 +1666,7 @@ class RTELanguageToolbarButtonRenderer extends VegaRTEToolbarButtonRenderer {
|
|
|
2052
1666
|
ref: (el) => {
|
|
2053
1667
|
this.labelRef = el;
|
|
2054
1668
|
},
|
|
2055
|
-
}, label);
|
|
1669
|
+
}, editorContext.translation.t(label));
|
|
2056
1670
|
}
|
|
2057
1671
|
/* istanbul ignore next */
|
|
2058
1672
|
/**
|
|
@@ -2073,13 +1687,28 @@ class RTELanguageToolbarButtonRenderer extends VegaRTEToolbarButtonRenderer {
|
|
|
2073
1687
|
const language = this.getListItemByKey(this.languageList, key);
|
|
2074
1688
|
return (_a = language === null || language === void 0 ? void 0 : language.label) !== null && _a !== void 0 ? _a : 'Select Language';
|
|
2075
1689
|
}
|
|
1690
|
+
/**
|
|
1691
|
+
* Recursively translates labels in a dropdown entry so that nested
|
|
1692
|
+
* {@link RTEDropdownListGroup} children are also localized.
|
|
1693
|
+
*
|
|
1694
|
+
* @param {RTEDropdownListItem | RTEDropdownListGroup} entry The entry to translate.
|
|
1695
|
+
* @param {VegaRTEToolbarRenderContext} editorContext The render context.
|
|
1696
|
+
* @returns {RTEDropdownListItem | RTEDropdownListGroup} The translated entry.
|
|
1697
|
+
*/
|
|
1698
|
+
translateDropdownEntry(entry, editorContext) {
|
|
1699
|
+
const translatedLabel = editorContext.translation.t(entry.label);
|
|
1700
|
+
if ('children' in entry) {
|
|
1701
|
+
return Object.assign(Object.assign({}, entry), { label: translatedLabel, children: entry.children.map((child) => this.translateDropdownEntry(child, editorContext)) });
|
|
1702
|
+
}
|
|
1703
|
+
return Object.assign(Object.assign({}, entry), { label: translatedLabel });
|
|
1704
|
+
}
|
|
2076
1705
|
}
|
|
2077
1706
|
|
|
2078
1707
|
/**
|
|
2079
1708
|
* Language extension for Vega Rich Text Editor.
|
|
2080
1709
|
* This extension allows users to switch between different languages and maintain separate content for each language.
|
|
2081
1710
|
*/
|
|
2082
|
-
class VegaRTELanguageExtension extends VegaRTEExtension {
|
|
1711
|
+
class VegaRTELanguageExtension extends linkExtension.VegaRTEExtension {
|
|
2083
1712
|
constructor(languageList, languagesState) {
|
|
2084
1713
|
super();
|
|
2085
1714
|
this.languageToolbarButtonRenderer = null;
|
|
@@ -2576,7 +2205,7 @@ class FunctionToolbarButtonRenderer extends VegaRTEToolbarButtonRenderer {
|
|
|
2576
2205
|
showArrowIcon: true,
|
|
2577
2206
|
tooltip: { text: 'Insert function' },
|
|
2578
2207
|
}),
|
|
2579
|
-
this.renderDropdownListTemplate(h, FunctionToolbarButtonRenderer.FUNCTION_LIST),
|
|
2208
|
+
this.renderDropdownListTemplate(h, FunctionToolbarButtonRenderer.FUNCTION_LIST, editorContext),
|
|
2580
2209
|
]);
|
|
2581
2210
|
}
|
|
2582
2211
|
/**
|
|
@@ -2637,7 +2266,7 @@ FunctionToolbarButtonRenderer.FUNCTION_LIST = [
|
|
|
2637
2266
|
/**
|
|
2638
2267
|
* Renders a logic control block in the rich text editor.
|
|
2639
2268
|
*/
|
|
2640
|
-
class RTELogicControlBlockRenderer extends VegaRTEExtensionRenderer {
|
|
2269
|
+
class RTELogicControlBlockRenderer extends linkExtension.VegaRTEExtensionRenderer {
|
|
2641
2270
|
/**
|
|
2642
2271
|
* @inheritDoc
|
|
2643
2272
|
*/
|
|
@@ -2783,7 +2412,7 @@ const functionBlockStylesCss = "div.statement{padding:2px 4px;background:rgba(va
|
|
|
2783
2412
|
/**
|
|
2784
2413
|
* Renderer for Function Block
|
|
2785
2414
|
*/
|
|
2786
|
-
class RTEFunctionBlockRenderer extends VegaRTEExtensionRenderer {
|
|
2415
|
+
class RTEFunctionBlockRenderer extends linkExtension.VegaRTEExtensionRenderer {
|
|
2787
2416
|
/**
|
|
2788
2417
|
* @inheritDoc
|
|
2789
2418
|
*/
|
|
@@ -2988,7 +2617,7 @@ const convertFunctionBlockStrategy = new DivToFunctionBlockStrategy();
|
|
|
2988
2617
|
/**
|
|
2989
2618
|
* Function extension class for Vega Rich Text Editor.
|
|
2990
2619
|
*/
|
|
2991
|
-
class VegaRTEFunctionExtension extends VegaRTEExtension {
|
|
2620
|
+
class VegaRTEFunctionExtension extends linkExtension.VegaRTEExtension {
|
|
2992
2621
|
constructor() {
|
|
2993
2622
|
super();
|
|
2994
2623
|
this.registerBlockBasicStrategies(RTELogicControlBlock.name);
|
|
@@ -3015,18 +2644,18 @@ class VegaRTEFunctionExtension extends VegaRTEExtension {
|
|
|
3015
2644
|
this.unRegisterStrategy(codeBlock.ModifyContentActionType.INSERT_CHILDREN_AFTER, RTEFunctionBlock.name);
|
|
3016
2645
|
this.unRegisterStrategy(codeBlock.ModifyContentActionType.INSERT_CHILDREN_BEFORE, RTEFunctionBlock.name);
|
|
3017
2646
|
this.unRegisterStrategy(codeBlock.ModifyContentActionType.PASTE_CONTENT, RTELogicControlBlock.name);
|
|
3018
|
-
VegaRTEExtension.registerActionHandleStrategy(RTEFunctionBlock.name, codeBlock.ModifyContentActionType.INSERT_NEW_PARAGRAPH, new FunctionBlockInsertParagraphStrategy());
|
|
2647
|
+
linkExtension.VegaRTEExtension.registerActionHandleStrategy(RTEFunctionBlock.name, codeBlock.ModifyContentActionType.INSERT_NEW_PARAGRAPH, new FunctionBlockInsertParagraphStrategy());
|
|
3019
2648
|
}
|
|
3020
2649
|
}
|
|
3021
2650
|
(() => {
|
|
3022
2651
|
const insertFunctionBlockStrategy = new InsertFunctionBlockStrategy();
|
|
3023
|
-
VegaRTEExtension.registerActionHandleStrategy(contentState.VegaRTEContent.name, INSERT_FUNCTION_BLOCK, insertFunctionBlockStrategy);
|
|
3024
|
-
VegaRTEExtension.registerActionHandleStrategy(codeBlock.RTETextBlock.name, INSERT_FUNCTION_BLOCK, insertFunctionBlockStrategy);
|
|
3025
|
-
VegaRTEExtension.registerActionHandleStrategy(contentState.RTEImageBlock.name, INSERT_FUNCTION_BLOCK, insertFunctionBlockStrategy);
|
|
3026
|
-
VegaRTEExtension.registerActionHandleStrategy(RTELogicControlBlock.name, INSERT_FUNCTION_BLOCK, insertFunctionBlockStrategy);
|
|
3027
|
-
VegaRTEExtension.registerActionHandleStrategy(codeBlock.RTETextBlock.name, PASTE_PLAIN_TEXT, new PastePlainTextStrategy());
|
|
3028
|
-
VegaRTEExtension.registerActionHandlerInterceptor(codeBlock.RTETextBlock.name, codeBlock.ModifyContentActionType.INSERT_NEW_PARAGRAPH, new PreventNewParagraphInterceptor());
|
|
3029
|
-
VegaRTEExtension.registerActionHandlerInterceptor(codeBlock.RTETextBlock.name, codeBlock.ModifyContentActionType.PASTE_CONTENT, new PreventPasteContentInterceptor());
|
|
2652
|
+
linkExtension.VegaRTEExtension.registerActionHandleStrategy(contentState.VegaRTEContent.name, INSERT_FUNCTION_BLOCK, insertFunctionBlockStrategy);
|
|
2653
|
+
linkExtension.VegaRTEExtension.registerActionHandleStrategy(codeBlock.RTETextBlock.name, INSERT_FUNCTION_BLOCK, insertFunctionBlockStrategy);
|
|
2654
|
+
linkExtension.VegaRTEExtension.registerActionHandleStrategy(contentState.RTEImageBlock.name, INSERT_FUNCTION_BLOCK, insertFunctionBlockStrategy);
|
|
2655
|
+
linkExtension.VegaRTEExtension.registerActionHandleStrategy(RTELogicControlBlock.name, INSERT_FUNCTION_BLOCK, insertFunctionBlockStrategy);
|
|
2656
|
+
linkExtension.VegaRTEExtension.registerActionHandleStrategy(codeBlock.RTETextBlock.name, PASTE_PLAIN_TEXT, new PastePlainTextStrategy());
|
|
2657
|
+
linkExtension.VegaRTEExtension.registerActionHandlerInterceptor(codeBlock.RTETextBlock.name, codeBlock.ModifyContentActionType.INSERT_NEW_PARAGRAPH, new PreventNewParagraphInterceptor());
|
|
2658
|
+
linkExtension.VegaRTEExtension.registerActionHandlerInterceptor(codeBlock.RTETextBlock.name, codeBlock.ModifyContentActionType.PASTE_CONTENT, new PreventPasteContentInterceptor());
|
|
3030
2659
|
})();
|
|
3031
2660
|
|
|
3032
2661
|
const tableBlockStylesCss = ".v-rte--extension-table-container{display:table}table.v-rte--extension-table{border-collapse:collapse}table.v-rte--extension-table th,table.v-rte--extension-table td{border:1px solid #ddd;padding:12px;text-align:left;vertical-align:middle;min-width:55px;box-sizing:border-box;position:relative}table.v-rte--extension-table th{background-color:#f2f2f2}.rte-table-setting-popover,.rte-table-dynamic-popover{display:block}table.v-rte--extension-table .v-rte-table-cell-focused::after,table.v-rte--extension-table .v-rte-table-cell-selected::after{content:'';position:absolute;top:0;left:0;right:0;bottom:0;pointer-events:none;background-color:rgba(158, 207, 250, 0.3)}table.v-rte--extension-table:has(.v-rte-table-cell-selected){caret-color:transparent}table.v-rte--extension-table:has(.v-rte-table-cell-selected) ::selection{background-color:transparent}table.v-rte--extension-table:has(.v-rte-table-cell-selected) ::-moz-selection{background-color:transparent}.v-rte--extension-table-caption{padding:8px;border:1px solid #ddd;border-bottom:none;background-color:rgba(var(--v-bg-table-header, 240, 243, 247, 1));position:relative;display:table-caption;caption-side:top;min-height:22px;text-align:center;word-break:break-word;overflow-wrap:break-word}.v-rte--extension-table-caption.showPlaceholder::before{position:absolute;left:0;right:0;content:attr(data-placeholder);font-family:'Inter', sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0;color:rgba(var(--v-text-input-placeholder, 176, 180, 181, 1));text-align:center;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}";
|
|
@@ -3659,7 +3288,7 @@ class TablePopoverBaseRenderer {
|
|
|
3659
3288
|
*/
|
|
3660
3289
|
getTableExtensionContext() {
|
|
3661
3290
|
return this.renderContext
|
|
3662
|
-
? RTEExtensionContextManager
|
|
3291
|
+
? linkExtension.RTEExtensionContextManager.getExtensionContext(this.renderContext.host)
|
|
3663
3292
|
: null;
|
|
3664
3293
|
}
|
|
3665
3294
|
}
|
|
@@ -4062,7 +3691,7 @@ class TableSettingPopoverRenderer extends TablePopoverBaseRenderer {
|
|
|
4062
3691
|
/**
|
|
4063
3692
|
* Renderer for the RTETableBlock.
|
|
4064
3693
|
*/
|
|
4065
|
-
class RTETableBlockRenderer extends VegaRTEExtensionRenderer {
|
|
3694
|
+
class RTETableBlockRenderer extends linkExtension.VegaRTEExtensionRenderer {
|
|
4066
3695
|
/**
|
|
4067
3696
|
* @inheritDoc
|
|
4068
3697
|
*/
|
|
@@ -4201,7 +3830,7 @@ class RTETableBlockRenderer extends VegaRTEExtensionRenderer {
|
|
|
4201
3830
|
/**
|
|
4202
3831
|
* Renders a logic control block in the rich text editor.
|
|
4203
3832
|
*/
|
|
4204
|
-
class RTETableHeadRenderer extends VegaRTEExtensionRenderer {
|
|
3833
|
+
class RTETableHeadRenderer extends linkExtension.VegaRTEExtensionRenderer {
|
|
4205
3834
|
/**
|
|
4206
3835
|
* @inheritDoc
|
|
4207
3836
|
*/
|
|
@@ -4216,7 +3845,7 @@ class RTETableHeadRenderer extends VegaRTEExtensionRenderer {
|
|
|
4216
3845
|
/**
|
|
4217
3846
|
* Renders a logic control block in the rich text editor.
|
|
4218
3847
|
*/
|
|
4219
|
-
class RTETableRowBlockRenderer extends VegaRTEExtensionRenderer {
|
|
3848
|
+
class RTETableRowBlockRenderer extends linkExtension.VegaRTEExtensionRenderer {
|
|
4220
3849
|
/**
|
|
4221
3850
|
* @inheritDoc
|
|
4222
3851
|
*/
|
|
@@ -4231,7 +3860,7 @@ class RTETableRowBlockRenderer extends VegaRTEExtensionRenderer {
|
|
|
4231
3860
|
/**
|
|
4232
3861
|
* Renders a table cell block in the rich text editor.
|
|
4233
3862
|
*/
|
|
4234
|
-
class RTETableCellRenderer extends VegaRTEExtensionRenderer {
|
|
3863
|
+
class RTETableCellRenderer extends linkExtension.VegaRTEExtensionRenderer {
|
|
4235
3864
|
/**
|
|
4236
3865
|
* @inheritDoc
|
|
4237
3866
|
*/
|
|
@@ -4302,7 +3931,7 @@ class RTETableCellRenderer extends VegaRTEExtensionRenderer {
|
|
|
4302
3931
|
/**
|
|
4303
3932
|
* Renders a table body block in the rich text editor.
|
|
4304
3933
|
*/
|
|
4305
|
-
class RTETableBodyRenderer extends VegaRTEExtensionRenderer {
|
|
3934
|
+
class RTETableBodyRenderer extends linkExtension.VegaRTEExtensionRenderer {
|
|
4306
3935
|
/**
|
|
4307
3936
|
* @inheritDoc
|
|
4308
3937
|
*/
|
|
@@ -4705,7 +4334,7 @@ const TABLE_CAPTION_PLACEHOLDER_TEXT = 'Enter table caption';
|
|
|
4705
4334
|
/**
|
|
4706
4335
|
* Renderer for the optional table caption node.
|
|
4707
4336
|
*/
|
|
4708
|
-
class RTETableCaptionRenderer extends VegaRTEExtensionRenderer {
|
|
4337
|
+
class RTETableCaptionRenderer extends linkExtension.VegaRTEExtensionRenderer {
|
|
4709
4338
|
/**
|
|
4710
4339
|
* @inheritDoc
|
|
4711
4340
|
*/
|
|
@@ -7649,7 +7278,7 @@ class TableCellFilterStylesStrategy extends codeBlock.RTEFilterStylesStrategy {
|
|
|
7649
7278
|
/**
|
|
7650
7279
|
* Function extension class for Vega Rich Text Editor.
|
|
7651
7280
|
*/
|
|
7652
|
-
class VegaRTETableExtension extends VegaRTEExtension {
|
|
7281
|
+
class VegaRTETableExtension extends linkExtension.VegaRTEExtension {
|
|
7653
7282
|
/**
|
|
7654
7283
|
* Instantiate the table extension
|
|
7655
7284
|
*
|
|
@@ -7717,40 +7346,40 @@ class VegaRTETableExtension extends VegaRTEExtension {
|
|
|
7717
7346
|
(() => {
|
|
7718
7347
|
const insertTableBlockStrategy = new InsertTableBlockStrategy();
|
|
7719
7348
|
const deleteTableBlockStrategy = new DeleteTableBlockStrategy();
|
|
7720
|
-
VegaRTEExtension.registerActionHandleStrategy(contentState.VegaRTEContent.name, INSERT_TABLE_BLOCK, insertTableBlockStrategy);
|
|
7721
|
-
VegaRTEExtension.registerActionHandleStrategy(contentState.VegaRTEContent.name, DELETE_TABLE_BLOCK, deleteTableBlockStrategy);
|
|
7722
|
-
VegaRTEExtension.registerActionHandleStrategy(splitCellOperation.RTETableCellBlock.name, DELETE_TABLE_BLOCK, deleteTableBlockStrategy);
|
|
7723
|
-
VegaRTEExtension.registerActionHandleStrategy(splitCellOperation.RTETableHeadCellBlock.name, DELETE_TABLE_BLOCK, deleteTableBlockStrategy);
|
|
7724
|
-
VegaRTEExtension.registerActionHandleStrategy(codeBlock.RTETextBlock.name, INSERT_TABLE_BLOCK, insertTableBlockStrategy);
|
|
7725
|
-
VegaRTEExtension.registerActionHandleStrategy(contentState.RTEImageBlock.name, INSERT_TABLE_BLOCK, insertTableBlockStrategy);
|
|
7726
|
-
VegaRTEExtension.registerActionHandleStrategy(splitCellOperation.RTETableBlock.name, splitCellOperation.INSERT_TABLE_ROW_INTO_DIFFERENT_SECTION, new InsertTableRowIntoDifferentSectionStrategy());
|
|
7727
|
-
VegaRTEExtension.registerActionHandleStrategy(splitCellOperation.RTETableBlock.name, splitCellOperation.INSERT_TABLE_ROW_INTO_SAME_SECTION, new InsertTableRowIntoSameSectionStrategy());
|
|
7728
|
-
VegaRTEExtension.registerActionHandleStrategy(splitCellOperation.RTETableBlock.name, splitCellOperation.DELETE_TABLE_ROW, new DeleteTableRowStrategy());
|
|
7729
|
-
VegaRTEExtension.registerActionHandleStrategy(splitCellOperation.RTETableBlock.name, splitCellOperation.TOGGLE_HEADER_ROW, new ToggleHeaderRowStrategy());
|
|
7730
|
-
VegaRTEExtension.registerActionHandleStrategy(splitCellOperation.RTETableBlock.name, splitCellOperation.INSERT_TABLE_COLUMN, new InsertTableColumnStrategy());
|
|
7731
|
-
VegaRTEExtension.registerActionHandleStrategy(splitCellOperation.RTETableBlock.name, splitCellOperation.DELETE_TABLE_COLUMN, new DeleteTableColumnStrategy());
|
|
7732
|
-
VegaRTEExtension.registerActionHandleStrategy(splitCellOperation.RTETableBlock.name, splitCellOperation.TOGGLE_HEADER_TABLE_COLUMN, new splitCellOperation.ToggleHeaderTableColumnStrategy());
|
|
7733
|
-
VegaRTEExtension.registerActionHandleStrategy(splitCellOperation.RTETableRowBlock.name, splitCellOperation.SPLIT_TABLE_CELL, new SplitTableCellStrategy());
|
|
7734
|
-
VegaRTEExtension.registerActionHandleStrategy(splitCellOperation.RTETableRowBlock.name, CREATE_SEGMENT_TABLE_CELL, new CreateSegmentTableCellStrategy());
|
|
7735
|
-
VegaRTEExtension.registerActionHandleStrategy(splitCellOperation.RTETableRowBlock.name, splitCellOperation.REPLACE_TABLE_CELL, new ReplaceTableCellStrategy());
|
|
7736
|
-
VegaRTEExtension.registerActionHandleStrategy(splitCellOperation.RTETableCellBlock.name, splitCellOperation.SPLIT_CELL_HORIZONTALLY, new SplitCellHorizontallyStrategy());
|
|
7737
|
-
VegaRTEExtension.registerActionHandleStrategy(splitCellOperation.RTETableCellBlock.name, splitCellOperation.SPLIT_CELL_VERTICALLY, new SplitCellVerticallyStrategy());
|
|
7738
|
-
VegaRTEExtension.registerActionHandleStrategy(splitCellOperation.RTETableHeadCellBlock.name, splitCellOperation.SPLIT_CELL_HORIZONTALLY, new SplitCellHorizontallyStrategy());
|
|
7739
|
-
VegaRTEExtension.registerActionHandleStrategy(splitCellOperation.RTETableHeadCellBlock.name, splitCellOperation.SPLIT_CELL_VERTICALLY, new SplitCellVerticallyStrategy());
|
|
7740
|
-
VegaRTEExtension.registerActionHandleStrategy(splitCellOperation.RTETableBlock.name, splitCellOperation.SELECT_TABLE_COLUMN, new SelectTableColumnStrategy());
|
|
7741
|
-
VegaRTEExtension.registerActionHandleStrategy(splitCellOperation.RTETableBlock.name, splitCellOperation.MERGE_CELLS, new MergeCellsStrategy());
|
|
7742
|
-
VegaRTEExtension.registerActionHandleStrategy(splitCellOperation.RTETableBlock.name, UpdateTablePropertiesAction.name, new UpdateTablePropertiesStrategy());
|
|
7743
|
-
VegaRTEExtension.registerActionHandleStrategy(splitCellOperation.RTETableCellBlock.name, RTETableCellAnnotationsAction.name, new UpdateTableCellPropertiesStrategy());
|
|
7744
|
-
VegaRTEExtension.registerActionHandleStrategy(splitCellOperation.RTETableHeadCellBlock.name, RTETableHeadCellAnnotationsAction.name, new UpdateTableCellPropertiesStrategy());
|
|
7745
|
-
VegaRTEExtension.registerActionHandlerInterceptor(codeBlock.RTETextBlock.name, codeBlock.ModifyContentActionType.DELETE_BLOCK_CONTENT, new PreventCellContentDeleteInterceptor());
|
|
7746
|
-
VegaRTEExtension.registerActionHandlerInterceptor(splitCellOperation.RTETableRowBlock.name, codeBlock.ModifyContentActionType.INSERT_CHILDREN_BEFORE, new PreventRowInsertInterceptor());
|
|
7747
|
-
VegaRTEExtension.registerActionHandlerInterceptor(splitCellOperation.RTETableCellBlock.name, codeBlock.ModifyContentActionType.DELETE_CHILDREN, new PreventCellChildrenRemoveInterceptor());
|
|
7748
|
-
VegaRTEExtension.registerActionHandlerInterceptor(splitCellOperation.RTETableHeadCellBlock.name, codeBlock.ModifyContentActionType.DELETE_CHILDREN, new PreventCellChildrenRemoveInterceptor());
|
|
7749
|
-
VegaRTEExtension.registerActionHandlerInterceptor(splitCellOperation.RTETableBlock.name, codeBlock.ModifyContentActionType.INSERT_NEW_PARAGRAPH, new PreventTableInsertParagraphInterceptor());
|
|
7750
|
-
VegaRTEExtension.registerFilterStylesStrategy(splitCellOperation.RTETableBlock.dtoName, new TableBlockFilterStylesStrategy());
|
|
7751
|
-
VegaRTEExtension.registerFilterStylesStrategy(RTETableCaptionBlock.dtoName, new TableCaptionFilterStylesStrategy());
|
|
7752
|
-
VegaRTEExtension.registerFilterStylesStrategy(splitCellOperation.RTETableCellBlock.dtoName, new TableCellFilterStylesStrategy());
|
|
7753
|
-
VegaRTEExtension.registerFilterStylesStrategy(splitCellOperation.RTETableHeadCellBlock.dtoName, new TableCellFilterStylesStrategy('th'));
|
|
7349
|
+
linkExtension.VegaRTEExtension.registerActionHandleStrategy(contentState.VegaRTEContent.name, INSERT_TABLE_BLOCK, insertTableBlockStrategy);
|
|
7350
|
+
linkExtension.VegaRTEExtension.registerActionHandleStrategy(contentState.VegaRTEContent.name, DELETE_TABLE_BLOCK, deleteTableBlockStrategy);
|
|
7351
|
+
linkExtension.VegaRTEExtension.registerActionHandleStrategy(splitCellOperation.RTETableCellBlock.name, DELETE_TABLE_BLOCK, deleteTableBlockStrategy);
|
|
7352
|
+
linkExtension.VegaRTEExtension.registerActionHandleStrategy(splitCellOperation.RTETableHeadCellBlock.name, DELETE_TABLE_BLOCK, deleteTableBlockStrategy);
|
|
7353
|
+
linkExtension.VegaRTEExtension.registerActionHandleStrategy(codeBlock.RTETextBlock.name, INSERT_TABLE_BLOCK, insertTableBlockStrategy);
|
|
7354
|
+
linkExtension.VegaRTEExtension.registerActionHandleStrategy(contentState.RTEImageBlock.name, INSERT_TABLE_BLOCK, insertTableBlockStrategy);
|
|
7355
|
+
linkExtension.VegaRTEExtension.registerActionHandleStrategy(splitCellOperation.RTETableBlock.name, splitCellOperation.INSERT_TABLE_ROW_INTO_DIFFERENT_SECTION, new InsertTableRowIntoDifferentSectionStrategy());
|
|
7356
|
+
linkExtension.VegaRTEExtension.registerActionHandleStrategy(splitCellOperation.RTETableBlock.name, splitCellOperation.INSERT_TABLE_ROW_INTO_SAME_SECTION, new InsertTableRowIntoSameSectionStrategy());
|
|
7357
|
+
linkExtension.VegaRTEExtension.registerActionHandleStrategy(splitCellOperation.RTETableBlock.name, splitCellOperation.DELETE_TABLE_ROW, new DeleteTableRowStrategy());
|
|
7358
|
+
linkExtension.VegaRTEExtension.registerActionHandleStrategy(splitCellOperation.RTETableBlock.name, splitCellOperation.TOGGLE_HEADER_ROW, new ToggleHeaderRowStrategy());
|
|
7359
|
+
linkExtension.VegaRTEExtension.registerActionHandleStrategy(splitCellOperation.RTETableBlock.name, splitCellOperation.INSERT_TABLE_COLUMN, new InsertTableColumnStrategy());
|
|
7360
|
+
linkExtension.VegaRTEExtension.registerActionHandleStrategy(splitCellOperation.RTETableBlock.name, splitCellOperation.DELETE_TABLE_COLUMN, new DeleteTableColumnStrategy());
|
|
7361
|
+
linkExtension.VegaRTEExtension.registerActionHandleStrategy(splitCellOperation.RTETableBlock.name, splitCellOperation.TOGGLE_HEADER_TABLE_COLUMN, new splitCellOperation.ToggleHeaderTableColumnStrategy());
|
|
7362
|
+
linkExtension.VegaRTEExtension.registerActionHandleStrategy(splitCellOperation.RTETableRowBlock.name, splitCellOperation.SPLIT_TABLE_CELL, new SplitTableCellStrategy());
|
|
7363
|
+
linkExtension.VegaRTEExtension.registerActionHandleStrategy(splitCellOperation.RTETableRowBlock.name, CREATE_SEGMENT_TABLE_CELL, new CreateSegmentTableCellStrategy());
|
|
7364
|
+
linkExtension.VegaRTEExtension.registerActionHandleStrategy(splitCellOperation.RTETableRowBlock.name, splitCellOperation.REPLACE_TABLE_CELL, new ReplaceTableCellStrategy());
|
|
7365
|
+
linkExtension.VegaRTEExtension.registerActionHandleStrategy(splitCellOperation.RTETableCellBlock.name, splitCellOperation.SPLIT_CELL_HORIZONTALLY, new SplitCellHorizontallyStrategy());
|
|
7366
|
+
linkExtension.VegaRTEExtension.registerActionHandleStrategy(splitCellOperation.RTETableCellBlock.name, splitCellOperation.SPLIT_CELL_VERTICALLY, new SplitCellVerticallyStrategy());
|
|
7367
|
+
linkExtension.VegaRTEExtension.registerActionHandleStrategy(splitCellOperation.RTETableHeadCellBlock.name, splitCellOperation.SPLIT_CELL_HORIZONTALLY, new SplitCellHorizontallyStrategy());
|
|
7368
|
+
linkExtension.VegaRTEExtension.registerActionHandleStrategy(splitCellOperation.RTETableHeadCellBlock.name, splitCellOperation.SPLIT_CELL_VERTICALLY, new SplitCellVerticallyStrategy());
|
|
7369
|
+
linkExtension.VegaRTEExtension.registerActionHandleStrategy(splitCellOperation.RTETableBlock.name, splitCellOperation.SELECT_TABLE_COLUMN, new SelectTableColumnStrategy());
|
|
7370
|
+
linkExtension.VegaRTEExtension.registerActionHandleStrategy(splitCellOperation.RTETableBlock.name, splitCellOperation.MERGE_CELLS, new MergeCellsStrategy());
|
|
7371
|
+
linkExtension.VegaRTEExtension.registerActionHandleStrategy(splitCellOperation.RTETableBlock.name, UpdateTablePropertiesAction.name, new UpdateTablePropertiesStrategy());
|
|
7372
|
+
linkExtension.VegaRTEExtension.registerActionHandleStrategy(splitCellOperation.RTETableCellBlock.name, RTETableCellAnnotationsAction.name, new UpdateTableCellPropertiesStrategy());
|
|
7373
|
+
linkExtension.VegaRTEExtension.registerActionHandleStrategy(splitCellOperation.RTETableHeadCellBlock.name, RTETableHeadCellAnnotationsAction.name, new UpdateTableCellPropertiesStrategy());
|
|
7374
|
+
linkExtension.VegaRTEExtension.registerActionHandlerInterceptor(codeBlock.RTETextBlock.name, codeBlock.ModifyContentActionType.DELETE_BLOCK_CONTENT, new PreventCellContentDeleteInterceptor());
|
|
7375
|
+
linkExtension.VegaRTEExtension.registerActionHandlerInterceptor(splitCellOperation.RTETableRowBlock.name, codeBlock.ModifyContentActionType.INSERT_CHILDREN_BEFORE, new PreventRowInsertInterceptor());
|
|
7376
|
+
linkExtension.VegaRTEExtension.registerActionHandlerInterceptor(splitCellOperation.RTETableCellBlock.name, codeBlock.ModifyContentActionType.DELETE_CHILDREN, new PreventCellChildrenRemoveInterceptor());
|
|
7377
|
+
linkExtension.VegaRTEExtension.registerActionHandlerInterceptor(splitCellOperation.RTETableHeadCellBlock.name, codeBlock.ModifyContentActionType.DELETE_CHILDREN, new PreventCellChildrenRemoveInterceptor());
|
|
7378
|
+
linkExtension.VegaRTEExtension.registerActionHandlerInterceptor(splitCellOperation.RTETableBlock.name, codeBlock.ModifyContentActionType.INSERT_NEW_PARAGRAPH, new PreventTableInsertParagraphInterceptor());
|
|
7379
|
+
linkExtension.VegaRTEExtension.registerFilterStylesStrategy(splitCellOperation.RTETableBlock.dtoName, new TableBlockFilterStylesStrategy());
|
|
7380
|
+
linkExtension.VegaRTEExtension.registerFilterStylesStrategy(RTETableCaptionBlock.dtoName, new TableCaptionFilterStylesStrategy());
|
|
7381
|
+
linkExtension.VegaRTEExtension.registerFilterStylesStrategy(splitCellOperation.RTETableCellBlock.dtoName, new TableCellFilterStylesStrategy());
|
|
7382
|
+
linkExtension.VegaRTEExtension.registerFilterStylesStrategy(splitCellOperation.RTETableHeadCellBlock.dtoName, new TableCellFilterStylesStrategy('th'));
|
|
7754
7383
|
})();
|
|
7755
7384
|
|
|
7756
7385
|
/**
|
|
@@ -7997,7 +7626,7 @@ const horizontalLineBlockStylesCss = ".v-rte-horizontal-line{padding:8px 0;overf
|
|
|
7997
7626
|
/**
|
|
7998
7627
|
* Renderer for horizontal line blocks in the rich text editor.
|
|
7999
7628
|
*/
|
|
8000
|
-
class RTEHorizontalLineBlockRenderer extends VegaRTEExtensionRenderer {
|
|
7629
|
+
class RTEHorizontalLineBlockRenderer extends linkExtension.VegaRTEExtensionRenderer {
|
|
8001
7630
|
/**
|
|
8002
7631
|
* @inheritDoc
|
|
8003
7632
|
*/
|
|
@@ -8237,7 +7866,7 @@ class InsertHorizontalLineBlockStrategy extends codeBlock.ActionHandleStrategy {
|
|
|
8237
7866
|
/**
|
|
8238
7867
|
* Extension that adds horizontal line (`<hr>`) support to the Vega Rich Text Editor.
|
|
8239
7868
|
*/
|
|
8240
|
-
class VegaRTEHorizontalLineExtension extends VegaRTEExtension {
|
|
7869
|
+
class VegaRTEHorizontalLineExtension extends linkExtension.VegaRTEExtension {
|
|
8241
7870
|
constructor() {
|
|
8242
7871
|
super();
|
|
8243
7872
|
this.blockRenderer = new RTEHorizontalLineBlockRenderer();
|
|
@@ -8253,16 +7882,16 @@ class VegaRTEHorizontalLineExtension extends VegaRTEExtension {
|
|
|
8253
7882
|
// Register HTML → DTO conversion strategy
|
|
8254
7883
|
this.registerElementToBlockDTOClassStrategy(new HrToHorizontalLineBlockStrategy());
|
|
8255
7884
|
// Register filter styles strategy for source edit round-trip
|
|
8256
|
-
VegaRTEExtension.registerFilterStylesStrategy(RTEHorizontalLineBlock.dtoName, new HorizontalLineFilterStylesStrategy());
|
|
7885
|
+
linkExtension.VegaRTEExtension.registerFilterStylesStrategy(RTEHorizontalLineBlock.dtoName, new HorizontalLineFilterStylesStrategy());
|
|
8257
7886
|
}
|
|
8258
7887
|
}
|
|
8259
7888
|
(() => {
|
|
8260
7889
|
const insertStrategy = new InsertHorizontalLineBlockStrategy();
|
|
8261
7890
|
// Register insert strategy for all block types that can be a target
|
|
8262
|
-
VegaRTEExtension.registerActionHandleStrategy(contentState.VegaRTEContent.name, INSERT_HORIZONTAL_LINE_BLOCK, insertStrategy);
|
|
8263
|
-
VegaRTEExtension.registerActionHandleStrategy(codeBlock.RTETextBlock.name, INSERT_HORIZONTAL_LINE_BLOCK, insertStrategy);
|
|
8264
|
-
VegaRTEExtension.registerActionHandleStrategy(contentState.RTEImageBlock.name, INSERT_HORIZONTAL_LINE_BLOCK, insertStrategy);
|
|
8265
|
-
VegaRTEExtension.registerActionHandleStrategy(RTEHorizontalLineBlock.name, INSERT_HORIZONTAL_LINE_BLOCK, insertStrategy);
|
|
7891
|
+
linkExtension.VegaRTEExtension.registerActionHandleStrategy(contentState.VegaRTEContent.name, INSERT_HORIZONTAL_LINE_BLOCK, insertStrategy);
|
|
7892
|
+
linkExtension.VegaRTEExtension.registerActionHandleStrategy(codeBlock.RTETextBlock.name, INSERT_HORIZONTAL_LINE_BLOCK, insertStrategy);
|
|
7893
|
+
linkExtension.VegaRTEExtension.registerActionHandleStrategy(contentState.RTEImageBlock.name, INSERT_HORIZONTAL_LINE_BLOCK, insertStrategy);
|
|
7894
|
+
linkExtension.VegaRTEExtension.registerActionHandleStrategy(RTEHorizontalLineBlock.name, INSERT_HORIZONTAL_LINE_BLOCK, insertStrategy);
|
|
8266
7895
|
})();
|
|
8267
7896
|
|
|
8268
7897
|
const ARROW_CHARACTERS = [
|
|
@@ -8754,7 +8383,7 @@ class RTESpecialCharactersToolbarButtonRenderer extends VegaRTEToolbarButtonRend
|
|
|
8754
8383
|
* Adds a toolbar button that opens a popover with categorized Unicode characters
|
|
8755
8384
|
* for insertion into the editor content as plain text.
|
|
8756
8385
|
*/
|
|
8757
|
-
class VegaRTESpecialCharactersExtension extends VegaRTEExtension {
|
|
8386
|
+
class VegaRTESpecialCharactersExtension extends linkExtension.VegaRTEExtension {
|
|
8758
8387
|
constructor(config) {
|
|
8759
8388
|
super();
|
|
8760
8389
|
this.categories = this.buildCategories(config);
|
|
@@ -8923,7 +8552,7 @@ class RTELineHeightToolbarButtonRenderer extends VegaRTEToolbarButtonRenderer {
|
|
|
8923
8552
|
showArrowIcon: true,
|
|
8924
8553
|
tooltip: { text: internalTranslationController.VegaInternalTranslation.t('Line Height') },
|
|
8925
8554
|
}),
|
|
8926
|
-
this.renderDropdownListTemplate(createElement, dropdownItems),
|
|
8555
|
+
this.renderDropdownListTemplate(createElement, dropdownItems, editorContext),
|
|
8927
8556
|
]);
|
|
8928
8557
|
}
|
|
8929
8558
|
/**
|
|
@@ -9136,7 +8765,7 @@ function attachLineHeightFromJson(BlockClass) {
|
|
|
9136
8765
|
return;
|
|
9137
8766
|
}
|
|
9138
8767
|
handlerInstalledClasses.add(BlockClass);
|
|
9139
|
-
VegaRTEExtension.attachAnnotationFromJson(BlockClass, 'lineHeight', (instance, value) => {
|
|
8768
|
+
linkExtension.VegaRTEExtension.attachAnnotationFromJson(BlockClass, 'lineHeight', (instance, value) => {
|
|
9140
8769
|
if (typeof value !== 'string' || value === '') {
|
|
9141
8770
|
return;
|
|
9142
8771
|
}
|
|
@@ -9161,7 +8790,7 @@ function setAllowedLineHeights(BlockClass, options) {
|
|
|
9161
8790
|
* Rich Text Editor extension that adds configurable line-height support
|
|
9162
8791
|
* (toolbar control, annotations, content transforms, and JSON parsing).
|
|
9163
8792
|
*/
|
|
9164
|
-
class VegaRTELineHeightExtension extends VegaRTEExtension {
|
|
8793
|
+
class VegaRTELineHeightExtension extends linkExtension.VegaRTEExtension {
|
|
9165
8794
|
constructor(options = VegaRTEDefaultLineHeightOptions) {
|
|
9166
8795
|
super();
|
|
9167
8796
|
this.options = options;
|
|
@@ -9185,7 +8814,7 @@ class VegaRTELineHeightExtension extends VegaRTEExtension {
|
|
|
9185
8814
|
}
|
|
9186
8815
|
(() => {
|
|
9187
8816
|
[codeBlock.RTETextBlock, contentState.RTEListItemBlock].forEach((BlockClass) => {
|
|
9188
|
-
VegaRTEExtension.registerActionHandleStrategy(BlockClass.name, LineHeightAnnotationAction.name, new BlockUpdateLineHeightStrategy());
|
|
8817
|
+
linkExtension.VegaRTEExtension.registerActionHandleStrategy(BlockClass.name, LineHeightAnnotationAction.name, new BlockUpdateLineHeightStrategy());
|
|
9189
8818
|
codeBlock.RTEFilterStylesStrategyRegistry.register(BlockClass.name, new LineHeightFilterStylesStrategy());
|
|
9190
8819
|
attachLineHeightFromJson(BlockClass);
|
|
9191
8820
|
});
|
|
@@ -9298,7 +8927,7 @@ const spanToTokenNodeStrategy = new SpanToTokenNodeStrategy();
|
|
|
9298
8927
|
/**
|
|
9299
8928
|
* Vega Rich Text Editor Token Extension
|
|
9300
8929
|
*/
|
|
9301
|
-
class VegaRTETokenExtension extends VegaRTEExtension {
|
|
8930
|
+
class VegaRTETokenExtension extends linkExtension.VegaRTEExtension {
|
|
9302
8931
|
constructor(tokenList = []) {
|
|
9303
8932
|
super();
|
|
9304
8933
|
this.tokenRenderer = new RTETokenNodeRenderer();
|
|
@@ -9314,8 +8943,8 @@ class VegaRTETokenExtension extends VegaRTEExtension {
|
|
|
9314
8943
|
}
|
|
9315
8944
|
(() => {
|
|
9316
8945
|
const insertTokenNodeStrategy = new InsertTokenNodeStrategy();
|
|
9317
|
-
VegaRTEExtension.registerActionHandleStrategy(codeBlock.RTETextBlock.name, 'INSERT_TOKEN_NODE', insertTokenNodeStrategy);
|
|
9318
|
-
VegaRTEExtension.registerActionHandleStrategy(contentState.RTEListItemBlock.name, 'INSERT_TOKEN_NODE', insertTokenNodeStrategy);
|
|
8946
|
+
linkExtension.VegaRTEExtension.registerActionHandleStrategy(codeBlock.RTETextBlock.name, 'INSERT_TOKEN_NODE', insertTokenNodeStrategy);
|
|
8947
|
+
linkExtension.VegaRTEExtension.registerActionHandleStrategy(contentState.RTEListItemBlock.name, 'INSERT_TOKEN_NODE', insertTokenNodeStrategy);
|
|
9319
8948
|
})();
|
|
9320
8949
|
|
|
9321
8950
|
exports.ActionHandlerInterceptor = ActionHandlerInterceptor;
|
|
@@ -9328,8 +8957,6 @@ exports.VegaEventManager = VegaEventManager$1;
|
|
|
9328
8957
|
exports.VegaLoader = VegaLoader;
|
|
9329
8958
|
exports.VegaNotify = VegaNotify;
|
|
9330
8959
|
exports.VegaRTEDefaultLineHeightOptions = VegaRTEDefaultLineHeightOptions;
|
|
9331
|
-
exports.VegaRTEExtension = VegaRTEExtension;
|
|
9332
|
-
exports.VegaRTEExtensionRenderer = VegaRTEExtensionRenderer;
|
|
9333
8960
|
exports.VegaRTEFunctionExtension = VegaRTEFunctionExtension;
|
|
9334
8961
|
exports.VegaRTEHorizontalLineExtension = VegaRTEHorizontalLineExtension;
|
|
9335
8962
|
exports.VegaRTELanguageExtension = VegaRTELanguageExtension;
|