@globalpayments/vega 2.20.1 → 2.22.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-f7f3c776.js → app-globals-a89a3aae.js} +4 -4
- package/dist/cjs/{child-nodes-event-prevent-slimmer-18814356.js → child-nodes-event-prevent-slimmer-5fc30c91.js} +2 -2
- package/dist/cjs/{component-usage-runtime-metrics-e3e92742.js → component-usage-runtime-metrics-a903ba26.js} +1 -1
- package/dist/cjs/{event-emit-slimmer-95dfc7c2.js → event-emit-slimmer-6abd05c3.js} +1 -1
- package/dist/cjs/{feature-flag-controller-dd0aaf67.js → feature-flag-controller-5f8b13f6.js} +1 -1
- package/dist/cjs/{form-field-controller-slimmer-db68a8da.js → form-field-controller-slimmer-1b7c9a92.js} +2 -2
- package/dist/cjs/{index-1299d729.js → index-09acd3c9.js} +7 -0
- package/dist/cjs/{index-bf98b054.js → index-fcf23682.js} +13 -0
- package/dist/cjs/index.cjs.js +4 -4
- package/dist/cjs/{internal-vega-event-manager-6ba0e3ab.js → internal-vega-event-manager-20ce2187.js} +2 -0
- package/dist/cjs/loader.cjs.js +7 -7
- package/dist/cjs/{mutation-observer-filters-95cb1596.js → mutation-observer-filters-79b60f28.js} +13 -0
- package/dist/cjs/{mutation-observer-slimmer-a54ddfb1.js → mutation-observer-slimmer-9cec684e.js} +1 -1
- package/dist/cjs/vega-accordion.cjs.entry.js +4 -4
- package/dist/cjs/vega-app-footer.cjs.entry.js +2 -2
- package/dist/cjs/vega-app-header-button.cjs.entry.js +7 -7
- package/dist/cjs/vega-backdrop.cjs.entry.js +2 -2
- package/dist/cjs/vega-banner.cjs.entry.js +6 -6
- package/dist/cjs/vega-bar-chart.cjs.entry.js +2 -2
- package/dist/cjs/vega-box.cjs.entry.js +2 -2
- package/dist/cjs/vega-breadcrumb.cjs.entry.js +9 -11
- package/dist/cjs/vega-button-circle.cjs.entry.js +7 -7
- package/dist/cjs/vega-button-group_2.cjs.entry.js +7 -7
- package/dist/cjs/vega-button-link.cjs.entry.js +8 -8
- package/dist/cjs/vega-button.cjs.entry.js +7 -7
- package/dist/cjs/vega-calendar_3.cjs.entry.js +55 -19
- package/dist/cjs/vega-card.cjs.entry.js +2 -2
- package/dist/cjs/vega-carousel.cjs.entry.js +4 -4
- package/dist/cjs/vega-checkbox_2.cjs.entry.js +10 -10
- package/dist/cjs/vega-chip.cjs.entry.js +7 -7
- package/dist/cjs/vega-color-picker.cjs.entry.js +7 -7
- package/dist/cjs/vega-combo-box.cjs.entry.js +10 -10
- package/dist/cjs/vega-counter-badge.cjs.entry.js +2 -2
- package/dist/cjs/vega-date-picker_2.cjs.entry.js +10 -10
- package/dist/cjs/vega-dialog_2.cjs.entry.js +7 -7
- package/dist/cjs/vega-divider.cjs.entry.js +2 -2
- package/dist/cjs/vega-dropdown_5.cjs.entry.js +8 -8
- package/dist/cjs/vega-env-manager-23b8b23c.js +2 -2
- package/dist/cjs/vega-field-error.cjs.entry.js +2 -2
- package/dist/cjs/vega-field-label.cjs.entry.js +7 -7
- package/dist/cjs/vega-flex.cjs.entry.js +4 -4
- package/dist/cjs/vega-font.cjs.entry.js +2 -2
- package/dist/cjs/vega-form.cjs.entry.js +10 -10
- package/dist/cjs/vega-grid.cjs.entry.js +2 -2
- package/dist/cjs/vega-hint.cjs.entry.js +2 -2
- package/dist/cjs/vega-icon.cjs.entry.js +2 -2
- package/dist/cjs/vega-image-uploader.cjs.entry.js +10 -10
- package/dist/cjs/vega-input-credit-card.cjs.entry.js +10 -10
- package/dist/cjs/vega-input-phone-number.cjs.entry.js +20 -16
- package/dist/cjs/vega-input-range.cjs.entry.js +10 -10
- package/dist/cjs/vega-input-select.cjs.entry.js +10 -10
- package/dist/cjs/vega-input.cjs.entry.js +26 -15
- package/dist/cjs/vega-item-toggle.cjs.entry.js +4 -4
- package/dist/cjs/vega-left-nav_5.cjs.entry.js +5 -5
- package/dist/cjs/vega-line-chart.cjs.entry.js +2 -2
- package/dist/cjs/vega-loader-wrapper_2.cjs.entry.js +2 -2
- package/dist/cjs/vega-page-notification_2.cjs.entry.js +2 -2
- package/dist/cjs/vega-pagination.cjs.entry.js +7 -7
- package/dist/cjs/vega-pie-chart.cjs.entry.js +2 -2
- package/dist/cjs/vega-popover_2.cjs.entry.js +4 -4
- package/dist/cjs/vega-progress-tracker.cjs.entry.js +4 -4
- package/dist/cjs/vega-radio_2.cjs.entry.js +10 -10
- package/dist/cjs/vega-section-title.cjs.entry.js +2 -2
- package/dist/cjs/vega-segment-control.cjs.entry.js +4 -4
- package/dist/cjs/vega-selection-chip_2.cjs.entry.js +807 -0
- package/dist/cjs/vega-selection-tile_2.cjs.entry.js +10 -10
- package/dist/cjs/vega-signature-capture.cjs.entry.js +7 -7
- package/dist/cjs/{vega-skeleton-loader-controller-aa3e09d6.js → vega-skeleton-loader-controller-d52d9033.js} +2 -2
- package/dist/cjs/vega-skeleton.cjs.entry.js +2 -2
- package/dist/cjs/vega-slot-container.cjs.entry.js +2 -2
- package/dist/cjs/vega-stepper.cjs.entry.js +10 -10
- package/dist/cjs/vega-tab-group_2.cjs.entry.js +7 -7
- package/dist/cjs/vega-table_8.cjs.entry.js +98 -42
- package/dist/cjs/vega-text.cjs.entry.js +2 -2
- package/dist/cjs/vega-textarea.cjs.entry.js +10 -10
- package/dist/cjs/vega-time-picker_2.cjs.entry.js +10 -10
- package/dist/cjs/vega-toggle-switch.cjs.entry.js +4 -4
- package/dist/cjs/vega-tooltip_2.cjs.entry.js +2 -2
- package/dist/cjs/vega.cjs.js +7 -7
- package/dist/collection/collection-manifest.json +9 -1
- package/dist/collection/components/vega-breadcrumb/slimmers/controllers/vega-breadcrumb-click-controller.js +2 -4
- package/dist/collection/components/vega-button-link/vega-button-link.css +2 -0
- package/dist/collection/components/vega-calendar/vega-calendar-event/slimmers/controllers/vega-calendar-sub-state-controller.js +15 -1
- package/dist/collection/components/vega-calendar/vega-calendar-event/slimmers/renderers/vega-calendar-event-renderer.js +15 -10
- package/dist/collection/components/vega-calendar/vega-calendar-event/vega-calendar-event.js +3 -1
- package/dist/collection/components/vega-calendar/vega-calendar.js +37 -0
- package/dist/collection/components/vega-input/slimmers/controllers/vega-input-mask-config-controller.js +1 -1
- package/dist/collection/components/vega-input/vega-input.css +4 -0
- package/dist/collection/components/vega-input/vega-input.js +4 -4
- package/dist/collection/components/vega-input-phone-number/slimmers/controllers/vega-input-phone-number-value-controller.js +8 -5
- package/dist/collection/components/vega-input-phone-number/slimmers/renderers/phone-number-input-renderer.js +1 -0
- package/dist/collection/components/vega-input-phone-number/vega-input-phone-number.js +1 -1
- package/dist/collection/components/vega-nav/vega-left-nav/vega-left-nav.css +0 -2
- package/dist/collection/components/vega-selection-chip/interface.js +1 -0
- package/dist/collection/components/vega-selection-chip/slimmers/controllers/vega-selection-chip-checked-cotroller.js +42 -0
- package/dist/collection/components/vega-selection-chip/slimmers/controllers/vega-selection-chip-show-error-controller.js +63 -0
- package/dist/collection/components/vega-selection-chip/slimmers/controllers/vega-selection-chip-state-controller.js +77 -0
- package/dist/collection/components/vega-selection-chip/slimmers/renderers/vega-selection-chip-renderer.js +102 -0
- package/dist/collection/components/vega-selection-chip/vega-selection-chip-group/interface.js +1 -0
- package/dist/collection/components/vega-selection-chip/vega-selection-chip-group/slimmers/controllers/vega-selection-chip-group-items-controller.js +164 -0
- package/dist/collection/components/vega-selection-chip/vega-selection-chip-group/slimmers/controllers/vega-selection-chip-group-value-controller.js +68 -0
- package/dist/collection/components/vega-selection-chip/vega-selection-chip-group/slimmers/renderers/vega-selection-chip-group-renderer.js +45 -0
- package/dist/collection/components/vega-selection-chip/vega-selection-chip-group/vega-selection-chip-group.css +91 -0
- package/dist/collection/components/vega-selection-chip/vega-selection-chip-group/vega-selection-chip-group.js +326 -0
- package/dist/collection/components/vega-selection-chip/vega-selection-chip.css +175 -0
- package/dist/collection/components/vega-selection-chip/vega-selection-chip.js +335 -0
- package/dist/collection/components/vega-table/slimmers/controllers/vega-table-data-source-controller.js +1 -3
- package/dist/collection/components/vega-table/slimmers/controllers/vega-table-sort-controller.js +36 -29
- package/dist/collection/components/vega-table/slimmers/controllers/vega-table-sorter.js +41 -0
- package/dist/collection/components/vega-table/slimmers/renderers/vega-table-header-renderer.js +5 -1
- package/dist/collection/components/vega-table/test/vega-table-sorter.test.js +508 -0
- package/dist/collection/components/vega-table/vega-table.js +27 -0
- package/dist/collection/helpers/event-manager/event-id/component-event-id-map.js +2 -0
- package/dist/collection/helpers/formatter/string-formatter/custom-formatter-strategy.js +16 -4
- package/dist/collection/helpers/formatter/test/string-formatter/custom-formatter-strategy.test.js +7 -2
- package/dist/collection/helpers/slimmers/mutation-observer/mutation-observer-filters.js +12 -0
- package/dist/collection/helpers/slimmers/mutation-observer/mutation-observer-slimmer.js +1 -1
- package/dist/collection/helpers/slimmers/mutation-observer/test/mutation-observer-slimmer.test.js +53 -1
- package/dist/collection/helpers/slimmers/runtime-metrics/create-public-api-runtime-metrics-slimmer.js +23 -0
- package/dist/collection/helpers/slimmers/runtime-metrics/public-api-runtime-metrics-slimmer-base.js +68 -0
- package/dist/collection/helpers/slimmers/runtime-metrics/test/public-api-runtime-metrics-slimmer-base.test.js +89 -0
- package/dist/collection/helpers/slimmers/test/component-usage-runtime-metrics.test.js +1 -5
- package/dist/collection/helpers/vega-telemetry-helper/test/vega-env-manager.test.js +1 -1
- package/dist/collection/helpers/vega-telemetry-helper/vega-env-manager.js +2 -2
- package/dist/collection/utils/e2e-utils.js +6 -2
- package/dist/collection/utils/test-utils.js +12 -0
- package/dist/collection/value-model-adapters/angular-ng-model-accessor-adapter.js +1 -0
- package/dist/collection/value-model-adapters/vue-component-v-model-adaptor.js +1 -0
- package/dist/esm/{app-globals-565328e2.js → app-globals-68551d56.js} +4 -4
- package/dist/esm/{child-nodes-event-prevent-slimmer-75851864.js → child-nodes-event-prevent-slimmer-00abe396.js} +2 -2
- package/dist/esm/{component-usage-runtime-metrics-ac372454.js → component-usage-runtime-metrics-eaffdd1e.js} +1 -1
- package/dist/esm/{event-emit-slimmer-929b3e70.js → event-emit-slimmer-46b254b4.js} +1 -1
- package/dist/esm/{feature-flag-controller-9818c025.js → feature-flag-controller-afaa4a79.js} +1 -1
- package/dist/esm/{form-field-controller-slimmer-b237bb58.js → form-field-controller-slimmer-19b99b7e.js} +2 -2
- package/dist/esm/{index-dc8f8d91.js → index-0f54aaaa.js} +13 -0
- package/dist/esm/{index-c3505689.js → index-187f71d1.js} +7 -0
- package/dist/esm/index.js +4 -4
- package/dist/esm/{internal-vega-event-manager-b0d04798.js → internal-vega-event-manager-ae6359d6.js} +2 -0
- package/dist/esm/loader.js +7 -7
- package/dist/esm/{mutation-observer-filters-a484f098.js → mutation-observer-filters-9086b5cc.js} +13 -1
- package/dist/esm/{mutation-observer-slimmer-a4dbad26.js → mutation-observer-slimmer-151b4b90.js} +1 -1
- package/dist/esm/vega-accordion.entry.js +4 -4
- package/dist/esm/vega-app-footer.entry.js +2 -2
- package/dist/esm/vega-app-header-button.entry.js +7 -7
- package/dist/esm/vega-backdrop.entry.js +2 -2
- package/dist/esm/vega-banner.entry.js +6 -6
- package/dist/esm/vega-bar-chart.entry.js +2 -2
- package/dist/esm/vega-box.entry.js +2 -2
- package/dist/esm/vega-breadcrumb.entry.js +9 -11
- package/dist/esm/vega-button-circle.entry.js +7 -7
- package/dist/esm/vega-button-group_2.entry.js +7 -7
- package/dist/esm/vega-button-link.entry.js +8 -8
- package/dist/esm/vega-button.entry.js +7 -7
- package/dist/esm/vega-calendar_3.entry.js +55 -19
- package/dist/esm/vega-card.entry.js +2 -2
- package/dist/esm/vega-carousel.entry.js +4 -4
- package/dist/esm/vega-checkbox_2.entry.js +10 -10
- package/dist/esm/vega-chip.entry.js +7 -7
- package/dist/esm/vega-color-picker.entry.js +7 -7
- package/dist/esm/vega-combo-box.entry.js +10 -10
- package/dist/esm/vega-counter-badge.entry.js +2 -2
- package/dist/esm/vega-date-picker_2.entry.js +10 -10
- package/dist/esm/vega-dialog_2.entry.js +7 -7
- package/dist/esm/vega-divider.entry.js +2 -2
- package/dist/esm/vega-dropdown_5.entry.js +8 -8
- package/dist/esm/vega-env-manager-8f8dc473.js +2 -2
- package/dist/esm/vega-field-error.entry.js +2 -2
- package/dist/esm/vega-field-label.entry.js +7 -7
- package/dist/esm/vega-flex.entry.js +4 -4
- package/dist/esm/vega-font.entry.js +2 -2
- package/dist/esm/vega-form.entry.js +10 -10
- package/dist/esm/vega-grid.entry.js +2 -2
- package/dist/esm/vega-hint.entry.js +2 -2
- package/dist/esm/vega-icon.entry.js +2 -2
- package/dist/esm/vega-image-uploader.entry.js +10 -10
- package/dist/esm/vega-input-credit-card.entry.js +10 -10
- package/dist/esm/vega-input-phone-number.entry.js +20 -16
- package/dist/esm/vega-input-range.entry.js +10 -10
- package/dist/esm/vega-input-select.entry.js +10 -10
- package/dist/esm/vega-input.entry.js +26 -15
- package/dist/esm/vega-item-toggle.entry.js +4 -4
- package/dist/esm/vega-left-nav_5.entry.js +5 -5
- package/dist/esm/vega-line-chart.entry.js +2 -2
- package/dist/esm/vega-loader-wrapper_2.entry.js +2 -2
- package/dist/esm/vega-page-notification_2.entry.js +2 -2
- package/dist/esm/vega-pagination.entry.js +7 -7
- package/dist/esm/vega-pie-chart.entry.js +2 -2
- package/dist/esm/vega-popover_2.entry.js +4 -4
- package/dist/esm/vega-progress-tracker.entry.js +4 -4
- package/dist/esm/vega-radio_2.entry.js +10 -10
- package/dist/esm/vega-section-title.entry.js +2 -2
- package/dist/esm/vega-segment-control.entry.js +4 -4
- package/dist/esm/vega-selection-chip_2.entry.js +802 -0
- package/dist/esm/vega-selection-tile_2.entry.js +10 -10
- package/dist/esm/vega-signature-capture.entry.js +7 -7
- package/dist/esm/{vega-skeleton-loader-controller-7378a2e4.js → vega-skeleton-loader-controller-64cb8447.js} +2 -2
- package/dist/esm/vega-skeleton.entry.js +2 -2
- package/dist/esm/vega-slot-container.entry.js +2 -2
- package/dist/esm/vega-stepper.entry.js +10 -10
- package/dist/esm/vega-tab-group_2.entry.js +7 -7
- package/dist/esm/vega-table_8.entry.js +98 -42
- package/dist/esm/vega-text.entry.js +2 -2
- package/dist/esm/vega-textarea.entry.js +10 -10
- package/dist/esm/vega-time-picker_2.entry.js +10 -10
- package/dist/esm/vega-toggle-switch.entry.js +4 -4
- package/dist/esm/vega-tooltip_2.entry.js +2 -2
- package/dist/esm/vega.js +7 -7
- package/dist/types/components/vega-calendar/vega-calendar-event/slimmers/controllers/vega-calendar-sub-state-controller.d.ts +1 -0
- package/dist/types/components/vega-calendar/vega-calendar-event/slimmers/renderers/vega-calendar-event-renderer.d.ts +2 -1
- package/dist/types/components/vega-calendar/vega-calendar-event/vega-calendar-event.d.ts +1 -0
- package/dist/types/components/vega-calendar/vega-calendar.d.ts +11 -0
- package/dist/types/components/vega-input/types.d.ts +1 -0
- package/dist/types/components/vega-input/vega-input.d.ts +1 -1
- package/dist/types/components/vega-input-phone-number/slimmers/controllers/vega-input-phone-number-value-controller.d.ts +3 -2
- package/dist/types/components/vega-selection-chip/interface.d.ts +4 -0
- package/dist/types/components/vega-selection-chip/slimmers/controllers/vega-selection-chip-checked-cotroller.d.ts +23 -0
- package/dist/types/components/vega-selection-chip/slimmers/controllers/vega-selection-chip-show-error-controller.d.ts +31 -0
- package/dist/types/components/vega-selection-chip/slimmers/controllers/vega-selection-chip-state-controller.d.ts +13 -0
- package/dist/types/components/vega-selection-chip/slimmers/renderers/vega-selection-chip-renderer.d.ts +26 -0
- package/dist/types/components/vega-selection-chip/vega-selection-chip-group/interface.d.ts +1 -0
- package/dist/types/components/vega-selection-chip/vega-selection-chip-group/slimmers/controllers/vega-selection-chip-group-items-controller.d.ts +72 -0
- package/dist/types/components/vega-selection-chip/vega-selection-chip-group/slimmers/controllers/vega-selection-chip-group-value-controller.d.ts +29 -0
- package/dist/types/components/vega-selection-chip/vega-selection-chip-group/slimmers/renderers/vega-selection-chip-group-renderer.d.ts +15 -0
- package/dist/types/components/vega-selection-chip/vega-selection-chip-group/vega-selection-chip-group.d.ts +82 -0
- package/dist/types/components/vega-selection-chip/vega-selection-chip.d.ts +92 -0
- package/dist/types/components/vega-table/interface.d.ts +6 -0
- package/dist/types/components/vega-table/slimmers/controllers/vega-table-sort-controller.d.ts +4 -3
- package/dist/types/components/vega-table/slimmers/controllers/vega-table-sorter.d.ts +33 -0
- package/dist/types/components/vega-table/slimmers/renderers/vega-table-header-renderer.d.ts +1 -0
- package/dist/types/components/vega-table/test/vega-table-sorter.test.d.ts +1 -0
- package/dist/types/components/vega-table/vega-table.d.ts +9 -2
- package/dist/types/components.d.ts +209 -3
- package/dist/types/helpers/formatter/string-formatter/custom-formatter-strategy.d.ts +6 -3
- package/dist/types/helpers/slimmers/mutation-observer/mutation-observer-filters.d.ts +7 -0
- package/dist/types/helpers/slimmers/mutation-observer/mutation-observer-slimmer.d.ts +1 -1
- package/dist/types/helpers/slimmers/runtime-metrics/create-public-api-runtime-metrics-slimmer.d.ts +16 -0
- package/dist/types/helpers/slimmers/runtime-metrics/public-api-runtime-metrics-slimmer-base.d.ts +48 -0
- package/dist/types/helpers/slimmers/runtime-metrics/test/public-api-runtime-metrics-slimmer-base.test.d.ts +1 -0
- package/dist/types/types/components.type.d.ts +7 -0
- package/dist/types/utils/e2e-utils.d.ts +2 -0
- package/dist/types/utils/test-utils.d.ts +8 -0
- package/dist/vega/index.esm.js +1 -1
- package/dist/vega/{p-15604d96.entry.js → p-057cff9d.entry.js} +1 -1
- package/dist/vega/{p-22cffbcc.entry.js → p-05e5d161.entry.js} +1 -1
- package/dist/vega/p-1c298d5a.js +2 -0
- package/dist/vega/{p-0fdbffc4.entry.js → p-1c2dc0c1.entry.js} +1 -1
- package/dist/vega/{p-1496ae4a.entry.js → p-200a8fa5.entry.js} +1 -1
- package/dist/vega/{p-0629c827.entry.js → p-2049c795.entry.js} +1 -1
- package/dist/vega/{p-a6454c72.entry.js → p-20f2ba7a.entry.js} +1 -1
- package/dist/vega/{p-4cf6fea1.entry.js → p-22788bc0.entry.js} +1 -1
- package/dist/vega/{p-3a74436f.entry.js → p-2ecf49a3.entry.js} +1 -1
- package/dist/vega/{p-e9851b18.entry.js → p-35248678.entry.js} +1 -1
- package/dist/vega/p-35296720.entry.js +1 -0
- package/dist/vega/{p-fb7ca3e4.entry.js → p-354bb9b8.entry.js} +1 -1
- package/dist/vega/{p-f58e4e4a.entry.js → p-36a4ad8f.entry.js} +1 -1
- package/dist/vega/p-38d81bde.js +1 -0
- package/dist/vega/{p-a1235ae4.entry.js → p-3aa738f2.entry.js} +1 -1
- package/dist/vega/{p-ed0d4be8.entry.js → p-3c1d59d6.entry.js} +1 -1
- package/dist/vega/{p-d5c10af1.js → p-3e0299cd.js} +1 -1
- package/dist/vega/{p-394a4289.entry.js → p-3ed5adb1.entry.js} +1 -1
- package/dist/vega/{p-db129cbf.entry.js → p-3ef16d4e.entry.js} +1 -1
- package/dist/vega/{p-9c3ed69a.entry.js → p-46b8664a.entry.js} +1 -1
- package/dist/vega/{p-1d5f39a4.entry.js → p-4a704547.entry.js} +1 -1
- package/dist/vega/{p-4c919221.entry.js → p-4bdc66fd.entry.js} +1 -1
- package/dist/vega/{p-b211ca98.entry.js → p-52527dba.entry.js} +1 -1
- package/dist/vega/{p-20effa66.js → p-5608bf96.js} +1 -1
- package/dist/vega/{p-bc37ab37.entry.js → p-58a58cf3.entry.js} +1 -1
- package/dist/vega/{p-2113e8a0.entry.js → p-5b0811c0.entry.js} +1 -1
- package/dist/vega/{p-d7b21179.entry.js → p-5ee189ba.entry.js} +1 -1
- package/dist/vega/p-5f377954.js +1 -1
- package/dist/vega/{p-21688c09.entry.js → p-61226f5d.entry.js} +1 -1
- package/dist/vega/{p-a8f406e3.entry.js → p-62c1e269.entry.js} +1 -1
- package/dist/vega/{p-9fc2882a.js → p-6574c0e8.js} +1 -1
- package/dist/vega/{p-cbb1c0a7.entry.js → p-680be8f6.entry.js} +1 -1
- package/dist/vega/{p-a32d7542.entry.js → p-6b365ba6.entry.js} +1 -1
- package/dist/vega/{p-8ddbf84b.entry.js → p-6bd76976.entry.js} +1 -1
- package/dist/vega/{p-c1e103da.entry.js → p-6e8cf962.entry.js} +1 -1
- package/dist/vega/{p-cee7b0e6.entry.js → p-702910ff.entry.js} +1 -1
- package/dist/vega/{p-3856bf46.entry.js → p-71cfc8da.entry.js} +1 -1
- package/dist/vega/p-731bd18d.entry.js +1 -0
- package/dist/vega/{p-0a157187.entry.js → p-76acd56a.entry.js} +1 -1
- package/dist/vega/{p-13893eed.entry.js → p-76f7907b.entry.js} +1 -1
- package/dist/vega/{p-68ead15a.entry.js → p-7b867084.entry.js} +1 -1
- package/dist/vega/{p-6d7fa33c.entry.js → p-80804da8.entry.js} +1 -1
- package/dist/vega/{p-6aab349d.entry.js → p-82f9b832.entry.js} +1 -1
- package/dist/vega/{p-10456650.entry.js → p-84a7e59f.entry.js} +1 -1
- package/dist/vega/{p-33f260f6.entry.js → p-88d63e07.entry.js} +1 -1
- package/dist/vega/{p-bb63021c.entry.js → p-8be8e237.entry.js} +1 -1
- package/dist/vega/{p-507d3a25.js → p-8cdbfbc1.js} +1 -1
- package/dist/vega/p-91c9f45d.entry.js +1 -0
- package/dist/vega/{p-4dc711c1.js → p-96de336a.js} +1 -1
- package/dist/vega/{p-b8e45e21.entry.js → p-97b69994.entry.js} +1 -1
- package/dist/vega/{p-19aa73b5.entry.js → p-9bda5809.entry.js} +1 -1
- package/dist/vega/{p-e48c71be.entry.js → p-9e744f92.entry.js} +1 -1
- package/dist/vega/{p-faf4cfd8.entry.js → p-a32643e3.entry.js} +1 -1
- package/dist/vega/{p-a8b216c0.entry.js → p-a3b57e9e.entry.js} +1 -1
- package/dist/vega/{p-c506420f.entry.js → p-aad984b2.entry.js} +1 -1
- package/dist/vega/{p-59011d75.entry.js → p-ae431236.entry.js} +1 -1
- package/dist/vega/p-af5d5b0f.entry.js +1 -0
- package/dist/vega/{p-8f13530c.entry.js → p-afd75854.entry.js} +1 -1
- package/dist/vega/{p-7b2315b5.entry.js → p-b9a121d3.entry.js} +1 -1
- package/dist/vega/p-be15ec5b.entry.js +1 -0
- package/dist/vega/{p-55255602.entry.js → p-c227e167.entry.js} +1 -1
- package/dist/vega/{p-639fa6c7.js → p-c677778e.js} +1 -1
- package/dist/vega/{p-9d58efb1.entry.js → p-c8b25f79.entry.js} +1 -1
- package/dist/vega/{p-788aea0f.entry.js → p-c95ea3b3.entry.js} +1 -1
- package/dist/vega/{p-6cc1716b.entry.js → p-c9880e7e.entry.js} +1 -1
- package/dist/vega/{p-12e34614.entry.js → p-ccd05ec5.entry.js} +1 -1
- package/dist/vega/{p-af4e1120.entry.js → p-d2f63287.entry.js} +1 -1
- package/dist/vega/{p-b32611f0.js → p-d5d136a5.js} +1 -1
- package/dist/vega/{p-d5e0c79c.entry.js → p-dc264664.entry.js} +1 -1
- package/dist/vega/{p-ca905ecc.entry.js → p-e0781825.entry.js} +1 -1
- package/dist/vega/{p-1e7118b1.entry.js → p-e39f9907.entry.js} +1 -1
- package/dist/vega/{p-fbd75ce7.entry.js → p-e3a70db2.entry.js} +1 -1
- package/dist/vega/{p-c4542d96.js → p-e90bae84.js} +1 -1
- package/dist/vega/p-ef0c67c2.js +1 -0
- package/dist/vega/{p-c0842b6c.entry.js → p-ef26140a.entry.js} +1 -1
- package/dist/vega/{p-fd58f10a.js → p-fcd74048.js} +1 -1
- package/dist/vega/vega.esm.js +1 -1
- package/package.json +2 -2
- package/dist/vega/p-3f20d9f0.js +0 -1
- package/dist/vega/p-8be4196f.entry.js +0 -1
- package/dist/vega/p-9777b1c1.js +0 -2
- package/dist/vega/p-a1557df0.entry.js +0 -1
- package/dist/vega/p-c216dfc3.js +0 -1
- package/dist/vega/p-cfdf4a95.entry.js +0 -1
- package/dist/vega/p-e7da829b.entry.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{h as e,H as t,r as i,c as o,g as r}from"./p-1c298d5a.js";import{s}from"./p-b81bd0bb.js";import{a,M as l,V as n,I as d,L as c}from"./p-018d77cc.js";import{V as h,I as p}from"./p-3e0299cd.js";import{R as v}from"./p-9b3df371.js";import{c as g}from"./p-86194314.js";import{S as b,c as f}from"./p-c57c0d62.js";import{O as u,d as m}from"./p-e4aa214a.js";import{V as x}from"./p-09e7bd51.js";import{f as w}from"./p-320642bd.js";import{C as y}from"./p-853f3963.js";import{P as j}from"./p-8960e876.js";import{g as k}from"./p-3542f8fe.js";import{e as C}from"./p-f5ebc64a.js";import{c as R}from"./p-e90bae84.js";import{b as z}from"./p-b8a63b73.js";import{M as S}from"./p-5608bf96.js";import{a as O}from"./p-38d81bde.js";import{C as E}from"./p-d5d136a5.js";import{F as T}from"./p-8cdbfbc1.js";import{R as I}from"./p-4c6f6317.js";import"./p-12d5ed36.js";import"./p-3c8b2105.js";import"./p-3a0a4d15.js";import"./p-c59042c0.js";import"./p-344ee7cb.js";import"./p-0c667d6a.js";import"./p-d3f1d3dd.js";import"./p-ef0c67c2.js";import"./p-ee68920f.js";import"./p-5f377954.js";import"./p-fcd74048.js";import"./p-c677778e.js";import"./p-0bb29d98.js";import"./p-469bc36e.js";var V=function(e,t,i,o){var r,s=arguments.length,a=s<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,o);else for(var l=e.length-1;l>=0;l--)(r=e[l])&&(a=(s<3?r(a):s>3?r(t,i,a):r(t,i))||a);return s>3&&a&&Object.defineProperty(t,i,a),a};class N extends n{componentWillRender(){this.currentSize=v.formatCustom(this.size)}render(){return e(t,{class:{block:this.block}},this.renderTooltip())}renderTooltip(){return e("vega-tooltip",Object.assign({trigger:this.disabled&&this.disabledTooltip?"hover":"none",alignment:"center"},this.disabledTooltip),this.renderSelectionChip())}renderSelectionChip(){return e("vega-box",{corners:"rounded-full",class:{"vega-selection-chip":!0,[`size-${this.currentSize}`]:!0,[`variant-${this.variant||"text"}`]:!0,checked:this.checked,error:this.showError,disabled:this.disabled},"aria-label":this.label||"No label defined",onClick:()=>{"radio"===this.selectType&&this.checked||this.checkedController.onCheck(!this.checked)},onKeyDown:g(),tabIndex:this.disabled?-1:0},this.renderContent())}renderContent(){return e("vega-flex",{gap:N.gapSizeMap[this.currentSize],"align-items":"center","justify-content":"text"===this.variant?"center":"start"},"swatch"===this.variant&&this.renderSwatch(),this.renderLabel())}renderLabel(){return e("vega-font",{color:"text-primary",class:"label vega-flex-grow",variant:N.labelFontMap[this.currentSize]},this.label)}renderSwatch(){return e("vega-box",{"background-color":"bg-primary",corners:"rounded-full",class:"swatch vega-flex-shrink-0"},e("vega-box",{"background-color":this.swatchColor,corners:"rounded-full"}))}}N.gapSizeMap={"extra-small":"size-4",small:"size-4",medium:"size-8",large:"size-8"},N.labelFontMap={"extra-small":"font-field-label-xs",small:"font-field-label-sm",medium:"font-field-label",large:"font-field-label-lg"},V([a()],N.prototype,"host",void 0),V([a()],N.prototype,"label",void 0),V([a()],N.prototype,"block",void 0),V([a()],N.prototype,"size",void 0),V([a()],N.prototype,"variant",void 0),V([a()],N.prototype,"swatchColor",void 0),V([a()],N.prototype,"disabledTooltip",void 0),V([a()],N.prototype,"disabled",void 0),V([a()],N.prototype,"selectType",void 0),V([a()],N.prototype,"checked",void 0),V([a()],N.prototype,"checkedController",void 0),V([a()],N.prototype,"showError",void 0),V([l("componentWillRender")],N.prototype,"componentWillRender",null);var L=function(e,t,i,o){var r,s=arguments.length,a=s<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,o);else for(var l=e.length-1;l>=0;l--)(r=e[l])&&(a=(s<3?r(a):s>3?r(t,i,a):r(t,i))||a);return s>3&&a&&Object.defineProperty(t,i,a),a};class A extends n{setChecked(e){this.checked=e}onCheck(e){const t=e?this.value:"";this.setChecked(e),this.changeEventEmitter.emit(t)}}L([a()],A.prototype,"host",void 0),L([a({writable:!0})],A.prototype,"checked",void 0),L([a()],A.prototype,"changeEventEmitter",void 0),L([a()],A.prototype,"value",void 0);var F=function(e,t,i,o){var r,s=arguments.length,a=s<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,o);else for(var l=e.length-1;l>=0;l--)(r=e[l])&&(a=(s<3?r(a):s>3?r(t,i,a):r(t,i))||a);return s>3&&a&&Object.defineProperty(t,i,a),a};class D extends b{constructor(){super({parent:"vega-selection-chip-group",subStates:[{subStateName:"disabled",parentStateName:"disabled",callback:e=>{"boolean"==typeof e&&(this.disabled=e)}},{subStateName:"selectType",parentStateName:"selectType",callback:e=>{this.selectType="checkbox"===e?"checkbox":"radio"}},{subStateName:"checked",parentStateName:"value",callback:e=>{this.checkedController.setChecked(Array.isArray(e)?e.includes(this.value):e===this.value)}}]})}}F([a()],D.prototype,"host",void 0),F([a({writable:!0})],D.prototype,"disabled",void 0),F([a({writable:!0})],D.prototype,"selectType",void 0),F([a()],D.prototype,"value",void 0),F([a()],D.prototype,"checkedController",void 0);var G=function(e,t,i,o){var r,s=arguments.length,a=s<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,o);else for(var l=e.length-1;l>=0;l--)(r=e[l])&&(a=(s<3?r(a):s>3?r(t,i,a):r(t,i))||a);return s>3&&a&&Object.defineProperty(t,i,a),a};class W extends n{connectedCallback(){this.selectionChipGroup=w(this.host,"vega-selection-chip-group"),this.selectionChipGroup&&(this.fieldErrorObserver=new u(this.canAcceptFieldErrorObserver.bind(this),this.fieldErrorObserverListener.bind(this)),y.register(m.getSubject(this.selectionChipGroup,x),this.fieldErrorObserver))}disconnectedCallback(){this.selectionChipGroup&&y.unregister(m.getSubject(this.selectionChipGroup,x),this.fieldErrorObserver)}canAcceptFieldErrorObserver(){return!0}fieldErrorObserverListener(e){this.showError=e.showError}}G([a({writable:!0})],W.prototype,"showError",void 0),G([a()],W.prototype,"host",void 0),G([l("connectedCallback")],W.prototype,"connectedCallback",null),G([l("disconnectedCallback")],W.prototype,"disconnectedCallback",null);var M=function(e,t,i,o){var r,s=arguments.length,a=s<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,o);else for(var l=e.length-1;l>=0;l--)(r=e[l])&&(a=(s<3?r(a):s>3?r(t,i,a):r(t,i))||a);return s>3&&a&&Object.defineProperty(t,i,a),a};const _=class{constructor(e){i(this,e),this.vegaChange=o(this,"vegaChange",7),this.change=o(this,"change",7),this.globalSlimmers={},this.renderer=new N,this.checkedController=new A,this.stateController=new D,this.showErrorController=new W,this.pageResizeObserverSlimmer=new j,this.vegaComponentUsageRuntimeMetricsSlimmer=new h,this.changeEventEmitter=R(_,C),this.showError=!1,this.currentBreakpoint=k(),this.label="",this.size="medium",this.variant="text",this.disabled=!1,this.block=!1,this.swatchColor="bg-status-info"}watchSize(){}componentWillRender(){}render(){return s(this.renderer.render(),this.host)}get host(){return r(this)}static get watchers(){return{size:["watchSize"]}}};M([p()],_.prototype,"globalSlimmers",void 0),M([d()],_.prototype,"renderer",void 0),M([d()],_.prototype,"checkedController",void 0),M([d()],_.prototype,"stateController",void 0),M([d()],_.prototype,"showErrorController",void 0),M([d()],_.prototype,"pageResizeObserverSlimmer",void 0),M([d()],_.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),M([d()],_.prototype,"changeEventEmitter",void 0),_.style=":host(.block){display:block}:host(.block) vega-tooltip{display:block}:host{max-width:100%;display:inline-block;vertical-align:middle;line-height:0}:host vega-tooltip{max-width:100%}:host .swatch{margin:2px;padding:1px;box-sizing:border-box}:host .swatch vega-box{width:100%;height:100%}:host .label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}:host .vega-selection-chip{background-color:rgba(var(--v-bg-tile, 252, 252, 252, 1));cursor:pointer;margin:1px}:host .variant-text .label{text-align:center}:host .size-extra-small.variant-swatch.vega-selection-chip{padding-top:2px;padding-bottom:2px;padding-left:2px;padding-right:12px}:host .size-extra-small.variant-text.vega-selection-chip{padding-left:12px;padding-right:12px;padding-top:2px;padding-bottom:2px}:host .size-extra-small vega-flex{height:16px}:host .size-extra-small .swatch{width:12px;height:12px}:host .size-small.variant-swatch.vega-selection-chip{padding-top:4px;padding-bottom:4px;padding-left:4px;padding-right:12px}:host .size-small.variant-text.vega-selection-chip{padding-left:12px;padding-right:12px;padding-top:4px;padding-bottom:4px}:host .size-small vega-flex{height:24px}:host .size-small .swatch{width:20px;height:20px}:host .size-medium.variant-swatch.vega-selection-chip{padding-top:4px;padding-bottom:4px;padding-left:4px;padding-right:16px}:host .size-medium.variant-text.vega-selection-chip{padding-left:16px;padding-right:16px;padding-top:4px;padding-bottom:4px}:host .size-medium vega-flex{height:32px}:host .size-medium .swatch{width:28px;height:28px}:host .size-large.variant-swatch.vega-selection-chip{padding-top:4px;padding-bottom:4px;padding-left:4px;padding-right:20px}:host .size-large.variant-text.vega-selection-chip{padding-left:20px;padding-right:20px;padding-top:4px;padding-bottom:4px}:host .size-large vega-flex{height:40px}:host .size-large .swatch{width:36px;height:36px}:host .vega-selection-chip:not(.disabled){background-color:rgba(var(--v-bg-tile, 252, 252, 252, 1));border:1px solid rgba(var(--v-border-tile, 171, 198, 216, 1))}:host .vega-selection-chip:not(.disabled):hover{background-color:rgba(var(--v-bg-tile-hover, 245, 247, 247, 1));border:1px solid rgba(var(--v-border-tile-hover, 115, 160, 190, 1))}:host .vega-selection-chip:not(.disabled):focus-visible{background-color:rgba(var(--v-bg-tile, 252, 252, 252, 1));outline:2px solid rgba(var(--v-border-color-action, 19, 98, 226, 1));outline-offset:2px;border:1px solid rgba(var(--v-border-tile-focus, 19, 98, 226, 1))}:host .vega-selection-chip:not(.disabled).checked{background-color:rgba(var(--v-bg-tile-selected, 242, 247, 255, 1));border:2px solid rgba(var(--v-border-tile-selected, 19, 98, 226, 1));margin:0px}:host .vega-selection-chip:not(.disabled).checked:hover{background-color:rgba(var(--v-bg-tile-selected-hover, 229, 239, 255, 1));border:2px solid rgba(var(--v-border-tile-selected-hover, 4, 112, 236, 1))}:host .vega-selection-chip:not(.disabled).checked:focus-visible{background-color:rgba(var(--v-bg-tile-selected, 242, 247, 255, 1));border:2px solid rgba(var(--v-border-tile-selected-focus, 19, 98, 226, 1))}:host .vega-selection-chip:not(.disabled).error{background-color:rgba(var(--v-bg-tile, 252, 252, 252, 1));border:1px solid rgba(var(--v-border-input-field-danger, 230, 50, 87, 1))}:host .vega-selection-chip:not(.disabled).error:hover{background-color:rgba(var(--v-bg-tile-hover, 245, 247, 247, 1));border:1px solid rgba(var(--v-border-input-field-danger-hover, 255, 87, 114, 1))}:host .vega-selection-chip:not(.disabled).error:focus-visible{background-color:rgba(var(--v-bg-tile, 252, 252, 252, 1));outline:2px solid rgba(var(--v-border-color-danger, 230, 50, 87, 1));outline-offset:2px;border:1px solid rgba(var(--v-border-input-field-danger-focus, 233, 71, 104, 1))}:host .vega-selection-chip.disabled{background-color:rgba(var(--v-bg-tile, 252, 252, 252, 1));border:1px solid rgba(var(--v-border-input-field-disabled, 222, 225, 227, 1));pointer-events:none;color:rgba(var(--v-text-disabled, 176, 180, 181, 1))}:host .vega-selection-chip.disabled:focus-visible{outline:none}:host .vega-selection-chip.disabled vega-font{color:rgba(var(--v-text-disabled, 176, 180, 181, 1))}:host .vega-selection-chip.disabled .swatch{opacity:0.5}";var H=function(e,t,i,o){var r,s=arguments.length,a=s<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,o);else for(var l=e.length-1;l>=0;l--)(r=e[l])&&(a=(s<3?r(a):s>3?r(t,i,a):r(t,i))||a);return s>3&&a&&Object.defineProperty(t,i,a),a};class P extends n{getGroupContainerRef(){return this.groupContainerRef}render(){return e("div",null,this.renderLabel(),this.renderContainer(),this.renderHint())}renderLabel(){return e("vega-field-label",{"is-field-required":this.required,disabled:this.disabled,label:this.label})}renderContainer(){return e("div",{class:"container",ref:e=>this.groupContainerRef=e},e("slot",null))}renderHint(){return this.hint&&e("div",{class:"vega-hint"},e("label",null,this.hint))}}H([a()],P.prototype,"host",void 0),H([a()],P.prototype,"label",void 0),H([a()],P.prototype,"required",void 0),H([a()],P.prototype,"hint",void 0),H([a()],P.prototype,"disabled",void 0);var $=function(e,t,i,o){var r,s=arguments.length,a=s<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,o);else for(var l=e.length-1;l>=0;l--)(r=e[l])&&(a=(s<3?r(a):s>3?r(t,i,a):r(t,i))||a);return s>3&&a&&Object.defineProperty(t,i,a),a};class q extends n{watchValue(){this.changeEventEmitter.emit(this.value),y.notify(z,{host:this.host,detail:this.value})}setValue(e){this.valueGuard(e)&&(this.value=e)}valueGuard(e){switch(this.selectType){case"radio":return"string"==typeof e;case"checkbox":return Array.isArray(e)&&e.every((e=>"string"==typeof e));default:return c.warn(`Invalid selection chip group value ${e} for ${this.selectType} mode`),!1}}}$([a()],q.prototype,"host",void 0),$([a({writable:!0})],q.prototype,"value",void 0),$([a()],q.prototype,"changeEventEmitter",void 0),$([a()],q.prototype,"selectType",void 0),$([l("watchValue")],q.prototype,"watchValue",null);var U=function(e,t,i,o){var r,s=arguments.length,a=s<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,o);else for(var l=e.length-1;l>=0;l--)(r=e[l])&&(a=(s<3?r(a):s>3?r(t,i,a):r(t,i))||a);return s>3&&a&&Object.defineProperty(t,i,a),a};class K extends n{constructor(){super(...arguments),this.mutationObserver=new S({target:()=>this.host,options:{childList:!0,subtree:!0,attributes:!0,attributeFilter:["checked"]},mutationFilter:O("VEGA-SELECTION-CHIP"),callback:this.syncChipArrayAndValue.bind(this)}),this.selectionChipArray=[]}disconnectedCallback(){}componentWillLoad(){this.value&&0!==this.value.length||this.syncChipArrayAndValue()}componentDidLoad(){}watchSelectType(){this.syncChipArrayAndValue()}getSelectionChipArray(){return this.selectionChipArray}syncChipArrayAndValue(e){this.selectionChipArray=Array.from(this.host.querySelectorAll("vega-selection-chip")),"checkbox"===this.selectType?this.setValueFromCheckboxItems():this.setValueFromRadioItems(e)}setValueFromCheckboxItems(){this.valueController.setValue(this.selectionChipArray.filter((e=>e.checked)).map((e=>e.value)))}setValueFromRadioItems(e){const t=this.findAttributeMutation(e);if(t){const e=this.getCurrentChip(t);e&&e.checked&&this.valueController.setValue(e.value)}else{const e=this.getFirstCheckedChip();this.valueController.setValue(e?e.value:"")}}findAttributeMutation(e){return e&&e.find((e=>e.attributeName))}getCurrentChip(e){if(e&&"VEGA-SELECTION-CHIP"===e.target.tagName&&"checked"===e.attributeName)return e.target}getFirstCheckedChip(){return this.selectionChipArray.find((e=>e.checked))}}U([a()],K.prototype,"host",void 0),U([a()],K.prototype,"selectType",void 0),U([a()],K.prototype,"valueController",void 0),U([a()],K.prototype,"value",void 0),U([d()],K.prototype,"mutationObserver",void 0),U([l("disconnectedCallback")],K.prototype,"disconnectedCallback",null),U([l("componentWillLoad")],K.prototype,"componentWillLoad",null),U([l("componentDidLoad")],K.prototype,"componentDidLoad",null),U([l("watchSelectType")],K.prototype,"watchSelectType",null);var B=function(e,t,i,o){var r,s=arguments.length,a=s<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,o);else for(var l=e.length-1;l>=0;l--)(r=e[l])&&(a=(s<3?r(a):s>3?r(t,i,a):r(t,i))||a);return s>3&&a&&Object.defineProperty(t,i,a),a};const J=class{constructor(e){i(this,e),this.vegaChange=o(this,"vegaChange",7),this.change=o(this,"change",7),this.globalSlimmers={},this.renderer=new P,this.itemsController=new K,this.valueController=new q,this.formFieldController=new T({propertyRules:[{propertyName:"required",ruleFactory:e=>e?new I:null}],validationRulesName:"validationRules",inputContainerGetter:()=>this.renderer.getGroupContainerRef(),touchableAreaGetter:()=>this.itemsController.getSelectionChipArray(),defaultValue:e=>"checkbox"===e.selectType?[]:"",attributeGetter:e=>this[e]}),this.vegaComponentUsageRuntimeMetricsSlimmer=new h,this.changeEventEmitter=R(J,C),this.valueNotifySlimmer=f(J,"value","watchValue"),this.disabledNotifySlimmer=f(J,"disabled","watchDisabled"),this.selectTypeNotifySlimmer=f(J,"selectType","watchSelectType"),this.changeEventPrevent=new E([C],(()=>this.host),!0),this.label="",this.selectType="radio",this.value="checkbox"===this.selectType?[]:"",this.validationRules=[],this.isValid=null}watchSelectType(){}watchValue(){}watchDisabled(){}watchValidationRules(){}render(){return s(e(t,null,this.renderer.render()),this.host)}get host(){return r(this)}static get watchers(){return{selectType:["watchSelectType"],value:["watchValue"],disabled:["watchDisabled"],validationRules:["watchValidationRules"]}}};B([p()],J.prototype,"globalSlimmers",void 0),B([d()],J.prototype,"renderer",void 0),B([d()],J.prototype,"itemsController",void 0),B([d()],J.prototype,"valueController",void 0),B([d()],J.prototype,"formFieldController",void 0),B([d()],J.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),B([d()],J.prototype,"changeEventEmitter",void 0),B([d()],J.prototype,"valueNotifySlimmer",void 0),B([d()],J.prototype,"disabledNotifySlimmer",void 0),B([d()],J.prototype,"selectTypeNotifySlimmer",void 0),B([d()],J.prototype,"changeEventPrevent",void 0),J.style=':host{display:block}:host vega-field-label{margin-bottom:8px}:host .vega-hint{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px;color:rgba(var(--v-text-secondary, 107, 116, 125, 1));padding-top:4px;padding-left:8px;padding-right:8px}@media screen and (min-width: 768px) and (max-width: 1023px){:host .vega-hint{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){:host .vega-hint{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){:host .vega-hint{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}:host .vega-error{display:block;margin-top:12px;margin-left:8px;margin-right:8px;font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px;color:rgba(var(--v-text-error, 189, 41, 71, 1))}@media screen and (min-width: 768px) and (max-width: 1023px){:host .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){:host .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){:host .vega-error{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}:host .vega-hidden{display:none}';export{_ as vega_selection_chip,J as vega_selection_chip_group}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,c as s,h as i,H as e,g as a}from"./p-
|
|
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-8cdbfbc1.js";import{C as h}from"./p-853f3963.js";import{O as o,d as n}from"./p-e4aa214a.js";import{g as c,b as m,d,c as l,e as p,F as f,a as u}from"./p-b8a63b73.js";import{d as v}from"./p-ee68920f.js";import{s as b}from"./p-b81bd0bb.js";import{f as w,i as g,c as j}from"./p-320642bd.js";import{I as F}from"./p-bf8c1fe3.js";import{I as y}from"./p-018d77cc.js";import{V,I as E}from"./p-3e0299cd.js";import{c as C}from"./p-e90bae84.js";import{C as R}from"./p-d5d136a5.js";import{o as I,p as P,q as O}from"./p-f5ebc64a.js";import{C as S}from"./p-1aabe7e8.js";import{a as M}from"./p-09e7bd51.js";import"./p-0bb29d98.js";import"./p-469bc36e.js";import"./p-d3f1d3dd.js";import"./p-8960e876.js";import"./p-3542f8fe.js";import"./p-3c8b2105.js";import"./p-5608bf96.js";import"./p-38d81bde.js";import"./p-344ee7cb.js";import"./p-ef0c67c2.js";import"./p-5f377954.js";import"./p-fcd74048.js";import"./p-c677778e.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=C(D,I),this.resetEventEmitter=C(D,P),this.validateEventEmitter=C(D,O),this.childEventPrevent=new R([I,P],(()=>this.host.querySelector("vega-form")),{customPreventHandle:t=>{t.stopPropagation()}}),this.childFormValidateEventPrevent=new R([O],(()=>this.host),{customPreventHandle:t=>{t.stopPropagation()}}),this.childNotifyObserver=new S(c,(t=>this.updateInternalValidStatus(t))),this.childNodeValueChangeObserver=new S(m,(()=>this.updateInternalTouchedStatus())),this.vegaComponentUsageRuntimeMetricsSlimmer=new V,this.invalidFieldPathMap=new F(new Map,(t=>{this.invalidFieldPathMap=t,this.updateIsValidFlag()})),this.pendingValidFieldPathMap=new F(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(c,{host:this.host,detail:this.isValid})}async disconnectedCallback(){h.notify(d,{host:this.host}),h.unregister(d,this.formFieldDisconnectedObserver),h.unregister(l,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))}else await this.handleChildFormFieldElementValid(i,t)||(s.isValid=!1,s.invalidFields.push(this.getFormFieldName(i)))})),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),v(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(p,{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 b(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=w(t,"vega-form");for(;s&&s!==this.host;)i=s.dataset.vegaForm+" -> "+i,s=w(s,"vega-form")}return i}shouldVisitElement(t,s,i){return this.getFormFieldName(t)&&(!s||!t.disabled)&&(!i||g(t))}initFormFieldDisconnectedObserver(){this.formFieldDisconnectedObserver=new o(this.canAcceptFormFieldDisconnectedOperation.bind(this),this.updateInvalidFieldPath.bind(this)),h.register(d,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 o(this.canAcceptFormSubmitEvent.bind(this),this.handleSubmitEvents.bind(this)),h.register(f,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 o(this.canAcceptFormResetEvent.bind(this),this.handleResetEvents.bind(this)),h.register(u,this.formEventsObserver)}canAcceptFormResetEvent(t){return this.isElementInCurrentForm(t.host)}async handleResetEvents(){await this.reset(),this.resetEventEmitter.emit()}registerFormFieldPendingValidChangeManager(){this.formFieldPendingValidObserver=new o(this.canAcceptFormFieldPendingValid.bind(this),this.handleFieldPendingValid.bind(this)),h.register(l,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)||j(t,this.host)}async handleChildFormFieldElementValid(t,s){const i=n.getSubject(t,M);return await new Promise((e=>{const a=setTimeout((()=>{e(!0)}),2e3);h.notify(i,{host:t,message:s,promiseResolve:e,timerId:a})}))}get host(){return a(this)}static get watchers(){return{isValid:["watchIsValid"]}}};A([E()],D.prototype,"globalSlimmers",void 0),A([y()],D.prototype,"submitEventEmitter",void 0),A([y()],D.prototype,"resetEventEmitter",void 0),A([y()],D.prototype,"validateEventEmitter",void 0),A([y()],D.prototype,"childEventPrevent",void 0),A([y()],D.prototype,"childFormValidateEventPrevent",void 0),A([y()],D.prototype,"childNotifyObserver",void 0),A([y()],D.prototype,"childNodeValueChangeObserver",void 0),A([y()],D.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),D.style=":host{display:block}";export{D as vega_form}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,h as e,H as o,g as s}from"./p-
|
|
1
|
+
import{r as t,h as e,H as o,g as s}from"./p-1c298d5a.js";import{I as r}from"./p-018d77cc.js";import{V as n,I as a}from"./p-3e0299cd.js";import{s as i}from"./p-b81bd0bb.js";var c=function(t,e,o,s){var r,n=arguments.length,a=n<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,o):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,o,s);else for(var i=t.length-1;i>=0;i--)(r=t[i])&&(a=(n<3?r(a):n>3?r(e,o,a):r(e,o))||a);return n>3&&a&&Object.defineProperty(e,o,a),a};const l=class{constructor(e){t(this,e),this.globalSlimmers={},this.vegaComponentUsageRuntimeMetricsSlimmer=new n}render(){return i(e(o,null,e("vega-box",{padding:{x:"size-8",top:"size-4"}},e("vega-font",{variant:"font-footnote1-short",color:"text-secondary"},e("slot",null)))),this.host)}get host(){return s(this)}};c([a()],l.prototype,"globalSlimmers",void 0),c([r()],l.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0);export{l as vega_hint}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{h as t,r as e,c as i,H as n,g as r}from"./p-1c298d5a.js";import{M as a,a as s}from"./p-bb953c8e.js";import{M as o,a as p}from"./p-1f712313.js";import{R as l}from"./p-4c6f6317.js";import{s as h}from"./p-b81bd0bb.js";import{c as d}from"./p-86194314.js";import{C as u}from"./p-ed4a57a8.js";import{a as c,V as f,I as g}from"./p-018d77cc.js";import{s as x}from"./p-6bd5c49b.js";import{V as m,I as b}from"./p-3e0299cd.js";import{F as v}from"./p-8cdbfbc1.js";import{c as y}from"./p-e90bae84.js";import{e as w,t as j,u as z}from"./p-f5ebc64a.js";import{b as I}from"./p-b8a63b73.js";import{C as k}from"./p-853f3963.js";import{S as C,a as R}from"./p-8001b640.js";import{P as E}from"./p-12d5ed36.js";import"./p-344ee7cb.js";import"./p-0bb29d98.js";import"./p-e4aa214a.js";import"./p-320642bd.js";import"./p-469bc36e.js";import"./p-d3f1d3dd.js";import"./p-09e7bd51.js";import"./p-8960e876.js";import"./p-3542f8fe.js";import"./p-3c8b2105.js";import"./p-5608bf96.js";import"./p-38d81bde.js";import"./p-ee68920f.js";import"./p-ef0c67c2.js";import"./p-3a0a4d15.js";import"./p-c59042c0.js";const N=/^(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)])$/;class S{evaluate(t){if(!this.isAcceptedInputType(t))throw new Error(`Unexpected type of input: ${typeof t}: ${t}`);const e=N.test(t.toLowerCase());return{isValid:e,message:e?"":"Please enter the correct email format."}}canEvaluate(t,e){return e?this.isAcceptedInputType(t)&&!e.disabled&&e.visible:this.isAcceptedInputType(t)}shouldShowError(t){return!t.disabled&&t.visible&&(t.touched||t.modified)}isAcceptedInputType(t){return"string"==typeof t&&t.length>0}}class V extends f{getCopyPasteProps(){return this.disableCopyPaste?{onCopy:this.preventDefault,onCut:this.preventDefault,onPaste:this.preventDefault}:{}}preventDefault(t){t.preventDefault()}}!function(t,e,i,n){var r,a=arguments.length,s=a<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,i,n);else for(var o=t.length-1;o>=0;o--)(r=t[o])&&(s=(a<3?r(s):a>3?r(e,i,s):r(e,i))||s);a>3&&s&&Object.defineProperty(e,i,s)}([c()],V.prototype,"disableCopyPaste",void 0);var F=function(t,e,i,n){var r,a=arguments.length,s=a<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,i,n);else for(var o=t.length-1;o>=0;o--)(r=t[o])&&(s=(a<3?r(s):a>3?r(e,i,s):r(e,i))||s);return a>3&&s&&Object.defineProperty(e,i,s),s};class D extends f{render(){const e=this.hasPrefixSlot();if(this.prefixIcon||e)return t("div",{class:{"vega-input-prefix":!0,"vega-input-prefix-slot":e},part:"prefix-icon-container"},this.prefixIcon&&!e?t("vega-icon",{icon:this.prefixIcon,size:"size-16"}):null,t("slot",{name:"prefix-icon"}))}hasPrefixSlot(){return!!this.host.querySelector('[slot="prefix-icon"]')}}F([c()],D.prototype,"host",void 0),F([c()],D.prototype,"prefixIcon",void 0);class O{format(t){if(!t.length)return t;const e=Number(t.replace(/,/g,""));return!isNaN(e)&&e<=Number.MAX_SAFE_INTEGER?e.toLocaleString("en-US"):t}calculateCaretPosition(t,e){const i=this.format(t),n=t.substring(0,e),r=i.substring(0,e),a=(n.match(/,/g)||[]).length;return e+((r.match(/,/g)||[]).length-a)}}class A{constructor(t){this.maskConfig={allowNegative:!0},this.skipFormat=t=>this.maskConfig.allowNegative&&"-"===t||null!=this.maskConfig.precision&&this.maskConfig.precision>0&&t.split(".").length-1==1&&t.endsWith(".")&&!t.startsWith("."),this.maskConfig=Object.assign(Object.assign({},this.maskConfig),t),this.mask=new RegExp(this.getRegExp())}format(t){if(this.skipFormat(t))return t;const e=[...t];for(let i=t.length-1;i>=0;i--){const t=e.join("");this.inputNeedFormat(t)&&e.pop()}return e.join("")}getRegExp(){const t=this.maskConfig.allowNegative?"(\\-)?":"";let e;return e=0===this.maskConfig.precision?`^${t}(0|[1-9][0-9]*)$`:this.maskConfig.precision&&this.maskConfig.precision>0?`^${t}(0|0\\.\\d{1,${this.maskConfig.precision}}|[1-9][0-9]*(\\.\\d{1,${this.maskConfig.precision}})?)$`:`^${t}(0|0\\.\\d*|[1-9][0-9]*(\\.\\d*)?)$`,e}inputNeedFormat(t){return!this.mask.test(t)}}class L{constructor(t,e=!1){this.resetCaretPositionFlag=!1,this.formatter=t,this.resetCaretPositionFlag=e}format(t){return this.formatter(t)}calculateCaretPosition(t,e){if(!0===this.resetCaretPositionFlag)return this.format(t).length;if(E(e)){const i=t.substring(0,e);return e+(this.format(i).length-i.length)}}shouldTriggerAtInit(){return!0}}var $=function(t,e,i,n){var r,a=arguments.length,s=a<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,i,n);else for(var o=t.length-1;o>=0;o--)(r=t[o])&&(s=(a<3?r(s):a>3?r(e,i,s):r(e,i))||s);return a>3&&s&&Object.defineProperty(e,i,s),s};class _ extends C{constructor(){super(...arguments),this.getInputElementRef=()=>this.inputRef,this.getInputModeStrategy=()=>this.generateMaskStrategy("input"),this.getBlurModeStrategy=()=>this.generateMaskStrategy("blur")}setupStringFormatter(t){this.inputRef=t,this.setup()}generateMaskStrategy(t){let e=null;Array.isArray(this.maskConfig)?e=this.maskConfig.find((e=>"blur"===t?this.isBlurModeMaskConfig(e):!this.isBlurModeMaskConfig(e))):this.maskConfig&&("blur"===t&&this.isBlurModeMaskConfig(this.maskConfig)?e=this.maskConfig:"input"!==t||this.isBlurModeMaskConfig(this.maskConfig)||(e=this.maskConfig));let i=null;switch(null==e?void 0:e.type){case"phone":i=R.PHONE_MASK;break;case"taxId":i=R.TAX_ID_MASK;break;case"zipcode":i=R.ZIPCODE_MASK;break;case"thousand-comma":i=new O;break;case"number":i=new A(e.options);break;case"custom":i=new R(e.options);break;case"custom-formatter":i=new L(e.formatter,e.resetCaretPosition)}return"number"!==this.type||"input"!==t||e||(i=new A),i}isBlurModeMaskConfig(t){return"custom"===t.type&&"blur"===t.trigger}}$([c()],_.prototype,"maskConfig",void 0),$([c()],_.prototype,"type",void 0);const M=[{payloadKey:"AUTO_VALIDATION_IS_TRUE",payloadDescription:"Determines whether the input field should undergo automatic validation during the user's input",payloadValue:t=>!0===t.autoValidation},{payloadKey:"AUTO_VALIDATION_IS_FALSE",payloadDescription:"Determines whether the input field should undergo automatic validation during the user's input",payloadValue:t=>!1===t.autoValidation},{payloadKey:"EMAIL_IS_TRUE",payloadDescription:"@deprecated Enforces proper email format validation for the input field.",payloadValue:t=>!0===t.email},{payloadKey:"EMAIL_IS_FALSE",payloadDescription:"@deprecated Enforces proper email format validation for the input field.",payloadValue:t=>!1===t.email}];var P=function(t,e,i,n){var r,a=arguments.length,s=a<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,i,n);else for(var o=t.length-1;o>=0;o--)(r=t[o])&&(s=(a<3?r(s):a>3?r(e,i,s):r(e,i))||s);return a>3&&s&&Object.defineProperty(e,i,s),s};const T=class{constructor(t){e(this,t),this.vegaChange=i(this,"vegaChange",7),this.change=i(this,"change",7),this.vegaBlur=i(this,"vegaBlur",7),this.blur=i(this,"blur",7),this.vegaFocus=i(this,"vegaFocus",7),this.focus=i(this,"focus",7),this.globalSlimmers={},this.formFieldController=new v({propertyRules:[{propertyName:"required",ruleFactory:t=>t?new l:null},{propertyName:"min",ruleFactory:t=>t?new a({minValue:t}):null},{propertyName:"max",ruleFactory:t=>t?new s({maxValue:t}):null},{propertyName:"minLength",ruleFactory:t=>t?new o({minStrLength:t}):null},{propertyName:"maxLength",ruleFactory:t=>t?new p({maxStrLength:t}):null},{propertyName:"email",ruleFactory:t=>t?new S:null},{propertyName:"type",ruleFactory:t=>"email"===t?new S:null}],validationRulesName:"validationRules",defaultValue:"",attributeGetter:t=>this[t],inputContainerGetter:()=>this.inputContainerRef,touchableAreaGetter:()=>[this.inputRef]}),this.copyPasteController=new V,this.maskConfigController=new _,this.prefixSlotRenderer=new D,this.changeEventEmitter=y(T,w),this.focusEventEmitter=y(T,j),this.blurEventEmitter=y(T,z),this.vegaComponentUsageRuntimeMetricsSlimmer=new m(M),this.label="",this.value="",this.type="text",this.name="",this.autocomplete="off",this.email=!1,this.required=!1,this.min=null,this.max=null,this.minLength=null,this.maxLength=null,this.showClearIcon=!0,this.isValid=null,this.autoValidation=!0,this.validationRules=[],this.size="default",this.disabled=!1,this.hint="",this.disableCopyPaste=!1,this.focusInput=()=>{this.inputRef.focus()},this.setInputRef=t=>{t&&this.inputRef!==t&&(this.inputRef=t,this.maskConfigController.setupStringFormatter(t))},this.handleInputFocus=t=>{this.focusEventEmitter.emit(void 0,t)},this.handleInputBlur=t=>{this.blurEventEmitter.emit(void 0,t)},this.onClickClearIcon=()=>{this.value=""},this.isClearIconVisible=()=>!this.disabled&&Boolean(this.value)}watchValue(t){this.changeEventEmitter.emit(t),this.inputRef.value!==this.value&&(this.inputRef.value=this.value),k.notify(I,{host:this.host,detail:this.value})}watchValidationRules(){}watchMaskChange(){this.maskConfigController.setupStringFormatter(this.inputRef)}handleValueInput(){this.value=this.inputRef.value}async doFocus(){this.focusInput()}async doBlur(){this.inputRef.blur()}render(){return x(t("slot",null)),h(t(n,{class:"hidden"===this.type?"vega-input-hidden":"vega-input-inline-block"},this.groupDom()),this.host)}containerDom(){return t("div",{class:"vega-input-input"},t("input",Object.assign({part:"input",name:this.name,type:"number"===this.type?"text":this.type,autoComplete:this.autocomplete,value:this.value,ref:this.setInputRef,placeholder:this.placeholder,disabled:this.disabled,"aria-label":this.label||"No label defined",minLength:this.minLength,maxLength:this.maxLength,onBlur:t=>this.handleInputBlur(t),onFocus:t=>this.handleInputFocus(t)},this.copyPasteController.getCopyPasteProps())))}groupDom(){let e="vega-input-container";return this.value&&(e+=" with-value"),e+="small"===this.size?" vega-input-size-small":" vega-input-size-default",e+=this.disabled?" vega-input-disabled":"",t("div",{class:"vega-input",part:"container-wrapper"},this.renderLabelDom(),t("div",{ref:t=>this.inputContainerRef=t,part:"input-container",class:e,onClick:this.focusInput,"aria-label":"input container",role:"textbox",tabIndex:this.disabled?null:-1,onKeyDown:d()},this.prefixSlotRenderer.render(),this.containerDom(),this.showClearIcon&&this.renderClearIcon()),this.renderHintDom())}renderLabelDom(){return t("vega-field-label",{onClick:this.focusInput,"is-field-required":this.required,disabled:this.disabled,label:this.label})}renderClearIcon(){return t("div",{class:{"vega-input-clear-icon":!0,invisible:!this.isClearIconVisible()},tabIndex:-1,"aria-label":"clear input",role:"button",onClick:this.onClickClearIcon,onKeyDown:d()},t("vega-icon",{icon:"close"}))}renderHintDom(){return""!==this.hint?t("div",{class:"vega-hint"},t("label",null,this.hint)):null}get host(){return r(this)}static get watchers(){return{value:["watchValue"],validationRules:["watchValidationRules"],maskConfig:["watchMaskChange"]}}};P([b()],T.prototype,"globalSlimmers",void 0),P([g()],T.prototype,"formFieldController",void 0),P([g()],T.prototype,"copyPasteController",void 0),P([g()],T.prototype,"maskConfigController",void 0),P([g()],T.prototype,"prefixSlotRenderer",void 0),P([g()],T.prototype,"changeEventEmitter",void 0),P([g()],T.prototype,"focusEventEmitter",void 0),P([g()],T.prototype,"blurEventEmitter",void 0),P([g()],T.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),P([u()],T.prototype,"watchMaskChange",null),T.style=':host{cursor:text;display:block;text-align:left;line-height:normal}:host(.vega-input-inline-block){display:inline-block;width:100%}:host(.vega-input-hidden){display:none}vega-field-label{margin-bottom:8px}.vega-input-container{display:flex;align-items:center;border-radius:8px;gap:8px;background-color:rgba(var(--v-bg-primary, 252, 252, 252, 1));border:1px solid rgba(var(--v-border-input-field, 171, 198, 216, 1))}.vega-input-container:hover{border:1px solid rgba(var(--v-border-input-field-hover, 115, 160, 190, 1))}.vega-input-container.vega-input-disabled{background-color:rgba(var(--v-bg-secondary, 245, 247, 247, 1));border:1px solid rgba(var(--v-border-input-field-disabled, 222, 225, 227, 1))}.vega-input-container.vega-input-disabled:hover{border:1px solid rgba(var(--v-border-input-field-disabled, 222, 225, 227, 1))}.vega-input-container.vega-input-disabled input{color:rgba(var(--v-text-input-disabled, 107, 116, 125, 1))}.vega-input-container.with-value{border-width:1px;border-style:solid;border-radius:8px}.vega-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))}.vega-input-container.error{border:1px solid rgba(var(--v-border-input-field-danger, 230, 50, 87, 1))}.vega-input-container.error:hover{border:1px solid rgba(var(--v-border-input-field-danger-hover, 255, 87, 114, 1))}.vega-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-input-prefix{text-align:center;color:rgba(var(--v-text-secondary, 107, 116, 125, 1));font-size:0px}.vega-input-prefix.vega-input-prefix-slot{height:24px;overflow:hidden}.vega-input-input{flex:1 1 0%;position:relative}.vega-input-input input{width:100%;outline:2px solid transparent;outline-offset:2px;border-style:none;height:24px;box-sizing:border-box;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px;color:rgba(var(--v-text-primary, 32, 54, 69, 1));background-color:rgba(var(--v-bg-primary, 252, 252, 252, 1))}@media screen and (min-width: 768px) and (max-width: 1023px){.vega-input-input input{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.vega-input-input input{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.vega-input-input input{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}.vega-input-input input::placeholder{color:rgba(var(--v-text-input-placeholder, 176, 180, 181, 1))}.vega-input-size-small{padding-top:8px;padding-right:12px;padding-bottom:8px;padding-left:12px}.vega-input-size-default{padding-top:12px;padding-right:16px;padding-bottom:12px;padding-left:16px}.vega-input-input input:disabled{background-color:rgba(var(--v-bg-secondary, 245, 247, 247, 1))}.vega-hint{padding-top:12px;padding-right:8px;padding-left:8px}.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}}.vega-error{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px;color:rgba(var(--v-text-error, 189, 41, 71, 1));display:block;padding-top:12px;padding-right:8px;padding-left:8px}@media screen and (min-width: 768px) and (max-width: 1023px){.vega-error{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.vega-error{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.vega-error{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}.vega-hidden{display:none}.vega-input-clear-icon{width:16px;height:16px;cursor:pointer;color:rgba(var(--v-text-secondary, 107, 116, 125, 1))}.vega-input-clear-icon.invisible{visibility:hidden}.vega-input-clear-icon vega-icon{min-width:-webkit-min-content;min-width:-moz-min-content;min-width:min-content;flex-shrink:0}input[type=number]::-webkit-outer-spin-button,input[type=number]::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}input[type=number]{-moz-appearance:textfield}';export{T as vega_input}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,h as e,H as i,g as r}from"./p-
|
|
1
|
+
import{r as t,h as e,H as i,g as r}from"./p-1c298d5a.js";import{g as o,I as s}from"./p-16493e5b.js";import{h as v}from"./p-12d5ed36.js";import{s as a}from"./p-b81bd0bb.js";import{i as n}from"./p-6c92c2f5.js";import{a as h}from"./p-320642bd.js";import{V as c}from"./p-1cb312d1.js";import{L as l,I as x}from"./p-018d77cc.js";import{V as d,I as p}from"./p-3e0299cd.js";import"./p-3542f8fe.js";import"./p-3c8b2105.js";import"./p-3a0a4d15.js";import"./p-c59042c0.js";import"./p-9b3df371.js";import"./p-344ee7cb.js";import"./p-0c667d6a.js";import"./p-0b0c7f31.js";var g=function(t,e,i,r){var o,s=arguments.length,v=s<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)v=Reflect.decorate(t,e,i,r);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(v=(s<3?o(v):s>3?o(e,i,v):o(e,i))||v);return s>3&&v&&Object.defineProperty(e,i,v),v};const b=class{constructor(e){t(this,e),this.globalSlimmers={},this.vegaComponentUsageRuntimeMetricsSlimmer=new d,this.size="size-16",this.cloneFAIconStyles=()=>{if(this.isThirdPartyIcon(this.icon)){const t=this.getIconStyleHTML();t&&this.appendStyles(t);let e=0;const i=window.setInterval((()=>{if(!(e<10))return l.warn("[Vega] Loading Font Awesome timeout.",this.icon),void clearInterval(i);{e++;const t=this.getIconStyleHTML();if(t)return this.appendStyles(t),void clearInterval(i)}}),300)}}}watchIcon(){this.cloneFAIconStyles()}componentWillLoad(){this.cloneFAIconStyles()}render(){const t=s.findIndex((t=>t===this.icon));if(c.hasIcon(this.icon)){const{icon:t,autoSize:e}=c.getIcon(this.icon);return this.renderForVegaIconToken(t,e?null:this.size,e)}return t>-1?this.renderForVegaIconToken(o(this.icon),this.size):this.renderForThirdPartyIcon()}isThirdPartyIcon(t){return!c.hasIcon(t)&&!s.find((e=>e===t))}renderForVegaIconToken(t,r,o=!1){const s=r?this.formatAndValidSize(this.size):null;return a(e(i,{class:h([s,this.color&&n(this.color),o&&"vega-auto-size"]),innerHTML:t},e("slot",null)),this.host)}renderForThirdPartyIcon(){return a(e(i,{class:h([this.color&&n(this.color)]),style:this.formatThirdPartyIconSize(this.size)},e("i",{part:"icon",class:this.icon})),this.host)}formatAndValidSize(t){return`v-w-${t} v-h-${t}`}formatThirdPartyIconSize(t){return{"font-size":`${v[t]}px`}}appendStyles(t){var e;if(t){const i=null!==(e=this.host.shadowRoot.querySelector("#fa-icon-styles"))&&void 0!==e?e:document.createElement("style");i.id="fa-icon-styles",i.innerHTML=t,this.host.shadowRoot.appendChild(i)}}getIconStyleHTML(){var t;if(b.iconStyleCache.has(this.icon))return b.iconStyleCache.get(this.icon);{const e=document.createElement("i");e.className=this.icon,e.style.display="none",document.body.appendChild(e);const i=getComputedStyle(e);if(null===(t=i.fontFamily)||void 0===t?void 0:t.includes("Font Awesome")){const t=getComputedStyle(e,"::before"),r=getComputedStyle(e,"::after"),o=`\n\t\t\t\ti {\n\t\t\t\t\tfont-weight: ${i.fontWeight};\n\t\t\t\t\tfont-family: ${i.fontFamily};\n\t\t\t\t\tfont-style: ${i.fontStyle};\n\t\t\t\t\tposition: ${i.position};\n\t\t\t\t\tletter-spacing: ${i.letterSpacing};\n\t\t\t\t}\n\t\t\t\ti::before {\n\t\t\t\t\tcontent: ${t.content};\n\t\t\t\t\tposition: ${t.position};\n\t\t\t\t\topacity: ${t.opacity};\n\t\t\t\t}\n\t\t\t\ti::after {\n\t\t\t\t\tcontent: ${r.content};\n\t\t\t\t\tposition: ${r.position};\n\t\t\t\t\topacity: ${r.opacity};\n\t\t\t\t}\n\t\t\t`.replace(/[\n\t]/gi,"");return b.iconStyleCache.set(this.icon,o),document.body.removeChild(e),o}return document.body.removeChild(e),null}}get host(){return r(this)}static get watchers(){return{icon:["watchIcon"]}}};b.iconStyleCache=new Map,g([p()],b.prototype,"globalSlimmers",void 0),g([x()],b.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),b.style=":host(.v-text-primary),.v-text-primary{color:rgba(var(--v-text-primary, 32, 54, 69, 1))}:host(.v-text-secondary),.v-text-secondary{color:rgba(var(--v-text-secondary, 107, 116, 125, 1))}:host(.v-text-inverted-primary),.v-text-inverted-primary{color:rgba(var(--v-text-inverted-primary, 252, 252, 252, 1))}:host(.v-text-inverted-secondary),.v-text-inverted-secondary{color:rgba(var(--v-text-inverted-secondary, 188, 186, 213, 1))}:host(.v-text-black),.v-text-black{color:rgba(var(--v-text-black, 32, 54, 69, 1))}:host(.v-text-white),.v-text-white{color:rgba(var(--v-text-white, 252, 252, 252, 1))}:host(.v-text-brand),.v-text-brand{color:rgba(var(--v-text-brand, 51, 57, 61, 1))}:host(.v-text-danger-link),.v-text-danger-link{color:rgba(var(--v-text-danger-link, 230, 50, 87, 1))}:host(.v-text-danger-link-hover),.v-text-danger-link-hover{color:rgba(var(--v-text-danger-link-hover, 233, 71, 104, 1))}:host(.v-text-danger-link-active),.v-text-danger-link-active{color:rgba(var(--v-text-danger-link-active, 189, 41, 71, 1))}:host(.v-text-danger-link-focus),.v-text-danger-link-focus{color:rgba(var(--v-text-danger-link-focus, 240, 52, 91, 1))}:host(.v-text-danger-link-visited),.v-text-danger-link-visited{color:rgba(var(--v-text-danger-link-visited, 230, 50, 87, 1))}:host(.v-text-disabled),.v-text-disabled{color:rgba(var(--v-text-disabled, 176, 180, 181, 1))}:host(.v-text-error),.v-text-error{color:rgba(var(--v-text-error, 189, 41, 71, 1))}:host(.v-text-input-disabled),.v-text-input-disabled{color:rgba(var(--v-text-input-disabled, 107, 116, 125, 1))}:host(.v-text-input-placeholder),.v-text-input-placeholder{color:rgba(var(--v-text-input-placeholder, 176, 180, 181, 1))}:host(.v-text-link),.v-text-link{color:rgba(var(--v-text-link, 19, 98, 226, 1))}:host(.v-text-link-hover),.v-text-link-hover{color:rgba(var(--v-text-link-hover, 4, 112, 236, 1))}:host(.v-text-link-active),.v-text-link-active{color:rgba(var(--v-text-link-active, 29, 65, 195, 1))}:host(.v-text-link-focus),.v-text-link-focus{color:rgba(var(--v-text-link-focus, 4, 112, 236, 1))}:host(.v-text-link-visited),.v-text-link-visited{color:rgba(var(--v-text-link-visited, 95, 56, 206, 1))}:host(.v-text-on-action),.v-text-on-action{color:rgba(var(--v-text-on-action, 252, 252, 252, 1))}:host(.v-text-on-danger),.v-text-on-danger{color:rgba(var(--v-text-on-danger, 252, 252, 252, 1))}:host(.v-text-on-disabled),.v-text-on-disabled{color:rgba(var(--v-text-on-disabled, 252, 252, 252, 1))}:host(.v-text-sidebar-link),.v-text-sidebar-link{color:rgba(var(--v-text-sidebar-link, 188, 186, 213, 1))}:host(.v-text-sidebar-link-hover),.v-text-sidebar-link-hover{color:rgba(var(--v-text-sidebar-link-hover, 18, 18, 39, 1))}:host(.v-text-sidebar-link-selected),.v-text-sidebar-link-selected{color:rgba(var(--v-text-sidebar-link-selected, 252, 252, 252, 1))}:host(.v-text-site-footer-link),.v-text-site-footer-link{color:rgba(var(--v-text-site-footer-link, 171, 198, 216, 1))}:host(.v-text-site-footer-link-hover),.v-text-site-footer-link-hover{color:rgba(var(--v-text-site-footer-link-hover, 199, 217, 229, 1))}:host(.v-text-site-footer-link-active),.v-text-site-footer-link-active{color:rgba(var(--v-text-site-footer-link-active, 143, 179, 203, 1))}:host(.v-text-success),.v-text-success{color:rgba(var(--v-text-success, 1, 128, 31, 1))}:host(.v-text-inverted-success),.v-text-inverted-success{color:rgba(var(--v-text-inverted-success, 89, 217, 119, 1))}:host(.v-text-accent1-primary),.v-text-accent1-primary{color:rgba(var(--v-text-accent1-primary, 115, 230, 220, 1))}:host(.v-text-accent2-primary),.v-text-accent2-primary{color:rgba(var(--v-text-accent2-primary, 128, 107, 255, 1))}:host(.v-text-accent3-primary),.v-text-accent3-primary{color:rgba(var(--v-text-accent3-primary, 255, 220, 131, 1))}:host(.v-text-accent4-primary),.v-text-accent4-primary{color:rgba(var(--v-text-accent4-primary, 255, 149, 113, 1))}:host(.v-text-accent5-primary),.v-text-accent5-primary{color:rgba(var(--v-text-accent5-primary, 0, 187, 255, 1))}:host(.v-text-accent6-primary),.v-text-accent6-primary{color:rgba(var(--v-text-accent6-primary, 240, 52, 91, 1))}:host(.v-text-accent7-primary),.v-text-accent7-primary{color:rgba(var(--v-text-accent7-primary, 37, 159, 159, 1))}:host(.v-text-accent8-primary),.v-text-accent8-primary{color:rgba(var(--v-text-accent8-primary, 86, 61, 130, 1))}:host(.v-text-accent9-primary),.v-text-accent9-primary{color:rgba(var(--v-text-accent9-primary, 255, 191, 63, 1))}:host(.v-text-accent10-primary),.v-text-accent10-primary{color:rgba(var(--v-text-accent10-primary, 237, 122, 35, 1))}:host(.v-w-0),.v-w-0{width:0px}:host(.v-w-size-0),.v-w-size-0{width:0px}:host(.v-w-size-4),.v-w-size-4{width:4px}:host(.v-w-size-8),.v-w-size-8{width:8px}:host(.v-w-size-12),.v-w-size-12{width:12px}:host(.v-w-size-16),.v-w-size-16{width:16px}:host(.v-w-size-20),.v-w-size-20{width:20px}:host(.v-w-size-24),.v-w-size-24{width:24px}:host(.v-w-size-32),.v-w-size-32{width:32px}:host(.v-w-size-40),.v-w-size-40{width:40px}:host(.v-w-size-48),.v-w-size-48{width:48px}:host(.v-w-size-64),.v-w-size-64{width:64px}:host(.v-w-size-72),.v-w-size-72{width:72px}:host(.v-w-size-80),.v-w-size-80{width:80px}:host(.v-w-size-112),.v-w-size-112{width:112px}:host(.v-w-size-2),.v-w-size-2{width:2px}:host(.v-h-0),.v-h-0{height:0px}:host(.v-h-size-0),.v-h-size-0{height:0px}:host(.v-h-size-4),.v-h-size-4{height:4px}:host(.v-h-size-8),.v-h-size-8{height:8px}:host(.v-h-size-12),.v-h-size-12{height:12px}:host(.v-h-size-16),.v-h-size-16{height:16px}:host(.v-h-size-20),.v-h-size-20{height:20px}:host(.v-h-size-24),.v-h-size-24{height:24px}:host(.v-h-size-32),.v-h-size-32{height:32px}:host(.v-h-size-40),.v-h-size-40{height:40px}:host(.v-h-size-48),.v-h-size-48{height:48px}:host(.v-h-size-64),.v-h-size-64{height:64px}:host(.v-h-size-72),.v-h-size-72{height:72px}:host(.v-h-size-80),.v-h-size-80{height:80px}:host(.v-h-size-112),.v-h-size-112{height:112px}:host(.v-h-size-2),.v-h-size-2{height:2px}:host{display:inline-flex;user-select:none}i{line-height:1}:host(:not(.vega-auto-size)) ::slotted(svg){width:100%;height:100%}";export{b as vega_icon}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
class t{static setVegaTelemetryLogLevel(t){this.logLevel=t}static log(...t){this.shouldLog("log")&&console.log(`%c${this.LOG_PREFIX_STR}`,this.LOG_PREFIX_STYLE,...t)}static debug(...t){this.shouldLog("debug")&&console.debug(`%c${this.LOG_PREFIX_STR}`,this.LOG_PREFIX_STYLE,...t)}static warn(...t){this.shouldLog("warn")&&console.warn(`%c${this.LOG_PREFIX_STR}`,this.LOG_PREFIX_STYLE,...t)}static error(...t){this.shouldLog("error")&&console.error(`%c${this.LOG_PREFIX_STR}`,this.LOG_PREFIX_STYLE,...t)}static shouldLog(t){return this.LOG_LEVELS.indexOf(t)<=this.LOG_LEVELS.indexOf(this.logLevel)}}t.logLevel="off",t.LOG_PREFIX_STR="[VegaTelemetry]",t.LOG_PREFIX_STYLE="font-weight: bold",t.LOG_LEVELS=["off","error","warn","debug","log"],Object.assign(globalThis,{LogUtility:t});var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function s(t,e,s){return t(s={path:e,exports:{},require:function(){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}()}},s.exports),s.exports}var r=s((function(t){!function(){var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s={rotl:function(t,e){return t<<e|t>>>32-e},rotr:function(t,e){return t<<32-e|t>>>e},endian:function(t){if(t.constructor==Number)return 16711935&s.rotl(t,8)|4278255360&s.rotl(t,24);for(var e=0;e<t.length;e++)t[e]=s.endian(t[e]);return t},randomBytes:function(t){for(var e=[];t>0;t--)e.push(Math.floor(256*Math.random()));return e},bytesToWords:function(t){for(var e=[],s=0,r=0;s<t.length;s++,r+=8)e[r>>>5]|=t[s]<<24-r%32;return e},wordsToBytes:function(t){for(var e=[],s=0;s<32*t.length;s+=8)e.push(t[s>>>5]>>>24-s%32&255);return e},bytesToHex:function(t){for(var e=[],s=0;s<t.length;s++)e.push((t[s]>>>4).toString(16)),e.push((15&t[s]).toString(16));return e.join("")},hexToBytes:function(t){for(var e=[],s=0;s<t.length;s+=2)e.push(parseInt(t.substr(s,2),16));return e},bytesToBase64:function(t){for(var s=[],r=0;r<t.length;r+=3)for(var i=t[r]<<16|t[r+1]<<8|t[r+2],n=0;n<4;n++)s.push(8*r+6*n<=8*t.length?e.charAt(i>>>6*(3-n)&63):"=");return s.join("")},base64ToBytes:function(t){t=t.replace(/[^A-Z0-9+\/]/gi,"");for(var s=[],r=0,i=0;r<t.length;i=++r%4)0!=i&&s.push((e.indexOf(t.charAt(r-1))&Math.pow(2,-2*i+8)-1)<<2*i|e.indexOf(t.charAt(r))>>>6-2*i);return s}};t.exports=s}()})),i={utf8:{stringToBytes:function(t){return i.bin.stringToBytes(unescape(encodeURIComponent(t)))},bytesToString:function(t){return decodeURIComponent(escape(i.bin.bytesToString(t)))}},bin:{stringToBytes:function(t){for(var e=[],s=0;s<t.length;s++)e.push(255&t.charCodeAt(s));return e},bytesToString:function(t){for(var e=[],s=0;s<t.length;s++)e.push(String.fromCharCode(t[s]));return e.join("")}}},n=i,o=function(t){return null!=t&&(c(t)||function(t){return"function"==typeof t.readFloatLE&&"function"==typeof t.slice&&c(t.slice(0,0))}(t)||!!t._isBuffer)};function c(t){return!!t.constructor&&"function"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)}var a=s((function(t){!function(){var e=r,s=n.utf8,i=o,c=n.bin,a=function(t,r){t.constructor==String?t=r&&"binary"===r.encoding?c.stringToBytes(t):s.stringToBytes(t):i(t)?t=Array.prototype.slice.call(t,0):Array.isArray(t)||t.constructor===Uint8Array||(t=t.toString());for(var n=e.bytesToWords(t),o=8*t.length,h=1732584193,u=-271733879,l=-1732584194,d=271733878,f=0;f<n.length;f++)n[f]=16711935&(n[f]<<8|n[f]>>>24)|4278255360&(n[f]<<24|n[f]>>>8);n[o>>>5]|=128<<o%32,n[14+(o+64>>>9<<4)]=o;var g=a._ff,m=a._gg,p=a._hh,y=a._ii;for(f=0;f<n.length;f+=16){var b=h,w=u,v=l,T=d;h=g(h,u,l,d,n[f+0],7,-680876936),d=g(d,h,u,l,n[f+1],12,-389564586),l=g(l,d,h,u,n[f+2],17,606105819),u=g(u,l,d,h,n[f+3],22,-1044525330),h=g(h,u,l,d,n[f+4],7,-176418897),d=g(d,h,u,l,n[f+5],12,1200080426),l=g(l,d,h,u,n[f+6],17,-1473231341),u=g(u,l,d,h,n[f+7],22,-45705983),h=g(h,u,l,d,n[f+8],7,1770035416),d=g(d,h,u,l,n[f+9],12,-1958414417),l=g(l,d,h,u,n[f+10],17,-42063),u=g(u,l,d,h,n[f+11],22,-1990404162),h=g(h,u,l,d,n[f+12],7,1804603682),d=g(d,h,u,l,n[f+13],12,-40341101),l=g(l,d,h,u,n[f+14],17,-1502002290),h=m(h,u=g(u,l,d,h,n[f+15],22,1236535329),l,d,n[f+1],5,-165796510),d=m(d,h,u,l,n[f+6],9,-1069501632),l=m(l,d,h,u,n[f+11],14,643717713),u=m(u,l,d,h,n[f+0],20,-373897302),h=m(h,u,l,d,n[f+5],5,-701558691),d=m(d,h,u,l,n[f+10],9,38016083),l=m(l,d,h,u,n[f+15],14,-660478335),u=m(u,l,d,h,n[f+4],20,-405537848),h=m(h,u,l,d,n[f+9],5,568446438),d=m(d,h,u,l,n[f+14],9,-1019803690),l=m(l,d,h,u,n[f+3],14,-187363961),u=m(u,l,d,h,n[f+8],20,1163531501),h=m(h,u,l,d,n[f+13],5,-1444681467),d=m(d,h,u,l,n[f+2],9,-51403784),l=m(l,d,h,u,n[f+7],14,1735328473),h=p(h,u=m(u,l,d,h,n[f+12],20,-1926607734),l,d,n[f+5],4,-378558),d=p(d,h,u,l,n[f+8],11,-2022574463),l=p(l,d,h,u,n[f+11],16,1839030562),u=p(u,l,d,h,n[f+14],23,-35309556),h=p(h,u,l,d,n[f+1],4,-1530992060),d=p(d,h,u,l,n[f+4],11,1272893353),l=p(l,d,h,u,n[f+7],16,-155497632),u=p(u,l,d,h,n[f+10],23,-1094730640),h=p(h,u,l,d,n[f+13],4,681279174),d=p(d,h,u,l,n[f+0],11,-358537222),l=p(l,d,h,u,n[f+3],16,-722521979),u=p(u,l,d,h,n[f+6],23,76029189),h=p(h,u,l,d,n[f+9],4,-640364487),d=p(d,h,u,l,n[f+12],11,-421815835),l=p(l,d,h,u,n[f+15],16,530742520),h=y(h,u=p(u,l,d,h,n[f+2],23,-995338651),l,d,n[f+0],6,-198630844),d=y(d,h,u,l,n[f+7],10,1126891415),l=y(l,d,h,u,n[f+14],15,-1416354905),u=y(u,l,d,h,n[f+5],21,-57434055),h=y(h,u,l,d,n[f+12],6,1700485571),d=y(d,h,u,l,n[f+3],10,-1894986606),l=y(l,d,h,u,n[f+10],15,-1051523),u=y(u,l,d,h,n[f+1],21,-2054922799),h=y(h,u,l,d,n[f+8],6,1873313359),d=y(d,h,u,l,n[f+15],10,-30611744),l=y(l,d,h,u,n[f+6],15,-1560198380),u=y(u,l,d,h,n[f+13],21,1309151649),h=y(h,u,l,d,n[f+4],6,-145523070),d=y(d,h,u,l,n[f+11],10,-1120210379),l=y(l,d,h,u,n[f+2],15,718787259),u=y(u,l,d,h,n[f+9],21,-343485551),h=h+b>>>0,u=u+w>>>0,l=l+v>>>0,d=d+T>>>0}return e.endian([h,u,l,d])};a._ff=function(t,e,s,r,i,n,o){var c=t+(e&s|~e&r)+(i>>>0)+o;return(c<<n|c>>>32-n)+e},a._gg=function(t,e,s,r,i,n,o){var c=t+(e&r|s&~r)+(i>>>0)+o;return(c<<n|c>>>32-n)+e},a._hh=function(t,e,s,r,i,n,o){var c=t+(e^s^r)+(i>>>0)+o;return(c<<n|c>>>32-n)+e},a._ii=function(t,e,s,r,i,n,o){var c=t+(s^(e|~r))+(i>>>0)+o;return(c<<n|c>>>32-n)+e},a._blocksize=16,a._digestsize=16,t.exports=function(t,s){if(null==t)throw new Error("Illegal argument "+t);var r=e.wordsToBytes(a(t,s));return s&&s.asBytes?r:s&&s.asString?c.bytesToString(r):e.bytesToHex(r)}}()}));class h{constructor(t,e){this.environment=t,this.payload=e,this.id=a(JSON.stringify({environment:t,payload:e}))}}const u=new class{constructor(){this.runtimeMetrics=[],this.runtimeMetricsIds=new Set([])}collect(e){t.debug("Collecting the runtime metrics payload"),this.runtimeMetricsIds.has(e.id)||(this.runtimeMetrics.push(e),this.runtimeMetricsIds.add(e.id))}getRuntimeMetrics(){return this.runtimeMetrics}deleteRuntimeMetrics(t){this.runtimeMetrics=this.runtimeMetrics.filter((e=>(this.runtimeMetricsIds.delete(e.id),!t.includes(e))))}},l=new class{constructor(){this.localStorage=null;try{this.localStorage=globalThis.localStorage}catch(e){t.error("Failed to access browser localStorage:",e)}}setItem(t,e){this.localStorage&&this.localStorage.setItem(t,JSON.stringify(e))}getItem(t){if(this.localStorage){const e=this.localStorage.getItem(t);if(e)return JSON.parse(e)}return null}removeItem(t){this.localStorage&&this.localStorage.removeItem(t)}clear(){this.localStorage&&this.localStorage.clear()}findKeys(t){const e=[];if(this.localStorage)for(let s=0;s<this.localStorage.length;s++){const r=this.localStorage.key(s);r&&r.includes(t)&&e.push(r)}return e}};class d{isDuplicate(t){return this.getRuntimeMetricsIds().includes(t.id)}cleanup(){t.debug("Vega telemetry start clear the old vega version runtime metrics ids in localStorage"),l.findKeys(d.RUNTIME_METRICS_IDS_KEY_PREFIX).map((t=>{t!==d.RUNTIME_METRICS_IDS_KEY_PREFIX+globalThis.VegaEnvInfo.version&&l.removeItem(t)}))}getRuntimeMetricsIds(){return l.getItem(d.RUNTIME_METRICS_IDS_KEY_PREFIX+globalThis.VegaEnvInfo.version)||[]}onDispatched(e){t.debug("Vega telemetry records runtime metrics ids in localStorage");const s=e.map((t=>t.id));l.setItem(d.RUNTIME_METRICS_IDS_KEY_PREFIX+globalThis.VegaEnvInfo.version,[...new Set([...this.getRuntimeMetricsIds(),...s])])}}d.RUNTIME_METRICS_IDS_KEY_PREFIX="vega-telemetry-runtime-metrics-ids-";const f=new class{constructor(t){this.strategies=t}checkByStrategies(e){t.debug("Start check duplicate payload by strategies");for(const t of this.strategies)return t.isDuplicate(e);return!1}updateDispatchedRuntimeMetrics(t){for(const e of this.strategies)e.onDispatched(t)}clearRuntimeMetrics(){try{for(const t of this.strategies)t.cleanup()}catch(e){t.error("Vega telemetry failed to clear runtime metrics in localStorage:",e)}}}([new d]);class g{constructor(t,e,s,r,i){this.vegaVersion=t,this.framework=e,this.browser=s,this.os=r,this.origin=i}}class m{constructor(t,e){this.name=t,this.version=e}}class p{constructor(t,e){this.name=t,this.version=e}}class y{constructor(){this.commonVersionRegExp=/version\/(\d+(\.?_?\d+)+)/i}getVersion(t){return this.getPCTerminalMatch(this.versionRegExp[0],t)}isNameMatch(t){return this.nameRegExp.some((e=>e.test(t)))}predict(t){const e=this.name,s=this.getVersion(t);return new m(e,s)}getPCTerminalMatch(t,e){const s=e.match(t);return s&&s.length>0&&s[1]||""}getMobileTerminalMatch(t,e){const s=e.match(t);return s&&s.length>1&&s[2]||""}}class b extends y{constructor(){super(...arguments),this.name="IE",this.nameRegExp=[/msie|trident/i],this.versionRegExp=[/(?:msie |rv:)(\d+(\.?_?\d+)+)/i]}}class w extends y{constructor(){super(...arguments),this.name="Edge",this.nameRegExp=[/\sedg\//i,/edg([ae]|ios)/i],this.versionRegExp=[/\sedg\/(\d+(\.?_?\d+)+)/i,/edg([ae]|ios)\/(\d+(\.?_?\d+)+)/i]}getVersion(t){return this.nameRegExp[0].test(t)?this.getPCTerminalMatch(this.versionRegExp[0],t):this.getMobileTerminalMatch(this.versionRegExp[1],t)}}class v extends y{constructor(){super(...arguments),this.name="FireFox",this.nameRegExp=[/firefox|iceweasel|fxios/i],this.versionRegExp=[/(?:firefox|iceweasel|fxios)[\s/](\d+(\.?_?\d+)+)/i]}}class T extends y{constructor(){super(...arguments),this.name="Chrome",this.nameRegExp=[/chromium/i,/^(?!.*\s(edg|edga)\/).*chrome|crios|crmo/i],this.versionRegExp=[/chromium[\s/](\d+(\.?_?\d+)+)/i,/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i]}getVersion(t){let e="";return e=this.nameRegExp[0].test(t)?this.getPCTerminalMatch(this.versionRegExp[0],t)||this.getPCTerminalMatch(this.commonVersionRegExp,t):this.getPCTerminalMatch(this.versionRegExp[1],t),e}}class x extends y{constructor(){super(...arguments),this.name="Safari",this.nameRegExp=[/^(?!.*\s(firefox|iceweasel|fxios)\/).*(safari|applewebkit)/i],this.versionRegExp=[/version\/(\d+(\.?_?\d+)+)/i]}}class E{detect(t){if(t)for(const e of this.predictors)if(e.isNameMatch(t))return e.predict(t);return{name:"Other",version:""}}}class S extends E{constructor(){super(...arguments),this.predictors=[new T,new w,new x,new v,new b]}}class V{constructor(){this.commonVersionRegExp=/version\/(\d+(\.?_?\d+)+)/i,this.versionDelimiterRegExp=/[\s_]/g}isNameMatch(t){return this.nameRegExp.some((e=>e.test(t)))}predict(t){const e=this.getName(t),s=this.getVersion(t);return new p(e,s)}getName(t){const e=t.match(/\((.*?)\)/);return e&&e[1]||"Other"}getVersion(t){return this.getCommonVersion(t)}getCommonVersion(t,e=!1){let s=this.getMainstreamOSMatch(this.versionRegExp[0]||this.commonVersionRegExp,t);return s&&e&&(s=s.replace(this.versionDelimiterRegExp,".")),s}getMainstreamOSMatch(t,e){const s=e.match(t);return s&&s.length>0&&s[1]||""}}class _ extends V{constructor(){super(...arguments),this.nameRegExp=[/windows /i],this.versionRegExp=[/windows ((nt|xp)( \d\d?.\d)?)/i]}}class M extends V{constructor(){super(...arguments),this.nameRegExp=[/macintosh/i],this.versionRegExp=[/mac os x (\d+(\.?_?\d+)+)/i]}getVersion(t){return this.getCommonVersion(t,!0)}}class O extends V{constructor(){super(...arguments),this.nameRegExp=[/(ipod|iphone|ipad)/i],this.versionRegExp=[/os (\d+([\s_]\d+)*) like mac os x/i]}getVersion(t){return this.getCommonVersion(t,!0)}}class R extends V{constructor(){super(...arguments),this.nameRegExp=[/android/i],this.versionRegExp=[/android[\s/-](\d+(\.\d+)*)/i]}}class A extends V{constructor(){super(...arguments),this.nameRegExp=[/linux/i],this.versionRegExp=[]}}class C extends E{constructor(){super(...arguments),this.predictors=[new M,new _,new O,new R,new A]}}function L(e){t.debug("Vega telemetry start clear runtime metrics in localStorage"),"requestIdleCallback"in globalThis?globalThis.requestIdleCallback((()=>{e()})):setTimeout((()=>{e()}),100)}function N(){return globalThis.location.origin}function I(){return globalThis.navigator.userAgent}function k(){try{return globalThis&&!!globalThis.localStorage&&!!globalThis.navigator&&!!globalThis.location}catch(e){return t.debug("Failed to access browser localStorage, navigator or location:",e),!1}}const B=new class{constructor(){this.browserDetector=new S,this.osDetector=new C}generate(){return this.environment||(this.environment=new g(globalThis.VegaEnvInfo.version,globalThis.VegaEnvInfo.framework,this.browserDetector.detect(I()),this.osDetector.detect(I()),N())),this.environment}},F=new class{emit(e){const s=new h(B.generate(),e);t.debug("Vega telemetry start emit runtime metrics"),f.checkByStrategies(s)||(t.debug("The payload has not been collected by strategies check"),u.collect(s))}};class U{static post(t,e){const s=new globalThis.Blob([JSON.stringify(e)]);return globalThis.navigator.sendBeacon(U.getVegaTelemetryApimHost()+t+`?subscription-key=${U.getVegaTelemetryApimSubKey()}`,s)}static getVegaTelemetryApimHost(){return N().includes("localhost")?"http://localhost:3334":"https://vega-telemetry-apim-dev.azure-api.net"}static getVegaTelemetryApimSubKey(){return"8bc15c7c8b514d1bb92825b0b17a1731"}}class D{constructor(t,e,s){this.environment=t,this.payloads=e,this.triggerEvent=s}}var $,G,J;!function(t){t.ComponentUsagePayload="componentUsage",t.FeatureFlagOverriddenPayload="featureFlagOverridden"}($||($={})),function(t){t.VisibilityChange="visibilitychange",t.PageHide="pagehide"}(G||(G={})),function(t){t.ENABLE_COLLECT_COMPONENTS_USAGE="VEGA_TELEMETRY.ENABLE_COLLECT_COMPONENTS_USAGE",t.ENABLE_COLLECT_FEATURE_FLAG_OVERRIDDEN="VEGA_TELEMETRY.ENABLE_COLLECT_FEATURE_FLAG_OVERRIDDEN"}(J||(J={}));const j=new class{constructor(){this.dispatchedRuntimeMetrics=[]}dispatch(e){try{const s=this.generateRuntimeMetricsSubmitDto(e);s&&(t.debug("Vega telemetry start dispatch runtime metrics"),U.post("/runtime-metrics",s),f.updateDispatchedRuntimeMetrics(this.dispatchedRuntimeMetrics),u.deleteRuntimeMetrics(this.dispatchedRuntimeMetrics),t.debug("The runtime metrics have been dispatched successfully!"))}catch(e){t.error("Vega telemetry failed to dispatch:",e)}}generateRuntimeMetricsSubmitDto(t){const e=this.filterRuntimeMetrics();return e.length>0?(this.dispatchedRuntimeMetrics=e,new D(B.generate(),e.map((t=>t.payload)),t)):null}filterRuntimeMetrics(){const t=q.getFeatureFlagController();return t?u.getRuntimeMetrics().filter((e=>t.isEnabled(e.payload.type===$.ComponentUsagePayload?J.ENABLE_COLLECT_COMPONENTS_USAGE:J.ENABLE_COLLECT_FEATURE_FLAG_OVERRIDDEN)&&!f.checkByStrategies(e))):[]}},q=new class{register(e){var s;t.debug("Vega telemetry start register 'pagehide' and 'visibilitychange' event"),s=()=>j.dispatch(G.VisibilityChange),"visibilityState"in document&&document.addEventListener("visibilitychange",(function(){"hidden"===document.visibilityState&&s()})),globalThis.addEventListener("pagehide",(()=>j.dispatch(G.PageHide))),L((()=>f.clearRuntimeMetrics())),this.featureFlagController=e}getFeatureFlagController(){return this.featureFlagController}};class H{constructor(t,e,s){this.type=t,this.componentName=e,this.data=s}}class K{constructor(t,e,s){this.type=t,this.featureFlagName=e,this.featureFlagOverriddenValue=s}}const P=new class{emit(e,s){L((()=>{try{if(k())switch(e){case $.ComponentUsagePayload:F.emit(new H(e,s.componentName,s.data));break;case $.FeatureFlagOverriddenPayload:F.emit(new K(e,s.featureFlagName,s.featureFlagOverriddenValue));break;default:throw new Error(`Unknown runtime metrics payload type: ${e}`)}}catch(e){t.error("Vega telemetry failed to emit runtime metrics:",e)}}))}init(e){try{k()&&q.register(e)}catch(e){t.error("Vega telemetry failed to register event:",e)}}},Y=Object.freeze({__proto__:null,default:P});export{P as V,e as a,s as c,Y as i}
|
|
1
|
+
class t{static setVegaTelemetryLogLevel(t){this.logLevel=t}static log(...t){this.shouldLog("log")&&console.log(`%c${this.LOG_PREFIX_STR}`,this.LOG_PREFIX_STYLE,...t)}static debug(...t){this.shouldLog("debug")&&console.debug(`%c${this.LOG_PREFIX_STR}`,this.LOG_PREFIX_STYLE,...t)}static warn(...t){this.shouldLog("warn")&&console.warn(`%c${this.LOG_PREFIX_STR}`,this.LOG_PREFIX_STYLE,...t)}static error(...t){this.shouldLog("error")&&console.error(`%c${this.LOG_PREFIX_STR}`,this.LOG_PREFIX_STYLE,...t)}static shouldLog(t){return this.LOG_LEVELS.indexOf(t)<=this.LOG_LEVELS.indexOf(this.logLevel)}}t.logLevel="off",t.LOG_PREFIX_STR="[VegaTelemetry]",t.LOG_PREFIX_STYLE="font-weight: bold",t.LOG_LEVELS=["off","error","warn","debug","log"],Object.assign(globalThis,{LogUtility:t});var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function s(t,e,s){return t(s={path:e,exports:{},require:function(){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}()}},s.exports),s.exports}var r=s((function(t){!function(){var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s={rotl:function(t,e){return t<<e|t>>>32-e},rotr:function(t,e){return t<<32-e|t>>>e},endian:function(t){if(t.constructor==Number)return 16711935&s.rotl(t,8)|4278255360&s.rotl(t,24);for(var e=0;e<t.length;e++)t[e]=s.endian(t[e]);return t},randomBytes:function(t){for(var e=[];t>0;t--)e.push(Math.floor(256*Math.random()));return e},bytesToWords:function(t){for(var e=[],s=0,r=0;s<t.length;s++,r+=8)e[r>>>5]|=t[s]<<24-r%32;return e},wordsToBytes:function(t){for(var e=[],s=0;s<32*t.length;s+=8)e.push(t[s>>>5]>>>24-s%32&255);return e},bytesToHex:function(t){for(var e=[],s=0;s<t.length;s++)e.push((t[s]>>>4).toString(16)),e.push((15&t[s]).toString(16));return e.join("")},hexToBytes:function(t){for(var e=[],s=0;s<t.length;s+=2)e.push(parseInt(t.substr(s,2),16));return e},bytesToBase64:function(t){for(var s=[],r=0;r<t.length;r+=3)for(var i=t[r]<<16|t[r+1]<<8|t[r+2],n=0;n<4;n++)s.push(8*r+6*n<=8*t.length?e.charAt(i>>>6*(3-n)&63):"=");return s.join("")},base64ToBytes:function(t){t=t.replace(/[^A-Z0-9+\/]/gi,"");for(var s=[],r=0,i=0;r<t.length;i=++r%4)0!=i&&s.push((e.indexOf(t.charAt(r-1))&Math.pow(2,-2*i+8)-1)<<2*i|e.indexOf(t.charAt(r))>>>6-2*i);return s}};t.exports=s}()})),i={utf8:{stringToBytes:function(t){return i.bin.stringToBytes(unescape(encodeURIComponent(t)))},bytesToString:function(t){return decodeURIComponent(escape(i.bin.bytesToString(t)))}},bin:{stringToBytes:function(t){for(var e=[],s=0;s<t.length;s++)e.push(255&t.charCodeAt(s));return e},bytesToString:function(t){for(var e=[],s=0;s<t.length;s++)e.push(String.fromCharCode(t[s]));return e.join("")}}},n=i,o=function(t){return null!=t&&(c(t)||function(t){return"function"==typeof t.readFloatLE&&"function"==typeof t.slice&&c(t.slice(0,0))}(t)||!!t._isBuffer)};function c(t){return!!t.constructor&&"function"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)}var a=s((function(t){!function(){var e=r,s=n.utf8,i=o,c=n.bin,a=function(t,r){t.constructor==String?t=r&&"binary"===r.encoding?c.stringToBytes(t):s.stringToBytes(t):i(t)?t=Array.prototype.slice.call(t,0):Array.isArray(t)||t.constructor===Uint8Array||(t=t.toString());for(var n=e.bytesToWords(t),o=8*t.length,h=1732584193,u=-271733879,l=-1732584194,d=271733878,f=0;f<n.length;f++)n[f]=16711935&(n[f]<<8|n[f]>>>24)|4278255360&(n[f]<<24|n[f]>>>8);n[o>>>5]|=128<<o%32,n[14+(o+64>>>9<<4)]=o;var g=a._ff,m=a._gg,p=a._hh,y=a._ii;for(f=0;f<n.length;f+=16){var b=h,w=u,v=l,T=d;h=g(h,u,l,d,n[f+0],7,-680876936),d=g(d,h,u,l,n[f+1],12,-389564586),l=g(l,d,h,u,n[f+2],17,606105819),u=g(u,l,d,h,n[f+3],22,-1044525330),h=g(h,u,l,d,n[f+4],7,-176418897),d=g(d,h,u,l,n[f+5],12,1200080426),l=g(l,d,h,u,n[f+6],17,-1473231341),u=g(u,l,d,h,n[f+7],22,-45705983),h=g(h,u,l,d,n[f+8],7,1770035416),d=g(d,h,u,l,n[f+9],12,-1958414417),l=g(l,d,h,u,n[f+10],17,-42063),u=g(u,l,d,h,n[f+11],22,-1990404162),h=g(h,u,l,d,n[f+12],7,1804603682),d=g(d,h,u,l,n[f+13],12,-40341101),l=g(l,d,h,u,n[f+14],17,-1502002290),h=m(h,u=g(u,l,d,h,n[f+15],22,1236535329),l,d,n[f+1],5,-165796510),d=m(d,h,u,l,n[f+6],9,-1069501632),l=m(l,d,h,u,n[f+11],14,643717713),u=m(u,l,d,h,n[f+0],20,-373897302),h=m(h,u,l,d,n[f+5],5,-701558691),d=m(d,h,u,l,n[f+10],9,38016083),l=m(l,d,h,u,n[f+15],14,-660478335),u=m(u,l,d,h,n[f+4],20,-405537848),h=m(h,u,l,d,n[f+9],5,568446438),d=m(d,h,u,l,n[f+14],9,-1019803690),l=m(l,d,h,u,n[f+3],14,-187363961),u=m(u,l,d,h,n[f+8],20,1163531501),h=m(h,u,l,d,n[f+13],5,-1444681467),d=m(d,h,u,l,n[f+2],9,-51403784),l=m(l,d,h,u,n[f+7],14,1735328473),h=p(h,u=m(u,l,d,h,n[f+12],20,-1926607734),l,d,n[f+5],4,-378558),d=p(d,h,u,l,n[f+8],11,-2022574463),l=p(l,d,h,u,n[f+11],16,1839030562),u=p(u,l,d,h,n[f+14],23,-35309556),h=p(h,u,l,d,n[f+1],4,-1530992060),d=p(d,h,u,l,n[f+4],11,1272893353),l=p(l,d,h,u,n[f+7],16,-155497632),u=p(u,l,d,h,n[f+10],23,-1094730640),h=p(h,u,l,d,n[f+13],4,681279174),d=p(d,h,u,l,n[f+0],11,-358537222),l=p(l,d,h,u,n[f+3],16,-722521979),u=p(u,l,d,h,n[f+6],23,76029189),h=p(h,u,l,d,n[f+9],4,-640364487),d=p(d,h,u,l,n[f+12],11,-421815835),l=p(l,d,h,u,n[f+15],16,530742520),h=y(h,u=p(u,l,d,h,n[f+2],23,-995338651),l,d,n[f+0],6,-198630844),d=y(d,h,u,l,n[f+7],10,1126891415),l=y(l,d,h,u,n[f+14],15,-1416354905),u=y(u,l,d,h,n[f+5],21,-57434055),h=y(h,u,l,d,n[f+12],6,1700485571),d=y(d,h,u,l,n[f+3],10,-1894986606),l=y(l,d,h,u,n[f+10],15,-1051523),u=y(u,l,d,h,n[f+1],21,-2054922799),h=y(h,u,l,d,n[f+8],6,1873313359),d=y(d,h,u,l,n[f+15],10,-30611744),l=y(l,d,h,u,n[f+6],15,-1560198380),u=y(u,l,d,h,n[f+13],21,1309151649),h=y(h,u,l,d,n[f+4],6,-145523070),d=y(d,h,u,l,n[f+11],10,-1120210379),l=y(l,d,h,u,n[f+2],15,718787259),u=y(u,l,d,h,n[f+9],21,-343485551),h=h+b>>>0,u=u+w>>>0,l=l+v>>>0,d=d+T>>>0}return e.endian([h,u,l,d])};a._ff=function(t,e,s,r,i,n,o){var c=t+(e&s|~e&r)+(i>>>0)+o;return(c<<n|c>>>32-n)+e},a._gg=function(t,e,s,r,i,n,o){var c=t+(e&r|s&~r)+(i>>>0)+o;return(c<<n|c>>>32-n)+e},a._hh=function(t,e,s,r,i,n,o){var c=t+(e^s^r)+(i>>>0)+o;return(c<<n|c>>>32-n)+e},a._ii=function(t,e,s,r,i,n,o){var c=t+(s^(e|~r))+(i>>>0)+o;return(c<<n|c>>>32-n)+e},a._blocksize=16,a._digestsize=16,t.exports=function(t,s){if(null==t)throw new Error("Illegal argument "+t);var r=e.wordsToBytes(a(t,s));return s&&s.asBytes?r:s&&s.asString?c.bytesToString(r):e.bytesToHex(r)}}()}));class h{constructor(t,e){this.environment=t,this.payload=e,this.id=a(JSON.stringify({environment:t,payload:e}))}}const u=new class{constructor(){this.runtimeMetrics=[],this.runtimeMetricsIds=new Set([])}collect(e){t.debug("Collecting the runtime metrics payload"),this.runtimeMetricsIds.has(e.id)||(this.runtimeMetrics.push(e),this.runtimeMetricsIds.add(e.id))}getRuntimeMetrics(){return this.runtimeMetrics}deleteRuntimeMetrics(t){this.runtimeMetrics=this.runtimeMetrics.filter((e=>(this.runtimeMetricsIds.delete(e.id),!t.includes(e))))}},l=new class{constructor(){this.localStorage=null;try{this.localStorage=globalThis.localStorage}catch(e){t.error("Failed to access browser localStorage:",e)}}setItem(t,e){this.localStorage&&this.localStorage.setItem(t,JSON.stringify(e))}getItem(t){if(this.localStorage){const e=this.localStorage.getItem(t);if(e)return JSON.parse(e)}return null}removeItem(t){this.localStorage&&this.localStorage.removeItem(t)}clear(){this.localStorage&&this.localStorage.clear()}findKeys(t){const e=[];if(this.localStorage)for(let s=0;s<this.localStorage.length;s++){const r=this.localStorage.key(s);r&&r.includes(t)&&e.push(r)}return e}};class d{isDuplicate(t){return this.getRuntimeMetricsIds().includes(t.id)}cleanup(){t.debug("Vega telemetry start clear the old vega version runtime metrics ids in localStorage"),l.findKeys(d.RUNTIME_METRICS_IDS_KEY_PREFIX).map((t=>{t!==d.RUNTIME_METRICS_IDS_KEY_PREFIX+globalThis.VegaEnvInfo.version&&l.removeItem(t)}))}getRuntimeMetricsIds(){return l.getItem(d.RUNTIME_METRICS_IDS_KEY_PREFIX+globalThis.VegaEnvInfo.version)||[]}onDispatched(e){t.debug("Vega telemetry records runtime metrics ids in localStorage");const s=e.map((t=>t.id));l.setItem(d.RUNTIME_METRICS_IDS_KEY_PREFIX+globalThis.VegaEnvInfo.version,[...new Set([...this.getRuntimeMetricsIds(),...s])])}}d.RUNTIME_METRICS_IDS_KEY_PREFIX="vega-telemetry-runtime-metrics-ids-";const f=new class{constructor(t){this.strategies=t}checkByStrategies(e){t.debug("Start check duplicate payload by strategies");for(const t of this.strategies)return t.isDuplicate(e);return!1}updateDispatchedRuntimeMetrics(t){for(const e of this.strategies)e.onDispatched(t)}clearRuntimeMetrics(){try{for(const t of this.strategies)t.cleanup()}catch(e){t.error("Vega telemetry failed to clear runtime metrics in localStorage:",e)}}}([new d]);class g{constructor(t,e,s,r,i){this.vegaVersion=t,this.framework=e,this.browser=s,this.os=r,this.origin=i}}class m{constructor(t,e){this.name=t,this.version=e}}class p{constructor(t,e){this.name=t,this.version=e}}class y{constructor(){this.commonVersionRegExp=/version\/(\d+(\.?_?\d+)+)/i}getVersion(t){return this.getPCTerminalMatch(this.versionRegExp[0],t)}isNameMatch(t){return this.nameRegExp.some((e=>e.test(t)))}predict(t){const e=this.name,s=this.getVersion(t);return new m(e,s)}getPCTerminalMatch(t,e){const s=e.match(t);return s&&s.length>0&&s[1]||""}getMobileTerminalMatch(t,e){const s=e.match(t);return s&&s.length>1&&s[2]||""}}class b extends y{constructor(){super(...arguments),this.name="IE",this.nameRegExp=[/msie|trident/i],this.versionRegExp=[/(?:msie |rv:)(\d+(\.?_?\d+)+)/i]}}class w extends y{constructor(){super(...arguments),this.name="Edge",this.nameRegExp=[/\sedg\//i,/edg([ae]|ios)/i],this.versionRegExp=[/\sedg\/(\d+(\.?_?\d+)+)/i,/edg([ae]|ios)\/(\d+(\.?_?\d+)+)/i]}getVersion(t){return this.nameRegExp[0].test(t)?this.getPCTerminalMatch(this.versionRegExp[0],t):this.getMobileTerminalMatch(this.versionRegExp[1],t)}}class v extends y{constructor(){super(...arguments),this.name="FireFox",this.nameRegExp=[/firefox|iceweasel|fxios/i],this.versionRegExp=[/(?:firefox|iceweasel|fxios)[\s/](\d+(\.?_?\d+)+)/i]}}class T extends y{constructor(){super(...arguments),this.name="Chrome",this.nameRegExp=[/chromium/i,/^(?!.*\s(edg|edga)\/).*chrome|crios|crmo/i],this.versionRegExp=[/chromium[\s/](\d+(\.?_?\d+)+)/i,/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i]}getVersion(t){let e="";return e=this.nameRegExp[0].test(t)?this.getPCTerminalMatch(this.versionRegExp[0],t)||this.getPCTerminalMatch(this.commonVersionRegExp,t):this.getPCTerminalMatch(this.versionRegExp[1],t),e}}class x extends y{constructor(){super(...arguments),this.name="Safari",this.nameRegExp=[/^(?!.*\s(firefox|iceweasel|fxios)\/).*(safari|applewebkit)/i],this.versionRegExp=[/version\/(\d+(\.?_?\d+)+)/i]}}class E{detect(t){if(t)for(const e of this.predictors)if(e.isNameMatch(t))return e.predict(t);return{name:"Other",version:""}}}class S extends E{constructor(){super(...arguments),this.predictors=[new T,new w,new x,new v,new b]}}class V{constructor(){this.commonVersionRegExp=/version\/(\d+(\.?_?\d+)+)/i,this.versionDelimiterRegExp=/[\s_]/g}isNameMatch(t){return this.nameRegExp.some((e=>e.test(t)))}predict(t){const e=this.getName(t),s=this.getVersion(t);return new p(e,s)}getName(t){const e=t.match(/\((.*?)\)/);return e&&e[1]||"Other"}getVersion(t){return this.getCommonVersion(t)}getCommonVersion(t,e=!1){let s=this.getMainstreamOSMatch(this.versionRegExp[0]||this.commonVersionRegExp,t);return s&&e&&(s=s.replace(this.versionDelimiterRegExp,".")),s}getMainstreamOSMatch(t,e){const s=e.match(t);return s&&s.length>0&&s[1]||""}}class _ extends V{constructor(){super(...arguments),this.nameRegExp=[/windows /i],this.versionRegExp=[/windows ((nt|xp)( \d\d?.\d)?)/i]}}class M extends V{constructor(){super(...arguments),this.nameRegExp=[/macintosh/i],this.versionRegExp=[/mac os x (\d+(\.?_?\d+)+)/i]}getVersion(t){return this.getCommonVersion(t,!0)}}class O extends V{constructor(){super(...arguments),this.nameRegExp=[/(ipod|iphone|ipad)/i],this.versionRegExp=[/os (\d+([\s_]\d+)*) like mac os x/i]}getVersion(t){return this.getCommonVersion(t,!0)}}class A extends V{constructor(){super(...arguments),this.nameRegExp=[/android/i],this.versionRegExp=[/android[\s/-](\d+(\.\d+)*)/i]}}class R extends V{constructor(){super(...arguments),this.nameRegExp=[/linux/i],this.versionRegExp=[]}}class C extends E{constructor(){super(...arguments),this.predictors=[new M,new _,new O,new A,new R]}}function L(e){t.debug("Vega telemetry start clear runtime metrics in localStorage"),"requestIdleCallback"in globalThis?globalThis.requestIdleCallback((()=>{e()})):setTimeout((()=>{e()}),100)}function N(){return globalThis.location.origin}function I(){return globalThis.navigator.userAgent}function k(){try{return globalThis&&!!globalThis.localStorage&&!!globalThis.navigator&&!!globalThis.location}catch(e){return t.debug("Failed to access browser localStorage, navigator or location:",e),!1}}const B=new class{constructor(){this.browserDetector=new S,this.osDetector=new C}generate(){return this.environment||(this.environment=new g(globalThis.VegaEnvInfo.version,globalThis.VegaEnvInfo.framework,this.browserDetector.detect(I()),this.osDetector.detect(I()),N())),this.environment}},F=new class{emit(e){const s=new h(B.generate(),e);t.debug("Vega telemetry start emit runtime metrics"),f.checkByStrategies(s)||(t.debug("The payload has not been collected by strategies check"),u.collect(s))}};class U{static post(t,e){const s=new globalThis.Blob([JSON.stringify(e)]);return globalThis.navigator.sendBeacon(U.getVegaTelemetryApimHost()+t+`?subscription-key=${U.getVegaTelemetryApimSubKey()}`,s)}static getVegaTelemetryApimHost(){return N().includes("localhost")?"http://localhost:3334":"https://vega-telemetry-apim-dev.azure-api.net"}static getVegaTelemetryApimSubKey(){return"8bc15c7c8b514d1bb92825b0b17a1731"}}class D{constructor(t,e,s){this.environment=t,this.payloads=e,this.triggerEvent=s}}var $,G,J;!function(t){t.ComponentUsagePayload="componentUsage",t.FeatureFlagOverriddenPayload="featureFlagOverridden",t.PublicAPIMetricsPayload="publicAPIMetrics"}($||($={})),function(t){t.VisibilityChange="visibilitychange",t.PageHide="pagehide"}(G||(G={})),function(t){t.ENABLE_COLLECT_COMPONENTS_USAGE="VEGA_TELEMETRY.ENABLE_COLLECT_COMPONENTS_USAGE",t.ENABLE_COLLECT_FEATURE_FLAG_OVERRIDDEN="VEGA_TELEMETRY.ENABLE_COLLECT_FEATURE_FLAG_OVERRIDDEN"}(J||(J={}));const j=new class{constructor(){this.dispatchedRuntimeMetrics=[]}dispatch(e){try{const s=this.generateRuntimeMetricsSubmitDto(e);s&&(t.debug("Vega telemetry start dispatch runtime metrics"),U.post("/runtime-metrics",s),f.updateDispatchedRuntimeMetrics(this.dispatchedRuntimeMetrics),u.deleteRuntimeMetrics(this.dispatchedRuntimeMetrics),t.debug("The runtime metrics have been dispatched successfully!"))}catch(e){t.error("Vega telemetry failed to dispatch:",e)}}generateRuntimeMetricsSubmitDto(t){const e=this.filterRuntimeMetrics();return e.length>0?(this.dispatchedRuntimeMetrics=e,new D(B.generate(),e.map((t=>t.payload)),t)):null}filterRuntimeMetrics(){const t=q.getFeatureFlagController();return t?u.getRuntimeMetrics().filter((e=>t.isEnabled(e.payload.type===$.ComponentUsagePayload?J.ENABLE_COLLECT_COMPONENTS_USAGE:J.ENABLE_COLLECT_FEATURE_FLAG_OVERRIDDEN)&&!f.checkByStrategies(e))):[]}},q=new class{register(e){var s;t.debug("Vega telemetry start register 'pagehide' and 'visibilitychange' event"),s=()=>j.dispatch(G.VisibilityChange),"visibilityState"in document&&document.addEventListener("visibilitychange",(function(){"hidden"===document.visibilityState&&s()})),globalThis.addEventListener("pagehide",(()=>j.dispatch(G.PageHide))),L((()=>f.clearRuntimeMetrics())),this.featureFlagController=e}getFeatureFlagController(){return this.featureFlagController}};class P{constructor(t,e,s){this.type=t,this.componentName=e,this.data=s}}class H{constructor(t,e,s){this.type=t,this.featureFlagName=e,this.featureFlagOverriddenValue=s}}class K{constructor(t,e,s){this.type=t,this.publicAPIName=e,this.data=s}}const Y=new class{emit(e,s){L((()=>{try{if(k())switch(e){case $.ComponentUsagePayload:F.emit(new P(e,s.componentName,s.data));break;case $.FeatureFlagOverriddenPayload:F.emit(new H(e,s.featureFlagName,s.featureFlagOverriddenValue));break;case $.PublicAPIMetricsPayload:F.emit(new K(e,s.publicAPIName,s.data));break;default:throw new Error(`Unknown runtime metrics payload type: ${e}`)}}catch(e){t.error("Vega telemetry failed to emit runtime metrics:",e)}}))}init(e){try{k()&&q.register(e)}catch(e){t.error("Vega telemetry failed to register event:",e)}}},z=Object.freeze({__proto__:null,default:Y});export{Y as V,e as a,s as c,z as i}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{h as t,H as n,r as o,c as e,g as r}from"./p-9777b1c1.js";import{a as s,V as i,I as a}from"./p-018d77cc.js";import{V as c,I as l}from"./p-d5c10af1.js";import{s as b}from"./p-b81bd0bb.js";import{c as p}from"./p-86194314.js";import{g as h,D as d,a as f}from"./p-320642bd.js";import{V as u}from"./p-a11f00f8.js";import{D as v}from"./p-e4aa214a.js";import{a as g,c as m,d as x}from"./p-f5ebc64a.js";import{F as w}from"./p-fd58f10a.js";import{c as y}from"./p-c4542d96.js";import"./p-1cb312d1.js";import"./p-853f3963.js";import"./p-639fa6c7.js";import"./p-d3f1d3dd.js";import"./p-c216dfc3.js";var C=function(t,n,o,e){var r,s=arguments.length,i=s<3?n:null===e?e=Object.getOwnPropertyDescriptor(n,o):e;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(t,n,o,e);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(i=(s<3?r(i):s>3?r(n,o,i):r(n,o))||i);return s>3&&i&&Object.defineProperty(n,o,i),i};class j extends i{constructor(){super(...arguments),this.isMobileDevice=h()===d.MOBILE,this.space=this.isMobileDevice?"size-16":"size-24",this.handleCloseButtonClick=()=>{const t=this.closeEventEmitter.emit();t&&!t.defaultPrevented&&this.host.remove()}}render(){const o=[`banner-${this.type}`,this.isMobileDevice&&"banner-mobile",!this.isOpen&&"banner-hidden"].filter(Boolean);return t(n,{class:f(o),padding:this.space},t("vega-flex",{direction:"row",gap:this.isMobileDevice?"size-8":"size-16",justifyContent:"space-between",alignItems:"start"},this.renderPrefixIcon(),this.renderBannerContent(),this.renderCloseButton()),this.isMobileDevice?this.actionButtonRenderer.render():null)}renderBannerContent(){return t("div",{class:"banner-content-container"},this.renderBannerTitle(),t("div",{class:"banner-content"},t("vega-font",{variant:this.isMobileDevice?"font-footnote1-long":"font-p2-short",color:"error"===this.type?"text-primary":"text-black"},this.content),this.isMobileDevice?null:this.actionButtonRenderer.render()))}renderBannerTitle(){if(this.bannerTitle)return t("vega-font",{class:"banner-title",variant:this.isMobileDevice?"font-h6":"font-h5",color:"error"===this.type?"text-primary":"text-black"},this.bannerTitle)}renderCloseButton(){if(this.showCloseButton)return t("div",{class:"banner-close-button","aria-label":"Close Button",role:"button",tabIndex:0,onClick:this.handleCloseButtonClick,onKeyDown:p()},t("vega-icon",{size:this.isMobileDevice?"size-12":"size-16",icon:this.iconController.getCloseIcon()}))}renderPrefixIcon(){return t("div",{class:"banner-prefix-icon"},t("vega-icon",{size:this.space,icon:this.iconController.getIconByType()}))}}C([s()],j.prototype,"host",void 0),C([s()],j.prototype,"type",void 0),C([s()],j.prototype,"bannerTitle",void 0),C([s()],j.prototype,"content",void 0),C([s()],j.prototype,"showCloseButton",void 0),C([s()],j.prototype,"actionButtons",void 0),C([s()],j.prototype,"actionButtonRenderer",void 0),C([s()],j.prototype,"iconController",void 0),C([s()],j.prototype,"isOpen",void 0),C([s()],j.prototype,"closeEventEmitter",void 0);var z;!function(t){t.warning="triangle-exclamation",t.success="circle-check",t.error="circle-question",t.info="circle-info"}(z||(z={}));class k extends i{getIconByType(){return u.getIconKey(z[this.type])}getCloseIcon(){return u.getIconKey("xmark-large")}}u.register({"triangle-exclamation":{icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">\x3c!--! Font Awesome Pro 6.3.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --\x3e<path fill="currentColor" d="M256 32c14.2 0 27.3 7.5 34.5 19.8l216 368c7.3 12.4 7.3 27.7 .2 40.1S486.3 480 472 480H40c-14.3 0-27.6-7.7-34.7-20.1s-7-27.8 .2-40.1l216-368C228.7 39.5 241.8 32 256 32zm0 128c-13.3 0-24 10.7-24 24V296c0 13.3 10.7 24 24 24s24-10.7 24-24V184c0-13.3-10.7-24-24-24zm32 224a32 32 0 1 0 -64 0 32 32 0 1 0 64 0z"/></svg>'},"circle-check":{icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">\x3c!--! Font Awesome Pro 6.3.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --\x3e<path fill="currentColor" d="M256 512c141.4 0 256-114.6 256-256S397.4 0 256 0S0 114.6 0 256S114.6 512 256 512zM369 209L241 337c-9.4 9.4-24.6 9.4-33.9 0l-64-64c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0l47 47L335 175c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9z"/></svg>'},"circle-question":{icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">\x3c!--! Font Awesome Pro 6.3.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --\x3e<path fill="currentColor" d="M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM169.8 165.3c7.9-22.3 29.1-37.3 52.8-37.3h58.3c34.9 0 63.1 28.3 63.1 63.1c0 22.6-12.1 43.5-31.7 54.8L280 264.4c-.2 13-10.9 23.6-24 23.6c-13.3 0-24-10.7-24-24V250.5c0-8.6 4.6-16.5 12.1-20.8l44.3-25.4c4.7-2.7 7.6-7.7 7.6-13.1c0-8.4-6.8-15.1-15.1-15.1H222.6c-3.4 0-6.4 2.1-7.5 5.3l-.4 1.2c-4.4 12.5-18.2 19-30.6 14.6s-19-18.2-14.6-30.6l.4-1.2zM224 352a32 32 0 1 1 64 0 32 32 0 1 1 -64 0z"/></svg>'},"circle-info":{icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">\x3c!--! Font Awesome Pro 6.3.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --\x3e<path fill="currentColor" d="M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM216 336h24V272H216c-13.3 0-24-10.7-24-24s10.7-24 24-24h48c13.3 0 24 10.7 24 24v88h8c13.3 0 24 10.7 24 24s-10.7 24-24 24H216c-13.3 0-24-10.7-24-24s10.7-24 24-24zm40-208a32 32 0 1 1 0 64 32 32 0 1 1 0-64z"/></svg>'},"xmark-large":{icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512">\x3c!--! Font Awesome Pro 6.3.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --\x3e<path fill="currentColor" d="M393.4 41.4c12.5-12.5 32.8-12.5 45.3 0s12.5 32.8 0 45.3L269.3 256 438.6 425.4c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L224 301.3 54.6 470.6c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3L178.7 256 9.4 86.6C-3.1 74.1-3.1 53.9 9.4 41.4s32.8-12.5 45.3 0L224 210.7 393.4 41.4z"/></svg>'}}),function(t,n,o,e){var r,s=arguments.length,i=s<3?n:null===e?e=Object.getOwnPropertyDescriptor(n,o):e;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(t,n,o,e);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(i=(s<3?r(i):s>3?r(n,o,i):r(n,o))||i);s>3&&i&&Object.defineProperty(n,o,i)}([s()],k.prototype,"type",void 0);var B=function(t,n,o,e){var r,s=arguments.length,i=s<3?n:null===e?e=Object.getOwnPropertyDescriptor(n,o):e;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(t,n,o,e);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(i=(s<3?r(i):s>3?r(n,o,i):r(n,o))||i);return s>3&&i&&Object.defineProperty(n,o,i),i};class I extends i{render(){var n;if((null===(n=this.actionButtons)||void 0===n?void 0:n.length)>0)return t("div",{class:"banner-buttons"},this.actionButtons.map(((t,n)=>this.renderButtonItem(t,`${t.label}${n}`))))}renderButtonItem(n,o){return t("vega-button",{key:o,size:"small",variant:"secondary",ref:t=>{v.addUniqueObserverToNode(t,g,(()=>{w.isEnabled("VEGA_BANNER_DEPRECATED_ACTION_BUTTON_PROP_VEGA_CLICK")||"function"!=typeof n.vegaClick||n.vegaClick(n),this.actionButtonClickEventEmitter.emit(n)}))}},n.label)}}B([s()],I.prototype,"actionButtons",void 0),B([s()],I.prototype,"actionButtonClickEventEmitter",void 0);var L=function(t,n,o,e){var r,s=arguments.length,i=s<3?n:null===e?e=Object.getOwnPropertyDescriptor(n,o):e;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(t,n,o,e);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(i=(s<3?r(i):s>3?r(n,o,i):r(n,o))||i);return s>3&&i&&Object.defineProperty(n,o,i),i};const R=class{constructor(t){o(this,t),this.vegaClose=e(this,"vegaClose",7),this.close=e(this,"close",7),this.vegaActionButtonClick=e(this,"vegaActionButtonClick",7),this.actionButtonClick=e(this,"actionButtonClick",7),this.globalSlimmers={},this.closeEventEmitter=y(R,m),this.renderer=new j,this.actionButtonRenderer=new I,this.iconController=new k,this.vegaComponentUsageRuntimeMetricsSlimmer=new c,this.actionButtonClickEventEmitter=y(R,x),this.type="info",this.bannerTitle="",this.content="",this.actionButtons=null,this.showCloseButton=!0,this.isOpen=!0}async doClose(){this.host.remove(),this.closeEventEmitter.emit()}render(){return b(this.renderer.render(),this.host)}get host(){return r(this)}};L([l()],R.prototype,"globalSlimmers",void 0),L([a()],R.prototype,"closeEventEmitter",void 0),L([a()],R.prototype,"renderer",void 0),L([a()],R.prototype,"actionButtonRenderer",void 0),L([a()],R.prototype,"iconController",void 0),L([a()],R.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),L([a()],R.prototype,"actionButtonClickEventEmitter",void 0),R.style=':host{display:block;width:100%;padding:24px;background-color:rgba(var(--v-bg-transparent, 0, 0, 0, 0));box-sizing:border-box;box-shadow:var(--v-shadow-card, 0px 2px 8px 0px rgba(0, 0, 0, 0.04), 0px 2px 4px 0px rgba(0, 0, 0, 0.02));border-radius:12px;color:rgba(var(--v-text-black, 32, 54, 69, 1))}:host .banner-prefix-icon{padding-top:4px}:host .banner-prefix-icon vega-icon{display:block}:host .banner-content-container{width:100%}:host .banner-content-container .banner-title{display:block;padding-top:2px}:host .banner-content-container .banner-content{display:flex;flex-direction:row;align-items:center;justify-content:space-between;gap:24px;flex-wrap:wrap}:host .banner-content-container .banner-content>vega-font:last-child{padding-top:6px}:host .banner-buttons{text-align:right;text-wrap:nowrap;flex:auto}:host .banner-buttons vega-button{margin-left:16px}:host .banner-buttons vega-button::part(button){padding-top:4px;padding-bottom:4px}:host .banner-buttons vega-button::part(button),:host .banner-buttons vega-button::part(button):hover{font-family:"Inter", sans-serif;font-size:18px;font-weight:700;line-height:24px;letter-spacing:0px;color:rgba(var(--v-text-black, 32, 54, 69, 1));background-color:rgba(var(--v-bg-transparent, 0, 0, 0, 0));border:2px solid rgba(var(--v-border-notification-btn-black, 32, 54, 69, 1))}@media screen and (min-width: 768px) and (max-width: 1023px){:host .banner-buttons vega-button::part(button),:host .banner-buttons vega-button::part(button):hover{font-family:"Inter", sans-serif;font-size:16px;font-weight:700;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){:host .banner-buttons vega-button::part(button),:host .banner-buttons vega-button::part(button):hover{font-family:"Inter", sans-serif;font-size:16px;font-weight:700;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){:host .banner-buttons vega-button::part(button),:host .banner-buttons vega-button::part(button):hover{font-family:"Inter", sans-serif;font-size:16px;font-weight:700;line-height:24px;letter-spacing:0px}}:host .banner-buttons vega-button::part(button):focus-visible{outline:2px solid;outline-offset:2px;box-shadow:0 0 0}:host .banner-close-button{padding:4px;padding-top:8px}:host .banner-close-button:focus-visible{outline:2px solid;outline-offset:0px}:host .banner-close-button vega-icon{cursor:pointer;display:block}:host(.banner-mobile){padding:16px}:host(.banner-mobile) .banner-content-container .banner-title{padding-top:0px}:host(.banner-mobile) .banner-content-container .banner-content{padding-top:2px;gap:16px}:host(.banner-mobile) .banner-content-container .banner-content>vega-font:last-child{padding-top:0px}:host(.banner-mobile) .banner-buttons vega-button{margin-left:8px;margin-top:16px}:host(.banner-mobile) .banner-close-button{padding:2px;padding-top:4px}:host(.banner-success){background-color:rgba(var(--v-bg-status-success, 160, 233, 167, 1))}:host(.banner-error){background-color:rgba(var(--v-bg-status-error, 255, 110, 139, 1));color:rgba(var(--v-text-primary, 32, 54, 69, 1))}:host(.banner-error) .banner-buttons vega-button::part(button),:host(.banner-error) .banner-buttons vega-button::part(button):hover{color:rgba(var(--v-text-primary, 32, 54, 69, 1));border:2px solid rgba(var(--v-border-notification-btn, 32, 54, 69, 1))}:host(.banner-error) .banner-buttons vega-button::part(button):focus-visible{outline:2px solid rgba(var(--v-border-color-notification-btn, 32, 54, 69, 1));outline-offset:2px}:host(.banner-error) .banner-close-button:focus-visible{outline:2px solid rgba(var(--v-border-color-notification-btn, 32, 54, 69, 1));outline-offset:0px}:host(.banner-info){background-color:rgba(var(--v-bg-status-info, 205, 209, 211, 1))}:host(.banner-warning){background-color:rgba(var(--v-bg-status-warning, 255, 220, 131, 1))}:host(.banner-hidden){display:none}';export{R as vega_banner}
|
|
1
|
+
import{h as t,H as n,r as e,c as o,g as r}from"./p-1c298d5a.js";import{a as s,V as i,I as a}from"./p-018d77cc.js";import{V as c,I as l}from"./p-3e0299cd.js";import{s as b}from"./p-b81bd0bb.js";import{c as p}from"./p-86194314.js";import{g as h,D as d,a as f}from"./p-320642bd.js";import{V as u}from"./p-a11f00f8.js";import{D as v}from"./p-e4aa214a.js";import{a as g,c as m,d as x}from"./p-f5ebc64a.js";import{F as w}from"./p-fcd74048.js";import{c as y}from"./p-e90bae84.js";import"./p-1cb312d1.js";import"./p-853f3963.js";import"./p-c677778e.js";import"./p-d3f1d3dd.js";import"./p-ef0c67c2.js";var C=function(t,n,e,o){var r,s=arguments.length,i=s<3?n:null===o?o=Object.getOwnPropertyDescriptor(n,e):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(t,n,e,o);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(i=(s<3?r(i):s>3?r(n,e,i):r(n,e))||i);return s>3&&i&&Object.defineProperty(n,e,i),i};class j extends i{constructor(){super(...arguments),this.isMobileDevice=h()===d.MOBILE,this.space=this.isMobileDevice?"size-16":"size-24",this.handleCloseButtonClick=()=>{const t=this.closeEventEmitter.emit();t&&!t.defaultPrevented&&this.host.remove()}}render(){const e=[`banner-${this.type}`,this.isMobileDevice&&"banner-mobile",!this.isOpen&&"banner-hidden"].filter(Boolean);return t(n,{class:f(e),padding:this.space},t("vega-flex",{direction:"row",gap:this.isMobileDevice?"size-8":"size-16",justifyContent:"space-between",alignItems:"start"},this.renderPrefixIcon(),this.renderBannerContent(),this.renderCloseButton()),this.isMobileDevice?this.actionButtonRenderer.render():null)}renderBannerContent(){return t("div",{class:"banner-content-container"},this.renderBannerTitle(),t("div",{class:"banner-content"},t("vega-font",{variant:this.isMobileDevice?"font-footnote1-long":"font-p2-short",color:"error"===this.type?"text-primary":"text-black"},this.content),this.isMobileDevice?null:this.actionButtonRenderer.render()))}renderBannerTitle(){if(this.bannerTitle)return t("vega-font",{class:"banner-title",variant:this.isMobileDevice?"font-h6":"font-h5",color:"error"===this.type?"text-primary":"text-black"},this.bannerTitle)}renderCloseButton(){if(this.showCloseButton)return t("div",{class:"banner-close-button","aria-label":"Close Button",role:"button",tabIndex:0,onClick:this.handleCloseButtonClick,onKeyDown:p()},t("vega-icon",{size:this.isMobileDevice?"size-12":"size-16",icon:this.iconController.getCloseIcon()}))}renderPrefixIcon(){return t("div",{class:"banner-prefix-icon"},t("vega-icon",{size:this.space,icon:this.iconController.getIconByType()}))}}C([s()],j.prototype,"host",void 0),C([s()],j.prototype,"type",void 0),C([s()],j.prototype,"bannerTitle",void 0),C([s()],j.prototype,"content",void 0),C([s()],j.prototype,"showCloseButton",void 0),C([s()],j.prototype,"actionButtons",void 0),C([s()],j.prototype,"actionButtonRenderer",void 0),C([s()],j.prototype,"iconController",void 0),C([s()],j.prototype,"isOpen",void 0),C([s()],j.prototype,"closeEventEmitter",void 0);var z;!function(t){t.warning="triangle-exclamation",t.success="circle-check",t.error="circle-question",t.info="circle-info"}(z||(z={}));class k extends i{getIconByType(){return u.getIconKey(z[this.type])}getCloseIcon(){return u.getIconKey("xmark-large")}}u.register({"triangle-exclamation":{icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">\x3c!--! Font Awesome Pro 6.3.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --\x3e<path fill="currentColor" d="M256 32c14.2 0 27.3 7.5 34.5 19.8l216 368c7.3 12.4 7.3 27.7 .2 40.1S486.3 480 472 480H40c-14.3 0-27.6-7.7-34.7-20.1s-7-27.8 .2-40.1l216-368C228.7 39.5 241.8 32 256 32zm0 128c-13.3 0-24 10.7-24 24V296c0 13.3 10.7 24 24 24s24-10.7 24-24V184c0-13.3-10.7-24-24-24zm32 224a32 32 0 1 0 -64 0 32 32 0 1 0 64 0z"/></svg>'},"circle-check":{icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">\x3c!--! Font Awesome Pro 6.3.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --\x3e<path fill="currentColor" d="M256 512c141.4 0 256-114.6 256-256S397.4 0 256 0S0 114.6 0 256S114.6 512 256 512zM369 209L241 337c-9.4 9.4-24.6 9.4-33.9 0l-64-64c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0l47 47L335 175c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9z"/></svg>'},"circle-question":{icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">\x3c!--! Font Awesome Pro 6.3.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --\x3e<path fill="currentColor" d="M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM169.8 165.3c7.9-22.3 29.1-37.3 52.8-37.3h58.3c34.9 0 63.1 28.3 63.1 63.1c0 22.6-12.1 43.5-31.7 54.8L280 264.4c-.2 13-10.9 23.6-24 23.6c-13.3 0-24-10.7-24-24V250.5c0-8.6 4.6-16.5 12.1-20.8l44.3-25.4c4.7-2.7 7.6-7.7 7.6-13.1c0-8.4-6.8-15.1-15.1-15.1H222.6c-3.4 0-6.4 2.1-7.5 5.3l-.4 1.2c-4.4 12.5-18.2 19-30.6 14.6s-19-18.2-14.6-30.6l.4-1.2zM224 352a32 32 0 1 1 64 0 32 32 0 1 1 -64 0z"/></svg>'},"circle-info":{icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">\x3c!--! Font Awesome Pro 6.3.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --\x3e<path fill="currentColor" d="M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM216 336h24V272H216c-13.3 0-24-10.7-24-24s10.7-24 24-24h48c13.3 0 24 10.7 24 24v88h8c13.3 0 24 10.7 24 24s-10.7 24-24 24H216c-13.3 0-24-10.7-24-24s10.7-24 24-24zm40-208a32 32 0 1 1 0 64 32 32 0 1 1 0-64z"/></svg>'},"xmark-large":{icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512">\x3c!--! Font Awesome Pro 6.3.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --\x3e<path fill="currentColor" d="M393.4 41.4c12.5-12.5 32.8-12.5 45.3 0s12.5 32.8 0 45.3L269.3 256 438.6 425.4c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L224 301.3 54.6 470.6c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3L178.7 256 9.4 86.6C-3.1 74.1-3.1 53.9 9.4 41.4s32.8-12.5 45.3 0L224 210.7 393.4 41.4z"/></svg>'}}),function(t,n,e,o){var r,s=arguments.length,i=s<3?n:null===o?o=Object.getOwnPropertyDescriptor(n,e):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(t,n,e,o);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(i=(s<3?r(i):s>3?r(n,e,i):r(n,e))||i);s>3&&i&&Object.defineProperty(n,e,i)}([s()],k.prototype,"type",void 0);var B=function(t,n,e,o){var r,s=arguments.length,i=s<3?n:null===o?o=Object.getOwnPropertyDescriptor(n,e):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(t,n,e,o);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(i=(s<3?r(i):s>3?r(n,e,i):r(n,e))||i);return s>3&&i&&Object.defineProperty(n,e,i),i};class I extends i{render(){var n;if((null===(n=this.actionButtons)||void 0===n?void 0:n.length)>0)return t("div",{class:"banner-buttons"},this.actionButtons.map(((t,n)=>this.renderButtonItem(t,`${t.label}${n}`))))}renderButtonItem(n,e){return t("vega-button",{key:e,size:"small",variant:"secondary",ref:t=>{v.addUniqueObserverToNode(t,g,(()=>{w.isEnabled("VEGA_BANNER_DEPRECATED_ACTION_BUTTON_PROP_VEGA_CLICK")||"function"!=typeof n.vegaClick||n.vegaClick(n),this.actionButtonClickEventEmitter.emit(n)}))}},n.label)}}B([s()],I.prototype,"actionButtons",void 0),B([s()],I.prototype,"actionButtonClickEventEmitter",void 0);var L=function(t,n,e,o){var r,s=arguments.length,i=s<3?n:null===o?o=Object.getOwnPropertyDescriptor(n,e):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(t,n,e,o);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(i=(s<3?r(i):s>3?r(n,e,i):r(n,e))||i);return s>3&&i&&Object.defineProperty(n,e,i),i};const R=class{constructor(t){e(this,t),this.vegaClose=o(this,"vegaClose",7),this.close=o(this,"close",7),this.vegaActionButtonClick=o(this,"vegaActionButtonClick",7),this.actionButtonClick=o(this,"actionButtonClick",7),this.globalSlimmers={},this.closeEventEmitter=y(R,m),this.renderer=new j,this.actionButtonRenderer=new I,this.iconController=new k,this.vegaComponentUsageRuntimeMetricsSlimmer=new c,this.actionButtonClickEventEmitter=y(R,x),this.type="info",this.bannerTitle="",this.content="",this.actionButtons=null,this.showCloseButton=!0,this.isOpen=!0}async doClose(){this.host.remove(),this.closeEventEmitter.emit()}render(){return b(this.renderer.render(),this.host)}get host(){return r(this)}};L([l()],R.prototype,"globalSlimmers",void 0),L([a()],R.prototype,"closeEventEmitter",void 0),L([a()],R.prototype,"renderer",void 0),L([a()],R.prototype,"actionButtonRenderer",void 0),L([a()],R.prototype,"iconController",void 0),L([a()],R.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),L([a()],R.prototype,"actionButtonClickEventEmitter",void 0),R.style=':host{display:block;width:100%;padding:24px;background-color:rgba(var(--v-bg-transparent, 0, 0, 0, 0));box-sizing:border-box;box-shadow:var(--v-shadow-card, 0px 2px 8px 0px rgba(0, 0, 0, 0.04), 0px 2px 4px 0px rgba(0, 0, 0, 0.02));border-radius:12px;color:rgba(var(--v-text-black, 32, 54, 69, 1))}:host .banner-prefix-icon{padding-top:4px}:host .banner-prefix-icon vega-icon{display:block}:host .banner-content-container{width:100%}:host .banner-content-container .banner-title{display:block;padding-top:2px}:host .banner-content-container .banner-content{display:flex;flex-direction:row;align-items:center;justify-content:space-between;gap:24px;flex-wrap:wrap}:host .banner-content-container .banner-content>vega-font:last-child{padding-top:6px}:host .banner-buttons{text-align:right;text-wrap:nowrap;flex:auto}:host .banner-buttons vega-button{margin-left:16px}:host .banner-buttons vega-button::part(button){padding-top:4px;padding-bottom:4px}:host .banner-buttons vega-button::part(button),:host .banner-buttons vega-button::part(button):hover{font-family:"Inter", sans-serif;font-size:18px;font-weight:700;line-height:24px;letter-spacing:0px;color:rgba(var(--v-text-black, 32, 54, 69, 1));background-color:rgba(var(--v-bg-transparent, 0, 0, 0, 0));border:2px solid rgba(var(--v-border-notification-btn-black, 32, 54, 69, 1))}@media screen and (min-width: 768px) and (max-width: 1023px){:host .banner-buttons vega-button::part(button),:host .banner-buttons vega-button::part(button):hover{font-family:"Inter", sans-serif;font-size:16px;font-weight:700;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){:host .banner-buttons vega-button::part(button),:host .banner-buttons vega-button::part(button):hover{font-family:"Inter", sans-serif;font-size:16px;font-weight:700;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){:host .banner-buttons vega-button::part(button),:host .banner-buttons vega-button::part(button):hover{font-family:"Inter", sans-serif;font-size:16px;font-weight:700;line-height:24px;letter-spacing:0px}}:host .banner-buttons vega-button::part(button):focus-visible{outline:2px solid;outline-offset:2px;box-shadow:0 0 0}:host .banner-close-button{padding:4px;padding-top:8px}:host .banner-close-button:focus-visible{outline:2px solid;outline-offset:0px}:host .banner-close-button vega-icon{cursor:pointer;display:block}:host(.banner-mobile){padding:16px}:host(.banner-mobile) .banner-content-container .banner-title{padding-top:0px}:host(.banner-mobile) .banner-content-container .banner-content{padding-top:2px;gap:16px}:host(.banner-mobile) .banner-content-container .banner-content>vega-font:last-child{padding-top:0px}:host(.banner-mobile) .banner-buttons vega-button{margin-left:8px;margin-top:16px}:host(.banner-mobile) .banner-close-button{padding:2px;padding-top:4px}:host(.banner-success){background-color:rgba(var(--v-bg-status-success, 160, 233, 167, 1))}:host(.banner-error){background-color:rgba(var(--v-bg-status-error, 255, 110, 139, 1));color:rgba(var(--v-text-primary, 32, 54, 69, 1))}:host(.banner-error) .banner-buttons vega-button::part(button),:host(.banner-error) .banner-buttons vega-button::part(button):hover{color:rgba(var(--v-text-primary, 32, 54, 69, 1));border:2px solid rgba(var(--v-border-notification-btn, 32, 54, 69, 1))}:host(.banner-error) .banner-buttons vega-button::part(button):focus-visible{outline:2px solid rgba(var(--v-border-color-notification-btn, 32, 54, 69, 1));outline-offset:2px}:host(.banner-error) .banner-close-button:focus-visible{outline:2px solid rgba(var(--v-border-color-notification-btn, 32, 54, 69, 1));outline-offset:0px}:host(.banner-info){background-color:rgba(var(--v-bg-status-info, 205, 209, 211, 1))}:host(.banner-warning){background-color:rgba(var(--v-bg-status-warning, 255, 220, 131, 1))}:host(.banner-hidden){display:none}';export{R as vega_banner}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{h as t,r as e,H as o,g as a}from"./p-
|
|
1
|
+
import{h as t,r as e,H as o,g as a}from"./p-1c298d5a.js";import{s as r}from"./p-b81bd0bb.js";import{I as i}from"./p-f97c9cdc.js";import{a as n,M as p,I as l}from"./p-018d77cc.js";import{V as s,I as c}from"./p-3e0299cd.js";import{E as g}from"./p-16f9c6f7.js";import{c as d}from"./p-46c810cb.js";import"./p-313cca9b.js";import"./p-320642bd.js";import"./p-3c8b2105.js";import"./p-12d5ed36.js";import"./p-3542f8fe.js";import"./p-3a0a4d15.js";import"./p-c59042c0.js";import"./p-9b3df371.js";import"./p-344ee7cb.js";import"./p-0c667d6a.js";import"./p-f36781c5.js";import"./p-d3f1d3dd.js";import"./p-8960e876.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}
|