@esri/solutions-components 0.6.12 → 0.6.13
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/assets/t9n/layer-table/resources.json +4 -3
- package/dist/assets/t9n/layer-table/resources_en.json +4 -3
- package/dist/cjs/calcite-shell-panel_14.cjs.entry.js +2 -1
- package/dist/cjs/card-manager_3.cjs.entry.js +60 -28
- package/dist/cjs/clean-url-d5326abb.js +573 -0
- package/dist/cjs/crowdsource-manager.cjs.entry.js +5 -3
- package/dist/cjs/{downloadUtils-43f5be48.js → downloadUtils-fb4744e0.js} +296 -51
- package/dist/cjs/edit-card_2.cjs.entry.js +3 -3
- package/dist/cjs/{index.es-8da43c21.js → index.es-372e33de.js} +2 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/map-select-tools_3.cjs.entry.js +8 -5
- package/dist/cjs/public-notification.cjs.entry.js +5 -4
- package/dist/cjs/solution-configuration.cjs.entry.js +44 -43
- package/dist/cjs/solution-contents_3.cjs.entry.js +2 -1
- package/dist/cjs/{solution-store-3cd104d8.js → solution-store-c443e657.js} +7 -572
- package/dist/cjs/solutions-components.cjs.js +1 -1
- package/dist/collection/components/card-manager/card-manager.css +0 -5
- package/dist/collection/components/card-manager/card-manager.js +1 -1
- package/dist/collection/components/crowdsource-manager/crowdsource-manager.css +2 -2
- package/dist/collection/components/crowdsource-manager/crowdsource-manager.js +40 -2
- package/dist/collection/components/edit-card/edit-card.css +8 -0
- package/dist/collection/components/info-card/info-card.css +14 -14
- package/dist/collection/components/info-card/info-card.js +1 -1
- package/dist/collection/components/layer-table/layer-table.css +12 -0
- package/dist/collection/components/layer-table/layer-table.js +90 -24
- package/dist/collection/components/pdf-download/pdf-download.js +34 -6
- package/dist/collection/components/public-notification/public-notification.js +3 -3
- package/dist/collection/utils/downloadUtils.js +208 -82
- package/dist/collection/utils/downloadUtils.ts +257 -85
- package/dist/collection/utils/test/downloadUtils.spec.js +163 -134
- package/dist/collection/utils/test/downloadUtils.spec.tsx +2 -0
- package/dist/components/calcite-modal.js +1 -409
- package/dist/components/card-manager2.js +2 -2
- package/dist/components/clean-url.js +567 -0
- package/dist/components/crowdsource-manager.js +16 -12
- package/dist/components/downloadUtils.js +295 -50
- package/dist/components/edit-card2.js +1 -1
- package/dist/components/info-card2.js +2 -2
- package/dist/components/layer-table2.js +65 -31
- package/dist/components/modal.js +416 -0
- package/dist/components/pdf-download2.js +6 -4
- package/dist/components/public-notification.js +3 -3
- package/dist/components/solution-configuration.js +25 -24
- package/dist/components/solution-store.js +2 -562
- package/dist/esm/{ExpandToggle-86761b28.js → ExpandToggle-e614e3e4.js} +1 -1
- package/dist/esm/{ar-4a5375c6.js → ar-2f678abc.js} +8 -8
- package/dist/esm/{bg-b25e4b7a.js → bg-e514c4d7.js} +8 -8
- package/dist/esm/{bs-2485dfed.js → bs-81584b09.js} +8 -8
- package/dist/esm/buffer-tools_4.entry.js +4 -4
- package/dist/esm/{ca-bba36d26.js → ca-e8c40e21.js} +8 -8
- package/dist/esm/calcite-accordion-item.entry.js +1 -1
- package/dist/esm/calcite-action-bar_3.entry.js +5 -5
- package/dist/esm/calcite-action-group_2.entry.js +3 -3
- package/dist/esm/calcite-action-pad.entry.js +4 -4
- package/dist/esm/calcite-action_2.entry.js +5 -5
- package/dist/esm/calcite-alert.entry.js +3 -3
- package/dist/esm/calcite-avatar.entry.js +1 -1
- package/dist/esm/calcite-block-section.entry.js +3 -3
- package/dist/esm/calcite-block.entry.js +3 -3
- package/dist/esm/calcite-button.entry.js +5 -5
- package/dist/esm/calcite-card.entry.js +3 -3
- package/dist/esm/calcite-checkbox.entry.js +3 -3
- package/dist/esm/calcite-chip-group.entry.js +1 -1
- package/dist/esm/calcite-chip.entry.js +3 -3
- package/dist/esm/calcite-color-picker-hex-input_2.entry.js +1 -1
- package/dist/esm/calcite-color-picker.entry.js +3 -3
- package/dist/esm/calcite-combobox-item-group.entry.js +2 -2
- package/dist/esm/calcite-combobox_6.entry.js +7 -7
- package/dist/esm/calcite-date-picker-day_3.entry.js +3 -3
- package/dist/esm/calcite-date-picker.entry.js +5 -5
- package/dist/esm/calcite-fab.entry.js +1 -1
- package/dist/esm/calcite-filter_3.entry.js +3 -3
- package/dist/esm/calcite-flow-item.entry.js +3 -3
- package/dist/esm/calcite-icon.entry.js +1 -1
- package/dist/esm/calcite-inline-editable.entry.js +4 -4
- package/dist/esm/calcite-input-date-picker.entry.js +9 -9
- package/dist/esm/calcite-input-number_2.entry.js +5 -5
- package/dist/esm/{calcite-input-time-picker-7da2e80a.js → calcite-input-time-picker-fe6e499a.js} +55 -55
- package/dist/esm/calcite-input-time-picker.entry.js +8 -8
- package/dist/esm/calcite-input-time-zone.entry.js +5 -5
- package/dist/esm/calcite-input_2.entry.js +5 -5
- package/dist/esm/calcite-label.entry.js +2 -2
- package/dist/esm/calcite-link.entry.js +1 -1
- package/dist/esm/calcite-menu-item.entry.js +3 -3
- package/dist/esm/calcite-menu.entry.js +3 -3
- package/dist/esm/calcite-modal.entry.js +4 -4
- package/dist/esm/calcite-navigation.entry.js +1 -1
- package/dist/esm/calcite-notice.entry.js +3 -3
- package/dist/esm/calcite-option_2.entry.js +3 -3
- package/dist/esm/calcite-pagination.entry.js +3 -3
- package/dist/esm/calcite-panel_2.entry.js +3 -3
- package/dist/esm/calcite-pick-list-group.entry.js +1 -1
- package/dist/esm/calcite-pick-list-item.entry.js +3 -3
- package/dist/esm/calcite-pick-list.entry.js +2 -2
- package/dist/esm/calcite-radio-button.entry.js +3 -3
- package/dist/esm/calcite-rating.entry.js +5 -5
- package/dist/esm/calcite-scrim.entry.js +3 -3
- package/dist/esm/calcite-segmented-control_2.entry.js +3 -3
- package/dist/esm/calcite-shell-center-row.entry.js +1 -1
- package/dist/esm/calcite-shell-panel_14.entry.js +7 -6
- package/dist/esm/calcite-sortable-list.entry.js +2 -2
- package/dist/esm/calcite-stepper-item.entry.js +2 -2
- package/dist/esm/calcite-stepper.entry.js +1 -1
- package/dist/esm/calcite-switch.entry.js +3 -3
- package/dist/esm/calcite-text-area.entry.js +5 -5
- package/dist/esm/calcite-tile.entry.js +1 -1
- package/dist/esm/calcite-time-picker.entry.js +4 -4
- package/dist/esm/calcite-tip-manager.entry.js +3 -3
- package/dist/esm/calcite-tip.entry.js +3 -3
- package/dist/esm/calcite-tooltip.entry.js +2 -2
- package/dist/esm/calcite-tree_3.entry.js +1 -1
- package/dist/esm/card-manager_3.entry.js +60 -28
- package/dist/esm/clean-url-bce022e6.js +567 -0
- package/dist/esm/crowdsource-manager.entry.js +5 -3
- package/dist/esm/{cs-1052c5ac.js → cs-af5f115e.js} +8 -8
- package/dist/esm/{da-b7ed9204.js → da-06d9e22c.js} +8 -8
- package/dist/esm/{date-bd5b879c.js → date-641ae749.js} +1 -1
- package/dist/esm/{de-at-a993e5ae.js → de-at-f55a700a.js} +8 -8
- package/dist/esm/{de-ch-acff745d.js → de-ch-7307675f.js} +8 -8
- package/dist/esm/{de-bb68e752.js → de-dc98363f.js} +8 -8
- package/dist/esm/{dom-37f2dec9.js → dom-2b326ec3.js} +1 -1
- package/dist/esm/{downloadUtils-42156cd8.js → downloadUtils-67c7a6c8.js} +296 -51
- package/dist/esm/edit-card_2.entry.js +3 -3
- package/dist/esm/{el-9de96ff0.js → el-91c64808.js} +8 -8
- package/dist/esm/{en-au-f68b6bde.js → en-au-df08cc25.js} +8 -8
- package/dist/esm/{en-ca-5360517e.js → en-ca-175f7c0f.js} +8 -8
- package/dist/esm/{en-gb-de0b3125.js → en-gb-90a08c7f.js} +8 -8
- package/dist/esm/{es-5ecbba77.js → es-5cb54b05.js} +8 -8
- package/dist/esm/{es-mx-aa126462.js → es-mx-3a0cb804.js} +8 -8
- package/dist/esm/{et-7113eeb8.js → et-eceac6dc.js} +8 -8
- package/dist/esm/{fi-ffa60f15.js → fi-26e1c14f.js} +8 -8
- package/dist/esm/{floating-ui-7cde67cf.js → floating-ui-9f8e4ed4.js} +1 -1
- package/dist/esm/{focusTrapComponent-ec344399.js → focusTrapComponent-ad2c3a31.js} +1 -1
- package/dist/esm/{form-24e6ef1d.js → form-0871d2c6.js} +1 -1
- package/dist/esm/{fr-681c5bf6.js → fr-12a5b0f7.js} +8 -8
- package/dist/esm/{fr-ch-9af1f8b1.js → fr-ch-e3406887.js} +8 -8
- package/dist/esm/{he-5188f277.js → he-61eba811.js} +8 -8
- package/dist/esm/{hi-6a31e3a4.js → hi-a50282b5.js} +8 -8
- package/dist/esm/{hr-0598e59d.js → hr-da8bffaf.js} +8 -8
- package/dist/esm/{hu-13cb9f41.js → hu-dab932f1.js} +8 -8
- package/dist/esm/{id-7f342499.js → id-de468947.js} +8 -8
- package/dist/esm/{index.es-f47c4153.js → index.es-59a67d3d.js} +2 -1
- package/dist/esm/{it-57d790f2.js → it-375d9936.js} +8 -8
- package/dist/esm/{it-ch-081af760.js → it-ch-7e663d63.js} +8 -8
- package/dist/esm/{ja-3affb68e.js → ja-36dbe39d.js} +8 -8
- package/dist/esm/{ko-736632aa.js → ko-858bc871.js} +8 -8
- package/dist/esm/{label-b6dfb4d5.js → label-b8caf984.js} +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{locale-146251f7.js → locale-00000ab4.js} +1 -1
- package/dist/esm/{lt-e7d9b1c3.js → lt-d6dfa7e4.js} +8 -8
- package/dist/esm/{lv-4d1a507e.js → lv-facd25c5.js} +8 -8
- package/dist/esm/map-select-tools_3.entry.js +8 -5
- package/dist/esm/{mk-f960312d.js → mk-5ed05b6a.js} +8 -8
- package/dist/esm/{nb-4556b5e9.js → nb-936fc687.js} +8 -8
- package/dist/esm/{nl-8e281c01.js → nl-a923d626.js} +8 -8
- package/dist/esm/{pl-1460fd5a.js → pl-b1426275.js} +8 -8
- package/dist/esm/{pt-660332b6.js → pt-1ac2453f.js} +8 -8
- package/dist/esm/{pt-br-dba48f49.js → pt-br-7194cc5f.js} +8 -8
- package/dist/esm/public-notification.entry.js +5 -4
- package/dist/esm/{ro-ac18f292.js → ro-518aaed1.js} +8 -8
- package/dist/esm/{ru-b914f6b7.js → ru-762127a3.js} +8 -8
- package/dist/esm/{shared-list-render-cc889757.js → shared-list-render-ec232615.js} +1 -1
- package/dist/esm/{sk-1be12963.js → sk-f367b7ba.js} +8 -8
- package/dist/esm/{sl-5d47e4e4.js → sl-052fd4d2.js} +8 -8
- package/dist/esm/solution-configuration.entry.js +25 -24
- package/dist/esm/solution-contents_3.entry.js +2 -1
- package/dist/esm/{solution-store-cf902566.js → solution-store-b29d50f7.js} +2 -562
- package/dist/esm/solutions-components.js +1 -1
- package/dist/esm/{sortableComponent-8a84709a.js → sortableComponent-ebd6bb72.js} +1 -1
- package/dist/esm/{sr-3281c92d.js → sr-4dc0fdb9.js} +8 -8
- package/dist/esm/{sv-e5169404.js → sv-bdc87a4d.js} +8 -8
- package/dist/esm/{t9n-d9c203e4.js → t9n-9791aa0c.js} +1 -1
- package/dist/esm/{th-937796b8.js → th-d9df674c.js} +8 -8
- package/dist/esm/{time-fa1151aa.js → time-73378c4a.js} +1 -1
- package/dist/esm/{tr-6d3b100b.js → tr-61e134eb.js} +8 -8
- package/dist/esm/{uk-a6edcacf.js → uk-ea3d8da7.js} +8 -8
- package/dist/esm/{utils-667cc396.js → utils-593fafd7.js} +1 -1
- package/dist/esm/{utils-24a35b5a.js → utils-bd52db7d.js} +2 -2
- package/dist/esm/{vi-bf4c179c.js → vi-ade1c25b.js} +8 -8
- package/dist/esm/{zh-cn-de1858cb.js → zh-cn-b8756118.js} +8 -8
- package/dist/esm/{zh-hk-12fa404f.js → zh-hk-d18c05d9.js} +8 -8
- package/dist/esm/{zh-tw-5c4220e5.js → zh-tw-9c98ff7c.js} +8 -8
- package/dist/solutions-components/{p-3b891cc4.entry.js → p-01fea8d5.entry.js} +1 -1
- package/dist/solutions-components/{p-d793ec96.entry.js → p-0219a1a9.entry.js} +5 -5
- package/dist/solutions-components/{p-65022e7f.entry.js → p-02ff64f4.entry.js} +1 -1
- package/dist/solutions-components/p-062254a6.entry.js +6 -0
- package/dist/solutions-components/{p-bff158ff.js → p-062d2f9a.js} +1 -1
- package/dist/solutions-components/{p-f4e5b7e5.entry.js → p-084bced1.entry.js} +1 -1
- package/dist/solutions-components/{p-c261335b.entry.js → p-088e4cfc.entry.js} +1 -1
- package/dist/solutions-components/{p-96239d0d.js → p-08e35485.js} +1 -1
- package/dist/solutions-components/{p-3d3772fb.js → p-0d14d33a.js} +1 -1
- package/dist/solutions-components/{p-7f271c31.js → p-11550b3c.js} +3 -3
- package/dist/solutions-components/{p-ad19f9b0.entry.js → p-120c4098.entry.js} +1 -1
- package/dist/solutions-components/{p-45419d93.entry.js → p-12bcd474.entry.js} +1 -1
- package/dist/solutions-components/{p-bd82849c.entry.js → p-1597ec4b.entry.js} +1 -1
- package/dist/solutions-components/{p-afb35c95.js → p-17d176b5.js} +14 -43
- package/dist/solutions-components/{p-0503c78d.js → p-1b41181b.js} +44 -29
- package/dist/solutions-components/{p-127c3866.js → p-1c5787b1.js} +1 -1
- package/dist/solutions-components/{p-b97886b3.entry.js → p-1d9a5198.entry.js} +1 -1
- package/dist/solutions-components/{p-8e3e1ce8.entry.js → p-1dd5c4e6.entry.js} +1 -1
- package/dist/solutions-components/{p-97b69f54.entry.js → p-1e62d118.entry.js} +1 -1
- package/dist/solutions-components/{p-537c34a4.entry.js → p-1fae3819.entry.js} +1 -1
- package/dist/solutions-components/{p-82f0b25b.js → p-21aa112d.js} +1 -1
- package/dist/solutions-components/{p-f8944f59.entry.js → p-252a9a7f.entry.js} +1 -1
- package/dist/solutions-components/{p-80ea5869.js → p-26b28806.js} +1 -1
- package/dist/solutions-components/{p-dac10448.js → p-280fd963.js} +3 -3
- package/dist/solutions-components/{p-79d7f324.js → p-29049359.js} +1 -1
- package/dist/solutions-components/{p-c033b8ec.entry.js → p-2b378389.entry.js} +1 -1
- package/dist/solutions-components/{p-19ec0463.js → p-2bdd1a5d.js} +1 -1
- package/dist/solutions-components/{p-cacfa6ae.js → p-2ee21e9d.js} +1 -1
- package/dist/solutions-components/{p-300f4299.js → p-2f42ae51.js} +1 -1
- package/dist/solutions-components/{p-418be467.js → p-30b3261c.js} +1 -1
- package/dist/solutions-components/{p-4d91443a.entry.js → p-32ba2223.entry.js} +1 -1
- package/dist/solutions-components/{p-702c6093.js → p-34673137.js} +1 -1
- package/dist/solutions-components/{p-61af54b9.entry.js → p-3566ee69.entry.js} +1 -1
- package/dist/solutions-components/{p-90a9126f.js → p-358b9cc8.js} +1 -1
- package/dist/solutions-components/p-3a6c8fc3.entry.js +6 -0
- package/dist/solutions-components/p-3a8d82a2.js +11 -0
- package/dist/solutions-components/{p-628c170b.entry.js → p-3ab94526.entry.js} +1 -1
- package/dist/solutions-components/p-3b1fc7a2.entry.js +6 -0
- package/dist/solutions-components/{p-b1daad7e.js → p-3f7119c1.js} +1 -1
- package/dist/solutions-components/{p-f0f5ecb2.js → p-3fcd035e.js} +1 -1
- package/dist/solutions-components/{p-3766be72.js → p-419c9d89.js} +1 -1
- package/dist/solutions-components/p-453d1b31.entry.js +6 -0
- package/dist/solutions-components/{p-337f6adf.js → p-46918548.js} +1 -1
- package/dist/solutions-components/p-49e9e4e3.js +12 -0
- package/dist/solutions-components/p-4d942b0f.entry.js +36 -0
- package/dist/solutions-components/{p-85e0d2a3.js → p-4fc92419.js} +1 -1
- package/dist/solutions-components/{p-0d08a75d.entry.js → p-52afbe07.entry.js} +1 -1
- package/dist/solutions-components/{p-9391bb74.js → p-573d0763.js} +1 -1
- package/dist/solutions-components/{p-87971116.entry.js → p-59ef9461.entry.js} +1 -1
- package/dist/solutions-components/{p-25718b9f.entry.js → p-5e5749c0.entry.js} +1 -1
- package/dist/solutions-components/{p-54064b61.entry.js → p-5ff22d2e.entry.js} +1 -1
- package/dist/solutions-components/{p-4bd793ef.entry.js → p-617f32a0.entry.js} +1 -1
- package/dist/solutions-components/{p-747a1293.js → p-6510c06c.js} +1 -1
- package/dist/solutions-components/{p-1f69762c.js → p-65ba4d10.js} +1 -1
- package/dist/solutions-components/{p-4cb7cdb7.entry.js → p-65ffe4b0.entry.js} +1 -1
- package/dist/solutions-components/{p-1b4d6511.js → p-68007503.js} +1 -1
- package/dist/solutions-components/{p-e849d2ba.entry.js → p-6ba8483c.entry.js} +2 -2
- package/dist/solutions-components/{p-9961a2f9.entry.js → p-6c8c7b98.entry.js} +2 -2
- package/dist/solutions-components/{p-ff863f3d.entry.js → p-6e5d9ae9.entry.js} +1 -1
- package/dist/solutions-components/{p-b6a1c34f.entry.js → p-6ebf870c.entry.js} +1 -1
- package/dist/solutions-components/{p-d2d3e4b5.js → p-72f34a0a.js} +1 -1
- package/dist/solutions-components/{p-981fc8e4.entry.js → p-7359a6ac.entry.js} +1 -1
- package/dist/solutions-components/{p-9791fbf1.entry.js → p-73ab9d9a.entry.js} +1 -1
- package/dist/solutions-components/{p-9abb1c4c.entry.js → p-73fe6f7e.entry.js} +1 -1
- package/dist/solutions-components/{p-62e3adbb.js → p-7452d79a.js} +1 -1
- package/dist/solutions-components/{p-34169501.js → p-76c2c379.js} +1 -1
- package/dist/solutions-components/{p-941721ba.js → p-788aa5d7.js} +1 -1
- package/dist/solutions-components/{p-557d4cc5.js → p-79cc0531.js} +2 -2
- package/dist/solutions-components/{p-a19d8147.js → p-7a0fa011.js} +1 -1
- package/dist/solutions-components/{p-019fe9fe.entry.js → p-7a55cee6.entry.js} +3 -3
- package/dist/solutions-components/{p-48329056.entry.js → p-7bc63171.entry.js} +1 -1
- package/dist/solutions-components/{p-e7304151.entry.js → p-81664d83.entry.js} +1 -1
- package/dist/solutions-components/{p-9504c1b7.js → p-8354f486.js} +1 -1
- package/dist/solutions-components/{p-f812e3ee.entry.js → p-84dff306.entry.js} +1 -1
- package/dist/solutions-components/{p-a59dba2f.js → p-8594fe6b.js} +1 -1
- package/dist/solutions-components/{p-ae3ec77d.js → p-8b2d396e.js} +1 -1
- package/dist/solutions-components/{p-38cc8a4d.js → p-8ec6ea34.js} +1 -1
- package/dist/solutions-components/{p-da760d1d.entry.js → p-8ee00658.entry.js} +1 -1
- package/dist/solutions-components/{p-38211628.js → p-905fcf73.js} +1 -1
- package/dist/solutions-components/{p-e502ccce.entry.js → p-929909bc.entry.js} +1 -1
- package/dist/solutions-components/{p-dd5f68f2.js → p-948b5722.js} +1 -1
- package/dist/solutions-components/{p-39fe9a4c.js → p-956f3207.js} +1 -1
- package/dist/solutions-components/{p-f7aa542c.js → p-96287d23.js} +1 -1
- package/dist/solutions-components/{p-68630513.entry.js → p-964c0e7d.entry.js} +1 -1
- package/dist/solutions-components/{p-b09d8c0e.entry.js → p-98051370.entry.js} +1 -1
- package/dist/solutions-components/p-9a8c51bf.entry.js +6 -0
- package/dist/solutions-components/{p-efd70bf7.entry.js → p-9a94f48c.entry.js} +2 -2
- package/dist/solutions-components/{p-318790b8.js → p-9b94501c.js} +1 -1
- package/dist/solutions-components/{p-69e26726.js → p-9d4467a3.js} +1 -1
- package/dist/solutions-components/{p-f6cf9943.js → p-9e3c9cd2.js} +1 -1
- package/dist/solutions-components/{p-30542275.js → p-9fd59203.js} +1 -1
- package/dist/solutions-components/{p-d902b790.js → p-a201bffc.js} +1 -1
- package/dist/solutions-components/{p-1552c479.entry.js → p-a3729795.entry.js} +1 -1
- package/dist/solutions-components/{p-ae4ad673.entry.js → p-a47ed290.entry.js} +2 -2
- package/dist/solutions-components/{p-ca5be55f.entry.js → p-a5ef322f.entry.js} +2 -2
- package/dist/solutions-components/p-a776b7e6.entry.js +6 -0
- package/dist/solutions-components/{p-3658ebd8.entry.js → p-a97e8d6a.entry.js} +1 -1
- package/dist/solutions-components/{p-2937523d.js → p-aaea9203.js} +1 -1
- package/dist/solutions-components/{p-b7093e6d.entry.js → p-ad1d56b1.entry.js} +1 -1
- package/dist/solutions-components/{p-0ca528ec.js → p-adeb0e8f.js} +1 -1
- package/dist/solutions-components/{p-31d2a105.entry.js → p-af63959a.entry.js} +1 -1
- package/dist/solutions-components/{p-fbd71543.entry.js → p-b1125581.entry.js} +2 -2
- package/dist/solutions-components/{p-b029c6d8.js → p-b20a31c8.js} +1 -1
- package/dist/solutions-components/{p-71400268.js → p-b81131b3.js} +1 -1
- package/dist/solutions-components/p-b892e595.entry.js +6 -0
- package/dist/solutions-components/{p-cc624b0c.entry.js → p-b89c5865.entry.js} +1 -1
- package/dist/solutions-components/{p-245d667e.js → p-b9b52743.js} +1 -1
- package/dist/solutions-components/{p-0870f436.entry.js → p-ba99e562.entry.js} +1 -1
- package/dist/solutions-components/{p-2d614afc.js → p-bc548c06.js} +1 -1
- package/dist/solutions-components/{p-29b2f046.js → p-bccbdeb5.js} +1 -1
- package/dist/solutions-components/{p-f72e0965.entry.js → p-bd318e33.entry.js} +1 -1
- package/dist/solutions-components/{p-74aa84f6.js → p-bd766e49.js} +1 -1
- package/dist/solutions-components/{p-1a47516a.entry.js → p-be36d5ed.entry.js} +1 -1
- package/dist/solutions-components/{p-9b75102b.entry.js → p-c073d2d6.entry.js} +1 -1
- package/dist/solutions-components/{p-712ea336.entry.js → p-c644edf5.entry.js} +1 -1
- package/dist/solutions-components/p-c6b7e7ff.js +11 -0
- package/dist/solutions-components/{p-dc80cb69.entry.js → p-ca0b3a2b.entry.js} +1 -1
- package/dist/solutions-components/{p-3e9fc0aa.entry.js → p-cfd88a2f.entry.js} +1 -1
- package/dist/solutions-components/{p-e9fcf408.js → p-d5228aed.js} +1 -1
- package/dist/solutions-components/{p-80b87453.js → p-d98caa4c.js} +1 -1
- package/dist/solutions-components/{p-45b829b5.js → p-dd9c065e.js} +1 -1
- package/dist/solutions-components/{p-05b2bdf9.js → p-dedc167c.js} +1 -1
- package/dist/solutions-components/{p-a16feeec.js → p-e4f9b782.js} +1 -1
- package/dist/solutions-components/{p-ac1bd870.entry.js → p-e572a692.entry.js} +1 -1
- package/dist/solutions-components/{p-74521615.entry.js → p-e5dda947.entry.js} +1 -1
- package/dist/solutions-components/{p-bbfc2724.js → p-e7fbf2fe.js} +1 -1
- package/dist/solutions-components/{p-dda325a4.entry.js → p-e9ba0c7f.entry.js} +1 -1
- package/dist/solutions-components/{p-75e707d1.js → p-eb60ec2a.js} +1 -1
- package/dist/solutions-components/p-ecc95259.js +20 -0
- package/dist/solutions-components/{p-85791b16.entry.js → p-ee144348.entry.js} +1 -1
- package/dist/solutions-components/{p-4b4559f9.js → p-f03bed0c.js} +1 -1
- package/dist/solutions-components/{p-7a11983d.js → p-f5028a8e.js} +1 -1
- package/dist/solutions-components/{p-fb23ba4a.entry.js → p-f50cf603.entry.js} +1 -1
- package/dist/solutions-components/{p-f7b520ae.js → p-f7d8b6b3.js} +1 -1
- package/dist/solutions-components/{p-89cbb86a.js → p-f9166fcb.js} +3 -3
- package/dist/solutions-components/{p-792fcd62.entry.js → p-fb0f2016.entry.js} +1 -1
- package/dist/solutions-components/solutions-components.esm.js +1 -1
- package/dist/solutions-components/utils/downloadUtils.ts +257 -85
- package/dist/solutions-components/utils/test/downloadUtils.spec.tsx +2 -0
- package/dist/types/components/crowdsource-manager/crowdsource-manager.d.ts +8 -0
- package/dist/types/components/layer-table/layer-table.d.ts +42 -26
- package/dist/types/components/pdf-download/pdf-download.d.ts +4 -2
- package/dist/types/components.d.ts +36 -2
- package/dist/types/utils/downloadUtils.d.ts +34 -16
- package/package.json +8 -9
- package/dist/solutions-components/p-06712292.js +0 -11
- package/dist/solutions-components/p-0a0c3764.js +0 -11
- package/dist/solutions-components/p-12a7c2db.entry.js +0 -6
- package/dist/solutions-components/p-3a7cd2b0.entry.js +0 -37
- package/dist/solutions-components/p-8e9d9e6a.js +0 -12
- package/dist/solutions-components/p-97088307.entry.js +0 -6
- package/dist/solutions-components/p-a16e6f5f.entry.js +0 -6
- package/dist/solutions-components/p-d118a76e.entry.js +0 -6
- package/dist/solutions-components/p-d54c2dfd.entry.js +0 -6
- package/dist/solutions-components/p-d7d466e8.entry.js +0 -6
- package/dist/solutions-components/p-ffbe89cf.entry.js +0 -6
@@ -3,21 +3,21 @@
|
|
3
3
|
* Licensed under the Apache License, Version 2.0
|
4
4
|
* http://www.apache.org/licenses/LICENSE-2.0
|
5
5
|
*/
|
6
|
-
import { d as dayjs } from './calcite-input-time-picker-
|
6
|
+
import { d as dayjs } from './calcite-input-time-picker-fe6e499a.js';
|
7
7
|
import './index-c7de2486.js';
|
8
|
-
import './form-
|
9
|
-
import './dom-
|
8
|
+
import './form-0871d2c6.js';
|
9
|
+
import './dom-2b326ec3.js';
|
10
10
|
import './guid-70cda807.js';
|
11
11
|
import './resources-1e6d76df.js';
|
12
12
|
import './interactive-bd6837bc.js';
|
13
13
|
import './key-02fa06ae.js';
|
14
|
-
import './label-
|
14
|
+
import './label-b8caf984.js';
|
15
15
|
import './loadable-f848be11.js';
|
16
|
-
import './locale-
|
16
|
+
import './locale-00000ab4.js';
|
17
17
|
import './observers-95c50046.js';
|
18
|
-
import './focusTrapComponent-
|
19
|
-
import './time-
|
20
|
-
import './t9n-
|
18
|
+
import './focusTrapComponent-ad2c3a31.js';
|
19
|
+
import './time-73378c4a.js';
|
20
|
+
import './t9n-9791aa0c.js';
|
21
21
|
|
22
22
|
// Chinese (China) [zh-cn]
|
23
23
|
var locale = {
|
@@ -3,21 +3,21 @@
|
|
3
3
|
* Licensed under the Apache License, Version 2.0
|
4
4
|
* http://www.apache.org/licenses/LICENSE-2.0
|
5
5
|
*/
|
6
|
-
import { d as dayjs } from './calcite-input-time-picker-
|
6
|
+
import { d as dayjs } from './calcite-input-time-picker-fe6e499a.js';
|
7
7
|
import './index-c7de2486.js';
|
8
|
-
import './form-
|
9
|
-
import './dom-
|
8
|
+
import './form-0871d2c6.js';
|
9
|
+
import './dom-2b326ec3.js';
|
10
10
|
import './guid-70cda807.js';
|
11
11
|
import './resources-1e6d76df.js';
|
12
12
|
import './interactive-bd6837bc.js';
|
13
13
|
import './key-02fa06ae.js';
|
14
|
-
import './label-
|
14
|
+
import './label-b8caf984.js';
|
15
15
|
import './loadable-f848be11.js';
|
16
|
-
import './locale-
|
16
|
+
import './locale-00000ab4.js';
|
17
17
|
import './observers-95c50046.js';
|
18
|
-
import './focusTrapComponent-
|
19
|
-
import './time-
|
20
|
-
import './t9n-
|
18
|
+
import './focusTrapComponent-ad2c3a31.js';
|
19
|
+
import './time-73378c4a.js';
|
20
|
+
import './t9n-9791aa0c.js';
|
21
21
|
|
22
22
|
// Chinese (Hong Kong) [zh-hk]
|
23
23
|
var locale = {
|
@@ -3,21 +3,21 @@
|
|
3
3
|
* Licensed under the Apache License, Version 2.0
|
4
4
|
* http://www.apache.org/licenses/LICENSE-2.0
|
5
5
|
*/
|
6
|
-
import { d as dayjs } from './calcite-input-time-picker-
|
6
|
+
import { d as dayjs } from './calcite-input-time-picker-fe6e499a.js';
|
7
7
|
import './index-c7de2486.js';
|
8
|
-
import './form-
|
9
|
-
import './dom-
|
8
|
+
import './form-0871d2c6.js';
|
9
|
+
import './dom-2b326ec3.js';
|
10
10
|
import './guid-70cda807.js';
|
11
11
|
import './resources-1e6d76df.js';
|
12
12
|
import './interactive-bd6837bc.js';
|
13
13
|
import './key-02fa06ae.js';
|
14
|
-
import './label-
|
14
|
+
import './label-b8caf984.js';
|
15
15
|
import './loadable-f848be11.js';
|
16
|
-
import './locale-
|
16
|
+
import './locale-00000ab4.js';
|
17
17
|
import './observers-95c50046.js';
|
18
|
-
import './focusTrapComponent-
|
19
|
-
import './time-
|
20
|
-
import './t9n-
|
18
|
+
import './focusTrapComponent-ad2c3a31.js';
|
19
|
+
import './time-73378c4a.js';
|
20
|
+
import './t9n-9791aa0c.js';
|
21
21
|
|
22
22
|
// Chinese (Taiwan) [zh-tw]
|
23
23
|
var locale = {
|
@@ -3,7 +3,7 @@
|
|
3
3
|
* Licensed under the Apache License, Version 2.0
|
4
4
|
* http://www.apache.org/licenses/LICENSE-2.0
|
5
5
|
*/
|
6
|
-
import{r as t,c as s,h as e,H as i,g as o}from"./p-33613993.js";import{c as a,d as n}from"./p-
|
6
|
+
import{r as t,c as s,h as e,H as i,g as o}from"./p-33613993.js";import{c as a,d as n}from"./p-72f34a0a.js";import{u as h}from"./p-ad75b9bb.js";import{c,d as l}from"./p-11550b3c.js";import{u as r,c as d,d as p,s as m}from"./p-79cc0531.js";import{c as b,s as u,a as f}from"./p-d74e95e5.js";import{c as C,d as v,a as g,H as y}from"./p-49e9e4e3.js";import"./p-e4f9b782.js";import"./p-8b448a5b.js";import"./p-e3525c00.js";import"./p-43ba7a04.js";import"./p-588bc0c0.js";
|
7
7
|
/*!
|
8
8
|
* All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
9
9
|
* See https://github.com/Esri/calcite-design-system/blob/main/LICENSE.md for details.
|
@@ -3,12 +3,12 @@
|
|
3
3
|
* Licensed under the Apache License, Version 2.0
|
4
4
|
* http://www.apache.org/licenses/LICENSE-2.0
|
5
5
|
*/
|
6
|
-
import{h as i,r as t,c as e,H as s,g as n}from"./p-33613993.js";import{f as o}from"./p-3a844a72.js";import{i as a,t as r,e as c,g as l,d as h,h as d}from"./p-
|
6
|
+
import{h as i,r as t,c as e,H as s,g as n}from"./p-33613993.js";import{f as o}from"./p-3a844a72.js";import{i as a,t as r,e as c,g as l,d as h,h as d}from"./p-e4f9b782.js";import{d as p,f as m,c as u,r as b,a as g,F as v}from"./p-2ee21e9d.js";import{s as f,c as x,a as w,d as y,H as k}from"./p-49e9e4e3.js";import{g as z}from"./p-8b448a5b.js";import{c as C,u as I,d as D}from"./p-ad75b9bb.js";import{c as H,d as E,g as $}from"./p-72f34a0a.js";import{c as j,s as O,a as A}from"./p-d74e95e5.js";import{c as L,d as P}from"./p-11550b3c.js";import{c as S}from"./p-588bc0c0.js";import{o as _}from"./p-a097edf0.js";import{c as F,s as R,d as B,u as M}from"./p-79cc0531.js";import{C as T,b as W,c as q,h as N,d as U,e as V,f as G,g as K,a as X}from"./p-dedc167c.js";import{d as Y}from"./p-a82f35c9.js";import{c as J,d as Q}from"./p-bfc78840.js";import{i as Z}from"./p-43ba7a04.js";import{b as ii,l as ti,m as ei,n as si}from"./p-767002cd.js";import{s as ni}from"./p-3691a072.js";import"./p-e3525c00.js";import"./p-2a58e378.js";import"./p-cc462e38.js";
|
7
7
|
/*!
|
8
8
|
* All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
9
9
|
* See https://github.com/Esri/calcite-design-system/blob/main/LICENSE.md for details.
|
10
10
|
* v1.6.1
|
11
|
-
*/const oi="x-button";function ai({disabled:t,key:e,label:s,onClick:n,ref:o,scale:a}){return i("button",{"aria-label":s,class:oi,disabled:t,key:e,onClick:n,tabIndex:-1,type:"button",ref:o},i("calcite-icon",{icon:"x",scale:"l"===a?"m":"s"}))}const ri="combobox-item-",ci="combobox-chip-",li="combobox-label-",hi="combobox-listbox-",di="combobox-input-",pi=class{constructor(i){t(this,i),this.calciteComboboxChange=e(this,"calciteComboboxChange",6),this.calciteComboboxFilterChange=e(this,"calciteComboboxFilterChange",6),this.calciteComboboxChipClose=e(this,"calciteComboboxChipClose",6),this.calciteComboboxBeforeClose=e(this,"calciteComboboxBeforeClose",6),this.calciteComboboxClose=e(this,"calciteComboboxClose",6),this.calciteComboboxBeforeOpen=e(this,"calciteComboboxBeforeOpen",6),this.calciteComboboxOpen=e(this,"calciteComboboxOpen",6),this.placement=p,this.internalValueChangeFlag=!1,this.textInput=null,this.mutationObserver=S("mutation",(()=>this.updateItems())),this.resizeObserver=S("resize",(()=>this.setMaxScrollerHeight())),this.guid=z(),this.inputHeight=0,this.ignoreSelectedEventsFlag=!1,this.openTransitionProp="opacity",this.setFilteredPlacements=()=>{const{el:i,flipPlacements:t}=this;this.filteredFlipPlacements=t?m(t,i):null},this.getValue=()=>{const i=this.selectedItems.map((i=>{var t;return null===(t=null==i?void 0:i.value)||void 0===t?void 0:t.toString()}));return(null==i?void 0:i.length)?i.length>1?i:i[0]:""},this.onLabelClick=()=>{this.setFocus()},this.keyDownHandler=i=>{const{key:t}=i;switch(t){case"Tab":this.activeChipIndex=-1,this.activeItemIndex=-1,this.allowCustomValues&&this.text?(this.addCustomChip(this.text,!0),i.preventDefault()):this.open&&(this.open=!1,i.preventDefault());break;case"ArrowLeft":this.previousChip(),i.preventDefault();break;case"ArrowRight":this.nextChip(),i.preventDefault();break;case"ArrowUp":i.preventDefault(),this.open&&this.shiftActiveItemIndex(-1),this.comboboxInViewport()||this.el.scrollIntoView();break;case"ArrowDown":i.preventDefault(),this.open?this.shiftActiveItemIndex(1):(this.open=!0,this.ensureRecentSelectedItemIsActive()),this.comboboxInViewport()||this.el.scrollIntoView();break;case" ":this.textInput.value||(this.open||(this.open=!0,this.shiftActiveItemIndex(1)),i.preventDefault());break;case"Home":if(!this.open)return;i.preventDefault(),this.updateActiveItemIndex(0),this.scrollToActiveItem(),this.comboboxInViewport()||this.el.scrollIntoView();break;case"End":if(!this.open)return;i.preventDefault(),this.updateActiveItemIndex(this.filteredItems.length-1),this.scrollToActiveItem(),this.comboboxInViewport()||this.el.scrollIntoView();break;case"Escape":this.clearDisabled||this.open||this.clearValue(),this.open=!1,i.preventDefault();break;case"Enter":this.activeItemIndex>-1?(this.toggleSelection(this.filteredItems[this.activeItemIndex]),i.preventDefault()):this.activeChipIndex>-1?(this.removeActiveChip(),i.preventDefault()):this.allowCustomValues&&this.text?(this.addCustomChip(this.text,!0),i.preventDefault()):i.defaultPrevented||v(this)&&i.preventDefault();break;case"Delete":case"Backspace":this.activeChipIndex>-1?(i.preventDefault(),this.removeActiveChip()):!this.text&&this.isMulti()&&(i.preventDefault(),this.removeLastChip())}},this.toggleCloseEnd=()=>{this.open=!1,this.el.removeEventListener("calciteComboboxClose",this.toggleCloseEnd)},this.toggleOpenEnd=()=>{this.open=!1,this.el.removeEventListener("calciteComboboxOpen",this.toggleOpenEnd)},this.setMaxScrollerHeight=async()=>{const{listContainerEl:i,open:t,referenceEl:e}=this;if(!i||!t)return;await this.reposition(!0);const s=this.getMaxScrollerHeight();i.style.maxHeight=s>0?`${s}px`:"",i.style.minWidth=`${e.clientWidth}px`,await this.reposition(!0)},this.calciteChipCloseHandler=i=>{this.open=!1;const t=this.items.find((t=>t===i));t&&this.toggleSelection(t,!1),this.calciteComboboxChipClose.emit()},this.clickHandler=i=>{const t=i.composedPath();return t.some((i=>"CALCITE-CHIP"===i.tagName))?(this.open=!1,void i.preventDefault()):t.some((i=>{var t;return null===(t=i.classList)||void 0===t?void 0:t.contains(oi)}))?(this.clearValue(),void i.preventDefault()):(this.open=!this.open,void this.ensureRecentSelectedItemIsActive())},this.setInactiveIfNotContained=i=>{const t=i.composedPath();!this.open||t.includes(this.el)||t.includes(this.referenceEl)||(this.allowCustomValues&&this.text.trim().length&&this.addCustomChip(this.text),"single"===this.selectionMode&&(this.textInput&&(this.textInput.value=""),this.text="",this.filterItems(""),this.updateActiveItemIndex(-1)),this.open=!1)},this.setFloatingEl=i=>{this.floatingEl=i,u(this,this.referenceEl,this.floatingEl)},this.setContainerEl=i=>{this.resizeObserver.observe(i),this.listContainerEl=i,this.transitionEl=i},this.setReferenceEl=i=>{this.referenceEl=i,u(this,this.referenceEl,this.floatingEl)},this.inputHandler=i=>{const t=i.target.value;this.text=t,this.filterItems(t),t&&(this.activeChipIndex=-1)},this.filterItems=(()=>{const i=(i,t)=>i&&t.some((({label:t,value:e})=>i.tagName===V?e===i.label:e===i.textLabel||e===i.value||t===i.textLabel||t===i.value));return Y((t=>{const e=o(this.data,t);this.getCombinedItems().forEach((t=>{const s=!i(t,e);t.hidden=s;const[n,o]=t.ancestors;(i(n,e)||i(o,e))&&(t.hidden=!1),s||t.ancestors.forEach((i=>i.hidden=!1))})),this.filteredItems=this.getFilteredItems(),this.calciteComboboxFilterChange.emit()}),100)})(),this.internalComboboxChangeEvent=()=>{this.calciteComboboxChange.emit()},this.emitComboboxChange=Y(this.internalComboboxChangeEvent,0),this.updateItems=()=>{this.items=this.getItems(),this.groupItems=this.getGroupItems(),this.data=this.getData(),this.selectedItems=this.getSelectedItems(),this.filteredItems=this.getFilteredItems(),this.needsIcon=this.getNeedsIcon(),this.allowCustomValues||this.setMaxScrollerHeight(),this.groupItems.forEach(((i,t,e)=>{0===t&&(i.afterEmptyGroup=!1);const s=e[t+1];s&&(s.afterEmptyGroup=0===i.children.length)}))},this.scrollToActiveItem=()=>{const i=this.filteredItems[this.activeItemIndex];if(!i)return;const t=this.calculateSingleItemHeight(i),{offsetHeight:e,scrollTop:s}=this.listContainerEl;e+s<i.offsetTop+t?this.listContainerEl.scrollTop=i.offsetTop-e+t:i.offsetTop<s&&(this.listContainerEl.scrollTop=i.offsetTop)},this.comboboxFocusHandler=()=>{var i;this.disabled||null===(i=this.textInput)||void 0===i||i.focus()},this.comboboxBlurHandler=i=>{this.setInactiveIfNotContained(i)},this.clearDisabled=!1,this.open=!1,this.disabled=!1,this.form=void 0,this.label=void 0,this.placeholder=void 0,this.placeholderIcon=void 0,this.placeholderIconFlipRtl=!1,this.maxItems=0,this.name=void 0,this.allowCustomValues=void 0,this.overlayPositioning="absolute",this.required=!1,this.selectionMode="multiple",this.scale="m",this.value=null,this.flipPlacements=void 0,this.messages=void 0,this.messageOverrides=void 0,this.selectedItems=[],this.filteredItems=[],this.items=[],this.groupItems=[],this.needsIcon=void 0,this.activeItemIndex=-1,this.activeChipIndex=-1,this.activeDescendant="",this.text="",this.effectiveLocale=void 0,this.defaultMessages=void 0}openHandler(){_(this),this.disabled?this.open=!1:this.setMaxScrollerHeight()}handleDisabledChange(i){i||(this.open=!1)}maxItemsHandler(){this.setMaxScrollerHeight()}overlayPositioningHandler(){this.reposition(!0)}valueHandler(i){if(!this.internalValueChangeFlag){const t=this.getItems();Array.isArray(i)?t.forEach((t=>t.selected=i.includes(t.value))):t.forEach(i?t=>t.selected=i===t.value:i=>i.selected=!1),this.updateItems()}}onMessagesChange(){}flipPlacementsHandler(){this.setFilteredPlacements(),this.reposition(!0)}selectedItemsHandler(){this.internalValueChangeFlag=!0,this.value=this.getValue(),this.internalValueChangeFlag=!1}documentClickHandler(i){!this.disabled&&a(i)&&this.setInactiveIfNotContained(i)}calciteComboboxItemChangeHandler(i){if(this.ignoreSelectedEventsFlag)return;const t=i.target,e=this.filteredItems.indexOf(t);this.updateActiveItemIndex(e),this.toggleSelection(t,t.selected)}async reposition(i=!1){const{floatingEl:t,referenceEl:e,placement:s,overlayPositioning:n,filteredFlipPlacements:o}=this;return b(this,{floatingEl:t,referenceEl:e,overlayPositioning:n,placement:s,flipPlacements:o,type:"menu"},i)}async setFocus(){var i;await j(this),null===(i=this.textInput)||void 0===i||i.focus(),this.activeChipIndex=-1,this.activeItemIndex=-1}connectedCallback(){var i;C(this),L(this),F(this),this.internalValueChangeFlag=!0,this.value=this.getValue(),this.internalValueChangeFlag=!1,null===(i=this.mutationObserver)||void 0===i||i.observe(this.el,{childList:!0,subtree:!0}),H(this),x(this),this.setFilteredPlacements(),this.reposition(!0),this.open&&(this.openHandler(),_(this))}async componentWillLoad(){O(this),this.updateItems(),await R(this)}componentDidLoad(){w(this,this.getValue()),this.reposition(!0),A(this)}componentDidRender(){this.el.offsetHeight!==this.inputHeight&&(this.reposition(!0),this.inputHeight=this.el.offsetHeight),I(this)}disconnectedCallback(){var i,t;null===(i=this.mutationObserver)||void 0===i||i.disconnect(),null===(t=this.resizeObserver)||void 0===t||t.disconnect(),D(this),E(this),y(this),g(this,this.referenceEl,this.floatingEl),P(this),B(this)}textHandler(){this.updateActiveItemIndex(-1)}effectiveLocaleChange(){M(this,this.effectiveLocale)}clearValue(){this.ignoreSelectedEventsFlag=!0,this.items.forEach((i=>i.selected=!1)),this.ignoreSelectedEventsFlag=!1,this.selectedItems=[],this.emitComboboxChange(),this.open=!1,this.updateActiveItemIndex(-1),this.resetText(),this.filterItems(""),this.setFocus()}comboboxInViewport(){const i=this.el.getBoundingClientRect();return i.top>=0&&i.left>=0&&i.right<=(window.innerWidth||document.documentElement.clientWidth)&&i.bottom<=(window.innerHeight||document.documentElement.clientHeight)}onBeforeOpen(){this.scrollToActiveItem(),this.calciteComboboxBeforeOpen.emit()}onOpen(){this.calciteComboboxOpen.emit()}onBeforeClose(){this.calciteComboboxBeforeClose.emit()}onClose(){this.calciteComboboxClose.emit()}ensureRecentSelectedItemIsActive(){const{selectedItems:i}=this,t=0===i.length?0:this.items.indexOf(i[i.length-1]);this.updateActiveItemIndex(t)}getMaxScrollerHeight(){const i=this.getCombinedItems().filter((i=>!i.hidden)),{maxItems:t}=this;let e=0,s=0;return i.length>t&&i.forEach((i=>{if(e<t&&t>0){const t=this.calculateSingleItemHeight(i);t>0&&(s+=t,e++)}})),s}calculateSingleItemHeight(i){if(!i)return;let t=i.offsetHeight;return Array.from(i.querySelectorAll(T)).map((i=>null==i?void 0:i.offsetHeight)).forEach((i=>{t-=i})),t}getCombinedItems(){return[...this.groupItems,...this.items]}toggleSelection(i,t=!i.selected){i&&(this.isMulti()?(i.selected=t,this.updateAncestors(i),this.selectedItems=this.getSelectedItems(),this.emitComboboxChange(),this.resetText(),this.filterItems("")):(this.ignoreSelectedEventsFlag=!0,this.items.forEach((e=>e.selected=e===i&&t)),this.ignoreSelectedEventsFlag=!1,this.selectedItems=this.getSelectedItems(),this.emitComboboxChange(),this.textInput&&(this.textInput.value=i.textLabel),this.open=!1,this.updateActiveItemIndex(-1),this.resetText(),this.filterItems("")))}updateAncestors(i){if("ancestors"!==this.selectionMode)return;const t=W(i),e=q(i);i.selected?t.forEach((i=>{i.selected=!0})):(e.forEach((i=>i.selected=!1)),[...t].forEach((i=>{N(i)||(i.selected=!1)})))}getFilteredItems(){return this.items.filter((i=>!i.hidden))}getSelectedItems(){if(!this.isMulti()){const i=this.items.find((({selected:i})=>i));return i?[i]:[]}return this.items.filter((i=>i.selected&&("ancestors"!==this.selectionMode||!N(i)))).sort(((i,t)=>{const e=this.selectedItems.indexOf(i),s=this.selectedItems.indexOf(t);return e>-1&&s>-1?e-s:s-e}))}getData(){return this.items.map((i=>({filterDisabled:i.filterDisabled,value:i.value,label:i.textLabel})))}getNeedsIcon(){return"single"===this.selectionMode&&this.items.some((i=>i.icon))}resetText(){this.textInput&&(this.textInput.value=""),this.text=""}getItems(){return Array.from(this.el.querySelectorAll(U)).filter((i=>!i.disabled))}getGroupItems(){return Array.from(this.el.querySelectorAll(V))}addCustomChip(i,t){const e=this.items.find((t=>t.textLabel===i));if(e)this.toggleSelection(e,!0);else{this.isMulti()||this.toggleSelection(this.selectedItems[this.selectedItems.length-1],!1);const e=document.createElement(U);e.value=i,e.textLabel=i,e.selected=!0,this.el.appendChild(e),this.resetText(),t&&this.setFocus(),this.updateItems(),this.filterItems(""),this.emitComboboxChange()}}removeActiveChip(){this.toggleSelection(this.selectedItems[this.activeChipIndex],!1),this.setFocus()}removeLastChip(){this.toggleSelection(this.selectedItems[this.selectedItems.length-1],!1),this.setFocus()}previousChip(){if(this.text)return;const i=this.activeChipIndex;this.activeChipIndex=-1===i?this.selectedItems.length-1:Math.max(i-1,0),this.updateActiveItemIndex(-1),this.focusChip()}nextChip(){if(this.text||-1===this.activeChipIndex)return;const i=this.activeChipIndex+1;i>this.selectedItems.length-1?(this.activeChipIndex=-1,this.setFocus()):(this.activeChipIndex=i,this.focusChip()),this.updateActiveItemIndex(-1)}focusChip(){var i;const t=null===(i=this.selectedItems[this.activeChipIndex])||void 0===i?void 0:i.guid,e=t?this.referenceEl.querySelector(`#${ci}${t}`):null;null==e||e.setFocus()}shiftActiveItemIndex(i){const{length:t}=this.filteredItems;this.updateActiveItemIndex((this.activeItemIndex+t+i)%t),this.scrollToActiveItem()}updateActiveItemIndex(i){this.activeItemIndex=i;let t=null;this.filteredItems.forEach(((e,s)=>{s===i?(e.active=!0,t=`${ri}${e.guid}`):e.active=!1})),this.activeDescendant=t,this.activeItemIndex>-1&&(this.activeChipIndex=-1)}isMulti(){return"single"!==this.selectionMode}renderChips(){const{activeChipIndex:t,scale:e,selectionMode:s,messages:n}=this;return this.selectedItems.map(((o,a)=>{const r={chip:!0,"chip--active":t===a},c=[...[...W(o)].reverse(),o].map((i=>i.textLabel)),l="ancestors"!==s?o.textLabel:c.join(" / ");return i("calcite-chip",{class:r,closable:!0,icon:o.icon,iconFlipRtl:o.iconFlipRtl,id:o.guid?`${ci}${o.guid}`:null,key:o.textLabel,messageOverrides:{dismissLabel:n.removeTag},onCalciteChipClose:()=>this.calciteChipCloseHandler(o),scale:e,title:l,value:o.value},l)}))}renderInput(){const{guid:t,disabled:e,placeholder:s,selectionMode:n,selectedItems:o,open:a}=this,r="single"===n,c=o[0],l=!a&&r&&!!c;return i("span",{class:{"input-wrap":!0,"input-wrap--single":r}},l&&i("span",{class:{label:!0,"label--icon":!!(null==c?void 0:c.icon)},key:"label"},c.textLabel),i("input",{"aria-activedescendant":this.activeDescendant,"aria-autocomplete":"list","aria-controls":`${hi}${t}`,"aria-label":$(this),class:{input:!0,"input--single":!0,"input--transparent":this.activeChipIndex>-1,"input--hidden":l,"input--icon":!!this.placeholderIcon},disabled:e,id:`${di}${t}`,key:"input",onBlur:this.comboboxBlurHandler,onFocus:this.comboboxFocusHandler,onInput:this.inputHandler,placeholder:s,type:"text",ref:i=>this.textInput=i}))}renderListBoxOptions(){return this.filteredItems.map((t=>i("li",{"aria-selected":r(t.selected),id:t.guid?`${ri}${t.guid}`:null,role:"option",tabindex:"-1"},t.textLabel)))}renderFloatingUIContainer(){const{setFloatingEl:t,setContainerEl:e,open:s}=this;return i("div",{"aria-hidden":"true",class:{"floating-ui-container":!0,"floating-ui-container--active":s},ref:t},i("div",{class:{[G.listContainer]:!0,[f.animation]:!0,[f.animationActive]:s},ref:e},i("ul",{class:{list:!0,"list--hide":!s}},i("slot",null))))}renderIconStart(){const{selectedItems:t,placeholderIcon:e,selectionMode:s,placeholderIconFlipRtl:n}=this,o=t[0],a=null==o?void 0:o.icon,r="single"===s;return(!this.open&&o?!!a&&r:!!this.placeholderIcon&&(!o||r))&&i("span",{class:"icon-start"},i("calcite-icon",{class:"selected-icon",flipRtl:this.open&&o?o.iconFlipRtl:n,icon:!this.open&&o?a:e,scale:"s"}))}renderIconEnd(){const{open:t}=this;return i("span",{class:"icon-end"},i("calcite-icon",{icon:t?"chevron-up":"chevron-down",scale:"s"}))}render(){var t;const{guid:e,label:n,open:o}=this,a="single"===this.selectionMode,c=!this.clearDisabled&&(null===(t=this.value)||void 0===t?void 0:t.length)>0;return i(s,{onClick:this.comboboxFocusHandler},i("div",{"aria-autocomplete":"list","aria-controls":`${hi}${e}`,"aria-expanded":r(o),"aria-haspopup":"listbox","aria-label":$(this),"aria-live":"polite","aria-owns":`${hi}${e}`,class:{wrapper:!0,"wrapper--single":a||!this.selectedItems.length,"wrapper--active":o},onClick:this.clickHandler,onKeyDown:this.keyDownHandler,role:"combobox",ref:this.setReferenceEl},i("div",{class:"grid-input"},this.renderIconStart(),!a&&this.renderChips(),i("label",{class:"screen-readers-only",htmlFor:`${di}${e}`,id:`${li}${e}`},n),this.renderInput()),c?i(ai,{disabled:this.disabled,key:"close-button",label:this.messages.clear,scale:this.scale}):null,this.renderIconEnd()),i("ul",{"aria-labelledby":`${li}${e}`,"aria-multiselectable":"true",class:"screen-readers-only",id:`${hi}${e}`,role:"listbox",tabIndex:-1},this.renderListBoxOptions()),this.renderFloatingUIContainer(),i(k,{component:this}))}static get assetsDirs(){return["assets"]}get el(){return n(this)}static get watchers(){return{open:["openHandler"],disabled:["handleDisabledChange"],maxItems:["maxItemsHandler"],overlayPositioning:["overlayPositioningHandler"],value:["valueHandler"],messageOverrides:["onMessagesChange"],flipPlacements:["flipPlacementsHandler"],selectedItems:["selectedItemsHandler"],text:["textHandler"],effectiveLocale:["effectiveLocaleChange"]}}};pi.style=":host([disabled]){cursor:default;-webkit-user-select:none;-moz-user-select:none;user-select:none;opacity:var(--calcite-ui-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host{position:relative;display:block}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}:host([scale=s]) .x-button{inline-size:1rem;block-size:1rem}:host([scale=m]) .x-button{inline-size:1.5rem;block-size:1.5rem}:host([scale=l]) .x-button{inline-size:2rem;block-size:2rem}.x-button{margin:0px;display:flex;cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;align-content:center;align-items:center;justify-content:center;align-self:center;border-width:2px;background-color:transparent;color:var(--calcite-ui-text-3);outline-color:transparent;transition:all var(--calcite-animation-timing) ease-in-out 0s, outline 0s, outline-offset 0s;border-radius:50%;border-color:transparent;background-color:var(--calcite-ui-foreground-2)}.x-button:active,.x-button:hover{color:var(--calcite-ui-text-1);background-color:var(--calcite-ui-foreground-3)}.x-button:active{border-style:solid;border-color:var(--calcite-ui-brand)}.x-button calcite-icon{color:inherit}:host([scale=s]){font-size:var(--calcite-font-size--2);--calcite-combobox-item-spacing-unit-l:0.5rem;--calcite-combobox-item-spacing-unit-s:0.25rem;--calcite-combobox-input-height:1.5rem}:host([scale=s]) .x-button{margin-inline-end:0.5rem}:host([scale=m]){font-size:var(--calcite-font-size--1);--calcite-combobox-item-spacing-unit-l:0.75rem;--calcite-combobox-item-spacing-unit-s:0.5rem;--calcite-combobox-input-height:2rem}:host([scale=m]) .x-button{margin-inline-end:0.75rem}:host([scale=l]){font-size:var(--calcite-font-size-0);--calcite-combobox-item-spacing-unit-l:1rem;--calcite-combobox-item-spacing-unit-s:0.75rem;--calcite-combobox-input-height:2.75rem}:host([scale=l]) .x-button{margin-inline-end:1rem}.wrapper{display:flex;border-width:1px;border-style:solid;border-color:var(--calcite-ui-border-input);background-color:var(--calcite-ui-foreground-1);color:var(--calcite-ui-text-1);outline-color:transparent;padding-block:calc(var(--calcite-combobox-item-spacing-unit-s) / 4);padding-inline:var(--calcite-combobox-item-spacing-unit-l)}:host(:focus-within) .wrapper,.wrapper--active{outline:2px solid var(--calcite-ui-focus-color, var(--calcite-ui-brand));outline-offset:calc(\n -2px *\n calc(\n 1 -\n 2 * clamp(\n 0,\n var(--calcite-ui-focus-offset-invert),\n 1\n )\n )\n )}.wrapper--single{padding-block:0;padding-inline:var(--calcite-combobox-item-spacing-unit-l);cursor:pointer;flex-wrap:nowrap}.grid-input{display:flex;flex-grow:1;flex-wrap:wrap;align-items:center;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding:0px}.input{flex-grow:1;-webkit-appearance:none;-moz-appearance:none;appearance:none;border-style:none;background-color:transparent;padding:0px;font-family:inherit;color:var(--calcite-ui-text-1);font-size:inherit;block-size:var(--calcite-combobox-input-height);line-height:var(--calcite-combobox-input-height);min-inline-size:120px;margin-block-end:var(--calcite-combobox-item-spacing-unit-s)}.input:focus{outline:2px solid transparent;outline-offset:2px}.input--transparent{opacity:0}.input--single{margin-block:0px;padding:0px}.wrapper--active .input-single{cursor:text}.input--hidden{pointer-events:none;inline-size:0px;min-inline-size:0px;opacity:0}.input--icon{padding-block:0;padding-inline:var(--calcite-combobox-item-spacing-unit-l)}.input-wrap{display:flex;flex-grow:1}.input-wrap--single{flex:1 1 0%;overflow:hidden}.label{pointer-events:none;display:flex;max-inline-size:100%;flex:1 1 auto;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding:0px;font-weight:var(--calcite-font-weight-normal);block-size:var(--calcite-combobox-input-height);line-height:var(--calcite-combobox-input-height)}.label--icon{padding-inline:var(--calcite-combobox-item-spacing-unit-l)}.icon-end,.icon-start{display:flex;inline-size:1rem;cursor:pointer;align-items:center}.icon-end{flex:none}.floating-ui-container{--calcite-floating-ui-z-index:var(--calcite-app-z-index-dropdown);display:block;position:absolute;z-index:var(--calcite-floating-ui-z-index);visibility:hidden}.floating-ui-container .calcite-floating-ui-anim{position:relative;transition:var(--calcite-floating-ui-transition);transition-property:transform, visibility, opacity;opacity:0;box-shadow:0 0 16px 0 rgba(0, 0, 0, 0.16);z-index:var(--calcite-app-z-index);border-radius:0.25rem}.floating-ui-container[data-placement^=bottom] .calcite-floating-ui-anim{transform:translateY(-5px)}.floating-ui-container[data-placement^=top] .calcite-floating-ui-anim{transform:translateY(5px)}.floating-ui-container[data-placement^=left] .calcite-floating-ui-anim{transform:translateX(5px)}.floating-ui-container[data-placement^=right] .calcite-floating-ui-anim{transform:translateX(-5px)}.floating-ui-container[data-placement] .calcite-floating-ui-anim--active{opacity:1;transform:translate(0)}.floating-ui-container--active{visibility:visible}@media (forced-colors: active){.wrapper,.floating-ui-container--active{border:1px solid canvasText}}.screen-readers-only{position:absolute;inline-size:1px;block-size:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap;border-width:0}.list-container{max-block-size:45vh;overflow-y:auto;background-color:var(--calcite-ui-foreground-1);inline-size:var(--calcite-dropdown-width)}.list{margin:0px;display:block;padding:0px}.list--hide{block-size:0px;overflow:hidden}.chip{margin-block:calc(var(--calcite-combobox-item-spacing-unit-s) / 4);margin-inline:0 var(--calcite-combobox-item-spacing-unit-s);max-inline-size:100%}.chip--active{background-color:var(--calcite-ui-foreground-3)}.item{display:block}::slotted(input[slot=hidden-form-input]){margin:0 !important;opacity:0 !important;outline:none !important;padding:0 !important;position:absolute !important;inset:0 !important;transform:none !important;-webkit-appearance:none !important;z-index:-1 !important}:host([hidden]){display:none}[hidden]{display:none}::slotted(calcite-combobox-item-group:not(:first-child)){padding-block-start:var(--calcite-combobox-item-spacing-unit-l)}";
|
11
|
+
*/const oi="x-button";function ai({disabled:t,key:e,label:s,onClick:n,ref:o,scale:a}){return i("button",{"aria-label":s,class:oi,disabled:t,key:e,onClick:n,tabIndex:-1,type:"button",ref:o},i("calcite-icon",{icon:"x",scale:"l"===a?"m":"s"}))}const ri="combobox-item-",ci="combobox-chip-",li="combobox-label-",hi="combobox-listbox-",di="combobox-input-",pi=class{constructor(i){t(this,i),this.calciteComboboxChange=e(this,"calciteComboboxChange",6),this.calciteComboboxFilterChange=e(this,"calciteComboboxFilterChange",6),this.calciteComboboxChipClose=e(this,"calciteComboboxChipClose",6),this.calciteComboboxBeforeClose=e(this,"calciteComboboxBeforeClose",6),this.calciteComboboxClose=e(this,"calciteComboboxClose",6),this.calciteComboboxBeforeOpen=e(this,"calciteComboboxBeforeOpen",6),this.calciteComboboxOpen=e(this,"calciteComboboxOpen",6),this.placement=p,this.internalValueChangeFlag=!1,this.textInput=null,this.mutationObserver=S("mutation",(()=>this.updateItems())),this.resizeObserver=S("resize",(()=>this.setMaxScrollerHeight())),this.guid=z(),this.inputHeight=0,this.ignoreSelectedEventsFlag=!1,this.openTransitionProp="opacity",this.setFilteredPlacements=()=>{const{el:i,flipPlacements:t}=this;this.filteredFlipPlacements=t?m(t,i):null},this.getValue=()=>{const i=this.selectedItems.map((i=>{var t;return null===(t=null==i?void 0:i.value)||void 0===t?void 0:t.toString()}));return(null==i?void 0:i.length)?i.length>1?i:i[0]:""},this.onLabelClick=()=>{this.setFocus()},this.keyDownHandler=i=>{const{key:t}=i;switch(t){case"Tab":this.activeChipIndex=-1,this.activeItemIndex=-1,this.allowCustomValues&&this.text?(this.addCustomChip(this.text,!0),i.preventDefault()):this.open&&(this.open=!1,i.preventDefault());break;case"ArrowLeft":this.previousChip(),i.preventDefault();break;case"ArrowRight":this.nextChip(),i.preventDefault();break;case"ArrowUp":i.preventDefault(),this.open&&this.shiftActiveItemIndex(-1),this.comboboxInViewport()||this.el.scrollIntoView();break;case"ArrowDown":i.preventDefault(),this.open?this.shiftActiveItemIndex(1):(this.open=!0,this.ensureRecentSelectedItemIsActive()),this.comboboxInViewport()||this.el.scrollIntoView();break;case" ":this.textInput.value||(this.open||(this.open=!0,this.shiftActiveItemIndex(1)),i.preventDefault());break;case"Home":if(!this.open)return;i.preventDefault(),this.updateActiveItemIndex(0),this.scrollToActiveItem(),this.comboboxInViewport()||this.el.scrollIntoView();break;case"End":if(!this.open)return;i.preventDefault(),this.updateActiveItemIndex(this.filteredItems.length-1),this.scrollToActiveItem(),this.comboboxInViewport()||this.el.scrollIntoView();break;case"Escape":this.clearDisabled||this.open||this.clearValue(),this.open=!1,i.preventDefault();break;case"Enter":this.activeItemIndex>-1?(this.toggleSelection(this.filteredItems[this.activeItemIndex]),i.preventDefault()):this.activeChipIndex>-1?(this.removeActiveChip(),i.preventDefault()):this.allowCustomValues&&this.text?(this.addCustomChip(this.text,!0),i.preventDefault()):i.defaultPrevented||f(this)&&i.preventDefault();break;case"Delete":case"Backspace":this.activeChipIndex>-1?(i.preventDefault(),this.removeActiveChip()):!this.text&&this.isMulti()&&(i.preventDefault(),this.removeLastChip())}},this.toggleCloseEnd=()=>{this.open=!1,this.el.removeEventListener("calciteComboboxClose",this.toggleCloseEnd)},this.toggleOpenEnd=()=>{this.open=!1,this.el.removeEventListener("calciteComboboxOpen",this.toggleOpenEnd)},this.setMaxScrollerHeight=async()=>{const{listContainerEl:i,open:t,referenceEl:e}=this;if(!i||!t)return;await this.reposition(!0);const s=this.getMaxScrollerHeight();i.style.maxHeight=s>0?`${s}px`:"",i.style.minWidth=`${e.clientWidth}px`,await this.reposition(!0)},this.calciteChipCloseHandler=i=>{this.open=!1;const t=this.items.find((t=>t===i));t&&this.toggleSelection(t,!1),this.calciteComboboxChipClose.emit()},this.clickHandler=i=>{const t=i.composedPath();return t.some((i=>"CALCITE-CHIP"===i.tagName))?(this.open=!1,void i.preventDefault()):t.some((i=>{var t;return null===(t=i.classList)||void 0===t?void 0:t.contains(oi)}))?(this.clearValue(),void i.preventDefault()):(this.open=!this.open,void this.ensureRecentSelectedItemIsActive())},this.setInactiveIfNotContained=i=>{const t=i.composedPath();!this.open||t.includes(this.el)||t.includes(this.referenceEl)||(this.allowCustomValues&&this.text.trim().length&&this.addCustomChip(this.text),"single"===this.selectionMode&&(this.textInput&&(this.textInput.value=""),this.text="",this.filterItems(""),this.updateActiveItemIndex(-1)),this.open=!1)},this.setFloatingEl=i=>{this.floatingEl=i,u(this,this.referenceEl,this.floatingEl)},this.setContainerEl=i=>{this.resizeObserver.observe(i),this.listContainerEl=i,this.transitionEl=i},this.setReferenceEl=i=>{this.referenceEl=i,u(this,this.referenceEl,this.floatingEl)},this.inputHandler=i=>{const t=i.target.value;this.text=t,this.filterItems(t),t&&(this.activeChipIndex=-1)},this.filterItems=(()=>{const i=(i,t)=>i&&t.some((({label:t,value:e})=>i.tagName===V?e===i.label:e===i.textLabel||e===i.value||t===i.textLabel||t===i.value));return Y((t=>{const e=o(this.data,t);this.getCombinedItems().forEach((t=>{const s=!i(t,e);t.hidden=s;const[n,o]=t.ancestors;(i(n,e)||i(o,e))&&(t.hidden=!1),s||t.ancestors.forEach((i=>i.hidden=!1))})),this.filteredItems=this.getFilteredItems(),this.calciteComboboxFilterChange.emit()}),100)})(),this.internalComboboxChangeEvent=()=>{this.calciteComboboxChange.emit()},this.emitComboboxChange=Y(this.internalComboboxChangeEvent,0),this.updateItems=()=>{this.items=this.getItems(),this.groupItems=this.getGroupItems(),this.data=this.getData(),this.selectedItems=this.getSelectedItems(),this.filteredItems=this.getFilteredItems(),this.needsIcon=this.getNeedsIcon(),this.allowCustomValues||this.setMaxScrollerHeight(),this.groupItems.forEach(((i,t,e)=>{0===t&&(i.afterEmptyGroup=!1);const s=e[t+1];s&&(s.afterEmptyGroup=0===i.children.length)}))},this.scrollToActiveItem=()=>{const i=this.filteredItems[this.activeItemIndex];if(!i)return;const t=this.calculateSingleItemHeight(i),{offsetHeight:e,scrollTop:s}=this.listContainerEl;e+s<i.offsetTop+t?this.listContainerEl.scrollTop=i.offsetTop-e+t:i.offsetTop<s&&(this.listContainerEl.scrollTop=i.offsetTop)},this.comboboxFocusHandler=()=>{var i;this.disabled||null===(i=this.textInput)||void 0===i||i.focus()},this.comboboxBlurHandler=i=>{this.setInactiveIfNotContained(i)},this.clearDisabled=!1,this.open=!1,this.disabled=!1,this.form=void 0,this.label=void 0,this.placeholder=void 0,this.placeholderIcon=void 0,this.placeholderIconFlipRtl=!1,this.maxItems=0,this.name=void 0,this.allowCustomValues=void 0,this.overlayPositioning="absolute",this.required=!1,this.selectionMode="multiple",this.scale="m",this.value=null,this.flipPlacements=void 0,this.messages=void 0,this.messageOverrides=void 0,this.selectedItems=[],this.filteredItems=[],this.items=[],this.groupItems=[],this.needsIcon=void 0,this.activeItemIndex=-1,this.activeChipIndex=-1,this.activeDescendant="",this.text="",this.effectiveLocale=void 0,this.defaultMessages=void 0}openHandler(){_(this),this.disabled?this.open=!1:this.setMaxScrollerHeight()}handleDisabledChange(i){i||(this.open=!1)}maxItemsHandler(){this.setMaxScrollerHeight()}overlayPositioningHandler(){this.reposition(!0)}valueHandler(i){if(!this.internalValueChangeFlag){const t=this.getItems();Array.isArray(i)?t.forEach((t=>t.selected=i.includes(t.value))):t.forEach(i?t=>t.selected=i===t.value:i=>i.selected=!1),this.updateItems()}}onMessagesChange(){}flipPlacementsHandler(){this.setFilteredPlacements(),this.reposition(!0)}selectedItemsHandler(){this.internalValueChangeFlag=!0,this.value=this.getValue(),this.internalValueChangeFlag=!1}documentClickHandler(i){!this.disabled&&a(i)&&this.setInactiveIfNotContained(i)}calciteComboboxItemChangeHandler(i){if(this.ignoreSelectedEventsFlag)return;const t=i.target,e=this.filteredItems.indexOf(t);this.updateActiveItemIndex(e),this.toggleSelection(t,t.selected)}async reposition(i=!1){const{floatingEl:t,referenceEl:e,placement:s,overlayPositioning:n,filteredFlipPlacements:o}=this;return b(this,{floatingEl:t,referenceEl:e,overlayPositioning:n,placement:s,flipPlacements:o,type:"menu"},i)}async setFocus(){var i;await j(this),null===(i=this.textInput)||void 0===i||i.focus(),this.activeChipIndex=-1,this.activeItemIndex=-1}connectedCallback(){var i;C(this),L(this),F(this),this.internalValueChangeFlag=!0,this.value=this.getValue(),this.internalValueChangeFlag=!1,null===(i=this.mutationObserver)||void 0===i||i.observe(this.el,{childList:!0,subtree:!0}),H(this),x(this),this.setFilteredPlacements(),this.reposition(!0),this.open&&(this.openHandler(),_(this))}async componentWillLoad(){O(this),this.updateItems(),await R(this)}componentDidLoad(){w(this,this.getValue()),this.reposition(!0),A(this)}componentDidRender(){this.el.offsetHeight!==this.inputHeight&&(this.reposition(!0),this.inputHeight=this.el.offsetHeight),I(this)}disconnectedCallback(){var i,t;null===(i=this.mutationObserver)||void 0===i||i.disconnect(),null===(t=this.resizeObserver)||void 0===t||t.disconnect(),D(this),E(this),y(this),g(this,this.referenceEl,this.floatingEl),P(this),B(this)}textHandler(){this.updateActiveItemIndex(-1)}effectiveLocaleChange(){M(this,this.effectiveLocale)}clearValue(){this.ignoreSelectedEventsFlag=!0,this.items.forEach((i=>i.selected=!1)),this.ignoreSelectedEventsFlag=!1,this.selectedItems=[],this.emitComboboxChange(),this.open=!1,this.updateActiveItemIndex(-1),this.resetText(),this.filterItems(""),this.setFocus()}comboboxInViewport(){const i=this.el.getBoundingClientRect();return i.top>=0&&i.left>=0&&i.right<=(window.innerWidth||document.documentElement.clientWidth)&&i.bottom<=(window.innerHeight||document.documentElement.clientHeight)}onBeforeOpen(){this.scrollToActiveItem(),this.calciteComboboxBeforeOpen.emit()}onOpen(){this.calciteComboboxOpen.emit()}onBeforeClose(){this.calciteComboboxBeforeClose.emit()}onClose(){this.calciteComboboxClose.emit()}ensureRecentSelectedItemIsActive(){const{selectedItems:i}=this,t=0===i.length?0:this.items.indexOf(i[i.length-1]);this.updateActiveItemIndex(t)}getMaxScrollerHeight(){const i=this.getCombinedItems().filter((i=>!i.hidden)),{maxItems:t}=this;let e=0,s=0;return i.length>t&&i.forEach((i=>{if(e<t&&t>0){const t=this.calculateSingleItemHeight(i);t>0&&(s+=t,e++)}})),s}calculateSingleItemHeight(i){if(!i)return;let t=i.offsetHeight;return Array.from(i.querySelectorAll(T)).map((i=>null==i?void 0:i.offsetHeight)).forEach((i=>{t-=i})),t}getCombinedItems(){return[...this.groupItems,...this.items]}toggleSelection(i,t=!i.selected){i&&(this.isMulti()?(i.selected=t,this.updateAncestors(i),this.selectedItems=this.getSelectedItems(),this.emitComboboxChange(),this.resetText(),this.filterItems("")):(this.ignoreSelectedEventsFlag=!0,this.items.forEach((e=>e.selected=e===i&&t)),this.ignoreSelectedEventsFlag=!1,this.selectedItems=this.getSelectedItems(),this.emitComboboxChange(),this.textInput&&(this.textInput.value=i.textLabel),this.open=!1,this.updateActiveItemIndex(-1),this.resetText(),this.filterItems("")))}updateAncestors(i){if("ancestors"!==this.selectionMode)return;const t=W(i),e=q(i);i.selected?t.forEach((i=>{i.selected=!0})):(e.forEach((i=>i.selected=!1)),[...t].forEach((i=>{N(i)||(i.selected=!1)})))}getFilteredItems(){return this.items.filter((i=>!i.hidden))}getSelectedItems(){if(!this.isMulti()){const i=this.items.find((({selected:i})=>i));return i?[i]:[]}return this.items.filter((i=>i.selected&&("ancestors"!==this.selectionMode||!N(i)))).sort(((i,t)=>{const e=this.selectedItems.indexOf(i),s=this.selectedItems.indexOf(t);return e>-1&&s>-1?e-s:s-e}))}getData(){return this.items.map((i=>({filterDisabled:i.filterDisabled,value:i.value,label:i.textLabel})))}getNeedsIcon(){return"single"===this.selectionMode&&this.items.some((i=>i.icon))}resetText(){this.textInput&&(this.textInput.value=""),this.text=""}getItems(){return Array.from(this.el.querySelectorAll(U)).filter((i=>!i.disabled))}getGroupItems(){return Array.from(this.el.querySelectorAll(V))}addCustomChip(i,t){const e=this.items.find((t=>t.textLabel===i));if(e)this.toggleSelection(e,!0);else{this.isMulti()||this.toggleSelection(this.selectedItems[this.selectedItems.length-1],!1);const e=document.createElement(U);e.value=i,e.textLabel=i,e.selected=!0,this.el.appendChild(e),this.resetText(),t&&this.setFocus(),this.updateItems(),this.filterItems(""),this.emitComboboxChange()}}removeActiveChip(){this.toggleSelection(this.selectedItems[this.activeChipIndex],!1),this.setFocus()}removeLastChip(){this.toggleSelection(this.selectedItems[this.selectedItems.length-1],!1),this.setFocus()}previousChip(){if(this.text)return;const i=this.activeChipIndex;this.activeChipIndex=-1===i?this.selectedItems.length-1:Math.max(i-1,0),this.updateActiveItemIndex(-1),this.focusChip()}nextChip(){if(this.text||-1===this.activeChipIndex)return;const i=this.activeChipIndex+1;i>this.selectedItems.length-1?(this.activeChipIndex=-1,this.setFocus()):(this.activeChipIndex=i,this.focusChip()),this.updateActiveItemIndex(-1)}focusChip(){var i;const t=null===(i=this.selectedItems[this.activeChipIndex])||void 0===i?void 0:i.guid,e=t?this.referenceEl.querySelector(`#${ci}${t}`):null;null==e||e.setFocus()}shiftActiveItemIndex(i){const{length:t}=this.filteredItems;this.updateActiveItemIndex((this.activeItemIndex+t+i)%t),this.scrollToActiveItem()}updateActiveItemIndex(i){this.activeItemIndex=i;let t=null;this.filteredItems.forEach(((e,s)=>{s===i?(e.active=!0,t=`${ri}${e.guid}`):e.active=!1})),this.activeDescendant=t,this.activeItemIndex>-1&&(this.activeChipIndex=-1)}isMulti(){return"single"!==this.selectionMode}renderChips(){const{activeChipIndex:t,scale:e,selectionMode:s,messages:n}=this;return this.selectedItems.map(((o,a)=>{const r={chip:!0,"chip--active":t===a},c=[...[...W(o)].reverse(),o].map((i=>i.textLabel)),l="ancestors"!==s?o.textLabel:c.join(" / ");return i("calcite-chip",{class:r,closable:!0,icon:o.icon,iconFlipRtl:o.iconFlipRtl,id:o.guid?`${ci}${o.guid}`:null,key:o.textLabel,messageOverrides:{dismissLabel:n.removeTag},onCalciteChipClose:()=>this.calciteChipCloseHandler(o),scale:e,title:l,value:o.value},l)}))}renderInput(){const{guid:t,disabled:e,placeholder:s,selectionMode:n,selectedItems:o,open:a}=this,r="single"===n,c=o[0],l=!a&&r&&!!c;return i("span",{class:{"input-wrap":!0,"input-wrap--single":r}},l&&i("span",{class:{label:!0,"label--icon":!!(null==c?void 0:c.icon)},key:"label"},c.textLabel),i("input",{"aria-activedescendant":this.activeDescendant,"aria-autocomplete":"list","aria-controls":`${hi}${t}`,"aria-label":$(this),class:{input:!0,"input--single":!0,"input--transparent":this.activeChipIndex>-1,"input--hidden":l,"input--icon":!!this.placeholderIcon},disabled:e,id:`${di}${t}`,key:"input",onBlur:this.comboboxBlurHandler,onFocus:this.comboboxFocusHandler,onInput:this.inputHandler,placeholder:s,type:"text",ref:i=>this.textInput=i}))}renderListBoxOptions(){return this.filteredItems.map((t=>i("li",{"aria-selected":r(t.selected),id:t.guid?`${ri}${t.guid}`:null,role:"option",tabindex:"-1"},t.textLabel)))}renderFloatingUIContainer(){const{setFloatingEl:t,setContainerEl:e,open:s}=this;return i("div",{"aria-hidden":"true",class:{"floating-ui-container":!0,"floating-ui-container--active":s},ref:t},i("div",{class:{[G.listContainer]:!0,[v.animation]:!0,[v.animationActive]:s},ref:e},i("ul",{class:{list:!0,"list--hide":!s}},i("slot",null))))}renderIconStart(){const{selectedItems:t,placeholderIcon:e,selectionMode:s,placeholderIconFlipRtl:n}=this,o=t[0],a=null==o?void 0:o.icon,r="single"===s;return(!this.open&&o?!!a&&r:!!this.placeholderIcon&&(!o||r))&&i("span",{class:"icon-start"},i("calcite-icon",{class:"selected-icon",flipRtl:this.open&&o?o.iconFlipRtl:n,icon:!this.open&&o?a:e,scale:"s"}))}renderIconEnd(){const{open:t}=this;return i("span",{class:"icon-end"},i("calcite-icon",{icon:t?"chevron-up":"chevron-down",scale:"s"}))}render(){var t;const{guid:e,label:n,open:o}=this,a="single"===this.selectionMode,c=!this.clearDisabled&&(null===(t=this.value)||void 0===t?void 0:t.length)>0;return i(s,{onClick:this.comboboxFocusHandler},i("div",{"aria-autocomplete":"list","aria-controls":`${hi}${e}`,"aria-expanded":r(o),"aria-haspopup":"listbox","aria-label":$(this),"aria-live":"polite","aria-owns":`${hi}${e}`,class:{wrapper:!0,"wrapper--single":a||!this.selectedItems.length,"wrapper--active":o},onClick:this.clickHandler,onKeyDown:this.keyDownHandler,role:"combobox",ref:this.setReferenceEl},i("div",{class:"grid-input"},this.renderIconStart(),!a&&this.renderChips(),i("label",{class:"screen-readers-only",htmlFor:`${di}${e}`,id:`${li}${e}`},n),this.renderInput()),c?i(ai,{disabled:this.disabled,key:"close-button",label:this.messages.clear,scale:this.scale}):null,this.renderIconEnd()),i("ul",{"aria-labelledby":`${li}${e}`,"aria-multiselectable":"true",class:"screen-readers-only",id:`${hi}${e}`,role:"listbox",tabIndex:-1},this.renderListBoxOptions()),this.renderFloatingUIContainer(),i(k,{component:this}))}static get assetsDirs(){return["assets"]}get el(){return n(this)}static get watchers(){return{open:["openHandler"],disabled:["handleDisabledChange"],maxItems:["maxItemsHandler"],overlayPositioning:["overlayPositioningHandler"],value:["valueHandler"],messageOverrides:["onMessagesChange"],flipPlacements:["flipPlacementsHandler"],selectedItems:["selectedItemsHandler"],text:["textHandler"],effectiveLocale:["effectiveLocaleChange"]}}};pi.style=":host([disabled]){cursor:default;-webkit-user-select:none;-moz-user-select:none;user-select:none;opacity:var(--calcite-ui-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host{position:relative;display:block}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}:host([scale=s]) .x-button{inline-size:1rem;block-size:1rem}:host([scale=m]) .x-button{inline-size:1.5rem;block-size:1.5rem}:host([scale=l]) .x-button{inline-size:2rem;block-size:2rem}.x-button{margin:0px;display:flex;cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;align-content:center;align-items:center;justify-content:center;align-self:center;border-width:2px;background-color:transparent;color:var(--calcite-ui-text-3);outline-color:transparent;transition:all var(--calcite-animation-timing) ease-in-out 0s, outline 0s, outline-offset 0s;border-radius:50%;border-color:transparent;background-color:var(--calcite-ui-foreground-2)}.x-button:active,.x-button:hover{color:var(--calcite-ui-text-1);background-color:var(--calcite-ui-foreground-3)}.x-button:active{border-style:solid;border-color:var(--calcite-ui-brand)}.x-button calcite-icon{color:inherit}:host([scale=s]){font-size:var(--calcite-font-size--2);--calcite-combobox-item-spacing-unit-l:0.5rem;--calcite-combobox-item-spacing-unit-s:0.25rem;--calcite-combobox-input-height:1.5rem}:host([scale=s]) .x-button{margin-inline-end:0.5rem}:host([scale=m]){font-size:var(--calcite-font-size--1);--calcite-combobox-item-spacing-unit-l:0.75rem;--calcite-combobox-item-spacing-unit-s:0.5rem;--calcite-combobox-input-height:2rem}:host([scale=m]) .x-button{margin-inline-end:0.75rem}:host([scale=l]){font-size:var(--calcite-font-size-0);--calcite-combobox-item-spacing-unit-l:1rem;--calcite-combobox-item-spacing-unit-s:0.75rem;--calcite-combobox-input-height:2.75rem}:host([scale=l]) .x-button{margin-inline-end:1rem}.wrapper{display:flex;border-width:1px;border-style:solid;border-color:var(--calcite-ui-border-input);background-color:var(--calcite-ui-foreground-1);color:var(--calcite-ui-text-1);outline-color:transparent;padding-block:calc(var(--calcite-combobox-item-spacing-unit-s) / 4);padding-inline:var(--calcite-combobox-item-spacing-unit-l)}:host(:focus-within) .wrapper,.wrapper--active{outline:2px solid var(--calcite-ui-focus-color, var(--calcite-ui-brand));outline-offset:calc(\n -2px *\n calc(\n 1 -\n 2 * clamp(\n 0,\n var(--calcite-ui-focus-offset-invert),\n 1\n )\n )\n )}.wrapper--single{padding-block:0;padding-inline:var(--calcite-combobox-item-spacing-unit-l);cursor:pointer;flex-wrap:nowrap}.grid-input{display:flex;flex-grow:1;flex-wrap:wrap;align-items:center;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding:0px}.input{flex-grow:1;-webkit-appearance:none;-moz-appearance:none;appearance:none;border-style:none;background-color:transparent;padding:0px;font-family:inherit;color:var(--calcite-ui-text-1);font-size:inherit;block-size:var(--calcite-combobox-input-height);line-height:var(--calcite-combobox-input-height);min-inline-size:120px;margin-block-end:var(--calcite-combobox-item-spacing-unit-s)}.input:focus{outline:2px solid transparent;outline-offset:2px}.input--transparent{opacity:0}.input--single{margin-block:0px;padding:0px}.wrapper--active .input-single{cursor:text}.input--hidden{pointer-events:none;inline-size:0px;min-inline-size:0px;opacity:0}.input--icon{padding-block:0;padding-inline:var(--calcite-combobox-item-spacing-unit-l)}.input-wrap{display:flex;flex-grow:1}.input-wrap--single{flex:1 1 0%;overflow:hidden}.label{pointer-events:none;display:flex;max-inline-size:100%;flex:1 1 auto;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding:0px;font-weight:var(--calcite-font-weight-normal);block-size:var(--calcite-combobox-input-height);line-height:var(--calcite-combobox-input-height)}.label--icon{padding-inline:var(--calcite-combobox-item-spacing-unit-l)}.icon-end,.icon-start{display:flex;inline-size:1rem;cursor:pointer;align-items:center}.icon-end{flex:none}.floating-ui-container{--calcite-floating-ui-z-index:var(--calcite-app-z-index-dropdown);display:block;position:absolute;z-index:var(--calcite-floating-ui-z-index);visibility:hidden}.floating-ui-container .calcite-floating-ui-anim{position:relative;transition:var(--calcite-floating-ui-transition);transition-property:transform, visibility, opacity;opacity:0;box-shadow:0 0 16px 0 rgba(0, 0, 0, 0.16);z-index:var(--calcite-app-z-index);border-radius:0.25rem}.floating-ui-container[data-placement^=bottom] .calcite-floating-ui-anim{transform:translateY(-5px)}.floating-ui-container[data-placement^=top] .calcite-floating-ui-anim{transform:translateY(5px)}.floating-ui-container[data-placement^=left] .calcite-floating-ui-anim{transform:translateX(5px)}.floating-ui-container[data-placement^=right] .calcite-floating-ui-anim{transform:translateX(-5px)}.floating-ui-container[data-placement] .calcite-floating-ui-anim--active{opacity:1;transform:translate(0)}.floating-ui-container--active{visibility:visible}@media (forced-colors: active){.wrapper,.floating-ui-container--active{border:1px solid canvasText}}.screen-readers-only{position:absolute;inline-size:1px;block-size:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap;border-width:0}.list-container{max-block-size:45vh;overflow-y:auto;background-color:var(--calcite-ui-foreground-1);inline-size:var(--calcite-dropdown-width)}.list{margin:0px;display:block;padding:0px}.list--hide{block-size:0px;overflow:hidden}.chip{margin-block:calc(var(--calcite-combobox-item-spacing-unit-s) / 4);margin-inline:0 var(--calcite-combobox-item-spacing-unit-s);max-inline-size:100%}.chip--active{background-color:var(--calcite-ui-foreground-3)}.item{display:block}::slotted(input[slot=hidden-form-input]){margin:0 !important;opacity:0 !important;outline:none !important;padding:0 !important;position:absolute !important;inset:0 !important;transform:none !important;-webkit-appearance:none !important;z-index:-1 !important}:host([hidden]){display:none}[hidden]{display:none}::slotted(calcite-combobox-item-group:not(:first-child)){padding-block-start:var(--calcite-combobox-item-spacing-unit-l)}";
|
12
12
|
/*!
|
13
13
|
* All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
14
14
|
* See https://github.com/Esri/calcite-design-system/blob/main/LICENSE.md for details.
|
@@ -20,16 +20,16 @@ const mi="icon",ui="icon--active",bi="icon--indent",gi=class{constructor(i){t(th
|
|
20
20
|
* See https://github.com/Esri/calcite-design-system/blob/main/LICENSE.md for details.
|
21
21
|
* v1.6.1
|
22
22
|
*/
|
23
|
-
const
|
23
|
+
const vi=class{constructor(i){t(this,i),this.calciteDropdownSelect=e(this,"calciteDropdownSelect",6),this.calciteDropdownBeforeClose=e(this,"calciteDropdownBeforeClose",6),this.calciteDropdownClose=e(this,"calciteDropdownClose",6),this.calciteDropdownBeforeOpen=e(this,"calciteDropdownBeforeOpen",6),this.calciteDropdownOpen=e(this,"calciteDropdownOpen",6),this.items=[],this.groups=[],this.mutationObserver=S("mutation",(()=>this.updateItems())),this.resizeObserver=S("resize",(i=>this.resizeObserverCallback(i))),this.openTransitionProp="opacity",this.guid=`calcite-dropdown-${z()}`,this.defaultAssignedElements=[],this.slotChangeHandler=i=>{this.defaultAssignedElements=i.target.assignedElements({flatten:!0}),this.updateItems()},this.setFilteredPlacements=()=>{const{el:i,flipPlacements:t}=this;this.filteredFlipPlacements=t?m(t,i):null},this.updateTriggers=i=>{this.triggers=i.target.assignedElements({flatten:!0}),this.reposition(!0)},this.updateItems=()=>{this.items=this.groups.map((i=>Array.from(null==i?void 0:i.querySelectorAll("calcite-dropdown-item")))).reduce(((i,t)=>[...i,...t]),[]),this.updateSelectedItems(),this.reposition(!0)},this.updateGroups=i=>{const t=i.target.assignedElements({flatten:!0}).filter((i=>null==i?void 0:i.matches("calcite-dropdown-group")));this.groups=t,this.updateItems()},this.resizeObserverCallback=i=>{i.forEach((i=>{const{target:t}=i;t===this.referenceEl?this.setDropdownWidth():t===this.scrollerEl&&this.setMaxScrollerHeight()}))},this.setDropdownWidth=()=>{const{referenceEl:i,scrollerEl:t}=this,e=null==i?void 0:i.clientWidth;e&&t&&(t.style.minWidth=`${e}px`)},this.setMaxScrollerHeight=()=>{const{scrollerEl:i}=this;if(!i)return;this.reposition(!0);const t=this.getMaxScrollerHeight();i.style.maxHeight=t>0?`${t}px`:"",this.reposition(!0)},this.setScrollerAndTransitionEl=i=>{this.resizeObserver.observe(i),this.scrollerEl=i,this.transitionEl=i},this.setReferenceEl=i=>{this.referenceEl=i,u(this,this.referenceEl,this.floatingEl),this.resizeObserver.observe(i)},this.setFloatingEl=i=>{this.floatingEl=i,u(this,this.referenceEl,this.floatingEl)},this.keyDownHandler=i=>{if(i.target!==this.referenceEl)return;const{defaultPrevented:t,key:e}=i;if(!t){if(this.open){if("Escape"===e)return this.closeCalciteDropdown(),void i.preventDefault();if(i.shiftKey&&"Tab"===e)return this.closeCalciteDropdown(),void i.preventDefault()}Z(e)?(this.openCalciteDropdown(),i.preventDefault()):"Escape"===e&&(this.closeCalciteDropdown(),i.preventDefault())}},this.focusOnFirstActiveOrFirstItem=()=>{this.getFocusableElement(this.items.find((i=>i.selected))||this.items[0])},this.toggleOpenEnd=()=>{this.focusOnFirstActiveOrFirstItem(),this.el.removeEventListener("calciteDropdownOpen",this.toggleOpenEnd)},this.openCalciteDropdown=()=>{this.open=!this.open,this.open&&this.el.addEventListener("calciteDropdownOpen",this.toggleOpenEnd)},this.open=!1,this.closeOnSelectDisabled=!1,this.disabled=!1,this.flipPlacements=void 0,this.maxItems=0,this.overlayPositioning="absolute",this.placement=p,this.scale="m",this.selectedItems=[],this.type="click",this.width=void 0}openHandler(i){if(!this.disabled)return i&&this.reposition(!0),void _(this);this.open=!1}handleDisabledChange(i){i||(this.open=!1)}flipPlacementsHandler(){this.setFilteredPlacements(),this.reposition(!0)}maxItemsHandler(){this.setMaxScrollerHeight()}overlayPositioningHandler(){this.reposition(!0)}placementHandler(){this.reposition(!0)}async setFocus(){await j(this),this.el.focus()}connectedCallback(){var i;null===(i=this.mutationObserver)||void 0===i||i.observe(this.el,{childList:!0,subtree:!0}),this.setFilteredPlacements(),this.reposition(!0),this.open&&(this.openHandler(this.open),_(this)),C(this)}componentWillLoad(){O(this)}componentDidLoad(){A(this),this.reposition(!0)}componentDidRender(){I(this)}disconnectedCallback(){var i,t;null===(i=this.mutationObserver)||void 0===i||i.disconnect(),null===(t=this.resizeObserver)||void 0===t||t.disconnect(),D(this),g(this,this.referenceEl,this.floatingEl)}render(){const{open:t,guid:e}=this;return i(s,null,i("div",{class:"calcite-trigger-container",id:`${e}-menubutton`,onClick:this.openCalciteDropdown,onKeyDown:this.keyDownHandler,ref:this.setReferenceEl},i("slot",{"aria-controls":`${e}-menu`,"aria-expanded":r(t),"aria-haspopup":"menu",name:"trigger",onSlotchange:this.updateTriggers})),i("div",{"aria-hidden":r(!t),class:"calcite-dropdown-wrapper",ref:this.setFloatingEl},i("div",{"aria-labelledby":`${e}-menubutton`,class:{"calcite-dropdown-content":!0,[v.animation]:!0,[v.animationActive]:t},id:`${e}-menu`,role:"menu",ref:this.setScrollerAndTransitionEl},i("slot",{onSlotchange:this.updateGroups}))))}async reposition(i=!1){const{floatingEl:t,referenceEl:e,placement:s,overlayPositioning:n,filteredFlipPlacements:o}=this;return b(this,{floatingEl:t,referenceEl:e,overlayPositioning:n,placement:s,flipPlacements:o,type:"menu"},i)}closeCalciteDropdownOnClick(i){!this.disabled&&a(i)&&this.open&&!i.composedPath().includes(this.el)&&this.closeCalciteDropdown(!1)}closeCalciteDropdownOnEvent(i){this.closeCalciteDropdown(),i.stopPropagation()}closeCalciteDropdownOnOpenEvent(i){i.composedPath().includes(this.el)||(this.open=!1)}pointerEnterHandler(){this.disabled||"hover"!==this.type||this.openCalciteDropdown()}pointerLeaveHandler(){this.disabled||"hover"!==this.type||this.closeCalciteDropdown()}calciteInternalDropdownItemKeyEvent(i){const{keyboardEvent:t}=i.detail,e=t.target;switch(t.key){case"Tab":this.items.indexOf(e)!==this.items.length-1||t.shiftKey?0===this.items.indexOf(e)&&t.shiftKey&&this.closeCalciteDropdown():this.closeCalciteDropdown();break;case"ArrowDown":h(this.items,e,"next");break;case"ArrowUp":h(this.items,e,"previous");break;case"Home":h(this.items,e,"first");break;case"End":h(this.items,e,"last")}i.stopPropagation()}handleItemSelect(i){this.updateSelectedItems(),i.stopPropagation(),this.calciteDropdownSelect.emit(),this.closeOnSelectDisabled&&"none"!==i.detail.requestedDropdownGroup.selectionMode||this.closeCalciteDropdown(),i.stopPropagation()}onBeforeOpen(){this.calciteDropdownBeforeOpen.emit()}onOpen(){this.calciteDropdownOpen.emit()}onBeforeClose(){this.calciteDropdownBeforeClose.emit()}onClose(){this.calciteDropdownClose.emit()}updateSelectedItems(){this.selectedItems=this.items.filter((i=>i.selected))}getMaxScrollerHeight(){const{maxItems:i,items:t}=this;let e,s=0,n=0;return this.groups.forEach((t=>{i>0&&s<i&&Array.from(t.children).forEach(((t,o)=>{0===o&&(isNaN(e)&&(e=t.offsetTop),n+=e),s<i&&(n+=t.offsetHeight,s+=1)}))})),t.length>i?n:0}closeCalciteDropdown(i=!0){this.open=!1,i&&d(this.triggers[0])}getFocusableElement(i){if(!i)return;const t=i.attributes.isLink?i.shadowRoot.querySelector("a"):i;d(t)}static get delegatesFocus(){return!0}get el(){return n(this)}static get watchers(){return{open:["openHandler"],disabled:["handleDisabledChange"],flipPlacements:["flipPlacementsHandler"],maxItems:["maxItemsHandler"],overlayPositioning:["overlayPositioningHandler"],placement:["placementHandler"]}}};vi.style=":host([disabled]){cursor:default;-webkit-user-select:none;-moz-user-select:none;user-select:none;opacity:var(--calcite-ui-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host{display:inline-flex;flex:0 1 auto}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}:host .calcite-dropdown-wrapper{--calcite-floating-ui-z-index:var(--calcite-app-z-index-dropdown);display:block;position:absolute;z-index:var(--calcite-floating-ui-z-index);visibility:hidden}.calcite-dropdown-wrapper .calcite-floating-ui-anim{position:relative;transition:var(--calcite-floating-ui-transition);transition-property:transform, visibility, opacity;opacity:0;box-shadow:0 0 16px 0 rgba(0, 0, 0, 0.16);z-index:var(--calcite-app-z-index);border-radius:0.25rem}.calcite-dropdown-wrapper[data-placement^=bottom] .calcite-floating-ui-anim{transform:translateY(-5px)}.calcite-dropdown-wrapper[data-placement^=top] .calcite-floating-ui-anim{transform:translateY(5px)}.calcite-dropdown-wrapper[data-placement^=left] .calcite-floating-ui-anim{transform:translateX(5px)}.calcite-dropdown-wrapper[data-placement^=right] .calcite-floating-ui-anim{transform:translateX(-5px)}.calcite-dropdown-wrapper[data-placement] .calcite-floating-ui-anim--active{opacity:1;transform:translate(0)}:host([open]) .calcite-dropdown-wrapper{visibility:visible}:host .calcite-dropdown-content{max-block-size:45vh;inline-size:auto;overflow-y:auto;overflow-x:hidden;background-color:var(--calcite-ui-foreground-1);inline-size:var(--calcite-dropdown-width)}.calcite-trigger-container{position:relative;display:flex;flex:1 1 auto;word-wrap:break-word;word-break:break-word}@media (forced-colors: active){:host([open]) .calcite-dropdown-wrapper{border:1px solid canvasText}}:host([width=s]){--calcite-dropdown-width:12rem}:host([width=m]){--calcite-dropdown-width:14rem}:host([width=l]){--calcite-dropdown-width:16rem}:host([hidden]){display:none}[hidden]{display:none}";
|
24
24
|
/*!
|
25
25
|
* All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
26
26
|
* See https://github.com/Esri/calcite-design-system/blob/main/LICENSE.md for details.
|
27
27
|
* v1.6.1
|
28
28
|
*/
|
29
|
-
const
|
29
|
+
const fi=class{constructor(i){t(this,i),this.calciteInternalDropdownItemChange=e(this,"calciteInternalDropdownItemChange",6),this.groupTitle=void 0,this.selectionMode="single",this.scale=void 0}componentWillLoad(){this.groupPosition=this.getGroupPosition()}render(){const t=this.scale||c(this.el,"scale","m"),e=this.groupTitle?i("span",{"aria-hidden":"true",class:"dropdown-title"},this.groupTitle):null,n=this.groupPosition>0?i("div",{class:"dropdown-separator",role:"separator"}):null;return i(s,{"aria-label":this.groupTitle,role:"group"},i("div",{class:{container:!0,"container--s":"s"===t,"container--m":"m"===t,"container--l":"l"===t},title:this.groupTitle},n,e,i("slot",null)))}updateActiveItemOnChange(i){this.requestedDropdownGroup=i.detail.requestedDropdownGroup,this.requestedDropdownItem=i.detail.requestedDropdownItem,this.calciteInternalDropdownItemChange.emit({requestedDropdownGroup:this.requestedDropdownGroup,requestedDropdownItem:this.requestedDropdownItem})}getGroupPosition(){return Array.prototype.indexOf.call(this.el.parentElement.querySelectorAll("calcite-dropdown-group"),this.el)}static get delegatesFocus(){return!0}get el(){return n(this)}};fi.style=":host{position:relative;display:block}.container{text-align:start}.container--s{font-size:var(--calcite-font-size--2);line-height:1rem}.container--s .dropdown-title{padding:0.5rem}.container--m{font-size:var(--calcite-font-size--1);line-height:1rem}.container--m .dropdown-title{padding:0.75rem}.container--l{font-size:var(--calcite-font-size-0);line-height:1.25rem}.container--l .dropdown-title{padding:1rem}.dropdown-title{margin-block-end:-1px;display:block;cursor:default;overflow-wrap:break-word;border-width:0px;border-block-end-width:1px;border-style:solid;border-color:var(--calcite-ui-border-3);font-weight:var(--calcite-font-weight-bold);color:var(--calcite-ui-text-2)}.dropdown-separator{display:block;block-size:1px;background-color:var(--calcite-ui-border-3)}:host([hidden]){display:none}[hidden]{display:none}";
|
30
30
|
/*!
|
31
31
|
* All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
32
32
|
* See https://github.com/Esri/calcite-design-system/blob/main/LICENSE.md for details.
|
33
33
|
* v1.6.1
|
34
34
|
*/
|
35
|
-
const xi=class{constructor(i){t(this,i),this.calciteDropdownItemSelect=e(this,"calciteDropdownItemSelect",6),this.calciteInternalDropdownItemSelect=e(this,"calciteInternalDropdownItemSelect",6),this.calciteInternalDropdownItemKeyEvent=e(this,"calciteInternalDropdownItemKeyEvent",6),this.calciteInternalDropdownCloseRequest=e(this,"calciteInternalDropdownCloseRequest",6),this.scale="m",this.selected=!1,this.iconFlipRtl=void 0,this.iconStart=void 0,this.iconEnd=void 0,this.href=void 0,this.label=void 0,this.rel=void 0,this.target=void 0}async setFocus(){var i;await j(this),null===(i=this.el)||void 0===i||i.focus()}componentWillLoad(){O(this),this.initialize()}componentDidLoad(){A(this)}connectedCallback(){this.initialize()}render(){const t=c(this.el,"scale",this.scale),{href:e,selectionMode:n,label:o,iconFlipRtl:a}=this,l=i("calcite-icon",{class:"dropdown-item-icon-start",flipRtl:"start"===a||"both"===a,icon:this.iconStart,scale:"l"===t?"m":"s"}),h=i("span",{class:"dropdown-item-content"},i("slot",null)),d=i("calcite-icon",{class:"dropdown-item-icon-end",flipRtl:"end"===a||"both"===a,icon:this.iconEnd,scale:"l"===t?"m":"s"}),p=this.iconStart&&this.iconEnd?[l,h,d]:this.iconStart?[l,h]:this.iconEnd?[h,d]:h,m=e?i("a",{"aria-label":o,class:"dropdown-link",href:e,rel:this.rel,tabIndex:-1,target:this.target,ref:i=>this.childLink=i},p):p,u=e?null:"single"===n?"menuitemradio":"multiple"===n?"menuitemcheckbox":"menuitem",b="none"!==n?r(this.selected):null;return i(s,{"aria-checked":b,"aria-label":e?"":o,role:u,tabindex:"0"},i("div",{class:{container:!0,"container--link":!!e,"container--s":"s"===t,"container--m":"m"===t,"container--l":"l"===t,"container--multi-selection":"multiple"===n,"container--single-selection":"single"===n,"container--none-selection":"none"===n}},"none"!==n?i("calcite-icon",{class:"dropdown-item-icon",icon:"multiple"===n?"check":"bullet-point",scale:"l"===t?"m":"s"}):null,m))}onClick(){this.emitRequestedItem()}keyDownHandler(i){switch(i.key){case" ":case"Enter":this.emitRequestedItem(),this.href&&this.childLink.click(),i.preventDefault();break;case"Escape":this.calciteInternalDropdownCloseRequest.emit(),i.preventDefault();break;case"Tab":this.calciteInternalDropdownItemKeyEvent.emit({keyboardEvent:i});break;case"ArrowUp":case"ArrowDown":case"Home":case"End":i.preventDefault(),this.calciteInternalDropdownItemKeyEvent.emit({keyboardEvent:i})}}updateActiveItemOnChange(i){i.composedPath().includes(this.parentDropdownGroupEl)&&(this.requestedDropdownGroup=i.detail.requestedDropdownGroup,this.requestedDropdownItem=i.detail.requestedDropdownItem,this.determineActiveItem()),i.stopPropagation()}initialize(){this.selectionMode=c(this.el,"selection-mode","single"),this.parentDropdownGroupEl=this.el.closest("calcite-dropdown-group"),"none"===this.selectionMode&&(this.selected=!1)}determineActiveItem(){switch(this.selectionMode){case"multiple":this.el===this.requestedDropdownItem&&(this.selected=!this.selected);break;case"single":this.el===this.requestedDropdownItem?this.selected=!0:this.requestedDropdownGroup===this.parentDropdownGroupEl&&(this.selected=!1);break;case"none":this.selected=!1}}emitRequestedItem(){this.calciteDropdownItemSelect.emit(),this.calciteInternalDropdownItemSelect.emit({requestedDropdownItem:this.el,requestedDropdownGroup:this.parentDropdownGroupEl})}get el(){return n(this)}};xi.style=".container--s{padding-block:0.25rem;font-size:var(--calcite-font-size--2);line-height:1rem;padding-inline-end:0.5rem;padding-inline-start:1.5rem}.container--m{padding-block:0.5rem;font-size:var(--calcite-font-size--1);line-height:1rem;padding-inline-end:0.75rem;padding-inline-start:2rem}.container--l{padding-block:0.625rem;font-size:var(--calcite-font-size-0);line-height:1.25rem;padding-inline-end:1rem;padding-inline-start:2.5rem}.container--s.container--none-selection{padding-inline-start:0.25rem}.container--s.container--none-selection .dropdown-link{padding-inline-start:0px}.container--m.container--none-selection{padding-inline-start:0.5rem}.container--m.container--none-selection .dropdown-link{padding-inline-start:0px}.container--l.container--none-selection{padding-inline-start:0.75rem}.container--l.container--none-selection .dropdown-link{padding-inline-start:0px}:host{position:relative;display:flex;flex-grow:1;align-items:center}.container{position:relative;display:flex;flex-grow:1;cursor:pointer;align-items:center;color:var(--calcite-ui-text-3);-webkit-text-decoration-line:none;text-decoration-line:none;transition-duration:150ms;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);text-align:start}.dropdown-item-content{flex:1 1 auto;padding-block:0.125rem;padding-inline-end:auto;padding-inline-start:0.25rem}:host,.container--link a{outline-color:transparent}:host(:focus){outline:2px solid transparent;outline-offset:2px;outline:2px solid var(--calcite-ui-focus-color, var(--calcite-ui-brand));outline-offset:calc(\n -2px *\n calc(\n 1 -\n 2 * clamp(\n 0,\n var(--calcite-ui-focus-offset-invert),\n 1\n )\n )\n )}.container--link{padding:0px}.container--link a{position:relative;display:flex;flex-grow:1;cursor:pointer;align-items:center;color:var(--calcite-ui-text-3);-webkit-text-decoration-line:none;text-decoration-line:none;transition-duration:150ms;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1)}.container--s .dropdown-link{padding-block:0.25rem;font-size:var(--calcite-font-size--2);line-height:1rem;padding-inline-end:0.5rem;padding-inline-start:1.5rem}.container--m .dropdown-link{padding-block:0.5rem;font-size:var(--calcite-font-size--1);line-height:1rem;padding-inline-end:0.75rem;padding-inline-start:2rem}.container--l .dropdown-link{padding-block:0.75rem;font-size:var(--calcite-font-size-0);line-height:1.25rem;padding-inline-end:1rem;padding-inline-start:2.5rem}:host(:hover) .container,:host(:active) .container{background-color:var(--calcite-ui-foreground-2);color:var(--calcite-ui-text-1);-webkit-text-decoration-line:none;text-decoration-line:none}:host(:hover) .container--link .dropdown-link,:host(:active) .container--link .dropdown-link{color:var(--calcite-ui-text-1)}:host(:focus) .container{color:var(--calcite-ui-text-1);-webkit-text-decoration-line:none;text-decoration-line:none}:host(:active) .container{background-color:var(--calcite-ui-foreground-3)}:host(:hover) .container:before,:host(:active) .container:before,:host(:focus) .container:before{opacity:1}:host([selected]) .container:not(.container--none-selection),:host([selected]) .container--link .dropdown-link{font-weight:var(--calcite-font-weight-medium);color:var(--calcite-ui-text-1)}:host([selected]) .container:not(.container--none-selection):before,:host([selected]) .container--link .dropdown-link:before{opacity:1;color:var(--calcite-ui-brand)}:host([selected]) .container:not(.container--none-selection) calcite-icon,:host([selected]) .container--link .dropdown-link calcite-icon{color:var(--calcite-ui-brand)}.container--multi-selection:before,.container--none-selection:before{display:none}.container--s:before{inset-inline-start:0.5rem}.container--m:before{inset-inline-start:0.75rem}.container--l:before{inset-inline-start:1rem}.dropdown-item-icon{position:absolute;opacity:0;transition-duration:150ms;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transform:scale(0.9)}.container--s .dropdown-item-icon{inset-inline-start:0.25rem}.container--m .dropdown-item-icon{inset-inline-start:0.5rem}.container--l .dropdown-item-icon{inset-inline-start:0.75rem}:host(:hover) .dropdown-item-icon{color:var(--calcite-ui-border-1);opacity:1}:host([selected]) .dropdown-item-icon{color:var(--calcite-ui-brand);opacity:1}.container--s .dropdown-item-icon-start{margin-inline-end:0.5rem;margin-inline-start:0.25rem}.container--s .dropdown-item-icon-end{margin-inline-start:0.5rem}.container--m .dropdown-item-icon-start{margin-inline-end:0.75rem;margin-inline-start:0.25rem}.container--m .dropdown-item-icon-end{margin-inline-start:0.75rem}.container--l .dropdown-item-icon-start{margin-inline-end:1rem;margin-inline-start:0.25rem}.container--l .dropdown-item-icon-end{margin-inline-start:1rem}:host([hidden]){display:none}[hidden]{display:none}";const wi=class{constructor(i){t(this,i),this.layerSelectionChange=e(this,"layerSelectionChange",7),this.appearance="transparent",this.enabledLayerIds=[],this.enabledTableIds=[],this.mapView=void 0,this.placeholderIcon="",this.selectedIds=[],this.scale="m",this.showTables=!0,this.type="select",this.ids=[],this.selectedName=""}async mapViewWatchHandler(){await this._setLayers();const i=Object.keys(ni.layerNameHash).length>0,t=Object.keys(ni.tableNameHash).length>0&&this.showTables;(i||t)&&this._setSelectedLayer(this.ids[0],i?"layer":"table")}async componentWillLoad(){await this._setLayers(),(this.ids.length>0||1===this.selectedIds.length)&&this.layerSelectionChange.emit(1===this.selectedIds.length?[this.selectedIds[0]]:[this.ids[0]])}render(){return i(s,null,i("div",{class:"map-layer-picker-container"},i("div",{class:"map-layer-picker"},"combobox"===this.type?this._getCombobox():"select"===this.type?this._getSelect():this._getDropdown())))}async componentDidLoad(){if(this.ids.length>0||1===this.selectedIds.length){const i=1===this.selectedIds.length?this.selectedIds[0]:this.ids[0];"select"===this.type?this._layerElement.value=i:"dropdown"===this.type&&(this.selectedName=Object.keys(ni.layerNameHash).indexOf(i)>-1?ni.layerNameHash[i]:Object.keys(ni.tableNameHash).indexOf(i)>-1?ni.tableNameHash[i]:"")}}_getSelect(){return i("calcite-select",{label:"",onCalciteSelectChange:()=>this._layerSelectionChange(),ref:i=>{this._layerElement=i},scale:this.scale},this._getMapLayerOptions())}_getCombobox(){return i("calcite-combobox",{clearDisabled:!0,label:"",onCalciteComboboxChange:()=>this._layerSelectionChange(),"placeholder-icon":this.placeholderIcon,ref:i=>{this._layerElement=i},scale:this.scale,"selection-mode":"single"},this._getMapLayerOptions())}_getDropdown(){return i("calcite-dropdown",{class:"layer-picker-dropdown"},i("calcite-action",{slot:"trigger",text:""},i("calcite-button",{alignment:"icon-end-space-between",appearance:this.appearance,class:"max-width-350",iconEnd:"chevron-down",iconStart:"layers",kind:"neutral",width:"full"},i("div",null,this.selectedName))),i("calcite-dropdown-group",{"selection-mode":"single"},this._getMapLayerOptions()))}_getMapLayerOptions(){return this.ids.reduce(((i,t)=>(this._validLayer(t)?i.push(this._getItem(t,"layer")):this._validTable(t)&&i.push(this._getItem(t,"table")),i)),[])}_getItem(t,e){const s="layer"===e?ni.layerNameHash[t]:ni.tableNameHash[t];return"combobox"===this.type?i("calcite-combobox-item",{textLabel:s,value:t}):"select"===this.type?i("calcite-option",{label:s,value:t}):i("calcite-dropdown-item",{onClick:()=>{this._setSelectedLayer(t,e)}},s)}_setSelectedLayer(i,t){this.selectedName="layer"===t?ni.layerNameHash[i]:ni.tableNameHash[i],this.selectedIds=[i],this.layerSelectionChange.emit(this.selectedIds)}async _setLayers(){if(this.mapView){const i=await ii(this.mapView),t=this.showTables?await ti(this.mapView):[];this.ids=[...i.filter((i=>{var t;return!((null===(t=this.enabledLayerIds)||void 0===t?void 0:t.length)>0)||this.enabledLayerIds.indexOf(i)>-1})),...t.filter((i=>{var t;return!((null===(t=this.enabledTableIds)||void 0===t?void 0:t.length)>0)||this.enabledTableIds.indexOf(i)>-1}))],await this._initStateHash()}}async _initStateHash(){this.mapView&&(ni.layerNameHash=await ei(this.mapView),ni.tableNameHash=this.showTables?await si(this.mapView):{})}_validLayer(i){const t=ni.layerNameHash[i];return t&&ni.managedLayers.indexOf(t)<0&&(this.enabledLayerIds.length>0?this.enabledLayerIds.indexOf(i)>-1:t)}_validTable(i){const t=ni.tableNameHash[i],e=t&&this.showTables;return e?ni.managedTables.indexOf(t)<0&&(!(this.enabledTableIds.length>0)||this.enabledTableIds.indexOf(i)>-1):e}_layerSelectionChange(){const i=Array.isArray(this._layerElement.value)?this._layerElement.value:[this._layerElement.value];JSON.stringify(i)!==JSON.stringify([""])&&(this.selectedIds=i,this.layerSelectionChange.emit(this.selectedIds))}get el(){return n(this)}static get watchers(){return{mapView:["mapViewWatchHandler"]}}};wi.style=":host{display:block}.map-layer-picker-container{width:100%}.map-layer-picker{position:relative;width:100%;display:inline-block}.padding-bottom-1{padding-bottom:1rem}.layer-picker-dropdown{height:100%;width:100%}.max-width-350{max-width:350px}";export{pi as calcite_combobox,gi as calcite_combobox_item,fi as calcite_dropdown,vi as calcite_dropdown_group,xi as calcite_dropdown_item,wi as map_layer_picker}
|
35
|
+
const xi=class{constructor(i){t(this,i),this.calciteDropdownItemSelect=e(this,"calciteDropdownItemSelect",6),this.calciteInternalDropdownItemSelect=e(this,"calciteInternalDropdownItemSelect",6),this.calciteInternalDropdownItemKeyEvent=e(this,"calciteInternalDropdownItemKeyEvent",6),this.calciteInternalDropdownCloseRequest=e(this,"calciteInternalDropdownCloseRequest",6),this.scale="m",this.selected=!1,this.iconFlipRtl=void 0,this.iconStart=void 0,this.iconEnd=void 0,this.href=void 0,this.label=void 0,this.rel=void 0,this.target=void 0}async setFocus(){var i;await j(this),null===(i=this.el)||void 0===i||i.focus()}componentWillLoad(){O(this),this.initialize()}componentDidLoad(){A(this)}connectedCallback(){this.initialize()}render(){const t=c(this.el,"scale",this.scale),{href:e,selectionMode:n,label:o,iconFlipRtl:a}=this,l=i("calcite-icon",{class:"dropdown-item-icon-start",flipRtl:"start"===a||"both"===a,icon:this.iconStart,scale:"l"===t?"m":"s"}),h=i("span",{class:"dropdown-item-content"},i("slot",null)),d=i("calcite-icon",{class:"dropdown-item-icon-end",flipRtl:"end"===a||"both"===a,icon:this.iconEnd,scale:"l"===t?"m":"s"}),p=this.iconStart&&this.iconEnd?[l,h,d]:this.iconStart?[l,h]:this.iconEnd?[h,d]:h,m=e?i("a",{"aria-label":o,class:"dropdown-link",href:e,rel:this.rel,tabIndex:-1,target:this.target,ref:i=>this.childLink=i},p):p,u=e?null:"single"===n?"menuitemradio":"multiple"===n?"menuitemcheckbox":"menuitem",b="none"!==n?r(this.selected):null;return i(s,{"aria-checked":b,"aria-label":e?"":o,role:u,tabindex:"0"},i("div",{class:{container:!0,"container--link":!!e,"container--s":"s"===t,"container--m":"m"===t,"container--l":"l"===t,"container--multi-selection":"multiple"===n,"container--single-selection":"single"===n,"container--none-selection":"none"===n}},"none"!==n?i("calcite-icon",{class:"dropdown-item-icon",icon:"multiple"===n?"check":"bullet-point",scale:"l"===t?"m":"s"}):null,m))}onClick(){this.emitRequestedItem()}keyDownHandler(i){switch(i.key){case" ":case"Enter":this.emitRequestedItem(),this.href&&this.childLink.click(),i.preventDefault();break;case"Escape":this.calciteInternalDropdownCloseRequest.emit(),i.preventDefault();break;case"Tab":this.calciteInternalDropdownItemKeyEvent.emit({keyboardEvent:i});break;case"ArrowUp":case"ArrowDown":case"Home":case"End":i.preventDefault(),this.calciteInternalDropdownItemKeyEvent.emit({keyboardEvent:i})}}updateActiveItemOnChange(i){i.composedPath().includes(this.parentDropdownGroupEl)&&(this.requestedDropdownGroup=i.detail.requestedDropdownGroup,this.requestedDropdownItem=i.detail.requestedDropdownItem,this.determineActiveItem()),i.stopPropagation()}initialize(){this.selectionMode=c(this.el,"selection-mode","single"),this.parentDropdownGroupEl=this.el.closest("calcite-dropdown-group"),"none"===this.selectionMode&&(this.selected=!1)}determineActiveItem(){switch(this.selectionMode){case"multiple":this.el===this.requestedDropdownItem&&(this.selected=!this.selected);break;case"single":this.el===this.requestedDropdownItem?this.selected=!0:this.requestedDropdownGroup===this.parentDropdownGroupEl&&(this.selected=!1);break;case"none":this.selected=!1}}emitRequestedItem(){this.calciteDropdownItemSelect.emit(),this.calciteInternalDropdownItemSelect.emit({requestedDropdownItem:this.el,requestedDropdownGroup:this.parentDropdownGroupEl})}get el(){return n(this)}};xi.style=".container--s{padding-block:0.25rem;font-size:var(--calcite-font-size--2);line-height:1rem;padding-inline-end:0.5rem;padding-inline-start:1.5rem}.container--m{padding-block:0.5rem;font-size:var(--calcite-font-size--1);line-height:1rem;padding-inline-end:0.75rem;padding-inline-start:2rem}.container--l{padding-block:0.625rem;font-size:var(--calcite-font-size-0);line-height:1.25rem;padding-inline-end:1rem;padding-inline-start:2.5rem}.container--s.container--none-selection{padding-inline-start:0.25rem}.container--s.container--none-selection .dropdown-link{padding-inline-start:0px}.container--m.container--none-selection{padding-inline-start:0.5rem}.container--m.container--none-selection .dropdown-link{padding-inline-start:0px}.container--l.container--none-selection{padding-inline-start:0.75rem}.container--l.container--none-selection .dropdown-link{padding-inline-start:0px}:host{position:relative;display:flex;flex-grow:1;align-items:center}.container{position:relative;display:flex;flex-grow:1;cursor:pointer;align-items:center;color:var(--calcite-ui-text-3);-webkit-text-decoration-line:none;text-decoration-line:none;transition-duration:150ms;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);text-align:start}.dropdown-item-content{flex:1 1 auto;padding-block:0.125rem;padding-inline-end:auto;padding-inline-start:0.25rem}:host,.container--link a{outline-color:transparent}:host(:focus){outline:2px solid transparent;outline-offset:2px;outline:2px solid var(--calcite-ui-focus-color, var(--calcite-ui-brand));outline-offset:calc(\n -2px *\n calc(\n 1 -\n 2 * clamp(\n 0,\n var(--calcite-ui-focus-offset-invert),\n 1\n )\n )\n )}.container--link{padding:0px}.container--link a{position:relative;display:flex;flex-grow:1;cursor:pointer;align-items:center;color:var(--calcite-ui-text-3);-webkit-text-decoration-line:none;text-decoration-line:none;transition-duration:150ms;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1)}.container--s .dropdown-link{padding-block:0.25rem;font-size:var(--calcite-font-size--2);line-height:1rem;padding-inline-end:0.5rem;padding-inline-start:1.5rem}.container--m .dropdown-link{padding-block:0.5rem;font-size:var(--calcite-font-size--1);line-height:1rem;padding-inline-end:0.75rem;padding-inline-start:2rem}.container--l .dropdown-link{padding-block:0.75rem;font-size:var(--calcite-font-size-0);line-height:1.25rem;padding-inline-end:1rem;padding-inline-start:2.5rem}:host(:hover) .container,:host(:active) .container{background-color:var(--calcite-ui-foreground-2);color:var(--calcite-ui-text-1);-webkit-text-decoration-line:none;text-decoration-line:none}:host(:hover) .container--link .dropdown-link,:host(:active) .container--link .dropdown-link{color:var(--calcite-ui-text-1)}:host(:focus) .container{color:var(--calcite-ui-text-1);-webkit-text-decoration-line:none;text-decoration-line:none}:host(:active) .container{background-color:var(--calcite-ui-foreground-3)}:host(:hover) .container:before,:host(:active) .container:before,:host(:focus) .container:before{opacity:1}:host([selected]) .container:not(.container--none-selection),:host([selected]) .container--link .dropdown-link{font-weight:var(--calcite-font-weight-medium);color:var(--calcite-ui-text-1)}:host([selected]) .container:not(.container--none-selection):before,:host([selected]) .container--link .dropdown-link:before{opacity:1;color:var(--calcite-ui-brand)}:host([selected]) .container:not(.container--none-selection) calcite-icon,:host([selected]) .container--link .dropdown-link calcite-icon{color:var(--calcite-ui-brand)}.container--multi-selection:before,.container--none-selection:before{display:none}.container--s:before{inset-inline-start:0.5rem}.container--m:before{inset-inline-start:0.75rem}.container--l:before{inset-inline-start:1rem}.dropdown-item-icon{position:absolute;opacity:0;transition-duration:150ms;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transform:scale(0.9)}.container--s .dropdown-item-icon{inset-inline-start:0.25rem}.container--m .dropdown-item-icon{inset-inline-start:0.5rem}.container--l .dropdown-item-icon{inset-inline-start:0.75rem}:host(:hover) .dropdown-item-icon{color:var(--calcite-ui-border-1);opacity:1}:host([selected]) .dropdown-item-icon{color:var(--calcite-ui-brand);opacity:1}.container--s .dropdown-item-icon-start{margin-inline-end:0.5rem;margin-inline-start:0.25rem}.container--s .dropdown-item-icon-end{margin-inline-start:0.5rem}.container--m .dropdown-item-icon-start{margin-inline-end:0.75rem;margin-inline-start:0.25rem}.container--m .dropdown-item-icon-end{margin-inline-start:0.75rem}.container--l .dropdown-item-icon-start{margin-inline-end:1rem;margin-inline-start:0.25rem}.container--l .dropdown-item-icon-end{margin-inline-start:1rem}:host([hidden]){display:none}[hidden]{display:none}";const wi=class{constructor(i){t(this,i),this.layerSelectionChange=e(this,"layerSelectionChange",7),this.appearance="transparent",this.enabledLayerIds=[],this.enabledTableIds=[],this.mapView=void 0,this.placeholderIcon="",this.selectedIds=[],this.scale="m",this.showTables=!0,this.type="select",this.ids=[],this.selectedName=""}async mapViewWatchHandler(){await this._setLayers();const i=Object.keys(ni.layerNameHash).length>0,t=Object.keys(ni.tableNameHash).length>0&&this.showTables;(i||t)&&this._setSelectedLayer(this.ids[0],i?"layer":"table")}async componentWillLoad(){await this._setLayers(),(this.ids.length>0||1===this.selectedIds.length)&&this.layerSelectionChange.emit(1===this.selectedIds.length?[this.selectedIds[0]]:[this.ids[0]])}render(){return i(s,null,i("div",{class:"map-layer-picker-container"},i("div",{class:"map-layer-picker"},"combobox"===this.type?this._getCombobox():"select"===this.type?this._getSelect():this._getDropdown())))}async componentDidLoad(){if(this.ids.length>0||1===this.selectedIds.length){const i=1===this.selectedIds.length?this.selectedIds[0]:this.ids[0];"select"===this.type?this._layerElement.value=i:"dropdown"===this.type&&(this.selectedName=Object.keys(ni.layerNameHash).indexOf(i)>-1?ni.layerNameHash[i]:Object.keys(ni.tableNameHash).indexOf(i)>-1?ni.tableNameHash[i]:"")}}_getSelect(){return i("calcite-select",{label:"",onCalciteSelectChange:()=>this._layerSelectionChange(),ref:i=>{this._layerElement=i},scale:this.scale},this._getMapLayerOptions())}_getCombobox(){return i("calcite-combobox",{clearDisabled:!0,label:"",onCalciteComboboxChange:()=>this._layerSelectionChange(),"placeholder-icon":this.placeholderIcon,ref:i=>{this._layerElement=i},scale:this.scale,"selection-mode":"single"},this._getMapLayerOptions())}_getDropdown(){return i("calcite-dropdown",{class:"layer-picker-dropdown"},i("calcite-action",{slot:"trigger",text:""},i("calcite-button",{alignment:"icon-end-space-between",appearance:this.appearance,class:"max-width-350",iconEnd:"chevron-down",iconStart:"layers",kind:"neutral",width:"full"},i("div",null,this.selectedName))),i("calcite-dropdown-group",{"selection-mode":"single"},this._getMapLayerOptions()))}_getMapLayerOptions(){return this.ids.reduce(((i,t)=>(this._validLayer(t)?i.push(this._getItem(t,"layer")):this._validTable(t)&&i.push(this._getItem(t,"table")),i)),[])}_getItem(t,e){const s="layer"===e?ni.layerNameHash[t]:ni.tableNameHash[t];return"combobox"===this.type?i("calcite-combobox-item",{textLabel:s,value:t}):"select"===this.type?i("calcite-option",{label:s,value:t}):i("calcite-dropdown-item",{onClick:()=>{this._setSelectedLayer(t,e)}},s)}_setSelectedLayer(i,t){this.selectedName="layer"===t?ni.layerNameHash[i]:ni.tableNameHash[i],this.selectedIds=[i],this.layerSelectionChange.emit(this.selectedIds)}async _setLayers(){if(this.mapView){const i=await ii(this.mapView),t=this.showTables?await ti(this.mapView):[];this.ids=[...i.filter((i=>{var t;return!((null===(t=this.enabledLayerIds)||void 0===t?void 0:t.length)>0)||this.enabledLayerIds.indexOf(i)>-1})),...t.filter((i=>{var t;return!((null===(t=this.enabledTableIds)||void 0===t?void 0:t.length)>0)||this.enabledTableIds.indexOf(i)>-1}))],await this._initStateHash()}}async _initStateHash(){this.mapView&&(ni.layerNameHash=await ei(this.mapView),ni.tableNameHash=this.showTables?await si(this.mapView):{})}_validLayer(i){const t=ni.layerNameHash[i];return t&&ni.managedLayers.indexOf(t)<0&&(this.enabledLayerIds.length>0?this.enabledLayerIds.indexOf(i)>-1:t)}_validTable(i){const t=ni.tableNameHash[i],e=t&&this.showTables;return e?ni.managedTables.indexOf(t)<0&&(!(this.enabledTableIds.length>0)||this.enabledTableIds.indexOf(i)>-1):e}_layerSelectionChange(){const i=Array.isArray(this._layerElement.value)?this._layerElement.value:[this._layerElement.value];JSON.stringify(i)!==JSON.stringify([""])&&(this.selectedIds=i,this.layerSelectionChange.emit(this.selectedIds))}get el(){return n(this)}static get watchers(){return{mapView:["mapViewWatchHandler"]}}};wi.style=":host{display:block}.map-layer-picker-container{width:100%}.map-layer-picker{position:relative;width:100%;display:inline-block}.padding-bottom-1{padding-bottom:1rem}.layer-picker-dropdown{height:100%;width:100%}.max-width-350{max-width:350px}";export{pi as calcite_combobox,gi as calcite_combobox_item,vi as calcite_dropdown,fi as calcite_dropdown_group,xi as calcite_dropdown_item,wi as map_layer_picker}
|
@@ -3,4 +3,4 @@
|
|
3
3
|
* Licensed under the Apache License, Version 2.0
|
4
4
|
* http://www.apache.org/licenses/LICENSE-2.0
|
5
5
|
*/
|
6
|
-
import{r as e,c as t,h as i,H as o,g as r}from"./p-33613993.js";import{e as s,t as n}from"./p-a16feeec.js";import{c as a,u as c,d as l}from"./p-ad75b9bb.js";import{n as d,c as h,d as p}from"./p-7f271c31.js";import{s as m,a as u,c as b}from"./p-d74e95e5.js";import"./p-8b448a5b.js";import"./p-e3525c00.js";import"./p-43ba7a04.js";import"./p-588bc0c0.js";const g=class{constructor(i){e(this,i),this.calciteInternalStepperItemKeyEvent=t(this,"calciteInternalStepperItemKeyEvent",6),this.calciteInternalStepperItemSelect=t(this,"calciteInternalStepperItemSelect",6),this.calciteInternalUserRequestedStepperItemSelect=t(this,"calciteInternalUserRequestedStepperItemSelect",6),this.calciteInternalStepperItemRegister=t(this,"calciteInternalStepperItemRegister",6),this.keyDownHandler=e=>{if(!this.disabled&&e.target===this.el)switch(e.key){case" ":case"Enter":this.emitUserRequestedItem(),e.preventDefault();break;case"ArrowUp":case"ArrowDown":case"ArrowLeft":case"ArrowRight":case"Home":case"End":this.calciteInternalStepperItemKeyEvent.emit({item:e}),e.preventDefault()}},this.handleItemClick=e=>{this.disabled||"horizontal"===this.layout&&e.composedPath().some((e=>{var t;return null===(t=e.classList)||void 0===t?void 0:t.contains("stepper-item-content")}))||this.emitUserRequestedItem()},this.emitUserRequestedItem=()=>{this.emitRequestedItem(),this.disabled||this.calciteInternalUserRequestedStepperItemSelect.emit({position:this.itemPosition})},this.emitRequestedItem=()=>{this.disabled||this.calciteInternalStepperItemSelect.emit({position:this.itemPosition})},this.selected=!1,this.complete=!1,this.error=!1,this.disabled=!1,this.heading=void 0,this.description=void 0,this.layout="horizontal",this.icon=!1,this.iconFlipRtl=!1,this.numbered=!1,this.scale="m",this.numberingSystem=void 0,this.effectiveLocale=""}selectedHandler(){this.selected&&this.emitRequestedItem()}disabledWatcher(){this.registerStepperItem()}effectiveLocaleWatcher(e){d.numberFormatOptions={locale:e,numberingSystem:this.numberingSystem,useGrouping:!1}}connectedCallback(){a(this),h(this)}componentWillLoad(){m(this),this.icon=s(this.el,"icon",!1),this.numbered=s(this.el,"numbered",!1),this.layout=s(this.el,"layout",!1),this.scale=s(this.el,"scale","m"),this.parentStepperEl=this.el.parentElement,this.itemPosition=this.getItemPosition(),this.registerStepperItem(),this.selected&&this.emitRequestedItem()}componentDidLoad(){u(this)}componentDidRender(){c(this,!0)}disconnectedCallback(){l(this),p(this)}render(){return i(o,{"aria-expanded":n(this.selected),onClick:this.handleItemClick,onKeyDown:this.keyDownHandler},i("div",{class:"container"},i("div",{class:"stepper-item-header",tabIndex:"horizontal"!==this.layout||this.disabled?null:0,ref:e=>this.headerEl=e},this.icon?this.renderIcon():null,this.numbered?i("div",{class:"stepper-item-number"},this.renderNumbers(),"."):null,i("div",{class:"stepper-item-header-text"},i("span",{class:"stepper-item-heading"},this.heading),i("span",{class:"stepper-item-description"},this.description))),i("div",{class:"stepper-item-content"},i("slot",null))))}updateActiveItemOnChange(e){(e.target===this.parentStepperEl||e.composedPath().includes(this.parentStepperEl))&&(this.selectedPosition=e.detail.position,this.determineSelectedItem())}async setFocus(){var e;await b(this),null===(e="vertical"===this.layout?this.el:this.headerEl)||void 0===e||e.focus()}renderIcon(){return i("calcite-icon",{class:"stepper-item-icon",flipRtl:this.iconFlipRtl,icon:this.selected?"circleF":this.error?"exclamationMarkCircleF":this.complete?"checkCircleF":"circle",scale:"s"})}determineSelectedItem(){this.selected=!this.disabled&&this.itemPosition===this.selectedPosition}registerStepperItem(){this.calciteInternalStepperItemRegister.emit({position:this.itemPosition})}getItemPosition(){var e;return Array.from(null===(e=this.parentStepperEl)||void 0===e?void 0:e.querySelectorAll("calcite-stepper-item")).indexOf(this.el)}renderNumbers(){return d.numberFormatOptions={locale:this.effectiveLocale,numberingSystem:this.numberingSystem,useGrouping:!1},d.numberFormatter.format(this.itemPosition+1)}get el(){return r(this)}static get watchers(){return{selected:["selectedHandler"],disabled:["disabledWatcher"],effectiveLocale:["effectiveLocaleWatcher"]}}};g.style=":host([layout=horizontal][disabled]) .stepper-item-header,:host([disabled]){cursor:default;-webkit-user-select:none;-moz-user-select:none;user-select:none;opacity:var(--calcite-ui-opacity-disabled)}:host([layout=horizontal][disabled]) .stepper-item-header *,:host([disabled]) *,:host([layout=horizontal][disabled]) .stepper-item-header ::slotted(*),:host([disabled]) ::slotted(*){pointer-events:none}:host([scale=s]){--calcite-stepper-item-spacing-unit-s:0.25rem;--calcite-stepper-item-spacing-unit-m:0.75rem;--calcite-stepper-item-spacing-unit-l:1rem;font-size:var(--calcite-font-size--1);line-height:1rem;margin-inline-end:0.25rem}:host([scale=s]) .stepper-item-description{font-size:var(--calcite-font-size--2);line-height:1rem}:host([scale=m]){--calcite-stepper-item-spacing-unit-s:0.5rem;--calcite-stepper-item-spacing-unit-m:1rem;--calcite-stepper-item-spacing-unit-l:1.25rem;font-size:var(--calcite-font-size-0);line-height:1.25rem;margin-inline-end:0.5rem}:host([scale=m]) .stepper-item-description{font-size:var(--calcite-font-size--1);line-height:1rem}:host([scale=l]){--calcite-stepper-item-spacing-unit-s:0.75rem;--calcite-stepper-item-spacing-unit-m:1.25rem;--calcite-stepper-item-spacing-unit-l:1.5rem;font-size:var(--calcite-font-size-1);line-height:1.5rem;margin-inline-end:0.75rem}:host([scale=l]) .stepper-item-description{font-size:var(--calcite-font-size-0);line-height:1.25rem}:host{position:relative;display:flex;flex-grow:1;flex-direction:column;align-self:flex-start;margin-block-end:var(--calcite-stepper-item-spacing-unit-s)}:host .container{position:relative;display:flex;flex-grow:1;cursor:pointer;flex-direction:column;border-width:0px;border-block-start-width:2px;border-style:solid;border-color:var(--calcite-ui-border-3);color:var(--calcite-ui-text-3);-webkit-text-decoration-line:none;text-decoration-line:none;outline:2px solid transparent;outline-offset:2px;transition-duration:150ms;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1)}:host{outline-color:transparent}:host(:focus){outline:2px solid var(--calcite-ui-focus-color, var(--calcite-ui-brand));outline-offset:calc(\n 2px *\n calc(\n 1 -\n 2 * clamp(\n 0,\n var(--calcite-ui-focus-offset-invert),\n 1\n )\n )\n )}:host .stepper-item-header{display:flex;cursor:pointer;align-items:flex-start}:host .stepper-item-content,:host .stepper-item-header{transition-duration:150ms;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);padding-block:var(--calcite-stepper-item-spacing-unit-l);padding-inline-end:var(--calcite-stepper-item-spacing-unit-m);text-align:start}:host .stepper-item-header *{display:inline-flex;align-items:center;transition-duration:150ms;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1)}:host .stepper-item-content{display:none;inline-size:100%;flex-direction:column;font-size:var(--calcite-font-size--2);line-height:1.375}:host .stepper-item-icon{margin-inline-end:var(--calcite-stepper-item-spacing-unit-m);margin-block-start:1px;display:inline-flex;block-size:0.75rem;flex-shrink:0;align-self:flex-start;color:var(--calcite-ui-text-3);opacity:var(--calcite-ui-opacity-disabled);transition-duration:150ms;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1)}:host .stepper-item-header-text{flex-direction:column;text-align:initial;margin-inline-end:auto}:host .stepper-item-heading,:host .stepper-item-description{display:flex;inline-size:100%}:host .stepper-item-heading{margin-block-end:0.25rem;font-weight:var(--calcite-font-weight-medium);color:var(--calcite-ui-text-2)}:host .stepper-item-description{color:var(--calcite-ui-text-3)}:host .stepper-item-number{font-weight:var(--calcite-font-weight-medium);color:var(--calcite-ui-text-3);transition-duration:150ms;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);margin-inline-end:var(--calcite-stepper-item-spacing-unit-m)}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}:host([complete]) .container{border-color:rgba(0, 122, 194, 0.5)}:host([complete]) .container .stepper-item-icon{color:var(--calcite-ui-brand)}:host([error]) .container{border-block-start-color:var(--calcite-ui-danger)}:host([error]) .container .stepper-item-number{color:var(--calcite-ui-danger)}:host([error]) .container .stepper-item-icon{opacity:1;color:var(--calcite-ui-danger)}:host(:hover:not([disabled]):not([selected])) .container,:host(:focus:not([disabled]):not([selected])) .container{border-block-start-color:var(--calcite-ui-brand)}:host(:hover:not([disabled]):not([selected])) .container .stepper-item-heading,:host(:focus:not([disabled]):not([selected])) .container .stepper-item-heading{color:var(--calcite-ui-text-1)}:host(:hover:not([disabled]):not([selected])) .container .stepper-item-description,:host(:focus:not([disabled]):not([selected])) .container .stepper-item-description{color:var(--calcite-ui-text-2)}:host([error]:hover:not([disabled]):not([selected])) .container,:host([error]:focus:not([disabled]):not([selected])) .container{border-block-start-color:var(--calcite-ui-danger-hover)}:host([selected]) .container{border-block-start-color:var(--calcite-ui-brand)}:host([selected]) .container .stepper-item-heading{color:var(--calcite-ui-text-1)}:host([selected]) .container .stepper-item-description{color:var(--calcite-ui-text-2)}:host([selected]) .container .stepper-item-number{color:var(--calcite-ui-brand)}:host([selected]) .container .stepper-item-icon{color:var(--calcite-ui-brand);opacity:1}:host([selected]) .container .stepper-item-content{display:flex}:host([layout=vertical]) .container{margin-inline:0px;margin-block-start:0px;flex:1 1 auto;border-block-start-width:0px;border-style:solid;border-color:var(--calcite-ui-border-3);padding-block:0px;border-inline-start-width:2px;padding-inline-start:var(--calcite-stepper-item-spacing-unit-l)}:host([layout=vertical]) .container .stepper-item-icon{order:3;margin-block:1px 0px;padding-inline-start:var(--calcite-stepper-item-spacing-unit-s);margin-inline-start:auto}:host([layout=vertical]) .container .stepper-item-header{padding-inline-end:0px}:host([layout=vertical]) .container .stepper-item-content{padding:0px}:host([layout=vertical][complete]) .container{border-color:rgba(0, 122, 194, 0.5)}:host([layout=vertical][complete]:hover:not([disabled]):not([selected])) .container,:host([layout=vertical][complete]:focus:not([disabled]):not([selected])) .container{border-color:var(--calcite-ui-brand)}:host([layout=vertical][error]) .container{border-color:var(--calcite-ui-danger)}:host([layout=vertical][selected]) .container{border-color:var(--calcite-ui-brand)}:host([layout=vertical][selected]) .container .stepper-item-content:not(:empty){margin-block-end:var(--calcite-stepper-item-spacing-unit-l)}:host([layout=vertical]:hover:not([disabled]):not([selected])) .container,:host([layout=vertical]:focus:not([disabled]):not([selected])) .container{border-color:rgba(0, 122, 194, 0.5)}:host([layout=vertical][error]:hover:not([disabled]):not([selected])) .container,:host([layout=vertical][error]:focus:not([disabled]):not([selected])) .container{border-color:var(--calcite-ui-danger-hover)}:host([layout=horizontal]){display:contents}:host([layout=horizontal]) .container{display:contents}:host([layout=horizontal]) .stepper-item-header{border-width:0px;border-block-start-width:2px;border-style:solid;border-color:var(--calcite-ui-border-3);outline-color:transparent;grid-row:items;margin-inline-end:0.5rem;margin-block-end:var(--calcite-stepper-item-spacing-unit-s)}:host([layout=horizontal]) .stepper-item-header:focus{outline:2px solid var(--calcite-ui-focus-color, var(--calcite-ui-brand));outline-offset:calc(\n 2px *\n calc(\n 1 -\n 2 * clamp(\n 0,\n var(--calcite-ui-focus-offset-invert),\n 1\n )\n )\n )}:host([layout=horizontal]) .stepper-item-content{cursor:auto;transition-duration:150ms;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);padding-block:0;padding-inline-end:var(--calcite-stepper-item-spacing-unit-m);text-align:start}:host([layout=horizontal][selected]) .stepper-item-content{grid-area:2/1/2/-1}:host([layout=horizontal][scale=s]) .stepper-item-header{margin-inline-end:0.25rem;margin-block-end:var(--calcite-stepper-item-spacing-unit-s)}:host([layout=horizontal][scale=l]) .stepper-item-header{margin-inline-end:0.75rem;margin-block-end:var(--calcite-stepper-item-spacing-unit-s)}:host([layout=horizontal][complete]) .stepper-item-header{border-color:rgba(0, 122, 194, 0.5)}:host([layout=horizontal][complete]:hover:not([disabled]):not([selected])) .stepper-item-header,:host([layout=horizontal][complete]:focus:not([disabled]):not([selected])) .stepper-item-header{border-color:var(--calcite-ui-brand)}:host([layout=horizontal][error]) .stepper-item-header{border-color:var(--calcite-ui-danger)}:host([layout=horizontal][selected]) .stepper-item-header{border-color:var(--calcite-ui-brand)}:host([layout=horizontal]:hover:not([disabled]):not([selected])) .stepper-item-header,:host([layout=horizontal]:focus:not([disabled]):not([selected])) .stepper-item-header{border-color:rgba(0, 122, 194, 0.5)}:host([layout=horizontal][error]:hover:not([disabled]):not([selected])) .stepper-item-header,:host([layout=horizontal][error]:focus:not([disabled]):not([selected])) .stepper-item-header{border-color:var(--calcite-ui-danger-hover)}@media (forced-colors: active){:host .container{outline-width:0;outline-offset:0}:host(:focus),:host(:focus-visible){outline-color:canvasText}:host([selected]) .container{border-block-start-color:highlight}:host([selected]) .container .stepper-item-number{color:highlight}:host([selected]) .container .stepper-item-icon{color:highlight}:host([layout=vertical][selected]) .container{border-color:highlight}}:host([hidden]){display:none}[hidden]{display:none}";export{g as calcite_stepper_item}
|
6
|
+
import{r as e,c as t,h as i,H as o,g as r}from"./p-33613993.js";import{e as s,t as n}from"./p-e4f9b782.js";import{c as a,u as c,d as l}from"./p-ad75b9bb.js";import{n as d,c as h,d as p}from"./p-11550b3c.js";import{s as m,a as u,c as b}from"./p-d74e95e5.js";import"./p-8b448a5b.js";import"./p-e3525c00.js";import"./p-43ba7a04.js";import"./p-588bc0c0.js";const g=class{constructor(i){e(this,i),this.calciteInternalStepperItemKeyEvent=t(this,"calciteInternalStepperItemKeyEvent",6),this.calciteInternalStepperItemSelect=t(this,"calciteInternalStepperItemSelect",6),this.calciteInternalUserRequestedStepperItemSelect=t(this,"calciteInternalUserRequestedStepperItemSelect",6),this.calciteInternalStepperItemRegister=t(this,"calciteInternalStepperItemRegister",6),this.keyDownHandler=e=>{if(!this.disabled&&e.target===this.el)switch(e.key){case" ":case"Enter":this.emitUserRequestedItem(),e.preventDefault();break;case"ArrowUp":case"ArrowDown":case"ArrowLeft":case"ArrowRight":case"Home":case"End":this.calciteInternalStepperItemKeyEvent.emit({item:e}),e.preventDefault()}},this.handleItemClick=e=>{this.disabled||"horizontal"===this.layout&&e.composedPath().some((e=>{var t;return null===(t=e.classList)||void 0===t?void 0:t.contains("stepper-item-content")}))||this.emitUserRequestedItem()},this.emitUserRequestedItem=()=>{this.emitRequestedItem(),this.disabled||this.calciteInternalUserRequestedStepperItemSelect.emit({position:this.itemPosition})},this.emitRequestedItem=()=>{this.disabled||this.calciteInternalStepperItemSelect.emit({position:this.itemPosition})},this.selected=!1,this.complete=!1,this.error=!1,this.disabled=!1,this.heading=void 0,this.description=void 0,this.layout="horizontal",this.icon=!1,this.iconFlipRtl=!1,this.numbered=!1,this.scale="m",this.numberingSystem=void 0,this.effectiveLocale=""}selectedHandler(){this.selected&&this.emitRequestedItem()}disabledWatcher(){this.registerStepperItem()}effectiveLocaleWatcher(e){d.numberFormatOptions={locale:e,numberingSystem:this.numberingSystem,useGrouping:!1}}connectedCallback(){a(this),h(this)}componentWillLoad(){m(this),this.icon=s(this.el,"icon",!1),this.numbered=s(this.el,"numbered",!1),this.layout=s(this.el,"layout",!1),this.scale=s(this.el,"scale","m"),this.parentStepperEl=this.el.parentElement,this.itemPosition=this.getItemPosition(),this.registerStepperItem(),this.selected&&this.emitRequestedItem()}componentDidLoad(){u(this)}componentDidRender(){c(this,!0)}disconnectedCallback(){l(this),p(this)}render(){return i(o,{"aria-expanded":n(this.selected),onClick:this.handleItemClick,onKeyDown:this.keyDownHandler},i("div",{class:"container"},i("div",{class:"stepper-item-header",tabIndex:"horizontal"!==this.layout||this.disabled?null:0,ref:e=>this.headerEl=e},this.icon?this.renderIcon():null,this.numbered?i("div",{class:"stepper-item-number"},this.renderNumbers(),"."):null,i("div",{class:"stepper-item-header-text"},i("span",{class:"stepper-item-heading"},this.heading),i("span",{class:"stepper-item-description"},this.description))),i("div",{class:"stepper-item-content"},i("slot",null))))}updateActiveItemOnChange(e){(e.target===this.parentStepperEl||e.composedPath().includes(this.parentStepperEl))&&(this.selectedPosition=e.detail.position,this.determineSelectedItem())}async setFocus(){var e;await b(this),null===(e="vertical"===this.layout?this.el:this.headerEl)||void 0===e||e.focus()}renderIcon(){return i("calcite-icon",{class:"stepper-item-icon",flipRtl:this.iconFlipRtl,icon:this.selected?"circleF":this.error?"exclamationMarkCircleF":this.complete?"checkCircleF":"circle",scale:"s"})}determineSelectedItem(){this.selected=!this.disabled&&this.itemPosition===this.selectedPosition}registerStepperItem(){this.calciteInternalStepperItemRegister.emit({position:this.itemPosition})}getItemPosition(){var e;return Array.from(null===(e=this.parentStepperEl)||void 0===e?void 0:e.querySelectorAll("calcite-stepper-item")).indexOf(this.el)}renderNumbers(){return d.numberFormatOptions={locale:this.effectiveLocale,numberingSystem:this.numberingSystem,useGrouping:!1},d.numberFormatter.format(this.itemPosition+1)}get el(){return r(this)}static get watchers(){return{selected:["selectedHandler"],disabled:["disabledWatcher"],effectiveLocale:["effectiveLocaleWatcher"]}}};g.style=":host([layout=horizontal][disabled]) .stepper-item-header,:host([disabled]){cursor:default;-webkit-user-select:none;-moz-user-select:none;user-select:none;opacity:var(--calcite-ui-opacity-disabled)}:host([layout=horizontal][disabled]) .stepper-item-header *,:host([disabled]) *,:host([layout=horizontal][disabled]) .stepper-item-header ::slotted(*),:host([disabled]) ::slotted(*){pointer-events:none}:host([scale=s]){--calcite-stepper-item-spacing-unit-s:0.25rem;--calcite-stepper-item-spacing-unit-m:0.75rem;--calcite-stepper-item-spacing-unit-l:1rem;font-size:var(--calcite-font-size--1);line-height:1rem;margin-inline-end:0.25rem}:host([scale=s]) .stepper-item-description{font-size:var(--calcite-font-size--2);line-height:1rem}:host([scale=m]){--calcite-stepper-item-spacing-unit-s:0.5rem;--calcite-stepper-item-spacing-unit-m:1rem;--calcite-stepper-item-spacing-unit-l:1.25rem;font-size:var(--calcite-font-size-0);line-height:1.25rem;margin-inline-end:0.5rem}:host([scale=m]) .stepper-item-description{font-size:var(--calcite-font-size--1);line-height:1rem}:host([scale=l]){--calcite-stepper-item-spacing-unit-s:0.75rem;--calcite-stepper-item-spacing-unit-m:1.25rem;--calcite-stepper-item-spacing-unit-l:1.5rem;font-size:var(--calcite-font-size-1);line-height:1.5rem;margin-inline-end:0.75rem}:host([scale=l]) .stepper-item-description{font-size:var(--calcite-font-size-0);line-height:1.25rem}:host{position:relative;display:flex;flex-grow:1;flex-direction:column;align-self:flex-start;margin-block-end:var(--calcite-stepper-item-spacing-unit-s)}:host .container{position:relative;display:flex;flex-grow:1;cursor:pointer;flex-direction:column;border-width:0px;border-block-start-width:2px;border-style:solid;border-color:var(--calcite-ui-border-3);color:var(--calcite-ui-text-3);-webkit-text-decoration-line:none;text-decoration-line:none;outline:2px solid transparent;outline-offset:2px;transition-duration:150ms;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1)}:host{outline-color:transparent}:host(:focus){outline:2px solid var(--calcite-ui-focus-color, var(--calcite-ui-brand));outline-offset:calc(\n 2px *\n calc(\n 1 -\n 2 * clamp(\n 0,\n var(--calcite-ui-focus-offset-invert),\n 1\n )\n )\n )}:host .stepper-item-header{display:flex;cursor:pointer;align-items:flex-start}:host .stepper-item-content,:host .stepper-item-header{transition-duration:150ms;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);padding-block:var(--calcite-stepper-item-spacing-unit-l);padding-inline-end:var(--calcite-stepper-item-spacing-unit-m);text-align:start}:host .stepper-item-header *{display:inline-flex;align-items:center;transition-duration:150ms;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1)}:host .stepper-item-content{display:none;inline-size:100%;flex-direction:column;font-size:var(--calcite-font-size--2);line-height:1.375}:host .stepper-item-icon{margin-inline-end:var(--calcite-stepper-item-spacing-unit-m);margin-block-start:1px;display:inline-flex;block-size:0.75rem;flex-shrink:0;align-self:flex-start;color:var(--calcite-ui-text-3);opacity:var(--calcite-ui-opacity-disabled);transition-duration:150ms;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1)}:host .stepper-item-header-text{flex-direction:column;text-align:initial;margin-inline-end:auto}:host .stepper-item-heading,:host .stepper-item-description{display:flex;inline-size:100%}:host .stepper-item-heading{margin-block-end:0.25rem;font-weight:var(--calcite-font-weight-medium);color:var(--calcite-ui-text-2)}:host .stepper-item-description{color:var(--calcite-ui-text-3)}:host .stepper-item-number{font-weight:var(--calcite-font-weight-medium);color:var(--calcite-ui-text-3);transition-duration:150ms;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);margin-inline-end:var(--calcite-stepper-item-spacing-unit-m)}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}:host([complete]) .container{border-color:rgba(0, 122, 194, 0.5)}:host([complete]) .container .stepper-item-icon{color:var(--calcite-ui-brand)}:host([error]) .container{border-block-start-color:var(--calcite-ui-danger)}:host([error]) .container .stepper-item-number{color:var(--calcite-ui-danger)}:host([error]) .container .stepper-item-icon{opacity:1;color:var(--calcite-ui-danger)}:host(:hover:not([disabled]):not([selected])) .container,:host(:focus:not([disabled]):not([selected])) .container{border-block-start-color:var(--calcite-ui-brand)}:host(:hover:not([disabled]):not([selected])) .container .stepper-item-heading,:host(:focus:not([disabled]):not([selected])) .container .stepper-item-heading{color:var(--calcite-ui-text-1)}:host(:hover:not([disabled]):not([selected])) .container .stepper-item-description,:host(:focus:not([disabled]):not([selected])) .container .stepper-item-description{color:var(--calcite-ui-text-2)}:host([error]:hover:not([disabled]):not([selected])) .container,:host([error]:focus:not([disabled]):not([selected])) .container{border-block-start-color:var(--calcite-ui-danger-hover)}:host([selected]) .container{border-block-start-color:var(--calcite-ui-brand)}:host([selected]) .container .stepper-item-heading{color:var(--calcite-ui-text-1)}:host([selected]) .container .stepper-item-description{color:var(--calcite-ui-text-2)}:host([selected]) .container .stepper-item-number{color:var(--calcite-ui-brand)}:host([selected]) .container .stepper-item-icon{color:var(--calcite-ui-brand);opacity:1}:host([selected]) .container .stepper-item-content{display:flex}:host([layout=vertical]) .container{margin-inline:0px;margin-block-start:0px;flex:1 1 auto;border-block-start-width:0px;border-style:solid;border-color:var(--calcite-ui-border-3);padding-block:0px;border-inline-start-width:2px;padding-inline-start:var(--calcite-stepper-item-spacing-unit-l)}:host([layout=vertical]) .container .stepper-item-icon{order:3;margin-block:1px 0px;padding-inline-start:var(--calcite-stepper-item-spacing-unit-s);margin-inline-start:auto}:host([layout=vertical]) .container .stepper-item-header{padding-inline-end:0px}:host([layout=vertical]) .container .stepper-item-content{padding:0px}:host([layout=vertical][complete]) .container{border-color:rgba(0, 122, 194, 0.5)}:host([layout=vertical][complete]:hover:not([disabled]):not([selected])) .container,:host([layout=vertical][complete]:focus:not([disabled]):not([selected])) .container{border-color:var(--calcite-ui-brand)}:host([layout=vertical][error]) .container{border-color:var(--calcite-ui-danger)}:host([layout=vertical][selected]) .container{border-color:var(--calcite-ui-brand)}:host([layout=vertical][selected]) .container .stepper-item-content:not(:empty){margin-block-end:var(--calcite-stepper-item-spacing-unit-l)}:host([layout=vertical]:hover:not([disabled]):not([selected])) .container,:host([layout=vertical]:focus:not([disabled]):not([selected])) .container{border-color:rgba(0, 122, 194, 0.5)}:host([layout=vertical][error]:hover:not([disabled]):not([selected])) .container,:host([layout=vertical][error]:focus:not([disabled]):not([selected])) .container{border-color:var(--calcite-ui-danger-hover)}:host([layout=horizontal]){display:contents}:host([layout=horizontal]) .container{display:contents}:host([layout=horizontal]) .stepper-item-header{border-width:0px;border-block-start-width:2px;border-style:solid;border-color:var(--calcite-ui-border-3);outline-color:transparent;grid-row:items;margin-inline-end:0.5rem;margin-block-end:var(--calcite-stepper-item-spacing-unit-s)}:host([layout=horizontal]) .stepper-item-header:focus{outline:2px solid var(--calcite-ui-focus-color, var(--calcite-ui-brand));outline-offset:calc(\n 2px *\n calc(\n 1 -\n 2 * clamp(\n 0,\n var(--calcite-ui-focus-offset-invert),\n 1\n )\n )\n )}:host([layout=horizontal]) .stepper-item-content{cursor:auto;transition-duration:150ms;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);padding-block:0;padding-inline-end:var(--calcite-stepper-item-spacing-unit-m);text-align:start}:host([layout=horizontal][selected]) .stepper-item-content{grid-area:2/1/2/-1}:host([layout=horizontal][scale=s]) .stepper-item-header{margin-inline-end:0.25rem;margin-block-end:var(--calcite-stepper-item-spacing-unit-s)}:host([layout=horizontal][scale=l]) .stepper-item-header{margin-inline-end:0.75rem;margin-block-end:var(--calcite-stepper-item-spacing-unit-s)}:host([layout=horizontal][complete]) .stepper-item-header{border-color:rgba(0, 122, 194, 0.5)}:host([layout=horizontal][complete]:hover:not([disabled]):not([selected])) .stepper-item-header,:host([layout=horizontal][complete]:focus:not([disabled]):not([selected])) .stepper-item-header{border-color:var(--calcite-ui-brand)}:host([layout=horizontal][error]) .stepper-item-header{border-color:var(--calcite-ui-danger)}:host([layout=horizontal][selected]) .stepper-item-header{border-color:var(--calcite-ui-brand)}:host([layout=horizontal]:hover:not([disabled]):not([selected])) .stepper-item-header,:host([layout=horizontal]:focus:not([disabled]):not([selected])) .stepper-item-header{border-color:rgba(0, 122, 194, 0.5)}:host([layout=horizontal][error]:hover:not([disabled]):not([selected])) .stepper-item-header,:host([layout=horizontal][error]:focus:not([disabled]):not([selected])) .stepper-item-header{border-color:var(--calcite-ui-danger-hover)}@media (forced-colors: active){:host .container{outline-width:0;outline-offset:0}:host(:focus),:host(:focus-visible){outline-color:canvasText}:host([selected]) .container{border-block-start-color:highlight}:host([selected]) .container .stepper-item-number{color:highlight}:host([selected]) .container .stepper-item-icon{color:highlight}:host([layout=vertical][selected]) .container{border-color:highlight}}:host([hidden]){display:none}[hidden]{display:none}";export{g as calcite_stepper_item}
|
@@ -0,0 +1,6 @@
|
|
1
|
+
/*!
|
2
|
+
* Copyright 2022 Esri
|
3
|
+
* Licensed under the Apache License, Version 2.0
|
4
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
5
|
+
*/
|
6
|
+
export{I as calcite_input_time_picker}from"./p-3a8d82a2.js";import"./p-33613993.js";import"./p-49e9e4e3.js";import"./p-e4f9b782.js";import"./p-8b448a5b.js";import"./p-e3525c00.js";import"./p-ad75b9bb.js";import"./p-43ba7a04.js";import"./p-72f34a0a.js";import"./p-d74e95e5.js";import"./p-11550b3c.js";import"./p-588bc0c0.js";import"./p-26b28806.js";import"./p-08e35485.js";import"./p-79cc0531.js";
|
@@ -3,4 +3,4 @@
|
|
3
3
|
* Licensed under the Apache License, Version 2.0
|
4
4
|
* http://www.apache.org/licenses/LICENSE-2.0
|
5
5
|
*/
|
6
|
-
import{d as e}from"./p-
|
6
|
+
import{d as e}from"./p-3a8d82a2.js";import"./p-33613993.js";import"./p-49e9e4e3.js";import"./p-e4f9b782.js";import"./p-8b448a5b.js";import"./p-e3525c00.js";import"./p-ad75b9bb.js";import"./p-43ba7a04.js";import"./p-72f34a0a.js";import"./p-d74e95e5.js";import"./p-11550b3c.js";import"./p-588bc0c0.js";import"./p-26b28806.js";import"./p-08e35485.js";import"./p-79cc0531.js";var a={words:{m:["jedan minut","jednog minuta"],mm:["%d minut","%d minuta","%d minuta"],h:["jedan sat","jednog sata"],hh:["%d sat","%d sata","%d sati"],d:["jedan dan","jednog dana"],dd:["%d dan","%d dana","%d dana"],M:["jedan mesec","jednog meseca"],MM:["%d mesec","%d meseca","%d meseci"],y:["jednu godinu","jedne godine"],yy:["%d godinu","%d godine","%d godina"]},correctGrammarCase:function(e,a){return e%10>=1&&e%10<=4&&(e%100<10||e%100>=20)?e%10==1?a[0]:a[1]:a[2]},relativeTimeFormatter:function(e,d,t,r){var n=a.words[t];if(1===t.length)return"y"===t&&d?"jedna godina":r||d?n[0]:n[1];var m=a.correctGrammarCase(e,n);return"yy"===t&&d&&"%d godinu"===m?e+" godina":m.replace("%d",e)}},d={name:"sr",weekdays:"Nedelja_Ponedeljak_Utorak_Sreda_Četvrtak_Petak_Subota".split("_"),weekdaysShort:"Ned._Pon._Uto._Sre._Čet._Pet._Sub.".split("_"),weekdaysMin:"ne_po_ut_sr_če_pe_su".split("_"),months:"Januar_Februar_Mart_April_Maj_Jun_Jul_Avgust_Septembar_Oktobar_Novembar_Decembar".split("_"),monthsShort:"Jan._Feb._Mar._Apr._Maj_Jun_Jul_Avg._Sep._Okt._Nov._Dec.".split("_"),weekStart:1,relativeTime:{future:"za %s",past:"pre %s",s:"nekoliko sekundi",m:a.relativeTimeFormatter,mm:a.relativeTimeFormatter,h:a.relativeTimeFormatter,hh:a.relativeTimeFormatter,d:a.relativeTimeFormatter,dd:a.relativeTimeFormatter,M:a.relativeTimeFormatter,MM:a.relativeTimeFormatter,y:a.relativeTimeFormatter,yy:a.relativeTimeFormatter},ordinal:function(e){return e+"."},formats:{LT:"H:mm",LTS:"H:mm:ss",L:"D. M. YYYY.",LL:"D. MMMM YYYY.",LLL:"D. MMMM YYYY. H:mm",LLLL:"dddd, D. MMMM YYYY. H:mm"}};e.locale(d,null,!0);export default d;
|
@@ -3,7 +3,7 @@
|
|
3
3
|
* Licensed under the Apache License, Version 2.0
|
4
4
|
* http://www.apache.org/licenses/LICENSE-2.0
|
5
5
|
*/
|
6
|
-
import{r as e,c as t,h as i,g as a}from"./p-33613993.js";import{c as s,d as n}from"./p-bfc78840.js";import{t as o,g as l}from"./p-
|
6
|
+
import{r as e,c as t,h as i,g as a}from"./p-33613993.js";import{c as s,d as n}from"./p-bfc78840.js";import{t as o,g as l}from"./p-e4f9b782.js";import{c as r,d as c}from"./p-11550b3c.js";import{c as d,d as h,s as m,u as p}from"./p-79cc0531.js";import"./p-588bc0c0.js";import"./p-8b448a5b.js";import"./p-e3525c00.js";import"./p-43ba7a04.js";
|
7
7
|
/*!
|
8
8
|
* All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
9
9
|
* See https://github.com/Esri/calcite-design-system/blob/main/LICENSE.md for details.
|
@@ -3,7 +3,7 @@
|
|
3
3
|
* Licensed under the Apache License, Version 2.0
|
4
4
|
* http://www.apache.org/licenses/LICENSE-2.0
|
5
5
|
*/
|
6
|
-
import{r as i,c as t,h as e,g as a}from"./p-33613993.js";import{a as s,t as n}from"./p-
|
6
|
+
import{r as i,c as t,h as e,g as a}from"./p-33613993.js";import{a as s,t as n}from"./p-e4f9b782.js";import{c,d as o}from"./p-11550b3c.js";import{c as r}from"./p-588bc0c0.js";import{u as l,c as h,s as d,d as p}from"./p-79cc0531.js";import{H as g}from"./p-54cc02c9.js";import"./p-8b448a5b.js";import"./p-e3525c00.js";import"./p-43ba7a04.js";
|
7
7
|
/*!
|
8
8
|
* All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
9
9
|
* See https://github.com/Esri/calcite-design-system/blob/main/LICENSE.md for details.
|
@@ -3,7 +3,7 @@
|
|
3
3
|
* Licensed under the Apache License, Version 2.0
|
4
4
|
* http://www.apache.org/licenses/LICENSE-2.0
|
5
5
|
*/
|
6
|
-
import{a as n,i as e,b as t}from"./p-
|
6
|
+
import{a as n,i as e,b as t}from"./p-11550b3c.js";
|
7
7
|
/*!
|
8
8
|
* All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
9
9
|
* See https://github.com/Esri/calcite-design-system/blob/main/LICENSE.md for details.
|
@@ -3,4 +3,4 @@
|
|
3
3
|
* Licensed under the Apache License, Version 2.0
|
4
4
|
* http://www.apache.org/licenses/LICENSE-2.0
|
5
5
|
*/
|
6
|
-
import{d as _}from"./p-
|
6
|
+
import{d as _}from"./p-3a8d82a2.js";import"./p-33613993.js";import"./p-49e9e4e3.js";import"./p-e4f9b782.js";import"./p-8b448a5b.js";import"./p-e3525c00.js";import"./p-ad75b9bb.js";import"./p-43ba7a04.js";import"./p-72f34a0a.js";import"./p-d74e95e5.js";import"./p-11550b3c.js";import"./p-588bc0c0.js";import"./p-26b28806.js";import"./p-08e35485.js";import"./p-79cc0531.js";var m={name:"el",weekdays:"Κυριακή_Δευτέρα_Τρίτη_Τετάρτη_Πέμπτη_Παρασκευή_Σάββατο".split("_"),weekdaysShort:"Κυρ_Δευ_Τρι_Τετ_Πεμ_Παρ_Σαβ".split("_"),weekdaysMin:"Κυ_Δε_Τρ_Τε_Πε_Πα_Σα".split("_"),months:"Ιανουάριος_Φεβρουάριος_Μάρτιος_Απρίλιος_Μάιος_Ιούνιος_Ιούλιος_Αύγουστος_Σεπτέμβριος_Οκτώβριος_Νοέμβριος_Δεκέμβριος".split("_"),monthsShort:"Ιαν_Φεβ_Μαρ_Απρ_Μαι_Ιουν_Ιουλ_Αυγ_Σεπτ_Οκτ_Νοε_Δεκ".split("_"),ordinal:function(_){return _},weekStart:1,relativeTime:{future:"σε %s",past:"πριν %s",s:"μερικά δευτερόλεπτα",m:"ένα λεπτό",mm:"%d λεπτά",h:"μία ώρα",hh:"%d ώρες",d:"μία μέρα",dd:"%d μέρες",M:"ένα μήνα",MM:"%d μήνες",y:"ένα χρόνο",yy:"%d χρόνια"},formats:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"}};_.locale(m,null,!0);export default m;
|
@@ -3,14 +3,14 @@
|
|
3
3
|
* Licensed under the Apache License, Version 2.0
|
4
4
|
* http://www.apache.org/licenses/LICENSE-2.0
|
5
5
|
*/
|
6
|
-
import{c as t,b as n}from"./p-
|
6
|
+
import{c as t,b as n}from"./p-e4f9b782.js";import{n as e}from"./p-43ba7a04.js";import{c as s}from"./p-588bc0c0.js";
|
7
7
|
/*!
|
8
8
|
* All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
9
9
|
* See https://github.com/Esri/calcite-design-system/blob/main/LICENSE.md for details.
|
10
10
|
* v1.6.1
|
11
|
-
*/const i=new RegExp("\\.(0+)?$"),r=new RegExp("0+$");class
|
11
|
+
*/const i=new RegExp("\\.(0+)?$"),r=new RegExp("0+$");class u{constructor(t){if(t instanceof u)return t;const[n,e]=function(t){const n=t.split(/[eE]/);if(1===n.length)return t;const e=+t;if(Number.isSafeInteger(e))return`${e}`;const s="-"===t.charAt(0),r=+n[1],u=n[0].split("."),a=(s?u[0].substring(1):u[0])||"",o=u[1]||"",h=r>0?`${a}${((t,n)=>{const e=n>t.length?`${t}${"0".repeat(n-t.length)}`:t;return`${e.slice(0,n)}.${e.slice(n)}`})(o,r)}`:`${((t,n)=>{const e=Math.abs(n)-t.length,s=e>0?`${"0".repeat(e)}${t}`:t;return`${s.slice(0,n)}.${s.slice(n)}`})(a,r)}${o}`;return`${s?"-":""}${"."===h.charAt(0)?"0":""}${h.replace(i,"").replace(c,"")}`}(t).split(".").concat("");this.value=BigInt(n+e.padEnd(u.DECIMALS,"0").slice(0,u.DECIMALS))+BigInt(u.ROUNDED&&e[u.DECIMALS]>="5"),this.isNegative="-"===t.charAt(0)}getIntegersAndDecimals(){const t=this.value.toString().replace("-","").padStart(u.DECIMALS+1,"0");return{integers:t.slice(0,-u.DECIMALS),decimals:t.slice(-u.DECIMALS).replace(r,"")}}toString(){const{integers:t,decimals:n}=this.getIntegersAndDecimals();return`${this.isNegative?"-":""}${t}${n.length?"."+n:""}`}formatToParts(t){const{integers:n,decimals:e}=this.getIntegersAndDecimals(),s=t.numberFormatter.formatToParts(BigInt(n));return this.isNegative&&s.unshift({type:"minusSign",value:t.minusSign}),e.length&&(s.push({type:"decimal",value:t.decimal}),e.split("").forEach((t=>s.push({type:"fraction",value:t})))),s}format(t){const{integers:n,decimals:e}=this.getIntegersAndDecimals();return`${this.isNegative?t.minusSign:""}${t.numberFormatter.format(BigInt(n))}${e.length?`${t.decimal}${e.split("").map((n=>t.numberFormatter.format(Number(n)))).join("")}`:""}`}add(t){return u.fromBigInt(this.value+new u(t).value)}subtract(t){return u.fromBigInt(this.value-new u(t).value)}multiply(t){return u._divRound(this.value*new u(t).value,u.SHIFT)}divide(t){return u._divRound(this.value*u.SHIFT,new u(t).value)}}function a(t){return!(!t||isNaN(Number(t)))}function o(t){return t&&(n=t,e.some((t=>n.includes(t))))?f(t,(t=>{let n=!1;const s=t.split("").filter(((t,s)=>t.match(/\./g)&&!n?(n=!0,!0):!(!t.match(/\-/g)||0!==s)||e.includes(t))).reduce(((t,n)=>t+n));return a(s)?new u(s).toString():""})):"";var n}u.DECIMALS=100,u.ROUNDED=!0,u.SHIFT=BigInt("1"+"0".repeat(u.DECIMALS)),u._divRound=(t,n)=>u.fromBigInt(t/n+(u.ROUNDED?t*BigInt(2)/n%BigInt(2):BigInt(0))),u.fromBigInt=t=>Object.assign(Object.create(u.prototype),{value:t,isNegative:t<BigInt(0)});const c=/^([-0])0+(?=\d)/,h=/(?!^\.)\.$/,l=/(?!^-)-/g,g=/^-\b0\b\.?0*$/,m=/0*$/,$=t=>f(t,(t=>{const n=t.replace(l,"").replace(h,"").replace(c,"$1");return a(n)?g.test(n)?n:function(t){const n=t.split(".")[1],e=new u(t).toString(),[s,i]=e.split(".");return n&&i!==n?`${s}.${n}`:e}(n):t}));function f(t,n){if(!t)return t;const e=t.toLowerCase().indexOf("e")+1;return e?t.replace(/[eE]*$/g,"").substring(0,e).concat(t.slice(e).replace(/[eE]/g,"")).split(/[eE]/).map(((t,e)=>n(1===e?t.replace(/\./g,""):t))).join("e").replace(/^e/,"1e"):n(t)}function b(t,n,e){const s=n.split(".")[1];if(s){const i=s.match(m)[0];if(i&&e.delocalize(t).length!==n.length&&-1===s.indexOf("e")){const n=e.decimal;return(t=t.includes(n)?t:`${t}${n}`).padEnd(t.length+i.length,e.localize("0"))}}return t}
|
12
12
|
/*!
|
13
13
|
* All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
14
14
|
* See https://github.com/Esri/calcite-design-system/blob/main/LICENSE.md for details.
|
15
15
|
* v1.6.1
|
16
|
-
*/const d="en",p=["ar","bg","bs","ca","cs","da","de","el",d,"es","et","fi","fr","he","hr","hu","id","it","ja","ko","lt","lv","no","nl","pl","pt-BR","pt-PT","ro","ru","sk","sl","sr","sv","th","tr","uk","vi","zh-CN","zh-HK","zh-TW"],w=["ar","bg","bs","ca","cs","da","de","de-AT","de-CH","el",d,"en-AU","en-CA","en-GB","es","es-MX","et","fi","fr","fr-CH","he","hi","hr","hu","id","it","it-CH","ja","ko","lt","lv","mk","no","nl","pl","pt","pt-PT","ro","ru","sk","sl","sr","sv","th","tr","uk","vi","zh-CN","zh-HK","zh-TW"],v=["arab","arabext","bali","beng","deva","fullwide","gujr","guru","hanidec","khmr","knda","laoo","latn","limb","mlym","mong","mymr","orya","tamldec","telu","thai","tibt"],I=t=>v.includes(t),B=(new Intl.NumberFormat).resolvedOptions().numberingSystem,E="arab"!==B&&I(B)?B:"latn",N=t=>I(t)?t:E;function j(t,n="cldr"){const e="cldr"===n?w:p;return t?e.includes(t)?t:"nb"===(t=t.toLowerCase())?"no":"t9n"===n&&"pt"===t?"pt-BR":(t.includes("-")&&(t=t.replace(/(\w+)-(\w+)/,((t,n,e)=>`${n}-${e.toUpperCase()}`)),e.includes(t)||(t=t.split("-")[0])),"zh"===t?"zh-CN":e.includes(t)?t:(console.warn(`Translations for the "${t}" locale are not available and will fall back to the default, English (en).`),d)):d}const k=new Set;function x(n){!function(n){n.effectiveLocale=function(n){return n.el.lang||t(n.el,"[lang]")?.lang||document.documentElement.lang||d}(n)}(n),0===k.size&&R?.observe(document.documentElement,{attributes:!0,attributeFilter:["lang"],subtree:!0}),k.add(n)}function y(t){k.delete(t),0===k.size&&R.disconnect()}const R=s("mutation",(e=>{e.forEach((e=>{const s=e.target;k.forEach((e=>{if(!n(s,e.el))return;const i=t(e.el,"[lang]");if(!i)return void(e.effectiveLocale=d);const r=i.lang;e.effectiveLocale=i.hasAttribute("lang")&&""===r?d:r}))}))})),S=new class{constructor(){this.delocalize=t=>this._numberFormatOptions?f(t,(t=>t.replace(new RegExp(`[${this._minusSign}]`,"g"),"-").replace(new RegExp(`[${this._group}]`,"g"),"").replace(new RegExp(`[${this._decimal}]`,"g"),".").replace(new RegExp(`[${this._digits.join("")}]`,"g"),this._getDigitIndex))):t,this.localize=t=>this._numberFormatOptions?f(t,(t=>
|
16
|
+
*/const d="en",p=["ar","bg","bs","ca","cs","da","de","el",d,"es","et","fi","fr","he","hr","hu","id","it","ja","ko","lt","lv","no","nl","pl","pt-BR","pt-PT","ro","ru","sk","sl","sr","sv","th","tr","uk","vi","zh-CN","zh-HK","zh-TW"],w=["ar","bg","bs","ca","cs","da","de","de-AT","de-CH","el",d,"en-AU","en-CA","en-GB","es","es-MX","et","fi","fr","fr-CH","he","hi","hr","hu","id","it","it-CH","ja","ko","lt","lv","mk","no","nl","pl","pt","pt-PT","ro","ru","sk","sl","sr","sv","th","tr","uk","vi","zh-CN","zh-HK","zh-TW"],v=["arab","arabext","bali","beng","deva","fullwide","gujr","guru","hanidec","khmr","knda","laoo","latn","limb","mlym","mong","mymr","orya","tamldec","telu","thai","tibt"],I=t=>v.includes(t),B=(new Intl.NumberFormat).resolvedOptions().numberingSystem,E="arab"!==B&&I(B)?B:"latn",N=t=>I(t)?t:E;function j(t,n="cldr"){const e="cldr"===n?w:p;return t?e.includes(t)?t:"nb"===(t=t.toLowerCase())?"no":"t9n"===n&&"pt"===t?"pt-BR":(t.includes("-")&&(t=t.replace(/(\w+)-(\w+)/,((t,n,e)=>`${n}-${e.toUpperCase()}`)),e.includes(t)||(t=t.split("-")[0])),"zh"===t?"zh-CN":e.includes(t)?t:(console.warn(`Translations for the "${t}" locale are not available and will fall back to the default, English (en).`),d)):d}const k=new Set;function x(n){!function(n){n.effectiveLocale=function(n){return n.el.lang||t(n.el,"[lang]")?.lang||document.documentElement.lang||d}(n)}(n),0===k.size&&R?.observe(document.documentElement,{attributes:!0,attributeFilter:["lang"],subtree:!0}),k.add(n)}function y(t){k.delete(t),0===k.size&&R.disconnect()}const R=s("mutation",(e=>{e.forEach((e=>{const s=e.target;k.forEach((e=>{if(!n(s,e.el))return;const i=t(e.el,"[lang]");if(!i)return void(e.effectiveLocale=d);const r=i.lang;e.effectiveLocale=i.hasAttribute("lang")&&""===r?d:r}))}))})),S=new class{constructor(){this.delocalize=t=>this._numberFormatOptions?f(t,(t=>t.replace(new RegExp(`[${this._minusSign}]`,"g"),"-").replace(new RegExp(`[${this._group}]`,"g"),"").replace(new RegExp(`[${this._decimal}]`,"g"),".").replace(new RegExp(`[${this._digits.join("")}]`,"g"),this._getDigitIndex))):t,this.localize=t=>this._numberFormatOptions?f(t,(t=>a(t.trim())?new u(t.trim()).format(this).replace(new RegExp(`[${this._actualGroup}]`,"g"),this._group):t)):t}get group(){return this._group}get decimal(){return this._decimal}get minusSign(){return this._minusSign}get digits(){return this._digits}get numberFormatter(){return this._numberFormatter}get numberFormatOptions(){return this._numberFormatOptions}set numberFormatOptions(t){if(t.locale=j(t?.locale),t.numberingSystem=N(t?.numberingSystem),!this._numberFormatOptions&&t.locale===d&&t.numberingSystem===E&&2===Object.keys(t).length||JSON.stringify(this._numberFormatOptions)===JSON.stringify(t))return;this._numberFormatOptions=t,this._numberFormatter=new Intl.NumberFormat(this._numberFormatOptions.locale,this._numberFormatOptions),this._digits=[...new Intl.NumberFormat(this._numberFormatOptions.locale,{useGrouping:!1,numberingSystem:this._numberFormatOptions.numberingSystem}).format(9876543210)].reverse();const n=new Map(this._digits.map(((t,n)=>[t,n]))),e=new Intl.NumberFormat(this._numberFormatOptions.locale,{numberingSystem:this._numberFormatOptions.numberingSystem}).formatToParts(-12345678.9);this._actualGroup=e.find((t=>"group"===t.type)).value,this._group=0===this._actualGroup.trim().length||" "==this._actualGroup?" ":this._actualGroup,this._decimal=e.find((t=>"decimal"===t.type)).value,this._minusSign=e.find((t=>"minusSign"===t.type)).value,this._getDigitIndex=t=>n.get(t)}};let z,O;function C(t,n){t=j(t),z||(z=new Map),O!==t&&(z.clear(),O=t);const e=function(t={}){return Object.entries(t).sort((([t],[n])=>t.localeCompare(n))).map((t=>`${t[0]}-${t[1]}`)).flat().join(":")}(n),s=z.get(e);if(s)return s;const i=new Intl.DateTimeFormat(t,n);return z.set(e,i),i}export{u as B,C as a,N as b,x as c,y as d,b as e,j as g,a as i,S as n,o as p,$ as s}
|