@globalpayments/vega 2.93.0 → 2.94.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-d05c3410.js} +11 -10
- 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/{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 +19 -17
- 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/{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 +12 -13
- 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/{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-ea891d54.js} +307 -17
- 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 +6 -6
- package/dist/cjs/vega-app-header-button.cjs.entry.js +5 -5
- package/dist/cjs/vega-box.cjs.entry.js +6 -6
- package/dist/cjs/vega-button-circle.cjs.entry.js +5 -5
- package/dist/cjs/vega-button.cjs.entry.js +8 -5
- package/dist/cjs/vega-calendar_5.cjs.entry.js +7 -7
- package/dist/cjs/vega-card.cjs.entry.js +5 -5
- package/dist/cjs/vega-carousel.cjs.entry.js +3 -3
- package/dist/cjs/vega-checkbox_2.cjs.entry.js +2 -2
- package/dist/cjs/vega-chip.cjs.entry.js +5 -5
- package/dist/cjs/vega-code-block.cjs.entry.js +8 -8
- package/dist/cjs/vega-color-picker.cjs.entry.js +2 -2
- package/dist/cjs/vega-color-swatch-picker.cjs.entry.js +3 -3
- package/dist/cjs/vega-color-swatch.cjs.entry.js +2 -2
- package/dist/cjs/vega-combo-box.cjs.entry.js +8 -8
- package/dist/cjs/vega-date-picker_2.cjs.entry.js +13 -13
- package/dist/cjs/vega-dialog_2.cjs.entry.js +3 -3
- package/dist/cjs/vega-divider.cjs.entry.js +5 -5
- package/dist/cjs/vega-dropdown_5.cjs.entry.js +7 -7
- package/dist/cjs/vega-env-manager-23b8b23c.js +2 -2
- package/dist/cjs/vega-field-label.cjs.entry.js +2 -2
- package/dist/cjs/vega-file-uploader.cjs.entry.js +3 -3
- package/dist/cjs/vega-flag-icon.cjs.entry.js +5 -5
- package/dist/cjs/vega-flex.cjs.entry.js +6 -6
- package/dist/cjs/vega-font.cjs.entry.js +5 -5
- package/dist/cjs/vega-form.cjs.entry.js +3 -3
- package/dist/cjs/vega-grid.cjs.entry.js +5 -5
- package/dist/cjs/vega-icon.cjs.entry.js +5 -5
- package/dist/cjs/vega-image-uploader.cjs.entry.js +5 -5
- package/dist/cjs/vega-input-credit-card.cjs.entry.js +6 -6
- package/dist/cjs/vega-input-numeric.cjs.entry.js +5 -5
- package/dist/cjs/vega-input-passcode.cjs.entry.js +5 -5
- package/dist/cjs/vega-input-phone-number.cjs.entry.js +4 -4
- package/dist/cjs/vega-input-range.cjs.entry.js +3 -3
- package/dist/cjs/vega-input-select.cjs.entry.js +5 -5
- package/dist/cjs/vega-input.cjs.entry.js +6 -6
- package/dist/cjs/vega-left-nav_5.cjs.entry.js +313 -108
- package/dist/cjs/vega-loader-wrapper_2.cjs.entry.js +3 -3
- package/dist/cjs/vega-pagination-page-size-selector-mobile.cjs.entry.js +2 -2
- package/dist/cjs/vega-pagination.cjs.entry.js +4 -4
- package/dist/cjs/vega-popover_2.cjs.entry.js +8 -8
- package/dist/cjs/vega-progress-tracker_2.cjs.entry.js +3 -3
- package/dist/cjs/vega-radio_2.cjs.entry.js +5 -5
- package/dist/cjs/vega-rich-text-content.cjs.entry.js +6 -6
- package/dist/cjs/vega-rich-text-editor_4.cjs.entry.js +55 -28
- package/dist/cjs/vega-rich-text-find-replace-panel.cjs.entry.js +1 -1
- package/dist/cjs/vega-rich-text-special-characters-panel.cjs.entry.js +5 -5
- package/dist/cjs/vega-rich-text-table-properties_3.cjs.entry.js +12 -12
- package/dist/cjs/vega-selection-chip_2.cjs.entry.js +4 -4
- package/dist/cjs/vega-selection-tile_2.cjs.entry.js +2 -2
- package/dist/cjs/vega-sidenav_3.cjs.entry.js +3 -3
- package/dist/cjs/vega-signature-capture.cjs.entry.js +7 -7
- package/dist/cjs/vega-stepper.cjs.entry.js +2 -2
- package/dist/cjs/vega-table_11.cjs.entry.js +69 -9
- package/dist/cjs/vega-textarea.cjs.entry.js +2 -2
- package/dist/cjs/vega-time-picker_2.cjs.entry.js +9 -9
- package/dist/cjs/vega-toggle-switch.cjs.entry.js +2 -2
- package/dist/cjs/vega-tooltip_2.cjs.entry.js +6 -6
- package/dist/cjs/vega.cjs.js +12 -13
- 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-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-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 +163 -0
- package/dist/collection/helpers/translation/locales/en.js +2 -0
- package/dist/esm/{app-globals-9950d055.js → app-globals-f2336686.js} +11 -10
- 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/{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-b3b6c308.js} +3 -3
- package/dist/esm/{image-extension-7108c27d.js → image-extension-b6c7e4a7.js} +18 -2
- package/dist/esm/index.js +17 -17
- 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/{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 +12 -13
- 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/{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-9896879b.js} +306 -17
- 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 +6 -6
- package/dist/esm/vega-app-header-button.entry.js +5 -5
- package/dist/esm/vega-box.entry.js +6 -6
- package/dist/esm/vega-button-circle.entry.js +5 -5
- package/dist/esm/vega-button.entry.js +8 -5
- package/dist/esm/vega-calendar_5.entry.js +7 -7
- package/dist/esm/vega-card.entry.js +5 -5
- package/dist/esm/vega-carousel.entry.js +3 -3
- package/dist/esm/vega-checkbox_2.entry.js +2 -2
- package/dist/esm/vega-chip.entry.js +5 -5
- package/dist/esm/vega-code-block.entry.js +8 -8
- package/dist/esm/vega-color-picker.entry.js +2 -2
- package/dist/esm/vega-color-swatch-picker.entry.js +3 -3
- package/dist/esm/vega-color-swatch.entry.js +2 -2
- package/dist/esm/vega-combo-box.entry.js +8 -8
- package/dist/esm/vega-date-picker_2.entry.js +13 -13
- package/dist/esm/vega-dialog_2.entry.js +3 -3
- package/dist/esm/vega-divider.entry.js +5 -5
- package/dist/esm/vega-dropdown_5.entry.js +7 -7
- package/dist/esm/vega-env-manager-8f8dc473.js +2 -2
- package/dist/esm/vega-field-label.entry.js +2 -2
- package/dist/esm/vega-file-uploader.entry.js +3 -3
- package/dist/esm/vega-flag-icon.entry.js +5 -5
- package/dist/esm/vega-flex.entry.js +6 -6
- package/dist/esm/vega-font.entry.js +5 -5
- package/dist/esm/vega-form.entry.js +3 -3
- package/dist/esm/vega-grid.entry.js +5 -5
- package/dist/esm/vega-icon.entry.js +5 -5
- package/dist/esm/vega-image-uploader.entry.js +5 -5
- package/dist/esm/vega-input-credit-card.entry.js +6 -6
- package/dist/esm/vega-input-numeric.entry.js +5 -5
- package/dist/esm/vega-input-passcode.entry.js +5 -5
- package/dist/esm/vega-input-phone-number.entry.js +4 -4
- package/dist/esm/vega-input-range.entry.js +3 -3
- package/dist/esm/vega-input-select.entry.js +5 -5
- package/dist/esm/vega-input.entry.js +6 -6
- package/dist/esm/vega-left-nav_5.entry.js +313 -108
- package/dist/esm/vega-loader-wrapper_2.entry.js +3 -3
- package/dist/esm/vega-pagination-page-size-selector-mobile.entry.js +2 -2
- package/dist/esm/vega-pagination.entry.js +4 -4
- package/dist/esm/vega-popover_2.entry.js +8 -8
- package/dist/esm/vega-progress-tracker_2.entry.js +3 -3
- package/dist/esm/vega-radio_2.entry.js +5 -5
- package/dist/esm/vega-rich-text-content.entry.js +6 -6
- package/dist/esm/vega-rich-text-editor_4.entry.js +51 -24
- package/dist/esm/vega-rich-text-find-replace-panel.entry.js +1 -1
- package/dist/esm/vega-rich-text-special-characters-panel.entry.js +5 -5
- package/dist/esm/vega-rich-text-table-properties_3.entry.js +12 -12
- package/dist/esm/vega-selection-chip_2.entry.js +4 -4
- package/dist/esm/vega-selection-tile_2.entry.js +2 -2
- package/dist/esm/vega-sidenav_3.entry.js +3 -3
- package/dist/esm/vega-signature-capture.entry.js +7 -7
- package/dist/esm/vega-stepper.entry.js +2 -2
- package/dist/esm/vega-table_11.entry.js +69 -9
- package/dist/esm/vega-textarea.entry.js +2 -2
- package/dist/esm/vega-time-picker_2.entry.js +9 -9
- package/dist/esm/vega-toggle-switch.entry.js +2 -2
- package/dist/esm/vega-tooltip_2.entry.js +6 -6
- package/dist/esm/vega.js +12 -13
- package/dist/sri/vega-sri-manifest.json +318 -322
- 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-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 +10 -0
- package/dist/types/helpers/backdrop/index.d.ts +1 -0
- package/dist/types/helpers/backdrop/shared-backdrop-manager.d.ts +67 -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-05f937c5.entry.js → p-0af32f31.entry.js} +1 -1
- package/dist/vega/{p-2fcc604c.entry.js → p-0b311599.entry.js} +1 -1
- package/dist/vega/{p-ad35dea4.entry.js → p-0b9c7c79.entry.js} +1 -1
- 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-944b43ce.entry.js → p-14559974.entry.js} +1 -1
- package/dist/vega/{p-32a67ba1.js → p-14baa886.js} +1 -1
- package/dist/vega/{p-846b1ab9.entry.js → p-2364be92.entry.js} +1 -1
- package/dist/vega/p-270697c0.entry.js +1 -0
- package/dist/vega/{p-af98539f.entry.js → p-288d65ad.entry.js} +1 -1
- package/dist/vega/p-2bf17505.entry.js +1 -0
- package/dist/vega/{p-afb96938.js → p-320091b7.js} +1 -1
- package/dist/vega/{p-73fd18d9.entry.js → p-341a6b32.entry.js} +1 -1
- package/dist/vega/p-36949349.js +1 -0
- package/dist/vega/p-38c9d782.js +1 -0
- package/dist/vega/{p-e4309574.js → p-3c309a38.js} +1 -1
- package/dist/vega/{p-4d9562bc.js → p-3dee1e55.js} +1 -1
- package/dist/vega/p-3e8baeac.entry.js +1 -0
- package/dist/vega/{p-d7f32ccf.entry.js → p-46fe3154.entry.js} +1 -1
- package/dist/vega/{p-8c1a5fa4.entry.js → p-48ee3e24.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-56c4e349.entry.js → p-5107277d.entry.js} +1 -1
- package/dist/vega/{p-5139e516.js → p-51b68d25.js} +1 -1
- package/dist/vega/{p-751a5cd6.entry.js → p-52c6a399.entry.js} +1 -1
- package/dist/vega/{p-a359e53c.js → p-579cdeae.js} +1 -1
- package/dist/vega/{p-c2d28797.entry.js → p-595998d9.entry.js} +1 -1
- package/dist/vega/{p-653a6dd8.entry.js → p-5db61a12.entry.js} +1 -1
- package/dist/vega/{p-f2f22b5d.entry.js → p-5df2d6a1.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-ddf03de1.entry.js → p-62d6e063.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-6dfe2407.js +1 -0
- package/dist/vega/{p-d4bb6f93.entry.js → p-6f01a71a.entry.js} +1 -1
- package/dist/vega/p-6f70a10f.entry.js +1 -0
- package/dist/vega/p-73f2c3c0.entry.js +1 -0
- package/dist/vega/p-75e33859.js +1 -0
- package/dist/vega/p-762ea523.entry.js +1 -0
- package/dist/vega/{p-c5ecbc53.entry.js → p-782eb312.entry.js} +1 -1
- package/dist/vega/p-7a88a3d3.entry.js +1 -0
- package/dist/vega/{p-e410c4ad.entry.js → p-7b57a845.entry.js} +1 -1
- package/dist/vega/p-83a16285.entry.js +1 -0
- package/dist/vega/p-8720816e.js +1 -0
- package/dist/vega/{p-6712a9c7.entry.js → p-892edf88.entry.js} +1 -1
- package/dist/vega/{p-63101cb4.entry.js → p-8c083255.entry.js} +1 -1
- package/dist/vega/{p-19c42e30.js → p-8db904dc.js} +1 -1
- package/dist/vega/{p-0cb78838.entry.js → p-91287214.entry.js} +1 -1
- package/dist/vega/{p-c553d37e.js → p-919cddc3.js} +1 -1
- package/dist/vega/{p-e86c6802.entry.js → p-95913e3c.entry.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-cf8d5b3f.entry.js → p-9d18ba7f.entry.js} +1 -1
- package/dist/vega/{p-7b93a756.entry.js → p-9dca874d.entry.js} +1 -1
- package/dist/vega/{p-ffdacaf9.entry.js → p-9f38448c.entry.js} +1 -1
- package/dist/vega/{p-ef605271.js → p-9f7154d2.js} +1 -1
- package/dist/vega/{p-7c8e579e.entry.js → p-a057285e.entry.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-c3c0e415.entry.js → p-a890d60b.entry.js} +1 -1
- package/dist/vega/{p-fda6e2cc.entry.js → p-addbca58.entry.js} +1 -1
- package/dist/vega/{p-f0d4c78c.js → p-b1eb9ff0.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-bbabb1c8.entry.js → p-b8f8e480.entry.js} +1 -1
- package/dist/vega/{p-95d6c85f.js → p-ba662fe5.js} +1 -1
- package/dist/vega/p-c66d2a1e.js +1 -0
- package/dist/vega/{p-3932f964.entry.js → p-c67b9aba.entry.js} +1 -1
- package/dist/vega/{p-acbba6da.entry.js → p-c9daabe1.entry.js} +1 -1
- package/dist/vega/{p-ddd28a8e.entry.js → p-cad5222a.entry.js} +1 -1
- package/dist/vega/{p-b042e3b4.entry.js → p-cb90163a.entry.js} +1 -1
- package/dist/vega/{p-422d88ae.entry.js → p-d08ffdf1.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-832d1a72.entry.js → p-e8ee70c5.entry.js} +1 -1
- package/dist/vega/{p-d62b85ff.entry.js → p-ed103a1a.entry.js} +1 -1
- package/dist/vega/{p-e5187a86.entry.js → p-f05a193e.entry.js} +1 -1
- package/dist/vega/p-f1974321.js +1 -0
- package/dist/vega/{p-615a2b8c.entry.js → p-f246f125.entry.js} +1 -1
- package/dist/vega/{p-4256252c.js → p-f4da615a.js} +1 -1
- package/dist/vega/{p-09d50f59.entry.js → p-f5d7b89f.entry.js} +1 -1
- package/dist/vega/{p-0f1d6ceb.entry.js → p-f651df3b.entry.js} +1 -1
- package/dist/vega/{p-6d40635e.js → p-f7e459cd.js} +1 -1
- package/dist/vega/{p-cb81fc2a.entry.js → p-f906a7bc.entry.js} +1 -1
- package/dist/vega/{p-66b7d1c7.entry.js → p-f96d0503.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/esm/replace-selected-text-action-c9278a0f.js +0 -18
- package/dist/vega/p-07562b9c.js +0 -1
- package/dist/vega/p-18a5e8bc.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-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-9a472a04.entry.js +0 -1
- package/dist/vega/p-a9a87b9a.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-ccb9bf86.js +0 -1
- package/dist/vega/p-dca3278f.js +0 -1
- package/dist/vega/p-e0ecafca.js +0 -1
- package/dist/vega/p-e33e1e90.js +0 -1
- package/dist/vega/p-ff8dd200.js +0 -1
|
@@ -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 i,r as t,c as r,H as n,g as a}from"./p-6b2342e0.js";import{s as o}from"./p-519a7d55.js";import{c as s,V as p,M as l,I as d}from"./p-6e1ab235.js";import{V as u,I as h}from"./p-8ce9e214.js";import{c}from"./p-140616fe.js";import{d as g}from"./p-698fbd73.js";import{F as v}from"./p-320091b7.js";import{i as f}from"./p-d27ae9ff.js";import{C as b}from"./p-2d0d575f.js";import{F as m}from"./p-cb378636.js";import{g as x,D as w}from"./p-528748fa.js";import{D as y}from"./p-526e3634.js";import{C as j}from"./p-b1ff70bf.js";import{I as R}from"./p-f396c69a.js";import{I}from"./p-abd7aeaa.js";import{c as C}from"./p-3a620268.js";import{T as V}from"./p-6cde45fc.js";import"./p-6a334573.js";import"./p-282b37cb.js";import"./p-b75ee3ba.js";import"./p-02841589.js";import"./p-331a62d5.js";import"./p-8b5d3a52.js";import"./p-3a68b729.js";import"./p-0d18368b.js";import"./p-f0e828d8.js";import"./p-81dd00d0.js";import"./p-49a2e141.js";import"./p-d4ea8e22.js";import"./p-ed45b3b6.js";import"./p-78a57a17.js";import"./p-52b8f2d2.js";import"./p-29e3eb12.js";import"./p-262ec334.js";import"./p-5f377954.js";import"./p-87a4d75f.js";import"./p-982747ef.js";var N=function(e,i,t,r){var n,a=arguments.length,o=a<3?i:null===r?r=Object.getOwnPropertyDescriptor(i,t):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,i,t,r);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(o=(a<3?n(o):a>3?n(i,t,o):n(i,t))||o);return a>3&&o&&Object.defineProperty(i,t,o),o};class k extends p{getInputRangeContainerRef(){return this.inputRangeContainerRef}render(){return e(i,null,e("vega-flex",{class:"vega-input-range-container",direction:"horizontal"!==this.stack?"col":"row",alignItems:"horizontal"!==this.stack?"start":"center",gap:"size-8",ref:e=>this.inputRangeContainerRef=e},e("vega-field-label",{onClick:this.inputRangeInputRenderer.focusFirstInput,isFieldRequired:this.required,optional:this.optional,disabled:this.disabled,label:this.label}),this.inputRangeInputRenderer.render()),this.renderHintDom())}renderHintDom(){if(this.hint)return e("label",{class:"vega-input-range-hint"},e("vega-font",{variant:"font-footnote1-short",color:"text-secondary"},this.hint))}}N([s()],k.prototype,"required",void 0),N([s()],k.prototype,"optional",void 0),N([s()],k.prototype,"disabled",void 0),N([s()],k.prototype,"label",void 0),N([s()],k.prototype,"hint",void 0),N([s()],k.prototype,"stack",void 0),N([s()],k.prototype,"inputRangeInputRenderer",void 0);var z=function(e,i,t,r){var n,a=arguments.length,o=a<3?i:null===r?r=Object.getOwnPropertyDescriptor(i,t):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,i,t,r);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(o=(a<3?n(o):a>3?n(i,t,o):n(i,t))||o);return a>3&&o&&Object.defineProperty(i,t,o),o};class A extends p{emitEventAndNotifyAfterValueChange(e,i){f(e,i)||(this.changeEventEmitter.emit(e),b.notify(m,{host:this.host,detail:e}))}updateValueByRangeIndex(e,i){let t=this.value;t=0===i?[e,Array.isArray(this.value)&&!isNaN(Number(this.value[1]))?this.value[1]:""]:[Array.isArray(this.value)&&!isNaN(Number(this.value[0]))?this.value[0]:"",e],f(t,this.value)||this.setValue(t)}setValue(e){this.valueGuard(e)&&(this.value=e)}valueGuard(e){return Array.isArray(e)&&2===e.length}}z([s({writable:!0})],A.prototype,"value",void 0),z([s()],A.prototype,"host",void 0),z([s()],A.prototype,"changeEventEmitter",void 0),z([l("watchValue")],A.prototype,"emitEventAndNotifyAfterValueChange",null);var O=function(e,i,t,r){var n,a=arguments.length,o=a<3?i:null===r?r=Object.getOwnPropertyDescriptor(i,t):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,i,t,r);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(o=(a<3?n(o):a>3?n(i,t,o):n(i,t))||o);return a>3&&o&&Object.defineProperty(i,t,o),o};class E extends p{constructor(){super(...arguments),this.isMobileDevice=x()===w.MOBILE,this.focusFirstInput=()=>{this.minFieldInputRef.doFocus()},this.inputValueChange=e=>{this.valueController.updateValueByRangeIndex(e.detail,"0"===e.host.dataset.index?0:1)}}getInputRefByIndex(e){return[this.minFieldInputRef,this.maxFieldInputRef][e]}render(){return e("vega-box",{class:{"vega-input-range-input-container":!0,"input-range-disabled":this.disabled,"input-range-mobile":this.isMobileDevice,"input-range-with-clear-icon":this.showClearIcon&&!this.disabled},corners:"rounded-8",backgroundColor:this.disabled?"bg-secondary":"bg-primary"},e("vega-flex",{"align-items":"center",direction:this.isMobileDevice?"col":"row"},e("vega-input",Object.assign({prefixIcon:this.prefixIcon},this.getInputPropsByRangeIndex(0),{ref:e=>{y.addUniqueObserverToNode(e,g,this.inputValueChange),this.minFieldInputRef=e}})),e("span",{class:"vega-input-range-divider"}),e("vega-input",Object.assign({class:{"with-left-padding-in-mobile":!!this.prefixIcon&&this.isMobileDevice}},this.getInputPropsByRangeIndex(1),{ref:e=>{y.addUniqueObserverToNode(e,g,this.inputValueChange),this.maxFieldInputRef=e}}))),this.clearIconRenderer.render())}getInputPropsByRangeIndex(e){return{type:"number","data-index":e,placeholder:this.getPlaceholderByIndex(e),"data-aria-label":this.getDataAriaLabel(e),showClearIcon:!1,disabled:this.disabled,size:this.size,min:this.min,max:this.max,value:this.getDefaultValueByIndex(e)}}getPlaceholderByIndex(e){return this.translationSlimmer.t((this.placeholder||E.defaultPlaceholder)[e])}getDataAriaLabel(e){return`${this.label||"Input range"} ${0===e?"start":"end"}`}getDefaultValueByIndex(e){return(this.value||["",""])[e]}}E.defaultPlaceholder=["Minimum","Maximum"],O([s()],E.prototype,"value",void 0),O([s()],E.prototype,"prefixIcon",void 0),O([s()],E.prototype,"disabled",void 0),O([s()],E.prototype,"min",void 0),O([s()],E.prototype,"max",void 0),O([s()],E.prototype,"size",void 0),O([s()],E.prototype,"placeholder",void 0),O([s()],E.prototype,"label",void 0),O([s()],E.prototype,"showClearIcon",void 0),O([s()],E.prototype,"valueController",void 0),O([s()],E.prototype,"clearIconRenderer",void 0),O([s()],E.prototype,"translationSlimmer",void 0);class F extends I{constructor(e){super(),this.invalidResult=e=>({isValid:!1,message:e}),this.validResult=()=>({isValid:!0,message:""}),this.minValue=0===e.minValue||e.minValue?Number(e.minValue):null,this.maxValue=0===e.maxValue||e.maxValue?Number(e.maxValue):null}canEvaluate(e,i){return i?this.isAcceptedInputType(e)&&!i.disabled&&i.visible:this.isAcceptedInputType(e)}evaluate(e){if(!this.isAcceptedInputType(e))throw new Error(`Unexpected type of input: ${typeof e}: ${e}`);const i=Number(e[0]),t=Number(e[1]);return null!==this.minValue&&(""!==e[0]&&i<this.minValue||""!==e[1]&&t<this.minValue)?this.invalidResult({key:"The minimum input value is {0}",args:[this.minValue]}):null!==this.maxValue&&(""!==e[0]&&i>this.maxValue||""!==e[1]&&t>this.maxValue)?this.invalidResult({key:"The maximum input value is {0}",args:[this.maxValue]}):""!==e[0]&&""!==e[1]&&i>t?this.invalidResult("The end value should be greater than the start value"):this.validResult()}shouldShowError(e){return!e.disabled&&e.visible&&(e.touched||e.modified)}isAcceptedInputType(e){return Array.isArray(e)&&2===e.length&&e.every((e=>"number"==typeof Number(e)))}}var D=function(e,i,t,r){var n,a=arguments.length,o=a<3?i:null===r?r=Object.getOwnPropertyDescriptor(i,t):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,i,t,r);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(o=(a<3?n(o):a>3?n(i,t,o):n(i,t))||o);return a>3&&o&&Object.defineProperty(i,t,o),o};class M extends p{constructor(){super(...arguments),this.clearInputRangeValue=()=>{this.valueController.setValue(["",""]),this.inputRangeInputRenderer.focusFirstInput()}}render(){return e("div",{class:{"vega-input-range-clear-icon":!0,invisible:!this.shouldShowClearIcon()},"aria-label":"clear input range",role:"button",tabindex:this.disabled?-1:0,onClick:this.clearInputRangeValue,onKeyDown:C()},e("vega-icon",{icon:"close"}))}shouldShowClearIcon(){return this.showClearIcon&&!this.disabled&&Array.isArray(this.value)&&this.value.some((e=>!!e))}}D([s()],M.prototype,"showClearIcon",void 0),D([s()],M.prototype,"value",void 0),D([s()],M.prototype,"disabled",void 0),D([s()],M.prototype,"inputRangeInputRenderer",void 0),D([s()],M.prototype,"valueController",void 0);var S=function(e,i,t,r){var n,a=arguments.length,o=a<3?i:null===r?r=Object.getOwnPropertyDescriptor(i,t):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,i,t,r);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(o=(a<3?n(o):a>3?n(i,t,o):n(i,t))||o);return a>3&&o&&Object.defineProperty(i,t,o),o};const B=class{constructor(e){t(this,e),this.vegaChange=r(this,"vegaChange",7),this.change=r(this,"change",7),this.globalSlimmers={},this.translationSlimmer=new V,this.formFieldController=new v({propertyRules:[{propertyName:"required",ruleFactory:e=>e?new R:null},{propertyName:"min",ruleFactory:(e,i)=>new F({minValue:e,maxValue:i}),dependence:"max"},{propertyName:"max",ruleFactory:(e,i)=>new F({minValue:i,maxValue:e}),dependence:"min"}],validationRulesName:"validationRules",defaultValue:["",""],attributeGetter:e=>this[e],inputContainerGetter:()=>this.inputRangeRenderer.getInputRangeContainerRef(),touchableAreaGetter:()=>[this.inputRangeInputRenderer.getInputRefByIndex(0),this.inputRangeInputRenderer.getInputRefByIndex(1)]}),this.inputRangeInputRenderer=new E,this.clearIconRenderer=new M,this.inputRangeRenderer=new k,this.valueController=new A,this.inputChangeEventPrevent=new j([g],(()=>this.inputRangeRenderer.getInputRangeContainerRef())),this.changeEventEmitter=c(B,g),this.vegaComponentUsageRuntimeMetricsSlimmer=new u,this.label="",this.value=["",""],this.showClearIcon=!0,this.min=null,this.max=null,this.required=!1,this.optional=!1,this.isValid=null,this.autoValidation=!0,this.validationRules=[],this.size="default",this.placeholder=["Minimum","Maximum"],this.disabled=!1,this.hint="",this.stack="vertical"}watchValue(e,i){}watchValidationRules(){}render(){return o(e(n,{class:{disabled:this.disabled}},this.inputRangeRenderer.render()),this.host)}get host(){return a(this)}static get watchers(){return{value:["watchValue"],validationRules:["watchValidationRules"]}}};S([h()],B.prototype,"globalSlimmers",void 0),S([d()],B.prototype,"translationSlimmer",void 0),S([d()],B.prototype,"formFieldController",void 0),S([d()],B.prototype,"inputRangeInputRenderer",void 0),S([d()],B.prototype,"clearIconRenderer",void 0),S([d()],B.prototype,"inputRangeRenderer",void 0),S([d()],B.prototype,"valueController",void 0),S([d()],B.prototype,"inputChangeEventPrevent",void 0),S([d()],B.prototype,"changeEventEmitter",void 0),S([d()],B.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),B.style=':host{display:inline-block;width:100%}.vega-input-range-input-container{position:relative;width:100%;flex:1 1 0%;border:1px solid rgba(var(--v-border-input-field, 171, 198, 216, 1));box-sizing:border-box;min-width:50%}.vega-input-range-input-container:hover{border:1px solid rgba(var(--v-border-input-field-hover, 115, 160, 190, 1))}.vega-input-range-input-container .vega-input-range-divider{display:inline-block;width:0px;height:24px;border-color:rgba(var(--v-border-color-input-field, 171, 198, 216, 1));border-style:solid;border-right-width:1px;border-left-width:0px;flex-shrink:0}.vega-input-range-input-container:focus-within .vega-input-range-divider{opacity:0}.vega-input-range-input-container .vega-input-range-clear-icon{position:absolute;width:16px;height:16px;cursor:pointer;color:rgba(var(--v-text-secondary, 107, 116, 125, 1));top:50%;right:16px;transform:translateY(-50%);z-index:2}.vega-input-range-input-container .vega-input-range-clear-icon.invisible{visibility:hidden}.vega-input-range-input-container .vega-input-range-clear-icon:focus-within{outline:2px solid rgba(var(--v-border-color-action, 19, 98, 226, 1));outline-offset:2px;border-radius:4px;padding:2px}.vega-input-range-input-container vega-input::part(input-container){border-width:0px}.vega-input-range-input-container vega-input::part(input-container):focus-within{outline:2px solid rgba(var(--v-border-color-action, 19, 98, 226, 1));outline-offset:3px;border:1px solid rgba(var(--v-border-color-input-field-focus, 19, 98, 226, 1));position:relative;box-shadow:0 0 0;margin:-1px;z-index:1}.vega-input-range-input-container.input-range-with-clear-icon vega-input:last-child::part(input){padding-right:24px}.vega-input-range-input-container.input-range-disabled{background-color:rgba(var(--v-bg-secondary, 245, 247, 247, 1));border:1px solid rgba(var(--v-border-input-field-disabled, 222, 225, 227, 1))}.vega-input-range-input-container.input-range-disabled:hover{border:1px solid rgba(var(--v-border-input-field-disabled, 222, 225, 227, 1))}.vega-input-range-input-container.input-range-disabled .vega-input-range-divider{border-color:rgba(var(--v-border-color-input-field-disabled, 222, 225, 227, 1))}.vega-input-range-input-container.input-range-mobile .vega-input-range-divider{width:100%;height:0px;border-right-width:0px;border-left-width:0px;border-top-width:0px;border-bottom-width:1px}.vega-input-range-input-container.input-range-mobile:focus-within .vega-input-range-divider{opacity:1}.vega-input-range-input-container.input-range-mobile .with-left-padding-in-mobile::part(input){padding-left:26px}.vega-input-range-input-container.input-range-mobile .vega-input-range-clear-icon{top:25%}.vega-input-range-input-container.input-range-mobile.input-range-with-clear-icon vega-input:first-child::part(input){padding-right:24px}.vega-input-range-input-container.input-range-mobile.input-range-with-clear-icon vega-input:last-child::part(input){padding-right:2px}.vega-input-range-container.error .vega-input-range-input-container{border:1px solid rgba(var(--v-border-input-field-danger, 230, 50, 87, 1))}.vega-input-range-container.error .vega-input-range-input-container:hover{border:1px solid rgba(var(--v-border-input-field-danger-hover, 255, 87, 114, 1))}.vega-input-range-container.error .vega-input-range-input-container .vega-input-range-clear-icon:focus-within{outline:2px solid rgba(var(--v-border-color-danger, 230, 50, 87, 1));outline-offset:2px}.vega-input-range-container.error vega-input::part(input-container):focus-within{outline:2px solid rgba(var(--v-border-color-danger, 230, 50, 87, 1));outline-offset:3px;border:1px solid rgba(var(--v-border-color-input-field-danger-focus, 233, 71, 104, 1))}.vega-input-range-hint{display:inline-block;padding-top:12px;padding-right:8px;padding-left:8px}.vega-error{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));display:block;padding-top:12px;padding-right:8px;padding-left:8px}@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}';export{B as vega_input_range}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,c as i,h as e,H as s,g as h}from"./p-6b2342e0.js";import{F as r}from"./p-87a4d75f.js";import{V as a,M as l,A as o,D as c,i as p}from"./p-19c42e30.js";import{R as n}from"./p-8bc15ed0.js";import{V as d}from"./p-95d6c85f.js";import{s as m}from"./p-519a7d55.js";import{I as v}from"./p-6e1ab235.js";import{V as f,I as u}from"./p-8ce9e214.js";import{F as g}from"./p-afb96938.js";import{F as _}from"./p-cb378636.js";import{C as A}from"./p-2d0d575f.js";import{c as E}from"./p-140616fe.js";import{C as M}from"./p-b1ff70bf.js";import{D as I}from"./p-526e3634.js";import{d as w,M as b,L as j}from"./p-698fbd73.js";import{V as D}from"./p-6031bed1.js";import{S as Z}from"./p-c553d37e.js";import"./p-982747ef.js";import"./p-ed45b3b6.js";import"./p-d4ea8e22.js";import"./p-b438e68b.js";import"./p-0e607b44.js";import"./p-abd7aeaa.js";import"./p-262ec334.js";import"./p-02841589.js";import"./p-331a62d5.js";import"./p-528748fa.js";import"./p-8b5d3a52.js";import"./p-6a334573.js";import"./p-3a68b729.js";import"./p-f0e828d8.js";import"./p-b75ee3ba.js";import"./p-81dd00d0.js";import"./p-49a2e141.js";import"./p-78a57a17.js";import"./p-52b8f2d2.js";import"./p-d27ae9ff.js";import"./p-29e3eb12.js";import"./p-282b37cb.js";import"./p-5f377954.js";import"./p-ffdc25ec.js";import"./p-afcd8f04.js";import"./p-2de61f1b.js";const C=[{type:"visa",iconName:"visa",pattern:a,maskConfig:{type:"custom",options:{mask:"9999 9999 9999 9999 999",slot:"9",accept:/\d/,triggerAtInit:r.isEnabled("VEGA_INPUT_CREDIT_CARD.ENABLE_HIDE_NUMBER_MASK_ON_FIRST_LOAD")}}},{type:"mastercard",iconName:"mastercard",pattern:l,maskConfig:{type:"custom",options:{mask:"9999 9999 9999 9999",slot:"9",accept:/\d/,triggerAtInit:r.isEnabled("VEGA_INPUT_CREDIT_CARD.ENABLE_HIDE_NUMBER_MASK_ON_FIRST_LOAD")}}},{type:"amex",iconName:"amex",pattern:o,maskConfig:{type:"custom",options:{mask:"9999 999999 99999",slot:"9",accept:/\d/,triggerAtInit:r.isEnabled("VEGA_INPUT_CREDIT_CARD.ENABLE_HIDE_NUMBER_MASK_ON_FIRST_LOAD")}}},{type:"discover",iconName:"discover",pattern:c,maskConfig:{type:"custom",options:{mask:"9999 9999 9999 9999",slot:"9",accept:/\d/,triggerAtInit:r.isEnabled("VEGA_INPUT_CREDIT_CARD.ENABLE_HIDE_NUMBER_MASK_ON_FIRST_LOAD")}}}],R=[{payloadKey:"AUTO_VALIDATION_IS_TRUE",payloadDescription:"Determines whether the user's input in the credit card field should be automatically validated",payloadValue:t=>!0===t.autoValidation},{payloadKey:"AUTO_VALIDATION_IS_FALSE",payloadDescription:"Determines whether the user's input in the credit card field should be automatically validated",payloadValue:t=>!1===t.autoValidation}];class N extends Z{calculateCaretPosition(t,i){if(!p(i))return null;if(this.getCreditCardMaskConfig(t)){if(t.length>this.getLengthLimit())return i-(t.length-this.getLengthLimit());const e=t.substring(0,i);return i+(this.format(e).length-e.length)}return i}format(t,i){const e=this.getCreditCardMaskConfig(t);if(e){this.setMaskConfig(e.options);const s=null==i?void 0:i.caretPosition;if(t.length>this.getLengthLimit()&&p(s)){const i=[...t],e=t.length-this.getLengthLimit();return i.splice(s-e,e),i.join("")}return this.replaceMaskWithMatchedInputSlots(t,this.getMatchedInputSlotValue(t))}return t}getCreditCardType(t){return C.filter((i=>i.pattern.test(t)))[0]}}class y extends N{constructor(){super({mask:"",slot:"9",accept:/\d/,triggerAtInit:r.isEnabled("VEGA_INPUT_CREDIT_CARD.ENABLE_HIDE_NUMBER_MASK_ON_FIRST_LOAD")})}getCreditCardMaskConfig(t){let i;const e=this.getCreditCardType(t);return e&&(i=e.maskConfig),i}}class V extends N{constructor(t){super({mask:"",slot:"9",accept:/[\d\s]/,insertMode:!1,triggerAtInit:r.isEnabled("VEGA_INPUT_CREDIT_CARD.ENABLE_HIDE_NUMBER_MASK_ON_FIRST_LOAD")}),this.hideCardNumberOnBlur=t}getCreditCardMaskConfig(t){let i;return this.getCreditCardType(t)&&this.hideCardNumberOnBlur&&t.trim().includes(" ")&&(i=this.generateDynamicMask(t)),i}generateDynamicMask(t){const i={type:"custom",options:{mask:"",slot:"9",accept:/[\d\s]/,insertMode:!1,triggerAtInit:r.isEnabled("VEGA_INPUT_CREDIT_CARD.ENABLE_HIDE_NUMBER_MASK_ON_FIRST_LOAD")},trigger:"blur"},e=t.trim().split(" "),s=e.map(((t,i)=>(i===e.length-1?"9":"X").repeat(t.length))).join(" ");return i.options.mask=s,i}}var H=function(t,i,e,s){var h,r=arguments.length,a=r<3?i:null===s?s=Object.getOwnPropertyDescriptor(i,e):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,i,e,s);else for(var l=t.length-1;l>=0;l--)(h=t[l])&&(a=(r<3?h(a):r>3?h(i,e,a):h(i,e))||a);return r>3&&a&&Object.defineProperty(i,e,a),a};const T=class{constructor(s){t(this,s),this.vegaChange=i(this,"vegaChange",7),this.change=i(this,"change",7),this.vegaBlur=i(this,"vegaBlur",7),this.blur=i(this,"blur",7),this.vegaFocus=i(this,"vegaFocus",7),this.focus=i(this,"focus",7),this.globalSlimmers={},this.formFieldController=new g({propertyRules:[{propertyName:"required",ruleFactory:t=>t?new n:null},{propertyName:"",ruleFactory:()=>new d}],validationRulesName:"validationRules",defaultValue:"",attributeGetter:t=>this[t],inputContainerGetter:()=>this.inputContainerGetter(),touchableAreaGetter:()=>this.touchableAreaGetter()}),this.changeEventEmitter=E(T,w),this.blurEventEmitter=E(T,b),this.focusEventEmitter=E(T,j),this.inputCreditCardEventPrevent=new M([w,j,b],(()=>this.host),!0),this.vegaComponentUsageRuntimeMetricsSlimmer=new f(R),this.required=!1,this.optional=!1,this.disabled=!1,this.label="",this.hint="",this.size="default",this.placeholder="",this.hideCardNumberOnBlur=!0,this.autoValidation=!0,this.validationRules=[],this.isValid=null,this.value="",this.renderInputContainer=()=>{var t;const i=(null===(t=this.getCreditCardType(this.value))||void 0===t?void 0:t.iconName)||"regular-credit-card";return e("vega-input",{label:this.label,type:"number",prefixIcon:D.getIconKey(i),maskConfig:this.getMaskConfig(),placeholder:this.placeholder,disabled:this.disabled,size:this.size,value:this.value,hint:this.hint,required:this.required,optional:this.optional,showClearIcon:!1,ref:t=>{this.inputRef=t,I.addUniqueObserverToNode(t,w,(t=>{this.handleVegaChange(t)})),I.addUniqueObserverToNode(t,b,(()=>{this.handleVegaBlur()})),I.addUniqueObserverToNode(t,j,(()=>{this.handleVegaFocus()}))},"data-aria-label":this.label||"Input credit card"})},this.handleVegaChange=t=>{this.value=t.detail},this.handleVegaBlur=()=>{this.blurEventEmitter.emit()},this.handleVegaFocus=()=>{this.focusEventEmitter.emit()},this.inputContainerGetter=()=>this.inputRef.shadowRoot.querySelector(".vega-input-container"),this.touchableAreaGetter=()=>Array.from(this.inputRef.shadowRoot.querySelectorAll("input"))}watchValidationRules(){}watchValue(t){this.changeEventEmitter.emit(t),A.notify(_,{host:this.host,detail:t})}componentDidLoad(){r.isEnabled("VEGA_INPUT_CREDIT_CARD.ENABLE_HIDE_NUMBER_MASK_ON_FIRST_LOAD")&&this.hideCardNumberOnBlur&&this.inputRef.value&&this.value!==this.inputRef.value&&(this.value=this.inputRef.value)}render(){return m(e(s,null,this.renderInputContainer()),this.host)}getCreditCardType(t){return C.filter((i=>i.pattern.test(t)))[0]}getMaskConfig(){return[{type:"custom",trigger:"input",strategy:()=>new y},{type:"custom",trigger:"blur",strategy:()=>new V(this.hideCardNumberOnBlur)}]}get host(){return h(this)}static get watchers(){return{validationRules:["watchValidationRules"],value:["watchValue"]}}};D.register({visa:{icon:'<svg xmlns="http://www.w3.org/2000/svg" width="36" height="24" fill="none"><rect width="36" height="24" fill="#00579F" rx="2"/><path fill="#fff" d="M15.474 15.792h-1.979l1.238-7.653h1.979l-1.238 7.653ZM22.647 8.326A4.877 4.877 0 0 0 20.872 8c-1.954 0-3.33 1.042-3.339 2.532-.016 1.1.986 1.71 1.735 2.076.765.375 1.026.62 1.026.953-.008.513-.619.75-1.189.75-.79 0-1.213-.123-1.857-.408l-.26-.122-.277 1.718c.464.211 1.32.4 2.207.407 2.076 0 3.428-1.026 3.444-2.613.008-.872-.52-1.54-1.66-2.085-.693-.35-1.117-.586-1.117-.944.008-.326.359-.66 1.14-.66a3.362 3.362 0 0 1 1.474.293l.18.082.268-1.653ZM25.279 13.08l.79-2.14c-.008.016.162-.448.26-.733l.138.66s.375 1.831.457 2.214h-1.645ZM27.72 8.14h-1.53c-.472 0-.831.138-1.035.635l-2.94 7.018h2.077l.416-1.148h2.54c.057.269.237 1.148.237 1.148h1.832L27.72 8.14ZM11.842 8.139l-1.938 5.219-.212-1.059c-.358-1.221-1.482-2.548-2.736-3.208l1.775 6.693h2.093l3.11-7.645h-2.092Z"/><path fill="#FAA61A" d="M8.104 8.139H4.92l-.032.154c2.483.635 4.128 2.166 4.804 4.007L9 8.782c-.114-.489-.464-.627-.896-.643Z"/></svg>',autoSize:!0},mastercard:{icon:'<svg xmlns="http://www.w3.org/2000/svg" width="36" height="24" fill="none"><rect width="36" height="24" fill="#000" rx="2"/><path fill="#ED0006" fill-rule="evenodd" d="M18.25 17.157a6.75 6.75 0 0 1-4.426 1.649c-3.769 0-6.824-3.09-6.824-6.903C7 8.091 10.055 5 13.824 5a6.75 6.75 0 0 1 4.426 1.649A6.75 6.75 0 0 1 22.676 5c3.769 0 6.824 3.09 6.824 6.903 0 3.812-3.055 6.903-6.824 6.903a6.75 6.75 0 0 1-4.426-1.65Z" clip-rule="evenodd"/><path fill="#F9A000" fill-rule="evenodd" d="M18.25 17.157a6.92 6.92 0 0 0 2.398-5.254 6.92 6.92 0 0 0-2.398-5.254A6.75 6.75 0 0 1 22.676 5c3.769 0 6.824 3.09 6.824 6.903 0 3.812-3.055 6.903-6.824 6.903a6.75 6.75 0 0 1-4.426-1.65Z" clip-rule="evenodd"/><path fill="#FF5E00" fill-rule="evenodd" d="M18.25 6.65a6.92 6.92 0 0 1 2.398 5.253 6.92 6.92 0 0 1-2.398 5.254 6.92 6.92 0 0 1-2.398-5.254A6.92 6.92 0 0 1 18.25 6.65Z" clip-rule="evenodd"/></svg>',autoSize:!0},amex:{icon:'<svg xmlns="http://www.w3.org/2000/svg" width="36" height="24" fill="none"><g clip-path="url(#a)"><rect width="36" height="24" fill="#016FD0" rx="2"/><path fill="#fff" d="M6.99 18.549v-5.654h5.986l.643.838.663-.838h21.729v5.264s-.569.384-1.226.39H22.754l-.724-.891v.891h-2.373v-1.521s-.325.212-1.025.212h-.808v1.309h-3.593l-.641-.855-.651.855H6.99ZM0 8.634l1.35-3.147h2.334l.767 1.763V5.487h2.902l.456 1.274.442-1.274h13.027v.64s.685-.64 1.81-.64l4.227.015.753 1.74V5.487h2.428l.669 1v-1h2.45v5.654h-2.45l-.64-1.003v1.003h-3.569l-.359-.892h-.959l-.353.892h-2.42c-.968 0-1.587-.628-1.587-.628v.628H17.63l-.725-.892v.892H3.34l-.359-.892h-.956l-.356.892H0V8.634Z"/><path fill="#016FD0" d="M1.827 6.184.006 10.417h1.185l.336-.847H3.48l.335.847h1.211L3.207 6.184h-1.38Zm.673.985.596 1.482H1.903L2.5 7.169ZM5.151 10.416V6.183l1.685.006.98 2.73.956-2.736h1.671v4.233H9.385v-3.12l-1.122 3.12h-.928L6.21 7.296v3.12H5.15ZM11.168 10.416V6.183h3.454v.947h-2.384v.724h2.328v.891h-2.328v.752h2.384v.92h-3.454ZM15.233 6.184v4.233h1.059V8.913h.445l1.27 1.504H19.3l-1.393-1.56a1.29 1.29 0 0 0 1.161-1.3c0-.89-.7-1.373-1.48-1.373h-2.355Zm1.059.947h1.21c.29 0 .5.227.5.446 0 .28-.273.445-.485.445h-1.225v-.891ZM20.582 10.416h-1.08V6.183h1.08v4.233ZM23.144 10.416h-.233c-1.129 0-1.814-.889-1.814-2.1 0-1.24.678-2.133 2.103-2.133h1.17v1.003h-1.213c-.578 0-.988.451-.988 1.141 0 .82.468 1.165 1.142 1.165h.279l-.446.924ZM25.448 6.184l-1.82 4.233h1.185l.336-.847h1.953l.334.847h1.211l-1.819-4.233h-1.38Zm.674.985.595 1.482h-1.192l.597-1.482ZM28.77 10.416V6.183h1.345l1.718 2.66v-2.66h1.059v4.233H31.59l-1.762-2.73v2.73H28.77ZM7.715 17.825v-4.233h3.453v.947H8.784v.724h2.329v.89H8.784v.753h2.384v.919H7.715ZM24.636 17.825v-4.233h3.454v.947h-2.384v.724h2.317v.89h-2.317v.753h2.384v.919h-3.454ZM11.303 17.825l1.681-2.09-1.721-2.143h1.333l1.025 1.324 1.029-1.324h1.281l-1.699 2.116 1.685 2.117h-1.333l-.996-1.304-.971 1.304h-1.314ZM16.041 13.592v4.233h1.086v-1.337h1.114c.943 0 1.658-.5 1.658-1.472 0-.806-.56-1.424-1.52-1.424H16.04Zm1.086.957h1.174c.304 0 .522.187.522.488 0 .282-.217.487-.526.487h-1.17v-.975ZM20.359 13.592v4.233h1.058V16.32h.446l1.269 1.504h1.293l-1.393-1.56a1.29 1.29 0 0 0 1.162-1.3c0-.89-.7-1.373-1.48-1.373h-2.355Zm1.058.947h1.21c.29 0 .501.226.501.445 0 .281-.273.446-.486.446h-1.225v-.891ZM28.58 17.825v-.92H30.7c.313 0 .449-.169.449-.354 0-.178-.136-.358-.45-.358h-.957c-.831 0-1.295-.507-1.295-1.268 0-.679.424-1.333 1.66-1.333h2.062l-.446.952H29.94c-.341 0-.446.179-.446.35 0 .175.13.369.39.369h1.003c.927 0 1.33.526 1.33 1.215 0 .74-.449 1.347-1.38 1.347H28.58ZM32.464 17.825v-.92h2.118c.313 0 .45-.169.45-.354 0-.178-.136-.358-.45-.358h-.957c-.832 0-1.295-.507-1.295-1.268 0-.679.424-1.333 1.66-1.333h2.02l-.404.952h-1.783c-.34 0-.446.179-.446.35 0 .175.13.369.39.369h1.003c.927 0 1.33.526 1.33 1.215 0 .74-.449 1.347-1.38 1.347h-2.256Z"/></g><defs><clipPath id="a"><rect width="36" height="24" fill="#fff" rx="2"/></clipPath></defs></svg>',autoSize:!0},discover:{icon:'<svg xmlns="http://www.w3.org/2000/svg" width="36" height="24" fill="none"><rect width="36" height="24" fill="#232342" rx="2"/><path fill="#fff" fill-rule="evenodd" d="M30.686 9.61c1.086 0 1.684.484 1.684 1.398a1.307 1.307 0 0 1-1.087 1.397l1.467 1.988h-1.14l-1.25-1.935h-.109v1.935h-.924V9.61h1.359Zm-.435 2.204h.272c.597 0 .869-.269.869-.752 0-.43-.272-.699-.87-.699h-.27v1.45Zm-4.129 2.579h2.608v-.806h-1.684v-1.29h1.63v-.806h-1.63v-1.074h1.684V9.61h-2.608v4.781Zm-2.716-1.559-1.25-3.223h-.978l2.01 4.889h.49l2.01-4.89h-.978l-1.304 3.225Zm-11.029-.805c0 1.343 1.087 2.471 2.445 2.471.435 0 .815-.107 1.195-.269v-1.074c-.271.322-.652.537-1.086.537-.87 0-1.576-.645-1.576-1.504v-.108c-.054-.86.652-1.612 1.521-1.665.435 0 .87.215 1.141.537V9.879c-.326-.214-.76-.268-1.14-.268-1.413-.108-2.5 1.02-2.5 2.418Zm-1.684-.591c-.543-.215-.706-.323-.706-.591.054-.323.326-.591.652-.538.271 0 .543.162.76.376l.49-.644c-.381-.323-.87-.538-1.359-.538-.76-.053-1.412.538-1.467 1.29v.054c0 .644.272 1.02 1.141 1.289.217.054.435.161.652.269a.563.563 0 0 1 .272.483c0 .376-.326.699-.652.699h-.055c-.434 0-.814-.269-.977-.645l-.598.59c.326.592.978.914 1.63.914.869.054 1.575-.59 1.63-1.45v-.162c-.055-.644-.326-.967-1.413-1.396Zm-3.15 2.954h.923V9.611h-.924v4.781ZM3.25 9.611H4.88c1.304.054 2.336 1.128 2.282 2.418 0 .698-.326 1.343-.87 1.826-.488.376-1.086.591-1.684.538H3.25V9.61Zm1.195 3.976c.435.053.924-.108 1.25-.376.326-.323.489-.753.489-1.236 0-.43-.163-.86-.49-1.182-.325-.269-.814-.43-1.249-.376h-.271v3.17h.271Z" clip-rule="evenodd"/><path fill="#FD6020" fill-rule="evenodd" d="M18.788 9.5c-1.358 0-2.499 1.075-2.499 2.471 0 1.344 1.087 2.472 2.5 2.526 1.412.053 2.498-1.075 2.553-2.472C21.287 10.628 20.2 9.5 18.788 9.5Z" clip-rule="evenodd"/></svg>',autoSize:!0},"regular-credit-card":{icon:'<svg xmlns="http://www.w3.org/2000/svg" width="36" height="24" fill="none"><rect width="36" height="24" rx="2" fill=\'rgba(var(--v-regular-credit-card-bg, 205, 209, 211, 1))\'/><g clip-path="url(#a)"><path fill="rgba(var(--v-regular-credit-card-top, 252, 252, 252, 1))" d="M11 5c-1.103 0-2 .897-2 2v1h18V7c0-1.103-.897-2-2-2H11Zm16 6H9v6c0 1.103.897 2 2 2h14c1.103 0 2-.897 2-2v-6Zm-14.5 4h2c.275 0 .5.225.5.5s-.225.5-.5.5h-2a.501.501 0 0 1-.5-.5c0-.275.225-.5.5-.5Zm3.5.5c0-.275.225-.5.5-.5h4c.275 0 .5.225.5.5s-.225.5-.5.5h-4a.501.501 0 0 1-.5-.5Z"/></g><defs><clipPath id="a"><path d="M9 4h18v16H9z" fill=\'rgba(var(--v-regular-credit-card-bottom, 255, 255, 255, 1))\'/></clipPath></defs></svg>',autoSize:!0}}),H([u()],T.prototype,"globalSlimmers",void 0),H([v()],T.prototype,"formFieldController",void 0),H([v()],T.prototype,"changeEventEmitter",void 0),H([v()],T.prototype,"blurEventEmitter",void 0),H([v()],T.prototype,"focusEventEmitter",void 0),H([v()],T.prototype,"inputCreditCardEventPrevent",void 0),H([v()],T.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),T.style=":host{display:inline-block;width:100%;text-align:left;line-height:normal}";export{T as vega_input_credit_card}
|
|
1
|
+
import{r as t,c as i,h as e,H as s,g as h}from"./p-6b2342e0.js";import{F as r}from"./p-87a4d75f.js";import{V as a,M as l,A as o,D as c,i as p}from"./p-8db904dc.js";import{R as d}from"./p-8bc15ed0.js";import{V as n}from"./p-ba662fe5.js";import{s as m}from"./p-519a7d55.js";import{I as v}from"./p-6e1ab235.js";import{V as f,I as u}from"./p-8ce9e214.js";import{F as g}from"./p-320091b7.js";import{F as _}from"./p-cb378636.js";import{C as A}from"./p-2d0d575f.js";import{c as E}from"./p-140616fe.js";import{C as M}from"./p-b1ff70bf.js";import{D as I}from"./p-526e3634.js";import{d as b,M as w,L as j}from"./p-698fbd73.js";import{V as D}from"./p-6031bed1.js";import{S as Z}from"./p-919cddc3.js";import"./p-982747ef.js";import"./p-ed45b3b6.js";import"./p-d4ea8e22.js";import"./p-b438e68b.js";import"./p-0d18368b.js";import"./p-abd7aeaa.js";import"./p-262ec334.js";import"./p-02841589.js";import"./p-331a62d5.js";import"./p-528748fa.js";import"./p-8b5d3a52.js";import"./p-6a334573.js";import"./p-3a68b729.js";import"./p-f0e828d8.js";import"./p-b75ee3ba.js";import"./p-81dd00d0.js";import"./p-49a2e141.js";import"./p-78a57a17.js";import"./p-52b8f2d2.js";import"./p-d27ae9ff.js";import"./p-29e3eb12.js";import"./p-282b37cb.js";import"./p-5f377954.js";import"./p-ffdc25ec.js";import"./p-afcd8f04.js";import"./p-b775e51f.js";const C=[{type:"visa",iconName:"visa",pattern:a,maskConfig:{type:"custom",options:{mask:"9999 9999 9999 9999 999",slot:"9",accept:/\d/,triggerAtInit:r.isEnabled("VEGA_INPUT_CREDIT_CARD.ENABLE_HIDE_NUMBER_MASK_ON_FIRST_LOAD")}}},{type:"mastercard",iconName:"mastercard",pattern:l,maskConfig:{type:"custom",options:{mask:"9999 9999 9999 9999",slot:"9",accept:/\d/,triggerAtInit:r.isEnabled("VEGA_INPUT_CREDIT_CARD.ENABLE_HIDE_NUMBER_MASK_ON_FIRST_LOAD")}}},{type:"amex",iconName:"amex",pattern:o,maskConfig:{type:"custom",options:{mask:"9999 999999 99999",slot:"9",accept:/\d/,triggerAtInit:r.isEnabled("VEGA_INPUT_CREDIT_CARD.ENABLE_HIDE_NUMBER_MASK_ON_FIRST_LOAD")}}},{type:"discover",iconName:"discover",pattern:c,maskConfig:{type:"custom",options:{mask:"9999 9999 9999 9999",slot:"9",accept:/\d/,triggerAtInit:r.isEnabled("VEGA_INPUT_CREDIT_CARD.ENABLE_HIDE_NUMBER_MASK_ON_FIRST_LOAD")}}}],R=[{payloadKey:"AUTO_VALIDATION_IS_TRUE",payloadDescription:"Determines whether the user's input in the credit card field should be automatically validated",payloadValue:t=>!0===t.autoValidation},{payloadKey:"AUTO_VALIDATION_IS_FALSE",payloadDescription:"Determines whether the user's input in the credit card field should be automatically validated",payloadValue:t=>!1===t.autoValidation}];class N extends Z{calculateCaretPosition(t,i){if(!p(i))return null;if(this.getCreditCardMaskConfig(t)){if(t.length>this.getLengthLimit())return i-(t.length-this.getLengthLimit());const e=t.substring(0,i);return i+(this.format(e).length-e.length)}return i}format(t,i){const e=this.getCreditCardMaskConfig(t);if(e){this.setMaskConfig(e.options);const s=null==i?void 0:i.caretPosition;if(t.length>this.getLengthLimit()&&p(s)){const i=[...t],e=t.length-this.getLengthLimit();return i.splice(s-e,e),i.join("")}return this.replaceMaskWithMatchedInputSlots(t,this.getMatchedInputSlotValue(t))}return t}getCreditCardType(t){return C.filter((i=>i.pattern.test(t)))[0]}}class y extends N{constructor(){super({mask:"",slot:"9",accept:/\d/,triggerAtInit:r.isEnabled("VEGA_INPUT_CREDIT_CARD.ENABLE_HIDE_NUMBER_MASK_ON_FIRST_LOAD")})}getCreditCardMaskConfig(t){let i;const e=this.getCreditCardType(t);return e&&(i=e.maskConfig),i}}class V extends N{constructor(t){super({mask:"",slot:"9",accept:/[\d\s]/,insertMode:!1,triggerAtInit:r.isEnabled("VEGA_INPUT_CREDIT_CARD.ENABLE_HIDE_NUMBER_MASK_ON_FIRST_LOAD")}),this.hideCardNumberOnBlur=t}getCreditCardMaskConfig(t){let i;return this.getCreditCardType(t)&&this.hideCardNumberOnBlur&&t.trim().includes(" ")&&(i=this.generateDynamicMask(t)),i}generateDynamicMask(t){const i={type:"custom",options:{mask:"",slot:"9",accept:/[\d\s]/,insertMode:!1,triggerAtInit:r.isEnabled("VEGA_INPUT_CREDIT_CARD.ENABLE_HIDE_NUMBER_MASK_ON_FIRST_LOAD")},trigger:"blur"},e=t.trim().split(" "),s=e.map(((t,i)=>(i===e.length-1?"9":"X").repeat(t.length))).join(" ");return i.options.mask=s,i}}var H=function(t,i,e,s){var h,r=arguments.length,a=r<3?i:null===s?s=Object.getOwnPropertyDescriptor(i,e):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,i,e,s);else for(var l=t.length-1;l>=0;l--)(h=t[l])&&(a=(r<3?h(a):r>3?h(i,e,a):h(i,e))||a);return r>3&&a&&Object.defineProperty(i,e,a),a};const T=class{constructor(s){t(this,s),this.vegaChange=i(this,"vegaChange",7),this.change=i(this,"change",7),this.vegaBlur=i(this,"vegaBlur",7),this.blur=i(this,"blur",7),this.vegaFocus=i(this,"vegaFocus",7),this.focus=i(this,"focus",7),this.globalSlimmers={},this.formFieldController=new g({propertyRules:[{propertyName:"required",ruleFactory:t=>t?new d:null},{propertyName:"",ruleFactory:()=>new n}],validationRulesName:"validationRules",defaultValue:"",attributeGetter:t=>this[t],inputContainerGetter:()=>this.inputContainerGetter(),touchableAreaGetter:()=>this.touchableAreaGetter()}),this.changeEventEmitter=E(T,b),this.blurEventEmitter=E(T,w),this.focusEventEmitter=E(T,j),this.inputCreditCardEventPrevent=new M([b,j,w],(()=>this.host),!0),this.vegaComponentUsageRuntimeMetricsSlimmer=new f(R),this.required=!1,this.optional=!1,this.disabled=!1,this.label="",this.hint="",this.size="default",this.placeholder="",this.hideCardNumberOnBlur=!0,this.autoValidation=!0,this.validationRules=[],this.isValid=null,this.value="",this.renderInputContainer=()=>{var t;const i=(null===(t=this.getCreditCardType(this.value))||void 0===t?void 0:t.iconName)||"regular-credit-card";return e("vega-input",{label:this.label,type:"number",prefixIcon:D.getIconKey(i),maskConfig:this.getMaskConfig(),placeholder:this.placeholder,disabled:this.disabled,size:this.size,value:this.value,hint:this.hint,required:this.required,optional:this.optional,showClearIcon:!1,ref:t=>{this.inputRef=t,I.addUniqueObserverToNode(t,b,(t=>{this.handleVegaChange(t)})),I.addUniqueObserverToNode(t,w,(()=>{this.handleVegaBlur()})),I.addUniqueObserverToNode(t,j,(()=>{this.handleVegaFocus()}))},"data-aria-label":this.label||"Input credit card"})},this.handleVegaChange=t=>{this.value=t.detail},this.handleVegaBlur=()=>{this.blurEventEmitter.emit()},this.handleVegaFocus=()=>{this.focusEventEmitter.emit()},this.inputContainerGetter=()=>this.inputRef.shadowRoot.querySelector(".vega-input-container"),this.touchableAreaGetter=()=>Array.from(this.inputRef.shadowRoot.querySelectorAll("input"))}watchValidationRules(){}watchValue(t){this.changeEventEmitter.emit(t),A.notify(_,{host:this.host,detail:t})}componentDidLoad(){r.isEnabled("VEGA_INPUT_CREDIT_CARD.ENABLE_HIDE_NUMBER_MASK_ON_FIRST_LOAD")&&this.hideCardNumberOnBlur&&this.inputRef.value&&this.value!==this.inputRef.value&&(this.value=this.inputRef.value)}render(){return m(e(s,null,this.renderInputContainer()),this.host)}getCreditCardType(t){return C.filter((i=>i.pattern.test(t)))[0]}getMaskConfig(){return[{type:"custom",trigger:"input",strategy:()=>new y},{type:"custom",trigger:"blur",strategy:()=>new V(this.hideCardNumberOnBlur)}]}get host(){return h(this)}static get watchers(){return{validationRules:["watchValidationRules"],value:["watchValue"]}}};D.register({visa:{icon:'<svg xmlns="http://www.w3.org/2000/svg" width="36" height="24" fill="none"><rect width="36" height="24" fill="#00579F" rx="2"/><path fill="#fff" d="M15.474 15.792h-1.979l1.238-7.653h1.979l-1.238 7.653ZM22.647 8.326A4.877 4.877 0 0 0 20.872 8c-1.954 0-3.33 1.042-3.339 2.532-.016 1.1.986 1.71 1.735 2.076.765.375 1.026.62 1.026.953-.008.513-.619.75-1.189.75-.79 0-1.213-.123-1.857-.408l-.26-.122-.277 1.718c.464.211 1.32.4 2.207.407 2.076 0 3.428-1.026 3.444-2.613.008-.872-.52-1.54-1.66-2.085-.693-.35-1.117-.586-1.117-.944.008-.326.359-.66 1.14-.66a3.362 3.362 0 0 1 1.474.293l.18.082.268-1.653ZM25.279 13.08l.79-2.14c-.008.016.162-.448.26-.733l.138.66s.375 1.831.457 2.214h-1.645ZM27.72 8.14h-1.53c-.472 0-.831.138-1.035.635l-2.94 7.018h2.077l.416-1.148h2.54c.057.269.237 1.148.237 1.148h1.832L27.72 8.14ZM11.842 8.139l-1.938 5.219-.212-1.059c-.358-1.221-1.482-2.548-2.736-3.208l1.775 6.693h2.093l3.11-7.645h-2.092Z"/><path fill="#FAA61A" d="M8.104 8.139H4.92l-.032.154c2.483.635 4.128 2.166 4.804 4.007L9 8.782c-.114-.489-.464-.627-.896-.643Z"/></svg>',autoSize:!0},mastercard:{icon:'<svg xmlns="http://www.w3.org/2000/svg" width="36" height="24" fill="none"><rect width="36" height="24" fill="#000" rx="2"/><path fill="#ED0006" fill-rule="evenodd" d="M18.25 17.157a6.75 6.75 0 0 1-4.426 1.649c-3.769 0-6.824-3.09-6.824-6.903C7 8.091 10.055 5 13.824 5a6.75 6.75 0 0 1 4.426 1.649A6.75 6.75 0 0 1 22.676 5c3.769 0 6.824 3.09 6.824 6.903 0 3.812-3.055 6.903-6.824 6.903a6.75 6.75 0 0 1-4.426-1.65Z" clip-rule="evenodd"/><path fill="#F9A000" fill-rule="evenodd" d="M18.25 17.157a6.92 6.92 0 0 0 2.398-5.254 6.92 6.92 0 0 0-2.398-5.254A6.75 6.75 0 0 1 22.676 5c3.769 0 6.824 3.09 6.824 6.903 0 3.812-3.055 6.903-6.824 6.903a6.75 6.75 0 0 1-4.426-1.65Z" clip-rule="evenodd"/><path fill="#FF5E00" fill-rule="evenodd" d="M18.25 6.65a6.92 6.92 0 0 1 2.398 5.253 6.92 6.92 0 0 1-2.398 5.254 6.92 6.92 0 0 1-2.398-5.254A6.92 6.92 0 0 1 18.25 6.65Z" clip-rule="evenodd"/></svg>',autoSize:!0},amex:{icon:'<svg xmlns="http://www.w3.org/2000/svg" width="36" height="24" fill="none"><g clip-path="url(#a)"><rect width="36" height="24" fill="#016FD0" rx="2"/><path fill="#fff" d="M6.99 18.549v-5.654h5.986l.643.838.663-.838h21.729v5.264s-.569.384-1.226.39H22.754l-.724-.891v.891h-2.373v-1.521s-.325.212-1.025.212h-.808v1.309h-3.593l-.641-.855-.651.855H6.99ZM0 8.634l1.35-3.147h2.334l.767 1.763V5.487h2.902l.456 1.274.442-1.274h13.027v.64s.685-.64 1.81-.64l4.227.015.753 1.74V5.487h2.428l.669 1v-1h2.45v5.654h-2.45l-.64-1.003v1.003h-3.569l-.359-.892h-.959l-.353.892h-2.42c-.968 0-1.587-.628-1.587-.628v.628H17.63l-.725-.892v.892H3.34l-.359-.892h-.956l-.356.892H0V8.634Z"/><path fill="#016FD0" d="M1.827 6.184.006 10.417h1.185l.336-.847H3.48l.335.847h1.211L3.207 6.184h-1.38Zm.673.985.596 1.482H1.903L2.5 7.169ZM5.151 10.416V6.183l1.685.006.98 2.73.956-2.736h1.671v4.233H9.385v-3.12l-1.122 3.12h-.928L6.21 7.296v3.12H5.15ZM11.168 10.416V6.183h3.454v.947h-2.384v.724h2.328v.891h-2.328v.752h2.384v.92h-3.454ZM15.233 6.184v4.233h1.059V8.913h.445l1.27 1.504H19.3l-1.393-1.56a1.29 1.29 0 0 0 1.161-1.3c0-.89-.7-1.373-1.48-1.373h-2.355Zm1.059.947h1.21c.29 0 .5.227.5.446 0 .28-.273.445-.485.445h-1.225v-.891ZM20.582 10.416h-1.08V6.183h1.08v4.233ZM23.144 10.416h-.233c-1.129 0-1.814-.889-1.814-2.1 0-1.24.678-2.133 2.103-2.133h1.17v1.003h-1.213c-.578 0-.988.451-.988 1.141 0 .82.468 1.165 1.142 1.165h.279l-.446.924ZM25.448 6.184l-1.82 4.233h1.185l.336-.847h1.953l.334.847h1.211l-1.819-4.233h-1.38Zm.674.985.595 1.482h-1.192l.597-1.482ZM28.77 10.416V6.183h1.345l1.718 2.66v-2.66h1.059v4.233H31.59l-1.762-2.73v2.73H28.77ZM7.715 17.825v-4.233h3.453v.947H8.784v.724h2.329v.89H8.784v.753h2.384v.919H7.715ZM24.636 17.825v-4.233h3.454v.947h-2.384v.724h2.317v.89h-2.317v.753h2.384v.919h-3.454ZM11.303 17.825l1.681-2.09-1.721-2.143h1.333l1.025 1.324 1.029-1.324h1.281l-1.699 2.116 1.685 2.117h-1.333l-.996-1.304-.971 1.304h-1.314ZM16.041 13.592v4.233h1.086v-1.337h1.114c.943 0 1.658-.5 1.658-1.472 0-.806-.56-1.424-1.52-1.424H16.04Zm1.086.957h1.174c.304 0 .522.187.522.488 0 .282-.217.487-.526.487h-1.17v-.975ZM20.359 13.592v4.233h1.058V16.32h.446l1.269 1.504h1.293l-1.393-1.56a1.29 1.29 0 0 0 1.162-1.3c0-.89-.7-1.373-1.48-1.373h-2.355Zm1.058.947h1.21c.29 0 .501.226.501.445 0 .281-.273.446-.486.446h-1.225v-.891ZM28.58 17.825v-.92H30.7c.313 0 .449-.169.449-.354 0-.178-.136-.358-.45-.358h-.957c-.831 0-1.295-.507-1.295-1.268 0-.679.424-1.333 1.66-1.333h2.062l-.446.952H29.94c-.341 0-.446.179-.446.35 0 .175.13.369.39.369h1.003c.927 0 1.33.526 1.33 1.215 0 .74-.449 1.347-1.38 1.347H28.58ZM32.464 17.825v-.92h2.118c.313 0 .45-.169.45-.354 0-.178-.136-.358-.45-.358h-.957c-.832 0-1.295-.507-1.295-1.268 0-.679.424-1.333 1.66-1.333h2.02l-.404.952h-1.783c-.34 0-.446.179-.446.35 0 .175.13.369.39.369h1.003c.927 0 1.33.526 1.33 1.215 0 .74-.449 1.347-1.38 1.347h-2.256Z"/></g><defs><clipPath id="a"><rect width="36" height="24" fill="#fff" rx="2"/></clipPath></defs></svg>',autoSize:!0},discover:{icon:'<svg xmlns="http://www.w3.org/2000/svg" width="36" height="24" fill="none"><rect width="36" height="24" fill="#232342" rx="2"/><path fill="#fff" fill-rule="evenodd" d="M30.686 9.61c1.086 0 1.684.484 1.684 1.398a1.307 1.307 0 0 1-1.087 1.397l1.467 1.988h-1.14l-1.25-1.935h-.109v1.935h-.924V9.61h1.359Zm-.435 2.204h.272c.597 0 .869-.269.869-.752 0-.43-.272-.699-.87-.699h-.27v1.45Zm-4.129 2.579h2.608v-.806h-1.684v-1.29h1.63v-.806h-1.63v-1.074h1.684V9.61h-2.608v4.781Zm-2.716-1.559-1.25-3.223h-.978l2.01 4.889h.49l2.01-4.89h-.978l-1.304 3.225Zm-11.029-.805c0 1.343 1.087 2.471 2.445 2.471.435 0 .815-.107 1.195-.269v-1.074c-.271.322-.652.537-1.086.537-.87 0-1.576-.645-1.576-1.504v-.108c-.054-.86.652-1.612 1.521-1.665.435 0 .87.215 1.141.537V9.879c-.326-.214-.76-.268-1.14-.268-1.413-.108-2.5 1.02-2.5 2.418Zm-1.684-.591c-.543-.215-.706-.323-.706-.591.054-.323.326-.591.652-.538.271 0 .543.162.76.376l.49-.644c-.381-.323-.87-.538-1.359-.538-.76-.053-1.412.538-1.467 1.29v.054c0 .644.272 1.02 1.141 1.289.217.054.435.161.652.269a.563.563 0 0 1 .272.483c0 .376-.326.699-.652.699h-.055c-.434 0-.814-.269-.977-.645l-.598.59c.326.592.978.914 1.63.914.869.054 1.575-.59 1.63-1.45v-.162c-.055-.644-.326-.967-1.413-1.396Zm-3.15 2.954h.923V9.611h-.924v4.781ZM3.25 9.611H4.88c1.304.054 2.336 1.128 2.282 2.418 0 .698-.326 1.343-.87 1.826-.488.376-1.086.591-1.684.538H3.25V9.61Zm1.195 3.976c.435.053.924-.108 1.25-.376.326-.323.489-.753.489-1.236 0-.43-.163-.86-.49-1.182-.325-.269-.814-.43-1.249-.376h-.271v3.17h.271Z" clip-rule="evenodd"/><path fill="#FD6020" fill-rule="evenodd" d="M18.788 9.5c-1.358 0-2.499 1.075-2.499 2.471 0 1.344 1.087 2.472 2.5 2.526 1.412.053 2.498-1.075 2.553-2.472C21.287 10.628 20.2 9.5 18.788 9.5Z" clip-rule="evenodd"/></svg>',autoSize:!0},"regular-credit-card":{icon:'<svg xmlns="http://www.w3.org/2000/svg" width="36" height="24" fill="none"><rect width="36" height="24" rx="2" fill=\'rgba(var(--v-regular-credit-card-bg, 205, 209, 211, 1))\'/><g clip-path="url(#a)"><path fill="rgba(var(--v-regular-credit-card-top, 252, 252, 252, 1))" d="M11 5c-1.103 0-2 .897-2 2v1h18V7c0-1.103-.897-2-2-2H11Zm16 6H9v6c0 1.103.897 2 2 2h14c1.103 0 2-.897 2-2v-6Zm-14.5 4h2c.275 0 .5.225.5.5s-.225.5-.5.5h-2a.501.501 0 0 1-.5-.5c0-.275.225-.5.5-.5Zm3.5.5c0-.275.225-.5.5-.5h4c.275 0 .5.225.5.5s-.225.5-.5.5h-4a.501.501 0 0 1-.5-.5Z"/></g><defs><clipPath id="a"><path d="M9 4h18v16H9z" fill=\'rgba(var(--v-regular-credit-card-bottom, 255, 255, 255, 1))\'/></clipPath></defs></svg>',autoSize:!0}}),H([u()],T.prototype,"globalSlimmers",void 0),H([v()],T.prototype,"formFieldController",void 0),H([v()],T.prototype,"changeEventEmitter",void 0),H([v()],T.prototype,"blurEventEmitter",void 0),H([v()],T.prototype,"focusEventEmitter",void 0),H([v()],T.prototype,"inputCreditCardEventPrevent",void 0),H([v()],T.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),T.style=":host{display:inline-block;width:100%;text-align:left;line-height:normal}";export{T as vega_input_credit_card}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,c as e,h as i,H as a,g as r}from"./p-6b2342e0.js";import{M as s,a as p}from"./p-f0ff4463.js";import{s as o}from"./p-519a7d55.js";import{c as n,n as h}from"./p-262ec334.js";import{I as l}from"./p-6e1ab235.js";import{V as d,I as m}from"./p-8ce9e214.js";import{F as c}from"./p-
|
|
1
|
+
import{r as t,c as e,h as i,H as a,g as r}from"./p-6b2342e0.js";import{M as s,a as p}from"./p-f0ff4463.js";import{s as o}from"./p-519a7d55.js";import{c as n,n as h}from"./p-262ec334.js";import{I as l}from"./p-6e1ab235.js";import{V as d,I as m}from"./p-8ce9e214.js";import{F as c}from"./p-320091b7.js";import{C as u}from"./p-b1ff70bf.js";import{D as f}from"./p-526e3634.js";import{d as b,M as g,a as v}from"./p-698fbd73.js";import{F as x}from"./p-cb378636.js";import{C as y}from"./p-2d0d575f.js";import{c as j}from"./p-140616fe.js";import{a as w}from"./p-528748fa.js";import"./p-abd7aeaa.js";import"./p-02841589.js";import"./p-331a62d5.js";import"./p-8b5d3a52.js";import"./p-6a334573.js";import"./p-3a68b729.js";import"./p-0d18368b.js";import"./p-f0e828d8.js";import"./p-b75ee3ba.js";import"./p-81dd00d0.js";import"./p-49a2e141.js";import"./p-d4ea8e22.js";import"./p-ed45b3b6.js";import"./p-78a57a17.js";import"./p-52b8f2d2.js";import"./p-d27ae9ff.js";import"./p-29e3eb12.js";import"./p-282b37cb.js";import"./p-5f377954.js";import"./p-87a4d75f.js";import"./p-982747ef.js";const I=[{payloadKey:"AUTO_VALIDATION_IS_TRUE",payloadDescription:"Determines whether automatic validation should be implemented for the stepper component",payloadValue:t=>!0===t.autoValidation},{payloadKey:"AUTO_VALIDATION_IS_FALSE",payloadDescription:"Determines whether automatic validation should be implemented for the stepper component",payloadValue:t=>!1===t.autoValidation},{payloadKey:"BUTTON_VARIANT_IS_PRIMARY",payloadDescription:"Specifies the style variant for the stepper buttons.",payloadValue:t=>"primary"===t.buttonVariant},{payloadKey:"BUTTON_VARIANT_IS_SECONDARY",payloadDescription:"Specifies the style variant for the stepper buttons.",payloadValue:t=>"secondary"===t.buttonVariant}];var A=function(t,e,i,a){var r,s=arguments.length,p=s<3?e:null===a?a=Object.getOwnPropertyDescriptor(e,i):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)p=Reflect.decorate(t,e,i,a);else for(var o=t.length-1;o>=0;o--)(r=t[o])&&(p=(s<3?r(p):s>3?r(e,i,p):r(e,i))||p);return s>3&&p&&Object.defineProperty(e,i,p),p};const V=class{constructor(i){t(this,i),this.vegaChange=e(this,"vegaChange",7),this.change=e(this,"change",7),this.globalSlimmers={},this.formFieldController=new c({propertyRules:[{propertyName:"min",ruleFactory:t=>"number"==typeof t?new s({minValue:t}):null},{propertyName:"max",ruleFactory:t=>"number"==typeof t?new p({maxValue:t}):null}],defaultValue:0,attributeGetter:t=>this[t],touchableAreaGetter:()=>this.touchableAreaGetter(),inputContainerGetter:()=>this.stepperContainerRef}),this.changeEventEmitter=j(V,b),this.inputEventPrevent=new u([g,b],(()=>this.stepperContainerRef)),this.vegaComponentUsageRuntimeMetricsSlimmer=new d(I),this.max=9999,this.min=0,this.value=0,this.label="",this.inputDisabled=null,this.disabled=!1,this.isValid=null,this.autoValidation=!0,this.buttonVariant="primary",this.onDecrease=()=>{this.value>this.max?this.value=this.max:this.value>this.min&&(this.value-=1)},this.onIncrease=()=>{this.value<this.max&&(this.value+=1)},this.onChildInputChange=t=>{""!==t.detail&&(this.value=n(t.detail))},this.handleInputBlur=t=>{""===t.host.value&&(this.value=this.min)},this.touchableAreaGetter=()=>Array.from(this.inputRef.shadowRoot.querySelectorAll("input"))}watchValue(){const t=h(n(this.value,0),this.min,this.max);this.value=t,this.inputRef.value=t.toString(),this.changeEventEmitter.emit(this.value),y.notify(x,{host:this.host,detail:this.value})}render(){return o(i(a,{class:w(["vega-flex-shrink-0",this.inputDisabled||this.disabled?"disabled":""])},this.renderLabelDom(),i("div",{class:{"vega-stepper-container":!0,"vega-stepper-container-edited":this.inputDisabled},ref:t=>this.stepperContainerRef=t},i("vega-button-circle",{label:"Decrease",showTooltip:!1,icon:"minus-sign",ref:t=>{f.addUniqueObserverToNode(t,v,(()=>this.onDecrease()))},disabled:this.value<=this.min||this.disabled,size:"small",variant:"secondary"==this.buttonVariant?"secondary":"primary"}),i("vega-input",{size:"small",type:"number",max:this.max,min:this.min,value:`${this.value}`,disabled:this.inputDisabled||this.disabled,showClearIcon:!1,ref:t=>(f.addUniqueObserverToNode(t,g,(t=>this.handleInputBlur(t))),f.addUniqueObserverToNode(t,b,(t=>this.onChildInputChange(t))),this.inputRef=t),"data-aria-label":this.label||"stepper"}),i("vega-button-circle",{label:"Increase",showTooltip:!1,ref:t=>{f.addUniqueObserverToNode(t,v,(()=>this.onIncrease()))},icon:"plus-sign",disabled:this.value>=this.max||this.disabled,size:"small",variant:"secondary"==this.buttonVariant?"secondary":"primary"})),i("div",{class:"aria-announcement","aria-live":"polite","aria-atomic":"true"},`${this.label||"stepper"}: ${this.value}`)),this.host)}renderLabelDom(){return this.label?i("label",{class:"v-text-center v-text-medium-typeset-1",htmlFor:this.stepperId},this.label):null}get host(){return r(this)}static get watchers(){return{value:["watchValue"]}}};A([m()],V.prototype,"globalSlimmers",void 0),A([l()],V.prototype,"formFieldController",void 0),A([l()],V.prototype,"changeEventEmitter",void 0),A([l()],V.prototype,"inputEventPrevent",void 0),A([l()],V.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),V.style=':host{display:inline-block;line-height:normal}:host>label{display:block;font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:22px;letter-spacing:0px;color:rgba(var(--v-text-primary, 32, 54, 69, 1));text-align:center}@media screen and (min-width: 768px) and (max-width: 1023px){:host>label{font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:22px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){:host>label{font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:22px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){:host>label{font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:22px;letter-spacing:0px}}:host>div{display:inline-flex;justify-content:center;align-items:center}:host>label+div{margin-top:8px}:host div.vega-stepper-container-edited vega-input::part(container-wrapper){padding-left:0px;padding-right:0px}:host(.disabled) vega-input::part(input-container){text-align:center;background-color:rgba(var(--v-bg-transparent, 0, 0, 0, 0));padding:0px;border:0;box-shadow:unset}:host(.disabled) vega-input::part(input-container):hover{border:0}:host(.disabled) vega-input::part(input){background-color:rgba(var(--v-bg-transparent, 0, 0, 0, 0));color:rgba(var(--v-text-primary, 32, 54, 69, 1));border:0}:host vega-input::part(input){width:48px;text-align:center;-moz-appearance:textfield}:host vega-input::part(input)::-webkit-inner-spin-button{-webkit-appearance:none}:host vega-input::part(input)::-webkit-outer-spin-button{-webkit-appearance:none}:host vega-input::part(error){display:none}:host vega-input::part(container-wrapper){padding-left:8px;padding-right:8px}:host .vega-error{display:none}:host .vega-stepper-container.error vega-input::part(input-container){border:1px solid rgba(var(--v-border-input-field-danger, 230, 50, 87, 1))}:host .vega-stepper-container.error vega-input::part(input-container):hover{border:1px solid rgba(var(--v-border-input-field-danger-hover, 255, 87, 114, 1))}:host .vega-stepper-container.error vega-input::part(input-container):focus-within{outline:2px solid rgba(var(--v-border-color-danger, 230, 50, 87, 1));outline-offset:3px;border:1px solid rgba(var(--v-border-color-input-field-danger-focus, 233, 71, 104, 1))}.aria-announcement{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap;border:0}';export{V as vega_stepper}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{B as t,a as e,M as s,C as n,l as r,f as i,d as o}from"./p-88863658.js";import{c as a}from"./p-a841cf13.js";import{V as c}from"./p-3e09aeed.js";import"./p-6e1ab235.js";import{I as l,c as h}from"./p-afcd8f04.js";import{r as u}from"./p-528748fa.js";import{i as d}from"./p-19c42e30.js";import{g as p}from"./p-8b5d3a52.js";import{U as E,V as f}from"./p-4256252c.js";const L=[{payloadKey:"IS_OVERRIDECOLORS_METHOD_CALLED",payloadDescription:"Indicate if the method overrideColors of public API ThemeManager is called",canAccept:(t,e)=>"ThemeManager"===t&&"overrideColors"===e,payloadValue:()=>!0},{payloadKey:"IS_RESET_METHOD_CALLED",payloadDescription:"Indicate if the method reset of public API ThemeManager is called",canAccept:(t,e)=>"ThemeManager"===t&&"reset"===e,payloadValue:()=>!0},{payloadKey:"IS_TOGGLEDARKMODE_METHOD_CALLED",payloadDescription:"Indicate if the method toggleDarkMode of public API ThemeManager is called",canAccept:(t,e)=>"ThemeManager"===t&&"toggleDarkMode"===e,payloadValue:()=>!0},{payloadKey:"IS_ISDARKMODE_METHOD_CALLED",payloadDescription:"Indicate if the method isDarkMode of public API ThemeManager is called",canAccept:(t,e)=>"ThemeManager"===t&&"isDarkMode"===e,payloadValue:()=>!0},{payloadKey:"IS_APPLY_BRANDING_METHOD_CALLED",payloadDescription:"Indicate if the method applyBranding of public API ThemeManager is called",canAccept:(t,e)=>"ThemeManager"===t&&"applyBranding"===e,payloadValue:()=>!0},{payloadKey:"IS_VALIDATECOLORACCESSIBILITY_METHOD_CALLED",payloadDescription:"Indicate if the method validateColorAccessibility of public API ThemeManager is called",canAccept:(t,e)=>"ThemeManager"===t&&"validateColorAccessibility"===e,payloadValue:()=>!0}];class b{constructor(){this.vegaPublicAPIRuntimeMetricsSlimmer=h(b,["overrideColors","reset","toggleDarkMode","isDarkMode","applyBranding","validateColorAccessibility"],L,"ThemeManager")}async overrideColors(t){c.overrideColors(t)}async reset(){c.reset()}toggleDarkMode(t){c.toggleDarkMode(t)}isDarkMode(){return c.isDarkMode()}applyBranding(t){c.applyBranding(t)}async validateColorAccessibility(t){return c.validateColorAccessibility(t)}}!function(t,e,s,n){var r,i=arguments.length,o=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,s):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,s,n);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(o=(i<3?r(o):i>3?r(e,s,o):r(e,s))||o);i>3&&o&&Object.defineProperty(e,s,o)}([l()],b.prototype,"vegaPublicAPIRuntimeMetricsSlimmer",void 0);const g=new b,C=["none","solid","dashed","dotted","double","groove","ridge","inset","outset"],T=[{key:"white",dark:"#04041C",light:"#FCFCFC"},{key:"red",dark:"#AA091C",light:"#FF4C61"},{key:"orange",dark:"#974502",light:"#FDAB68"},{key:"yellow",dark:"#735C00",light:"#FFDC4C"},{key:"green",dark:"#2E6D18",light:"#7BDA58"},{key:"teal",dark:"#287171",light:"#7BD1D1"},{key:"gray",dark:"#595959",light:"#999999"},{key:"black",dark:"#FCFCFC",light:"#04041C"}],_={key:"default-head-bg",dark:"#181830",light:"#F0F3F7"};class m{static getTableColors(){return m.TABLE_COLORS}static setTableColors(t){m.TABLE_COLORS=t}static getColorKey(t,e=!1){var s;let n=null;const r=m.TABLE_COLORS,i=e?[...r,_]:r;if(i){const e=null===(s=u(t))||void 0===s?void 0:s.toUpperCase();if(e)n=i.find((t=>g.isDarkMode()?t.dark===e:t.light===e));else for(const e of i)if(e.key===t){n=e;break}}return n?n.key:""}}m.TABLE_COLORS=T;class O extends t{constructor(t){super(),this.type=A.COLOR,this.colorKey=t,t&&(this.color=this.formatColor(t))}renderStyle(){return{color:this.color?c.isDarkMode()?this.color.dark:this.color.light:this.colorKey||""}}renderClass(){return null}toJSON(){var t;return{color:(null===(t=this.color)||void 0===t?void 0:t.key)||this.colorKey||""}}clone(){return new O(this.colorKey)}formatColor(t){return m.getTableColors().find((e=>e.key===t))}}var A,S;!function(t){t.TABLE="EXTENSION_TABLE",t.CELL="EXTENSION_TABLE_CELL",t.CAPTION="EXTENSION_TABLE_CAPTION",t.COLOR="EXTENSION_TABLE_COLOR"}(A||(A={}));class y extends t{constructor({backgroundColor:t,border:e,width:s,height:n,alignment:r,borderCollapse:i}={},o=!0){super(),this.type=A.TABLE,this.useInternalStyle=o,this.backgroundColor=t,this.border=e,this.width=s,this.height=n,this.alignment=o&&void 0===r?y.DEFAULT_ALIGNMENT:r,this.backgroundColorAnnotation=new O(t),this.borderColorAnnotation=new O(null==e?void 0:e.color),this.borderCollapse=o&&void 0===i?y.DEFAULT_BORDER_COLLAPSE:i}static from(t,e=!0){return[A.TABLE,new y(t,e)]}static getDefaultStyles(){return{borderCollapse:y.DEFAULT_BORDER_COLLAPSE,margin:y.DEFAULT_ALIGNMENT_STYLE_VALUE}}get borderStr(){return this.border?`${this.border.style} ${this.border.width} ${this.borderColorAnnotation.renderStyle().color}`.trim():null}clone(){return new y({backgroundColor:this.backgroundColor,border:this.border,width:this.width,height:this.height,alignment:this.alignment,borderCollapse:this.borderCollapse},this.useInternalStyle)}toJSON(){return{table:a({backgroundColor:this.backgroundColor,border:this.border,width:this.width,height:this.height,alignment:this.alignment,borderCollapse:this.borderCollapse})}}renderStyle(){const t=this.backgroundColorAnnotation.renderStyle().color,e=Object.assign({border:this.borderStr,width:this.width,height:this.height,borderCollapse:this.borderCollapse},this.renderAlignmentStyle());return t&&(e.backgroundColor=t),a(e)}renderClass(){return"v-rte--extension-table"}renderAlignmentStyle(){return this.alignment?{margin:"center"===this.alignment?y.DEFAULT_ALIGNMENT_STYLE_VALUE:"left"===this.alignment?"0":"0 0 0 auto"}:{}}}y.DEFAULT_BORDER_COLLAPSE="collapse",y.DEFAULT_ALIGNMENT="center",y.DEFAULT_ALIGNMENT_STYLE_VALUE="0 auto";class w extends e{constructor(t,e){super(t),this.dtoName=w.dtoName,this.type="table-block",this.children=[];const{autoMatchFormat:s}=e||{autoMatchFormat:!0};s&&this.annotationMap.set(A.TABLE,new y)}static from(t,e){var s;const n=new w(t.id,e);return super.convertAnnotationsToMap(n.annotationMap,Object.assign({},t.annotations)),n.children=super.generateBlockChildren(t.children,e,n),(null===(s=t.annotations)||void 0===s?void 0:s.table)&&n.annotationMap.set(...y.from(t.annotations.table,null==e?void 0:e.autoMatchFormat)),n}clone(t){const e=new w(this.id);return e.children=this.children.map((t=>t.clone(e))),e.parent=t,e.annotationMap=super.cloneAnnotations(),e}getLastNode(){return this.children[this.children.length-1].getLastNode()}getFirstNode(){return this.hasCaption()?this.children[0].children[0].getLastNode():this.children[0].children[0].children[0].getLastNode()}isNotEmpty(){return this.children.length>0}toHtml(t){const e=this.children.map((e=>e.toHtml(t))).join("");return`<table${super.generateAttributeString(t)}>${e}</table>`}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{type:this.type,children:this.children.map((t=>t.toJSON()))})}getCaption(){const t=this.children.find((t=>"table-caption"===t.type));return null!=t?t:null}setCaption(t){const e=this.children.findIndex((t=>"table-caption"===t.type));t?(t.parent=this,e>=0?this.children[e]=t:this.children.unshift(t)):e>=0&&this.children.splice(e,1)}hasCaption(){return d(this.getCaption())}}w.dtoName="RTETableBlock",function(t){t.ROW="ROW",t.CAPTION="CAPTION",t.COLUMN="COLUMN",t.MERGE_CELLS="MERGE_CELLS",t.TABLE="TABLE",t.CELL="CELL",t.SPLIT_CELL="SPLIT_CELL"}(S||(S={}));class R{syncCursorPosition(t,e){const s=this.findRootContent(t);if(e&&s){const t=e.getRangeEndOffset();s.apply(new E(e,t))}}findRootContent(t){let e=t.parent;for(;e;){if(e instanceof f)return e;e=e.parent}}}const N="DELETE_TABLE_ROW";class M extends s{constructor(t){super(),this.isFlushable=!0,this.type="DELETE_TABLE_ROW",this.rowsToBeRemoved=t}}const I="INSERT_TABLE_ROW_INTO_DIFFERENT_SECTION";class D extends s{constructor(t,e=[]){super(),this.isFlushable=!0,this.type="INSERT_TABLE_ROW_INTO_DIFFERENT_SECTION",this.selectedRows=[],this.insertDirection=t,this.selectedRows=e}}const v="INSERT_TABLE_ROW_INTO_SAME_SECTION";var x;!function(t){t.ABOVE="ABOVE",t.BELOW="BELOW"}(x||(x={}));class k extends s{constructor(t,e=[]){super(),this.isFlushable=!0,this.type="INSERT_TABLE_ROW_INTO_SAME_SECTION",this.selectedRows=[],this.insertDirection=t,this.selectedRows=e}}const B="TOGGLE_HEADER_ROW";class j extends s{constructor(t){super(),this.isFlushable=!0,this.type="TOGGLE_HEADER_ROW",this.selectedRows=t}}class H extends e{constructor(t){super(t),this.dtoName=H.dtoName,this.type="table-body",this.children=[]}static from(t,e){const s=new H(t.id);return super.convertAnnotationsToMap(s.annotationMap,Object.assign({},t.annotations)),s.children=super.generateBlockChildren(t.children,e,s),s}clone(t){const e=new H(this.id);return e.children=this.children.map((t=>t.clone(e))),e.parent=t,e.annotationMap=super.cloneAnnotations(),e}getLastNode(){return this.children[this.children.length-1].getLastNode()}isNotEmpty(){return this.children.length>0}toHtml(t){const e=this.children.map((e=>e.toHtml(t))).join("");return`<tbody${super.generateAttributeString(t)}>${e}</tbody>`}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{type:this.type,children:this.children.map((t=>t.toJSON()))})}}H.dtoName="RTETableBodyBlock";class F extends e{constructor(t){super(t),this.dtoName=F.dtoName,this.type="table-head",this.children=[]}static from(t,e){const s=new F(t.id);return super.convertAnnotationsToMap(s.annotationMap,Object.assign({},t.annotations)),s.children=super.generateBlockChildren(t.children,e,s),s}clone(t){const e=new F(this.id);return e.children=this.children.map((t=>t.clone(e))),e.parent=t,e.annotationMap=super.cloneAnnotations(),e}getLastNode(){return this.children[this.children.length-1].getLastNode()}isNotEmpty(){return this.children.length>0}toHtml(t){const e=this.children.map((e=>e.toHtml(t))).join("");return`<thead${super.generateAttributeString(t)}>${e}</thead>`}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{type:this.type,children:this.children.map((t=>t.toJSON()))})}}F.dtoName="RTETableHeadBlock";class $ extends e{constructor(t){super(t),this.dtoName=$.dtoName,this.type="table-row",this.children=[]}static from(t,e){const s=new $(t.id);return super.convertAnnotationsToMap(s.annotationMap,Object.assign({},t.annotations)),s.children=super.generateBlockChildren(t.children,e,s),s}clone(t){const e=new $(this.id);return e.children=this.children.map((t=>t.clone(e))),e.parent=t,e.annotationMap=super.cloneAnnotations(),e}getLastNode(){return this.children[this.children.length-1].getLastNode()}isNotEmpty(){return this.children.length>0}toHtml(t){const e=this.children.map((e=>e.toHtml(t))).join("");return`<tr${super.generateAttributeString(t)}>${e}</tr>`}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{type:this.type,children:this.children.map((t=>t.toJSON()))})}}$.dtoName="RTETableRowBlock";class P extends t{constructor({backgroundColor:t,padding:e,border:s,width:n,height:r,textAlign:i,verticalAlign:o,minWidth:a,boxSizing:c}={},l=!0){super(),this.type=A.CELL,this.useInternalStyle=l,this.backgroundColor=t,this.width=n,this.height=r,this.border=l&&void 0===s?P.DEFAULT_BORDER:s,this.padding=l&&void 0===e?P.DEFAULT_PADDING:e,this.textAlign=l&&void 0===i?P.DEFAULT_HORIZONTAL_TEXT_ALIGN:i,this.verticalAlign=l&&void 0===o?P.DEFAULT_VERTICAL_TEXT_ALIGN:o,this.minWidth=l&&void 0===a?P.DEFAULT_CELL_MIN_WIDTH:a,this.boxSizing=l&&void 0===c?P.DEFAULT_BOX_SIZING:c}static from(t,e){return[A.CELL,new P(t,e)]}static getDefaultStyles(t=!0){return{padding:P.DEFAULT_PADDING,textAlign:P.DEFAULT_HORIZONTAL_TEXT_ALIGN,verticalAlign:P.DEFAULT_VERTICAL_TEXT_ALIGN,minWidth:P.DEFAULT_CELL_MIN_WIDTH,boxSizing:P.DEFAULT_BOX_SIZING,border:`${P.DEFAULT_BORDER.style} ${P.DEFAULT_BORDER.width} ${t?P.DEFAULT_BORDER.color:P.DEFAULT_BORDER_RGB_COLOR}`}}get borderStr(){return this.border?`${this.border.style||""} ${this.border.width||""} ${this.borderColorAnnotation.renderStyle().color}`.trim():null}set backgroundColor(t){this._backgroundColor=t,this.backgroundColorAnnotation=new O(t)}get backgroundColor(){return this._backgroundColor}set border(t){this._border=t,this.borderColorAnnotation=new O(null==t?void 0:t.color)}get border(){return this._border}clone(){return new P({backgroundColor:this.backgroundColor,padding:this.padding,border:this.border,width:this.width,height:this.height,textAlign:this.textAlign,verticalAlign:this.verticalAlign,minWidth:this.minWidth,boxSizing:this.boxSizing},this.useInternalStyle)}toJSON(){return{tableCell:a({backgroundColor:this.backgroundColor,padding:this.padding,border:this.border,width:this.width,height:this.height,textAlign:this.textAlign,verticalAlign:this.verticalAlign,minWidth:this.minWidth,boxSizing:this.boxSizing})}}renderStyle(t){const e=this.backgroundColorAnnotation.renderStyle().color,s={padding:this.padding,border:this.borderStr,width:this.width,height:this.height,textAlign:this.textAlign,verticalAlign:this.verticalAlign,minWidth:this.minWidth,boxSizing:this.boxSizing};return e&&(s.backgroundColor=e),a((null==t?void 0:t.standalone)?s:this.removeDefaultValues(s),{cleanEmptyString:!0})}renderClass(){return null}removeDefaultValues(t){const e=Object.assign({},t);return e.padding===P.DEFAULT_PADDING&&delete e.padding,e.border===`${P.DEFAULT_BORDER.style} ${P.DEFAULT_BORDER.width} ${P.DEFAULT_BORDER.color}`&&delete e.border,e.textAlign===P.DEFAULT_HORIZONTAL_TEXT_ALIGN&&delete e.textAlign,e.verticalAlign===P.DEFAULT_VERTICAL_TEXT_ALIGN&&delete e.verticalAlign,e.minWidth===P.DEFAULT_CELL_MIN_WIDTH&&delete e.minWidth,e.boxSizing===P.DEFAULT_BOX_SIZING&&delete e.boxSizing,e}}P.DEFAULT_PADDING="12px",P.DEFAULT_BORDER={style:"solid",width:"1px",color:"#ddd"},P.DEFAULT_BORDER_RGB_COLOR="rgb(221, 221, 221)",P.DEFAULT_HORIZONTAL_TEXT_ALIGN="left",P.DEFAULT_VERTICAL_TEXT_ALIGN="middle",P.DEFAULT_CELL_MIN_WIDTH="55px",P.DEFAULT_BOX_SIZING="border-box";class W extends e{constructor(t,e){super(t),this.dtoName=W.dtoName,this.type="table-cell",this.children=[];const{autoMatchFormat:s}=e||{autoMatchFormat:!0};s&&this.annotationMap.set(A.CELL,new P)}static from(t,e){var s;const n=new W(t.id,e);return super.convertAnnotationsToMap(n.annotationMap,Object.assign({},t.annotations)),(null===(s=t.annotations)||void 0===s?void 0:s.tableCell)&&n.annotationMap.set(...P.from(t.annotations.tableCell,null==e?void 0:e.autoMatchFormat)),n.children=super.generateBlockChildren(t.children,e,n),n}clone(t){const e=new W(this.id);return e.children=this.children.map((t=>t.clone(e))),e.parent=t,e.annotationMap=super.cloneAnnotations(),e}getLastNode(){return this.children[this.children.length-1].getLastNode()}isNotEmpty(){return this.children.length>0}get rowSpan(){const t=this.getCustomAttributeByName("rowspan");return isNaN(Number(t))?1:Math.max(Number(t),1)}get colSpan(){const t=this.getCustomAttributeByName("colspan");return isNaN(Number(t))?1:Math.max(Number(t),1)}toHtml(t){const e=this.children.map((e=>e.toHtml(t))).join("");return`<td${super.generateAttributeString(t)}>${e}</td>`}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{type:this.type,children:this.children.map((t=>t.toJSON()))})}getCustomAttributeByName(t){const e=this.getCustomAttributesAnnotation();if(e)return(e.toJSON().customAttribute||{})[t]}}W.dtoName="RTETableCellBlock";class G extends P{constructor(t={},e=!0){super(t,e)}static from(t,e){return[A.CELL,new G(t,e)]}static getDefaultBackgroundColor(){return c.isDarkMode()?_.dark:_.light}clone(){return new G({backgroundColor:this.backgroundColor,padding:this.padding,border:this.border,width:this.width,height:this.height,textAlign:this.textAlign,verticalAlign:this.verticalAlign,minWidth:this.minWidth,boxSizing:this.boxSizing},this.useInternalStyle)}renderStyle(t){var e;const s=super.renderStyle(t);return a(Object.assign(Object.assign({},s),{backgroundColor:null!==(e=s.backgroundColor)&&void 0!==e?e:G.getDefaultBackgroundColor()}))}}class V extends W{constructor(t,e){super(t,e),this.dtoName=V.dtoName,this.type="table-head-cell";const{autoMatchFormat:s}=e||{autoMatchFormat:!0};s&&this.annotationMap.set(A.CELL,new G)}static from(t,e){var s;const n=new V(t.id,e);return super.convertAnnotationsToMap(n.annotationMap,Object.assign({},t.annotations)),(null===(s=t.annotations)||void 0===s?void 0:s.tableCell)&&n.annotationMap.set(...G.from(t.annotations.tableCell,null==e?void 0:e.autoMatchFormat)),n.children=super.generateBlockChildren(t.children,e,n),n}clone(t){const e=new V(this.id);return e.children=this.children.map((t=>t.clone(e))),e.parent=t,e.annotationMap=super.cloneAnnotations(),e}toHtml(t){const e=this.children.map((e=>e.toHtml(t))).join("");return`<th${super.generateAttributeString(t)}>${e}</th>`}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{type:this.type,children:this.children.map((t=>t.toJSON()))})}}V.dtoName="RTETableHeadCellBlock";const U="MERGE_CELLS";class J extends s{constructor(t,e,s,n,r){super(),this.type="MERGE_CELLS",this.isFlushable=!0,this.targetCell=t,this.mergeCells=e,this.colSpan=s,this.rowSpan=n,this.direction=r}}var K,Y;!function(t){t.MERGE_CELLS="MERGE_CELLS",t.MERGE_CELL_UP="MERGE_CELL_UP",t.MERGE_CELL_RIGHT="MERGE_CELL_RIGHT",t.MERGE_CELL_DOWN="MERGE_CELL_DOWN",t.MERGE_CELL_LEFT="MERGE_CELL_LEFT"}(K||(K={}));class z extends R{canHandle(t){return t[0]===S.MERGE_CELLS}execute(t,e){const s=e.tableSelection.getSelectedCells(),n=t[1];switch(n){case K.MERGE_CELL_UP:case K.MERGE_CELL_RIGHT:case K.MERGE_CELL_DOWN:case K.MERGE_CELL_LEFT:{const t=this.getDirectionMergeCells(n,s[0]);this.handleMergeCells(t,n)}break;default:s.length>1&&this.handleMergeCells(s,K.MERGE_CELLS)}}getDirectionMergeCells(t,e){const s=it(e,t);if(!s)return[e];switch(t){case K.MERGE_CELL_UP:return[s,e];case K.MERGE_CELL_DOWN:return[e,s];case K.MERGE_CELL_LEFT:return[s,e];default:return[e,s]}}handleMergeCells(t,e){if(t.length<2)return;const s=ot(t),{minRow:n,maxRow:r,minCol:i,maxCol:o,targetCell:a}=s,c=new J(a,t,o-i+1,r-n+1,e);this.applyActionOnTable(c,a)}applyActionOnTable(t,e){const s=X(e,w);s&&s.apply(t)}}function X(t,e){return t?t instanceof e?t:X(t.parent,e):null}function Z(t,e){return{id:p(),type:"table-body",children:Array.from({length:t},(()=>function(t){return{id:p(),type:"table-row",children:Array.from({length:t},(()=>et("table-cell")))}}(e)))}}function q(t){return t.children.filter((t=>t instanceof H||t instanceof F)).flatMap((t=>t.children))}function Q(t){if(!t||!t.children||!t.children[0])return null;const e=t.children[0];return e instanceof i?e:Q(e)}function tt(t,e){for(const s of t){const t=s.children.find((t=>t.id===e));if(t)return t}return null}function et(t){const e=p();return{id:e,type:t,children:[{id:`${e}-p`,type:"paragraph",nodes:[{id:`${e}-p-t`,type:"text",text:""}]}]}}function st(t){return{colSpan:t.colSpan,rowSpan:t.rowSpan}}function nt(t,e,s){const n=null!=s?s:rt(e);for(let e=0;e<n.length;e++){const s=n[e];for(let e=0;e<s.length;e++)if(s[e]===t.id)return e}return-1}function rt(t){const e=[];return t.forEach(((t,s)=>{e[s]||(e[s]=[]);let n=0;t.children.forEach((t=>{const{colSpan:r,rowSpan:i}=st(t);for(;void 0!==e[s][n];)n++;for(let o=0;o<i;o++)for(let i=0;i<r;i++)e[s+o]||(e[s+o]=[]),e[s+o][n+i]=t.id;n+=r}))})),e}function it(t,e){if(!t)return null;const s=t.parent,n=s.parent.children,r=n.indexOf(s),{colSpan:i,rowSpan:o}=st(t),a=nt(t,n);let c=r,l=a;switch(e){case K.MERGE_CELL_LEFT:l=a-1;break;case K.MERGE_CELL_RIGHT:l=a+i;break;case K.MERGE_CELL_UP:c=r-1;break;default:c=r+o}return function(t,e,s){const n=rt(t);for(let r=0;r<t.length;r++){const i=t[r];for(const o of i.children){const{colSpan:i,rowSpan:a}=st(o),c=nt(o,t,n),l=r+a-1,h=c+i-1,u=s>=c&&s<=h;if(e>=r&&e<=l&&u)return o}}return null}(n,c,l)}function ot(t){const e=t[0].parent.parent.children,s=rt(e);let n=Number.POSITIVE_INFINITY,r=-1,i=Number.POSITIVE_INFINITY,o=-1;const a=new Set;return t.forEach((t=>{const c=e.indexOf(t.parent),l=nt(t,e,s),{colSpan:h,rowSpan:u}=st(t),d=c,p=c+u-1,E=l,f=l+h-1;for(let t=d;t<=p;t++)for(let e=E;e<=f;e++)a.add(`${t},${e}`);n=Math.min(n,d),r=Math.max(r,p),i=Math.min(i,E),o=Math.max(o,f)})),{minRow:n,maxRow:r,minCol:i,maxCol:o,targetCell:t[0],coveredPositions:a}}function at(t){let e=0;const s=q(t)[0];for(const t of s.children){const{colSpan:s}=st(t);e+=s}return e}function ct(t){if(1===t.length)return!0;const e=ot(t),{minRow:s,maxRow:n,minCol:r,maxCol:i,coveredPositions:o}=e;return o.size===(n-s+1)*(i-r+1)}function lt(t,e,s,i,o){const a=t.annotationMap.get(n.CUSTOM_ATTRIBUTE),c=a?Object.assign({},a.customAttribute):{};delete c.colspan,delete c.rowspan,e>1&&(c.colspan=String(e));const l=at(i)+(o?1:0);if(s>1&&e!==l&&(c.rowspan=String(s)),Object.keys(c).length>0){const e=new r(c);t.annotationMap.set(n.CUSTOM_ATTRIBUTE,e)}else t.annotationMap.delete(n.CUSTOM_ATTRIBUTE)}function ht(t){const e=et(t);return"table-head-cell"===t?V.from(e):W.from(e)}function ut(t,e,s){for(let n=0;n<s;n++){const s=t[n],r=e.children.find((t=>t.id===s));if(r&&!(r instanceof V))return n}return-1}function dt(t){const e=new Map;return t.forEach((t=>{for(let s=0;s<t.length;s++){const n=t[s];n&&!e.has(n)&&e.set(n,s)}})),e}function pt(t,e,s,n){if(0===t.length)return[0,-1];const r=s||q(e),i=null!=n?n:rt(r);let o=Number.POSITIVE_INFINITY,a=Number.NEGATIVE_INFINITY;return t.forEach((t=>{const e=nt(t,r,i);o=Math.min(o,e),a=Math.max(a,e)})),[o,a]}!function(t){t.HEADER_ROW="HEADER_ROW",t.ADD_ROW_ABOVE="ADD_ROW_ABOVE",t.ADD_ROW_BELOW="ADD_ROW_BELOW",t.DELETE_ROW="DELETE_ROW",t.SELECT_ROW="SELECT_ROW"}(Y||(Y={}));class Et extends R{canHandle(t){return t[0]===S.ROW}execute(t,e){const s=t[1];switch(s){case Y.ADD_ROW_ABOVE:case Y.ADD_ROW_BELOW:this.handleInsertRow(s,e);break;case Y.DELETE_ROW:this.handleDeleteRow(e);break;case Y.HEADER_ROW:this.handleToggleHeader(e);break;case Y.SELECT_ROW:this.handleSelectRow(e)}}handleInsertRow(t,e){const s=this.getAllSelectedRows(e);if(s.length>0){const e=t===Y.ADD_ROW_ABOVE?x.ABOVE:x.BELOW,n=e===x.ABOVE?s[0]:s[s.length-1],r=n.parent instanceof H,i=this.shouldInsertHeaderRow(n,e)||r?new k(e,s):new D(e,s);this.applyActionToTable(s[0],i)}}shouldInsertHeaderRow(t,e){if(e===x.ABOVE)return t.parent instanceof F;{const e=t.parent;return e instanceof F&&e.children[e.children.length-1]!==t}}handleDeleteRow(t){const e=this.getAllSelectedRows(t);if(e.length){const t=new M(e);this.applyActionToTable(e[0],t)}}handleToggleHeader(t){const e=this.getAllSelectedRows(t);if(e.length>0){const t=new j(e);this.applyActionToTable(e[0],t)}}handleSelectRow(t){const e=this.getAllSelectedRows(t);if(e.length>0&&t&&t.tableSelection){const s=e.flatMap((t=>t.children));t.tableSelection.setSelectedCells(s)}}getAllSelectedRows(t){const e=new Set;if(t&&t.tableSelection){const{tableSelection:s}=t;s.getSelectedCells().forEach((t=>{const s=X(t,$);s&&e.add(s)}))}return Array.from(e)}applyActionToTable(t,e){const s=X(t,w);s&&s.apply(e)}}const ft="REPLACE_TABLE_CELL";class Lt extends s{constructor(t){super(),this.isFlushable=!0,this.type="REPLACE_TABLE_CELL",this.payload=t}}const bt="SPLIT_TABLE_CELL";class gt extends s{constructor(t){super(),this.isFlushable=!0,this.type="SPLIT_TABLE_CELL",this.payload=t}}class Ct extends o{getBoundaryCellColumnRange(t,e,s){let n=Number.POSITIVE_INFINITY,r=Number.NEGATIVE_INFINITY;return t.forEach((t=>{const i=nt(t,e,s);n=Math.min(n,i),r=Math.max(r,i)})),[n,r]}}class Tt extends Ct{static isFullHeaderSelection(t){if(0===t.length)return!1;const e=X(t[0],w);if(e){const s=q(e),n=rt(s),r=new Map;s.forEach((t=>{t.children.forEach((t=>r.set(t.id,t)))}));const[i,o]=pt(t,e,s,n);for(const t of n)for(let e=i;e<=o;e++){const s=r.get(t[e]);if(s&&!(s instanceof V))return!1}return!0}return!1}handleAction(t,e){const s=t.headerOn,n=q(e),r=rt(n),[i,o]=this.getBoundaryCellColumnRange(t.tableCellHeaderRange,n,r);(s||!s&&i>0)&&this.toggleHeadRows(e,n,r,s,o,i),this.toggleBodyRows(e,n,r,s,i,o);const a=this.getRootContent(e);if(a&&t.tableCellHeaderRange[0].parent){const e=t.tableCellHeaderRange[0].parent.getFirstNode();e&&a.apply(new E(e,0))}}toggleHeadRows(t,e,s,n,r,i){var o;const a=((null===(o=t.children.find((t=>t instanceof F)))||void 0===o?void 0:o.children)||[]).length;for(let o=0;o<a;o++)this.toggleCellType(t,e[o],s[o],0,n?r:i-1,(()=>!0),(t=>V.from(t.toJSON())))}toggleBodyRows(t,e,s,n,r,i){var o;const a=s[0].length,c=(null===(o=t.children.find((t=>t instanceof H)))||void 0===o?void 0:o.children)||[],l=e.length-c.length;for(let o=0;o<c.length;o++){const c=o+l,h=e[c],u=s[c],d=ut(u,h,a);n?d>-1&&this.toggleCellType(t,h,u,d,i,(t=>!(t instanceof V)),(t=>V.from(t.toJSON()))):this.toggleCellType(t,h,u,r,-1===d?a-1:d-1,(t=>t instanceof V),(t=>W.from(t.toJSON())))}}toggleCellType(t,e,s,n,r,i,o){for(let a=n;a<=r;a++){const n=s[a],c=e.children.find((t=>t.id===n));if(c&&i(c)){const i=s.indexOf(n),l={table:t,cell:c,col:a,cellStartCol:i,endCol:r,targetCellType:o(c).type},h=i+c.colSpan-1;if(h>r||i<a){if(e.apply(new gt(l)),h>r)return;a=h;continue}e.apply(new Lt(l))}c&&(a+=c.colSpan-1)}}}const _t="DELETE_TABLE_COLUMN";class mt extends s{constructor(t){super(),this.isFlushable=!0,this.type="DELETE_TABLE_COLUMN",this.tableCellDeleteRange=t}}const Ot="INSERT_TABLE_COLUMN";var At;!function(t){t.LEFT="LEFT",t.RIGHT="RIGHT"}(At||(At={}));class St extends s{constructor(t,e){super(),this.isFlushable=!0,this.type="INSERT_TABLE_COLUMN",this.tableCellInsertRange=e,this.insertDirection=t}}const yt="SELECT_TABLE_COLUMN";class wt extends s{constructor(t,e){super(),this.type="SELECT_TABLE_COLUMN",this.tableCellSelectRange=t,this.selectCellCallback=e}}const Rt="TOGGLE_HEADER_TABLE_COLUMN";class Nt extends s{constructor(t,e){super(),this.isFlushable=!0,this.type="TOGGLE_HEADER_TABLE_COLUMN",this.headerOn=!1,this.tableCellHeaderRange=t,this.headerOn=e}}var Mt;!function(t){t.HEADER_COLUMN="HEADER_COLUMN",t.ADD_COLUMN_LEFT="ADD_COLUMN_LEFT",t.ADD_COLUMN_RIGHT="ADD_COLUMN_RIGHT",t.DELETE_COLUMN="DELETE_COLUMN",t.SELECT_COLUMN="SELECT_COLUMN"}(Mt||(Mt={}));class It extends R{canHandle(t){return t[0]===S.COLUMN}execute(t,e){const s=e.tableSelection.getSelectedCells();if(!s||0===s.length)return;const n=t[1];switch(n){case Mt.ADD_COLUMN_LEFT:case Mt.ADD_COLUMN_RIGHT:this.handleInsertColumn(n,s);break;case Mt.DELETE_COLUMN:this.handleDeleteColumn(s);break;case Mt.SELECT_COLUMN:this.handleSelectColumn(s,e);break;case Mt.HEADER_COLUMN:this.handleToggleHeaderColumn(s)}}handleInsertColumn(t,e){const s=new St(t===Mt.ADD_COLUMN_LEFT?At.LEFT:At.RIGHT,e);this.applyActionOnTable(s,e[0])}handleDeleteColumn(t){const e=new mt(t);this.applyActionOnTable(e,t[0])}handleSelectColumn(t,e){const s=new wt(t,(t=>{e.tableSelection.setSelectedCells(t)}));this.applyActionOnTable(s,t[0])}handleToggleHeaderColumn(t){const e=!Tt.isFullHeaderSelection(t),s=new Nt(t,e);this.applyActionOnTable(s,t[0])}applyActionOnTable(t,e){const s=X(e,w);s&&s.apply(t)}}const Dt="SPLIT_CELL_HORIZONTALLY";class vt extends s{constructor(){super(),this.isFlushable=!0,this.type="SPLIT_CELL_HORIZONTALLY"}}const xt="SPLIT_CELL_VERTICALLY";class kt extends s{constructor(){super(),this.isFlushable=!0,this.type="SPLIT_CELL_VERTICALLY"}}var Bt;!function(t){t.SPLIT_CELL_HORIZONTALLY="SPLIT_CELL_HORIZONTALLY",t.SPLIT_CELL_VERTICALLY="SPLIT_CELL_VERTICALLY"}(Bt||(Bt={}));class jt extends R{canHandle(t){return t[0]===S.SPLIT_CELL}execute(t,e){const s=e.tableSelection.getSelectedCells();if(s&&1===s.length){const e=s[0];switch(t[1]){case Bt.SPLIT_CELL_HORIZONTALLY:this.handleSplitCellHorizontally(e);break;case Bt.SPLIT_CELL_VERTICALLY:this.handleSplitCellVertically(e)}}}handleSplitCellHorizontally(t){const e=new vt;t.apply(e)}handleSplitCellVertically(t){const e=new kt;t.apply(e)}}export{pt as $,$ as A,nt as B,It as C,x as D,T as E,I as F,v as G,N as H,At as I,B as J,Ot as K,_t as L,z as M,Rt as N,Tt as O,bt as P,ft as Q,A as R,R as S,S as T,Dt as U,g as V,xt as W,yt as X,U as Y,C as Z,Mt as _,_ as a,Y as a0,Bt as a1,ct as a2,it as a3,y as b,P as c,V as d,Et as e,jt as f,m as g,w as h,Z as i,W as j,F as k,H as l,X as m,G as n,Ct as o,q as p,rt as q,tt as r,lt as s,et as t,dt as u,at as v,Q as w,st as x,ht as y,K as z}
|
|
1
|
+
import{B as t,a as e,M as s,C as n,l as r,f as i,d as o}from"./p-38c9d782.js";import{c as a}from"./p-a841cf13.js";import{V as c}from"./p-3e09aeed.js";import"./p-6e1ab235.js";import{I as l,c as h}from"./p-afcd8f04.js";import{r as u}from"./p-528748fa.js";import{i as d}from"./p-8db904dc.js";import{g as p}from"./p-8b5d3a52.js";import{U as E,V as f}from"./p-f4da615a.js";const L=[{payloadKey:"IS_OVERRIDECOLORS_METHOD_CALLED",payloadDescription:"Indicate if the method overrideColors of public API ThemeManager is called",canAccept:(t,e)=>"ThemeManager"===t&&"overrideColors"===e,payloadValue:()=>!0},{payloadKey:"IS_RESET_METHOD_CALLED",payloadDescription:"Indicate if the method reset of public API ThemeManager is called",canAccept:(t,e)=>"ThemeManager"===t&&"reset"===e,payloadValue:()=>!0},{payloadKey:"IS_TOGGLEDARKMODE_METHOD_CALLED",payloadDescription:"Indicate if the method toggleDarkMode of public API ThemeManager is called",canAccept:(t,e)=>"ThemeManager"===t&&"toggleDarkMode"===e,payloadValue:()=>!0},{payloadKey:"IS_ISDARKMODE_METHOD_CALLED",payloadDescription:"Indicate if the method isDarkMode of public API ThemeManager is called",canAccept:(t,e)=>"ThemeManager"===t&&"isDarkMode"===e,payloadValue:()=>!0},{payloadKey:"IS_APPLY_BRANDING_METHOD_CALLED",payloadDescription:"Indicate if the method applyBranding of public API ThemeManager is called",canAccept:(t,e)=>"ThemeManager"===t&&"applyBranding"===e,payloadValue:()=>!0},{payloadKey:"IS_VALIDATECOLORACCESSIBILITY_METHOD_CALLED",payloadDescription:"Indicate if the method validateColorAccessibility of public API ThemeManager is called",canAccept:(t,e)=>"ThemeManager"===t&&"validateColorAccessibility"===e,payloadValue:()=>!0}];class b{constructor(){this.vegaPublicAPIRuntimeMetricsSlimmer=h(b,["overrideColors","reset","toggleDarkMode","isDarkMode","applyBranding","validateColorAccessibility"],L,"ThemeManager")}async overrideColors(t){c.overrideColors(t)}async reset(){c.reset()}toggleDarkMode(t){c.toggleDarkMode(t)}isDarkMode(){return c.isDarkMode()}applyBranding(t){c.applyBranding(t)}async validateColorAccessibility(t){return c.validateColorAccessibility(t)}}!function(t,e,s,n){var r,i=arguments.length,o=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,s):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,s,n);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(o=(i<3?r(o):i>3?r(e,s,o):r(e,s))||o);i>3&&o&&Object.defineProperty(e,s,o)}([l()],b.prototype,"vegaPublicAPIRuntimeMetricsSlimmer",void 0);const g=new b,C=["none","solid","dashed","dotted","double","groove","ridge","inset","outset"],T=[{key:"white",dark:"#04041C",light:"#FCFCFC"},{key:"red",dark:"#AA091C",light:"#FF4C61"},{key:"orange",dark:"#974502",light:"#FDAB68"},{key:"yellow",dark:"#735C00",light:"#FFDC4C"},{key:"green",dark:"#2E6D18",light:"#7BDA58"},{key:"teal",dark:"#287171",light:"#7BD1D1"},{key:"gray",dark:"#595959",light:"#999999"},{key:"black",dark:"#FCFCFC",light:"#04041C"}],_={key:"default-head-bg",dark:"#181830",light:"#F0F3F7"};class m{static getTableColors(){return m.TABLE_COLORS}static setTableColors(t){m.TABLE_COLORS=t}static getColorKey(t,e=!1){var s;let n=null;const r=m.TABLE_COLORS,i=e?[...r,_]:r;if(i){const e=null===(s=u(t))||void 0===s?void 0:s.toUpperCase();if(e)n=i.find((t=>g.isDarkMode()?t.dark===e:t.light===e));else for(const e of i)if(e.key===t){n=e;break}}return n?n.key:""}}m.TABLE_COLORS=T;class O extends t{constructor(t){super(),this.type=A.COLOR,this.colorKey=t,t&&(this.color=this.formatColor(t))}renderStyle(){return{color:this.color?c.isDarkMode()?this.color.dark:this.color.light:this.colorKey||""}}renderClass(){return null}toJSON(){var t;return{color:(null===(t=this.color)||void 0===t?void 0:t.key)||this.colorKey||""}}clone(){return new O(this.colorKey)}formatColor(t){return m.getTableColors().find((e=>e.key===t))}}var A,S;!function(t){t.TABLE="EXTENSION_TABLE",t.CELL="EXTENSION_TABLE_CELL",t.CAPTION="EXTENSION_TABLE_CAPTION",t.COLOR="EXTENSION_TABLE_COLOR"}(A||(A={}));class y extends t{constructor({backgroundColor:t,border:e,width:s,height:n,alignment:r,borderCollapse:i}={},o=!0){super(),this.type=A.TABLE,this.useInternalStyle=o,this.backgroundColor=t,this.border=e,this.width=s,this.height=n,this.alignment=o&&void 0===r?y.DEFAULT_ALIGNMENT:r,this.backgroundColorAnnotation=new O(t),this.borderColorAnnotation=new O(null==e?void 0:e.color),this.borderCollapse=o&&void 0===i?y.DEFAULT_BORDER_COLLAPSE:i}static from(t,e=!0){return[A.TABLE,new y(t,e)]}static getDefaultStyles(){return{borderCollapse:y.DEFAULT_BORDER_COLLAPSE,margin:y.DEFAULT_ALIGNMENT_STYLE_VALUE}}get borderStr(){return this.border?`${this.border.style} ${this.border.width} ${this.borderColorAnnotation.renderStyle().color}`.trim():null}clone(){return new y({backgroundColor:this.backgroundColor,border:this.border,width:this.width,height:this.height,alignment:this.alignment,borderCollapse:this.borderCollapse},this.useInternalStyle)}toJSON(){return{table:a({backgroundColor:this.backgroundColor,border:this.border,width:this.width,height:this.height,alignment:this.alignment,borderCollapse:this.borderCollapse})}}renderStyle(){const t=this.backgroundColorAnnotation.renderStyle().color,e=Object.assign({border:this.borderStr,width:this.width,height:this.height,borderCollapse:this.borderCollapse},this.renderAlignmentStyle());return t&&(e.backgroundColor=t),a(e)}renderClass(){return"v-rte--extension-table"}renderAlignmentStyle(){return this.alignment?{margin:"center"===this.alignment?y.DEFAULT_ALIGNMENT_STYLE_VALUE:"left"===this.alignment?"0":"0 0 0 auto"}:{}}}y.DEFAULT_BORDER_COLLAPSE="collapse",y.DEFAULT_ALIGNMENT="center",y.DEFAULT_ALIGNMENT_STYLE_VALUE="0 auto";class w extends e{constructor(t,e){super(t),this.dtoName=w.dtoName,this.type="table-block",this.children=[];const{autoMatchFormat:s}=e||{autoMatchFormat:!0};s&&this.annotationMap.set(A.TABLE,new y)}static from(t,e){var s;const n=new w(t.id,e);return super.convertAnnotationsToMap(n.annotationMap,Object.assign({},t.annotations)),n.children=super.generateBlockChildren(t.children,e,n),(null===(s=t.annotations)||void 0===s?void 0:s.table)&&n.annotationMap.set(...y.from(t.annotations.table,null==e?void 0:e.autoMatchFormat)),n}clone(t){const e=new w(this.id);return e.children=this.children.map((t=>t.clone(e))),e.parent=t,e.annotationMap=super.cloneAnnotations(),e}getLastNode(){return this.children[this.children.length-1].getLastNode()}getFirstNode(){return this.hasCaption()?this.children[0].children[0].getLastNode():this.children[0].children[0].children[0].getLastNode()}isNotEmpty(){return this.children.length>0}toHtml(t){const e=this.children.map((e=>e.toHtml(t))).join("");return`<table${super.generateAttributeString(t)}>${e}</table>`}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{type:this.type,children:this.children.map((t=>t.toJSON()))})}getCaption(){const t=this.children.find((t=>"table-caption"===t.type));return null!=t?t:null}setCaption(t){const e=this.children.findIndex((t=>"table-caption"===t.type));t?(t.parent=this,e>=0?this.children[e]=t:this.children.unshift(t)):e>=0&&this.children.splice(e,1)}hasCaption(){return d(this.getCaption())}}w.dtoName="RTETableBlock",function(t){t.ROW="ROW",t.CAPTION="CAPTION",t.COLUMN="COLUMN",t.MERGE_CELLS="MERGE_CELLS",t.TABLE="TABLE",t.CELL="CELL",t.SPLIT_CELL="SPLIT_CELL"}(S||(S={}));class R{syncCursorPosition(t,e){const s=this.findRootContent(t);if(e&&s){const t=e.getRangeEndOffset();s.apply(new E(e,t))}}findRootContent(t){let e=t.parent;for(;e;){if(e instanceof f)return e;e=e.parent}}}const N="DELETE_TABLE_ROW";class M extends s{constructor(t){super(),this.isFlushable=!0,this.type="DELETE_TABLE_ROW",this.rowsToBeRemoved=t}}const I="INSERT_TABLE_ROW_INTO_DIFFERENT_SECTION";class D extends s{constructor(t,e=[]){super(),this.isFlushable=!0,this.type="INSERT_TABLE_ROW_INTO_DIFFERENT_SECTION",this.selectedRows=[],this.insertDirection=t,this.selectedRows=e}}const v="INSERT_TABLE_ROW_INTO_SAME_SECTION";var x;!function(t){t.ABOVE="ABOVE",t.BELOW="BELOW"}(x||(x={}));class k extends s{constructor(t,e=[]){super(),this.isFlushable=!0,this.type="INSERT_TABLE_ROW_INTO_SAME_SECTION",this.selectedRows=[],this.insertDirection=t,this.selectedRows=e}}const B="TOGGLE_HEADER_ROW";class j extends s{constructor(t){super(),this.isFlushable=!0,this.type="TOGGLE_HEADER_ROW",this.selectedRows=t}}class H extends e{constructor(t){super(t),this.dtoName=H.dtoName,this.type="table-body",this.children=[]}static from(t,e){const s=new H(t.id);return super.convertAnnotationsToMap(s.annotationMap,Object.assign({},t.annotations)),s.children=super.generateBlockChildren(t.children,e,s),s}clone(t){const e=new H(this.id);return e.children=this.children.map((t=>t.clone(e))),e.parent=t,e.annotationMap=super.cloneAnnotations(),e}getLastNode(){return this.children[this.children.length-1].getLastNode()}isNotEmpty(){return this.children.length>0}toHtml(t){const e=this.children.map((e=>e.toHtml(t))).join("");return`<tbody${super.generateAttributeString(t)}>${e}</tbody>`}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{type:this.type,children:this.children.map((t=>t.toJSON()))})}}H.dtoName="RTETableBodyBlock";class F extends e{constructor(t){super(t),this.dtoName=F.dtoName,this.type="table-head",this.children=[]}static from(t,e){const s=new F(t.id);return super.convertAnnotationsToMap(s.annotationMap,Object.assign({},t.annotations)),s.children=super.generateBlockChildren(t.children,e,s),s}clone(t){const e=new F(this.id);return e.children=this.children.map((t=>t.clone(e))),e.parent=t,e.annotationMap=super.cloneAnnotations(),e}getLastNode(){return this.children[this.children.length-1].getLastNode()}isNotEmpty(){return this.children.length>0}toHtml(t){const e=this.children.map((e=>e.toHtml(t))).join("");return`<thead${super.generateAttributeString(t)}>${e}</thead>`}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{type:this.type,children:this.children.map((t=>t.toJSON()))})}}F.dtoName="RTETableHeadBlock";class $ extends e{constructor(t){super(t),this.dtoName=$.dtoName,this.type="table-row",this.children=[]}static from(t,e){const s=new $(t.id);return super.convertAnnotationsToMap(s.annotationMap,Object.assign({},t.annotations)),s.children=super.generateBlockChildren(t.children,e,s),s}clone(t){const e=new $(this.id);return e.children=this.children.map((t=>t.clone(e))),e.parent=t,e.annotationMap=super.cloneAnnotations(),e}getLastNode(){return this.children[this.children.length-1].getLastNode()}isNotEmpty(){return this.children.length>0}toHtml(t){const e=this.children.map((e=>e.toHtml(t))).join("");return`<tr${super.generateAttributeString(t)}>${e}</tr>`}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{type:this.type,children:this.children.map((t=>t.toJSON()))})}}$.dtoName="RTETableRowBlock";class P extends t{constructor({backgroundColor:t,padding:e,border:s,width:n,height:r,textAlign:i,verticalAlign:o,minWidth:a,boxSizing:c}={},l=!0){super(),this.type=A.CELL,this.useInternalStyle=l,this.backgroundColor=t,this.width=n,this.height=r,this.border=l&&void 0===s?P.DEFAULT_BORDER:s,this.padding=l&&void 0===e?P.DEFAULT_PADDING:e,this.textAlign=l&&void 0===i?P.DEFAULT_HORIZONTAL_TEXT_ALIGN:i,this.verticalAlign=l&&void 0===o?P.DEFAULT_VERTICAL_TEXT_ALIGN:o,this.minWidth=l&&void 0===a?P.DEFAULT_CELL_MIN_WIDTH:a,this.boxSizing=l&&void 0===c?P.DEFAULT_BOX_SIZING:c}static from(t,e){return[A.CELL,new P(t,e)]}static getDefaultStyles(t=!0){return{padding:P.DEFAULT_PADDING,textAlign:P.DEFAULT_HORIZONTAL_TEXT_ALIGN,verticalAlign:P.DEFAULT_VERTICAL_TEXT_ALIGN,minWidth:P.DEFAULT_CELL_MIN_WIDTH,boxSizing:P.DEFAULT_BOX_SIZING,border:`${P.DEFAULT_BORDER.style} ${P.DEFAULT_BORDER.width} ${t?P.DEFAULT_BORDER.color:P.DEFAULT_BORDER_RGB_COLOR}`}}get borderStr(){return this.border?`${this.border.style||""} ${this.border.width||""} ${this.borderColorAnnotation.renderStyle().color}`.trim():null}set backgroundColor(t){this._backgroundColor=t,this.backgroundColorAnnotation=new O(t)}get backgroundColor(){return this._backgroundColor}set border(t){this._border=t,this.borderColorAnnotation=new O(null==t?void 0:t.color)}get border(){return this._border}clone(){return new P({backgroundColor:this.backgroundColor,padding:this.padding,border:this.border,width:this.width,height:this.height,textAlign:this.textAlign,verticalAlign:this.verticalAlign,minWidth:this.minWidth,boxSizing:this.boxSizing},this.useInternalStyle)}toJSON(){return{tableCell:a({backgroundColor:this.backgroundColor,padding:this.padding,border:this.border,width:this.width,height:this.height,textAlign:this.textAlign,verticalAlign:this.verticalAlign,minWidth:this.minWidth,boxSizing:this.boxSizing})}}renderStyle(t){const e=this.backgroundColorAnnotation.renderStyle().color,s={padding:this.padding,border:this.borderStr,width:this.width,height:this.height,textAlign:this.textAlign,verticalAlign:this.verticalAlign,minWidth:this.minWidth,boxSizing:this.boxSizing};return e&&(s.backgroundColor=e),a((null==t?void 0:t.standalone)?s:this.removeDefaultValues(s),{cleanEmptyString:!0})}renderClass(){return null}removeDefaultValues(t){const e=Object.assign({},t);return e.padding===P.DEFAULT_PADDING&&delete e.padding,e.border===`${P.DEFAULT_BORDER.style} ${P.DEFAULT_BORDER.width} ${P.DEFAULT_BORDER.color}`&&delete e.border,e.textAlign===P.DEFAULT_HORIZONTAL_TEXT_ALIGN&&delete e.textAlign,e.verticalAlign===P.DEFAULT_VERTICAL_TEXT_ALIGN&&delete e.verticalAlign,e.minWidth===P.DEFAULT_CELL_MIN_WIDTH&&delete e.minWidth,e.boxSizing===P.DEFAULT_BOX_SIZING&&delete e.boxSizing,e}}P.DEFAULT_PADDING="12px",P.DEFAULT_BORDER={style:"solid",width:"1px",color:"#ddd"},P.DEFAULT_BORDER_RGB_COLOR="rgb(221, 221, 221)",P.DEFAULT_HORIZONTAL_TEXT_ALIGN="left",P.DEFAULT_VERTICAL_TEXT_ALIGN="middle",P.DEFAULT_CELL_MIN_WIDTH="55px",P.DEFAULT_BOX_SIZING="border-box";class W extends e{constructor(t,e){super(t),this.dtoName=W.dtoName,this.type="table-cell",this.children=[];const{autoMatchFormat:s}=e||{autoMatchFormat:!0};s&&this.annotationMap.set(A.CELL,new P)}static from(t,e){var s;const n=new W(t.id,e);return super.convertAnnotationsToMap(n.annotationMap,Object.assign({},t.annotations)),(null===(s=t.annotations)||void 0===s?void 0:s.tableCell)&&n.annotationMap.set(...P.from(t.annotations.tableCell,null==e?void 0:e.autoMatchFormat)),n.children=super.generateBlockChildren(t.children,e,n),n}clone(t){const e=new W(this.id);return e.children=this.children.map((t=>t.clone(e))),e.parent=t,e.annotationMap=super.cloneAnnotations(),e}getLastNode(){return this.children[this.children.length-1].getLastNode()}isNotEmpty(){return this.children.length>0}get rowSpan(){const t=this.getCustomAttributeByName("rowspan");return isNaN(Number(t))?1:Math.max(Number(t),1)}get colSpan(){const t=this.getCustomAttributeByName("colspan");return isNaN(Number(t))?1:Math.max(Number(t),1)}toHtml(t){const e=this.children.map((e=>e.toHtml(t))).join("");return`<td${super.generateAttributeString(t)}>${e}</td>`}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{type:this.type,children:this.children.map((t=>t.toJSON()))})}getCustomAttributeByName(t){const e=this.getCustomAttributesAnnotation();if(e)return(e.toJSON().customAttribute||{})[t]}}W.dtoName="RTETableCellBlock";class G extends P{constructor(t={},e=!0){super(t,e)}static from(t,e){return[A.CELL,new G(t,e)]}static getDefaultBackgroundColor(){return c.isDarkMode()?_.dark:_.light}clone(){return new G({backgroundColor:this.backgroundColor,padding:this.padding,border:this.border,width:this.width,height:this.height,textAlign:this.textAlign,verticalAlign:this.verticalAlign,minWidth:this.minWidth,boxSizing:this.boxSizing},this.useInternalStyle)}renderStyle(t){var e;const s=super.renderStyle(t);return a(Object.assign(Object.assign({},s),{backgroundColor:null!==(e=s.backgroundColor)&&void 0!==e?e:G.getDefaultBackgroundColor()}))}}class V extends W{constructor(t,e){super(t,e),this.dtoName=V.dtoName,this.type="table-head-cell";const{autoMatchFormat:s}=e||{autoMatchFormat:!0};s&&this.annotationMap.set(A.CELL,new G)}static from(t,e){var s;const n=new V(t.id,e);return super.convertAnnotationsToMap(n.annotationMap,Object.assign({},t.annotations)),(null===(s=t.annotations)||void 0===s?void 0:s.tableCell)&&n.annotationMap.set(...G.from(t.annotations.tableCell,null==e?void 0:e.autoMatchFormat)),n.children=super.generateBlockChildren(t.children,e,n),n}clone(t){const e=new V(this.id);return e.children=this.children.map((t=>t.clone(e))),e.parent=t,e.annotationMap=super.cloneAnnotations(),e}toHtml(t){const e=this.children.map((e=>e.toHtml(t))).join("");return`<th${super.generateAttributeString(t)}>${e}</th>`}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{type:this.type,children:this.children.map((t=>t.toJSON()))})}}V.dtoName="RTETableHeadCellBlock";const U="MERGE_CELLS";class J extends s{constructor(t,e,s,n,r){super(),this.type="MERGE_CELLS",this.isFlushable=!0,this.targetCell=t,this.mergeCells=e,this.colSpan=s,this.rowSpan=n,this.direction=r}}var K,Y;!function(t){t.MERGE_CELLS="MERGE_CELLS",t.MERGE_CELL_UP="MERGE_CELL_UP",t.MERGE_CELL_RIGHT="MERGE_CELL_RIGHT",t.MERGE_CELL_DOWN="MERGE_CELL_DOWN",t.MERGE_CELL_LEFT="MERGE_CELL_LEFT"}(K||(K={}));class z extends R{canHandle(t){return t[0]===S.MERGE_CELLS}execute(t,e){const s=e.tableSelection.getSelectedCells(),n=t[1];switch(n){case K.MERGE_CELL_UP:case K.MERGE_CELL_RIGHT:case K.MERGE_CELL_DOWN:case K.MERGE_CELL_LEFT:{const t=this.getDirectionMergeCells(n,s[0]);this.handleMergeCells(t,n)}break;default:s.length>1&&this.handleMergeCells(s,K.MERGE_CELLS)}}getDirectionMergeCells(t,e){const s=it(e,t);if(!s)return[e];switch(t){case K.MERGE_CELL_UP:return[s,e];case K.MERGE_CELL_DOWN:return[e,s];case K.MERGE_CELL_LEFT:return[s,e];default:return[e,s]}}handleMergeCells(t,e){if(t.length<2)return;const s=ot(t),{minRow:n,maxRow:r,minCol:i,maxCol:o,targetCell:a}=s,c=new J(a,t,o-i+1,r-n+1,e);this.applyActionOnTable(c,a)}applyActionOnTable(t,e){const s=X(e,w);s&&s.apply(t)}}function X(t,e){return t?t instanceof e?t:X(t.parent,e):null}function Z(t,e){return{id:p(),type:"table-body",children:Array.from({length:t},(()=>function(t){return{id:p(),type:"table-row",children:Array.from({length:t},(()=>et("table-cell")))}}(e)))}}function q(t){return t.children.filter((t=>t instanceof H||t instanceof F)).flatMap((t=>t.children))}function Q(t){if(!t||!t.children||!t.children[0])return null;const e=t.children[0];return e instanceof i?e:Q(e)}function tt(t,e){for(const s of t){const t=s.children.find((t=>t.id===e));if(t)return t}return null}function et(t){const e=p();return{id:e,type:t,children:[{id:`${e}-p`,type:"paragraph",nodes:[{id:`${e}-p-t`,type:"text",text:""}]}]}}function st(t){return{colSpan:t.colSpan,rowSpan:t.rowSpan}}function nt(t,e,s){const n=null!=s?s:rt(e);for(let e=0;e<n.length;e++){const s=n[e];for(let e=0;e<s.length;e++)if(s[e]===t.id)return e}return-1}function rt(t){const e=[];return t.forEach(((t,s)=>{e[s]||(e[s]=[]);let n=0;t.children.forEach((t=>{const{colSpan:r,rowSpan:i}=st(t);for(;void 0!==e[s][n];)n++;for(let o=0;o<i;o++)for(let i=0;i<r;i++)e[s+o]||(e[s+o]=[]),e[s+o][n+i]=t.id;n+=r}))})),e}function it(t,e){if(!t)return null;const s=t.parent,n=s.parent.children,r=n.indexOf(s),{colSpan:i,rowSpan:o}=st(t),a=nt(t,n);let c=r,l=a;switch(e){case K.MERGE_CELL_LEFT:l=a-1;break;case K.MERGE_CELL_RIGHT:l=a+i;break;case K.MERGE_CELL_UP:c=r-1;break;default:c=r+o}return function(t,e,s){const n=rt(t);for(let r=0;r<t.length;r++){const i=t[r];for(const o of i.children){const{colSpan:i,rowSpan:a}=st(o),c=nt(o,t,n),l=r+a-1,h=c+i-1,u=s>=c&&s<=h;if(e>=r&&e<=l&&u)return o}}return null}(n,c,l)}function ot(t){const e=t[0].parent.parent.children,s=rt(e);let n=Number.POSITIVE_INFINITY,r=-1,i=Number.POSITIVE_INFINITY,o=-1;const a=new Set;return t.forEach((t=>{const c=e.indexOf(t.parent),l=nt(t,e,s),{colSpan:h,rowSpan:u}=st(t),d=c,p=c+u-1,E=l,f=l+h-1;for(let t=d;t<=p;t++)for(let e=E;e<=f;e++)a.add(`${t},${e}`);n=Math.min(n,d),r=Math.max(r,p),i=Math.min(i,E),o=Math.max(o,f)})),{minRow:n,maxRow:r,minCol:i,maxCol:o,targetCell:t[0],coveredPositions:a}}function at(t){let e=0;const s=q(t)[0];for(const t of s.children){const{colSpan:s}=st(t);e+=s}return e}function ct(t){if(1===t.length)return!0;const e=ot(t),{minRow:s,maxRow:n,minCol:r,maxCol:i,coveredPositions:o}=e;return o.size===(n-s+1)*(i-r+1)}function lt(t,e,s,i,o){const a=t.annotationMap.get(n.CUSTOM_ATTRIBUTE),c=a?Object.assign({},a.customAttribute):{};delete c.colspan,delete c.rowspan,e>1&&(c.colspan=String(e));const l=at(i)+(o?1:0);if(s>1&&e!==l&&(c.rowspan=String(s)),Object.keys(c).length>0){const e=new r(c);t.annotationMap.set(n.CUSTOM_ATTRIBUTE,e)}else t.annotationMap.delete(n.CUSTOM_ATTRIBUTE)}function ht(t){const e=et(t);return"table-head-cell"===t?V.from(e):W.from(e)}function ut(t,e,s){for(let n=0;n<s;n++){const s=t[n],r=e.children.find((t=>t.id===s));if(r&&!(r instanceof V))return n}return-1}function dt(t){const e=new Map;return t.forEach((t=>{for(let s=0;s<t.length;s++){const n=t[s];n&&!e.has(n)&&e.set(n,s)}})),e}function pt(t,e,s,n){if(0===t.length)return[0,-1];const r=s||q(e),i=null!=n?n:rt(r);let o=Number.POSITIVE_INFINITY,a=Number.NEGATIVE_INFINITY;return t.forEach((t=>{const e=nt(t,r,i);o=Math.min(o,e),a=Math.max(a,e)})),[o,a]}!function(t){t.HEADER_ROW="HEADER_ROW",t.ADD_ROW_ABOVE="ADD_ROW_ABOVE",t.ADD_ROW_BELOW="ADD_ROW_BELOW",t.DELETE_ROW="DELETE_ROW",t.SELECT_ROW="SELECT_ROW"}(Y||(Y={}));class Et extends R{canHandle(t){return t[0]===S.ROW}execute(t,e){const s=t[1];switch(s){case Y.ADD_ROW_ABOVE:case Y.ADD_ROW_BELOW:this.handleInsertRow(s,e);break;case Y.DELETE_ROW:this.handleDeleteRow(e);break;case Y.HEADER_ROW:this.handleToggleHeader(e);break;case Y.SELECT_ROW:this.handleSelectRow(e)}}handleInsertRow(t,e){const s=this.getAllSelectedRows(e);if(s.length>0){const e=t===Y.ADD_ROW_ABOVE?x.ABOVE:x.BELOW,n=e===x.ABOVE?s[0]:s[s.length-1],r=n.parent instanceof H,i=this.shouldInsertHeaderRow(n,e)||r?new k(e,s):new D(e,s);this.applyActionToTable(s[0],i)}}shouldInsertHeaderRow(t,e){if(e===x.ABOVE)return t.parent instanceof F;{const e=t.parent;return e instanceof F&&e.children[e.children.length-1]!==t}}handleDeleteRow(t){const e=this.getAllSelectedRows(t);if(e.length){const t=new M(e);this.applyActionToTable(e[0],t)}}handleToggleHeader(t){const e=this.getAllSelectedRows(t);if(e.length>0){const t=new j(e);this.applyActionToTable(e[0],t)}}handleSelectRow(t){const e=this.getAllSelectedRows(t);if(e.length>0&&t&&t.tableSelection){const s=e.flatMap((t=>t.children));t.tableSelection.setSelectedCells(s)}}getAllSelectedRows(t){const e=new Set;if(t&&t.tableSelection){const{tableSelection:s}=t;s.getSelectedCells().forEach((t=>{const s=X(t,$);s&&e.add(s)}))}return Array.from(e)}applyActionToTable(t,e){const s=X(t,w);s&&s.apply(e)}}const ft="REPLACE_TABLE_CELL";class Lt extends s{constructor(t){super(),this.isFlushable=!0,this.type="REPLACE_TABLE_CELL",this.payload=t}}const bt="SPLIT_TABLE_CELL";class gt extends s{constructor(t){super(),this.isFlushable=!0,this.type="SPLIT_TABLE_CELL",this.payload=t}}class Ct extends o{getBoundaryCellColumnRange(t,e,s){let n=Number.POSITIVE_INFINITY,r=Number.NEGATIVE_INFINITY;return t.forEach((t=>{const i=nt(t,e,s);n=Math.min(n,i),r=Math.max(r,i)})),[n,r]}}class Tt extends Ct{static isFullHeaderSelection(t){if(0===t.length)return!1;const e=X(t[0],w);if(e){const s=q(e),n=rt(s),r=new Map;s.forEach((t=>{t.children.forEach((t=>r.set(t.id,t)))}));const[i,o]=pt(t,e,s,n);for(const t of n)for(let e=i;e<=o;e++){const s=r.get(t[e]);if(s&&!(s instanceof V))return!1}return!0}return!1}handleAction(t,e){const s=t.headerOn,n=q(e),r=rt(n),[i,o]=this.getBoundaryCellColumnRange(t.tableCellHeaderRange,n,r);(s||!s&&i>0)&&this.toggleHeadRows(e,n,r,s,o,i),this.toggleBodyRows(e,n,r,s,i,o);const a=this.getRootContent(e);if(a&&t.tableCellHeaderRange[0].parent){const e=t.tableCellHeaderRange[0].parent.getFirstNode();e&&a.apply(new E(e,0))}}toggleHeadRows(t,e,s,n,r,i){var o;const a=((null===(o=t.children.find((t=>t instanceof F)))||void 0===o?void 0:o.children)||[]).length;for(let o=0;o<a;o++)this.toggleCellType(t,e[o],s[o],0,n?r:i-1,(()=>!0),(t=>V.from(t.toJSON())))}toggleBodyRows(t,e,s,n,r,i){var o;const a=s[0].length,c=(null===(o=t.children.find((t=>t instanceof H)))||void 0===o?void 0:o.children)||[],l=e.length-c.length;for(let o=0;o<c.length;o++){const c=o+l,h=e[c],u=s[c],d=ut(u,h,a);n?d>-1&&this.toggleCellType(t,h,u,d,i,(t=>!(t instanceof V)),(t=>V.from(t.toJSON()))):this.toggleCellType(t,h,u,r,-1===d?a-1:d-1,(t=>t instanceof V),(t=>W.from(t.toJSON())))}}toggleCellType(t,e,s,n,r,i,o){for(let a=n;a<=r;a++){const n=s[a],c=e.children.find((t=>t.id===n));if(c&&i(c)){const i=s.indexOf(n),l={table:t,cell:c,col:a,cellStartCol:i,endCol:r,targetCellType:o(c).type},h=i+c.colSpan-1;if(h>r||i<a){if(e.apply(new gt(l)),h>r)return;a=h;continue}e.apply(new Lt(l))}c&&(a+=c.colSpan-1)}}}const _t="DELETE_TABLE_COLUMN";class mt extends s{constructor(t){super(),this.isFlushable=!0,this.type="DELETE_TABLE_COLUMN",this.tableCellDeleteRange=t}}const Ot="INSERT_TABLE_COLUMN";var At;!function(t){t.LEFT="LEFT",t.RIGHT="RIGHT"}(At||(At={}));class St extends s{constructor(t,e){super(),this.isFlushable=!0,this.type="INSERT_TABLE_COLUMN",this.tableCellInsertRange=e,this.insertDirection=t}}const yt="SELECT_TABLE_COLUMN";class wt extends s{constructor(t,e){super(),this.type="SELECT_TABLE_COLUMN",this.tableCellSelectRange=t,this.selectCellCallback=e}}const Rt="TOGGLE_HEADER_TABLE_COLUMN";class Nt extends s{constructor(t,e){super(),this.isFlushable=!0,this.type="TOGGLE_HEADER_TABLE_COLUMN",this.headerOn=!1,this.tableCellHeaderRange=t,this.headerOn=e}}var Mt;!function(t){t.HEADER_COLUMN="HEADER_COLUMN",t.ADD_COLUMN_LEFT="ADD_COLUMN_LEFT",t.ADD_COLUMN_RIGHT="ADD_COLUMN_RIGHT",t.DELETE_COLUMN="DELETE_COLUMN",t.SELECT_COLUMN="SELECT_COLUMN"}(Mt||(Mt={}));class It extends R{canHandle(t){return t[0]===S.COLUMN}execute(t,e){const s=e.tableSelection.getSelectedCells();if(!s||0===s.length)return;const n=t[1];switch(n){case Mt.ADD_COLUMN_LEFT:case Mt.ADD_COLUMN_RIGHT:this.handleInsertColumn(n,s);break;case Mt.DELETE_COLUMN:this.handleDeleteColumn(s);break;case Mt.SELECT_COLUMN:this.handleSelectColumn(s,e);break;case Mt.HEADER_COLUMN:this.handleToggleHeaderColumn(s)}}handleInsertColumn(t,e){const s=new St(t===Mt.ADD_COLUMN_LEFT?At.LEFT:At.RIGHT,e);this.applyActionOnTable(s,e[0])}handleDeleteColumn(t){const e=new mt(t);this.applyActionOnTable(e,t[0])}handleSelectColumn(t,e){const s=new wt(t,(t=>{e.tableSelection.setSelectedCells(t)}));this.applyActionOnTable(s,t[0])}handleToggleHeaderColumn(t){const e=!Tt.isFullHeaderSelection(t),s=new Nt(t,e);this.applyActionOnTable(s,t[0])}applyActionOnTable(t,e){const s=X(e,w);s&&s.apply(t)}}const Dt="SPLIT_CELL_HORIZONTALLY";class vt extends s{constructor(){super(),this.isFlushable=!0,this.type="SPLIT_CELL_HORIZONTALLY"}}const xt="SPLIT_CELL_VERTICALLY";class kt extends s{constructor(){super(),this.isFlushable=!0,this.type="SPLIT_CELL_VERTICALLY"}}var Bt;!function(t){t.SPLIT_CELL_HORIZONTALLY="SPLIT_CELL_HORIZONTALLY",t.SPLIT_CELL_VERTICALLY="SPLIT_CELL_VERTICALLY"}(Bt||(Bt={}));class jt extends R{canHandle(t){return t[0]===S.SPLIT_CELL}execute(t,e){const s=e.tableSelection.getSelectedCells();if(s&&1===s.length){const e=s[0];switch(t[1]){case Bt.SPLIT_CELL_HORIZONTALLY:this.handleSplitCellHorizontally(e);break;case Bt.SPLIT_CELL_VERTICALLY:this.handleSplitCellVertically(e)}}}handleSplitCellHorizontally(t){const e=new vt;t.apply(e)}handleSplitCellVertically(t){const e=new kt;t.apply(e)}}export{pt as $,$ as A,nt as B,It as C,x as D,T as E,I as F,v as G,N as H,At as I,B as J,Ot as K,_t as L,z as M,Rt as N,Tt as O,bt as P,ft as Q,A as R,R as S,S as T,Dt as U,g as V,xt as W,yt as X,U as Y,C as Z,Mt as _,_ as a,Y as a0,Bt as a1,ct as a2,it as a3,y as b,P as c,V as d,Et as e,jt as f,m as g,w as h,Z as i,W as j,F as k,H as l,X as m,G as n,Ct as o,q as p,rt as q,tt as r,lt as s,et as t,dt as u,at as v,Q as w,st as x,ht as y,K as z}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Y as e,p as s,e as t,h as a,t as r,j as o,k as i,Z as u,_ as n,$ as l}from"./p-
|
|
1
|
+
import{Y as e,p as s,e as t,h as a,t as r,j as o,k as i,Z as u,_ as n,$ as l}from"./p-8db904dc.js";import{L as c}from"./p-6e1ab235.js";const d=new class extends e{constructor(){super(...arguments),this.states=["default","focus-visible","hover","active"]}formatToken(e){return s(e)?`border-color: ${a[e]};`:(c.warn(`The borderColor value ${e} is invalid, it must be a value of: `,t),"")}getStates(){return this.states}},v=new class extends e{constructor(){super(...arguments),this.states=["default","focus-visible","hover"]}formatToken(e){return r(e)?`box-shadow: ${i[e]};`:(c.warn(`The shadow value ${e} is invalid, it must be a value of: `,o),"")}getStates(){return this.states}},h=new class extends e{constructor(){super(...arguments),this.states=["default","focus-visible","hover","active"]}formatToken(e){return u(e)?`border: ${l[e]};`:(c.warn(`The border value ${e} is invalid, it must be a value of: `,n),"")}getStates(){return this.states}};export{h as S,v as a,d as b}
|