@globalpayments/vega 2.94.0 → 2.95.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{app-globals-d05c3410.js → app-globals-76815382.js} +1 -1
- package/dist/cjs/{child-nodes-event-prevent-slimmer-e67ee84c.js → child-nodes-event-prevent-slimmer-e0ac8467.js} +1 -1
- package/dist/cjs/{event-emit-slimmer-d234a619.js → event-emit-slimmer-34aa195e.js} +1 -1
- package/dist/cjs/index.cjs.js +2 -2
- package/dist/cjs/{internal-vega-event-manager-13c4012b.js → internal-vega-event-manager-7003c84a.js} +10 -2
- package/dist/cjs/loader.cjs.js +4 -4
- package/dist/cjs/shared-backdrop-manager-71e54fdb.js +199 -0
- package/dist/cjs/{token-extension-ea891d54.js → token-extension-d123d9d0.js} +1 -1
- package/dist/cjs/vega-accordion.cjs.entry.js +2 -2
- package/dist/cjs/vega-app-footer.cjs.entry.js +2 -2
- package/dist/cjs/vega-app-header-button.cjs.entry.js +3 -3
- package/dist/cjs/vega-banner.cjs.entry.js +2 -2
- package/dist/cjs/vega-breadcrumb.cjs.entry.js +3 -3
- package/dist/cjs/vega-button-circle.cjs.entry.js +3 -3
- package/dist/cjs/vega-button-group_2.cjs.entry.js +3 -3
- package/dist/cjs/vega-button-link.cjs.entry.js +3 -3
- package/dist/cjs/vega-button.cjs.entry.js +3 -3
- package/dist/cjs/vega-calendar_5.cjs.entry.js +3 -3
- package/dist/cjs/vega-carousel.cjs.entry.js +2 -2
- package/dist/cjs/vega-checkbox_2.cjs.entry.js +3 -3
- package/dist/cjs/vega-chip.cjs.entry.js +3 -3
- package/dist/cjs/vega-code-block.cjs.entry.js +3 -3
- package/dist/cjs/vega-color-picker.cjs.entry.js +2 -2
- package/dist/cjs/vega-color-swatch-picker.cjs.entry.js +3 -3
- package/dist/cjs/vega-color-swatch.cjs.entry.js +2 -2
- package/dist/cjs/vega-combo-box.cjs.entry.js +22 -4
- package/dist/cjs/vega-date-picker_2.cjs.entry.js +3 -3
- package/dist/cjs/vega-dialog_2.cjs.entry.js +160 -70
- package/dist/cjs/vega-dropdown_5.cjs.entry.js +14 -9
- package/dist/cjs/vega-env-manager-23b8b23c.js +2 -2
- package/dist/cjs/vega-field-label.cjs.entry.js +2 -2
- package/dist/cjs/vega-file-uploader.cjs.entry.js +2 -2
- package/dist/cjs/vega-form.cjs.entry.js +3 -3
- package/dist/cjs/vega-image-uploader.cjs.entry.js +3 -3
- package/dist/cjs/vega-input-credit-card.cjs.entry.js +3 -3
- package/dist/cjs/vega-input-numeric.cjs.entry.js +3 -3
- package/dist/cjs/vega-input-passcode.cjs.entry.js +3 -3
- package/dist/cjs/vega-input-phone-number.cjs.entry.js +3 -3
- package/dist/cjs/vega-input-range.cjs.entry.js +3 -3
- package/dist/cjs/vega-input-select.cjs.entry.js +54 -5
- package/dist/cjs/vega-input.cjs.entry.js +2 -2
- package/dist/cjs/vega-item-toggle.cjs.entry.js +2 -2
- package/dist/cjs/vega-left-nav_5.cjs.entry.js +32 -193
- package/dist/cjs/vega-pagination-page-selector-mobile.cjs.entry.js +2 -2
- package/dist/cjs/vega-pagination.cjs.entry.js +3 -3
- package/dist/cjs/vega-popover_2.cjs.entry.js +2 -2
- package/dist/cjs/vega-progress-tracker_2.cjs.entry.js +13 -3
- package/dist/cjs/vega-radio_2.cjs.entry.js +3 -3
- package/dist/cjs/vega-rich-text-editor_4.cjs.entry.js +3 -3
- package/dist/cjs/vega-rich-text-find-replace-panel.cjs.entry.js +2 -2
- package/dist/cjs/vega-rich-text-special-characters-panel.cjs.entry.js +2 -2
- package/dist/cjs/vega-rich-text-table-properties_3.cjs.entry.js +2 -2
- package/dist/cjs/vega-segment-control.cjs.entry.js +2 -2
- package/dist/cjs/vega-selection-chip_2.cjs.entry.js +3 -3
- package/dist/cjs/vega-selection-tile_2.cjs.entry.js +3 -3
- package/dist/cjs/vega-sidenav_3.cjs.entry.js +2 -2
- package/dist/cjs/vega-signature-capture.cjs.entry.js +2 -2
- package/dist/cjs/vega-stepper.cjs.entry.js +3 -3
- package/dist/cjs/vega-tab-group_2.cjs.entry.js +3 -3
- package/dist/cjs/vega-table_11.cjs.entry.js +3 -3
- package/dist/cjs/vega-textarea.cjs.entry.js +3 -3
- package/dist/cjs/vega-time-picker_2.cjs.entry.js +3 -3
- package/dist/cjs/vega-toggle-switch.cjs.entry.js +2 -2
- package/dist/cjs/vega.cjs.js +4 -4
- package/dist/collection/components/vega-combo-box/slimmers/renderers/vega-combo-box-dropdown-renderer.js +5 -1
- package/dist/collection/components/vega-combo-box/vega-combo-box.js +52 -1
- package/dist/collection/components/vega-dialog/vega-dialog.js +1 -1
- package/dist/collection/components/vega-dropdown/slimmers/controllers/vega-dropdown-render-mode-controller.js +7 -6
- package/dist/collection/components/vega-dropdown/vega-dropdown.js +6 -1
- package/dist/collection/components/vega-input-select/slimmers/controllers/vega-input-select-dropdown-controller.js +11 -1
- package/dist/collection/components/vega-input-select/slimmers/controllers/vega-input-select-items-slot-controler.js +23 -2
- package/dist/collection/components/vega-input-select/slimmers/renderers/vega-input-select-dropdown-renderer.js +4 -0
- package/dist/collection/components/vega-input-select/vega-input-select.js +53 -2
- package/dist/collection/components/vega-modal/slimmers/controllers/vega-modal-backdrop-manager.js +141 -0
- package/dist/collection/components/vega-modal/slimmers/controllers/vega-modal-open-state-controller.js +10 -17
- package/dist/collection/components/vega-modal/slimmers/controllers/vega-modal-z-index-controller.js +2 -2
- package/dist/collection/components/vega-modal/slimmers/renderers/vega-modal-renderer.js +3 -2
- package/dist/collection/components/vega-modal/vega-modal.js +77 -8
- package/dist/collection/components/vega-progress-tracker/slimmers/controllers/vega-progress-tracker-current-steps-controller.js +7 -0
- package/dist/collection/components/vega-progress-tracker/vega-progress-tracker.js +6 -0
- package/dist/collection/helpers/backdrop/shared-backdrop-manager.js +32 -1
- package/dist/collection/helpers/event-manager/event-id/component-event-id-map.js +11 -3
- package/dist/esm/{app-globals-f2336686.js → app-globals-eafcc7a1.js} +1 -1
- package/dist/esm/{child-nodes-event-prevent-slimmer-96c14f5a.js → child-nodes-event-prevent-slimmer-82626871.js} +1 -1
- package/dist/esm/{event-emit-slimmer-db4a82e0.js → event-emit-slimmer-2452278f.js} +1 -1
- package/dist/esm/{image-annotation-action-b3b6c308.js → image-annotation-action-08a20d5e.js} +1 -1
- package/dist/esm/index.js +3 -3
- package/dist/esm/{internal-vega-event-manager-48690e5b.js → internal-vega-event-manager-2ecc9186.js} +11 -3
- package/dist/esm/loader.js +5 -5
- package/dist/esm/shared-backdrop-manager-a7c63838.js +197 -0
- package/dist/esm/{token-extension-9896879b.js → token-extension-f5bf9c21.js} +2 -2
- package/dist/esm/vega-accordion.entry.js +3 -3
- package/dist/esm/vega-app-footer.entry.js +3 -3
- package/dist/esm/vega-app-header-button.entry.js +4 -4
- package/dist/esm/vega-banner.entry.js +3 -3
- package/dist/esm/vega-breadcrumb.entry.js +4 -4
- package/dist/esm/vega-button-circle.entry.js +4 -4
- package/dist/esm/vega-button-group_2.entry.js +4 -4
- package/dist/esm/vega-button-link.entry.js +4 -4
- package/dist/esm/vega-button.entry.js +4 -4
- package/dist/esm/vega-calendar_5.entry.js +4 -4
- package/dist/esm/vega-carousel.entry.js +3 -3
- package/dist/esm/vega-checkbox_2.entry.js +4 -4
- package/dist/esm/vega-chip.entry.js +4 -4
- package/dist/esm/vega-code-block.entry.js +4 -4
- package/dist/esm/vega-color-picker.entry.js +3 -3
- package/dist/esm/vega-color-swatch-picker.entry.js +4 -4
- package/dist/esm/vega-color-swatch.entry.js +3 -3
- package/dist/esm/vega-combo-box.entry.js +23 -5
- package/dist/esm/vega-date-picker_2.entry.js +4 -4
- package/dist/esm/vega-dialog_2.entry.js +161 -71
- package/dist/esm/vega-dropdown_5.entry.js +15 -10
- package/dist/esm/vega-env-manager-8f8dc473.js +2 -2
- package/dist/esm/{vega-event-id-270fe47e.js → vega-event-id-f55f6977.js} +1 -1
- package/dist/esm/vega-field-label.entry.js +3 -3
- package/dist/esm/vega-file-uploader.entry.js +3 -3
- package/dist/esm/vega-form.entry.js +4 -4
- package/dist/esm/vega-image-uploader.entry.js +4 -4
- package/dist/esm/vega-input-credit-card.entry.js +4 -4
- package/dist/esm/vega-input-numeric.entry.js +4 -4
- package/dist/esm/vega-input-passcode.entry.js +4 -4
- package/dist/esm/vega-input-phone-number.entry.js +4 -4
- package/dist/esm/vega-input-range.entry.js +4 -4
- package/dist/esm/vega-input-select.entry.js +55 -6
- package/dist/esm/vega-input.entry.js +3 -3
- package/dist/esm/vega-item-toggle.entry.js +3 -3
- package/dist/esm/vega-left-nav_5.entry.js +32 -193
- package/dist/esm/vega-page-notification_2.entry.js +1 -1
- package/dist/esm/vega-pagination-page-selector-mobile.entry.js +3 -3
- package/dist/esm/vega-pagination-page-size-selector-mobile.entry.js +1 -1
- package/dist/esm/vega-pagination.entry.js +4 -4
- package/dist/esm/vega-popover_2.entry.js +3 -3
- package/dist/esm/vega-progress-tracker_2.entry.js +14 -4
- package/dist/esm/vega-radio_2.entry.js +4 -4
- package/dist/esm/vega-rich-text-content.entry.js +2 -2
- package/dist/esm/vega-rich-text-editor_4.entry.js +5 -5
- package/dist/esm/vega-rich-text-find-replace-panel.entry.js +3 -3
- package/dist/esm/vega-rich-text-special-characters-panel.entry.js +3 -3
- package/dist/esm/vega-rich-text-table-properties_3.entry.js +3 -3
- package/dist/esm/vega-segment-control.entry.js +3 -3
- package/dist/esm/vega-selection-chip_2.entry.js +4 -4
- package/dist/esm/vega-selection-tile_2.entry.js +4 -4
- package/dist/esm/vega-sidenav_3.entry.js +3 -3
- package/dist/esm/vega-signature-capture.entry.js +3 -3
- package/dist/esm/vega-stepper.entry.js +4 -4
- package/dist/esm/vega-tab-group_2.entry.js +4 -4
- package/dist/esm/vega-table_11.entry.js +4 -4
- package/dist/esm/vega-textarea.entry.js +4 -4
- package/dist/esm/vega-time-picker_2.entry.js +4 -4
- package/dist/esm/vega-toggle-switch.entry.js +3 -3
- package/dist/esm/vega.js +5 -5
- package/dist/sri/vega-sri-manifest.json +232 -228
- package/dist/types/components/vega-combo-box/slimmers/renderers/vega-combo-box-dropdown-renderer.d.ts +1 -0
- package/dist/types/components/vega-combo-box/vega-combo-box.d.ts +21 -0
- package/dist/types/components/vega-dropdown/slimmers/controllers/vega-dropdown-render-mode-controller.d.ts +2 -1
- package/dist/types/components/vega-dropdown/vega-dropdown.d.ts +4 -0
- package/dist/types/components/vega-input-select/slimmers/controllers/vega-input-select-dropdown-controller.d.ts +2 -0
- package/dist/types/components/vega-input-select/slimmers/controllers/vega-input-select-items-slot-controler.d.ts +10 -0
- package/dist/types/components/vega-input-select/types.d.ts +1 -0
- package/dist/types/components/vega-input-select/vega-input-select.d.ts +21 -0
- package/dist/types/components/vega-modal/slimmers/controllers/vega-modal-backdrop-manager.d.ts +66 -0
- package/dist/types/components/vega-modal/slimmers/controllers/vega-modal-open-state-controller.d.ts +1 -5
- package/dist/types/components/vega-modal/slimmers/controllers/vega-modal-z-index-controller.d.ts +1 -1
- package/dist/types/components/vega-modal/slimmers/renderers/vega-modal-renderer.d.ts +1 -1
- package/dist/types/components/vega-modal/vega-modal.d.ts +34 -6
- package/dist/types/components/vega-progress-tracker/slimmers/controllers/vega-progress-tracker-current-steps-controller.d.ts +2 -0
- package/dist/types/components/vega-progress-tracker/vega-progress-tracker.d.ts +1 -0
- package/dist/types/components.d.ts +36 -2
- package/dist/types/helpers/backdrop/shared-backdrop-manager.d.ts +16 -0
- package/dist/vega/index.esm.js +1 -1
- package/dist/vega/{p-3e8baeac.entry.js → p-0512308f.entry.js} +1 -1
- package/dist/vega/p-05d04c07.entry.js +1 -0
- package/dist/vega/{p-46fe3154.entry.js → p-1d8312d3.entry.js} +1 -1
- package/dist/vega/{p-fbd3be00.entry.js → p-200c8914.entry.js} +1 -1
- package/dist/vega/{p-b1ff70bf.js → p-2c737fc8.js} +1 -1
- package/dist/vega/{p-782eb312.entry.js → p-2d77ae73.entry.js} +1 -1
- package/dist/vega/{p-cb90163a.entry.js → p-2d8d4d5b.entry.js} +1 -1
- package/dist/vega/p-31216140.js +1 -0
- package/dist/vega/{p-44439ecc.entry.js → p-36d2df7a.entry.js} +1 -1
- package/dist/vega/{p-2bf17505.entry.js → p-3d6f761a.entry.js} +1 -1
- package/dist/vega/p-4151f53a.entry.js +1 -0
- package/dist/vega/{p-a057285e.entry.js → p-49e1cf4d.entry.js} +1 -1
- package/dist/vega/{p-c66d2a1e.js → p-513bc0d9.js} +1 -1
- package/dist/vega/{p-698fbd73.js → p-5447a8e8.js} +1 -1
- package/dist/vega/{p-45e8424a.entry.js → p-56d19601.entry.js} +1 -1
- package/dist/vega/{p-addbca58.entry.js → p-5924adae.entry.js} +1 -1
- package/dist/vega/{p-9dca874d.entry.js → p-5e4517eb.entry.js} +1 -1
- package/dist/vega/p-5f377954.js +1 -1
- package/dist/vega/{p-140616fe.js → p-66647244.js} +1 -1
- package/dist/vega/{p-62d6e063.entry.js → p-6680ba17.entry.js} +1 -1
- package/dist/vega/{p-288d65ad.entry.js → p-6fcec7c7.entry.js} +1 -1
- package/dist/vega/{p-d08ffdf1.entry.js → p-74f86ff9.entry.js} +1 -1
- package/dist/vega/{p-6ad7144a.entry.js → p-775ecfad.entry.js} +1 -1
- package/dist/vega/{p-6f70a10f.entry.js → p-7950f3e2.entry.js} +1 -1
- package/dist/vega/{p-f246f125.entry.js → p-80b7945a.entry.js} +1 -1
- package/dist/vega/p-8354cff0.entry.js +1 -0
- package/dist/vega/{p-5db61a12.entry.js → p-841b3281.entry.js} +1 -1
- package/dist/vega/p-87e5cb56.entry.js +1 -0
- package/dist/vega/{p-51b68d25.js → p-88be9ec5.js} +1 -1
- package/dist/vega/{p-6dfe2407.js → p-8a001caa.js} +1 -1
- package/dist/vega/p-8c30a60d.js +1 -0
- package/dist/vega/{p-762ea523.entry.js → p-8d4b85e7.entry.js} +1 -1
- package/dist/vega/{p-f8a29127.entry.js → p-8d96f0e8.entry.js} +1 -1
- package/dist/vega/{p-95913e3c.entry.js → p-91303402.entry.js} +1 -1
- package/dist/vega/{p-f5d7b89f.entry.js → p-9c39f90b.entry.js} +1 -1
- package/dist/vega/{p-ed103a1a.entry.js → p-9d96d83f.entry.js} +1 -1
- package/dist/vega/p-9f201152.entry.js +1 -0
- package/dist/vega/{p-48ee3e24.entry.js → p-a775825e.entry.js} +1 -1
- package/dist/vega/{p-b8f8e480.entry.js → p-ae146458.entry.js} +1 -1
- package/dist/vega/{p-f651df3b.entry.js → p-b187b82d.entry.js} +1 -1
- package/dist/vega/{p-e8ee70c5.entry.js → p-b3a2ce06.entry.js} +1 -1
- package/dist/vega/{p-5107277d.entry.js → p-b4c26035.entry.js} +1 -1
- package/dist/vega/{p-8c083255.entry.js → p-b8c13ac9.entry.js} +1 -1
- package/dist/vega/{p-7b57a845.entry.js → p-b9e72de2.entry.js} +1 -1
- package/dist/vega/{p-9d18ba7f.entry.js → p-ba2b9663.entry.js} +1 -1
- package/dist/vega/{p-0af32f31.entry.js → p-bb60e381.entry.js} +1 -1
- package/dist/vega/p-bbad318e.entry.js +1 -0
- package/dist/vega/{p-c9daabe1.entry.js → p-c079c935.entry.js} +1 -1
- package/dist/vega/p-c0e42c03.entry.js +1 -0
- package/dist/vega/{p-c67b9aba.entry.js → p-c41f5684.entry.js} +1 -1
- package/dist/vega/{p-341a6b32.entry.js → p-c54b5a8f.entry.js} +1 -1
- package/dist/vega/{p-91287214.entry.js → p-c5d3b008.entry.js} +1 -1
- package/dist/vega/p-cd1e976c.entry.js +1 -0
- package/dist/vega/{p-2dc5edd0.entry.js → p-db11134b.entry.js} +1 -1
- package/dist/vega/p-df828d90.entry.js +1 -0
- package/dist/vega/{p-14559974.entry.js → p-e1737c8e.entry.js} +1 -1
- package/dist/vega/{p-0b311599.entry.js → p-e1b57e8f.entry.js} +1 -1
- package/dist/vega/{p-9f38448c.entry.js → p-e5ff77f7.entry.js} +1 -1
- package/dist/vega/{p-6f01a71a.entry.js → p-ebe32b25.entry.js} +1 -1
- package/dist/vega/p-ec162599.entry.js +1 -0
- package/dist/vega/{p-d3a36d19.entry.js → p-ec64cc59.entry.js} +1 -1
- package/dist/vega/{p-5df2d6a1.entry.js → p-f78944d7.entry.js} +1 -1
- package/dist/vega/{p-c9c6daa6.entry.js → p-f9bfee81.entry.js} +1 -1
- package/dist/vega/{p-26c7fe8b.entry.js → p-fa65956c.entry.js} +1 -1
- package/dist/vega/{p-f96d0503.entry.js → p-fc7e4c8a.entry.js} +1 -1
- package/dist/vega/{p-b39d4a88.entry.js → p-fd23c365.entry.js} +1 -1
- package/dist/vega/vega.esm.js +1 -1
- package/package.json +1 -1
- package/dist/collection/components/vega-modal/slimmers/controllers/vega-modal-backdrop-controller.js +0 -73
- package/dist/types/components/vega-modal/slimmers/controllers/vega-modal-backdrop-controller.d.ts +0 -27
- package/dist/vega/p-0b9c7c79.entry.js +0 -1
- package/dist/vega/p-2364be92.entry.js +0 -1
- package/dist/vega/p-270697c0.entry.js +0 -1
- package/dist/vega/p-282b37cb.js +0 -1
- package/dist/vega/p-52c6a399.entry.js +0 -1
- package/dist/vega/p-73f2c3c0.entry.js +0 -1
- package/dist/vega/p-7a88a3d3.entry.js +0 -1
- package/dist/vega/p-83a16285.entry.js +0 -1
- package/dist/vega/p-cad5222a.entry.js +0 -1
- package/dist/vega/p-f05a193e.entry.js +0 -1
- package/dist/vega/p-f906a7bc.entry.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
class e{constructor(e,a){this.vegaName=e,this.nativeName=a}getName(){return this.getVegaName()}getCurrentName(e){return"native"!==e.namespace?this.getVegaName():this.getNativeName()}getVegaName(){return this.vegaName}getNativeName(){return this.nativeName}isBrowserRawEvent(){return ne.includes(this)}}const a=new e("vegaChange","change"),n=new e("vegaUserChange","userChange"),t=new e("vegaClick","click"),g=new e("vegaFocus","focus"),s=new e("vegaBlur","blur"),o=new e("vegaClose","close"),w=new e("vegaOpen","modalOpen"),l=new e("vegaValidate","validate"),i=new e("vegaFormSubmit","formSubmit"),r=new e("vegaFormReset","formReset"),v=new e("vegaRowClick","rowClick"),c=new e("vegaRowExpand","rowExpand"),C=new e("vegaRowDragDrop","rowDragDrop"),d=new e("vegaSelectChange","selectChange"),h=new e("vegaRowSelect","rowSelect"),p=new e("vegaRowSelectAll","rowSelectAll"),k=new e("vegaSelectAllChange","selectAllChange"),u=new e("vegaPageSizeChange","pageSizeChange"),S=new e("vegaDropdownClick","dropdownClick"),m=new e("vegaDropdownSelectAllClick","dropdownSelectAllClick"),A=new e("vegaCreate","create"),R=new e("vegaSearch","search"),D=new e("vegaSearchTrigger","searchTrigger"),E=new e("vegaHide","hide"),b=new e("vegaShow","show"),I=new e("vegaPopoverShow","popoverShow"),U=new e("vegaPopoverHide","popoverHide"),y=new e("vegaCancel","cancel"),B=new e("vegaRemove","remove"),N=new e("vegaPageUpdate","pageUpdate"),P=new e("vegaCurrentStepUpdate","currentStepUpdate"),x=new e("vegaToggleStatus","toggleStatus"),F=new e("vegaStateUpdate","stateUpdate"),H=new e("vegaGroupClick","groupClick"),T=new e("vegaMenuClick","menuClick"),f=new e("vegaExpand","expand"),L=new e("vegaShow","dropdownShow"),M=new e("vegaHide","dropdownHide"),z=new e("vegaSearch","dropdownSearch"),O=new e("vegaActionClick","actionClick"),V=new e("vegaEventClick","eventClick"),Y=new e("vegaDateDblClick","dateDblClick"),G=new e("vegaDateClick","dateClick"),j=new e("vegaCountryChange","countryChange"),q=new e("vegaActionButtonClick","actionButtonClick"),J=new e("vegaMoreActionClick","moreActionClick"),K=new e("vegaSelectedFileChange","selectedFileChange"),Q=new e("vegaImageInserted","imageInserted"),W=new e("vegaRetry","retry"),X=new e("vegaPreview","preview"),Z=new e("vegaLabelButtonClick","labelButtonClick"),$=new e("vegaReset","reset"),_=new e("vegaClear","clear"),ee=new e("vegaComplete","complete"),ae=new e("vegaPaste","paste"),ne=[a,t,g,s,ae],te=new e("vegaMonthYearChange","monthYearChange"),ge=new e("vegaSelectionChange","selectionChange"),se=new e("vegaTodayClick","todayClick"),oe=new e("vegaSuggestionItemClick","suggestionItemClick"),we=new e("vegaNativeInputChange","nativeInputChange"),le=new e("vegaSourceCodeChange","sourceCodeChange"),ie=new e("vegaEventEdit","eventEdit"),re=new e("vegaAdditionalLinkClick","additionalLinkClick");export{P as $,
|
|
1
|
+
class e{constructor(e,a){this.vegaName=e,this.nativeName=a}getName(){return this.getVegaName()}getCurrentName(e){return"native"!==e.namespace?this.getVegaName():this.getNativeName()}getVegaName(){return this.vegaName}getNativeName(){return this.nativeName}isBrowserRawEvent(){return ne.includes(this)}}const a=new e("vegaChange","change"),n=new e("vegaUserChange","userChange"),t=new e("vegaClick","click"),g=new e("vegaFocus","focus"),s=new e("vegaBlur","blur"),o=new e("vegaClose","close"),w=new e("vegaOpen","modalOpen"),l=new e("vegaValidate","validate"),i=new e("vegaFormSubmit","formSubmit"),r=new e("vegaFormReset","formReset"),v=new e("vegaRowClick","rowClick"),c=new e("vegaRowExpand","rowExpand"),C=new e("vegaRowDragDrop","rowDragDrop"),d=new e("vegaSelectChange","selectChange"),h=new e("vegaRowSelect","rowSelect"),p=new e("vegaRowSelectAll","rowSelectAll"),k=new e("vegaSelectAllChange","selectAllChange"),u=new e("vegaPageSizeChange","pageSizeChange"),S=new e("vegaDropdownClick","dropdownClick"),m=new e("vegaDropdownSelectAllClick","dropdownSelectAllClick"),A=new e("vegaCreate","create"),R=new e("vegaSearch","search"),D=new e("vegaSearchTrigger","searchTrigger"),E=new e("vegaHide","hide"),b=new e("vegaShow","show"),I=new e("vegaPopoverShow","popoverShow"),U=new e("vegaPopoverHide","popoverHide"),y=new e("vegaCancel","cancel"),B=new e("vegaRemove","remove"),N=new e("vegaPageUpdate","pageUpdate"),P=new e("vegaCurrentStepUpdate","currentStepUpdate"),x=new e("vegaToggleStatus","toggleStatus"),F=new e("vegaStateUpdate","stateUpdate"),H=new e("vegaGroupClick","groupClick"),T=new e("vegaMenuClick","menuClick"),f=new e("vegaExpand","expand"),L=new e("vegaShow","dropdownShow"),M=new e("vegaHide","dropdownHide"),z=new e("vegaSearch","dropdownSearch"),O=new e("vegaActionClick","actionClick"),V=new e("vegaEventClick","eventClick"),Y=new e("vegaDateDblClick","dateDblClick"),G=new e("vegaDateClick","dateClick"),j=new e("vegaCountryChange","countryChange"),q=new e("vegaActionButtonClick","actionButtonClick"),J=new e("vegaMoreActionClick","moreActionClick"),K=new e("vegaSelectedFileChange","selectedFileChange"),Q=new e("vegaImageInserted","imageInserted"),W=new e("vegaRetry","retry"),X=new e("vegaPreview","preview"),Z=new e("vegaLabelButtonClick","labelButtonClick"),$=new e("vegaReset","reset"),_=new e("vegaClear","clear"),ee=new e("vegaComplete","complete"),ae=new e("vegaPaste","paste"),ne=[a,t,g,s,ae],te=new e("vegaMonthYearChange","monthYearChange"),ge=new e("vegaSelectionChange","selectionChange"),se=new e("vegaTodayClick","todayClick"),oe=new e("vegaSuggestionItemClick","suggestionItemClick"),we=new e("vegaNativeInputChange","nativeInputChange"),le=new e("vegaSourceCodeChange","sourceCodeChange"),ie=new e("vegaEventEdit","eventEdit"),re=new e("vegaAdditionalLinkClick","additionalLinkClick");export{P as $,M as A,D as B,Z as C,K as D,W as E,X as F,i as G,r as H,l as I,y as J,we as K,g as L,s as M,oe as N,ae as O,ee as P,j as Q,b as R,E as S,x as T,w as U,S as V,F as W,H as X,T as Y,O as Z,u as _,t as a,Q as a0,le as a1,d as a2,k as a3,v as a4,c as a5,C as a6,h as a7,p as a8,U as b,I as c,a as d,f as e,re as f,$ as g,z as h,o as i,q as j,V as k,Y as l,J as m,G as n,ie as o,N as p,n as q,B as r,A as s,R as t,m as u,te as v,_ as w,ge as x,se as y,L as z}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,c as e,h as o,H as i,g as r}from"./p-6b2342e0.js";import{s as a}from"./p-519a7d55.js";import{c as s,M as n,V as l,I as d}from"./p-6e1ab235.js";import{V as p,I as b}from"./p-8ce9e214.js";import{c as u}from"./p-3f183b52.js";import{c}from"./p-140616fe.js";import{a as h,V as v}from"./p-698fbd73.js";import{C as g}from"./p-b1ff70bf.js";import{D as f,d as m}from"./p-526e3634.js";import{F as y}from"./p-3a68b729.js";import{M as x}from"./p-78a57a17.js";import{a as w}from"./p-52b8f2d2.js";import{S as j}from"./p-29e3eb12.js";import{C as S}from"./p-2d0d575f.js";import{f as I}from"./p-528748fa.js";import"./p-6a334573.js";import"./p-331a62d5.js";import"./p-282b37cb.js";import"./p-b75ee3ba.js";import"./p-5f377954.js";import"./p-87a4d75f.js";import"./p-982747ef.js";import"./p-d27ae9ff.js";import"./p-262ec334.js";var R=function(t,e,o,i){var r,a=arguments.length,s=a<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,o,i);else for(var n=t.length-1;n>=0;n--)(r=t[n])&&(s=(a<3?r(s):a>3?r(e,o,s):r(e,o))||s);return a>3&&s&&Object.defineProperty(e,o,s),s};class k extends l{registerGroupClickObserver(){f.addUniqueObserverToNode(this.host,y,(t=>{this.clickEventEmitter.emit(t.detail)}))}unregisterGroupClickObserver(){f.removeUniqueObserverFromNode(this.host,y)}}R([s()],k.prototype,"host",void 0),R([s()],k.prototype,"clickEventEmitter",void 0),R([n("connectedCallback")],k.prototype,"registerGroupClickObserver",null),R([n("disconnectedCallback")],k.prototype,"unregisterGroupClickObserver",null);var O=function(t,e,o,i){var r,a=arguments.length,s=a<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,o,i);else for(var n=t.length-1;n>=0;n--)(r=t[n])&&(s=(a<3?r(s):a>3?r(e,o,s):r(e,o))||s);return a>3&&s&&Object.defineProperty(e,o,s),s};class A extends l{constructor(){super(...arguments),this.mutationObserver=new x({target:()=>this.host,options:{childList:!0,subtree:!0,attributes:!0,attributeFilter:["disabled"]},mutationFilter:w("VEGA-BUTTON-GROUP-ITEM"),callback:()=>this.updateAllItemsDisabledState()})}disconnectedCallback(){}componentWillLoad(){this.updateAllItemsDisabledState()}updateAllItemsDisabledState(){const t=this.host.querySelectorAll("vega-button-group-item");this.allItemsDisabled=t.length>0&&Array.from(t).every((t=>t.disabled))}}O([s()],A.prototype,"host",void 0),O([s({writable:!0})],A.prototype,"allItemsDisabled",void 0),O([d()],A.prototype,"mutationObserver",void 0),O([n("disconnectedCallback")],A.prototype,"disconnectedCallback",null),O([n("componentWillLoad")],A.prototype,"componentWillLoad",null);const D=[{payloadKey:"VARIANT_IS_PRIMARY",payloadDescription:"Specifies the visual style and prominence of the button group. It determines how the button group will be presented to the user.",payloadValue:t=>"primary"===t.variant},{payloadKey:"VARIANT_IS_SECONDARY",payloadDescription:"Specifies the visual style and prominence of the button group. It determines how the button group will be presented to the user.",payloadValue:t=>"secondary"===t.variant},{payloadKey:"VARIANT_IS_TERTIARY",payloadDescription:"Specifies the visual style and prominence of the button group. It determines how the button group will be presented to the user.",payloadValue:t=>"tertiary"===t.variant}];var N=function(t,e,o,i){var r,a=arguments.length,s=a<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,o,i);else for(var n=t.length-1;n>=0;n--)(r=t[n])&&(s=(a<3?r(s):a>3?r(e,o,s):r(e,o))||s);return a>3&&s&&Object.defineProperty(e,o,s),s};const C=class{constructor(o){t(this,o),this.vegaClick=e(this,"vegaClick",7),this.click=e(this,"click",7),this.globalSlimmers={},this.clickEventEmitter=c(C,h),this.clickEventPrevent=new g([h],(()=>this.flexContainer)),this.buttonGroupClickController=new k,this.variantNotifySlimmer=u(C,"variant","watchVariant"),this.sizeNotifySlimmer=u(C,"size","watchSize"),this.iconAlignNotifySlimmer=u(C,"iconAlign","watchIconAlign"),this.disabledNotifySlimmer=u(C,"disabled","watchDisabled"),this.allItemsDisabledNotifySlimmer=u(C,"allItemsDisabled","watchAllItemsDisabled"),this.allItemsDisabledController=new A,this.vegaComponentUsageRuntimeMetricsSlimmer=new p(D),this.allItemsDisabled=!1,this.variant="primary",this.size="default",this.iconAlign="left",this.disabled=!1}watchAllItemsDisabled(){}watchVariant(){}watchSize(){}watchIconAlign(){}watchDisabled(){}render(){return a(o(i,null,o("vega-flex",{class:`vega-button-group-container vega-button-group-${this.variant}`,direction:"row",alignItems:"tertiary"===this.variant?"center":"stretch",gap:"tertiary"!==this.variant?"size-2":"0",ref:t=>this.flexContainer=t},o("slot",null))),this.host)}get host(){return r(this)}static get watchers(){return{allItemsDisabled:["watchAllItemsDisabled"],variant:["watchVariant"],size:["watchSize"],iconAlign:["watchIconAlign"],disabled:["watchDisabled"]}}};N([b()],C.prototype,"globalSlimmers",void 0),N([d()],C.prototype,"clickEventEmitter",void 0),N([d()],C.prototype,"clickEventPrevent",void 0),N([d()],C.prototype,"buttonGroupClickController",void 0),N([d()],C.prototype,"variantNotifySlimmer",void 0),N([d()],C.prototype,"sizeNotifySlimmer",void 0),N([d()],C.prototype,"iconAlignNotifySlimmer",void 0),N([d()],C.prototype,"disabledNotifySlimmer",void 0),N([d()],C.prototype,"allItemsDisabledNotifySlimmer",void 0),N([d()],C.prototype,"allItemsDisabledController",void 0),N([d()],C.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),C.style=":host{display:inline-block;border-radius:9999px}.vega-button-group-primary{gap:6px}.vega-button-group-container:not(.vega-button-group-tertiary){border-radius:9999px}.vega-button-group-container:not(.vega-button-group-tertiary)>::slotted(.vega-button-group-item:first-child){border-top-left-radius:9999px;border-bottom-left-radius:9999px}.vega-button-group-container:not(.vega-button-group-tertiary)>::slotted(.vega-button-group-item:last-child){border-top-right-radius:9999px;border-bottom-right-radius:9999px}.vega-button-group-tertiary>::slotted(.vega-button-group-item){border-color:rgba(var(--v-border-color-divider-secondary, 199, 217, 229, 1));border-left-width:1px;border-top-width:0px;border-bottom-width:0px;border-right-width:0px;border-style:solid}.vega-button-group-tertiary>::slotted(.vega-button-group-item:first-child){border-left-width:0px}";var z=function(t,e,o,i){var r,a=arguments.length,s=a<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,o,i);else for(var n=t.length-1;n>=0;n--)(r=t[n])&&(s=(a<3?r(s):a>3?r(e,o,s):r(e,o))||s);return a>3&&s&&Object.defineProperty(e,o,s),s};class V extends j{constructor(){super({parent:"vega-button-group",subStates:[{subStateName:"variant",parentStateName:"variant"},{subStateName:"size",parentStateName:"size"},{subStateName:"iconAlign",parentStateName:"iconAlign"},{subStateName:"parentDisabled",parentStateName:"disabled"},{subStateName:"allItemsDisabled",parentStateName:"allItemsDisabled"}]})}}z([s({writable:!0})],V.prototype,"size",void 0),z([s({writable:!0})],V.prototype,"variant",void 0),z([s({writable:!0})],V.prototype,"iconAlign",void 0),z([s({writable:!0})],V.prototype,"parentDisabled",void 0),z([s({writable:!0})],V.prototype,"allItemsDisabled",void 0);var _=function(t,e,o,i){var r,a=arguments.length,s=a<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,o,i);else for(var n=t.length-1;n>=0;n--)(r=t[n])&&(s=(a<3?r(s):a>3?r(e,o,s):r(e,o))||s);return a>3&&s&&Object.defineProperty(e,o,s),s};class E extends l{constructor(){super(...arguments),this.buttonItemClickHandle=()=>{this.notifyParentGroup(this.itemKey)},this.moreDropdownItemClickHandle=t=>{this.notifyParentGroup(t.detail)},this.isDisabled=()=>this.disabled||this.parentDisabled}render(){var t,e,i;if(this.dropdownSource&&this.dropdownSource.length){const r=Object.assign(Object.assign({},this.dropdownProps),{trigger:this.isDisabled()?"none":null!==(e=null===(t=this.dropdownProps)||void 0===t?void 0:t.trigger)&&void 0!==e?e:"click"});return this.isDisabled()&&(null===(i=this.dropdownProps)||void 0===i?void 0:i.trigger)&&(this.dropdownProps.trigger="none"),o("vega-dropdown",Object.assign({source:this.dropdownSource},r,{ref:t=>{f.addUniqueObserverToNode(t,v,this.moreDropdownItemClickHandle)}}),this.renderButtonItemWithTooltip())}return this.renderButtonItemWithTooltip()}renderButtonItemWithTooltip(){return this.iconOnly&&this.label?o("vega-tooltip",{placement:"top",text:this.label},this.renderButtonItem()):this.renderButtonItem()}renderButtonItem(){const t=this.getButtonProps(),e=this.parentDisabled||this.allItemsDisabled?" button-group-all-disabled":"";return"tertiary"===this.variant?o("vega-button-link",Object.assign({class:`button-group-item-button-${this.variant}${e}`},t)):o("vega-button",Object.assign({class:`button-group-item-button-${this.variant}${e}`,variant:this.variant},t))}notifyParentGroup(t){const e=I(this.host,"vega-button-group");e&&S.notify(m.getSubject(e,y),{host:this.host,detail:t})}getButtonProps(){return{size:this.size,icon:this.icon,label:this.iconOnly?"":this.getDefaultLabel(),iconAlign:this.iconAlign,disabled:this.isDisabled(),ref:t=>{f.addUniqueObserverToNode(t,h,this.buttonItemClickHandle)}}}getDefaultLabel(){return!this.icon&&!this.label&&this.dropdownSource&&this.dropdownSource.length?"More":this.label}}_([s()],E.prototype,"host",void 0),_([s()],E.prototype,"size",void 0),_([s()],E.prototype,"icon",void 0),_([s()],E.prototype,"label",void 0),_([s()],E.prototype,"iconAlign",void 0),_([s()],E.prototype,"disabled",void 0),_([s()],E.prototype,"parentDisabled",void 0),_([s()],E.prototype,"allItemsDisabled",void 0),_([s()],E.prototype,"iconOnly",void 0),_([s()],E.prototype,"variant",void 0),_([s()],E.prototype,"itemKey",void 0),_([s()],E.prototype,"dropdownSource",void 0),_([s()],E.prototype,"dropdownProps",void 0);var G=function(t,e,o,i){var r,a=arguments.length,s=a<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,o,i);else for(var n=t.length-1;n>=0;n--)(r=t[n])&&(s=(a<3?r(s):a>3?r(e,o,s):r(e,o))||s);return a>3&&s&&Object.defineProperty(e,o,s),s};const T=class{constructor(e){t(this,e),this.globalSlimmers={},this.subStateObserverSlimmer=new V,this.buttonGroupItemRenderer=new E,this.vegaComponentUsageRuntimeMetricsSlimmer=new p,this.variant="primary",this.size="default",this.iconAlign="left",this.parentDisabled=!1,this.allItemsDisabled=!1,this.iconOnly=!1,this.disabled=!1}render(){return a(o(i,{class:"vega-button-group-item"},this.buttonGroupItemRenderer.render()),this.host)}get host(){return r(this)}};G([b()],T.prototype,"globalSlimmers",void 0),G([d()],T.prototype,"subStateObserverSlimmer",void 0),G([d()],T.prototype,"buttonGroupItemRenderer",void 0),G([d()],T.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),T.style=":host{display:inline-block}:host>vega-tooltip,:host>vega-dropdown{height:100%}:host>vega-tooltip>vega-tooltip,:host>vega-dropdown>vega-tooltip{height:100%}:host vega-button{height:100%}:host vega-button::part(button):focus-visible{position:relative;outline:2px solid rgba(var(--v-border-color-action, 19, 98, 226, 1));outline-offset:2px;border-radius:4px;box-shadow:0px 0px 0px 6px rgba(var(--v-bg-primary, 252, 252, 252, 1));z-index:1}:host vega-button-link::part(link){padding-left:12px;padding-right:12px;box-sizing:border-box}:host vega-button-link::part(link):focus-visible{outline:2px solid rgba(var(--v-border-color-action, 19, 98, 226, 1));outline-offset:0px;border-top-left-radius:4px;border-bottom-left-radius:4px;border-top-right-radius:4px;border-bottom-right-radius:4px;color:rgba(var(--v-text-link, 19, 98, 226, 1))}:host vega-button-link::part(label-container){text-decoration:none}:host vega-button-link:hover::part(label-container){text-decoration:underline}:host vega-button::part(button){margin-right:-4px}:host(:first-child) vega-tooltip:has(vega-button),:host(:first-child) vega-dropdown:has(vega-button){border-top-left-radius:9999px;border-bottom-left-radius:9999px}:host(:first-child) vega-button::part(button){border-top-left-radius:9999px;border-bottom-left-radius:9999px}:host(:first-child) vega-button::part(button):focus-visible{margin-left:0}:host(:last-child) vega-tooltip:has(vega-button),:host(:last-child) vega-dropdown:has(vega-button){border-top-right-radius:9999px;border-bottom-right-radius:9999px}:host(:last-child) vega-button::part(button){border-top-right-radius:9999px;border-bottom-right-radius:9999px}:host(:last-child) vega-button::part(button){margin-right:0}vega-button::part(button){border-top-left-radius:0px;border-bottom-left-radius:0px;border-top-right-radius:0px;border-bottom-right-radius:0px;height:100%}";export{C as vega_button_group,T as vega_button_group_item}
|
|
1
|
+
import{r as t,c as e,h as o,H as i,g as r}from"./p-6b2342e0.js";import{s as a}from"./p-519a7d55.js";import{c as s,M as n,V as l,I as d}from"./p-6e1ab235.js";import{V as p,I as b}from"./p-8ce9e214.js";import{c as u}from"./p-3f183b52.js";import{c}from"./p-66647244.js";import{a as h,V as v}from"./p-5447a8e8.js";import{C as g}from"./p-2c737fc8.js";import{D as m,d as f}from"./p-526e3634.js";import{F as y}from"./p-3a68b729.js";import{M as x}from"./p-78a57a17.js";import{a as w}from"./p-52b8f2d2.js";import{S as j}from"./p-29e3eb12.js";import{C as S}from"./p-2d0d575f.js";import{f as I}from"./p-528748fa.js";import"./p-6a334573.js";import"./p-331a62d5.js";import"./p-8c30a60d.js";import"./p-b75ee3ba.js";import"./p-5f377954.js";import"./p-87a4d75f.js";import"./p-982747ef.js";import"./p-d27ae9ff.js";import"./p-262ec334.js";var R=function(t,e,o,i){var r,a=arguments.length,s=a<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,o,i);else for(var n=t.length-1;n>=0;n--)(r=t[n])&&(s=(a<3?r(s):a>3?r(e,o,s):r(e,o))||s);return a>3&&s&&Object.defineProperty(e,o,s),s};class k extends l{registerGroupClickObserver(){m.addUniqueObserverToNode(this.host,y,(t=>{this.clickEventEmitter.emit(t.detail)}))}unregisterGroupClickObserver(){m.removeUniqueObserverFromNode(this.host,y)}}R([s()],k.prototype,"host",void 0),R([s()],k.prototype,"clickEventEmitter",void 0),R([n("connectedCallback")],k.prototype,"registerGroupClickObserver",null),R([n("disconnectedCallback")],k.prototype,"unregisterGroupClickObserver",null);var O=function(t,e,o,i){var r,a=arguments.length,s=a<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,o,i);else for(var n=t.length-1;n>=0;n--)(r=t[n])&&(s=(a<3?r(s):a>3?r(e,o,s):r(e,o))||s);return a>3&&s&&Object.defineProperty(e,o,s),s};class A extends l{constructor(){super(...arguments),this.mutationObserver=new x({target:()=>this.host,options:{childList:!0,subtree:!0,attributes:!0,attributeFilter:["disabled"]},mutationFilter:w("VEGA-BUTTON-GROUP-ITEM"),callback:()=>this.updateAllItemsDisabledState()})}disconnectedCallback(){}componentWillLoad(){this.updateAllItemsDisabledState()}updateAllItemsDisabledState(){const t=this.host.querySelectorAll("vega-button-group-item");this.allItemsDisabled=t.length>0&&Array.from(t).every((t=>t.disabled))}}O([s()],A.prototype,"host",void 0),O([s({writable:!0})],A.prototype,"allItemsDisabled",void 0),O([d()],A.prototype,"mutationObserver",void 0),O([n("disconnectedCallback")],A.prototype,"disconnectedCallback",null),O([n("componentWillLoad")],A.prototype,"componentWillLoad",null);const D=[{payloadKey:"VARIANT_IS_PRIMARY",payloadDescription:"Specifies the visual style and prominence of the button group. It determines how the button group will be presented to the user.",payloadValue:t=>"primary"===t.variant},{payloadKey:"VARIANT_IS_SECONDARY",payloadDescription:"Specifies the visual style and prominence of the button group. It determines how the button group will be presented to the user.",payloadValue:t=>"secondary"===t.variant},{payloadKey:"VARIANT_IS_TERTIARY",payloadDescription:"Specifies the visual style and prominence of the button group. It determines how the button group will be presented to the user.",payloadValue:t=>"tertiary"===t.variant}];var N=function(t,e,o,i){var r,a=arguments.length,s=a<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,o,i);else for(var n=t.length-1;n>=0;n--)(r=t[n])&&(s=(a<3?r(s):a>3?r(e,o,s):r(e,o))||s);return a>3&&s&&Object.defineProperty(e,o,s),s};const C=class{constructor(o){t(this,o),this.vegaClick=e(this,"vegaClick",7),this.click=e(this,"click",7),this.globalSlimmers={},this.clickEventEmitter=c(C,h),this.clickEventPrevent=new g([h],(()=>this.flexContainer)),this.buttonGroupClickController=new k,this.variantNotifySlimmer=u(C,"variant","watchVariant"),this.sizeNotifySlimmer=u(C,"size","watchSize"),this.iconAlignNotifySlimmer=u(C,"iconAlign","watchIconAlign"),this.disabledNotifySlimmer=u(C,"disabled","watchDisabled"),this.allItemsDisabledNotifySlimmer=u(C,"allItemsDisabled","watchAllItemsDisabled"),this.allItemsDisabledController=new A,this.vegaComponentUsageRuntimeMetricsSlimmer=new p(D),this.allItemsDisabled=!1,this.variant="primary",this.size="default",this.iconAlign="left",this.disabled=!1}watchAllItemsDisabled(){}watchVariant(){}watchSize(){}watchIconAlign(){}watchDisabled(){}render(){return a(o(i,null,o("vega-flex",{class:`vega-button-group-container vega-button-group-${this.variant}`,direction:"row",alignItems:"tertiary"===this.variant?"center":"stretch",gap:"tertiary"!==this.variant?"size-2":"0",ref:t=>this.flexContainer=t},o("slot",null))),this.host)}get host(){return r(this)}static get watchers(){return{allItemsDisabled:["watchAllItemsDisabled"],variant:["watchVariant"],size:["watchSize"],iconAlign:["watchIconAlign"],disabled:["watchDisabled"]}}};N([b()],C.prototype,"globalSlimmers",void 0),N([d()],C.prototype,"clickEventEmitter",void 0),N([d()],C.prototype,"clickEventPrevent",void 0),N([d()],C.prototype,"buttonGroupClickController",void 0),N([d()],C.prototype,"variantNotifySlimmer",void 0),N([d()],C.prototype,"sizeNotifySlimmer",void 0),N([d()],C.prototype,"iconAlignNotifySlimmer",void 0),N([d()],C.prototype,"disabledNotifySlimmer",void 0),N([d()],C.prototype,"allItemsDisabledNotifySlimmer",void 0),N([d()],C.prototype,"allItemsDisabledController",void 0),N([d()],C.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),C.style=":host{display:inline-block;border-radius:9999px}.vega-button-group-primary{gap:6px}.vega-button-group-container:not(.vega-button-group-tertiary){border-radius:9999px}.vega-button-group-container:not(.vega-button-group-tertiary)>::slotted(.vega-button-group-item:first-child){border-top-left-radius:9999px;border-bottom-left-radius:9999px}.vega-button-group-container:not(.vega-button-group-tertiary)>::slotted(.vega-button-group-item:last-child){border-top-right-radius:9999px;border-bottom-right-radius:9999px}.vega-button-group-tertiary>::slotted(.vega-button-group-item){border-color:rgba(var(--v-border-color-divider-secondary, 199, 217, 229, 1));border-left-width:1px;border-top-width:0px;border-bottom-width:0px;border-right-width:0px;border-style:solid}.vega-button-group-tertiary>::slotted(.vega-button-group-item:first-child){border-left-width:0px}";var z=function(t,e,o,i){var r,a=arguments.length,s=a<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,o,i);else for(var n=t.length-1;n>=0;n--)(r=t[n])&&(s=(a<3?r(s):a>3?r(e,o,s):r(e,o))||s);return a>3&&s&&Object.defineProperty(e,o,s),s};class V extends j{constructor(){super({parent:"vega-button-group",subStates:[{subStateName:"variant",parentStateName:"variant"},{subStateName:"size",parentStateName:"size"},{subStateName:"iconAlign",parentStateName:"iconAlign"},{subStateName:"parentDisabled",parentStateName:"disabled"},{subStateName:"allItemsDisabled",parentStateName:"allItemsDisabled"}]})}}z([s({writable:!0})],V.prototype,"size",void 0),z([s({writable:!0})],V.prototype,"variant",void 0),z([s({writable:!0})],V.prototype,"iconAlign",void 0),z([s({writable:!0})],V.prototype,"parentDisabled",void 0),z([s({writable:!0})],V.prototype,"allItemsDisabled",void 0);var _=function(t,e,o,i){var r,a=arguments.length,s=a<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,o,i);else for(var n=t.length-1;n>=0;n--)(r=t[n])&&(s=(a<3?r(s):a>3?r(e,o,s):r(e,o))||s);return a>3&&s&&Object.defineProperty(e,o,s),s};class E extends l{constructor(){super(...arguments),this.buttonItemClickHandle=()=>{this.notifyParentGroup(this.itemKey)},this.moreDropdownItemClickHandle=t=>{this.notifyParentGroup(t.detail)},this.isDisabled=()=>this.disabled||this.parentDisabled}render(){var t,e,i;if(this.dropdownSource&&this.dropdownSource.length){const r=Object.assign(Object.assign({},this.dropdownProps),{trigger:this.isDisabled()?"none":null!==(e=null===(t=this.dropdownProps)||void 0===t?void 0:t.trigger)&&void 0!==e?e:"click"});return this.isDisabled()&&(null===(i=this.dropdownProps)||void 0===i?void 0:i.trigger)&&(this.dropdownProps.trigger="none"),o("vega-dropdown",Object.assign({source:this.dropdownSource},r,{ref:t=>{m.addUniqueObserverToNode(t,v,this.moreDropdownItemClickHandle)}}),this.renderButtonItemWithTooltip())}return this.renderButtonItemWithTooltip()}renderButtonItemWithTooltip(){return this.iconOnly&&this.label?o("vega-tooltip",{placement:"top",text:this.label},this.renderButtonItem()):this.renderButtonItem()}renderButtonItem(){const t=this.getButtonProps(),e=this.parentDisabled||this.allItemsDisabled?" button-group-all-disabled":"";return"tertiary"===this.variant?o("vega-button-link",Object.assign({class:`button-group-item-button-${this.variant}${e}`},t)):o("vega-button",Object.assign({class:`button-group-item-button-${this.variant}${e}`,variant:this.variant},t))}notifyParentGroup(t){const e=I(this.host,"vega-button-group");e&&S.notify(f.getSubject(e,y),{host:this.host,detail:t})}getButtonProps(){return{size:this.size,icon:this.icon,label:this.iconOnly?"":this.getDefaultLabel(),iconAlign:this.iconAlign,disabled:this.isDisabled(),ref:t=>{m.addUniqueObserverToNode(t,h,this.buttonItemClickHandle)}}}getDefaultLabel(){return!this.icon&&!this.label&&this.dropdownSource&&this.dropdownSource.length?"More":this.label}}_([s()],E.prototype,"host",void 0),_([s()],E.prototype,"size",void 0),_([s()],E.prototype,"icon",void 0),_([s()],E.prototype,"label",void 0),_([s()],E.prototype,"iconAlign",void 0),_([s()],E.prototype,"disabled",void 0),_([s()],E.prototype,"parentDisabled",void 0),_([s()],E.prototype,"allItemsDisabled",void 0),_([s()],E.prototype,"iconOnly",void 0),_([s()],E.prototype,"variant",void 0),_([s()],E.prototype,"itemKey",void 0),_([s()],E.prototype,"dropdownSource",void 0),_([s()],E.prototype,"dropdownProps",void 0);var G=function(t,e,o,i){var r,a=arguments.length,s=a<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,o,i);else for(var n=t.length-1;n>=0;n--)(r=t[n])&&(s=(a<3?r(s):a>3?r(e,o,s):r(e,o))||s);return a>3&&s&&Object.defineProperty(e,o,s),s};const T=class{constructor(e){t(this,e),this.globalSlimmers={},this.subStateObserverSlimmer=new V,this.buttonGroupItemRenderer=new E,this.vegaComponentUsageRuntimeMetricsSlimmer=new p,this.variant="primary",this.size="default",this.iconAlign="left",this.parentDisabled=!1,this.allItemsDisabled=!1,this.iconOnly=!1,this.disabled=!1}render(){return a(o(i,{class:"vega-button-group-item"},this.buttonGroupItemRenderer.render()),this.host)}get host(){return r(this)}};G([b()],T.prototype,"globalSlimmers",void 0),G([d()],T.prototype,"subStateObserverSlimmer",void 0),G([d()],T.prototype,"buttonGroupItemRenderer",void 0),G([d()],T.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),T.style=":host{display:inline-block}:host>vega-tooltip,:host>vega-dropdown{height:100%}:host>vega-tooltip>vega-tooltip,:host>vega-dropdown>vega-tooltip{height:100%}:host vega-button{height:100%}:host vega-button::part(button):focus-visible{position:relative;outline:2px solid rgba(var(--v-border-color-action, 19, 98, 226, 1));outline-offset:2px;border-radius:4px;box-shadow:0px 0px 0px 6px rgba(var(--v-bg-primary, 252, 252, 252, 1));z-index:1}:host vega-button-link::part(link){padding-left:12px;padding-right:12px;box-sizing:border-box}:host vega-button-link::part(link):focus-visible{outline:2px solid rgba(var(--v-border-color-action, 19, 98, 226, 1));outline-offset:0px;border-top-left-radius:4px;border-bottom-left-radius:4px;border-top-right-radius:4px;border-bottom-right-radius:4px;color:rgba(var(--v-text-link, 19, 98, 226, 1))}:host vega-button-link::part(label-container){text-decoration:none}:host vega-button-link:hover::part(label-container){text-decoration:underline}:host vega-button::part(button){margin-right:-4px}:host(:first-child) vega-tooltip:has(vega-button),:host(:first-child) vega-dropdown:has(vega-button){border-top-left-radius:9999px;border-bottom-left-radius:9999px}:host(:first-child) vega-button::part(button){border-top-left-radius:9999px;border-bottom-left-radius:9999px}:host(:first-child) vega-button::part(button):focus-visible{margin-left:0}:host(:last-child) vega-tooltip:has(vega-button),:host(:last-child) vega-dropdown:has(vega-button){border-top-right-radius:9999px;border-bottom-right-radius:9999px}:host(:last-child) vega-button::part(button){border-top-right-radius:9999px;border-bottom-right-radius:9999px}:host(:last-child) vega-button::part(button){margin-right:0}vega-button::part(button){border-top-left-radius:0px;border-bottom-left-radius:0px;border-top-right-radius:0px;border-bottom-right-radius:0px;height:100%}";export{C as vega_button_group,T as vega_button_group_item}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{h as e,r as t,c as i,H as a,g as n}from"./p-6b2342e0.js";import{s as o}from"./p-519a7d55.js";import{n as s,c as r}from"./p-262ec334.js";import{D as l}from"./p-526e3634.js";import{G as g,M as p,d as h,a as c,_ as m}from"./p-698fbd73.js";import{n as f,s as v,P as u,r as d,i as b,h as x}from"./p-9dcecdd3.js";import{a as w}from"./p-528748fa.js";import{C as S}from"./p-b1ff70bf.js";import{c as y}from"./p-140616fe.js";import{c as C,M as z,V as j,I as P}from"./p-6e1ab235.js";import{V as O,I as k}from"./p-8ce9e214.js";import{T as I}from"./p-6cde45fc.js";import{R as M}from"./p-3dee1e55.js";import{g as L}from"./p-49a2e141.js";import{P as A}from"./p-81dd00d0.js";import{u as E,v as R}from"./p-3a68b729.js";import{F as T}from"./p-87a4d75f.js";import"./p-2d0d575f.js";import"./p-331a62d5.js";import"./p-282b37cb.js";import"./p-5f377954.js";import"./p-6a334573.js";import"./p-b75ee3ba.js";import"./p-0d18368b.js";import"./p-cb378636.js";import"./p-8db904dc.js";import"./p-ed45b3b6.js";import"./p-d4ea8e22.js";import"./p-b438e68b.js";import"./p-0c667d6a.js";import"./p-d27ae9ff.js";import"./p-982747ef.js";const N=({pageSize:t,current:i,total:a,translationSlimmer:n})=>{const o=a>0?t*(i-1)+1:0,s=Math.min(i*t,a);return e("vega-field-label",{label:n.t("Viewing {0}-{1} of {2}",o,s,a)})},_=({onChange:t,pageCount:i,translationSlimmer:a})=>{let n;const o=()=>{if(n.value){const e=s(r(n.value,1),1,i);t(e),n.value=""}},h=e=>{e.stopPropagation()};return e("vega-flex",{alignItems:"center",justifyContent:"center",gap:"size-8"},e("vega-field-label",{label:a.t("Go To")}),e("vega-form",{ref:e=>{l.addUniqueObserverToNode(e,g,o)}},e("vega-input",{"data-vega-form":"paginationGoTo",type:"number",size:"small",autocomplete:"on",showClearIcon:!1,style:{width:"60px"},maskConfig:{type:"number",options:{allowNegative:!1,precision:0}},onVegaChange:h,onChange:h,ref:e=>{n=e,l.addUniqueObserverToNode(e,p,o)}})))},V=({pageSize:t,pageSizeSelectorOptions:i,dropdownProps:a,onChange:n,translationSlimmer:o,isAllActive:s})=>{const r=i.map(f),g=v(r),p=e=>{const t=Number(e.detail);n(t)},c=s?u:t;return e("vega-flex",{alignItems:"center",justifyContent:"center",gap:"size-8"},e("vega-field-label",{label:o.t("Show")}),e("div",null,e("vega-input-select",{size:"small",source:g.map((e=>({id:e.value.toString(),displayName:e.label}))),value:c.toString(),placeholder:"Page Size",vegaDropdownProps:Object.assign({matchTargetWidth:!1,searchable:!1},a),ref:e=>{l.addUniqueObserverToNode(e,h,p)}})))},B=({total:t,current:i,onChange:a,pageCount:n})=>{const o=t=>{const n=i!==t;return e("li",{key:t,class:w(["vega-pagination-item",i===t?"active":""])},e("button",{onClick:()=>n&&a(t)},t))},s=(t,i,a)=>e("li",{class:w(["vega-pagination-button",i&&"disabled"])},e("vega-button-circle",{variant:"icon-only",icon:t,iconColor:"text-link",size:"small",disabled:i,ref:e=>{l.addUniqueObserverToNode(e,c,a)}}));return e("ul",{class:"vega-pagination"},s("chevron-left",0===t||1===i,(()=>{a(i-1)})),0===t?[o(1)]:((e,t,i=7)=>{if(i<7)throw new Error("Must allow at least 7 pager items");if(i%2==0)throw new Error("Must allow odd number of pager items");if(t<i)return Array(t).fill(0).map(((e,t)=>t+1));const a=Math.max(1,Math.min(t-i+1,e-Math.floor(i/2))),n=new Array(i);for(let e=0;e<i;e+=1)n[e]=e+a;return Number(n[0])>1&&(n[0]=1,n[1]="..."),Number(n[n.length-1])<=t-1&&(n[n.length-1]=t,n[n.length-2]="..."),n})(i,n).map((t=>"string"==typeof t?e("li",{class:"vega-pagination-item pager-ellipsis"},"..."):o(t))),s("chevron-right",0===t||i===n,(()=>{a(i+1)})))};var G=function(e,t,i,a){var n,o=arguments.length,s=o<3?t:null===a?a=Object.getOwnPropertyDescriptor(t,i):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,a);else for(var r=e.length-1;r>=0;r--)(n=e[r])&&(s=(o<3?n(s):o>3?n(t,i,s):n(t,i))||s);return o>3&&s&&Object.defineProperty(t,i,s),s};class W extends j{registerPaginationPageSizeChangeObserver(){l.addUniqueObserverToNode(this.host,E,(e=>{const t=Number(e.detail);this.isAllActive=t===u,this.pageSize=d(t,this.total)}))}unregisterPaginationPageSizeChangeObserver(){l.removeUniqueObserverFromNode(this.host,E)}}G([C()],W.prototype,"host",void 0),G([C({writable:!0})],W.prototype,"pageSize",void 0),G([C({writable:!0})],W.prototype,"isAllActive",void 0),G([C()],W.prototype,"total",void 0),G([z("connectedCallback")],W.prototype,"registerPaginationPageSizeChangeObserver",null),G([z("disconnectedCallback")],W.prototype,"unregisterPaginationPageSizeChangeObserver",null);var D=function(e,t,i,a){var n,o=arguments.length,s=o<3?t:null===a?a=Object.getOwnPropertyDescriptor(t,i):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,a);else for(var r=e.length-1;r>=0;r--)(n=e[r])&&(s=(o<3?n(s):o>3?n(t,i,s):n(t,i))||s);return o>3&&s&&Object.defineProperty(t,i,s),s};class F extends j{registerPaginationCurrentChangeObserver(){l.addUniqueObserverToNode(this.host,R,(e=>{this.current=Number(e.detail)}))}unregisterPaginationCurrentChangeObserver(){l.removeUniqueObserverFromNode(this.host,R)}}D([C()],F.prototype,"host",void 0),D([C({writable:!0})],F.prototype,"current",void 0),D([z("connectedCallback")],F.prototype,"registerPaginationCurrentChangeObserver",null),D([z("disconnectedCallback")],F.prototype,"unregisterPaginationCurrentChangeObserver",null);var U=function(e,t,i,a){var n,o=arguments.length,s=o<3?t:null===a?a=Object.getOwnPropertyDescriptor(t,i):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,a);else for(var r=e.length-1;r>=0;r--)(n=e[r])&&(s=(o<3?n(s):o>3?n(t,i,s):n(t,i))||s);return o>3&&s&&Object.defineProperty(t,i,s),s};class X extends A{constructor(){super({callback:()=>{this.calculatePaginationLayout()}}),this.calculatePaginationLayout=()=>{if("vertical"===this.currentLayout)this.host.classList.add("vega-pagination-vertical"),this.host.classList.remove("vega-pagination-horizontal");else{this.host.classList.remove("vega-pagination-vertical"),this.host.classList.add("vega-pagination-horizontal");const e=this.host.offsetHeight;Array.from(this.host.shadowRoot.children).filter((e=>"VEGA-FLEX"===e.tagName)).every((t=>e>t.offsetHeight))&&(this.host.classList.add("vega-pagination-vertical"),this.host.classList.remove("vega-pagination-horizontal"))}}}componentWillLoad(){this.setCurrentLayout()}watchCurrentBreakpoint(){this.setCurrentLayout()}watchLayout(){this.setCurrentLayout(),this.calculatePaginationLayout()}setCurrentLayout(){this.currentLayout=M.formatCustom(this.layout)}}U([C()],X.prototype,"host",void 0),U([C()],X.prototype,"layout",void 0),U([z("componentWillLoad")],X.prototype,"componentWillLoad",null),U([z("watchCurrentBreakpoint")],X.prototype,"watchCurrentBreakpoint",null),U([z("watchLayout")],X.prototype,"watchLayout",null);var $=function(e,t,i,a){var n,o=arguments.length,s=o<3?t:null===a?a=Object.getOwnPropertyDescriptor(t,i):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,a);else for(var r=e.length-1;r>=0;r--)(n=e[r])&&(s=(o<3?n(s):o>3?n(t,i,s):n(t,i))||s);return o>3&&s&&Object.defineProperty(t,i,s),s};const H=class{constructor(a){t(this,a),this.vegaChange=i(this,"vegaChange",7),this.change=i(this,"change",7),this.vegaPageSizeChange=i(this,"vegaPageSizeChange",7),this.pageSizeChange=i(this,"pageSizeChange",7),this.globalSlimmers={},this.translationSlimmer=new I,this.childEventPrevent=new S([g],(()=>this.host)),this.childValueChangePrevent=new S([h],(()=>this.host),!0),this.vegaChangeEventEmitter=y(H,h),this.vegaPageSizeChangeEventEmitter=y(H,m),this.vegaComponentUsageRuntimeMetricsSlimmer=new O,this.vegaPaginationPageSizeObserverController=new W,this.vegaPaginationCurrentPageObserverController=new F,this.breakpointPageResizeObserverSlimmer=new A,this.vegaPaginationLayoutController=new X,this.vegaPaginationItemTypes=["currentPageLabel","pageSizeSelector","pageSelector","goTo","pageSelectorMobile","pageSizeSelectorMobile","pageSelectorMobile_goTo","pageSizeSelectorMobile_currentPageLabel"],this.currentBreakpoint=L(),this.pageCount=0,this.isAllActive=!1,this.current=1,this.total=0,this.pageSize=10,this.extensions=T.isEnabled("VEGA_PAGINATION.ENABLE_EXTENSIONS_RESPONSIVE_DEFAULT_VALUE")?{default:[["pageSizeSelectorMobile_currentPageLabel"],["pageSelectorMobile_goTo"]],M:[["pageSelector"]]}:[["pageSelector"]],this.layout="horizontal",this.pageSizeSelectorOptions=[10,20,50,100],this.renderPaginationItemsWrapper=t=>e("vega-flex",{gap:{default:"size-4",M:"size-24"},flexWrap:"wrap",alignItems:"center",justifyContent:"center",key:this.generateWrapperKey(t)},t.map((t=>e("div",{key:t},this.renderPaginationItem(t))))),this.renderPaginationItem=t=>{switch(t){case"currentPageLabel":return e(N,{total:this.total,current:this.current,pageSize:this.pageSize,translationSlimmer:this.translationSlimmer});case"pageSizeSelector":{const t=this.isAllActive||b(this.pageSizeSelectorOptions,this.pageSize)?this.pageSizeSelectorOptions:[...this.pageSizeSelectorOptions,this.pageSize];return e(V,{pageSize:this.pageSize,pageSizeSelectorOptions:t,dropdownProps:this.dropdownProps,onChange:this.onPageSizeSelectorChange,translationSlimmer:this.translationSlimmer,isAllActive:this.isAllActive})}case"pageSelector":return e(B,{current:this.current,total:this.total,onChange:this.onPageSelectorChange,pageCount:this.pageCount});case"goTo":return e(_,{onChange:this.handlePaginationGoToChange,pageCount:this.pageCount,translationSlimmer:this.translationSlimmer});case"pageSelectorMobile":case"pageSelectorMobile_goTo":return e("vega-pagination-page-selector-mobile",{type:t,pageCount:this.pageCount,current:this.current,total:this.total});case"pageSizeSelectorMobile":case"pageSizeSelectorMobile_currentPageLabel":return e("vega-pagination-page-size-selector-mobile",{type:t,pageSize:this.pageSize,current:this.current,total:this.total,pageSizeSelectorOptions:this.pageSizeSelectorOptions,dropdownProps:this.dropdownProps,isAllActive:this.isAllActive})}},this.handlePaginationGoToChange=e=>{this.current=e},this.onPageSizeSelectorChange=e=>{this.isAllActive=e===u,this.pageSize=d(e,this.total)},this.calculatePages=()=>this.total?Math.floor((this.total-1)/this.pageSize)+1:0,this.onPageSelectorChange=e=>{this.current=e},this.removeDuplicateItems=e=>{const t=[...this.vegaPaginationItemTypes];return[...e].map((e=>e.filter(((i,a)=>{const n=t.indexOf(i);return n>=0?(t.splice(n,1),!0):(e.splice(a,1),!1)})))).filter((e=>e.length>0))},this.generateWrapperKey=e=>e.map(String).reduce(((e,t)=>`${e}-${t}`)),this.currentValueGuard=()=>{0===this.pageCount?this.current=1:this.current>this.pageCount&&(this.current=this.pageCount)}}watchCurrentBreakpoint(){}watchPageCount(){this.currentValueGuard()}watchCurrent(){this.currentValueGuard(),this.vegaChangeEventEmitter.emit(this.current)}watchTotal(e){this.isAllActive&&(this.pageSize=e),this.pageCount=this.calculatePages()}watchPageSize(){this.vegaPageSizeChangeEventEmitter.emit(this.pageSize),this.pageCount=this.calculatePages()}watchLayout(){}componentWillLoad(){this.isAllActive=x(this.pageSizeSelectorOptions)&&this.pageSize===this.total&&!b(this.pageSizeSelectorOptions,this.pageSize),this.pageCount=this.calculatePages(),this.currentValueGuard(),this.isAllActive||b(this.pageSizeSelectorOptions,this.pageSize)||(this.pageSizeSelectorOptions=[...this.pageSizeSelectorOptions,this.pageSize])}render(){const t=M.formatCustom(this.extensions);return o(e(a,null,this.removeDuplicateItems(t).map(this.renderPaginationItemsWrapper)),this.host)}get host(){return n(this)}static get watchers(){return{currentBreakpoint:["watchCurrentBreakpoint"],pageCount:["watchPageCount"],current:["watchCurrent"],total:["watchTotal"],pageSize:["watchPageSize"],layout:["watchLayout"]}}};$([k()],H.prototype,"globalSlimmers",void 0),$([P()],H.prototype,"translationSlimmer",void 0),$([P()],H.prototype,"childEventPrevent",void 0),$([P()],H.prototype,"childValueChangePrevent",void 0),$([P()],H.prototype,"vegaChangeEventEmitter",void 0),$([P()],H.prototype,"vegaPageSizeChangeEventEmitter",void 0),$([P()],H.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),$([P()],H.prototype,"vegaPaginationPageSizeObserverController",void 0),$([P()],H.prototype,"vegaPaginationCurrentPageObserverController",void 0),$([P()],H.prototype,"breakpointPageResizeObserverSlimmer",void 0),$([P()],H.prototype,"vegaPaginationLayoutController",void 0),H.style=':host{display:flex;align-items:center;line-height:normal;flex-wrap:wrap}:host(.vega-pagination-horizontal){flex-direction:row;justify-content:space-between}:host(.vega-pagination-vertical){flex-direction:column;gap:16px;justify-content:center}@media (min-width: 320px){:host(.vega-pagination-horizontal){gap:4px}}@media (min-width: 768px){:host(.vega-pagination-horizontal){gap:24px}}.vega-pagination{display:flex;padding:0px;margin:0px}.vega-pagination .vega-pagination-item{list-style-type:none;display:inline-flex;align-items:center;justify-content:center;min-width:32px;height:32px;font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;color:rgba(var(--v-text-link, 19, 98, 226, 1));cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}@media screen and (min-width: 768px) and (max-width: 1023px){.vega-pagination .vega-pagination-item{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.vega-pagination .vega-pagination-item{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.vega-pagination .vega-pagination-item{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px}}.vega-pagination .vega-pagination-item button{background-color:rgba(var(--v-bg-transparent, 0, 0, 0, 0));border-width:0px;outline:2px solid transparent;outline-offset:2px;width:100%;height:100%;cursor:pointer;font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;color:rgba(var(--v-text-link, 19, 98, 226, 1))}@media screen and (min-width: 768px) and (max-width: 1023px){.vega-pagination .vega-pagination-item button{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.vega-pagination .vega-pagination-item button{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.vega-pagination .vega-pagination-item button{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px}}.vega-pagination .vega-pagination-item.pager-ellipsis{cursor:default}.vega-pagination .vega-pagination-item:not(.pager-ellipsis):not(:active):hover{text-decoration:underline;text-underline-offset:2px}.vega-pagination .vega-pagination-item button:active,.vega-pagination .vega-pagination-item.active button{color:rgba(var(--v-text-primary, 32, 54, 69, 1));font-family:"Inter", sans-serif;font-size:14px;font-weight:700;line-height:18px}@media screen and (min-width: 768px) and (max-width: 1023px){.vega-pagination .vega-pagination-item button:active,.vega-pagination .vega-pagination-item.active button{font-family:"Inter", sans-serif;font-size:14px;font-weight:700;line-height:18px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.vega-pagination .vega-pagination-item button:active,.vega-pagination .vega-pagination-item.active button{font-family:"Inter", sans-serif;font-size:14px;font-weight:700;line-height:18px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.vega-pagination .vega-pagination-item button:active,.vega-pagination .vega-pagination-item.active button{font-family:"Inter", sans-serif;font-size:14px;font-weight:700;line-height:18px}}.vega-pagination .vega-pagination-item button:focus-visible{outline:2px solid rgba(var(--v-border-color-action, 19, 98, 226, 1));outline-offset:0px;border-radius:9999px}.vega-pagination .vega-pagination-button{list-style-type:none;display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}';export{H as vega_pagination}
|
|
1
|
+
import{h as e,r as t,c as i,H as a,g as n}from"./p-6b2342e0.js";import{s as o}from"./p-519a7d55.js";import{n as s,c as r}from"./p-262ec334.js";import{D as l}from"./p-526e3634.js";import{G as g,M as p,d as h,a as c,_ as m}from"./p-5447a8e8.js";import{n as f,s as v,P as u,r as d,i as b,h as x}from"./p-9dcecdd3.js";import{a as w}from"./p-528748fa.js";import{C as S}from"./p-2c737fc8.js";import{c as y}from"./p-66647244.js";import{c as C,M as z,V as j,I as P}from"./p-6e1ab235.js";import{V as O,I as k}from"./p-8ce9e214.js";import{T as I}from"./p-6cde45fc.js";import{R as M}from"./p-3dee1e55.js";import{g as L}from"./p-49a2e141.js";import{P as A}from"./p-81dd00d0.js";import{u as E,v as R}from"./p-3a68b729.js";import{F as T}from"./p-87a4d75f.js";import"./p-2d0d575f.js";import"./p-331a62d5.js";import"./p-8c30a60d.js";import"./p-5f377954.js";import"./p-6a334573.js";import"./p-b75ee3ba.js";import"./p-0d18368b.js";import"./p-cb378636.js";import"./p-8db904dc.js";import"./p-ed45b3b6.js";import"./p-d4ea8e22.js";import"./p-b438e68b.js";import"./p-0c667d6a.js";import"./p-d27ae9ff.js";import"./p-982747ef.js";const N=({pageSize:t,current:i,total:a,translationSlimmer:n})=>{const o=a>0?t*(i-1)+1:0,s=Math.min(i*t,a);return e("vega-field-label",{label:n.t("Viewing {0}-{1} of {2}",o,s,a)})},_=({onChange:t,pageCount:i,translationSlimmer:a})=>{let n;const o=()=>{if(n.value){const e=s(r(n.value,1),1,i);t(e),n.value=""}},h=e=>{e.stopPropagation()};return e("vega-flex",{alignItems:"center",justifyContent:"center",gap:"size-8"},e("vega-field-label",{label:a.t("Go To")}),e("vega-form",{ref:e=>{l.addUniqueObserverToNode(e,g,o)}},e("vega-input",{"data-vega-form":"paginationGoTo",type:"number",size:"small",autocomplete:"on",showClearIcon:!1,style:{width:"60px"},maskConfig:{type:"number",options:{allowNegative:!1,precision:0}},onVegaChange:h,onChange:h,ref:e=>{n=e,l.addUniqueObserverToNode(e,p,o)}})))},V=({pageSize:t,pageSizeSelectorOptions:i,dropdownProps:a,onChange:n,translationSlimmer:o,isAllActive:s})=>{const r=i.map(f),g=v(r),p=e=>{const t=Number(e.detail);n(t)},c=s?u:t;return e("vega-flex",{alignItems:"center",justifyContent:"center",gap:"size-8"},e("vega-field-label",{label:o.t("Show")}),e("div",null,e("vega-input-select",{size:"small",source:g.map((e=>({id:e.value.toString(),displayName:e.label}))),value:c.toString(),placeholder:"Page Size",vegaDropdownProps:Object.assign({matchTargetWidth:!1,searchable:!1},a),ref:e=>{l.addUniqueObserverToNode(e,h,p)}})))},B=({total:t,current:i,onChange:a,pageCount:n})=>{const o=t=>{const n=i!==t;return e("li",{key:t,class:w(["vega-pagination-item",i===t?"active":""])},e("button",{onClick:()=>n&&a(t)},t))},s=(t,i,a)=>e("li",{class:w(["vega-pagination-button",i&&"disabled"])},e("vega-button-circle",{variant:"icon-only",icon:t,iconColor:"text-link",size:"small",disabled:i,ref:e=>{l.addUniqueObserverToNode(e,c,a)}}));return e("ul",{class:"vega-pagination"},s("chevron-left",0===t||1===i,(()=>{a(i-1)})),0===t?[o(1)]:((e,t,i=7)=>{if(i<7)throw new Error("Must allow at least 7 pager items");if(i%2==0)throw new Error("Must allow odd number of pager items");if(t<i)return Array(t).fill(0).map(((e,t)=>t+1));const a=Math.max(1,Math.min(t-i+1,e-Math.floor(i/2))),n=new Array(i);for(let e=0;e<i;e+=1)n[e]=e+a;return Number(n[0])>1&&(n[0]=1,n[1]="..."),Number(n[n.length-1])<=t-1&&(n[n.length-1]=t,n[n.length-2]="..."),n})(i,n).map((t=>"string"==typeof t?e("li",{class:"vega-pagination-item pager-ellipsis"},"..."):o(t))),s("chevron-right",0===t||i===n,(()=>{a(i+1)})))};var G=function(e,t,i,a){var n,o=arguments.length,s=o<3?t:null===a?a=Object.getOwnPropertyDescriptor(t,i):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,a);else for(var r=e.length-1;r>=0;r--)(n=e[r])&&(s=(o<3?n(s):o>3?n(t,i,s):n(t,i))||s);return o>3&&s&&Object.defineProperty(t,i,s),s};class W extends j{registerPaginationPageSizeChangeObserver(){l.addUniqueObserverToNode(this.host,E,(e=>{const t=Number(e.detail);this.isAllActive=t===u,this.pageSize=d(t,this.total)}))}unregisterPaginationPageSizeChangeObserver(){l.removeUniqueObserverFromNode(this.host,E)}}G([C()],W.prototype,"host",void 0),G([C({writable:!0})],W.prototype,"pageSize",void 0),G([C({writable:!0})],W.prototype,"isAllActive",void 0),G([C()],W.prototype,"total",void 0),G([z("connectedCallback")],W.prototype,"registerPaginationPageSizeChangeObserver",null),G([z("disconnectedCallback")],W.prototype,"unregisterPaginationPageSizeChangeObserver",null);var D=function(e,t,i,a){var n,o=arguments.length,s=o<3?t:null===a?a=Object.getOwnPropertyDescriptor(t,i):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,a);else for(var r=e.length-1;r>=0;r--)(n=e[r])&&(s=(o<3?n(s):o>3?n(t,i,s):n(t,i))||s);return o>3&&s&&Object.defineProperty(t,i,s),s};class F extends j{registerPaginationCurrentChangeObserver(){l.addUniqueObserverToNode(this.host,R,(e=>{this.current=Number(e.detail)}))}unregisterPaginationCurrentChangeObserver(){l.removeUniqueObserverFromNode(this.host,R)}}D([C()],F.prototype,"host",void 0),D([C({writable:!0})],F.prototype,"current",void 0),D([z("connectedCallback")],F.prototype,"registerPaginationCurrentChangeObserver",null),D([z("disconnectedCallback")],F.prototype,"unregisterPaginationCurrentChangeObserver",null);var U=function(e,t,i,a){var n,o=arguments.length,s=o<3?t:null===a?a=Object.getOwnPropertyDescriptor(t,i):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,a);else for(var r=e.length-1;r>=0;r--)(n=e[r])&&(s=(o<3?n(s):o>3?n(t,i,s):n(t,i))||s);return o>3&&s&&Object.defineProperty(t,i,s),s};class X extends A{constructor(){super({callback:()=>{this.calculatePaginationLayout()}}),this.calculatePaginationLayout=()=>{if("vertical"===this.currentLayout)this.host.classList.add("vega-pagination-vertical"),this.host.classList.remove("vega-pagination-horizontal");else{this.host.classList.remove("vega-pagination-vertical"),this.host.classList.add("vega-pagination-horizontal");const e=this.host.offsetHeight;Array.from(this.host.shadowRoot.children).filter((e=>"VEGA-FLEX"===e.tagName)).every((t=>e>t.offsetHeight))&&(this.host.classList.add("vega-pagination-vertical"),this.host.classList.remove("vega-pagination-horizontal"))}}}componentWillLoad(){this.setCurrentLayout()}watchCurrentBreakpoint(){this.setCurrentLayout()}watchLayout(){this.setCurrentLayout(),this.calculatePaginationLayout()}setCurrentLayout(){this.currentLayout=M.formatCustom(this.layout)}}U([C()],X.prototype,"host",void 0),U([C()],X.prototype,"layout",void 0),U([z("componentWillLoad")],X.prototype,"componentWillLoad",null),U([z("watchCurrentBreakpoint")],X.prototype,"watchCurrentBreakpoint",null),U([z("watchLayout")],X.prototype,"watchLayout",null);var $=function(e,t,i,a){var n,o=arguments.length,s=o<3?t:null===a?a=Object.getOwnPropertyDescriptor(t,i):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,a);else for(var r=e.length-1;r>=0;r--)(n=e[r])&&(s=(o<3?n(s):o>3?n(t,i,s):n(t,i))||s);return o>3&&s&&Object.defineProperty(t,i,s),s};const H=class{constructor(a){t(this,a),this.vegaChange=i(this,"vegaChange",7),this.change=i(this,"change",7),this.vegaPageSizeChange=i(this,"vegaPageSizeChange",7),this.pageSizeChange=i(this,"pageSizeChange",7),this.globalSlimmers={},this.translationSlimmer=new I,this.childEventPrevent=new S([g],(()=>this.host)),this.childValueChangePrevent=new S([h],(()=>this.host),!0),this.vegaChangeEventEmitter=y(H,h),this.vegaPageSizeChangeEventEmitter=y(H,m),this.vegaComponentUsageRuntimeMetricsSlimmer=new O,this.vegaPaginationPageSizeObserverController=new W,this.vegaPaginationCurrentPageObserverController=new F,this.breakpointPageResizeObserverSlimmer=new A,this.vegaPaginationLayoutController=new X,this.vegaPaginationItemTypes=["currentPageLabel","pageSizeSelector","pageSelector","goTo","pageSelectorMobile","pageSizeSelectorMobile","pageSelectorMobile_goTo","pageSizeSelectorMobile_currentPageLabel"],this.currentBreakpoint=L(),this.pageCount=0,this.isAllActive=!1,this.current=1,this.total=0,this.pageSize=10,this.extensions=T.isEnabled("VEGA_PAGINATION.ENABLE_EXTENSIONS_RESPONSIVE_DEFAULT_VALUE")?{default:[["pageSizeSelectorMobile_currentPageLabel"],["pageSelectorMobile_goTo"]],M:[["pageSelector"]]}:[["pageSelector"]],this.layout="horizontal",this.pageSizeSelectorOptions=[10,20,50,100],this.renderPaginationItemsWrapper=t=>e("vega-flex",{gap:{default:"size-4",M:"size-24"},flexWrap:"wrap",alignItems:"center",justifyContent:"center",key:this.generateWrapperKey(t)},t.map((t=>e("div",{key:t},this.renderPaginationItem(t))))),this.renderPaginationItem=t=>{switch(t){case"currentPageLabel":return e(N,{total:this.total,current:this.current,pageSize:this.pageSize,translationSlimmer:this.translationSlimmer});case"pageSizeSelector":{const t=this.isAllActive||b(this.pageSizeSelectorOptions,this.pageSize)?this.pageSizeSelectorOptions:[...this.pageSizeSelectorOptions,this.pageSize];return e(V,{pageSize:this.pageSize,pageSizeSelectorOptions:t,dropdownProps:this.dropdownProps,onChange:this.onPageSizeSelectorChange,translationSlimmer:this.translationSlimmer,isAllActive:this.isAllActive})}case"pageSelector":return e(B,{current:this.current,total:this.total,onChange:this.onPageSelectorChange,pageCount:this.pageCount});case"goTo":return e(_,{onChange:this.handlePaginationGoToChange,pageCount:this.pageCount,translationSlimmer:this.translationSlimmer});case"pageSelectorMobile":case"pageSelectorMobile_goTo":return e("vega-pagination-page-selector-mobile",{type:t,pageCount:this.pageCount,current:this.current,total:this.total});case"pageSizeSelectorMobile":case"pageSizeSelectorMobile_currentPageLabel":return e("vega-pagination-page-size-selector-mobile",{type:t,pageSize:this.pageSize,current:this.current,total:this.total,pageSizeSelectorOptions:this.pageSizeSelectorOptions,dropdownProps:this.dropdownProps,isAllActive:this.isAllActive})}},this.handlePaginationGoToChange=e=>{this.current=e},this.onPageSizeSelectorChange=e=>{this.isAllActive=e===u,this.pageSize=d(e,this.total)},this.calculatePages=()=>this.total?Math.floor((this.total-1)/this.pageSize)+1:0,this.onPageSelectorChange=e=>{this.current=e},this.removeDuplicateItems=e=>{const t=[...this.vegaPaginationItemTypes];return[...e].map((e=>e.filter(((i,a)=>{const n=t.indexOf(i);return n>=0?(t.splice(n,1),!0):(e.splice(a,1),!1)})))).filter((e=>e.length>0))},this.generateWrapperKey=e=>e.map(String).reduce(((e,t)=>`${e}-${t}`)),this.currentValueGuard=()=>{0===this.pageCount?this.current=1:this.current>this.pageCount&&(this.current=this.pageCount)}}watchCurrentBreakpoint(){}watchPageCount(){this.currentValueGuard()}watchCurrent(){this.currentValueGuard(),this.vegaChangeEventEmitter.emit(this.current)}watchTotal(e){this.isAllActive&&(this.pageSize=e),this.pageCount=this.calculatePages()}watchPageSize(){this.vegaPageSizeChangeEventEmitter.emit(this.pageSize),this.pageCount=this.calculatePages()}watchLayout(){}componentWillLoad(){this.isAllActive=x(this.pageSizeSelectorOptions)&&this.pageSize===this.total&&!b(this.pageSizeSelectorOptions,this.pageSize),this.pageCount=this.calculatePages(),this.currentValueGuard(),this.isAllActive||b(this.pageSizeSelectorOptions,this.pageSize)||(this.pageSizeSelectorOptions=[...this.pageSizeSelectorOptions,this.pageSize])}render(){const t=M.formatCustom(this.extensions);return o(e(a,null,this.removeDuplicateItems(t).map(this.renderPaginationItemsWrapper)),this.host)}get host(){return n(this)}static get watchers(){return{currentBreakpoint:["watchCurrentBreakpoint"],pageCount:["watchPageCount"],current:["watchCurrent"],total:["watchTotal"],pageSize:["watchPageSize"],layout:["watchLayout"]}}};$([k()],H.prototype,"globalSlimmers",void 0),$([P()],H.prototype,"translationSlimmer",void 0),$([P()],H.prototype,"childEventPrevent",void 0),$([P()],H.prototype,"childValueChangePrevent",void 0),$([P()],H.prototype,"vegaChangeEventEmitter",void 0),$([P()],H.prototype,"vegaPageSizeChangeEventEmitter",void 0),$([P()],H.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),$([P()],H.prototype,"vegaPaginationPageSizeObserverController",void 0),$([P()],H.prototype,"vegaPaginationCurrentPageObserverController",void 0),$([P()],H.prototype,"breakpointPageResizeObserverSlimmer",void 0),$([P()],H.prototype,"vegaPaginationLayoutController",void 0),H.style=':host{display:flex;align-items:center;line-height:normal;flex-wrap:wrap}:host(.vega-pagination-horizontal){flex-direction:row;justify-content:space-between}:host(.vega-pagination-vertical){flex-direction:column;gap:16px;justify-content:center}@media (min-width: 320px){:host(.vega-pagination-horizontal){gap:4px}}@media (min-width: 768px){:host(.vega-pagination-horizontal){gap:24px}}.vega-pagination{display:flex;padding:0px;margin:0px}.vega-pagination .vega-pagination-item{list-style-type:none;display:inline-flex;align-items:center;justify-content:center;min-width:32px;height:32px;font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;color:rgba(var(--v-text-link, 19, 98, 226, 1));cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}@media screen and (min-width: 768px) and (max-width: 1023px){.vega-pagination .vega-pagination-item{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.vega-pagination .vega-pagination-item{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.vega-pagination .vega-pagination-item{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px}}.vega-pagination .vega-pagination-item button{background-color:rgba(var(--v-bg-transparent, 0, 0, 0, 0));border-width:0px;outline:2px solid transparent;outline-offset:2px;width:100%;height:100%;cursor:pointer;font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;color:rgba(var(--v-text-link, 19, 98, 226, 1))}@media screen and (min-width: 768px) and (max-width: 1023px){.vega-pagination .vega-pagination-item button{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.vega-pagination .vega-pagination-item button{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.vega-pagination .vega-pagination-item button{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px}}.vega-pagination .vega-pagination-item.pager-ellipsis{cursor:default}.vega-pagination .vega-pagination-item:not(.pager-ellipsis):not(:active):hover{text-decoration:underline;text-underline-offset:2px}.vega-pagination .vega-pagination-item button:active,.vega-pagination .vega-pagination-item.active button{color:rgba(var(--v-text-primary, 32, 54, 69, 1));font-family:"Inter", sans-serif;font-size:14px;font-weight:700;line-height:18px}@media screen and (min-width: 768px) and (max-width: 1023px){.vega-pagination .vega-pagination-item button:active,.vega-pagination .vega-pagination-item.active button{font-family:"Inter", sans-serif;font-size:14px;font-weight:700;line-height:18px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.vega-pagination .vega-pagination-item button:active,.vega-pagination .vega-pagination-item.active button{font-family:"Inter", sans-serif;font-size:14px;font-weight:700;line-height:18px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.vega-pagination .vega-pagination-item button:active,.vega-pagination .vega-pagination-item.active button{font-family:"Inter", sans-serif;font-size:14px;font-weight:700;line-height:18px}}.vega-pagination .vega-pagination-item button:focus-visible{outline:2px solid rgba(var(--v-border-color-action, 19, 98, 226, 1));outline-offset:0px;border-radius:9999px}.vega-pagination .vega-pagination-button{list-style-type:none;display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}';export{H as vega_pagination}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e,c as i,h as t,H as a,g as r}from"./p-6b2342e0.js";import{c as o}from"./p-3a620268.js";import{s as n}from"./p-519a7d55.js";import{C as s}from"./p-2d0d575f.js";import{R as l,i as d,F as h}from"./p-cb378636.js";import{O as c}from"./p-331a62d5.js";import{f as p}from"./p-528748fa.js";import{c as g,M as v,V as f,I as b}from"./p-6e1ab235.js";import{V as m,I as u}from"./p-8ce9e214.js";import{c as x}from"./p-140616fe.js";import{d as w,L as y,M as j}from"./p-698fbd73.js";import{i as R}from"./p-3a68b729.js";import{d as k}from"./p-526e3634.js";import{R as I}from"./p-8bc15ed0.js";import{C}from"./p-75b58efe.js";import{F as O}from"./p-320091b7.js";import{C as E}from"./p-014cd411.js";import{C as A}from"./p-b1ff70bf.js";import{K as V}from"./p-f1974321.js";import{M as z}from"./p-78a57a17.js";import{T as D}from"./p-52b8f2d2.js";import"./p-6a334573.js";import"./p-282b37cb.js";import"./p-b75ee3ba.js";import"./p-abd7aeaa.js";import"./p-87a4d75f.js";import"./p-982747ef.js";import"./p-02841589.js";import"./p-8b5d3a52.js";import"./p-0d18368b.js";import"./p-f0e828d8.js";import"./p-81dd00d0.js";import"./p-49a2e141.js";import"./p-d4ea8e22.js";import"./p-ed45b3b6.js";import"./p-d27ae9ff.js";import"./p-262ec334.js";import"./p-29e3eb12.js";import"./p-5f377954.js";import"./p-75e33859.js";import"./p-8db904dc.js";import"./p-b438e68b.js";var F=function(e,i,t,a){var r,o=arguments.length,n=o<3?i:null===a?a=Object.getOwnPropertyDescriptor(i,t):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,i,t,a);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(n=(o<3?r(n):o>3?r(i,t,n):r(i,t))||n);return o>3&&n&&Object.defineProperty(i,t,n),n};class G extends f{connectedCallback(){this.radioGroup=p(this.host,"vega-radio-group")||p(this.host,"vega-selection-tile-group"),this.radioGroup&&(this.fieldErrorObserver=new c(this.canAcceptFieldErrorObserver.bind(this),this.fieldErrorObserverListener.bind(this)),s.register(k.getSubject(this.radioGroup,R),this.fieldErrorObserver))}disconnectedCallback(){this.radioGroup&&s.unregister(k.getSubject(this.radioGroup,R),this.fieldErrorObserver)}canAcceptFieldErrorObserver(e){return("VEGA-RADIO-GROUP"===e.host.tagName||"VEGA-SELECTION-TILE-GROUP"===e.host.tagName)&&this.radioGroup===e.host}fieldErrorObserverListener(e){this.showError=e.showError}}F([g({writable:!0})],G.prototype,"showError",void 0),F([g()],G.prototype,"host",void 0),F([v("connectedCallback")],G.prototype,"connectedCallback",null),F([v("disconnectedCallback")],G.prototype,"disconnectedCallback",null);var L=function(e,i,t,a){var r,o=arguments.length,n=o<3?i:null===a?a=Object.getOwnPropertyDescriptor(i,t):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,i,t,a);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(n=(o<3?r(n):o>3?r(i,t,n):r(i,t))||n);return o>3&&n&&Object.defineProperty(i,t,n),n};const N=class{constructor(t){e(this,t),this.vegaFocus=i(this,"vegaFocus",7),this.focus=i(this,"focus",7),this.vegaBlur=i(this,"vegaBlur",7),this.blur=i(this,"blur",7),this.vegaChange=i(this,"vegaChange",7),this.change=i(this,"change",7),this.globalSlimmers={},this.changeEventEmitter=x(N,w),this.focusEventEmitter=x(N,y),this.blurEventEmitter=x(N,j),this.vegaRadioShowErrorController=new G,this.vegaComponentUsageRuntimeMetricsSlimmer=new m,this.groupDisabled=!1,this.showError=!1,this.value="",this.checked=!1,this.disabled=!1,this.size="default",this.updateValue=e=>{this.checked=e.currentTarget.checked,e.stopPropagation()},this.handleFocus=e=>{this.focusEventEmitter.emit(e,e)},this.handleBlur=e=>{this.blurEventEmitter.emit(e,e)},this.handleClick=e=>{e.stopPropagation()}}watchCheckedChange(){this.changeEventEmitter.emit(this.checked),s.notify(l,{host:this.host,detail:this.checked})}connectedCallback(){this.ariaLabel=this.host.textContent,""==this.ariaLabel&&(this.ariaLabel=this.value)}disconnectedCallback(){this.unRegisterGroupDisabledObserver()}componentDidLoad(){""===this.host.textContent&&this.labelElement.classList.add("vega-hidden"),this.initAndRegisterGroupDisabledObserver()}render(){var e;const i="VEGA-RADIO-GROUP"==(null===(e=this.host.parentElement)||void 0===e?void 0:e.nodeName);return n(t(a,{class:{"vega-flex-shrink-0 v-min-w-min":i}},t("label",{class:{"vega-radio-container":!0,[this.size]:!0,"vega-radio-checked":this.checked,"vega-radio-disabled":this.isDisabled(),error:this.showError}},t("input",{type:"radio",name:this.name,checked:this.checked,value:this.value,onFocus:this.handleFocus,onBlur:this.handleBlur,onClick:this.handleClick,onChange:this.updateValue,"aria-label":this.ariaLabel||"No label defined",disabled:this.isDisabled(),tabIndex:this.isDisabled()?-1:0,onKeyDown:o()}),t("span",{class:"vega-radio-icon"},t("span",{class:"vega-radio-circle"})),t("div",{class:"vega-radio-label",ref:e=>this.labelElement=e},t("slot",null)))),this.host)}isDisabled(){return this.disabled||this.groupDisabled}canAcceptGroupDisabledObserver(e){return p(this.host,"vega-radio-group")===e.host}groupDisabledObserverListener(e){this.groupDisabled=e.host.disabled}initAndRegisterGroupDisabledObserver(){p(this.host,"vega-radio-group")&&(this.groupDisabledObserver=new c(this.canAcceptGroupDisabledObserver.bind(this),this.groupDisabledObserverListener.bind(this)),s.register(d,this.groupDisabledObserver))}unRegisterGroupDisabledObserver(){this.groupDisabledObserver&&s.unregister(d,this.groupDisabledObserver)}get host(){return r(this)}static get watchers(){return{checked:["watchCheckedChange"]}}};L([u()],N.prototype,"globalSlimmers",void 0),L([b()],N.prototype,"changeEventEmitter",void 0),L([b()],N.prototype,"focusEventEmitter",void 0),L([b()],N.prototype,"blurEventEmitter",void 0),L([b()],N.prototype,"vegaRadioShowErrorController",void 0),L([b()],N.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),N.style=':host{display:inline-block;box-sizing:border-box;height:24px}.vega-radio-container{position:relative;display:inline-flex;gap:8px;cursor:not-allowed}.vega-radio-container:not(.vega-radio-disabled){cursor:pointer}.vega-radio-container input{position:absolute;left:0px;top:0px;opacity:0}.vega-radio-icon{display:inline-block;box-sizing:border-box;border-style:solid;border-radius:9999px;position:relative;left:0px;flex-shrink:0;border:1px solid rgba(var(--v-border-input-field, 171, 198, 216, 1));background-color:rgba(var(--v-bg-primary, 252, 252, 252, 1))}.vega-radio-icon:hover{border:1px solid rgba(var(--v-border-input-field-hover, 115, 160, 190, 1))}.vega-radio-container.default .vega-radio-icon{width:24px;height:24px;padding:5px}.vega-radio-container.small .vega-radio-icon{width:16px;height:16px;padding:4px}.vega-radio-checked:hover .vega-radio-circle{background-color:rgba(var(--v-bg-action-hover, 4, 112, 236, 1))}.vega-radio-container input[type=radio]:focus-visible+.vega-radio-icon{outline:2px solid rgba(var(--v-border-color-action, 19, 98, 226, 1));outline-offset:3px}.vega-radio-container:not(.vega-radio-disabled):active .vega-radio-icon{border-width:1px;border-style:solid;border-color:rgba(var(--v-border-color-action-active, 29, 65, 195, 1))}.vega-radio-checked:active .vega-radio-circle{background-color:rgba(var(--v-bg-action-active, 29, 65, 195, 1))}.vega-radio-checked .vega-radio-circle{display:block;width:100%;height:100%;border-radius:9999px;background-color:rgba(var(--v-bg-action, 19, 98, 226, 1))}.vega-radio-disabled .vega-radio-icon{background-color:rgba(var(--v-bg-secondary, 245, 247, 247, 1));border:1px solid rgba(var(--v-border-input-field-disabled, 222, 225, 227, 1))}.vega-radio-disabled .vega-radio-circle{background-color:rgba(var(--v-bg-disabled, 176, 180, 181, 1))}.vega-radio-disabled:hover .vega-radio-circle{background-color:rgba(var(--v-bg-disabled, 176, 180, 181, 1))}.vega-radio-container .vega-radio-label{display:inline-block;color:rgba(var(--v-text-primary, 32, 54, 69, 1))}.vega-radio-container .vega-radio-label.vega-hidden{display:none}.vega-radio-container.default .vega-radio-label{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}@media screen and (min-width: 768px) and (max-width: 1023px){.vega-radio-container.default .vega-radio-label{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.vega-radio-container.default .vega-radio-label{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.vega-radio-container.default .vega-radio-label{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}.vega-radio-container.small .vega-radio-label{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px}@media screen and (min-width: 768px) and (max-width: 1023px){.vega-radio-container.small .vega-radio-label{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.vega-radio-container.small .vega-radio-label{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.vega-radio-container.small .vega-radio-label{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px}}.vega-radio-disabled .vega-radio-label{color:rgba(var(--v-text-disabled, 176, 180, 181, 1))}label{-webkit-tap-highlight-color:transparent}.vega-radio-container.error .vega-radio-icon{border:1px solid rgba(var(--v-border-input-field-danger, 230, 50, 87, 1))}.vega-radio-container.error:hover .vega-radio-icon{border:1px solid rgba(var(--v-border-input-field-danger-hover, 255, 87, 114, 1))}.vega-radio-container.error input[type=radio]:focus-visible+.vega-radio-icon{outline:2px solid rgba(var(--v-border-color-danger, 230, 50, 87, 1));outline-offset:3px}.vega-radio-container.error:active .vega-radio-icon{outline:2px solid rgba(var(--v-border-color-danger, 230, 50, 87, 1));outline-offset:3px}.vega-radio-checked.error .vega-radio-circle{background-color:rgba(var(--v-bg-danger, 189, 41, 71, 1))}.vega-radio-checked.error:hover .vega-radio-circle{background-color:rgba(var(--v-bg-danger-hover, 233, 71, 104, 1))}.vega-radio-checked.error:active .vega-radio-circle{background-color:rgba(var(--v-bg-danger-active, 230, 50, 87, 1))}';class S extends V{constructor(){super((e=>(e.setRadioArrayTabIndex(),[{keyCode:["ArrowUp","ArrowDown"],activeElementInScope:[e.host],callback:e=>{this.updateRadioFocusStates(e)}}])))}setRadioArrayTabIndex(){const e=this.getNotDisabledRadioArray();if(e){const i=e.findIndex((e=>e.checked)),t=i>-1?i:0;e.forEach(((e,i)=>{const a=i===t?"0":"-1";e.shadowRoot.querySelector("input").setAttribute("tabIndex",a)}))}}updateRadioFocusStates(e){const i=e.key,t=this.getNotDisabledRadioArray();if(!t||0===t.length)return;t.forEach((e=>e.shadowRoot.querySelector("input").setAttribute("tabIndex","-1")));const a=t.findIndex((i=>i===e.target));let r;"ArrowDown"===i?r=a===t.length-1?t[0]:t[a+1]:"ArrowUp"===i&&(r=0===a?t[t.length-1]:t[a-1]),r&&(r.shadowRoot.querySelector("input").focus(),r.checked=!0,r.shadowRoot.querySelector("input").tabIndex=0)}getNotDisabledRadioArray(){const e=Array.from(this.host.querySelectorAll("vega-radio"));if(e.length>0)return e.filter((e=>!e.disabled))}}!function(e,i,t,a){var r,o=arguments.length,n=o<3?i:null===a?a=Object.getOwnPropertyDescriptor(i,t):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,i,t,a);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(n=(o<3?r(n):o>3?r(i,t,n):r(i,t))||n);o>3&&n&&Object.defineProperty(i,t,n)}([g()],S.prototype,"host",void 0);var P=function(e,i,t,a){var r,o=arguments.length,n=o<3?i:null===a?a=Object.getOwnPropertyDescriptor(i,t):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,i,t,a);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(n=(o<3?r(n):o>3?r(i,t,n):r(i,t))||n);return o>3&&n&&Object.defineProperty(i,t,n),n};class U extends f{emitEventAndNotifyValueChangeSubject(e){this.changeEventEmitter.emit(e),s.notify(h,{host:this.host,detail:e})}setValue(e){this.value=e}}P([g()],U.prototype,"host",void 0),P([g({writable:!0})],U.prototype,"value",void 0),P([g()],U.prototype,"changeEventEmitter",void 0),P([g()],U.prototype,"radioItemsController",void 0),P([v("watchValue")],U.prototype,"emitEventAndNotifyValueChangeSubject",null);var M=function(e,i,t,a){var r,o=arguments.length,n=o<3?i:null===a?a=Object.getOwnPropertyDescriptor(i,t):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,i,t,a);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(n=(o<3?r(n):o>3?r(i,t,n):r(i,t))||n);return o>3&&n&&Object.defineProperty(i,t,n),n};class B extends f{constructor(){super(...arguments),this.vegaRadioArray=[]}componentWillLoad(){this.syncRadioArrayAndValue()}setRadioItemName(){this.vegaRadioArray.forEach((e=>{e.name=this.name?this.name:e.getAttribute("name")}))}setRadioItemCheckedByValue(e){this.vegaRadioArray.forEach((i=>{i.checked=i.value===e}))}syncRadioItemsStatus(){this.setRadioItemCheckedByValue(this.value),this.setRadioItemName()}getRadioItemsArray(){return this.vegaRadioArray}syncRadioArrayAndValue(){this.vegaRadioArray=Array.from(this.host.querySelectorAll("vega-radio")),this.vegaRadioArray.forEach((e=>{e.checked&&this.valueController.setValue(e.value)}))}}M([g()],B.prototype,"host",void 0),M([g()],B.prototype,"value",void 0),M([g()],B.prototype,"name",void 0),M([g()],B.prototype,"valueController",void 0),M([v("componentWillLoad")],B.prototype,"componentWillLoad",null),M([v("watchName")],B.prototype,"setRadioItemName",null),M([v("watchValue")],B.prototype,"setRadioItemCheckedByValue",null),M([v("componentDidLoad")],B.prototype,"syncRadioItemsStatus",null);var T=function(e,i,t,a){var r,o=arguments.length,n=o<3?i:null===a?a=Object.getOwnPropertyDescriptor(i,t):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,i,t,a);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(n=(o<3?r(n):o>3?r(i,t,n):r(i,t))||n);return o>3&&n&&Object.defineProperty(i,t,n),n};const W=class{constructor(t){e(this,t),this.vegaChange=i(this,"vegaChange",7),this.change=i(this,"change",7),this.globalSlimmers={},this.formFieldController=new O({propertyRules:[{propertyName:"required",ruleFactory:e=>e?new I:null}],inputContainerGetter:()=>this.inputContainerRef,touchableAreaGetter:()=>this.radioItemsController.getRadioItemsArray().map((e=>e.shadowRoot.querySelector("input"))),defaultValue:"",attributeGetter:e=>this[e],validationRulesName:"validationRules"}),this.radioValueChangeObserver=new E(l,(e=>this.childRadioValueChange(e))),this.radioEventPrevent=new A([w],(()=>this.vegaFlexElement)),this.slotMutationObserver=new z({options:{childList:!0},mutationFilter:D("VEGA-RADIO"),callback:()=>this.radioItemsController.syncRadioArrayAndValue()}),this.changeEventEmitter=x(W,w),this.keyboardController=new S,this.radioItemsController=new B,this.valueController=new U,this.vegaComponentUsageRuntimeMetricsSlimmer=new m,this.label="",this.value="",this.vegaFlexProp={},this.required=!1,this.optional=!1,this.hint="",this.isValid=null,this.disabled=!1,this.autoValidation=!0,this.validationRules=[],this.childRadioValueChange=e=>{e.detail&&this.valueController.setValue(e.host.value)}}async watchValue(e){}watchName(){}watchVegaFlexProp(){this.setVegaFlexProperty()}async watchDisabled(){this.notifyGroupDisabledChange()}watchValidationRules(){}componentWillLoad(){}componentDidLoad(){this.setVegaFlexProperty(),this.disabled&&this.notifyGroupDisabledChange()}render(){return n(t(a,{role:"radiogroup"},this.renderLabelDom(),t("div",{class:"vega-radio-container",ref:e=>this.inputContainerRef=e},t("vega-flex",{ref:e=>{this.vegaFlexElement=e}},t("slot",null))),this.renderHintDom()),this.host)}renderLabelDom(){return this.label&&t("vega-field-label",{label:this.label,isFieldRequired:this.required,disabled:this.disabled,optional:this.optional})}renderHintDom(){return this.hint&&t("div",{class:"vega-hint"},t("label",null,this.hint))}setVegaFlexProperty(){this.vegaFlexProp&&Object.assign(this.vegaFlexElement,{gap:"size-16",direction:"col"},this.vegaFlexProp)}notifyGroupDisabledChange(){s.notify(d,{host:this.host})}get host(){return r(this)}static get watchers(){return{value:["watchValue"],name:["watchName"],vegaFlexProp:["watchVegaFlexProp"],disabled:["watchDisabled"],validationRules:["watchValidationRules"]}}};T([u()],W.prototype,"globalSlimmers",void 0),T([b()],W.prototype,"formFieldController",void 0),T([b()],W.prototype,"radioValueChangeObserver",void 0),T([b()],W.prototype,"radioEventPrevent",void 0),T([b()],W.prototype,"slotMutationObserver",void 0),T([b()],W.prototype,"changeEventEmitter",void 0),T([b()],W.prototype,"keyboardController",void 0),T([b()],W.prototype,"radioItemsController",void 0),T([b()],W.prototype,"valueController",void 0),T([b()],W.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),T([C()],W.prototype,"watchVegaFlexProp",null),W.style=':host{display:block;text-align:left;line-height:normal}.vega-error{display:block;margin-top:12px;font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px;color:rgba(var(--v-text-error, 189, 41, 71, 1))}@media screen and (min-width: 768px) and (max-width: 1023px){.vega-error{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.vega-error{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.vega-error{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}.vega-hidden{display:none}vega-field-label{margin-bottom:16px;display:block}vega-field-label::part(container){font-family:"Inter", sans-serif;font-size:18px;font-weight:500;line-height:30px;letter-spacing:0px}@media screen and (min-width: 768px) and (max-width: 1023px){vega-field-label::part(container){font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:28px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){vega-field-label::part(container){font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:28px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){vega-field-label::part(container){font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:28px;letter-spacing:0px}}vega-field-label::part(label){word-break:normal}.vega-hint{padding-top:12px}.vega-hint>label{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px;color:rgba(var(--v-text-secondary, 107, 116, 125, 1))}@media screen and (min-width: 768px) and (max-width: 1023px){.vega-hint>label{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.vega-hint>label{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.vega-hint>label{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}';export{N as vega_radio,W as vega_radio_group}
|
|
1
|
+
import{r as e,c as i,h as t,H as a,g as r}from"./p-6b2342e0.js";import{c as o}from"./p-3a620268.js";import{s as n}from"./p-519a7d55.js";import{C as s}from"./p-2d0d575f.js";import{R as l,i as d,F as h}from"./p-cb378636.js";import{O as c}from"./p-331a62d5.js";import{f as p}from"./p-528748fa.js";import{c as g,M as v,V as f,I as b}from"./p-6e1ab235.js";import{V as m,I as u}from"./p-8ce9e214.js";import{c as x}from"./p-66647244.js";import{d as w,L as y,M as j}from"./p-5447a8e8.js";import{i as R}from"./p-3a68b729.js";import{d as k}from"./p-526e3634.js";import{R as I}from"./p-8bc15ed0.js";import{C}from"./p-75b58efe.js";import{F as O}from"./p-320091b7.js";import{C as E}from"./p-014cd411.js";import{C as A}from"./p-2c737fc8.js";import{K as V}from"./p-f1974321.js";import{M as z}from"./p-78a57a17.js";import{T as D}from"./p-52b8f2d2.js";import"./p-6a334573.js";import"./p-8c30a60d.js";import"./p-b75ee3ba.js";import"./p-abd7aeaa.js";import"./p-87a4d75f.js";import"./p-982747ef.js";import"./p-02841589.js";import"./p-8b5d3a52.js";import"./p-0d18368b.js";import"./p-f0e828d8.js";import"./p-81dd00d0.js";import"./p-49a2e141.js";import"./p-d4ea8e22.js";import"./p-ed45b3b6.js";import"./p-d27ae9ff.js";import"./p-262ec334.js";import"./p-29e3eb12.js";import"./p-5f377954.js";import"./p-75e33859.js";import"./p-8db904dc.js";import"./p-b438e68b.js";var F=function(e,i,t,a){var r,o=arguments.length,n=o<3?i:null===a?a=Object.getOwnPropertyDescriptor(i,t):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,i,t,a);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(n=(o<3?r(n):o>3?r(i,t,n):r(i,t))||n);return o>3&&n&&Object.defineProperty(i,t,n),n};class G extends f{connectedCallback(){this.radioGroup=p(this.host,"vega-radio-group")||p(this.host,"vega-selection-tile-group"),this.radioGroup&&(this.fieldErrorObserver=new c(this.canAcceptFieldErrorObserver.bind(this),this.fieldErrorObserverListener.bind(this)),s.register(k.getSubject(this.radioGroup,R),this.fieldErrorObserver))}disconnectedCallback(){this.radioGroup&&s.unregister(k.getSubject(this.radioGroup,R),this.fieldErrorObserver)}canAcceptFieldErrorObserver(e){return("VEGA-RADIO-GROUP"===e.host.tagName||"VEGA-SELECTION-TILE-GROUP"===e.host.tagName)&&this.radioGroup===e.host}fieldErrorObserverListener(e){this.showError=e.showError}}F([g({writable:!0})],G.prototype,"showError",void 0),F([g()],G.prototype,"host",void 0),F([v("connectedCallback")],G.prototype,"connectedCallback",null),F([v("disconnectedCallback")],G.prototype,"disconnectedCallback",null);var L=function(e,i,t,a){var r,o=arguments.length,n=o<3?i:null===a?a=Object.getOwnPropertyDescriptor(i,t):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,i,t,a);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(n=(o<3?r(n):o>3?r(i,t,n):r(i,t))||n);return o>3&&n&&Object.defineProperty(i,t,n),n};const N=class{constructor(t){e(this,t),this.vegaFocus=i(this,"vegaFocus",7),this.focus=i(this,"focus",7),this.vegaBlur=i(this,"vegaBlur",7),this.blur=i(this,"blur",7),this.vegaChange=i(this,"vegaChange",7),this.change=i(this,"change",7),this.globalSlimmers={},this.changeEventEmitter=x(N,w),this.focusEventEmitter=x(N,y),this.blurEventEmitter=x(N,j),this.vegaRadioShowErrorController=new G,this.vegaComponentUsageRuntimeMetricsSlimmer=new m,this.groupDisabled=!1,this.showError=!1,this.value="",this.checked=!1,this.disabled=!1,this.size="default",this.updateValue=e=>{this.checked=e.currentTarget.checked,e.stopPropagation()},this.handleFocus=e=>{this.focusEventEmitter.emit(e,e)},this.handleBlur=e=>{this.blurEventEmitter.emit(e,e)},this.handleClick=e=>{e.stopPropagation()}}watchCheckedChange(){this.changeEventEmitter.emit(this.checked),s.notify(l,{host:this.host,detail:this.checked})}connectedCallback(){this.ariaLabel=this.host.textContent,""==this.ariaLabel&&(this.ariaLabel=this.value)}disconnectedCallback(){this.unRegisterGroupDisabledObserver()}componentDidLoad(){""===this.host.textContent&&this.labelElement.classList.add("vega-hidden"),this.initAndRegisterGroupDisabledObserver()}render(){var e;const i="VEGA-RADIO-GROUP"==(null===(e=this.host.parentElement)||void 0===e?void 0:e.nodeName);return n(t(a,{class:{"vega-flex-shrink-0 v-min-w-min":i}},t("label",{class:{"vega-radio-container":!0,[this.size]:!0,"vega-radio-checked":this.checked,"vega-radio-disabled":this.isDisabled(),error:this.showError}},t("input",{type:"radio",name:this.name,checked:this.checked,value:this.value,onFocus:this.handleFocus,onBlur:this.handleBlur,onClick:this.handleClick,onChange:this.updateValue,"aria-label":this.ariaLabel||"No label defined",disabled:this.isDisabled(),tabIndex:this.isDisabled()?-1:0,onKeyDown:o()}),t("span",{class:"vega-radio-icon"},t("span",{class:"vega-radio-circle"})),t("div",{class:"vega-radio-label",ref:e=>this.labelElement=e},t("slot",null)))),this.host)}isDisabled(){return this.disabled||this.groupDisabled}canAcceptGroupDisabledObserver(e){return p(this.host,"vega-radio-group")===e.host}groupDisabledObserverListener(e){this.groupDisabled=e.host.disabled}initAndRegisterGroupDisabledObserver(){p(this.host,"vega-radio-group")&&(this.groupDisabledObserver=new c(this.canAcceptGroupDisabledObserver.bind(this),this.groupDisabledObserverListener.bind(this)),s.register(d,this.groupDisabledObserver))}unRegisterGroupDisabledObserver(){this.groupDisabledObserver&&s.unregister(d,this.groupDisabledObserver)}get host(){return r(this)}static get watchers(){return{checked:["watchCheckedChange"]}}};L([u()],N.prototype,"globalSlimmers",void 0),L([b()],N.prototype,"changeEventEmitter",void 0),L([b()],N.prototype,"focusEventEmitter",void 0),L([b()],N.prototype,"blurEventEmitter",void 0),L([b()],N.prototype,"vegaRadioShowErrorController",void 0),L([b()],N.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),N.style=':host{display:inline-block;box-sizing:border-box;height:24px}.vega-radio-container{position:relative;display:inline-flex;gap:8px;cursor:not-allowed}.vega-radio-container:not(.vega-radio-disabled){cursor:pointer}.vega-radio-container input{position:absolute;left:0px;top:0px;opacity:0}.vega-radio-icon{display:inline-block;box-sizing:border-box;border-style:solid;border-radius:9999px;position:relative;left:0px;flex-shrink:0;border:1px solid rgba(var(--v-border-input-field, 171, 198, 216, 1));background-color:rgba(var(--v-bg-primary, 252, 252, 252, 1))}.vega-radio-icon:hover{border:1px solid rgba(var(--v-border-input-field-hover, 115, 160, 190, 1))}.vega-radio-container.default .vega-radio-icon{width:24px;height:24px;padding:5px}.vega-radio-container.small .vega-radio-icon{width:16px;height:16px;padding:4px}.vega-radio-checked:hover .vega-radio-circle{background-color:rgba(var(--v-bg-action-hover, 4, 112, 236, 1))}.vega-radio-container input[type=radio]:focus-visible+.vega-radio-icon{outline:2px solid rgba(var(--v-border-color-action, 19, 98, 226, 1));outline-offset:3px}.vega-radio-container:not(.vega-radio-disabled):active .vega-radio-icon{border-width:1px;border-style:solid;border-color:rgba(var(--v-border-color-action-active, 29, 65, 195, 1))}.vega-radio-checked:active .vega-radio-circle{background-color:rgba(var(--v-bg-action-active, 29, 65, 195, 1))}.vega-radio-checked .vega-radio-circle{display:block;width:100%;height:100%;border-radius:9999px;background-color:rgba(var(--v-bg-action, 19, 98, 226, 1))}.vega-radio-disabled .vega-radio-icon{background-color:rgba(var(--v-bg-secondary, 245, 247, 247, 1));border:1px solid rgba(var(--v-border-input-field-disabled, 222, 225, 227, 1))}.vega-radio-disabled .vega-radio-circle{background-color:rgba(var(--v-bg-disabled, 176, 180, 181, 1))}.vega-radio-disabled:hover .vega-radio-circle{background-color:rgba(var(--v-bg-disabled, 176, 180, 181, 1))}.vega-radio-container .vega-radio-label{display:inline-block;color:rgba(var(--v-text-primary, 32, 54, 69, 1))}.vega-radio-container .vega-radio-label.vega-hidden{display:none}.vega-radio-container.default .vega-radio-label{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}@media screen and (min-width: 768px) and (max-width: 1023px){.vega-radio-container.default .vega-radio-label{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.vega-radio-container.default .vega-radio-label{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.vega-radio-container.default .vega-radio-label{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}.vega-radio-container.small .vega-radio-label{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px}@media screen and (min-width: 768px) and (max-width: 1023px){.vega-radio-container.small .vega-radio-label{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.vega-radio-container.small .vega-radio-label{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.vega-radio-container.small .vega-radio-label{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px}}.vega-radio-disabled .vega-radio-label{color:rgba(var(--v-text-disabled, 176, 180, 181, 1))}label{-webkit-tap-highlight-color:transparent}.vega-radio-container.error .vega-radio-icon{border:1px solid rgba(var(--v-border-input-field-danger, 230, 50, 87, 1))}.vega-radio-container.error:hover .vega-radio-icon{border:1px solid rgba(var(--v-border-input-field-danger-hover, 255, 87, 114, 1))}.vega-radio-container.error input[type=radio]:focus-visible+.vega-radio-icon{outline:2px solid rgba(var(--v-border-color-danger, 230, 50, 87, 1));outline-offset:3px}.vega-radio-container.error:active .vega-radio-icon{outline:2px solid rgba(var(--v-border-color-danger, 230, 50, 87, 1));outline-offset:3px}.vega-radio-checked.error .vega-radio-circle{background-color:rgba(var(--v-bg-danger, 189, 41, 71, 1))}.vega-radio-checked.error:hover .vega-radio-circle{background-color:rgba(var(--v-bg-danger-hover, 233, 71, 104, 1))}.vega-radio-checked.error:active .vega-radio-circle{background-color:rgba(var(--v-bg-danger-active, 230, 50, 87, 1))}';class S extends V{constructor(){super((e=>(e.setRadioArrayTabIndex(),[{keyCode:["ArrowUp","ArrowDown"],activeElementInScope:[e.host],callback:e=>{this.updateRadioFocusStates(e)}}])))}setRadioArrayTabIndex(){const e=this.getNotDisabledRadioArray();if(e){const i=e.findIndex((e=>e.checked)),t=i>-1?i:0;e.forEach(((e,i)=>{const a=i===t?"0":"-1";e.shadowRoot.querySelector("input").setAttribute("tabIndex",a)}))}}updateRadioFocusStates(e){const i=e.key,t=this.getNotDisabledRadioArray();if(!t||0===t.length)return;t.forEach((e=>e.shadowRoot.querySelector("input").setAttribute("tabIndex","-1")));const a=t.findIndex((i=>i===e.target));let r;"ArrowDown"===i?r=a===t.length-1?t[0]:t[a+1]:"ArrowUp"===i&&(r=0===a?t[t.length-1]:t[a-1]),r&&(r.shadowRoot.querySelector("input").focus(),r.checked=!0,r.shadowRoot.querySelector("input").tabIndex=0)}getNotDisabledRadioArray(){const e=Array.from(this.host.querySelectorAll("vega-radio"));if(e.length>0)return e.filter((e=>!e.disabled))}}!function(e,i,t,a){var r,o=arguments.length,n=o<3?i:null===a?a=Object.getOwnPropertyDescriptor(i,t):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,i,t,a);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(n=(o<3?r(n):o>3?r(i,t,n):r(i,t))||n);o>3&&n&&Object.defineProperty(i,t,n)}([g()],S.prototype,"host",void 0);var P=function(e,i,t,a){var r,o=arguments.length,n=o<3?i:null===a?a=Object.getOwnPropertyDescriptor(i,t):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,i,t,a);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(n=(o<3?r(n):o>3?r(i,t,n):r(i,t))||n);return o>3&&n&&Object.defineProperty(i,t,n),n};class U extends f{emitEventAndNotifyValueChangeSubject(e){this.changeEventEmitter.emit(e),s.notify(h,{host:this.host,detail:e})}setValue(e){this.value=e}}P([g()],U.prototype,"host",void 0),P([g({writable:!0})],U.prototype,"value",void 0),P([g()],U.prototype,"changeEventEmitter",void 0),P([g()],U.prototype,"radioItemsController",void 0),P([v("watchValue")],U.prototype,"emitEventAndNotifyValueChangeSubject",null);var M=function(e,i,t,a){var r,o=arguments.length,n=o<3?i:null===a?a=Object.getOwnPropertyDescriptor(i,t):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,i,t,a);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(n=(o<3?r(n):o>3?r(i,t,n):r(i,t))||n);return o>3&&n&&Object.defineProperty(i,t,n),n};class B extends f{constructor(){super(...arguments),this.vegaRadioArray=[]}componentWillLoad(){this.syncRadioArrayAndValue()}setRadioItemName(){this.vegaRadioArray.forEach((e=>{e.name=this.name?this.name:e.getAttribute("name")}))}setRadioItemCheckedByValue(e){this.vegaRadioArray.forEach((i=>{i.checked=i.value===e}))}syncRadioItemsStatus(){this.setRadioItemCheckedByValue(this.value),this.setRadioItemName()}getRadioItemsArray(){return this.vegaRadioArray}syncRadioArrayAndValue(){this.vegaRadioArray=Array.from(this.host.querySelectorAll("vega-radio")),this.vegaRadioArray.forEach((e=>{e.checked&&this.valueController.setValue(e.value)}))}}M([g()],B.prototype,"host",void 0),M([g()],B.prototype,"value",void 0),M([g()],B.prototype,"name",void 0),M([g()],B.prototype,"valueController",void 0),M([v("componentWillLoad")],B.prototype,"componentWillLoad",null),M([v("watchName")],B.prototype,"setRadioItemName",null),M([v("watchValue")],B.prototype,"setRadioItemCheckedByValue",null),M([v("componentDidLoad")],B.prototype,"syncRadioItemsStatus",null);var T=function(e,i,t,a){var r,o=arguments.length,n=o<3?i:null===a?a=Object.getOwnPropertyDescriptor(i,t):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,i,t,a);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(n=(o<3?r(n):o>3?r(i,t,n):r(i,t))||n);return o>3&&n&&Object.defineProperty(i,t,n),n};const W=class{constructor(t){e(this,t),this.vegaChange=i(this,"vegaChange",7),this.change=i(this,"change",7),this.globalSlimmers={},this.formFieldController=new O({propertyRules:[{propertyName:"required",ruleFactory:e=>e?new I:null}],inputContainerGetter:()=>this.inputContainerRef,touchableAreaGetter:()=>this.radioItemsController.getRadioItemsArray().map((e=>e.shadowRoot.querySelector("input"))),defaultValue:"",attributeGetter:e=>this[e],validationRulesName:"validationRules"}),this.radioValueChangeObserver=new E(l,(e=>this.childRadioValueChange(e))),this.radioEventPrevent=new A([w],(()=>this.vegaFlexElement)),this.slotMutationObserver=new z({options:{childList:!0},mutationFilter:D("VEGA-RADIO"),callback:()=>this.radioItemsController.syncRadioArrayAndValue()}),this.changeEventEmitter=x(W,w),this.keyboardController=new S,this.radioItemsController=new B,this.valueController=new U,this.vegaComponentUsageRuntimeMetricsSlimmer=new m,this.label="",this.value="",this.vegaFlexProp={},this.required=!1,this.optional=!1,this.hint="",this.isValid=null,this.disabled=!1,this.autoValidation=!0,this.validationRules=[],this.childRadioValueChange=e=>{e.detail&&this.valueController.setValue(e.host.value)}}async watchValue(e){}watchName(){}watchVegaFlexProp(){this.setVegaFlexProperty()}async watchDisabled(){this.notifyGroupDisabledChange()}watchValidationRules(){}componentWillLoad(){}componentDidLoad(){this.setVegaFlexProperty(),this.disabled&&this.notifyGroupDisabledChange()}render(){return n(t(a,{role:"radiogroup"},this.renderLabelDom(),t("div",{class:"vega-radio-container",ref:e=>this.inputContainerRef=e},t("vega-flex",{ref:e=>{this.vegaFlexElement=e}},t("slot",null))),this.renderHintDom()),this.host)}renderLabelDom(){return this.label&&t("vega-field-label",{label:this.label,isFieldRequired:this.required,disabled:this.disabled,optional:this.optional})}renderHintDom(){return this.hint&&t("div",{class:"vega-hint"},t("label",null,this.hint))}setVegaFlexProperty(){this.vegaFlexProp&&Object.assign(this.vegaFlexElement,{gap:"size-16",direction:"col"},this.vegaFlexProp)}notifyGroupDisabledChange(){s.notify(d,{host:this.host})}get host(){return r(this)}static get watchers(){return{value:["watchValue"],name:["watchName"],vegaFlexProp:["watchVegaFlexProp"],disabled:["watchDisabled"],validationRules:["watchValidationRules"]}}};T([u()],W.prototype,"globalSlimmers",void 0),T([b()],W.prototype,"formFieldController",void 0),T([b()],W.prototype,"radioValueChangeObserver",void 0),T([b()],W.prototype,"radioEventPrevent",void 0),T([b()],W.prototype,"slotMutationObserver",void 0),T([b()],W.prototype,"changeEventEmitter",void 0),T([b()],W.prototype,"keyboardController",void 0),T([b()],W.prototype,"radioItemsController",void 0),T([b()],W.prototype,"valueController",void 0),T([b()],W.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),T([C()],W.prototype,"watchVegaFlexProp",null),W.style=':host{display:block;text-align:left;line-height:normal}.vega-error{display:block;margin-top:12px;font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px;color:rgba(var(--v-text-error, 189, 41, 71, 1))}@media screen and (min-width: 768px) and (max-width: 1023px){.vega-error{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.vega-error{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.vega-error{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}.vega-hidden{display:none}vega-field-label{margin-bottom:16px;display:block}vega-field-label::part(container){font-family:"Inter", sans-serif;font-size:18px;font-weight:500;line-height:30px;letter-spacing:0px}@media screen and (min-width: 768px) and (max-width: 1023px){vega-field-label::part(container){font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:28px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){vega-field-label::part(container){font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:28px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){vega-field-label::part(container){font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:28px;letter-spacing:0px}}vega-field-label::part(label){word-break:normal}.vega-hint{padding-top:12px}.vega-hint>label{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px;color:rgba(var(--v-text-secondary, 107, 116, 125, 1))}@media screen and (min-width: 768px) and (max-width: 1023px){.vega-hint>label{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.vega-hint>label{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.vega-hint>label{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}';export{N as vega_radio,W as vega_radio_group}
|
package/dist/vega/p-5f377954.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var t;!function(t){t.Angular="angular",t.Vue="vue",t.React="react",t.Next="next",t.VanillaJs="vanilla-js"}(t||(t={}));const s=new class{constructor(){this.vegaVersion="2.
|
|
1
|
+
var t;!function(t){t.Angular="angular",t.Vue="vue",t.React="react",t.Next="next",t.VanillaJs="vanilla-js"}(t||(t={}));const s=new class{constructor(){this.vegaVersion="2.95.0",this.framework=t.VanillaJs}getVegaEnv(){return{version:this.vegaVersion,framework:this.framework}}setVegaFramework(t){this.framework=t}};export{t as F,s as v}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as t,V as e,I as s}from"./p-6e1ab235.js";import{c as i}from"./p-6a334573.js";import{C as o}from"./p-2d0d575f.js";import{d as n,D as r}from"./p-526e3634.js";import{j as a,i as c}from"./p-
|
|
1
|
+
import{c as t,V as e,I as s}from"./p-6e1ab235.js";import{c as i}from"./p-6a334573.js";import{C as o}from"./p-2d0d575f.js";import{d as n,D as r}from"./p-526e3634.js";import{j as a,i as c}from"./p-8c30a60d.js";import{t as f}from"./p-b75ee3ba.js";var v=function(t,e,s,i){var o,n=arguments.length,r=n<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,s):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,s,i);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(r=(n<3?o(r):n>3?o(e,s,r):o(e,s))||r);return n>3&&r&&Object.defineProperty(e,s,r),r};class h extends e{constructor(){super(...arguments),this.canHandle=({namespace:t})=>"vega"===t||!this.nativeEvent||"function"!=typeof this.nativeEvent.emit,this.handle=t=>this.vegaEvent.emit(t)}}v([t()],h.prototype,"vegaEvent",void 0),v([t()],h.prototype,"nativeEvent",void 0);class l extends e{constructor(){super(...arguments),this.canHandle=({namespace:t})=>"native"===t,this.handle=(t,e)=>(e&&e.stopPropagation(),this.nativeEvent.emit(t))}}!function(t,e,s,i){var o,n=arguments.length,r=n<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,s):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,s,i);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(r=(n<3?o(r):n>3?o(e,s,r):o(e,s))||r);n>3&&r&&Object.defineProperty(e,s,r)}([t()],l.prototype,"nativeEvent",void 0);class p extends e{constructor(){super(...arguments),this.canHandle=({namespace:t,jqueryDelegatedEvent:e})=>"native"===t&&!!e&&a.isSupportDelegated(this.host,this.eventID),this.handle=(t,e)=>{const s=a.getStrategy(this.host,this.eventID);if(s)return e&&e.stopPropagation(),s.handle(this.host,t)}}setEventID(t){this.eventID=t}}!function(t,e,s,i){var o,n=arguments.length,r=n<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,s):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,s,i);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(r=(n<3?o(r):n>3?o(e,s,r):o(e,s))||r);n>3&&r&&Object.defineProperty(e,s,r)}([t()],p.prototype,"host",void 0);var m=function(t,e,s,i){var o,n=arguments.length,r=n<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,s):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,s,i);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(r=(n<3?o(r):n>3?o(e,s,r):o(e,s))||r);return n>3&&r&&Object.defineProperty(e,s,r),r};class u extends e{constructor({eventID:t}){super(),this.vegaEventEmitHandler=new h,this.nativeEventEmitHandler=new l,this.jqueryDelegatedEventEmitHandler=new p,this.emit=(t,e)=>{let s=!1;o.notify(n.getSubject(this.host,this.eventID),{host:this.host,detail:t,eventName:this.eventName,preventDefault:()=>{s=!0}});const i=c.getSemantics(this.host);let r;for(const s of this.eventHandlers)if(s.canHandle(i)){r=s.handle(t,e);break}return r&&s&&r.preventDefault(),r},this.removeObserverFromHost=()=>{Promise.resolve(!0).then((()=>{this.isNodeRemovedFromDocument(this.host)&&r.removeUniqueObserverFromNode(this.host,this.eventID)}))},this.eventID=t,this.eventName=t.getVegaName(),this.initialEventHandlers()}isNodeRemovedFromDocument(t){var e;return!(!t||(null===(e=f())||void 0===e?void 0:e.body.contains(t))||t.parentNode)}initialEventHandlers(){this.jqueryDelegatedEventEmitHandler.setEventID(this.eventID),this.eventHandlers=[this.vegaEventEmitHandler,this.jqueryDelegatedEventEmitHandler,this.nativeEventEmitHandler]}}function d(t,e,s){const o=e.getVegaName(),n=s||e.getNativeName();return i(t,u,[{mapFrom:"host",mapTo:"host"},{mapFrom:o,mapTo:"vegaEvent"},{mapFrom:n,mapTo:"nativeEvent",isOptional:!0}],[{mapFrom:"disconnectedCallback",mapTo:"removeObserverFromHost"}],[{eventID:e}])}m([s()],u.prototype,"vegaEventEmitHandler",void 0),m([s()],u.prototype,"nativeEventEmitHandler",void 0),m([s()],u.prototype,"jqueryDelegatedEventEmitHandler",void 0);export{d as c}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e,c as i,h as t,H as a,g as n}from"./p-6b2342e0.js";import{s as r}from"./p-519a7d55.js";import{C as o}from"./p-590fd123.js";import{C as s}from"./p-2d0d575f.js";import{C as h,g as c,F as l,h as d}from"./p-cb378636.js";import{O as p}from"./p-331a62d5.js";import{f as g,a as b}from"./p-528748fa.js";import{c as x,M as v,V as f,I as m}from"./p-6e1ab235.js";import{V as u,I as k}from"./p-8ce9e214.js";import{F as w}from"./p-320091b7.js";import{c as y}from"./p-140616fe.js";import{d as j,q as z}from"./p-698fbd73.js";import{i as C}from"./p-3a68b729.js";import{d as I}from"./p-526e3634.js";import{C as R}from"./p-b1ff70bf.js";import{A as V}from"./p-bdb5180c.js";import{R as O}from"./p-8bc15ed0.js";import{C as E}from"./p-75b58efe.js";import{C as D}from"./p-014cd411.js";import{i as F}from"./p-d27ae9ff.js";import"./p-abd7aeaa.js";import"./p-02841589.js";import"./p-8b5d3a52.js";import"./p-6a334573.js";import"./p-0d18368b.js";import"./p-f0e828d8.js";import"./p-b75ee3ba.js";import"./p-81dd00d0.js";import"./p-49a2e141.js";import"./p-d4ea8e22.js";import"./p-ed45b3b6.js";import"./p-78a57a17.js";import"./p-52b8f2d2.js";import"./p-29e3eb12.js";import"./p-282b37cb.js";import"./p-5f377954.js";import"./p-87a4d75f.js";import"./p-982747ef.js";import"./p-262ec334.js";var A=function(e,i,t,a){var n,r=arguments.length,o=r<3?i:null===a?a=Object.getOwnPropertyDescriptor(i,t):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,i,t,a);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(o=(r<3?n(o):r>3?n(i,t,o):n(i,t))||o);return r>3&&o&&Object.defineProperty(i,t,o),o};class G extends f{connectedCallback(){this.checkboxGroup=g(this.host,"vega-checkbox-group")||g(this.host,"vega-selection-tile-group"),this.fieldErrorObserver=new p(this.canAcceptFieldErrorObserver.bind(this),this.fieldErrorObserverListener.bind(this)),s.register(I.getSubject(this.checkboxGroup||this.host,C),this.fieldErrorObserver)}disconnectedCallback(){s.unregister(I.getSubject(this.checkboxGroup||this.host,C),this.fieldErrorObserver)}canAcceptFieldErrorObserver(){return!0}fieldErrorObserverListener(e){this.showError=e.showError}}A([x({writable:!0})],G.prototype,"showError",void 0),A([x()],G.prototype,"host",void 0),A([v("connectedCallback")],G.prototype,"connectedCallback",null),A([v("disconnectedCallback")],G.prototype,"disconnectedCallback",null);var P=function(e,i,t,a){var n,r=arguments.length,o=r<3?i:null===a?a=Object.getOwnPropertyDescriptor(i,t):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,i,t,a);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(o=(r<3?n(o):r>3?n(i,t,o):n(i,t))||o);return r>3&&o&&Object.defineProperty(i,t,o),o};const U=class{constructor(t){e(this,t),this.vegaChange=i(this,"vegaChange",7),this.vegaUserChange=i(this,"vegaUserChange",7),this.userChange=i(this,"userChange",7),this.change=i(this,"change",7),this.globalSlimmers={},this.vegaCheckboxShowErrorController=new G,this.ariaAttributesValueMapper=new V((()=>this.host.shadowRoot.querySelector("input")),{"aria-label":{dependency:["data-aria-label","identifier"],defaultValue:"No label defined"}}),this.formFieldController=new w({propertyRules:[{propertyName:"required",ruleFactory:e=>e?new o:null}],defaultValue:e=>""!==e.identifier&&"",attributeGetter:e=>this[e],inputContainerGetter:()=>this.inputContainerRef,touchableAreaGetter:()=>[this.inputRef]}),this.changeEventEmitter=y(U,j),this.userChangeEventEmitter=y(U,z),this.dropdownEventPrevent=new R([j,z],(()=>this.host),{customPreventHandle:e=>{e.stopPropagation()}}),this.vegaComponentUsageRuntimeMetricsSlimmer=new u,this.labelClickPending=!1,this.isUserInteraction=!1,this.groupDisabled=!1,this.showError=!1,this.identifier="",this.value=""!==this.identifier&&"",this.checked=!1,this.indeterminate=!1,this.disabled=!1,this.size="default",this.required=!1,this.isValid=null,this.onCheckBoxChange=e=>{this.indeterminate&&(this.indeterminate=!1),this.isUserInteraction=!0,this.checked=e.currentTarget.checked,this.isUserInteraction=!1},this.onInputKeyDown=e=>{"Enter"===e.key&&(e.preventDefault(),this.isDisabled()||(this.indeterminate&&(this.indeterminate=!1),this.isUserInteraction=!0,this.checked=!this.checked,this.isUserInteraction=!1))},this.onLabelClick=e=>{e.target!==this.inputRef?(this.labelClickPending=!0,setTimeout((()=>{this.labelClickPending=!1}),0)):this.labelClickPending&&(e.stopPropagation(),this.labelClickPending=!1)},this.onSelectedIconClick=e=>{e.stopPropagation()}}watchValueChange(e){this.checked=""!==this.identifier?e===this.identifier:!0===e}watchCheckedChange(){const e=this.isUserInteraction;this.isUserInteraction=!1,this.initValue(),this.changeEventEmitter.emit(this.value),e&&(this.userChangeEventEmitter.emit(this.value),s.notify(h,{host:this.host,detail:this.value})),s.notify(c,{host:this.host,detail:this.value}),s.notify(l,{host:this.host,detail:this.value})}disconnectedCallback(){this.unRegisterGroupDisabledObserver()}componentWillLoad(){!this.checked&&(""!==this.identifier?this.value===this.identifier:!0===this.value||"true"===this.value)&&(this.checked=!0),this.initValue(),this.initAndRegisterGroupDisabledObserver()}componentShouldUpdate(e,i,t){return"checked"!==t||e!==i}componentDidRender(){""===this.host.innerHTML.trim()&&this.labelElement.classList.add("vega-hidden"),this.syncNativeIndeterminate()}async setValue(e){this.checked=this.identifier?e===this.identifier:!0===e}render(){var e;const i="VEGA-CHECKBOX-GROUP"==(null===(e=this.host.parentElement)||void 0===e?void 0:e.nodeName);return r(t(a,{class:{"vega-flex-shrink-0 v-min-w-min":i,checked:this.checked,indeterminate:this.indeterminate,disabled:this.isDisabled()}},t("label",{class:b(["vega-checkbox-container",this.showError&&"error",this.size&&`size-${this.size}`]),ref:e=>this.inputContainerRef=e,onClick:this.onLabelClick},t("input",{ref:e=>this.inputRef=e,type:"checkbox",checked:this.checked,value:this.identifier,onChange:this.onCheckBoxChange,"aria-label":this.identifier||"No label defined","aria-checked":this.indeterminate?"mixed":void 0,disabled:this.isDisabled(),tabIndex:0,onKeyDown:this.onInputKeyDown}),t("span",{class:"vega-checkbox-icon",onClick:this.onSelectedIconClick,tabIndex:-1,"aria-hidden":"true"},this.renderIconDom()),t("div",{class:"vega-checkbox-label-container",ref:e=>this.labelElement=e},this.renderLabelDom(),this.renderRequireDom()))),this.host)}renderIconDom(){return this.indeterminate?t("vega-icon",{icon:"minus-sign",size:"small"===this.size?"size-12":"size-16"}):this.checked?t("vega-icon",{icon:"checkmark",size:"small"===this.size?"size-12":"size-16"}):null}renderLabelDom(){return t("span",{class:"vega-checkbox-label"},t("slot",null))}renderRequireDom(){return t("span",{class:{"vega-require":this.required}},this.required?"*":"")}initValue(){this.value=""!==this.identifier?this.checked?this.identifier:"":this.checked}syncNativeIndeterminate(){this.inputRef&&(this.inputRef.indeterminate=this.indeterminate)}isDisabled(){return this.disabled||this.groupDisabled}canAcceptGroupDisabledObserver(e){return g(this.host,"vega-checkbox-group")===e.host}groupDisabledObserverListener(e){this.groupDisabled=e.host.disabled}initAndRegisterGroupDisabledObserver(){g(this.host,"vega-checkbox-group")&&(this.groupDisabledObserver=new p(this.canAcceptGroupDisabledObserver.bind(this),this.groupDisabledObserverListener.bind(this)),s.register(d,this.groupDisabledObserver))}unRegisterGroupDisabledObserver(){this.groupDisabledObserver&&s.unregister(d,this.groupDisabledObserver)}get host(){return n(this)}static get watchers(){return{value:["watchValueChange"],checked:["watchCheckedChange"]}}};P([k()],U.prototype,"globalSlimmers",void 0),P([m()],U.prototype,"vegaCheckboxShowErrorController",void 0),P([m()],U.prototype,"ariaAttributesValueMapper",void 0),P([m()],U.prototype,"formFieldController",void 0),P([m()],U.prototype,"changeEventEmitter",void 0),P([m()],U.prototype,"userChangeEventEmitter",void 0),P([m()],U.prototype,"dropdownEventPrevent",void 0),P([m()],U.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),U.style=':host{display:inline-block;vertical-align:middle}.vega-checkbox-container{position:relative;display:flex;-webkit-tap-highlight-color:transparent}.vega-checkbox-container>input[type=checkbox]{position:absolute;left:0px;top:0px;opacity:0;width:24px;height:24px;padding:0px;margin:0px}.vega-checkbox-container>.vega-checkbox-icon{display:inline-block;box-sizing:border-box;width:24px;height:24px;border-style:solid;border-width:2px;border-color:rgba(var(--v-border-color-action-active, 29, 65, 195, 1));position:relative;left:0px;background-color:rgba(var(--v-bg-primary, 252, 252, 252, 1));border:1px solid rgba(var(--v-border-input-field, 171, 198, 216, 1));border-radius:4px;min-width:24px;color:rgba(var(--v-text-inverted-primary, 252, 252, 252, 1))}.vega-checkbox-container>.vega-checkbox-icon:hover{border:1px solid rgba(var(--v-border-input-field-hover, 115, 160, 190, 1))}:host(.checked) .vega-checkbox-container>.vega-checkbox-icon,:host(.indeterminate) .vega-checkbox-container>.vega-checkbox-icon{background-color:rgba(var(--v-bg-action, 19, 98, 226, 1));display:inline-flex;align-items:center;justify-content:center}:host(.checked) .vega-checkbox-container>.vega-checkbox-icon:hover,:host(.indeterminate) .vega-checkbox-container>.vega-checkbox-icon:hover{background-color:rgba(var(--v-bg-action-hover, 4, 112, 236, 1))}.vega-checkbox-container>input[type=checkbox]:focus-visible+.vega-checkbox-icon{outline:2px solid rgba(var(--v-border-color-action, 19, 98, 226, 1));outline-offset:3px}.vega-checkbox-container>.vega-checkbox-icon:active{border-width:1px;border-style:solid;border-color:rgba(var(--v-border-color-action-active, 29, 65, 195, 1))}:host(.checked) .vega-checkbox-container>.vega-checkbox-icon:active,:host(.indeterminate) .vega-checkbox-container>.vega-checkbox-icon:active{background-color:rgba(var(--v-bg-action-active, 29, 65, 195, 1))}:host(.disabled) .vega-checkbox-container{cursor:not-allowed}:host(:not(.disabled)) .vega-checkbox-container{cursor:pointer}.vega-checkbox-container .vega-require{color:rgba(var(--v-text-error, 189, 41, 71, 1));margin-left:4px;vertical-align:middle}.vega-checkbox-container.error>.vega-checkbox-icon{background-color:rgba(var(--v-bg-primary, 252, 252, 252, 1));border:1px solid rgba(var(--v-border-input-field-danger, 230, 50, 87, 1))}:host(.checked) .vega-checkbox-container.error>.vega-checkbox-icon,:host(.indeterminate) .vega-checkbox-container.error>.vega-checkbox-icon{background-color:rgba(var(--v-bg-danger, 189, 41, 71, 1))}.vega-checkbox-container.error>.vega-checkbox-icon:hover{border:1px solid rgba(var(--v-border-input-field-danger-hover, 255, 87, 114, 1))}:host(.checked) .vega-checkbox-container.error>.vega-checkbox-icon:hover,:host(.indeterminate) .vega-checkbox-container.error>.vega-checkbox-icon:hover{background-color:rgba(var(--v-bg-danger-hover, 233, 71, 104, 1))}.vega-checkbox-container.error>input[type=checkbox]:focus-visible+.vega-checkbox-icon{outline:2px solid rgba(var(--v-border-color-danger, 230, 50, 87, 1));outline-offset:3px}:host(.checked) .vega-checkbox-container.error>.vega-checkbox-icon:active,:host(.indeterminate) .vega-checkbox-container.error>.vega-checkbox-icon:active{background-color:rgba(var(--v-bg-danger-active, 230, 50, 87, 1))}.vega-checkbox-container.error>.vega-checkbox-icon:active{border-width:1px;border-style:solid;border-color:rgba(var(--v-border-color-danger-active, 189, 41, 71, 1))}:host(.disabled) .vega-checkbox-container>.vega-checkbox-icon{background-color:rgba(var(--v-bg-secondary, 245, 247, 247, 1));border:1px solid rgba(var(--v-border-input-field-disabled, 222, 225, 227, 1))}:host(.checked.disabled) .vega-checkbox-container>.vega-checkbox-icon,:host(.indeterminate.disabled) .vega-checkbox-container>.vega-checkbox-icon{background-color:rgba(var(--v-bg-disabled, 176, 180, 181, 1));border:1px solid rgba(var(--v-border-input-field-disabled, 222, 225, 227, 1))}:host(.checked.disabled) .vega-checkbox-container>.vega-checkbox-icon>vega-icon,:host(.indeterminate.disabled) .vega-checkbox-container>.vega-checkbox-icon>vega-icon{color:rgba(var(--v-text-inverted-primary, 252, 252, 252, 1))}.vega-checkbox-container>.vega-checkbox-label-container{display:inline-block;margin-left:12px;color:rgba(var(--v-text-primary, 32, 54, 69, 1));font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}@media screen and (min-width: 768px) and (max-width: 1023px){.vega-checkbox-container>.vega-checkbox-label-container{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-checkbox-container>.vega-checkbox-label-container{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-checkbox-container>.vega-checkbox-label-container{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}:host(.disabled) .vega-checkbox-container>.vega-checkbox-label-container{color:rgba(var(--v-text-disabled, 176, 180, 181, 1))}.vega-error{display:block;margin-top:12px;font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px;color:rgba(var(--v-text-error, 189, 41, 71, 1))}@media screen and (min-width: 768px) and (max-width: 1023px){.vega-error{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.vega-error{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.vega-error{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}.vega-checkbox-label-container.vega-hidden{display:none}.vega-hidden{display:none}.size-default input[type=checkbox]{width:24px;height:24px}.size-default .vega-checkbox-icon{width:24px;height:24px;min-width:24px;border-radius:4px}.size-default .vega-checkbox-label-container{margin-left:12px;font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}@media screen and (min-width: 768px) and (max-width: 1023px){.size-default .vega-checkbox-label-container{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){.size-default .vega-checkbox-label-container{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){.size-default .vega-checkbox-label-container{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}.size-small input[type=checkbox]{width:16px;height:16px}.size-small .vega-checkbox-icon{width:16px;height:16px;min-width:16px;border-radius:2px}.size-small .vega-checkbox-label-container{margin-left:8px;font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px}@media screen and (min-width: 768px) and (max-width: 1023px){.size-small .vega-checkbox-label-container{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.size-small .vega-checkbox-label-container{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.size-small .vega-checkbox-label-container{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px}}';var q=function(e,i,t,a){var n,r=arguments.length,o=r<3?i:null===a?a=Object.getOwnPropertyDescriptor(i,t):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,i,t,a);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(o=(r<3?n(o):r>3?n(i,t,o):n(i,t))||o);return r>3&&o&&Object.defineProperty(i,t,o),o};const S=class{constructor(t){e(this,t),this.vegaChange=i(this,"vegaChange",7),this.vegaUserChange=i(this,"vegaUserChange",7),this.userChange=i(this,"userChange",7),this.change=i(this,"change",7),this.globalSlimmers={},this.formFieldController=new w({propertyRules:[{propertyName:"required",ruleFactory:e=>e?new O:null}],defaultValue:[],validationRulesName:"validationRules",attributeGetter:e=>this[e],inputContainerGetter:()=>this.inputContainerRef,touchableAreaGetter:()=>this.touchableAreaGetter()}),this.checkboxValueChangeObserver=new D(c,(e=>this.childCheckboxValueChange(e))),this.checkboxUserInteractionObserver=new D(h,(()=>{this.userInteractionPending=!0})),this.checkboxEventPrevent=new R([j,z],(()=>this.vegaFlexElement)),this.changeEventEmitter=y(S,j),this.userChangeEventEmitter=y(S,z),this.vegaComponentUsageRuntimeMetricsSlimmer=new u,this.userInteractionPending=!1,this.label="",this.value=[],this.vegaFlexProp={},this.disabled=!1,this.required=!1,this.optional=!1,this.hint="",this.isValid=null,this.autoValidation=!0,this.validationRules=[],this.childCheckboxValueChange=e=>{this.syncCheckboxItemsValue(e.detail,e.host.identifier)},this.touchableAreaGetter=()=>{const e=[];return this.vegaCheckboxArray&&this.vegaCheckboxArray.forEach((async i=>{e.push(i.shadowRoot.querySelector("input"))})),e}}async watchValue(e,i){const t=this.userInteractionPending;this.userInteractionPending=!1,F(e,i,!0)||(this.initCheckboxArray(),this.changeEventEmitter.emit(this.value),t&&this.userChangeEventEmitter.emit(this.value),s.notify(l,{host:this.host,detail:this.value}))}watchVegaFlexProp(){this.setVegaFlexProperty()}async watchDisabled(){this.notifyGroupDisabledChange()}watchValidationRules(){}componentDidLoad(){this.setVegaFlexProperty(),this.initCheckboxArray(),this.notifyGroupDisabledChange()}componentShouldUpdate(e,i,t){return!("value"===t&&Array.isArray(e)&&Array.isArray(i)&&F(e,i,!0))}render(){return r(t(a,null,this.renderLabelDom(),t("div",{class:"vega-checkbox-group-container",ref:e=>this.inputContainerRef=e},t("vega-flex",{ref:e=>{this.vegaFlexElement=e}},t("slot",null))),this.renderHintDom()),this.host)}renderLabelDom(){return this.label&&t("vega-field-label",{label:this.label,isFieldRequired:this.required,optional:this.optional,disabled:this.disabled})}renderHintDom(){return this.hint&&t("div",{class:"vega-hint"},t("label",null,this.hint))}setVegaFlexProperty(){this.vegaFlexProp&&Object.assign(this.vegaFlexElement,{gap:"size-16",direction:"col"},this.vegaFlexProp)}syncCheckboxItemsValue(e,i){e&&!this.value.includes(i)?this.value=[...this.value,i]:!e&&this.value.includes(i)&&(this.value=[...this.value.filter((e=>e!==i))])}initCheckboxArray(){this.vegaCheckboxArray=Array.from(this.host.querySelectorAll("vega-checkbox")),this.vegaCheckboxArray.forEach((e=>{e.checked=!!(this.value&&this.value.length>0)&&this.value.includes(e.identifier)}))}notifyGroupDisabledChange(){s.notify(d,{host:this.host})}get host(){return n(this)}static get watchers(){return{value:["watchValue"],vegaFlexProp:["watchVegaFlexProp"],disabled:["watchDisabled"],validationRules:["watchValidationRules"]}}};q([k()],S.prototype,"globalSlimmers",void 0),q([m()],S.prototype,"formFieldController",void 0),q([m()],S.prototype,"checkboxValueChangeObserver",void 0),q([m()],S.prototype,"checkboxUserInteractionObserver",void 0),q([m()],S.prototype,"checkboxEventPrevent",void 0),q([m()],S.prototype,"changeEventEmitter",void 0),q([m()],S.prototype,"userChangeEventEmitter",void 0),q([m()],S.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),q([E()],S.prototype,"watchVegaFlexProp",null),S.style=':host{display:block;text-align:left;line-height:normal}.vega-error{display:block;margin-top:12px;font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px;color:rgba(var(--v-text-error, 189, 41, 71, 1))}@media screen and (min-width: 768px) and (max-width: 1023px){.vega-error{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.vega-error{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.vega-error{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}.vega-hidden{display:none}vega-field-label{margin-bottom:16px;display:block}vega-field-label::part(container){font-family:"Inter", sans-serif;font-size:18px;font-weight:500;line-height:30px;letter-spacing:0px}@media screen and (min-width: 768px) and (max-width: 1023px){vega-field-label::part(container){font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:28px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){vega-field-label::part(container){font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:28px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){vega-field-label::part(container){font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:28px;letter-spacing:0px}}vega-field-label::part(label){word-break:normal}.vega-hint{padding-top:12px}.vega-hint>label{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px;color:rgba(var(--v-text-secondary, 107, 116, 125, 1))}@media screen and (min-width: 768px) and (max-width: 1023px){.vega-hint>label{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.vega-hint>label{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.vega-hint>label{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}';export{U as vega_checkbox,S as vega_checkbox_group}
|
|
1
|
+
import{r as e,c as i,h as t,H as a,g as n}from"./p-6b2342e0.js";import{s as r}from"./p-519a7d55.js";import{C as o}from"./p-590fd123.js";import{C as s}from"./p-2d0d575f.js";import{C as h,g as c,F as l,h as d}from"./p-cb378636.js";import{O as p}from"./p-331a62d5.js";import{f as g,a as x}from"./p-528748fa.js";import{c as b,M as v,V as f,I as m}from"./p-6e1ab235.js";import{V as u,I as k}from"./p-8ce9e214.js";import{F as w}from"./p-320091b7.js";import{c as y}from"./p-66647244.js";import{d as j,q as z}from"./p-5447a8e8.js";import{i as C}from"./p-3a68b729.js";import{d as I}from"./p-526e3634.js";import{C as R}from"./p-2c737fc8.js";import{A as V}from"./p-bdb5180c.js";import{R as O}from"./p-8bc15ed0.js";import{C as E}from"./p-75b58efe.js";import{C as D}from"./p-014cd411.js";import{i as F}from"./p-d27ae9ff.js";import"./p-abd7aeaa.js";import"./p-02841589.js";import"./p-8b5d3a52.js";import"./p-6a334573.js";import"./p-0d18368b.js";import"./p-f0e828d8.js";import"./p-b75ee3ba.js";import"./p-81dd00d0.js";import"./p-49a2e141.js";import"./p-d4ea8e22.js";import"./p-ed45b3b6.js";import"./p-78a57a17.js";import"./p-52b8f2d2.js";import"./p-29e3eb12.js";import"./p-8c30a60d.js";import"./p-5f377954.js";import"./p-87a4d75f.js";import"./p-982747ef.js";import"./p-262ec334.js";var A=function(e,i,t,a){var n,r=arguments.length,o=r<3?i:null===a?a=Object.getOwnPropertyDescriptor(i,t):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,i,t,a);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(o=(r<3?n(o):r>3?n(i,t,o):n(i,t))||o);return r>3&&o&&Object.defineProperty(i,t,o),o};class G extends f{connectedCallback(){this.checkboxGroup=g(this.host,"vega-checkbox-group")||g(this.host,"vega-selection-tile-group"),this.fieldErrorObserver=new p(this.canAcceptFieldErrorObserver.bind(this),this.fieldErrorObserverListener.bind(this)),s.register(I.getSubject(this.checkboxGroup||this.host,C),this.fieldErrorObserver)}disconnectedCallback(){s.unregister(I.getSubject(this.checkboxGroup||this.host,C),this.fieldErrorObserver)}canAcceptFieldErrorObserver(){return!0}fieldErrorObserverListener(e){this.showError=e.showError}}A([b({writable:!0})],G.prototype,"showError",void 0),A([b()],G.prototype,"host",void 0),A([v("connectedCallback")],G.prototype,"connectedCallback",null),A([v("disconnectedCallback")],G.prototype,"disconnectedCallback",null);var P=function(e,i,t,a){var n,r=arguments.length,o=r<3?i:null===a?a=Object.getOwnPropertyDescriptor(i,t):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,i,t,a);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(o=(r<3?n(o):r>3?n(i,t,o):n(i,t))||o);return r>3&&o&&Object.defineProperty(i,t,o),o};const U=class{constructor(t){e(this,t),this.vegaChange=i(this,"vegaChange",7),this.vegaUserChange=i(this,"vegaUserChange",7),this.userChange=i(this,"userChange",7),this.change=i(this,"change",7),this.globalSlimmers={},this.vegaCheckboxShowErrorController=new G,this.ariaAttributesValueMapper=new V((()=>this.host.shadowRoot.querySelector("input")),{"aria-label":{dependency:["data-aria-label","identifier"],defaultValue:"No label defined"}}),this.formFieldController=new w({propertyRules:[{propertyName:"required",ruleFactory:e=>e?new o:null}],defaultValue:e=>""!==e.identifier&&"",attributeGetter:e=>this[e],inputContainerGetter:()=>this.inputContainerRef,touchableAreaGetter:()=>[this.inputRef]}),this.changeEventEmitter=y(U,j),this.userChangeEventEmitter=y(U,z),this.dropdownEventPrevent=new R([j,z],(()=>this.host),{customPreventHandle:e=>{e.stopPropagation()}}),this.vegaComponentUsageRuntimeMetricsSlimmer=new u,this.labelClickPending=!1,this.isUserInteraction=!1,this.groupDisabled=!1,this.showError=!1,this.identifier="",this.value=""!==this.identifier&&"",this.checked=!1,this.indeterminate=!1,this.disabled=!1,this.size="default",this.required=!1,this.isValid=null,this.onCheckBoxChange=e=>{this.indeterminate&&(this.indeterminate=!1),this.isUserInteraction=!0,this.checked=e.currentTarget.checked,this.isUserInteraction=!1},this.onInputKeyDown=e=>{"Enter"===e.key&&(e.preventDefault(),this.isDisabled()||(this.indeterminate&&(this.indeterminate=!1),this.isUserInteraction=!0,this.checked=!this.checked,this.isUserInteraction=!1))},this.onLabelClick=e=>{e.target!==this.inputRef?(this.labelClickPending=!0,setTimeout((()=>{this.labelClickPending=!1}),0)):this.labelClickPending&&(e.stopPropagation(),this.labelClickPending=!1)},this.onSelectedIconClick=e=>{e.stopPropagation()}}watchValueChange(e){this.checked=""!==this.identifier?e===this.identifier:!0===e}watchCheckedChange(){const e=this.isUserInteraction;this.isUserInteraction=!1,this.initValue(),this.changeEventEmitter.emit(this.value),e&&(this.userChangeEventEmitter.emit(this.value),s.notify(h,{host:this.host,detail:this.value})),s.notify(c,{host:this.host,detail:this.value}),s.notify(l,{host:this.host,detail:this.value})}disconnectedCallback(){this.unRegisterGroupDisabledObserver()}componentWillLoad(){!this.checked&&(""!==this.identifier?this.value===this.identifier:!0===this.value||"true"===this.value)&&(this.checked=!0),this.initValue(),this.initAndRegisterGroupDisabledObserver()}componentShouldUpdate(e,i,t){return"checked"!==t||e!==i}componentDidRender(){""===this.host.innerHTML.trim()&&this.labelElement.classList.add("vega-hidden"),this.syncNativeIndeterminate()}async setValue(e){this.checked=this.identifier?e===this.identifier:!0===e}render(){var e;const i="VEGA-CHECKBOX-GROUP"==(null===(e=this.host.parentElement)||void 0===e?void 0:e.nodeName);return r(t(a,{class:{"vega-flex-shrink-0 v-min-w-min":i,checked:this.checked,indeterminate:this.indeterminate,disabled:this.isDisabled()}},t("label",{class:x(["vega-checkbox-container",this.showError&&"error",this.size&&`size-${this.size}`]),ref:e=>this.inputContainerRef=e,onClick:this.onLabelClick},t("input",{ref:e=>this.inputRef=e,type:"checkbox",checked:this.checked,value:this.identifier,onChange:this.onCheckBoxChange,"aria-label":this.identifier||"No label defined","aria-checked":this.indeterminate?"mixed":void 0,disabled:this.isDisabled(),tabIndex:0,onKeyDown:this.onInputKeyDown}),t("span",{class:"vega-checkbox-icon",onClick:this.onSelectedIconClick,tabIndex:-1,"aria-hidden":"true"},this.renderIconDom()),t("div",{class:"vega-checkbox-label-container",ref:e=>this.labelElement=e},this.renderLabelDom(),this.renderRequireDom()))),this.host)}renderIconDom(){return this.indeterminate?t("vega-icon",{icon:"minus-sign",size:"small"===this.size?"size-12":"size-16"}):this.checked?t("vega-icon",{icon:"checkmark",size:"small"===this.size?"size-12":"size-16"}):null}renderLabelDom(){return t("span",{class:"vega-checkbox-label"},t("slot",null))}renderRequireDom(){return t("span",{class:{"vega-require":this.required}},this.required?"*":"")}initValue(){this.value=""!==this.identifier?this.checked?this.identifier:"":this.checked}syncNativeIndeterminate(){this.inputRef&&(this.inputRef.indeterminate=this.indeterminate)}isDisabled(){return this.disabled||this.groupDisabled}canAcceptGroupDisabledObserver(e){return g(this.host,"vega-checkbox-group")===e.host}groupDisabledObserverListener(e){this.groupDisabled=e.host.disabled}initAndRegisterGroupDisabledObserver(){g(this.host,"vega-checkbox-group")&&(this.groupDisabledObserver=new p(this.canAcceptGroupDisabledObserver.bind(this),this.groupDisabledObserverListener.bind(this)),s.register(d,this.groupDisabledObserver))}unRegisterGroupDisabledObserver(){this.groupDisabledObserver&&s.unregister(d,this.groupDisabledObserver)}get host(){return n(this)}static get watchers(){return{value:["watchValueChange"],checked:["watchCheckedChange"]}}};P([k()],U.prototype,"globalSlimmers",void 0),P([m()],U.prototype,"vegaCheckboxShowErrorController",void 0),P([m()],U.prototype,"ariaAttributesValueMapper",void 0),P([m()],U.prototype,"formFieldController",void 0),P([m()],U.prototype,"changeEventEmitter",void 0),P([m()],U.prototype,"userChangeEventEmitter",void 0),P([m()],U.prototype,"dropdownEventPrevent",void 0),P([m()],U.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),U.style=':host{display:inline-block;vertical-align:middle}.vega-checkbox-container{position:relative;display:flex;-webkit-tap-highlight-color:transparent}.vega-checkbox-container>input[type=checkbox]{position:absolute;left:0px;top:0px;opacity:0;width:24px;height:24px;padding:0px;margin:0px}.vega-checkbox-container>.vega-checkbox-icon{display:inline-block;box-sizing:border-box;width:24px;height:24px;border-style:solid;border-width:2px;border-color:rgba(var(--v-border-color-action-active, 29, 65, 195, 1));position:relative;left:0px;background-color:rgba(var(--v-bg-primary, 252, 252, 252, 1));border:1px solid rgba(var(--v-border-input-field, 171, 198, 216, 1));border-radius:4px;min-width:24px;color:rgba(var(--v-text-inverted-primary, 252, 252, 252, 1))}.vega-checkbox-container>.vega-checkbox-icon:hover{border:1px solid rgba(var(--v-border-input-field-hover, 115, 160, 190, 1))}:host(.checked) .vega-checkbox-container>.vega-checkbox-icon,:host(.indeterminate) .vega-checkbox-container>.vega-checkbox-icon{background-color:rgba(var(--v-bg-action, 19, 98, 226, 1));display:inline-flex;align-items:center;justify-content:center}:host(.checked) .vega-checkbox-container>.vega-checkbox-icon:hover,:host(.indeterminate) .vega-checkbox-container>.vega-checkbox-icon:hover{background-color:rgba(var(--v-bg-action-hover, 4, 112, 236, 1))}.vega-checkbox-container>input[type=checkbox]:focus-visible+.vega-checkbox-icon{outline:2px solid rgba(var(--v-border-color-action, 19, 98, 226, 1));outline-offset:3px}.vega-checkbox-container>.vega-checkbox-icon:active{border-width:1px;border-style:solid;border-color:rgba(var(--v-border-color-action-active, 29, 65, 195, 1))}:host(.checked) .vega-checkbox-container>.vega-checkbox-icon:active,:host(.indeterminate) .vega-checkbox-container>.vega-checkbox-icon:active{background-color:rgba(var(--v-bg-action-active, 29, 65, 195, 1))}:host(.disabled) .vega-checkbox-container{cursor:not-allowed}:host(:not(.disabled)) .vega-checkbox-container{cursor:pointer}.vega-checkbox-container .vega-require{color:rgba(var(--v-text-error, 189, 41, 71, 1));margin-left:4px;vertical-align:middle}.vega-checkbox-container.error>.vega-checkbox-icon{background-color:rgba(var(--v-bg-primary, 252, 252, 252, 1));border:1px solid rgba(var(--v-border-input-field-danger, 230, 50, 87, 1))}:host(.checked) .vega-checkbox-container.error>.vega-checkbox-icon,:host(.indeterminate) .vega-checkbox-container.error>.vega-checkbox-icon{background-color:rgba(var(--v-bg-danger, 189, 41, 71, 1))}.vega-checkbox-container.error>.vega-checkbox-icon:hover{border:1px solid rgba(var(--v-border-input-field-danger-hover, 255, 87, 114, 1))}:host(.checked) .vega-checkbox-container.error>.vega-checkbox-icon:hover,:host(.indeterminate) .vega-checkbox-container.error>.vega-checkbox-icon:hover{background-color:rgba(var(--v-bg-danger-hover, 233, 71, 104, 1))}.vega-checkbox-container.error>input[type=checkbox]:focus-visible+.vega-checkbox-icon{outline:2px solid rgba(var(--v-border-color-danger, 230, 50, 87, 1));outline-offset:3px}:host(.checked) .vega-checkbox-container.error>.vega-checkbox-icon:active,:host(.indeterminate) .vega-checkbox-container.error>.vega-checkbox-icon:active{background-color:rgba(var(--v-bg-danger-active, 230, 50, 87, 1))}.vega-checkbox-container.error>.vega-checkbox-icon:active{border-width:1px;border-style:solid;border-color:rgba(var(--v-border-color-danger-active, 189, 41, 71, 1))}:host(.disabled) .vega-checkbox-container>.vega-checkbox-icon{background-color:rgba(var(--v-bg-secondary, 245, 247, 247, 1));border:1px solid rgba(var(--v-border-input-field-disabled, 222, 225, 227, 1))}:host(.checked.disabled) .vega-checkbox-container>.vega-checkbox-icon,:host(.indeterminate.disabled) .vega-checkbox-container>.vega-checkbox-icon{background-color:rgba(var(--v-bg-disabled, 176, 180, 181, 1));border:1px solid rgba(var(--v-border-input-field-disabled, 222, 225, 227, 1))}:host(.checked.disabled) .vega-checkbox-container>.vega-checkbox-icon>vega-icon,:host(.indeterminate.disabled) .vega-checkbox-container>.vega-checkbox-icon>vega-icon{color:rgba(var(--v-text-inverted-primary, 252, 252, 252, 1))}.vega-checkbox-container>.vega-checkbox-label-container{display:inline-block;margin-left:12px;color:rgba(var(--v-text-primary, 32, 54, 69, 1));font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}@media screen and (min-width: 768px) and (max-width: 1023px){.vega-checkbox-container>.vega-checkbox-label-container{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-checkbox-container>.vega-checkbox-label-container{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-checkbox-container>.vega-checkbox-label-container{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}:host(.disabled) .vega-checkbox-container>.vega-checkbox-label-container{color:rgba(var(--v-text-disabled, 176, 180, 181, 1))}.vega-error{display:block;margin-top:12px;font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px;color:rgba(var(--v-text-error, 189, 41, 71, 1))}@media screen and (min-width: 768px) and (max-width: 1023px){.vega-error{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.vega-error{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.vega-error{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}.vega-checkbox-label-container.vega-hidden{display:none}.vega-hidden{display:none}.size-default input[type=checkbox]{width:24px;height:24px}.size-default .vega-checkbox-icon{width:24px;height:24px;min-width:24px;border-radius:4px}.size-default .vega-checkbox-label-container{margin-left:12px;font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}@media screen and (min-width: 768px) and (max-width: 1023px){.size-default .vega-checkbox-label-container{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){.size-default .vega-checkbox-label-container{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){.size-default .vega-checkbox-label-container{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}.size-small input[type=checkbox]{width:16px;height:16px}.size-small .vega-checkbox-icon{width:16px;height:16px;min-width:16px;border-radius:2px}.size-small .vega-checkbox-label-container{margin-left:8px;font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px}@media screen and (min-width: 768px) and (max-width: 1023px){.size-small .vega-checkbox-label-container{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.size-small .vega-checkbox-label-container{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.size-small .vega-checkbox-label-container{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px}}';var q=function(e,i,t,a){var n,r=arguments.length,o=r<3?i:null===a?a=Object.getOwnPropertyDescriptor(i,t):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,i,t,a);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(o=(r<3?n(o):r>3?n(i,t,o):n(i,t))||o);return r>3&&o&&Object.defineProperty(i,t,o),o};const S=class{constructor(t){e(this,t),this.vegaChange=i(this,"vegaChange",7),this.vegaUserChange=i(this,"vegaUserChange",7),this.userChange=i(this,"userChange",7),this.change=i(this,"change",7),this.globalSlimmers={},this.formFieldController=new w({propertyRules:[{propertyName:"required",ruleFactory:e=>e?new O:null}],defaultValue:[],validationRulesName:"validationRules",attributeGetter:e=>this[e],inputContainerGetter:()=>this.inputContainerRef,touchableAreaGetter:()=>this.touchableAreaGetter()}),this.checkboxValueChangeObserver=new D(c,(e=>this.childCheckboxValueChange(e))),this.checkboxUserInteractionObserver=new D(h,(()=>{this.userInteractionPending=!0})),this.checkboxEventPrevent=new R([j,z],(()=>this.vegaFlexElement)),this.changeEventEmitter=y(S,j),this.userChangeEventEmitter=y(S,z),this.vegaComponentUsageRuntimeMetricsSlimmer=new u,this.userInteractionPending=!1,this.label="",this.value=[],this.vegaFlexProp={},this.disabled=!1,this.required=!1,this.optional=!1,this.hint="",this.isValid=null,this.autoValidation=!0,this.validationRules=[],this.childCheckboxValueChange=e=>{this.syncCheckboxItemsValue(e.detail,e.host.identifier)},this.touchableAreaGetter=()=>{const e=[];return this.vegaCheckboxArray&&this.vegaCheckboxArray.forEach((async i=>{e.push(i.shadowRoot.querySelector("input"))})),e}}async watchValue(e,i){const t=this.userInteractionPending;this.userInteractionPending=!1,F(e,i,!0)||(this.initCheckboxArray(),this.changeEventEmitter.emit(this.value),t&&this.userChangeEventEmitter.emit(this.value),s.notify(l,{host:this.host,detail:this.value}))}watchVegaFlexProp(){this.setVegaFlexProperty()}async watchDisabled(){this.notifyGroupDisabledChange()}watchValidationRules(){}componentDidLoad(){this.setVegaFlexProperty(),this.initCheckboxArray(),this.notifyGroupDisabledChange()}componentShouldUpdate(e,i,t){return!("value"===t&&Array.isArray(e)&&Array.isArray(i)&&F(e,i,!0))}render(){return r(t(a,null,this.renderLabelDom(),t("div",{class:"vega-checkbox-group-container",ref:e=>this.inputContainerRef=e},t("vega-flex",{ref:e=>{this.vegaFlexElement=e}},t("slot",null))),this.renderHintDom()),this.host)}renderLabelDom(){return this.label&&t("vega-field-label",{label:this.label,isFieldRequired:this.required,optional:this.optional,disabled:this.disabled})}renderHintDom(){return this.hint&&t("div",{class:"vega-hint"},t("label",null,this.hint))}setVegaFlexProperty(){this.vegaFlexProp&&Object.assign(this.vegaFlexElement,{gap:"size-16",direction:"col"},this.vegaFlexProp)}syncCheckboxItemsValue(e,i){e&&!this.value.includes(i)?this.value=[...this.value,i]:!e&&this.value.includes(i)&&(this.value=[...this.value.filter((e=>e!==i))])}initCheckboxArray(){this.vegaCheckboxArray=Array.from(this.host.querySelectorAll("vega-checkbox")),this.vegaCheckboxArray.forEach((e=>{e.checked=!!(this.value&&this.value.length>0)&&this.value.includes(e.identifier)}))}notifyGroupDisabledChange(){s.notify(d,{host:this.host})}get host(){return n(this)}static get watchers(){return{value:["watchValue"],vegaFlexProp:["watchVegaFlexProp"],disabled:["watchDisabled"],validationRules:["watchValidationRules"]}}};q([k()],S.prototype,"globalSlimmers",void 0),q([m()],S.prototype,"formFieldController",void 0),q([m()],S.prototype,"checkboxValueChangeObserver",void 0),q([m()],S.prototype,"checkboxUserInteractionObserver",void 0),q([m()],S.prototype,"checkboxEventPrevent",void 0),q([m()],S.prototype,"changeEventEmitter",void 0),q([m()],S.prototype,"userChangeEventEmitter",void 0),q([m()],S.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),q([E()],S.prototype,"watchVegaFlexProp",null),S.style=':host{display:block;text-align:left;line-height:normal}.vega-error{display:block;margin-top:12px;font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px;color:rgba(var(--v-text-error, 189, 41, 71, 1))}@media screen and (min-width: 768px) and (max-width: 1023px){.vega-error{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.vega-error{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.vega-error{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}.vega-hidden{display:none}vega-field-label{margin-bottom:16px;display:block}vega-field-label::part(container){font-family:"Inter", sans-serif;font-size:18px;font-weight:500;line-height:30px;letter-spacing:0px}@media screen and (min-width: 768px) and (max-width: 1023px){vega-field-label::part(container){font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:28px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){vega-field-label::part(container){font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:28px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){vega-field-label::part(container){font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:28px;letter-spacing:0px}}vega-field-label::part(label){word-break:normal}.vega-hint{padding-top:12px}.vega-hint>label{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px;color:rgba(var(--v-text-secondary, 107, 116, 125, 1))}@media screen and (min-width: 768px) and (max-width: 1023px){.vega-hint>label{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.vega-hint>label{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.vega-hint>label{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}';export{U as vega_checkbox,S as vega_checkbox_group}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{h as e,r as t,c as r,H as i,g as s}from"./p-6b2342e0.js";import{s as o}from"./p-519a7d55.js";import{c as a,M as n,V as l,I as c}from"./p-6e1ab235.js";import{V as p,I as h}from"./p-8ce9e214.js";import{c as d}from"./p-
|
|
1
|
+
import{h as e,r as t,c as r,H as i,g as s}from"./p-6b2342e0.js";import{s as o}from"./p-519a7d55.js";import{c as a,M as n,V as l,I as c}from"./p-6e1ab235.js";import{V as p,I as h}from"./p-8ce9e214.js";import{c as d}from"./p-66647244.js";import{d as u,a as f}from"./p-5447a8e8.js";import{D as v}from"./p-526e3634.js";import{K as m}from"./p-f1974321.js";import{T as b}from"./p-6cde45fc.js";import"./p-6a334573.js";import"./p-2d0d575f.js";import"./p-8c30a60d.js";import"./p-b75ee3ba.js";import"./p-331a62d5.js";import"./p-528748fa.js";import"./p-75e33859.js";import"./p-8db904dc.js";import"./p-ed45b3b6.js";import"./p-d4ea8e22.js";import"./p-b438e68b.js";import"./p-0d18368b.js";import"./p-cb378636.js";var g=function(e,t,r,i){var s,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,i);else for(var n=e.length-1;n>=0;n--)(s=e[n])&&(a=(o<3?s(a):o>3?s(t,r,a):s(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a};class _ extends l{constructor(){super(...arguments),this.gridRef=null,this.selectRef=null,this.preventLostFocus=e=>{e.preventDefault()},this.handleCellMouseEnter=e=>{var t;const r=Number(e.currentTarget.dataset.index);this.hoveredItem=null!==(t=this.getActiveCharacters()[r])&&void 0!==t?t:null},this.handleCellMouseLeave=()=>{this.hoveredItem=null},this.handleCellFocus=e=>{const t=Number(e.currentTarget.dataset.index);Number.isFinite(t)&&(this.focusedCellIndex=t)},this.handleCellClick=e=>{const t=Number(e.currentTarget.dataset.index),r=this.getActiveCharacters()[t];r&&(this.focusedCellIndex=t,this.clickEventEmitter.emit(r.character))}}resetPanel(){this.activeCategoryKey="__all__",this.hoveredItem=null,this.focusedCellIndex=null,this.focusSelect()}getGridRef(){return this.gridRef}getCellCount(){return this.getActiveCharacters().length}getActiveCellIndex(){var e;return null!==(e=this.focusedCellIndex)&&void 0!==e?e:0}focusCellByIndex(e){if(this.focusedCellIndex=e,this.gridRef){const t=this.gridRef.querySelector(`[data-index="${e}"]`);t&&t.focus()}}render(){return e("div",{class:"panel",role:"presentation",onMouseDown:this.preventLostFocus},this.renderHeader(),e("vega-divider",{direction:"horizontal"}),e("div",{class:"panel__body"},this.renderCategorySelect(),this.renderCharacterGrid()),e("vega-divider",{direction:"horizontal"}),this.renderFooter())}focusSelect(){if(this.selectRef&&this.selectRef.shadowRoot){const e=this.selectRef.shadowRoot.querySelector('[tabindex="0"], button');e&&e.focus()}}renderHeader(){return e("div",{class:"panel__header"},e("vega-font",null,this.translationSlimmer.t("Special Characters")))}renderCategorySelect(){const t={id:"__all__",displayName:this.translationSlimmer.t("All")};return e("vega-input-select",{class:"panel__select",size:"small",source:[t,...this.categories.map((e=>({id:e.key,displayName:this.translationSlimmer.t(e.label)})))],value:this.activeCategoryKey,ref:e=>{e&&(this.selectRef=e,v.addUniqueObserverToNode(e,u,(e=>{this.activeCategoryKey=e.detail,this.hoveredItem=null,this.focusedCellIndex=null})))}})}renderCharacterGrid(){var t;const r=this.getActiveCharacters(),i=null!==(t=this.focusedCellIndex)&&void 0!==t?t:0;return e("div",{class:"panel__grid",role:"grid","aria-label":this.translationSlimmer.t("Special Characters"),style:{"--vega-special-characters-grid-columns":String(10)},ref:e=>{this.gridRef=e}},r.map(((t,r)=>{const s=r===i,o=this.translationSlimmer.t(t.title);return e("button",{key:t.character,class:"panel__cell",role:"gridcell","aria-label":o,title:o,"data-index":r,tabindex:s?0:-1,onMouseEnter:this.handleCellMouseEnter,onMouseLeave:this.handleCellMouseLeave,onFocus:this.handleCellFocus,onClick:this.handleCellClick},t.character)})))}renderFooter(){var t;const r=null!==this.focusedCellIndex?this.getActiveCharacters()[this.focusedCellIndex]:null,i=null!==(t=this.hoveredItem)&&void 0!==t?t:r,s=i?this.getCodePoint(i.character):"",o=i?this.translationSlimmer.t(i.title):"";return e("div",{class:"panel__footer"},e("vega-font",{class:"panel__footer-name",variant:"font-footnote1-long",color:"text-secondary"},o),e("vega-font",{class:"panel__footer-code",variant:"font-footnote1-long",color:"text-secondary"},s))}getCodePoint(e){const t=e.codePointAt(0);return void 0===t?"":`U+${t.toString(16).toUpperCase().padStart(4,"0")}`}getActiveCharacters(){if("__all__"===this.activeCategoryKey)return this.categories.flatMap((e=>e.characters));const e=this.categories.find((e=>e.key===this.activeCategoryKey));return e?e.characters:[]}}g([a()],_.prototype,"categories",void 0),g([a()],_.prototype,"clickEventEmitter",void 0),g([a()],_.prototype,"translationSlimmer",void 0),g([a({writable:!0})],_.prototype,"activeCategoryKey",void 0),g([a({writable:!0})],_.prototype,"hoveredItem",void 0),g([a({writable:!0})],_.prototype,"focusedCellIndex",void 0),g([n("resetPanel")],_.prototype,"resetPanel",null);class x extends m{constructor(){super((()=>[{keyCode:["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],eventName:"keydown",activeElementInScope:()=>[this.renderer.getGridRef()],preventDefault:!0,callback:e=>{this.handleNavigation(e)}}]))}handleNavigation(e){const t=this.renderer,r=t.getCellCount();if(0===r)return;const i=Math.min(Math.max(t.getActiveCellIndex(),0),r-1),s=Math.floor(i/10),o=i%10,a=Math.floor((r-1)/10),n=e=>e===a?(r-1)%10:9;let l=i;switch(e.code){case"ArrowLeft":o>0&&(l=i-1);break;case"ArrowRight":o<n(s)&&(l=i+1);break;case"ArrowUp":s>0&&(l=i-10);break;case"ArrowDown":if(s<a){const e=i+10;l=e<r?e:10*a+n(a)}}l!==i&&t.focusCellByIndex(l)}}!function(e,t,r,i){var s,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,i);else for(var n=e.length-1;n>=0;n--)(s=e[n])&&(a=(o<3?s(a):o>3?s(t,r,a):s(t,r))||a);o>3&&a&&Object.defineProperty(t,r,a)}([a()],x.prototype,"renderer",void 0);var j=function(e,t,r,i){var s,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,i);else for(var n=e.length-1;n>=0;n--)(s=e[n])&&(a=(o<3?s(a):o>3?s(t,r,a):s(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a};const y=class{constructor(e){t(this,e),this.vegaClick=r(this,"vegaClick",7),this.click=r(this,"click",7),this.globalSlimmers={},this.vegaComponentUsageRuntimeMetricsSlimmer=new p,this.translationSlimmer=new b,this.clickEventEmitter=d(y,f),this.renderer=new _,this.keyboardController=new x,this.activeCategoryKey="__all__",this.hoveredItem=null,this.focusedCellIndex=null,this.categories=[]}async resetPanel(){}render(){return o(e(i,null,this.renderer.render()),this.host)}get host(){return s(this)}};j([h()],y.prototype,"globalSlimmers",void 0),j([c()],y.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),j([c()],y.prototype,"translationSlimmer",void 0),j([c()],y.prototype,"clickEventEmitter",void 0),j([c()],y.prototype,"renderer",void 0),j([c()],y.prototype,"keyboardController",void 0),y.style=':host .panel{box-sizing:border-box;width:320px}:host .panel__header{display:flex;align-items:center;justify-content:space-between;padding-bottom:12px}:host .panel__body{padding-top:12px;padding-bottom:12px}:host .panel__select{margin-bottom:8px}:host .panel__grid{display:grid;gap:2px;overflow-y:auto;grid-template-columns:repeat(var(--vega-special-characters-grid-columns), 1fr);max-height:240px}:host .panel__cell{display:flex;align-items:center;justify-content:center;color:rgba(var(--v-text-primary, 32, 54, 69, 1));border-radius:4px;cursor:pointer;border:none;width:28px;height:28px;background:transparent;font-family:"Inter";font-size:16px;line-height:1}:host .panel__cell:hover{background-color:rgba(var(--v-bg-quaternary, 241, 248, 251, 1));border:1px solid rgba(var(--v-border-input-field-hover, 115, 160, 190, 1))}:host .panel__cell:active{border:1px solid rgba(var(--v-border-input-field-focus, 19, 98, 226, 1));background-color:rgba(var(--v-bg-quaternary, 241, 248, 251, 1))}:host .panel__cell:focus-visible{outline:2px solid rgba(var(--v-border-color-action, 19, 98, 226, 1));outline-offset:-2px}:host .panel__footer{display:flex;align-items:center;justify-content:space-between;padding-top:8px;min-height:20px}:host .panel__footer-name{text-transform:uppercase}';export{y as vega_rich_text_special_characters_panel}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{h as r,r as e,c as t,H as o,g as s}from"./p-6b2342e0.js";import{V as i,I as a}from"./p-8ce9e214.js";import{c as l,V as c,I as h}from"./p-6e1ab235.js";import{s as d}from"./p-519a7d55.js";import{T as n}from"./p-fb5ea4b2.js";import{c as b}from"./p-3a620268.js";import{i as p}from"./p-
|
|
1
|
+
import{h as r,r as e,c as t,H as o,g as s}from"./p-6b2342e0.js";import{V as i,I as a}from"./p-8ce9e214.js";import{c as l,V as c,I as h}from"./p-6e1ab235.js";import{s as d}from"./p-519a7d55.js";import{T as n}from"./p-fb5ea4b2.js";import{c as b}from"./p-3a620268.js";import{i as p}from"./p-8c30a60d.js";import{c as v}from"./p-66647244.js";import{a as w}from"./p-5447a8e8.js";import{T as m}from"./p-6cde45fc.js";import"./p-6a334573.js";import"./p-2d0d575f.js";import"./p-526e3634.js";import"./p-331a62d5.js";import"./p-528748fa.js";import"./p-b75ee3ba.js";import"./p-0d18368b.js";import"./p-cb378636.js";var f=function(r,e,t,o){var s,i=arguments.length,a=i<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,t):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(r,e,t,o);else for(var l=r.length-1;l>=0;l--)(s=r[l])&&(a=(i<3?s(a):i>3?s(e,t,a):s(e,t))||a);return i>3&&a&&Object.defineProperty(e,t,a),a};class g extends c{constructor(){super(...arguments),this.handleClick=r=>{this.disabled?r.stopPropagation():("vega"!==p.getSemantics(this.host).namespace&&r.stopPropagation(),this.clickEventEmitter.emit())}}render(){const e="clear"===this.variant,t=!e&&!!this.color;return r("div",{class:{"vega-color-swatch-container":!0,[`size-${this.size}`]:!0,[`shape-${this.shape}`]:!0,"swatch-clear":e},role:"button",part:"swatch-container","aria-label":this.getAriaLabel(),"aria-disabled":this.disabled?"true":"false",tabIndex:this.disabled?-1:0,onClick:this.handleClick,onKeyDown:b({composed:!0})},r("div",{class:"swatch",part:"swatch"},t&&r("span",{class:"color-fill",style:this.getFillColorStyles()}),e&&r("span",{class:"clear-line"}),this.selected&&!e&&r("vega-icon",{class:"check-icon",icon:"checkmark",size:"size-16",color:this.getCheckMarkColor()})),this.label&&this.renderLabel())}renderLabel(){return r("vega-font",{class:"swatch-label",variant:"font-field-value",color:this.disabled?"text-disabled":"text-primary"},this.label)}getAriaLabel(){return this.label?this.label:"clear"===this.variant?this.translationSlimmer.t("Clear color"):this.color?this.translationSlimmer.t("Color {0}",this.color):this.translationSlimmer.t("Color swatch")}getFillColorStyles(){const r={};return this.color&&(r.backgroundColor=this.color),r}getCheckMarkColor(){return this.color?new n(this.color).isDark()?"text-white":"text-black":"text-primary"}}f([l()],g.prototype,"host",void 0),f([l()],g.prototype,"variant",void 0),f([l()],g.prototype,"label",void 0),f([l()],g.prototype,"color",void 0),f([l()],g.prototype,"selected",void 0),f([l()],g.prototype,"size",void 0),f([l()],g.prototype,"disabled",void 0),f([l()],g.prototype,"shape",void 0),f([l()],g.prototype,"clickEventEmitter",void 0),f([l()],g.prototype,"translationSlimmer",void 0);var u=function(r,e,t,o){var s,i=arguments.length,a=i<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,t):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(r,e,t,o);else for(var l=r.length-1;l>=0;l--)(s=r[l])&&(a=(i<3?s(a):i>3?s(e,t,a):s(e,t))||a);return i>3&&a&&Object.defineProperty(e,t,a),a};const x=class{constructor(r){e(this,r),this.vegaClick=t(this,"vegaClick",7),this.click=t(this,"click",7),this.globalSlimmers={},this.vegaComponentUsageRuntimeMetricsSlimmer=new i,this.translationSlimmer=new m,this.vegaColorSwatchRenderer=new g,this.clickEventEmitter=v(x,w),this.color="",this.selected=!1,this.label="",this.size="small",this.disabled=!1,this.variant="swatch",this.shape="basket"}render(){return d(r(o,{class:{disabled:this.disabled}},this.vegaColorSwatchRenderer.render()),this.host)}get host(){return s(this)}};u([a()],x.prototype,"globalSlimmers",void 0),u([h()],x.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),u([h()],x.prototype,"translationSlimmer",void 0),u([h()],x.prototype,"vegaColorSwatchRenderer",void 0),u([h()],x.prototype,"clickEventEmitter",void 0),x.style=":host{display:inline-block;vertical-align:middle}.vega-color-swatch-container{display:flex;flex-direction:row;align-items:center;border-radius:4px}.swatch{display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;background-color:rgba(var(--v-bg-primary, 252, 252, 252, 1));position:relative;flex-shrink:0;overflow:hidden}.shape-basket .swatch{border-radius:8px}.shape-block .swatch{border-radius:0px}.check-icon{position:relative;z-index:1}.swatch-clear .swatch{background-color:rgba(var(--v-bg-transparent, 0, 0, 0, 0));border-width:1px;border-style:solid;border-color:rgba(var(--v-border-color-danger, 230, 50, 87, 1))}.swatch-clear .swatch .clear-line{position:absolute;width:141%;height:0;border-top-width:1px;border-left-width:0px;border-bottom-width:0px;border-right-width:0px;border-style:solid;border-color:rgba(var(--v-border-color-danger, 230, 50, 87, 1));transform:rotate(-45deg);transform-origin:center}.color-fill{position:absolute;display:block;top:0;left:0;width:100%;height:100%}.size-extra-small .swatch{width:24px;height:24px;min-width:24px}.size-extra-small.shape-basket .swatch{border-radius:4px}.size-small .swatch{width:40px;height:40px;min-width:40px}.size-small.shape-basket{border-radius:8px}.size-medium .swatch{width:48px;height:48px;min-width:48px}.size-medium.shape-basket{border-radius:8px}@media (hover: hover){:host(:not(.disabled)) .swatch:hover{border:1px solid rgba(var(--v-border-input-field-hover, 115, 160, 190, 1))}:host(:not(.disabled)) .swatch-clear .swatch:hover{border-color:rgba(var(--v-border-color-danger-hover, 255, 87, 114, 1))}:host(:not(.disabled)) .swatch-clear .swatch:hover .clear-line{border-color:rgba(var(--v-border-color-danger-hover, 255, 87, 114, 1))}}.vega-color-swatch-container:focus-visible{outline:2px solid rgba(var(--v-border-color-action, 19, 98, 226, 1));outline-offset:2px}.vega-color-swatch-container:focus-visible .swatch{border-width:1px;border-style:solid;border:1px solid rgba(var(--v-border-input-field-hover, 115, 160, 190, 1))}.vega-color-swatch-container:focus-visible.swatch-clear{outline:2px solid rgba(var(--v-border-color-danger, 230, 50, 87, 1));outline-offset:2px}.vega-color-swatch-container:focus-visible.swatch-clear .swatch{border-color:rgba(var(--v-border-color-danger-hover, 255, 87, 114, 1))}.vega-color-swatch-container:focus-visible.swatch-clear .swatch .clear-line{border-color:rgba(var(--v-border-color-danger-hover, 255, 87, 114, 1))}:host(:not(.disabled)) .vega-color-swatch-container{cursor:pointer}:host(.disabled) .vega-color-swatch-container{cursor:not-allowed}:host(.disabled) .swatch{border-color:rgba(var(--v-border-color-input-field-disabled, 222, 225, 227, 1));pointer-events:none}:host(.disabled) .swatch .color-fill,:host(.disabled) .swatch .check-icon{opacity:0.5}:host(.disabled) .swatch .label-container{color:rgba(var(--v-text-disabled, 176, 180, 181, 1))}:host(.disabled) .swatch .clear-line{border-color:rgba(var(--v-border-color-input-field-disabled, 222, 225, 227, 1))}.swatch-label{margin-left:8px}";export{x as vega_color_swatch}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{h as t,r as e,H as i,g as o}from"./p-6b2342e0.js";import{c as r,V as s,I as
|
|
1
|
+
import{h as t,r as e,H as i,g as o}from"./p-6b2342e0.js";import{c as r,V as s,I as a}from"./p-6e1ab235.js";import{V as n,I as l}from"./p-8ce9e214.js";import{s as c}from"./p-519a7d55.js";import{D as f,d as p}from"./p-526e3634.js";import{G as h,M as v,a as m,d}from"./p-5447a8e8.js";import{n as u,c as g}from"./p-262ec334.js";import{f as b}from"./p-528748fa.js";import{C as j}from"./p-2d0d575f.js";import{v as y}from"./p-3a68b729.js";import{C as x}from"./p-2c737fc8.js";import"./p-331a62d5.js";import"./p-8c30a60d.js";import"./p-5f377954.js";import"./p-87a4d75f.js";import"./p-982747ef.js";var R=function(t,e,i,o){var r,s=arguments.length,a=s<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,o);else for(var n=t.length-1;n>=0;n--)(r=t[n])&&(a=(s<3?r(a):s>3?r(e,i,a):r(e,i))||a);return s>3&&a&&Object.defineProperty(e,i,a),a};class C extends s{constructor(){super(...arguments),this.handleChange=()=>{if(this.inputRef.value){const t=u(g(this.inputRef.value,1),1,this.pageCount);this.inputRef.value=t.toString(),this.prevAndNextButtonRenderer.notifyParentPagination(t.toString())}}}render(){return"pageSelectorMobile"===this.type?this.renderPageSelectorMobile():this.renderPageSelectorMobileAndGoTo()}renderPageSelectorMobile(){return t("vega-flex",{alignItems:"center",justifyContent:"center",gap:"size-8"},this.prevAndNextButtonRenderer.render("prev"),t("vega-font",{variant:"font-field-label",color:"text-primary"},this.current.toString()),t("vega-font",{variant:"font-field-label",color:"text-primary"},"/"),t("vega-font",{variant:"font-field-label",color:"text-primary"},this.pageCount.toString()),this.prevAndNextButtonRenderer.render("next"))}renderPageSelectorMobileAndGoTo(){return t("vega-flex",{alignItems:"center",justifyContent:"center",gap:"size-8"},this.prevAndNextButtonRenderer.render("prev"),t("vega-form",{ref:t=>{f.addUniqueObserverToNode(t,h,this.handleChange)}},t("vega-input",{"data-vega-form":"pageSelectorMobile_goTo",size:"small",autocomplete:"on",showClearIcon:!1,style:{width:"54px"},maskConfig:{type:"number",options:{allowNegative:!1,precision:0}},value:this.current.toString(),ref:t=>{this.inputRef=t,f.addUniqueObserverToNode(t,v,this.handleChange)}})),t("vega-font",{variant:"font-field-label",color:"text-primary"},"/"),t("vega-font",{variant:"font-field-label",color:"text-primary"},this.pageCount.toString()),this.prevAndNextButtonRenderer.render("next"))}}R([r()],C.prototype,"host",void 0),R([r()],C.prototype,"type",void 0),R([r()],C.prototype,"current",void 0),R([r()],C.prototype,"pageCount",void 0),R([r()],C.prototype,"prevAndNextButtonRenderer",void 0);var w=function(t,e,i,o){var r,s=arguments.length,a=s<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,o);else for(var n=t.length-1;n>=0;n--)(r=t[n])&&(a=(s<3?r(a):s>3?r(e,i,a):r(e,i))||a);return s>3&&a&&Object.defineProperty(e,i,a),a};class M extends s{constructor(){super(...arguments),this.pagerButton=(e,i,o)=>t("vega-button-circle",{variant:"icon-only",icon:e,iconColor:"text-link",size:"small",disabled:i,ref:t=>{f.addUniqueObserverToNode(t,m,o)}}),this.renderPrevButton=()=>this.pagerButton("chevron-left",0===this.total||1===this.current,(()=>{this.notifyParentPagination((this.current-1).toString())})),this.renderNextButton=()=>this.pagerButton("chevron-right",0===this.total||this.current===this.pageCount,(()=>{this.notifyParentPagination((this.current+1).toString())}))}notifyParentPagination(t){const e=b(this.host,"vega-pagination");e&&j.notify(p.getSubject(e,y),{host:this.host,detail:t})}render(t){return"prev"===t?this.renderPrevButton():this.renderNextButton()}}w([r()],M.prototype,"host",void 0),w([r()],M.prototype,"current",void 0),w([r()],M.prototype,"total",void 0),w([r()],M.prototype,"pageCount",void 0);var S=function(t,e,i,o){var r,s=arguments.length,a=s<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,o);else for(var n=t.length-1;n>=0;n--)(r=t[n])&&(a=(s<3?r(a):s>3?r(e,i,a):r(e,i))||a);return s>3&&a&&Object.defineProperty(e,i,a),a};const O=class{constructor(t){e(this,t),this.globalSlimmers={},this.vegaComponentUsageRuntimeMetricsSlimmer=new n,this.childEventPrevent=new x([d],(()=>this.host)),this.pageSelectorMobileRenderer=new C,this.prevAndNextButtonRenderer=new M,this.pageCount=0,this.current=1,this.total=0}render(){return c(t(i,null,this.pageSelectorMobileRenderer.render()),this.host)}get host(){return o(this)}};S([l()],O.prototype,"globalSlimmers",void 0),S([a()],O.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),S([a()],O.prototype,"childEventPrevent",void 0),S([a()],O.prototype,"pageSelectorMobileRenderer",void 0),S([a()],O.prototype,"prevAndNextButtonRenderer",void 0),O.style=":host{display:inline-block}";export{O as vega_pagination_page_selector_mobile}
|