@esri/solutions-components 0.10.22 → 0.10.24
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/cjs/basemap-gallery_7.cjs.entry.js +1 -1
- package/dist/cjs/{calcite-accordion-item.cjs.entry.js → calcite-accordion_2.cjs.entry.js} +83 -1
- package/dist/cjs/calcite-alert_5.cjs.entry.js +2 -2
- package/dist/cjs/calcite-combobox_3.cjs.entry.js +17 -2
- package/dist/cjs/calcite-shell-panel_14.cjs.entry.js +6 -6
- package/dist/cjs/{calcite-tree_3.cjs.entry.js → calcite-tree_2.cjs.entry.js} +0 -317
- package/dist/cjs/card-manager_3.cjs.entry.js +4 -4
- package/dist/cjs/crowdsource-manager.cjs.entry.js +3 -2
- package/dist/cjs/{downloadUtils-470f6a27.js → downloadUtils-17f08e5e.js} +235 -160
- package/dist/cjs/feature-list.cjs.entry.js +2 -2
- package/dist/cjs/{index.es-6387d8fb.js → index.es-2518dd41.js} +36 -47
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/map-select-tools_3.cjs.entry.js +1 -1
- package/dist/cjs/{popupUtils-c38f840d.js → popupUtils-24306e6b.js} +1 -1
- package/dist/cjs/public-notification.cjs.entry.js +1 -1
- package/dist/cjs/solution-contents_3.cjs.entry.js +1 -1
- package/dist/cjs/solution-item-accordion.cjs.entry.js +233 -0
- package/dist/cjs/solution-item-icon.cjs.entry.js +328 -0
- package/dist/cjs/solutions-components.cjs.js +1 -1
- package/dist/cjs/spatial-ref.cjs.entry.js +1 -1
- package/dist/collection/assets/t9n/solution-item-accordion/resources.json +3 -0
- package/dist/collection/assets/t9n/solution-item-accordion/resources_en.json +3 -0
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/crowdsource-manager/crowdsource-manager.css +4 -0
- package/dist/collection/components/crowdsource-manager/crowdsource-manager.js +2 -1
- package/dist/collection/components/layer-table/layer-table.js +3 -3
- package/dist/collection/components/map-layer-picker/map-layer-picker.js +17 -2
- package/dist/collection/components/map-picker/map-picker.js +1 -1
- package/dist/collection/components/solution-item-accordion/solution-item-accordion.css +23 -0
- package/dist/collection/components/solution-item-accordion/solution-item-accordion.js +287 -0
- package/dist/collection/components/solution-item-details/solution-item-details.js +1 -1
- package/dist/collection/components/solution-item-icon/solution-item-icon.js +1 -1
- package/dist/collection/components/solution-item-sharing/solution-item-sharing.js +1 -1
- package/dist/collection/components/solution-organization-variables/solution-organization-variables.js +1 -1
- package/dist/collection/components/solution-resource-item/solution-resource-item.js +1 -1
- package/dist/collection/components/solution-spatial-ref/solution-spatial-ref.js +1 -1
- package/dist/collection/components/solution-template-data/solution-template-data.js +1 -1
- package/dist/collection/components/solution-variables/solution-variables.js +1 -1
- package/dist/collection/components/spatial-ref/spatial-ref.js +1 -1
- package/dist/collection/demos/solution-item-accordion.html +345 -0
- package/dist/collection/utils/interfaces.ts +11 -0
- package/dist/{esm/calcite-accordion-item.entry.js → components/accordion-item.js} +47 -16
- package/dist/{esm/calcite-accordion.entry.js → components/accordion.js} +36 -10
- package/dist/components/calcite-accordion-item.js +1 -222
- package/dist/components/calcite-accordion.js +1 -110
- package/dist/components/crowdsource-manager.js +3 -2
- package/dist/components/downloadUtils.js +234 -159
- package/dist/components/index.es.js +35 -46
- package/dist/components/layer-table2.js +3 -3
- package/dist/components/map-layer-picker2.js +17 -2
- package/dist/components/map-picker2.js +1 -1
- package/dist/components/solution-item-accordion.d.ts +11 -0
- package/dist/components/solution-item-accordion.js +336 -0
- package/dist/components/solution-item-details2.js +1 -1
- package/dist/components/solution-item-icon2.js +1 -1
- package/dist/components/solution-item-sharing2.js +1 -1
- package/dist/components/solution-organization-variables2.js +1 -1
- package/dist/components/solution-resource-item2.js +1 -1
- package/dist/components/solution-spatial-ref2.js +1 -1
- package/dist/components/solution-template-data2.js +1 -1
- package/dist/components/solution-variables2.js +1 -1
- package/dist/components/spatial-ref.js +1 -1
- package/dist/esm/{ExpandToggle-b5147279.js → ExpandToggle-9289b7ca.js} +1 -1
- package/dist/esm/{ar-e0e64e78.js → ar-8dded5d5.js} +8 -8
- package/dist/esm/basemap-gallery_7.entry.js +1 -1
- package/dist/esm/{bg-d2d8dbe0.js → bg-c1cdf619.js} +8 -8
- package/dist/esm/{bs-d883901d.js → bs-a40506a4.js} +8 -8
- package/dist/esm/buffer-tools_3.entry.js +1 -1
- package/dist/esm/{ca-064729ad.js → ca-67879a0c.js} +8 -8
- package/dist/esm/calcite-accordion_2.entry.js +279 -0
- package/dist/esm/calcite-action-bar.entry.js +4 -4
- package/dist/esm/calcite-action-group.entry.js +3 -3
- package/dist/esm/calcite-action-menu_2.entry.js +3 -3
- package/dist/esm/calcite-action-pad_2.entry.js +4 -4
- package/dist/esm/calcite-action_2.entry.js +6 -6
- package/dist/esm/calcite-alert_5.entry.js +6 -6
- package/dist/esm/calcite-avatar.entry.js +1 -1
- package/dist/esm/calcite-block-section.entry.js +3 -3
- package/dist/esm/calcite-block_5.entry.js +9 -9
- package/dist/esm/calcite-button.entry.js +5 -5
- package/dist/esm/calcite-card-group.entry.js +1 -1
- package/dist/esm/calcite-card.entry.js +3 -3
- package/dist/esm/calcite-carousel.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_2.entry.js +4 -4
- 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_3.entry.js +25 -10
- package/dist/esm/calcite-date-picker-day_3.entry.js +3 -3
- package/dist/esm/calcite-dialog.entry.js +5 -5
- package/dist/esm/calcite-dropdown_2.entry.js +3 -3
- package/dist/esm/calcite-fab.entry.js +1 -1
- package/dist/esm/calcite-filter_5.entry.js +3 -3
- package/dist/esm/calcite-graph_2.entry.js +4 -4
- package/dist/esm/calcite-icon_2.entry.js +2 -2
- package/dist/esm/calcite-inline-editable.entry.js +4 -4
- package/dist/esm/calcite-input-number.entry.js +5 -5
- package/dist/esm/calcite-input-text.entry.js +5 -5
- package/dist/esm/{calcite-input-time-picker-66e7a9f3.js → calcite-input-time-picker-37845feb.js} +56 -56
- 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-meter.entry.js +3 -3
- package/dist/esm/calcite-modal_3.entry.js +5 -5
- package/dist/esm/calcite-navigation.entry.js +1 -1
- package/dist/esm/calcite-notice.entry.js +4 -4
- package/dist/esm/calcite-option_2.entry.js +3 -3
- package/dist/esm/calcite-pagination.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-group.entry.js +1 -1
- 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-sheet.entry.js +3 -3
- package/dist/esm/calcite-shell-center-row.entry.js +1 -1
- package/dist/esm/calcite-shell-panel_14.entry.js +10 -10
- package/dist/esm/calcite-sortable-list.entry.js +1 -1
- package/dist/esm/calcite-stepper-item.entry.js +3 -3
- package/dist/esm/calcite-stepper.entry.js +3 -3
- package/dist/esm/calcite-switch.entry.js +3 -3
- package/dist/esm/calcite-table-cell_2.entry.js +3 -3
- package/dist/esm/calcite-table-row.entry.js +1 -1
- package/dist/esm/calcite-table.entry.js +3 -3
- package/dist/esm/calcite-text-area.entry.js +5 -5
- package/dist/esm/calcite-tile-group.entry.js +1 -1
- 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 +3 -3
- package/dist/esm/{calcite-tree_3.entry.js → calcite-tree_2.entry.js} +3 -319
- package/dist/esm/card-manager_3.entry.js +4 -4
- package/dist/esm/crowdsource-manager.entry.js +3 -2
- package/dist/esm/{cs-3751e560.js → cs-b01aecfc.js} +8 -8
- package/dist/esm/{da-227f8ad5.js → da-87ac64be.js} +8 -8
- package/dist/esm/{date-87a67cb4.js → date-7a1345c1.js} +1 -1
- package/dist/esm/{de-a5d2b25b.js → de-0eb6c065.js} +8 -8
- package/dist/esm/{de-at-66232b80.js → de-at-2db1a5d5.js} +8 -8
- package/dist/esm/{de-ch-1264ed4c.js → de-ch-063c0a6b.js} +8 -8
- package/dist/esm/{dom-63d2d41c.js → dom-451ed293.js} +1 -1
- package/dist/esm/{downloadUtils-d1f791c5.js → downloadUtils-4a34c86a.js} +235 -160
- package/dist/esm/{el-f5bf7ca3.js → el-eb29e645.js} +8 -8
- package/dist/esm/{en-au-2ac8f62e.js → en-au-00f884ad.js} +8 -8
- package/dist/esm/{en-ca-a1602b49.js → en-ca-1e7456d7.js} +8 -8
- package/dist/esm/{en-gb-28354b2e.js → en-gb-60a33692.js} +8 -8
- package/dist/esm/{es-feb7aad2.js → es-74f8b164.js} +8 -8
- package/dist/esm/{es-mx-5d64f899.js → es-mx-2bfa704a.js} +8 -8
- package/dist/esm/{et-173d2f49.js → et-b1a2d978.js} +8 -8
- package/dist/esm/feature-list.entry.js +2 -2
- package/dist/esm/{fi-ff9bb719.js → fi-70441d5b.js} +8 -8
- package/dist/esm/{floating-ui-c7ae81d9.js → floating-ui-4b1f5138.js} +1 -1
- package/dist/esm/{focusTrapComponent-833b1234.js → focusTrapComponent-b9709e71.js} +1 -1
- package/dist/esm/{form-08e1bcb7.js → form-fa4c471b.js} +1 -1
- package/dist/esm/{fr-e3af6835.js → fr-cea05ec9.js} +8 -8
- package/dist/esm/{fr-ch-491f1abe.js → fr-ch-8faa2fcf.js} +8 -8
- package/dist/esm/{he-47aa8dde.js → he-058ece46.js} +8 -8
- package/dist/esm/{hi-1700df3e.js → hi-163a268e.js} +8 -8
- package/dist/esm/{hr-68b828f5.js → hr-2b69b2ad.js} +8 -8
- package/dist/esm/{hu-df6a8f29.js → hu-e46e0cb6.js} +8 -8
- package/dist/esm/{id-8091582d.js → id-ebccdbbb.js} +8 -8
- package/dist/esm/{index.es-decad494.js → index.es-5f44061b.js} +36 -47
- package/dist/esm/{it-1f5e149d.js → it-813be6d0.js} +8 -8
- package/dist/esm/{it-ch-bf7fcac6.js → it-ch-bc95119e.js} +8 -8
- package/dist/esm/{ja-a5117166.js → ja-3488d28c.js} +8 -8
- package/dist/esm/{ko-9d7a9e79.js → ko-54faa268.js} +8 -8
- package/dist/esm/{label-4c4e06d6.js → label-414f1003.js} +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{locale-4441c976.js → locale-337dc231.js} +1 -1
- package/dist/esm/{lt-2e1c53de.js → lt-8c773940.js} +8 -8
- package/dist/esm/{lv-ca1ba866.js → lv-4882a326.js} +8 -8
- package/dist/esm/map-select-tools_3.entry.js +1 -1
- package/dist/esm/{mk-421d0d41.js → mk-d045a827.js} +8 -8
- package/dist/esm/{nb-5b103e32.js → nb-529fd6f8.js} +8 -8
- package/dist/esm/{nl-eac33461.js → nl-ebd398ac.js} +8 -8
- package/dist/esm/{openCloseComponent-c8c8645b.js → openCloseComponent-80c6ee4b.js} +1 -1
- package/dist/esm/{pl-03531ccb.js → pl-4cd334ed.js} +8 -8
- package/dist/esm/{popupUtils-4e0a103f.js → popupUtils-3ccb86bd.js} +1 -1
- package/dist/esm/{pt-b5d8bffc.js → pt-be0c86a5.js} +8 -8
- package/dist/esm/{pt-br-dee45728.js → pt-br-29226fc3.js} +8 -8
- package/dist/esm/public-notification.entry.js +1 -1
- package/dist/esm/{ro-df6cb584.js → ro-6555f5dd.js} +8 -8
- package/dist/esm/{ru-e7c02faa.js → ru-67b5c59c.js} +8 -8
- package/dist/esm/{shared-list-render-cadae2eb.js → shared-list-render-c8da5fde.js} +1 -1
- package/dist/esm/{sk-cae387d2.js → sk-81f19081.js} +8 -8
- package/dist/esm/{sl-2892ad87.js → sl-4b892d99.js} +8 -8
- package/dist/esm/solution-contents_3.entry.js +1 -1
- package/dist/esm/solution-item-accordion.entry.js +229 -0
- package/dist/esm/solution-item-icon.entry.js +324 -0
- package/dist/esm/solutions-components.js +1 -1
- package/dist/esm/spatial-ref.entry.js +1 -1
- package/dist/esm/{sr-11e6839f.js → sr-6cb6f797.js} +8 -8
- package/dist/esm/{sv-fd5c6ca5.js → sv-aacab364.js} +8 -8
- package/dist/esm/{t9n-b7ea1a61.js → t9n-7d4462c0.js} +1 -1
- package/dist/esm/{th-170cf6b1.js → th-6b423678.js} +8 -8
- package/dist/esm/{time-a7f1020b.js → time-b0bba3f9.js} +1 -1
- package/dist/esm/{tr-1d6ca382.js → tr-0e2b854e.js} +8 -8
- package/dist/esm/{uk-35eec84e.js → uk-af0a30cc.js} +8 -8
- package/dist/esm/{utils-62514064.js → utils-37bc2853.js} +1 -1
- package/dist/esm/{vi-2713ee26.js → vi-62071c6f.js} +8 -8
- package/dist/esm/{zh-cn-ed066014.js → zh-cn-8f53db2f.js} +8 -8
- package/dist/esm/{zh-hk-a118dced.js → zh-hk-a8c68b9c.js} +8 -8
- package/dist/esm/{zh-tw-c9bbf220.js → zh-tw-3006115d.js} +8 -8
- package/dist/solutions-components/assets/t9n/solution-item-accordion/resources.json +3 -0
- package/dist/solutions-components/assets/t9n/solution-item-accordion/resources_en.json +3 -0
- package/dist/solutions-components/demos/solution-item-accordion.html +345 -0
- package/dist/solutions-components/{p-02ea30d1.entry.js → p-00cfce5b.entry.js} +1 -1
- package/dist/solutions-components/{p-ac11cf8f.entry.js → p-01510268.entry.js} +1 -1
- package/dist/solutions-components/{p-cd5a9034.entry.js → p-030e5077.entry.js} +1 -1
- package/dist/solutions-components/{p-de3ee7a6.entry.js → p-075a3c9d.entry.js} +1 -1
- package/dist/solutions-components/{p-267ef1b8.entry.js → p-0bd7752a.entry.js} +1 -1
- package/dist/solutions-components/{p-8c6a301f.entry.js → p-109cabd8.entry.js} +2 -2
- package/dist/solutions-components/{p-87f928a5.entry.js → p-116927af.entry.js} +3 -3
- package/dist/solutions-components/{p-8da5aeea.entry.js → p-118e1989.entry.js} +1 -1
- package/dist/solutions-components/p-16261018.js +11 -0
- package/dist/solutions-components/{p-c5facecd.entry.js → p-16d721ef.entry.js} +1 -1
- package/dist/solutions-components/{p-f7bc99fb.entry.js → p-1794a1aa.entry.js} +3 -3
- package/dist/solutions-components/{p-cf9e6515.entry.js → p-19697807.entry.js} +2 -2
- package/dist/solutions-components/{p-25b5ffea.js → p-1a7c4e9a.js} +1 -1
- package/dist/solutions-components/{p-5067d77e.entry.js → p-1c5f17cb.entry.js} +1 -1
- package/dist/solutions-components/p-1cfc581f.js +11 -0
- package/dist/solutions-components/{p-d784f756.entry.js → p-20393dcf.entry.js} +1 -1
- package/dist/solutions-components/{p-4e7aa926.js → p-203b4081.js} +1 -1
- package/dist/solutions-components/p-228c3bf3.entry.js +17 -0
- package/dist/solutions-components/{p-e4ef6f49.js → p-24192cfe.js} +1 -1
- package/dist/solutions-components/{p-d75ef009.entry.js → p-25ee25ea.entry.js} +2 -2
- package/dist/solutions-components/{p-7b2ef872.entry.js → p-2756e4ac.entry.js} +1 -1
- package/dist/solutions-components/{p-691cb5f4.js → p-290dee0b.js} +2 -2
- package/dist/solutions-components/{p-aa68a36e.entry.js → p-2ace1fe7.entry.js} +2 -2
- package/dist/solutions-components/{p-8bb2c169.js → p-2afb3a2b.js} +1 -1
- package/dist/solutions-components/{p-95c3b305.entry.js → p-2b212cd0.entry.js} +1 -1
- package/dist/solutions-components/p-2c00221b.js +6 -0
- package/dist/solutions-components/{p-3c1ecf85.entry.js → p-2fafe489.entry.js} +1 -1
- package/dist/solutions-components/{p-9560a1fd.entry.js → p-30b555dc.entry.js} +1 -1
- package/dist/solutions-components/{p-347d9ce0.js → p-328fbcb5.js} +1 -1
- package/dist/solutions-components/{p-aa341d46.entry.js → p-32cf5a71.entry.js} +1 -1
- package/dist/solutions-components/{p-712873f0.js → p-33fe9a28.js} +1 -1
- package/dist/solutions-components/{p-80f49acc.js → p-35f33a32.js} +1 -1
- package/dist/solutions-components/p-374d0fdc.entry.js +6 -0
- package/dist/solutions-components/{p-fb3e0eae.js → p-3955461a.js} +1 -1
- package/dist/solutions-components/p-39e9ae5c.entry.js +6 -0
- package/dist/solutions-components/{p-54a9017c.entry.js → p-3f6d5f14.entry.js} +1 -1
- package/dist/solutions-components/{p-1a06bf01.js → p-3fb350ea.js} +1 -1
- package/dist/solutions-components/{p-a79f4c52.entry.js → p-41744516.entry.js} +1 -1
- package/dist/solutions-components/{p-c40b0ec5.js → p-4182a628.js} +3 -3
- package/dist/solutions-components/{p-304cef31.js → p-42552409.js} +3 -3
- package/dist/solutions-components/{p-0e851a4b.js → p-4336e44a.js} +1 -1
- package/dist/solutions-components/{p-c25e8c35.js → p-441f1992.js} +1 -1
- package/dist/solutions-components/{p-fa68f43a.entry.js → p-451b483d.entry.js} +1 -1
- package/dist/solutions-components/{p-9bc84681.js → p-472be784.js} +1 -1
- package/dist/solutions-components/p-48c58b28.js +6 -0
- package/dist/solutions-components/{p-ca6055a3.js → p-4993c7b1.js} +1 -1
- package/dist/solutions-components/{p-b8ce880d.js → p-4a35785b.js} +1 -1
- package/dist/solutions-components/{p-de8121a4.js → p-4d97016e.js} +1 -1
- package/dist/solutions-components/{p-990d8b4b.js → p-4f4f00a9.js} +1 -1
- package/dist/solutions-components/{p-b3e8da19.entry.js → p-50203a2d.entry.js} +1 -1
- package/dist/solutions-components/{p-19b466d0.js → p-546a2802.js} +1 -1
- package/dist/solutions-components/{p-66b01781.js → p-54fa7a94.js} +2 -2
- package/dist/solutions-components/{p-04294b8e.js → p-57b673e2.js} +1 -1
- package/dist/solutions-components/{p-c163b67f.js → p-593a6f17.js} +1 -1
- package/dist/solutions-components/{p-5a3cab12.entry.js → p-5c0d42e9.entry.js} +1 -1
- package/dist/solutions-components/{p-9fa7a7ad.entry.js → p-5cef36d6.entry.js} +1 -1
- package/dist/solutions-components/{p-2aa44a02.entry.js → p-5d4efa42.entry.js} +2 -2
- package/dist/solutions-components/{p-7fce703f.entry.js → p-5d8a5e53.entry.js} +1 -1
- package/dist/solutions-components/{p-793f1b14.entry.js → p-5fe92f6e.entry.js} +2 -2
- package/dist/solutions-components/{p-da80cfbc.entry.js → p-6384a9a5.entry.js} +1 -1
- package/dist/solutions-components/{p-b8f33145.js → p-6518727d.js} +1 -1
- package/dist/solutions-components/p-671fd156.entry.js +6 -0
- package/dist/solutions-components/{p-52f19286.entry.js → p-67392838.entry.js} +1 -1
- package/dist/solutions-components/{p-54b7e680.js → p-6e0b76ce.js} +1 -1
- package/dist/solutions-components/{p-1017609e.js → p-6e3f1d71.js} +2 -2
- package/dist/solutions-components/{p-5f7c1e49.js → p-6f39a13f.js} +1 -1
- package/dist/solutions-components/{p-0b6e5486.js → p-71c0a413.js} +1 -1
- package/dist/solutions-components/{p-fedbf657.entry.js → p-728ec094.entry.js} +1 -1
- package/dist/solutions-components/{p-b8b78283.entry.js → p-72d0eda0.entry.js} +1 -1
- package/dist/solutions-components/p-743ad3a7.entry.js +6 -0
- package/dist/solutions-components/{p-732bb88c.entry.js → p-78c438c0.entry.js} +1 -1
- package/dist/solutions-components/{p-1ef6a1c2.entry.js → p-7b63f249.entry.js} +1 -1
- package/dist/solutions-components/{p-91b7a7dc.entry.js → p-7f090468.entry.js} +1 -1
- package/dist/solutions-components/{p-770a0e12.js → p-7f31be6a.js} +1 -1
- package/dist/solutions-components/{p-cb07016a.entry.js → p-8419b5a1.entry.js} +2 -2
- package/dist/solutions-components/{p-dfeb6a2e.entry.js → p-86ca6cfe.entry.js} +1 -1
- package/dist/solutions-components/{p-66afdfdd.entry.js → p-8846430d.entry.js} +3 -3
- package/dist/solutions-components/{p-508b2b7b.js → p-89ddc916.js} +1 -1
- package/dist/solutions-components/{p-9db30b19.entry.js → p-89f14b8a.entry.js} +1 -1
- package/dist/solutions-components/{p-23dd68de.entry.js → p-8ae73529.entry.js} +2 -2
- package/dist/solutions-components/{p-64bf4d2e.entry.js → p-8badcaf5.entry.js} +1 -1
- package/dist/solutions-components/{p-eb2859d6.js → p-8eacc640.js} +1 -1
- package/dist/solutions-components/{p-798b9928.entry.js → p-8f840208.entry.js} +1 -1
- package/dist/solutions-components/{p-c7eaade6.entry.js → p-9232245b.entry.js} +1 -1
- package/dist/solutions-components/{p-1490c752.js → p-926664d9.js} +1 -1
- package/dist/solutions-components/{p-919e9de7.entry.js → p-92de7cd3.entry.js} +1 -1
- package/dist/solutions-components/{p-9c5f4347.js → p-96919110.js} +1 -1
- package/dist/solutions-components/{p-222e0445.entry.js → p-981afe9e.entry.js} +1 -1
- package/dist/solutions-components/{p-550da58b.js → p-9901e971.js} +1 -1
- package/dist/solutions-components/{p-986ff43b.entry.js → p-9957c7b8.entry.js} +1 -1
- package/dist/solutions-components/{p-6b0fa1eb.entry.js → p-9c6f2672.entry.js} +1 -1
- package/dist/solutions-components/{p-bb0f549a.js → p-a0ef9cee.js} +1 -1
- package/dist/solutions-components/{p-d47abf9b.entry.js → p-a16449b2.entry.js} +1 -1
- package/dist/solutions-components/{p-08d1cc1f.js → p-a2d4c97e.js} +2 -2
- package/dist/solutions-components/{p-bae65813.entry.js → p-a68f4775.entry.js} +1 -1
- package/dist/solutions-components/{p-79f78acc.entry.js → p-a8d4a522.entry.js} +1 -1
- package/dist/solutions-components/{p-6c080ac7.entry.js → p-a9f65057.entry.js} +1 -1
- package/dist/solutions-components/{p-40175313.entry.js → p-ab8f4820.entry.js} +2 -2
- package/dist/solutions-components/{p-f6f2018a.js → p-abc30e04.js} +1 -1
- package/dist/solutions-components/{p-c0d25be5.entry.js → p-ac7868a6.entry.js} +1 -1
- package/dist/solutions-components/{p-9524e5e4.js → p-acf135cc.js} +1 -1
- package/dist/solutions-components/{p-b96233e3.entry.js → p-af3e49d8.entry.js} +1 -1
- package/dist/solutions-components/p-af8a7aff.entry.js +6 -0
- package/dist/solutions-components/{p-924ec704.js → p-b3b042df.js} +1 -1
- package/dist/solutions-components/{p-8fb06a85.entry.js → p-b6b4c707.entry.js} +1 -1
- package/dist/solutions-components/{p-4c179300.entry.js → p-b7a49673.entry.js} +1 -1
- package/dist/solutions-components/{p-40f5df15.entry.js → p-b955a19b.entry.js} +1 -1
- package/dist/solutions-components/{p-c4953b5e.entry.js → p-b9eefee6.entry.js} +2 -2
- package/dist/solutions-components/p-bb9492ed.js +6 -0
- package/dist/solutions-components/{p-8537518d.entry.js → p-bc86c87d.entry.js} +2 -2
- package/dist/solutions-components/{p-8614d1a0.entry.js → p-bd3c130b.entry.js} +1 -1
- package/dist/solutions-components/{p-e74bc7b3.js → p-bdc425fc.js} +1 -1
- package/dist/solutions-components/{p-92ba99ff.js → p-beba6703.js} +1 -1
- package/dist/solutions-components/{p-cd6eee11.js → p-c1242d4b.js} +1 -1
- package/dist/solutions-components/{p-a4e35c2d.entry.js → p-c26ac7d9.entry.js} +1 -1
- package/dist/solutions-components/{p-b76ed1c7.entry.js → p-c3782a7e.entry.js} +2 -2
- package/dist/solutions-components/{p-936037e4.js → p-c5520bba.js} +1 -1
- package/dist/solutions-components/{p-29a09798.js → p-c58ec2d0.js} +3 -3
- package/dist/solutions-components/{p-53b5a39e.js → p-c5d26e3a.js} +1 -1
- package/dist/solutions-components/{p-a37d1b17.entry.js → p-c8325ead.entry.js} +1 -1
- package/dist/solutions-components/{p-94ae78d6.js → p-cba777d2.js} +1 -1
- package/dist/solutions-components/{p-01dae909.js → p-d1371897.js} +1 -1
- package/dist/solutions-components/{p-d1cc620f.entry.js → p-d6c50190.entry.js} +1 -1
- package/dist/solutions-components/{p-fcd33b4f.js → p-d726e895.js} +1 -1
- package/dist/solutions-components/{p-270ead49.js → p-d8a54947.js} +1 -1
- package/dist/solutions-components/{p-a85fd786.entry.js → p-da6e25cb.entry.js} +1 -1
- package/dist/solutions-components/{p-ee9b7fab.js → p-db2c82ad.js} +1 -1
- package/dist/solutions-components/{p-e0ee0556.entry.js → p-dbcfdc6d.entry.js} +1 -1
- package/dist/solutions-components/{p-67c34d05.entry.js → p-ddc97e93.entry.js} +1 -1
- package/dist/solutions-components/{p-74fbad1c.js → p-dec62e5d.js} +30 -31
- package/dist/solutions-components/{p-245c35ce.js → p-e013e797.js} +1 -1
- package/dist/solutions-components/{p-0d6b3f44.js → p-e3bb02cc.js} +1 -1
- package/dist/solutions-components/{p-5440c8dd.js → p-e5ec69a4.js} +1 -1
- package/dist/solutions-components/p-e8aa44e2.entry.js +6 -0
- package/dist/solutions-components/{p-49bbe45e.js → p-ea119eee.js} +1 -1
- package/dist/solutions-components/{p-062f4457.js → p-ec59efb8.js} +1 -1
- package/dist/solutions-components/{p-bc6cf10f.entry.js → p-ef360459.entry.js} +1 -1
- package/dist/solutions-components/{p-0dc73313.js → p-f14d11f1.js} +1 -1
- package/dist/solutions-components/{p-6319ca20.js → p-f4d6771a.js} +1 -1
- package/dist/solutions-components/{p-5f705984.js → p-f4e30ab2.js} +1 -1
- package/dist/solutions-components/p-f6dc7347.entry.js +6 -0
- package/dist/solutions-components/{p-7ae41cd8.js → p-f7680693.js} +1 -1
- package/dist/solutions-components/{p-9277a339.entry.js → p-faf7740b.entry.js} +1 -1
- package/dist/solutions-components/{p-707ee1d1.entry.js → p-fb95ec69.entry.js} +2 -2
- package/dist/solutions-components/{p-2264e8d5.entry.js → p-fbf86656.entry.js} +1 -1
- package/dist/solutions-components/{p-7c854814.js → p-fd730974.js} +2 -2
- package/dist/solutions-components/{p-4fe5e9c3.entry.js → p-ff96d7ee.entry.js} +3 -3
- package/dist/solutions-components/solutions-components.esm.js +1 -1
- package/dist/solutions-components/utils/interfaces.ts +11 -0
- package/dist/types/components/map-layer-picker/map-layer-picker.d.ts +6 -0
- package/dist/types/components/solution-item-accordion/solution-item-accordion.d.ts +117 -0
- package/dist/types/components.d.ts +23 -2
- package/dist/types/preact.d.ts +2 -0
- package/dist/types/utils/interfaces.d.ts +10 -0
- package/package.json +6 -6
- package/dist/cjs/calcite-accordion.cjs.entry.js +0 -95
- package/dist/solutions-components/p-2007eaa4.entry.js +0 -6
- package/dist/solutions-components/p-23ce9afa.entry.js +0 -11
- package/dist/solutions-components/p-24a813a4.entry.js +0 -6
- package/dist/solutions-components/p-2d17790c.js +0 -6
- package/dist/solutions-components/p-2e06ec97.js +0 -6
- package/dist/solutions-components/p-33db098c.js +0 -6
- package/dist/solutions-components/p-3a47fde6.entry.js +0 -11
- package/dist/solutions-components/p-79f5a8be.js +0 -11
- package/dist/solutions-components/p-a5e64f6b.entry.js +0 -6
- package/dist/solutions-components/p-bd2278cf.entry.js +0 -6
- package/dist/solutions-components/p-d36878db.js +0 -11
- package/dist/solutions-components/p-fd79adec.entry.js +0 -6
@@ -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-b3b042df.js";import"./p-6eb37ed2.js";import"./p-54fa7a94.js";import"./p-441f1992.js";import"./p-aaa56cbf.js";import"./p-8bfa18b7.js";import"./p-1ce2608d.js";import"./p-4b9b7778.js";import"./p-64a34d92.js";import"./p-fd730974.js";import"./p-27d462c0.js";import"./p-3e828614.js";import"./p-42552409.js";import"./p-1c249530.js";import"./p-4182a628.js";import"./p-0ef9d36b.js";import"./p-abc30e04.js";import"./p-d9e930c8.js";import"./p-6e3f1d71.js";import"./p-ef67c743.js";import"./p-14f027b5.js";var r={s:"ein paar Sekunden",m:["eine Minute","einer Minute"],mm:"%d Minuten",h:["eine Stunde","einer Stunde"],hh:"%d Stunden",d:["ein Tag","einem Tag"],dd:["%d Tage","%d Tagen"],M:["ein Monat","einem Monat"],MM:["%d Monate","%d Monaten"],y:["ein Jahr","einem Jahr"],yy:["%d Jahre","%d Jahren"]};function t(e,t,i){var a=r[i];return Array.isArray(a)&&(a=a[t?0:1]),a.replace("%d",e)}var i={name:"de-at",weekdays:"Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag".split("_"),weekdaysShort:"So._Mo._Di._Mi._Do._Fr._Sa.".split("_"),weekdaysMin:"So_Mo_Di_Mi_Do_Fr_Sa".split("_"),months:"Jänner_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jän._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.".split("_"),ordinal:function(e){return e+"."},weekStart:1,formats:{LTS:"HH:mm:ss",LT:"HH:mm",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY HH:mm",LLLL:"dddd, D. MMMM YYYY HH:mm"},relativeTime:{future:"in %s",past:"vor %s",s:t,m:t,mm:t,h:t,hh:t,d:t,dd:t,M:t,MM:t,y:t,yy:t}};e.locale(i,null,!0);export{i as default}
|
@@ -3,9 +3,9 @@
|
|
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 n}from"./p-6eb37ed2.js";import{r as t,
|
6
|
+
import{h as n}from"./p-6eb37ed2.js";import{r as t,a as i}from"./p-441f1992.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/dev/LICENSE.md for details.
|
10
10
|
* v2.12.2
|
11
|
-
*/const e=["calcite-input","calcite-input-number","calcite-input-text","calcite-text-area"],o="hidden-form-input";function s(n){return"checked"in n}const
|
11
|
+
*/const e=["calcite-input","calcite-input-number","calcite-input-text","calcite-text-area"],o="hidden-form-input";function s(n){return"checked"in n}const a=new WeakMap,c=new WeakSet;function r(n){return"CALCITE-RADIO-BUTTON"===n.nodeName?i(n,"calcite-radio-button-group"):n}const u=new CustomEvent("calciteInvalid",{bubbles:!0,composed:!0});function l(n){const t=n?.target,i=t?.validationMessage,o=r(t?.parentElement);if(!o)return;const s=o?.nodeName?.toLowerCase(),a=s?.split("-");if(a.length<2||"calcite"!==a[0])return;n?.preventDefault(),"validity"in o&&(o.validity=t?.validity),o.dispatchEvent(u),function(n,{status:t,message:i,icon:e}){"status"in n&&(n.status=t),"validationIcon"in n&&"string"!=typeof n.validationIcon&&(n.validationIcon=e),"validationMessage"in n&&!n.validationMessage&&(n.validationMessage=i)}(o,{message:i,icon:!0,status:"invalid"});const c=function(n){return`${n.split("-").map(((n,t)=>0===t?n:`${n[0].toUpperCase()}${n.slice(1)}`)).join("")}${e.includes(n)?"Input":"Change"}`}(s);o.addEventListener(c,(()=>{"status"in o&&(o.status="idle"),"validationIcon"in o&&!o.validationIcon&&(o.validationIcon=!1),"validationMessage"in o&&o.validationMessage===i&&(o.validationMessage=""),"validity"in o&&(o.validity=t?.validity)}),{once:!0})}function f(n){const{formEl:t}=n;return!!t&&(t.addEventListener("invalid",l,!0),t.requestSubmit(),t.removeEventListener("invalid",l,!0),requestAnimationFrame((()=>{const n=t.querySelectorAll("[status=invalid]");for(const t of n)if(t?.validationMessage){t?.setFocus();break}})),!0)}function d(n){n.formEl?.reset()}function m(n){const{el:t,value:e}=n,o=p(n);if(!o||function(n,t){if(i(t.parentElement,"[form]"))return!0;const e="calciteInternalFormComponentRegister";let o=!1;return n.addEventListener(e,(n=>{o=n.composedPath().some((n=>c.has(n))),n.stopPropagation()}),{once:!0}),t.dispatchEvent(new CustomEvent(e,{bubbles:!0,composed:!0})),o}(o,t))return;n.formEl=o,n.defaultValue=e,s(n)&&(n.defaultChecked=n.checked);const r=(n.onFormReset||v).bind(n);o.addEventListener("reset",r),a.set(n.el,r),c.add(t)}function p(n){const{el:e,form:o}=n;return o?t(e,{id:o}):i(e,"form")}function v(){"status"in this&&(this.status="idle"),"validationIcon"in this&&(this.validationIcon=!1),"validationMessage"in this&&(this.validationMessage=""),s(this)?this.checked=this.defaultChecked:this.value=this.defaultValue}function b(n){const{el:t,formEl:i}=n;if(!i)return;const e=a.get(t);i.removeEventListener("reset",e),a.delete(t),n.formEl=null,c.delete(t)}function h(n,t){n.defaultValue=t}const I="calciteInternalHiddenInputInput",g=n=>{n.target.dispatchEvent(new CustomEvent(I,{bubbles:!0}))},w=n=>n.removeEventListener("input",g);function C(n,t,i){const{defaultValue:e,disabled:o,form:a,name:c,required:u}=n;t.defaultValue=e,t.disabled=o,t.name=c,t.required=u,t.tabIndex=-1,a?t.setAttribute("form",a):t.removeAttribute("form"),s(n)?(t.checked=n.checked,t.defaultChecked=n.defaultChecked,t.value=n.checked?i||"on":""):t.value=i||"",n.syncHiddenFormInput?.(t);const l=r(n.el);if(l&&"validity"in l)for(const n in{...t?.validity})l.validity[n]=t.validity[n]}const E=({component:t})=>(function(n){const{el:t,formEl:i,name:e,value:s}=n,{ownerDocument:a}=t,c=t.querySelectorAll(`input[slot="${o}"]`);if(!i||!e)return void c.forEach((n=>{w(n),n.remove()}));const r=Array.isArray(s)?s:[s],u=[],l=new Set;let f;c.forEach((t=>{const i=r.find((n=>n==t.value));null!=i?(l.add(i),C(n,t,i)):u.push(t)})),r.forEach((t=>{if(l.has(t))return;let i=u.pop();i||(i=a.createElement("input"),i.slot=o),f||(f=a.createDocumentFragment()),f.append(i),i.addEventListener("input",g),C(n,i,t)})),f&&t.append(f),u.forEach((n=>{w(n),n.remove()}))}(t),n("slot",{name:o}));export{E as H,h as a,m as c,b as d,p as f,I as i,d as r,f as s}
|
@@ -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 a}from"./p-
|
6
|
+
import{d as a}from"./p-b3b042df.js";import"./p-6eb37ed2.js";import"./p-54fa7a94.js";import"./p-441f1992.js";import"./p-aaa56cbf.js";import"./p-8bfa18b7.js";import"./p-1ce2608d.js";import"./p-4b9b7778.js";import"./p-64a34d92.js";import"./p-fd730974.js";import"./p-27d462c0.js";import"./p-3e828614.js";import"./p-42552409.js";import"./p-1c249530.js";import"./p-4182a628.js";import"./p-0ef9d36b.js";import"./p-abc30e04.js";import"./p-d9e930c8.js";import"./p-6e3f1d71.js";import"./p-ef67c743.js";import"./p-14f027b5.js";var s="siječnja_veljače_ožujka_travnja_svibnja_lipnja_srpnja_kolovoza_rujna_listopada_studenoga_prosinca".split("_"),p="siječanj_veljača_ožujak_travanj_svibanj_lipanj_srpanj_kolovoz_rujan_listopad_studeni_prosinac".split("_"),t=/D[oD]?(\[[^[\]]*\]|\s)+MMMM?/,_=function(a,_){return t.test(_)?s[a.month()]:p[a.month()]};_.s=p,_.f=s;var o={name:"hr",weekdays:"nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota".split("_"),weekdaysShort:"ned._pon._uto._sri._čet._pet._sub.".split("_"),weekdaysMin:"ne_po_ut_sr_če_pe_su".split("_"),months:_,monthsShort:"sij._velj._ožu._tra._svi._lip._srp._kol._ruj._lis._stu._pro.".split("_"),weekStart:1,formats:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"},relativeTime:{future:"za %s",past:"prije %s",s:"sekunda",m:"minuta",mm:"%d minuta",h:"sat",hh:"%d sati",d:"dan",dd:"%d dana",M:"mjesec",MM:"%d mjeseci",y:"godina",yy:"%d godine"},ordinal:function(a){return a+"."}};a.locale(o,null,!0);export{o as default}
|
@@ -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-b3b042df.js";import"./p-6eb37ed2.js";import"./p-54fa7a94.js";import"./p-441f1992.js";import"./p-aaa56cbf.js";import"./p-8bfa18b7.js";import"./p-1ce2608d.js";import"./p-4b9b7778.js";import"./p-64a34d92.js";import"./p-fd730974.js";import"./p-27d462c0.js";import"./p-3e828614.js";import"./p-42552409.js";import"./p-1c249530.js";import"./p-4182a628.js";import"./p-0ef9d36b.js";import"./p-abc30e04.js";import"./p-d9e930c8.js";import"./p-6e3f1d71.js";import"./p-ef67c743.js";import"./p-14f027b5.js";var m={name:"es-mx",weekdays:"domingo_lunes_martes_miércoles_jueves_viernes_sábado".split("_"),weekdaysShort:"dom._lun._mar._mié._jue._vie._sáb.".split("_"),weekdaysMin:"do_lu_ma_mi_ju_vi_sá".split("_"),months:"enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre".split("_"),monthsShort:"ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic".split("_"),relativeTime:{future:"en %s",past:"hace %s",s:"unos segundos",m:"un minuto",mm:"%d minutos",h:"una hora",hh:"%d horas",d:"un día",dd:"%d días",M:"un mes",MM:"%d meses",y:"un año",yy:"%d años"},ordinal:function(e){return e+"º"},formats:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY H:mm",LLLL:"dddd, D [de] MMMM [de] YYYY H:mm"}};e.locale(m,null,!0);export{m as default}
|
@@ -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,h as i,g as t}from"./p-6eb37ed2.js";import{x as s}from"./p-
|
6
|
+
import{r as e,h as i,g as t}from"./p-6eb37ed2.js";import{x as s}from"./p-441f1992.js";import{w as r,s as n}from"./p-3792492a.js";import"./p-aaa56cbf.js";import"./p-8bfa18b7.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/dev/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{r as e,c as t,g as i,h as a,H as s}from"./p-6eb37ed2.js";import{s as c}from"./p-36e59391.js";import{g as l}from"./p-2058b5d9.js";import{n}from"./p-5e71e72a.js";import{C as r,g as o}from"./p-80cb7c73.js";import"./p-720a12c0.js";import"./p-d0d020a5.js";import"./p-d4056c1c.js";import"./p-7530a02f.js";import"./p-9bb44f57.js";import"./p-0a24ad5f.js";const h=class{constructor(i){e(this,i),this.solutionItemSelected=t(this,"solutionItemSelected",7),this.selectedItemId=void 0,this.templateHierarchy=[]}get el(){return i(this)}valueWatchHandler(e,t){e&&e!==t&&Array.isArray(e)&&e.length>0&&this._treeItemSelected(e[0].id)}componentWillLoad(){this.valueWatchHandler(this.templateHierarchy,[])}render(){return a(s,{key:"57abf81bd42447fabf9df9f134a486f8d7101910"},a("calcite-tree",{key:"5b2faefbd53a2666634a1cc05ea8027e1228f354"},this.renderHierarchy(this.templateHierarchy)))}renderHierarchy(e){return e.map((e=>{const t=this.selectedItemId&&this.selectedItemId===e.id;return e.dependencies&&e.dependencies.length>0?a("calcite-tree-item",{onClick:t=>this._treeItemSelected(e.id,t),selected:t},a("solution-item-icon",{type:e.type,typeKeywords:e.typeKeywords}),a("span",{class:"icon-text",title:e.title},e.title),a("calcite-tree",{slot:"children"},this.renderHierarchy(e.dependencies))):a("calcite-tree-item",{onClick:t=>this._treeItemSelected(e.id,t),selected:t},a("solution-item-icon",{type:e.type,typeKeywords:e.typeKeywords}),a("span",{class:"icon-text",title:e.title},e.title))}))}solutionItemSelected;_treeItemSelected(e,t){const i=t?.target?.closest("calcite-tree-item");i&&(i.expanded=!i?.expanded),this.selectedItemId=e,this.solutionItemSelected.emit(e)}static get assetsDirs(){return["item-type-icons"]}static get watchers(){return{templateHierarchy:["valueWatchHandler"]}}};h.style=".icon-text{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}";const d=class{constructor(t){e(this,t),this.authentication=void 0,this.itemId="",this.solutionVariables="",this.organizationVariables="",this.itemType=void 0,this._translations=void 0}get el(){return i(this)}itemIdWatchHandler(){const e=c.getItemInfo(this.itemId);this.itemType=e.type}async componentWillLoad(){return this._getTranslations()}render(){return a(s,{key:"da363c927e5c577660ad3c67fd1f234dd6529175"},a("div",{key:"4f9df338aaebb6a333927d50dbee68e9fb9eaceb",class:"configuration-container"},a("div",{key:"5156b06e31218c3ec059230ba1f4079607aa168e",class:"configuration"},this._showGroupTabs("Group"===this.itemType),this._showItemTabs("Group"!==this.itemType))))}_showGroupTabs(e){return a("calcite-tabs",{class:"config-tabs",style:{display:e?"inherit":"none"}},a("calcite-tab-nav",{slot:"tab-nav"},a("calcite-tab-title",null,this._translations.groupDetailsTab),a("calcite-tab-title",null,this._translations.sharingTab)),a("calcite-tab",{class:"config-tab",id:"group-tab",selected:!0},a("solution-item-details",{"item-id":this.itemId})),a("calcite-tab",{class:"config-tab",id:"share-tab"},a("solution-item-sharing",{"group-id":this.itemId})))}_showItemTabs(e){return a("calcite-tabs",{class:"config-tabs",style:{display:e?"inherit":"none"}},a("calcite-tab-nav",{slot:"tab-nav"},a("calcite-tab-title",null,this._translations.itemDetailsTab),a("calcite-tab-title",null,this._translations.dataTab),a("calcite-tab-title",null,this._translations.propertiesTab),a("calcite-tab-title",null,this._translations.resourcesTab)),a("calcite-tab",{class:"config-tab",selected:!0},a("solution-item-details",{"item-id":this.itemId})),a("calcite-tab",{class:"config-tab",id:"data-tab"},a("solution-template-data",{instanceid:"data","item-id":this.itemId,"organization-variables":this.organizationVariables,"solution-variables":this.solutionVariables})),a("calcite-tab",{class:"config-tab",id:"props-tab"},a("solution-template-data",{instanceid:"properties","item-id":this.itemId,"organization-variables":this.organizationVariables,"solution-variables":this.solutionVariables})),a("calcite-tab",{class:"config-tab",id:"resources-tab"},a("solution-resource-item",{authentication:this.authentication,class:"solutions-resource-container","item-id":this.itemId})))}async _getTranslations(){const e=await l(this.el);this._translations=e[0]}static get watchers(){return{itemId:["itemIdWatchHandler"]}}};d.style=".configuration-container{position:relative;height:100%;width:100%}.configuration{position:absolute;top:0px;right:0px;bottom:0px;left:0px;display:flex;padding:0.5rem;border:1px #808080 solid}.config-tabs{width:100%}.config-tab{width:100%;overflow-y:auto;height:inherit}";const f="3857",
|
6
|
+
import{r as e,c as t,g as i,h as a,H as s}from"./p-6eb37ed2.js";import{s as c}from"./p-36e59391.js";import{g as l}from"./p-2058b5d9.js";import{n}from"./p-5e71e72a.js";import{C as r,g as o}from"./p-80cb7c73.js";import"./p-720a12c0.js";import"./p-d0d020a5.js";import"./p-d4056c1c.js";import"./p-7530a02f.js";import"./p-9bb44f57.js";import"./p-0a24ad5f.js";const h=class{constructor(i){e(this,i),this.solutionItemSelected=t(this,"solutionItemSelected",7),this.selectedItemId=void 0,this.templateHierarchy=[]}get el(){return i(this)}valueWatchHandler(e,t){e&&e!==t&&Array.isArray(e)&&e.length>0&&this._treeItemSelected(e[0].id)}componentWillLoad(){this.valueWatchHandler(this.templateHierarchy,[])}render(){return a(s,{key:"57abf81bd42447fabf9df9f134a486f8d7101910"},a("calcite-tree",{key:"5b2faefbd53a2666634a1cc05ea8027e1228f354"},this.renderHierarchy(this.templateHierarchy)))}renderHierarchy(e){return e.map((e=>{const t=this.selectedItemId&&this.selectedItemId===e.id;return e.dependencies&&e.dependencies.length>0?a("calcite-tree-item",{onClick:t=>this._treeItemSelected(e.id,t),selected:t},a("solution-item-icon",{type:e.type,typeKeywords:e.typeKeywords}),a("span",{class:"icon-text",title:e.title},e.title),a("calcite-tree",{slot:"children"},this.renderHierarchy(e.dependencies))):a("calcite-tree-item",{onClick:t=>this._treeItemSelected(e.id,t),selected:t},a("solution-item-icon",{type:e.type,typeKeywords:e.typeKeywords}),a("span",{class:"icon-text",title:e.title},e.title))}))}solutionItemSelected;_treeItemSelected(e,t){const i=t?.target?.closest("calcite-tree-item");i&&(i.expanded=!i?.expanded),this.selectedItemId=e,this.solutionItemSelected.emit(e)}static get assetsDirs(){return["item-type-icons"]}static get watchers(){return{templateHierarchy:["valueWatchHandler"]}}};h.style=".icon-text{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}";const d=class{constructor(t){e(this,t),this.authentication=void 0,this.itemId="",this.solutionVariables="",this.organizationVariables="",this.itemType=void 0,this._translations=void 0}get el(){return i(this)}itemIdWatchHandler(){const e=c.getItemInfo(this.itemId);this.itemType=e.type}async componentWillLoad(){return this._getTranslations()}render(){return a(s,{key:"da363c927e5c577660ad3c67fd1f234dd6529175"},a("div",{key:"4f9df338aaebb6a333927d50dbee68e9fb9eaceb",class:"configuration-container"},a("div",{key:"5156b06e31218c3ec059230ba1f4079607aa168e",class:"configuration"},this._showGroupTabs("Group"===this.itemType),this._showItemTabs("Group"!==this.itemType))))}_showGroupTabs(e){return a("calcite-tabs",{class:"config-tabs",style:{display:e?"inherit":"none"}},a("calcite-tab-nav",{slot:"tab-nav"},a("calcite-tab-title",null,this._translations.groupDetailsTab),a("calcite-tab-title",null,this._translations.sharingTab)),a("calcite-tab",{class:"config-tab",id:"group-tab",selected:!0},a("solution-item-details",{"item-id":this.itemId})),a("calcite-tab",{class:"config-tab",id:"share-tab"},a("solution-item-sharing",{"group-id":this.itemId})))}_showItemTabs(e){return a("calcite-tabs",{class:"config-tabs",style:{display:e?"inherit":"none"}},a("calcite-tab-nav",{slot:"tab-nav"},a("calcite-tab-title",null,this._translations.itemDetailsTab),a("calcite-tab-title",null,this._translations.dataTab),a("calcite-tab-title",null,this._translations.propertiesTab),a("calcite-tab-title",null,this._translations.resourcesTab)),a("calcite-tab",{class:"config-tab",selected:!0},a("solution-item-details",{"item-id":this.itemId})),a("calcite-tab",{class:"config-tab",id:"data-tab"},a("solution-template-data",{instanceid:"data","item-id":this.itemId,"organization-variables":this.organizationVariables,"solution-variables":this.solutionVariables})),a("calcite-tab",{class:"config-tab",id:"props-tab"},a("solution-template-data",{instanceid:"properties","item-id":this.itemId,"organization-variables":this.organizationVariables,"solution-variables":this.solutionVariables})),a("calcite-tab",{class:"config-tab",id:"resources-tab"},a("solution-resource-item",{authentication:this.authentication,class:"solutions-resource-container","item-id":this.itemId})))}async _getTranslations(){const e=await l(this.el);this._translations=e[0]}static get watchers(){return{itemId:["itemIdWatchHandler"]}}};d.style=".configuration-container{position:relative;height:100%;width:100%}.configuration{position:absolute;top:0px;right:0px;bottom:0px;left:0px;display:flex;padding:0.5rem;border:1px #808080 solid}.config-tabs{width:100%}.config-tab{width:100%;overflow-y:auto;height:inherit}";const f="3857",b=class{constructor(i){e(this,i),this.featureServiceSpatialReferenceChange=t(this,"featureServiceSpatialReferenceChange",7),this.enableDefaultSpatialReferenceChange=t(this,"enableDefaultSpatialReferenceChange",7),this.enabledSpatialReferenceChange=t(this,"enabledSpatialReferenceChange",7),this.enabled=!1,this.enableDefault=!1,this.featureServices=[],this._translations=void 0}get el(){return i(this)}enabledChanged(){this._handleSpatialRefParamChange()}enableDefaultChanged(){this._handleDefaultSpatialRefParamChange()}componentWillLoad(){return this._updateUIFromStore(),this._getTranslations()}render(){return this._updateUIFromStore(),a(s,{key:"ca1dd62000a2fdbd82a00830fc3ac94b47db73f7"},a("label",{key:"fa1ca79af87525ce25a6acf0a5b6a093429f5b77",class:"switch-label"},a("calcite-switch",{key:"8dbcdbc8f417dfe1a05578fc9bbf3417ae93abfb",checked:this.enabled,class:"spatial-ref-switch",onCalciteSwitchChange:e=>this.enabled=e.target.checked,scale:"m"}),this._translations.enableSpatialReference),a("br",{key:"d3c2296bf3568e7b5b167fe0516184ae0c2d26f1"}),a("div",{key:"fee9eac900cae65363658fa769347c3db0783007",class:"spatial-ref-component",id:"spatialRefDefn"},this._renderFeatureServicesList(this.featureServices)),a("label",{key:"317e1422cdcb2147a961f2edfbcedb30c4246f6d",class:"switch-label spatial-ref-component"},a("calcite-switch",{key:"6f0b7eb7216d0a663e5f2d436b7523b2d2301841",checked:this.enableDefault,class:"spatial-ref-switch",disabled:!this.enabled,onCalciteSwitchChange:e=>this.enableDefault=e.target.checked,scale:"m"}),this._translations.enableDefaultSpatialReference))}featureServiceSpatialReferenceChange;enableDefaultSpatialReferenceChange;enabledSpatialReferenceChange;solutionStoreHasChanges(){this.featureServices=c.getStoreInfo("featureServices")}async _testAccess(e,t,i,a){switch(e){case"_parameterizeWkid":return Promise.resolve(this._parameterizeWkid(t));case"_unparameterizeWkid":return Promise.resolve(this._unparameterizeWkid(t))}return Promise.resolve(null)}_clearFeatureServiceDefaults(e){n(this.el.getElementsByClassName("spatial-ref-item-switch")).forEach((e=>e.checked=!1)),e.forEach((e=>this._updateEnabledServices({detail:{switched:!1}},e)))}_handleDefaultSpatialRefParamChange(){this._updateStore(),this.enableDefaultSpatialReferenceChange.emit({defaultWkid:this.enableDefault?f:""})}_handleSpatialRefParamChange(){this.enabled||(this.enableDefault=!1,this._clearFeatureServiceDefaults(this.featureServices)),this._updateStore(),this.enabledSpatialReferenceChange.emit({enabled:this.enabled})}_parameterizeWkid(e){return e?e.toString().startsWith(r)?e:`${r}${e}${o}`:e}_renderFeatureServicesList(e){const t=c.getStoreInfo("spatialReferenceInfo"),i=e.filter((e=>Object.keys(t.services).some((t=>t===e.id))));return i.length>0?a("div",null,a("label",{class:"spatial-ref-item-title"},this._translations.featureServicesHeading),a("ul",{class:"spatial-ref-services-list"},i.map((e=>a("li",{class:"spatial-ref-services-list-item"},a("label",{class:"switch-label"},a("calcite-switch",{checked:t.services[e.id],class:"spatial-ref-item-switch",disabled:!this.enabled,onCalciteSwitchChange:t=>this._updateEnabledServices(t,e),scale:"m"}),e.name)))))):null}_updateEnabledServices(e,t){const i=c.getStoreInfo("spatialReferenceInfo");i.services[t.id]=void 0!==e.detail?.switched?e.detail.switched:void 0===e.target?.checked||e.target.checked,c.setStoreInfo("spatialReferenceInfo",i),this._updateStore(),this.featureServiceSpatialReferenceChange.emit(t)}_unparameterizeWkid(e){return e&&e.toString().startsWith(r)?e.substring(r.length,e.length-o.length):e}_updateFeatureServices(e){e.enabled||Object.keys(e.services).forEach((t=>{e.services[t]=!1})),this.featureServices.forEach((t=>{t.enabled=e.services[t.id],t.wkid=t.enabled?this._parameterizeWkid(t.wkid):this._unparameterizeWkid(t.wkid)})),c.setStoreInfo("featureServices",this.featureServices)}_updateStore(){const e=c.getStoreInfo("spatialReferenceInfo");e.enabled=this.enabled,this.enabled&&this.enableDefault?e.default=f:e.hasOwnProperty("default")&&delete e.default,c.setStoreInfo("spatialReferenceInfo",e),this._updateFeatureServices(e)}_updateUIFromStore(){const e=c.getStoreInfo("spatialReferenceInfo");this.enabled=e.enabled,this.enableDefault=!!e.default,this.featureServices=c.getStoreInfo("featureServices")}async _getTranslations(){const e=await l(this.el);this._translations=e[0]}static get watchers(){return{enabled:["enabledChanged"],enableDefault:["enableDefaultChanged"]}}};b.style=".spatial-ref-switch{margin-inline-end:0.5rem}.spatial-ref-component{margin-top:0.625rem;margin-inline-start:2.5rem}#spatialRefDefn .sc-calcite-label-h label.sc-calcite-label{margin:0px;background-color:#CBC3E3}.spatial-ref-item-title{margin-bottom:0.5rem;font-size:0.875rem;line-height:1.25rem}.spatial-ref-item-switch{margin-inline-end:0.5rem}.switch-label{font-size:0.875rem;line-height:1.25rem}.spatial-ref-services-list{margin-block-start:0.5em;margin-block-end:0.5em;list-style-type:none;padding-inline-start:2em}.spatial-ref-services-list-item{margin-top:0.25rem}";export{h as solution_contents,d as solution_item,b as solution_spatial_ref}
|
@@ -3,9 +3,9 @@
|
|
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 i,h as s,H as o,g as e}from"./p-6eb37ed2.js";import{c as a,d as n}from"./p-f8d23498.js";import{h,s as
|
6
|
+
import{r as t,c as i,h as s,H as o,g as e}from"./p-6eb37ed2.js";import{c as a,d as n}from"./p-f8d23498.js";import{e as h,s as l,f as c}from"./p-441f1992.js";import{a as r,s as d,c as p}from"./p-3e828614.js";import{c as u,d as g}from"./p-42552409.js";import{c as f}from"./p-1c249530.js";import{u as b,c as m,s as x,d as v}from"./p-6e3f1d71.js";import{t as y,q as w,g as j,o as z,E as H,a as C}from"./p-a2d4c97e.js";import{D}from"./p-8bfa18b7.js";import{d as L}from"./p-c8d3207e.js";import"./p-aaa56cbf.js";import"./p-4b9b7778.js";import"./p-64a34d92.js";import"./p-150394be.js";import"./p-fa56b7c2.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/dev/LICENSE.md for details.
|
10
10
|
* v2.12.2
|
11
|
-
*/const A=class{constructor(s){t(this,s),this.calciteActionBarToggle=i(this,"calciteActionBarToggle",6),this.mutationObserver=f("mutation",(()=>{const{el:t,expanded:i}=this;y({el:t,expanded:i}),this.overflowActions()})),this.resizeObserver=f("resize",(t=>this.resizeHandlerEntries(t))),this.actionMenuOpenHandler=t=>{if(t.target.menuOpen){const i=t.composedPath();Array.from(this.el.querySelectorAll("calcite-action-group")).forEach((t=>{i.includes(t)||(t.menuOpen=!1)}))}},this.resizeHandlerEntries=t=>{t.forEach(this.resizeHandler)},this.resizeHandler=t=>{const{width:i,height:s}=t.contentRect;this.resize({width:i,height:s})},this.resize=L((({width:t,height:i})=>{const{el:s,expanded:o,expandDisabled:e,layout:a,overflowActionsDisabled:n}=this;if(n||"vertical"===a&&!i||"horizontal"===a&&!t)return;const h=w(s),
|
11
|
+
*/const A=class{constructor(s){t(this,s),this.calciteActionBarToggle=i(this,"calciteActionBarToggle",6),this.mutationObserver=f("mutation",(()=>{const{el:t,expanded:i}=this;y({el:t,expanded:i}),this.overflowActions()})),this.resizeObserver=f("resize",(t=>this.resizeHandlerEntries(t))),this.actionMenuOpenHandler=t=>{if(t.target.menuOpen){const i=t.composedPath();Array.from(this.el.querySelectorAll("calcite-action-group")).forEach((t=>{i.includes(t)||(t.menuOpen=!1)}))}},this.resizeHandlerEntries=t=>{t.forEach(this.resizeHandler)},this.resizeHandler=t=>{const{width:i,height:s}=t.contentRect;this.resize({width:i,height:s})},this.resize=L((({width:t,height:i})=>{const{el:s,expanded:o,expandDisabled:e,layout:a,overflowActionsDisabled:n}=this;if(n||"vertical"===a&&!i||"horizontal"===a&&!t)return;const h=w(s),l=e?h.length:h.length+1,c=Array.from(s.querySelectorAll("calcite-action-group"));this.setGroupLayout(c);const r=this.hasActionsEnd||this.hasBottomActions||!e?c.length+1:c.length,{actionHeight:d,actionWidth:p}=j(h),u=C({layout:a,actionCount:l,actionHeight:d,actionWidth:p,height:i,width:t,groupCount:r});z({actionGroups:c,expanded:o,overflowCount:u})}),D.resize),this.toggleExpand=()=>{this.expanded=!this.expanded,this.calciteActionBarToggle.emit()},this.setExpandToggleRef=t=>{this.expandToggleEl=t},this.handleDefaultSlotChange=t=>{const i=h(t).filter((t=>t.matches("calcite-action-group")));this.setGroupLayout(i)},this.handleActionsEndSlotChange=t=>{this.hasActionsEnd=l(t)},this.handleBottomActionsSlotChange=t=>{this.hasBottomActions=l(t)},this.handleTooltipSlotChange=t=>{const i=h(t).filter((t=>t?.matches("calcite-tooltip")));this.expandTooltip=i[0]},this.actionsEndGroupLabel=void 0,this.expandDisabled=!1,this.expanded=!1,this.layout="vertical",this.overflowActionsDisabled=!1,this.overlayPositioning="absolute",this.position=void 0,this.scale=void 0,this.messages=void 0,this.messageOverrides=void 0,this.effectiveLocale=void 0,this.hasActionsEnd=!1,this.hasBottomActions=!1,this.expandTooltip=void 0,this.defaultMessages=void 0}expandHandler(){this.overflowActions()}expandedHandler(){const{el:t,expanded:i}=this;y({el:t,expanded:i}),this.overflowActions()}layoutHandler(){this.updateGroups()}overflowDisabledHandler(t){t?this.resizeObserver?.disconnect():(this.resizeObserver?.observe(this.el),this.overflowActions())}onMessagesChange(){}effectiveLocaleChange(){b(this,this.effectiveLocale)}componentDidLoad(){const{el:t,expanded:i}=this;r(this),y({el:t,expanded:i}),this.overflowActions()}connectedCallback(){const{el:t,expanded:i}=this;u(this),m(this),y({el:t,expanded:i}),this.mutationObserver?.observe(t,{childList:!0,subtree:!0}),this.overflowActionsDisabled||this.resizeObserver?.observe(t),this.overflowActions(),a(this)}async componentWillLoad(){d(this),await x(this)}disconnectedCallback(){this.mutationObserver?.disconnect(),this.resizeObserver?.disconnect(),n(this),g(this),v(this)}async overflowActions(){this.resize({width:this.el.clientWidth,height:this.el.clientHeight})}async setFocus(){await p(this),c(this.el)}updateGroups(){this.setGroupLayout(Array.from(this.el.querySelectorAll("calcite-action-group")))}setGroupLayout(t){t.forEach((t=>t.layout=this.layout))}renderBottomActionGroup(){const{expanded:t,expandDisabled:i,el:o,position:e,toggleExpand:a,scale:n,layout:h,messages:l,actionsEndGroupLabel:c,overlayPositioning:r}=this,d=i?null:s(H,{collapseLabel:l.collapseLabel,collapseText:l.collapse,el:o,expandLabel:l.expandLabel,expandText:l.expand,expanded:t,position:e,ref:this.setExpandToggleRef,scale:n,toggle:a,tooltip:this.expandTooltip});return s("calcite-action-group",{class:"action-group--end",hidden:this.expandDisabled&&!(this.hasActionsEnd||this.hasBottomActions),label:c,layout:h,overlayPositioning:r,scale:n},s("slot",{name:"actions-end",onSlotchange:this.handleActionsEndSlotChange}),s("slot",{name:"bottom-actions",onSlotchange:this.handleBottomActionsSlotChange}),s("slot",{name:"expand-tooltip",onSlotchange:this.handleTooltipSlotChange}),d)}render(){return s(o,{key:"b0627d0daa2f500a979aaacc8981814284c437ad",onCalciteActionMenuOpen:this.actionMenuOpenHandler},s("slot",{key:"b1831e21404b85f1632d47f280d0357f5897ebc7",onSlotchange:this.handleDefaultSlotChange}),this.renderBottomActionGroup())}static get assetsDirs(){return["assets"]}get el(){return e(this)}static get watchers(){return{expandDisabled:["expandHandler"],expanded:["expandedHandler"],layout:["layoutHandler"],overflowActionsDisabled:["overflowDisabledHandler"],messageOverrides:["onMessagesChange"],effectiveLocale:["effectiveLocaleChange"]}}};A.style=":host{box-sizing:border-box;background-color:var(--calcite-color-foreground-1);color:var(--calcite-color-text-2);font-size:var(--calcite-font-size--1)}:host *{box-sizing:border-box}:host{pointer-events:auto;display:inline-flex;align-self:stretch;gap:var(--calcite-action-bar-items-space, 0)}:host([layout=vertical]){flex-direction:column}:host([layout=vertical]):host([overflow-actions-disabled]){overflow-y:auto}:host([layout=vertical]):host([expanded]){max-inline-size:var(--calcite-action-bar-expanded-max-width, auto)}:host([layout=vertical]) .action-group--end{margin-block-start:auto}:host([layout=vertical]) ::slotted(calcite-action-group:not(:last-of-type)){border-block-end-width:var(--calcite-border-width-sm)}:host([layout=horizontal]){flex-direction:row}:host([layout=horizontal]):host([overflow-actions-disabled]){overflow-x:auto}:host([layout=horizontal]) .action-group--end{margin-inline-start:auto}:host([layout=horizontal]) ::slotted(calcite-action-group:not(:last-of-type)){border-inline-end-width:var(--calcite-border-width-sm)}.action-group--end{justify-content:flex-end}:host([hidden]){display:none}[hidden]{display:none}";export{A as calcite_action_bar}
|
@@ -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 i,g as e,h as s,H as a}from"./p-6eb37ed2.js";import{l as n,g as h}from"./p-2058b5d9.js";import{z as o}from"./p-
|
6
|
+
import{r as t,c as i,g as e,h as s,H as a}from"./p-6eb37ed2.js";import{l as n,g as h}from"./p-2058b5d9.js";import{z as o}from"./p-441f1992.js";import{f as c}from"./p-80cb7c73.js";import{s as l}from"./p-5dcec135.js";import"./p-0a24ad5f.js";import"./p-d4056c1c.js";import"./p-aaa56cbf.js";import"./p-8bfa18b7.js";import"./p-720a12c0.js";const r=class{constructor(e){t(this,e),this.bufferComplete=i(this,"bufferComplete",7),this.distanceChanged=i(this,"distanceChanged",7),this.unitChanged=i(this,"unitChanged",7),this.appearance="text",this.distance=0,this.geometries=[],this.max=void 0,this.min=0,this.sliderTicks=10,this.unionResults=!0,this.unit="meters",this.disabled=!1,this._translations=void 0}get el(){return e(this)}_geometryEngine;_bufferTimeout;_unitElement;_units;geometriesWatchHandler(){this._buffer()}disabledWatchHandler(){this._buffer()}async getTranslatedUnit(t){return this._units||await this._defineTranslations(),this._units[t]}bufferComplete;distanceChanged;unitChanged;async componentWillLoad(){await this._defineTranslations(),await this._initModules()}render(){return s(a,{key:"fe60961aabf178fd32c4c85e8d52b9bc61a349d0"},"text"===this.appearance?this._getTextBoxDisplay():this._getSliderDisplay())}async _defineTranslations(){await this._getTranslations(),this._initTranslatedUnits()}async _initModules(){const[t]=await n(["esri/geometry/geometryEngine"]);this._geometryEngine=t}_initTranslatedUnits(){this._units={feet:this._translations.feet,meters:this._translations.meters,miles:this._translations.miles,kilometers:this._translations.kilometers}}_getUnits(){return Object.keys(this._units).map((t=>s("calcite-option",{label:this._units[t],selected:this.unit===t,value:t})))}_setDistance(t){const i=parseInt(t.target.value,10);this.distance!==i&&i>=this.min&&(this.distanceChanged.emit({oldValue:this.distance,newValue:i}),this.distance=i,this.distance>0?this._buffer():this.bufferComplete.emit(void 0))}_setUnit(t){this.unitChanged.emit({oldValue:this.unit,newValue:t}),this.unit=t,this._buffer()}_buffer(){this.disabled?this.bufferComplete.emit(void 0):(this._bufferTimeout&&clearTimeout(this._bufferTimeout),this._bufferTimeout=setTimeout((()=>{if(this.geometries?.length>0&&this.unit&&this.distance>0){const t=this.geometries[0].spatialReference,i=t.isWGS84||t.isWebMercator?this._geometryEngine.geodesicBuffer(this.geometries,this.distance,this.unit,this.unionResults):this._geometryEngine.buffer(this.geometries,this.distance,this.unit,this.unionResults);this.bufferComplete.emit(i)}}),400))}_getTextBoxDisplay(){return s("div",{class:"c-container"},s("calcite-input",{class:"padding-end-1 w-50",max:this.max&&this.max>0?this.max:void 0,min:this.min,"number-button-type":"vertical",onCalciteInputInput:t=>this._setDistance(t),placeholder:"0",type:"number",value:this.distance?this.distance.toString():void 0}),s("calcite-select",{class:"flex-1 w-50",label:"label",onCalciteSelectChange:()=>this._setUnit(this._unitElement.value),ref:t=>{this._unitElement=t}},this._getUnits()))}_getSliderDisplay(){return s("div",null,s("calcite-slider",{labelHandles:!0,max:this.max&&this.max>0?this.max:void 0,min:this.min,ticks:this.sliderTicks}))}async _getTranslations(){const t=await h(this.el);this._translations=t[0]}_testAccess(t,i){switch(t){case"_setUnit":return this._setUnit(i);case"_setDistance":return this._setDistance(i)}return null}static get watchers(){return{geometries:["geometriesWatchHandler"],disabled:["disabledWatchHandler"]}}};r.style=':host{display:block}.c-container{display:inline-flex}.flex-1{flex:"1"}.padding-end-1{padding-inline-end:1rem}.w-50{width:50%}';
|
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/dev/LICENSE.md for details.
|
@@ -3,9 +3,9 @@
|
|
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 t,r as i,c as e,H as s,g as a}from"./p-6eb37ed2.js";import{d as o}from"./p-e3196917.js";import{f as n,e as l}from"./p-47a0be20.js";import{D as c,E as h,t as r}from"./p-
|
6
|
+
import{h as t,r as i,c as e,H as s,g as a}from"./p-6eb37ed2.js";import{d as o}from"./p-e3196917.js";import{f as n,e as l}from"./p-47a0be20.js";import{D as c,E as h,t as r}from"./p-441f1992.js";import{d,f as p,c as b,r as m,a as u,F as g}from"./p-2afb3a2b.js";import{s as f,c as v,a as x,d as y,H as w}from"./p-54fa7a94.js";import{g as C}from"./p-aaa56cbf.js";import{c as k,u as I,d as z,I as j}from"./p-1ce2608d.js";import{c as S,d as $,g as H}from"./p-fd730974.js";import{b as D,c as E,s as A,a as L}from"./p-3e828614.js";import{c as O,d as _}from"./p-42552409.js";import{c as P}from"./p-1c249530.js";import{o as F}from"./p-16261018.js";import{D as M}from"./p-8bfa18b7.js";import{c as T,s as W,d as V,u as B}from"./p-6e3f1d71.js";import{g as G,c as R}from"./p-27d462c0.js";import{V as N}from"./p-ef67c743.js";import{i as U,h as q,C as J,b as K,c as Q,d as X,e as Y,f as Z,j as tt,I as it}from"./p-c58ec2d0.js";import{d as et}from"./p-c8d3207e.js";import{C as st}from"./p-b5575639.js";import{g as at}from"./p-2058b5d9.js";import{d as ot,p as nt}from"./p-d572627c.js";import{s as lt}from"./p-5dcec135.js";import"./p-4b9b7778.js";import"./p-64a34d92.js";import"./p-0a24ad5f.js";import"./p-d4056c1c.js";import"./p-80cb7c73.js";import"./p-720a12c0.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/dev/LICENSE.md for details.
|
10
10
|
* v2.12.2
|
11
|
-
*/const ct="x-button",ht=({disabled:i,key:e,label:s,onClick:a,ref:o,scale:n})=>t("button",{"aria-label":s,class:ct,disabled:i,key:e,onClick:a,ref:o,tabIndex:-1,type:"button"},t("calcite-icon",{icon:"x",scale:G(n)})),rt="combobox-item-",dt="combobox-chip-",pt="combobox-label-",bt="combobox-listbox-",mt="combobox-input-",ut=class{constructor(t){i(this,t),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=d,this.internalValueChangeFlag=!1,this.textInput=null,this.mutationObserver=P("mutation",(()=>this.updateItems())),this.resizeObserver=P("resize",(()=>{this.setMaxScrollerHeight(),this.refreshSelectionDisplay()})),this.guid=C(),this.inputHeight=0,this.ignoreSelectedEventsFlag=!1,this.openTransitionProp="opacity",this.setFilteredPlacements=()=>{const{el:t,flipPlacements:i}=this;this.filteredFlipPlacements=i?p(i,t):null},this.getValue=()=>{const t=this.selectedItems.map((t=>t?.value?.toString()));return t?.length?t.length>1?t:t[0]:""},this.onLabelClick=()=>{this.setFocus()},this.keyDownHandler=t=>{if(this.readOnly)return;const{key:i}=t;switch(i){case"Tab":this.activeChipIndex=-1,this.activeItemIndex=-1,this.allowCustomValues&&this.filterText?(this.addCustomChip(this.filterText,!0),t.preventDefault()):this.open?(this.open=!1,t.preventDefault()):!this.allowCustomValues&&this.filterText&&(this.clearInputValue(),this.filterItems(""),this.updateActiveItemIndex(-1));break;case"ArrowLeft":-1===this.activeChipIndex&&0!==this.textInput.selectionStart||(this.previousChip(),t.preventDefault());break;case"ArrowRight":-1!==this.activeChipIndex&&(this.nextChip(),t.preventDefault());break;case"ArrowUp":this.filteredItems.length&&(t.preventDefault(),this.open&&this.shiftActiveItemIndex(-1),this.comboboxInViewport()||this.el.scrollIntoView());break;case"ArrowDown":this.filteredItems.length&&(t.preventDefault(),this.open?this.shiftActiveItemIndex(1):(this.open=!0,this.ensureRecentSelectedItemIsActive()),this.comboboxInViewport()||this.el.scrollIntoView());break;case" ":this.textInput.value||t.defaultPrevented||(this.open||(this.open=!0,this.shiftActiveItemIndex(1)),t.preventDefault());break;case"Home":if(!this.open)return;t.preventDefault(),this.updateActiveItemIndex(0),this.scrollToActiveItem(),this.comboboxInViewport()||this.el.scrollIntoView();break;case"End":if(!this.open)return;t.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,t.preventDefault();break;case"Enter":this.open&&this.activeItemIndex>-1?(this.toggleSelection(this.filteredItems[this.activeItemIndex]),t.preventDefault()):this.activeChipIndex>-1?(this.removeActiveChip(),t.preventDefault()):this.allowCustomValues&&this.filterText?(this.addCustomChip(this.filterText,!0),t.preventDefault()):t.defaultPrevented||f(this)&&t.preventDefault();break;case"Delete":case"Backspace":if("single"===this.selectionDisplay||"fit"===this.selectionDisplay&&this.selectedHiddenChipsCount>0)return;this.activeChipIndex>-1?(t.preventDefault(),this.removeActiveChip()):!this.filterText&&this.isMulti()&&(t.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:t,open:i,referenceEl:e}=this;if(!t||!i)return;await this.reposition(!0);const s=this.getMaxScrollerHeight();t.style.maxHeight=s>0?`${s}px`:"",t.style.minWidth=`${e.clientWidth}px`,await this.reposition(!0)},this.calciteChipCloseHandler=t=>{this.open=!1;const i=this.items.find((i=>i===t));i&&this.toggleSelection(i,!1),this.calciteComboboxChipClose.emit()},this.clickHandler=t=>{if(this.readOnly)return;const i=t.composedPath();return i.some((t=>"CALCITE-CHIP"===t.tagName))?(this.open=!1,void t.preventDefault()):i.some((t=>t.classList?.contains(ct)))?(this.clearValue(),void t.preventDefault()):(this.open=!this.open,void this.ensureRecentSelectedItemIsActive())},this.refreshSelectionDisplay=async()=>{if(await D(this),U(this.selectionMode))return;if(!this.textInput)return;const{allSelectedIndicatorChipEl:t,chipContainerEl:i,selectionDisplay:e,placeholder:s,selectedIndicatorChipEl:a,textInput:n}=this,l=parseInt(getComputedStyle(i).gap.replace("px","")),r=c(i),{fontSize:d,fontFamily:p}=getComputedStyle(n),b=(h(s,`${d} ${p}`)||parseInt(o))+l,m=c(t),u=c(a),g=Math.max(m,u);if(this.setCompactSelectionDisplay({chipContainerElGap:l,chipContainerElWidth:r,inputWidth:b,largestSelectedIndicatorChipWidth:g}),"fit"===e){const t=Array.from(this.el.shadowRoot.querySelectorAll("calcite-chip")).filter((t=>t.closable)),i=Math.round(r-((this.selectedHiddenChipsCount>0?u:0)+l+b+l));this.refreshChipDisplay({availableHorizontalChipElSpace:i,chipContainerElGap:l,chipEls:t}),this.setVisibleAndHiddenChips(t)}},this.setFloatingEl=t=>{this.floatingEl=t,b(this,this.referenceEl,this.floatingEl)},this.setContainerEl=t=>{this.resizeObserver.observe(t),this.listContainerEl=t,this.transitionEl=t},this.setChipContainerEl=t=>{this.resizeObserver.observe(t),this.chipContainerEl=t},this.setReferenceEl=t=>{this.referenceEl=t,b(this,this.referenceEl,this.floatingEl)},this.setAllSelectedIndicatorChipEl=t=>{this.allSelectedIndicatorChipEl=t},this.setSelectedIndicatorChipEl=t=>{this.selectedIndicatorChipEl=t},this.inputHandler=t=>{this.filterText=t.target.value},this.filterItems=(()=>{const t=(t,i)=>t&&i.some((({label:i,value:e})=>t.tagName===tt?i===t.label:e===t.value&&i===t.textLabel));return et(((i,e=!1,s=!0)=>{const a=n(this.data,i),o=this.getItemsAndGroups(),c=""===i;o.forEach((i=>{if(c)return void(i.hidden=!1);const e=!t(i,a);i.hidden=e;const[s,o]=i.ancestors;(t(s,a)||t(o,a))&&(i.hidden=!1),e||i.ancestors.forEach((t=>t.hidden=!1))})),this.filterTextMatchPattern=this.filterText&&new RegExp(`(${l(this.filterText)})`,"i"),this.filteredItems=this.getFilteredItems(),this.filteredItems.forEach((t=>{t.filterTextMatchPattern=this.filterTextMatchPattern})),e&&(this.open=this.filterText.trim().length>0&&this.filteredItems.length>0),s&&this.calciteComboboxFilterChange.emit()}),M.filter)})(),this.internalComboboxChangeEvent=()=>{this.calciteComboboxChange.emit()},this.emitComboboxChange=et(this.internalComboboxChangeEvent,0),this.getSelectedItems=()=>{if(!this.isMulti()){const t=this.items.find((({selected:t})=>t));return t?[t]:[]}return this.items.filter((t=>t.selected&&("ancestors"!==this.selectionMode||!q(t)))).sort(((t,i)=>{const e=this.selectedItems.indexOf(t),s=this.selectedItems.indexOf(i);return e>-1&&s>-1?e-s:s-e}))},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.items.forEach((t=>{t.selectionMode=this.selectionMode,t.scale=this.scale})),this.allowCustomValues||this.setMaxScrollerHeight(),this.groupItems.forEach(((t,i,e)=>{0===i&&(t.afterEmptyGroup=!1);const s=e[i+1];s&&(s.afterEmptyGroup=0===t.children.length)}))},this.scrollToActiveItem=()=>{const t=this.filteredItems[this.activeItemIndex];if(!t)return;const i=this.calculateScrollerHeight(t),{offsetHeight:e,scrollTop:s}=this.listContainerEl;e+s<t.offsetTop+i?this.listContainerEl.scrollTop=t.offsetTop-e+i:t.offsetTop<s&&(this.listContainerEl.scrollTop=t.offsetTop)},this.comboboxFocusHandler=()=>{this.disabled||this.textInput?.focus()},this.clearDisabled=!1,this.filterText="",this.selectionDisplay="all",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.validationMessage=void 0,this.validationIcon=void 0,this.validity={valid:!1,badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valueMissing:!1},this.name=void 0,this.allowCustomValues=void 0,this.overlayPositioning="absolute",this.required=!1,this.selectionMode="multiple",this.scale="m",this.status="idle",this.value=null,this.flipPlacements=void 0,this.messages=void 0,this.messageOverrides=void 0,this.selectedItems=[],this.filteredItems=[],this.readOnly=!1,this.items=[],this.groupItems=[],this.needsIcon=void 0,this.activeItemIndex=-1,this.activeChipIndex=-1,this.activeDescendant="",this.compactSelectionDisplay=!1,this.selectedHiddenChipsCount=0,this.selectedVisibleChipsCount=0,this.effectiveLocale=void 0,this.defaultMessages=void 0}filterTextChange(t){this.updateActiveItemIndex(-1),this.filterItems(t,!0)}openHandler(){F(this),this.disabled?this.open=!1:this.setMaxScrollerHeight()}handleDisabledChange(t){t||(this.open=!1)}maxItemsHandler(){this.setMaxScrollerHeight()}overlayPositioningHandler(){this.reposition(!0)}handlePropsChange(){this.updateItems()}valueHandler(t){if(!this.internalValueChangeFlag){const i=this.getItems();Array.isArray(t)?i.forEach((i=>i.selected=t.includes(i.value))):i.forEach(t?i=>i.selected=t===i.value:t=>t.selected=!1),this.updateItems()}}onMessagesChange(){}flipPlacementsHandler(){this.setFilteredPlacements(),this.reposition(!0)}selectedItemsHandler(){this.internalValueChangeFlag=!0,this.value=this.getValue(),this.internalValueChangeFlag=!1}async documentClickHandler(t){this.disabled||t.composedPath().includes(this.el)||(await R(this.el),!this.allowCustomValues&&this.filterText&&(this.clearInputValue(),this.filterItems(""),this.updateActiveItemIndex(-1)),this.allowCustomValues&&this.filterText.trim().length&&this.addCustomChip(this.filterText),this.open=!1)}calciteComboboxItemChangeHandler(t){if(this.ignoreSelectedEventsFlag)return;const i=t.target,e=this.filteredItems.indexOf(i);this.updateActiveItemIndex(e),this.toggleSelection(i,i.selected)}calciteInternalComboboxItemChangeHandler(t){t.stopPropagation(),this.updateItems()}async reposition(t=!1){const{floatingEl:i,referenceEl:e,placement:s,overlayPositioning:a,filteredFlipPlacements:o}=this;return m(this,{floatingEl:i,referenceEl:e,overlayPositioning:a,placement:s,flipPlacements:o,type:"menu"},t)}async setFocus(){await E(this),this.textInput?.focus(),this.activeChipIndex=-1,this.activeItemIndex=-1}connectedCallback(){k(this),O(this),W(this),S(this),v(this),this.internalValueChangeFlag=!0,this.value=this.getValue(),this.internalValueChangeFlag=!1,this.mutationObserver?.observe(this.el,{childList:!0,subtree:!0}),this.updateItems(),this.setFilteredPlacements(),this.open&&(this.openHandler(),F(this)),b(this,this.referenceEl,this.floatingEl)}async componentWillLoad(){A(this),this.updateItems(),await T(this),this.filterItems(this.filterText,!1,!1)}componentDidLoad(){x(this,this.getValue()),b(this,this.referenceEl,this.floatingEl),L(this)}componentDidRender(){this.el.offsetHeight!==this.inputHeight&&(this.reposition(!0),this.inputHeight=this.el.offsetHeight),I(this)}componentDidUpdate(){this.refreshSelectionDisplay()}disconnectedCallback(){this.mutationObserver?.disconnect(),this.resizeObserver?.disconnect(),z(this),$(this),y(this),u(this,this.referenceEl,this.floatingEl),_(this),V(this)}effectiveLocaleChange(){B(this,this.effectiveLocale)}clearValue(){this.ignoreSelectedEventsFlag=!0,this.items.forEach((t=>t.selected=!1)),this.ignoreSelectedEventsFlag=!1,this.selectedItems=[],this.emitComboboxChange(),this.open=!1,this.updateActiveItemIndex(-1),this.resetText(),this.filterItems(""),this.setFocus()}clearInputValue(){this.textInput.value="",this.filterText=""}comboboxInViewport(){const t=this.el.getBoundingClientRect();return t.top>=0&&t.left>=0&&t.right<=(window.innerWidth||document.documentElement.clientWidth)&&t.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:t}=this,i=0===t.length?0:this.items.indexOf(t[t.length-1]);this.updateActiveItemIndex(i)}hideChip(t){t.classList.add(J.chipInvisible)}showChip(t){t.classList.remove(J.chipInvisible)}refreshChipDisplay({chipEls:t,availableHorizontalChipElSpace:i,chipContainerElGap:e}){t.forEach((t=>{if(t.selected){const s=c(t);if(s&&s<i)return i-=s+e,void this.showChip(t)}else this.hideChip(t);this.hideChip(t)}))}setCompactSelectionDisplay({chipContainerElGap:t,chipContainerElWidth:i,inputWidth:e,largestSelectedIndicatorChipWidth:s}){const a=Math.round(s+t+e);(!this.maxCompactBreakpoint||this.maxCompactBreakpoint<a)&&(this.maxCompactBreakpoint=a),this.compactSelectionDisplay=i<this.maxCompactBreakpoint}setVisibleAndHiddenChips(t){let i=0;t.forEach((t=>{t.selected&&!t.classList.contains(J.chipInvisible)&&i++})),i!==this.selectedVisibleChipsCount&&(this.selectedVisibleChipsCount=i);const e=this.getSelectedItems().length-i;e!==this.selectedHiddenChipsCount&&(this.selectedHiddenChipsCount=e)}getMaxScrollerHeight(){const t=this.getItemsAndGroups().filter((t=>!t.hidden)),{maxItems:i}=this;let e=0,s=0;return t.length>i&&t.forEach((t=>{if(e<i){const i=this.calculateScrollerHeight(t);i>0&&(s+=i,e++)}})),s}calculateScrollerHeight(t){if(t)return t.getBoundingClientRect().height-Array.from(t.querySelectorAll(K)).reduce(((t,i)=>t+i.getBoundingClientRect().height),0)}getItemsAndGroups(){return[...this.groupItems,...this.items]}toggleSelection(t,i=!t.selected){!t||"single-persist"===this.selectionMode&&t.selected&&t.value===this.value||(this.isMulti()?(t.selected=i,this.updateAncestors(t),this.selectedItems=this.getSelectedItems(),this.emitComboboxChange(),this.resetText(),this.filterItems("")):(this.ignoreSelectedEventsFlag=!0,this.items.forEach((e=>e.selected=e===t&&i)),this.ignoreSelectedEventsFlag=!1,this.selectedItems=this.getSelectedItems(),this.emitComboboxChange(),this.textInput&&(this.textInput.value=Q(t)),this.open=!1,this.updateActiveItemIndex(-1),this.resetText(),this.filterItems("")))}updateAncestors(t){if("ancestors"!==this.selectionMode)return;const i=X(t),e=Y(t);t.selected?i.forEach((t=>{t.selected=!0})):(e.forEach((t=>t.selected=!1)),[...i].forEach((t=>{q(t)||(t.selected=!1)})))}getFilteredItems(){return""===this.filterText?this.items:this.items.filter((t=>!t.hidden))}getData(){return this.items.map((t=>({description:t.description,filterDisabled:t.filterDisabled,label:t.textLabel,metadata:t.metadata,shortHeading:t.shortHeading,value:t.value})))}getNeedsIcon(){return U(this.selectionMode)&&this.items.some((t=>t.icon))}resetText(){this.textInput&&(this.textInput.value=""),this.filterText=""}getItems(){return Array.from(this.el.querySelectorAll(Z)).filter((t=>!t.disabled))}getGroupItems(){return Array.from(this.el.querySelectorAll(tt))}addCustomChip(t,i){const e=this.items.find((i=>i.textLabel===t));if(e)this.toggleSelection(e,!0);else{this.isMulti()||this.toggleSelection(this.selectedItems[this.selectedItems.length-1],!1);const e=document.createElement("calcite-combobox-item");e.value=t,e.textLabel=t,e.selected=!0,this.el.prepend(e),this.resetText(),i&&this.setFocus(),this.updateItems(),this.filterItems(""),this.open=!0,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(){const t=this.activeChipIndex;this.activeChipIndex=-1===t?this.selectedItems.length-1:Math.max(t-1,0),this.updateActiveItemIndex(-1),this.focusChip()}nextChip(){const t=this.activeChipIndex+1;t>this.selectedItems.length-1?(this.activeChipIndex=-1,this.setFocus()):(this.activeChipIndex=t,this.focusChip()),this.updateActiveItemIndex(-1)}focusChip(){const t=this.selectedItems[this.activeChipIndex]?.guid,i=t?this.referenceEl.querySelector(`#${dt}${t}`):null;i?.setFocus()}shiftActiveItemIndex(t){const{length:i}=this.filteredItems;this.updateActiveItemIndex((this.activeItemIndex+i+t)%i),this.scrollToActiveItem()}updateActiveItemIndex(t){this.activeItemIndex=t;let i=null;this.filteredItems.forEach(((e,s)=>{s===t?(e.active=!0,i=`${rt}${e.guid}`):e.active=!1})),this.activeDescendant=i,this.activeItemIndex>-1&&(this.activeChipIndex=-1)}isAllSelected(){return this.getItems().length===this.getSelectedItems().length}isMulti(){return!U(this.selectionMode)}renderChips(){const{activeChipIndex:i,readOnly:e,scale:s,selectionMode:a,messages:o}=this;return this.selectedItems.map(((n,l)=>{const c={chip:!0,"chip--active":i===l},h=[...X(n)].reverse(),r=Q(n),d=[...h,n].map((t=>Q(t))),p="ancestors"!==a?r:d.join(" / ");return t("calcite-chip",{appearance:e?"outline":"solid",class:c,closable:!e,"data-test-id":`chip-${l}`,icon:n.icon,iconFlipRtl:n.iconFlipRtl,id:n.guid?`${dt}${n.guid}`:null,key:r,messageOverrides:{dismissLabel:o.removeTag},onCalciteChipClose:()=>this.calciteChipCloseHandler(n),onFocusin:()=>this.activeChipIndex=l,scale:s,selected:n.selected,tabindex:i===l?0:-1,title:p,value:n.value},p)}))}renderAllSelectedIndicatorChip(){const{compactSelectionDisplay:i,scale:e,selectedVisibleChipsCount:s,setAllSelectedIndicatorChipEl:a}=this,o=this.messages.allSelected;return t("calcite-chip",{class:{chip:!0,[J.chipInvisible]:!(this.isAllSelected()&&!s&&!i)},ref:a,scale:e,title:o,value:""},o)}renderAllSelectedIndicatorChipCompact(){const{compactSelectionDisplay:i,scale:e,selectedVisibleChipsCount:s}=this,a=this.messages.all||"All";return t("calcite-chip",{class:{chip:!0,[J.chipInvisible]:!(this.isAllSelected()&&!s&&i)},scale:e,title:a,value:""},a)}renderSelectedIndicatorChip(){const{compactSelectionDisplay:i,selectionDisplay:e,getSelectedItems:s,scale:a,selectedHiddenChipsCount:o,selectedVisibleChipsCount:n,setSelectedIndicatorChipEl:l}=this;let c,h;if(i)c=!0;else if("single"===e){const t=s().length;c=!(!this.isAllSelected()&&t>0),h=`${t} ${this.messages.selected}`}else"fit"===e&&(c=!!(this.isAllSelected()&&0===n||0===o),h=n>0?`+${o}`:`${o} ${this.messages.selected}`);return t("calcite-chip",{class:{chip:!0,[J.chipInvisible]:c},ref:l,scale:a,title:h,value:""},h)}renderSelectedIndicatorChipCompact(){const{compactSelectionDisplay:i,selectionDisplay:e,getSelectedItems:s,scale:a,selectedHiddenChipsCount:o}=this;let n,l;if(i){const t=s().length;this.isAllSelected()?n=!0:"fit"===e?(n=!(o>0),l=`${o||0}`):"single"===e&&(n=!(t>0),l=`${t}`)}else n=!0;return t("calcite-chip",{class:{chip:!0,[J.chipInvisible]:n},scale:a,title:l,value:""},l)}get showingInlineIcon(){const{placeholderIcon:t,selectionMode:i,selectedItems:e,open:s}=this,a=e[0],o=a?.icon,n=U(i);return!s&&a?!!o&&n:!!t&&(!a||n)}renderInput(){const{guid:i,disabled:e,placeholder:s,selectionMode:a,selectedItems:o,open:n}=this,l=U(a),c=o[0],h=!n&&l&&!!c;return t("span",{class:{"input-wrap":!0,"input-wrap--single":l}},h&&t("span",{class:{label:!0,"label--icon":!!c?.icon},key:"label"},Q(c)),t("input",{"aria-activedescendant":this.activeDescendant,"aria-autocomplete":"list","aria-controls":`${bt}${i}`,"aria-errormessage":it.validationMessage,"aria-expanded":r(n),"aria-haspopup":"listbox","aria-invalid":r("invalid"===this.status),"aria-label":H(this),"aria-owns":`${bt}${i}`,class:{[J.input]:!0,"input--single":!0,"input--hidden":h,"input--icon":this.showingInlineIcon&&!!this.placeholderIcon},"data-test-id":"input",disabled:e,id:`${mt}${i}`,key:"input",onFocus:this.comboboxFocusHandler,onInput:this.inputHandler,placeholder:s,readOnly:this.readOnly,ref:t=>this.textInput=t,role:"combobox",tabindex:-1===this.activeChipIndex?0:-1,type:"text",value:this.filterText}))}renderListBoxOptions(){return this.filteredItems.map((i=>t("li",{"aria-selected":r(i.selected),id:i.guid?`${rt}${i.guid}`:null,role:"option",tabindex:"-1"},i.textLabel)))}renderFloatingUIContainer(){const{setFloatingEl:i,setContainerEl:e,open:s}=this;return t("div",{"aria-hidden":"true",class:{"floating-ui-container":!0,"floating-ui-container--active":s},ref:i},t("div",{class:{[J.listContainer]:!0,[g.animation]:!0,[g.animationActive]:s},ref:e},t("ul",{class:{list:!0,"list--hide":!s}},t("slot",null))))}renderSelectedOrPlaceholderIcon(){const{open:i,placeholderIcon:e,placeholderIconFlipRtl:s,selectedItems:a}=this,o=a[0],n=o?.icon,l=e&&(i||!o);return this.showingInlineIcon&&t("span",{class:"icon-start",key:"selected-placeholder-icon"},t("calcite-icon",{class:{[J.selectedIcon]:!l,[J.placeholderIcon]:l},flipRtl:l?s:o.iconFlipRtl,icon:l?e:n,scale:G(this.scale)}))}renderChevronIcon(){const{open:i}=this;return t("span",{class:"icon-end",key:"chevron"},t("calcite-icon",{class:J.icon,icon:i?"chevron-up":"chevron-down",scale:G(this.scale)}))}render(){const{selectionDisplay:i,guid:e,label:a,open:o,readOnly:n}=this,l=U(this.selectionMode),c="all"===i,h="single"===i,r=!l&&"fit"===i,d=!this.clearDisabled&&this.value?.length>0;return t(s,{key:"24749edfdb12a51e6e34c78d3428f83de7ac0457",onClick:this.comboboxFocusHandler},t(j,{key:"7300de366d86bcad91501f1124aed5f311820c37",disabled:this.disabled},t("div",{key:"fc8981935ffdd46fc5386517fce51170d41179a5","aria-live":"polite",class:{wrapper:!0,"wrapper--single":l||!this.selectedItems.length,"wrapper--active":o},onClick:this.clickHandler,onKeyDown:this.keyDownHandler,ref:this.setReferenceEl},this.renderSelectedOrPlaceholderIcon(),t("div",{class:{"grid-input":!0,[J.selectionDisplayFit]:r,[J.selectionDisplaySingle]:h},key:"grid",ref:this.setChipContainerEl},!l&&!h&&this.renderChips(),!l&&!c&&[this.renderSelectedIndicatorChip(),this.renderSelectedIndicatorChipCompact(),this.renderAllSelectedIndicatorChip(),this.renderAllSelectedIndicatorChipCompact()],t("label",{key:"60ca38b6b84d8ccd3e11419ca494c8a3b310e631",class:"screen-readers-only",htmlFor:`${mt}${e}`,id:`${pt}${e}`},a),this.renderInput()),!n&&d?t(ht,{disabled:this.disabled,key:"close-button",label:this.messages.clear,scale:this.scale}):null,!n&&this.renderChevronIcon()),t("ul",{key:"bb750b55b33af3a317ac7883d4f8ef88a23bf1c6","aria-labelledby":`${pt}${e}`,"aria-multiselectable":"true",class:"screen-readers-only",id:`${bt}${e}`,role:"listbox",tabIndex:-1},this.renderListBoxOptions()),this.renderFloatingUIContainer(),t(w,{key:"bf9a9f0dc62822568377ee1e602e24ca14b9c895",component:this}),this.validationMessage&&"invalid"===this.status?t(N,{icon:this.validationIcon,id:it.validationMessage,message:this.validationMessage,scale:this.scale,status:this.status}):null))}static get assetsDirs(){return["assets"]}get el(){return a(this)}static get watchers(){return{filterText:["filterTextChange"],open:["openHandler"],disabled:["handleDisabledChange"],maxItems:["maxItemsHandler"],overlayPositioning:["overlayPositioningHandler"],selectionMode:["handlePropsChange"],scale:["handlePropsChange"],value:["valueHandler"],messageOverrides:["onMessagesChange"],flipPlacements:["flipPlacementsHandler"],selectedItems:["selectedItemsHandler"],effectiveLocale:["effectiveLocaleChange"]}}};ut.style=":host([disabled]){cursor:default;-webkit-user-select:none;-moz-user-select:none;user-select:none;opacity:var(--calcite-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}.interaction-container{display:contents}: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-color-text-3);outline-color:transparent;transition:background-color, block-size, border-color, box-shadow, color, inset-block-end, inset-block-start, inset-inline-end, inset-inline-start inset-size, opacity, outline-color, transform var(--calcite-animation-timing) ease-in-out 0s, outline 0s, outline-offset 0s;border-radius:50%;border-color:transparent;background-color:var(--calcite-color-foreground-2)}.x-button:active,.x-button:hover{color:var(--calcite-color-text-1);background-color:var(--calcite-color-foreground-3)}.x-button:active{border-style:solid;border-color:var(--calcite-color-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:1rem;--calcite-internal-combobox-input-margin-block:calc(0.25rem - 1px)}:host([scale=s]) .x-button{margin-inline: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:1rem;--calcite-internal-combobox-input-margin-block:calc(0.5rem - 1px)}: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:1.5rem;--calcite-internal-combobox-input-margin-block:calc(0.625rem - 1px)}:host([scale=l]) .x-button{margin-inline-end:1rem}.wrapper{display:flex;border-width:1px;border-style:solid;border-color:var(--calcite-color-border-input);background-color:var(--calcite-color-foreground-1);color:var(--calcite-color-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)}.wrapper:hover .icon{color:var(--calcite-color-text-1)}:host(:focus-within) .wrapper,.wrapper--active{outline:2px solid var(--calcite-ui-focus-color, var(--calcite-color-brand));outline-offset:calc(\n -2px *\n calc(\n 1 -\n 2 * clamp(\n 0,\n var(--calcite-offset-invert-focus),\n 1\n )\n )\n )}:host([read-only]) .wrapper{background-color:var(--calcite-color-background)}:host([read-only]) .label{font-weight:var(--calcite-font-weight-medium)}:host([status=invalid]) .wrapper{border-color:var(--calcite-color-status-danger)}:host([status=invalid]:focus-within) .wrapper{outline:2px solid var(--calcite-color-status-danger);outline-offset:calc(\n -2px *\n calc(\n 1 -\n 2 * clamp(\n 0,\n var(--calcite-offset-invert-focus),\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{position:relative;display:flex;flex-grow:1;flex-wrap:wrap;align-items:center;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding:0px;gap:var(--calcite-combobox-item-spacing-unit-s);margin-inline-end:var(--calcite-combobox-item-spacing-unit-s)}.grid-input.selection-display-fit,.grid-input.selection-display-single{flex-wrap:nowrap;overflow:hidden}.input{flex-grow:1;-webkit-appearance:none;-moz-appearance:none;appearance:none;overflow:hidden;text-overflow:ellipsis;border-style:none;background-color:transparent;padding:0px;font-family:inherit;color:var(--calcite-color-text-1);font-size:inherit;block-size:var(--calcite-combobox-input-height);line-height:var(--calcite-combobox-input-height);inline-size:100%;margin-block-end:var(--calcite-combobox-item-spacing-unit-s);min-inline-size:4.8125rem}.input:focus{outline:2px solid transparent;outline-offset:2px}.input:-moz-placeholder-shown{text-overflow:ellipsis}.input:placeholder-shown{text-overflow:ellipsis}.input--single{padding:0px;margin-block:var(--calcite-internal-combobox-input-margin-block)}.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)}.placeholder-icon{color:var(--calcite-color-text-3)}.input-wrap{display:flex;flex-grow:1;align-items:center}.input-wrap--single{flex:1 1 0%;overflow:hidden}.label{pointer-events:none;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;cursor:pointer;align-items:center}.icon-end{flex:none}.icon-end .icon{color:var(--calcite-color-text-3)}.floating-ui-container{--calcite-floating-ui-z-index:var(--calcite-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:inset, left, opacity;opacity:0;box-shadow:0 0 16px 0 rgba(0, 0, 0, 0.16);z-index:var(--calcite-z-index);border-radius:0.25rem}.floating-ui-container[data-placement^=bottom] .calcite-floating-ui-anim{inset-block-start:-5px}.floating-ui-container[data-placement^=top] .calcite-floating-ui-anim{inset-block-start:5px}.floating-ui-container[data-placement^=left] .calcite-floating-ui-anim{left:5px}.floating-ui-container[data-placement^=right] .calcite-floating-ui-anim{left:-5px}.floating-ui-container[data-placement] .calcite-floating-ui-anim--active{opacity:1;inset-block:0;left: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-color-foreground-1);inline-size:var(--calcite-dropdown-width, 100%)}.list{margin:0px;display:block;padding:0px}.list--hide{block-size:0px;overflow:hidden}calcite-chip{--calcite-animation-timing:0}.chip{margin-block:calc(var(--calcite-combobox-item-spacing-unit-s) / 4);max-inline-size:100%}.chip--active{background-color:var(--calcite-color-foreground-3)}.chip--invisible{visibility:hidden;position:absolute}.item{display:block}.validation-container{display:flex;flex-direction:column;align-items:flex-start;align-self:stretch}:host([scale=m]) .validation-container,:host([scale=l]) .validation-container{padding-block-start:0.5rem}:host([scale=s]) .validation-container{padding-block-start:0.25rem}::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)}";const gt=class{constructor(t){i(this,t),this.calciteInternalDropdownItemChange=e(this,"calciteInternalDropdownItemChange",6),this.updateItems=()=>{Array.from(this.el.querySelectorAll("calcite-dropdown-item")).forEach((t=>t.selectionMode=this.selectionMode))},this.mutationObserver=P("mutation",(()=>this.updateItems())),this.groupTitle=void 0,this.scale="m",this.selectionMode="single"}handlePropsChange(){this.updateItems()}connectedCallback(){this.updateItems(),this.mutationObserver?.observe(this.el,{childList:!0})}componentWillLoad(){this.groupPosition=this.getGroupPosition()}disconnectedCallback(){this.mutationObserver?.disconnect()}render(){const i=this.groupTitle?t("span",{"aria-hidden":"true",class:"dropdown-title"},this.groupTitle):null,e=this.groupPosition>0?t("div",{class:"dropdown-separator",role:"separator"}):null;return t(s,{key:"5e46ca1eb8f37e5af6f9ff4f417a9290c84f2f69","aria-label":this.groupTitle,role:"group"},t("div",{key:"af52f0ab422c21b0c10620b61fc7b6445d277878",class:{[st.container]:!0}},e,i,t("slot",{key:"e320a38a327d6ca9802c9664c93907df2705fbf3"})))}updateActiveItemOnChange(t){this.requestedDropdownGroup=t.detail.requestedDropdownGroup,this.requestedDropdownItem=t.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 a(this)}static get watchers(){return{selectionMode:["handlePropsChange"]}}};gt.style=":host{position:relative;display:block}.container{text-align:start}.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-color-border-3);font-weight:var(--calcite-font-weight-bold);color:var(--calcite-color-text-2)}.dropdown-separator{display:block;block-size:1px;background-color:var(--calcite-color-border-3)}:host([scale=s]){font-size:var(--calcite-font-size--2);line-height:1rem}:host([scale=s]) .dropdown-title{padding:0.5rem}:host([scale=m]){font-size:var(--calcite-font-size--1);line-height:1rem}:host([scale=m]) .dropdown-title{padding:0.75rem}:host([scale=l]){font-size:var(--calcite-font-size-0);line-height:1.25rem}:host([scale=l]) .dropdown-title{padding:1rem}:host([hidden]){display:none}[hidden]{display:none}";const ft=class{constructor(t){i(this,t),this.idsFound=e(this,"idsFound",7),this.noLayersFound=e(this,"noLayersFound",7),this.layerSelectionChange=e(this,"layerSelectionChange",7),this.appearance="transparent",this.defaultLayerId="",this.display="inline-block",this.enabledLayerIds=[],this.enabledTableIds=[],this.height=void 0,this.isMobile=void 0,this.mapView=void 0,this.onlyShowUpdatableLayers=void 0,this.placeholderIcon="",this.selectedIds=[],this.scale="m",this.showTables=void 0,this.showSingleLayerAsLabel=!1,this.type="select",this._hasMultipleLayers=!0,this._hasValidLayers=!0,this._isDropdownOpen=void 0,this.ids=[],this.selectedName="",this._translations=void 0}get el(){return a(this)}defaultLayerHonored=!1;_layerElement;_layerNameHash;_tableNameHash;async mapViewWatchHandler(){await this._setLayers(),this.ids.length>0?(this._hasValidLayers=!0,this._hasMultipleLayers=this.ids.length>1,this._setSelectedLayer(this.ids[0])):(this._hasValidLayers=!1,this.noLayersFound.emit())}idsFound;noLayersFound;layerSelectionChange;async componentWillLoad(){await this._getTranslations(),await this._setLayers()}async componentWillRender(){if(this.ids.length>0||1===this.selectedIds.length){const t=1===this.selectedIds.length?this.selectedIds[0]:this.ids[0];t!==this.selectedIds[0]&&this._setSelectedLayer(t)}}render(){const i="map-layer-picker";let e=this.height>0?{height:`${this.height.toString()}px`}:{};return e={...e,display:this.display},t(s,{key:"786588e505e991901c68091bfa7db533f269c06e"},t("div",{key:"7dd54ee014577d33616464ff77eb8694380637d0",class:"map-layer-picker-container",style:e},t("div",{key:"a64ee10033e7ffc33b808a7bb984abd2781629a3",class:"map-layer-picker",style:e},this._hasValidLayers?!this._hasMultipleLayers&&this.showSingleLayerAsLabel?this._getSingleLayerPlaceholder():"combobox"===this.type?this._getCombobox(i):"select"===this.type?this._getSelect(i):this._getDropdown(i):this._getInvalidPlaceholder())))}async componentDidLoad(){if(this.ids.length>0||1===this.selectedIds.length){const t=1===this.selectedIds.length?this.selectedIds[0]:this.ids[0];"select"===this.type?this._layerElement.value=t:"dropdown"===this.type&&(this.selectedName=Object.keys(this._layerNameHash).indexOf(t)>-1?this._layerNameHash[t].name:Object.keys(this._tableNameHash).indexOf(t)>-1?this._tableNameHash[t].name:"")}}_getInvalidPlaceholder(){return t("div",null,t("calcite-notice",{class:"height-100",icon:"exclamation-mark-triangle",id:"no-valid-layers",kind:"danger",open:!0},t("div",{slot:"message"},this._translations.noLayersFound)),t("calcite-tooltip",{label:this._translations.enableEditUpdate,placement:"bottom","reference-element":"no-valid-layers"},t("span",null,this._translations.enableEditUpdate)))}_getSingleLayerPlaceholder(){return t("div",{class:"layer-picker-label-container cursor-default"},t("calcite-icon",{icon:"layers",scale:"s"}),t("calcite-label",{class:"no-bottom-margin padding-start-1"},this.selectedName))}_getSelect(i){return t("calcite-select",{id:i,label:"",onCalciteSelectChange:()=>this._layerSelectionChange(),ref:t=>{this._layerElement=t},scale:this.scale},this._getMapLayerOptions())}_getCombobox(i){return t("calcite-combobox",{clearDisabled:!0,id:i,label:"",onCalciteComboboxChange:()=>this._layerSelectionChange(),"placeholder-icon":this.placeholderIcon,ref:t=>{this._layerElement=t},scale:this.scale,"selection-mode":"single"},this._getMapLayerOptions())}_getDropdown(i){return t("calcite-dropdown",{class:"layer-picker-dropdown",onCalciteDropdownBeforeClose:()=>this._isDropdownOpen=!1,onCalciteDropdownBeforeOpen:()=>this._isDropdownOpen=!0},this.isMobile?this._getDropdownButton():this._getActionDropdownButton(i),t("calcite-dropdown-group",{"selection-mode":"single"},this._getMapLayerOptions()))}_getActionDropdownButton(i){return t("calcite-action",{id:i,slot:"trigger",text:""},this._getDropdownButton())}_getDropdownButton(){return t("calcite-button",{alignment:"icon-end-space-between",appearance:this.appearance,class:this.isMobile?"":"max-width-350",iconEnd:this._isDropdownOpen?"chevron-up":"chevron-down",iconStart:"layers",kind:"neutral",slot:this.isMobile?"trigger":"",width:"full"},t("div",null,this.selectedName))}_getMapLayerOptions(){return this.ids.reduce(((t,i)=>(this._validLayer(i)?t.push(this._getItem(i,"layer")):this._validTable(i)&&t.push(this._getItem(i,"table")),t)),[])}_getItem(i,e){const s="layer"===e?this._layerNameHash[i]:this._tableNameHash[i],a=!!this.onlyShowUpdatableLayers&&!s.supportsUpdate,o=s.name,n=this.selectedIds.indexOf(i)>-1;return"combobox"===this.type?t("calcite-combobox-item",{disabled:a,selected:n,textLabel:o,value:i}):"select"===this.type?t("calcite-option",{disabled:a,label:o,selected:n,value:i}):t("calcite-dropdown-group",{class:a?"disabled":"",selectionMode:a?"none":"single"},t("calcite-dropdown-item",{"icon-start":e,onClick:a?void 0:()=>{this._setSelectedLayer(i)},selected:n},o))}_setSelectedLayer(t){let i;this.defaultLayerId&&!this.defaultLayerHonored&&(i=this._getLayerFromHash(this.defaultLayerId),this.defaultLayerHonored=void 0!==i,t=this.defaultLayerHonored?this.defaultLayerId:t),i=i||this._getLayerFromHash(t),this.selectedName=i?.name,this.selectedIds=[t],this.layerSelectionChange.emit(this.selectedIds)}_getLayerFromHash(t){return Object.keys(this._layerNameHash).indexOf(t)>-1?this._layerNameHash[t]:Object.keys(this._tableNameHash).indexOf(t)>-1?this._tableNameHash[t]:void 0}async _setLayers(){if(this.mapView){await this._initLayerTableHash();const t=this.onlyShowUpdatableLayers?this._getEditableIds(this._layerNameHash):Object.keys(this._layerNameHash),i=this.showTables?this.onlyShowUpdatableLayers?this._getEditableIds(this._tableNameHash):Object.keys(this._tableNameHash):[];this.ids=[...t.reverse().filter((t=>!(this.enabledLayerIds?.length>0)||this.enabledLayerIds.reverse().indexOf(t)>-1)),...i.reverse().filter((t=>!(this.enabledTableIds?.length>0)||this.enabledTableIds.reverse().indexOf(t)>-1))],this.idsFound.emit({layerIds:t,tableIds:i})}}_getEditableIds(t){return Object.keys(t).reduce(((i,e)=>(t[e].supportsUpdate&&i.push(e),i)),[])}async _initLayerTableHash(){this._layerNameHash=await ot(this.mapView,this.onlyShowUpdatableLayers),this._tableNameHash=this.showTables?await nt(this.mapView,this.onlyShowUpdatableLayers):{}}_validLayer(t){const i=this._layerNameHash[t]?.name;return i&&Object.keys(lt.managedLayers).indexOf(i)<0&&(!(this.enabledLayerIds.length>0)||this.enabledLayerIds.indexOf(t)>-1)}_validTable(t){const i=this._tableNameHash[t]?.name,e=i&&this.showTables;return e?lt.managedTables.indexOf(i)<0&&(!(this.enabledTableIds.length>0)||this.enabledTableIds.indexOf(t)>-1):e}_layerSelectionChange(){const t=Array.isArray(this._layerElement.value)?this._layerElement.value:[this._layerElement.value];JSON.stringify(t)!==JSON.stringify([""])&&(this.selectedIds=t,this.layerSelectionChange.emit(this.selectedIds))}async _getTranslations(){const t=await at(this.el);this._translations=t[0]}static get watchers(){return{mapView:["mapViewWatchHandler"]}}};ft.style=":host{display:block}.map-layer-picker-container{width:100%;align-items:center}.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}.height-100{height:100%}.disabled{cursor:default !important;-webkit-user-select:none;-moz-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled);pointer-events:none}.no-bottom-margin{--calcite-label-margin-bottom:0px}.layer-picker-label-container{align-items:center;display:inline-flex;height:100%;padding-inline-start:1rem;padding-inline-end:1rem}.padding-start-1{padding-inline-start:1rem}.cursor-default{cursor:default}";export{ut as calcite_combobox,gt as calcite_dropdown_group,ft as map_layer_picker}
|
11
|
+
*/const ct="x-button",ht=({disabled:i,key:e,label:s,onClick:a,ref:o,scale:n})=>t("button",{"aria-label":s,class:ct,disabled:i,key:e,onClick:a,ref:o,tabIndex:-1,type:"button"},t("calcite-icon",{icon:"x",scale:G(n)})),rt="combobox-item-",dt="combobox-chip-",pt="combobox-label-",bt="combobox-listbox-",mt="combobox-input-",ut=class{constructor(t){i(this,t),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=d,this.internalValueChangeFlag=!1,this.textInput=null,this.mutationObserver=P("mutation",(()=>this.updateItems())),this.resizeObserver=P("resize",(()=>{this.setMaxScrollerHeight(),this.refreshSelectionDisplay()})),this.guid=C(),this.inputHeight=0,this.ignoreSelectedEventsFlag=!1,this.openTransitionProp="opacity",this.setFilteredPlacements=()=>{const{el:t,flipPlacements:i}=this;this.filteredFlipPlacements=i?p(i,t):null},this.getValue=()=>{const t=this.selectedItems.map((t=>t?.value?.toString()));return t?.length?t.length>1?t:t[0]:""},this.onLabelClick=()=>{this.setFocus()},this.keyDownHandler=t=>{if(this.readOnly)return;const{key:i}=t;switch(i){case"Tab":this.activeChipIndex=-1,this.activeItemIndex=-1,this.allowCustomValues&&this.filterText?(this.addCustomChip(this.filterText,!0),t.preventDefault()):this.open?(this.open=!1,t.preventDefault()):!this.allowCustomValues&&this.filterText&&(this.clearInputValue(),this.filterItems(""),this.updateActiveItemIndex(-1));break;case"ArrowLeft":-1===this.activeChipIndex&&0!==this.textInput.selectionStart||(this.previousChip(),t.preventDefault());break;case"ArrowRight":-1!==this.activeChipIndex&&(this.nextChip(),t.preventDefault());break;case"ArrowUp":this.filteredItems.length&&(t.preventDefault(),this.open&&this.shiftActiveItemIndex(-1),this.comboboxInViewport()||this.el.scrollIntoView());break;case"ArrowDown":this.filteredItems.length&&(t.preventDefault(),this.open?this.shiftActiveItemIndex(1):(this.open=!0,this.ensureRecentSelectedItemIsActive()),this.comboboxInViewport()||this.el.scrollIntoView());break;case" ":this.textInput.value||t.defaultPrevented||(this.open||(this.open=!0,this.shiftActiveItemIndex(1)),t.preventDefault());break;case"Home":if(!this.open)return;t.preventDefault(),this.updateActiveItemIndex(0),this.scrollToActiveItem(),this.comboboxInViewport()||this.el.scrollIntoView();break;case"End":if(!this.open)return;t.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,t.preventDefault();break;case"Enter":this.open&&this.activeItemIndex>-1?(this.toggleSelection(this.filteredItems[this.activeItemIndex]),t.preventDefault()):this.activeChipIndex>-1?(this.removeActiveChip(),t.preventDefault()):this.allowCustomValues&&this.filterText?(this.addCustomChip(this.filterText,!0),t.preventDefault()):t.defaultPrevented||f(this)&&t.preventDefault();break;case"Delete":case"Backspace":if("single"===this.selectionDisplay||"fit"===this.selectionDisplay&&this.selectedHiddenChipsCount>0)return;this.activeChipIndex>-1?(t.preventDefault(),this.removeActiveChip()):!this.filterText&&this.isMulti()&&(t.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:t,open:i,referenceEl:e}=this;if(!t||!i)return;await this.reposition(!0);const s=this.getMaxScrollerHeight();t.style.maxHeight=s>0?`${s}px`:"",t.style.minWidth=`${e.clientWidth}px`,await this.reposition(!0)},this.calciteChipCloseHandler=t=>{this.open=!1;const i=this.items.find((i=>i===t));i&&this.toggleSelection(i,!1),this.calciteComboboxChipClose.emit()},this.clickHandler=t=>{if(this.readOnly)return;const i=t.composedPath();return i.some((t=>"CALCITE-CHIP"===t.tagName))?(this.open=!1,void t.preventDefault()):i.some((t=>t.classList?.contains(ct)))?(this.clearValue(),void t.preventDefault()):(this.open=!this.open,void this.ensureRecentSelectedItemIsActive())},this.refreshSelectionDisplay=async()=>{if(await D(this),U(this.selectionMode))return;if(!this.textInput)return;const{allSelectedIndicatorChipEl:t,chipContainerEl:i,selectionDisplay:e,placeholder:s,selectedIndicatorChipEl:a,textInput:n}=this,l=parseInt(getComputedStyle(i).gap.replace("px","")),r=c(i),{fontSize:d,fontFamily:p}=getComputedStyle(n),b=(h(s,`${d} ${p}`)||parseInt(o))+l,m=c(t),u=c(a),g=Math.max(m,u);if(this.setCompactSelectionDisplay({chipContainerElGap:l,chipContainerElWidth:r,inputWidth:b,largestSelectedIndicatorChipWidth:g}),"fit"===e){const t=Array.from(this.el.shadowRoot.querySelectorAll("calcite-chip")).filter((t=>t.closable)),i=Math.round(r-((this.selectedHiddenChipsCount>0?u:0)+l+b+l));this.refreshChipDisplay({availableHorizontalChipElSpace:i,chipContainerElGap:l,chipEls:t}),this.setVisibleAndHiddenChips(t)}},this.setFloatingEl=t=>{this.floatingEl=t,b(this,this.referenceEl,this.floatingEl)},this.setContainerEl=t=>{this.resizeObserver.observe(t),this.listContainerEl=t,this.transitionEl=t},this.setChipContainerEl=t=>{this.resizeObserver.observe(t),this.chipContainerEl=t},this.setReferenceEl=t=>{this.referenceEl=t,b(this,this.referenceEl,this.floatingEl)},this.setAllSelectedIndicatorChipEl=t=>{this.allSelectedIndicatorChipEl=t},this.setSelectedIndicatorChipEl=t=>{this.selectedIndicatorChipEl=t},this.inputHandler=t=>{this.filterText=t.target.value},this.filterItems=(()=>{const t=(t,i)=>t&&i.some((({label:i,value:e})=>t.tagName===tt?i===t.label:e===t.value&&i===t.textLabel));return et(((i,e=!1,s=!0)=>{const a=n(this.data,i),o=this.getItemsAndGroups(),c=""===i;o.forEach((i=>{if(c)return void(i.hidden=!1);const e=!t(i,a);i.hidden=e;const[s,o]=i.ancestors;(t(s,a)||t(o,a))&&(i.hidden=!1),e||i.ancestors.forEach((t=>t.hidden=!1))})),this.filterTextMatchPattern=this.filterText&&new RegExp(`(${l(this.filterText)})`,"i"),this.filteredItems=this.getFilteredItems(),this.filteredItems.forEach((t=>{t.filterTextMatchPattern=this.filterTextMatchPattern})),e&&(this.open=this.filterText.trim().length>0&&this.filteredItems.length>0),s&&this.calciteComboboxFilterChange.emit()}),M.filter)})(),this.internalComboboxChangeEvent=()=>{this.calciteComboboxChange.emit()},this.emitComboboxChange=et(this.internalComboboxChangeEvent,0),this.getSelectedItems=()=>{if(!this.isMulti()){const t=this.items.find((({selected:t})=>t));return t?[t]:[]}return this.items.filter((t=>t.selected&&("ancestors"!==this.selectionMode||!q(t)))).sort(((t,i)=>{const e=this.selectedItems.indexOf(t),s=this.selectedItems.indexOf(i);return e>-1&&s>-1?e-s:s-e}))},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.items.forEach((t=>{t.selectionMode=this.selectionMode,t.scale=this.scale})),this.allowCustomValues||this.setMaxScrollerHeight(),this.groupItems.forEach(((t,i,e)=>{0===i&&(t.afterEmptyGroup=!1);const s=e[i+1];s&&(s.afterEmptyGroup=0===t.children.length)}))},this.scrollToActiveItem=()=>{const t=this.filteredItems[this.activeItemIndex];if(!t)return;const i=this.calculateScrollerHeight(t),{offsetHeight:e,scrollTop:s}=this.listContainerEl;e+s<t.offsetTop+i?this.listContainerEl.scrollTop=t.offsetTop-e+i:t.offsetTop<s&&(this.listContainerEl.scrollTop=t.offsetTop)},this.comboboxFocusHandler=()=>{this.disabled||this.textInput?.focus()},this.clearDisabled=!1,this.filterText="",this.selectionDisplay="all",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.validationMessage=void 0,this.validationIcon=void 0,this.validity={valid:!1,badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valueMissing:!1},this.name=void 0,this.allowCustomValues=void 0,this.overlayPositioning="absolute",this.required=!1,this.selectionMode="multiple",this.scale="m",this.status="idle",this.value=null,this.flipPlacements=void 0,this.messages=void 0,this.messageOverrides=void 0,this.selectedItems=[],this.filteredItems=[],this.readOnly=!1,this.items=[],this.groupItems=[],this.needsIcon=void 0,this.activeItemIndex=-1,this.activeChipIndex=-1,this.activeDescendant="",this.compactSelectionDisplay=!1,this.selectedHiddenChipsCount=0,this.selectedVisibleChipsCount=0,this.effectiveLocale=void 0,this.defaultMessages=void 0}filterTextChange(t){this.updateActiveItemIndex(-1),this.filterItems(t,!0)}openHandler(){F(this),this.disabled?this.open=!1:this.setMaxScrollerHeight()}handleDisabledChange(t){t||(this.open=!1)}maxItemsHandler(){this.setMaxScrollerHeight()}overlayPositioningHandler(){this.reposition(!0)}handlePropsChange(){this.updateItems()}valueHandler(t){if(!this.internalValueChangeFlag){const i=this.getItems();Array.isArray(t)?i.forEach((i=>i.selected=t.includes(i.value))):i.forEach(t?i=>i.selected=t===i.value:t=>t.selected=!1),this.updateItems()}}onMessagesChange(){}flipPlacementsHandler(){this.setFilteredPlacements(),this.reposition(!0)}selectedItemsHandler(){this.internalValueChangeFlag=!0,this.value=this.getValue(),this.internalValueChangeFlag=!1}async documentClickHandler(t){this.disabled||t.composedPath().includes(this.el)||(await R(this.el),!this.allowCustomValues&&this.filterText&&(this.clearInputValue(),this.filterItems(""),this.updateActiveItemIndex(-1)),this.allowCustomValues&&this.filterText.trim().length&&this.addCustomChip(this.filterText),this.open=!1)}calciteComboboxItemChangeHandler(t){if(this.ignoreSelectedEventsFlag)return;const i=t.target,e=this.filteredItems.indexOf(i);this.updateActiveItemIndex(e),this.toggleSelection(i,i.selected)}calciteInternalComboboxItemChangeHandler(t){t.stopPropagation(),this.updateItems()}async reposition(t=!1){const{floatingEl:i,referenceEl:e,placement:s,overlayPositioning:a,filteredFlipPlacements:o}=this;return m(this,{floatingEl:i,referenceEl:e,overlayPositioning:a,placement:s,flipPlacements:o,type:"menu"},t)}async setFocus(){await E(this),this.textInput?.focus(),this.activeChipIndex=-1,this.activeItemIndex=-1}connectedCallback(){k(this),O(this),T(this),S(this),v(this),this.internalValueChangeFlag=!0,this.value=this.getValue(),this.internalValueChangeFlag=!1,this.mutationObserver?.observe(this.el,{childList:!0,subtree:!0}),this.updateItems(),this.setFilteredPlacements(),this.open&&(this.openHandler(),F(this)),b(this,this.referenceEl,this.floatingEl)}async componentWillLoad(){A(this),this.updateItems(),await W(this),this.filterItems(this.filterText,!1,!1)}componentDidLoad(){x(this,this.getValue()),b(this,this.referenceEl,this.floatingEl),L(this)}componentDidRender(){this.el.offsetHeight!==this.inputHeight&&(this.reposition(!0),this.inputHeight=this.el.offsetHeight),I(this)}componentDidUpdate(){this.refreshSelectionDisplay()}disconnectedCallback(){this.mutationObserver?.disconnect(),this.resizeObserver?.disconnect(),z(this),$(this),y(this),u(this,this.referenceEl,this.floatingEl),_(this),V(this)}effectiveLocaleChange(){B(this,this.effectiveLocale)}clearValue(){this.ignoreSelectedEventsFlag=!0,this.items.forEach((t=>t.selected=!1)),this.ignoreSelectedEventsFlag=!1,this.selectedItems=[],this.emitComboboxChange(),this.open=!1,this.updateActiveItemIndex(-1),this.resetText(),this.filterItems(""),this.setFocus()}clearInputValue(){this.textInput.value="",this.filterText=""}comboboxInViewport(){const t=this.el.getBoundingClientRect();return t.top>=0&&t.left>=0&&t.right<=(window.innerWidth||document.documentElement.clientWidth)&&t.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:t}=this,i=0===t.length?0:this.items.indexOf(t[t.length-1]);this.updateActiveItemIndex(i)}hideChip(t){t.classList.add(J.chipInvisible)}showChip(t){t.classList.remove(J.chipInvisible)}refreshChipDisplay({chipEls:t,availableHorizontalChipElSpace:i,chipContainerElGap:e}){t.forEach((t=>{if(t.selected){const s=c(t);if(s&&s<i)return i-=s+e,void this.showChip(t)}else this.hideChip(t);this.hideChip(t)}))}setCompactSelectionDisplay({chipContainerElGap:t,chipContainerElWidth:i,inputWidth:e,largestSelectedIndicatorChipWidth:s}){const a=Math.round(s+t+e);(!this.maxCompactBreakpoint||this.maxCompactBreakpoint<a)&&(this.maxCompactBreakpoint=a),this.compactSelectionDisplay=i<this.maxCompactBreakpoint}setVisibleAndHiddenChips(t){let i=0;t.forEach((t=>{t.selected&&!t.classList.contains(J.chipInvisible)&&i++})),i!==this.selectedVisibleChipsCount&&(this.selectedVisibleChipsCount=i);const e=this.getSelectedItems().length-i;e!==this.selectedHiddenChipsCount&&(this.selectedHiddenChipsCount=e)}getMaxScrollerHeight(){const t=this.getItemsAndGroups().filter((t=>!t.hidden)),{maxItems:i}=this;let e=0,s=0;return t.length>i&&t.forEach((t=>{if(e<i){const i=this.calculateScrollerHeight(t);i>0&&(s+=i,e++)}})),s}calculateScrollerHeight(t){if(t)return t.getBoundingClientRect().height-Array.from(t.querySelectorAll(K)).reduce(((t,i)=>t+i.getBoundingClientRect().height),0)}getItemsAndGroups(){return[...this.groupItems,...this.items]}toggleSelection(t,i=!t.selected){!t||"single-persist"===this.selectionMode&&t.selected&&t.value===this.value||(this.isMulti()?(t.selected=i,this.updateAncestors(t),this.selectedItems=this.getSelectedItems(),this.emitComboboxChange(),this.resetText(),this.filterItems("")):(this.ignoreSelectedEventsFlag=!0,this.items.forEach((e=>e.selected=e===t&&i)),this.ignoreSelectedEventsFlag=!1,this.selectedItems=this.getSelectedItems(),this.emitComboboxChange(),this.textInput&&(this.textInput.value=Q(t)),this.open=!1,this.updateActiveItemIndex(-1),this.resetText(),this.filterItems("")))}updateAncestors(t){if("ancestors"!==this.selectionMode)return;const i=X(t),e=Y(t);t.selected?i.forEach((t=>{t.selected=!0})):(e.forEach((t=>t.selected=!1)),[...i].forEach((t=>{q(t)||(t.selected=!1)})))}getFilteredItems(){return""===this.filterText?this.items:this.items.filter((t=>!t.hidden))}getData(){return this.items.map((t=>({description:t.description,filterDisabled:t.filterDisabled,label:t.textLabel,metadata:t.metadata,shortHeading:t.shortHeading,value:t.value})))}getNeedsIcon(){return U(this.selectionMode)&&this.items.some((t=>t.icon))}resetText(){this.textInput&&(this.textInput.value=""),this.filterText=""}getItems(){return Array.from(this.el.querySelectorAll(Z)).filter((t=>!t.disabled))}getGroupItems(){return Array.from(this.el.querySelectorAll(tt))}addCustomChip(t,i){const e=this.items.find((i=>i.textLabel===t));if(e)this.toggleSelection(e,!0);else{this.isMulti()||this.toggleSelection(this.selectedItems[this.selectedItems.length-1],!1);const e=document.createElement("calcite-combobox-item");e.value=t,e.textLabel=t,e.selected=!0,this.el.prepend(e),this.resetText(),i&&this.setFocus(),this.updateItems(),this.filterItems(""),this.open=!0,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(){const t=this.activeChipIndex;this.activeChipIndex=-1===t?this.selectedItems.length-1:Math.max(t-1,0),this.updateActiveItemIndex(-1),this.focusChip()}nextChip(){const t=this.activeChipIndex+1;t>this.selectedItems.length-1?(this.activeChipIndex=-1,this.setFocus()):(this.activeChipIndex=t,this.focusChip()),this.updateActiveItemIndex(-1)}focusChip(){const t=this.selectedItems[this.activeChipIndex]?.guid,i=t?this.referenceEl.querySelector(`#${dt}${t}`):null;i?.setFocus()}shiftActiveItemIndex(t){const{length:i}=this.filteredItems;this.updateActiveItemIndex((this.activeItemIndex+i+t)%i),this.scrollToActiveItem()}updateActiveItemIndex(t){this.activeItemIndex=t;let i=null;this.filteredItems.forEach(((e,s)=>{s===t?(e.active=!0,i=`${rt}${e.guid}`):e.active=!1})),this.activeDescendant=i,this.activeItemIndex>-1&&(this.activeChipIndex=-1)}isAllSelected(){return this.getItems().length===this.getSelectedItems().length}isMulti(){return!U(this.selectionMode)}renderChips(){const{activeChipIndex:i,readOnly:e,scale:s,selectionMode:a,messages:o}=this;return this.selectedItems.map(((n,l)=>{const c={chip:!0,"chip--active":i===l},h=[...X(n)].reverse(),r=Q(n),d=[...h,n].map((t=>Q(t))),p="ancestors"!==a?r:d.join(" / ");return t("calcite-chip",{appearance:e?"outline":"solid",class:c,closable:!e,"data-test-id":`chip-${l}`,icon:n.icon,iconFlipRtl:n.iconFlipRtl,id:n.guid?`${dt}${n.guid}`:null,key:r,messageOverrides:{dismissLabel:o.removeTag},onCalciteChipClose:()=>this.calciteChipCloseHandler(n),onFocusin:()=>this.activeChipIndex=l,scale:s,selected:n.selected,tabindex:i===l?0:-1,title:p,value:n.value},p)}))}renderAllSelectedIndicatorChip(){const{compactSelectionDisplay:i,scale:e,selectedVisibleChipsCount:s,setAllSelectedIndicatorChipEl:a}=this,o=this.messages.allSelected;return t("calcite-chip",{class:{chip:!0,[J.chipInvisible]:!(this.isAllSelected()&&!s&&!i)},ref:a,scale:e,title:o,value:""},o)}renderAllSelectedIndicatorChipCompact(){const{compactSelectionDisplay:i,scale:e,selectedVisibleChipsCount:s}=this,a=this.messages.all||"All";return t("calcite-chip",{class:{chip:!0,[J.chipInvisible]:!(this.isAllSelected()&&!s&&i)},scale:e,title:a,value:""},a)}renderSelectedIndicatorChip(){const{compactSelectionDisplay:i,selectionDisplay:e,getSelectedItems:s,scale:a,selectedHiddenChipsCount:o,selectedVisibleChipsCount:n,setSelectedIndicatorChipEl:l}=this;let c,h;if(i)c=!0;else if("single"===e){const t=s().length;c=!(!this.isAllSelected()&&t>0),h=`${t} ${this.messages.selected}`}else"fit"===e&&(c=!!(this.isAllSelected()&&0===n||0===o),h=n>0?`+${o}`:`${o} ${this.messages.selected}`);return t("calcite-chip",{class:{chip:!0,[J.chipInvisible]:c},ref:l,scale:a,title:h,value:""},h)}renderSelectedIndicatorChipCompact(){const{compactSelectionDisplay:i,selectionDisplay:e,getSelectedItems:s,scale:a,selectedHiddenChipsCount:o}=this;let n,l;if(i){const t=s().length;this.isAllSelected()?n=!0:"fit"===e?(n=!(o>0),l=`${o||0}`):"single"===e&&(n=!(t>0),l=`${t}`)}else n=!0;return t("calcite-chip",{class:{chip:!0,[J.chipInvisible]:n},scale:a,title:l,value:""},l)}get showingInlineIcon(){const{placeholderIcon:t,selectionMode:i,selectedItems:e,open:s}=this,a=e[0],o=a?.icon,n=U(i);return!s&&a?!!o&&n:!!t&&(!a||n)}renderInput(){const{guid:i,disabled:e,placeholder:s,selectionMode:a,selectedItems:o,open:n}=this,l=U(a),c=o[0],h=!n&&l&&!!c;return t("span",{class:{"input-wrap":!0,"input-wrap--single":l}},h&&t("span",{class:{label:!0,"label--icon":!!c?.icon},key:"label"},Q(c)),t("input",{"aria-activedescendant":this.activeDescendant,"aria-autocomplete":"list","aria-controls":`${bt}${i}`,"aria-errormessage":it.validationMessage,"aria-expanded":r(n),"aria-haspopup":"listbox","aria-invalid":r("invalid"===this.status),"aria-label":H(this),"aria-owns":`${bt}${i}`,class:{[J.input]:!0,"input--single":!0,"input--hidden":h,"input--icon":this.showingInlineIcon&&!!this.placeholderIcon},"data-test-id":"input",disabled:e,id:`${mt}${i}`,key:"input",onFocus:this.comboboxFocusHandler,onInput:this.inputHandler,placeholder:s,readOnly:this.readOnly,ref:t=>this.textInput=t,role:"combobox",tabindex:-1===this.activeChipIndex?0:-1,type:"text",value:this.filterText}))}renderListBoxOptions(){return this.filteredItems.map((i=>t("li",{"aria-selected":r(i.selected),id:i.guid?`${rt}${i.guid}`:null,role:"option",tabindex:"-1"},i.textLabel)))}renderFloatingUIContainer(){const{setFloatingEl:i,setContainerEl:e,open:s}=this;return t("div",{"aria-hidden":"true",class:{"floating-ui-container":!0,"floating-ui-container--active":s},ref:i},t("div",{class:{[J.listContainer]:!0,[g.animation]:!0,[g.animationActive]:s},ref:e},t("ul",{class:{list:!0,"list--hide":!s}},t("slot",null))))}renderSelectedOrPlaceholderIcon(){const{open:i,placeholderIcon:e,placeholderIconFlipRtl:s,selectedItems:a}=this,o=a[0],n=o?.icon,l=e&&(i||!o);return this.showingInlineIcon&&t("span",{class:"icon-start",key:"selected-placeholder-icon"},t("calcite-icon",{class:{[J.selectedIcon]:!l,[J.placeholderIcon]:l},flipRtl:l?s:o.iconFlipRtl,icon:l?e:n,scale:G(this.scale)}))}renderChevronIcon(){const{open:i}=this;return t("span",{class:"icon-end",key:"chevron"},t("calcite-icon",{class:J.icon,icon:i?"chevron-up":"chevron-down",scale:G(this.scale)}))}render(){const{selectionDisplay:i,guid:e,label:a,open:o,readOnly:n}=this,l=U(this.selectionMode),c="all"===i,h="single"===i,r=!l&&"fit"===i,d=!this.clearDisabled&&this.value?.length>0;return t(s,{key:"24749edfdb12a51e6e34c78d3428f83de7ac0457",onClick:this.comboboxFocusHandler},t(j,{key:"7300de366d86bcad91501f1124aed5f311820c37",disabled:this.disabled},t("div",{key:"fc8981935ffdd46fc5386517fce51170d41179a5","aria-live":"polite",class:{wrapper:!0,"wrapper--single":l||!this.selectedItems.length,"wrapper--active":o},onClick:this.clickHandler,onKeyDown:this.keyDownHandler,ref:this.setReferenceEl},this.renderSelectedOrPlaceholderIcon(),t("div",{class:{"grid-input":!0,[J.selectionDisplayFit]:r,[J.selectionDisplaySingle]:h},key:"grid",ref:this.setChipContainerEl},!l&&!h&&this.renderChips(),!l&&!c&&[this.renderSelectedIndicatorChip(),this.renderSelectedIndicatorChipCompact(),this.renderAllSelectedIndicatorChip(),this.renderAllSelectedIndicatorChipCompact()],t("label",{key:"60ca38b6b84d8ccd3e11419ca494c8a3b310e631",class:"screen-readers-only",htmlFor:`${mt}${e}`,id:`${pt}${e}`},a),this.renderInput()),!n&&d?t(ht,{disabled:this.disabled,key:"close-button",label:this.messages.clear,scale:this.scale}):null,!n&&this.renderChevronIcon()),t("ul",{key:"bb750b55b33af3a317ac7883d4f8ef88a23bf1c6","aria-labelledby":`${pt}${e}`,"aria-multiselectable":"true",class:"screen-readers-only",id:`${bt}${e}`,role:"listbox",tabIndex:-1},this.renderListBoxOptions()),this.renderFloatingUIContainer(),t(w,{key:"bf9a9f0dc62822568377ee1e602e24ca14b9c895",component:this}),this.validationMessage&&"invalid"===this.status?t(N,{icon:this.validationIcon,id:it.validationMessage,message:this.validationMessage,scale:this.scale,status:this.status}):null))}static get assetsDirs(){return["assets"]}get el(){return a(this)}static get watchers(){return{filterText:["filterTextChange"],open:["openHandler"],disabled:["handleDisabledChange"],maxItems:["maxItemsHandler"],overlayPositioning:["overlayPositioningHandler"],selectionMode:["handlePropsChange"],scale:["handlePropsChange"],value:["valueHandler"],messageOverrides:["onMessagesChange"],flipPlacements:["flipPlacementsHandler"],selectedItems:["selectedItemsHandler"],effectiveLocale:["effectiveLocaleChange"]}}};ut.style=":host([disabled]){cursor:default;-webkit-user-select:none;-moz-user-select:none;user-select:none;opacity:var(--calcite-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}.interaction-container{display:contents}: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-color-text-3);outline-color:transparent;transition:background-color, block-size, border-color, box-shadow, color, inset-block-end, inset-block-start, inset-inline-end, inset-inline-start inset-size, opacity, outline-color, transform var(--calcite-animation-timing) ease-in-out 0s, outline 0s, outline-offset 0s;border-radius:50%;border-color:transparent;background-color:var(--calcite-color-foreground-2)}.x-button:active,.x-button:hover{color:var(--calcite-color-text-1);background-color:var(--calcite-color-foreground-3)}.x-button:active{border-style:solid;border-color:var(--calcite-color-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:1rem;--calcite-internal-combobox-input-margin-block:calc(0.25rem - 1px)}:host([scale=s]) .x-button{margin-inline: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:1rem;--calcite-internal-combobox-input-margin-block:calc(0.5rem - 1px)}: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:1.5rem;--calcite-internal-combobox-input-margin-block:calc(0.625rem - 1px)}:host([scale=l]) .x-button{margin-inline-end:1rem}.wrapper{display:flex;border-width:1px;border-style:solid;border-color:var(--calcite-color-border-input);background-color:var(--calcite-color-foreground-1);color:var(--calcite-color-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)}.wrapper:hover .icon{color:var(--calcite-color-text-1)}:host(:focus-within) .wrapper,.wrapper--active{outline:2px solid var(--calcite-ui-focus-color, var(--calcite-color-brand));outline-offset:calc(\n -2px *\n calc(\n 1 -\n 2 * clamp(\n 0,\n var(--calcite-offset-invert-focus),\n 1\n )\n )\n )}:host([read-only]) .wrapper{background-color:var(--calcite-color-background)}:host([read-only]) .label{font-weight:var(--calcite-font-weight-medium)}:host([status=invalid]) .wrapper{border-color:var(--calcite-color-status-danger)}:host([status=invalid]:focus-within) .wrapper{outline:2px solid var(--calcite-color-status-danger);outline-offset:calc(\n -2px *\n calc(\n 1 -\n 2 * clamp(\n 0,\n var(--calcite-offset-invert-focus),\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{position:relative;display:flex;flex-grow:1;flex-wrap:wrap;align-items:center;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding:0px;gap:var(--calcite-combobox-item-spacing-unit-s);margin-inline-end:var(--calcite-combobox-item-spacing-unit-s)}.grid-input.selection-display-fit,.grid-input.selection-display-single{flex-wrap:nowrap;overflow:hidden}.input{flex-grow:1;-webkit-appearance:none;-moz-appearance:none;appearance:none;overflow:hidden;text-overflow:ellipsis;border-style:none;background-color:transparent;padding:0px;font-family:inherit;color:var(--calcite-color-text-1);font-size:inherit;block-size:var(--calcite-combobox-input-height);line-height:var(--calcite-combobox-input-height);inline-size:100%;margin-block-end:var(--calcite-combobox-item-spacing-unit-s);min-inline-size:4.8125rem}.input:focus{outline:2px solid transparent;outline-offset:2px}.input:-moz-placeholder-shown{text-overflow:ellipsis}.input:placeholder-shown{text-overflow:ellipsis}.input--single{padding:0px;margin-block:var(--calcite-internal-combobox-input-margin-block)}.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)}.placeholder-icon{color:var(--calcite-color-text-3)}.input-wrap{display:flex;flex-grow:1;align-items:center}.input-wrap--single{flex:1 1 0%;overflow:hidden}.label{pointer-events:none;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;cursor:pointer;align-items:center}.icon-end{flex:none}.icon-end .icon{color:var(--calcite-color-text-3)}.floating-ui-container{--calcite-floating-ui-z-index:var(--calcite-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:inset, left, opacity;opacity:0;box-shadow:0 0 16px 0 rgba(0, 0, 0, 0.16);z-index:var(--calcite-z-index);border-radius:0.25rem}.floating-ui-container[data-placement^=bottom] .calcite-floating-ui-anim{inset-block-start:-5px}.floating-ui-container[data-placement^=top] .calcite-floating-ui-anim{inset-block-start:5px}.floating-ui-container[data-placement^=left] .calcite-floating-ui-anim{left:5px}.floating-ui-container[data-placement^=right] .calcite-floating-ui-anim{left:-5px}.floating-ui-container[data-placement] .calcite-floating-ui-anim--active{opacity:1;inset-block:0;left: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-color-foreground-1);inline-size:var(--calcite-dropdown-width, 100%)}.list{margin:0px;display:block;padding:0px}.list--hide{block-size:0px;overflow:hidden}calcite-chip{--calcite-animation-timing:0}.chip{margin-block:calc(var(--calcite-combobox-item-spacing-unit-s) / 4);max-inline-size:100%}.chip--active{background-color:var(--calcite-color-foreground-3)}.chip--invisible{visibility:hidden;position:absolute}.item{display:block}.validation-container{display:flex;flex-direction:column;align-items:flex-start;align-self:stretch}:host([scale=m]) .validation-container,:host([scale=l]) .validation-container{padding-block-start:0.5rem}:host([scale=s]) .validation-container{padding-block-start:0.25rem}::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)}";const gt=class{constructor(t){i(this,t),this.calciteInternalDropdownItemChange=e(this,"calciteInternalDropdownItemChange",6),this.updateItems=()=>{Array.from(this.el.querySelectorAll("calcite-dropdown-item")).forEach((t=>t.selectionMode=this.selectionMode))},this.mutationObserver=P("mutation",(()=>this.updateItems())),this.groupTitle=void 0,this.scale="m",this.selectionMode="single"}handlePropsChange(){this.updateItems()}connectedCallback(){this.updateItems(),this.mutationObserver?.observe(this.el,{childList:!0})}componentWillLoad(){this.groupPosition=this.getGroupPosition()}disconnectedCallback(){this.mutationObserver?.disconnect()}render(){const i=this.groupTitle?t("span",{"aria-hidden":"true",class:"dropdown-title"},this.groupTitle):null,e=this.groupPosition>0?t("div",{class:"dropdown-separator",role:"separator"}):null;return t(s,{key:"5e46ca1eb8f37e5af6f9ff4f417a9290c84f2f69","aria-label":this.groupTitle,role:"group"},t("div",{key:"af52f0ab422c21b0c10620b61fc7b6445d277878",class:{[st.container]:!0}},e,i,t("slot",{key:"e320a38a327d6ca9802c9664c93907df2705fbf3"})))}updateActiveItemOnChange(t){this.requestedDropdownGroup=t.detail.requestedDropdownGroup,this.requestedDropdownItem=t.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 a(this)}static get watchers(){return{selectionMode:["handlePropsChange"]}}};gt.style=":host{position:relative;display:block}.container{text-align:start}.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-color-border-3);font-weight:var(--calcite-font-weight-bold);color:var(--calcite-color-text-2)}.dropdown-separator{display:block;block-size:1px;background-color:var(--calcite-color-border-3)}:host([scale=s]){font-size:var(--calcite-font-size--2);line-height:1rem}:host([scale=s]) .dropdown-title{padding:0.5rem}:host([scale=m]){font-size:var(--calcite-font-size--1);line-height:1rem}:host([scale=m]) .dropdown-title{padding:0.75rem}:host([scale=l]){font-size:var(--calcite-font-size-0);line-height:1.25rem}:host([scale=l]) .dropdown-title{padding:1rem}:host([hidden]){display:none}[hidden]{display:none}";const ft=class{constructor(t){i(this,t),this.idsFound=e(this,"idsFound",7),this.noLayersFound=e(this,"noLayersFound",7),this.layerSelectionChange=e(this,"layerSelectionChange",7),this.appearance="transparent",this.defaultLayerId="",this.display="inline-block",this.enabledLayerIds=[],this.enabledTableIds=[],this.height=void 0,this.isMobile=void 0,this.mapView=void 0,this.onlyShowUpdatableLayers=void 0,this.placeholderIcon="",this.selectedIds=[],this.scale="m",this.showTables=void 0,this.showSingleLayerAsLabel=!1,this.type="select",this._hasMultipleLayers=!0,this._hasValidLayers=!0,this._isDropdownOpen=void 0,this.ids=[],this.selectedName="",this._translations=void 0}get el(){return a(this)}defaultLayerHonored=!1;_layerElement;_layerNameHash;_tableNameHash;async mapViewWatchHandler(){await this._setLayers(),this.ids.length>0?(this._hasValidLayers=!0,this._hasMultipleLayers=this.ids.length>1,this._setSelectedLayer(this.ids[0])):(this._hasValidLayers=!1,this.noLayersFound.emit())}idsFound;noLayersFound;layerSelectionChange;async componentWillLoad(){await this._getTranslations(),await this._setLayers()}async componentWillRender(){if(this.ids.length>0||1===this.selectedIds.length){const t=1===this.selectedIds.length?this.selectedIds[0]:this.ids[0];t!==this.selectedIds[0]&&this._setSelectedLayer(t)}}render(){const i="map-layer-picker";let e=this.height>0?{height:`${this.height.toString()}px`}:{};return e={...e,display:this.display},t(s,{key:"786588e505e991901c68091bfa7db533f269c06e"},t("div",{key:"7dd54ee014577d33616464ff77eb8694380637d0",class:"map-layer-picker-container",style:e},t("div",{key:"a64ee10033e7ffc33b808a7bb984abd2781629a3",class:"map-layer-picker",style:e},this._hasValidLayers?!this._hasMultipleLayers&&this.showSingleLayerAsLabel?this._getSingleLayerPlaceholder():"combobox"===this.type?this._getCombobox(i):"select"===this.type?this._getSelect(i):this._getDropdown(i):this._getInvalidPlaceholder())))}async componentDidLoad(){if(this.ids.length>0||1===this.selectedIds.length){const t=1===this.selectedIds.length?this.selectedIds[0]:this.ids[0];"select"===this.type?this._layerElement.value=t:"dropdown"===this.type&&(this.selectedName=Object.keys(this._layerNameHash).indexOf(t)>-1?this._layerNameHash[t].name:Object.keys(this._tableNameHash).indexOf(t)>-1?this._tableNameHash[t].name:"")}}_getInvalidPlaceholder(){return t("div",null,t("calcite-notice",{class:"height-100",icon:"exclamation-mark-triangle",id:"no-valid-layers",kind:"danger",open:!0},t("div",{slot:"message"},this._translations.noLayersFound)),t("calcite-tooltip",{label:this._translations.enableEditUpdate,placement:"bottom","reference-element":"no-valid-layers"},t("span",null,this._translations.enableEditUpdate)))}_getSingleLayerPlaceholder(){const i=this._getItemTypeIcon();return t("div",{class:"layer-picker-label-container cursor-default"},t("calcite-icon",{icon:i,scale:"s"}),t("calcite-label",{class:"no-bottom-margin padding-start-1"},this.selectedName))}_getSelect(i){return t("calcite-select",{id:i,label:"",onCalciteSelectChange:()=>this._layerSelectionChange(),ref:t=>{this._layerElement=t},scale:this.scale},this._getMapLayerOptions())}_getCombobox(i){return t("calcite-combobox",{clearDisabled:!0,id:i,label:"",onCalciteComboboxChange:()=>this._layerSelectionChange(),"placeholder-icon":this.placeholderIcon,ref:t=>{this._layerElement=t},scale:this.scale,"selection-mode":"single"},this._getMapLayerOptions())}_getDropdown(i){return t("calcite-dropdown",{class:"layer-picker-dropdown",onCalciteDropdownBeforeClose:()=>this._isDropdownOpen=!1,onCalciteDropdownBeforeOpen:()=>this._isDropdownOpen=!0},this.isMobile?this._getDropdownButton():this._getActionDropdownButton(i),t("calcite-dropdown-group",{"selection-mode":"single"},this._getMapLayerOptions()))}_getActionDropdownButton(i){return t("calcite-action",{id:i,slot:"trigger",text:""},this._getDropdownButton())}_getDropdownButton(){const i=this._getItemTypeIcon();return t("calcite-button",{alignment:"icon-end-space-between",appearance:this.appearance,class:this.isMobile?"":"max-width-350",iconEnd:this._isDropdownOpen?"chevron-up":"chevron-down",iconStart:i,kind:"neutral",slot:this.isMobile?"trigger":"",width:"full"},t("div",null,this.selectedName))}_getItemTypeIcon(){let t="layers";if(this.selectedIds.length>0){const i=this.selectedIds[0];t=Object.keys(this._layerNameHash).indexOf(i)>-1?"layers":"table"}return t}_getMapLayerOptions(){return this.ids.reduce(((t,i)=>(this._validLayer(i)?t.push(this._getItem(i,"layer")):this._validTable(i)&&t.push(this._getItem(i,"table")),t)),[])}_getItem(i,e){const s="layer"===e?this._layerNameHash[i]:this._tableNameHash[i],a=!!this.onlyShowUpdatableLayers&&!s.supportsUpdate,o=s.name,n=this.selectedIds.indexOf(i)>-1;return"combobox"===this.type?t("calcite-combobox-item",{disabled:a,selected:n,textLabel:o,value:i}):"select"===this.type?t("calcite-option",{disabled:a,label:o,selected:n,value:i}):t("calcite-dropdown-group",{class:a?"disabled":"",selectionMode:a?"none":"single"},t("calcite-dropdown-item",{"icon-start":e,onClick:a?void 0:()=>{this._setSelectedLayer(i)},selected:n},o))}_setSelectedLayer(t){let i;this.defaultLayerId&&!this.defaultLayerHonored&&(i=this._getLayerFromHash(this.defaultLayerId),this.defaultLayerHonored=void 0!==i,t=this.defaultLayerHonored?this.defaultLayerId:t),i=i||this._getLayerFromHash(t),this.selectedName=i?.name,this.selectedIds=[t],this.layerSelectionChange.emit(this.selectedIds)}_getLayerFromHash(t){return Object.keys(this._layerNameHash).indexOf(t)>-1?this._layerNameHash[t]:Object.keys(this._tableNameHash).indexOf(t)>-1?this._tableNameHash[t]:void 0}async _setLayers(){if(this.mapView){await this._initLayerTableHash();const t=this.onlyShowUpdatableLayers?this._getEditableIds(this._layerNameHash):Object.keys(this._layerNameHash),i=this.showTables?this.onlyShowUpdatableLayers?this._getEditableIds(this._tableNameHash):Object.keys(this._tableNameHash):[];this.ids=[...t.reverse().filter((t=>!(this.enabledLayerIds?.length>0)||this.enabledLayerIds.reverse().indexOf(t)>-1)),...i.reverse().filter((t=>!(this.enabledTableIds?.length>0)||this.enabledTableIds.reverse().indexOf(t)>-1))],this.idsFound.emit({layerIds:t,tableIds:i})}}_getEditableIds(t){return Object.keys(t).reduce(((i,e)=>(t[e].supportsUpdate&&i.push(e),i)),[])}async _initLayerTableHash(){this._layerNameHash=await ot(this.mapView,this.onlyShowUpdatableLayers),this._tableNameHash=this.showTables?await nt(this.mapView,this.onlyShowUpdatableLayers):{}}_validLayer(t){const i=this._layerNameHash[t]?.name;return i&&Object.keys(lt.managedLayers).indexOf(i)<0&&(!(this.enabledLayerIds.length>0)||this.enabledLayerIds.indexOf(t)>-1)}_validTable(t){const i=this._tableNameHash[t]?.name,e=i&&this.showTables;return e?lt.managedTables.indexOf(i)<0&&(!(this.enabledTableIds.length>0)||this.enabledTableIds.indexOf(t)>-1):e}_layerSelectionChange(){const t=Array.isArray(this._layerElement.value)?this._layerElement.value:[this._layerElement.value];JSON.stringify(t)!==JSON.stringify([""])&&(this.selectedIds=t,this.layerSelectionChange.emit(this.selectedIds))}async _getTranslations(){const t=await at(this.el);this._translations=t[0]}static get watchers(){return{mapView:["mapViewWatchHandler"]}}};ft.style=":host{display:block}.map-layer-picker-container{width:100%;align-items:center}.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}.height-100{height:100%}.disabled{cursor:default !important;-webkit-user-select:none;-moz-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled);pointer-events:none}.no-bottom-margin{--calcite-label-margin-bottom:0px}.layer-picker-label-container{align-items:center;display:inline-flex;height:100%;padding-inline-start:1rem;padding-inline-end:1rem}.padding-start-1{padding-inline-start:1rem}.cursor-default{cursor:default}";export{ut as calcite_combobox,gt as calcite_dropdown_group,ft as map_layer_picker}
|
@@ -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 e,f as i,h as n,H as o,g as s}from"./p-6eb37ed2.js";import{i as a,z as r,g as l,
|
6
|
+
import{r as t,c as e,f as i,h as n,H as o,g as s}from"./p-6eb37ed2.js";import{i as a,z as r,g as l,h as c,t as h}from"./p-441f1992.js";import{s as d,c as u,i as b,d as p,H as m}from"./p-54fa7a94.js";import{c as f,d as v,u as g,I as x}from"./p-1ce2608d.js";import{n as k}from"./p-64a34d92.js";import{c as y,d as w,g as z}from"./p-fd730974.js";import{s as j,a as I,c as C}from"./p-3e828614.js";import{n as E,i as D,p as L,s as A,e as M,c as V,d as W,B as F}from"./p-42552409.js";import{c as K}from"./p-1c249530.js";import{C as $}from"./p-8bfa18b7.js";import{u as G,c as N,d as O,s as P}from"./p-6e3f1d71.js";import{g as T}from"./p-27d462c0.js";import{V as U}from"./p-ef67c743.js";import{s as B}from"./p-14f027b5.js";import"./p-aaa56cbf.js";import"./p-4b9b7778.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/dev/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 i}from"./p-
|
6
|
+
import{d as i}from"./p-b3b042df.js";import"./p-6eb37ed2.js";import"./p-54fa7a94.js";import"./p-441f1992.js";import"./p-aaa56cbf.js";import"./p-8bfa18b7.js";import"./p-1ce2608d.js";import"./p-4b9b7778.js";import"./p-64a34d92.js";import"./p-fd730974.js";import"./p-27d462c0.js";import"./p-3e828614.js";import"./p-42552409.js";import"./p-1c249530.js";import"./p-4182a628.js";import"./p-0ef9d36b.js";import"./p-abc30e04.js";import"./p-d9e930c8.js";import"./p-6e3f1d71.js";import"./p-ef67c743.js";import"./p-14f027b5.js";function e(i){return i%10<5&&i%10>1&&~~(i/10)%10!=1}function r(i,r,t){var a=i+" ";switch(t){case"m":return r?"minuta":"minutę";case"mm":return a+(e(i)?"minuty":"minut");case"h":return r?"godzina":"godzinę";case"hh":return a+(e(i)?"godziny":"godzin");case"MM":return a+(e(i)?"miesiące":"miesięcy");case"yy":return a+(e(i)?"lata":"lat")}}var t="stycznia_lutego_marca_kwietnia_maja_czerwca_lipca_sierpnia_września_października_listopada_grudnia".split("_"),a="styczeń_luty_marzec_kwiecień_maj_czerwiec_lipiec_sierpień_wrzesień_październik_listopad_grudzień".split("_"),p=/D MMMM/,s=function(i,e){return p.test(e)?t[i.month()]:a[i.month()]};s.s=a,s.f=t;var _={name:"pl",weekdays:"niedziela_poniedziałek_wtorek_środa_czwartek_piątek_sobota".split("_"),weekdaysShort:"ndz_pon_wt_śr_czw_pt_sob".split("_"),weekdaysMin:"Nd_Pn_Wt_Śr_Cz_Pt_So".split("_"),months:s,monthsShort:"sty_lut_mar_kwi_maj_cze_lip_sie_wrz_paź_lis_gru".split("_"),ordinal:function(i){return i+"."},weekStart:1,yearStart:4,relativeTime:{future:"za %s",past:"%s temu",s:"kilka sekund",m:r,mm:r,h:r,hh:r,d:"1 dzień",dd:"%d dni",M:"miesiąc",MM:r,y:"rok",yy:r},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"}};i.locale(_,null,!0);export{_ as default}
|
@@ -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
|
+
import{r as t,g as i,h as s,H as e,c as a}from"./p-6eb37ed2.js";import{l as h,g as n}from"./p-2058b5d9.js";import"./p-0a24ad5f.js";import"./p-d4056c1c.js";const o=class{constructor(i){t(this,i),this.mapView=void 0,this.basemapConfig=void 0,this.basemapWidget=void 0}get el(){return i(this)}BasemapGallery;PortalBasemapsSource;_basemapElement;async basemapConfigWatchHandler(){if(this.basemapWidget?.source){const t=this.basemapWidget?.source;t.query=this.basemapConfig?.basemapGroupId?`id:${this.basemapConfig.basemapGroupId}`:null,await t.refresh()}}async mapViewWatchHandler(){await this.mapView.when((()=>{this._initBaseMapGallery(this.mapView)}))}async componentWillLoad(){return this._initModules()}render(){return s(e,{key:"1f8be0f65a784ffaac49b8a5a15ebd6fb72d6643"},s("div",{key:"2c1bde6c0624b476f6c34302ea843da195f535cb",ref:t=>{this._basemapElement=t}}))}async componentDidLoad(){this.mapView&&await this.mapViewWatchHandler()}async _initModules(){const[t,i]=await h(["esri/widgets/BasemapGallery","esri/widgets/BasemapGallery/support/PortalBasemapsSource"]);this.BasemapGallery=t,this.PortalBasemapsSource=i}async _initBaseMapGallery(t){if(this.BasemapGallery){this.basemapWidget&&this.basemapWidget.destroy();const i=new this.PortalBasemapsSource({query:this.basemapConfig?.basemapGroupId?`id:${this.basemapConfig.basemapGroupId}`:null,filterFunction:this.basemapConfig?t=>!this.basemapConfig.basemapIdsToFilter.includes(t.portalItem.id):()=>!0});await i.refresh(),this.basemapWidget=new this.BasemapGallery({container:this._basemapElement,view:t,source:i})}}static get watchers(){return{basemapConfig:["basemapConfigWatchHandler"],mapView:["mapViewWatchHandler"]}}};o.style=":host{display:block}";const r=class{constructor(i){t(this,i),this.facilityChanged=a(this,"facilityChanged",7),this.levelChanged=a(this,"levelChanged",7),this.siteChanged=a(this,"siteChanged",7),this.enabled=void 0,this.floorFilterWidget=void 0,this.mapView=void 0}get el(){return i(this)}FloorFilter;_floorFilterElement;reactiveUtils;_facilityHandle;_levelHandle;_siteHandle;async mapViewWatchHandler(){await this._initFloorFilter(this.mapView)}async enabledWatchHandler(){this.enabled?await this._initFloorFilter(this.mapView):this.enabled||this._destroyWidget()}facilityChanged;levelChanged;siteChanged;async componentWillLoad(){return this._initModules()}render(){return s(e,{key:"dd7fa68ddc1e417cb8924549e50e81742f9e891a"},s("div",{key:"294837a32ed7e8f955bce7dc2403895c7dd9984f",ref:t=>{this._floorFilterElement=t}}))}async componentDidLoad(){this.mapView&&!this.floorFilterWidget&&await this._initFloorFilter(this.mapView)}async _initModules(){const[t,i]=await h(["esri/widgets/FloorFilter","esri/core/reactiveUtils"]);this.FloorFilter=t,this.reactiveUtils=i}_destroyWidget(){this.floorFilterWidget&&(this.floorFilterWidget.destroy(),this.floorFilterWidget=void 0),this._floorFilterElement&&this._floorFilterElement.remove()}_initContainer(){this._destroyWidget(),this._floorFilterElement=document.createElement("div")}async _initFloorFilter(t){const i=t?.map;await i.when((()=>{t&&this.enabled&&this.FloorFilter&&i?.floorInfo&&(this._initContainer(),this.floorFilterWidget=new this.FloorFilter({container:this._floorFilterElement,view:t}),this._facilityHandle?.remove(),this._facilityHandle=this.reactiveUtils.watch((()=>this.floorFilterWidget.facility),(t=>{this.facilityChanged.emit(t)})),this._levelHandle?.remove(),this._levelHandle=this.reactiveUtils.watch((()=>this.floorFilterWidget.level),(t=>{this.levelChanged.emit(t)})),this._siteHandle?.remove(),this._siteHandle=this.reactiveUtils.watch((()=>this.floorFilterWidget.site),(t=>{this.siteChanged.emit(t)})))}))}static get watchers(){return{mapView:["mapViewWatchHandler"],enabled:["enabledWatchHandler"]}}};r.style=":host{display:block}";const c=class{constructor(i){t(this,i),this.fullscreenStateChange=a(this,"fullscreenStateChange",7),this.mapView=void 0,this.fullscreenWidget=void 0}Fullscreen;_fullscreenElement;_fullscreenStateChangeHandle;reactiveUtils;async mapViewWatchHandler(){await this.mapView.when((async()=>{await this._initFullscreenWidget()}))}fullscreenStateChange;async componentWillLoad(){await this._initModules()}render(){return s(e,{key:"9fc5dfeffc8601763b27e001311ec317934ebcae"},s("div",{key:"65f2ab96d7283a9a10a113be0cdef6a95de1ee1b",class:"fullscreen-widget",ref:t=>{this._fullscreenElement=t}}))}async componentDidUpdate(){await this._initFullscreenWidget()}async componentDidLoad(){await this._initFullscreenWidget()}async _initModules(){const[t,i]=await h(["esri/widgets/Fullscreen","esri/core/reactiveUtils"]);this.Fullscreen=t,this.reactiveUtils=i}async _initFullscreenWidget(){this.mapView&&this._fullscreenElement&&!this.fullscreenWidget?(this.fullscreenWidget=new this.Fullscreen({view:this.mapView}),await this.fullscreenWidget.when((()=>{this._fullscreenStateChangeHandle&&this._fullscreenStateChangeHandle.remove(),this._fullscreenStateChangeHandle=this.reactiveUtils.watch((()=>this.fullscreenWidget.viewModel.state),(t=>this.fullscreenStateChange.emit(t)))}))):this.fullscreenWidget&&(this.fullscreenWidget.view=this.mapView)}static get watchers(){return{mapView:["mapViewWatchHandler"]}}};c.style=":host{display:block}";const l=class{constructor(i){t(this,i),this.mapView=void 0,this.legendWidget=void 0}get el(){return i(this)}Legend;_legendElement;async mapViewWatchHandler(){await this.mapView.when((()=>{this._initLegend(this.mapView)}))}async componentWillLoad(){return this._initModules()}render(){return s(e,{key:"f520dd3737b8b883d8e27eb9a63da25f6d5b9375"},s("div",{key:"6775e1c58ecd4fe63d50358fe2cd4f050cb1d709",ref:t=>{this._legendElement=t}}))}async componentDidLoad(){this.mapView&&await this.mapViewWatchHandler()}async _initModules(){const[t]=await h(["esri/widgets/Legend"]);this.Legend=t}_initLegend(t){t&&this.Legend&&(this.legendWidget?this.legendWidget.view=t:this.legendWidget=new this.Legend({container:this._legendElement,view:t}))}static get watchers(){return{mapView:["mapViewWatchHandler"]}}};l.style=":host{display:block}";const d=class{constructor(i){t(this,i),this.mapInfoChange=a(this,"mapInfoChange",7),this.mapInfos=[],this.isMapLayout=void 0,this._mapListExpanded=!1,this._translations=void 0,this._webMapInfo=void 0}get el(){return i(this)}_list;_loadedId="";_webMapInfoWatchHandler(t,i){t&&JSON.stringify(t)!==JSON.stringify(i)&&(this._loadedId=t?.id,this.mapInfoChange.emit(t))}async mapInfosWatchHandler(t,i){t&&JSON.stringify(t)!==JSON.stringify(i)&&this._webMapSelected(t[0])}async setMapByID(t){const i=this.mapInfos?.filter((i=>i.id===t));t&&i?.length>0&&this._webMapSelected(i[0])}async close(){this._mapListExpanded&&(this._mapListExpanded=!1)}async toggle(t){this._mapListExpanded=t}mapInfoChange;async componentWillLoad(){await this._getTranslations()}render(){return s(e,{key:"178a4e3fcd08972b0465885c4891a732ea970428"},this._getToolbar(),this._getMapNameList(this._mapListExpanded))}async componentDidLoad(){const t=this.mapInfos&&this.mapInfos.length>0?this.mapInfos[0]:void 0;t&&this._webMapSelected(t)}_getMapPicker(){const t="map-picker-expand-toggle";return s("div",{class:"width-full"},s("calcite-button",{alignment:"icon-end-space-between",appearance:"transparent",class:"width-full height-full",iconEnd:this._mapListExpanded?"chevron-up":"chevron-down",iconStart:"map",id:t,kind:"neutral",onClick:()=>this._chooseMap(),width:"full"},this._webMapInfo?.name),s("calcite-tooltip",{placement:"bottom","reference-element":t},s("span",null,this._translations.switchMap)))}_getToolbar(){return s("div",{class:"display-flex border-right"},s("calcite-action-bar",{class:"border-bottom-1 action-bar-size","expand-disabled":!0,layout:"horizontal",slot:"header"},this._getMapPicker()))}_getMapNameList(t){return s("div",{class:t?"map-list border-bottom-1 "+(this.isMapLayout?"width-25":"width-full"):"display-none"},s("calcite-list",{id:"mapList",ref:t=>this._list=t,selectionAppearance:"border",selectionMode:"single"},this.mapInfos.map((t=>s("calcite-list-item",{label:t.name,onClick:()=>this._webMapSelected(t),selected:t.id===this._loadedId,value:t.id})))))}_webMapSelected(t){this._mapListExpanded=!1,this._webMapInfo=t}_chooseMap(){this._mapListExpanded=!this._mapListExpanded}async _getTranslations(){const t=await n(this.el);this._translations=t[0]}static get watchers(){return{_webMapInfo:["_webMapInfoWatchHandler"],mapInfos:["mapInfosWatchHandler"]}}};d.style=":host{display:block;--solutions-theme-foreground-color:var(--calcite-color-foreground-1)}.width-full{width:100%}.width-25{width:25% !important}.height-full{height:100%}.display-flex{display:flex}.border-bottom-1{border-width:0px;border-bottom-width:1px;border-style:solid;border-color:var(--calcite-color-border-3)}.border-right{border-right:1px solid var(--calcite-color-border-3)}.action-bar-size{height:51px;width:100%}.map-list{position:absolute;display:flex;flex-direction:column;overflow:hidden;animation:calcite-scrim-fade-in var(--calcite-internal-animation-timing-medium) ease-in-out;background-color:var(--calcite-color-background);z-index:1000;width:100%;height:-moz-fit-content;height:fit-content}.display-none{display:none}.align-center{align-items:center}";const p=class{constructor(i){t(this,i),this.mapView=void 0,this.popupEnabled=!1,this.resultGraphicEnabled=!1,this.searchConfiguration=void 0,this.searchTerm=void 0,this.searchWidget=void 0}FeatureLayer;Search;_searchElement;_searchResult;async watchSearchConfigurationHandler(){this._initSearchWidget()}async mapViewWatchHandler(){await this.mapView.when((()=>{this._initSearchWidget()}))}async componentWillLoad(){await this._initModules()}async componentDidLoad(){return this._initSearchWidget()}render(){return s(e,{key:"7c990343af0d1077a7315fd131379bc891310e30"},s("div",{key:"97cd41cf7f749f31701de3526cf2ef633eda48dd",class:"search-widget",ref:t=>{this._searchElement=t}}))}async _initModules(){const[t,i]=await h(["esri/widgets/Search","esri/layers/FeatureLayer"]);this.Search=t,this.FeatureLayer=i}_initSearchWidget(){if(this.mapView&&this._searchElement&&!this.searchWidget){let t={view:this.mapView,container:this._searchElement,searchTerm:this.searchTerm};this.searchConfiguration&&(t={...this._getSearchConfig(this.searchConfiguration,this.mapView)}),this.searchWidget=new this.Search(t),this.searchWidget.popupEnabled=this.popupEnabled,this.searchWidget.resultGraphicEnabled=this.resultGraphicEnabled}else this.searchWidget&&(this.searchWidget.view=this.mapView)}_getSearchConfig(t,i){const s=t.sources;return s?.length>0?(t.includeDefaultSources=!1,s.forEach((t=>{if(t.hasOwnProperty("layer")){const s=t,e=s.layer?.id,a=e?i.map.findLayerById(e):null,h=s?.layer?.url;a?s.layer=a:h&&(s.layer=new this.FeatureLayer(h))}})),s?.forEach((t=>{if(t.hasOwnProperty("locator")){const i=t;"ArcGIS World Geocoding Service"===i?.name&&(i.outFields=i.outFields||["Addr_type","Match_addr","StAddr","City"],i.singleLineFieldName="SingleLine"),i.url=i.url,delete i.url}}))):t={...t,includeDefaultSources:!0},t}static get watchers(){return{searchConfiguration:["watchSearchConfigurationHandler"],mapView:["mapViewWatchHandler"]}}};p.style=":host{display:block}.search-widget{width:100% !important;border:1px solid var(--calcite-color-border-input)}";const m=class{constructor(i){t(this,i),this.basemapConfig=void 0,this.enableLegend=void 0,this.enableFloorFilter=void 0,this.enableFullscreen=void 0,this.enableSearch=void 0,this.enableBasemap=void 0,this.enableHome=void 0,this.enableSingleExpand=void 0,this.homeZoomToolsSize="m",this.layout="vertical",this.mapView=void 0,this.mapWidgetsSize="m",this.position="top-right",this.searchConfiguration=void 0,this.stackTools=!0,this.toolOrder=void 0,this._hasFloorInfo=!1,this._translations=void 0,this._showTools=!0,this._showBasemapWidget=!1,this._showFloorFilter=!1,this._showFullscreen=!1,this._showLegendWidget=!1,this._showSearchWidget=!1}get el(){return i(this)}Expand;_basemapElement;_floorFilterElement;_fullscreenElement;_legendElement;_searchElement;_widgets=[];async mapViewWatchHandler(){await this.mapView.when((()=>{this._hasFloorInfo=this.mapView?.map?.floorInfo}))}async _showBasemapWidgetWatchHandler(t){t?this.mapView.ui.add(this._basemapElement.basemapWidget,{position:this.position,index:1}):this.mapView.ui.remove(this._basemapElement.basemapWidget)}async _showFloorFilterWatchHandler(t){const i=this._floorFilterElement.floorFilterWidget;t?this.mapView.ui.add(i,{position:this.position,index:1}):this.mapView.ui.remove(i)}async _showFullscreenWatchHandler(t){const i=this._fullscreenElement.fullscreenWidget;t?"ready"===i.viewModel.state&&i.viewModel.enter():"active"===i.viewModel.state&&i.viewModel.exit()}async _showLegendWidgetWatchHandler(t){t?this.mapView.ui.add(this._legendElement.legendWidget,{position:this.position,index:1}):this.mapView.ui.remove(this._legendElement.legendWidget)}async _showSearchWidgetWatchHandler(t){t?this.mapView.ui.add(this._searchElement.searchWidget,{position:this.position,index:1}):this.mapView.ui.remove(this._searchElement.searchWidget)}async componentWillLoad(){await this._getTranslations(),await this._initModules()}render(){this._setZoomToolsSize();const t=this._showTools?"":"display-none",i=this._showSearchWidget?"":"display-none",a=this._showBasemapWidget?"":"display-none",h=this._showLegendWidget?"":"display-none",n=this._showFloorFilter?"":"display-none",o=this._showFullscreen?"":"display-none",r=this.enableSingleExpand?"margin-top-1-2":"",c=this.toolOrder?this.toolOrder:["legend","search","fullscreen","floorfilter"],l=this.stackTools?"box-shadow":"";return s(e,{key:"087d0879847a1a48e3e586d4e851a55f0640dfea"},s("div",{key:"cd76a75845afb17c42722125f30fb5c59d305671",class:this.enableBasemap||this.enableFullscreen||this.enableLegend||this.enableSearch?"":"display-none"},this.enableSingleExpand?s("div",{class:"box-shadow"},this._getActionGroup(this._showTools?"chevrons-up":"chevrons-down",!1,this._showTools?this._translations.collapse:this._translations.expand,(()=>this._toggleTools()))):void 0,s("div",{key:"f2522aa2d41243bcaf9ae75372c50454d354de1b",class:`${r} ${l} ${t}`},this._getMapWidgets(c))),s("basemap-gallery",{key:"38762b76d6e5300800a1214a579cc7c76d4f00d7",basemapConfig:this.basemapConfig,class:a,mapView:this.mapView,ref:t=>{this._basemapElement=t}}),s("map-search",{key:"929003ecf89addceb07b6337a90f7d0558c67c18",class:i,mapView:this.mapView,ref:t=>{this._searchElement=t},resultGraphicEnabled:!0,searchConfiguration:this.searchConfiguration}),s("map-legend",{key:"46177bd0963cefc5b5b36e4b4c08e323193d14c9",class:h,mapView:this.mapView,ref:t=>{this._legendElement=t}}),s("map-fullscreen",{key:"dfb346c088e665f137143655a47539148a3d2580",class:o,mapView:this.mapView,onFullscreenStateChange:t=>this._fullscreenStateChange(t.detail),ref:t=>{this._fullscreenElement=t}}),s("floor-filter",{key:"0c1bd8979355d6f5d2c7299bbca23f6762d94cc5",class:n,enabled:this.enableFloorFilter,mapView:this.mapView,ref:t=>{this._floorFilterElement=t}}))}async _initModules(){const[t]=await h(["esri/widgets/Expand"]);this.Expand=t}_setZoomToolsSize(){const t=document.getElementsByClassName("esri-zoom")[0]?.children[0],i=document.getElementsByClassName("esri-zoom")[0]?.children[1];if(t&&i){const s="s"===this.homeZoomToolsSize?"32px":"m"===this.homeZoomToolsSize?"40px":"48px";t.style.width=s,t.style.height=s,i.style.width=s,i.style.height=s}}_getMapWidgets(t){const i=this._showFullscreen?"full-screen-exit":"full-screen",s=this._showFullscreen?this._translations.exitFullscreen:this._translations.enterFullscreen;return t.map((t=>{switch(t){case"legend":return this.enableLegend&&this.enableSingleExpand?this._getActionGroup("legend",!1,this._translations.legend,(()=>this._showLegend())):this.enableLegend?this._getWidget(t,this._legendElement?.legendWidget,!0):void 0;case"search":return this.enableSearch&&this.enableSingleExpand?this._getActionGroup("magnifying-glass",!1,this._translations.search,(()=>this._search())):this.enableSearch?this._getWidget(t,this._searchElement?.searchWidget,!0):void 0;case"fullscreen":return this.enableFullscreen&&this.enableSingleExpand?this._getActionGroup(i,!1,s,(()=>this._expand())):this.enableFullscreen?this._getWidget(t,this._fullscreenElement?.fullscreenWidget,!1):void 0;case"basemap":return this.enableBasemap&&this.enableSingleExpand?this._getActionGroup("basemap",!1,this._translations.basemap,(()=>this._toggleBasemapPicker())):this.enableBasemap?this._getWidget(t,this._basemapElement?.basemapWidget,!0):void 0;case"floorfilter":return this.enableFloorFilter&&this._hasFloorInfo&&this.enableSingleExpand?this._getActionGroup("urban-model",!1,this._translations.floorFilter,(()=>this._toggleFloorFilter())):this.enableFloorFilter&&this._hasFloorInfo?this._getWidget(t,this._floorFilterElement?.floorFilterWidget,!0):void 0}}))}_fullscreenStateChange(t){"ready"===t&&this._showFullscreen?this._showFullscreen=!1:"active"!==t||this._showFullscreen||(this._showFullscreen=!0)}_getActionGroup(t,i,e,a){return s("div",null,s("calcite-action",{alignment:"center",class:`${"s"===this.mapWidgetsSize?"square-32":"m"===this.mapWidgetsSize?"square-40":"square-48"} ${this.stackTools?"":"margin-bottom-1-2"} border-bottom ${this.stackTools?"":"box-shadow"}`,compact:!1,disabled:i,icon:t,id:t,onClick:a,scale:"s",text:""},s("calcite-icon",{icon:"cheveron-up",scale:"s",slot:"icon"})),s("calcite-tooltip",{label:"",placement:"trailing","reference-element":t},s("span",null,e)))}_getWidget(t,i,s){if(this._widgets.indexOf(t)<0&&this.mapView&&i){const e=this.toolOrder.indexOf(t),a=new this.Expand({view:this.mapView,content:i});this.mapView.ui.add(s?a:i,{position:this.position,index:e>-1?e+(this.enableHome?2:1):1}),this._widgets.push(t)}}_showLegend(){this._showLegendWidget=!this._showLegendWidget,this._showTools=!1}_search(){this._showSearchWidget=!this._showSearchWidget,this._showTools=!1}_toggleBasemapPicker(){this._showBasemapWidget=!this._showBasemapWidget,this._showTools=!1}_toggleFloorFilter(){this._showFloorFilter=!this._showFloorFilter,this._showTools=!1}_expand(){this._showFullscreen=!this._showFullscreen}_toggleTools(){this._showTools||(this._showBasemapWidget=!1,this._showSearchWidget=!1,this._showLegendWidget=!1,this._showFloorFilter=!1),this._showTools=!this._showTools}async _getTranslations(){const t=await n(this.el);this._translations=t[0]}static get watchers(){return{mapView:["mapViewWatchHandler"],_showBasemapWidget:["_showBasemapWidgetWatchHandler"],_showFloorFilter:["_showFloorFilterWatchHandler"],_showFullscreen:["_showFullscreenWatchHandler"],_showLegendWidget:["_showLegendWidgetWatchHandler"],_showSearchWidget:["_showSearchWidgetWatchHandler"]}}};m.style=":host{display:block}.display-none{display:none}.margin-top-1-2{margin-top:0.5rem}.square-32{width:32px;height:32px}.square-40{width:40px;height:40px}.square-48{width:48px;height:48px}.width-40{width:40px}.square-40-41{width:40px;height:41px}.border-bottom{border-bottom:1px solid var(--calcite-color-border-3)}.box-shadow{box-shadow:0 1px 2px rgba(0, 0, 0, 0.3)}.margin-bottom-1-2{margin-bottom:0.5rem}";export{o as basemap_gallery,r as floor_filter,c as map_fullscreen,l as map_legend,d as map_picker,p as map_search,m as map_tools}
|