@globalpayments/vega 2.93.0 → 2.95.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-f7ad9275.js → app-globals-76815382.js} +11 -10
- package/dist/cjs/{child-nodes-event-prevent-slimmer-e67ee84c.js → child-nodes-event-prevent-slimmer-e0ac8467.js} +1 -1
- package/dist/cjs/{code-block-2f3d0f38.js → code-block-493c7ce7.js} +77 -21
- package/dist/cjs/{component-value-history-controller-slimmer.abstract-31d2c7aa.js → component-value-history-controller-slimmer.abstract-ab21fcbf.js} +3 -3
- package/dist/cjs/{content-state-13daf87a.js → content-state-fc34a814.js} +2 -2
- package/dist/cjs/{date-required-rule-e65ddd7d.js → date-required-rule-4ab06a82.js} +1 -1
- package/dist/cjs/{design-token-47393cbb.js → design-token-d3d12fa0.js} +3 -3
- package/dist/cjs/{element-appender-slimmer-29c4ac60.js → element-appender-slimmer-1d6323c2.js} +2 -2
- package/dist/cjs/{event-emit-slimmer-d234a619.js → event-emit-slimmer-34aa195e.js} +1 -1
- package/dist/cjs/{form-field-controller-slimmer-3bfcf88c.js → form-field-controller-slimmer-d638ba12.js} +1 -1
- package/dist/cjs/{image-annotation-action-c2b163bb.js → image-annotation-action-7c4cd316.js} +3 -3
- package/dist/cjs/{image-extension-4e99b620.js → image-extension-30a7c10f.js} +18 -1
- package/dist/cjs/index.cjs.js +20 -18
- package/dist/cjs/{inject-keyboard-manager-4b2ebbe4.js → inject-keyboard-manager-5a105612.js} +1 -1
- package/dist/cjs/{internal-calendar-period-factory-7a0ecdb1.js → internal-calendar-period-factory-b76006f7.js} +1 -1
- package/dist/cjs/{internal-translation-controller-31f2b057.js → internal-translation-controller-eb02c3b1.js} +2 -0
- package/dist/cjs/{internal-vega-event-manager-13c4012b.js → internal-vega-event-manager-7003c84a.js} +10 -2
- package/dist/cjs/{keyboard-manager-c78b46bd.js → keyboard-manager-ca76d4dc.js} +1 -1
- package/dist/cjs/{keyboard-manager-slimmer-d350c931.js → keyboard-manager-slimmer-a1223714.js} +1 -1
- package/dist/cjs/{link-extension-455c02b3.js → link-extension-92a63cb7.js} +3 -3
- package/dist/cjs/loader.cjs.js +13 -14
- package/dist/cjs/{month-view-generator-006562dc.js → month-view-generator-876c50d4.js} +1 -1
- package/dist/cjs/{public-rules-c59eba88.js → public-rules-9e1ea1d9.js} +7 -7
- package/dist/cjs/{range-bf80fa40.js → range-30219330.js} +1 -1
- package/dist/cjs/{responsive-format-facade-1af54330.js → responsive-format-facade-25e9f30d.js} +1 -1
- package/dist/cjs/{rich-text-editor-required-rule-1085c71a.js → rich-text-editor-required-rule-23bf7485.js} +1 -1
- package/dist/cjs/shared-backdrop-manager-71e54fdb.js +199 -0
- package/dist/cjs/{split-cell-operation-2fa5c9e4.js → split-cell-operation-43752212.js} +3 -3
- package/dist/cjs/{state-border-formatter-501f6645.js → state-border-formatter-f1ce0f3b.js} +1 -1
- package/dist/cjs/{string-format-strategy.abstract-a02bf002.js → string-format-strategy.abstract-b22f7754.js} +1 -1
- package/dist/cjs/{string-input-formatter-slimmer-9cca6151.js → string-input-formatter-slimmer-d2c248f7.js} +1 -1
- package/dist/cjs/{string-mask-strategy-4c174ebf.js → string-mask-strategy-fc01a500.js} +2 -2
- package/dist/cjs/{style-formatter-2c749500.js → style-formatter-73205450.js} +2 -2
- package/dist/cjs/{time-required-rule-04994a5e.js → time-required-rule-12d2f394.js} +1 -1
- package/dist/cjs/{token-extension-d217914d.js → token-extension-d123d9d0.js} +308 -18
- package/dist/cjs/{translation-slimmer-7fb6e94c.js → translation-slimmer-9099f56c.js} +1 -1
- package/dist/cjs/{type-guard-1c3770d4.js → type-guard-f354af8b.js} +1 -1
- package/dist/cjs/{valid-credit-card-number-rule-f719a8c6.js → valid-credit-card-number-rule-8d370163.js} +1 -1
- package/dist/cjs/vega-accordion.cjs.entry.js +8 -8
- package/dist/cjs/vega-app-footer.cjs.entry.js +2 -2
- package/dist/cjs/vega-app-header-button.cjs.entry.js +8 -8
- package/dist/cjs/vega-banner.cjs.entry.js +2 -2
- package/dist/cjs/vega-box.cjs.entry.js +6 -6
- package/dist/cjs/vega-breadcrumb.cjs.entry.js +3 -3
- package/dist/cjs/vega-button-circle.cjs.entry.js +8 -8
- package/dist/cjs/vega-button-group_2.cjs.entry.js +3 -3
- package/dist/cjs/vega-button-link.cjs.entry.js +3 -3
- package/dist/cjs/vega-button.cjs.entry.js +11 -8
- package/dist/cjs/vega-calendar_5.cjs.entry.js +10 -10
- package/dist/cjs/vega-card.cjs.entry.js +5 -5
- package/dist/cjs/vega-carousel.cjs.entry.js +5 -5
- package/dist/cjs/vega-checkbox_2.cjs.entry.js +5 -5
- package/dist/cjs/vega-chip.cjs.entry.js +8 -8
- package/dist/cjs/vega-code-block.cjs.entry.js +11 -11
- package/dist/cjs/vega-color-picker.cjs.entry.js +4 -4
- package/dist/cjs/vega-color-swatch-picker.cjs.entry.js +6 -6
- package/dist/cjs/vega-color-swatch.cjs.entry.js +4 -4
- package/dist/cjs/vega-combo-box.cjs.entry.js +30 -12
- package/dist/cjs/vega-date-picker_2.cjs.entry.js +16 -16
- package/dist/cjs/vega-dialog_2.cjs.entry.js +163 -73
- package/dist/cjs/vega-divider.cjs.entry.js +5 -5
- package/dist/cjs/vega-dropdown_5.cjs.entry.js +21 -16
- package/dist/cjs/vega-env-manager-23b8b23c.js +2 -2
- package/dist/cjs/vega-field-label.cjs.entry.js +4 -4
- package/dist/cjs/vega-file-uploader.cjs.entry.js +5 -5
- 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 +6 -6
- 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 +8 -8
- package/dist/cjs/vega-input-credit-card.cjs.entry.js +9 -9
- package/dist/cjs/vega-input-numeric.cjs.entry.js +8 -8
- package/dist/cjs/vega-input-passcode.cjs.entry.js +8 -8
- package/dist/cjs/vega-input-phone-number.cjs.entry.js +7 -7
- package/dist/cjs/vega-input-range.cjs.entry.js +6 -6
- package/dist/cjs/vega-input-select.cjs.entry.js +59 -10
- package/dist/cjs/vega-input.cjs.entry.js +8 -8
- package/dist/cjs/vega-item-toggle.cjs.entry.js +2 -2
- package/dist/cjs/vega-left-nav_5.cjs.entry.js +158 -114
- package/dist/cjs/vega-loader-wrapper_2.cjs.entry.js +3 -3
- package/dist/cjs/vega-pagination-page-selector-mobile.cjs.entry.js +2 -2
- package/dist/cjs/vega-pagination-page-size-selector-mobile.cjs.entry.js +2 -2
- package/dist/cjs/vega-pagination.cjs.entry.js +7 -7
- package/dist/cjs/vega-popover_2.cjs.entry.js +10 -10
- package/dist/cjs/vega-progress-tracker_2.cjs.entry.js +16 -6
- package/dist/cjs/vega-radio_2.cjs.entry.js +8 -8
- package/dist/cjs/vega-rich-text-content.cjs.entry.js +6 -6
- package/dist/cjs/vega-rich-text-editor_4.cjs.entry.js +58 -31
- package/dist/cjs/vega-rich-text-find-replace-panel.cjs.entry.js +3 -3
- package/dist/cjs/vega-rich-text-special-characters-panel.cjs.entry.js +7 -7
- package/dist/cjs/vega-rich-text-table-properties_3.cjs.entry.js +14 -14
- package/dist/cjs/vega-segment-control.cjs.entry.js +2 -2
- package/dist/cjs/vega-selection-chip_2.cjs.entry.js +7 -7
- package/dist/cjs/vega-selection-tile_2.cjs.entry.js +5 -5
- package/dist/cjs/vega-sidenav_3.cjs.entry.js +5 -5
- package/dist/cjs/vega-signature-capture.cjs.entry.js +9 -9
- package/dist/cjs/vega-stepper.cjs.entry.js +5 -5
- package/dist/cjs/vega-tab-group_2.cjs.entry.js +3 -3
- package/dist/cjs/vega-table_11.cjs.entry.js +72 -12
- package/dist/cjs/vega-textarea.cjs.entry.js +5 -5
- package/dist/cjs/vega-time-picker_2.cjs.entry.js +12 -12
- package/dist/cjs/vega-toggle-switch.cjs.entry.js +4 -4
- package/dist/cjs/vega-tooltip_2.cjs.entry.js +6 -6
- package/dist/cjs/vega.cjs.js +13 -14
- package/dist/collection/components/vega-button/vega-button.css +4 -0
- package/dist/collection/components/vega-button/vega-button.js +4 -1
- package/dist/collection/components/vega-combo-box/slimmers/renderers/vega-combo-box-dropdown-renderer.js +5 -1
- package/dist/collection/components/vega-combo-box/vega-combo-box.js +52 -1
- package/dist/collection/components/vega-dialog/vega-dialog.js +1 -1
- package/dist/collection/components/vega-dropdown/slimmers/controllers/vega-dropdown-render-mode-controller.js +7 -6
- package/dist/collection/components/vega-dropdown/vega-dropdown.js +6 -1
- package/dist/collection/components/vega-input-select/slimmers/controllers/vega-input-select-dropdown-controller.js +11 -1
- package/dist/collection/components/vega-input-select/slimmers/controllers/vega-input-select-items-slot-controler.js +23 -2
- package/dist/collection/components/vega-input-select/slimmers/renderers/vega-input-select-dropdown-renderer.js +4 -0
- package/dist/collection/components/vega-input-select/vega-input-select.js +53 -2
- package/dist/collection/components/vega-modal/slimmers/controllers/vega-modal-backdrop-manager.js +141 -0
- package/dist/collection/components/vega-modal/slimmers/controllers/vega-modal-open-state-controller.js +10 -17
- package/dist/collection/components/vega-modal/slimmers/controllers/vega-modal-z-index-controller.js +2 -2
- package/dist/collection/components/vega-modal/slimmers/renderers/vega-modal-renderer.js +3 -2
- package/dist/collection/components/vega-modal/vega-modal.js +77 -8
- package/dist/collection/components/vega-nav/vega-left-nav/slimmers/controllers/vega-left-nav-auto-collapse-controller.js +4 -6
- package/dist/collection/components/vega-nav/vega-left-nav/slimmers/controllers/vega-left-nav-backdrop-controller.js +23 -68
- package/dist/collection/components/vega-nav/vega-left-nav/slimmers/controllers/vega-left-nav-backdrop-manager.js +74 -0
- package/dist/collection/components/vega-nav/vega-left-nav/slimmers/controllers/vega-left-nav-open-state-controller.js +16 -2
- package/dist/collection/components/vega-nav/vega-left-nav/slimmers/controllers/vega-left-nav-zindex-controller.js +2 -2
- package/dist/collection/components/vega-nav/vega-left-nav/vega-left-nav.js +7 -2
- package/dist/collection/components/vega-progress-tracker/slimmers/controllers/vega-progress-tracker-current-steps-controller.js +7 -0
- package/dist/collection/components/vega-progress-tracker/vega-progress-tracker.js +6 -0
- package/dist/collection/components/vega-rich-text-editor/dto/annotations/custom-style-annotation.js +3 -2
- package/dist/collection/components/vega-rich-text-editor/dto/blocks/block.abstract.js +2 -1
- package/dist/collection/components/vega-rich-text-editor/dto/filter-styles-strategies/code-block/code-node-filter-styles-strategy.js +1 -1
- package/dist/collection/components/vega-rich-text-editor/dto/nodes/node.abstract.js +2 -1
- package/dist/collection/components/vega-rich-text-editor/extensions/base-toolbar-button-renderer.js +1 -1
- package/dist/collection/components/vega-rich-text-editor/extensions/find-replace/slimmer/controllers/helper/find-replace-highlight-manager.js +21 -7
- package/dist/collection/components/vega-rich-text-editor/extensions/find-replace/slimmer/renderers/find-replace-toolbar-button-renderer.js +12 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/fullscreen/assets/fullscreen-enter.js +3 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/fullscreen/assets/fullscreen-exit.js +3 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/fullscreen/controller/fullscreen-controller.js +156 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/fullscreen/fullscreen-extension.js +31 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/fullscreen/fullscreen-toolbar-button-renderer.js +73 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/paste/paste-chooser-ui.js +1 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/table/renderers/table-toolbar-popover-renderer.js +1 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-properties/slimmers/renderers/vega-rich-text-table-properties-basic-form-field-renderer.abstract.js +1 -1
- package/dist/collection/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-setting/slimmers/renderers/column-button-slimmer.js +1 -1
- package/dist/collection/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-setting/slimmers/renderers/merge-cells-button-slimmer.js +1 -1
- package/dist/collection/components/vega-rich-text-editor/extensions/table/vega-rich-text-table-setting/slimmers/renderers/row-button-slimmer.js +1 -1
- package/dist/collection/components/vega-rich-text-editor/helpers/utils.js +71 -15
- package/dist/collection/components/vega-rich-text-editor/public-api.js +2 -0
- package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/extension-controller.js +2 -0
- package/dist/collection/components/vega-rich-text-editor/slimmers/renderers/tools/bullets-numbers/bullets-numbers-toolbar-button-slimmer.js +1 -1
- package/dist/collection/components/vega-rich-text-editor/slimmers/renderers/tools/horizontal-alignment/horizontal-alignment-toolbar-button-slimmer.js +1 -1
- package/dist/collection/components/vega-rich-text-editor/slimmers/renderers/tools/image-toolbar-button-slimmer.js +1 -1
- package/dist/collection/components/vega-rich-text-editor/slimmers/renderers/tools/text-color-toolbar-button-slimmer.js +1 -1
- package/dist/collection/components/vega-rich-text-editor/slimmers/renderers/tools/text-styles-toolbar-button-slimmer.js +1 -1
- package/dist/collection/components/vega-rich-text-editor/slimmers/renderers/vega-rich-text-editor-renderer.js +11 -1
- package/dist/collection/components/vega-rich-text-editor/slimmers/renderers/vega-rich-text-editor-source-view-renderer.js +19 -1
- package/dist/collection/components/vega-rich-text-editor/vega-rich-text-link-editor/slimmers/renderers/vega-rich-text-link-editor-renderer.js +1 -1
- package/dist/collection/components/vega-table/slimmers/renderers/vega-table-cell-renderer.js +3 -1
- package/dist/collection/components/vega-table/vega-table-cell/vega-table-cell.js +89 -7
- package/dist/collection/global/scripts/before-vega-load.js +2 -0
- package/dist/collection/helpers/backdrop/index.js +1 -0
- package/dist/collection/helpers/backdrop/shared-backdrop-manager.js +194 -0
- package/dist/collection/helpers/event-manager/event-id/component-event-id-map.js +11 -3
- package/dist/collection/helpers/translation/locales/en.js +2 -0
- package/dist/esm/{app-globals-9950d055.js → app-globals-eafcc7a1.js} +11 -10
- package/dist/esm/{child-nodes-event-prevent-slimmer-96c14f5a.js → child-nodes-event-prevent-slimmer-82626871.js} +1 -1
- package/dist/esm/{code-block-ae2337c2.js → code-block-e12588fe.js} +77 -21
- package/dist/esm/{component-value-history-controller-slimmer.abstract-b1ee1b8e.js → component-value-history-controller-slimmer.abstract-4e8eb313.js} +3 -3
- package/dist/esm/{content-state-c3b85ae6.js → content-state-8032467a.js} +2 -2
- package/dist/esm/{date-required-rule-e06115f8.js → date-required-rule-b88e1650.js} +1 -1
- package/dist/esm/{design-token-4e682056.js → design-token-76bd217c.js} +3 -3
- package/dist/esm/{element-appender-slimmer-a4485ef6.js → element-appender-slimmer-7fcb944b.js} +2 -2
- package/dist/esm/{event-emit-slimmer-db4a82e0.js → event-emit-slimmer-2452278f.js} +1 -1
- package/dist/esm/{form-field-controller-slimmer-a1c7b28c.js → form-field-controller-slimmer-395c23e3.js} +1 -1
- package/dist/esm/{image-annotation-action-4c77d314.js → image-annotation-action-08a20d5e.js} +4 -4
- package/dist/esm/{image-extension-7108c27d.js → image-extension-b6c7e4a7.js} +18 -2
- package/dist/esm/index.js +19 -19
- package/dist/esm/{inject-keyboard-manager-e8ddb78d.js → inject-keyboard-manager-86126b5b.js} +1 -1
- package/dist/esm/{internal-calendar-period-factory-6f19d767.js → internal-calendar-period-factory-3a07dba0.js} +1 -1
- package/dist/esm/{internal-translation-controller-09b8bd13.js → internal-translation-controller-16709132.js} +2 -0
- package/dist/esm/{internal-vega-event-manager-48690e5b.js → internal-vega-event-manager-2ecc9186.js} +11 -3
- package/dist/esm/{keyboard-manager-ec18721b.js → keyboard-manager-a0c3e1cf.js} +1 -1
- package/dist/esm/{keyboard-manager-slimmer-531ddb0e.js → keyboard-manager-slimmer-f3f66c15.js} +1 -1
- package/dist/esm/{link-extension-74eaa826.js → link-extension-97fcb8fb.js} +3 -3
- package/dist/esm/loader.js +14 -15
- package/dist/esm/{month-view-generator-afd78ff8.js → month-view-generator-fd0e1856.js} +1 -1
- package/dist/esm/{public-rules-5fce32a5.js → public-rules-c06f0d2a.js} +7 -7
- package/dist/esm/{range-8f877dbf.js → range-e999837f.js} +1 -1
- package/dist/esm/{responsive-format-facade-299e6304.js → responsive-format-facade-ced96b0b.js} +1 -1
- package/dist/esm/{rich-text-editor-required-rule-3047bab0.js → rich-text-editor-required-rule-71f8ee98.js} +1 -1
- package/dist/esm/shared-backdrop-manager-a7c63838.js +197 -0
- package/dist/esm/{split-cell-operation-98d58410.js → split-cell-operation-359f8082.js} +3 -3
- package/dist/esm/{state-border-formatter-da52b626.js → state-border-formatter-b680e922.js} +1 -1
- package/dist/esm/{string-format-strategy.abstract-a45b5ff7.js → string-format-strategy.abstract-23faab71.js} +1 -1
- package/dist/esm/{string-input-formatter-slimmer-4a032fed.js → string-input-formatter-slimmer-4b4866a6.js} +1 -1
- package/dist/esm/{string-mask-strategy-37e53e48.js → string-mask-strategy-66586cd8.js} +2 -2
- package/dist/esm/{style-formatter-3d5ddfb1.js → style-formatter-f4e16af5.js} +2 -2
- package/dist/esm/{time-required-rule-355b73d2.js → time-required-rule-6e80a9ab.js} +1 -1
- package/dist/esm/{token-extension-ecfafe94.js → token-extension-f5bf9c21.js} +308 -19
- package/dist/esm/{translation-slimmer-3ea56354.js → translation-slimmer-21748a0e.js} +1 -1
- package/dist/esm/{type-guard-2bfb2c7b.js → type-guard-ec5e8628.js} +1 -1
- package/dist/esm/{valid-credit-card-number-rule-52c6b029.js → valid-credit-card-number-rule-ca5a47d6.js} +1 -1
- package/dist/esm/vega-accordion.entry.js +9 -9
- package/dist/esm/vega-app-footer.entry.js +3 -3
- package/dist/esm/vega-app-header-button.entry.js +9 -9
- package/dist/esm/vega-banner.entry.js +3 -3
- package/dist/esm/vega-box.entry.js +6 -6
- package/dist/esm/vega-breadcrumb.entry.js +4 -4
- package/dist/esm/vega-button-circle.entry.js +9 -9
- package/dist/esm/vega-button-group_2.entry.js +4 -4
- package/dist/esm/vega-button-link.entry.js +4 -4
- package/dist/esm/vega-button.entry.js +12 -9
- package/dist/esm/vega-calendar_5.entry.js +11 -11
- package/dist/esm/vega-card.entry.js +5 -5
- package/dist/esm/vega-carousel.entry.js +6 -6
- package/dist/esm/vega-checkbox_2.entry.js +6 -6
- package/dist/esm/vega-chip.entry.js +9 -9
- package/dist/esm/vega-code-block.entry.js +12 -12
- package/dist/esm/vega-color-picker.entry.js +5 -5
- package/dist/esm/vega-color-swatch-picker.entry.js +7 -7
- package/dist/esm/vega-color-swatch.entry.js +5 -5
- package/dist/esm/vega-combo-box.entry.js +31 -13
- package/dist/esm/vega-date-picker_2.entry.js +17 -17
- package/dist/esm/vega-dialog_2.entry.js +164 -74
- package/dist/esm/vega-divider.entry.js +5 -5
- package/dist/esm/vega-dropdown_5.entry.js +22 -17
- package/dist/esm/vega-env-manager-8f8dc473.js +2 -2
- package/dist/esm/{vega-event-id-270fe47e.js → vega-event-id-f55f6977.js} +1 -1
- package/dist/esm/vega-field-label.entry.js +5 -5
- package/dist/esm/vega-file-uploader.entry.js +6 -6
- 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 +7 -7
- 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 +9 -9
- package/dist/esm/vega-input-credit-card.entry.js +10 -10
- package/dist/esm/vega-input-numeric.entry.js +9 -9
- package/dist/esm/vega-input-passcode.entry.js +9 -9
- package/dist/esm/vega-input-phone-number.entry.js +8 -8
- package/dist/esm/vega-input-range.entry.js +7 -7
- package/dist/esm/vega-input-select.entry.js +60 -11
- package/dist/esm/vega-input.entry.js +9 -9
- package/dist/esm/vega-item-toggle.entry.js +3 -3
- package/dist/esm/vega-left-nav_5.entry.js +159 -115
- package/dist/esm/vega-loader-wrapper_2.entry.js +3 -3
- package/dist/esm/vega-page-notification_2.entry.js +1 -1
- package/dist/esm/vega-pagination-page-selector-mobile.entry.js +3 -3
- package/dist/esm/vega-pagination-page-size-selector-mobile.entry.js +3 -3
- package/dist/esm/vega-pagination.entry.js +8 -8
- package/dist/esm/vega-popover_2.entry.js +11 -11
- package/dist/esm/vega-progress-tracker_2.entry.js +17 -7
- package/dist/esm/vega-radio_2.entry.js +9 -9
- package/dist/esm/vega-rich-text-content.entry.js +7 -7
- package/dist/esm/vega-rich-text-editor_4.entry.js +55 -28
- package/dist/esm/vega-rich-text-find-replace-panel.entry.js +4 -4
- package/dist/esm/vega-rich-text-special-characters-panel.entry.js +8 -8
- package/dist/esm/vega-rich-text-table-properties_3.entry.js +15 -15
- package/dist/esm/vega-segment-control.entry.js +3 -3
- package/dist/esm/vega-selection-chip_2.entry.js +8 -8
- package/dist/esm/vega-selection-tile_2.entry.js +6 -6
- package/dist/esm/vega-sidenav_3.entry.js +6 -6
- package/dist/esm/vega-signature-capture.entry.js +10 -10
- package/dist/esm/vega-stepper.entry.js +6 -6
- package/dist/esm/vega-tab-group_2.entry.js +4 -4
- package/dist/esm/vega-table_11.entry.js +73 -13
- package/dist/esm/vega-textarea.entry.js +6 -6
- package/dist/esm/vega-time-picker_2.entry.js +13 -13
- package/dist/esm/vega-toggle-switch.entry.js +5 -5
- package/dist/esm/vega-tooltip_2.entry.js +6 -6
- package/dist/esm/vega.js +14 -15
- package/dist/sri/vega-sri-manifest.json +358 -358
- package/dist/types/components/vega-combo-box/slimmers/renderers/vega-combo-box-dropdown-renderer.d.ts +1 -0
- package/dist/types/components/vega-combo-box/vega-combo-box.d.ts +21 -0
- package/dist/types/components/vega-dropdown/slimmers/controllers/vega-dropdown-render-mode-controller.d.ts +2 -1
- package/dist/types/components/vega-dropdown/vega-dropdown.d.ts +4 -0
- package/dist/types/components/vega-input-select/slimmers/controllers/vega-input-select-dropdown-controller.d.ts +2 -0
- package/dist/types/components/vega-input-select/slimmers/controllers/vega-input-select-items-slot-controler.d.ts +10 -0
- package/dist/types/components/vega-input-select/types.d.ts +1 -0
- package/dist/types/components/vega-input-select/vega-input-select.d.ts +21 -0
- package/dist/types/components/vega-modal/slimmers/controllers/vega-modal-backdrop-manager.d.ts +66 -0
- package/dist/types/components/vega-modal/slimmers/controllers/vega-modal-open-state-controller.d.ts +1 -5
- package/dist/types/components/vega-modal/slimmers/controllers/vega-modal-z-index-controller.d.ts +1 -1
- package/dist/types/components/vega-modal/slimmers/renderers/vega-modal-renderer.d.ts +1 -1
- package/dist/types/components/vega-modal/vega-modal.d.ts +34 -6
- package/dist/types/components/vega-nav/vega-left-nav/slimmers/controllers/vega-left-nav-auto-collapse-controller.d.ts +0 -1
- package/dist/types/components/vega-nav/vega-left-nav/slimmers/controllers/vega-left-nav-backdrop-controller.d.ts +12 -19
- package/dist/types/components/vega-nav/vega-left-nav/slimmers/controllers/vega-left-nav-backdrop-manager.d.ts +41 -0
- package/dist/types/components/vega-nav/vega-left-nav/slimmers/controllers/vega-left-nav-open-state-controller.d.ts +4 -1
- package/dist/types/components/vega-nav/vega-left-nav/slimmers/controllers/vega-left-nav-zindex-controller.d.ts +1 -1
- package/dist/types/components/vega-nav/vega-left-nav/vega-left-nav.d.ts +2 -0
- package/dist/types/components/vega-progress-tracker/slimmers/controllers/vega-progress-tracker-current-steps-controller.d.ts +2 -0
- package/dist/types/components/vega-progress-tracker/vega-progress-tracker.d.ts +1 -0
- package/dist/types/components/vega-rich-text-editor/extensions/find-replace/slimmer/controllers/helper/find-replace-highlight-manager.d.ts +15 -4
- package/dist/types/components/vega-rich-text-editor/extensions/fullscreen/assets/fullscreen-enter.d.ts +3 -0
- package/dist/types/components/vega-rich-text-editor/extensions/fullscreen/assets/fullscreen-exit.d.ts +3 -0
- package/dist/types/components/vega-rich-text-editor/extensions/fullscreen/controller/fullscreen-controller.d.ts +63 -0
- package/dist/types/components/vega-rich-text-editor/extensions/fullscreen/fullscreen-extension.d.ts +20 -0
- package/dist/types/components/vega-rich-text-editor/extensions/fullscreen/fullscreen-toolbar-button-renderer.d.ts +40 -0
- package/dist/types/components/vega-rich-text-editor/helpers/utils.d.ts +19 -0
- package/dist/types/components/vega-rich-text-editor/interface.d.ts +20 -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/vega-rich-text-editor-renderer.d.ts +5 -0
- package/dist/types/components/vega-rich-text-editor/slimmers/renderers/vega-rich-text-editor-source-view-renderer.d.ts +8 -0
- package/dist/types/components/vega-table/interface.d.ts +13 -0
- package/dist/types/components/vega-table/vega-table-cell/vega-table-cell.d.ts +14 -0
- package/dist/types/components.d.ts +46 -2
- package/dist/types/helpers/backdrop/index.d.ts +1 -0
- package/dist/types/helpers/backdrop/shared-backdrop-manager.d.ts +83 -0
- package/dist/types/helpers/translation/interface.d.ts +3 -1
- package/dist/vega/index.esm.js +1 -1
- package/dist/vega/{p-21e21f51.js → p-02355de8.js} +1 -1
- package/dist/vega/p-0512308f.entry.js +1 -0
- package/dist/vega/p-05d04c07.entry.js +1 -0
- package/dist/vega/p-0be4df0a.js +1 -0
- package/dist/vega/{p-0e607b44.js → p-0d18368b.js} +1 -1
- package/dist/vega/{p-6b1893f6.entry.js → p-1232b553.entry.js} +1 -1
- package/dist/vega/{p-32a67ba1.js → p-14baa886.js} +1 -1
- package/dist/vega/{p-d7f32ccf.entry.js → p-1d8312d3.entry.js} +1 -1
- package/dist/vega/{p-fbd3be00.entry.js → p-200c8914.entry.js} +1 -1
- package/dist/vega/{p-b1ff70bf.js → p-2c737fc8.js} +1 -1
- package/dist/vega/{p-c5ecbc53.entry.js → p-2d77ae73.entry.js} +1 -1
- package/dist/vega/{p-b042e3b4.entry.js → p-2d8d4d5b.entry.js} +1 -1
- package/dist/vega/p-31216140.js +1 -0
- package/dist/vega/{p-afb96938.js → p-320091b7.js} +1 -1
- package/dist/vega/p-36949349.js +1 -0
- package/dist/vega/{p-44439ecc.entry.js → p-36d2df7a.entry.js} +1 -1
- package/dist/vega/p-38c9d782.js +1 -0
- package/dist/vega/{p-e4309574.js → p-3c309a38.js} +1 -1
- package/dist/vega/p-3d6f761a.entry.js +1 -0
- package/dist/vega/{p-4d9562bc.js → p-3dee1e55.js} +1 -1
- package/dist/vega/p-4151f53a.entry.js +1 -0
- package/dist/vega/{p-7c8e579e.entry.js → p-49e1cf4d.entry.js} +1 -1
- package/dist/vega/{p-ccf7518b.js → p-4fe40b76.js} +1 -1
- package/dist/vega/{p-7d54e9c1.js → p-4ff48b84.js} +1 -1
- package/dist/vega/p-513bc0d9.js +1 -0
- package/dist/vega/{p-698fbd73.js → p-5447a8e8.js} +1 -1
- package/dist/vega/{p-45e8424a.entry.js → p-56d19601.entry.js} +1 -1
- package/dist/vega/{p-a359e53c.js → p-579cdeae.js} +1 -1
- package/dist/vega/{p-fda6e2cc.entry.js → p-5924adae.entry.js} +1 -1
- package/dist/vega/{p-c2d28797.entry.js → p-595998d9.entry.js} +1 -1
- package/dist/vega/{p-7b93a756.entry.js → p-5e4517eb.entry.js} +1 -1
- package/dist/vega/p-5f377954.js +1 -1
- package/dist/vega/{p-1efab41b.js → p-61ce8029.js} +1 -1
- package/dist/vega/{p-140616fe.js → p-66647244.js} +1 -1
- package/dist/vega/{p-ddf03de1.entry.js → p-6680ba17.entry.js} +1 -1
- package/dist/vega/{p-1818f399.entry.js → p-6c9c2f8c.entry.js} +1 -1
- package/dist/vega/{p-5dbfffcd.js → p-6cde45fc.js} +1 -1
- package/dist/vega/{p-af98539f.entry.js → p-6fcec7c7.entry.js} +1 -1
- package/dist/vega/{p-422d88ae.entry.js → p-74f86ff9.entry.js} +1 -1
- package/dist/vega/p-75e33859.js +1 -0
- package/dist/vega/{p-6ad7144a.entry.js → p-775ecfad.entry.js} +1 -1
- package/dist/vega/p-7950f3e2.entry.js +1 -0
- package/dist/vega/{p-615a2b8c.entry.js → p-80b7945a.entry.js} +1 -1
- package/dist/vega/p-8354cff0.entry.js +1 -0
- package/dist/vega/{p-653a6dd8.entry.js → p-841b3281.entry.js} +1 -1
- package/dist/vega/p-8720816e.js +1 -0
- package/dist/vega/p-87e5cb56.entry.js +1 -0
- package/dist/vega/p-88be9ec5.js +1 -0
- package/dist/vega/{p-6712a9c7.entry.js → p-892edf88.entry.js} +1 -1
- package/dist/vega/p-8a001caa.js +1 -0
- package/dist/vega/p-8c30a60d.js +1 -0
- package/dist/vega/p-8d4b85e7.entry.js +1 -0
- package/dist/vega/{p-f8a29127.entry.js → p-8d96f0e8.entry.js} +1 -1
- package/dist/vega/{p-19c42e30.js → p-8db904dc.js} +1 -1
- package/dist/vega/{p-e86c6802.entry.js → p-91303402.entry.js} +1 -1
- package/dist/vega/{p-c553d37e.js → p-919cddc3.js} +1 -1
- package/dist/vega/p-97215133.js +1 -0
- package/dist/vega/{p-3f7b10b9.entry.js → p-9bdc6e11.entry.js} +1 -1
- package/dist/vega/{p-09d50f59.entry.js → p-9c39f90b.entry.js} +1 -1
- package/dist/vega/{p-d62b85ff.entry.js → p-9d96d83f.entry.js} +1 -1
- package/dist/vega/p-9f201152.entry.js +1 -0
- package/dist/vega/{p-ef605271.js → p-9f7154d2.js} +1 -1
- package/dist/vega/{p-3c9da3cd.entry.js → p-a0a58295.entry.js} +1 -1
- package/dist/vega/{p-4c49b2e3.js → p-a7209700.js} +1 -1
- package/dist/vega/{p-8c1a5fa4.entry.js → p-a775825e.entry.js} +1 -1
- package/dist/vega/{p-c3c0e415.entry.js → p-a890d60b.entry.js} +1 -1
- package/dist/vega/{p-bbabb1c8.entry.js → p-ae146458.entry.js} +1 -1
- package/dist/vega/{p-0f1d6ceb.entry.js → p-b187b82d.entry.js} +1 -1
- package/dist/vega/{p-f0d4c78c.js → p-b1eb9ff0.js} +1 -1
- package/dist/vega/{p-832d1a72.entry.js → p-b3a2ce06.entry.js} +1 -1
- package/dist/vega/{p-56c4e349.entry.js → p-b4c26035.entry.js} +1 -1
- package/dist/vega/p-b4e7c967.js +1 -0
- package/dist/vega/{p-2de61f1b.js → p-b775e51f.js} +1 -1
- package/dist/vega/{p-63101cb4.entry.js → p-b8c13ac9.entry.js} +1 -1
- package/dist/vega/{p-e410c4ad.entry.js → p-b9e72de2.entry.js} +1 -1
- package/dist/vega/{p-cf8d5b3f.entry.js → p-ba2b9663.entry.js} +1 -1
- package/dist/vega/{p-95d6c85f.js → p-ba662fe5.js} +1 -1
- package/dist/vega/{p-05f937c5.entry.js → p-bb60e381.entry.js} +1 -1
- package/dist/vega/p-bbad318e.entry.js +1 -0
- package/dist/vega/{p-acbba6da.entry.js → p-c079c935.entry.js} +1 -1
- package/dist/vega/p-c0e42c03.entry.js +1 -0
- package/dist/vega/{p-3932f964.entry.js → p-c41f5684.entry.js} +1 -1
- package/dist/vega/{p-73fd18d9.entry.js → p-c54b5a8f.entry.js} +1 -1
- package/dist/vega/{p-0cb78838.entry.js → p-c5d3b008.entry.js} +1 -1
- package/dist/vega/{p-9a472a04.entry.js → p-cd1e976c.entry.js} +1 -1
- package/dist/vega/{p-2dc5edd0.entry.js → p-db11134b.entry.js} +1 -1
- package/dist/vega/p-df828d90.entry.js +1 -0
- package/dist/vega/{p-944b43ce.entry.js → p-e1737c8e.entry.js} +1 -1
- package/dist/vega/{p-2fcc604c.entry.js → p-e1b57e8f.entry.js} +1 -1
- package/dist/vega/{p-d44943e2.entry.js → p-e235020b.entry.js} +1 -1
- package/dist/vega/{p-4f327808.entry.js → p-e4266b45.entry.js} +1 -1
- package/dist/vega/{p-9cafbc26.entry.js → p-e48a870f.entry.js} +1 -1
- package/dist/vega/{p-ffdacaf9.entry.js → p-e5ff77f7.entry.js} +1 -1
- package/dist/vega/{p-d4bb6f93.entry.js → p-ebe32b25.entry.js} +1 -1
- package/dist/vega/p-ec162599.entry.js +1 -0
- package/dist/vega/{p-d3a36d19.entry.js → p-ec64cc59.entry.js} +1 -1
- package/dist/vega/p-f1974321.js +1 -0
- package/dist/vega/{p-4256252c.js → p-f4da615a.js} +1 -1
- package/dist/vega/{p-f2f22b5d.entry.js → p-f78944d7.entry.js} +1 -1
- package/dist/vega/{p-6d40635e.js → p-f7e459cd.js} +1 -1
- package/dist/vega/{p-c9c6daa6.entry.js → p-f9bfee81.entry.js} +1 -1
- package/dist/vega/{p-26c7fe8b.entry.js → p-fa65956c.entry.js} +1 -1
- package/dist/vega/{p-66b7d1c7.entry.js → p-fc7e4c8a.entry.js} +1 -1
- package/dist/vega/{p-b39d4a88.entry.js → p-fd23c365.entry.js} +1 -1
- package/dist/vega/{p-8d27b9cc.js → p-fe24b459.js} +1 -1
- package/dist/vega/vega.esm.js +1 -1
- package/package.json +1 -1
- package/dist/cjs/replace-selected-text-action-a80f5a6a.js +0 -20
- package/dist/collection/components/vega-modal/slimmers/controllers/vega-modal-backdrop-controller.js +0 -73
- package/dist/esm/replace-selected-text-action-c9278a0f.js +0 -18
- package/dist/types/components/vega-modal/slimmers/controllers/vega-modal-backdrop-controller.d.ts +0 -27
- package/dist/vega/p-07562b9c.js +0 -1
- package/dist/vega/p-18a5e8bc.js +0 -1
- package/dist/vega/p-282b37cb.js +0 -1
- package/dist/vega/p-2de88b4a.entry.js +0 -1
- package/dist/vega/p-392e049c.entry.js +0 -1
- package/dist/vega/p-4e1aa86f.js +0 -1
- package/dist/vega/p-4ef5c4a7.entry.js +0 -1
- package/dist/vega/p-5139e516.js +0 -1
- package/dist/vega/p-751a5cd6.entry.js +0 -1
- package/dist/vega/p-846b1ab9.entry.js +0 -1
- package/dist/vega/p-88863658.js +0 -1
- package/dist/vega/p-99b699be.entry.js +0 -1
- package/dist/vega/p-9a01be93.js +0 -1
- package/dist/vega/p-a9a87b9a.js +0 -1
- package/dist/vega/p-ad35dea4.entry.js +0 -1
- package/dist/vega/p-b5bee669.entry.js +0 -1
- package/dist/vega/p-b5f308ee.entry.js +0 -1
- package/dist/vega/p-bbf1f988.entry.js +0 -1
- package/dist/vega/p-cb81fc2a.entry.js +0 -1
- package/dist/vega/p-ccb9bf86.js +0 -1
- package/dist/vega/p-dca3278f.js +0 -1
- package/dist/vega/p-ddd28a8e.entry.js +0 -1
- package/dist/vega/p-e0ecafca.js +0 -1
- package/dist/vega/p-e33e1e90.js +0 -1
- package/dist/vega/p-e5187a86.entry.js +0 -1
- package/dist/vega/p-ff8dd200.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{V as t,I as e,c as s,M as i}from"./p-6e1ab235.js";import{c as r}from"./p-02841589.js";import{C as o}from"./p-2d0d575f.js";import{O as n}from"./p-331a62d5.js";import{U as a,a as l,b as h,F as c,c as d,d as u,e as f}from"./p-cb378636.js";import{f as m,d as p}from"./p-528748fa.js";import{a as v,g as b}from"./p-8b5d3a52.js";import{c as g}from"./p-6a334573.js";import{d as R,D as j}from"./p-526e3634.js";import{i as y,g as w,j as O}from"./p-3a68b729.js";import{V as E}from"./p-0e607b44.js";import{h as V,l as F}from"./p-f0e828d8.js";import{P as I}from"./p-81dd00d0.js";import{I as C}from"./p-abd7aeaa.js";import{M as S}from"./p-78a57a17.js";import{A}from"./p-52b8f2d2.js";import{i as k}from"./p-d27ae9ff.js";import{S as T}from"./p-29e3eb12.js";class L{constructor(t){this.rule=t}getStatus(t,e,s){return{canEvaluate:this.rule.canEvaluate(t,e,s),isAsync:v(this.rule.evaluate)}}shouldShowError(t,e){try{return this.rule.shouldShowError?this.rule.shouldShowError(t,e):this.defaultShouldShowError(t)}catch(t){return!1}}handle(t){try{return this.rule.evaluate(t)}catch(t){return{isValid:!0,message:""}}}defaultShouldShowError(t){return!t.disabled&&t.visible&&(t.touched||t.modified)}}class M{constructor(){this.handlers=[],this.processId=""}checkIncludesAsyncRuleHandler(t,e,s){return!!this.handlers.find((i=>{const r=i.getStatus(t,e,s);return r.canEvaluate&&r.isAsync}))}setHandlersByRules(t){this.handlers=t&&t.length?t.map((t=>new L(t))):[]}async process(t,e,s,i,r){const o=this.preProcess();let n;for(const i of this.handlers){if(o!==this.processId)break;const r=i.getStatus(t,e,s);if(!r.canEvaluate)continue;let a;if(r.isAsync)try{a=await i.handle(t)}catch(t){}else a=i.handle(t);if(a&&!a.isValid){const t=i.shouldShowError(e,s);n=Object.assign(Object.assign({},a),{shouldShowError:t});break}}return this.postProcess(o,i,n,r),n?{isValid:!1,message:n.message}:{isValid:!0,message:""}}preProcess(){const t=b();return this.processId=t,t}postProcess(t,e,s,i){this.processId===t&&i(e,s)}}class D{run(t){const e=t.nextElementSibling;return e&&e.querySelector(".vega-error")?e.querySelector(".vega-error"):null}}class B{run(t){let e=t.nextElementSibling;return e&&!e.classList.contains("vega-error")&&(e=document.createElement("label"),e.classList.add("vega-error"),e.setAttribute("part","field-error-message"),t.after(e)),e}}class H{run(t){let e=t.nextElementSibling;return e||(e=document.createElement("label"),e.classList.add("vega-error"),e.setAttribute("part","field-error-message"),t.after(e)),e}}class U extends t{getTranslatedMessage(t){return"string"==typeof t?E.t(t):E.t(t.key,...t.args||[])}}var x=function(t,e,s,i){var r,o=arguments.length,n=o<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,s):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,s,i);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(n=(o<3?r(n):o>3?r(e,s,n):r(e,s))||n);return o>3&&n&&Object.defineProperty(e,s,n),n};class G extends t{constructor(){super(),this.formFieldMessageTranslatorSlimmer=new U,this.fieldErrorUiControllerStrategies=[new D,new B,new H],this.initTranslationObserver()}applyInputInvalidUI(t){const e=this.getInputElementContainer();if(o.notify(R.getSubject(this.host,y),{host:this.host,showError:!0}),e&&(e.classList.add("error"),t)){this.errorMessage=t;const s=this.getErrorContainer(e);s.innerHTML=V.sanitize(this.formFieldMessageTranslatorSlimmer.getTranslatedMessage(t),F),s.classList.remove("vega-hidden")}}resetInputInvalidUI(){this.errorMessage="";const t=this.getInputElementContainer();t&&(this.getErrorContainer(t).classList.add("vega-hidden"),t.classList.remove("error"),o.notify(R.getSubject(this.host,y),{host:this.host,showError:!1}))}getInputElementContainer(){return this.options&&this.options.inputContainerGetter?this.options.inputContainerGetter():null}getErrorContainer(t){for(const e of this.fieldErrorUiControllerStrategies){const s=e.run(t);if(s)return s}}initTranslationObserver(){const t=new n(this.isAcceptableTranslationObserver.bind(this),(()=>{if(!this.errorMessage)return;const t=this.getInputElementContainer();if(t){const e=this.getErrorContainer(t);e&&(e.innerHTML=V.sanitize(this.formFieldMessageTranslatorSlimmer.getTranslatedMessage(this.errorMessage),F))}}));o.register(a,t)}isAcceptableTranslationObserver(){return!0}}x([e()],G.prototype,"formFieldMessageTranslatorSlimmer",void 0),x([s()],G.prototype,"host",void 0),x([s()],G.prototype,"options",void 0);var P=function(t,e,s,i){var r,o=arguments.length,n=o<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,s):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,s,i);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(n=(o<3?r(n):o>3?r(e,s,n):r(e,s))||n);return o>3&&n&&Object.defineProperty(e,s,n),n};class W{constructor(t,e,s,i){var r,n;this.formFieldMessageTranslatorSlimmer=new U,this.fieldErrorUIController=new G,this.resizeObserverSlimmer=g(W,I,[],[{mapFrom:"connectResizeObserver",mapTo:"connectResizeObserver"}],[{callback:t=>{const e=this.isVisible,s=t[0].contentRect.height>0;this.isVisible=s,this.isAutoValidationEnabled()&&m(this.host,"vega-form")&&e!==s&&this.valid(["visible"])},target:()=>this.host}]),this.defaultRules=[],this.additionalRules=[],this.listeners=[],this.isTouched=!1,this.isModified=!1,this.isVisible=!1,this.formFieldValidationRuleHandlerChain=new M,this.hostChildAddedBlurEventMap=new WeakMap,this.handleValidationResult=(t,e)=>{let s=!0;return e?("rule"===t?e.shouldShowError?this.fieldErrorUIController.applyInputInvalidUI(e.message):this.fieldErrorUIController.resetInputInvalidUI():t?this.fieldErrorUIController.applyInputInvalidUI(e.message):this.fieldErrorUIController.resetInputInvalidUI(),s=!1):this.fieldErrorUIController.resetInputInvalidUI(),this.invokeListeners(s),o.notify(l,{host:this.host,detail:s}),s},this.setupTouchedListener=()=>{this.getTouchableAreaElements().filter((t=>t&&!0!==this.hostChildAddedBlurEventMap.get(t))).forEach((t=>{t.addEventListener("blur",(()=>{this.updateIsTouched(!0)})),this.hostChildAddedBlurEventMap.set(t,!0)}))},this.defaultRules=t||[],this.host=e,this.defaultValue=s,this.options=i,this.initDisabledAttrObserver(),this.connectResizeObserver(),this.initFormResetObserver(),null===(n=(r=this.host).componentOnReady)||void 0===n||n.call(r).then((()=>{this.didRender()})),this.setupModifiedListener(),this.listenHostElementKeydown(),this.updateValidationHandlers()}async validate(t){return await this.valid([],t)}addListener(t){this.listeners.push(t)}getRules(){const t=[...this.additionalRules];return[...this.defaultRules.map((e=>this.overrideDefaultRuleByAdditionalRule(e,t))),...t]}setDefaultRules(t){this.defaultRules=t,this.updateValidationHandlers()}setAdditionalRules(t){this.additionalRules=t,this.updateValidationHandlers()}destroy(){o.notify(h,{host:this.host}),this.unregisterFormResetObserver(),o.unregister(c,this.hostValueChangeObserver),this.hostChildrenObserver&&this.hostChildrenObserver.disconnect()}connectResizeObserver(){}updateDisableBlurValidation(t){this.disableBlurValidation=t}updateValidationHandlers(){this.formFieldValidationRuleHandlerChain.setHandlersByRules(this.getRules())}async valid(t,e="rule"){const s=this.getStatus(),i=this.host.value;this.formFieldValidationRuleHandlerChain.checkIncludesAsyncRuleHandler(i,s,t)&&o.notify(l,{host:this.host,detail:null});const{isValid:r,message:n}=await this.formFieldValidationRuleHandlerChain.process(i,s,t,e,this.handleValidationResult);return{isValid:r,message:this.formFieldMessageTranslatorSlimmer.getTranslatedMessage(n)}}invokeListeners(t){this.listeners.forEach((e=>e.callback(t)))}getStatus(){return{touched:this.isTouched,modified:this.isModified,disabled:this.host.disabled,visible:this.isVisible}}updateIsTouched(t){const e=this.isTouched;this.isTouched=t,!this.disableBlurValidation&&this.isAutoValidationEnabled()&&this.valid(e===t?[]:["touched"])}updateIsModified(t){const e=this.isModified;this.isModified=t,this.isAutoValidationEnabled()&&this.valid(e===t?[]:["modified"])}initDisabledAttrObserver(){this.disabledAttrObserver=new MutationObserver((()=>{this.isAutoValidationEnabled()&&this.valid(["disabled"])})),this.disabledAttrObserver.observe(this.host,{attributes:!0,attributeFilter:["disabled"]})}canAcceptFormResetOperation(t){return m(this.host,"vega-form")===t.host}unregisterFormResetObserver(){o.unregister(d,this.formResetTriggeredObserver)}monitorTouchedListener(){const t=this.getInputContainerElements();t&&(this.hostChildrenObserver=new MutationObserver((()=>{this.setupTouchedListener()})),this.hostChildrenObserver.observe(t,{childList:!0,subtree:!0})),this.setupTouchedListener()}getTouchableAreaElements(){return this.options&&this.options.touchableAreaGetter?this.options.touchableAreaGetter():[]}getInputContainerElements(){return this.options&&this.options.inputContainerGetter?this.options.inputContainerGetter():null}setupModifiedListener(){this.hostValueChangeObserver=new n(this.isCurrentTarget.bind(this),(()=>this.updateIsModified(!0))),o.register(c,this.hostValueChangeObserver)}isCurrentTarget(t){return this.host===t.host}async reset(t){var e,s;if(this.shouldVisitElement(this.host,null===(e=t.option)||void 0===e?void 0:e.skipDisabled,null===(s=t.option)||void 0===s?void 0:s.skipInvisible)){const e=t.defaultValueMap,s=this.host.dataset.vegaForm,i=null==e[s]?this.getDefaultValue():e[s];"function"==typeof this.host.setValue?await this.host.setValue(i):this.host.value=i,this.isTouched=!1,this.isModified=!1,this.fieldErrorUIController.resetInputInvalidUI()}}getDefaultValue(){return this.defaultValue instanceof Function?this.defaultValue(this.host):this.defaultValue}didRender(){this.monitorTouchedListener()}initFormResetObserver(){this.formResetTriggeredObserver=new n(this.canAcceptFormResetOperation.bind(this),this.reset.bind(this)),o.register(d,this.formResetTriggeredObserver)}isAutoValidationEnabled(){return!1!==this.host.autoValidation}shouldVisitElement(t,e,s){return!(!t.dataset.vegaForm||e&&t.disabled||s&&!p(t))}listenHostElementKeydown(){this.host.addEventListener("keydown",(t=>{if(this.canSubmitFormByEvent(t)){const t=m(this.host,"vega-form",{outerMost:!0});t&&o.notify(R.getSubject(t,w),{host:this.host})}}))}canSubmitFormByEvent(t){const e="Enter"===t.key||13===t.keyCode,s=e&&t.shiftKey;switch(this.host.tagName){case"VEGA-TEXTAREA":case"VEGA-DATE-PICKER":case"VEGA-TIME-PICKER":return s&&t.preventDefault(),s;case"VEGA-RICH-TEXT-EDITOR":return!1;default:return e}}overrideDefaultRuleByAdditionalRule(t,e){if(t&&e){const s=e.findIndex((e=>e instanceof C&&e instanceof t.constructor&&e.overrideDefault));if(s>-1)return e.splice(s,1)[0]}return t}}P([e()],W.prototype,"formFieldMessageTranslatorSlimmer",void 0),P([e()],W.prototype,"fieldErrorUIController",void 0),P([e()],W.prototype,"resizeObserverSlimmer",void 0);var z=function(t,e,s,i){var r,o=arguments.length,n=o<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,s):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,s,i);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(n=(o<3?r(n):o>3?r(e,s,n):r(e,s))||n);return o>3&&n&&Object.defineProperty(e,s,n),n};class K extends t{constructor(){super(...arguments),this.fieldErrorUIController=new G,this.handleFieldErrorMessageUpdate=t=>{const{message:e,isValid:s}=t;s?this.fieldErrorUIController.resetInputInvalidUI():this.fieldErrorUIController.applyInputInvalidUI(e)}}handleComponentWillLoadByFieldErrorSlimmer(){this.fieldErrorMessageChangeObserver=new n(this.canAcceptFieldErrorMessageUpdate.bind(this),this.handleFieldErrorMessageUpdate),o.register(u,this.fieldErrorMessageChangeObserver)}handleUnregisterObserver(){o.unregister(u,this.fieldErrorMessageChangeObserver)}canAcceptFieldErrorMessageUpdate(t){const{host:e}=t,s=this.host.parentElement;return s&&s===e&&"VEGA-FIELD-ERROR"===s.tagName||this.host===e}}z([s()],K.prototype,"host",void 0),z([s()],K.prototype,"options",void 0),z([e()],K.prototype,"fieldErrorUIController",void 0),z([i("setInjectFormFieldHelper")],K.prototype,"handleComponentWillLoadByFieldErrorSlimmer",null),z([i("disconnectedCallback")],K.prototype,"handleUnregisterObserver",null);var N=function(t,e,s,i){var r,o=arguments.length,n=o<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,s):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,s,i);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(n=(o<3?r(n):o>3?r(e,s,n):r(e,s))||n);return o>3&&n&&Object.defineProperty(e,s,n),n};class X extends t{constructor(){super(...arguments),this.handleValidInvocation=async t=>{if(this.validator){void 0!==t.timerId&&clearTimeout(t.timerId);const e=await this.validator.validate(t.message);if(e){const{isValid:s,message:i}=e;"function"==typeof t.promiseResolve&&t.promiseResolve({isValid:s,message:i})}}}}registerValidInvocationObserver(){j.addUniqueObserverToNode(this.host,O,this.handleValidInvocation)}handleUnregisterObserver(){j.removeUniqueObserverFromNode(this.host,O)}}N([s()],X.prototype,"host",void 0),N([s()],X.prototype,"validator",void 0),N([i("setInjectFormFieldHelper")],X.prototype,"registerValidInvocationObserver",null),N([i("disconnectedCallback")],X.prototype,"handleUnregisterObserver",null);var q=function(t,e,s,i){var r,o=arguments.length,n=o<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,s):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,s,i);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(n=(o<3?r(n):o>3?r(e,s,n):r(e,s))||n);return o>3&&n&&Object.defineProperty(e,s,n),n};class J extends T{constructor(){super({parent:"vega-form",subStates:[{subStateName:"disableBlurValidation",parentStateName:"disableBlurValidation",callback:t=>{var e;null===(e=this.validator)||void 0===e||e.updateDisableBlurValidation(t)}}]})}componentWillLoad(){super.componentWillLoad()}}q([s()],J.prototype,"host",void 0),q([s()],J.prototype,"validator",void 0),q([i("setInjectFormFieldHelper")],J.prototype,"componentWillLoad",null);var Q=function(t,e,s,i){var r,o=arguments.length,n=o<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,s):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,s,i);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(n=(o<3?r(n):o>3?r(e,s,n):r(e,s))||n);return o>3&&n&&Object.defineProperty(e,s,n),n};class Y extends t{constructor(t){super(),this.fieldErrorSlimmer=new K,this.formFieldValidInvokeSlimmer=new X,this.formFormStateController=new J,this.mutationObserverCallBack=()=>{this.validator&&(this.setDefaultRules(),this.internalValidate())},this.options=t,this.setMutationObserverSlimmer()}connectedCallback(){null===this.validator&&this.setInjectFormFieldHelper()}disconnectedCallback(){this.validator&&(this.validator.destroy(),this.validator=null)}componentDidLoad(){}static isValidFormField(t){return t&&Boolean(t.getAttribute("data-vega-form"))}watchValidationRulesByFormControllerSlimmer(t,e){k(t,e,!1,((t,e)=>t===e?0:-1))||(this.setAdditionalRules(),this.internalValidate())}setInjectFormFieldHelper(){if(Y.isValidFormField(this.host)){const{defaultValue:t}=this.options,e=new W(this.getPropertyRules(),this.host,t,this.options);e.addListener({callback:t=>{this.isValid!=t&&(this.isValid=t,o.notify(f,{host:this.host,detail:t}))}}),this.validator=e,this.setAdditionalRules()}}setAdditionalRules(){this.options.validationRulesName&&"validationRules"===this.options.validationRulesName&&this.validator&&this.validator.setAdditionalRules(this.validationRules||[])}setDefaultRules(){this.validator&&this.validator.setDefaultRules(this.getPropertyRules())}getPropertyRules(){const{propertyRules:t,attributeGetter:e}=this.options;return t.map((t=>{const s=t.dependence&&"string"==typeof t.dependence?[e(t.dependence)]:Array.isArray(t.dependence)?t.dependence.map((t=>e(t))):[null];return t.ruleFactory(e(t.propertyName),...s)})).filter(Boolean)}internalValidate(){!this.disabled&&this.validator&&this.validator.validate()}setMutationObserverSlimmer(){this.mutationObserverSlimmer=new S({options:{attributeFilter:this.options.propertyRules.map((t=>r(t.propertyName))),attributeOldValue:!0},mutationFilter:A(),callback:this.mutationObserverCallBack})}}Q([s()],Y.prototype,"host",void 0),Q([s({writable:!0})],Y.prototype,"validationRules",void 0),Q([s()],Y.prototype,"disabled",void 0),Q([s()],Y.prototype,"autoValidation",void 0),Q([s({writable:!0})],Y.prototype,"isValid",void 0),Q([e()],Y.prototype,"fieldErrorSlimmer",void 0),Q([e()],Y.prototype,"formFieldValidInvokeSlimmer",void 0),Q([e()],Y.prototype,"mutationObserverSlimmer",void 0),Q([e()],Y.prototype,"formFormStateController",void 0),Q([i("connectedCallback")],Y.prototype,"connectedCallback",null),Q([i("disconnectedCallback")],Y.prototype,"disconnectedCallback",null),Q([i("componentDidLoad")],Y.prototype,"componentDidLoad",null),Q([i("watchValidationRules")],Y.prototype,"watchValidationRulesByFormControllerSlimmer",null),Q([i("componentWillLoad")],Y.prototype,"setInjectFormFieldHelper",null);export{Y as F}
|
|
1
|
+
import{V as t,I as e,c as s,M as i}from"./p-6e1ab235.js";import{c as r}from"./p-02841589.js";import{C as o}from"./p-2d0d575f.js";import{O as n}from"./p-331a62d5.js";import{U as a,a as l,b as h,F as c,c as d,d as u,e as f}from"./p-cb378636.js";import{f as m,d as p}from"./p-528748fa.js";import{a as v,g as b}from"./p-8b5d3a52.js";import{c as g}from"./p-6a334573.js";import{d as R,D as j}from"./p-526e3634.js";import{i as y,g as w,j as O}from"./p-3a68b729.js";import{V as E}from"./p-0d18368b.js";import{h as V,l as F}from"./p-f0e828d8.js";import{P as I}from"./p-81dd00d0.js";import{I as C}from"./p-abd7aeaa.js";import{M as S}from"./p-78a57a17.js";import{A}from"./p-52b8f2d2.js";import{i as k}from"./p-d27ae9ff.js";import{S as T}from"./p-29e3eb12.js";class L{constructor(t){this.rule=t}getStatus(t,e,s){return{canEvaluate:this.rule.canEvaluate(t,e,s),isAsync:v(this.rule.evaluate)}}shouldShowError(t,e){try{return this.rule.shouldShowError?this.rule.shouldShowError(t,e):this.defaultShouldShowError(t)}catch(t){return!1}}handle(t){try{return this.rule.evaluate(t)}catch(t){return{isValid:!0,message:""}}}defaultShouldShowError(t){return!t.disabled&&t.visible&&(t.touched||t.modified)}}class M{constructor(){this.handlers=[],this.processId=""}checkIncludesAsyncRuleHandler(t,e,s){return!!this.handlers.find((i=>{const r=i.getStatus(t,e,s);return r.canEvaluate&&r.isAsync}))}setHandlersByRules(t){this.handlers=t&&t.length?t.map((t=>new L(t))):[]}async process(t,e,s,i,r){const o=this.preProcess();let n;for(const i of this.handlers){if(o!==this.processId)break;const r=i.getStatus(t,e,s);if(!r.canEvaluate)continue;let a;if(r.isAsync)try{a=await i.handle(t)}catch(t){}else a=i.handle(t);if(a&&!a.isValid){const t=i.shouldShowError(e,s);n=Object.assign(Object.assign({},a),{shouldShowError:t});break}}return this.postProcess(o,i,n,r),n?{isValid:!1,message:n.message}:{isValid:!0,message:""}}preProcess(){const t=b();return this.processId=t,t}postProcess(t,e,s,i){this.processId===t&&i(e,s)}}class D{run(t){const e=t.nextElementSibling;return e&&e.querySelector(".vega-error")?e.querySelector(".vega-error"):null}}class B{run(t){let e=t.nextElementSibling;return e&&!e.classList.contains("vega-error")&&(e=document.createElement("label"),e.classList.add("vega-error"),e.setAttribute("part","field-error-message"),t.after(e)),e}}class H{run(t){let e=t.nextElementSibling;return e||(e=document.createElement("label"),e.classList.add("vega-error"),e.setAttribute("part","field-error-message"),t.after(e)),e}}class U extends t{getTranslatedMessage(t){return"string"==typeof t?E.t(t):E.t(t.key,...t.args||[])}}var x=function(t,e,s,i){var r,o=arguments.length,n=o<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,s):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,s,i);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(n=(o<3?r(n):o>3?r(e,s,n):r(e,s))||n);return o>3&&n&&Object.defineProperty(e,s,n),n};class G extends t{constructor(){super(),this.formFieldMessageTranslatorSlimmer=new U,this.fieldErrorUiControllerStrategies=[new D,new B,new H],this.initTranslationObserver()}applyInputInvalidUI(t){const e=this.getInputElementContainer();if(o.notify(R.getSubject(this.host,y),{host:this.host,showError:!0}),e&&(e.classList.add("error"),t)){this.errorMessage=t;const s=this.getErrorContainer(e);s.innerHTML=V.sanitize(this.formFieldMessageTranslatorSlimmer.getTranslatedMessage(t),F),s.classList.remove("vega-hidden")}}resetInputInvalidUI(){this.errorMessage="";const t=this.getInputElementContainer();t&&(this.getErrorContainer(t).classList.add("vega-hidden"),t.classList.remove("error"),o.notify(R.getSubject(this.host,y),{host:this.host,showError:!1}))}getInputElementContainer(){return this.options&&this.options.inputContainerGetter?this.options.inputContainerGetter():null}getErrorContainer(t){for(const e of this.fieldErrorUiControllerStrategies){const s=e.run(t);if(s)return s}}initTranslationObserver(){const t=new n(this.isAcceptableTranslationObserver.bind(this),(()=>{if(!this.errorMessage)return;const t=this.getInputElementContainer();if(t){const e=this.getErrorContainer(t);e&&(e.innerHTML=V.sanitize(this.formFieldMessageTranslatorSlimmer.getTranslatedMessage(this.errorMessage),F))}}));o.register(a,t)}isAcceptableTranslationObserver(){return!0}}x([e()],G.prototype,"formFieldMessageTranslatorSlimmer",void 0),x([s()],G.prototype,"host",void 0),x([s()],G.prototype,"options",void 0);var P=function(t,e,s,i){var r,o=arguments.length,n=o<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,s):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,s,i);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(n=(o<3?r(n):o>3?r(e,s,n):r(e,s))||n);return o>3&&n&&Object.defineProperty(e,s,n),n};class W{constructor(t,e,s,i){var r,n;this.formFieldMessageTranslatorSlimmer=new U,this.fieldErrorUIController=new G,this.resizeObserverSlimmer=g(W,I,[],[{mapFrom:"connectResizeObserver",mapTo:"connectResizeObserver"}],[{callback:t=>{const e=this.isVisible,s=t[0].contentRect.height>0;this.isVisible=s,this.isAutoValidationEnabled()&&m(this.host,"vega-form")&&e!==s&&this.valid(["visible"])},target:()=>this.host}]),this.defaultRules=[],this.additionalRules=[],this.listeners=[],this.isTouched=!1,this.isModified=!1,this.isVisible=!1,this.formFieldValidationRuleHandlerChain=new M,this.hostChildAddedBlurEventMap=new WeakMap,this.handleValidationResult=(t,e)=>{let s=!0;return e?("rule"===t?e.shouldShowError?this.fieldErrorUIController.applyInputInvalidUI(e.message):this.fieldErrorUIController.resetInputInvalidUI():t?this.fieldErrorUIController.applyInputInvalidUI(e.message):this.fieldErrorUIController.resetInputInvalidUI(),s=!1):this.fieldErrorUIController.resetInputInvalidUI(),this.invokeListeners(s),o.notify(l,{host:this.host,detail:s}),s},this.setupTouchedListener=()=>{this.getTouchableAreaElements().filter((t=>t&&!0!==this.hostChildAddedBlurEventMap.get(t))).forEach((t=>{t.addEventListener("blur",(()=>{this.updateIsTouched(!0)})),this.hostChildAddedBlurEventMap.set(t,!0)}))},this.defaultRules=t||[],this.host=e,this.defaultValue=s,this.options=i,this.initDisabledAttrObserver(),this.connectResizeObserver(),this.initFormResetObserver(),null===(n=(r=this.host).componentOnReady)||void 0===n||n.call(r).then((()=>{this.didRender()})),this.setupModifiedListener(),this.listenHostElementKeydown(),this.updateValidationHandlers()}async validate(t){return await this.valid([],t)}addListener(t){this.listeners.push(t)}getRules(){const t=[...this.additionalRules];return[...this.defaultRules.map((e=>this.overrideDefaultRuleByAdditionalRule(e,t))),...t]}setDefaultRules(t){this.defaultRules=t,this.updateValidationHandlers()}setAdditionalRules(t){this.additionalRules=t,this.updateValidationHandlers()}destroy(){o.notify(h,{host:this.host}),this.unregisterFormResetObserver(),o.unregister(c,this.hostValueChangeObserver),this.hostChildrenObserver&&this.hostChildrenObserver.disconnect()}connectResizeObserver(){}updateDisableBlurValidation(t){this.disableBlurValidation=t}updateValidationHandlers(){this.formFieldValidationRuleHandlerChain.setHandlersByRules(this.getRules())}async valid(t,e="rule"){const s=this.getStatus(),i=this.host.value;this.formFieldValidationRuleHandlerChain.checkIncludesAsyncRuleHandler(i,s,t)&&o.notify(l,{host:this.host,detail:null});const{isValid:r,message:n}=await this.formFieldValidationRuleHandlerChain.process(i,s,t,e,this.handleValidationResult);return{isValid:r,message:this.formFieldMessageTranslatorSlimmer.getTranslatedMessage(n)}}invokeListeners(t){this.listeners.forEach((e=>e.callback(t)))}getStatus(){return{touched:this.isTouched,modified:this.isModified,disabled:this.host.disabled,visible:this.isVisible}}updateIsTouched(t){const e=this.isTouched;this.isTouched=t,!this.disableBlurValidation&&this.isAutoValidationEnabled()&&this.valid(e===t?[]:["touched"])}updateIsModified(t){const e=this.isModified;this.isModified=t,this.isAutoValidationEnabled()&&this.valid(e===t?[]:["modified"])}initDisabledAttrObserver(){this.disabledAttrObserver=new MutationObserver((()=>{this.isAutoValidationEnabled()&&this.valid(["disabled"])})),this.disabledAttrObserver.observe(this.host,{attributes:!0,attributeFilter:["disabled"]})}canAcceptFormResetOperation(t){return m(this.host,"vega-form")===t.host}unregisterFormResetObserver(){o.unregister(d,this.formResetTriggeredObserver)}monitorTouchedListener(){const t=this.getInputContainerElements();t&&(this.hostChildrenObserver=new MutationObserver((()=>{this.setupTouchedListener()})),this.hostChildrenObserver.observe(t,{childList:!0,subtree:!0})),this.setupTouchedListener()}getTouchableAreaElements(){return this.options&&this.options.touchableAreaGetter?this.options.touchableAreaGetter():[]}getInputContainerElements(){return this.options&&this.options.inputContainerGetter?this.options.inputContainerGetter():null}setupModifiedListener(){this.hostValueChangeObserver=new n(this.isCurrentTarget.bind(this),(()=>this.updateIsModified(!0))),o.register(c,this.hostValueChangeObserver)}isCurrentTarget(t){return this.host===t.host}async reset(t){var e,s;if(this.shouldVisitElement(this.host,null===(e=t.option)||void 0===e?void 0:e.skipDisabled,null===(s=t.option)||void 0===s?void 0:s.skipInvisible)){const e=t.defaultValueMap,s=this.host.dataset.vegaForm,i=null==e[s]?this.getDefaultValue():e[s];"function"==typeof this.host.setValue?await this.host.setValue(i):this.host.value=i,this.isTouched=!1,this.isModified=!1,this.fieldErrorUIController.resetInputInvalidUI()}}getDefaultValue(){return this.defaultValue instanceof Function?this.defaultValue(this.host):this.defaultValue}didRender(){this.monitorTouchedListener()}initFormResetObserver(){this.formResetTriggeredObserver=new n(this.canAcceptFormResetOperation.bind(this),this.reset.bind(this)),o.register(d,this.formResetTriggeredObserver)}isAutoValidationEnabled(){return!1!==this.host.autoValidation}shouldVisitElement(t,e,s){return!(!t.dataset.vegaForm||e&&t.disabled||s&&!p(t))}listenHostElementKeydown(){this.host.addEventListener("keydown",(t=>{if(this.canSubmitFormByEvent(t)){const t=m(this.host,"vega-form",{outerMost:!0});t&&o.notify(R.getSubject(t,w),{host:this.host})}}))}canSubmitFormByEvent(t){const e="Enter"===t.key||13===t.keyCode,s=e&&t.shiftKey;switch(this.host.tagName){case"VEGA-TEXTAREA":case"VEGA-DATE-PICKER":case"VEGA-TIME-PICKER":return s&&t.preventDefault(),s;case"VEGA-RICH-TEXT-EDITOR":return!1;default:return e}}overrideDefaultRuleByAdditionalRule(t,e){if(t&&e){const s=e.findIndex((e=>e instanceof C&&e instanceof t.constructor&&e.overrideDefault));if(s>-1)return e.splice(s,1)[0]}return t}}P([e()],W.prototype,"formFieldMessageTranslatorSlimmer",void 0),P([e()],W.prototype,"fieldErrorUIController",void 0),P([e()],W.prototype,"resizeObserverSlimmer",void 0);var z=function(t,e,s,i){var r,o=arguments.length,n=o<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,s):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,s,i);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(n=(o<3?r(n):o>3?r(e,s,n):r(e,s))||n);return o>3&&n&&Object.defineProperty(e,s,n),n};class K extends t{constructor(){super(...arguments),this.fieldErrorUIController=new G,this.handleFieldErrorMessageUpdate=t=>{const{message:e,isValid:s}=t;s?this.fieldErrorUIController.resetInputInvalidUI():this.fieldErrorUIController.applyInputInvalidUI(e)}}handleComponentWillLoadByFieldErrorSlimmer(){this.fieldErrorMessageChangeObserver=new n(this.canAcceptFieldErrorMessageUpdate.bind(this),this.handleFieldErrorMessageUpdate),o.register(u,this.fieldErrorMessageChangeObserver)}handleUnregisterObserver(){o.unregister(u,this.fieldErrorMessageChangeObserver)}canAcceptFieldErrorMessageUpdate(t){const{host:e}=t,s=this.host.parentElement;return s&&s===e&&"VEGA-FIELD-ERROR"===s.tagName||this.host===e}}z([s()],K.prototype,"host",void 0),z([s()],K.prototype,"options",void 0),z([e()],K.prototype,"fieldErrorUIController",void 0),z([i("setInjectFormFieldHelper")],K.prototype,"handleComponentWillLoadByFieldErrorSlimmer",null),z([i("disconnectedCallback")],K.prototype,"handleUnregisterObserver",null);var N=function(t,e,s,i){var r,o=arguments.length,n=o<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,s):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,s,i);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(n=(o<3?r(n):o>3?r(e,s,n):r(e,s))||n);return o>3&&n&&Object.defineProperty(e,s,n),n};class X extends t{constructor(){super(...arguments),this.handleValidInvocation=async t=>{if(this.validator){void 0!==t.timerId&&clearTimeout(t.timerId);const e=await this.validator.validate(t.message);if(e){const{isValid:s,message:i}=e;"function"==typeof t.promiseResolve&&t.promiseResolve({isValid:s,message:i})}}}}registerValidInvocationObserver(){j.addUniqueObserverToNode(this.host,O,this.handleValidInvocation)}handleUnregisterObserver(){j.removeUniqueObserverFromNode(this.host,O)}}N([s()],X.prototype,"host",void 0),N([s()],X.prototype,"validator",void 0),N([i("setInjectFormFieldHelper")],X.prototype,"registerValidInvocationObserver",null),N([i("disconnectedCallback")],X.prototype,"handleUnregisterObserver",null);var q=function(t,e,s,i){var r,o=arguments.length,n=o<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,s):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,s,i);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(n=(o<3?r(n):o>3?r(e,s,n):r(e,s))||n);return o>3&&n&&Object.defineProperty(e,s,n),n};class J extends T{constructor(){super({parent:"vega-form",subStates:[{subStateName:"disableBlurValidation",parentStateName:"disableBlurValidation",callback:t=>{var e;null===(e=this.validator)||void 0===e||e.updateDisableBlurValidation(t)}}]})}componentWillLoad(){super.componentWillLoad()}}q([s()],J.prototype,"host",void 0),q([s()],J.prototype,"validator",void 0),q([i("setInjectFormFieldHelper")],J.prototype,"componentWillLoad",null);var Q=function(t,e,s,i){var r,o=arguments.length,n=o<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,s):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,s,i);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(n=(o<3?r(n):o>3?r(e,s,n):r(e,s))||n);return o>3&&n&&Object.defineProperty(e,s,n),n};class Y extends t{constructor(t){super(),this.fieldErrorSlimmer=new K,this.formFieldValidInvokeSlimmer=new X,this.formFormStateController=new J,this.mutationObserverCallBack=()=>{this.validator&&(this.setDefaultRules(),this.internalValidate())},this.options=t,this.setMutationObserverSlimmer()}connectedCallback(){null===this.validator&&this.setInjectFormFieldHelper()}disconnectedCallback(){this.validator&&(this.validator.destroy(),this.validator=null)}componentDidLoad(){}static isValidFormField(t){return t&&Boolean(t.getAttribute("data-vega-form"))}watchValidationRulesByFormControllerSlimmer(t,e){k(t,e,!1,((t,e)=>t===e?0:-1))||(this.setAdditionalRules(),this.internalValidate())}setInjectFormFieldHelper(){if(Y.isValidFormField(this.host)){const{defaultValue:t}=this.options,e=new W(this.getPropertyRules(),this.host,t,this.options);e.addListener({callback:t=>{this.isValid!=t&&(this.isValid=t,o.notify(f,{host:this.host,detail:t}))}}),this.validator=e,this.setAdditionalRules()}}setAdditionalRules(){this.options.validationRulesName&&"validationRules"===this.options.validationRulesName&&this.validator&&this.validator.setAdditionalRules(this.validationRules||[])}setDefaultRules(){this.validator&&this.validator.setDefaultRules(this.getPropertyRules())}getPropertyRules(){const{propertyRules:t,attributeGetter:e}=this.options;return t.map((t=>{const s=t.dependence&&"string"==typeof t.dependence?[e(t.dependence)]:Array.isArray(t.dependence)?t.dependence.map((t=>e(t))):[null];return t.ruleFactory(e(t.propertyName),...s)})).filter(Boolean)}internalValidate(){!this.disabled&&this.validator&&this.validator.validate()}setMutationObserverSlimmer(){this.mutationObserverSlimmer=new S({options:{attributeFilter:this.options.propertyRules.map((t=>r(t.propertyName))),attributeOldValue:!0},mutationFilter:A(),callback:this.mutationObserverCallBack})}}Q([s()],Y.prototype,"host",void 0),Q([s({writable:!0})],Y.prototype,"validationRules",void 0),Q([s()],Y.prototype,"disabled",void 0),Q([s()],Y.prototype,"autoValidation",void 0),Q([s({writable:!0})],Y.prototype,"isValid",void 0),Q([e()],Y.prototype,"fieldErrorSlimmer",void 0),Q([e()],Y.prototype,"formFieldValidInvokeSlimmer",void 0),Q([e()],Y.prototype,"mutationObserverSlimmer",void 0),Q([e()],Y.prototype,"formFormStateController",void 0),Q([i("connectedCallback")],Y.prototype,"connectedCallback",null),Q([i("disconnectedCallback")],Y.prototype,"disconnectedCallback",null),Q([i("componentDidLoad")],Y.prototype,"componentDidLoad",null),Q([i("watchValidationRules")],Y.prototype,"watchValidationRulesByFormControllerSlimmer",null),Q([i("componentWillLoad")],Y.prototype,"setInjectFormFieldHelper",null);export{Y as F}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{K as n}from"./p-75e33859.js";function t(t){return i=>{const{connectedCallback:o,componentDidLoad:e,disconnectedCallback:s}=i;i.connectedCallback=function(){const{keyboardEventListeners:t=[]}=this;return n.register(t),null==o?void 0:o.call(this)},i.componentDidLoad=function(){return this.keyboardEventListeners=t(this),n.register(this.keyboardEventListeners),null==e?void 0:e.call(this)},i.disconnectedCallback=function(){const{keyboardEventListeners:t=[]}=this;return n.deregister(t),null==s?void 0:s.call(this)}}}export{t as I}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,c as e,h as n,H as i,g as a}from"./p-6b2342e0.js";import{s as o}from"./p-519a7d55.js";import{I as r}from"./p-6e1ab235.js";import{V as l,I as s}from"./p-8ce9e214.js";import{c as v}from"./p-140616fe.js";import{a as g}from"./p-698fbd73.js";import{C as b}from"./p-b1ff70bf.js";import{h as d,e as c}from"./p-f0e828d8.js";import{A as u}from"./p-bdb5180c.js";import"./p-6a334573.js";import"./p-2d0d575f.js";import"./p-526e3634.js";import"./p-331a62d5.js";import"./p-528748fa.js";import"./p-282b37cb.js";import"./p-b75ee3ba.js";import"./p-5f377954.js";import"./p-87a4d75f.js";import"./p-982747ef.js";import"./p-78a57a17.js";const h=[{payloadKey:"EVENTFUL_IS_TRUE",payloadDescription:"@deprecated Specifies whether the button link will emit a vegaClick event when clicked. If set to true, the event will be emitted.",payloadValue:t=>!0===t.eventful},{payloadKey:"EVENTFUL_IS_FALSE",payloadDescription:"@deprecated Specifies whether the button link will emit a vegaClick event when clicked. If set to false, the component will function as a regular link to another page or URL, and no events will be emitted.",payloadValue:t=>!1===t.eventful}];var p=function(t,e,n,i){var a,o=arguments.length,r=o<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,n,i);else for(var l=t.length-1;l>=0;l--)(a=t[l])&&(r=(o<3?a(r):o>3?a(e,n,r):a(e,n))||r);return o>3&&r&&Object.defineProperty(e,n,r),r};const f=class{constructor(n){t(this,n),this.vegaClick=e(this,"vegaClick",7),this.click=e(this,"click",7),this.globalSlimmers={},this.clickEventEmitter=v(f,g),this.eventPrevent=new b([g],(()=>this.host)),this.vegaComponentUsageRuntimeMetricsSlimmer=new l(h),this.ariaAttributesValueMapper=new u((()=>this.host.shadowRoot.querySelector("a")),{"aria-label":{dependency:["data-aria-label","label"],defaultValue:"No label defined"}}),this.link=f.defaultLink,this.size="default",this.iconType="icon",this.iconAlign="left",this.label="",this.disabled=!1,this.danger=!1,this.eventful=!1,this.target="_self",this.onClick=t=>{(this.isButton()||this.eventful)&&(this.disabled||this.clickEventEmitter.emit(this.host.dataset.key,t).defaultPrevented)&&t.preventDefault()}}componentWillLoad(){this.label||(this.label=this.host.textContent),this.host.innerHTML=d.sanitize("",c)}render(){const t=this.isButton(),e=t?f.defaultLink:this.link;return o(n(i,{class:{"vega-button-link-disabled":this.disabled}},n("a",{part:"link",tabIndex:this.disabled?-1:0,role:t?"button":"link","aria-label":this.label.trim()||"No label defined",href:e,onClick:this.onClick,class:{"vega-button-link":!0,[`vega-button-link-size-${this.size}`]:!0,"vega-button-link-left-button":this.hasIconButton("left"),"vega-button-link-right-button":this.hasIconButton("right"),"vega-button-link-danger":this.danger,icon:!!this.icon,[this.size]:!0},rel:"noopener noreferrer",target:this.target},n("div",{class:"vega-button-link-content"},this.renderContent()))),this.host)}hasIconButton(t){return this.icon&&"button"===this.iconType&&this.iconAlign===t}renderContent(){return this.icon?n("vega-flex",{alignItems:"center",gap:this.getGapByButtonSize(),justifyContent:"center"},"left"===this.iconAlign&&this.renderIcon(),this.renderLabel(),"right"===this.iconAlign&&this.renderIcon()):this.renderLabel()}getGapByButtonSize(){return"large"===this.size?"icon"===this.iconType?"size-8":"size-12":"small"===this.size?"icon"===this.iconType?"size-4":"size-8":"default"===this.size?"size-8":void 0}renderLabel(){return this.label&&n("span",{class:"vega-button-link-label",part:"label-container"},n("vega-text",{part:"label-text",text:this.label}))}renderIcon(){return n("div",{class:`vega-button-link-${this.iconType} vega-flex-shrink-0 v-min-w-min`},"icon"===this.iconType?this.renderVegaIcon():n("div",{class:"vega-button-link-button-container"},this.renderVegaIcon()))}renderVegaIcon(){return n("vega-icon",{icon:this.icon,size:"large"===this.size?"size-24":"size-16"})}isButton(){return!this.link||this.link===f.defaultLink}get host(){return a(this)}};f.defaultLink="javascript:void(0);",p([s()],f.prototype,"globalSlimmers",void 0),p([r()],f.prototype,"clickEventEmitter",void 0),p([r()],f.prototype,"eventPrevent",void 0),p([r()],f.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),p([r()],f.prototype,"ariaAttributesValueMapper",void 0),f.style=':host{display:inline-block;position:relative;margin:0px;line-height:normal}a{text-decoration:none;color:rgba(var(--v-text-link, 19, 98, 226, 1));background-color:rgba(var(--v-bg-transparent, 0, 0, 0, 0));display:inline-block;outline:none}a:visited{color:rgba(var(--v-text-link-visited, 95, 56, 206, 1))}a:hover{color:rgba(var(--v-text-link-hover, 4, 112, 236, 1))}a:active{color:rgba(var(--v-text-link-active, 29, 65, 195, 1))}a:focus-visible{color:rgba(var(--v-text-link-focus, 4, 112, 236, 1));outline:2px solid rgba(var(--v-border-color-action, 19, 98, 226, 1));outline-offset:2px}a.default:focus-visible,a.large:focus-visible{border-radius:8px}a.small:focus-visible{border-radius:4px}a.icon:focus-visible{outline:2px solid rgba(var(--v-border-color-action, 19, 98, 226, 1));outline-offset:4px}a:not(.vega-button-link-danger):visited vega-icon svg *[fill=currentColor]{fill:rgba(var(--v-text-link-visited, 95, 56, 206, 1))}a:not(.vega-button-link-danger):visited vega-icon svg *[stroke=currentColor]{stroke:rgba(var(--v-text-link-visited, 95, 56, 206, 1))}a:not(.vega-button-link-danger):hover vega-icon svg *[fill=currentColor]{fill:rgba(var(--v-text-link-hover, 4, 112, 236, 1))}a:not(.vega-button-link-danger):hover vega-icon svg *[stroke=currentColor]{stroke:rgba(var(--v-text-link-hover, 4, 112, 236, 1))}a:not(.vega-button-link-danger):active vega-icon svg *[fill=currentColor]{fill:rgba(var(--v-text-link-active, 29, 65, 195, 1))}a:not(.vega-button-link-danger):active vega-icon svg *[stroke=currentColor]{stroke:rgba(var(--v-text-link-active, 29, 65, 195, 1))}a:not(.vega-button-link-danger):focus-visible vega-icon svg *[fill=currentColor]{fill:rgba(var(--v-text-link-focus, 4, 112, 236, 1))}a:not(.vega-button-link-danger):focus-visible vega-icon svg *[stroke=currentColor]{stroke:rgba(var(--v-text-link-focus, 4, 112, 236, 1))}a:active{text-decoration:none}a:active:hover .vega-button-link-label{text-decoration:none}a.vega-button-link-danger{color:rgba(var(--v-text-danger-link, 230, 50, 87, 1))}a.vega-button-link-danger:visited{color:rgba(var(--v-text-danger-link-visited, 230, 50, 87, 1))}a.vega-button-link-danger:hover{color:rgba(var(--v-text-danger-link-hover, 233, 71, 104, 1))}a.vega-button-link-danger:active{color:rgba(var(--v-text-danger-link-active, 189, 41, 71, 1))}a.vega-button-link-danger:focus-visible{color:rgba(var(--v-text-danger-link-focus, 240, 52, 91, 1))}a.vega-button-link-danger:focus-visible.default:focus-visible,a.vega-button-link-danger:focus-visible.large:focus-visible{outline:2px solid rgba(var(--v-border-color-danger, 230, 50, 87, 1));outline-offset:4px}a.vega-button-link-danger:focus-visible.small:focus-visible{outline:2px solid rgba(var(--v-border-color-danger, 230, 50, 87, 1));outline-offset:2px}a .vega-button-link-button-container{border-radius:9999px;cursor:pointer;background-color:rgba(var(--v-bg-action-secondary, 252, 252, 252, 1));color:rgba(var(--v-text-link, 19, 98, 226, 1));box-sizing:border-box;border:2px solid rgba(var(--v-border-secondary-btn, 19, 98, 226, 1));display:flex;align-items:center;justify-content:center}a:visited .vega-button-link-button-container{color:rgba(var(--v-text-link-visited, 95, 56, 206, 1));border-color:var(--v-text-link-visited)}a:hover .vega-button-link-button-container{border:2px solid rgba(var(--v-border-secondary-btn-hover, 4, 112, 236, 1));background-color:rgba(var(--v-bg-action-secondary-hover, 4, 112, 236, 0.1));color:rgba(var(--v-text-link-hover, 4, 112, 236, 1))}a:focus .vega-button-link-button-container{border:2px solid rgba(var(--v-border-secondary-btn, 19, 98, 226, 1))}a:active .vega-button-link-button-container{border:2px solid rgba(var(--v-border-secondary-btn-active, 29, 65, 195, 1));background-color:rgba(var(--v-bg-action-secondary-active, 29, 65, 195, 0.1));color:rgba(var(--v-text-link-active, 29, 65, 195, 1))}a.vega-button-link-danger .vega-button-link-button-container{border:2px solid rgba(var(--v-border-secondary-danger-btn, 230, 50, 87, 1));color:rgba(var(--v-text-danger-link, 230, 50, 87, 1))}a.vega-button-link-danger:hover .vega-button-link-button-container{border:2px solid rgba(var(--v-border-secondary-danger-btn-hover, 255, 87, 114, 1));background-color:rgba(var(--v-bg-danger-tertiary-hover, 255, 87, 114, 0.2));color:rgba(var(--v-text-danger-link-hover, 233, 71, 104, 1))}a.vega-button-link-danger:focus .vega-button-link-button-container{border:2px solid rgba(var(--v-border-secondary-danger-btn, 230, 50, 87, 1))}a.vega-button-link-danger:active .vega-button-link-button-container{border:2px solid rgba(var(--v-border-secondary-danger-btn-active, 189, 41, 71, 1));background-color:rgba(var(--v-bg-danger-tertiary-active, 189, 41, 71, 0.2));color:rgba(var(--v-text-danger-link-active, 189, 41, 71, 1))}a.vega-button-link-size-default .vega-button-link-button-container{width:40px;height:40px;padding:10px}a.vega-button-link-size-large .vega-button-link-button-container{width:56px;height:56px;padding:14px}a.vega-button-link-size-small .vega-button-link-button-container{width:32px;height:32px;padding:6px}a.vega-button-link-size-default .vega-button-link-icon,a.vega-button-link-size-small .vega-button-link-icon{width:16px;height:16px;line-height:16px}a.vega-button-link-size-large .vega-button-link-icon{width:24px;height:24px;line-height:24px}a .vega-button-link-label{min-width:-webkit-min-content;min-width:-moz-min-content;min-width:min-content}a.vega-button-link-size-small .vega-button-link-label{font-family:"Inter", sans-serif;font-size:16px;font-weight:700;line-height:24px;letter-spacing:0px}@media screen and (min-width: 768px) and (max-width: 1023px){a.vega-button-link-size-small .vega-button-link-label{font-family:"Inter", sans-serif;font-size:14px;font-weight:700;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){a.vega-button-link-size-small .vega-button-link-label{font-family:"Inter", sans-serif;font-size:14px;font-weight:700;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){a.vega-button-link-size-small .vega-button-link-label{font-family:"Inter", sans-serif;font-size:14px;font-weight:700;line-height:18px;letter-spacing:0px}}a.vega-button-link-size-default .vega-button-link-label{font-family:"Inter", sans-serif;font-size:18px;font-weight:700;line-height:24px;letter-spacing:0px}@media screen and (min-width: 768px) and (max-width: 1023px){a.vega-button-link-size-default .vega-button-link-label{font-family:"Inter", sans-serif;font-size:16px;font-weight:700;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){a.vega-button-link-size-default .vega-button-link-label{font-family:"Inter", sans-serif;font-size:16px;font-weight:700;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){a.vega-button-link-size-default .vega-button-link-label{font-family:"Inter", sans-serif;font-size:16px;font-weight:700;line-height:24px;letter-spacing:0px}}a.vega-button-link-size-large .vega-button-link-label{font-family:"Inter", sans-serif;font-size:20px;font-weight:700;line-height:24px;letter-spacing:0px}@media screen and (min-width: 768px) and (max-width: 1023px){a.vega-button-link-size-large .vega-button-link-label{font-family:"Inter", sans-serif;font-size:18px;font-weight:700;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){a.vega-button-link-size-large .vega-button-link-label{font-family:"Inter", sans-serif;font-size:18px;font-weight:700;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){a.vega-button-link-size-large .vega-button-link-label{font-family:"Inter", sans-serif;font-size:18px;font-weight:700;line-height:24px;letter-spacing:0px}}:host(.vega-button-link-disabled){pointer-events:none}:host(.vega-button-link-disabled) a{color:rgba(var(--v-text-disabled, 176, 180, 181, 1));text-decoration:none;background-color:rgba(var(--v-bg-transparent, 0, 0, 0, 0))}:host(.vega-button-link-disabled) a.vega-button-link .vega-button-link-button-container{color:rgba(var(--v-text-disabled, 176, 180, 181, 1));border:2px solid rgba(var(--v-border-secondary-btn-disabled, 176, 180, 181, 1));background-color:rgba(var(--v-bg-action-secondary, 252, 252, 252, 1))}:host(.vega-button-link-disabled) a:focus>.vega-button-link-content{color:rgba(var(--v-text-disabled, 176, 180, 181, 1))}:host(.button-group-item-button-tertiary.vega-button-link-disabled) a{background-color:rgba(var(--v-bg-transparent, 0, 0, 0, 0))}';export{f as vega_button_link}
|
|
1
|
+
import{r as t,c as e,h as n,H as i,g as a}from"./p-6b2342e0.js";import{s as o}from"./p-519a7d55.js";import{I as r}from"./p-6e1ab235.js";import{V as l,I as s}from"./p-8ce9e214.js";import{c as v}from"./p-66647244.js";import{a as g}from"./p-5447a8e8.js";import{C as b}from"./p-2c737fc8.js";import{h as d,e as c}from"./p-f0e828d8.js";import{A as u}from"./p-bdb5180c.js";import"./p-6a334573.js";import"./p-2d0d575f.js";import"./p-526e3634.js";import"./p-331a62d5.js";import"./p-528748fa.js";import"./p-8c30a60d.js";import"./p-b75ee3ba.js";import"./p-5f377954.js";import"./p-87a4d75f.js";import"./p-982747ef.js";import"./p-78a57a17.js";const h=[{payloadKey:"EVENTFUL_IS_TRUE",payloadDescription:"@deprecated Specifies whether the button link will emit a vegaClick event when clicked. If set to true, the event will be emitted.",payloadValue:t=>!0===t.eventful},{payloadKey:"EVENTFUL_IS_FALSE",payloadDescription:"@deprecated Specifies whether the button link will emit a vegaClick event when clicked. If set to false, the component will function as a regular link to another page or URL, and no events will be emitted.",payloadValue:t=>!1===t.eventful}];var p=function(t,e,n,i){var a,o=arguments.length,r=o<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,n,i);else for(var l=t.length-1;l>=0;l--)(a=t[l])&&(r=(o<3?a(r):o>3?a(e,n,r):a(e,n))||r);return o>3&&r&&Object.defineProperty(e,n,r),r};const f=class{constructor(n){t(this,n),this.vegaClick=e(this,"vegaClick",7),this.click=e(this,"click",7),this.globalSlimmers={},this.clickEventEmitter=v(f,g),this.eventPrevent=new b([g],(()=>this.host)),this.vegaComponentUsageRuntimeMetricsSlimmer=new l(h),this.ariaAttributesValueMapper=new u((()=>this.host.shadowRoot.querySelector("a")),{"aria-label":{dependency:["data-aria-label","label"],defaultValue:"No label defined"}}),this.link=f.defaultLink,this.size="default",this.iconType="icon",this.iconAlign="left",this.label="",this.disabled=!1,this.danger=!1,this.eventful=!1,this.target="_self",this.onClick=t=>{(this.isButton()||this.eventful)&&(this.disabled||this.clickEventEmitter.emit(this.host.dataset.key,t).defaultPrevented)&&t.preventDefault()}}componentWillLoad(){this.label||(this.label=this.host.textContent),this.host.innerHTML=d.sanitize("",c)}render(){const t=this.isButton(),e=t?f.defaultLink:this.link;return o(n(i,{class:{"vega-button-link-disabled":this.disabled}},n("a",{part:"link",tabIndex:this.disabled?-1:0,role:t?"button":"link","aria-label":this.label.trim()||"No label defined",href:e,onClick:this.onClick,class:{"vega-button-link":!0,[`vega-button-link-size-${this.size}`]:!0,"vega-button-link-left-button":this.hasIconButton("left"),"vega-button-link-right-button":this.hasIconButton("right"),"vega-button-link-danger":this.danger,icon:!!this.icon,[this.size]:!0},rel:"noopener noreferrer",target:this.target},n("div",{class:"vega-button-link-content"},this.renderContent()))),this.host)}hasIconButton(t){return this.icon&&"button"===this.iconType&&this.iconAlign===t}renderContent(){return this.icon?n("vega-flex",{alignItems:"center",gap:this.getGapByButtonSize(),justifyContent:"center"},"left"===this.iconAlign&&this.renderIcon(),this.renderLabel(),"right"===this.iconAlign&&this.renderIcon()):this.renderLabel()}getGapByButtonSize(){return"large"===this.size?"icon"===this.iconType?"size-8":"size-12":"small"===this.size?"icon"===this.iconType?"size-4":"size-8":"default"===this.size?"size-8":void 0}renderLabel(){return this.label&&n("span",{class:"vega-button-link-label",part:"label-container"},n("vega-text",{part:"label-text",text:this.label}))}renderIcon(){return n("div",{class:`vega-button-link-${this.iconType} vega-flex-shrink-0 v-min-w-min`},"icon"===this.iconType?this.renderVegaIcon():n("div",{class:"vega-button-link-button-container"},this.renderVegaIcon()))}renderVegaIcon(){return n("vega-icon",{icon:this.icon,size:"large"===this.size?"size-24":"size-16"})}isButton(){return!this.link||this.link===f.defaultLink}get host(){return a(this)}};f.defaultLink="javascript:void(0);",p([s()],f.prototype,"globalSlimmers",void 0),p([r()],f.prototype,"clickEventEmitter",void 0),p([r()],f.prototype,"eventPrevent",void 0),p([r()],f.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),p([r()],f.prototype,"ariaAttributesValueMapper",void 0),f.style=':host{display:inline-block;position:relative;margin:0px;line-height:normal}a{text-decoration:none;color:rgba(var(--v-text-link, 19, 98, 226, 1));background-color:rgba(var(--v-bg-transparent, 0, 0, 0, 0));display:inline-block;outline:none}a:visited{color:rgba(var(--v-text-link-visited, 95, 56, 206, 1))}a:hover{color:rgba(var(--v-text-link-hover, 4, 112, 236, 1))}a:active{color:rgba(var(--v-text-link-active, 29, 65, 195, 1))}a:focus-visible{color:rgba(var(--v-text-link-focus, 4, 112, 236, 1));outline:2px solid rgba(var(--v-border-color-action, 19, 98, 226, 1));outline-offset:2px}a.default:focus-visible,a.large:focus-visible{border-radius:8px}a.small:focus-visible{border-radius:4px}a.icon:focus-visible{outline:2px solid rgba(var(--v-border-color-action, 19, 98, 226, 1));outline-offset:4px}a:not(.vega-button-link-danger):visited vega-icon svg *[fill=currentColor]{fill:rgba(var(--v-text-link-visited, 95, 56, 206, 1))}a:not(.vega-button-link-danger):visited vega-icon svg *[stroke=currentColor]{stroke:rgba(var(--v-text-link-visited, 95, 56, 206, 1))}a:not(.vega-button-link-danger):hover vega-icon svg *[fill=currentColor]{fill:rgba(var(--v-text-link-hover, 4, 112, 236, 1))}a:not(.vega-button-link-danger):hover vega-icon svg *[stroke=currentColor]{stroke:rgba(var(--v-text-link-hover, 4, 112, 236, 1))}a:not(.vega-button-link-danger):active vega-icon svg *[fill=currentColor]{fill:rgba(var(--v-text-link-active, 29, 65, 195, 1))}a:not(.vega-button-link-danger):active vega-icon svg *[stroke=currentColor]{stroke:rgba(var(--v-text-link-active, 29, 65, 195, 1))}a:not(.vega-button-link-danger):focus-visible vega-icon svg *[fill=currentColor]{fill:rgba(var(--v-text-link-focus, 4, 112, 236, 1))}a:not(.vega-button-link-danger):focus-visible vega-icon svg *[stroke=currentColor]{stroke:rgba(var(--v-text-link-focus, 4, 112, 236, 1))}a:active{text-decoration:none}a:active:hover .vega-button-link-label{text-decoration:none}a.vega-button-link-danger{color:rgba(var(--v-text-danger-link, 230, 50, 87, 1))}a.vega-button-link-danger:visited{color:rgba(var(--v-text-danger-link-visited, 230, 50, 87, 1))}a.vega-button-link-danger:hover{color:rgba(var(--v-text-danger-link-hover, 233, 71, 104, 1))}a.vega-button-link-danger:active{color:rgba(var(--v-text-danger-link-active, 189, 41, 71, 1))}a.vega-button-link-danger:focus-visible{color:rgba(var(--v-text-danger-link-focus, 240, 52, 91, 1))}a.vega-button-link-danger:focus-visible.default:focus-visible,a.vega-button-link-danger:focus-visible.large:focus-visible{outline:2px solid rgba(var(--v-border-color-danger, 230, 50, 87, 1));outline-offset:4px}a.vega-button-link-danger:focus-visible.small:focus-visible{outline:2px solid rgba(var(--v-border-color-danger, 230, 50, 87, 1));outline-offset:2px}a .vega-button-link-button-container{border-radius:9999px;cursor:pointer;background-color:rgba(var(--v-bg-action-secondary, 252, 252, 252, 1));color:rgba(var(--v-text-link, 19, 98, 226, 1));box-sizing:border-box;border:2px solid rgba(var(--v-border-secondary-btn, 19, 98, 226, 1));display:flex;align-items:center;justify-content:center}a:visited .vega-button-link-button-container{color:rgba(var(--v-text-link-visited, 95, 56, 206, 1));border-color:var(--v-text-link-visited)}a:hover .vega-button-link-button-container{border:2px solid rgba(var(--v-border-secondary-btn-hover, 4, 112, 236, 1));background-color:rgba(var(--v-bg-action-secondary-hover, 4, 112, 236, 0.1));color:rgba(var(--v-text-link-hover, 4, 112, 236, 1))}a:focus .vega-button-link-button-container{border:2px solid rgba(var(--v-border-secondary-btn, 19, 98, 226, 1))}a:active .vega-button-link-button-container{border:2px solid rgba(var(--v-border-secondary-btn-active, 29, 65, 195, 1));background-color:rgba(var(--v-bg-action-secondary-active, 29, 65, 195, 0.1));color:rgba(var(--v-text-link-active, 29, 65, 195, 1))}a.vega-button-link-danger .vega-button-link-button-container{border:2px solid rgba(var(--v-border-secondary-danger-btn, 230, 50, 87, 1));color:rgba(var(--v-text-danger-link, 230, 50, 87, 1))}a.vega-button-link-danger:hover .vega-button-link-button-container{border:2px solid rgba(var(--v-border-secondary-danger-btn-hover, 255, 87, 114, 1));background-color:rgba(var(--v-bg-danger-tertiary-hover, 255, 87, 114, 0.2));color:rgba(var(--v-text-danger-link-hover, 233, 71, 104, 1))}a.vega-button-link-danger:focus .vega-button-link-button-container{border:2px solid rgba(var(--v-border-secondary-danger-btn, 230, 50, 87, 1))}a.vega-button-link-danger:active .vega-button-link-button-container{border:2px solid rgba(var(--v-border-secondary-danger-btn-active, 189, 41, 71, 1));background-color:rgba(var(--v-bg-danger-tertiary-active, 189, 41, 71, 0.2));color:rgba(var(--v-text-danger-link-active, 189, 41, 71, 1))}a.vega-button-link-size-default .vega-button-link-button-container{width:40px;height:40px;padding:10px}a.vega-button-link-size-large .vega-button-link-button-container{width:56px;height:56px;padding:14px}a.vega-button-link-size-small .vega-button-link-button-container{width:32px;height:32px;padding:6px}a.vega-button-link-size-default .vega-button-link-icon,a.vega-button-link-size-small .vega-button-link-icon{width:16px;height:16px;line-height:16px}a.vega-button-link-size-large .vega-button-link-icon{width:24px;height:24px;line-height:24px}a .vega-button-link-label{min-width:-webkit-min-content;min-width:-moz-min-content;min-width:min-content}a.vega-button-link-size-small .vega-button-link-label{font-family:"Inter", sans-serif;font-size:16px;font-weight:700;line-height:24px;letter-spacing:0px}@media screen and (min-width: 768px) and (max-width: 1023px){a.vega-button-link-size-small .vega-button-link-label{font-family:"Inter", sans-serif;font-size:14px;font-weight:700;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){a.vega-button-link-size-small .vega-button-link-label{font-family:"Inter", sans-serif;font-size:14px;font-weight:700;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){a.vega-button-link-size-small .vega-button-link-label{font-family:"Inter", sans-serif;font-size:14px;font-weight:700;line-height:18px;letter-spacing:0px}}a.vega-button-link-size-default .vega-button-link-label{font-family:"Inter", sans-serif;font-size:18px;font-weight:700;line-height:24px;letter-spacing:0px}@media screen and (min-width: 768px) and (max-width: 1023px){a.vega-button-link-size-default .vega-button-link-label{font-family:"Inter", sans-serif;font-size:16px;font-weight:700;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){a.vega-button-link-size-default .vega-button-link-label{font-family:"Inter", sans-serif;font-size:16px;font-weight:700;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){a.vega-button-link-size-default .vega-button-link-label{font-family:"Inter", sans-serif;font-size:16px;font-weight:700;line-height:24px;letter-spacing:0px}}a.vega-button-link-size-large .vega-button-link-label{font-family:"Inter", sans-serif;font-size:20px;font-weight:700;line-height:24px;letter-spacing:0px}@media screen and (min-width: 768px) and (max-width: 1023px){a.vega-button-link-size-large .vega-button-link-label{font-family:"Inter", sans-serif;font-size:18px;font-weight:700;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){a.vega-button-link-size-large .vega-button-link-label{font-family:"Inter", sans-serif;font-size:18px;font-weight:700;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){a.vega-button-link-size-large .vega-button-link-label{font-family:"Inter", sans-serif;font-size:18px;font-weight:700;line-height:24px;letter-spacing:0px}}:host(.vega-button-link-disabled){pointer-events:none}:host(.vega-button-link-disabled) a{color:rgba(var(--v-text-disabled, 176, 180, 181, 1));text-decoration:none;background-color:rgba(var(--v-bg-transparent, 0, 0, 0, 0))}:host(.vega-button-link-disabled) a.vega-button-link .vega-button-link-button-container{color:rgba(var(--v-text-disabled, 176, 180, 181, 1));border:2px solid rgba(var(--v-border-secondary-btn-disabled, 176, 180, 181, 1));background-color:rgba(var(--v-bg-action-secondary, 252, 252, 252, 1))}:host(.vega-button-link-disabled) a:focus>.vega-button-link-content{color:rgba(var(--v-text-disabled, 176, 180, 181, 1))}:host(.button-group-item-button-tertiary.vega-button-link-disabled) a{background-color:rgba(var(--v-bg-transparent, 0, 0, 0, 0))}';export{f as vega_button_link}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{C as t}from"./p-2d0d575f.js";import{d as e}from"./p-526e3634.js";import{e as s,f as n}from"./p-3a68b729.js";import{d as r,c as i}from"./p-02841589.js";import{L as o}from"./p-6e1ab235.js";import{i as a}from"./p-8db904dc.js";import{T as c}from"./p-b438e68b.js";import{g as l}from"./p-8b5d3a52.js";import{V as h}from"./p-3e09aeed.js";import{c as u}from"./p-a841cf13.js";import{f as d}from"./p-528748fa.js";var f,p;!function(t){t.SELECTION_RANGE="SELECTION_RANGE",t.CLEAR_FORMATTING="CLEAR_FORMATTING",t.LINK_GROUP="LINK_GROUP"}(f||(f={}));class g{}!function(t){t.ALIGNMENT="ALIGNMENT",t.TEXT_STYLE="TEXT_STYLE",t.INDENT="INDENT",t.LIST="LIST",t.INTERNAL_WRAPPER="INTERNAL_WRAPPER"}(p||(p={}));class x extends g{}const w=new class{constructor(){this.domToEntity=new WeakMap,this.entityToDOM=new WeakMap,this.contentEntityToRootDom=new Map,this.rootDomToContentEntity=new WeakMap}register(t,e){this.isVegaRTEContent(e)?this.registerRootDomAndContentEntity(t,e):(this.domToEntity.set(t,e),this.entityToDOM.set(e,t))}getEntityByDOM(t){return this.domToEntity.get(t)}getDOMByEntity(t){return this.isVegaRTEContent(t)?this.contentEntityToRootDom.get(t):this.entityToDOM.get(t)}removeDirtyDomRef(t){this.domToEntity.delete(t)}registerRootDomAndContentEntity(t,e){const s=this.rootDomToContentEntity.get(t);s&&s!==e&&this.contentEntityToRootDom.delete(s),this.rootDomToContentEntity.set(t,e),this.contentEntityToRootDom.set(e,t)}isVegaRTEContent(t){return t&&"VegaRTEContent"===t.dtoName}};var A,O,m,y;!function(t){t.DELETE_CHILDREN="DELETE_CHILDREN",t.DELETE_NEST_LIST="DELETE_NEST_LIST",t.UPDATE_TEXT="UPDATE_TEXT",t.REPLACE_SELECTED_TEXT="REPLACE_SELECTED_TEXT",t.APPEND_CHILDREN="APPEND_CHILDREN",t.INSERT_CHILDREN_AFTER="INSERT_CHILDREN_AFTER",t.INSERT_CHILDREN_BEFORE="INSERT_CHILDREN_BEFORE",t.SPLIT_BLOCK_WITH_NODE="SPLIT_BLOCK_WITH_NODE",t.REPLACE_CHILD_NODES="REPLACE_CHILD_NODES",t.REPLACE_NEST_LIST="REPLACE_NEST_LIST",t.MERGE_TWO_BLOCKS_NODES="MERGE_TWO_BLOCKS_NODES",t.INSERT_NEW_PARAGRAPH="INSERT_NEW_PARAGRAPH",t.LINE_BREAK_SINGLE_BLOCK="LINE_BREAK_SINGLE_BLOCK",t.LINE_BREAK_MULTIPLE_BLOCKS="LINE_BREAK_MULTIPLE_BLOCKS",t.TRANSFORM_LIST_BLOCK="TRANSFORM_LIST_BLOCK",t.TRANSFORM_PARAGRAPH_BLOCK="TRANSFORM_PARAGRAPH_BLOCK",t.DELETE_BLOCK_CONTENT="DELETE_BLOCK_CONTENT",t.INSERT_IMAGE_TO_BLOCK="INSERT_IMAGE_TO_BLOCK",t.UPDATE_IMAGE_NODE_URL="UPDATE_IMAGE_NODE_URL",t.TRANSFORM_TO_CODE_BLOCK="TRANSFORM_TO_CODE_BLOCK",t.UPDATE_CODE_BLOCK="UPDATE_CODE_BLOCK",t.SWITCH_OUT_FROM_CODE_BLOCK="SWITCH_OUT_FROM_CODE_BLOCK",t.DELETE_CODE_BLOCK="DELETE_CODE_BLOCK",t.UNLINK_LINK_GROUP="UNLINK_LINK_GROUP",t.LINK_GROUP_NODE_SPLIT="LINK_GROUP_NODE_SPLIT",t.DELETE_LINK_GROUP="DELETE_LINK_GROUP",t.UPDATE_CURSOR_POSITION="UPDATE_CURSOR_POSITION",t.INSERT_TEXT_TO_DECORATOR_NODE="INSERT_TEXT_TO_DECORATOR_NODE",t.INSERT_NODE_TO_NEAREST_ROOT="INSERT_NODE_TO_NEAREST_ROOT",t.PASTE_CONTENT="PASTE_CONTENT",t.DELETE_SELECTED_CONTENT="DELETE_SELECTED_CONTENT"}(A||(A={}));class E{constructor(){this.isFlushable=!1}}function S(t){const e={},s=t.getAttribute("style");if(!s)return e;const n=function(t){const e=[];let s="",n=0;for(let r=0;r<t.length;r++){const i=t[r];"("===i?(n++,s+=i):")"===i?(n--,s+=i):";"===i&&0===n?(e.push(s),s=""):s+=i}return s&&e.push(s),e}(s);for(const t of n){const s=t.trim(),n=s.indexOf(":"),i=s.substring(0,n).trim(),o=s.substring(n+1).trim();e[r(i)]=o}return e}function T(t){return t.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function N(t){return t.replace(/&(?!(?:[a-zA-Z][a-zA-Z0-9]+|#[0-9]+|#x[a-fA-F0-9]+);)/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")}class b{constructor(){this.classNameToBeAdded=""}filterAnnotations(t){const e=t.customStyle;return e?(this.extractAndDeleteMatchedStyles(e),0===Object.keys(e).length&&delete t.customStyle,t):t}filterAndDeleteStyles(t,e){const s=new Set(e);return this.extractAndDeleteMatchedStyles(t)&&this.classNameToBeAdded&&s.add(this.classNameToBeAdded),{styles:t,classNames:Array.from(s)}}refillStyles(t){this.classNameToBeAdded&&t.classList.remove(this.classNameToBeAdded);const e=S(t),s=Object.assign(Object.assign({},this.stylesToBeFiltered),e),n=Object.entries(Object.assign({},s)).map((([t,e])=>`${i(t)}: ${e};`)).join("");t.setAttribute("style",n)}canFilter(t){return!1}canRefill(t,e){return!1}toCssText(){return""}get alwaysFilter(){return!1}extractAndDeleteMatchedStyles(t){let e=!1;const s=this.stylesToBeFiltered;if(t&&s){const n=Object.keys(s);for(const r of n)t[r]===s[r]&&(delete t[r],e=!0)}return e}buildCssTextForStyles(t,e){return`${`.${b.RTE_CONTENT_CONTAINER_CLASS_NAME}`+(e?` .${e}`:` ${t}`)} { ${Object.entries(this.stylesToBeFiltered).map((([t,e])=>`${i(t)}: ${e};`)).join(" ")} }`}convertStylesMapToCssText(t){return Object.entries(t||this.stylesToBeFiltered).map((([t,e])=>`${i(t)}: ${e};`)).join(" ")}isBlockOrNodeStylesMatchFilterStyles(t,e){const s=t.getStyles({standalone:!0});return this.isMatchFilterStyles(s,e)}isMatchFilterStyles(t,e){return(e&&e.length>0?e:Object.keys(this.stylesToBeFiltered)).every((e=>t[e]===this.stylesToBeFiltered[e]))}}b.RTE_CONTENT_CONTAINER_CLASS_NAME="vega-rte-content",function(t){t.BOLD="BOLD",t.ITALIC="ITALIC",t.UNDERLINE="UNDERLINE",t.STRIKETHROUGH="STRIKETHROUGH",t.SELECTION_RANGE="SELECTION_RANGE",t.IMAGE="IMAGE",t.CODE="CODE",t.TEXT_COLOR="TEXT_COLOR",t.LINK="LINK",t.INLINE_HTML="INLINE_HTML",t.PLAIN_TEXT="PLAIN_TEXT"}(O||(O={}));class C extends g{}class v{static isTextBlock(t){return t===this.RTE_TEXT_BLOCK_CLASS_NAME}static isCodeBlock(t){return"RTECodeBlock"===t}static isListBlock(t){return"RTEListBlock"===t}static isListItemBlock(t){return"RTEListItemBlock"===t}static isTextNode(t){return t===this.RTE_TEXT_NODE_CLASS_NAME}static isLinkNode(t){return this.isTextNode(t.dtoName)&&!!t.getAnnotationByType(O.LINK)}static isCodeNode(t){if(this.isTextNode(t.dtoName)){const e=t.getAnnotationByType(O.CODE);return!!e&&e.code}return!1}static isImageNode(t){return"RTEImageNode"===t.dtoName}static isCodeBlockNode(t){return"RTECodeBlockNode"===t.dtoName}}v.RTE_TEXT_NODE_CLASS_NAME="RTETextNode",v.RTE_TEXT_BLOCK_CLASS_NAME="RTETextBlock";class R extends b{constructor(){super(...arguments),this.stylesToBeFiltered=_.getDefaultStyles(),this.elementTagName="a"}filterAnnotations(t){const e=t.link;return(null==e?void 0:e.customStyle)?(this.extractAndDeleteMatchedStyles(e.customStyle),0===Object.keys(e.customStyle).length&&delete e.customStyle,t):t}canFilter(t){return v.isLinkNode(t)}canRefill(t,e){return"RTETextNode"===t&&e.matches(this.elementTagName)}toCssText(){return this.buildCssTextForStyles(this.elementTagName,this.classNameToBeAdded)}filterLinkGroupInlineStyles(t){const e=t.style,s=t.class?t.class.split(" "):[],n=this.filterAndDeleteStyles(e,s);return n.styles&&Object.keys(n.styles).length>0&&(t.style=n.styles),n.classNames&&n.classNames.length>0&&(t.class=n.classNames.join(" ")),t.style&&0===Object.keys(t.style).length&&delete t.style,t}}class _ extends g{constructor(t){super(),this.type=f.LINK_GROUP,this.linkGroups=new Map,this.linkGroups=new Map([[t,[]]])}static getDefaultStyles(){return{color:"rgba(var(--v-text-link, 19, 98, 226, 1))"}}clone(){const t=new _("");return this.linkGroups.forEach(((e,s)=>{t.linkGroups.set(s,e.map((t=>t.clone(t.parent))))})),t}toString(t,e){let s=this.toJsx(t,e);return(null==e?void 0:e.filterInlineStyles)&&(s=_.linkGroupFilterStylesStrategy.filterLinkGroupInlineStyles(s)),Object.entries(s).map((([t,e])=>{const s="string"==typeof e?e:this.formatStyleToString(e);return`${i(t)}="${s}"`})).join(" ")}toJsx(t,e){const s=this.getStyle(t,e),n=this.getClass(t,e),r=this.getAttribute(t);return n.length>0&&(r.class=n.join(" ")),s&&Object.keys(s).length>0&&(r.style=s),r}getClass(t,e){const s=[];return t.link.customClass&&s.push(...t.link.customClass),!(null==e?void 0:e.standalone)&&t.useInternalStyle&&s.push("v-rte--link"),s}getStyle(t,e){const s={};return t.link.customStyle&&Object.assign(s,t.link.customStyle),(null==e?void 0:e.standalone)&&t.useInternalStyle&&Object.assign(s,_.getDefaultStyles()),s}getAttribute(t){const{href:e,customAttribute:s={}}=t.link,n=t.useInternalStyle,r=s.target||(n?"_blank":"");return Object.assign(Object.assign(Object.assign({},s),e||n?{href:e}:{}),r?{target:r}:{})}formatStyleToString(t){return Object.entries(t).map((([t,e])=>`${i(t)}: ${e};`)).join(" ")}}_.linkGroupFilterStylesStrategy=new R;class k extends x{constructor(t){super(),this.type=p.ALIGNMENT,this.textAlign=t}static from(t){return[p.ALIGNMENT,new k(t)]}static getDefaultStyles(t){switch(t){case"right":case"center":case"justify":return{textAlign:t};case"left":default:return{textAlign:"left"}}}toJSON(){return{textAlign:this.textAlign}}renderClass(t){if(null==t?void 0:t.standalone)return null;switch(this.textAlign){case"right":case"center":case"justify":return`v-rte--horizontal-alignment-${this.textAlign}`;case"left":default:return"v-rte--horizontal-alignment-left"}}clone(){return new k(this.textAlign)}renderStyle(t){return(null==t?void 0:t.standalone)?k.getDefaultStyles(this.textAlign):null}}class j extends x{constructor(t){super(),this.type=p.INDENT,this.indent=Math.max(0,t)}static from(t){return[p.INDENT,new j(t)]}toJSON(){return this.indent>0?{indent:this.indent}:null}clone(){return new j(this.indent)}renderClass(){return null}renderStyle(){return this.indent>0?{marginLeft:16*this.indent+"px"}:null}}class L{static register(t,e,s){this.registry.has(e)||this.registry.set(e,new Map),this.registry.get(e).has(t)||this.registry.get(e).set(t,new Set),this.registry.get(e).get(t).add(s)}static unregister(t,e,s){const n=this.registry.get(e);if(n){const e=n.get(t);e&&e.delete(s)}}static get(t,e){const s=t instanceof E?t.type:t.constructor.name,n=this.registry.get(e.constructor.name);if(n){const r=n.get(s);if(r&&r.size>0)return Array.from(r).find((s=>s.canIntercept(t,e)))}}}L.registry=new Map;class ${static register(t,e,s){this.registry.has(e)||this.registry.set(e,new Map),this.registry.get(e).set(t,s)}static unregister(t,e){const s=this.registry.get(e);s&&s.delete(t)}static get(t,e){const s=this.registry.get(e);if(s)return s.get(t)}static executeTheStrategy(t,e){const s=L.get(t,e),n=()=>{const s=t instanceof E?t.type:t.constructor.name,n=$.get(s,e.constructor.name);if(n)return t.executedFlag=!0,n.execute(t,e);o.warn(`Type ${s} action handle strategy is not registered in class ${e.constructor.name}`)};return s?s.intercept(n,t,e):n()}static canHandle(t,e){return!!$.get(t,e.constructor.name)}}$.registry=new Map,function(t){t.CUSTOM_ATTRIBUTE="CUSTOM_ATTRIBUTE",t.CUSTOM_CLASS="CUSTOM_CLASS",t.CUSTOM_STYLE="CUSTOM_STYLE"}(m||(m={}));class B extends g{}class D extends B{constructor(t){super(),this.type=m.CUSTOM_ATTRIBUTE,this.BOOLEAN_ATTRS=new Set(["controls","disabled","checked","readonly","multiple","required","autoplay","muted"]),this.customAttribute=t}static from(t){return[m.CUSTOM_ATTRIBUTE,new D(t)]}toJSON(){return{customAttribute:this.customAttribute}}clone(){return new D(this.customAttribute)}toString(t=[]){const e=t.map((t=>t.split("=")[0]));return Object.keys(this.customAttribute).map((t=>e.includes(t)?null:`${t}="${this.customAttribute[t]}"`)).filter(a)}render(t={}){var e;const s=Object.assign({},this.customAttribute);return null===(e=t.filterAttributes)||void 0===e||e.forEach((t=>delete s[t])),Object.keys(s).forEach((t=>{this.BOOLEAN_ATTRS.has(t)&&""===s[t]&&(s[t]="true")})),s}}class I extends B{constructor(t){super(),this.type=m.CUSTOM_CLASS,this.customClass=t}static from(t){return[m.CUSTOM_CLASS,new I(t)]}toJSON(){return{customClass:this.customClass}}clone(){return new I(this.customClass)}toString(){return`class="${this.customClass.join(" ")}"`}renderClass(){return this.customClass}}class M extends B{constructor(t){super(),this.type=m.CUSTOM_STYLE,this.customStyle=t}static from(t){return[m.CUSTOM_STYLE,new M(t)]}toJSON(){return{customStyle:this.customStyle}}clone(){return new M(this.customStyle)}renderStyle(){return this.customStyle}removeStyles(t){const e=Object.assign({},this.customStyle);return t.forEach((t=>delete e[t])),e}toString(){return`style="${N(Object.entries(this.customStyle).map((([t,e])=>`${t}: ${e};`)).join(" "))}"`}}class F extends x{constructor(t){super(),this.type=p.INTERNAL_WRAPPER,this.internalWrapper=t}static from(t){return[p.INTERNAL_WRAPPER,new F(t)]}clone(){return new F(this.internalWrapper)}renderClass(){}renderStyle(){}toJSON(){return this.internalWrapper?{internalWrapper:this.internalWrapper}:void 0}}class H{constructor(t){this.dtoName=t instanceof U?"block":"node",this.annotationMap=t.annotationMap}toCssText(t={standalone:!1},e,s){return s=s||this.toJSON(t,e),Object.entries(Object.assign({},s)).map((([t,e])=>`${i(t)}: ${e};`)).join("")}toJSON(t={standalone:!1},e){const s=Array.from(this.annotationMap.values()).filter((t=>this.filterAnnotation(t)||t instanceof M)).map((e=>e.renderStyle(t))).filter(a);return e&&e.length>0?this.mergeAnnotationStyles(s,e):s.reduce(((t,e)=>Object.assign(Object.assign({},t),e)),{})}filterAnnotation(t){return"block"===this.dtoName?t instanceof x:t instanceof C}mergeAnnotationStyles(t,e){const s={};for(const n of t)for(const t in n){const r=n[t],i=s[t];s[t]="string"==typeof i&&"string"==typeof r&&e.includes(t)?Array.from(new Set(`${i} ${r}`.split(/\s+/).filter(Boolean))).join(" "):r}return s}}class P{static register(t,e){var s;const n=null!==(s=this.registry.get(t))&&void 0!==s?s:new Set;n.add(e),this.registry.set(t,n)}static getStrategies(t){var e;return Array.from(null!==(e=this.registry.get(t))&&void 0!==e?e:[])}static executeTheStrategyFilterAction(t,e,s){return this.getStrategies(t.dtoName).filter((e=>e.canFilter(t))).reduce(((t,e)=>e.filterAndDeleteStyles(t.styles,t.classNames)),{styles:e,classNames:s})}static executeTheStrategyRefillAction(t,e){this.getStrategies(t).filter((s=>s.canRefill(t,e))).forEach((t=>{t.refillStyles(e)}))}static generateAllStylesContent(t=!1){const e=[];return t&&(e.push("/* Font-face imports begin */\n"),e.push(Object.keys(c).map((t=>`@import url('${c[t].url}');\n`)).join(" ")),e.push("/* Font-face imports end */\n")),this.registry.forEach((t=>{t.forEach((t=>{const s=t.toCssText();s&&!e.includes(s)&&e.push(s)}))})),e.join(" ")}}P.registry=new Map,function(t){t.TEXT="TEXT",t.IMAGE="IMAGE",t.CODE_BLOCK_NODE="CODE_BLOCK_NODE"}(y||(y={}));class J{constructor(t,e){this.annotationMap=new Map,this.dtoName=this.constructor.name,this.id=t,e&&(this.annotationMap=e)}static from(t,e,s){throw new Error(`[Vega] ${this.constructor.name}.from(${JSON.stringify(t)}, ${e}, ${s}) is not implemented. Please implement this method in the subclass.`)}static createAnnotationEntity(t,e){switch(t){case"customAttribute":return D.from(e);case"customClass":return I.from(e);case"customStyle":return M.from(e)}}getAnnotationByType(t){return this.annotationMap.get(t)}deleteAnnotationByType(t){this.annotationMap.delete(t),this.flushChange()}apply(t){return this.doApply(t),t.isFlushable&&this.flushChange(),this}getStyles(t={standalone:!1}){return new H(this).toJSON(t,["textDecoration"])}getClasses(t={standalone:!1}){return Array.from(this.annotationMap.values()).filter((t=>t instanceof C||t instanceof I)).map((e=>e.renderClass(t))).filter(a).reduce(((t,e)=>[t,e].join(" ").trim()),"")}getCustomAttributesAnnotation(){return this.annotationMap.get(m.CUSTOM_ATTRIBUTE)}isTextNode(){return!1}getElementRef(){return w.getDOMByEntity(this)}generateAttributeString(t,...e){var s;const n=new H(this),r=n.toJSON({standalone:!0},["textDecoration"]),i=this.annotationMap.get(m.CUSTOM_CLASS);let o=r,c=null==i?void 0:i.renderClass();if(t&&t.filterInlineStyles){const t=P.executeTheStrategyFilterAction(this,r,c);o=t.styles,c=t.classNames}const l=[...(null===(s=this.getCustomAttributesAnnotation())||void 0===s?void 0:s.toString(e))||[],c&&c.length>0?`class="${c.join(" ")}"`:null,o&&Object.keys(o).length>0?`style="${N(n.toCssText({standalone:!0},void 0,o))}"`:null,...e].filter(a);return l.length?` ${l.join(" ")}`:""}doApply(t){t instanceof E?this.doModifyActionApply(t):this.doAnnotationActionApply(t)}flushChange(){const n=w.getDOMByEntity(this);if(n){const r=e.getSubjectFromParentNodeByEventId(n,s);r&&t.notify(r,{})}}cloneAnnotations(){return new Map(Array.from(this.annotationMap.entries()).map((([t,e])=>[t,e.clone()])))}doAnnotationActionApply(t){}doModifyActionApply(t){}}const K=new class{constructor(){this.RTE_BLOCK_DTO_CLASS_MAP=new Map,this.RTE_NODE_DTO_CLASS_MAP=new Map}registerRTEDTOClass(t,e){if(e.prototype instanceof U)this.RTE_BLOCK_DTO_CLASS_MAP.set(t,e);else{if(!(e.prototype instanceof J))throw new Error(`Invalid RTE DTO class type: ${t}`);this.RTE_NODE_DTO_CLASS_MAP.set(t,e)}}getRTEBlockClass(t){return this.RTE_BLOCK_DTO_CLASS_MAP.get(t)}getRTENodeClass(t){return this.RTE_NODE_DTO_CLASS_MAP.get(t)}};class U{constructor(t){this.annotationMap=new Map,this.dtoName=this.constructor.name,this.id=t}static from(t,e){throw new Error(`[Vega] ${this.constructor.name}.from(${JSON.stringify(t)}, ${e}) is not implemented. Please implement this method in the subclass.`)}static generateBlockChildren(t,e,s){return t.map((t=>{const n=K.getRTEBlockClass(t.type);if(n){const r=n.from(t,e);return r.parent=s,r}})).filter(a)}static createAnnotationEntity(t,e){switch(t){case"textAlign":return k.from(e);case"indent":return j.from(e);case"customAttribute":return D.from(e);case"customClass":return I.from(e);case"customStyle":return M.from(e);case"internalWrapper":return F.from(e)}}static convertAnnotationsToMap(t,e){Object.entries(e).forEach((([e,s])=>{const n=this.createAnnotationEntity(e,s);a(n)&&t.set(...n)}))}shouldRenderAsInternalWrapper(){const t=this.getAnnotationByType(p.INTERNAL_WRAPPER);return!!t&&t.internalWrapper&&0===Array.from(this.annotationMap.values()).filter((t=>!(t instanceof _||t instanceof F))).length}toJSON(){const t=Array.from(this.annotationMap.values()).filter((t=>t instanceof x||t instanceof B)).reduce(((t,e)=>Object.assign(Object.assign({},t),e.toJSON())),{});return Object.assign({id:this.id},Object.keys(t).length>0?{annotations:t}:{})}getAnnotationByType(t){return this.annotationMap.get(t)}apply(n){if(this.doApply(n),n.isFlushable){const n=w.getDOMByEntity(this);if(n){const r=e.getSubjectFromParentNodeByEventId(n,s);r&&t.notify(r,{})}}}getFirstNode(){if(!this.children||!this.children[0])return null;const t=this.children[0];return t instanceof U?t.getFirstNode():t}isListItemBlock(){return"list-item"===this.type}getStyles(t={standalone:!1}){const e=new H(this).toJSON(t);return Object.assign(Object.assign({},e),this.shouldRenderAsInternalWrapper()?{display:"contents"}:{})}getClasses(t={standalone:!1}){return Array.from(this.annotationMap.values()).filter((t=>t instanceof x||t instanceof I)).map((e=>e.renderClass(t))).filter(a).reduce(((t,e)=>[t,e].join(" ").trim()),"")}getCustomAttributesAnnotation(){return this.annotationMap.get(m.CUSTOM_ATTRIBUTE)}generateAttributeString(t,...e){var s;const n=new H(this),r=n.toJSON({standalone:!0}),i=this.annotationMap.get(m.CUSTOM_CLASS);let o=r,c=null==i?void 0:i.renderClass();if(t&&t.filterInlineStyles){const t=P.executeTheStrategyFilterAction(this,r,c);o=t.styles,c=t.classNames}const l=[...(null===(s=this.getCustomAttributesAnnotation())||void 0===s?void 0:s.toString(e))||[],c&&c.length>0?`class="${c.join(" ")}"`:null,o&&Object.keys(o).length>0?`style="${N(n.toCssText({standalone:!0},void 0,o))}"`:null,...e].filter(a);return l.length?` ${l.join(" ")}`:""}doApply(t){t instanceof E?$.executeTheStrategy(t,this):this.applyAnnotationAction(t)}applyAnnotationAction(t){const e=t.toAnnotation();if(e instanceof _||this.annotationMap.set(e.type,e),"function"==typeof this.doAnnotationActionApply)this.doAnnotationActionApply(t);else{const e=$.get(t.constructor.name,this.constructor.name);e&&e.execute(t,this)}}cloneAnnotations(){return new Map(Array.from(this.annotationMap.entries()).map((([t,e])=>[t,e.clone()])))}}class G{}class W extends G{constructor(){super(...arguments),this.doSplit=!0}}class z extends g{constructor(t){super(),this.type=f.SELECTION_RANGE,this.range=t}clone(){return new z(this.range)}}const V="700",X="bold",q="italic",Y="underline",Z="line-through";class Q extends C{constructor(t){super(),this.type=O.STRIKETHROUGH,this.strikethrough=t}static from(t){return[O.STRIKETHROUGH,new Q(t)]}toJSON(){return{strikethrough:this.strikethrough}}clone(){return new Q(this.strikethrough)}renderClass(t){return(null==t?void 0:t.standalone)?null:this.strikethrough?"v-rte--strikethrough":null}renderStyle(t){return(null==t?void 0:t.standalone)&&this.strikethrough?{textDecoration:"line-through"}:null}}class tt extends C{constructor(t){super(),this.type=O.UNDERLINE,this.underline=t}static from(t){return[O.UNDERLINE,new tt(t)]}toJSON(){return{underline:this.underline}}clone(){return new tt(this.underline)}renderClass(t){return(null==t?void 0:t.standalone)?null:this.underline?"v-rte--underline":null}renderStyle(t){return(null==t?void 0:t.standalone)&&this.underline?{textDecoration:"underline"}:null}}class et extends C{constructor(t){super(),this.type=O.ITALIC,this.italic=t}static from(t){return[O.ITALIC,new et(t)]}toJSON(){return{italic:this.italic}}clone(){return new et(this.italic)}renderClass(t){return(null==t?void 0:t.standalone)?null:this.italic?"v-rte--italic":null}renderStyle(t){return(null==t?void 0:t.standalone)&&this.italic?{fontStyle:"italic"}:null}}class st extends C{constructor(t){super(),this.type=O.BOLD,this.bold=t}static from(t){return[O.BOLD,new st(t)]}toJSON(){return{bold:this.bold}}clone(){return new st(this.bold)}renderClass(t){return(null==t?void 0:t.standalone)?null:this.bold?"v-rte--bold":null}renderStyle(t){return(null==t?void 0:t.standalone)&&this.bold?{fontWeight:"700"}:null}}class nt extends C{constructor(t,e=!0){super(),this.type=O.CODE,this.code=t,this.useInternalStyle=e}static from(t,e){return[O.CODE,new nt(t,e)]}static getDefaultStyles(){return{fontFamily:"Roboto Mono",whiteSpace:"pre-wrap"}}toJSON(){return{code:this.code}}clone(){return new nt(this.code,this.useInternalStyle)}renderClass(t){return(null==t?void 0:t.standalone)?null:this.code&&this.useInternalStyle?"v-rte--code":null}renderStyle(t){return(null==t?void 0:t.standalone)&&this.code&&this.useInternalStyle?nt.getDefaultStyles():null}}const rt={key:"black",light:"#111128",dark:"#E3E3E8"},it=[rt,{key:"gray",light:"#5E5E6D",dark:"#B9B9C1"},{key:"green",light:"#01801F",dark:"#59D977"},{key:"red",light:"#BD2947",dark:"#FFB2B5"},{key:"purple",light:"#563D82",dark:"#BEB2FF"},{key:"teal",light:"#17758F",dark:"#4CD8FF"}],ot="",at=[{key:"title"},{key:"subtitle"},{key:"heading-1"},{key:"heading-2"},{key:"heading-3"},{key:"paragraph"}],ct=[["textStyles"],["bold","italic","underline","strikethrough","code"],["textColor"],["horizontalAlignment","bulletsNumbers"],["moreIndent","lessIndent"],["link"],["image"],["clearStyle"]],lt=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),ht=22;class ut extends C{constructor(t){super(),this.type=O.TEXT_COLOR,this.textColor=this.formatTextColor(t)}static from(t){return[O.TEXT_COLOR,new ut(t)]}toJSON(){return{textColor:this.textColor.key}}clone(){return new ut(this.textColor.key)}renderClass(){return null}renderStyle(){return{color:h.isDarkMode()?this.textColor.dark:this.textColor.light}}formatTextColor(t){return it.find((e=>e.key===t))||it[0]}}class dt extends C{constructor(t,e=!0){super(),this.type=O.LINK,this.link=t,this.useInternalStyle=e}static from(t,e=!0){return[O.LINK,new dt(t,e)]}toJSON(){return{link:this.link}}clone(){return new dt(this.link,this.useInternalStyle)}toEqual(t){return this.link.groupKey===t.link.groupKey}renderClass(){return null}renderStyle(){return null}}class ft extends G{constructor(t,e,s){super(),this.isFlushable=!1,this.groupKey=t,this.nodes=e,this.type=s}toAnnotation(){return new _(this.groupKey)}}class pt extends G{constructor(){super(),this.isFlushable=!1}toAnnotation(){return null}}class gt{execute(t,e){return o.log(`Executing action ${t.constructor.name} on ${e.constructor.name} ${e.id}`),this.handleAction(t,e)}updateCustomStyleAnnotation(t,e){const s=t.annotationMap.get(m.CUSTOM_STYLE);s&&this.isCustomStyle(s,e)&&t.annotationMap.set(s.type,new M(s.removeStyles(e)))}createNewParagraph(t){const e=K.getRTEBlockClass("paragraph");if(e)return e.from({id:l(),type:"paragraph",nodes:[{id:l(),type:"text",text:t}]})}getRootContent(t){const e=t.parent;if(e)return"VegaRTEContent"===e.dtoName?e:this.getRootContent(e)}isCaretPositionAtBlockStart(t,e,s){return e===t.children[0]&&0===s}isCaretPositionAtBlockEnd(t,e,s){return e.isContentEditable()?this.isCaretPositionAtTextBlockEnd(t,e,s):this.isCaretPositionAtDecoratorBlockEnd(t,e,s)}getDOMByEntity(t){return w.getDOMByEntity(t)}isCaretPositionAtTextBlockEnd(t,e,s){const n=t.children[t.children.length-1];return e===n&&(e.isEmpty()||s===n.text.length)}isCaretPositionAtDecoratorBlockEnd(t,e,s){return e===t.children[t.children.length-1]&&0!==s}isCustomStyle(t,e){return e.some((e=>Object.keys(t.customStyle).includes(e)))}}class xt extends E{constructor(t){super(),this.type=A.LINK_GROUP_NODE_SPLIT,this.splittedTextNodes=t}}class wt extends gt{constructor(){super(...arguments),this.applyTargetNode=null}handleAction(t,e){const s=e.getAnnotationByType(f.SELECTION_RANGE);if(this.setApplyTargetNode(null),t instanceof W&&t.doSplit&&s){const{startContainer:t,endContainer:n,startOffset:r,endOffset:i}=s.range,o=t===n&&r===i;e.parent.children=e.parent.children.flatMap((t=>{if(t.id===e.id){if(o)return this.insertNewNode(r,e);if(this.shouldSplitSelection(s.range)&&e.isContentEditable()){const n=this.splitTextNode(s.range,e);return t.annotationMap.has("LINK")&&t.apply(new xt(n)),n}return this.setApplyTargetNode(e),e}return t}))}return this.applyTargetNode}insertNewNode(t,e){const s=e.cloneWithText("");this.setApplyTargetNode(s);const n=e.parent.children.findIndex((t=>t===e));return 0===t||!e.isContentEditable()&&t===n?[s,e]:t===e.text.length||!e.isContentEditable()&&t===n+1?[e,s]:[e.cloneWithText(e.text.substring(0,t)),s,e.cloneWithText(e.text.substring(t))]}shouldSplitSelection(t){const{startContainer:e,endContainer:s,startOffset:n,endOffset:r}=t;return e!==s||n>0||r<(s.textContent?s.textContent.length:0)}splitTextNode(t,e){const{startContainer:s,endContainer:n,startOffset:r}=t,i=s.parentElement,o=n.parentElement,a=(t,s,n)=>{const r=t.substring(0,s),i=t.substring(s,n),o=t.substring(n);return[e.cloneWithText(r),e.cloneWithText(i),e.cloneWithText(o)]},c=i&&w.getEntityByDOM(i),l=o&&w.getEntityByDOM(o);if(c&&c.id===e.id){const i=s===n?t.endOffset:e.text.length,[o,c,l]=a(e.text,r,i);return this.setApplyTargetNode(c),[o,c,l].filter((t=>!!t.text))}if(l&&l.id===e.id){const[s,n,r]=a(e.text,0,t.endOffset);return this.setApplyTargetNode(n),[s,n,r].filter((t=>!!t.text))}return this.setApplyTargetNode(e),e}setApplyTargetNode(t){this.applyTargetNode=t}}class At extends W{constructor(t){super(),this.isFlushable=!0,this.bold=t}toAnnotation(){return new st(this.bold)}}class Ot extends g{constructor(){super(...arguments),this.type=f.CLEAR_FORMATTING,this.items=[O.BOLD,O.ITALIC,O.UNDERLINE,O.STRIKETHROUGH,O.TEXT_COLOR,O.CODE,m.CUSTOM_STYLE]}}class mt extends W{constructor(){super(...arguments),this.isFlushable=!0}toAnnotation(){return new Ot}}class yt extends W{constructor(t){super(),this.isFlushable=!0,this.code=t}toAnnotation(){return new nt(this.code)}}class Et extends G{constructor(t){super(),this.isFlushable=!0,this.annotationType=t}toAnnotation(){}}class St extends W{constructor(t){super(),this.isFlushable=!0,this.italic=t}toAnnotation(){return new et(this.italic)}}class Tt extends W{constructor({link:t,newText:e,needMergeNode:s,doSplit:n,type:r}){super(),this.isFlushable=!0,this.link=t,this.needMergeNode=s,this.newText=e,this.type=r,a(n)&&(this.doSplit=n)}toAnnotation(){return new dt(this.link)}}class Nt extends W{constructor(t){super(),this.isFlushable=!0,this.strikethrough=t}toAnnotation(){return new Q(this.strikethrough)}}class bt extends W{constructor(t){super(),this.isFlushable=!0,this.underline=t}toAnnotation(){return new tt(this.underline)}}class Ct extends gt{handleAction(t,e){const s=t.toAnnotation();if(t instanceof Et)e.annotationMap.delete(t.annotationType);else{if(!(s instanceof Ot))return s instanceof C||s instanceof z?(t instanceof Tt&&(a(t.newText)&&(e.text=t.newText),e.parent.apply(new ft(t.link.groupKey,[e],t.type))),t instanceof yt&&this.handleAction(new mt,e),t instanceof At&&this.updateCustomStyleAnnotation(e,["fontWeight"]),t instanceof St&&this.updateCustomStyleAnnotation(e,["fontStyle"]),(t instanceof bt||t instanceof Nt)&&this.updateCustomStyleAnnotation(e,["textDecoration"]),void e.annotationMap.set(s.type,s)):void 0;s.items.forEach((t=>{e.deleteAnnotationByType(t)}))}}}class vt extends E{constructor(){super(...arguments),this.type=A.DELETE_LINK_GROUP}}class Rt extends gt{handleAction(t,e){e.text=t.newTextContent,!e.text&&e.annotationMap.has("LINK")&&e.apply(new vt)}}class _t extends E{constructor(t){super(),this.type=A.UPDATE_TEXT,this.newTextContent="",this.newTextContent=t}}class kt extends gt{handleAction(t,e){this.replaceSelectedText(t.textToBeInsert,t.currentRange,e)}replaceSelectedText(t,e,s){if(e&&e.startContainer&&e.endContainer){const{startContainer:n,endContainer:r,startOffset:i,endOffset:o}=e;let a=s.text;if(n===r&&i===o&&t)a=s.text.slice(0,i)+t+s.text.slice(i);else{const e=n.parentElement,c=r.parentElement,l=e&&w.getEntityByDOM(e),h=c&&w.getEntityByDOM(c);let u=0,d=s.text.length;l&&l===s?(u=i,d=n===r?o:d):h&&h===s&&(d=o),a=s.text.slice(0,u)+t+s.text.slice(d)}s.apply(new _t(a))}}}class jt extends g{constructor(t){super(),this.type=O.INLINE_HTML,this.htmlTag=t}static from(t){const{htmlTag:e,child:s,customStyle:n,customClass:r,customAttribute:i}=t,o=new jt(e);return o.groupId=t.groupId,o.child=s?jt.from(s)[1]:void 0,o.customAttribute=i?D.from(i)[1]:void 0,o.customClass=r?I.from(r)[1]:void 0,o.customStyle=n?M.from(n)[1]:void 0,[O.INLINE_HTML,o]}clone(){var t,e,s,n;const r=new jt(this.htmlTag);return r.groupId=this.groupId,r.child=null===(t=this.child)||void 0===t?void 0:t.clone(),r.customAttribute=null===(e=this.customAttribute)||void 0===e?void 0:e.clone(),r.customClass=null===(s=this.customClass)||void 0===s?void 0:s.clone(),r.customStyle=null===(n=this.customStyle)||void 0===n?void 0:n.clone(),r}renderProps(){var t,e,s;return Object.assign(Object.assign({},null===(t=this.customAttribute)||void 0===t?void 0:t.render()),{style:null===(e=this.customStyle)||void 0===e?void 0:e.renderStyle(),class:null===(s=this.customClass)||void 0===s?void 0:s.renderClass().join(" ")})}toJSON(){var t,e,s,n;return{inlineHtml:u({htmlTag:this.htmlTag,groupId:this.groupId,child:null===(t=this.child)||void 0===t?void 0:t.toJSON().inlineHtml,customAttribute:null===(e=this.customAttribute)||void 0===e?void 0:e.toJSON().customAttribute,customClass:null===(s=this.customClass)||void 0===s?void 0:s.toJSON().customClass,customStyle:null===(n=this.customStyle)||void 0===n?void 0:n.toJSON().customStyle})}}}class Lt extends gt{handleAction(t,e){const s=e.parent.getAnnotationByType(f.LINK_GROUP);if(s){const n=e.annotationMap.get("LINK").link.groupKey,r=s.linkGroups.get(n);if(r){const i=r.indexOf(e);-1!==i&&(r.splice(i,1,...Array.isArray(t.splittedTextNodes)?t.splittedTextNodes:[t.splittedTextNodes]),s.linkGroups.set(n,r))}}}}class $t extends gt{handleAction(t,e){const s=e.parent.getAnnotationByType(f.LINK_GROUP);if(s){const t=e.annotationMap.get(O.LINK).link.groupKey,n=s.linkGroups.get(t);if(n){const r=n.indexOf(e);-1!==r&&n.splice(r,1),0===n.length&&s.linkGroups.delete(t),0===s.linkGroups.size&&e.parent.annotationMap.delete(f.LINK_GROUP)}}e.annotationMap.delete(O.LINK)}}class Bt extends C{constructor(t){super(),this.type=O.PLAIN_TEXT,this.plainText=!0,this.plainText=t}static from(t){return[O.PLAIN_TEXT,new Bt(t)]}clone(){return new Bt(this.plainText)}renderClass(){}renderStyle(){}toJSON(){return this.plainText?{plainText:this.plainText}:void 0}}class Dt extends W{constructor(t){super(),this.isFlushable=!0,this.textColor=t}toAnnotation(){return new ut(this.textColor)}}class It extends J{constructor(t,e,s,n){super(t,n),this.dtoName=It.dtoName,this.type=y.TEXT,this.parent=s,this.text=e,this.registerModifyStrategy()}static supportsHtmlTag(t){return["span","code"].includes(t)}static from(t,e,s={autoMatchFormat:!0}){const n=new It(t.id,t.text,e),{annotations:r}=t;return r&&(n.annotationMap=this.generateTextAnnotationMap(r,s,e,n)),n}static generateTextAnnotationMap(t,e,s,n){return new Map(Object.keys(t).map((r=>("link"===r&&t.link&&s&&n&&s.apply(new ft(t.link.groupKey,[n],"link")),this.createAnnotationEntity(r,t[r],e)))).filter(a))}static createAnnotationEntity(t,e,s){const n=!(!s||!s.autoMatchFormat);switch(t){case"bold":return st.from(e);case"italic":return et.from(e);case"underline":return tt.from(e);case"strikethrough":return Q.from(e);case"code":return nt.from(e,n);case"textColor":return ut.from(e);case"link":return dt.from(e,n);case"inlineHtml":return jt.from(e);case"plainText":return Bt.from(e)}return J.createAnnotationEntity(t,e)}toJSON(){const t=Array.from(this.annotationMap.values()).filter((t=>t instanceof C||t instanceof B||t instanceof jt)).reduce(((t,e)=>Object.assign(Object.assign({},t),e.toJSON())),{});return Object.assign(Object.assign({id:this.id},Object.keys(t).length>0?{annotations:t}:{}),{type:"text",text:this.text})}toHtml(t){const e=this.getAnnotationByType(O.INLINE_HTML);return e?this.renderWithWrapperStr(e,t):this.renderTextStr(t)}cloneWithText(t){return new It(l(),t,this.parent,super.cloneAnnotations())}clone(t){return new It(this.id,this.text,t,super.cloneAnnotations())}isEmpty(){return!(this.getAnnotationByType(O.INLINE_HTML)||this.text&&""!==this.text&&"\n"!==this.text)}isTextNode(){return!0}getRangeEndOffset(){return!this.isContentEditable()&&this.parent?this.parent.children.indexOf(this)+1:"\n"===this.text?0:this.text.length}getRangeContainer(){const t=this.getElementRef();if(t)return this.isContentEditable()?t.firstChild:t.parentElement}isContentEditable(){return!0}getInlineHtmlTagAtDepth(t){const e=this.getInlineHtmlAnnotationAtDepth(t);return e?lt.has(e.htmlTag)?null:{htmlTag:e.htmlTag,attrStr:this.annotationAttrStr(e),groupId:e.groupId,annotation:e}:null}renderHtmlFromDepth(t,e){if(0===t)return this.toHtml(e);const s=this.getInlineHtmlAnnotationAtDepth(t);return s?this.renderWithWrapperStr(s,e):this.renderTextStr(e)}getInlineHtmlAnnotationAtDepth(t){let e=this.getAnnotationByType(O.INLINE_HTML);for(let s=0;s<t&&e;s++)e=e.child;return e}registerModifyStrategy(){const t=this.constructor.name;It.registerActionStrategyStatus[t]||(this.isContentEditable()&&($.register(A.UPDATE_TEXT,t,new Rt),$.register(A.REPLACE_SELECTED_TEXT,t,new kt),$.register(A.LINK_GROUP_NODE_SPLIT,t,new Lt),$.register(Tt.name,t,new Ct)),$.register(W.name,t,new wt),$.register(A.DELETE_LINK_GROUP,t,new $t),$.register(At.name,t,new Ct),$.register(mt.name,t,new Ct),$.register(St.name,t,new Ct),$.register(bt.name,t,new Ct),$.register(Dt.name,t,new Ct),$.register(Nt.name,t,new Ct),$.register(yt.name,t,new Ct),$.register(G.name,t,new Ct),It.registerActionStrategyStatus[t]=!0)}doAnnotationActionApply(t){const e=this.getAnnotationByType(f.SELECTION_RANGE);if(t instanceof W&&t.doSplit&&e){const e=$.get(W.name,this.constructor.name);if(e){const s=e.execute(t,this);s&&this.applyActionToNode(s,t)}}else this.applyActionToNode(this,t);"function"==typeof this.parent.mergeNodes&&this.parent.mergeNodes(t)}doModifyActionApply(t){$.executeTheStrategy(t,this)}applyActionToNode(t,e){const s=e.toAnnotation();if(e instanceof pt)return void this.syncUpSelectedNodes(t);s instanceof z||this.syncUpSelectedNodes(t);const n=$.get(e.constructor.name,t.constructor.name);if(n)return void n.execute(e,t);const r=$.get(G.name,It.name);r&&r.execute(e,t)}syncUpSelectedNodes(s){const r=this.getElementRef();if(r){const i=e.getSubjectFromParentNodeByEventId(r,n);i&&t.notify(i,{node:s})}}renderWithWrapperStr(t,e){const{htmlTag:s,child:n}=t,r=this.annotationAttrStr(t);return n?`<${s}${r}>${this.renderWithWrapperStr(n,e)}</${s}>`:lt.has(s)?`<${s}${r}>`:this.text?`<${s}${r}>${this.renderTextStr(e)}</${s}>`:`<${s}${r}></${s}>`}annotationAttrStr(t){const{customAttribute:e,customClass:s,customStyle:n}=t,r=[...(null==e?void 0:e.toString())||[],null==s?void 0:s.toString(),null==n?void 0:n.toString()].filter(a);return r.length>0?` ${r.join(" ")}`:""}renderTextStr(t){var e;const s=(null===(e=this.getAnnotationByType(O.CODE))||void 0===e?void 0:e.code)?"code":"span",n=super.generateAttributeString(t);return"\n"===this.text?"<br>":this.shouldRenderAsPlainText()?this.text:`<${s}${n}>${"code"===s?T(this.text):this.text}</${s}>`}shouldRenderAsPlainText(){const t=super.getAnnotationByType(O.PLAIN_TEXT);return!!t&&t.plainText&&0===Array.from(this.annotationMap.values()).filter((t=>t instanceof C&&!(t instanceof dt)&&!(t instanceof Bt)||t instanceof B)).length}}It.registerActionStrategyStatus={},It.htmlTag="span",It.dtoName="RTETextNode";class Mt extends E{constructor(t){super(),this.type=A.APPEND_CHILDREN,this.entityToBeAppended=t}}const Ft={fontFamily:"Inter",fontSize:"16px",lineHeight:"22px",minHeight:"22px",fontWeight:"500"},Ht=Object.assign(Object.assign({},Ft),{marginTop:"0px",marginBottom:"0px"}),Pt={paragraph:Ht,title:Object.assign(Object.assign({},Ft),{fontSize:"36px",lineHeight:"40px",minHeight:"40px"}),subtitle:Object.assign(Object.assign({},Ft),{fontSize:"28px",lineHeight:"32px",minHeight:"32px"}),"heading-1":Object.assign(Object.assign({},Ht),{fontSize:"22px",lineHeight:"24px",minHeight:"24px"}),"heading-2":Object.assign(Object.assign({},Ht),{fontSize:"20px",lineHeight:"24px",minHeight:"24px"}),"heading-3":Object.assign(Object.assign({},Ht),{fontSize:"18px"}),"heading-4":Object.assign({},Ht),"heading-5":Object.assign(Object.assign({},Ht),{fontSize:"14px"}),"heading-6":Object.assign(Object.assign({},Ht),{fontSize:"12px"})};class Jt extends x{constructor(t){super(),this.type=p.TEXT_STYLE,this.textStyle=t}static from(t){return[p.TEXT_STYLE,new Jt(t)]}static getDefaultStyles(t){return t?Pt[t]:null}toJSON(){return{textStyle:this.textStyle}}clone(){return new Jt(this.textStyle)}renderClass(t){return(null==t?void 0:t.standalone)?null:this.textStyle?`v-rte--text-style-${this.textStyle}`:null}renderStyle(t){return(null==t?void 0:t.standalone)&&this.textStyle?Jt.getDefaultStyles(this.textStyle):null}}class Kt extends G{constructor(t,e){super(),this.isFlushable=!0,this.textStyle=t,this.bold=e}toAnnotation(){return new Jt(this.textStyle)}}class Ut extends gt{handleAction(t,e){"list-item"!==e.type&&(e.type=t.textStyle),e.children.forEach(t.bold?t=>{const e=new At(!0);e.doSplit=!1,t.apply(e)}:t=>{t.apply(new Et(O.BOLD))}),this.updateCustomStyleAnnotation(e,["fontFamily","lineHeight","fontWeight","fontSize"])}}class Gt extends E{constructor(t,...e){super(),this.type=A.INSERT_CHILDREN_AFTER,this.referChildren=t,this.childrenToBeInserted=e}}class Wt extends E{constructor(t){super(),this.type=A.REPLACE_CHILD_NODES,this.newChildNodes=t}}class zt extends gt{handleAction(t,e){t.newBlock=this.splitTextNodeBlock(t.splitPointNode,t.startOffsetOfNode,e)}splitTextNodeBlock(t,e,s){if(t){const n=t.text.slice(0,e),r=t.text.slice(e),i=s.children.indexOf(t);if(i>-1){const o=s.children.slice(0,i),a=s.children.slice(i+1);t.isContentEditable()?(n&&o.push(t.cloneWithText(n)),r&&a.unshift(t.cloneWithText(r))):e>0?o.push(t):a.unshift(t),s.apply(new Wt(o));const c=s.cloneWithNodes(a);return s.parent.apply(new Gt(s,c)),c}}}}class Vt extends gt{handleAction(t,e){e.children=[],e.apply(new Mt(t.newChildNodes))}}class Xt extends E{constructor(t){super(),this.type=A.DELETE_CHILDREN,this.entityToBeRemoved=t}}class qt extends gt{handleAction(t,e){const s=t.blockNeedToBeMerged;if(e.type===s.type||"image"!==e.type&&"image"!==s.type){let t=s.children;"image"!==s.type&&(t=s.children.filter((t=>t.text))),e.apply(new Mt(t)),"image"!==e.type&&this.transferLinkGroups(t,e),s.parent.apply(new Xt(s))}}transferLinkGroups(t,e){t.forEach((t=>{if(!(t instanceof It))return;const s=t.getAnnotationByType(O.LINK);s&&e.apply(new ft(s.link.groupKey,[t],"link"))}))}}class Yt extends gt{handleAction(t,e){t.lineBreakNode=this.lineBreakSingleBlock(t.startContainerNode,t.startOffset,e)}lineBreakSingleBlock(t,e,s){if(t){const n=new It(l(),"\n",s),r=t.text.slice(0,e),i=t.text.slice(e),o=s.children.indexOf(t);if(o>-1){const a=s.children.slice(0,o),c=s.children.slice(o+1);t.isContentEditable()?(r&&a.push(t.cloneWithText(r)),i&&c.unshift(t.cloneWithText(i))):e>0?a.push(t):c.unshift(t),this.mergeLineBreakNodes(a,n,c,s)}return n}}mergeLineBreakNodes(t,e,s,n){if(0===s.length||s[0]&&""===s[0].text){const e=t[t.length-1];s.push(new It(l(),"\n",n,e&&new Map(e.annotationMap)))}n.apply(new Wt([...t,e,...s]))}}class Zt extends gt{handleAction(t,e){t.lineBreakNode=this.lineBreakMultipleBlocks(t.selectedBlocks,e)}lineBreakMultipleBlocks(t,e){const s=e.children,n=new It(l(),"\n",e),r=this.concatBlocksNodes(t.slice(1));return this.mergeLineBreakNodes(s,n,r,e),n}concatBlocksNodes(t){const e=[];return t.map((t=>{"image"!==t.type&&(e.push(...t.children),t.parent.apply(new Xt(t)))})),e}mergeLineBreakNodes(t,e,s,n){(0===s.length||s[0]&&""===s[0].text)&&s.push(new It(l(),"\n",n,t[t.length-1]&&t[t.length-1].annotationMap)),n.apply(new Wt([...t,e,...s]))}}class Qt extends E{constructor(t,...e){super(),this.type=A.INSERT_CHILDREN_BEFORE,this.referChildren=t,this.childrenToBeInserted=e}}class te extends E{constructor(t,e){super(),this.type=A.SPLIT_BLOCK_WITH_NODE,this.splitPointNode=t,this.startOffsetOfNode=e}}class ee extends G{constructor(t){super(),this.isFlushable=!0,this.textAlign=t}toAnnotation(){return new k(this.textAlign)}}class se extends gt{handleAction(t,e){this.updateCustomStyleAnnotation(e,["textAlign"])}}class ne extends G{constructor(t){super(),this.isFlushable=!0,this.indent=t}toAnnotation(){return new j(this.indent)}}class re extends U{constructor(t,e,s){super(t),this.dtoName=re.dtoName,this.children=[],this.type=e;const{autoMatchFormat:n}=s||{autoMatchFormat:!0};n&&(this.annotationMap=re.isAcceptableTextStyle(e)?new Map([Jt.from(e)]):new Map([Jt.from("paragraph")]))}static from(t,e={autoMatchFormat:!0}){var s,n;const r=new re(t.id,t.type,e),i=e.autoMatchFormat?Object.assign(Object.assign({},t.annotations),{textStyle:null!==(n=null===(s=t.annotations)||void 0===s?void 0:s.textStyle)&&void 0!==n?n:r.type}):t.annotations;return r.children=t.nodes.map((t=>{const s=K.getRTENodeClass(t.type);if(s)return s.from(t,r,e)})).filter(a),i&&super.convertAnnotationsToMap(r.annotationMap,i),r}static createAnnotationEntity(t,e){return"textStyle"===t?Jt.from(e):super.createAnnotationEntity(t,e)}static isAcceptableTextStyle(t){return["title","subtitle","paragraph","heading-1","heading-2","heading-3","heading-4","heading-5","heading-6"].includes(t)}mergeNodes(t){this.children=this.children.reduce(((e,s)=>{const n=e.at(-1);if(t instanceof Tt&&t.needMergeNode){const t=null==n?void 0:n.getAnnotationByType(O.LINK),r=s.getAnnotationByType(O.LINK);if(t&&r&&t.toEqual(r))return e}return[...e,s]}),[])}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{type:this.type,nodes:this.children.map((t=>t.toJSON()))})}toHtml(t){const e=this.getBlockTag(),s=super.generateAttributeString(t),n=this.getChildrenHtml(t);return super.shouldRenderAsInternalWrapper()?n:[`<${e}${s}>`,n,`</${e}>`].join("")}cloneWithNodes(t){const e=new re(l(),this.type);return e.annotationMap=super.cloneAnnotations(),e.apply(new Mt(t)),e}clone(t){const e=new re(this.id,this.type);return e.children=this.children.map((t=>t.clone(e))),e.annotationMap=super.cloneAnnotations(),e.parent=t,e}isNotEmpty(){return this.children.length>0&&this.children.some((t=>!t.isEmpty()))}getLastNode(){return this.children[this.children.length-1]}getBlockTag(){switch(this.type){case"title":case"subtitle":return"div";case"heading-1":return"h1";case"heading-2":return"h2";case"heading-3":return"h3";case"heading-4":return"h4";case"heading-5":return"h5";case"heading-6":return"h6";case"paragraph":default:return"p"}}getChildrenHtml(t){const e=this.getAnnotationByType(f.LINK_GROUP);let s=this.renderGroupedNodesAtDepth(this.children,0,t);return e&&this.children.length>0&&(s=this.generateLinkHtml(e,s,t)),s}doAnnotationActionApply(t){const e=$.get(t.constructor.name,re.name);e&&e.execute(t,this)}renderGroupedNodesAtDepth(t,e,s){var n;let r="",i=0;for(;i<t.length;){const o=t[i].getInlineHtmlTagAtDepth(e);if(!(null==o?void 0:o.groupId)){r+=t[i].renderHtmlFromDepth(e,s),i++;continue}let a=i+1;for(;a<t.length&&(null===(n=t[a].getInlineHtmlTagAtDepth(e))||void 0===n?void 0:n.groupId)===o.groupId;)a++;if(a===i+1)r+=t[i].renderHtmlFromDepth(e,s);else{const n=this.renderGroupedNodesAtDepth(t.slice(i,a),e+1,s);r+=`<${o.htmlTag}${o.attrStr}>${n}</${o.htmlTag}>`}i=a}return r}generateLinkHtml(t,e,s){e="";let n=[];for(let r=0;r<this.children.length;r++){const i=this.children[r].getAnnotationByType(O.LINK),o=this.children[r+1]?this.children[r+1].getAnnotationByType(O.LINK):null;if(i){if(n.push(this.children[r]),!o||i.link.groupKey!==o.link.groupKey){const r=t.toString(i,{standalone:!0,filterInlineStyles:null==s?void 0:s.filterInlineStyles});e+=[`<a${r?` ${r}`:""}>`,this.renderGroupedNodesAtDepth(n,0,s),"</a>"].join(""),n=[]}}else e+=this.children[r].toHtml(s)}return e}}$.register(Kt.name,re.name,new Ut),$.register(ee.name,re.name,new se),$.register(ne.name,re.name,new class extends gt{handleAction(t,e){this.updateCustomStyleAnnotation(e,["marginLeft"])}}),$.register(ft.name,re.name,new class extends gt{handleAction(t,e){let s=e.getAnnotationByType(f.LINK_GROUP);if("update_link"===t.type){if(s){const e=s.linkGroups.get(t.groupKey);e&&s.linkGroups.set(t.groupKey,[e[0]])}}else{if(s){const e=s.linkGroups.get(t.groupKey)||[];s.linkGroups.set(t.groupKey,[...e,...t.nodes])}else s=t.toAnnotation(),s.linkGroups.set(t.groupKey,[...t.nodes]);e.annotationMap.set(f.LINK_GROUP,s)}}}),$.register(A.UNLINK_LINK_GROUP,re.name,new class extends gt{handleAction(t,e){const s=e.getAnnotationByType(f.LINK_GROUP);s&&(s.linkGroups.size>1?s.linkGroups.delete(t.groupKey):e.annotationMap.delete(f.LINK_GROUP))}}),$.register(A.SPLIT_BLOCK_WITH_NODE,re.name,new zt),$.register(A.REPLACE_CHILD_NODES,re.name,new Vt),$.register(A.MERGE_TWO_BLOCKS_NODES,re.name,new qt),$.register(A.LINE_BREAK_SINGLE_BLOCK,re.name,new Yt),$.register(A.LINE_BREAK_MULTIPLE_BLOCKS,re.name,new Zt),$.register(A.INSERT_IMAGE_TO_BLOCK,re.name,new class extends gt{handleAction(t,e){const s=t.splitPointNode,n=t.startOffsetOfNode,r=t.imageBlockToBeInserted;if(this.isCaretPositionAtBlockEnd(e,s,n))e.parent.apply(new Gt(e,r));else if(this.isCaretPositionAtBlockStart(e,s,n))e.parent.apply(new Qt(e,r));else{const t=new te(s,n);e.apply(t),e.parent.apply(new Gt(e,r))}}}),$.register(A.TRANSFORM_LIST_BLOCK,re.name,new class extends gt{handleAction(t,e){const s=e.parent,n=s.createList(t.listType),r=t.selectedBlocks,i=r.map((t=>s.toListItem(t)));n.apply(new Mt(i)),s.apply(new Gt(t.selectedBlocks[0],n)),r.forEach((t=>{t.parent.apply(new Xt(t))}))}}),re.dtoName="RTETextBlock";class ie extends gt{getPreviousNode(t){const e=t.parent,s=e.children.indexOf(t);if(s>0)return e.children[s-1];if(e.parent){const t=this.getPreviousBlock(e);if(t)return this.getBlockLastNode(t)}}getNextNode(t){const e=t.parent,s=e.children.indexOf(t);if(e.children[s+1])return e.children[s+1];if(e.parent){const t=this.getNextBlock(e);if(t)return this.getBlockFirstNode(t)}}isContentFirstNode(t){const e=t.parent,s=e.children.indexOf(t),n=e.parent;if(e.isListItemBlock()){const t=n.parent;return 0===s&&Array.isArray(n.children)&&n.children[0]===e&&"list-item"!==t.type&&Array.isArray(t.children)&&t.children[0]===n}return 0===s&&Array.isArray(n.children)&&n.children[0]===e}getPreviousBlock(t){if(t&&t.parent&&t.parent.children){const e=t.parent.children.indexOf(t);if(e>0)return t.parent.children[e-1];if(this.isRTEBlock(t.parent)&&0===e)return this.getPreviousBlock(t.parent)}}getBlockLastNode(t){return t.getLastNode()}getBlockFirstNode(t){if("number-list"===t.type||"bullet-list"===t.type){if(t.children)return this.getBlockFirstNode(t.children[0])}else if(t.children)return t.children[0]}getNextBlock(t){if(t&&t.parent&&t.parent.children){const e=t.parent.children.indexOf(t);if(t.parent.children[e+1])return t.parent.children[e+1];if("list-item"===t.type&&t.parent.children.length===e+1)return this.getNextBlock(t.parent)}}isRTEBlock(t){return t&&"VegaRTEContent"!==t.dtoName}}class oe extends E{constructor(t,e){super(),this.isFlushable=!0,this.type=A.UPDATE_CODE_BLOCK,this.content=t,this.language=e}}class ae extends G{constructor(t){super(),this.isFlushable=!1,this.range=t}toAnnotation(){return new z(this.range)}}class ce extends J{constructor(){super(...arguments),this.type="decorator-node",this.isSelected=!1}static isDecoratorNodeContainerElement(t){return t&&t.classList.contains(ce.DECORATOR_CONTAINER_CLASS)}static getDecoratorNodeElement(t){return t.querySelector(`.${ce.DECORATOR_NODE_CLASS}`)}getRangeEndOffset(){return 1}getRangeContainer(){const t=this.getElementRef();if(t)return d(t,`.${ce.DECORATOR_CONTAINER_CLASS}`)}isContentEditable(){return!1}}ce.DECORATOR_CONTAINER_CLASS="v-internal-decorator-container",ce.DECORATOR_NODE_CLASS="v-internal-decorator-node";class le extends b{constructor(){super(...arguments),this.stylesToBeFiltered=le.STYLES,this.elementTagName="pre code"}canFilter(t){return v.isCodeBlockNode(t)}canRefill(t,e){return!1}toCssText(){return this.buildCssTextForStyles(this.elementTagName,this.classNameToBeAdded)}}le.STYLES={boxSizing:"border-box",color:"rgba(var(--v-text-primary, 32, 54, 69, 1))",textAlign:"left",fontFamily:"'Roboto Mono'",fontWeight:"400",lineHeight:"22px",fontSize:"16px",whiteSpace:"pre-wrap",minHeight:"22px",tabSize:"2px"};class he extends ce{constructor(t,e,s,n){super(t),this.dtoName=he.dtoName,this.type=y.CODE_BLOCK_NODE,this.text="",this.annotationMap=new Map,this.text=e,this.parent=n,this.language=s,this.annotationMap.set(m.CUSTOM_STYLE,new M(le.STYLES))}toJSON(){return{id:this.id,type:"text",text:this.text,language:this.language}}toHtml(t){return`<code${this.generateAttributeString(t)}>${this.text}</code>`}clone(t){return new he(this.id,this.text,this.language,t)}doAnnotationActionApply(t){$.executeTheStrategy(t,this)}doModifyActionApply(t){$.executeTheStrategy(t,this)}}$.register(A.UPDATE_CODE_BLOCK,he.name,new class extends gt{handleAction(t,e){const{content:s,language:n}=t;e.language=n,e.text=s}}),$.register(ae.name,he.name,new class extends gt{handleAction(t,e){e.annotationMap.set(f.SELECTION_RANGE,t.toAnnotation())}}),he.dtoName="RTECodeBlockNode";var ue;!function(t){t.CSS="css",t.HTML="html",t.JavaScript="js",t.JSX="jsx",t["Plain Text"]="plainText",t.TypeScript="ts",t.TSX="tsx"}(ue||(ue={}));class de extends gt{handleAction(t,e){e.children=e.children.filter((e=>e!==t.entityToBeRemoved)),0===e.children.length&&"parent"in e&&e.parent&&(e.isListItemBlock()&&e.nestList&&e.nestList.length||e.parent.apply(new Xt(e)))}}class fe extends b{constructor(){super(...arguments),this.stylesToBeFiltered=fe.STYLES,this.elementTagName="pre"}canFilter(t){return v.isCodeBlock(t.dtoName)}canRefill(t,e){return!1}toCssText(){return this.buildCssTextForStyles(this.elementTagName,this.classNameToBeAdded)}}fe.STYLES={backgroundColor:"rgba(var(--v-bg-secondary, 245, 247, 247, 1))",padding:"12px"};class pe extends U{constructor(t,e,s){super(t),this.dtoName=pe.dtoName,this.type="code-block",this.annotationMap=new Map([M.from(fe.STYLES)]),this.children=[new he(`${t}-1`,e,s,this)]}static from(t){return new pe(t.id,t.content,t.language)}toJSON(){const{language:t,text:e}=this.children[0];return{id:this.id,type:"code-block",content:e,language:t}}toHtml(t){const{language:e=ue["Plain Text"]}=this.children[0];return`<pre data-language="${e}"${super.generateAttributeString(t)}>${this.children.map((e=>e.toHtml(t)))}</pre>`}clone(t){const e=pe.from(this.toJSON());return e.parent=t,e}apply(n){if(n instanceof E&&$.executeTheStrategy(n,this),n.isFlushable){const n=w.getDOMByEntity(this);if(n){const r=e.getSubjectFromParentNodeByEventId(n,s);r&&t.notify(r,{})}}}isNotEmpty(){return!!this.children.length}getLastNode(){return this.children[0]}isSelected(){return this.children[0].annotationMap.has(f.SELECTION_RANGE)}}$.register(A.DELETE_CODE_BLOCK,pe.name,new class extends ie{handleAction(t,e){const s=e.children[0],n=e.parent;if(n){let t=this.getPreviousNode(s),r=this.getRTENodeEndOffset(t);t||(t=this.getNextNode(s),r=0),n.apply(new Xt(e));const i=t?w.getDOMByEntity(t):null;if(0===n.children.length){const s=re.from({id:l(),type:"paragraph",nodes:[{id:l(),type:"text",text:""}]});e.parent.apply(new Mt([s])),t=s.children[0],r=0}this.notifyUpdateSelection(t,i,r,e)}}notifyUpdateSelection(s,r,i,o){const a=w.getDOMByEntity(o);if(a){const o=e.getSubjectFromParentNodeByEventId(a,n);o&&t.notify(o,{node:s,updateDirectly:!!r,offset:i})}}getRTENodeEndOffset(t){return t?t.getRangeEndOffset():0}}),$.register(A.DELETE_CHILDREN,pe.name,new de),$.register(A.SWITCH_OUT_FROM_CODE_BLOCK,pe.name,new class extends gt{handleAction(s,r){const{content:i,language:o}=s,a=i.split("\n"),c=new oe(a.slice(0,a.length-2).join("\n"),o);c.isFlushable=!1,r.children[0].apply(c);const h=re.from({id:l(),type:"paragraph",nodes:[{id:l(),text:"",type:"text"}]});r.parent.apply(new Gt(r,h));const u=w.getDOMByEntity(r);if(u){const s=e.getSubjectFromParentNodeByEventId(u,n);s&&t.notify(s,{node:h.children[0]})}}}),$.register(A.INSERT_IMAGE_TO_BLOCK,pe.name,new class extends gt{handleAction(t,e){e.parent.apply(new Gt(e,t.imageBlockToBeInserted))}}),pe.CODE_BLOCK_PLACEHOLDER_CLASS_NAME="code-block-placeholder-element",pe.dtoName="RTECodeBlock";export{rt as $,$ as A,x as B,m as C,qt as D,pt as E,p as F,I as G,ee as H,Gt as I,C as J,y as K,B as L,E as M,O as N,Wt as O,lt as P,ie as Q,It as R,te as S,Kt as T,_t as U,ct as V,de as W,X,V as Y,S as Z,it as _,U as a,q as a0,Z as a1,Y as a2,Jt as a3,v as a4,k as a5,nt as a6,R as a7,fe as a8,le as a9,L as aa,ue as ab,at as ac,ot as ad,Tt as ae,oe as af,ae as ag,Dt as ah,ht as ai,At as aj,St as ak,bt as al,st as am,mt as an,yt as ao,Nt as ap,ne as aq,T as ar,re as b,H as c,gt as d,Mt as e,J as f,Qt as g,f as h,A as i,G as j,Xt as k,D as l,K as m,b as n,ce as o,pe as p,he as q,M as r,w as s,P as t,Ut as u,se as v,Yt as w,Zt as x,zt as y,Vt as z}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as t,M as s,V as i}from"./p-6e1ab235.js";import{i as h}from"./p-
|
|
1
|
+
import{c as t,M as s,V as i}from"./p-6e1ab235.js";import{i as h}from"./p-8db904dc.js";import{C as e}from"./p-2d0d575f.js";import{d as o}from"./p-526e3634.js";import{s as n,t as r}from"./p-3a68b729.js";import{w as a}from"./p-88a6c89a.js";var u=function(t,s,i,h){var e,o=arguments.length,n=o<3?s:null===h?h=Object.getOwnPropertyDescriptor(s,i):h;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,s,i,h);else for(var r=t.length-1;r>=0;r--)(e=t[r])&&(n=(o<3?e(n):o>3?e(s,i,n):e(s,i))||n);return o>3&&n&&Object.defineProperty(s,i,n),n};class p extends i{constructor(){super(...arguments),this.onFocus=t=>{if(this.host&&this.host.value){const s=this.host.value;t.target.value!==s&&(this.inputElement.value=s)}},this.onBlur=t=>{this.blurFormatStrategy&&this.formatValue(t.target.value,"blur")},this.onKeyDown=t=>{const s=t.target,i=s.value,h=s.selectionStart;this.inputFormatStrategy&&(this.formatValue(i,"input",{caretPosition:"insertFromPaste"===t.inputType?void 0:h}),this.updateInputCaretPosition(i,h))},this.onPaste=t=>{this.disableCopyPaste?t.preventDefault():e.notify(o.getSubject(this.host,n),t)}}componentDidRender(){e.notify(o.getSubject(this.host,r),{})}setup(){this.destroy();const t=this.getInputElementRef();t&&(this.inputElement=t,this.inputFormatStrategy=this.getInputModeStrategy(),this.blurFormatStrategy=this.getBlurModeStrategy(),this.formatValueAfterSetup(),this.inputFormatStrategy&&(this.inputElement.addEventListener("input",this.onKeyDown,{capture:!0}),this.inputElement.addEventListener("paste",this.onPaste,{capture:!0})),this.blurFormatStrategy&&(this.inputElement.addEventListener("blur",this.onBlur,{capture:!0}),this.inputElement.addEventListener("focus",this.onFocus,{capture:!0})))}destroy(){this.inputElement&&(this.inputFormatStrategy&&(this.inputElement.removeEventListener("input",this.onKeyDown,{capture:!0}),this.inputElement.removeEventListener("paste",this.onPaste,{capture:!0})),this.blurFormatStrategy&&(this.inputElement.removeEventListener("blur",this.onBlur,{capture:!0}),this.inputElement.removeEventListener("focus",this.onFocus,{capture:!0})))}formatValueAfterValueChange(){a(this.host).then((()=>{this.formatValue(this.inputElement.value,"change")}))}formatValueAfterSetup(){a(this.host).then((()=>{this.formatValue(this.inputElement.value,"init")}))}isOnFocus(){return this.inputElement.matches(":focus")}updateNativeInputValue(t,s){s!==t&&(this.inputElement.value=s)}updateComponentValue(t,s){s!==t&&(this.host.value=s)}updateInputCaretPosition(t,s){var i,e,o;const n=null!==(o=null===(e=(i=this.inputFormatStrategy).calculateCaretPosition)||void 0===e?void 0:e.call(i,t,s))&&void 0!==o?o:s;h(n)&&this.inputElement.setSelectionRange(n,n)}formatValue(t,s,i){const h=!this.isOnFocus(),e=null==i?void 0:i.caretPosition;if(this.inputFormatStrategy){if(this.inputFormatStrategy.canFormat(s,"component")){const s=this.inputFormatStrategy.format(t);this.updateComponentValue(t,s)}if(this.inputFormatStrategy.canFormat(s,"native-input")){const s=this.inputFormatStrategy.format(t,{caretPosition:e});this.updateNativeInputValue(t,s)}}if(this.blurFormatStrategy&&h){if(this.blurFormatStrategy.canFormat(s,"component",{isBlurred:h})){const s=this.blurFormatStrategy.format(t);this.updateComponentValue(t,s)}if(this.blurFormatStrategy.canFormat(s,"native-input",{isBlurred:h})){const s=this.blurFormatStrategy.format(t);this.updateNativeInputValue(t,s)}}}}u([t()],p.prototype,"host",void 0),u([s("componentDidRender")],p.prototype,"componentDidRender",null);export{p as S}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{h as t,r,c as o,H as a,g as e}from"./p-6b2342e0.js";import{g as i}from"./p-49a2e141.js";import{s as n}from"./p-519a7d55.js";import{R as s}from"./p-3dee1e55.js";import{C as d}from"./p-2d0d575f.js";import{c as v,V as g,I as b}from"./p-6e1ab235.js";import{V as c,I as p}from"./p-8ce9e214.js";import{P as h}from"./p-81dd00d0.js";import{c as l}from"./p-66647244.js";import{a as u}from"./p-5447a8e8.js";import{C as f}from"./p-2c737fc8.js";import{d as m}from"./p-526e3634.js";import{f as x}from"./p-528748fa.js";import{g as w,h as y}from"./p-3a68b729.js";import{h as j,e as k}from"./p-f0e828d8.js";import"./p-d4ea8e22.js";import"./p-ed45b3b6.js";import"./p-8db904dc.js";import"./p-b438e68b.js";import"./p-0d18368b.js";import"./p-cb378636.js";import"./p-262ec334.js";import"./p-0c667d6a.js";import"./p-d27ae9ff.js";import"./p-87a4d75f.js";import"./p-982747ef.js";import"./p-b75ee3ba.js";import"./p-6a334573.js";import"./p-8c30a60d.js";import"./p-5f377954.js";import"./p-331a62d5.js";class z extends g{render(){if(this.loading)return t("vega-loading-indicator",{size:"micro",mode:"indeterminate"})}}!function(t,r,o,a){var e,i=arguments.length,n=i<3?r:null===a?a=Object.getOwnPropertyDescriptor(r,o):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,r,o,a);else for(var s=t.length-1;s>=0;s--)(e=t[s])&&(n=(i<3?e(n):i>3?e(r,o,n):e(r,o))||n);i>3&&n&&Object.defineProperty(r,o,n)}([v()],z.prototype,"loading",void 0);var R=function(t,r,o,a){var e,i=arguments.length,n=i<3?r:null===a?a=Object.getOwnPropertyDescriptor(r,o):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,r,o,a);else for(var s=t.length-1;s>=0;s--)(e=t[s])&&(n=(i<3?e(n):i>3?e(r,o,n):e(r,o))||n);return i>3&&n&&Object.defineProperty(r,o,n),n};const C=class{constructor(t){r(this,t),this.vegaClick=o(this,"vegaClick",7),this.click=o(this,"click",7),this.globalSlimmers={},this.pageResizeObserverSlimmer=new h,this.clickEventEmitter=l(C,u),this.eventPrevent=new f([u],(()=>this.host),{useCapture:!0,customPreventHandle:t=>{this.isDisabledButton()&&t.stopImmediatePropagation()}}),this.vegaComponentUsageRuntimeMetricsSlimmer=new c,this.vegaButtonLoadingRenderer=new z,this.currentBreakpoint=i(),this.size="default",this.variant="primary",this.iconAlign="left",this.label=null,this.disabled=!1,this.danger=!1,this.block=!1,this.type="button",this.loading=!1,this.handleClick=t=>{if(this.isDisabledButton())t.preventDefault();else{if(["submit","reset"].includes(this.type)){const t=x(this.host,"vega-form",{outerMost:!0});t&&d.notify(m.getSubject(t,"submit"===this.type?w:y),{host:this.host})}this.clickEventEmitter.emit(void 0,t)}}}componentWillLoad(){this.label||(this.label=this.host.textContent),this.host.innerHTML=j.sanitize("",k)}render(){return n(t(a,{class:{"vega-button-block":this.isBlockStyleButton(),"vega-button-icon-only":!!this.icon&&!this.label}},t("button",{type:this.type,"aria-label":this.label||"No label defined",class:{[`vega-button-size-${s.formatCustom(this.size)}`]:!0,[`vega-button-variant-${this.variant}`]:!0,"vega-button-disabled":this.isDisabledButton(),"vega-button-danger":this.danger},onClick:this.handleClick,disabled:this.isDisabledButton(),part:"button"},this.renderContent())),this.host)}renderContent(){return this.icon||this.loading?t("vega-flex",{alignItems:"center",gap:"size-8",justifyContent:"center"},"left"===this.iconAlign&&this.renderIcon(),this.renderLabel(),"right"===this.iconAlign&&this.renderIcon(),this.vegaButtonLoadingRenderer.render()):this.renderLabel()}renderLabel(){return this.label&&t("span",null,this.label)}renderIcon(){if(this.icon)return t("vega-icon",{icon:this.icon,class:"vega-flex-shrink-0 v-min-w-min",size:"large"===this.size?"size-24":"size-16"})}isDisabledButton(){return this.disabled||this.loading}isBlockStyleButton(){return s.formatCustom(this.block)}get host(){return e(this)}};R([p()],C.prototype,"globalSlimmers",void 0),R([b()],C.prototype,"pageResizeObserverSlimmer",void 0),R([b()],C.prototype,"clickEventEmitter",void 0),R([b()],C.prototype,"eventPrevent",void 0),R([b()],C.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),R([b()],C.prototype,"vegaButtonLoadingRenderer",void 0),C.style=':host{display:inline-block;border-radius:9999px}:host(.vega-button-block){display:block}:host>button{border-radius:9999px;cursor:pointer;font-family:"Inter", sans-serif;font-size:18px;font-weight:700;line-height:24px;letter-spacing:0px;box-sizing:border-box;outline:none}@media screen and (min-width: 768px) and (max-width: 1023px){:host>button{font-family:"Inter", sans-serif;font-size:16px;font-weight:700;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){:host>button{font-family:"Inter", sans-serif;font-size:16px;font-weight:700;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){:host>button{font-family:"Inter", sans-serif;font-size:16px;font-weight:700;line-height:24px;letter-spacing:0px}}:host .vega-button-size-small{padding-left:16px;padding-right:16px;padding-top:4px;padding-bottom:4px}:host .vega-button-size-default{padding-left:24px;padding-right:24px;padding-top:8px;padding-bottom:8px}:host .vega-button-size-large{padding-left:32px;padding-right:32px;padding-top:16px;padding-bottom:16px}:host .vega-button-variant-secondary.vega-button-size-small{padding-top:2px;padding-bottom:2px}:host .vega-button-variant-secondary.vega-button-size-default{padding-top:6px;padding-bottom:6px}:host .vega-button-variant-secondary.vega-button-size-large{padding-top:14px;padding-bottom:14px}:host(.vega-button-icon-only)>button vega-flex{min-height:24px}:host>button vega-flex span{overflow-wrap:break-word}:host(.vega-button-block) button{width:100%}:host button:focus{outline:none}:host .vega-button-variant-primary{background-color:rgba(var(--v-bg-action, 19, 98, 226, 1));border-width:0px;color:rgba(var(--v-text-on-action, 252, 252, 252, 1))}@media (hover: hover){:host .vega-button-variant-primary:hover{background-color:rgba(var(--v-bg-action-hover, 4, 112, 236, 1))}}:host .vega-button-variant-primary:active{background-color:rgba(var(--v-bg-action-active, 29, 65, 195, 1))}:host .vega-button-variant-primary:focus-visible{outline:2px solid rgba(var(--v-border-color-action, 19, 98, 226, 1));outline-offset:2px}:host .vega-button-variant-secondary{border:2px solid rgba(var(--v-border-secondary-btn, 19, 98, 226, 1));background-color:rgba(var(--v-bg-action-secondary, 252, 252, 252, 1));color:rgba(var(--v-text-link, 19, 98, 226, 1))}@media (hover: hover){:host .vega-button-variant-secondary:hover{border:2px solid rgba(var(--v-border-secondary-btn-hover, 4, 112, 236, 1));background-color:rgba(var(--v-bg-action-secondary-hover, 4, 112, 236, 0.1));color:rgba(var(--v-text-link-hover, 4, 112, 236, 1))}}:host .vega-button-variant-secondary:active{border:2px solid rgba(var(--v-border-secondary-btn-active, 29, 65, 195, 1));color:rgba(var(--v-text-link-active, 29, 65, 195, 1));background-color:rgba(var(--v-bg-action-secondary-active, 29, 65, 195, 0.1))}:host .vega-button-variant-secondary:focus-visible{outline:2px solid rgba(var(--v-border-color-action, 19, 98, 226, 1));outline-offset:2px}:host .vega-button-variant-primary.vega-button-danger{background-color:rgba(var(--v-bg-danger, 189, 41, 71, 1));color:rgba(var(--v-text-on-danger, 252, 252, 252, 1))}@media (hover: hover){:host .vega-button-variant-primary.vega-button-danger:hover{background-color:rgba(var(--v-bg-danger-hover, 233, 71, 104, 1))}}:host .vega-button-variant-primary.vega-button-danger:active{background-color:rgba(var(--v-bg-danger-active, 230, 50, 87, 1))}:host .vega-button-variant-primary.vega-button-danger:focus-visible{outline:2px solid rgba(var(--v-border-color-danger, 230, 50, 87, 1));outline-offset:2px}:host .vega-button-variant-secondary.vega-button-danger{border:2px solid rgba(var(--v-border-secondary-danger-btn, 230, 50, 87, 1));color:rgba(var(--v-text-danger-link, 230, 50, 87, 1))}@media (hover: hover){:host .vega-button-variant-secondary.vega-button-danger:hover{border:2px solid rgba(var(--v-border-secondary-danger-btn-hover, 255, 87, 114, 1));background-color:rgba(var(--v-bg-danger-tertiary-hover, 255, 87, 114, 0.2));color:rgba(var(--v-text-danger-link-hover, 233, 71, 104, 1))}}:host .vega-button-variant-secondary.vega-button-danger:active{border:2px solid rgba(var(--v-border-secondary-danger-btn-active, 189, 41, 71, 1));color:rgba(var(--v-text-danger-link-active, 189, 41, 71, 1));background-color:rgba(var(--v-bg-danger-tertiary-active, 189, 41, 71, 0.2))}:host .vega-button-variant-secondary.vega-button-danger:focus-visible{outline:2px solid rgba(var(--v-border-color-danger, 230, 50, 87, 1));outline-offset:2px;color:rgba(var(--v-text-danger-link-focus, 240, 52, 91, 1))}:host .vega-button-disabled{pointer-events:none;--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 rgba(0, 0, 0, 0))}:host .vega-button-variant-primary.vega-button-disabled,:host .vega-button-variant-primary.vega-button-disabled:focus{background-color:rgba(var(--v-bg-disabled, 176, 180, 181, 1));color:rgba(var(--v-text-on-disabled, 252, 252, 252, 1));--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 rgba(0, 0, 0, 0))}:host .vega-button-variant-secondary.vega-button-disabled,:host .vega-button-variant-secondary.vega-button-disabled:focus{background-color:rgba(var(--v-bg-action-secondary, 252, 252, 252, 1));color:rgba(var(--v-text-disabled, 176, 180, 181, 1));border:2px solid rgba(var(--v-border-secondary-btn-disabled, 176, 180, 181, 1));--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 rgba(0, 0, 0, 0))}:host .vega-button-variant-primary vega-loading-indicator::part(circle-loader-progress){stroke:rgba(var(--v-text-white, 252, 252, 252, 1))}:host .vega-button-variant-primary vega-loading-indicator::part(circle-loader-track){stroke:rgba(var(--v-text-white, 252, 252, 252, 1));opacity:0.2}:host(.button-group-item-button-secondary) .vega-button-variant-secondary.vega-button-disabled{border:2px solid rgba(var(--v-border-secondary-btn, 19, 98, 226, 1))}:host(.button-group-item-button-secondary.button-group-all-disabled) .vega-button-variant-secondary.vega-button-disabled{border:2px solid rgba(var(--v-border-secondary-btn-disabled, 176, 180, 181, 1))}';export{C as vega_button}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{w as t,x as e,n as a,y as r,l as s,z as o,E as n,G as i,H as u,I as l,J as d,K as m,L as c,N as f,O as p,P as $,o as b,Q as v,B as g,R as h}from"./p-
|
|
1
|
+
import{w as t,x as e,n as a,y as r,l as s,z as o,E as n,G as i,H as u,I as l,J as d,K as m,L as c,N as f,O as p,P as $,o as b,Q as v,B as g,R as h}from"./p-8db904dc.js";import{L as x}from"./p-6e1ab235.js";import{G as T,F as w,a as y,b as j,c as k,d as O,T as I}from"./p-d4ea8e22.js";import{g as N,c as R}from"./p-49a2e141.js";import{i as C}from"./p-262ec334.js";import{p as E}from"./p-0c667d6a.js";import{B as A}from"./p-ed45b3b6.js";import{s as F}from"./p-d27ae9ff.js";import{F as S}from"./p-87a4d75f.js";class D{format(e){return t(e)?Object.keys(e).map((t=>this.formatToken(e[t],"default"!==t?t:void 0))).join(" "):this.formatToken(e)}}const G={top:"pt",bottom:"pb",left:"pl",right:"pr",x:"px",y:"py"},_=new class extends D{formatToken(t,o){const n=e(o)?`${o}:`:"";return a(t)?`${n}v-p-${t}`:r(t)?Object.keys(t).map((e=>`${n}v-${G[e]}-${t[e]}`)).join(" "):(x.warn(`The padding value ${t} is invalid, it must be a value of: `,s),"")}},B={top:"mt",bottom:"mb",left:"ml",right:"mr",x:"mx",y:"my"},H=new class extends D{formatToken(t,a){const r=e(a)?`${a}:`:"";return o(t)?`${r}v-m-${t}`:n(t)?Object.keys(t).map((e=>`${r}v-${B[e]}-${t[e]}`)).join(" "):(x.warn(`The margin value ${t} is invalid, it must be a value of: `,s),"")}},J={x:"gap-col",y:"gap-row"},L=new class extends D{formatToken(t,o){const n=e(o)?`${o}:`:"";return a(t)?`${n}v-gap-${t}`:r(t)?Object.keys(t).map((e=>`${n}v-${J[e]}-${t[e]}`)).join(" "):(x.warn(`The gap value ${t} is invalid, it must be a value of: `,s),"")}},z=[1,2,3,4,5,6,7,8,9,10,11,12,"1-auto","2-auto","3-auto","4-auto","5-auto","6-auto","7-auto","8-auto","9-auto","10-auto","11-auto","12-auto"],K=[1,2,3,4,5,6,7,8,9,10,11,12,"1-auto","2-auto","3-auto","4-auto","5-auto","6-auto","7-auto","8-auto","9-auto","10-auto","11-auto","12-auto"],P=new class extends D{formatToken(t,a){const r=e(a)?`${a}:`:"";return i(t)?`${r}v-grid-cols-${t}`:(x.warn(`The column value ${t} is invalid, it must be a value of: `,K),"")}},V=new class extends D{formatToken(t,a){const r=e(a)?`${a}:`:"";return u(t)?`${r}v-grid-rows-${t}`:(x.warn(`The row value ${t} is invalid, it must be a value of: `,z),"")}},W=new class extends D{formatToken(t,a){const r=e(a)?`${a}:`:"";return l(t)?`${r}v-justify-items-${t}`:(x.warn(`The grid justifyItems value ${t} is invalid, it must be a value of: `,T),"")}},M=new class{format(e){const a=N();return"number"!=typeof e&&"string"!=typeof e||isNaN(e)?"string"==typeof e&&C(e)?e:t(e)?(e=R(e))[a]:null:Number(e)}},Q=new class{format(e){if(d(e))return e;if(t(e)){const t=N();return(e=R(e))[t]}return null}},U=new class extends D{formatToken(t,a){const r=e(a)?`${a}:`:"";return"string"==typeof t&&"false"===t||!1===t?`${r}v-hidden`:"string"==typeof t&&"true"===t||!0===t?`${r}v-block`:(x.warn(`The display value ${t} is invalid, it must be a boolean`),"")}},q=new class extends D{formatToken(t,a){const r=e(a)?`${a}:`:"";return m(t)?`${r}v-flex-${t}`:(x.warn(`The direction value ${t} is invalid, it must be a value of: `,w),"")}},X=new class extends D{formatToken(t,a){const r=e(a)?`${a}:`:"";return c(t)?`${r}v-items-${t}`:(x.warn(`The flex alignItem value ${t} is invalid, it must be a value of: `,y),"")}},Y=new class extends D{formatToken(t,a){const r=e(a)?`${a}:`:"";return f(t)?`${r}v-justify-${this.mapInput(t)}`:(x.warn(`The flex justifyContent value ${t} is invalid, it must be a value of: `,j),"")}mapInput(t){switch(t){case"start":return"start";case"center":return"center";case"end":return"end";case"space-around":return"around";case"space-between":return"between";case"space-evenly":return"evenly"}}},Z=new class extends D{formatToken(t,a){const r=e(a)?`${a}:`:"";return p(t)?`${r}v-flex-${t}`:(x.warn(`The flex flexWrap value ${t} is invalid, it must be a value of: `,k),"")}},tt=new class{format(e){const a=N();return t(e)?(e=R(e))[a]:e}},et=new class extends D{formatToken(t,a){const r=e(a)?`${a}:`:"";return $(t)?"none"==t?`${r}v-hidden`:`${r}v-${t}`:(x.warn(`The box display value ${t} is invalid, it must be a value of: `,O),"")}},at=new class{format(e){const a=N();return t(e)?(e=R(e),E(e[a])):E(e)}},rt={top:"t",right:"r",bottom:"b",left:"l","top-left":"tl","top-right":"tr","bottom-left":"bl","bottom-right":"br"},st=new class extends D{formatToken(t,a){const r=e(a)?`${a}:`:"";return b(t)?`${r}v-${this.transformRoundedNoneAndFill(t)}`:v(t)?Object.keys(t).map((e=>`${r}v-rounded-${rt[e]}-${this.transformRoundedNoneAndFill(t[e]).replace("rounded-","")}`)).join(" "):(x.warn(`The border radius value ${t} is invalid, it must be a value of: `,g),"")}transformRoundedNoneAndFill(t){return t.replace("rounded-none","rounded-0").replace("rounded-full","rounded-9999")}},ot=new class extends D{formatToken(t,a){const r=e(a)?`${a}:`:"";return h(t)?`${r}v-text-${t}`:(x.warn(`The text align value ${t} is invalid, it must be a value of: `,I),"")}};class nt{format(e){return t(e)?Object.keys(e).map((t=>this.generateCssText(this.formatToken(e[t],"default"!==t?t:void 0),t))).join(" "):this.generateCssText(this.formatToken(e))}generateCssText(t,e){let a="";return t&&(a=e&&"default"!==e?`@media (min-width:${A[e]}px){:host{${t}}}`:`:host{${t}}`),a}}const it={top:["padding-top"],bottom:["padding-bottom"],left:["padding-left"],right:["padding-right"],x:["padding-left","padding-right"],y:["padding-top","padding-bottom"]},ut=new class extends nt{formatToken(t){return a(t)?`padding:${s[t]}px`:r(t)?Object.keys(t).map((e=>it[e].map((a=>`${a}:${s[t[e]]}px`)).join(";"))).join(";"):(x.warn(`The padding value ${t} is invalid, it must be a value of: `,s),"")}},lt={top:["margin-top"],bottom:["margin-bottom"],left:["margin-left"],right:["margin-right"],x:["margin-left","margin-right"],y:["margin-top","margin-bottom"]},dt=new class extends nt{formatToken(t){return a(t)?`margin:${s[t]}px`:r(t)?Object.keys(t).map((e=>lt[e].map((a=>`${a}:${s[t[e]]}px`)).join(";"))).join(";"):(x.warn(`The margin value ${t} is invalid, it must be a value of: `,s),"")}},mt={top:["border-top-left-radius","border-top-right-radius"],right:["border-top-right-radius","border-bottom-right-radius"],bottom:["border-bottom-left-radius","border-bottom-right-radius"],left:["border-top-left-radius","border-bottom-left-radius"],"top-left":["border-top-left-radius"],"top-right":["border-top-right-radius"],"bottom-left":["border-bottom-left-radius"],"bottom-right":["border-bottom-right-radius"]},ct=new class extends nt{formatToken(t){return b(t)?`border-radius:${g[t]}px`:v(t)?this.getDirectionKeys(t).map((e=>mt[e].map((a=>`${a}:${g[t[e]]}px`)).join(";"))).join(";"):(x.warn(`The border radius value ${t} is invalid, it must be a value of: `,g),"")}getDirectionKeys(t){const e=Object.keys(t);return S.isEnabled("VEGA_COMPONENT.CORNERS_USE_OLD_BEHAVIOR")?F(e,(e=>t[e]),void 0,Object.keys(g)):e}},ft=new class{format(t,e){switch(e){case"padding":return _.format(t);case"margin":return H.format(t);case"gap":return L.format(t);case"gridColumn":return P.format(t);case"gridRow":return V.format(t);case"gridJustifyItems":return W.format(t);case"size":return M.format(t);case"translocation":return Q.format(t);case"display":return U.format(t);case"flexDirection":return q.format(t);case"flexAlignItem":return X.format(t);case"flexJustifyContent":return Y.format(t);case"flexWrap":return Z.format(t);case"boxDisplay":return et.format(t);case"widthAndHeight":return at.format(t);case"corners":return st.format(t);case"textAlign":return ot.format(t);case"paddingStyle":return ut.format(t);case"marginStyle":return dt.format(t);case"cornersStyle":return ct.format(t);default:throw new Error(`Invalid flag ${e} passed into ResponsiveFormatFacade`)}}formatCustom(t){return tt.format(t)}};export{K as G,ft as R,z as a}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{h as e,F as t,H as i,r as o,c as a,g as r}from"./p-6b2342e0.js";import{R as n}from"./p-8bc15ed0.js";import{g as s,s as d}from"./p-519a7d55.js";import{a1 as p,a2 as l}from"./p-8db904dc.js";import{c,M as h,V as f,I as m}from"./p-6e1ab235.js";import{V as b,I as v}from"./p-8ce9e214.js";import{F as g}from"./p-320091b7.js";import{C as x}from"./p-2c737fc8.js";import{c as u}from"./p-66647244.js";import{s as w,A as y,V as j,u as R,i as C,d as I,t as k}from"./p-5447a8e8.js";import{F as A}from"./p-cb378636.js";import{C as D}from"./p-2d0d575f.js";import{c as E}from"./p-3a620268.js";import{D as S}from"./p-526e3634.js";import{m as O}from"./p-3a68b729.js";import{h as z,l as V}from"./p-f0e828d8.js";import{f as L}from"./p-8720816e.js";import{K as H}from"./p-f1974321.js";import{f as P}from"./p-528748fa.js";import{M as T}from"./p-78a57a17.js";import{T as F}from"./p-52b8f2d2.js";import{P as M}from"./p-81dd00d0.js";import"./p-abd7aeaa.js";import"./p-87a4d75f.js";import"./p-982747ef.js";import"./p-ed45b3b6.js";import"./p-d4ea8e22.js";import"./p-b438e68b.js";import"./p-0d18368b.js";import"./p-02841589.js";import"./p-331a62d5.js";import"./p-8b5d3a52.js";import"./p-6a334573.js";import"./p-d27ae9ff.js";import"./p-262ec334.js";import"./p-29e3eb12.js";import"./p-8c30a60d.js";import"./p-5f377954.js";import"./p-b75ee3ba.js";import"./p-3dee1e55.js";import"./p-49a2e141.js";import"./p-0c667d6a.js";import"./p-4ff48b84.js";import"./p-75e33859.js";const _=[{payloadKey:"AUTO_VALIDATION_IS_TRUE",payloadDescription:"Determines whether automatic validation should be implemented when a value is edited in the combo box",payloadValue:e=>!0===e.autoValidation},{payloadKey:"AUTO_VALIDATION_IS_FALSE",payloadDescription:"Determines whether automatic validation should be implemented when a value is edited in the combo box",payloadValue:e=>!1===e.autoValidation}];var K=function(e,t,i,o){var a,r=arguments.length,n=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,o);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(n=(r<3?a(n):r>3?a(t,i,n):a(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};class N extends f{constructor(){super(...arguments),this.onItemClick=async()=>{this.valueController.setValue(await this.dropdownRef.getSelection()),await this.clearInput()},this.onDropdownHide=async()=>{await this.clearInput()},this.onDropdownCreate=async e=>{this.createEventEmit.emit(e),await this.clearInput()},this.onInputChange=async e=>{const t=e.target.value;(this.useDefaultFilter||this.vegaDropdownProps.dynamicOption)&&(await this.dropdownRef.show(),await this.dropdownRef.search(t)),!this.isTemplateMode&&this.useDefaultFilter||this.searchEventEmit.emit(t)}}connectedCallback(){this.isTemplateMode=null!==this.host.querySelector("[slot=items]")}getDropdownRef(){return this.dropdownRef}getSearchInputRef(){return this.searchInputRef}focusInput(){this.searchInputRef.focus()}async hide(){await this.dropdownRef.hide()}async show(){await this.dropdownRef.show()}replaceItemsSlot(e){e&&this.itemsSlotRef&&(this.itemsSlotRef.remove(),this.dropdownRef.append(e))}renderDropdown(){return e("vega-dropdown",Object.assign({trigger:this.disabled?"none":"click",source:this.source,selectType:"multiple",selectedSourceKey:this.value,matchTargetWidth:!0,useDefaultFilter:this.useDefaultFilter},this.vegaDropdownProps,{ref:e=>{this.dropdownRef=e,S.addUniqueObserverToNode(e,w,(async e=>{await this.onDropdownCreate(e.detail)})),S.addUniqueObserverToNode(e,y,(async()=>{await this.onDropdownHide()})),S.addUniqueObserverToNode(e,j,(async()=>{await this.onItemClick()})),S.addUniqueObserverToNode(e,R,(async e=>{await this.onItemClick(),this.selectAllClickEventEmit.emit(e.detail)})),S.addUniqueObserverToNode(e,O,(e=>{const t=Array.from(e).filter((e=>!this.source.find((t=>t.key===e.itemKey)))).map((e=>({key:e.itemKey,label:e.label})));this.sourceController.setSource([...this.source,...t])}))}}),this.renderContainer(),this.renderItemsSlot())}renderContainer(){const i=L(this.containerMaxHeight,"widthAndHeight");return e("div",{class:{"vega-combo-box-container":!0,[`vega-combo-box-size-${this.size}`]:!0}},i?e("div",{class:"vega-combo-box-container-content",style:i?{maxHeight:i}:void 0},this.renderSelectedContainer(),this.renderInputContainer()):e(t,null,this.renderSelectedContainer(),this.renderInputContainer()))}renderItemsSlot(){return this.isTemplateMode&&e("div",{slot:"items",ref:e=>{this.itemsSlotRef=e}})}renderSelectedContainer(){const i=this.value.map((e=>this.source.find((t=>t.key===e)))).filter((e=>e));return e(t,null,i.map((e=>this.renderSelectedChip(e))))}renderSelectedChip(t){return e("vega-chip",{key:t.key,text:z.sanitize(t.label,V),variant:"outlined",showCloseIcon:!this.disabled,size:"small",ref:e=>{S.addUniqueObserverToNode(e,C,(async()=>{await this.onChipClose(t.key)}))}})}renderInputContainer(){return e("div",{class:"vega-combo-box-input-container"},e("input",{onInput:this.onInputChange,"aria-label":this.label||"No label defined",placeholder:0===this.value.length?this.placeholder:"",ref:e=>this.searchInputRef=e,onKeyDown:E(),disabled:this.disabled}))}async onChipClose(e){this.valueController.setValue([...this.value.filter((t=>t!==e))]),await this.dropdownRef.hide()}async clearInput(){this.searchInputRef.value="",await this.dropdownRef.search("")}}K([c()],N.prototype,"host",void 0),K([c()],N.prototype,"value",void 0),K([c()],N.prototype,"source",void 0),K([c()],N.prototype,"disabled",void 0),K([c()],N.prototype,"size",void 0),K([c()],N.prototype,"containerMaxHeight",void 0),K([c()],N.prototype,"vegaDropdownProps",void 0),K([c()],N.prototype,"label",void 0),K([c()],N.prototype,"placeholder",void 0),K([c()],N.prototype,"useDefaultFilter",void 0),K([c()],N.prototype,"createEventEmit",void 0),K([c()],N.prototype,"searchEventEmit",void 0),K([c()],N.prototype,"selectAllClickEventEmit",void 0),K([c()],N.prototype,"valueController",void 0),K([c()],N.prototype,"sourceController",void 0),K([h("connectedCallback")],N.prototype,"connectedCallback",null);class G extends f{setValue(e){this.value=e}}!function(e,t,i,o){var a,r=arguments.length,n=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,o);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(n=(r<3?a(n):r>3?a(t,i,n):a(t,i))||n);r>3&&n&&Object.defineProperty(t,i,n)}([c({writable:!0})],G.prototype,"value",void 0);var U=function(e,t,i,o){var a,r=arguments.length,n=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,o);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(n=(r<3?a(n):r>3?a(t,i,n):a(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};class q extends f{constructor(){super(...arguments),this.onLabelClick=()=>{this.dropdownRenderer.focusInput()}}render(){return e(i,{class:{"vega-combo-box-disabled":this.disabled}},this.renderLabel(),this.dropdownRenderer.renderDropdown(),this.renderHint())}renderLabel(){return e("vega-field-label",{onClick:this.onLabelClick,"is-field-required":this.required,disabled:this.disabled,optional:this.optional,label:this.label})}renderHint(){return e("div",{class:"vega-combo-box-hint"},this.hint)}}U([c()],q.prototype,"required",void 0),U([c()],q.prototype,"optional",void 0),U([c()],q.prototype,"hint",void 0),U([c()],q.prototype,"disabled",void 0),U([c()],q.prototype,"dropdownRenderer",void 0),U([c()],q.prototype,"label",void 0);var B=function(e,t,i,o){var a,r=arguments.length,n=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,o);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(n=(r<3?a(n):r>3?a(t,i,n):a(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};class W extends H{constructor(){super((e=>[{keyCode:"Backspace",activeElementInScope:[e.dropdownRenderer.getSearchInputRef()],eventName:"keydown",callback:e.deleteLastSelectedItem},{keyCode:"ArrowLeft",activeElementInScope:[e.host],callback:()=>e.controlDirectionByKeyboard("ArrowLeft")},{keyCode:"ArrowRight",activeElementInScope:[e.host],callback:()=>e.controlDirectionByKeyboard("ArrowRight")}])),this.deleteLastSelectedItem=()=>{""===this.dropdownRenderer.getSearchInputRef().value&&(this.value.pop(),this.valueController.setValue([...this.value]))}}controlDirectionByKeyboard(e){const t=s();if(t&&t.classList.contains("vega-chip-close-icon")){const i=P(t,"vega-chip");"ArrowLeft"===e&&this.focusItemByKeyboard(i.previousSibling),"ArrowRight"===e&&this.focusItemByKeyboard(i.nextSibling)}else"ArrowLeft"===e&&0===this.dropdownRenderer.getSearchInputRef().selectionStart&&this.focusItemByKeyboard(this.host.shadowRoot.querySelector("vega-chip:last-of-type"))}focusItemByKeyboard(e){e&&(e.classList.contains("vega-combo-box-input-container")?e.querySelector("input").focus():e.shadowRoot.querySelector(".vega-chip-close-icon").focus())}}B([c()],W.prototype,"host",void 0),B([c()],W.prototype,"value",void 0),B([c()],W.prototype,"dropdownRenderer",void 0),B([c()],W.prototype,"valueController",void 0);var $=function(e,t,i,o){var a,r=arguments.length,n=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,o);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(n=(r<3?a(n):r>3?a(t,i,n):a(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};class J extends f{constructor(){super(...arguments),this.mutationObserver=new T({mutationFilter:F("VEGA-DROPDOWN-ITEM"),options:{childList:!0,subtree:!0},callback:()=>this.appendHostItemsToDropdown()})}componentDidLoad(){this.appendHostItemsToDropdown()}appendHostItemsToDropdown(){this.dropdownRenderer.replaceItemsSlot(this.host.querySelector("[slot=items]"))}}$([m()],J.prototype,"mutationObserver",void 0),$([c()],J.prototype,"host",void 0),$([c()],J.prototype,"dropdownRenderer",void 0),$([h("componentDidLoad")],J.prototype,"componentDidLoad",null);class Q extends f{setSource(e){this.source=e}}!function(e,t,i,o){var a,r=arguments.length,n=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,o);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(n=(r<3?a(n):r>3?a(t,i,n):a(t,i))||n);r>3&&n&&Object.defineProperty(t,i,n)}([c({writable:!0})],Q.prototype,"source",void 0);var X=function(e,t,i,o){var a,r=arguments.length,n=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,o);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(n=(r<3?a(n):r>3?a(t,i,n):a(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};const Y=class{constructor(e){o(this,e),this.vegaChange=a(this,"vegaChange",7),this.change=a(this,"change",7),this.vegaCreate=a(this,"vegaCreate",7),this.create=a(this,"create",7),this.vegaSearch=a(this,"vegaSearch",7),this.search=a(this,"search",7),this.vegaDropdownSelectAllClick=a(this,"vegaDropdownSelectAllClick",7),this.dropdownSelectAllClick=a(this,"dropdownSelectAllClick",7),this.globalSlimmers={},this.itemsSlotController=new J,this.keyboardController=new W,this.valueController=new G,this.sourceController=new Q,this.renderer=new q,this.dropdownRenderer=new N,this.pageResizeSlimmer=new M,this.formFieldController=new g({propertyRules:[{propertyName:"required",ruleFactory:e=>e?new n:null}],validationRulesName:"validationRules",defaultValue:[],attributeGetter:e=>this[e],inputContainerGetter:()=>this.dropdownRenderer.getDropdownRef(),touchableAreaGetter:()=>[this.dropdownRenderer.getSearchInputRef()]}),this.changeEventEmit=u(Y,I),this.createEventEmit=u(Y,w),this.searchEventEmit=u(Y,k),this.selectAllClickEventEmit=u(Y,R),this.dropdownEventPrevent=new x([w,k],(()=>this.dropdownRenderer.getDropdownRef()),{customPreventHandle:e=>{e.stopImmediatePropagation()}}),this.dropdownEventPreventSelectAllClick=new x([R],(()=>this.dropdownRenderer.getDropdownRef()),{customPreventHandle:e=>{e.stopPropagation()}}),this.vegaComponentUsageRuntimeMetricsSlimmer=new b(_),this.label="",this.required=!1,this.optional=!1,this.source=[],this.value=[],this.isValid=null,this.autoValidation=!0,this.validationRules=[],this.disabled=!1,this.placeholder="",this.hint="",this.size="medium",this.vegaDropdownProps={},this.useDefaultFilter=!0}watchSource(){this.source=p(this.source,l)?this.source:[]}watchValue(){this.changeEventEmit.emit(this.value),D.notify(A,{host:this.host,detail:this.value})}watchValidationRules(){}watchContainerMaxHeight(){}watchVegaDropdownProps(){}async close(){this.disabled||await this.dropdownRenderer.hide()}async open(){this.disabled||await this.dropdownRenderer.show()}render(){return d(this.renderer.render(),this.host)}get host(){return r(this)}static get watchers(){return{source:["watchSource"],value:["watchValue"],validationRules:["watchValidationRules"],containerMaxHeight:["watchContainerMaxHeight"],vegaDropdownProps:["watchVegaDropdownProps"]}}};X([v()],Y.prototype,"globalSlimmers",void 0),X([m()],Y.prototype,"itemsSlotController",void 0),X([m()],Y.prototype,"keyboardController",void 0),X([m()],Y.prototype,"valueController",void 0),X([m()],Y.prototype,"sourceController",void 0),X([m()],Y.prototype,"renderer",void 0),X([m()],Y.prototype,"dropdownRenderer",void 0),X([m()],Y.prototype,"pageResizeSlimmer",void 0),X([m()],Y.prototype,"formFieldController",void 0),X([m()],Y.prototype,"changeEventEmit",void 0),X([m()],Y.prototype,"createEventEmit",void 0),X([m()],Y.prototype,"searchEventEmit",void 0),X([m()],Y.prototype,"selectAllClickEventEmit",void 0),X([m()],Y.prototype,"dropdownEventPrevent",void 0),X([m()],Y.prototype,"dropdownEventPreventSelectAllClick",void 0),X([m()],Y.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),Y.style=':host{display:inline-block;width:100%;min-width:0px;text-align:left;line-height:normal}.vega-combo-box-container{border:1px solid rgba(var(--v-border-input-field, 171, 198, 216, 1));background-color:rgba(var(--v-bg-primary, 252, 252, 252, 1));padding-left:16px;padding-right:16px;padding-top:12px;padding-bottom:12px;border-radius:8px;gap:8px;display:block;display:flex;flex-wrap:wrap;align-items:center;cursor:pointer}.vega-combo-box-container:hover{border:1px solid rgba(var(--v-border-input-field-hover, 115, 160, 190, 1))}.vega-combo-box-container-content{display:flex;flex-wrap:wrap;align-items:center;gap:8px;width:100%;max-height:100%;overflow-y:auto;overflow-x:hidden;min-height:26px}.vega-combo-box-container:focus-within{border:1px solid rgba(var(--v-border-input-field-focus, 19, 98, 226, 1));outline:2px solid rgba(var(--v-border-color-action, 19, 98, 226, 1));outline-offset:2px}.vega-combo-box-container .vega-combo-box-input-container{width:-webkit-min-content;width:-moz-min-content;width:min-content;flex-grow:1}.vega-combo-box-container input{border-style:none;background-color:rgba(var(--v-bg-transparent, 0, 0, 0, 0));font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px;color:rgba(var(--v-text-primary, 32, 54, 69, 1));width:100%}@media screen and (min-width: 768px) and (max-width: 1023px){.vega-combo-box-container input{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.vega-combo-box-container input{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.vega-combo-box-container input{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}.vega-combo-box-container input:focus{outline:2px solid transparent;outline-offset:2px}.vega-combo-box-size-medium{padding-left:12px;padding-right:12px;padding-top:11px;padding-bottom:11px}.vega-combo-box-size-small{padding-left:12px;padding-right:12px;padding-top:7px;padding-bottom:7px}.vega-combo-box-container:focus{outline:none}vega-field-label{margin-bottom:8px}.error .vega-combo-box-container{border:1px solid rgba(var(--v-border-input-field-danger, 230, 50, 87, 1))}.error .vega-combo-box-container:hover{border:1px solid rgba(var(--v-border-input-field-danger-hover, 255, 87, 114, 1))}.error .vega-combo-box-container:focus-within{border:1px solid rgba(var(--v-border-input-field-danger-focus, 233, 71, 104, 1));outline:2px solid rgba(var(--v-border-color-danger, 230, 50, 87, 1));outline-offset:2px}:host(.vega-combo-box-disabled) .vega-combo-box-container{border:1px solid rgba(var(--v-border-input-field-disabled, 222, 225, 227, 1));background-color:rgba(var(--v-bg-secondary, 245, 247, 247, 1));--tw-shadow:0 0 #0000;box-shadow:rgba(0, 0, 0, 0) 0px 0px 0px 0px, rgba(0, 0, 0, 0) 0px 0px 0px 0px, rgba(0, 0, 0, 0) 0px 0px 0px 0px}:host(.vega-combo-box-disabled) .vega-combo-box-container:hover{border:1px solid rgba(var(--v-border-input-field-disabled, 222, 225, 227, 1))}:host(.vega-combo-box-disabled) vega-icon{color:rgba(var(--v-text-disabled, 176, 180, 181, 1))}.vega-combo-box-container input::placeholder{color:rgba(var(--v-text-input-placeholder, 176, 180, 181, 1))}.vega-error{display:inline-block;padding-left:8px;padding-right:8px;padding-top:8px;font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px;color:rgba(var(--v-text-error, 189, 41, 71, 1))}@media screen and (min-width: 768px) and (max-width: 1023px){.vega-error{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.vega-error{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.vega-error{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}.vega-hidden{display:none}.vega-combo-box-hint{padding-left:8px;padding-right:8px;font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px;color:rgba(var(--v-text-secondary, 107, 116, 125, 1));padding-top:8px}@media screen and (min-width: 768px) and (max-width: 1023px){.vega-combo-box-hint{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.vega-combo-box-hint{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.vega-combo-box-hint{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}.vega-error:not(.vega-hidden)+.vega-combo-box-hint{padding-top:4px}vega-dropdown{display:block}';export{Y as vega_combo_box}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{h as e,r as t,c as a,H as i,g as s}from"./p-6b2342e0.js";import{c as n,V as l,I as r}from"./p-6e1ab235.js";import{V as o,I as p}from"./p-8ce9e214.js";import{s as c}from"./p-519a7d55.js";import{c as d}from"./p-
|
|
1
|
+
import{h as e,r as t,c as a,H as i,g as s}from"./p-6b2342e0.js";import{c as n,V as l,I as r}from"./p-6e1ab235.js";import{V as o,I as p}from"./p-8ce9e214.js";import{s as c}from"./p-519a7d55.js";import{c as d}from"./p-66647244.js";import{d as f,a as h}from"./p-5447a8e8.js";import{V as m}from"./p-6031bed1.js";import{c as v}from"./p-1ec763ab.js";import{c as g}from"./p-613ddaab.js";import{x as b}from"./p-b6225d01.js";import{D as _}from"./p-526e3634.js";import{V as u}from"./p-0d18368b.js";import"./p-6a334573.js";import"./p-2d0d575f.js";import"./p-8c30a60d.js";import"./p-b75ee3ba.js";import"./p-ffdc25ec.js";import"./p-afcd8f04.js";import"./p-8b5d3a52.js";import"./p-331a62d5.js";import"./p-528748fa.js";import"./p-cb378636.js";var x=function(e,t,a,i){var s,n=arguments.length,l=n<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,a):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,a,i);else for(var r=e.length-1;r>=0;r--)(s=e[r])&&(l=(n<3?s(l):n>3?s(t,a,l):s(t,a))||l);return n>3&&l&&Object.defineProperty(t,a,l),l};class j extends l{render(){const t=this.total>0;return e("div",{class:"find-replace-panel",role:"presentation"},this.renderHeader(),e("vega-divider",{direction:"horizontal"}),e("div",{class:"find-replace-panel__field"},e("vega-field-label",{label:u.t("Find in text")}),e("div",{class:"find-replace-panel__body"},e("vega-input",{size:"small",label:"",class:"find-replace-panel__input",ref:e=>{e&&_.addUniqueObserverToNode(e,f,(e=>{this.onKeywordChange(e.detail)}))}}),e("vega-flex",{alignItems:"center",gap:"size-4",class:"find-replace-panel__nav"},e("vega-font",{variant:"font-field-label-sm",color:"text-secondary",class:"find-replace-panel__counter"},t?`${this.currentIndex}/${this.total}`:"-/-"),this.renderNavButton("prev","rte-find-replace-prev",u.t("Previous match")),this.renderNavButton("next","rte-find-replace-next",u.t("Next match"))))),e("div",{class:"find-replace-panel__field"},e("vega-field-label",{label:u.t("Replace with")}),e("div",{class:"find-replace-panel__body"},e("vega-input",{disabled:!t,size:"small",label:"",class:"find-replace-panel__input",ref:e=>{e&&_.addUniqueObserverToNode(e,f,(e=>{this.onReplacementChange(e.detail)}))}}))),e("vega-accordion",{class:"find-replace-panel__field",expand:!1,drawsBackground:!1},e("div",{class:"find-replace-panel__accordion-title",slot:"title"},u.t("Advanced options")),e("vega-flex",{slot:"content",gap:"size-16",class:"advanced-options-content"},this.renderSearchOptionToggle("match-case",u.t("Match case"),this.matchCase),this.renderSearchOptionToggle("whole-words",u.t("Whole words"),this.wholeWords))),e("div",{class:"find-replace-panel__footer"},this.renderActionButtons()))}renderHeader(){return e("div",{class:"find-replace-panel__header"},e("vega-font",null,u.t("Find and replace")),this.renderNavButton("close","rte-find-replace-close",u.t("Close"),"extra-small"))}renderNavButton(t,a,i,s){return e("vega-button-circle",{ref:e=>{e&&_.addUniqueObserverToNode(e,h,(()=>{this.emitAction(t)}))},variant:"icon-only",size:s||"small",icon:m.getIconKey(a),label:i})}renderSearchOptionToggle(t,a,i){return e("vega-toggle-switch",{size:"small",label:a,checked:i,ref:e=>{e&&_.addUniqueObserverToNode(e,f,(()=>{this.onToggleSearchOption(t)}))}})}renderFindButton(){return e("vega-button",{size:"small",variant:"secondary",ref:e=>{e&&_.addUniqueObserverToNode(e,h,(()=>{this.emitAction("find")}))}},u.t("Find"))}renderActionButtons(){const t=0===this.total;return e("vega-flex",{alignItems:"center",gap:"size-16"},e("vega-button-link",{size:"small",disabled:t,ref:e=>{e&&_.addUniqueObserverToNode(e,h,(()=>{this.emitAction("replace-all")}))}},u.t("Replace All")),e("vega-button-link",{size:"small",disabled:t,ref:e=>{e&&_.addUniqueObserverToNode(e,h,(()=>{this.emitAction("replace")}))}},u.t("Replace")),this.renderFindButton())}onKeywordChange(e){this.changeEventEmitter.emit({type:"keyword",value:e})}onReplacementChange(e){this.changeEventEmitter.emit({type:"replace",value:e})}onToggleSearchOption(e){"match-case"===e?(this.matchCase=!this.matchCase,this.emitAction(e,this.matchCase)):"whole-words"===e&&(this.wholeWords=!this.wholeWords,this.emitAction(e,this.wholeWords))}emitAction(e,t){this.clickEventEmitter.emit(void 0!==t?{action:e,data:t}:{action:e})}}m.register({"rte-find-replace-prev":v,"rte-find-replace-next":g,"rte-find-replace-close":b}),x([n()],j.prototype,"changeEventEmitter",void 0),x([n()],j.prototype,"clickEventEmitter",void 0),x([n()],j.prototype,"currentIndex",void 0),x([n()],j.prototype,"total",void 0),x([n({writable:!0})],j.prototype,"matchCase",void 0),x([n({writable:!0})],j.prototype,"wholeWords",void 0);var w=function(e,t,a,i){var s,n=arguments.length,l=n<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,a):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,a,i);else for(var r=e.length-1;r>=0;r--)(s=e[r])&&(l=(n<3?s(l):n>3?s(t,a,l):s(t,a))||l);return n>3&&l&&Object.defineProperty(t,a,l),l};const y=class{constructor(e){t(this,e),this.vegaChange=a(this,"vegaChange",7),this.vegaClick=a(this,"vegaClick",7),this.globalSlimmers={},this.vegaComponentUsageRuntimeMetricsSlimmer=new o,this.changeEventEmitter=d(y,f),this.clickEventEmitter=d(y,h),this.renderer=new j,this.currentIndex=0,this.total=0,this.matchCase=!1,this.wholeWords=!1}async updateResult(e,t){this.currentIndex=e,this.total=t}render(){return c(e(i,null,this.renderer.render()),this.host)}get host(){return s(this)}};w([p()],y.prototype,"globalSlimmers",void 0),w([r()],y.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),w([r()],y.prototype,"changeEventEmitter",void 0),w([r()],y.prototype,"clickEventEmitter",void 0),w([r()],y.prototype,"renderer",void 0),y.style=":host .find-replace-panel{box-sizing:border-box;width:360px}:host .find-replace-panel__header{display:flex;align-items:center;justify-content:space-between;padding-bottom:12px}:host .find-replace-panel__field{padding-top:12px}:host .find-replace-panel__body{display:flex;align-items:center;gap:8px;margin-top:8px}:host .find-replace-panel__input{flex:1}:host .find-replace-panel__nav{flex-shrink:0}:host .find-replace-panel__counter{white-space:nowrap;min-width:36px;text-align:center}:host .find-replace-panel__footer{display:flex;justify-content:flex-end;padding-top:20px}:host .advanced-options-content{margin-top:-12px}:host .find-replace-panel__accordion-title{font-size:16px;font-weight:500;color:rgba(var(--v-text-primary, 32, 54, 69, 1));line-height:22px;padding:0}";export{y as vega_rich_text_find_replace_panel}
|