@globalpayments/vega 2.34.0 → 2.35.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-4e819773.js → app-globals-fb3693cc.js} +22 -21
- package/dist/cjs/{change-manager-bda1d107.js → change-manager-a297e4d2.js} +1 -1
- package/dist/cjs/{child-nodes-event-prevent-slimmer-e1a6e5ad.js → child-nodes-event-prevent-slimmer-96c3c4ae.js} +3 -3
- package/dist/cjs/{child-nodes-notify-observer-slimmer-03a3f79e.js → child-nodes-notify-observer-slimmer-be92f366.js} +5 -5
- package/dist/cjs/{component-63af66ea.js → component-73a88c4e.js} +1 -1
- package/dist/cjs/{component-global-style-slimmer-6b64a26c.js → component-global-style-slimmer-6749808c.js} +1 -1
- package/dist/cjs/{component-usage-runtime-metrics-019d3c00.js → component-usage-runtime-metrics-dcb32c24.js} +1 -1
- package/dist/cjs/content-state-3e4467a3.js +134 -0
- package/dist/cjs/{create-public-api-runtime-metrics-slimmer-8c6a8fb7.js → create-public-api-runtime-metrics-slimmer-54c3f73b.js} +2 -2
- package/dist/cjs/{date-ffe382a4.js → date-0a6bb035.js} +1 -1
- package/dist/cjs/{deprecated-property-slimmer-f36e3779.js → deprecated-property-slimmer-fc729fd9.js} +2 -2
- package/dist/cjs/{design-token-908e3f69.js → design-token-30c069c1.js} +3 -3
- package/dist/cjs/{dom-node-subject-observer-factory-093462f1.js → dom-node-subject-factory-3ec114b8.js} +1 -41
- package/dist/cjs/dom-node-subject-observer-factory-5f0eae19.js +44 -0
- package/dist/cjs/{dynamic-slimmer-dc30600a.js → dynamic-slimmer-f31fdfd7.js} +1 -1
- package/dist/cjs/{element-appender-slimmer-0dd70e61.js → element-appender-slimmer-700b7004.js} +6 -6
- package/dist/cjs/{event-emit-slimmer-a46bb411.js → event-emit-slimmer-9c223f73.js} +7 -6
- package/dist/cjs/{feature-flag-controller-e97b5f29.js → feature-flag-controller-7b22e598.js} +1 -1
- package/dist/cjs/{form-field-controller-slimmer-9aeabcdc.js → form-field-controller-slimmer-dbb321ad.js} +61 -37
- package/dist/cjs/global-slimmer-registry-b3bce7e0.js +297 -0
- package/dist/cjs/{icon-manager-36dcfb65.js → icon-manager-edc2400b.js} +2 -2
- package/dist/cjs/{text-color-toolbar-button-slimmer-b1c9f40e.js → image-annotation-action-d3e1699c.js} +78 -27
- package/dist/cjs/{global-slimmer-registry-dd2691b8.js → index-09acd3c9.js} +282 -296
- package/dist/cjs/index.cjs.js +27 -28
- package/dist/cjs/{inject-keyboard-manager-af37c861.js → inject-keyboard-manager-4a5c27a2.js} +1 -1
- package/dist/cjs/{internal-icon-manager-2282a62f.js → internal-icon-manager-5ccb9443.js} +1 -1
- package/dist/cjs/{internal-vega-event-manager-d7643ec6.js → internal-vega-event-manager-e5e4bcf4.js} +72 -72
- package/dist/cjs/{internal-vega-z-index-manager-e24e4309.js → internal-vega-z-index-manager-f03ddb37.js} +1 -1
- package/dist/cjs/{keyboard-manager-5afbc8f1.js → keyboard-manager-2df53b2f.js} +1 -1
- package/dist/cjs/{keyboard-manager-slimmer-9be2a880.js → keyboard-manager-slimmer-feba3a83.js} +2 -2
- package/dist/cjs/{content-state-3a2724f6.js → list-block-91116257.js} +1393 -679
- package/dist/cjs/loader.cjs.js +21 -21
- package/dist/cjs/{mutation-observer-slimmer-98bbbdf0.js → mutation-observer-slimmer-895b3d3e.js} +1 -1
- package/dist/cjs/{node.abstract-f8075f84.js → node-annotation.abstract-e5d3a859.js} +37 -48
- package/dist/cjs/{page-resize-observer-slimmer-e54fa9d4.js → page-resize-observer-slimmer-bb1eaebe.js} +1 -1
- package/dist/cjs/{remote-invocation-registry-71a45468.js → remote-invocation-registry-ff9af278.js} +3 -3
- package/dist/cjs/{responsive-format-facade-74079f1b.js → responsive-format-facade-4363a00d.js} +1 -1
- package/dist/cjs/{state-background-color-formatter-d32a1098.js → state-background-color-formatter-e585a027.js} +1 -1
- package/dist/cjs/{string-input-formatter-slimmer-297765c0.js → string-input-formatter-slimmer-6155c9f5.js} +1 -1
- package/dist/cjs/{style-formatter-5deb065f.js → style-formatter-63218b76.js} +1 -1
- package/dist/cjs/{sub-state-notify-slimmer-73201c53.js → sub-state-notify-slimmer-c2e08e06.js} +8 -8
- package/dist/cjs/{sub-state-observer-slimmer-10c0d402.js → sub-state-observer-slimmer-b97e46b5.js} +8 -8
- package/dist/cjs/{translation-f6b7ee84.js → translation-b9be41e0.js} +3 -3
- package/dist/cjs/{translation-slimmer-90f9f71f.js → translation-slimmer-ec76c5a2.js} +2 -2
- package/dist/cjs/{ui-b5906704.js → ui-5fd9b267.js} +1 -1
- package/dist/cjs/vega-accordion.cjs.entry.js +41 -39
- package/dist/cjs/vega-app-footer.cjs.entry.js +13 -12
- package/dist/cjs/vega-app-header-button.cjs.entry.js +42 -40
- package/dist/cjs/vega-backdrop.cjs.entry.js +9 -8
- package/dist/cjs/vega-banner.cjs.entry.js +36 -34
- package/dist/cjs/vega-bar-chart.cjs.entry.js +6 -5
- package/dist/cjs/vega-box.cjs.entry.js +13 -12
- package/dist/cjs/vega-breadcrumb.cjs.entry.js +34 -32
- package/dist/cjs/vega-button-circle.cjs.entry.js +25 -23
- package/dist/cjs/vega-button-group_2.cjs.entry.js +32 -30
- package/dist/cjs/vega-button-link.cjs.entry.js +26 -24
- package/dist/cjs/vega-button.cjs.entry.js +26 -24
- package/dist/cjs/vega-calendar_3.cjs.entry.js +135 -133
- package/dist/cjs/vega-card.cjs.entry.js +11 -10
- package/dist/cjs/vega-carousel.cjs.entry.js +25 -23
- package/dist/cjs/vega-checkbox_2.cjs.entry.js +46 -44
- package/dist/cjs/vega-chip.cjs.entry.js +36 -34
- package/dist/cjs/vega-color-picker.cjs.entry.js +26 -24
- package/dist/cjs/vega-combo-box.cjs.entry.js +46 -44
- package/dist/cjs/vega-counter-badge.cjs.entry.js +10 -9
- package/dist/cjs/vega-date-picker_2.cjs.entry.js +92 -54
- package/dist/cjs/{vega-dialog-controller-aaf1f43e.js → vega-dialog-controller-fe610705.js} +2 -2
- package/dist/cjs/vega-dialog_2.cjs.entry.js +47 -45
- package/dist/cjs/vega-divider.cjs.entry.js +11 -10
- package/dist/cjs/vega-dropdown_5.cjs.entry.js +132 -130
- package/dist/cjs/vega-env-manager-23b8b23c.js +2 -2
- package/dist/cjs/vega-field-error.cjs.entry.js +8 -7
- package/dist/cjs/vega-field-label.cjs.entry.js +22 -20
- package/dist/cjs/vega-file-uploader.cjs.entry.js +67 -65
- package/dist/cjs/vega-flex.cjs.entry.js +14 -13
- package/dist/cjs/vega-font.cjs.entry.js +14 -13
- package/dist/cjs/vega-form.cjs.entry.js +47 -40
- package/dist/cjs/vega-grid.cjs.entry.js +11 -10
- package/dist/cjs/vega-hint.cjs.entry.js +7 -6
- package/dist/cjs/vega-icon.cjs.entry.js +16 -15
- package/dist/cjs/vega-image-uploader.cjs.entry.js +51 -49
- package/dist/cjs/vega-input-credit-card.cjs.entry.js +37 -35
- package/dist/cjs/vega-input-numeric.cjs.entry.js +30 -28
- package/dist/cjs/vega-input-phone-number.cjs.entry.js +98 -50
- package/dist/cjs/vega-input-range.cjs.entry.js +40 -38
- package/dist/cjs/vega-input-select.cjs.entry.js +62 -60
- package/dist/cjs/vega-input.cjs.entry.js +46 -44
- package/dist/cjs/vega-item-toggle.cjs.entry.js +21 -19
- package/dist/cjs/vega-left-nav_5.cjs.entry.js +102 -100
- package/dist/cjs/vega-line-chart.cjs.entry.js +7 -6
- package/dist/cjs/vega-loader-wrapper_2.cjs.entry.js +16 -15
- package/dist/cjs/vega-page-notification_2.cjs.entry.js +20 -18
- package/dist/cjs/vega-pagination.cjs.entry.js +57 -52
- package/dist/cjs/vega-pie-chart.cjs.entry.js +7 -6
- package/dist/cjs/vega-popover_2.cjs.entry.js +34 -32
- package/dist/cjs/vega-progress-tracker.cjs.entry.js +29 -27
- package/dist/cjs/vega-radio_2.cjs.entry.js +50 -48
- package/dist/cjs/vega-rich-text-content.cjs.entry.js +323 -23
- package/dist/cjs/vega-rich-text-editor_4.cjs.entry.js +999 -736
- package/dist/cjs/vega-section-title.cjs.entry.js +15 -14
- package/dist/cjs/vega-segment-control.cjs.entry.js +24 -22
- package/dist/cjs/vega-selection-chip_2.cjs.entry.js +49 -47
- package/dist/cjs/vega-selection-tile_2.cjs.entry.js +61 -59
- package/dist/cjs/vega-sidenav_3.cjs.entry.js +46 -44
- package/dist/cjs/vega-signature-capture.cjs.entry.js +40 -38
- package/dist/cjs/{block-annotation.abstract-4d88b939.js → vega-skeleton-loader-controller-7dac484f.js} +7 -21
- package/dist/cjs/vega-skeleton.cjs.entry.js +26 -25
- package/dist/cjs/vega-slot-container.cjs.entry.js +6 -5
- package/dist/cjs/vega-stepper.cjs.entry.js +34 -32
- package/dist/cjs/vega-tab-group_2.cjs.entry.js +88 -75
- package/dist/cjs/vega-table_8.cjs.entry.js +185 -183
- package/dist/cjs/vega-text.cjs.entry.js +9 -8
- package/dist/cjs/vega-textarea.cjs.entry.js +34 -32
- package/dist/cjs/vega-time-picker_2.cjs.entry.js +83 -81
- package/dist/cjs/vega-toggle-switch.cjs.entry.js +23 -21
- package/dist/cjs/vega-tooltip_2.cjs.entry.js +20 -19
- package/dist/cjs/vega.cjs.js +21 -21
- package/dist/collection/components/vega-date-picker/slimmers/renderers/vega-date-picker-calendar-renderer.js +37 -0
- package/dist/collection/components/vega-date-picker/vega-date-picker.js +20 -0
- package/dist/collection/components/vega-form/vega-form.js +13 -4
- package/dist/collection/components/vega-input-phone-number/slimmers/controllers/vega-input-phone-number-value-controller.js +38 -3
- package/dist/collection/components/vega-input-phone-number/vega-input-phone-number.js +35 -0
- package/dist/collection/components/vega-pagination/vega-pagination.js +5 -2
- package/dist/collection/components/vega-rich-text-content/slimmers/renderers/vega-rich-text-content-renderer.js +18 -1
- package/dist/collection/components/vega-rich-text-editor/dto/annotations/bold-annotation.js +0 -10
- package/dist/collection/components/vega-rich-text-editor/dto/annotations/code-annotation.js +0 -9
- package/dist/collection/components/vega-rich-text-editor/dto/annotations/horizontal-alignment-annotation.js +0 -44
- package/dist/collection/components/vega-rich-text-editor/dto/annotations/image-annotation.js +0 -10
- package/dist/collection/components/vega-rich-text-editor/dto/annotations/indent-annotation.js +0 -42
- package/dist/collection/components/vega-rich-text-editor/dto/annotations/italic-annotation.js +0 -9
- package/dist/collection/components/vega-rich-text-editor/dto/annotations/link-annotation.js +0 -14
- package/dist/collection/components/vega-rich-text-editor/dto/annotations/link-group-annotation.js +0 -90
- package/dist/collection/components/vega-rich-text-editor/dto/annotations/strikethrough-annotation.js +0 -11
- package/dist/collection/components/vega-rich-text-editor/dto/annotations/text-color-annotation.js +0 -26
- package/dist/collection/components/vega-rich-text-editor/dto/annotations/text-style-annotation.js +0 -44
- package/dist/collection/components/vega-rich-text-editor/dto/annotations/underline-annotation.js +0 -11
- package/dist/collection/components/vega-rich-text-editor/dto/blocks/block.abstract.js +0 -42
- package/dist/collection/components/vega-rich-text-editor/dto/blocks/image-block.js +67 -26
- package/dist/collection/components/vega-rich-text-editor/dto/blocks/list-block.js +45 -31
- package/dist/collection/components/vega-rich-text-editor/dto/blocks/list-item-block.js +68 -35
- package/dist/collection/components/vega-rich-text-editor/dto/blocks/text-block.js +113 -50
- package/dist/collection/components/vega-rich-text-editor/dto/nodes/image-node.js +23 -60
- package/dist/collection/components/vega-rich-text-editor/dto/nodes/node.abstract.js +0 -25
- package/dist/collection/components/vega-rich-text-editor/dto/nodes/text-node.js +95 -51
- package/dist/collection/components/vega-rich-text-editor/dto/renderers/blocks/block-renderer.abstract.js +35 -0
- package/dist/collection/components/vega-rich-text-editor/dto/renderers/blocks/block-text-nodes-renderer.abstract.js +104 -0
- package/dist/collection/components/vega-rich-text-editor/dto/renderers/blocks/image-block-renderer.js +15 -0
- package/dist/collection/components/vega-rich-text-editor/dto/renderers/blocks/list-block-renderer.js +14 -0
- package/dist/collection/components/vega-rich-text-editor/dto/renderers/blocks/list-item-block-renderer.js +14 -0
- package/dist/collection/components/vega-rich-text-editor/dto/renderers/blocks/text-block-renderer.js +28 -0
- package/dist/collection/components/vega-rich-text-editor/dto/renderers/nodes/image-node-renderer.js +49 -0
- package/dist/collection/components/vega-rich-text-editor/dto/renderers/nodes/node-renderer.abstract.js +35 -0
- package/dist/collection/components/vega-rich-text-editor/dto/renderers/nodes/text-node-renderer.js +24 -0
- package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/block-to-rte-block-strategy.abstract.js +258 -0
- package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/continue-inline-to-rte-text-block-strategy.js +71 -0
- package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/element-to-dto-strategy-processor.js +72 -0
- package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/element-to-dto-strategy.abstract.js +37 -0
- package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/img-to-rte-image-block-strategy.js +55 -0
- package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/inline-block-to-rte-text-block-strategy.js +85 -0
- package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/li-to-rte-list-item-block-strategy.js +49 -0
- package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/ol-to-rte-list-block-strategy.js +50 -0
- package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/span-img-to-rte-image-block-strategy.js +60 -0
- package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/ul-not-li-child-to-rte-list-item-block.js +49 -0
- package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/ul-to-rte-list-block-strategy.js +50 -0
- package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/vega-image-to-rte-image-block-strategy.js +56 -0
- package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/input-event-handler/insert-paste-handler.js +7 -3
- package/dist/collection/components/vega-rich-text-editor/test/dto/blocks/image-block.test.js +0 -10
- package/dist/collection/components/vega-rich-text-editor/test/dto/blocks/list-block.test.js +0 -48
- package/dist/collection/components/vega-rich-text-editor/test/dto/blocks/list-item.test.js +0 -40
- package/dist/collection/components/vega-rich-text-editor/test/dto/blocks/text-block.test.js +0 -39
- package/dist/collection/components/vega-rich-text-editor/test/dto/nodes/image-node.test.js +0 -14
- package/dist/collection/components/vega-rich-text-editor/test/dto/nodes/text-node.test.js +0 -34
- package/dist/collection/components/vega-tab-group/slimmers/vega-tab-group/controllers/vega-tab-group-page-index-controller.js +22 -22
- package/dist/collection/components/vega-tab-group/slimmers/vega-tab-group/controllers/vega-tab-group-selected-target-controller.js +9 -1
- package/dist/collection/components/vega-tab-group/slimmers/vega-tab-group/renderers/vega-tab-group-direction-button-renderer.js +4 -1
- package/dist/collection/components/vega-table/vega-table-head-cell/vega-table-head-cell.css +3 -0
- package/dist/collection/helpers/slimmers/field-error-ui-controller-slimmer.js +10 -16
- package/dist/collection/helpers/slimmers/form-field-message-translator.js +17 -0
- package/dist/collection/helpers/slimmers/form-field-valid-invoke-slimmer.js +6 -3
- package/dist/collection/helpers/validator/form-field-controller.js +9 -3
- package/dist/collection/helpers/validator/validation-rule-handler/form-field-validation-rule-handler-chain.js +7 -2
- package/dist/esm/{app-globals-9971ccfd.js → app-globals-5b154b6d.js} +13 -12
- package/dist/esm/{change-manager-8f5b72c2.js → change-manager-6a7eb88c.js} +1 -1
- package/dist/esm/{child-nodes-event-prevent-slimmer-8ceabe63.js → child-nodes-event-prevent-slimmer-97aae8a8.js} +3 -3
- package/dist/esm/{child-nodes-notify-observer-slimmer-afc15e00.js → child-nodes-notify-observer-slimmer-289caacc.js} +4 -4
- package/dist/esm/{component-051a594c.js → component-cae24190.js} +1 -1
- package/dist/esm/{component-global-style-slimmer-631f956f.js → component-global-style-slimmer-000e0c11.js} +1 -1
- package/dist/esm/{component-usage-runtime-metrics-21813c36.js → component-usage-runtime-metrics-385c7124.js} +1 -1
- package/dist/esm/content-state-f39c4bbf.js +132 -0
- package/dist/esm/{create-public-api-runtime-metrics-slimmer-14cb4599.js → create-public-api-runtime-metrics-slimmer-9ab05523.js} +2 -2
- package/dist/esm/{date-655c0af8.js → date-732bc749.js} +1 -1
- package/dist/esm/{deprecated-property-slimmer-9ea5019c.js → deprecated-property-slimmer-43d184b3.js} +2 -2
- package/dist/esm/{design-token-20fdba82.js → design-token-d06bc718.js} +3 -3
- package/dist/esm/{dom-node-subject-observer-factory-80358591.js → dom-node-subject-factory-5831cdd4.js} +2 -41
- package/dist/esm/dom-node-subject-observer-factory-dc486a8b.js +42 -0
- package/dist/esm/{dynamic-slimmer-85746483.js → dynamic-slimmer-90b8af32.js} +1 -1
- package/dist/esm/{element-appender-slimmer-4dfa326d.js → element-appender-slimmer-d71e3109.js} +6 -6
- package/dist/esm/{event-emit-slimmer-c03cf145.js → event-emit-slimmer-f285e3ac.js} +6 -5
- package/dist/esm/{feature-flag-controller-dfde0cfa.js → feature-flag-controller-4b3fe6f8.js} +1 -1
- package/dist/esm/{form-field-controller-slimmer-de5fe574.js → form-field-controller-slimmer-add614f1.js} +55 -31
- package/dist/esm/global-slimmer-registry-17c4efd4.js +283 -0
- package/dist/esm/{icon-manager-3cef32e7.js → icon-manager-b889176b.js} +2 -2
- package/dist/esm/{text-color-toolbar-button-slimmer-d0255b98.js → image-annotation-action-a8e00f28.js} +55 -6
- package/dist/esm/{global-slimmer-registry-6887a59f.js → index-187f71d1.js} +283 -284
- package/dist/esm/index.js +20 -21
- package/dist/esm/{inject-keyboard-manager-45309420.js → inject-keyboard-manager-b0135018.js} +1 -1
- package/dist/esm/{internal-icon-manager-7fc7535a.js → internal-icon-manager-900a5bb4.js} +1 -1
- package/dist/esm/{internal-vega-event-manager-3a3815d3.js → internal-vega-event-manager-07e1b3d9.js} +2 -2
- package/dist/esm/{internal-vega-z-index-manager-89e8b6f5.js → internal-vega-z-index-manager-7d2b54c3.js} +1 -1
- package/dist/esm/{keyboard-manager-2c06eafe.js → keyboard-manager-4c898a0d.js} +1 -1
- package/dist/esm/{keyboard-manager-slimmer-fd177285.js → keyboard-manager-slimmer-f80d6835.js} +2 -2
- package/dist/esm/{content-state-acf55eb0.js → list-block-ba82c846.js} +1273 -577
- package/dist/esm/loader.js +20 -20
- package/dist/esm/{mutation-observer-slimmer-ca2cb2e8.js → mutation-observer-slimmer-6cef9549.js} +1 -1
- package/dist/esm/{node.abstract-93746055.js → node-annotation.abstract-d7d52bce.js} +35 -47
- package/dist/esm/{page-resize-observer-slimmer-8589ebc8.js → page-resize-observer-slimmer-beb7b0bd.js} +1 -1
- package/dist/esm/{remote-invocation-registry-2ec6936d.js → remote-invocation-registry-d97fa3bc.js} +2 -2
- package/dist/esm/{responsive-format-facade-559ec469.js → responsive-format-facade-c2ab9c87.js} +1 -1
- package/dist/esm/{state-background-color-formatter-16031a43.js → state-background-color-formatter-121ae7d3.js} +1 -1
- package/dist/esm/{string-input-formatter-slimmer-c9fb1fa1.js → string-input-formatter-slimmer-73fa06e6.js} +1 -1
- package/dist/esm/{style-formatter-51845b6d.js → style-formatter-f91471e8.js} +1 -1
- package/dist/esm/{sub-state-notify-slimmer-6e97a58a.js → sub-state-notify-slimmer-48bad548.js} +4 -4
- package/dist/esm/{sub-state-observer-slimmer-0968ce04.js → sub-state-observer-slimmer-403cc4e7.js} +4 -4
- package/dist/esm/{translation-b3fe8e74.js → translation-a98970d8.js} +3 -3
- package/dist/esm/{translation-slimmer-860cd766.js → translation-slimmer-5ee9912b.js} +2 -2
- package/dist/esm/{ui-5600b48f.js → ui-62e4be97.js} +1 -1
- package/dist/esm/vega-accordion.entry.js +17 -15
- package/dist/esm/vega-app-footer.entry.js +4 -3
- package/dist/esm/vega-app-header-button.entry.js +20 -18
- package/dist/esm/vega-backdrop.entry.js +5 -4
- package/dist/esm/vega-banner.entry.js +15 -13
- package/dist/esm/vega-bar-chart.entry.js +3 -2
- package/dist/esm/vega-box.entry.js +10 -9
- package/dist/esm/vega-breadcrumb.entry.js +13 -11
- package/dist/esm/vega-button-circle.entry.js +16 -14
- package/dist/esm/vega-button-group_2.entry.js +15 -13
- package/dist/esm/vega-button-link.entry.js +13 -11
- package/dist/esm/vega-button.entry.js +15 -13
- package/dist/esm/vega-calendar_3.entry.js +23 -21
- package/dist/esm/vega-card.entry.js +8 -7
- package/dist/esm/vega-carousel.entry.js +14 -12
- package/dist/esm/vega-checkbox_2.entry.js +19 -17
- package/dist/esm/vega-chip.entry.js +17 -15
- package/dist/esm/vega-color-picker.entry.js +16 -14
- package/dist/esm/vega-combo-box.entry.js +20 -18
- package/dist/esm/vega-counter-badge.entry.js +4 -3
- package/dist/esm/vega-date-picker_2.entry.js +67 -29
- package/dist/esm/{vega-dialog-controller-5b23f68c.js → vega-dialog-controller-34eb8967.js} +2 -2
- package/dist/esm/vega-dialog_2.entry.js +20 -18
- package/dist/esm/vega-divider.entry.js +8 -7
- package/dist/esm/vega-dropdown_5.entry.js +27 -25
- package/dist/esm/vega-env-manager-8f8dc473.js +2 -2
- package/dist/esm/vega-field-error.entry.js +5 -4
- package/dist/esm/vega-field-label.entry.js +11 -9
- package/dist/esm/vega-file-uploader.entry.js +19 -17
- package/dist/esm/vega-flex.entry.js +11 -10
- package/dist/esm/vega-font.entry.js +9 -8
- package/dist/esm/vega-form.entry.js +28 -21
- package/dist/esm/vega-grid.entry.js +8 -7
- package/dist/esm/vega-hint.entry.js +4 -3
- package/dist/esm/vega-icon.entry.js +11 -10
- package/dist/esm/vega-image-uploader.entry.js +21 -19
- package/dist/esm/vega-input-credit-card.entry.js +20 -18
- package/dist/esm/vega-input-numeric.entry.js +21 -19
- package/dist/esm/vega-input-phone-number.entry.js +70 -22
- package/dist/esm/vega-input-range.entry.js +19 -17
- package/dist/esm/vega-input-select.entry.js +22 -20
- package/dist/esm/vega-input.entry.js +18 -16
- package/dist/esm/vega-item-toggle.entry.js +12 -10
- package/dist/esm/vega-left-nav_5.entry.js +24 -22
- package/dist/esm/vega-line-chart.entry.js +4 -3
- package/dist/esm/vega-loader-wrapper_2.entry.js +7 -6
- package/dist/esm/vega-page-notification_2.entry.js +8 -6
- package/dist/esm/vega-pagination.entry.js +21 -16
- package/dist/esm/vega-pie-chart.entry.js +4 -3
- package/dist/esm/vega-popover_2.entry.js +18 -16
- package/dist/esm/vega-progress-tracker.entry.js +12 -10
- package/dist/esm/vega-radio_2.entry.js +21 -19
- package/dist/esm/vega-rich-text-content.entry.js +317 -17
- package/dist/esm/vega-rich-text-editor_4.entry.js +704 -441
- package/dist/esm/vega-section-title.entry.js +4 -3
- package/dist/esm/vega-segment-control.entry.js +12 -10
- package/dist/esm/vega-selection-chip_2.entry.js +21 -19
- package/dist/esm/vega-selection-tile_2.entry.js +21 -19
- package/dist/esm/vega-sidenav_3.entry.js +19 -17
- package/dist/esm/vega-signature-capture.entry.js +22 -20
- package/dist/esm/{block-annotation.abstract-b0554e2b.js → vega-skeleton-loader-controller-0aaaf1fa.js} +8 -21
- package/dist/esm/vega-skeleton.entry.js +4 -3
- package/dist/esm/vega-slot-container.entry.js +3 -2
- package/dist/esm/vega-stepper.entry.js +18 -16
- package/dist/esm/vega-tab-group_2.entry.js +49 -36
- package/dist/esm/vega-table_8.entry.js +26 -24
- package/dist/esm/vega-text.entry.js +5 -4
- package/dist/esm/vega-textarea.entry.js +18 -16
- package/dist/esm/vega-time-picker_2.entry.js +25 -23
- package/dist/esm/vega-toggle-switch.entry.js +16 -14
- package/dist/esm/vega-tooltip_2.entry.js +13 -12
- package/dist/esm/vega.js +20 -20
- package/dist/types/components/vega-date-picker/slimmers/renderers/vega-date-picker-calendar-renderer.d.ts +3 -0
- package/dist/types/components/vega-date-picker/vega-date-picker.d.ts +9 -0
- package/dist/types/components/vega-form/types.d.ts +1 -0
- package/dist/types/components/vega-input-phone-number/slimmers/controllers/vega-input-phone-number-value-controller.d.ts +19 -0
- package/dist/types/components/vega-input-phone-number/vega-input-phone-number.d.ts +9 -0
- package/dist/types/components/vega-pagination/vega-pagination.d.ts +1 -0
- package/dist/types/components/vega-rich-text-content/slimmers/renderers/vega-rich-text-content-renderer.d.ts +2 -0
- package/dist/types/components/vega-rich-text-editor/dto/annotations/bold-annotation.d.ts +0 -7
- package/dist/types/components/vega-rich-text-editor/dto/annotations/code-annotation.d.ts +0 -7
- package/dist/types/components/vega-rich-text-editor/dto/annotations/horizontal-alignment-annotation.d.ts +0 -14
- package/dist/types/components/vega-rich-text-editor/dto/annotations/image-annotation.d.ts +0 -8
- package/dist/types/components/vega-rich-text-editor/dto/annotations/indent-annotation.d.ts +0 -14
- package/dist/types/components/vega-rich-text-editor/dto/annotations/italic-annotation.d.ts +0 -7
- package/dist/types/components/vega-rich-text-editor/dto/annotations/link-annotation.d.ts +0 -7
- package/dist/types/components/vega-rich-text-editor/dto/annotations/link-group-annotation.d.ts +0 -6
- package/dist/types/components/vega-rich-text-editor/dto/annotations/strikethrough-annotation.d.ts +0 -7
- package/dist/types/components/vega-rich-text-editor/dto/annotations/text-color-annotation.d.ts +0 -7
- package/dist/types/components/vega-rich-text-editor/dto/annotations/text-style-annotation.d.ts +0 -14
- package/dist/types/components/vega-rich-text-editor/dto/annotations/underline-annotation.d.ts +0 -7
- package/dist/types/components/vega-rich-text-editor/dto/blocks/block.abstract.d.ts +2 -23
- package/dist/types/components/vega-rich-text-editor/dto/blocks/image-block.d.ts +68 -5
- package/dist/types/components/vega-rich-text-editor/dto/blocks/list-block.d.ts +45 -4
- package/dist/types/components/vega-rich-text-editor/dto/blocks/list-item-block.d.ts +68 -4
- package/dist/types/components/vega-rich-text-editor/dto/blocks/text-block.d.ts +110 -6
- package/dist/types/components/vega-rich-text-editor/dto/nodes/image-node.d.ts +21 -6
- package/dist/types/components/vega-rich-text-editor/dto/nodes/node.abstract.d.ts +1 -14
- package/dist/types/components/vega-rich-text-editor/dto/nodes/text-node.d.ts +86 -4
- package/dist/types/components/vega-rich-text-editor/dto/renderers/blocks/block-renderer.abstract.d.ts +28 -0
- package/dist/types/components/vega-rich-text-editor/dto/renderers/blocks/block-text-nodes-renderer.abstract.d.ts +14 -0
- package/dist/types/components/vega-rich-text-editor/dto/renderers/blocks/image-block-renderer.d.ts +10 -0
- package/dist/types/components/vega-rich-text-editor/dto/renderers/blocks/list-block-renderer.d.ts +10 -0
- package/dist/types/components/vega-rich-text-editor/dto/renderers/blocks/list-item-block-renderer.d.ts +9 -0
- package/dist/types/components/vega-rich-text-editor/dto/renderers/blocks/text-block-renderer.d.ts +11 -0
- package/dist/types/components/vega-rich-text-editor/dto/renderers/nodes/image-node-renderer.d.ts +10 -0
- package/dist/types/components/vega-rich-text-editor/dto/renderers/nodes/node-renderer.abstract.d.ts +21 -0
- package/dist/types/components/vega-rich-text-editor/dto/renderers/nodes/text-node-renderer.d.ts +9 -0
- package/dist/types/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/block-to-rte-block-strategy.abstract.d.ts +111 -0
- package/dist/types/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/continue-inline-to-rte-text-block-strategy.d.ts +32 -0
- package/dist/types/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/element-to-dto-strategy-processor.d.ts +19 -0
- package/dist/types/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/element-to-dto-strategy.abstract.d.ts +32 -0
- package/dist/types/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/img-to-rte-image-block-strategy.d.ts +31 -0
- package/dist/types/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/inline-block-to-rte-text-block-strategy.d.ts +38 -0
- package/dist/types/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/li-to-rte-list-item-block-strategy.d.ts +35 -0
- package/dist/types/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/ol-to-rte-list-block-strategy.d.ts +36 -0
- package/dist/types/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/span-img-to-rte-image-block-strategy.d.ts +31 -0
- package/dist/types/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/ul-not-li-child-to-rte-list-item-block.d.ts +31 -0
- package/dist/types/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/ul-to-rte-list-block-strategy.d.ts +36 -0
- package/dist/types/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/vega-image-to-rte-image-block-strategy.d.ts +31 -0
- package/dist/types/components/vega-tab-group/slimmers/vega-tab-group/controllers/vega-tab-group-page-index-controller.d.ts +6 -6
- package/dist/types/components/vega-tab-group/slimmers/vega-tab-group/controllers/vega-tab-group-selected-target-controller.d.ts +1 -0
- package/dist/types/components.d.ts +21 -0
- package/dist/types/helpers/slimmers/field-error-ui-controller-slimmer.d.ts +2 -7
- package/dist/types/helpers/slimmers/form-field-message-translator.d.ts +12 -0
- package/dist/types/helpers/validator/form-field-controller.d.ts +5 -2
- package/dist/types/helpers/validator/validation-rule-handler/form-field-validation-rule-handler-chain.d.ts +2 -2
- package/dist/types/helpers/validator/validator.d.ts +1 -1
- package/dist/types/types/components.type.d.ts +1 -0
- package/dist/vega/index.esm.js +1 -1
- package/dist/vega/p-000b3ab0.js +1 -0
- package/dist/vega/p-00738ae9.entry.js +1 -0
- package/dist/vega/p-01d0dbe6.entry.js +1 -0
- package/dist/vega/p-032df16f.js +1 -0
- package/dist/vega/p-05f5e22b.entry.js +1 -0
- package/dist/vega/p-0634f06b.entry.js +1 -0
- package/dist/vega/p-0945a58d.entry.js +1 -0
- package/dist/vega/p-09c5de7f.entry.js +1 -0
- package/dist/vega/p-0a8b91f5.entry.js +1 -0
- package/dist/vega/{p-f763e2eb.js → p-0af4bda9.js} +1 -1
- package/dist/vega/p-0be711b6.entry.js +1 -0
- package/dist/vega/p-0c2eb135.entry.js +1 -0
- package/dist/vega/p-0ee10fd7.js +1 -0
- package/dist/vega/p-12ad8ada.entry.js +1 -0
- package/dist/vega/p-14514252.entry.js +1 -0
- package/dist/vega/{p-11a19ca0.js → p-149d2801.js} +1 -1
- package/dist/vega/p-14f85e30.entry.js +1 -0
- package/dist/vega/p-193d2c51.entry.js +1 -0
- package/dist/vega/p-1a64716b.entry.js +1 -0
- package/dist/vega/p-1c298d5a.js +2 -0
- package/dist/vega/p-1d805cc0.entry.js +1 -0
- package/dist/vega/p-211df22a.entry.js +1 -0
- package/dist/vega/p-21d59593.entry.js +1 -0
- package/dist/vega/p-2205ee4c.js +1 -0
- package/dist/vega/p-29b09aad.js +1 -0
- package/dist/vega/p-2bbcb1ca.entry.js +1 -0
- package/dist/vega/{p-443ad3b3.js → p-2d0d575f.js} +1 -1
- package/dist/vega/{p-368d0060.js → p-2fbda931.js} +1 -1
- package/dist/vega/p-3126edd6.entry.js +1 -0
- package/dist/vega/p-33b62194.js +1 -0
- package/dist/vega/p-42df8a42.js +1 -0
- package/dist/vega/{p-8f93242a.js → p-4387d550.js} +1 -1
- package/dist/vega/p-45dd4698.entry.js +1 -0
- package/dist/vega/p-4873be94.entry.js +1 -0
- package/dist/vega/{p-3b4bde3e.js → p-4b500240.js} +1 -1
- package/dist/vega/{p-e0b25eaf.js → p-4f0b56fc.js} +1 -1
- package/dist/vega/p-5298fd92.entry.js +1 -0
- package/dist/vega/p-5760619c.entry.js +1 -0
- package/dist/vega/p-5915634b.js +1 -0
- package/dist/vega/p-5dd923e0.entry.js +1 -0
- package/dist/vega/p-5f377954.js +1 -1
- package/dist/vega/{p-70151c27.js → p-5f589974.js} +1 -1
- package/dist/vega/p-61116634.entry.js +1 -0
- package/dist/vega/p-618b35e4.entry.js +1 -0
- package/dist/vega/p-625771d7.entry.js +1 -0
- package/dist/vega/{p-62774231.js → p-6705c68a.js} +1 -1
- package/dist/vega/p-68f0aa72.entry.js +1 -0
- package/dist/vega/{p-59bdf9b8.js → p-6a334573.js} +1 -1
- package/dist/vega/p-6a3989dd.js +1 -0
- package/dist/vega/{p-0e0c47ad.js → p-6a5a5c7b.js} +1 -1
- package/dist/vega/p-6c09b79a.entry.js +1 -0
- package/dist/vega/p-6d23c08b.entry.js +1 -0
- package/dist/vega/p-6e1ab235.js +1 -0
- package/dist/vega/p-71eeb279.entry.js +1 -0
- package/dist/vega/p-7258cb9c.entry.js +1 -0
- package/dist/vega/p-72eee5e2.js +1 -0
- package/dist/vega/{p-eac38d87.js → p-781fd6e0.js} +1 -1
- package/dist/vega/{p-1995e98e.js → p-79ec5d69.js} +1 -1
- package/dist/vega/p-7ecbf764.entry.js +1 -0
- package/dist/vega/{p-3f1b542a.js → p-81dbada7.js} +1 -1
- package/dist/vega/{p-a6a7d0c9.js → p-8284a445.js} +1 -1
- package/dist/vega/p-84f2f342.js +1 -0
- package/dist/vega/p-85365f8b.js +1 -0
- package/dist/vega/p-8ab356e8.entry.js +1 -0
- package/dist/vega/p-8ba43640.entry.js +1 -0
- package/dist/vega/p-8d69f9ef.entry.js +1 -0
- package/dist/vega/p-8fc170d9.entry.js +1 -0
- package/dist/vega/p-91aa058f.entry.js +1 -0
- package/dist/vega/{p-8c26227e.js → p-926596cc.js} +1 -1
- package/dist/vega/p-92707b74.entry.js +1 -0
- package/dist/vega/p-97453cd8.entry.js +1 -0
- package/dist/vega/{p-843a0c1c.js → p-987fbbd0.js} +1 -1
- package/dist/vega/{p-296cc56b.js → p-9b797118.js} +1 -1
- package/dist/vega/p-a01f149d.entry.js +1 -0
- package/dist/vega/{p-3953c705.js → p-af7a3154.js} +1 -1
- package/dist/vega/p-b0e824df.entry.js +13 -0
- package/dist/vega/p-b2bca332.entry.js +1 -0
- package/dist/vega/p-b57792b7.js +1 -0
- package/dist/vega/p-b5990090.js +1 -0
- package/dist/vega/p-b6815874.js +1 -0
- package/dist/vega/p-b688a71b.js +1 -0
- package/dist/vega/p-b6f09c98.entry.js +1 -0
- package/dist/vega/p-b9a09a76.js +1 -0
- package/dist/vega/p-bcb10ae3.entry.js +1 -0
- package/dist/vega/{p-39836361.js → p-be12fa36.js} +1 -1
- package/dist/vega/p-c016c3b2.entry.js +1 -0
- package/dist/vega/p-c02f650e.entry.js +1 -0
- package/dist/vega/p-c2b276f7.entry.js +1 -0
- package/dist/vega/p-c51a3e3c.entry.js +1 -0
- package/dist/vega/p-c56965fc.entry.js +1 -0
- package/dist/vega/p-c6f544fe.entry.js +1 -0
- package/dist/vega/p-c88acd87.entry.js +1 -0
- package/dist/vega/p-cb8f8458.entry.js +1 -0
- package/dist/vega/p-cda26bdf.entry.js +1 -0
- package/dist/vega/p-d09d153f.entry.js +1 -0
- package/dist/vega/p-d994874a.entry.js +1 -0
- package/dist/vega/p-dcdac4d0.entry.js +1 -0
- package/dist/vega/p-de25326f.js +1 -0
- package/dist/vega/{p-e1e1fcf0.js → p-de664bdd.js} +1 -1
- package/dist/vega/p-e04d4ba3.entry.js +1 -0
- package/dist/vega/p-e093b2c5.entry.js +1 -0
- package/dist/vega/p-e480babd.entry.js +1 -0
- package/dist/vega/p-e8f540d8.js +1 -0
- package/dist/vega/p-eaf6c3d8.entry.js +1 -0
- package/dist/vega/p-efbea85a.entry.js +1 -0
- package/dist/vega/p-f2cc36ae.entry.js +1 -0
- package/dist/vega/{p-81ead59a.js → p-f31bb1fd.js} +1 -1
- package/dist/vega/p-f48711fa.entry.js +1 -0
- package/dist/vega/p-f690539e.entry.js +1 -0
- package/dist/vega/p-f6b89936.entry.js +1 -0
- package/dist/vega/p-f84fd31c.js +1 -0
- package/dist/vega/p-fc6ea557.entry.js +1 -0
- package/dist/vega/{p-acf7f903.js → p-ff4bafa3.js} +1 -1
- package/dist/vega/p-ff50c204.entry.js +1 -0
- package/dist/vega/vega.esm.js +1 -1
- package/package.json +3 -2
- package/dist/cjs/text-node-0d12da5a.js +0 -1077
- package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-handler/element-to-dto-handler.abstract.js +0 -135
- package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-handler/element-to-dto-processor.js +0 -74
- package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-handler/image-to-dto-handler.js +0 -47
- package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-handler/inline-block-to-dto-handler.js +0 -39
- package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-handler/link-to-dto-handler.js +0 -50
- package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-handler/list-item-to-dto-handler.js +0 -41
- package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-handler/list-to-dto-handler.js +0 -57
- package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-handler/paragraph-to-dto-handler.js +0 -56
- package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-handler/text-block-to-dto-handler.js +0 -77
- package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-handler/text-to-dto-handler.js +0 -44
- package/dist/esm/text-node-6f7d736c.js +0 -1055
- package/dist/types/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-handler/element-to-dto-handler.abstract.d.ts +0 -67
- package/dist/types/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-handler/element-to-dto-processor.d.ts +0 -29
- package/dist/types/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-handler/image-to-dto-handler.d.ts +0 -37
- package/dist/types/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-handler/inline-block-to-dto-handler.d.ts +0 -35
- package/dist/types/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-handler/link-to-dto-handler.d.ts +0 -37
- package/dist/types/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-handler/list-item-to-dto-handler.d.ts +0 -36
- package/dist/types/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-handler/list-to-dto-handler.d.ts +0 -39
- package/dist/types/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-handler/paragraph-to-dto-handler.d.ts +0 -39
- package/dist/types/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-handler/text-block-to-dto-handler.d.ts +0 -46
- package/dist/types/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-handler/text-to-dto-handler.d.ts +0 -37
- package/dist/vega/p-034e6348.entry.js +0 -1
- package/dist/vega/p-0cd2b50f.entry.js +0 -1
- package/dist/vega/p-109a00cf.entry.js +0 -1
- package/dist/vega/p-11cb477b.js +0 -1
- package/dist/vega/p-1564cc4d.entry.js +0 -1
- package/dist/vega/p-18886765.entry.js +0 -1
- package/dist/vega/p-19b26168.entry.js +0 -1
- package/dist/vega/p-21992602.entry.js +0 -1
- package/dist/vega/p-22563151.entry.js +0 -1
- package/dist/vega/p-23795da1.entry.js +0 -1
- package/dist/vega/p-29277e41.entry.js +0 -1
- package/dist/vega/p-2a7e9422.entry.js +0 -1
- package/dist/vega/p-2ca6d977.entry.js +0 -1
- package/dist/vega/p-2e419309.entry.js +0 -1
- package/dist/vega/p-2fc3af2f.js +0 -1
- package/dist/vega/p-3039bef8.js +0 -1
- package/dist/vega/p-315667f1.js +0 -1
- package/dist/vega/p-34939c97.entry.js +0 -1
- package/dist/vega/p-3897bb2d.entry.js +0 -1
- package/dist/vega/p-390c5236.entry.js +0 -1
- package/dist/vega/p-3ce31dc3.js +0 -1
- package/dist/vega/p-452e284a.js +0 -1
- package/dist/vega/p-49f4a666.js +0 -1
- package/dist/vega/p-4c41dd64.js +0 -1
- package/dist/vega/p-55beac7f.entry.js +0 -1
- package/dist/vega/p-57405834.entry.js +0 -1
- package/dist/vega/p-589e6041.entry.js +0 -1
- package/dist/vega/p-5e95402a.entry.js +0 -1
- package/dist/vega/p-5eee21b4.entry.js +0 -1
- package/dist/vega/p-62cea2e7.entry.js +0 -1
- package/dist/vega/p-65b79fd7.js +0 -1
- package/dist/vega/p-6741e2b9.entry.js +0 -1
- package/dist/vega/p-6a084fe1.entry.js +0 -1
- package/dist/vega/p-6b286226.entry.js +0 -1
- package/dist/vega/p-6b722905.entry.js +0 -1
- package/dist/vega/p-6e4b2752.entry.js +0 -1
- package/dist/vega/p-7209d03b.js +0 -1
- package/dist/vega/p-728b029a.entry.js +0 -1
- package/dist/vega/p-76fc408e.entry.js +0 -1
- package/dist/vega/p-7a9f453e.entry.js +0 -1
- package/dist/vega/p-80ccd894.entry.js +0 -1
- package/dist/vega/p-84c597c8.entry.js +0 -1
- package/dist/vega/p-8b78c6a3.entry.js +0 -1
- package/dist/vega/p-8be45a45.entry.js +0 -1
- package/dist/vega/p-8d7b45f7.entry.js +0 -1
- package/dist/vega/p-8e17b9dd.entry.js +0 -1
- package/dist/vega/p-925a2137.js +0 -1
- package/dist/vega/p-92f88033.entry.js +0 -1
- package/dist/vega/p-94de7a02.entry.js +0 -1
- package/dist/vega/p-9968e71d.entry.js +0 -1
- package/dist/vega/p-9c1eeff2.js +0 -2
- package/dist/vega/p-9d1b9e70.entry.js +0 -1
- package/dist/vega/p-a5ffe912.js +0 -1
- package/dist/vega/p-a6104aa7.js +0 -1
- package/dist/vega/p-a6169ad6.entry.js +0 -1
- package/dist/vega/p-a8bf559a.js +0 -1
- package/dist/vega/p-afec17ad.entry.js +0 -1
- package/dist/vega/p-b3f9cc3a.entry.js +0 -13
- package/dist/vega/p-b693c1ac.entry.js +0 -1
- package/dist/vega/p-b6af0fc1.entry.js +0 -1
- package/dist/vega/p-b9e2add4.entry.js +0 -1
- package/dist/vega/p-bd894860.entry.js +0 -1
- package/dist/vega/p-c0d6a587.entry.js +0 -1
- package/dist/vega/p-c1d97d12.entry.js +0 -1
- package/dist/vega/p-c26e6820.entry.js +0 -1
- package/dist/vega/p-c34487e1.entry.js +0 -1
- package/dist/vega/p-c532b132.entry.js +0 -1
- package/dist/vega/p-ca2fb711.js +0 -1
- package/dist/vega/p-cebf93f1.entry.js +0 -1
- package/dist/vega/p-cfdc148a.entry.js +0 -1
- package/dist/vega/p-d0351d71.entry.js +0 -1
- package/dist/vega/p-d2ab6096.entry.js +0 -1
- package/dist/vega/p-d302f052.entry.js +0 -1
- package/dist/vega/p-d35643c5.entry.js +0 -1
- package/dist/vega/p-d400a1d9.entry.js +0 -1
- package/dist/vega/p-d6732a72.entry.js +0 -1
- package/dist/vega/p-d720b06a.entry.js +0 -1
- package/dist/vega/p-d987e404.entry.js +0 -1
- package/dist/vega/p-d9b86108.entry.js +0 -1
- package/dist/vega/p-e27e115d.entry.js +0 -1
- package/dist/vega/p-e43c2a27.js +0 -1
- package/dist/vega/p-e65c8ac7.entry.js +0 -1
- package/dist/vega/p-e79057cc.js +0 -1
- package/dist/vega/p-e89e9769.entry.js +0 -1
- package/dist/vega/p-ecd64c7f.entry.js +0 -1
- package/dist/vega/p-f5b2e72a.entry.js +0 -1
- package/dist/vega/p-f6af3749.js +0 -1
- package/dist/vega/p-fc622a75.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e,c as i,h as t,H as a,g as r}from"./p-1c298d5a.js";import{c as o}from"./p-86194314.js";import{s as n}from"./p-9b797118.js";import{C as s}from"./p-2d0d575f.js";import{R as l,i as d,b as h}from"./p-d057999f.js";import{O as c,d as p,f as g,z as v,A as f}from"./p-6a3989dd.js";import{f as b}from"./p-79ec5d69.js";import{c as m,M as u,V as x,I as w}from"./p-6e1ab235.js";import{V as y,I as j}from"./p-4387d550.js";import{c as R}from"./p-e8f540d8.js";import{c as k}from"./p-f357cf46.js";import{R as I}from"./p-3152031c.js";import{C}from"./p-ed4a57a8.js";import{F as O}from"./p-b57792b7.js";import{C as A}from"./p-72eee5e2.js";import{C as E}from"./p-be12fa36.js";import{K as z}from"./p-de25326f.js";import{M as V}from"./p-987fbbd0.js";import{T as D}from"./p-a9354a5c.js";import"./p-6a334573.js";import"./p-29b09aad.js";import"./p-0af4bda9.js";import"./p-0bb29d98.js";import"./p-33b62194.js";import"./p-de664bdd.js";import"./p-5f589974.js";import"./p-4bcd6612.js";import"./p-74168615.js";import"./p-ed45b3b6.js";import"./p-b0502d01.js";import"./p-262ec334.js";import"./p-5f377954.js";import"./p-ff4bafa3.js";import"./p-7a40e033.js";import"./p-112455b1.js";import"./p-6a5a5c7b.js";var G=function(e,i,t,a){var r,o=arguments.length,n=o<3?i:null===a?a=Object.getOwnPropertyDescriptor(i,t):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,i,t,a);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(n=(o<3?r(n):o>3?r(i,t,n):r(i,t))||n);return o>3&&n&&Object.defineProperty(i,t,n),n};class F extends x{connectedCallback(){this.radioGroup=b(this.host,"vega-radio-group")||b(this.host,"vega-selection-tile-group"),this.radioGroup&&(this.fieldErrorObserver=new c(this.canAcceptFieldErrorObserver.bind(this),this.fieldErrorObserverListener.bind(this)),s.register(p.getSubject(this.radioGroup,k),this.fieldErrorObserver))}disconnectedCallback(){this.radioGroup&&s.unregister(p.getSubject(this.radioGroup,k),this.fieldErrorObserver)}canAcceptFieldErrorObserver(e){return("VEGA-RADIO-GROUP"===e.host.tagName||"VEGA-SELECTION-TILE-GROUP"===e.host.tagName)&&this.radioGroup===e.host}fieldErrorObserverListener(e){this.showError=e.showError}}G([m({writable:!0})],F.prototype,"showError",void 0),G([m()],F.prototype,"host",void 0),G([u("connectedCallback")],F.prototype,"connectedCallback",null),G([u("disconnectedCallback")],F.prototype,"disconnectedCallback",null);var L=function(e,i,t,a){var r,o=arguments.length,n=o<3?i:null===a?a=Object.getOwnPropertyDescriptor(i,t):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,i,t,a);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(n=(o<3?r(n):o>3?r(i,t,n):r(i,t))||n);return o>3&&n&&Object.defineProperty(i,t,n),n};const N=class{constructor(t){e(this,t),this.vegaFocus=i(this,"vegaFocus",7),this.focus=i(this,"focus",7),this.vegaBlur=i(this,"vegaBlur",7),this.blur=i(this,"blur",7),this.vegaChange=i(this,"vegaChange",7),this.change=i(this,"change",7),this.globalSlimmers={},this.changeEventEmitter=R(N,g),this.focusEventEmitter=R(N,v),this.blurEventEmitter=R(N,f),this.vegaRadioShowErrorController=new F,this.vegaComponentUsageRuntimeMetricsSlimmer=new y,this.groupDisabled=!1,this.showError=!1,this.value="",this.checked=!1,this.disabled=!1,this.size="default",this.updateValue=e=>{this.checked=e.currentTarget.checked,e.stopPropagation()},this.handleFocus=e=>{this.focusEventEmitter.emit(e,e)},this.handleBlur=e=>{this.blurEventEmitter.emit(e,e)},this.handleClick=e=>{e.stopPropagation()}}watchCheckedChange(){this.changeEventEmitter.emit(this.checked),s.notify(l,{host:this.host,detail:this.checked})}connectedCallback(){this.ariaLabel=this.host.textContent,""==this.ariaLabel&&(this.ariaLabel=this.value)}disconnectedCallback(){this.unRegisterGroupDisabledObserver()}componentDidLoad(){""===this.host.textContent&&this.labelElement.classList.add("vega-hidden"),this.initAndRegisterGroupDisabledObserver()}render(){return n(t(a,{class:{"vega-flex-shrink-0 v-min-w-min":"VEGA-RADIO-GROUP"==this.host.parentElement.nodeName}},t("label",{class:{"vega-radio-container":!0,[this.size]:!0,"vega-radio-checked":this.checked,"vega-radio-disabled":this.isDisabled(),error:this.showError}},t("input",{type:"radio",name:this.name,checked:this.checked,value:this.value,onFocus:this.handleFocus,onBlur:this.handleBlur,onClick:this.handleClick,onChange:this.updateValue,"aria-label":this.ariaLabel||"No label defined",disabled:this.isDisabled(),tabIndex:this.isDisabled()?-1:0,onKeyDown:o()}),t("span",{class:"vega-radio-icon"},t("span",{class:"vega-radio-circle"})),t("div",{class:"vega-radio-label",ref:e=>this.labelElement=e},t("slot",null)))),this.host)}isDisabled(){return this.disabled||this.groupDisabled}canAcceptGroupDisabledObserver(e){return b(this.host,"vega-radio-group")===e.host}groupDisabledObserverListener(e){this.groupDisabled=e.host.disabled}initAndRegisterGroupDisabledObserver(){b(this.host,"vega-radio-group")&&(this.groupDisabledObserver=new c(this.canAcceptGroupDisabledObserver.bind(this),this.groupDisabledObserverListener.bind(this)),s.register(d,this.groupDisabledObserver))}unRegisterGroupDisabledObserver(){this.groupDisabledObserver&&s.unregister(d,this.groupDisabledObserver)}get host(){return r(this)}static get watchers(){return{checked:["watchCheckedChange"]}}};L([j()],N.prototype,"globalSlimmers",void 0),L([w()],N.prototype,"changeEventEmitter",void 0),L([w()],N.prototype,"focusEventEmitter",void 0),L([w()],N.prototype,"blurEventEmitter",void 0),L([w()],N.prototype,"vegaRadioShowErrorController",void 0),L([w()],N.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),N.style=':host{display:inline-block;box-sizing:border-box;height:24px}.vega-radio-container{position:relative;display:inline-flex;gap:8px;cursor:pointer}.vega-radio-container input{position:absolute;left:0px;top:0px;opacity:0}.vega-radio-icon{display:inline-block;box-sizing:border-box;border-style:solid;border-radius:9999px;position:relative;left:0px;flex-shrink:0;border:1px solid rgba(var(--v-border-input-field, 171, 198, 216, 1));background-color:rgba(var(--v-bg-primary, 252, 252, 252, 1))}.vega-radio-icon:hover{border:1px solid rgba(var(--v-border-input-field-hover, 115, 160, 190, 1))}.vega-radio-container.default .vega-radio-icon{width:24px;height:24px;padding:5px}.vega-radio-container.small .vega-radio-icon{width:16px;height:16px;padding:4px}.vega-radio-checked:hover .vega-radio-circle{background-color:rgba(var(--v-bg-action-hover, 4, 112, 236, 1))}.vega-radio-container input[type=radio]:focus-visible+.vega-radio-icon{box-shadow:0 0 0 4px rgba(var(--v-ring-input-focus, 19, 98, 226, 0.25));border:1px solid rgba(var(--v-border-input-field-focus, 19, 98, 226, 1))}.vega-radio-container:not(.vega-radio-disabled):active .vega-radio-icon{border-width:1px;border-style:solid;border-color:rgba(var(--v-border-color-action-active, 29, 65, 195, 1))}.vega-radio-checked:active .vega-radio-circle{background-color:rgba(var(--v-bg-action-active, 29, 65, 195, 1))}.vega-radio-checked .vega-radio-circle{display:block;width:100%;height:100%;border-radius:9999px;background-color:rgba(var(--v-bg-action, 19, 98, 226, 1))}.vega-radio-disabled .vega-radio-icon{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-radio-disabled .vega-radio-circle{background-color:rgba(var(--v-bg-disabled, 176, 180, 181, 1))}.vega-radio-disabled:hover .vega-radio-circle{background-color:rgba(var(--v-bg-disabled, 176, 180, 181, 1))}.vega-radio-container .vega-radio-label{display:inline-block;color:rgba(var(--v-text-primary, 32, 54, 69, 1))}.vega-radio-container .vega-radio-label.vega-hidden{display:none}.vega-radio-container.default .vega-radio-label{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}@media screen and (min-width: 768px) and (max-width: 1023px){.vega-radio-container.default .vega-radio-label{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.vega-radio-container.default .vega-radio-label{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.vega-radio-container.default .vega-radio-label{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}.vega-radio-container.small .vega-radio-label{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px}@media screen and (min-width: 768px) and (max-width: 1023px){.vega-radio-container.small .vega-radio-label{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.vega-radio-container.small .vega-radio-label{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.vega-radio-container.small .vega-radio-label{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px}}.vega-radio-disabled .vega-radio-label{color:rgba(var(--v-text-disabled, 176, 180, 181, 1))}label{-webkit-tap-highlight-color:transparent}.vega-radio-container.error .vega-radio-icon{border:1px solid rgba(var(--v-border-input-field-danger, 230, 50, 87, 1))}.vega-radio-container.error:hover .vega-radio-icon{border:1px solid rgba(var(--v-border-input-field-danger-hover, 255, 87, 114, 1))}.vega-radio-container.error input[type=radio]:focus-visible+.vega-radio-icon{border:1px solid rgba(var(--v-border-input-field-danger-focus, 233, 71, 104, 1));box-shadow:0 0 0 4px rgba(var(--v-ring-input-danger-focus, 230, 50, 87, 0.25))}.vega-radio-container.error:active .vega-radio-icon{border:1px solid rgba(var(--v-border-input-field-danger-focus, 233, 71, 104, 1))}.vega-radio-checked.error .vega-radio-circle{background-color:rgba(var(--v-bg-danger, 189, 41, 71, 1))}.vega-radio-checked.error:hover .vega-radio-circle{background-color:rgba(var(--v-bg-danger-hover, 233, 71, 104, 1))}.vega-radio-checked.error:active .vega-radio-circle{background-color:rgba(var(--v-bg-danger-active, 230, 50, 87, 1))}';class S extends z{constructor(){super((e=>(e.setRadioArrayTabIndex(),[{keyCode:["ArrowUp","ArrowDown"],activeElementInScope:[e.host],callback:e=>{this.updateRadioFocusStates(e)}}])))}setRadioArrayTabIndex(){const e=this.getNotDisabledRadioArray();if(e){const i=e.findIndex((e=>e.checked)),t=i>-1?i:0;e.forEach(((e,i)=>{const a=i===t?"0":"-1";e.shadowRoot.querySelector("input").setAttribute("tabIndex",a)}))}}updateRadioFocusStates(e){const i=e.key,t=this.getNotDisabledRadioArray();if(!t||0===t.length)return;t.forEach((e=>e.shadowRoot.querySelector("input").setAttribute("tabIndex","-1")));const a=t.findIndex((i=>i===e.target));let r;"ArrowDown"===i?r=a===t.length-1?t[0]:t[a+1]:"ArrowUp"===i&&(r=0===a?t[t.length-1]:t[a-1]),r&&(r.shadowRoot.querySelector("input").focus(),r.checked=!0,r.shadowRoot.querySelector("input").tabIndex=0)}getNotDisabledRadioArray(){const e=Array.from(this.host.querySelectorAll("vega-radio"));if(e.length>0)return e.filter((e=>!e.disabled))}}!function(e,i,t,a){var r,o=arguments.length,n=o<3?i:null===a?a=Object.getOwnPropertyDescriptor(i,t):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,i,t,a);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(n=(o<3?r(n):o>3?r(i,t,n):r(i,t))||n);o>3&&n&&Object.defineProperty(i,t,n)}([m()],S.prototype,"host",void 0);var P=function(e,i,t,a){var r,o=arguments.length,n=o<3?i:null===a?a=Object.getOwnPropertyDescriptor(i,t):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,i,t,a);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(n=(o<3?r(n):o>3?r(i,t,n):r(i,t))||n);return o>3&&n&&Object.defineProperty(i,t,n),n};class U extends x{emitEventAndNotifyValueChangeSubject(e){this.changeEventEmitter.emit(e),s.notify(h,{host:this.host,detail:e})}setValue(e){this.value=e}}P([m()],U.prototype,"host",void 0),P([m({writable:!0})],U.prototype,"value",void 0),P([m()],U.prototype,"changeEventEmitter",void 0),P([m()],U.prototype,"radioItemsController",void 0),P([u("watchValue")],U.prototype,"emitEventAndNotifyValueChangeSubject",null);var M=function(e,i,t,a){var r,o=arguments.length,n=o<3?i:null===a?a=Object.getOwnPropertyDescriptor(i,t):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,i,t,a);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(n=(o<3?r(n):o>3?r(i,t,n):r(i,t))||n);return o>3&&n&&Object.defineProperty(i,t,n),n};class q extends x{constructor(){super(...arguments),this.vegaRadioArray=[]}componentWillLoad(){this.syncRadioArrayAndValue()}setRadioItemName(){this.vegaRadioArray.forEach((e=>{e.name=this.name?this.name:e.getAttribute("name")}))}setRadioItemCheckedByValue(e){this.vegaRadioArray.forEach((i=>{i.checked=i.value===e}))}syncRadioItemsStatus(){this.setRadioItemCheckedByValue(this.value),this.setRadioItemName()}getRadioItemsArray(){return this.vegaRadioArray}syncRadioArrayAndValue(){this.vegaRadioArray=Array.from(this.host.querySelectorAll("vega-radio")),this.vegaRadioArray.forEach((e=>{e.checked&&this.valueController.setValue(e.value)}))}}M([m()],q.prototype,"host",void 0),M([m()],q.prototype,"value",void 0),M([m()],q.prototype,"name",void 0),M([m()],q.prototype,"valueController",void 0),M([u("componentWillLoad")],q.prototype,"componentWillLoad",null),M([u("watchName")],q.prototype,"setRadioItemName",null),M([u("watchValue")],q.prototype,"setRadioItemCheckedByValue",null),M([u("componentDidLoad")],q.prototype,"syncRadioItemsStatus",null);var B=function(e,i,t,a){var r,o=arguments.length,n=o<3?i:null===a?a=Object.getOwnPropertyDescriptor(i,t):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,i,t,a);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(n=(o<3?r(n):o>3?r(i,t,n):r(i,t))||n);return o>3&&n&&Object.defineProperty(i,t,n),n};const T=class{constructor(t){e(this,t),this.vegaChange=i(this,"vegaChange",7),this.change=i(this,"change",7),this.globalSlimmers={},this.formFieldController=new O({propertyRules:[{propertyName:"required",ruleFactory:e=>e?new I:null}],inputContainerGetter:()=>this.inputContainerRef,touchableAreaGetter:()=>this.radioItemsController.getRadioItemsArray().map((e=>e.shadowRoot.querySelector("input"))),defaultValue:"",attributeGetter:e=>this[e],validationRulesName:"validationRules"}),this.radioValueChangeObserver=new A(l,(e=>this.childRadioValueChange(e))),this.radioEventPrevent=new E([g],(()=>this.vegaFlexElement)),this.slotMutationObserver=new V({options:{childList:!0},mutationFilter:D("VEGA-RADIO"),callback:()=>this.radioItemsController.syncRadioArrayAndValue()}),this.changeEventEmitter=R(T,g),this.keyboardController=new S,this.radioItemsController=new q,this.valueController=new U,this.vegaComponentUsageRuntimeMetricsSlimmer=new y,this.label="",this.value="",this.vegaFlexProp={},this.required=!1,this.hint="",this.isValid=null,this.disabled=!1,this.autoValidation=!0,this.validationRules=[],this.childRadioValueChange=e=>{e.detail&&this.valueController.setValue(e.host.value)}}async watchValue(e){}watchName(){}watchVegaFlexProp(){this.setVegaFlexProperty()}async watchDisabled(){this.notifyGroupDisabledChange()}watchValidationRules(){}componentWillLoad(){}componentDidLoad(){this.setVegaFlexProperty(),this.disabled&&this.notifyGroupDisabledChange()}render(){return n(t(a,{role:"radiogroup"},this.renderLabelDom(),t("div",{class:"vega-radio-container",ref:e=>this.inputContainerRef=e},t("vega-flex",{ref:e=>{this.vegaFlexElement=e}},t("slot",null))),this.renderHintDom()),this.host)}renderLabelDom(){return this.label&&t("div",{class:"vega-label"},t("label",{"aria-label":this.label},this.label,this.renderRequireDom()))}renderRequireDom(){return this.required?t("span",{class:"vega-require"},"*"):null}renderHintDom(){return this.hint&&t("div",{class:"vega-hint"},t("label",null,this.hint))}setVegaFlexProperty(){this.vegaFlexProp&&Object.assign(this.vegaFlexElement,{gap:"size-16",direction:"col"},this.vegaFlexProp)}notifyGroupDisabledChange(){s.notify(d,{host:this.host})}get host(){return r(this)}static get watchers(){return{value:["watchValue"],name:["watchName"],vegaFlexProp:["watchVegaFlexProp"],disabled:["watchDisabled"],validationRules:["watchValidationRules"]}}};B([j()],T.prototype,"globalSlimmers",void 0),B([w()],T.prototype,"formFieldController",void 0),B([w()],T.prototype,"radioValueChangeObserver",void 0),B([w()],T.prototype,"radioEventPrevent",void 0),B([w()],T.prototype,"slotMutationObserver",void 0),B([w()],T.prototype,"changeEventEmitter",void 0),B([w()],T.prototype,"keyboardController",void 0),B([w()],T.prototype,"radioItemsController",void 0),B([w()],T.prototype,"valueController",void 0),B([w()],T.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),B([C()],T.prototype,"watchVegaFlexProp",null),T.style=':host{display:block;text-align:left;line-height:normal}.vega-error{display:block;margin-top:12px;font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px;color:rgba(var(--v-text-error, 189, 41, 71, 1))}@media screen and (min-width: 768px) and (max-width: 1023px){.vega-error{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.vega-error{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.vega-error{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}.vega-hidden{display:none}.vega-label{margin-bottom:16px}.vega-label label{font-family:"Inter", sans-serif;font-size:18px;font-weight:500;line-height:30px;letter-spacing:0px;color:rgba(var(--v-text-primary, 32, 54, 69, 1))}@media screen and (min-width: 768px) and (max-width: 1023px){.vega-label label{font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:28px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.vega-label label{font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:28px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.vega-label label{font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:28px;letter-spacing:0px}}.vega-require{color:rgba(var(--v-text-error, 189, 41, 71, 1));margin-left:4px}.vega-hint{padding-top:12px}.vega-hint>label{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px;color:rgba(var(--v-text-secondary, 107, 116, 125, 1))}@media screen and (min-width: 768px) and (max-width: 1023px){.vega-hint>label{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-hint>label{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-hint>label{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}';export{N as vega_radio,T as vega_radio_group}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as t,I as e,V as i,L as s,M as o}from"./p-9c1eeff2.js";import{f as n,c as h,i as r}from"./p-1995e98e.js";import{I as c}from"./p-eac38d87.js";import{c as l}from"./p-59bdf9b8.js";import{P as a}from"./p-70151c27.js";import{P as u,A as d}from"./p-74168615.js";import{A as f}from"./p-b1f65b13.js";import{R as p}from"./p-62774231.js";class v{canRetrieve(){return!0}retrieve(){const t=document.body;return this.showConfig.appendableElement.parentElement!==t&&t.append(this.showConfig.appendableElement),t}}!function(t,e,i,s){var o,n=arguments.length,h=n<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)h=Reflect.decorate(t,e,i,s);else for(var r=t.length-1;r>=0;r--)(o=t[r])&&(h=(n<3?o(h):n>3?o(e,i,h):o(e,i))||h);n>3&&h&&Object.defineProperty(e,i,h)}([t()],v.prototype,"showConfig",void 0);class m{canRetrieve(){return!this.showConfig.isScreenPosition}}class g extends m{canRetrieve(){return super.canRetrieve()&&!!this.showConfig.positionRelativeTo&&!!document.querySelector(this.showConfig.positionRelativeTo)}retrieve(){const t=document.querySelector(this.showConfig.positionRelativeTo);return this.showConfig.appendableElement.parentElement!==t&&t.append(this.showConfig.appendableElement),t}}!function(t,e,i,s){var o,n=arguments.length,h=n<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)h=Reflect.decorate(t,e,i,s);else for(var r=t.length-1;r>=0;r--)(o=t[r])&&(h=(n<3?o(h):n>3?o(e,i,h):o(e,i))||h);n>3&&h&&Object.defineProperty(e,i,h)}([t()],g.prototype,"showConfig",void 0);class b extends m{canRetrieve(){return super.canRetrieve()&&!!n(this.showConfig.target,"vega-modal")}retrieve(){return this.getVegaModalShowConfigContainer()}setElementSlot(t,e){var i;const s=null===(i=Array.from(t.children).find((t=>{const e=t.getAttribute("slot");return e&&["content","modal-content"].includes(e)})))||void 0===i?void 0:i.getAttribute("slot");s&&e.setAttribute("slot",s)}getVegaModalShowConfigContainer(){const t=n(this.showConfig.target,"vega-modal"),e=t.shadowRoot.querySelector(".vega-modal-content-with-scroll"),i=t.shadowRoot.querySelector(".modal-dialog");return this.setElementSlot(t,this.showConfig.appendableElement),t.append(this.showConfig.appendableElement),e||i}}!function(t,e,i,s){var o,n=arguments.length,h=n<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)h=Reflect.decorate(t,e,i,s);else for(var r=t.length-1;r>=0;r--)(o=t[r])&&(h=(n<3?o(h):n>3?o(e,i,h):o(e,i))||h);n>3&&h&&Object.defineProperty(e,i,h)}([t({writable:!0})],b.prototype,"showConfig",void 0);class w extends m{canRetrieve(){return super.canRetrieve()&&!!n(this.showConfig.target,".vega-popover")}retrieve(){const t=n(this.showConfig.target,".vega-popover");return t.append(this.showConfig.appendableElement),t}}!function(t,e,i,s){var o,n=arguments.length,h=n<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)h=Reflect.decorate(t,e,i,s);else for(var r=t.length-1;r>=0;r--)(o=t[r])&&(h=(n<3?o(h):n>3?o(e,i,h):o(e,i))||h);n>3&&h&&Object.defineProperty(e,i,h)}([t()],w.prototype,"showConfig",void 0);var R=function(t,e,i,s){var o,n=arguments.length,h=n<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)h=Reflect.decorate(t,e,i,s);else for(var r=t.length-1;r>=0;r--)(o=t[r])&&(h=(n<3?o(h):n>3?o(e,i,h):o(e,i))||h);return n>3&&h&&Object.defineProperty(e,i,h),h};class j extends i{constructor(){super(...arguments),this.positionRelativeToWrapper=new g,this.vegaPopoverWrapper=new w,this.vegaModalWrapper=new b,this.defaultWrapper=new v}setContainer(){this.setContainerRetrievers();for(const t of this.containerRetrievers)if(t.canRetrieve())return void(this.container=t.retrieve())}setContainerRetrievers(){this.containerRetrievers=[this.positionRelativeToWrapper,this.vegaPopoverWrapper,this.vegaModalWrapper,this.defaultWrapper]}}R([t({writable:!0})],j.prototype,"container",void 0),R([t({writable:!0})],j.prototype,"showConfig",void 0),R([e()],j.prototype,"positionRelativeToWrapper",void 0),R([e()],j.prototype,"vegaPopoverWrapper",void 0),R([e()],j.prototype,"vegaModalWrapper",void 0),R([e()],j.prototype,"defaultWrapper",void 0);class y extends i{getPositionBox(t,e){const i=t||this.getPlacements(),s=e||this.getAlignments(),o=this.getTargetBoundBox(),n=this.getElementBoundBox(),h=this.getElementScrollDimension(),r=this.getSuitablePlacement(h,n,o,i),c=this.getSuitableAlignment(h,n,o,r,s),l=this.calculatePosition(n,o,r,c),a=this.getTranslocationBox(r);return l.placement=r,l.alignment=c,l.left+=a.X,l.top+=a.Y,l}getElementBoundBox(){const t=this.showConfig.appendableElement,e=t.classList.contains("vega-force-hidden");e&&t.classList.remove("vega-force-hidden");const i=t.getBoundingClientRect();return e&&t.classList.add("vega-force-hidden"),{width:i.width,height:i.height,left:i.left,top:i.top}}getPlacements(){const t=this.showConfig.placement;if("string"==typeof t){const e=u.filter((e=>e!==t));return[t,...e]}return Array.isArray(t)?t:[...u]}getAlignments(){const t=this.showConfig.alignment;if("string"==typeof t){const e=d.filter((e=>e!==t));return[t,...e]}return Array.isArray(t)?t:[...d]}calculatePosition(t,e,i,s){return{top:this.calculateTop(t,e,i,s),left:this.calculateLeft(t,e,i,s)}}getTranslocationBox(t){const e=Array.isArray(this.showConfig.placement)?this.showConfig.placement[0]:this.showConfig.placement,i=this.getTranslocation(),s={X:0,Y:0};if(f(i)){let o=i.X,n=i.Y;(e&&["left","right"].includes(e)&&["top","bottom"].includes(t)||e&&["top","bottom"].includes(e)&&["left","right"].includes(t))&&(o=i.Y,n=i.X),["bottom","top"].includes(t)&&(s.Y="top"===t?-n:n,s.X=o),["left","right"].includes(t)&&(s.X="left"===t?-o:o,s.Y=n)}return s}calculateLeft(t,e,i,s){switch(i){case"top":case"bottom":return"end"===s?e.left+e.width-t.width:"center"===s?e.left-(t.width-e.width)/2:e.left;case"left":return e.left-t.width;case"right":return e.left+e.width;default:throw new Error(`Unexpected placement: ${i}. Expected values are top, bottom, left, or right.`)}}calculateTop(t,e,i,s){switch(i){case"left":case"right":return"end"===s?e.top+e.height-t.height:"center"===s?e.top-(t.height-e.height)/2:e.top;case"top":return e.top-t.height;case"bottom":return e.top+e.height;default:throw new Error(`Unexpected placement: ${i}. Expected values are top, bottom, left, or right.`)}}getSuitablePlacement(t,e,i,o){const n=o[0];return o.find((s=>this.hasEnoughSpace(t,s,i,e)))||(s.warn(`\n No enough space found for placing element and we will keep using the defined placement:\n ${n}\n `),n)}getSuitableAlignment(t,e,i,o,n){const h=n[0];return n.find((s=>this.hasEnoughAlignmentSpace(t,i,e,o,s)))||(s.warn(`\n No enough space found for placing element and we will keep using the defined alignment:\n ${h}\n `),h)}hasEnoughAlignmentSpace(t,e,i,s,o){if(["top","bottom"].includes(s))switch(o){case"start":return e.left+i.width<=t.width;case"center":return e.left>=(i.width-e.width)/2&&e.left+e.width/2+i.width/2<=t.width;case"end":return e.left+e.width>=i.width}if(["right","left"].includes(s))switch(o){case"start":return e.top+i.height<=t.height;case"center":return e.top>=(i.height-e.height)/2&&e.top+e.height/2+i.height/2<=t.height;case"end":return e.top+e.height>=i.height}return!1}hasEnoughSpace(t,e,i,s){switch(e){case"top":return i.top>=s.height;case"bottom":return t.height-i.top-i.height>=s.height;case"left":return i.left>=s.width;case"right":return t.width-i.left-i.width>=s.width;default:return!1}}getTranslocation(){const t=this.showConfig.translocation;return t&&p.format(t,"translocation")}}var x=function(t,e,i,s){var o,n=arguments.length,h=n<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)h=Reflect.decorate(t,e,i,s);else for(var r=t.length-1;r>=0;r--)(o=t[r])&&(h=(n<3?o(h):n>3?o(e,i,h):o(e,i))||h);return n>3&&h&&Object.defineProperty(e,i,h),h};class C extends y{getPosition(){return"relative"!==window.getComputedStyle(this.container).position&&s.warn("Calculate position should make container as 'position: relative', otherwise the result might not be accurate."),this.getPositionBox()}getTargetBoundBox(){const t=this.container.getBoundingClientRect(),e=this.showConfig.target.getBoundingClientRect();return{width:e.width,height:e.height,top:e.top-t.top+this.container.scrollTop,left:e.left-t.left+this.container.scrollLeft}}getElementScrollDimension(){return{width:this.container.scrollWidth,height:this.container.scrollHeight}}}x([t()],C.prototype,"container",void 0),x([t()],C.prototype,"showConfig",void 0);class O extends y{getPosition(t){const e=t?this.getPositionBox([this.previousPositionBox.placement],[this.previousPositionBox.alignment]):this.getPositionBox();return this.previousPositionBox=e,e}getTargetBoundBox(){const t=this.showConfig.target.getBoundingClientRect();return{width:t.width,height:t.height,top:t.top,left:t.left}}getElementScrollDimension(){return{width:window.innerWidth,height:window.innerHeight}}}!function(t,e,i,s){var o,n=arguments.length,h=n<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)h=Reflect.decorate(t,e,i,s);else for(var r=t.length-1;r>=0;r--)(o=t[r])&&(h=(n<3?o(h):n>3?o(e,i,h):o(e,i))||h);n>3&&h&&Object.defineProperty(e,i,h)}([t()],O.prototype,"showConfig",void 0);var S=function(t,e,i,s){var o,n=arguments.length,h=n<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)h=Reflect.decorate(t,e,i,s);else for(var r=t.length-1;r>=0;r--)(o=t[r])&&(h=(n<3?o(h):n>3?o(e,i,h):o(e,i))||h);return n>3&&h&&Object.defineProperty(e,i,h),h};class E extends i{constructor(){super(...arguments),this.bodyPositionStrategy=new C,this.screenPositionStrategy=new O}setCalculationStrategy(){this.positionStrategy=this.showConfig.isScreenPosition?this.screenPositionStrategy:this.bodyPositionStrategy}adjustPosition(t){this.adjustWidth(),this.adjustHeight(),this.applyPosition(this.positionStrategy.getPosition(t))}applyPosition(t){const e=this.showConfig.appendableElement;this.showConfig.isScreenPosition&&(e.style.position="fixed"),e.style.left=`${t.left}px`,e.style.top=`${t.top}px`,e.classList.remove("vega-placement-left","vega-placement-right","vega-placement-top","vega-placement-bottom"),e.classList.remove("vega-alignment-start","vega-alignment-center","vega-alignment-end"),e.classList.add(`vega-placement-${t.placement}`),e.classList.add(`vega-alignment-${t.alignment}`)}adjustWidth(){if(this.showConfig.matchTargetWidth){const{width:t}=this.showConfig.target.getBoundingClientRect();this.setRelatedWidth("width",t)}else this.setRelatedWidth("width",this.showConfig.size),this.setRelatedWidth("minWidth",this.showConfig.minWidth),this.setRelatedWidth("maxWidth",this.showConfig.maxWidth)}setRelatedWidth(t,e){if(!e)return;const i=p.format(e,"size");i&&(this.showConfig.appendableElement.style[t]="number"==typeof i?`${i}px`:i)}adjustHeight(){if(this.showConfig.matchContainerHeight){const{height:t}=this.showConfig.target.getBoundingClientRect();let e=this.container.scrollHeight-this.showConfig.target.offsetTop-t;this.showConfig.maxHeight&&(e=Math.min(e,this.showConfig.maxHeight)),this.showConfig.appendableElement.style.maxHeight=`${e}px`}else this.showConfig.maxHeight&&(this.showConfig.appendableElement.style.maxHeight=`${this.showConfig.maxHeight}px`)}}S([t()],E.prototype,"container",void 0),S([t()],E.prototype,"showConfig",void 0),S([e()],E.prototype,"bodyPositionStrategy",void 0),S([e()],E.prototype,"screenPositionStrategy",void 0);var A=function(t,e,i,s){var o,n=arguments.length,h=n<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)h=Reflect.decorate(t,e,i,s);else for(var r=t.length-1;r>=0;r--)(o=t[r])&&(h=(n<3?o(h):n>3?o(e,i,h):o(e,i))||h);return n>3&&h&&Object.defineProperty(e,i,h),h};class P{constructor(t,e){var i;this.resizeObserverSlimmer=l(P,a,[],[{mapFrom:"connectResizeObserver",mapTo:"connectResizeObserver"},{mapFrom:"disconnectResizeObserver",mapTo:"disconnectResizeObserver"}],[{callback:()=>{h(this.showConfig.target)&&h(this.showConfig.appendableElement)&&this.adjustPosition()},target:()=>[document.body,this.showConfig.appendableElement,this.showConfig.target]}]),this.elementAppenderContainerController=new j,this.positionCalculationController=new E,this.showConfigCallback=t,this.showConfigCallbackTarget=e,null===(i=this.getShowConfig().appendableElement)||void 0===i||i.classList.add("vega-force-hidden")}show(){this.setShowConfig(),this.showConfig.target?this.showConfig.appendableElement?(this.prepareShow(),this.adjustPosition(),this.setZIndex(),this.toggleShow(!0),this.connectResizeObserver()):s.error("No appendable element found, please add it at new elementAppender."):s.error("No target element found, please add it at new elementAppender.")}hide(){this.showConfig&&(this.toggleShow(!1),this.resetContainerPosition(),c.removeZIndex(this.showConfig.appendableElement,"base"))}onScroll(){var t;const e=this.showConfig.target.getBoundingClientRect();!this.showConfig.isScreenPosition||e.left===(null===(t=this.previousTargetRect)||void 0===t?void 0:t.left)&&e.top===this.previousTargetRect.top||this.adjustPosition(!0)}destroy(){this.showConfig&&(this.removeVisibleAppendElement(this.showConfig.appendableElement),c.removeZIndex(this.showConfig.appendableElement,"base"),this.showConfig.appendableElement.remove(),this.disconnectResizeObserver())}connectResizeObserver(){}disconnectResizeObserver(){}toggleShow(t){t?(this.showConfig.appendableElement.classList.remove("vega-force-hidden"),this.saveVisibleAppendElement(this.showConfig.appendableElement)):(this.showConfig.appendableElement.classList.add("vega-force-hidden"),this.removeVisibleAppendElement(this.showConfig.appendableElement))}saveVisibleAppendElement(t){const e=P.containerMap.get(this.container);e&&e.visibleAppendElements.add(t)}removeVisibleAppendElement(t){const e=P.containerMap.get(this.container);e&&e.visibleAppendElements.delete(t)}resetContainerPosition(){const t=P.containerMap.get(this.container);if(t){const{visibleAppendElements:e,originPosition:i="static"}=t;0===e.size&&(this.container.style.position=i,P.containerMap.delete(this.container))}}setShowConfig(){this.showConfig=this.getShowConfig(),this.showConfig=Object.assign({matchTargetWidth:!1,matchContainerHeight:!1},this.showConfig),this.showConfig.target&&this.showConfig.appendableElement&&this.elementAppenderContainerController.setContainer()}prepareShow(){const t=window.getComputedStyle(this.container).position;P.containerMap.has(this.container)||P.containerMap.set(this.container,{visibleAppendElements:new Set,originPosition:t}),"static"===t&&(this.container.style.position="relative"),this.showConfig.appendableElement.style.boxSizing="border-box",this.positionCalculationController.setCalculationStrategy()}adjustPosition(t){this.positionCalculationController.adjustPosition(t)}setZIndex(){c.setZIndex(this.showConfig.appendableElement,"base")}getShowConfig(){return this.showConfigCallback instanceof Function?this.showConfigCallback(this.showConfigCallbackTarget):this.showConfigCallback}}P.containerMap=new Map,A([e()],P.prototype,"resizeObserverSlimmer",void 0),A([e()],P.prototype,"elementAppenderContainerController",void 0),A([e()],P.prototype,"positionCalculationController",void 0);var k=function(t,e,i,s){var o,n=arguments.length,h=n<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)h=Reflect.decorate(t,e,i,s);else for(var r=t.length-1;r>=0;r--)(o=t[r])&&(h=(n<3?o(h):n>3?o(e,i,h):o(e,i))||h);return n>3&&h&&Object.defineProperty(e,i,h),h};class T extends i{constructor(t,e,i="isDropdownShow",s=(()=>!1)){super(),this.registerElementAppenderListener=()=>{var t,e,i,s,o,n;this.unRegisterElementAppenderListener(),this.showConfig&&(null===(t=this.showConfig.target)||void 0===t||t.addEventListener("click",this.targetClickHandler),null===(e=this.showConfig.target)||void 0===e||e.addEventListener("mouseenter",this.targetMouseEnterHandler),null===(i=this.showConfig.target)||void 0===i||i.addEventListener("mouseleave",this.targetMouseLeaveHandler),null===(s=this.showConfig.target)||void 0===s||s.addEventListener("focusout",this.targetFocusoutHandler),null===(o=this.showConfig.appendableElement)||void 0===o||o.addEventListener("mouseenter",this.elementMouseEnterHandler),null===(n=this.showConfig.appendableElement)||void 0===n||n.addEventListener("mouseleave",this.elementMouseLeaveHandler)),window.addEventListener("mousedown",this.globalMouseDownHandler),document.addEventListener("scroll",this.globalScrollHandler,{capture:!0})},this.targetClickHandler=()=>{this.shouldListenerWork("click")&&(this.isShowing()?this.hide():this.show())},this.targetMouseEnterHandler=()=>{this.shouldListenerWork("hover")&&(!1===this.isShowing()&&this.show(),this.clearDelayHideTimer())},this.targetMouseLeaveHandler=()=>{this.shouldListenerWork("hover")&&this.createDelayHideTimer()},this.targetFocusoutHandler=t=>{var e;t.relatedTarget!==(null===(e=this.showConfig)||void 0===e?void 0:e.appendableElement)&&this.targetMouseLeaveHandler()},this.elementMouseEnterHandler=()=>{this.shouldListenerWork("hover")&&!this.disableInteractiveGetter()&&this.clearDelayHideTimer()},this.elementMouseLeaveHandler=()=>{this.shouldListenerWork("hover")&&!this.disableInteractiveGetter()&&this.createDelayHideTimer()},this.globalMouseDownHandler=t=>{const e=t.composedPath()[0];this.shouldListenerWork("custom")&&this.isShowing()&&this.showConfig&&!r(e,this.showConfig.appendableElement)&&!r(e,this.showConfig.target)&&n(e,"vega-modal")===n(this.showConfig.target,"vega-modal")&&this.hide()},this.globalScrollHandler=()=>{var t;this.showConfig&&this.showConfig.isScreenPosition&&this.isShowing()&&(null===(t=this.elementAppender)||void 0===t||t.onScroll())},this.createDelayHideTimer=()=>{this.delayHideTimer=setTimeout((()=>{this.hide(),clearTimeout(this.delayHideTimer)}),T.DELAY_HIDE_TIME)},this.clearDelayHideTimer=()=>{this.delayHideTimer&&clearTimeout(this.delayHideTimer)},this.shouldListenerWork=t=>{const e=this.getTrigger();switch(t){case"custom":return"none"!==e;case"click":return"click"===e;case"hover":return"hover"===e}throw new Error(`Unexpected trigger: ${t}. Expected values are custom, click, or hover.`)},this.showConfigFactory=t,this.getTrigger=e,this.isDropdownShowName=i,this.disableInteractiveGetter=s}connectedCallback(){null===this.elementAppender&&(this.setElementAppender(),this.registerElementAppenderListener())}disconnectedCallback(){this.unRegisterElementAppenderListener(),this.elementAppender&&(this.elementAppender.destroy(),this.elementAppender=null)}componentDidLoad(){this.initElementAppender()}getElementAppender(){return this.elementAppender}show(){this.elementAppender&&this.elementAppender.show(),this[this.isDropdownShowName]=!0}hide(){this.elementAppender&&this.elementAppender.hide(),this[this.isDropdownShowName]=!1}destroy(){this.elementAppender=null,this[this.isDropdownShowName]=!1}updateShowConfigFactory(t){this.showConfigFactory=t,this.initElementAppender()}initElementAppender(){this.setShowConfig(),this.setElementAppender(),this.registerElementAppenderListener()}setElementAppender(){this.elementAppender=new P(this.showConfigFactory,this)}isShowing(){return this[this.isDropdownShowName]}setShowConfig(){this.showConfig=this.showConfigFactory()}unRegisterElementAppenderListener(){var t,e,i,s,o,n;this.showConfig&&(null===(t=this.showConfig.target)||void 0===t||t.removeEventListener("click",this.targetClickHandler),null===(e=this.showConfig.target)||void 0===e||e.removeEventListener("mouseenter",this.targetMouseEnterHandler),null===(i=this.showConfig.target)||void 0===i||i.removeEventListener("mouseleave",this.targetMouseLeaveHandler),null===(s=this.showConfig.target)||void 0===s||s.removeEventListener("focusout",this.targetMouseLeaveHandler),null===(o=this.showConfig.appendableElement)||void 0===o||o.removeEventListener("mouseenter",this.elementMouseEnterHandler),null===(n=this.showConfig.appendableElement)||void 0===n||n.removeEventListener("mouseleave",this.elementMouseLeaveHandler)),window.removeEventListener("mousedown",this.globalMouseDownHandler),document.removeEventListener("scroll",this.globalScrollHandler)}}T.DELAY_HIDE_TIME=100,k([o("connectedCallback")],T.prototype,"connectedCallback",null),k([o("disconnectedCallback")],T.prototype,"disconnectedCallback",null),k([o("componentDidLoad")],T.prototype,"componentDidLoad",null);export{T as E}
|
|
1
|
+
import{c as t,I as e,V as i,L as s,M as o}from"./p-6e1ab235.js";import{f as n,c as h,i as r}from"./p-79ec5d69.js";import{I as c}from"./p-781fd6e0.js";import{c as l}from"./p-6a334573.js";import{P as a}from"./p-5f589974.js";import{P as u,A as d}from"./p-74168615.js";import{A as f}from"./p-b1f65b13.js";import{R as p}from"./p-6705c68a.js";class v{canRetrieve(){return!0}retrieve(){const t=document.body;return this.showConfig.appendableElement.parentElement!==t&&t.append(this.showConfig.appendableElement),t}}!function(t,e,i,s){var o,n=arguments.length,h=n<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)h=Reflect.decorate(t,e,i,s);else for(var r=t.length-1;r>=0;r--)(o=t[r])&&(h=(n<3?o(h):n>3?o(e,i,h):o(e,i))||h);n>3&&h&&Object.defineProperty(e,i,h)}([t()],v.prototype,"showConfig",void 0);class m{canRetrieve(){return!this.showConfig.isScreenPosition}}class g extends m{canRetrieve(){return super.canRetrieve()&&!!this.showConfig.positionRelativeTo&&!!document.querySelector(this.showConfig.positionRelativeTo)}retrieve(){const t=document.querySelector(this.showConfig.positionRelativeTo);return this.showConfig.appendableElement.parentElement!==t&&t.append(this.showConfig.appendableElement),t}}!function(t,e,i,s){var o,n=arguments.length,h=n<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)h=Reflect.decorate(t,e,i,s);else for(var r=t.length-1;r>=0;r--)(o=t[r])&&(h=(n<3?o(h):n>3?o(e,i,h):o(e,i))||h);n>3&&h&&Object.defineProperty(e,i,h)}([t()],g.prototype,"showConfig",void 0);class b extends m{canRetrieve(){return super.canRetrieve()&&!!n(this.showConfig.target,"vega-modal")}retrieve(){return this.getVegaModalShowConfigContainer()}setElementSlot(t,e){var i;const s=null===(i=Array.from(t.children).find((t=>{const e=t.getAttribute("slot");return e&&["content","modal-content"].includes(e)})))||void 0===i?void 0:i.getAttribute("slot");s&&e.setAttribute("slot",s)}getVegaModalShowConfigContainer(){const t=n(this.showConfig.target,"vega-modal"),e=t.shadowRoot.querySelector(".vega-modal-content-with-scroll"),i=t.shadowRoot.querySelector(".modal-dialog");return this.setElementSlot(t,this.showConfig.appendableElement),t.append(this.showConfig.appendableElement),e||i}}!function(t,e,i,s){var o,n=arguments.length,h=n<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)h=Reflect.decorate(t,e,i,s);else for(var r=t.length-1;r>=0;r--)(o=t[r])&&(h=(n<3?o(h):n>3?o(e,i,h):o(e,i))||h);n>3&&h&&Object.defineProperty(e,i,h)}([t({writable:!0})],b.prototype,"showConfig",void 0);class w extends m{canRetrieve(){return super.canRetrieve()&&!!n(this.showConfig.target,".vega-popover")}retrieve(){const t=n(this.showConfig.target,".vega-popover");return t.append(this.showConfig.appendableElement),t}}!function(t,e,i,s){var o,n=arguments.length,h=n<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)h=Reflect.decorate(t,e,i,s);else for(var r=t.length-1;r>=0;r--)(o=t[r])&&(h=(n<3?o(h):n>3?o(e,i,h):o(e,i))||h);n>3&&h&&Object.defineProperty(e,i,h)}([t()],w.prototype,"showConfig",void 0);var R=function(t,e,i,s){var o,n=arguments.length,h=n<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)h=Reflect.decorate(t,e,i,s);else for(var r=t.length-1;r>=0;r--)(o=t[r])&&(h=(n<3?o(h):n>3?o(e,i,h):o(e,i))||h);return n>3&&h&&Object.defineProperty(e,i,h),h};class j extends i{constructor(){super(...arguments),this.positionRelativeToWrapper=new g,this.vegaPopoverWrapper=new w,this.vegaModalWrapper=new b,this.defaultWrapper=new v}setContainer(){this.setContainerRetrievers();for(const t of this.containerRetrievers)if(t.canRetrieve())return void(this.container=t.retrieve())}setContainerRetrievers(){this.containerRetrievers=[this.positionRelativeToWrapper,this.vegaPopoverWrapper,this.vegaModalWrapper,this.defaultWrapper]}}R([t({writable:!0})],j.prototype,"container",void 0),R([t({writable:!0})],j.prototype,"showConfig",void 0),R([e()],j.prototype,"positionRelativeToWrapper",void 0),R([e()],j.prototype,"vegaPopoverWrapper",void 0),R([e()],j.prototype,"vegaModalWrapper",void 0),R([e()],j.prototype,"defaultWrapper",void 0);class y extends i{getPositionBox(t,e){const i=t||this.getPlacements(),s=e||this.getAlignments(),o=this.getTargetBoundBox(),n=this.getElementBoundBox(),h=this.getElementScrollDimension(),r=this.getSuitablePlacement(h,n,o,i),c=this.getSuitableAlignment(h,n,o,r,s),l=this.calculatePosition(n,o,r,c),a=this.getTranslocationBox(r);return l.placement=r,l.alignment=c,l.left+=a.X,l.top+=a.Y,l}getElementBoundBox(){const t=this.showConfig.appendableElement,e=t.classList.contains("vega-force-hidden");e&&t.classList.remove("vega-force-hidden");const i=t.getBoundingClientRect();return e&&t.classList.add("vega-force-hidden"),{width:i.width,height:i.height,left:i.left,top:i.top}}getPlacements(){const t=this.showConfig.placement;if("string"==typeof t){const e=u.filter((e=>e!==t));return[t,...e]}return Array.isArray(t)?t:[...u]}getAlignments(){const t=this.showConfig.alignment;if("string"==typeof t){const e=d.filter((e=>e!==t));return[t,...e]}return Array.isArray(t)?t:[...d]}calculatePosition(t,e,i,s){return{top:this.calculateTop(t,e,i,s),left:this.calculateLeft(t,e,i,s)}}getTranslocationBox(t){const e=Array.isArray(this.showConfig.placement)?this.showConfig.placement[0]:this.showConfig.placement,i=this.getTranslocation(),s={X:0,Y:0};if(f(i)){let o=i.X,n=i.Y;(e&&["left","right"].includes(e)&&["top","bottom"].includes(t)||e&&["top","bottom"].includes(e)&&["left","right"].includes(t))&&(o=i.Y,n=i.X),["bottom","top"].includes(t)&&(s.Y="top"===t?-n:n,s.X=o),["left","right"].includes(t)&&(s.X="left"===t?-o:o,s.Y=n)}return s}calculateLeft(t,e,i,s){switch(i){case"top":case"bottom":return"end"===s?e.left+e.width-t.width:"center"===s?e.left-(t.width-e.width)/2:e.left;case"left":return e.left-t.width;case"right":return e.left+e.width;default:throw new Error(`Unexpected placement: ${i}. Expected values are top, bottom, left, or right.`)}}calculateTop(t,e,i,s){switch(i){case"left":case"right":return"end"===s?e.top+e.height-t.height:"center"===s?e.top-(t.height-e.height)/2:e.top;case"top":return e.top-t.height;case"bottom":return e.top+e.height;default:throw new Error(`Unexpected placement: ${i}. Expected values are top, bottom, left, or right.`)}}getSuitablePlacement(t,e,i,o){const n=o[0];return o.find((s=>this.hasEnoughSpace(t,s,i,e)))||(s.warn(`\n No enough space found for placing element and we will keep using the defined placement:\n ${n}\n `),n)}getSuitableAlignment(t,e,i,o,n){const h=n[0];return n.find((s=>this.hasEnoughAlignmentSpace(t,i,e,o,s)))||(s.warn(`\n No enough space found for placing element and we will keep using the defined alignment:\n ${h}\n `),h)}hasEnoughAlignmentSpace(t,e,i,s,o){if(["top","bottom"].includes(s))switch(o){case"start":return e.left+i.width<=t.width;case"center":return e.left>=(i.width-e.width)/2&&e.left+e.width/2+i.width/2<=t.width;case"end":return e.left+e.width>=i.width}if(["right","left"].includes(s))switch(o){case"start":return e.top+i.height<=t.height;case"center":return e.top>=(i.height-e.height)/2&&e.top+e.height/2+i.height/2<=t.height;case"end":return e.top+e.height>=i.height}return!1}hasEnoughSpace(t,e,i,s){switch(e){case"top":return i.top>=s.height;case"bottom":return t.height-i.top-i.height>=s.height;case"left":return i.left>=s.width;case"right":return t.width-i.left-i.width>=s.width;default:return!1}}getTranslocation(){const t=this.showConfig.translocation;return t&&p.format(t,"translocation")}}var x=function(t,e,i,s){var o,n=arguments.length,h=n<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)h=Reflect.decorate(t,e,i,s);else for(var r=t.length-1;r>=0;r--)(o=t[r])&&(h=(n<3?o(h):n>3?o(e,i,h):o(e,i))||h);return n>3&&h&&Object.defineProperty(e,i,h),h};class C extends y{getPosition(){return"relative"!==window.getComputedStyle(this.container).position&&s.warn("Calculate position should make container as 'position: relative', otherwise the result might not be accurate."),this.getPositionBox()}getTargetBoundBox(){const t=this.container.getBoundingClientRect(),e=this.showConfig.target.getBoundingClientRect();return{width:e.width,height:e.height,top:e.top-t.top+this.container.scrollTop,left:e.left-t.left+this.container.scrollLeft}}getElementScrollDimension(){return{width:this.container.scrollWidth,height:this.container.scrollHeight}}}x([t()],C.prototype,"container",void 0),x([t()],C.prototype,"showConfig",void 0);class O extends y{getPosition(t){const e=t?this.getPositionBox([this.previousPositionBox.placement],[this.previousPositionBox.alignment]):this.getPositionBox();return this.previousPositionBox=e,e}getTargetBoundBox(){const t=this.showConfig.target.getBoundingClientRect();return{width:t.width,height:t.height,top:t.top,left:t.left}}getElementScrollDimension(){return{width:window.innerWidth,height:window.innerHeight}}}!function(t,e,i,s){var o,n=arguments.length,h=n<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)h=Reflect.decorate(t,e,i,s);else for(var r=t.length-1;r>=0;r--)(o=t[r])&&(h=(n<3?o(h):n>3?o(e,i,h):o(e,i))||h);n>3&&h&&Object.defineProperty(e,i,h)}([t()],O.prototype,"showConfig",void 0);var S=function(t,e,i,s){var o,n=arguments.length,h=n<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)h=Reflect.decorate(t,e,i,s);else for(var r=t.length-1;r>=0;r--)(o=t[r])&&(h=(n<3?o(h):n>3?o(e,i,h):o(e,i))||h);return n>3&&h&&Object.defineProperty(e,i,h),h};class E extends i{constructor(){super(...arguments),this.bodyPositionStrategy=new C,this.screenPositionStrategy=new O}setCalculationStrategy(){this.positionStrategy=this.showConfig.isScreenPosition?this.screenPositionStrategy:this.bodyPositionStrategy}adjustPosition(t){this.adjustWidth(),this.adjustHeight(),this.applyPosition(this.positionStrategy.getPosition(t))}applyPosition(t){const e=this.showConfig.appendableElement;this.showConfig.isScreenPosition&&(e.style.position="fixed"),e.style.left=`${t.left}px`,e.style.top=`${t.top}px`,e.classList.remove("vega-placement-left","vega-placement-right","vega-placement-top","vega-placement-bottom"),e.classList.remove("vega-alignment-start","vega-alignment-center","vega-alignment-end"),e.classList.add(`vega-placement-${t.placement}`),e.classList.add(`vega-alignment-${t.alignment}`)}adjustWidth(){if(this.showConfig.matchTargetWidth){const{width:t}=this.showConfig.target.getBoundingClientRect();this.setRelatedWidth("width",t)}else this.setRelatedWidth("width",this.showConfig.size),this.setRelatedWidth("minWidth",this.showConfig.minWidth),this.setRelatedWidth("maxWidth",this.showConfig.maxWidth)}setRelatedWidth(t,e){if(!e)return;const i=p.format(e,"size");i&&(this.showConfig.appendableElement.style[t]="number"==typeof i?`${i}px`:i)}adjustHeight(){if(this.showConfig.matchContainerHeight){const{height:t}=this.showConfig.target.getBoundingClientRect();let e=this.container.scrollHeight-this.showConfig.target.offsetTop-t;this.showConfig.maxHeight&&(e=Math.min(e,this.showConfig.maxHeight)),this.showConfig.appendableElement.style.maxHeight=`${e}px`}else this.showConfig.maxHeight&&(this.showConfig.appendableElement.style.maxHeight=`${this.showConfig.maxHeight}px`)}}S([t()],E.prototype,"container",void 0),S([t()],E.prototype,"showConfig",void 0),S([e()],E.prototype,"bodyPositionStrategy",void 0),S([e()],E.prototype,"screenPositionStrategy",void 0);var A=function(t,e,i,s){var o,n=arguments.length,h=n<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)h=Reflect.decorate(t,e,i,s);else for(var r=t.length-1;r>=0;r--)(o=t[r])&&(h=(n<3?o(h):n>3?o(e,i,h):o(e,i))||h);return n>3&&h&&Object.defineProperty(e,i,h),h};class P{constructor(t,e){var i;this.resizeObserverSlimmer=l(P,a,[],[{mapFrom:"connectResizeObserver",mapTo:"connectResizeObserver"},{mapFrom:"disconnectResizeObserver",mapTo:"disconnectResizeObserver"}],[{callback:()=>{h(this.showConfig.target)&&h(this.showConfig.appendableElement)&&this.adjustPosition()},target:()=>[document.body,this.showConfig.appendableElement,this.showConfig.target]}]),this.elementAppenderContainerController=new j,this.positionCalculationController=new E,this.showConfigCallback=t,this.showConfigCallbackTarget=e,null===(i=this.getShowConfig().appendableElement)||void 0===i||i.classList.add("vega-force-hidden")}show(){this.setShowConfig(),this.showConfig.target?this.showConfig.appendableElement?(this.prepareShow(),this.adjustPosition(),this.setZIndex(),this.toggleShow(!0),this.connectResizeObserver()):s.error("No appendable element found, please add it at new elementAppender."):s.error("No target element found, please add it at new elementAppender.")}hide(){this.showConfig&&(this.toggleShow(!1),this.resetContainerPosition(),c.removeZIndex(this.showConfig.appendableElement,"base"))}onScroll(){var t;const e=this.showConfig.target.getBoundingClientRect();!this.showConfig.isScreenPosition||e.left===(null===(t=this.previousTargetRect)||void 0===t?void 0:t.left)&&e.top===this.previousTargetRect.top||this.adjustPosition(!0)}destroy(){this.showConfig&&(this.removeVisibleAppendElement(this.showConfig.appendableElement),c.removeZIndex(this.showConfig.appendableElement,"base"),this.showConfig.appendableElement.remove(),this.disconnectResizeObserver())}connectResizeObserver(){}disconnectResizeObserver(){}toggleShow(t){t?(this.showConfig.appendableElement.classList.remove("vega-force-hidden"),this.saveVisibleAppendElement(this.showConfig.appendableElement)):(this.showConfig.appendableElement.classList.add("vega-force-hidden"),this.removeVisibleAppendElement(this.showConfig.appendableElement))}saveVisibleAppendElement(t){const e=P.containerMap.get(this.container);e&&e.visibleAppendElements.add(t)}removeVisibleAppendElement(t){const e=P.containerMap.get(this.container);e&&e.visibleAppendElements.delete(t)}resetContainerPosition(){const t=P.containerMap.get(this.container);if(t){const{visibleAppendElements:e,originPosition:i="static"}=t;0===e.size&&(this.container.style.position=i,P.containerMap.delete(this.container))}}setShowConfig(){this.showConfig=this.getShowConfig(),this.showConfig=Object.assign({matchTargetWidth:!1,matchContainerHeight:!1},this.showConfig),this.showConfig.target&&this.showConfig.appendableElement&&this.elementAppenderContainerController.setContainer()}prepareShow(){const t=window.getComputedStyle(this.container).position;P.containerMap.has(this.container)||P.containerMap.set(this.container,{visibleAppendElements:new Set,originPosition:t}),"static"===t&&(this.container.style.position="relative"),this.showConfig.appendableElement.style.boxSizing="border-box",this.positionCalculationController.setCalculationStrategy()}adjustPosition(t){this.positionCalculationController.adjustPosition(t)}setZIndex(){c.setZIndex(this.showConfig.appendableElement,"base")}getShowConfig(){return this.showConfigCallback instanceof Function?this.showConfigCallback(this.showConfigCallbackTarget):this.showConfigCallback}}P.containerMap=new Map,A([e()],P.prototype,"resizeObserverSlimmer",void 0),A([e()],P.prototype,"elementAppenderContainerController",void 0),A([e()],P.prototype,"positionCalculationController",void 0);var k=function(t,e,i,s){var o,n=arguments.length,h=n<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)h=Reflect.decorate(t,e,i,s);else for(var r=t.length-1;r>=0;r--)(o=t[r])&&(h=(n<3?o(h):n>3?o(e,i,h):o(e,i))||h);return n>3&&h&&Object.defineProperty(e,i,h),h};class T extends i{constructor(t,e,i="isDropdownShow",s=(()=>!1)){super(),this.registerElementAppenderListener=()=>{var t,e,i,s,o,n;this.unRegisterElementAppenderListener(),this.showConfig&&(null===(t=this.showConfig.target)||void 0===t||t.addEventListener("click",this.targetClickHandler),null===(e=this.showConfig.target)||void 0===e||e.addEventListener("mouseenter",this.targetMouseEnterHandler),null===(i=this.showConfig.target)||void 0===i||i.addEventListener("mouseleave",this.targetMouseLeaveHandler),null===(s=this.showConfig.target)||void 0===s||s.addEventListener("focusout",this.targetFocusoutHandler),null===(o=this.showConfig.appendableElement)||void 0===o||o.addEventListener("mouseenter",this.elementMouseEnterHandler),null===(n=this.showConfig.appendableElement)||void 0===n||n.addEventListener("mouseleave",this.elementMouseLeaveHandler)),window.addEventListener("mousedown",this.globalMouseDownHandler),document.addEventListener("scroll",this.globalScrollHandler,{capture:!0})},this.targetClickHandler=()=>{this.shouldListenerWork("click")&&(this.isShowing()?this.hide():this.show())},this.targetMouseEnterHandler=()=>{this.shouldListenerWork("hover")&&(!1===this.isShowing()&&this.show(),this.clearDelayHideTimer())},this.targetMouseLeaveHandler=()=>{this.shouldListenerWork("hover")&&this.createDelayHideTimer()},this.targetFocusoutHandler=t=>{var e;t.relatedTarget!==(null===(e=this.showConfig)||void 0===e?void 0:e.appendableElement)&&this.targetMouseLeaveHandler()},this.elementMouseEnterHandler=()=>{this.shouldListenerWork("hover")&&!this.disableInteractiveGetter()&&this.clearDelayHideTimer()},this.elementMouseLeaveHandler=()=>{this.shouldListenerWork("hover")&&!this.disableInteractiveGetter()&&this.createDelayHideTimer()},this.globalMouseDownHandler=t=>{const e=t.composedPath()[0];this.shouldListenerWork("custom")&&this.isShowing()&&this.showConfig&&!r(e,this.showConfig.appendableElement)&&!r(e,this.showConfig.target)&&n(e,"vega-modal")===n(this.showConfig.target,"vega-modal")&&this.hide()},this.globalScrollHandler=()=>{var t;this.showConfig&&this.showConfig.isScreenPosition&&this.isShowing()&&(null===(t=this.elementAppender)||void 0===t||t.onScroll())},this.createDelayHideTimer=()=>{this.delayHideTimer=setTimeout((()=>{this.hide(),clearTimeout(this.delayHideTimer)}),T.DELAY_HIDE_TIME)},this.clearDelayHideTimer=()=>{this.delayHideTimer&&clearTimeout(this.delayHideTimer)},this.shouldListenerWork=t=>{const e=this.getTrigger();switch(t){case"custom":return"none"!==e;case"click":return"click"===e;case"hover":return"hover"===e}throw new Error(`Unexpected trigger: ${t}. Expected values are custom, click, or hover.`)},this.showConfigFactory=t,this.getTrigger=e,this.isDropdownShowName=i,this.disableInteractiveGetter=s}connectedCallback(){null===this.elementAppender&&(this.setElementAppender(),this.registerElementAppenderListener())}disconnectedCallback(){this.unRegisterElementAppenderListener(),this.elementAppender&&(this.elementAppender.destroy(),this.elementAppender=null)}componentDidLoad(){this.initElementAppender()}getElementAppender(){return this.elementAppender}show(){this.elementAppender&&this.elementAppender.show(),this[this.isDropdownShowName]=!0}hide(){this.elementAppender&&this.elementAppender.hide(),this[this.isDropdownShowName]=!1}destroy(){this.elementAppender=null,this[this.isDropdownShowName]=!1}updateShowConfigFactory(t){this.showConfigFactory=t,this.initElementAppender()}initElementAppender(){this.setShowConfig(),this.setElementAppender(),this.registerElementAppenderListener()}setElementAppender(){this.elementAppender=new P(this.showConfigFactory,this)}isShowing(){return this[this.isDropdownShowName]}setShowConfig(){this.showConfig=this.showConfigFactory()}unRegisterElementAppenderListener(){var t,e,i,s,o,n;this.showConfig&&(null===(t=this.showConfig.target)||void 0===t||t.removeEventListener("click",this.targetClickHandler),null===(e=this.showConfig.target)||void 0===e||e.removeEventListener("mouseenter",this.targetMouseEnterHandler),null===(i=this.showConfig.target)||void 0===i||i.removeEventListener("mouseleave",this.targetMouseLeaveHandler),null===(s=this.showConfig.target)||void 0===s||s.removeEventListener("focusout",this.targetMouseLeaveHandler),null===(o=this.showConfig.appendableElement)||void 0===o||o.removeEventListener("mouseenter",this.elementMouseEnterHandler),null===(n=this.showConfig.appendableElement)||void 0===n||n.removeEventListener("mouseleave",this.elementMouseLeaveHandler)),window.removeEventListener("mousedown",this.globalMouseDownHandler),document.removeEventListener("scroll",this.globalScrollHandler)}}T.DELAY_HIDE_TIME=100,k([o("connectedCallback")],T.prototype,"connectedCallback",null),k([o("disconnectedCallback")],T.prototype,"disconnectedCallback",null),k([o("componentDidLoad")],T.prototype,"componentDidLoad",null);export{T as E}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{h as e,F as t,r as i,c as r,H as o,g as n}from"./p-1c298d5a.js";import{C as s}from"./p-ed4a57a8.js";import{d as a,p as d,e as l}from"./p-b5990090.js";import{s as p}from"./p-9b797118.js";import{c,V as h,M as u,L as m,I as v}from"./p-6e1ab235.js";import{V as g,I as f}from"./p-4387d550.js";import{F as w}from"./p-b57792b7.js";import{D as b}from"./p-29b09aad.js";import{f as x,z as y,A as k,a as R}from"./p-6a3989dd.js";import{g as D,D as I}from"./p-79ec5d69.js";import{c as j}from"./p-86194314.js";import{i as S}from"./p-b0502d01.js";import{b as C}from"./p-d057999f.js";import{C as T}from"./p-2d0d575f.js";import{E as V}from"./p-f31bb1fd.js";import{K as A}from"./p-de25326f.js";import{i as O}from"./p-b1f65b13.js";import{C as E}from"./p-be12fa36.js";import{c as F}from"./p-e8f540d8.js";import{T as M}from"./p-b688a71b.js";import"./p-0bb29d98.js";import"./p-33b62194.js";import"./p-6a334573.js";import"./p-f357cf46.js";import"./p-de664bdd.js";import"./p-5f589974.js";import"./p-4bcd6612.js";import"./p-74168615.js";import"./p-ed45b3b6.js";import"./p-987fbbd0.js";import"./p-a9354a5c.js";import"./p-262ec334.js";import"./p-781fd6e0.js";import"./p-6705c68a.js";import"./p-0c667d6a.js";import"./p-6a5a5c7b.js";import"./p-3a0a4d15.js";import"./p-d884c644.js";import"./p-0af4bda9.js";import"./p-5f377954.js";import"./p-ff4bafa3.js";import"./p-7a40e033.js";import"./p-112455b1.js";class ${constructor(e){this.config=e}evaluate(e){if(!this.isAcceptedInputType(e))throw new Error(`Invalid time value ${e}`);const t=a(e,this.config.timeFormat);return{isValid:t,message:t?"":"This field is required"}}canEvaluate(e,t){return t?this.isAcceptedInputType(e)&&!t.disabled&&t.visible:this.isAcceptedInputType(e)}shouldShowError(e){return!e.disabled&&e.visible&&(e.touched||e.modified)}isAcceptedInputType(e){return null==e||"string"==typeof e}}var z=function(e,t,i,r){var o,n=arguments.length,s=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,r);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(n<3?o(s):n>3?o(t,i,s):o(t,i))||s);return n>3&&s&&Object.defineProperty(t,i,s),s};class P extends h{constructor(){super(...arguments),this.onTimePickerFocus=async()=>{"single"===this.mode?await this.singleInputRenderer.getInputRef().doFocus():await this.rangeInputRenderer.getStartInputRef().doFocus()}}render(){return e("vega-field-label",{onClick:this.onTimePickerFocus,"is-field-required":this.required,disabled:this.disabled,label:this.label})}}z([c()],P.prototype,"label",void 0),z([c()],P.prototype,"mode",void 0),z([c()],P.prototype,"required",void 0),z([c()],P.prototype,"disabled",void 0),z([c()],P.prototype,"singleInputRenderer",void 0),z([c()],P.prototype,"rangeInputRenderer",void 0);var N=function(e,t,i,r){var o,n=arguments.length,s=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,r);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(n<3?o(s):n>3?o(t,i,s):o(t,i))||s);return n>3&&s&&Object.defineProperty(t,i,s),s};class _ extends h{constructor(){super(...arguments),this.onChildVegaInputChange=e=>{this.valueController.setValue(e.detail)}}getInputRef(){return this.timeInputRef}updateInputValue(e){this.timeInputRef.value=e}render(){return e("div",{class:"time-picker-input"},e("vega-input",{"prefix-icon":"clock-face",placeholder:this.getPlaceholder(),disabled:this.disabled,size:this.size,value:"string"==typeof this.value?this.value:"",ref:e=>{this.timeInputRef=e,this.handleVegaInputEvent(e)}}))}handleVegaInputEvent(e){b.addUniqueObserverToNode(e,x,(e=>{this.onChildVegaInputChange(e)})),b.addUniqueObserverToNode(e,y,(()=>{this.singleDropdownController.show()})),b.addUniqueObserverToNode(e,k,(e=>{this.valueController.checkValueAfterInputBlur(e)}))}getPlaceholder(){return this.placeholder&&"string"==typeof this.placeholder?this.placeholder:this.translationSlimmer.t("Select Time")}}N([c()],_.prototype,"placeholder",void 0),N([c()],_.prototype,"size",void 0),N([c()],_.prototype,"disabled",void 0),N([c()],_.prototype,"value",void 0),N([c()],_.prototype,"valueController",void 0),N([c()],_.prototype,"singleDropdownController",void 0),N([c()],_.prototype,"translationSlimmer",void 0);var L=function(e,t,i,r){var o,n=arguments.length,s=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,r);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(n<3?o(s):n>3?o(t,i,s):o(t,i))||s);return n>3&&s&&Object.defineProperty(t,i,s),s};class B extends h{constructor(){super(...arguments),this.isMobileDevice=D()===I.MOBILE,this.renderDropdownByTimeSource=()=>e(t,null,this.renderDropdownColumn(this.dropdownSource.hours,"hour"),this.renderDropdownColumn(this.dropdownSource.minutes,"minute"),"12-hour"===this.timeFormat&&this.renderDropdownColumn(["AM","PM"],"amPm")),this.onItemClick=(e,t)=>{this.dropdownSelectedItemsController.setSelectedItems(Object.assign(Object.assign({},this.selectedTimeValue),{[t]:e}))},this.onNowButtonClick=()=>{this.dropdownSelectedItemsController.setSelectedItemsToCurrentTime(),this.singleDropdownController.hide()},this.onApplyButtonClick=()=>{this.valueController.updateValueBySelectedItems(),this.singleDropdownController.hide()}}componentDidRenderCallback(){this.dropdownContainer&&this.dropdownContainer.parentElement===this.dropdown&&this.dropdown.shadowRoot.append(this.dropdownContainer)}getDropdownRef(){return this.dropdown}getSelectedItem(){const e=[],t=this.dropdown.shadowRoot;return t.querySelectorAll(".vega-dropdown-item-selected").forEach((t=>{e.push(t)})),0===e.length&&t.querySelectorAll(".vega-time-picker-dropdown-panel li:first-child").forEach((t=>{e.push(t)})),e}render(){return e("vega-time-picker-dropdown",{class:{"vega-time-picker-dropdown":!0,mobile:this.isMobileDevice},ref:e=>this.dropdown=e},e("div",{class:"vega-time-picker-dropdown-container",ref:e=>this.dropdownContainer=e},e("div",{class:"vega-time-picker-dropdown-panel"},this.renderDropdownByTimeSource()),e("div",{class:"horizontal-divider v-my-size-12"}),this.renderDropdownFoot()))}renderDropdownColumn(t,i){return e("ul",{role:"menu","aria-label":"dropdown-ul",class:{"vega-time-picker-panel-column":!0}},t.map(((e,t)=>this.renderDropdownItem(e,i,t))))}renderDropdownItem(t,i,r){return e("li",{key:t,role:"menuitem","aria-label":t,class:{"vega-dropdown-item-selected":this.isItemSelected(t,i)},tabIndex:0===r?0:-1,"data-index":r,onClick:()=>this.onItemClick(t,i),onKeyDown:j()},e("span",{"data-index":r,innerHTML:t}))}renderDropdownFoot(){return e("div",{class:"vega-time-picker-dropdown-footer"},e("div",{class:"vega-time-picker-now"},e("vega-button-link",{size:"small",label:"Now",ref:e=>{b.addUniqueObserverToNode(e,R,(()=>{this.onNowButtonClick()}))}})),e("div",null,e("vega-button-link",{size:"small",label:"Apply",ref:e=>{b.addUniqueObserverToNode(e,R,(()=>{this.onApplyButtonClick()}))}})))}isItemSelected(e,t){return this.selectedTimeValue[`${t}`]===e}}L([c()],B.prototype,"timeFormat",void 0),L([c()],B.prototype,"dropdownSource",void 0),L([c()],B.prototype,"selectedTimeValue",void 0),L([c()],B.prototype,"valueController",void 0),L([c()],B.prototype,"dropdownSelectedItemsController",void 0),L([c()],B.prototype,"singleDropdownController",void 0),L([u("componentDidRender")],B.prototype,"componentDidRenderCallback",null);var W=function(e,t,i,r){var o,n=arguments.length,s=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,r);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(n<3?o(s):n>3?o(t,i,s):o(t,i))||s);return n>3&&s&&Object.defineProperty(t,i,s),s};class q extends h{emitChangeEventOrClearTimePicker(e,t){"range"===this.mode&&S(e,t)||(this.valueGuard(e)?(this.changeEventEmitter.emit(e),T.notify(C,{host:this.host,detail:e})):"single"===this.mode?this.clearTimePicker():this.clearRangeTimePicker())}updateValueIfSelectedItemsChange(){"single"===this.mode&&Object.keys(this.selectedTimeValue).length>0&&this.updateValueBySelectedItems()}resetCurrentValueIfModeChange(){this.resetValue()}checkTheDefaultValueForRangeMode(){"range"===this.mode&&this.value&&!this.valueGuard(this.value)&&this.clearRangeTimePicker()}checkValueAfterInputBlur(e){const t=e.host;this.valueGuard(t.value)?this.increments>1&&this.value&&t.value&&t.value!==this.value&&(t.value=this.value):this.clearTimePicker()}setValue(e){this.valueGuard(e)&&(this.value=e)}resetValue(){this.value="single"===this.mode?"":["",""]}updateValueBySelectedItems(){const e=this.selectedTimeValue.hour?this.selectedTimeValue.hour:"12-hour"===this.timeFormat?"12":"00",t=this.selectedTimeValue.minute?this.selectedTimeValue.minute:"00";this.setValue("12-hour"===this.timeFormat?`${e}:${t} ${this.selectedTimeValue.amPm?this.selectedTimeValue.amPm:"AM"}`:`${e}:${t}`)}updateValueByRangeType(e,t){this.setValue("start"===t?[e,Array.isArray(this.value)&&this.value[1]&&a(this.value[1],this.timeFormat)?this.value[1]:""]:[Array.isArray(this.value)&&this.value[0]&&a(this.value[0],this.timeFormat)?this.value[0]:"",e])}clearRangeTimePicker(){this.value=["",""],this.rangeInputRenderer.getStartInputRef().value="",this.rangeInputRenderer.getEndInputRef().value=""}clearTimePicker(){this.value="",this.singleInputRenderer.getInputRef().value="",this.dropdownSelectedItemsController.setSelectedItems({})}valueGuard(e){let t;switch(this.mode){case"single":t=e&&"string"==typeof e&&a(e,this.timeFormat)||""===e;break;case"range":t=Array.isArray(e)&&2===e.length&&e.every((e=>a(e,this.timeFormat)||""===e))}return t||m.warn(`Invalid time picker value ${e} for ${this.mode} mode`),t}}W([c({writable:!0})],q.prototype,"value",void 0),W([c()],q.prototype,"mode",void 0),W([c()],q.prototype,"timeFormat",void 0),W([c()],q.prototype,"selectedTimeValue",void 0),W([c()],q.prototype,"increments",void 0),W([c()],q.prototype,"changeEventEmitter",void 0),W([c()],q.prototype,"singleInputRenderer",void 0),W([c()],q.prototype,"rangeInputRenderer",void 0),W([c()],q.prototype,"dropdownSelectedItemsController",void 0),W([c()],q.prototype,"host",void 0),W([u("watchValue")],q.prototype,"emitChangeEventOrClearTimePicker",null),W([u("watchSelectedTimeValue")],q.prototype,"updateValueIfSelectedItemsChange",null),W([u("watchMode")],q.prototype,"resetCurrentValueIfModeChange",null),W([u("componentDidLoad")],q.prototype,"checkTheDefaultValueForRangeMode",null);var K=function(e,t,i,r){var o,n=arguments.length,s=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,r);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(n<3?o(s):n>3?o(t,i,s):o(t,i))||s);return n>3&&s&&Object.defineProperty(t,i,s),s};class U extends V{constructor(){super((()=>({target:this.singleInputRenderer.getInputRef(),appendableElement:this.singleDropdownRenderer.getDropdownRef(),positionRelativeTo:this.positionRelativeTo,translocation:{X:0,Y:8},placement:["bottom","top"]})),(()=>"custom"))}initValueAndDropdownSource(){this.valueController.resetValue(),this.initDropdownSource()}initDropdownSourceAndInputMaskConfig(){this.valueController.resetValue(),this.initDropdownSource(),this.inputMaskController.initInputMask()}initDropdownSourceAndSelectedItems(){this.initDropdownSource(),"single"===this.mode&&this.dropdownSelectedItemsController.initSelectedItemsByString(this.value)}hideDropdownWhenDisabled(){"single"===this.mode&&this.hide()}initDropdownSource(){this.dropdownSource={hours:this.getSourceHoursStrings(),minutes:this.getSourceMinutesStrings()}}getSourceMinutesStrings(){(this.increments<1||this.increments>59||isNaN(Number(this.increments)))&&(m.warn("The increments should be between 1 and 59."),this.increments=1);const e=[];for(let t=0;t<60;t+=this.increments)e.push(d(t));return e}getSourceHoursStrings(){const e=[];if("12-hour"===this.timeFormat){e.push("12");for(let t=1;t<12;t++)e.push(d(t))}else for(let t=0;t<24;t++)e.push(d(t));return e}}K([c({writable:!0})],U.prototype,"isDropdownShow",void 0),K([c({writable:!0})],U.prototype,"dropdownSource",void 0),K([c()],U.prototype,"mode",void 0),K([c({writable:!0})],U.prototype,"increments",void 0),K([c()],U.prototype,"timeFormat",void 0),K([c()],U.prototype,"value",void 0),K([c()],U.prototype,"positionRelativeTo",void 0),K([c()],U.prototype,"selectedTimeValue",void 0),K([c()],U.prototype,"singleInputRenderer",void 0),K([c()],U.prototype,"rangeInputRenderer",void 0),K([c()],U.prototype,"singleDropdownRenderer",void 0),K([c()],U.prototype,"valueController",void 0),K([c()],U.prototype,"dropdownSelectedItemsController",void 0),K([c()],U.prototype,"inputMaskController",void 0),K([u("watchIncrements")],U.prototype,"initValueAndDropdownSource",null),K([u("watchTimeFormat")],U.prototype,"initDropdownSourceAndInputMaskConfig",null),K([u("componentWillLoad")],U.prototype,"initDropdownSourceAndSelectedItems",null),K([u("watchDisabled")],U.prototype,"hideDropdownWhenDisabled",null);var G=function(e,t,i,r){var o,n=arguments.length,s=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,r);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(n<3?o(s):n>3?o(t,i,s):o(t,i))||s);return n>3&&s&&Object.defineProperty(t,i,s),s};class H extends h{constructor(){super(...arguments),this.DROPDOWN_ITEM_DEFAULT_HEIGHT=32,this.initSelectedItemsByString=e=>{this.selectedTimeValue=""!==e&&a(e,this.timeFormat)?this.getClosetTimeValue(e):{}},this.scrollToSelectedElement=e=>{const t=e.closest("ul"),i=Number(e.dataset.index)*this.DROPDOWN_ITEM_DEFAULT_HEIGHT;t.scrollTop=i},this.getClosestMinuteForCurrent=e=>{const t=this.dropdownSource.minutes.filter((t=>Number(t)<=Number(e)));return t[t.length-1]},this.getCurrentTime=e=>{const t=new Date(Date.now()).getHours(),i=d(new Date(Date.now()).getMinutes());return"12-hour"===e?{hour:d(t>12?t-12:0===t?12:t),minute:i,amPm:t>=12?"PM":"AM"}:{hour:d(t),minute:i}},this.selectedElementScrollTop=()=>{("single"===this.mode?this.singleDropdownRenderer.getSelectedItem():this.rangeDropdownRenderer.getSelectedItem()).forEach((e=>{this.scrollToSelectedElement(e)}))}}syncSelectedItemsByValueChange(e){"single"===this.mode&&(!a(e,this.timeFormat)&&e||this.initSelectedItemsByString(e))}syncSelectedItemsPositionWhenDropdownShow(e){e&&(this.disabled||this.selectedElementScrollTop())}syncSelectedItemsPosition(){("single"===this.mode&&Object.keys(this.selectedTimeValue).length>0||"range"===this.mode&&Array.isArray(this.value)&&(this.value[0]||this.value[1]))&&this.selectedElementScrollTop()}setSelectedItems(e){this.selectedTimeValue=e}setSelectedItemsToCurrentTime(){this.selectedTimeValue=this.getCurrentTime(this.timeFormat)}getClosetTimeValue(e){const t=e.replace(" ",":").split(":");return{hour:t[0],minute:this.increments>1?this.getClosestMinuteForCurrent(t[1]):t[1],amPm:"12-hour"===this.timeFormat?t[2]:void 0}}}G([c({writable:!0})],H.prototype,"selectedTimeValue",void 0),G([c()],H.prototype,"mode",void 0),G([c()],H.prototype,"value",void 0),G([c()],H.prototype,"timeFormat",void 0),G([c()],H.prototype,"dropdownSource",void 0),G([c()],H.prototype,"increments",void 0),G([c()],H.prototype,"disabled",void 0),G([c()],H.prototype,"singleDropdownRenderer",void 0),G([c()],H.prototype,"rangeDropdownRenderer",void 0),G([u("watchValue")],H.prototype,"syncSelectedItemsByValueChange",null),G([u("watchIsDropdownShow")],H.prototype,"syncSelectedItemsPositionWhenDropdownShow",null),G([u("componentDidRender")],H.prototype,"syncSelectedItemsPosition",null);var Y=function(e,t,i,r){var o,n=arguments.length,s=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,r);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(n<3?o(s):n>3?o(t,i,s):o(t,i))||s);return n>3&&s&&Object.defineProperty(t,i,s),s};class X extends A{constructor(){super((e=>{const t=e.singleDropdownRenderer.getDropdownRef(),i=e.rangeDropdownRenderer.getStartDropdownRef(),r=e.rangeDropdownRenderer.getEndDropdownRef();return[{keyCode:"Enter",activeElementInScope:[e.host],callback:e.componentBlurAndHideDropdown},{keyCode:["ArrowUp","ArrowDown"],activeElementInScope:[t,i,r],callback:t=>{e.switchHourOrMinuteFocus(t)}},{keyCode:"Escape",activeElementInScope:[e.host,t,i,r],callback:e.componentBlurAndHideDropdown}]})),this.componentBlurAndHideDropdown=async()=>{"single"===this.mode?(await this.singleInputRenderer.getInputRef().doBlur(),this.singleDropdownController.hide()):(await this.rangeInputRenderer.getStartInputRef().doBlur(),await this.rangeInputRenderer.getEndInputRef().doBlur(),this.startDropdownController.hide(),this.endDropdownController.hide())}}switchHourOrMinuteFocus(e){const t=e.key,i=e.composedPath()[0];let r=null;"LI"===i.tagName&&"menuitem"===i.getAttribute("role")&&(r="ArrowDown"===t?i.nextElementSibling:i.previousElementSibling),r&&r.focus()}}Y([c()],X.prototype,"host",void 0),Y([c()],X.prototype,"mode",void 0),Y([c()],X.prototype,"singleInputRenderer",void 0),Y([c()],X.prototype,"singleDropdownRenderer",void 0),Y([c()],X.prototype,"rangeDropdownRenderer",void 0),Y([c()],X.prototype,"rangeInputRenderer",void 0),Y([c()],X.prototype,"singleDropdownController",void 0),Y([c()],X.prototype,"startDropdownController",void 0),Y([c()],X.prototype,"endDropdownController",void 0);var J=function(e,t,i,r){var o,n=arguments.length,s=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,r);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(n<3?o(s):n>3?o(t,i,s):o(t,i))||s);return n>3&&s&&Object.defineProperty(t,i,s),s};class Q extends h{constructor(){super(...arguments),this.isMobileDevice=D()===I.MOBILE,this.onInputChange=e=>{e.host.parentElement.classList.contains("time-picker-input-start")?this.valueController.updateValueByRangeType(e.detail,"start"):this.valueController.updateValueByRangeType(e.detail,"end")},this.timePickerInputFocus=e=>{const t=e.host,i=Array.isArray(this.value)?this.value:["",""];t.parentElement.classList.contains("time-picker-input-start")?this.startDropdownController.showAndScrollPosition(i[0]):this.endDropdownController.showAndScrollPosition(i[1]?i[1]:i[0])},this.timePickerInputBlur=e=>{const t=e.host,i=t.parentElement.classList.contains("time-picker-input-start")?"start":"end";if(a(t.value,this.timeFormat)){if(t.value&&this.increments>1){const{hour:e,minute:i,amPm:r}=this.dropdownSelectedItemsController.getClosetTimeValue(t.value);t.value=`${e}:${i}${r?" "+r:""}`}}else t.value="",this.valueController.updateValueByRangeType("",i)}}getStartInputRef(){return this.startTimeInputRef}getEndInputRef(){return this.endTimeInputRef}render(){const i=Array.isArray(this.value)?this.value[0]:"",r=Array.isArray(this.value)?this.value[1]:"";return e(t,null,e("vega-flex",{class:"v-w-full",gap:"0","align-items":"center",direction:this.isMobileDevice?"col":"row"},e("div",{class:"time-picker-input time-picker-input-start vega-flex-basis-0 vega-flex-grow"},e("vega-input",{"prefix-icon":"clock-face",placeholder:this.getPlaceholderBySourceType("start"),disabled:this.disabled,size:this.size,value:i,ref:e=>(this.handlerEvent(e),this.startTimeInputRef=e),"show-clear-icon":"false"})),e("span",{class:"range-input-divider v-min-w-min vega-flex-shrink-0"}),e("div",{class:"time-picker-input time-picker-input-end vega-flex-basis-0 vega-flex-grow"},e("vega-input",{placeholder:this.getPlaceholderBySourceType("end"),disabled:this.disabled,size:this.size,value:r,ref:e=>(this.handlerEvent(e),this.endTimeInputRef=e),"show-clear-icon":"false"}))),this.rangeClearButtonRenderer.render())}handlerEvent(e){b.addUniqueObserverToNode(e,k,(e=>{this.timePickerInputBlur(e)})),b.addUniqueObserverToNode(e,x,(e=>{this.onInputChange(e)})),b.addUniqueObserverToNode(e,y,(e=>{this.timePickerInputFocus(e)}))}getPlaceholderBySourceType(e){return"start"===e?Array.isArray(this.placeholder)&&this.placeholder[0]?this.placeholder[0]:this.translationSlimmer.t("Start Time"):Array.isArray(this.placeholder)&&this.placeholder[1]?this.placeholder[1]:this.translationSlimmer.t("End Time")}}J([c()],Q.prototype,"mode",void 0),J([c()],Q.prototype,"placeholder",void 0),J([c()],Q.prototype,"disabled",void 0),J([c()],Q.prototype,"size",void 0),J([c()],Q.prototype,"positionRelativeTo",void 0),J([c()],Q.prototype,"timeFormat",void 0),J([c()],Q.prototype,"increments",void 0),J([c()],Q.prototype,"value",void 0),J([c()],Q.prototype,"startDropdownController",void 0),J([c()],Q.prototype,"endDropdownController",void 0),J([c()],Q.prototype,"valueController",void 0),J([c()],Q.prototype,"rangeClearButtonRenderer",void 0),J([c()],Q.prototype,"rangeDropdownRenderer",void 0),J([c()],Q.prototype,"dropdownSelectedItemsController",void 0),J([c()],Q.prototype,"translationSlimmer",void 0);var Z=function(e,t,i,r){var o,n=arguments.length,s=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,r);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(n<3?o(s):n>3?o(t,i,s):o(t,i))||s);return n>3&&s&&Object.defineProperty(t,i,s),s};class ee extends h{constructor(){super(...arguments),this.isMobileDevice=D()===I.MOBILE,this.renderStartDropdown=()=>e("vega-time-picker-dropdown",{class:{"vega-time-picker-dropdown start-dropdown":!0,mobile:this.isMobileDevice},ref:e=>this.startDropdown=e},e("div",{class:"vega-time-picker-dropdown-container",ref:e=>this.startDropdownContainer=e},e("div",{class:"vega-time-picker-dropdown-panel"},this.renderDropdownList("start")))),this.renderEndDropdown=()=>e("vega-time-picker-dropdown",{class:{"vega-time-picker-dropdown end-dropdown":!0,mobile:this.isMobileDevice},ref:e=>this.endDropdown=e},e("div",{class:"vega-time-picker-dropdown-container",ref:e=>this.endDropdownContainer=e},e("div",{class:"vega-time-picker-dropdown-panel"},this.renderDropdownList("end")))),this.renderDropdownList=t=>{const i=this.getTimeArray();return e("ul",{role:"menu","aria-label":"dropdown-ul",class:{"vega-time-picker-panel-column":!0}},i.map(((e,i)=>this.renderDropdownItem(e,t,i))))}}componentDidRenderCallback(){this.startDropdownContainer&&this.startDropdownContainer.parentElement===this.startDropdown&&this.startDropdown.shadowRoot.append(this.startDropdownContainer),this.endDropdownContainer&&this.endDropdownContainer.parentElement===this.endDropdown&&this.endDropdown.shadowRoot.append(this.endDropdownContainer)}getStartDropdownRef(){return this.startDropdown}getEndDropdownRef(){return this.endDropdown}getSelectedItem(){const e=this.startDropdown.shadowRoot,t=this.endDropdown.shadowRoot;let i=[e.querySelector(".vega-dropdown-item-selected"),t.querySelector(".vega-dropdown-item-selected")].filter(O);return 0===i.length&&(i=[e.querySelector(".vega-time-picker-dropdown-panel li:first-child"),t.querySelector(".vega-time-picker-dropdown-panel li:first-child")].filter(O)),i}render(){return e(t,null,this.renderStartDropdown(),this.renderEndDropdown())}renderDropdownItem(t,i,r){return e("li",{key:t,role:"menuitem","aria-label":t,class:{"vega-dropdown-item-selected":this.isItemSelected(t,i)},tabIndex:0===r?0:-1,"data-index":r,onClick:()=>this.onItemClick(t,i),onKeyDown:j()},e("span",{"data-index":r,innerHTML:t}))}onItemClick(e,t){this.valueController.updateValueByRangeType(e,t),"start"===t?(this.startDropdownController.hide(),this.rangeInputRenderer.getEndInputRef().doFocus()):this.endDropdownController.hide()}isItemSelected(e,t){const i=this.value&&Array.isArray(this.value)?this.value:["",""];return"start"===t&&i[0]===e||"end"===t&&i[1]===e}getTimeArray(){const e=[],t=[],i=[],r=this.timeFormat,{hours:o,minutes:n}=this.dropdownSource;if(this.dropdownSource)for(let s=0;s<o.length;s++)for(let a=0;a<n.length;a++){const d=`${o[s]}:${n[a]}`;e.push(d),"12-hour"===r&&(i.push(d+" AM"),t.push(d+" PM"))}return"12-hour"===r?i.concat(t):e}}Z([c()],ee.prototype,"timeFormat",void 0),Z([c()],ee.prototype,"value",void 0),Z([c()],ee.prototype,"dropdownSource",void 0),Z([c()],ee.prototype,"valueController",void 0),Z([c()],ee.prototype,"rangeInputRenderer",void 0),Z([c()],ee.prototype,"startDropdownController",void 0),Z([c()],ee.prototype,"endDropdownController",void 0),Z([u("componentDidRender")],ee.prototype,"componentDidRenderCallback",null);var te=function(e,t,i,r){var o,n=arguments.length,s=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,r);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(n<3?o(s):n>3?o(t,i,s):o(t,i))||s);return n>3&&s&&Object.defineProperty(t,i,s),s};class ie extends h{constructor(){super(...arguments),this.onClickClearIcon=()=>{this.valueController.clearRangeTimePicker(),this.endDropdownController.hide(),this.rangeInputRenderer.getStartInputRef().doFocus()}}render(){return e("div",{class:{"vega-time-picker-range-clear-icon":!0,invisible:!this.isInvisible()},"aria-label":"clear input",role:"button",tabindex:"-1",onClick:this.onClickClearIcon,onKeyDown:j()},e("vega-icon",{icon:"close",class:"v-min-w-min vega-flex-shrink-0"}))}isInvisible(){return!this.disabled&&Array.isArray(this.value)&&(Boolean(this.value[0])||Boolean(this.value[1]))}}te([c()],ie.prototype,"disabled",void 0),te([c()],ie.prototype,"value",void 0),te([c()],ie.prototype,"valueController",void 0),te([c()],ie.prototype,"endDropdownController",void 0),te([c()],ie.prototype,"rangeInputRenderer",void 0);class re{constructor(e){this.config=e}canEvaluate(e,t){return t?this.isAcceptedInputType(e)&&!t.disabled&&t.visible:this.isAcceptedInputType(e)}shouldShowError(e){return!e.disabled&&e.visible&&(e.touched||e.modified)}evaluate(e){if(!this.isAcceptedInputType(e))throw new Error(`Unexpected type of input: ${typeof e}: ${e}`);const t=this.isStartTimeBeforeEndTime(e[0],e[1]);return{isValid:t,message:t?"":"The end time should be later than start time"}}isAcceptedInputType(e){return Array.isArray(e)&&2===e.length&&e.every((e=>a(e,this.config.timeFormat)))}isStartTimeBeforeEndTime(e,t){const i=new Date,r=`${i.getFullYear()}-${String(i.getMonth()+1).padStart(2,"0")}-${String(i.getDate()).padStart(2,"0")}`;return new Date(`${r}T${l(t)}`)>new Date(`${r}T${l(e)}`)}}var oe=function(e,t,i,r){var o,n=arguments.length,s=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,r);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(n<3?o(s):n>3?o(t,i,s):o(t,i))||s);return n>3&&s&&Object.defineProperty(t,i,s),s};class ne extends h{initInputMask(){const e={type:"custom",options:{mask:"12-hour"===this.timeFormat?"xx:xx xx":"xx:xx",slot:"x",accept:"12-hour"===this.timeFormat?/[0-9|A|P|M]/:/\d/}};"range"===this.mode?(this.rangeInputRenderer.getStartInputRef().maskConfig=e,this.rangeInputRenderer.getEndInputRef().maskConfig=e):this.singleInputRenderer.getInputRef().maskConfig=e}}oe([c()],ne.prototype,"timeFormat",void 0),oe([c()],ne.prototype,"mode",void 0),oe([c()],ne.prototype,"singleInputRenderer",void 0),oe([c()],ne.prototype,"rangeInputRenderer",void 0),oe([u("componentDidLoad")],ne.prototype,"initInputMask",null);var se=function(e,t,i,r){var o,n=arguments.length,s=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,r);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(n<3?o(s):n>3?o(t,i,s):o(t,i))||s);return n>3&&s&&Object.defineProperty(t,i,s),s};class ae extends V{constructor(e){super((()=>({target:"start"===e?this.rangeInputRenderer.getStartInputRef():this.rangeInputRenderer.getEndInputRef(),appendableElement:"start"===e?this.rangeDropdownRenderer.getStartDropdownRef():this.rangeDropdownRenderer.getEndDropdownRef(),positionRelativeTo:this.positionRelativeTo,translocation:{X:0,Y:8},placement:["bottom","top"],matchTargetWidth:!0})),(()=>"custom"),"isRangeDropdownShow"),this.isRangeDropdownShow=!1,this.rangeDropdownType="start",this.showAndScrollPosition=e=>{if(this.show(),e){const t=("start"===this.rangeDropdownType?this.rangeDropdownRenderer.getStartDropdownRef():this.rangeDropdownRenderer.getEndDropdownRef()).shadowRoot.querySelector(`[aria-label="${e}"]`);t&&this.dropdownSelectedItemsController.scrollToSelectedElement(t)}},this.rangeDropdownType=e}hideDropdownWhenDisabled(){"range"===this.mode&&this.isRangeDropdownShow&&this.hide()}}se([c()],ae.prototype,"positionRelativeTo",void 0),se([c()],ae.prototype,"mode",void 0),se([c()],ae.prototype,"rangeDropdownRenderer",void 0),se([c()],ae.prototype,"rangeInputRenderer",void 0),se([c()],ae.prototype,"dropdownSelectedItemsController",void 0),se([u("watchDisabled")],ae.prototype,"hideDropdownWhenDisabled",null);class de{constructor(e){this.config=e}evaluate(e){if(!this.isAcceptedInputType(e))throw new Error(`Invalid time value ${e} for range mode`);const t=Array.isArray(e)&&2===e.length&&e.every((e=>a(e,this.config.timeFormat)));return{isValid:t,message:t?"":"This field is required"}}canEvaluate(e,t){return t?this.isAcceptedInputType(e)&&!t.disabled&&t.visible:this.isAcceptedInputType(e)}shouldShowError(e){return!e.disabled&&e.visible&&(e.touched||e.modified)}isAcceptedInputType(e){return null==e||Array.isArray(e)}}const le=[{payloadKey:"AUTO_VALIDATION_IS_TRUE",payloadDescription:"Determines whether automatic validation should be implemented for the time picker during user input",payloadValue:e=>!0===e.autoValidation},{payloadKey:"AUTO_VALIDATION_IS_FALSE",payloadDescription:"Determines whether automatic validation should be implemented for the time picker during user input",payloadValue:e=>!1===e.autoValidation},{payloadKey:"MODE_IS_SINGLE",payloadDescription:"Specifies the mode for selecting time in the time picker, `single` indicates the ability to select a single time.",payloadValue:e=>"single"===e.mode},{payloadKey:"MODE_IS_RANGE",payloadDescription:"Specifies the mode for selecting time in the time picker, `range` indicates the ability to select a time range",payloadValue:e=>"range"===e.mode}];var pe=function(e,t,i,r){var o,n=arguments.length,s=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,r);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(n<3?o(s):n>3?o(t,i,s):o(t,i))||s);return n>3&&s&&Object.defineProperty(t,i,s),s};const ce=class{constructor(e){i(this,e),this.vegaChange=r(this,"vegaChange",7),this.change=r(this,"change",7),this.globalSlimmers={},this.translationSlimmer=new M,this.labelRenderer=new P,this.singleInputRenderer=new _,this.singleDropdownRenderer=new B,this.valueController=new q,this.singleDropdownController=new U,this.dropdownSelectedItemsController=new H,this.keyboardController=new X,this.formFieldController=new w({propertyRules:[{propertyName:"required",ruleFactory:(e,t,i)=>e?"range"===i?new de({timeFormat:t}):new $({timeFormat:t}):null,dependence:["timeFormat","mode"]},{propertyName:"timeFormat",ruleFactory:(e,t,i)=>e&&t?"range"===i?new de({timeFormat:e}):new $({timeFormat:e}):null,dependence:["required","mode"]},{propertyName:"mode",ruleFactory:(e,t)=>"range"===e?new re({timeFormat:t}):null,dependence:"timeFormat"}],validationRulesName:"validationRules",defaultValue:e=>"range"===e.mode?["",""]:"",attributeGetter:e=>this[e],inputContainerGetter:()=>this.inputContainerRef,touchableAreaGetter:()=>"single"===this.mode?[this.singleInputRenderer.getInputRef()]:[this.rangeInputRenderer.getStartInputRef(),this.rangeInputRenderer.getEndInputRef()]}),this.rangeInputRenderer=new Q,this.rangeClearButtonRenderer=new ie,this.rangeDropdownRenderer=new ee,this.startDropdownController=new ae("start"),this.endDropdownController=new ae("end"),this.inputMaskController=new ne,this.inputEventPrevent=new E([x],(()=>this.inputContainerRef)),this.changeEventEmitter=F(ce,x),this.vegaComponentUsageRuntimeMetricsSlimmer=new g(le),this.isMobileDevice=D()===I.MOBILE,this.dropdownSource={hours:[],minutes:[]},this.isDropdownShow=!1,this.selectedTimeValue={},this.mode="single",this.required=!1,this.increments=1,this.timeFormat="24-hour",this.value="range"===this.mode?["",""]:"",this.size="default",this.disabled=!1,this.isValid=null,this.autoValidation=!0,this.validationRules=[]}async watchIsDropdownShow(e){}watchSelectedTimeValue(){}watchMode(){}watchIncrements(){}watchTimeFormat(){}watchValue(e,t){}watchDisabled(){}watchValidationRules(){}componentWillLoad(){}componentDidLoad(){}componentDidRender(){}render(){const t="range"===this.mode;return p(e(o,{class:{disabled:this.disabled}},this.labelRenderer.render(),e("div",{class:{"vega-time-picker-input-container":!0,"range-mode":t,mobile:t&&this.isMobileDevice},ref:e=>this.inputContainerRef=e},t?this.rangeInputRenderer.render():this.singleInputRenderer.render()),t?this.rangeDropdownRenderer.render():this.singleDropdownRenderer.render()),this.host)}get host(){return n(this)}static get watchers(){return{isDropdownShow:["watchIsDropdownShow"],selectedTimeValue:["watchSelectedTimeValue"],mode:["watchMode"],increments:["watchIncrements"],timeFormat:["watchTimeFormat"],value:["watchValue"],disabled:["watchDisabled"],validationRules:["watchValidationRules"]}}};pe([f()],ce.prototype,"globalSlimmers",void 0),pe([v()],ce.prototype,"translationSlimmer",void 0),pe([v()],ce.prototype,"labelRenderer",void 0),pe([v()],ce.prototype,"singleInputRenderer",void 0),pe([v()],ce.prototype,"singleDropdownRenderer",void 0),pe([v()],ce.prototype,"valueController",void 0),pe([v()],ce.prototype,"singleDropdownController",void 0),pe([v()],ce.prototype,"dropdownSelectedItemsController",void 0),pe([v()],ce.prototype,"keyboardController",void 0),pe([v()],ce.prototype,"formFieldController",void 0),pe([v()],ce.prototype,"rangeInputRenderer",void 0),pe([v()],ce.prototype,"rangeClearButtonRenderer",void 0),pe([v()],ce.prototype,"rangeDropdownRenderer",void 0),pe([v()],ce.prototype,"startDropdownController",void 0),pe([v()],ce.prototype,"endDropdownController",void 0),pe([v()],ce.prototype,"inputMaskController",void 0),pe([v()],ce.prototype,"inputEventPrevent",void 0),pe([v()],ce.prototype,"changeEventEmitter",void 0),pe([v()],ce.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),pe([s()],ce.prototype,"watchValue",null),ce.style=':host{display:inline-block;text-align:left;line-height:normal;width:100%}vega-field-label{margin-bottom:8px}vega-input::part(field-error-message){display:none}.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-time-picker-input-container.error vega-input::part(input-container){border-width:0px}.vega-time-picker-input-container.error vega-input::part(input-container):hover{border-width:0px}.vega-time-picker-input-container.error vega-input::part(input-container):focus-within{outline:none}.vega-time-picker-input-container.error{border-radius:8px;border:1px solid rgba(var(--v-border-input-field-danger, 230, 50, 87, 1))}.vega-time-picker-input-container.error:hover{border:1px solid rgba(var(--v-border-input-field-danger-hover, 255, 87, 114, 1))}.vega-time-picker-input-container.error:focus-within{outline:2px solid rgba(var(--v-border-color-danger, 230, 50, 87, 1));outline-offset:2px;border:1px solid rgba(var(--v-border-color-input-field-danger-focus, 233, 71, 104, 1))}.vega-hidden{display:none}.range-input-divider{width:1px;height:24px;border-style:solid;border-right-width:1px;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;border-color:rgba(var(--v-border-color-divider, 171, 198, 216, 1))}.mobile .range-input-divider{width:100%;height:1px;border-style:solid;border-right-width:0px;border-top-width:1px;border-bottom-width:0px;border-left-width:0px}.mobile .time-picker-input-end vega-input::part(input){padding-left:26px}.range-mode{position:relative;background-color:rgba(var(--v-bg-primary, 252, 252, 252, 1));border-radius:8px;border:1px solid rgba(var(--v-border-input-field, 171, 198, 216, 1))}:host(.disabled) .range-mode{background-color:rgba(var(--v-bg-secondary, 245, 247, 247, 1))}:host:not(.disabled) .range-mode:not(.error):hover{border:1px solid rgba(var(--v-border-input-field-hover, 115, 160, 190, 1))}.range-mode vega-input::part(input-container),:host(.disabled) .range-mode vega-input::part(input-container):hover{border-width:0px}.range-mode:not(.error) .time-picker-input-start vega-input::part(input-container):focus-within,.range-mode:not(.error) .time-picker-input-end vega-input::part(input-container):focus-within{outline:2px solid rgba(var(--v-border-color-action, 19, 98, 226, 1));outline-offset:2px;border:1px solid rgba(var(--v-border-color-input-field-focus, 19, 98, 226, 1));margin:-1px}.range-mode .vega-time-picker-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%)}.range-mode.mobile .vega-time-picker-range-clear-icon{top:75%}.range-mode.mobile .time-picker-input{width:100%}vega-time-picker-dropdown.vega-force-hidden{display:none !important}.vega-time-picker-range-clear-icon.invisible{visibility:hidden}';var he=function(e,t,i,r){var o,n=arguments.length,s=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,r);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(n<3?o(s):n>3?o(t,i,s):o(t,i))||s);return n>3&&s&&Object.defineProperty(t,i,s),s};const ue=class{constructor(e){i(this,e),this.globalSlimmers={},this.vegaComponentUsageRuntimeMetricsSlimmer=new g}render(){return p(e(o,null),this.host)}get host(){return n(this)}};he([f()],ue.prototype,"globalSlimmers",void 0),he([v()],ue.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),ue.style=':host(.vega-time-picker-dropdown){border-radius:12px;position:absolute;overflow:hidden}:host(.vega-force-hidden){display:none !important}.vega-time-picker-dropdown-container{flex-direction:column;position:relative;padding-top:16px;padding-bottom:16px;border:1px solid rgba(var(--v-border-input-field, 171, 198, 216, 1));background-color:rgba(var(--v-bg-primary, 252, 252, 252, 1));border-radius:12px;box-shadow:var(--v-shadow-dropdown-menu, 0px 2px 4px -2px rgba(0, 0, 0, 0.1), 0px 4px 6px -1px rgba(0, 0, 0, 0.1))}.vega-time-picker-dropdown-panel{display:flex;height:224px}.vega-time-picker-dropdown-panel>ul{flex-grow:1;overflow:hidden;padding-left:0px;margin:0px;width:72px;list-style-type:none;scroll-behavior:smooth}.vega-time-picker-dropdown-panel>ul:hover{overflow-y:auto}.vega-time-picker-dropdown.mobile .vega-time-picker-dropdown-panel>ul{overflow-y:auto;overflow-x:hidden}.vega-time-picker-dropdown-panel>ul:hover::-webkit-scrollbar{width:4px}.vega-time-picker-dropdown-panel>ul:hover::-webkit-scrollbar-thumb{background-color:rgba(var(--v-bg-status-info, 205, 209, 211, 1));border-radius:9999px}.vega-time-picker-panel-column:not(:last-child){border-right-width:1px;border-color:rgba(var(--v-border-color-divider, 171, 198, 216, 1));border-right-style:solid}.vega-time-picker-dropdown-panel>ul>li{padding-top:4px;padding-bottom:4px;padding-left:16px;cursor:pointer;display:flex;align-items:center;width:100%}.vega-time-picker-dropdown-panel>ul>li:focus{background-color:rgba(var(--v-bg-quaternary, 241, 248, 251, 1))}.vega-time-picker-dropdown-panel>ul>li:hover{background-color:rgba(var(--v-bg-quaternary, 241, 248, 251, 1))}.vega-time-picker-dropdown-panel>ul>li.vega-dropdown-item-selected{background-color:rgba(var(--v-bg-action, 19, 98, 226, 1));color:rgba(var(--v-text-inverted-primary, 252, 252, 252, 1))}.vega-time-picker-dropdown-panel>ul>li{color:rgba(var(--v-text-primary, 32, 54, 69, 1));font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px;text-decoration:none;outline:0}@media screen and (min-width: 768px) and (max-width: 1023px){.vega-time-picker-dropdown-panel>ul>li{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.vega-time-picker-dropdown-panel>ul>li{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.vega-time-picker-dropdown-panel>ul>li{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}.vega-time-picker-panel-column::after{display:block;height:192px;content:""}.vega-time-picker-dropdown-footer{display:flex;padding-left:16px;padding-right:16px;justify-content:flex-end}.vega-time-picker-dropdown-footer .vega-time-picker-now{flex-grow:1}.horizontal-divider{height:1px;background-color:rgba(var(--v-bg-divider, 171, 198, 216, 1));width:100%;margin-top:12px;margin-bottom:12px}';export{ce as vega_time_picker,ue as vega_time_picker_dropdown}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,h as s,g as e,H as i}from"./p-1c298d5a.js";import{B as r,a,L as o,P as n,b as c,c as h}from"./p-d171cf44.js";import{t as l,a as p,s as u,b as d,c as m,d as f,e as w,f as b,g as v,X as y,Y as j,h as g,i as S}from"./p-1ec4b319.js";import{f as x,c as O,s as A,a as k}from"./p-b0502d01.js";import{s as R}from"./p-9b797118.js";import{I as T}from"./p-6e1ab235.js";import{V as C,I as H}from"./p-4387d550.js";import"./p-d884c644.js";import"./p-0c667d6a.js";import"./p-262ec334.js";class I extends r{addInteractionSupport(){}draw(){const{positions:t,colors:s}=this.options.renderOptions;let e=t;t&&t[0]&&!Array.isArray(t[0])&&(e=[t]),e.forEach(((t,e)=>{const i=this.getColorByIndex(e,s);this.renderer.drawLinePath(t,this.getColorFromToken(i)),t.forEach((t=>{this.renderer.drawCircle(t,4,this.getColorFromToken("bg-primary"),2,this.getColorFromToken(i))}))}))}}class P{process(t,s){const{dataSource:e,colors:i}=t,{xScale:r,yScale:a}=s;return{positions:this.getPathPositions(e,r,a),colors:i}}getPathPositions(t,s,e){let i=[];const r=x(t).map((({x:t,y:i})=>({x:s(t),y:e(i)})));let a=[];return t&&Array.isArray(t[0])?(i=t.map((t=>t.length)),a=O(r,i)):a=[r],a}}class L{process(t){const{dataSource:s,xAxis:e}=t;let i=s;return"time"===((null==e?void 0:e.type)||"value")&&(i=this.formatTimePositionArray(s)),t.dataSource=i,t}formatTimePositionArray(t){let s=[],e=[];const i=function(t,s){if("function"!=typeof t[Symbol.iterator])throw new TypeError("values is not iterable");return Array.from(t,(t=>s(t)))}(x(t),(t=>({x:"string"==typeof t.x?l("%Y-%m-%d")(t.x):t.x,y:t.y})));return t&&Array.isArray(t[0])?(e=t.map((t=>t.length)),s=O(i,e)):s=i,s}}class Y{process(t){const{dataSource:s,xAxis:e}=t;let i=s;switch((null==e?void 0:e.type)||"value"){case"time":i=k(s,(t=>t.x.valueOf()));break;case"value":i=k(s,(t=>t.x));break;case"category":i=A(s,(t=>t.x),e.sorter)}return t.dataSource=i,t}}class M{constructor(){this.formatMillisecond=p(".%L"),this.formatSecond=p(":%S"),this.formatMinute=p("%I:%M"),this.formatHour=p("%H:00"),this.formatDay=p("%d"),this.formatWeek=p("%b %d"),this.formatMonth=p("%b"),this.formatYear=p("%Y")}process(t,s){const{xAxis:e}=t;return"time"===((null==e?void 0:e.type)||"value")&&"function"!=typeof s.labelFormatter&&(s.scale.tickFormat=()=>this.timeFormatter.bind(this)),s}timeFormatter(t){return(u(t)<t?this.formatMillisecond:d(t)<t?this.formatSecond:m(t)<t?this.formatMinute:f(t)<t?this.formatHour:w(t)<t?b(t)<t?this.formatDay:this.formatWeek:v(t)<t?this.formatMonth:this.formatYear)(t)}}class _ extends a{constructor(){super(...arguments),this.layoutInputProcessor=new o,this.lineDataSourceInputProcessorChain=new n([new L,new Y]),this.xAxisInputProcessorChain=new n([this.layoutInputProcessor,new y,new M]),this.yAxisInputProcessorChain=new n([this.layoutInputProcessor,new j]),this.legendInputProcessorChain=new n([this.layoutInputProcessor,new c]),this.linePathInputProcessor=new P}createDrawerChain(t,s){const e=this.lineDataSourceInputProcessorChain.process(this.options),i=this.xAxisInputProcessorChain.process(e),r=this.yAxisInputProcessorChain.process(e);return[new g(t,s,{renderOptions:i}),new S(t,s,{renderOptions:r}),new h(t,s,{renderOptions:this.legendInputProcessorChain.process(this.options)}),new I(t,s,{renderOptions:this.linePathInputProcessor.process(e,{xScale:i.scale,yScale:r.scale})})]}}var B=function(t,s,e,i){var r,a=arguments.length,o=a<3?s:null===i?i=Object.getOwnPropertyDescriptor(s,e):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,s,e,i);else for(var n=t.length-1;n>=0;n--)(r=t[n])&&(o=(a<3?r(o):a>3?r(s,e,o):r(s,e))||o);return a>3&&o&&Object.defineProperty(s,e,o),o};const D=class{constructor(s){t(this,s),this.globalSlimmers={},this.vegaComponentUsageRuntimeMetricsSlimmer=new C}watchOptionsHandel(t){this.updateChart(t)}disconnectedCallback(){this.chart=null,this.reRenderTimer&&clearTimeout(this.reRenderTimer)}componentWillLoad(){this.updateChart(this.options)}async reRender(){this.reRenderTimer&&clearTimeout(this.reRenderTimer),this.reRenderTimer=setTimeout((()=>{this.chart.reRender()}),0)}render(){return R(s(i,null),this.host)}updateChart(t){if(!t)return;const{mode:s="svg",dataSource:e}=t,i=function(t,s){var e={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&s.indexOf(i)<0&&(e[i]=t[i]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(t);r<i.length;r++)s.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(t,i[r])&&(e[i[r]]=t[i[r]])}return e}(t,["mode","dataSource"]),r=Object.assign(Object.assign({},i),{mode:s,container:this.host,dataSource:e||[]});this.chart?this.chart.updateOptions(r):(this.chart=new _(r),this.chart.render())}get host(){return e(this)}static get watchers(){return{options:["watchOptionsHandel"]}}};B([H()],D.prototype,"globalSlimmers",void 0),B([T()],D.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),D.style=".vega-chart-legend-item{cursor:pointer}.vega-chart-line-path:hover{stroke-width:5}:host{display:block}";export{D as vega_line_chart}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{h as t,r as e,H as o,g as a}from"./p-1c298d5a.js";import{s as r}from"./p-9b797118.js";import{I as i}from"./p-000b3ab0.js";import{c as n,M as p,I as l}from"./p-6e1ab235.js";import{V as s,I as c}from"./p-4387d550.js";import{E as g}from"./p-f31bb1fd.js";import{c as d}from"./p-5915634b.js";import"./p-6a5a5c7b.js";import"./p-79ec5d69.js";import"./p-781fd6e0.js";import"./p-262ec334.js";import"./p-6a334573.js";import"./p-5f589974.js";import"./p-4bcd6612.js";import"./p-74168615.js";import"./p-ed45b3b6.js";import"./p-b1f65b13.js";import"./p-3a0a4d15.js";import"./p-d884c644.js";import"./p-6705c68a.js";import"./p-0c667d6a.js";import"./p-47a4c625.js";var h=function(t,e,o,a){var r,i=arguments.length,n=i<3?e:null===a?a=Object.getOwnPropertyDescriptor(e,o):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,o,a);else for(var p=t.length-1;p>=0;p--)(r=t[p])&&(n=(i<3?r(n):i>3?r(e,o,n):r(e,o))||n);return i>3&&n&&Object.defineProperty(e,o,n),n};class m extends g{constructor(){super((()=>({target:this.host,appendableElement:this.vegaTooltipContentBoxRenderer.getTooltipContentBoxRef(),positionRelativeTo:this.positionRelativeTo,matchTargetWidth:!1,size:this.size,minWidth:this.minWidth,maxWidth:this.maxWidth,placement:this.placement,alignment:this.alignment})),(()=>this.trigger),"isTooltipShow",(()=>this.disableInteractive))}watchTrigger(){"none"===this.trigger&&this.hide()}watchToShowTooltip(){this.isTooltipShow&&this.show()}}h([n()],m.prototype,"host",void 0),h([n()],m.prototype,"positionRelativeTo",void 0),h([n()],m.prototype,"size",void 0),h([n()],m.prototype,"minWidth",void 0),h([n()],m.prototype,"maxWidth",void 0),h([n()],m.prototype,"placement",void 0),h([n()],m.prototype,"alignment",void 0),h([n()],m.prototype,"trigger",void 0),h([n()],m.prototype,"disableInteractive",void 0),h([n({writable:!0})],m.prototype,"isTooltipShow",void 0),h([n()],m.prototype,"vegaTooltipContentBoxRenderer",void 0),h([p("watchTrigger")],m.prototype,"watchTrigger",null),h([p("watchToShowTooltip")],m.prototype,"watchToShowTooltip",null);class v{getTooltipContentBoxRef(){return this.tooltip}render(){return t("vega-tooltip-content-box",{ref:t=>this.tooltip=t,text:this.deprecatedPropertySlimmer.getValue()})}}!function(t,e,o,a){var r,i=arguments.length,n=i<3?e:null===a?a=Object.getOwnPropertyDescriptor(e,o):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,o,a);else for(var p=t.length-1;p>=0;p--)(r=t[p])&&(n=(i<3?r(n):i>3?r(e,o,n):r(e,o))||n);i>3&&n&&Object.defineProperty(e,o,n)}([n()],v.prototype,"deprecatedPropertySlimmer",void 0);const f=[{payloadKey:"CONTENT_IS_EMPTY",payloadDescription:"@deprecated Specifies the content that is displayed inside the tooltip.",payloadValue:t=>void 0===t.content||""===t.content},{payloadKey:"CONTENT_IS_NOT_EMPTY",payloadDescription:"@deprecated Specifies the content that is displayed inside the tooltip.",payloadValue:t=>void 0!==t.content&&""!==t.content}];var b=function(t,e,o,a){var r,i=arguments.length,n=i<3?e:null===a?a=Object.getOwnPropertyDescriptor(e,o):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,o,a);else for(var p=t.length-1;p>=0;p--)(r=t[p])&&(n=(i<3?r(n):i>3?r(e,o,n):r(e,o))||n);return i>3&&n&&Object.defineProperty(e,o,n),n};const x=class{constructor(t){e(this,t),this.globalSlimmers={},this.vegaTooltipElementAppenderController=new m,this.vegaTooltipContentBoxRenderer=new v,this.deprecatedPropertySlimmer=d(x,"text","content",void 0),this.vegaComponentUsageRuntimeMetricsSlimmer=new s(f),this.isTooltipShow=!1,this.trigger="hover",this.placement="top",this.alignment="center",this.disableInteractive=!1}watchTrigger(){}watchToShowTooltip(){}render(){return r(t(o,null,t("slot",null),this.vegaTooltipContentBoxRenderer.render()),this.host)}get host(){return a(this)}static get watchers(){return{trigger:["watchTrigger"],size:["watchToShowTooltip"],placement:["watchToShowTooltip"],alignment:["watchToShowTooltip"]}}};b([c()],x.prototype,"globalSlimmers",void 0),b([l()],x.prototype,"vegaTooltipElementAppenderController",void 0),b([l()],x.prototype,"vegaTooltipContentBoxRenderer",void 0),b([i((t=>[{keyCode:"Tab",activeElementInScope:[t.host],callback:()=>"hover"===t.trigger&&t.vegaTooltipElementAppenderController.show()},{keyCode:"Escape",activeElementInScope:[t.host,t.vegaTooltipContentBoxRenderer.getTooltipContentBoxRef()],callback:()=>t.vegaTooltipElementAppenderController.hide()},{keyCode:"Tab",activeElementOutScope:[t.host,t.vegaTooltipContentBoxRenderer.getTooltipContentBoxRef()],callback:()=>t.isTooltipShow&&t.vegaTooltipElementAppenderController.hide()}])),l()],x.prototype,"deprecatedPropertySlimmer",void 0),b([l()],x.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),x.style=":host{display:inline-block}";var w=function(t,e,o,a){var r,i=arguments.length,n=i<3?e:null===a?a=Object.getOwnPropertyDescriptor(e,o):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,o,a);else for(var p=t.length-1;p>=0;p--)(r=t[p])&&(n=(i<3?r(n):i>3?r(e,o,n):r(e,o))||n);return i>3&&n&&Object.defineProperty(e,o,n),n};const u=class{constructor(t){e(this,t),this.globalSlimmers={},this.vegaComponentUsageRuntimeMetricsSlimmer=new s}render(){return r(t(o,{class:"vega-tooltip",role:"tooltip"},t("div",{class:"vega-tooltip-content"},this.text)),this.host)}get host(){return a(this)}};w([c()],u.prototype,"globalSlimmers",void 0),w([l()],u.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),u.style=':host{position:absolute}:host(.vega-force-hidden){display:none !important}:host(.vega-placement-bottom){margin-top:8px}:host(.vega-placement-left){margin-left:-8px}:host(.vega-placement-right){margin-left:8px}:host(.vega-placement-top){margin-top:-8px}.vega-tooltip-content{border-radius:4px;padding-left:12px;padding-right:12px;padding-top:8px;padding-bottom:8px;overflow-wrap:break-word;background-color:rgba(var(--v-bg-inverted-primary, 4, 4, 28, 1));color:rgba(var(--v-text-inverted-primary, 252, 252, 252, 1));font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px}@media screen and (min-width: 768px) and (max-width: 1023px){.vega-tooltip-content{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.vega-tooltip-content{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.vega-tooltip-content{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px}}.vega-tooltip-content::after{content:"";position:absolute;border-style:solid}:host(.vega-placement-bottom) .vega-tooltip-content::after{top:-4px;border-width:0 5px 4px 5px;border-bottom-color:rgba(var(--v-bg-inverted-primary, 4, 4, 28, 1));border-top-color:transparent;border-left-color:transparent;border-right-color:transparent}:host(.vega-placement-left) .vega-tooltip-content::after{left:100%;border-width:5px 0 5px 4px;border-left-color:rgba(var(--v-bg-inverted-primary, 4, 4, 28, 1));border-top-color:transparent;border-bottom-color:transparent;border-right-color:transparent}:host(.vega-placement-right) .vega-tooltip-content::after{left:-4px;border-width:5px 4px 5px 0;border-right-color:rgba(var(--v-bg-inverted-primary, 4, 4, 28, 1));border-top-color:transparent;border-left-color:transparent;border-bottom-color:transparent}:host(.vega-placement-top) .vega-tooltip-content::after{bottom:-4px;border-width:4px 5px 0px 5px;border-top-color:rgba(var(--v-bg-inverted-primary, 4, 4, 28, 1));border-bottom-color:transparent;border-left-color:transparent;border-right-color:transparent}:host(.vega-placement-bottom.vega-alignment-start) .vega-tooltip-content::after,:host(.vega-placement-top.vega-alignment-start) .vega-tooltip-content::after{left:8px}:host(.vega-placement-bottom.vega-alignment-center) .vega-tooltip-content::after,:host(.vega-placement-top.vega-alignment-center) .vega-tooltip-content::after{left:calc(50% - 5px)}:host(.vega-placement-bottom.vega-alignment-end) .vega-tooltip-content::after,:host(.vega-placement-top.vega-alignment-end) .vega-tooltip-content::after{right:8px}:host(.vega-placement-left.vega-alignment-start) .vega-tooltip-content::after,:host(.vega-placement-right.vega-alignment-start) .vega-tooltip-content::after{top:8px}:host(.vega-placement-left.vega-alignment-center) .vega-tooltip-content::after,:host(.vega-placement-right.vega-alignment-center) .vega-tooltip-content::after{top:calc(50% - 5px)}:host(.vega-placement-left.vega-alignment-end) .vega-tooltip-content::after,:host(.vega-placement-right.vega-alignment-end) .vega-tooltip-content::after{bottom:8px}';export{x as vega_tooltip,u as vega_tooltip_content_box}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{W as t,B as s,a as e,M as i,b as n,s as r,N as h,c as o,R as a,d as c,A as u,I as l,V as d}from"./p-926596cc.js";import{O as p,d as f}from"./p-6a3989dd.js";import{C as w}from"./p-2d0d575f.js";import{a as b,V as k,b as m}from"./p-f357cf46.js";import{i as g}from"./p-b1f65b13.js";import"./p-6e1ab235.js";import{g as x}from"./p-33b62194.js";const y=async()=>t.handle(),N=async t=>new Promise((s=>{const e=new p(A.bind(null),(()=>{w.unregister(f.getSubject(t,b),e),s(null)}));w.register(f.getSubject(t,b),e)})),A=()=>!0;class O extends s{constructor(t){super(),this.type=e.ALIGNMENT,this.textAlign=t}static from(t){return[e.ALIGNMENT,new O(t)]}toJSON(){return{textAlign:this.textAlign}}renderClass(){return`v-rte--horizontal-alignment-${this.textAlign}`}render(){return null}}class S extends s{constructor(t){super(),this.type=e.INDENT,this.indent=Math.max(0,t)}static from(t){return[e.INDENT,new S(t)]}toJSON(){return this.indent>0?{indent:this.indent}:null}render(){return this.indent>0?{"margin-left":16*this.indent+"px"}:null}}class B{replaceBlockWithBlocks(t,s){this.blocks&&(s.forEach((t=>{t.parent=this})),this.blocks=this.blocks.flatMap((e=>e===t?s:e)))}appendChildBlocks(t){this.blocks&&(t.forEach((t=>{t.parent=this})),this.blocks=this.blocks.concat(t))}removeChildBlock(t){this.blocks&&(this.blocks=this.blocks.filter((s=>s!==t)))}}class j extends i{constructor(t){super(),this.type=n.APPEND_CHILD_NODES,this.entityToBeAppended=t}}class C extends i{constructor(t){super(),this.type=n.DELETE_CHILD,this.entityToBeRemoved=t}}const v=[{key:"black",light:"#111128",dark:"#E3E3E8"},{key:"gray",light:"#5E5E6D",dark:"#B9B9C1"},{key:"green",light:"#01801F",dark:"#59D977"},{key:"red",light:"#BD2947",dark:"#FFB2B5"},{key:"purple",light:"#563D82",dark:"#BEB2FF"},{key:"teal",light:"#17758F",dark:"#4CD8FF"}],M="";class I extends B{constructor(t){super(),this.annotationMap=new Map,this.id=t}static createAnnotationEntity(t,s){switch(t){case"textAlign":return O.from(s);case"indent":return S.from(s)}}toJSON(){const t=Array.from(this.annotationMap.values()).filter((t=>t instanceof s)).reduce(((t,s)=>Object.assign(Object.assign({},t),s.toJSON())),{});return Object.assign({id:this.id},Object.keys(t).length>0?{annotations:t}:{})}getAnnotationByType(t){return this.annotationMap.get(t)}apply(t){if(this.doApply(t),t.isFlushable){const t=r.getDOMByEntity(this);if(t){const s=f.getSubjectFromParentNodeByEventId(t,k);s&&w.notify(s,{})}}}doApply(t){t instanceof i?this.doModifyActionApply(t):this.applyAnnotationAction(t)}applyAnnotationAction(t){const s=t.toAnnotation();this.annotationMap.set(s.type,s),"function"==typeof this.doAnnotationActionApply&&this.doAnnotationActionApply(t)}appendChildNodes(t){t.forEach((t=>{t.parentBlock=this})),this.nodes=this.nodes.concat(t)}mergeTwoBlocksNodes(t){if(this.type===t.type||"image"!==this.type&&"image"!==t.type){let s=t.nodes;"image"!==this.type&&(s=t.nodes.filter((t=>t.text&&""!==t.text))),this.apply(new j(s)),t.parent.apply(new C(t))}}concatBlocksNodes(t){const s=[];return t.map((t=>{"image"!==t.type&&(s.push(...t.nodes),t.parent.apply(new C(t)))})),s}getPreviousNode(t){const s=t.parentBlock,e=s.nodes.indexOf(t);if(e>0)return s.nodes[e-1];if(s.parent){const t=this.getPreviousBlock(s);if(t)return this.getBlockLastNode(t)}}getNextNode(t){const s=t.parentBlock,e=s.nodes.indexOf(t);if(s.nodes[e+1])return s.nodes[e+1];if(s.parent){const t=this.getNextBlock(s);if(t)return this.getBlockFirstNode(t)}}isContentFirstNode(t){const s=t.parentBlock,e=s.nodes.indexOf(t),i=s.parent;if("list-item"===s.type){const t=i.parent;return 0===e&&Array.isArray(i.blocks)&&i.blocks[0]===s&&"list-item"!==t.type&&Array.isArray(t.blocks)&&t.blocks[0]===i}return 0===e&&Array.isArray(i.blocks)&&i.blocks[0]===s}getBlockLastNode(t){if("list-item"===t.type)return t.children&&t.children.length>0?this.getBlockLastNode(t.children[t.children.length-1]):t.nodes[t.nodes.length-1];if("number-list"===t.type||"bullet-list"===t.type){if(t.blocks)return this.getBlockLastNode(t.blocks[t.blocks.length-1])}else if(t.nodes)return t.nodes[t.nodes.length-1]}getBlockFirstNode(t){if("number-list"===t.type||"bullet-list"===t.type){if(t.blocks)return this.getBlockFirstNode(t.blocks[0])}else if(t.nodes)return t.nodes[0]}getPreviousBlock(t){if(t&&t.parent&&t.parent.blocks){const s=t.parent.blocks.indexOf(t);if(s>0)return t.parent.blocks[s-1];if(("number-list"===t.parent.type||"bullet-list"===t.parent.type)&&0===s)return this.getPreviousBlock(t.parent)}}getNextBlock(t){if(t&&t.parent&&t.parent.blocks){const s=t.parent.blocks.indexOf(t);if(t.parent.blocks[s+1])return t.parent.blocks[s+1];if("list-item"===t.type&&t.parent.blocks.length===s+1)return this.getNextBlock(t.parent)}}replaceNodeWithNodes(t,s){this.nodes&&(s.forEach((t=>{t.parentBlock=this})),this.nodes=this.nodes.flatMap((e=>e===t?s:e)))}}class L extends h{constructor(t="md",s){super(),this.type=o.IMAGE,this.size=t,this.alt=s}static from(t,s){return[o.IMAGE,new L(t,s)]}toJSON(){return g(this.alt)?{size:this.size,alt:this.alt}:{size:this.size}}render(){switch(this.size){case"sm":return{width:"25%"};case"md":return{width:"50%"};case"lg":return{width:"100%"}}}}class E extends a{constructor(t,s,e,i){super(t,i),this.type=c.IMAGE,this.url=s,this.parentBlock=e}static from(t,s){const e=new E(t.id,t.url,s);let i;return i=t.annotations&&0!==Object.keys(t.annotations).length?t.annotations:{size:"md"},e.annotationMap=new Map(Object.keys(i).map((()=>L.from(i.size,i.alt))).filter(g)),e}toJSON(){const t=this.annotationMap.get(o.IMAGE),s={};return(null==t?void 0:t.size)&&(s.size=t.size),(null==t?void 0:t.alt)&&(s.alt=t.alt),Object.assign(Object.assign({id:this.id},Object.keys(s).length>0?{annotations:s}:{}),{type:"image",url:this.url})}doAnnotationActionApply(t){const s=t.toAnnotation();this.annotationMap.set(s.type,s)}doModifyActionApply(t){}}class J extends i{constructor(t){super(),this.type=n.REPLACE_CHILD_NODES,this.newChildNodes=t}}class T extends i{constructor(t,...s){super(),this.type=n.INSERT_BLOCKS_AFTER,this.referBlock=t,this.blocksToBeInserted=s}}class F extends i{constructor(t,s){super(),this.type=n.SPLIT_BLOCK_WITH_NODE,this.splitPointNode=t,this.startOffsetOfNode=s}}class W{}class P extends W{constructor(){super(...arguments),this.doSplit=!0}}class z extends u{constructor(t){super(),this.type=l.SELECTION_RANGE,this.range=t}}class H extends h{constructor(t){super(),this.type=o.STRIKETHROUGH,this.strikethrough=t}static from(t){return[o.STRIKETHROUGH,new H(t)]}toJSON(){return{strikethrough:this.strikethrough}}renderClass(){return this.strikethrough?"v-rte--strikethrough":null}render(){return null}}class D extends h{constructor(t){super(),this.type=o.UNDERLINE,this.underline=t}static from(t){return[o.UNDERLINE,new D(t)]}toJSON(){return{underline:this.underline}}renderClass(){return this.underline?"v-rte--underline":null}render(){return null}}class K extends h{constructor(t){super(),this.type=o.ITALIC,this.italic=t}static from(t){return[o.ITALIC,new K(t)]}toJSON(){return{italic:this.italic}}render(){return this.italic?{"font-style":"italic"}:null}}class q extends h{constructor(t){super(),this.type=o.BOLD,this.bold=t}static from(t){return[o.BOLD,new q(t)]}toJSON(){return{bold:this.bold}}render(){return this.bold?{"font-weight":"700"}:null}}class R extends u{constructor(){super(...arguments),this.type=l.CLEAR_FORMATTING,this.items=[o.BOLD,o.ITALIC,o.UNDERLINE,o.STRIKETHROUGH,o.TEXT_COLOR,o.CODE]}}class U extends h{constructor(t){super(),this.type=o.CODE,this.code=t}static from(t){return[o.CODE,new U(t)]}toJSON(){return{code:this.code}}renderClass(){return this.code?"v-rte--code":null}render(){return null}}class V extends h{constructor(t){super(),this.type=o.TEXT_COLOR,this.textColor=this.formatTextColor(t)}static from(t){return[o.TEXT_COLOR,new V(t)]}toJSON(){return{textColor:this.textColor.key}}renderClass(){return null}render(){return{color:d.isDarkMode()?this.textColor.dark:this.textColor.light}}formatTextColor(t){return v.find((s=>s.key===t))||v[0]}}class Z extends h{constructor(t){super(),this.type=o.LINK,this.link=t}static from(t){return[o.LINK,new Z({href:t.href,groupKey:t.groupKey})]}toJSON(){return{link:{href:this.link.href,groupKey:this.link.groupKey}}}toEqual(t){return this.link.groupKey===t.link.groupKey}render(){return null}}class $ extends P{constructor({link:t,newText:s,needMergeNode:e,doSplit:i}){super(),this.isFlushable=!0,this.link=t,this.needMergeNode=e,this.newText=s,g(i)&&(this.doSplit=i)}toAnnotation(){return new Z(this.link)}}class G extends P{constructor(t){super(),this.isFlushable=!0,this.code=t}toAnnotation(){return new U(this.code)}}class Q extends P{constructor(){super(...arguments),this.isFlushable=!0}toAnnotation(){return new R}}class X extends i{constructor(t){super(),this.type=n.UPDATE_TEXT,this.newTextContent="",this.newTextContent=t}}class Y extends u{constructor(t){super(),this.type=l.LINK_GROUP,this.linkGroups=new Map,this.linkGroups=new Map([[t,[]]])}}class _ extends W{constructor(t,s){super(),this.isFlushable=!1,this.groupKey=t,this.nodes=s}toAnnotation(){return new Y(this.groupKey)}}class tt extends W{constructor(){super(),this.isFlushable=!1}toAnnotation(){return null}}class st extends W{constructor(t){super(),this.isFlushable=!0,this.annotationType=t}toAnnotation(){}}class et extends a{constructor(t,s,e,i){super(t,i),this.type=c.TEXT,this.parentBlock=e,this.text=s}static from(t,s){const e=new et(t.id,t.text,s),{annotations:i}=t;return i&&(e.annotationMap=new Map(Object.keys(i).map((t=>(i.link&&s.apply(new _(i.link.groupKey,[e])),this.createAnnotationEntity(t,i[t])))).filter(g))),e}static createAnnotationEntity(t,s){switch(t){case"bold":return q.from(s);case"italic":return K.from(s);case"underline":return D.from(s);case"strikethrough":return H.from(s);case"code":return U.from(s);case"textColor":return V.from(s);case"link":return Z.from(s)}}toJSON(){const t=Array.from(this.annotationMap.values()).filter((t=>t instanceof h)).reduce(((t,s)=>Object.assign(Object.assign({},t),s.toJSON())),{});return Object.assign(Object.assign({id:this.id},Object.keys(t).length>0?{annotations:t}:{}),{type:"text",text:this.text})}cloneWithText(t){return new et(x(),t,this.parentBlock,new Map(this.annotationMap))}isEmpty(){return!this.text||""===this.text||"\n"===this.text}doAnnotationActionApply(t){const s=this.getAnnotationByType(l.SELECTION_RANGE);if(t instanceof P&&t.doSplit&&s){const{startContainer:e,endContainer:i,startOffset:n,endOffset:r}=s.range,h=e===i&&n===r;this.parentBlock.nodes=this.parentBlock.nodes.flatMap((e=>e.id===this.id?h?this.insertNewNode(n,t):this.shouldSplitSelection(s.range)?this.splitTextNode(t,s.range):(this.applyActionToNode(this,t),this):e))}else this.applyActionToNode(this,t);this.parentBlock.mergeNodes(t)}doModifyActionApply(t){switch(t.type){case n.UPDATE_TEXT:this.updateText(t.newTextContent);break;case n.REPLACE_SELECTED_TEXT:this.replaceSelectedText(t.textToBeInsert,t.currentRange)}}splitTextNode(t,s){const{startContainer:e,endContainer:i,startOffset:n}=s,h=e.parentElement,o=i.parentElement,a=(t,s,e)=>{const i=t.substring(0,s),n=t.substring(s,e),r=t.substring(e);return[this.cloneWithText(i),this.cloneWithText(n),this.cloneWithText(r)]},c=h&&r.getEntityByDOM(h),u=o&&r.getEntityByDOM(o);if(c&&c.id===this.id){const r=e===i?s.endOffset:this.text.length,[h,o,c]=a(this.text,n,r);return this.applyActionToNode(o,t),[h,o,c].filter((t=>!!t.text))}if(u&&u.id===this.id){const[e,i,n]=a(this.text,0,s.endOffset);return this.applyActionToNode(i,t),[e,i,n].filter((t=>!!t.text))}return this.applyActionToNode(this,t),this}applyActionToNode(t,s){const e=s.toAnnotation();if(s instanceof tt)this.syncUpSelectedNodes(t);else if(e instanceof z||this.syncUpSelectedNodes(t),s instanceof st)this.annotationMap.delete(s.annotationType);else{if(!(e instanceof R))return e instanceof h||e instanceof z?(s instanceof $&&(g(s.newText)&&(t.text=s.newText),this.parentBlock.apply(new _(s.link.groupKey,[t]))),s instanceof G&&this.applyActionToNode(t,new Q),void t.annotationMap.set(e.type,e)):void 0;e.items.forEach((s=>{t.deleteAnnotationByType(s)}))}}replaceSelectedText(t,s){if(s&&s.startContainer&&s.endContainer){const{startContainer:e,endContainer:i,startOffset:n,endOffset:h}=s,o=e.parentElement,a=i.parentElement,c=o&&r.getEntityByDOM(o),u=a&&r.getEntityByDOM(a);let l=0,d=this.text.length;c&&c===this?(l=n,d=e===i?h:d):u&&u===this&&(d=h),this.apply(new X(this.text.slice(0,l)+t+this.text.slice(d)))}}updateText(t){this.text=t,!this.text&&this.isLinkNode()&&this.annotationMap.delete(o.LINK)}isLinkNode(){return this.annotationMap.has("LINK")}shouldSplitSelection(t){const{startContainer:s,endContainer:e,startOffset:i,endOffset:n}=t;return s!==e||i>0||n<(e.textContent?e.textContent.length:0)}syncUpSelectedNodes(t){const s=r.getDOMByEntity(this);if(s){const e=f.getSubjectFromParentNodeByEventId(s,m);e&&w.notify(e,{node:t})}}insertNewNode(t,s){if(0===t){const t=this.cloneWithText("");return this.applyActionToNode(t,s),[t,this]}if(t===this.text.length){const t=this.cloneWithText("");return this.applyActionToNode(t,s),[this,t]}const e=this.cloneWithText(this.text.substring(0,t)),i=this.cloneWithText(""),n=this.cloneWithText(this.text.substring(t));return this.applyActionToNode(i,s),[e,i,n]}}class it extends s{constructor(t){super(),this.type=e.TEXT_STYLE,this.textStyle=t}static from(t){return[e.TEXT_STYLE,new it(t)]}toJSON(){return{textStyle:this.textStyle}}render(){const t={fontFamily:"Inter",fontSize:"16px",lineHeight:"22px",fontWeight:"500"};switch(this.textStyle){case"paragraph":return t;case"title":return{fontFamily:"Inter",fontSize:"36px",lineHeight:"40px",fontWeight:"500"};case"subtitle":return{fontFamily:"Inter",fontSize:"28px",lineHeight:"32px",fontWeight:"500"};case"heading-1":return{fontFamily:"Inter",fontSize:"22px",lineHeight:"24px",fontWeight:"500"};case"heading-2":return{fontFamily:"Inter",fontSize:"20px",lineHeight:"24px",fontWeight:"500"};case"heading-3":return{fontFamily:"Inter",fontSize:"18px",lineHeight:"22px",fontWeight:"500"}}}}class nt extends W{constructor(t,s){super(),this.isFlushable=!0,this.textStyle=t,this.bold=s}toAnnotation(){return new it(this.textStyle)}}class rt extends P{constructor(t){super(),this.isFlushable=!0,this.bold=t}toAnnotation(){return new q(this.bold)}}class ht extends i{constructor(t){super(),this.type=n.MERGE_TWO_BLOCKS_NODES,this.blockNeedToBeMerged=t}}class ot extends i{constructor(t,...s){super(),this.type=n.INSERT_BLOCKS_BEFORE,this.referBlock=t,this.blocksToBeInserted=s}}class at extends I{constructor(t,s){super(t),this.nodes=[],this.type=s,this.annotationMap=at.isAcceptableTextStyle(s)?new Map([it.from(s)]):new Map([it.from("paragraph")])}static from(t){const s=new at(t.id,t.type),{annotations:e}=t;return s.nodes=t.nodes.map((t=>et.from(t,s))),e&&Object.entries(e).forEach((([t,e])=>{const i=this.createAnnotationEntity(t,e);g(i)&&s.annotationMap.set(...i)})),s}static createAnnotationEntity(t,s){return"textStyle"===t?it.from(s):super.createAnnotationEntity(t,s)}static isAcceptableTextStyle(t){return["title","subtitle","paragraph","heading-1","heading-2","heading-3"].includes(t)}mergeNodes(t){this.nodes=this.nodes.reduce(((s,e)=>{const i=s.at(-1);if(t instanceof $&&t.needMergeNode){const t=null==i?void 0:i.getAnnotationByType(o.LINK),n=e.getAnnotationByType(o.LINK);if(t&&n&&t.toEqual(n))return s}return[...s,e]}),[])}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{type:this.type,nodes:this.nodes.map((t=>t.toJSON()))})}cloneWithNodes(t){const s=new at(x(),this.type);return s.nodes=[],s.apply(new j(t)),s}isNotEmpty(){return this.nodes.length>0&&this.nodes.some((t=>!t.isEmpty()))}getLastNode(){return this.nodes[this.nodes.length-1]}doAnnotationActionApply(t){if(t instanceof nt)return"list-item"!==this.type&&(this.type=t.textStyle),void this.nodes.forEach(t.bold?t=>{const s=new rt(!0);s.doSplit=!1,t.apply(s)}:t=>{t.apply(new st(o.BOLD))});if(t instanceof _){const s=this.getAnnotationByType(l.LINK_GROUP);if(s){const e=s.linkGroups.get(t.groupKey);s.linkGroups.set(t.groupKey,[...e,...t.nodes]),this.annotationMap.set(l.LINK_GROUP,s)}}}doModifyActionApply(t){switch(t.type){case n.DELETE_CHILD:this.removeChildNode(t);break;case n.APPEND_CHILD_NODES:this.appendChildNodes(t.entityToBeAppended);break;case n.CLEAR_CHILD_NODES:this.nodes=[];break;case n.SPLIT_BLOCK_WITH_NODE:t.newBlock=this.splitTextNodeBlock(t.splitPointNode,t.startOffsetOfNode);break;case n.REPLACE_CHILD_NODES:this.nodes=[],this.appendChildNodes(t.newChildNodes);break;case n.MERGE_TWO_BLOCKS_NODES:this.mergeTwoBlocksNodes(t.blockNeedToBeMerged);break;case n.BREAK_SINGLE_BLOCK:t.newBlock=this.breakSingleTextBlock(t.startContainerNode,t.startOffset);break;case n.LINE_BREAK_SINGLE_BLOCK:t.lineBreakNode=this.lineBreakSingleBlock(t.startContainerNode,t.startOffset);break;case n.LINE_BREAK_MULTIPLE_BLOCKS:t.lineBreakNode=this.lineBreakMultipleBlocks(t.selectedBlocks);break;case n.TRANSFORM_LIST_BLOCK:this.convertParagraphToList(t);break;case n.DELETE_BLOCK_CONTENT:this.deleteNodeContent(t);break;case n.INSERT_IMAGE_TO_BLOCK:this.insertImage(t);break;case n.INSERT_NODES_BEFORE:this.replaceNodeWithNodes(t.referNode,[...t.nodesToBeInserted,t.referNode])}}splitTextNodeBlock(t,s){if(t){const e=t.text.slice(0,s),i=t.text.slice(s),n=this.nodes.indexOf(t);if(n>-1){const s=this.nodes.slice(0,n),r=this.nodes.slice(n+1);e&&s.push(t.cloneWithText(e)),i&&r.unshift(t.cloneWithText(i)),this.apply(new J(s));const h=this.cloneWithNodes(r);return this.parent.apply(new T(this,h)),h}}}isCaretPositionAtStart(t,s){return t===this.nodes[0]&&0===s}isCaretPositionAtEnd(t,s){const e=this.nodes[this.nodes.length-1];return t===e&&(t.isEmpty()||s===e.text.length)}lineBreakSingleBlock(t,s){if(t){const e=new et(x(),"\n",this),i=t.text.slice(0,s),n=t.text.slice(s),r=this.nodes.indexOf(t);if(r>-1){const s=this.nodes.slice(0,r),h=this.nodes.slice(r+1);i&&s.push(t.cloneWithText(i)),n&&h.unshift(t.cloneWithText(n)),this.mergeLineBreakNodes(s,e,h)}return e}}lineBreakMultipleBlocks(t){const s=this.nodes,e=new et(x(),"\n",this),i=this.concatBlocksNodes(t.slice(1));return this.mergeLineBreakNodes(s,e,i),e}deleteNodeContent(t){const s=t.startContainerNode,e=t.startOffset;if(0!==e&&!s.isEmpty()){const i=s.text.slice(0,e-1)+s.text.slice(e);if(s.apply(new X(i)),i)return void(t.previousNode=s);{const e=this.getPreviousNode(s);return e&&e.parentBlock===this&&"\n"===e.text||1===this.nodes.length?void(t.previousNode=s):(this.apply(new C(s)),void(t.previousNode=e))}}{let e=this.getPreviousNode(s),i=null;if(this.nodes.length&&e&&e.parentBlock!==this)s.isEmpty()&&this.apply(new C(s)),e.parentBlock.apply(new ht(this));else if(this.isContentFirstNode(s)&&s.isEmpty()&&(i=this.getNextNode(s)),s.isEmpty()&&this.apply(new C(s)),e instanceof et&&e.isEmpty()){const t=e;e=this.getPreviousNode(e),t.parentBlock.apply(new C(t)),e||(i=s)}0===this.nodes.length&&this.parent.apply(new C(this)),e?t.previousNode=e:i&&(t.nextNode=i)}}removeChildNode(t){this.nodes=this.nodes.filter((s=>s!==t.entityToBeRemoved)),0===this.nodes.length&&this.parent.apply(new C(this))}mergeLineBreakNodes(t,s,e){(0===e.length||e[0]&&""===e[0].text)&&e.push(new et(x(),"\n",this,t[t.length-1]&&t[t.length-1].annotationMap)),this.apply(new J([...t,s,...e]))}breakSingleTextBlock(t,s){const e=this.copyInlineStyleToNewParagraph(t);if(this.isCaretPositionAtEnd(t,s))this.parent.apply(new T(this,e));else{if(!this.isCaretPositionAtStart(t,s)){const e=new F(t,s);return this.apply(e),e.newBlock}this.parent.apply(new ot(this,e))}return e}convertParagraphToList(t){const s=this.parent.createList(t.listType),e=t.selectedBlocks.map((t=>this.parent.toListItem(t)));s.apply(new j(e)),this.parent.apply(new T(t.selectedBlocks[0],s)),t.selectedBlocks.forEach((t=>{t.parent.apply(new C(t))}))}insertImage(t){const s=t.splitPointNode,e=t.startOffsetOfNode,i=t.imageBlockToBeInserted;if(this.isCaretPositionAtEnd(s,e))this.parent.apply(new T(this,i));else if(this.isCaretPositionAtStart(s,e))this.parent.apply(new ot(this,i));else{const t=new F(s,e);this.apply(t),this.parent.apply(new T(this,i))}}copyInlineStyleToNewParagraph(t){const s=t.cloneWithText("");s.annotationMap.delete(o.LINK);const e=new at(x(),"paragraph");return e.apply(new j([s])),e}}class ct extends I{constructor(t){super(t),this.type="image",this.nodes=[]}static from(t){const s=new ct(t.id),{annotations:e}=t;return s.nodes=t.nodes.map((t=>E.from(t,s))),e&&Object.entries(e).forEach((([t,e])=>{const i=this.createAnnotationEntity(t,e);g(i)&&s.annotationMap.set(...i)})),s}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{type:"image",nodes:this.nodes.map((t=>t.toJSON()))})}isNotEmpty(){return this.nodes.length>0&&this.nodes.some((t=>t.url.length>0))}getLastNode(){return this.nodes[this.nodes.length-1]}doModifyActionApply(t){switch(t.type){case n.DELETE_CHILD:this.removeChildNode(t);break;case n.CLEAR_CHILD_NODES:this.nodes=[];break;case n.APPEND_CHILD_NODES:this.appendChildNodes(t.entityToBeAppended);break;case n.REPLACE_CHILD_NODES:this.nodes=[],this.appendChildNodes(t.newChildNodes);break;case n.SPLIT_BLOCK_WITH_NODE:t.newBlock=this.splitImageNodes(t.splitPointNode,t.startOffsetOfNode);break;case n.MERGE_TWO_BLOCKS_NODES:this.mergeTwoBlocksNodes(t.blockNeedToBeMerged);break;case n.BREAK_SINGLE_BLOCK:t.newBlock=this.breakSingleBlock(t.startContainerNode,t.startOffset);break;case n.LINE_BREAK_SINGLE_BLOCK:t.lineBreakNode=this.lineBreakSingleBlock(t.startContainerNode,t.startOffset);break;case n.LINE_BREAK_MULTIPLE_BLOCKS:t.lineBreakNode=this.lineBreakMultipleBlocks(t.selectedBlocks);break;case n.DELETE_BLOCK_CONTENT:this.deleteNodeContent(t);break;case n.INSERT_IMAGE_TO_BLOCK:this.insertImage(t);break;case n.INSERT_NODES_AFTER:this.replaceNodeWithNodes(t.referNode,[t.referNode,...t.nodesToBeInserted]);break;case n.INSERT_NODES_BEFORE:this.replaceNodeWithNodes(t.referNode,[...t.nodesToBeInserted,t.referNode])}}removeChildNode(t){this.nodes=this.nodes.filter((s=>s!==t.entityToBeRemoved)),0===this.nodes.length&&this.parent.apply(new C(this))}splitImageNodes(t,s){const e=this.nodes.indexOf(t);if(e>-1){const t=this.nodes.slice(0,e+s),i=this.nodes.slice(e+s);this.apply(new J(t));const n=this.cloneWithNodes(i);return this.parent.apply(new T(this,n)),n}}cloneWithNodes(t){const s=new ct(x());return s.nodes=[],s.apply(new j(t)),s}breakSingleBlock(t,s){const e=at.from({id:x(),type:"paragraph",nodes:[{id:x(),type:"text",text:""}]});if(this.isCaretPositionAtEnd(t,s))this.parent.apply(new T(this,e));else{if(!this.isCaretPositionAtStart(t,s)){const e=new F(t,s);return this.apply(e),e.newBlock}this.parent.apply(new ot(this,e))}return e}lineBreakSingleBlock(t,s){const e=this.breakSingleBlock(t,s);if(e)return e.nodes[0]}isCaretPositionAtStart(t,s){return t===this.nodes[0]&&0===s}isCaretPositionAtEnd(t,s){return t===this.nodes[this.nodes.length-1]&&1===s}lineBreakMultipleBlocks(t){const s=at.from({id:x(),type:"paragraph",nodes:[{id:x(),type:"text",text:"\n"}]});this.parent.apply(new T(this,s));const e=this.concatBlocksNodes(t.slice(1));return(0===e.length||e[0]&&""===e[0].text)&&e.push(new et(x(),"\n",s)),s.apply(new j(e)),s.nodes[0]}deleteNodeContent(t){const s=t.startContainerNode,e=t.startOffset;let i=this.getPreviousNode(s),n=null;if(1===e){const t=s.parentBlock;this.isContentFirstNode(s)&&(n=this.getNextNode(s)),1===t.nodes.length?t.parent.apply(new C(t)):s.parentBlock.apply(new C(s))}else{const e=i;e&&e instanceof E&&(i=this.getPreviousNode(e),e.parentBlock.apply(new C(e)),i||(t.nextNode=s))}i?t.previousNode=i:n&&(t.nextNode=n)}insertImage(t){const s=t.splitPointNode,e=t.startOffsetOfNode,i=t.imageBlockToBeInserted;this.nodes.length<1?this.apply(new j(t.imageBlockToBeInserted.nodes)):this.isCaretPositionAtEnd(s,e)?this.parent.apply(new T(this,i)):this.isCaretPositionAtStart(s,e)?this.parent.apply(new ot(this,i)):(this.apply(new F(s,e)),this.parent.apply(new T(this,i)))}}class ut extends at{constructor(t,s){super(t,"list-item"),this.children=[],this.children=s}static from(t){const s=new ut(t.id);s.nodes=t.nodes.map((t=>et.from(t,s))),t.children&&(s.children=t.children.map((t=>{const e=dt.from(t);return e.parent=s,e})));const{annotations:e}=t;return e&&Object.entries(e).forEach((([t,e])=>{const i=this.createAnnotationEntity(t,e);g(i)&&s.annotationMap.set(...i)})),s}toJSON(){var t;return Object.assign(Object.assign({},super.toJSON()),{type:"list-item",children:null===(t=this.children)||void 0===t?void 0:t.map((t=>t.toJSON()))})}cloneWithNodes(t){const s=new ut(x());return s.nodes=[],s.apply(new j(t)),s}isNotEmpty(){return this.children?super.isNotEmpty()||this.children.some((t=>t.isNotEmpty())):super.isNotEmpty()}getLastNode(){return this.children&&this.children.length>0?this.children[this.children.length-1].getLastNode():super.getLastNode()}doModifyActionApply(t){switch(t.type){case n.DELETE_CHILD:this.removeListChildNode(t);break;case n.DELETE_NEST_LIST:this.removeNestList(t);break;case n.APPEND_CHILD_NODES:this.appendChildNodes(t.entityToBeAppended);break;case n.CLEAR_CHILD_NODES:this.nodes=[];break;case n.SPLIT_BLOCK_WITH_NODE:this.splitListItemBlock(t);break;case n.REPLACE_CHILD_NODES:this.nodes=[],this.appendChildNodes(t.newChildNodes);break;case n.REPLACE_NEST_LIST:this.replaceNestList(t.newList);break;case n.MERGE_TWO_BLOCKS_NODES:this.mergeTwoBlocksNodes(t.blockNeedToBeMerged);break;case n.BREAK_SINGLE_BLOCK:t.newBlock=this.breakSingleListItemBlock(t.startContainerNode,t.startOffset);break;case n.LINE_BREAK_SINGLE_BLOCK:t.lineBreakNode=this.lineBreakSingleBlock(t.startContainerNode,t.startOffset);break;case n.LINE_BREAK_MULTIPLE_BLOCKS:t.lineBreakNode=this.lineBreakMultipleBlocks(t.selectedBlocks);break;case n.DELETE_BLOCK_CONTENT:this.deleteListNodeContent(t);break;case n.INSERT_IMAGE_TO_BLOCK:this.parent.apply(t);break;case n.INSERT_NODES_BEFORE:this.replaceNodeWithNodes(t.referNode,[...t.nodesToBeInserted,t.referNode])}}removeListChildNode(t){this.nodes=this.nodes.filter((s=>s!==t.entityToBeRemoved)),0!==this.nodes.length||this.children&&this.children.length||this.parent.apply(new C(this))}removeNestList(t){this.children&&(this.children=this.children.length>1?this.children.filter((s=>s!==t.nestListBlockToBeRemoved)):void 0)}replaceNestList(t){t.forEach((t=>{t.parent=this})),this.children=t}splitListItemBlock(t){t.newBlock=this.splitTextNodeBlock(t.splitPointNode,t.startOffsetOfNode)}breakSingleListItemBlock(t,s){const e=new ut(x()),i=this.copyInlineStyleToNewNode(t);if(e.apply(new j([i])),this.isCaretPositionAtEnd(t,s))return this.breakListItemAtEnd(e);if(!this.isCaretPositionAtStart(t,s)){const e=new F(t,s);return this.apply(e),e.newBlock}return this.parent.apply(new ot(this,e)),e}breakListItemAtEnd(t){const s=this.parent.blocks[this.parent.blocks.length-1],e=1===this.nodes.length&&this.nodes[0].isEmpty();if(this===s&&e){const s=this.parent.parent;if("list-item"!==s.type){const e=at.from({id:x(),type:"paragraph",nodes:[]});return e.apply(new j(t.nodes)),s.apply(new T(this.parent,e)),this.parent.apply(new C(this)),e}s.parent.apply(new T(s,t)),this.parent.apply(new C(this))}else this.parent.apply(new T(this,t));return t}deleteListNodeContent(t){const s=t.startContainerNode.parentBlock.parent;this.deleteNodeContent(t),0===s.blocks.length&&s.parent.apply(new C(s))}copyInlineStyleToNewNode(t){const s=t.cloneWithText("");return s.annotationMap.delete(o.LINK),s}}class lt extends i{constructor(t){super(),this.type=n.DELETE_NEST_LIST,this.nestListBlockToBeRemoved=t}}class dt extends I{constructor(t,s){super(t),this.type="bullet-list",this.blocks=[],this.type=s}static from(t){const s=new dt(t.id,t.type);return s.blocks=t.blocks.map((t=>{const e=ut.from(t);return e.parent=s,e})),s}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{id:this.id,type:this.type,blocks:this.blocks.map((t=>t.toJSON()))})}isNotEmpty(){return this.blocks.length>0&&this.blocks.some((t=>t.isNotEmpty()))}getLastNode(){return this.blocks[this.blocks.length-1].getLastNode()}doModifyActionApply(t){switch(t.type){case n.DELETE_CHILD:this.removeListItemBlock(t.entityToBeRemoved);break;case n.INSERT_BLOCKS_AFTER:this.replaceBlockWithBlocks(t.referBlock,[t.referBlock,...t.blocksToBeInserted]);break;case n.INSERT_BLOCKS_BEFORE:this.replaceBlockWithBlocks(t.referBlock,[...t.blocksToBeInserted,t.referBlock]);break;case n.APPEND_CHILD_NODES:this.appendChildBlocks(t.entityToBeAppended);break;case n.TRANSFORM_LIST_BLOCK:this.convertToList(t);break;case n.TRANSFORM_PARAGRAPH_BLOCK:this.convertToParagraph(t);break;case n.INSERT_IMAGE_TO_BLOCK:this.insertImage(t)}}toParagraph(t){const s=new at(x(),"paragraph");return s.apply(new j(t.nodes)),s.annotationMap=t.annotationMap,s}convertToList(t){const s=t.selectedBlocks,e=this.parent.createList(t.listType);if(s.every((t=>t.parent===this)))e.apply(new j(this.blocks)),this.parent.apply(new T(this,e)),this.parent.apply(new C(this)),s.forEach((t=>t.nodes.map((t=>t.apply(new tt)))));else{const s=t.selectedBlocks.map((t=>this.parent.toListItem(t)));e.apply(new j(s)),this.parent.apply(new T(this,e)),t.selectedBlocks.forEach((t=>{t.parent.apply(new C(t))})),0===this.blocks.length&&this.parent.apply(new C(this))}}convertToParagraph(t){let s=!1,e=!1;const i=t.selectedBlocks,n=i.map((t=>(t.nodes.map((t=>t.apply(new tt))),t===this.blocks[0]&&(s=!0),t===this.blocks[this.blocks.length-1]&&(e=!0),this.toParagraph(t))));if(s)this.parent.apply(new ot(this,...n));else if(e)this.parent.apply(new T(this,...n));else{const t=this.blocks.indexOf(i[0]),s=this.blocks.indexOf(i[i.length-1]),e=this.parent.createList(this.type);e.apply(new j(this.blocks.slice(0,t)));const r=this.parent.createList(this.type);r.apply(new j(this.blocks.slice(s+1))),this.parent.apply(new ot(this,e,...n,r)),this.parent.apply(new C(this))}i.map((t=>{this.apply(new C(t))})),0===this.blocks.length&&this.parent.apply(new C(this))}insertImage(t){this.parent.apply("list-item"!==this.parent.type?new T(this,t.imageBlockToBeInserted):t)}removeListItemBlock(t){super.removeChildBlock(t),0===this.blocks.length&&this.parent&&this.parent.apply(this.parent instanceof ut?new lt(this):new C(this))}}export{j as A,B,Q as C,O as H,L as I,$ as L,ht as M,dt as R,tt as S,P as T,D as U,M as Z,ct as a,at as b,ut as c,N as d,V as e,v as f,et as g,W as h,rt as i,K as j,nt as k,it as l,q as m,G as n,H as o,z as p,S as q,E as r,X as s,C as t,ot as u,F as v,y as w,J as x,T as y}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,c as s,h as i,H as e,g as a}from"./p-1c298d5a.js";import{F as r}from"./p-b57792b7.js";import{C as h}from"./p-2d0d575f.js";import{v as o,w as n,x as m,O as d,d as c}from"./p-6a3989dd.js";import{g as l,b as p,d as f,c as u,e as v,F as b,a as g}from"./p-d057999f.js";import{d as j}from"./p-b0502d01.js";import{s as w}from"./p-9b797118.js";import{f as F,c as y,i as V}from"./p-79ec5d69.js";import{I as E}from"./p-bf8c1fe3.js";import{I as C}from"./p-6e1ab235.js";import{V as O,I as R}from"./p-4387d550.js";import{c as I}from"./p-e8f540d8.js";import{C as P}from"./p-be12fa36.js";import{C as S}from"./p-72eee5e2.js";import{d as M}from"./p-f357cf46.js";import"./p-0bb29d98.js";import"./p-33b62194.js";import"./p-6a334573.js";import"./p-de664bdd.js";import"./p-5f589974.js";import"./p-4bcd6612.js";import"./p-74168615.js";import"./p-ed45b3b6.js";import"./p-29b09aad.js";import"./p-987fbbd0.js";import"./p-a9354a5c.js";import"./p-262ec334.js";import"./p-0af4bda9.js";import"./p-5f377954.js";import"./p-ff4bafa3.js";import"./p-7a40e033.js";import"./p-112455b1.js";var A=function(t,s,i,e){var a,r=arguments.length,h=r<3?s:null===e?e=Object.getOwnPropertyDescriptor(s,i):e;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)h=Reflect.decorate(t,s,i,e);else for(var o=t.length-1;o>=0;o--)(a=t[o])&&(h=(r<3?a(h):r>3?a(s,i,h):a(s,i))||h);return r>3&&h&&Object.defineProperty(s,i,h),h};const D=class{constructor(i){t(this,i),this.vegaValidate=s(this,"vegaValidate",7),this.validate=s(this,"validate",7),this.vegaFormSubmit=s(this,"vegaFormSubmit",7),this.formSubmit=s(this,"formSubmit",7),this.vegaFormReset=s(this,"vegaFormReset",7),this.formReset=s(this,"formReset",7),this.globalSlimmers={},this.submitEventEmitter=I(D,o),this.resetEventEmitter=I(D,n),this.validateEventEmitter=I(D,m),this.childEventPrevent=new P([o,n],(()=>this.host.querySelector("vega-form")),{customPreventHandle:t=>{t.stopPropagation()}}),this.childFormValidateEventPrevent=new P([m],(()=>this.host),{customPreventHandle:t=>{t.stopPropagation()}}),this.childNotifyObserver=new S(l,(t=>this.updateInternalValidStatus(t))),this.childNodeValueChangeObserver=new S(p,(()=>this.updateInternalTouchedStatus())),this.vegaComponentUsageRuntimeMetricsSlimmer=new O,this.invalidFieldPathMap=new E(new Map,(t=>{this.invalidFieldPathMap=t,this.updateIsValidFlag()})),this.pendingValidFieldPathMap=new E(new Map,(t=>{this.pendingValidFieldPathMap=t,this.updateIsValidFlag()})),this.controlledFieldPathSet=new Set,this.isValid=null,this.isTouched=!1,this.updateInternalValidStatus=t=>{if(t.host!==this.host){const s=t.host,i=t.detail;r.isValidFormField(s)&&this.shouldVisitElement(s,!1,!1)&&(i?this.invalidFieldPathMap.delete(s):this.invalidFieldPathMap.set(s,s.dataset.vegaForm))}}}watchIsValid(){this.validateEventEmitter.emit(this.isValid),h.notify(l,{host:this.host,detail:this.isValid})}async disconnectedCallback(){h.notify(f,{host:this.host}),h.unregister(f,this.formFieldDisconnectedObserver),h.unregister(u,this.formFieldPendingValidObserver)}async componentDidLoad(){await this.navigateVegaFormChildren((async(t,s)=>{s||this.controlledFieldPathSet.add(this.getFormFieldName(t,!0))})),this.initFormFieldDisconnectedObserver(),this.registerFormSubmitChangeManager(),this.registerFormResetChangeManager(),this.registerFormFieldPendingValidChangeManager()}async valid(t=!0){const s={isValid:!0,invalidFields:[]};return await this.navigateVegaFormChildren((async(i,e)=>{if("function"==typeof i.valid&&e){const e=await i.valid(t);e.isValid||(s.isValid=!1,s.invalidFields.push(...e.invalidFields),s.invalidFieldsErrorMessages=Object.assign(Object.assign({},s.invalidFieldsErrorMessages),e.invalidFieldsErrorMessages))}else{const{isValid:e,message:a}=await this.handleChildFormFieldElementValid(i,t);e||(s.isValid=!1,s.invalidFields.push(this.getFormFieldName(i)),s.invalidFieldsErrorMessages||(s.invalidFieldsErrorMessages={}),s.invalidFieldsErrorMessages[this.getFormFieldName(i)]=a)}})),s}async getValue(t){const s={};return await this.navigateVegaFormChildren((async(i,e)=>{const a=this.getFormFieldName(i);s[a]=e?await i.getValue(t):D.getFormFieldValue(i)}),t),j(s)?Object.values(s):s}async setValue(t,s){t&&(await this.navigateVegaFormChildren((async(i,e)=>{const a=this.getFormFieldName(i);e?await i.setValue(t[a],s):(await i.componentOnReady(),void 0!==t[a]&&("function"==typeof i.setValue?await i.setValue(t[a]):i.value=t[a]))}),s),this.isTouched=!1)}async reset(t={},s){await this.navigateVegaFormChildren((async(i,e)=>{const a=this.getFormFieldName(i);e&&await i.reset(t[a]||{},s)}),s),h.notify(v,{host:this.host,defaultValueMap:t,option:s}),this.isTouched=!1}static getFormFieldValue(t){return void 0===t.value?t.getAttribute("value"):t.value}render(){return w(i(e,null,i("slot",null)),this.host)}updateInternalTouchedStatus(){this.isTouched=!0}async navigateVegaFormChildren(t,s,i=this.host){const e=[];Array.from(i.children).forEach((i=>{r.isValidFormField(i)?this.shouldVisitElement(i,null==s?void 0:s.skipDisabled,null==s?void 0:s.skipInvisible)&&e.push(t(i,"VEGA-FORM"===i.tagName)):e.push(this.navigateVegaFormChildren(t,s,i))})),await Promise.all(e)}updateIsValidFlag(){this.isValid=this.pendingValidFieldPathMap.size>0?null:0===this.invalidFieldPathMap.size}getFormFieldName(t,s){let i=t.dataset.vegaForm;if(s){let s=F(t,"vega-form");for(;s&&s!==this.host;)i=s.dataset.vegaForm+" -> "+i,s=F(s,"vega-form")}return i}shouldVisitElement(t,s,i){return this.getFormFieldName(t)&&(!s||!t.disabled)&&(!i||y(t))}initFormFieldDisconnectedObserver(){this.formFieldDisconnectedObserver=new d(this.canAcceptFormFieldDisconnectedOperation.bind(this),this.updateInvalidFieldPath.bind(this)),h.register(f,this.formFieldDisconnectedObserver)}canAcceptFormFieldDisconnectedOperation(t){return this.invalidFieldPathMap.has(t.host)}async updateInvalidFieldPath(t){this.invalidFieldPathMap.delete(t.host),this.pendingValidFieldPathMap.delete(t.host)}registerFormSubmitChangeManager(){this.formEventsObserver=new d(this.canAcceptFormSubmitEvent.bind(this),this.handleSubmitEvents.bind(this)),h.register(b,this.formEventsObserver)}canAcceptFormSubmitEvent(t){return this.isElementInCurrentForm(t.host)}async handleSubmitEvents(){if((await this.valid()).isValid){const t=await this.getValue();this.submitEventEmitter.emit(t)}}registerFormResetChangeManager(){this.formEventsObserver=new d(this.canAcceptFormResetEvent.bind(this),this.handleResetEvents.bind(this)),h.register(g,this.formEventsObserver)}canAcceptFormResetEvent(t){return this.isElementInCurrentForm(t.host)}async handleResetEvents(){await this.reset(),this.resetEventEmitter.emit()}registerFormFieldPendingValidChangeManager(){this.formFieldPendingValidObserver=new d(this.canAcceptFormFieldPendingValid.bind(this),this.handleFieldPendingValid.bind(this)),h.register(u,this.formFieldPendingValidObserver)}canAcceptFormFieldPendingValid(t){return this.isElementInCurrentForm(t.host)}handleFieldPendingValid(t){"boolean"==typeof t.detail?this.pendingValidFieldPathMap.delete(t.host):this.pendingValidFieldPathMap.set(t.host,t.host.dataset.vegaForm)}isElementInCurrentForm(t){return this.invalidFieldPathMap.has(t)||V(t,this.host)}async handleChildFormFieldElementValid(t,s){const i=c.getSubject(t,M),{isValid:e,message:a}=await new Promise((e=>{const a=setTimeout((()=>{e({isValid:!0,message:""})}),2e3);h.notify(i,{host:t,message:s,promiseResolve:e,timerId:a})}));return{isValid:e,message:a}}get host(){return a(this)}static get watchers(){return{isValid:["watchIsValid"]}}};A([R()],D.prototype,"globalSlimmers",void 0),A([C()],D.prototype,"submitEventEmitter",void 0),A([C()],D.prototype,"resetEventEmitter",void 0),A([C()],D.prototype,"validateEventEmitter",void 0),A([C()],D.prototype,"childEventPrevent",void 0),A([C()],D.prototype,"childFormValidateEventPrevent",void 0),A([C()],D.prototype,"childNotifyObserver",void 0),A([C()],D.prototype,"childNodeValueChangeObserver",void 0),A([C()],D.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),D.style=":host{display:block}";export{D as vega_form}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{L as e}from"./p-
|
|
1
|
+
import{L as e}from"./p-6e1ab235.js";import t from"./p-7a40e033.js";const r=Object.freeze({"VEGA_DATE_PICKER.COMPONENT_LOAD_REQUIRED_DECORATOR":{description:"Feature flag to enable the required decorator for the date picker component. <br/> <b>Note: This feature flag is for demonstration purpose and will be persisted permanently.</b>",createdTimestamp:1660330561422,createdAtVersion:"1.2.0",removedAfterVersion:"1.11.1"},"VEGA_COMPONENT.SANITIZE_VEGA_COMPONENT":{description:"Feature flag to enable sanitize vega components.",createdTimestamp:1664262689486,createdAtVersion:"1.8.1",removedAfterVersion:"2.0.0"},"VEGA_TEXT.LABEL_OR_CONTENT_NESTED_VEGA_TEXT_COMPONENT":{description:"Feature flag to enable the label or content of other component nested vega-text component.",createdTimestamp:1665218525140,createdAtVersion:"1.8.1",removedAfterVersion:"1.9.1"},"VEGA_FLEX.ENABLE_DIRECTION_ONLY":{description:"Feature flag to make direction take effect only regardless of breakpoint for vega-flex component.",createdTimestamp:1665639912117,createdAtVersion:"1.9.0"},"VEGA_FIELD_LABEL.SHOW_LABEL":{description:"Feature flag to enable the vega-field-label component for vega-input, vega-input-select and vega-date-picker.",createdTimestamp:1666184962131,createdAtVersion:"1.9.0",removedAfterVersion:"2.0.0"},"VEGA_FLEX.USE_NATIVE_FLEX_BEHAVIOR":{description:"Feature flag to enable the **default** use of native flex behavior for vega-flex component.",createdTimestamp:1668059639449,createdAtVersion:"1.11.1",removedAfterVersion:"2.0.0"},"VEGA_TABLE.DEPRECATED_ROW_SELECTION_CHANGE_PROP":{description:"Feature flag to deprecate the rowSelection.onSelectChange and rowSelection.onSelectAllChange",createdTimestamp:1673321949321,createdAtVersion:"1.18.0",removedAfterVersion:"2.0.0"},"VEGA_ICON.USE_SIZE_PROP_FOR_THIRD_PARTY_ICONS":{description:"Feature flag to make size prop of vega-icon to take effect for third party icons.",createdTimestamp:1675752744795,createdAtVersion:"1.20.0",removedAfterVersion:"2.0.0"},"VEGA_INJECT_FORM_FIELD_CONTROLLER.ADD_DATA_VEGA_FORM_FILTER":{description:"Feature flag to deprecate the form field should validate only have data-vega-from attribute",createdTimestamp:1676017004107,createdAtVersion:"1.19.0",removedAfterVersion:"2.0.0"},"VEGA_FORM_FIELD.CHANGE_BLOCK_TO_INLINE_BLOCK":{description:"Feature flag to deprecate the form fields like input/datePicker/timePicker should use inline block",createdTimestamp:1676512727310,createdAtVersion:"1.20.0",removedAfterVersion:"2.0.0"},"VEGA_CHECKBOX_RADIO_GROUP.FLEX_DIRECTION_COL_DEFAULT":{description:"Feature flag to make the checkbox group and radio group prop vegaFlexProp default direction to col",createdTimestamp:16811712e5,createdAtVersion:"1.27.3",removedAfterVersion:"2.0.0"},"VEGA_REACT.PREVENT_SSR":{description:"Feature flag to prevent the SSR in vega-react",createdTimestamp:1679450185124,createdAtVersion:"1.25.0",disabledByDefault:!0},"VEGA_STEPPER.INPUT_DISABLED":{description:"Feature flag to rename the prop input-editable to input-disabled ",createdTimestamp:1683252081350,createdAtVersion:"1.30.0",removedAfterVersion:"2.0.0"},"VEGA_FLEX.ALIGNITEM_JUSTIFYCONTENT_USE_PREFIX_V_INSTEAD_OF_VEGA":{description:"Feature flag to render vega-flex prop alignItems and justifyContent classes by using v- instead of vega-",createdTimestamp:1684128467390,createdAtVersion:"1.32.0",removedAfterVersion:"1.48.3"},"VEGA_ANGULAR.USE_JUGGLE_RESIZE_OBSERVER":{description:"Feature flag to enable the @juggle/resizeObserver to instead window resizeObserver",createdTimestamp:1684203399089,createdAtVersion:"1.31.0"},"VEGA_INPUT.FOCUS_ON_INPUT_BY_CLICK_CLEAR_BUTTON":{description:"Feature flag to keep the input focused whenever click the clear button",createdTimestamp:1685513925082,createdAtVersion:"1.34.0",removedAfterVersion:"1.38.2"},"VEGA_VUE.EMIT_CAMEL_CASE_EVENT_NAME":{description:"Feature flag to emit camel case event name for Vue framework",createdTimestamp:1688971026741,createdAtVersion:"1.37.0"},VEGA_ITEM_TOGGLE_ISERROR_DEPRECATED:{description:"Feature flag to deprecated the component vega-item-toggle property isError",createdTimestamp:1687934508330,createdAtVersion:"1.36.0",removedAfterVersion:"2.0.0"},"VEGA_BUTTON_LINK.DEPRECATED_EVENTFUL":{description:"Feature flag to deprecated eventful property",createdTimestamp:1689313658898,createdAtVersion:"1.36.1",removedAfterVersion:"2.0.0"},"VEGA_DROPDOWN.RENAME_PREFIX_TO_PREFIX_ICON":{description:"Feature flag to rename prefix to prefixIcon",createdTimestamp:1689576347049,createdAtVersion:"1.37.0",removedAfterVersion:"2.0.0"},"VEGA_REACT.PREVENT_CALL_WATCH_METHOD_BEFORE_COMPONENT_LOAD":{description:"Feature flag to prevent call watch method before componnentDidLoad",createdTimestamp:1706598728908,createdAtVersion:"2.0.0"},"VEGA_FRAMEWORK.PREVENT_CALL_WATCH_METHOD_BEFORE_COMPONENT_LOAD":{description:"Feature flag to prevent call watch method before componnentDidLoad in all framework",createdTimestamp:1708495728180,createdAtVersion:"2.0.0"},"VEGA_REACT.ENABLE_ON_CHANGE_HANDLE_UNDER_LOW_VERSION":{description:"Feature flag to enable the onChange event handle under react version 19 or below",createdTimestamp:1709603823660,createdAtVersion:"2.0.0"},"VEGA_INPUT_CREDIT_CARD.ENABLE_HIDE_NUMBER_MASK_ON_FIRST_LOAD":{description:"Feature flag to enable the hide card number mask upon initial loading of the credit card.",createdTimestamp:1715932781059,createdAtVersion:"2.9.0"},"VEGA_TABLE.ENABLE_NEW_CELL_BREAK_WORDS_STYLE":{description:"Feature flag to enable the new cell words break style",createdTimestamp:1719282763075,createdAtVersion:"2.11.2"},"VEGA_TELEMETRY.ENABLE_COLLECT_COMPONENTS_USAGE":{description:"Feature flag to enable the collection of component usage.",createdTimestamp:1717468723384,createdAtVersion:"2.11.3"},"VEGA_TELEMETRY.ENABLE_COLLECT_FEATURE_FLAG_OVERRIDDEN":{description:"Feature flag to enable the feature flag overridden.",createdTimestamp:1717468723384,createdAtVersion:"2.11.3"},"VEGA_REACT.ENABLE_ON_CLOSE_HANDLE_UNDER_LOW_VERSION":{description:"Feature flag to enable the onClose event handle under react version 19 or below",createdTimestamp:1719910557333,createdAtVersion:"2.12.0"},VEGA_BANNER_DEPRECATED_ACTION_BUTTON_PROP_VEGA_CLICK:{description:"Feature flag to deprecated the vega-banner component property actionButtons property vegaClick",createdTimestamp:1723449433833,createdAtVersion:"2.18.0"},"VEGA_REACT.SKIP_NATIVE_EVENT_PREVENT_BY_DEFAULT":{description:"Feature flag to skip the native event prevent logic in default",createdTimestamp:17239968e5,createdAtVersion:"2.18.1",disabledByDefault:!0},"VEGA_TELEMETRY.ENABLE_COLLECT_PUBLIC_API":{description:"Feature flag to enable the collection of public api.",createdTimestamp:1727232497961,createdAtVersion:"2.21.0"},"VEGA_LEFT_NAV.DISABLE_ANIMATION_ON_LOAD":{description:"Feature flag that disables the transition animation of the left nav.",createdTimestamp:1730361348399,createdAtVersion:"2.26.0"},"VEGA_DATE_PICKER.ENABLE_CALCULATION_POSITION_BY_SCREEN":{description:"Feature flag that enable use screen to calculation position.",createdTimestamp:1733293586535,createdAtVersion:"2.29.0"},"VEGA_TABLE.REVERSE_SORT_ORDER":{description:"Feature flag that reverses table column sorting order from default>asc>desc to default>desc>asc",createdTimestamp:1737521148363,createdAtVersion:"2.32.0",disabledByDefault:!1}}),a=new class{constructor(){this.enabledFeatureFlagKeySet=new Set,this.init()}enable(...e){e.forEach((e=>{this.versionGuard(e)&&(this.enabledFeatureFlagKeySet.add(e),this.sendFeatureFlagKeyToTelemetry(e,!0))}))}disable(...e){e.forEach((e=>{this.versionGuard(e)&&(this.enabledFeatureFlagKeySet.delete(e),this.sendFeatureFlagKeyToTelemetry(e,!1))}))}isEnabled(e){return this.enabledFeatureFlagKeySet.has(e)}init(){Object.keys(r).map((e=>{r[e].disabledByDefault||this.isRemoved(e)||this.enabledFeatureFlagKeySet.add(e)}))}versionGuard(t){return!this.isRemoved(t)||(e.error(`The feature flag key '${t}' has been removed after v${r[t].removedAfterVersion}`),!1)}isRemoved(e){return!!r[e].removedAfterVersion}sendFeatureFlagKeyToTelemetry(e,r){this.canSendFeatureFlagsToTelemetry(e,r)&&t.emit("featureFlagOverridden",{featureFlagName:e,featureFlagOverriddenValue:r})}canSendFeatureFlagsToTelemetry(e,t){return!!r[e].disabledByDefault===t}};export{a as F}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{h as t,r as e,c as i,H as a,g as n}from"./p-1c298d5a.js";import{s}from"./p-9b797118.js";import{n as o,c as r}from"./p-262ec334.js";import{D as g}from"./p-29b09aad.js";import{v as p,A as h,f as l,a as m,K as c}from"./p-6a3989dd.js";import{a as f}from"./p-79ec5d69.js";import{C as d}from"./p-be12fa36.js";import{c as v}from"./p-e8f540d8.js";import{I as u}from"./p-6e1ab235.js";import{V as x,I as w}from"./p-4387d550.js";import{T as b}from"./p-b688a71b.js";import"./p-2d0d575f.js";import"./p-0af4bda9.js";import"./p-5f377954.js";import"./p-ff4bafa3.js";import"./p-7a40e033.js";import"./p-112455b1.js";import"./p-6a334573.js";import"./p-de664bdd.js";import"./p-d057999f.js";import"./p-33b62194.js";const y=({pageSize:e,current:i,total:a,translationSlimmer:n})=>{const s=a>0?e*(i-1)+1:0,o=Math.min(i*e,a);return t("vega-field-label",{label:n.t("Viewing {0}-{1} of {2}",s,o,a)})},z=({onChange:e,pageCount:i,translationSlimmer:a})=>{let n;const s=()=>{if(n.value){const t=o(r(n.value,1),1,i);e(t),n.value=""}},l=t=>{t.stopPropagation()};return t("vega-flex",{alignItems:"center",justifyContent:"center",gap:"size-8"},t("vega-field-label",{label:a.t("Go To")}),t("vega-form",{ref:t=>{g.addUniqueObserverToNode(t,p,s)}},t("vega-input",{"data-vega-form":"paginationGoTo",type:"number",size:"small",showClearIcon:!1,style:{width:"60px"},maskConfig:{type:"number",options:{allowNegative:!1,precision:0}},onVegaChange:l,onChange:l,ref:t=>{n=t,g.addUniqueObserverToNode(t,h,s)}})))},S=({pageSize:e,pageSizeSelectorOptions:i,onChange:a,translationSlimmer:n})=>{const s=i.sort(((t,e)=>t-e)),o=t=>{const e=Number(t.detail);a(e)};return t("vega-flex",{alignItems:"center",justifyContent:"center",gap:"size-8"},t("vega-field-label",{label:n.t("Show")}),t("div",null,t("vega-input-select",{size:"small",source:s.map((t=>({id:t.toString(),displayName:t.toString()}))),value:e.toString(),placeholder:"Page Size",vegaDropdownProps:{matchTargetWidth:!1,searchable:!1},ref:t=>{g.addUniqueObserverToNode(t,l,o)}})))},C=({total:e,current:i,onChange:a,pageCount:n})=>{const s=e=>{const n=i!==e;return t("li",{key:e,class:f(["vega-pagination-item",i===e?"active":""])},t("button",{onClick:()=>n&&a(e)},e))},o=(e,i,a)=>t("li",{class:f(["vega-pagination-button",i&&"disabled"])},t("vega-button-circle",{variant:"icon-only",icon:e,iconColor:"text-link",size:"small",disabled:i,ref:t=>{g.addUniqueObserverToNode(t,m,a)}}));return t("ul",{class:"vega-pagination"},o("chevron-left",0===e||1===i,(()=>{a(i-1)})),0===e?[s(1)]:((t,e,i=7)=>{if(i<7)throw new Error("Must allow at least 7 pager items");if(i%2==0)throw new Error("Must allow odd number of pager items");if(e<i)return Array(e).fill(0).map(((t,e)=>e+1));const a=Math.max(1,Math.min(e-i+1,t-Math.floor(i/2))),n=new Array(i);for(let t=0;t<i;t+=1)n[t]=t+a;return Number(n[0])>1&&(n[0]=1,n[1]="..."),Number(n[n.length-1])<=e-1&&(n[n.length-1]=e,n[n.length-2]="..."),n})(i,n).map((e=>"string"==typeof e?t("li",{class:"vega-pagination-item pager-ellipsis"},"..."):s(e))),o("chevron-right",0===e||i===n,(()=>{a(i+1)})))};var j=function(t,e,i,a){var n,s=arguments.length,o=s<3?e:null===a?a=Object.getOwnPropertyDescriptor(e,i):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,i,a);else for(var r=t.length-1;r>=0;r--)(n=t[r])&&(o=(s<3?n(o):s>3?n(e,i,o):n(e,i))||o);return s>3&&o&&Object.defineProperty(e,i,o),o};const I=class{constructor(a){e(this,a),this.vegaChange=i(this,"vegaChange",7),this.change=i(this,"change",7),this.vegaPageSizeChange=i(this,"vegaPageSizeChange",7),this.pageSizeChange=i(this,"pageSizeChange",7),this.globalSlimmers={},this.translationSlimmer=new b,this.childEventPrevent=new d([p],(()=>this.host)),this.childValueChangePrevent=new d([l],(()=>this.host),!0),this.vegaChangeEventEmitter=v(I,l),this.vegaPageSizeChangeEventEmitter=v(I,c),this.vegaComponentUsageRuntimeMetricsSlimmer=new x,this.vegaPaginationItemTypes=["currentPageLabel","pageSizeSelector","pageSelector","goTo"],this.pageCount=0,this.current=1,this.total=0,this.pageSize=10,this.extensions=[["pageSelector"]],this.pageSizeSelectorOptions=[10,20,50,100],this.renderPaginationItemsWrapper=e=>t("vega-flex",{gap:"size-24",alignItems:"center",key:this.generateWrapperKey(e)},e.map((e=>t("div",{key:e},this.renderPaginationItem(e))))),this.renderPaginationItem=e=>{switch(e){case"currentPageLabel":return t(y,{total:this.total,current:this.current,pageSize:this.pageSize,translationSlimmer:this.translationSlimmer});case"pageSizeSelector":{const e=this.pageSizeSelectorOptions.includes(this.pageSize)?this.pageSizeSelectorOptions:[...this.pageSizeSelectorOptions,this.pageSize];return t(S,{pageSize:this.pageSize,pageSizeSelectorOptions:e,onChange:this.onPageSizeSelectorChange,translationSlimmer:this.translationSlimmer})}case"pageSelector":return t(C,{current:this.current,total:this.total,onChange:this.onPageSelectorChange,pageCount:this.pageCount});case"goTo":return t(z,{onChange:this.handlePaginationGoToChange,pageCount:this.pageCount,translationSlimmer:this.translationSlimmer})}},this.handlePaginationGoToChange=t=>{this.current=t},this.onPageSizeSelectorChange=t=>{this.pageSize=t},this.calculatePages=()=>this.total?Math.floor((this.total-1)/this.pageSize)+1:0,this.onPageSelectorChange=t=>{this.current=t},this.removeDuplicateItems=t=>{const e=[...this.vegaPaginationItemTypes];return[...t].map((t=>t.filter(((i,a)=>{const n=e.indexOf(i);return n>=0?(e.splice(n,1),!0):(t.splice(a,1),!1)})))).filter((t=>t.length>0))},this.generateWrapperKey=t=>t.map(String).reduce(((t,e)=>`${t}-${e}`)),this.currentValueGuard=()=>{0===this.pageCount?this.current=1:this.current>this.pageCount&&(this.current=this.pageCount)}}watchPageCount(){this.currentValueGuard()}watchCurrent(){this.currentValueGuard(),this.vegaChangeEventEmitter.emit(this.current)}watchTotal(){this.pageCount=this.calculatePages()}watchPageSize(){this.vegaPageSizeChangeEventEmitter.emit(this.pageSize),this.pageCount=this.calculatePages()}componentWillLoad(){this.pageCount=this.calculatePages(),this.currentValueGuard(),this.pageSizeSelectorOptions.includes(this.pageSize)||(this.pageSizeSelectorOptions=[...this.pageSizeSelectorOptions,this.pageSize])}render(){return s(t(a,null,this.removeDuplicateItems(this.extensions).map(this.renderPaginationItemsWrapper)),this.host)}get host(){return n(this)}static get watchers(){return{pageCount:["watchPageCount"],current:["watchCurrent"],total:["watchTotal"],pageSize:["watchPageSize"]}}};j([w()],I.prototype,"globalSlimmers",void 0),j([u()],I.prototype,"translationSlimmer",void 0),j([u()],I.prototype,"childEventPrevent",void 0),j([u()],I.prototype,"childValueChangePrevent",void 0),j([u()],I.prototype,"vegaChangeEventEmitter",void 0),j([u()],I.prototype,"vegaPageSizeChangeEventEmitter",void 0),j([u()],I.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),I.style=':host{display:flex;align-items:center;justify-content:space-between;gap:20px;line-height:normal}.vega-pagination{display:flex;padding:0px;margin:0px}.vega-pagination .vega-pagination-item{list-style-type:none;display:inline-flex;align-items:center;justify-content:center;min-width:32px;height:32px;font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;color:rgba(var(--v-text-link, 19, 98, 226, 1));cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}@media screen and (min-width: 768px) and (max-width: 1023px){.vega-pagination .vega-pagination-item{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.vega-pagination .vega-pagination-item{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.vega-pagination .vega-pagination-item{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px}}.vega-pagination .vega-pagination-item button{background-color:rgba(var(--v-bg-transparent, 0, 0, 0, 0));border-width:0px;outline:2px solid transparent;outline-offset:2px;width:100%;height:100%;cursor:pointer;font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;color:rgba(var(--v-text-link, 19, 98, 226, 1))}@media screen and (min-width: 768px) and (max-width: 1023px){.vega-pagination .vega-pagination-item button{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.vega-pagination .vega-pagination-item button{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.vega-pagination .vega-pagination-item button{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px}}.vega-pagination .vega-pagination-item.pager-ellipsis{cursor:default}.vega-pagination .vega-pagination-item:not(.pager-ellipsis):not(:active):hover{text-decoration:underline;text-underline-offset:2px}.vega-pagination .vega-pagination-item button:active,.vega-pagination .vega-pagination-item.active button{color:rgba(var(--v-text-primary, 32, 54, 69, 1));font-family:"Inter", sans-serif;font-size:14px;font-weight:700;line-height:18px}@media screen and (min-width: 768px) and (max-width: 1023px){.vega-pagination .vega-pagination-item button:active,.vega-pagination .vega-pagination-item.active button{font-family:"Inter", sans-serif;font-size:14px;font-weight:700;line-height:18px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.vega-pagination .vega-pagination-item button:active,.vega-pagination .vega-pagination-item.active button{font-family:"Inter", sans-serif;font-size:14px;font-weight:700;line-height:18px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.vega-pagination .vega-pagination-item button:active,.vega-pagination .vega-pagination-item.active button{font-family:"Inter", sans-serif;font-size:14px;font-weight:700;line-height:18px}}.vega-pagination .vega-pagination-item button:focus-visible{box-shadow:0 0 0 4px rgba(var(--v-ring-action-focus, 19, 98, 226, 0.25));border-radius:9999px}.vega-pagination .vega-pagination-button{list-style-type:none;display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}';export{I as vega_pagination}
|