@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
|
@@ -9,6 +9,8 @@ import RTETextNodeRenderer from '../nodes/text-node-renderer';
|
|
|
9
9
|
import { isNonNullable } from '../../../../../types/type-guard';
|
|
10
10
|
import { UnlinkLinkGroupAction } from '../../actions/unlink-link-group-action';
|
|
11
11
|
import RTEDTORendererManager from '../../../../../helpers/rte-manager/dto-renderer-manager';
|
|
12
|
+
import { VegaRTELinkExtension } from '../../../extensions/link/link-extension';
|
|
13
|
+
import { normalizeUrlByDefaultProtocol } from '../../../extensions/link/utils';
|
|
12
14
|
/**
|
|
13
15
|
* Renders link nodes and wraps them with link editor or anchor element based on edit mode.
|
|
14
16
|
*/
|
|
@@ -50,7 +52,7 @@ class RTELinkWrapperRenderer {
|
|
|
50
52
|
* @param {RTERenderContext} context - Context containing render options.
|
|
51
53
|
* @returns {VegaRTERenderResult[]} - Array of rendered HTML elements.
|
|
52
54
|
*/
|
|
53
|
-
render(nodes, linkGroupAnnotation, { editable }) {
|
|
55
|
+
render(nodes, linkGroupAnnotation, { editable, host }) {
|
|
54
56
|
const blockNodes = this.groupNodesByLink(nodes);
|
|
55
57
|
return blockNodes
|
|
56
58
|
.flatMap((item) => {
|
|
@@ -67,6 +69,8 @@ class RTELinkWrapperRenderer {
|
|
|
67
69
|
return true;
|
|
68
70
|
}
|
|
69
71
|
});
|
|
72
|
+
this.normalizeLinkNodesByDefaultProtocol(item, host);
|
|
73
|
+
linkAnnotation = item[0].getAnnotationByType(NodeAnnotationTypeEnum.LINK);
|
|
70
74
|
return editable
|
|
71
75
|
? this.renderLinkEditorWrapper(item, linkAnnotation, linkGroupAnnotation)
|
|
72
76
|
: this.renderLink(item, linkAnnotation, linkGroupAnnotation);
|
|
@@ -127,5 +131,36 @@ class RTELinkWrapperRenderer {
|
|
|
127
131
|
renderLink(linkNodes, linkAnnotation, linkGroupAnnotation) {
|
|
128
132
|
return (h("a", Object.assign({}, linkGroupAnnotation.toJsx(linkAnnotation)), linkNodes.map((node) => RTETextNodeRenderer.render(node))));
|
|
129
133
|
}
|
|
134
|
+
normalizeLinkNodesByDefaultProtocol(linkNodes, host) {
|
|
135
|
+
if (!host || linkNodes.length === 0) {
|
|
136
|
+
return;
|
|
137
|
+
}
|
|
138
|
+
const firstLinkAnnotation = linkNodes[0].getAnnotationByType(NodeAnnotationTypeEnum.LINK);
|
|
139
|
+
if (!firstLinkAnnotation) {
|
|
140
|
+
return;
|
|
141
|
+
}
|
|
142
|
+
const normalizedUrl = this.normalizeUrlByDefaultProtocol(firstLinkAnnotation.link.href, host);
|
|
143
|
+
if (!normalizedUrl || normalizedUrl === firstLinkAnnotation.link.href) {
|
|
144
|
+
return;
|
|
145
|
+
}
|
|
146
|
+
linkNodes.forEach((node) => {
|
|
147
|
+
const currentLinkAnnotation = node.getAnnotationByType(NodeAnnotationTypeEnum.LINK);
|
|
148
|
+
if (!currentLinkAnnotation || currentLinkAnnotation.link.href === normalizedUrl) {
|
|
149
|
+
return;
|
|
150
|
+
}
|
|
151
|
+
node.apply(new LinkAnnotationAction({
|
|
152
|
+
link: {
|
|
153
|
+
href: normalizedUrl,
|
|
154
|
+
groupKey: currentLinkAnnotation.link.groupKey,
|
|
155
|
+
},
|
|
156
|
+
type: 'update_link',
|
|
157
|
+
doSplit: false,
|
|
158
|
+
}));
|
|
159
|
+
});
|
|
160
|
+
}
|
|
161
|
+
normalizeUrlByDefaultProtocol(url, host) {
|
|
162
|
+
const linkConfig = VegaRTELinkExtension.configStore.get(host) || {};
|
|
163
|
+
return normalizeUrlByDefaultProtocol(url, linkConfig.defaultProtocol);
|
|
164
|
+
}
|
|
130
165
|
}
|
|
131
166
|
export default new RTELinkWrapperRenderer();
|
package/dist/collection/components/vega-rich-text-editor/extensions/base-toolbar-button-renderer.js
CHANGED
|
@@ -65,9 +65,10 @@ export class VegaRTEToolbarButtonRenderer {
|
|
|
65
65
|
*
|
|
66
66
|
* @param {VegaRTECreateElementFunction} h - Create element function.
|
|
67
67
|
* @param {(RTEDropdownListItem | RTEDropdownListGroup)[]} itemList - The list of dropdown items.
|
|
68
|
+
* @param {VegaRTEToolbarRenderContext} editorContext - The render context for the editor.
|
|
68
69
|
* @returns {VegaRTERenderResult} - The render result for the dropdown list.
|
|
69
70
|
*/
|
|
70
|
-
renderDropdownListTemplate(h, itemList) {
|
|
71
|
+
renderDropdownListTemplate(h, itemList, editorContext) {
|
|
71
72
|
return h('div', {
|
|
72
73
|
slot: 'items',
|
|
73
74
|
onMouseDown: this.preventDefault,
|
|
@@ -82,8 +83,8 @@ export class VegaRTEToolbarButtonRenderer {
|
|
|
82
83
|
h('style', { nonce: vegaNonceManager.nonce }, '.rte-dropdown-list vega-dropdown-group vega-dropdown-group { padding-left: 4px }'),
|
|
83
84
|
...itemList.map((item) => {
|
|
84
85
|
return 'children' in item
|
|
85
|
-
? this.renderDropdownGroup(h, item)
|
|
86
|
-
: this.renderDropdownItem(h, item);
|
|
86
|
+
? this.renderDropdownGroup(h, item, editorContext)
|
|
87
|
+
: this.renderDropdownItem(h, item, editorContext);
|
|
87
88
|
}),
|
|
88
89
|
]);
|
|
89
90
|
}
|
|
@@ -92,32 +93,34 @@ export class VegaRTEToolbarButtonRenderer {
|
|
|
92
93
|
*
|
|
93
94
|
* @param {VegaRTECreateElementFunction} h - Create element function.
|
|
94
95
|
* @param {RTEDropdownListItem} item - The dropdown item.
|
|
96
|
+
* @param {VegaRTEToolbarRenderContext} editorContext - The render context for the editor.
|
|
95
97
|
* @returns {VegaRTERenderResult} - The render result for the dropdown item.
|
|
96
98
|
*/
|
|
97
|
-
renderDropdownItem(h, item) {
|
|
99
|
+
renderDropdownItem(h, item, editorContext) {
|
|
98
100
|
return h('vega-dropdown-item', {
|
|
99
101
|
key: item.key,
|
|
100
102
|
itemKey: item.key,
|
|
101
|
-
label: item.label,
|
|
103
|
+
label: editorContext.translation.t(item.label),
|
|
102
104
|
prefixIcon: item.icon,
|
|
103
105
|
});
|
|
104
106
|
}
|
|
105
107
|
/**
|
|
106
|
-
* Renders a dropdown
|
|
108
|
+
* Renders a dropdown group for the toolbar button.
|
|
107
109
|
*
|
|
108
110
|
* @param {VegaRTECreateElementFunction} h - Create element function.
|
|
109
111
|
* @param {RTEDropdownListGroup} item - The dropdown group.
|
|
110
|
-
* @
|
|
112
|
+
* @param {VegaRTEToolbarRenderContext} editorContext - The render context for the editor.
|
|
113
|
+
* @returns {VegaRTERenderResult} - The render result for the dropdown group.
|
|
111
114
|
*/
|
|
112
|
-
renderDropdownGroup(h, item) {
|
|
115
|
+
renderDropdownGroup(h, item, editorContext) {
|
|
113
116
|
return h('vega-dropdown-group', {
|
|
114
117
|
key: item.key,
|
|
115
|
-
label: item.label,
|
|
118
|
+
label: editorContext.translation.t(item.label),
|
|
116
119
|
divide: false,
|
|
117
120
|
}, item.children.map((child) => {
|
|
118
121
|
return 'children' in child
|
|
119
|
-
? this.renderDropdownGroup(h, child)
|
|
120
|
-
: this.renderDropdownItem(h, child);
|
|
122
|
+
? this.renderDropdownGroup(h, child, editorContext)
|
|
123
|
+
: this.renderDropdownItem(h, child, editorContext);
|
|
121
124
|
}));
|
|
122
125
|
}
|
|
123
126
|
/**
|
|
@@ -176,7 +179,7 @@ export class VegaRTEToolbarButtonRenderer {
|
|
|
176
179
|
return h('vega-font', {
|
|
177
180
|
variant: 'font-field-label-sm',
|
|
178
181
|
color: isDisabled ? 'text-disabled' : 'text-primary',
|
|
179
|
-
}, label);
|
|
182
|
+
}, editorContext.translation.t(label));
|
|
180
183
|
}
|
|
181
184
|
return null;
|
|
182
185
|
}
|
|
@@ -9,6 +9,7 @@ import { ActionHandlerInterceptorRegistry } from '../dto/action-handle-strategie
|
|
|
9
9
|
import { methodPlaceholder } from 'vega-slimmer/core';
|
|
10
10
|
import htmlElementToAnnotationGenerator from '../slimmers/controllers/helper/element-to-dto-strategy/annotation-handler/html-element-to-annotation-generator';
|
|
11
11
|
import { RTEFilterStylesStrategyRegistry } from '../dto/filter-styles-strategies/filter-styles-strategy-registry';
|
|
12
|
+
import { RTEExtensionStateStore } from './rte-extension-state-store';
|
|
12
13
|
const patchedBlockClasses = new WeakSet();
|
|
13
14
|
const annotationHandlersByClass = new WeakMap();
|
|
14
15
|
/**
|
|
@@ -98,6 +99,16 @@ export class VegaRTEExtension {
|
|
|
98
99
|
return instance;
|
|
99
100
|
};
|
|
100
101
|
}
|
|
102
|
+
/**
|
|
103
|
+
* Create a per-host state store for this extension.
|
|
104
|
+
* Declare as `static readonly` to share store across extension instances while isolating state per RTE host.
|
|
105
|
+
*
|
|
106
|
+
* @template T - The type of the state value to store per host.
|
|
107
|
+
* @returns {RTEExtensionStateStore<T>} A new state store instance.
|
|
108
|
+
*/
|
|
109
|
+
static createStateStore() {
|
|
110
|
+
return new RTEExtensionStateStore();
|
|
111
|
+
}
|
|
101
112
|
/**
|
|
102
113
|
* Lifecycle hook called by the rich text editor before the first render
|
|
103
114
|
* (during `componentWillLoad`). Override this method to perform per-host
|
|
@@ -16,7 +16,7 @@ export class FunctionToolbarButtonRenderer extends VegaRTEToolbarButtonRenderer
|
|
|
16
16
|
showArrowIcon: true,
|
|
17
17
|
tooltip: { text: 'Insert function' },
|
|
18
18
|
}),
|
|
19
|
-
this.renderDropdownListTemplate(h, FunctionToolbarButtonRenderer.FUNCTION_LIST),
|
|
19
|
+
this.renderDropdownListTemplate(h, FunctionToolbarButtonRenderer.FUNCTION_LIST, editorContext),
|
|
20
20
|
]);
|
|
21
21
|
}
|
|
22
22
|
/**
|
|
@@ -2,13 +2,8 @@ import { methodPlaceholder } from 'vega-slimmer/core';
|
|
|
2
2
|
import { VegaRTEToolbarButtonRenderer } from '../base-toolbar-button-renderer';
|
|
3
3
|
/**
|
|
4
4
|
* Toolbar button renderer for language selection in Vega Rich Text Editor.
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
* **own** instance of this renderer, registered in the per-host map inside
|
|
8
|
-
* {@link RTEDTORendererManager} via {@link VegaRTEExtension#prepareBeforeLoad}. Because
|
|
9
|
-
* every editor has a dedicated renderer, all state (label DOM ref, selected language, and
|
|
10
|
-
* the language-change callback) is held in plain instance fields — no WeakMaps or shared
|
|
11
|
-
* singletons are required.
|
|
5
|
+
* Each editor host gets its own instance, registered via
|
|
6
|
+
* {@link VegaRTEExtension#prepareBeforeLoad}, so renderer state is held in plain fields.
|
|
12
7
|
*/
|
|
13
8
|
export class RTELanguageToolbarButtonRenderer extends VegaRTEToolbarButtonRenderer {
|
|
14
9
|
constructor(languageList, languageChangeCallback, selectedLanguage = '') {
|
|
@@ -17,10 +12,9 @@ export class RTELanguageToolbarButtonRenderer extends VegaRTEToolbarButtonRender
|
|
|
17
12
|
this.languageChangeCallback = null;
|
|
18
13
|
this.selectedLanguage = '';
|
|
19
14
|
this.labelRef = null;
|
|
15
|
+
this.translation = null;
|
|
20
16
|
/**
|
|
21
|
-
* Handles the language selection event.
|
|
22
|
-
* Because each editor has its own renderer instance, the language-change callback
|
|
23
|
-
* is stored directly on this instance — no indirect context lookup is needed.
|
|
17
|
+
* Handles the language selection event from the dropdown.
|
|
24
18
|
*
|
|
25
19
|
* @param {string} itemKey - The key of the selected language item.
|
|
26
20
|
*/
|
|
@@ -35,15 +29,18 @@ export class RTELanguageToolbarButtonRenderer extends VegaRTEToolbarButtonRender
|
|
|
35
29
|
this.selectedLanguage = selectedLanguage;
|
|
36
30
|
}
|
|
37
31
|
/**
|
|
38
|
-
* Updates the selected language and refreshes the button label text in-place
|
|
39
|
-
* without
|
|
32
|
+
* Updates the selected language and refreshes the button label text in-place
|
|
33
|
+
* without a full toolbar re-render. The label is routed through the translation
|
|
34
|
+
* helper so localization is preserved on imperative updates.
|
|
40
35
|
*
|
|
41
36
|
* @param {string} language The language key to set as selected.
|
|
42
37
|
*/
|
|
43
38
|
setSelectedLanguage(language) {
|
|
39
|
+
var _a;
|
|
44
40
|
this.selectedLanguage = language;
|
|
45
|
-
if (this.labelRef) {
|
|
46
|
-
|
|
41
|
+
if (((_a = this.labelRef) === null || _a === void 0 ? void 0 : _a.firstChild) && this.translation) {
|
|
42
|
+
const label = this.getLanguageLabelByKey(language);
|
|
43
|
+
this.labelRef.firstChild.nodeValue = this.translation.t(label);
|
|
47
44
|
}
|
|
48
45
|
}
|
|
49
46
|
/**
|
|
@@ -58,7 +55,8 @@ export class RTELanguageToolbarButtonRenderer extends VegaRTEToolbarButtonRender
|
|
|
58
55
|
* @inheritDoc
|
|
59
56
|
*/
|
|
60
57
|
render(createElement, editorContext) {
|
|
61
|
-
|
|
58
|
+
const translatedSource = this.languageList.map((item) => this.translateDropdownEntry(item, editorContext));
|
|
59
|
+
return this.renderDropdown(createElement, editorContext, { source: translatedSource }, [
|
|
62
60
|
this.renderButton(createElement, editorContext, {
|
|
63
61
|
label: this.getLanguageLabelByKey(this.selectedLanguage),
|
|
64
62
|
showArrowIcon: true,
|
|
@@ -73,6 +71,7 @@ export class RTELanguageToolbarButtonRenderer extends VegaRTEToolbarButtonRender
|
|
|
73
71
|
* @inheritDoc
|
|
74
72
|
*/
|
|
75
73
|
renderButtonLabel(h, editorContext, label) {
|
|
74
|
+
this.translation = editorContext.translation;
|
|
76
75
|
const isDisabled = this.isDisabled(editorContext);
|
|
77
76
|
return h('vega-font', {
|
|
78
77
|
variant: 'font-field-label-sm',
|
|
@@ -81,7 +80,7 @@ export class RTELanguageToolbarButtonRenderer extends VegaRTEToolbarButtonRender
|
|
|
81
80
|
ref: (el) => {
|
|
82
81
|
this.labelRef = el;
|
|
83
82
|
},
|
|
84
|
-
}, label);
|
|
83
|
+
}, editorContext.translation.t(label));
|
|
85
84
|
}
|
|
86
85
|
/* istanbul ignore next */
|
|
87
86
|
/**
|
|
@@ -103,4 +102,19 @@ export class RTELanguageToolbarButtonRenderer extends VegaRTEToolbarButtonRender
|
|
|
103
102
|
const language = this.getListItemByKey(this.languageList, key);
|
|
104
103
|
return (_a = language === null || language === void 0 ? void 0 : language.label) !== null && _a !== void 0 ? _a : 'Select Language';
|
|
105
104
|
}
|
|
105
|
+
/**
|
|
106
|
+
* Recursively translates labels in a dropdown entry so that nested
|
|
107
|
+
* {@link RTEDropdownListGroup} children are also localized.
|
|
108
|
+
*
|
|
109
|
+
* @param {RTEDropdownListItem | RTEDropdownListGroup} entry The entry to translate.
|
|
110
|
+
* @param {VegaRTEToolbarRenderContext} editorContext The render context.
|
|
111
|
+
* @returns {RTEDropdownListItem | RTEDropdownListGroup} The translated entry.
|
|
112
|
+
*/
|
|
113
|
+
translateDropdownEntry(entry, editorContext) {
|
|
114
|
+
const translatedLabel = editorContext.translation.t(entry.label);
|
|
115
|
+
if ('children' in entry) {
|
|
116
|
+
return Object.assign(Object.assign({}, entry), { label: translatedLabel, children: entry.children.map((child) => this.translateDropdownEntry(child, editorContext)) });
|
|
117
|
+
}
|
|
118
|
+
return Object.assign(Object.assign({}, entry), { label: translatedLabel });
|
|
119
|
+
}
|
|
106
120
|
}
|
|
@@ -37,7 +37,7 @@ export class RTELineHeightToolbarButtonRenderer extends VegaRTEToolbarButtonRend
|
|
|
37
37
|
showArrowIcon: true,
|
|
38
38
|
tooltip: { text: VegaInternalTranslation.t('Line Height') },
|
|
39
39
|
}),
|
|
40
|
-
this.renderDropdownListTemplate(createElement, dropdownItems),
|
|
40
|
+
this.renderDropdownListTemplate(createElement, dropdownItems, editorContext),
|
|
41
41
|
]);
|
|
42
42
|
}
|
|
43
43
|
/**
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { VegaRTEExtension } from '../extension.abstract';
|
|
2
|
+
/**
|
|
3
|
+
* Rich Text Editor extension that configures built-in link behavior.
|
|
4
|
+
*/
|
|
5
|
+
export class VegaRTELinkExtension extends VegaRTEExtension {
|
|
6
|
+
constructor(config = {}) {
|
|
7
|
+
super();
|
|
8
|
+
this.config = config;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Store config per host so both toolbar-link and inline-link editors
|
|
12
|
+
* can consistently read the extension settings.
|
|
13
|
+
*
|
|
14
|
+
* @param {HTMLElement} host - The host rich text editor element.
|
|
15
|
+
*/
|
|
16
|
+
prepareBeforeLoad(host) {
|
|
17
|
+
VegaRTELinkExtension.configStore.set(host, this.config);
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Remove config for the current host when the extension is destroyed.
|
|
21
|
+
*/
|
|
22
|
+
destroyExtension() {
|
|
23
|
+
var _a;
|
|
24
|
+
if ((_a = this.extensionContext) === null || _a === void 0 ? void 0 : _a.host) {
|
|
25
|
+
VegaRTELinkExtension.configStore.delete(this.extensionContext.host);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Per-host config store. Declare as static readonly to isolate config per editor host.
|
|
31
|
+
*
|
|
32
|
+
* @type {RTEExtensionStateStore<VegaRTELinkExtensionConfig>}
|
|
33
|
+
*/
|
|
34
|
+
VegaRTELinkExtension.configStore = VegaRTELinkExtension.createStateStore();
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
// eslint-disable-next-line spellcheck/spell-checker
|
|
2
|
+
// The regex checks for a protocol prefix (xxxx:// or xxxx:)
|
|
3
|
+
// or a leading special character (such as /, #, +, etc., but not letters/digits/underscore).
|
|
4
|
+
const PROTOCOL_REG_EXP = /^((\w+:(\/{2,})?)|(\W))/i;
|
|
5
|
+
/**
|
|
6
|
+
* Normalizes URL by prepending default protocol when URL does not already include one.
|
|
7
|
+
*
|
|
8
|
+
* @param {string} url URL value to normalize.
|
|
9
|
+
* @param {string} defaultProtocol Configured default protocol, for example: https:// or mailto:.
|
|
10
|
+
* @returns {string} Normalized URL.
|
|
11
|
+
*/
|
|
12
|
+
export function normalizeUrlByDefaultProtocol(url, defaultProtocol) {
|
|
13
|
+
const input = (url || '').trim();
|
|
14
|
+
if (!input) {
|
|
15
|
+
return input;
|
|
16
|
+
}
|
|
17
|
+
const normalizedDefaultProtocol = (defaultProtocol || '').trim();
|
|
18
|
+
if (!normalizedDefaultProtocol || PROTOCOL_REG_EXP.test(input)) {
|
|
19
|
+
return input;
|
|
20
|
+
}
|
|
21
|
+
return `${normalizedDefaultProtocol}${input}`;
|
|
22
|
+
}
|
package/dist/collection/components/vega-rich-text-editor/extensions/rte-extension-state-store.js
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generic per-host state store using WeakMap keyed by HTMLVegaRichTextEditorElement.
|
|
3
|
+
* Create via {@link VegaRTEExtension.createStateStore} and declare as `static readonly` on your extension class.
|
|
4
|
+
*
|
|
5
|
+
* @template T - The type of the state value to store per host.
|
|
6
|
+
*/
|
|
7
|
+
export class RTEExtensionStateStore {
|
|
8
|
+
constructor() {
|
|
9
|
+
this.stateMap = new WeakMap();
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Store a value for the given host.
|
|
13
|
+
*
|
|
14
|
+
* @param {HTMLElement} host - The editor host.
|
|
15
|
+
* @param {T} value - The value to store.
|
|
16
|
+
*/
|
|
17
|
+
set(host, value) {
|
|
18
|
+
this.stateMap.set(host, value);
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Retrieve the stored value for the given host.
|
|
22
|
+
*
|
|
23
|
+
* @param {Nullable<HTMLElement>} host - The editor host.
|
|
24
|
+
* @returns {Nullable<T>} The stored value, or null if not found.
|
|
25
|
+
*/
|
|
26
|
+
get(host) {
|
|
27
|
+
return host ? this.stateMap.get(host) : null;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Remove the stored value for the given host.
|
|
31
|
+
*
|
|
32
|
+
* @param {HTMLElement} host - The editor host.
|
|
33
|
+
*/
|
|
34
|
+
delete(host) {
|
|
35
|
+
this.stateMap.delete(host);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
@@ -25,7 +25,7 @@ export class RTETokenToolbarButtonRenderer extends VegaRTEToolbarButtonRenderer
|
|
|
25
25
|
showArrowIcon: true,
|
|
26
26
|
tooltip: { text: 'Insert token' },
|
|
27
27
|
}),
|
|
28
|
-
this.renderDropdownListTemplate(createElement, this.tokenList),
|
|
28
|
+
this.renderDropdownListTemplate(createElement, this.tokenList, editorContext),
|
|
29
29
|
]);
|
|
30
30
|
}
|
|
31
31
|
/**
|
|
@@ -23,6 +23,7 @@ export { VegaRTEHorizontalLineExtension } from './extensions/horizontal-line/hor
|
|
|
23
23
|
export { VegaRTESpecialCharactersExtension } from './extensions/special-characters/special-characters-extension';
|
|
24
24
|
export { VegaRTESpecialCharactersEssentials, VegaRTESpecialCharactersLatin, VegaRTESpecialCharactersMathematical, VegaRTESpecialCharactersArrows, VegaRTESpecialCharactersCurrency, VegaRTESpecialCharactersText, } from './extensions/special-characters/constants/default-categories';
|
|
25
25
|
export { VegaRTELineHeightExtension } from './extensions/line-height/line-height-extension';
|
|
26
|
+
export { VegaRTELinkExtension } from './extensions/link/link-extension';
|
|
26
27
|
// actions
|
|
27
28
|
export { ModifyContentAction, ModifyContentActionType } from './dto/actions/modify-content-action.abstract';
|
|
28
29
|
export { AppendChildrenAction } from './dto/actions/append-child-nodes-action';
|
package/dist/collection/components/vega-rich-text-editor/slimmers/renderers/toolbar-renderer.js
CHANGED
|
@@ -55,7 +55,9 @@ export class ToolbarRenderer extends VegaSlimmer {
|
|
|
55
55
|
return (h("vega-flex", { gap: "size-8", alignItems: "center", flexWrap: "wrap" },
|
|
56
56
|
this.allowSourceEdit && (h(Fragment, null,
|
|
57
57
|
h("div", { class: "toolbar-btn-group" }, this.sourceEditToolbarButtonSlimmer.render()),
|
|
58
|
-
this.
|
|
58
|
+
this.uniqueToolbarItems.length > 0 &&
|
|
59
|
+
totalVisibleCount > 0 &&
|
|
60
|
+
this.renderVegaDivider())),
|
|
59
61
|
renderedItems));
|
|
60
62
|
}
|
|
61
63
|
renderVegaDivider() {
|
|
@@ -69,7 +71,7 @@ export class ToolbarRenderer extends VegaSlimmer {
|
|
|
69
71
|
*/
|
|
70
72
|
renderToolbarItems() {
|
|
71
73
|
let totalVisibleCount = 0;
|
|
72
|
-
const renderedItems = this.
|
|
74
|
+
const renderedItems = this.uniqueToolbarItems.map((group) => {
|
|
73
75
|
let visibleCountPerGroup = 0;
|
|
74
76
|
const groupElement = group
|
|
75
77
|
.map((item) => {
|
|
@@ -105,7 +107,7 @@ export class ToolbarRenderer extends VegaSlimmer {
|
|
|
105
107
|
}
|
|
106
108
|
__decorate([
|
|
107
109
|
MapToComponentField()
|
|
108
|
-
], ToolbarRenderer.prototype, "
|
|
110
|
+
], ToolbarRenderer.prototype, "uniqueToolbarItems", void 0);
|
|
109
111
|
__decorate([
|
|
110
112
|
MapToComponentField()
|
|
111
113
|
], ToolbarRenderer.prototype, "allowSourceEdit", void 0);
|
|
@@ -115,6 +115,19 @@ export class VegaRichTextEditor {
|
|
|
115
115
|
this.selectionMap = new Map();
|
|
116
116
|
this.isInDarkMode = VegaInternalThemeManager.isDarkMode();
|
|
117
117
|
this.sourceView = false;
|
|
118
|
+
/**
|
|
119
|
+
* Internal state that holds unique toolbar items.
|
|
120
|
+
* Computed from `toolbarItems` to ensure each button renders only once.
|
|
121
|
+
*
|
|
122
|
+
*
|
|
123
|
+
* When `toolbarItems` contains duplicates across groups (e.g.,
|
|
124
|
+
* `[['bold'], ['italic'], ['bold']]`), only the first occurrence of each
|
|
125
|
+
* button is preserved. The group structure is maintained, but duplicate
|
|
126
|
+
* buttons are filtered out.
|
|
127
|
+
*
|
|
128
|
+
* @internal
|
|
129
|
+
*/
|
|
130
|
+
this.uniqueToolbarItems = VegaRTEPresetToolbarItems;
|
|
118
131
|
/**
|
|
119
132
|
* Specifies the label for the rich text editor.
|
|
120
133
|
*
|
|
@@ -250,6 +263,9 @@ export class VegaRichTextEditor {
|
|
|
250
263
|
watchValueUpdate() {
|
|
251
264
|
methodPlaceholder();
|
|
252
265
|
}
|
|
266
|
+
watchToolbarItems() {
|
|
267
|
+
this.syncUniqueToolbarItems();
|
|
268
|
+
}
|
|
253
269
|
watchValidationRules() {
|
|
254
270
|
methodPlaceholder();
|
|
255
271
|
}
|
|
@@ -258,10 +274,28 @@ export class VegaRichTextEditor {
|
|
|
258
274
|
}
|
|
259
275
|
componentWillLoad() {
|
|
260
276
|
this.richTextContentController.syncRichTextContentEditable();
|
|
277
|
+
this.syncUniqueToolbarItems();
|
|
261
278
|
}
|
|
262
279
|
render() {
|
|
263
280
|
return sanitizeVegaComponent(this.vegaRichTextEditorRenderer.render(), this.host);
|
|
264
281
|
}
|
|
282
|
+
/**
|
|
283
|
+
* Synchronizes {@link uniqueToolbarItems} from {@link toolbarItems} using global uniqueness enforcement.
|
|
284
|
+
*
|
|
285
|
+
* Example:
|
|
286
|
+
* - input: [["bold", "italic"], ["bold", "link"], ["italic"]]
|
|
287
|
+
* - output: [["bold", "italic"], ["link"], []]
|
|
288
|
+
*/
|
|
289
|
+
syncUniqueToolbarItems() {
|
|
290
|
+
const uniqueToolbarButtonSet = new Set();
|
|
291
|
+
this.uniqueToolbarItems = this.toolbarItems.map((toolbarItemGroup) => toolbarItemGroup.filter((toolbarItem) => {
|
|
292
|
+
if (uniqueToolbarButtonSet.has(toolbarItem)) {
|
|
293
|
+
return false;
|
|
294
|
+
}
|
|
295
|
+
uniqueToolbarButtonSet.add(toolbarItem);
|
|
296
|
+
return true;
|
|
297
|
+
}));
|
|
298
|
+
}
|
|
265
299
|
static get is() { return "vega-rich-text-editor"; }
|
|
266
300
|
static get encapsulation() { return "shadow"; }
|
|
267
301
|
static get originalStyleUrls() { return {
|
|
@@ -639,7 +673,8 @@ export class VegaRichTextEditor {
|
|
|
639
673
|
"richTextContentEditable": {},
|
|
640
674
|
"selectionMap": {},
|
|
641
675
|
"isInDarkMode": {},
|
|
642
|
-
"sourceView": {}
|
|
676
|
+
"sourceView": {},
|
|
677
|
+
"uniqueToolbarItems": {}
|
|
643
678
|
}; }
|
|
644
679
|
static get events() { return [{
|
|
645
680
|
"method": "vegaChange",
|
|
@@ -792,6 +827,9 @@ export class VegaRichTextEditor {
|
|
|
792
827
|
}, {
|
|
793
828
|
"propName": "value",
|
|
794
829
|
"methodName": "watchValueUpdate"
|
|
830
|
+
}, {
|
|
831
|
+
"propName": "toolbarItems",
|
|
832
|
+
"methodName": "watchToolbarItems"
|
|
795
833
|
}, {
|
|
796
834
|
"propName": "validationRules",
|
|
797
835
|
"methodName": "watchValidationRules"
|
|
@@ -12,16 +12,20 @@ import { VegaInternalComponentDidRender, VegaInternalPopoverUpdateTarget, } from
|
|
|
12
12
|
import domNodeSubjectFactory from '../../../../../helpers/change-manager/subject/dom-node-subject/dom-node-subject-factory';
|
|
13
13
|
import ChangeManager from '../../../../../helpers/change-manager/change-manager';
|
|
14
14
|
import remoteInvocationRegistry from '../../../../../helpers/remote-invocation/remote-invocation-registry';
|
|
15
|
+
import { findParent } from '../../../../../utils/ui';
|
|
16
|
+
import { VegaRTELinkExtension } from '../../../extensions/link/link-extension';
|
|
17
|
+
import { normalizeUrlByDefaultProtocol } from '../../../extensions/link/utils';
|
|
15
18
|
export class VegaRichTextLinkEditorRenderer extends VegaSlimmer {
|
|
16
19
|
constructor() {
|
|
17
20
|
super(...arguments);
|
|
18
21
|
this.handleKeyDown = (e) => {
|
|
19
22
|
if (e.key === 'Enter') {
|
|
20
23
|
void this.formRef.getValue().then(({ text, url }) => {
|
|
21
|
-
|
|
24
|
+
const normalizedUrl = this.normalizeUrlByDefaultProtocol(url);
|
|
25
|
+
if (normalizedUrl.length > 0) {
|
|
22
26
|
this.changeEventEmitter.emit({
|
|
23
27
|
action: 'link',
|
|
24
|
-
payload: { text: text ||
|
|
28
|
+
payload: { text: text || normalizedUrl, url: normalizedUrl },
|
|
25
29
|
});
|
|
26
30
|
void this.popoverRef.hide();
|
|
27
31
|
}
|
|
@@ -58,13 +62,13 @@ export class VegaRichTextLinkEditorRenderer extends VegaSlimmer {
|
|
|
58
62
|
return (h("vega-popover", { trigger: "click", alignment: "start", placement: "bottom", showArrow: false, ref: (ref) => {
|
|
59
63
|
this.popoverRef = ref;
|
|
60
64
|
DomNodeSubjectObserverFactory.addUniqueObserverToNode(ref, VegaPopoverShow, () => {
|
|
61
|
-
var _a, _b;
|
|
65
|
+
var _a, _b, _c;
|
|
62
66
|
if (this.status === 'linkEdit') {
|
|
63
67
|
void this.urlInputRef.doFocus();
|
|
64
68
|
}
|
|
65
69
|
void this.formRef.setValue({
|
|
66
70
|
text: (_a = this.record) === null || _a === void 0 ? void 0 : _a.text,
|
|
67
|
-
url: (_b = this.record) === null || _b === void 0 ? void 0 : _b.url,
|
|
71
|
+
url: this.normalizeUrlByDefaultProtocol((_c = (_b = this.record) === null || _b === void 0 ? void 0 : _b.url) !== null && _c !== void 0 ? _c : ''),
|
|
68
72
|
});
|
|
69
73
|
});
|
|
70
74
|
DomNodeSubjectObserverFactory.addUniqueObserverToNode(ref, VegaPopoverHide, () => {
|
|
@@ -111,6 +115,11 @@ export class VegaRichTextLinkEditorRenderer extends VegaSlimmer {
|
|
|
111
115
|
updatePopoverTarget() {
|
|
112
116
|
remoteInvocationRegistry.call(domNodeSubjectFactory.getSubject(this.popoverRef, VegaInternalPopoverUpdateTarget), this.target);
|
|
113
117
|
}
|
|
118
|
+
normalizeUrlByDefaultProtocol(url) {
|
|
119
|
+
const rteHost = findParent(this.host, 'vega-rich-text-editor');
|
|
120
|
+
const linkConfig = VegaRTELinkExtension.configStore.get(rteHost) || {};
|
|
121
|
+
return normalizeUrlByDefaultProtocol(url, linkConfig.defaultProtocol);
|
|
122
|
+
}
|
|
114
123
|
}
|
|
115
124
|
__decorate([
|
|
116
125
|
MapToComponentField()
|
|
@@ -17,7 +17,7 @@ export class VegaSelectionChipGroupRenderer extends VegaSlimmer {
|
|
|
17
17
|
this.renderHint()));
|
|
18
18
|
}
|
|
19
19
|
renderLabel() {
|
|
20
|
-
return (h("vega-field-label", { "is-field-required": this.required, disabled: this.disabled, label: this.label }));
|
|
20
|
+
return (h("vega-field-label", { "is-field-required": this.required, disabled: this.disabled, optional: this.optional, label: this.label }));
|
|
21
21
|
}
|
|
22
22
|
renderContainer() {
|
|
23
23
|
return (h("div", { class: "container", ref: (ref) => (this.groupContainerRef = ref) },
|
|
@@ -37,6 +37,9 @@ __decorate([
|
|
|
37
37
|
__decorate([
|
|
38
38
|
MapToComponentField()
|
|
39
39
|
], VegaSelectionChipGroupRenderer.prototype, "required", void 0);
|
|
40
|
+
__decorate([
|
|
41
|
+
MapToComponentField()
|
|
42
|
+
], VegaSelectionChipGroupRenderer.prototype, "optional", void 0);
|
|
40
43
|
__decorate([
|
|
41
44
|
MapToComponentField()
|
|
42
45
|
], VegaSelectionChipGroupRenderer.prototype, "hint", void 0);
|
|
@@ -67,6 +67,16 @@ export class VegaSelectionChipGroup {
|
|
|
67
67
|
*/
|
|
68
68
|
/* eslint-disable-next-line @stencil/strict-mutable */
|
|
69
69
|
this.value = this.selectType === 'checkbox' ? [] : '';
|
|
70
|
+
/**
|
|
71
|
+
* Indicates whether the field should be presented as optional.
|
|
72
|
+
*
|
|
73
|
+
* This property only takes effect when `required` is `false`.
|
|
74
|
+
* When `true`, an "optional" label is displayed next to the field label.
|
|
75
|
+
*
|
|
76
|
+
* @default false
|
|
77
|
+
* @vegaVersion 2.90.0
|
|
78
|
+
*/
|
|
79
|
+
this.optional = false;
|
|
70
80
|
/**
|
|
71
81
|
* Defines custom validation rules for the selection chip group field.
|
|
72
82
|
*
|
|
@@ -213,6 +223,30 @@ export class VegaSelectionChipGroup {
|
|
|
213
223
|
"attribute": "required",
|
|
214
224
|
"reflect": false
|
|
215
225
|
},
|
|
226
|
+
"optional": {
|
|
227
|
+
"type": "boolean",
|
|
228
|
+
"mutable": false,
|
|
229
|
+
"complexType": {
|
|
230
|
+
"original": "boolean",
|
|
231
|
+
"resolved": "boolean",
|
|
232
|
+
"references": {}
|
|
233
|
+
},
|
|
234
|
+
"required": false,
|
|
235
|
+
"optional": false,
|
|
236
|
+
"docs": {
|
|
237
|
+
"tags": [{
|
|
238
|
+
"name": "default",
|
|
239
|
+
"text": "false"
|
|
240
|
+
}, {
|
|
241
|
+
"name": "vegaVersion",
|
|
242
|
+
"text": "2.90.0"
|
|
243
|
+
}],
|
|
244
|
+
"text": "Indicates whether the field should be presented as optional.\n\nThis property only takes effect when `required` is `false`.\nWhen `true`, an \"optional\" label is displayed next to the field label."
|
|
245
|
+
},
|
|
246
|
+
"attribute": "optional",
|
|
247
|
+
"reflect": true,
|
|
248
|
+
"defaultValue": "false"
|
|
249
|
+
},
|
|
216
250
|
"disabled": {
|
|
217
251
|
"type": "boolean",
|
|
218
252
|
"mutable": false,
|
|
@@ -179,11 +179,13 @@ export class VegaTabGroupPagesController extends PageResizeObserverSlimmer {
|
|
|
179
179
|
*/
|
|
180
180
|
/* istanbul ignore next */
|
|
181
181
|
/**
|
|
182
|
-
* 1.
|
|
183
|
-
* 2.
|
|
182
|
+
* 1. Record the width of each tab.
|
|
183
|
+
* 2. Recalculate when widths are zero, such as when the tab group is embedded in a modal before render.
|
|
184
|
+
* 3. Recalculate when tab count changes to ensure overflow navigation buttons stay in sync.
|
|
184
185
|
*/
|
|
185
186
|
initTabsWidthArray() {
|
|
186
187
|
if (this.tabWidthArray.length === 0 ||
|
|
188
|
+
this.tabWidthArray.length !== this.tabItems.length ||
|
|
187
189
|
this.tabWidthArray.some((tabWidth) => tabWidth === 0)) {
|
|
188
190
|
const newTabWidthArray = [];
|
|
189
191
|
this.tabItems.forEach((item) => {
|