@esri/solutions-components 0.6.12 → 0.6.13
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/assets/t9n/layer-table/resources.json +4 -3
- package/dist/assets/t9n/layer-table/resources_en.json +4 -3
- package/dist/cjs/calcite-shell-panel_14.cjs.entry.js +2 -1
- package/dist/cjs/card-manager_3.cjs.entry.js +60 -28
- package/dist/cjs/clean-url-d5326abb.js +573 -0
- package/dist/cjs/crowdsource-manager.cjs.entry.js +5 -3
- package/dist/cjs/{downloadUtils-43f5be48.js → downloadUtils-fb4744e0.js} +296 -51
- package/dist/cjs/edit-card_2.cjs.entry.js +3 -3
- package/dist/cjs/{index.es-8da43c21.js → index.es-372e33de.js} +2 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/map-select-tools_3.cjs.entry.js +8 -5
- package/dist/cjs/public-notification.cjs.entry.js +5 -4
- package/dist/cjs/solution-configuration.cjs.entry.js +44 -43
- package/dist/cjs/solution-contents_3.cjs.entry.js +2 -1
- package/dist/cjs/{solution-store-3cd104d8.js → solution-store-c443e657.js} +7 -572
- package/dist/cjs/solutions-components.cjs.js +1 -1
- package/dist/collection/components/card-manager/card-manager.css +0 -5
- package/dist/collection/components/card-manager/card-manager.js +1 -1
- package/dist/collection/components/crowdsource-manager/crowdsource-manager.css +2 -2
- package/dist/collection/components/crowdsource-manager/crowdsource-manager.js +40 -2
- package/dist/collection/components/edit-card/edit-card.css +8 -0
- package/dist/collection/components/info-card/info-card.css +14 -14
- package/dist/collection/components/info-card/info-card.js +1 -1
- package/dist/collection/components/layer-table/layer-table.css +12 -0
- package/dist/collection/components/layer-table/layer-table.js +90 -24
- package/dist/collection/components/pdf-download/pdf-download.js +34 -6
- package/dist/collection/components/public-notification/public-notification.js +3 -3
- package/dist/collection/utils/downloadUtils.js +208 -82
- package/dist/collection/utils/downloadUtils.ts +257 -85
- package/dist/collection/utils/test/downloadUtils.spec.js +163 -134
- package/dist/collection/utils/test/downloadUtils.spec.tsx +2 -0
- package/dist/components/calcite-modal.js +1 -409
- package/dist/components/card-manager2.js +2 -2
- package/dist/components/clean-url.js +567 -0
- package/dist/components/crowdsource-manager.js +16 -12
- package/dist/components/downloadUtils.js +295 -50
- package/dist/components/edit-card2.js +1 -1
- package/dist/components/info-card2.js +2 -2
- package/dist/components/layer-table2.js +65 -31
- package/dist/components/modal.js +416 -0
- package/dist/components/pdf-download2.js +6 -4
- package/dist/components/public-notification.js +3 -3
- package/dist/components/solution-configuration.js +25 -24
- package/dist/components/solution-store.js +2 -562
- package/dist/esm/{ExpandToggle-86761b28.js → ExpandToggle-e614e3e4.js} +1 -1
- package/dist/esm/{ar-4a5375c6.js → ar-2f678abc.js} +8 -8
- package/dist/esm/{bg-b25e4b7a.js → bg-e514c4d7.js} +8 -8
- package/dist/esm/{bs-2485dfed.js → bs-81584b09.js} +8 -8
- package/dist/esm/buffer-tools_4.entry.js +4 -4
- package/dist/esm/{ca-bba36d26.js → ca-e8c40e21.js} +8 -8
- package/dist/esm/calcite-accordion-item.entry.js +1 -1
- package/dist/esm/calcite-action-bar_3.entry.js +5 -5
- package/dist/esm/calcite-action-group_2.entry.js +3 -3
- package/dist/esm/calcite-action-pad.entry.js +4 -4
- package/dist/esm/calcite-action_2.entry.js +5 -5
- package/dist/esm/calcite-alert.entry.js +3 -3
- package/dist/esm/calcite-avatar.entry.js +1 -1
- package/dist/esm/calcite-block-section.entry.js +3 -3
- package/dist/esm/calcite-block.entry.js +3 -3
- package/dist/esm/calcite-button.entry.js +5 -5
- package/dist/esm/calcite-card.entry.js +3 -3
- package/dist/esm/calcite-checkbox.entry.js +3 -3
- package/dist/esm/calcite-chip-group.entry.js +1 -1
- package/dist/esm/calcite-chip.entry.js +3 -3
- package/dist/esm/calcite-color-picker-hex-input_2.entry.js +1 -1
- package/dist/esm/calcite-color-picker.entry.js +3 -3
- package/dist/esm/calcite-combobox-item-group.entry.js +2 -2
- package/dist/esm/calcite-combobox_6.entry.js +7 -7
- package/dist/esm/calcite-date-picker-day_3.entry.js +3 -3
- package/dist/esm/calcite-date-picker.entry.js +5 -5
- package/dist/esm/calcite-fab.entry.js +1 -1
- package/dist/esm/calcite-filter_3.entry.js +3 -3
- package/dist/esm/calcite-flow-item.entry.js +3 -3
- package/dist/esm/calcite-icon.entry.js +1 -1
- package/dist/esm/calcite-inline-editable.entry.js +4 -4
- package/dist/esm/calcite-input-date-picker.entry.js +9 -9
- package/dist/esm/calcite-input-number_2.entry.js +5 -5
- package/dist/esm/{calcite-input-time-picker-7da2e80a.js → calcite-input-time-picker-fe6e499a.js} +55 -55
- package/dist/esm/calcite-input-time-picker.entry.js +8 -8
- package/dist/esm/calcite-input-time-zone.entry.js +5 -5
- package/dist/esm/calcite-input_2.entry.js +5 -5
- package/dist/esm/calcite-label.entry.js +2 -2
- package/dist/esm/calcite-link.entry.js +1 -1
- package/dist/esm/calcite-menu-item.entry.js +3 -3
- package/dist/esm/calcite-menu.entry.js +3 -3
- package/dist/esm/calcite-modal.entry.js +4 -4
- package/dist/esm/calcite-navigation.entry.js +1 -1
- package/dist/esm/calcite-notice.entry.js +3 -3
- package/dist/esm/calcite-option_2.entry.js +3 -3
- package/dist/esm/calcite-pagination.entry.js +3 -3
- package/dist/esm/calcite-panel_2.entry.js +3 -3
- package/dist/esm/calcite-pick-list-group.entry.js +1 -1
- package/dist/esm/calcite-pick-list-item.entry.js +3 -3
- package/dist/esm/calcite-pick-list.entry.js +2 -2
- package/dist/esm/calcite-radio-button.entry.js +3 -3
- package/dist/esm/calcite-rating.entry.js +5 -5
- package/dist/esm/calcite-scrim.entry.js +3 -3
- package/dist/esm/calcite-segmented-control_2.entry.js +3 -3
- package/dist/esm/calcite-shell-center-row.entry.js +1 -1
- package/dist/esm/calcite-shell-panel_14.entry.js +7 -6
- package/dist/esm/calcite-sortable-list.entry.js +2 -2
- package/dist/esm/calcite-stepper-item.entry.js +2 -2
- package/dist/esm/calcite-stepper.entry.js +1 -1
- package/dist/esm/calcite-switch.entry.js +3 -3
- package/dist/esm/calcite-text-area.entry.js +5 -5
- package/dist/esm/calcite-tile.entry.js +1 -1
- package/dist/esm/calcite-time-picker.entry.js +4 -4
- package/dist/esm/calcite-tip-manager.entry.js +3 -3
- package/dist/esm/calcite-tip.entry.js +3 -3
- package/dist/esm/calcite-tooltip.entry.js +2 -2
- package/dist/esm/calcite-tree_3.entry.js +1 -1
- package/dist/esm/card-manager_3.entry.js +60 -28
- package/dist/esm/clean-url-bce022e6.js +567 -0
- package/dist/esm/crowdsource-manager.entry.js +5 -3
- package/dist/esm/{cs-1052c5ac.js → cs-af5f115e.js} +8 -8
- package/dist/esm/{da-b7ed9204.js → da-06d9e22c.js} +8 -8
- package/dist/esm/{date-bd5b879c.js → date-641ae749.js} +1 -1
- package/dist/esm/{de-at-a993e5ae.js → de-at-f55a700a.js} +8 -8
- package/dist/esm/{de-ch-acff745d.js → de-ch-7307675f.js} +8 -8
- package/dist/esm/{de-bb68e752.js → de-dc98363f.js} +8 -8
- package/dist/esm/{dom-37f2dec9.js → dom-2b326ec3.js} +1 -1
- package/dist/esm/{downloadUtils-42156cd8.js → downloadUtils-67c7a6c8.js} +296 -51
- package/dist/esm/edit-card_2.entry.js +3 -3
- package/dist/esm/{el-9de96ff0.js → el-91c64808.js} +8 -8
- package/dist/esm/{en-au-f68b6bde.js → en-au-df08cc25.js} +8 -8
- package/dist/esm/{en-ca-5360517e.js → en-ca-175f7c0f.js} +8 -8
- package/dist/esm/{en-gb-de0b3125.js → en-gb-90a08c7f.js} +8 -8
- package/dist/esm/{es-5ecbba77.js → es-5cb54b05.js} +8 -8
- package/dist/esm/{es-mx-aa126462.js → es-mx-3a0cb804.js} +8 -8
- package/dist/esm/{et-7113eeb8.js → et-eceac6dc.js} +8 -8
- package/dist/esm/{fi-ffa60f15.js → fi-26e1c14f.js} +8 -8
- package/dist/esm/{floating-ui-7cde67cf.js → floating-ui-9f8e4ed4.js} +1 -1
- package/dist/esm/{focusTrapComponent-ec344399.js → focusTrapComponent-ad2c3a31.js} +1 -1
- package/dist/esm/{form-24e6ef1d.js → form-0871d2c6.js} +1 -1
- package/dist/esm/{fr-681c5bf6.js → fr-12a5b0f7.js} +8 -8
- package/dist/esm/{fr-ch-9af1f8b1.js → fr-ch-e3406887.js} +8 -8
- package/dist/esm/{he-5188f277.js → he-61eba811.js} +8 -8
- package/dist/esm/{hi-6a31e3a4.js → hi-a50282b5.js} +8 -8
- package/dist/esm/{hr-0598e59d.js → hr-da8bffaf.js} +8 -8
- package/dist/esm/{hu-13cb9f41.js → hu-dab932f1.js} +8 -8
- package/dist/esm/{id-7f342499.js → id-de468947.js} +8 -8
- package/dist/esm/{index.es-f47c4153.js → index.es-59a67d3d.js} +2 -1
- package/dist/esm/{it-57d790f2.js → it-375d9936.js} +8 -8
- package/dist/esm/{it-ch-081af760.js → it-ch-7e663d63.js} +8 -8
- package/dist/esm/{ja-3affb68e.js → ja-36dbe39d.js} +8 -8
- package/dist/esm/{ko-736632aa.js → ko-858bc871.js} +8 -8
- package/dist/esm/{label-b6dfb4d5.js → label-b8caf984.js} +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{locale-146251f7.js → locale-00000ab4.js} +1 -1
- package/dist/esm/{lt-e7d9b1c3.js → lt-d6dfa7e4.js} +8 -8
- package/dist/esm/{lv-4d1a507e.js → lv-facd25c5.js} +8 -8
- package/dist/esm/map-select-tools_3.entry.js +8 -5
- package/dist/esm/{mk-f960312d.js → mk-5ed05b6a.js} +8 -8
- package/dist/esm/{nb-4556b5e9.js → nb-936fc687.js} +8 -8
- package/dist/esm/{nl-8e281c01.js → nl-a923d626.js} +8 -8
- package/dist/esm/{pl-1460fd5a.js → pl-b1426275.js} +8 -8
- package/dist/esm/{pt-660332b6.js → pt-1ac2453f.js} +8 -8
- package/dist/esm/{pt-br-dba48f49.js → pt-br-7194cc5f.js} +8 -8
- package/dist/esm/public-notification.entry.js +5 -4
- package/dist/esm/{ro-ac18f292.js → ro-518aaed1.js} +8 -8
- package/dist/esm/{ru-b914f6b7.js → ru-762127a3.js} +8 -8
- package/dist/esm/{shared-list-render-cc889757.js → shared-list-render-ec232615.js} +1 -1
- package/dist/esm/{sk-1be12963.js → sk-f367b7ba.js} +8 -8
- package/dist/esm/{sl-5d47e4e4.js → sl-052fd4d2.js} +8 -8
- package/dist/esm/solution-configuration.entry.js +25 -24
- package/dist/esm/solution-contents_3.entry.js +2 -1
- package/dist/esm/{solution-store-cf902566.js → solution-store-b29d50f7.js} +2 -562
- package/dist/esm/solutions-components.js +1 -1
- package/dist/esm/{sortableComponent-8a84709a.js → sortableComponent-ebd6bb72.js} +1 -1
- package/dist/esm/{sr-3281c92d.js → sr-4dc0fdb9.js} +8 -8
- package/dist/esm/{sv-e5169404.js → sv-bdc87a4d.js} +8 -8
- package/dist/esm/{t9n-d9c203e4.js → t9n-9791aa0c.js} +1 -1
- package/dist/esm/{th-937796b8.js → th-d9df674c.js} +8 -8
- package/dist/esm/{time-fa1151aa.js → time-73378c4a.js} +1 -1
- package/dist/esm/{tr-6d3b100b.js → tr-61e134eb.js} +8 -8
- package/dist/esm/{uk-a6edcacf.js → uk-ea3d8da7.js} +8 -8
- package/dist/esm/{utils-667cc396.js → utils-593fafd7.js} +1 -1
- package/dist/esm/{utils-24a35b5a.js → utils-bd52db7d.js} +2 -2
- package/dist/esm/{vi-bf4c179c.js → vi-ade1c25b.js} +8 -8
- package/dist/esm/{zh-cn-de1858cb.js → zh-cn-b8756118.js} +8 -8
- package/dist/esm/{zh-hk-12fa404f.js → zh-hk-d18c05d9.js} +8 -8
- package/dist/esm/{zh-tw-5c4220e5.js → zh-tw-9c98ff7c.js} +8 -8
- package/dist/solutions-components/{p-3b891cc4.entry.js → p-01fea8d5.entry.js} +1 -1
- package/dist/solutions-components/{p-d793ec96.entry.js → p-0219a1a9.entry.js} +5 -5
- package/dist/solutions-components/{p-65022e7f.entry.js → p-02ff64f4.entry.js} +1 -1
- package/dist/solutions-components/p-062254a6.entry.js +6 -0
- package/dist/solutions-components/{p-bff158ff.js → p-062d2f9a.js} +1 -1
- package/dist/solutions-components/{p-f4e5b7e5.entry.js → p-084bced1.entry.js} +1 -1
- package/dist/solutions-components/{p-c261335b.entry.js → p-088e4cfc.entry.js} +1 -1
- package/dist/solutions-components/{p-96239d0d.js → p-08e35485.js} +1 -1
- package/dist/solutions-components/{p-3d3772fb.js → p-0d14d33a.js} +1 -1
- package/dist/solutions-components/{p-7f271c31.js → p-11550b3c.js} +3 -3
- package/dist/solutions-components/{p-ad19f9b0.entry.js → p-120c4098.entry.js} +1 -1
- package/dist/solutions-components/{p-45419d93.entry.js → p-12bcd474.entry.js} +1 -1
- package/dist/solutions-components/{p-bd82849c.entry.js → p-1597ec4b.entry.js} +1 -1
- package/dist/solutions-components/{p-afb35c95.js → p-17d176b5.js} +14 -43
- package/dist/solutions-components/{p-0503c78d.js → p-1b41181b.js} +44 -29
- package/dist/solutions-components/{p-127c3866.js → p-1c5787b1.js} +1 -1
- package/dist/solutions-components/{p-b97886b3.entry.js → p-1d9a5198.entry.js} +1 -1
- package/dist/solutions-components/{p-8e3e1ce8.entry.js → p-1dd5c4e6.entry.js} +1 -1
- package/dist/solutions-components/{p-97b69f54.entry.js → p-1e62d118.entry.js} +1 -1
- package/dist/solutions-components/{p-537c34a4.entry.js → p-1fae3819.entry.js} +1 -1
- package/dist/solutions-components/{p-82f0b25b.js → p-21aa112d.js} +1 -1
- package/dist/solutions-components/{p-f8944f59.entry.js → p-252a9a7f.entry.js} +1 -1
- package/dist/solutions-components/{p-80ea5869.js → p-26b28806.js} +1 -1
- package/dist/solutions-components/{p-dac10448.js → p-280fd963.js} +3 -3
- package/dist/solutions-components/{p-79d7f324.js → p-29049359.js} +1 -1
- package/dist/solutions-components/{p-c033b8ec.entry.js → p-2b378389.entry.js} +1 -1
- package/dist/solutions-components/{p-19ec0463.js → p-2bdd1a5d.js} +1 -1
- package/dist/solutions-components/{p-cacfa6ae.js → p-2ee21e9d.js} +1 -1
- package/dist/solutions-components/{p-300f4299.js → p-2f42ae51.js} +1 -1
- package/dist/solutions-components/{p-418be467.js → p-30b3261c.js} +1 -1
- package/dist/solutions-components/{p-4d91443a.entry.js → p-32ba2223.entry.js} +1 -1
- package/dist/solutions-components/{p-702c6093.js → p-34673137.js} +1 -1
- package/dist/solutions-components/{p-61af54b9.entry.js → p-3566ee69.entry.js} +1 -1
- package/dist/solutions-components/{p-90a9126f.js → p-358b9cc8.js} +1 -1
- package/dist/solutions-components/p-3a6c8fc3.entry.js +6 -0
- package/dist/solutions-components/p-3a8d82a2.js +11 -0
- package/dist/solutions-components/{p-628c170b.entry.js → p-3ab94526.entry.js} +1 -1
- package/dist/solutions-components/p-3b1fc7a2.entry.js +6 -0
- package/dist/solutions-components/{p-b1daad7e.js → p-3f7119c1.js} +1 -1
- package/dist/solutions-components/{p-f0f5ecb2.js → p-3fcd035e.js} +1 -1
- package/dist/solutions-components/{p-3766be72.js → p-419c9d89.js} +1 -1
- package/dist/solutions-components/p-453d1b31.entry.js +6 -0
- package/dist/solutions-components/{p-337f6adf.js → p-46918548.js} +1 -1
- package/dist/solutions-components/p-49e9e4e3.js +12 -0
- package/dist/solutions-components/p-4d942b0f.entry.js +36 -0
- package/dist/solutions-components/{p-85e0d2a3.js → p-4fc92419.js} +1 -1
- package/dist/solutions-components/{p-0d08a75d.entry.js → p-52afbe07.entry.js} +1 -1
- package/dist/solutions-components/{p-9391bb74.js → p-573d0763.js} +1 -1
- package/dist/solutions-components/{p-87971116.entry.js → p-59ef9461.entry.js} +1 -1
- package/dist/solutions-components/{p-25718b9f.entry.js → p-5e5749c0.entry.js} +1 -1
- package/dist/solutions-components/{p-54064b61.entry.js → p-5ff22d2e.entry.js} +1 -1
- package/dist/solutions-components/{p-4bd793ef.entry.js → p-617f32a0.entry.js} +1 -1
- package/dist/solutions-components/{p-747a1293.js → p-6510c06c.js} +1 -1
- package/dist/solutions-components/{p-1f69762c.js → p-65ba4d10.js} +1 -1
- package/dist/solutions-components/{p-4cb7cdb7.entry.js → p-65ffe4b0.entry.js} +1 -1
- package/dist/solutions-components/{p-1b4d6511.js → p-68007503.js} +1 -1
- package/dist/solutions-components/{p-e849d2ba.entry.js → p-6ba8483c.entry.js} +2 -2
- package/dist/solutions-components/{p-9961a2f9.entry.js → p-6c8c7b98.entry.js} +2 -2
- package/dist/solutions-components/{p-ff863f3d.entry.js → p-6e5d9ae9.entry.js} +1 -1
- package/dist/solutions-components/{p-b6a1c34f.entry.js → p-6ebf870c.entry.js} +1 -1
- package/dist/solutions-components/{p-d2d3e4b5.js → p-72f34a0a.js} +1 -1
- package/dist/solutions-components/{p-981fc8e4.entry.js → p-7359a6ac.entry.js} +1 -1
- package/dist/solutions-components/{p-9791fbf1.entry.js → p-73ab9d9a.entry.js} +1 -1
- package/dist/solutions-components/{p-9abb1c4c.entry.js → p-73fe6f7e.entry.js} +1 -1
- package/dist/solutions-components/{p-62e3adbb.js → p-7452d79a.js} +1 -1
- package/dist/solutions-components/{p-34169501.js → p-76c2c379.js} +1 -1
- package/dist/solutions-components/{p-941721ba.js → p-788aa5d7.js} +1 -1
- package/dist/solutions-components/{p-557d4cc5.js → p-79cc0531.js} +2 -2
- package/dist/solutions-components/{p-a19d8147.js → p-7a0fa011.js} +1 -1
- package/dist/solutions-components/{p-019fe9fe.entry.js → p-7a55cee6.entry.js} +3 -3
- package/dist/solutions-components/{p-48329056.entry.js → p-7bc63171.entry.js} +1 -1
- package/dist/solutions-components/{p-e7304151.entry.js → p-81664d83.entry.js} +1 -1
- package/dist/solutions-components/{p-9504c1b7.js → p-8354f486.js} +1 -1
- package/dist/solutions-components/{p-f812e3ee.entry.js → p-84dff306.entry.js} +1 -1
- package/dist/solutions-components/{p-a59dba2f.js → p-8594fe6b.js} +1 -1
- package/dist/solutions-components/{p-ae3ec77d.js → p-8b2d396e.js} +1 -1
- package/dist/solutions-components/{p-38cc8a4d.js → p-8ec6ea34.js} +1 -1
- package/dist/solutions-components/{p-da760d1d.entry.js → p-8ee00658.entry.js} +1 -1
- package/dist/solutions-components/{p-38211628.js → p-905fcf73.js} +1 -1
- package/dist/solutions-components/{p-e502ccce.entry.js → p-929909bc.entry.js} +1 -1
- package/dist/solutions-components/{p-dd5f68f2.js → p-948b5722.js} +1 -1
- package/dist/solutions-components/{p-39fe9a4c.js → p-956f3207.js} +1 -1
- package/dist/solutions-components/{p-f7aa542c.js → p-96287d23.js} +1 -1
- package/dist/solutions-components/{p-68630513.entry.js → p-964c0e7d.entry.js} +1 -1
- package/dist/solutions-components/{p-b09d8c0e.entry.js → p-98051370.entry.js} +1 -1
- package/dist/solutions-components/p-9a8c51bf.entry.js +6 -0
- package/dist/solutions-components/{p-efd70bf7.entry.js → p-9a94f48c.entry.js} +2 -2
- package/dist/solutions-components/{p-318790b8.js → p-9b94501c.js} +1 -1
- package/dist/solutions-components/{p-69e26726.js → p-9d4467a3.js} +1 -1
- package/dist/solutions-components/{p-f6cf9943.js → p-9e3c9cd2.js} +1 -1
- package/dist/solutions-components/{p-30542275.js → p-9fd59203.js} +1 -1
- package/dist/solutions-components/{p-d902b790.js → p-a201bffc.js} +1 -1
- package/dist/solutions-components/{p-1552c479.entry.js → p-a3729795.entry.js} +1 -1
- package/dist/solutions-components/{p-ae4ad673.entry.js → p-a47ed290.entry.js} +2 -2
- package/dist/solutions-components/{p-ca5be55f.entry.js → p-a5ef322f.entry.js} +2 -2
- package/dist/solutions-components/p-a776b7e6.entry.js +6 -0
- package/dist/solutions-components/{p-3658ebd8.entry.js → p-a97e8d6a.entry.js} +1 -1
- package/dist/solutions-components/{p-2937523d.js → p-aaea9203.js} +1 -1
- package/dist/solutions-components/{p-b7093e6d.entry.js → p-ad1d56b1.entry.js} +1 -1
- package/dist/solutions-components/{p-0ca528ec.js → p-adeb0e8f.js} +1 -1
- package/dist/solutions-components/{p-31d2a105.entry.js → p-af63959a.entry.js} +1 -1
- package/dist/solutions-components/{p-fbd71543.entry.js → p-b1125581.entry.js} +2 -2
- package/dist/solutions-components/{p-b029c6d8.js → p-b20a31c8.js} +1 -1
- package/dist/solutions-components/{p-71400268.js → p-b81131b3.js} +1 -1
- package/dist/solutions-components/p-b892e595.entry.js +6 -0
- package/dist/solutions-components/{p-cc624b0c.entry.js → p-b89c5865.entry.js} +1 -1
- package/dist/solutions-components/{p-245d667e.js → p-b9b52743.js} +1 -1
- package/dist/solutions-components/{p-0870f436.entry.js → p-ba99e562.entry.js} +1 -1
- package/dist/solutions-components/{p-2d614afc.js → p-bc548c06.js} +1 -1
- package/dist/solutions-components/{p-29b2f046.js → p-bccbdeb5.js} +1 -1
- package/dist/solutions-components/{p-f72e0965.entry.js → p-bd318e33.entry.js} +1 -1
- package/dist/solutions-components/{p-74aa84f6.js → p-bd766e49.js} +1 -1
- package/dist/solutions-components/{p-1a47516a.entry.js → p-be36d5ed.entry.js} +1 -1
- package/dist/solutions-components/{p-9b75102b.entry.js → p-c073d2d6.entry.js} +1 -1
- package/dist/solutions-components/{p-712ea336.entry.js → p-c644edf5.entry.js} +1 -1
- package/dist/solutions-components/p-c6b7e7ff.js +11 -0
- package/dist/solutions-components/{p-dc80cb69.entry.js → p-ca0b3a2b.entry.js} +1 -1
- package/dist/solutions-components/{p-3e9fc0aa.entry.js → p-cfd88a2f.entry.js} +1 -1
- package/dist/solutions-components/{p-e9fcf408.js → p-d5228aed.js} +1 -1
- package/dist/solutions-components/{p-80b87453.js → p-d98caa4c.js} +1 -1
- package/dist/solutions-components/{p-45b829b5.js → p-dd9c065e.js} +1 -1
- package/dist/solutions-components/{p-05b2bdf9.js → p-dedc167c.js} +1 -1
- package/dist/solutions-components/{p-a16feeec.js → p-e4f9b782.js} +1 -1
- package/dist/solutions-components/{p-ac1bd870.entry.js → p-e572a692.entry.js} +1 -1
- package/dist/solutions-components/{p-74521615.entry.js → p-e5dda947.entry.js} +1 -1
- package/dist/solutions-components/{p-bbfc2724.js → p-e7fbf2fe.js} +1 -1
- package/dist/solutions-components/{p-dda325a4.entry.js → p-e9ba0c7f.entry.js} +1 -1
- package/dist/solutions-components/{p-75e707d1.js → p-eb60ec2a.js} +1 -1
- package/dist/solutions-components/p-ecc95259.js +20 -0
- package/dist/solutions-components/{p-85791b16.entry.js → p-ee144348.entry.js} +1 -1
- package/dist/solutions-components/{p-4b4559f9.js → p-f03bed0c.js} +1 -1
- package/dist/solutions-components/{p-7a11983d.js → p-f5028a8e.js} +1 -1
- package/dist/solutions-components/{p-fb23ba4a.entry.js → p-f50cf603.entry.js} +1 -1
- package/dist/solutions-components/{p-f7b520ae.js → p-f7d8b6b3.js} +1 -1
- package/dist/solutions-components/{p-89cbb86a.js → p-f9166fcb.js} +3 -3
- package/dist/solutions-components/{p-792fcd62.entry.js → p-fb0f2016.entry.js} +1 -1
- package/dist/solutions-components/solutions-components.esm.js +1 -1
- package/dist/solutions-components/utils/downloadUtils.ts +257 -85
- package/dist/solutions-components/utils/test/downloadUtils.spec.tsx +2 -0
- package/dist/types/components/crowdsource-manager/crowdsource-manager.d.ts +8 -0
- package/dist/types/components/layer-table/layer-table.d.ts +42 -26
- package/dist/types/components/pdf-download/pdf-download.d.ts +4 -2
- package/dist/types/components.d.ts +36 -2
- package/dist/types/utils/downloadUtils.d.ts +34 -16
- package/package.json +8 -9
- package/dist/solutions-components/p-06712292.js +0 -11
- package/dist/solutions-components/p-0a0c3764.js +0 -11
- package/dist/solutions-components/p-12a7c2db.entry.js +0 -6
- package/dist/solutions-components/p-3a7cd2b0.entry.js +0 -37
- package/dist/solutions-components/p-8e9d9e6a.js +0 -12
- package/dist/solutions-components/p-97088307.entry.js +0 -6
- package/dist/solutions-components/p-a16e6f5f.entry.js +0 -6
- package/dist/solutions-components/p-d118a76e.entry.js +0 -6
- package/dist/solutions-components/p-d54c2dfd.entry.js +0 -6
- package/dist/solutions-components/p-d7d466e8.entry.js +0 -6
- package/dist/solutions-components/p-ffbe89cf.entry.js +0 -6
@@ -74,6 +74,14 @@ export namespace Components {
|
|
74
74
|
* boolean: when true the grid will display like the previous manager app with the table across the top
|
75
75
|
*/
|
76
76
|
"classicGrid": boolean;
|
77
|
+
/**
|
78
|
+
* boolean: when true the layer table will auto refresh the data
|
79
|
+
*/
|
80
|
+
"enableAutoRefresh": boolean;
|
81
|
+
/**
|
82
|
+
* boolean: when true edits can be applied directly within the table
|
83
|
+
*/
|
84
|
+
"enableInlineEdit": boolean;
|
77
85
|
/**
|
78
86
|
* boolean: when true no map is displayed for the app
|
79
87
|
*/
|
@@ -179,6 +187,14 @@ export namespace Components {
|
|
179
187
|
"value": any;
|
180
188
|
}
|
181
189
|
interface LayerTable {
|
190
|
+
/**
|
191
|
+
* boolean: when true the layer table will auto refresh the data
|
192
|
+
*/
|
193
|
+
"enableAutoRefresh": boolean;
|
194
|
+
/**
|
195
|
+
* boolean: when true edits can be applied directly within the table
|
196
|
+
*/
|
197
|
+
"enableInlineEdit": boolean;
|
182
198
|
/**
|
183
199
|
* Get the selected graphics
|
184
200
|
* @returns Promise that resolves when the operation is complete
|
@@ -468,21 +484,23 @@ export namespace Components {
|
|
468
484
|
"disabled": boolean;
|
469
485
|
/**
|
470
486
|
* Downloads csv of mailing labels for the provided list of ids
|
487
|
+
* @param webmap Webmap containing layer
|
471
488
|
* @param exportInfos Information about items to be exported
|
472
489
|
* @param removeDuplicates When true a single label is generated when multiple featues have a shared address value
|
473
490
|
* @param addColumnTitle Indicates if column headings should be included in output
|
474
491
|
* @returns Promise resolving when function is done
|
475
492
|
*/
|
476
|
-
"downloadCSV": (exportInfos: IExportInfos, removeDuplicates: boolean, addColumnTitle?: boolean) => Promise<void>;
|
493
|
+
"downloadCSV": (webmap: __esri.Map, exportInfos: IExportInfos, removeDuplicates: boolean, addColumnTitle?: boolean) => Promise<void>;
|
477
494
|
/**
|
478
495
|
* Downloads pdf of mailing labels for the provided list of ids
|
496
|
+
* @param webmap Webmap containing layer
|
479
497
|
* @param exportInfos Information about items to be exported
|
480
498
|
* @param removeDuplicates When true a single label is generated when multiple featues have a shared address value
|
481
499
|
* @param title Title for each page
|
482
500
|
* @param initialImageDataUrl Data URL of image for first page
|
483
501
|
* @returns Promise resolving when function is done
|
484
502
|
*/
|
485
|
-
"downloadPDF": (exportInfos: IExportInfos, removeDuplicates?: boolean, title?: string, initialImageDataUrl?: string) => Promise<void>;
|
503
|
+
"downloadPDF": (webmap: __esri.Map, exportInfos: IExportInfos, removeDuplicates?: boolean, title?: string, initialImageDataUrl?: string) => Promise<void>;
|
486
504
|
}
|
487
505
|
interface PublicNotification {
|
488
506
|
/**
|
@@ -1167,6 +1185,14 @@ declare namespace LocalJSX {
|
|
1167
1185
|
* boolean: when true the grid will display like the previous manager app with the table across the top
|
1168
1186
|
*/
|
1169
1187
|
"classicGrid"?: boolean;
|
1188
|
+
/**
|
1189
|
+
* boolean: when true the layer table will auto refresh the data
|
1190
|
+
*/
|
1191
|
+
"enableAutoRefresh"?: boolean;
|
1192
|
+
/**
|
1193
|
+
* boolean: when true edits can be applied directly within the table
|
1194
|
+
*/
|
1195
|
+
"enableInlineEdit"?: boolean;
|
1170
1196
|
/**
|
1171
1197
|
* boolean: when true no map is displayed for the app
|
1172
1198
|
*/
|
@@ -1259,6 +1285,14 @@ declare namespace LocalJSX {
|
|
1259
1285
|
"value"?: any;
|
1260
1286
|
}
|
1261
1287
|
interface LayerTable {
|
1288
|
+
/**
|
1289
|
+
* boolean: when true the layer table will auto refresh the data
|
1290
|
+
*/
|
1291
|
+
"enableAutoRefresh"?: boolean;
|
1292
|
+
/**
|
1293
|
+
* boolean: when true edits can be applied directly within the table
|
1294
|
+
*/
|
1295
|
+
"enableInlineEdit"?: boolean;
|
1262
1296
|
/**
|
1263
1297
|
* IMapInfo: key configuration details about the current map
|
1264
1298
|
*/
|
@@ -33,6 +33,12 @@ export interface ILabelFormat {
|
|
33
33
|
type: "pattern" | "executor" | "unsupported";
|
34
34
|
format: string | __esri.ArcadeExecutor | undefined;
|
35
35
|
}
|
36
|
+
export interface ILabelFormatProps {
|
37
|
+
layer: __esri.FeatureLayer;
|
38
|
+
attributeFormats: IAttributeFormats;
|
39
|
+
relationshipId: number | undefined;
|
40
|
+
labelFormat: ILabelFormat;
|
41
|
+
}
|
36
42
|
export interface ILayerRelationshipQuery {
|
37
43
|
layer: __esri.FeatureLayer;
|
38
44
|
relatedQuery: IRelatedFeaturesQuery;
|
@@ -46,19 +52,30 @@ interface IRelatedFeaturesQuery {
|
|
46
52
|
returnGeometry: boolean;
|
47
53
|
objectIds?: number;
|
48
54
|
}
|
55
|
+
import { IQueryRelatedResponse } from "@esri/arcgis-rest-feature-layer";
|
56
|
+
/**
|
57
|
+
* Get the related records for a feature service.
|
58
|
+
*
|
59
|
+
* @param url Feature service's URL, e.g., layer.url
|
60
|
+
* @param relationshipId Id of relationship
|
61
|
+
* @param objectIds Objects in the feature service whose related records are sought
|
62
|
+
*/
|
63
|
+
export declare function getFeatureServiceRelatedRecords(url: string, relationshipId?: number, objectIds?: number[]): Promise<IQueryRelatedResponse>;
|
49
64
|
/**
|
50
65
|
* Create and consolidate labels from all layers
|
51
66
|
*
|
67
|
+
* @param webmap Webmap containing layer
|
52
68
|
* @param exportInfos Key details about what to export (ids, layer, and selectionSetNames)
|
53
69
|
* @param formatUsingLayerPopup When true, the layer's popup is used to choose attributes for each column; when false,
|
54
70
|
* all attributes are exported
|
55
71
|
* @param includeHeaderNames Add the label format at the front of the list of generated labels
|
56
72
|
* @returns selectionSetNames that will be used for export filenames
|
57
73
|
*/
|
58
|
-
export declare function consolidateLabels(exportInfos: IExportInfos, formatUsingLayerPopup?: boolean, includeHeaderNames?: boolean, isCSVExport?: boolean): Promise<string[][]>;
|
74
|
+
export declare function consolidateLabels(webmap: __esri.Map, exportInfos: IExportInfos, formatUsingLayerPopup?: boolean, includeHeaderNames?: boolean, isCSVExport?: boolean): Promise<string[][]>;
|
59
75
|
/**
|
60
76
|
* Downloads csv of mailing labels for the provided list of ids
|
61
77
|
*
|
78
|
+
* @param webmap Webmap containing layer
|
62
79
|
* @param exportInfos Key details about what to export (ids, layer, and selectionSetNames)
|
63
80
|
* @param formatUsingLayerPopup When true, the layer's popup is used to choose attributes for each column; when false,
|
64
81
|
* all attributes are exported
|
@@ -66,10 +83,11 @@ export declare function consolidateLabels(exportInfos: IExportInfos, formatUsing
|
|
66
83
|
* @param addColumnTitle Indicates if column headings should be included in output
|
67
84
|
* @returns Promise resolving when function is done
|
68
85
|
*/
|
69
|
-
export declare function downloadCSV(exportInfos: IExportInfos, formatUsingLayerPopup: boolean, removeDuplicates?: boolean, addColumnTitle?: boolean): Promise<void>;
|
86
|
+
export declare function downloadCSV(webmap: __esri.Map, exportInfos: IExportInfos, formatUsingLayerPopup: boolean, removeDuplicates?: boolean, addColumnTitle?: boolean): Promise<void>;
|
70
87
|
/**
|
71
88
|
* Downloads csv of mailing labels for the provided list of ids
|
72
89
|
*
|
90
|
+
* @param webmap Webmap containing layer
|
73
91
|
* @param exportInfos Key details about what to export (ids, layer, and selectionSetNames)
|
74
92
|
* @param labelPageDescription Provides PDF page layout info
|
75
93
|
* @param removeDuplicates When true a single label is generated when multiple featues have a shared address value
|
@@ -77,7 +95,7 @@ export declare function downloadCSV(exportInfos: IExportInfos, formatUsingLayerP
|
|
77
95
|
* @param initialImageDataUrl Data URL of image for first page
|
78
96
|
* @returns Promise resolving when function is done
|
79
97
|
*/
|
80
|
-
export declare function downloadPDF(exportInfos: IExportInfos, labelPageDescription: ILabel, removeDuplicates?: boolean, title?: string, initialImageDataUrl?: string): Promise<void>;
|
98
|
+
export declare function downloadPDF(webmap: __esri.Map, exportInfos: IExportInfos, labelPageDescription: ILabel, removeDuplicates?: boolean, title?: string, initialImageDataUrl?: string): Promise<void>;
|
81
99
|
/**
|
82
100
|
* Remove any duplicate labels
|
83
101
|
*
|
@@ -118,6 +136,14 @@ export declare function _convertPopupTextToLabelSpec(popupInfo: string): ILabelF
|
|
118
136
|
* @return Promise resolving to an "executor" label spec
|
119
137
|
*/
|
120
138
|
export declare function _convertPopupArcadeToLabelSpec(expressionInfo: __esri.ElementExpressionInfo): Promise<ILabelFormat>;
|
139
|
+
/**
|
140
|
+
* Extracts Arcade expressions from the lines of a label format and creates an Arcade executor for each
|
141
|
+
* referenced expression name.
|
142
|
+
*
|
143
|
+
* @param labelFormat Label to examine
|
144
|
+
* @param layer Layer from which to fetch features
|
145
|
+
* @return Promise resolving to a set of executors keyed using the expression name
|
146
|
+
*/
|
121
147
|
/**
|
122
148
|
* Creates a title from a list of selection set names.
|
123
149
|
*
|
@@ -126,14 +152,6 @@ export declare function _convertPopupArcadeToLabelSpec(expressionInfo: __esri.El
|
|
126
152
|
* selection set names supplied, "download" is returned
|
127
153
|
*/
|
128
154
|
export declare function _createFilename(selectionSetNames: string[]): string;
|
129
|
-
/**
|
130
|
-
* Creates relationship queries for each relationship flag in a popup.
|
131
|
-
* @param layer Layer whose popup is to be examined
|
132
|
-
* @return Hash of relationships by their id, or null if there are no relationship flags in the
|
133
|
-
* popup; each relationship has the properties layer and relatedQuery for the related layer
|
134
|
-
* and the query for that layer
|
135
|
-
*/
|
136
|
-
export declare function _createRelationshipQueries(layer: __esri.FeatureLayer): ILayerRelationshipQueryHash;
|
137
155
|
/**
|
138
156
|
* Extracts Arcade expression references from the lines of a label format.
|
139
157
|
*
|
@@ -158,15 +176,14 @@ export declare function _getFieldNamesFromFieldExpressions(fieldExpressions: str
|
|
158
176
|
/**
|
159
177
|
* Extracts the label format from the layer.
|
160
178
|
*
|
179
|
+
* @param webmap Webmap containing layer
|
161
180
|
* @param layer Layer with label format
|
162
181
|
* @param formatUsingLayerPopup When true, the layer's popup is used to choose attributes for each column; when false,
|
163
182
|
* all attributes are exported
|
164
|
-
* @param attributeFormats Empty object to hold the formats for each attribute in a feature; the object is filled
|
165
|
-
* with formats by this function
|
166
183
|
* @returns A Promise resolving to the format of a single label with fields coerced to lowercase, e.g.,
|
167
|
-
* for
|
184
|
+
* for ILabelFormatProps type "pattern": "{name}|{street}|{city}, {state} {zip}"
|
168
185
|
*/
|
169
|
-
export declare function _getLabelFormat(layer: __esri.FeatureLayer, formatUsingLayerPopup: boolean
|
186
|
+
export declare function _getLabelFormat(webmap: __esri.Map, layer: __esri.FeatureLayer, formatUsingLayerPopup: boolean): Promise<ILabelFormatProps>;
|
170
187
|
/**
|
171
188
|
* Extract selectionSetNames from the provided exportInfos
|
172
189
|
*
|
@@ -188,6 +205,7 @@ export declare function _prepareAttributeValue(attributeValue: any, attributeTyp
|
|
188
205
|
/**
|
189
206
|
* Creates labels from items.
|
190
207
|
*
|
208
|
+
* @param webmap Webmap containing layer
|
191
209
|
* @param layer Layer from which to fetch features
|
192
210
|
* @param ids List of ids to download
|
193
211
|
* @param formatUsingLayerPopup When true, the layer's popup is used to choose attributes for each column; when false,
|
@@ -195,7 +213,7 @@ export declare function _prepareAttributeValue(attributeValue: any, attributeTyp
|
|
195
213
|
* @param includeHeaderNames Add the label format at the front of the list of generated labels
|
196
214
|
* @returns Promise resolving when function is done
|
197
215
|
*/
|
198
|
-
export declare function _prepareLabels(layer: __esri.FeatureLayer, ids: number[], formatUsingLayerPopup?: boolean, includeHeaderNames?: boolean): Promise<string[][]>;
|
216
|
+
export declare function _prepareLabels(webmap: __esri.Map, layer: __esri.FeatureLayer, ids: number[], formatUsingLayerPopup?: boolean, includeHeaderNames?: boolean): Promise<string[][]>;
|
199
217
|
/**
|
200
218
|
* Creates labels from all attributes in items.
|
201
219
|
*
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@esri/solutions-components",
|
3
|
-
"version": "0.6.
|
3
|
+
"version": "0.6.13",
|
4
4
|
"description": "Web Components for Esri's Solutions Applications",
|
5
5
|
"main": "dist/index.cjs.js",
|
6
6
|
"module": "dist/index.js",
|
@@ -69,10 +69,17 @@
|
|
69
69
|
"typescript": "^4.8.4"
|
70
70
|
},
|
71
71
|
"dependencies": {
|
72
|
+
"@esri/arcgis-rest-auth": "^3.4.2",
|
73
|
+
"@esri/arcgis-rest-feature-layer": "^3.4.2",
|
74
|
+
"@esri/arcgis-rest-portal": "^3.4.2",
|
75
|
+
"@esri/arcgis-rest-request": "^3.4.2",
|
76
|
+
"@esri/arcgis-rest-service-admin": "^3.4.2",
|
77
|
+
"@esri/calcite-components": "^1.6.0",
|
72
78
|
"@esri/hub-common": "^12.37.1",
|
73
79
|
"@esri/hub-initiatives": "^12.4.1",
|
74
80
|
"@esri/hub-sites": "^12.6.0",
|
75
81
|
"@esri/hub-teams": "^12.4.1",
|
82
|
+
"@esri/solution-common": "^5.0.7",
|
76
83
|
"@pdf-lib/fontkit": "^1.1.1",
|
77
84
|
"@stencil/core": "^4.0.5",
|
78
85
|
"focus-trap": "7.2.0",
|
@@ -80,14 +87,6 @@
|
|
80
87
|
"minimist": "^1.2.6",
|
81
88
|
"pdf-lib": "^1.17.1"
|
82
89
|
},
|
83
|
-
"peerDependencies": {
|
84
|
-
"@esri/arcgis-rest-auth": "^3.4.2",
|
85
|
-
"@esri/arcgis-rest-feature-layer": "^3.4.2",
|
86
|
-
"@esri/arcgis-rest-portal": "^3.4.2",
|
87
|
-
"@esri/arcgis-rest-request": "^3.4.2",
|
88
|
-
"@esri/arcgis-rest-service-admin": "^3.4.2",
|
89
|
-
"@esri/calcite-components": "^1.6.0"
|
90
|
-
},
|
91
90
|
"repository": {
|
92
91
|
"type": "git",
|
93
92
|
"url": "git+https://github.com/Esri/solutions-components.git"
|
@@ -1,11 +0,0 @@
|
|
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,c as i,h as e,H as s,g as n}from"./p-33613993.js";import{s as r,c as a,d as o,H as h}from"./p-8e9d9e6a.js";import{g as u}from"./p-8b448a5b.js";import{c,d,u as f}from"./p-ad75b9bb.js";import{n as m}from"./p-43ba7a04.js";import{c as l,d as p,g as v}from"./p-d2d3e4b5.js";import{c as M,s as b,a as g}from"./p-d74e95e5.js";import{n as y,g as D,c as Y,d as S}from"./p-7f271c31.js";import{d as j,a as w,c as k}from"./p-80ea5869.js";import{l as L,t as H,f as A,i as T}from"./p-96239d0d.js";import{c as _,s as C,d as $}from"./p-557d4cc5.js";
|
7
|
-
/*!
|
8
|
-
* All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
9
|
-
* See https://github.com/Esri/calcite-design-system/blob/main/LICENSE.md for details.
|
10
|
-
* v1.6.1
|
11
|
-
*/var O=6e4,W=36e5,z="millisecond",F="second",I="minute",Z="hour",x="day",P="week",E="month",N="quarter",R="year",J="date",U="YYYY-MM-DDTHH:mm:ssZ",X="Invalid Date",q=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,B=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g;const G={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(t){var i=["th","st","nd","rd"],e=t%100;return"["+t+(i[(e-20)%10]||i[e]||i[0])+"]"}},K=Object.freeze({__proto__:null,default:G});var Q=function(t,i,e){var s=String(t);return!s||s.length>=i?t:""+Array(i+1-s.length).join(e)+t};const V={s:Q,z:function(t){var i=-t.utcOffset(),e=Math.abs(i),s=Math.floor(e/60),n=e%60;return(i<=0?"+":"-")+Q(s,2,"0")+":"+Q(n,2,"0")},m:function t(i,e){if(i.date()<e.date())return-t(e,i);var s=12*(e.year()-i.year())+(e.month()-i.month()),n=i.clone().add(s,E),r=e-n<0,a=i.clone().add(s+(r?-1:1),E);return+(-(s+(e-n)/(r?n-a:a-n))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(t){return{M:E,y:R,w:P,d:x,D:J,h:Z,m:I,s:F,ms:z,Q:N}[t]||String(t||"").toLowerCase().replace(/s$/,"")},u:function(t){return void 0===t}};var tt="en",it={};it[tt]=G;var et=function(t){return t instanceof at},st=function t(i,e,s){var n;if(!i)return tt;if("string"==typeof i){var r=i.toLowerCase();it[r]&&(n=r),e&&(it[r]=e,n=r);var a=i.split("-");if(!n&&a.length>1)return t(a[0])}else{var o=i.name;it[o]=i,n=o}return!s&&n&&(tt=n),n||!s&&tt},nt=function(t,i){if(et(t))return t.clone();var e="object"==typeof i?i:{};return e.date=t,e.args=arguments,new at(e)},rt=V;rt.l=st,rt.i=et,rt.w=function(t,i){return nt(t,{locale:i.$L,utc:i.$u,x:i.$x,$offset:i.$offset})};var at=function(){function t(t){this.$L=st(t.locale,null,!0),this.parse(t)}var i=t.prototype;return i.parse=function(t){this.$d=function(t){var i=t.date,e=t.utc;if(null===i)return new Date(NaN);if(rt.u(i))return new Date;if(i instanceof Date)return new Date(i);if("string"==typeof i&&!/Z$/i.test(i)){var s=i.match(q);if(s){var n=s[2]-1||0,r=(s[7]||"0").substring(0,3);return e?new Date(Date.UTC(s[1],n,s[3]||1,s[4]||0,s[5]||0,s[6]||0,r)):new Date(s[1],n,s[3]||1,s[4]||0,s[5]||0,s[6]||0,r)}}return new Date(i)}(t),this.$x=t.x||{},this.init()},i.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},i.$utils=function(){return rt},i.isValid=function(){return!(this.$d.toString()===X)},i.isSame=function(t,i){var e=nt(t);return this.startOf(i)<=e&&e<=this.endOf(i)},i.isAfter=function(t,i){return nt(t)<this.startOf(i)},i.isBefore=function(t,i){return this.endOf(i)<nt(t)},i.$g=function(t,i,e){return rt.u(t)?this[i]:this.set(e,t)},i.unix=function(){return Math.floor(this.valueOf()/1e3)},i.valueOf=function(){return this.$d.getTime()},i.startOf=function(t,i){var e=this,s=!!rt.u(i)||i,n=rt.p(t),r=function(t,i){var n=rt.w(e.$u?Date.UTC(e.$y,i,t):new Date(e.$y,i,t),e);return s?n:n.endOf(x)},a=function(t,i){return rt.w(e.toDate()[t].apply(e.toDate("s"),(s?[0,0,0,0]:[23,59,59,999]).slice(i)),e)},o=this.$W,h=this.$M,u=this.$D,c="set"+(this.$u?"UTC":"");switch(n){case R:return s?r(1,0):r(31,11);case E:return s?r(1,h):r(0,h+1);case P:var d=this.$locale().weekStart||0,f=(o<d?o+7:o)-d;return r(s?u-f:u+(6-f),h);case x:case J:return a(c+"Hours",0);case Z:return a(c+"Minutes",1);case I:return a(c+"Seconds",2);case F:return a(c+"Milliseconds",3);default:return this.clone()}},i.endOf=function(t){return this.startOf(t,!1)},i.$set=function(t,i){var e,s=rt.p(t),n="set"+(this.$u?"UTC":""),r=(e={},e[x]=n+"Date",e[J]=n+"Date",e[E]=n+"Month",e[R]=n+"FullYear",e[Z]=n+"Hours",e[I]=n+"Minutes",e[F]=n+"Seconds",e[z]=n+"Milliseconds",e)[s],a=s===x?this.$D+(i-this.$W):i;if(s===E||s===R){var o=this.clone().set(J,1);o.$d[r](a),o.init(),this.$d=o.set(J,Math.min(this.$D,o.daysInMonth())).$d}else r&&this.$d[r](a);return this.init(),this},i.set=function(t,i){return this.clone().$set(t,i)},i.get=function(t){return this[rt.p(t)]()},i.add=function(t,i){var e,s=this;t=Number(t);var n=rt.p(i),r=function(i){var e=nt(s);return rt.w(e.date(e.date()+Math.round(i*t)),s)};if(n===E)return this.set(E,this.$M+t);if(n===R)return this.set(R,this.$y+t);if(n===x)return r(1);if(n===P)return r(7);var a=(e={},e[I]=O,e[Z]=W,e[F]=1e3,e)[n]||1,o=this.$d.getTime()+t*a;return rt.w(o,this)},i.subtract=function(t,i){return this.add(-1*t,i)},i.format=function(t){var i=this,e=this.$locale();if(!this.isValid())return e.invalidDate||X;var s=t||U,n=rt.z(this),r=this.$H,a=this.$m,o=this.$M,h=e.weekdays,u=e.months,c=function(t,e,n,r){return t&&(t[e]||t(i,s))||n[e].slice(0,r)},d=function(t){return rt.s(r%12||12,t,"0")},f=e.meridiem||function(t,i,e){var s=t<12?"AM":"PM";return e?s.toLowerCase():s};return s.replace(B,(function(t,s){return s||function(t){switch(t){case"YY":return String(i.$y).slice(-2);case"YYYY":return rt.s(i.$y,4,"0");case"M":return o+1;case"MM":return rt.s(o+1,2,"0");case"MMM":return c(e.monthsShort,o,u,3);case"MMMM":return c(u,o);case"D":return i.$D;case"DD":return rt.s(i.$D,2,"0");case"d":return String(i.$W);case"dd":return c(e.weekdaysMin,i.$W,h,2);case"ddd":return c(e.weekdaysShort,i.$W,h,3);case"dddd":return h[i.$W];case"H":return String(r);case"HH":return rt.s(r,2,"0");case"h":return d(1);case"hh":return d(2);case"a":return f(r,a,!0);case"A":return f(r,a,!1);case"m":return String(a);case"mm":return rt.s(a,2,"0");case"s":return String(i.$s);case"ss":return rt.s(i.$s,2,"0");case"SSS":return rt.s(i.$ms,3,"0");case"Z":return n}return null}(t)||n.replace(":","")}))},i.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},i.diff=function(t,i,e){var s,n=this,r=rt.p(i),a=nt(t),o=(a.utcOffset()-this.utcOffset())*O,h=this-a,u=function(){return rt.m(n,a)};switch(r){case R:s=u()/12;break;case E:s=u();break;case N:s=u()/3;break;case P:s=(h-o)/6048e5;break;case x:s=(h-o)/864e5;break;case Z:s=h/W;break;case I:s=h/O;break;case F:s=h/1e3;break;default:s=h}return e?s:rt.a(s)},i.daysInMonth=function(){return this.endOf(E).$D},i.$locale=function(){return it[this.$L]},i.locale=function(t,i){if(!t)return this.$L;var e=this.clone(),s=st(t,i,!0);return s&&(e.$L=s),e},i.clone=function(){return rt.w(this.$d,this)},i.toDate=function(){return new Date(this.valueOf())},i.toJSON=function(){return this.isValid()?this.toISOString():null},i.toISOString=function(){return this.$d.toISOString()},i.toString=function(){return this.$d.toUTCString()},t}(),ot=at.prototype;nt.prototype=ot,[["$ms",z],["$s",F],["$m",I],["$H",Z],["$W",x],["$M",E],["$y",R],["$D",J]].forEach((function(t){ot[t[1]]=function(i){return this.$g(i,t[0],t[1])}})),nt.extend=function(t,i){return t.$i||(t(i,at,nt),t.$i=!0),nt},nt.locale=st,nt.isDayjs=et,nt.unix=function(t){return nt(1e3*t)},nt.en=it[tt],nt.Ls=it,nt.p={};var ht=function(t){return t.replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(t,i,e){return i||e.slice(1)}))},ut={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},ct=function(t,i){return t.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(t,e,s){var n=s&&s.toUpperCase();return e||i[s]||ut[s]||ht(i[n])}))},dt=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|YYYY|YY?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,ft=/\d\d/,mt=/\d\d?/,lt=/\d*[^-_:/,()\s\d]+/,pt={},vt=function(t){return(t=+t)+(t>68?1900:2e3)},Mt=function(t){return function(i){this[t]=+i}},bt=[/[+-]\d\d:?(\d\d)?|Z/,function(t){(this.zone||(this.zone={})).offset=function(t){if(!t)return 0;if("Z"===t)return 0;var i=t.match(/([+-]|\d\d)/g),e=60*i[1]+(+i[2]||0);return 0===e?0:"+"===i[0]?-e:e}(t)}],gt=function(t){var i=pt[t];return i&&(i.indexOf?i:i.s.concat(i.f))},yt=function(t,i){var e,s=pt.meridiem;if(s){for(var n=1;n<=24;n+=1)if(t.indexOf(s(n,0,i))>-1){e=n>12;break}}else e=t===(i?"pm":"PM");return e},Dt={A:[lt,function(t){this.afternoon=yt(t,!1)}],a:[lt,function(t){this.afternoon=yt(t,!0)}],S:[/\d/,function(t){this.milliseconds=100*+t}],SS:[ft,function(t){this.milliseconds=10*+t}],SSS:[/\d{3}/,function(t){this.milliseconds=+t}],s:[mt,Mt("seconds")],ss:[mt,Mt("seconds")],m:[mt,Mt("minutes")],mm:[mt,Mt("minutes")],H:[mt,Mt("hours")],h:[mt,Mt("hours")],HH:[mt,Mt("hours")],hh:[mt,Mt("hours")],D:[mt,Mt("day")],DD:[ft,Mt("day")],Do:[lt,function(t){var i=pt.ordinal,e=t.match(/\d+/);if(this.day=e[0],i)for(var s=1;s<=31;s+=1)i(s).replace(/\[|\]/g,"")===t&&(this.day=s)}],M:[mt,Mt("month")],MM:[ft,Mt("month")],MMM:[lt,function(t){var i=gt("months"),e=(gt("monthsShort")||i.map((function(t){return t.slice(0,3)}))).indexOf(t)+1;if(e<1)throw new Error;this.month=e%12||e}],MMMM:[lt,function(t){var i=gt("months").indexOf(t)+1;if(i<1)throw new Error;this.month=i%12||i}],Y:[/[+-]?\d+/,Mt("year")],YY:[ft,function(t){this.year=vt(t)}],YYYY:[/\d{4}/,Mt("year")],Z:bt,ZZ:bt};const Yt=new Map([["ar",()=>import("./p-2937523d.js")],["bg",()=>import("./p-29b2f046.js")],["bs",()=>import("./p-80b87453.js")],["ca",()=>import("./p-2d614afc.js")],["cs",()=>import("./p-85e0d2a3.js")],["da",()=>import("./p-38cc8a4d.js")],["de",()=>import("./p-1b4d6511.js")],["de-at",()=>import("./p-bbfc2724.js")],["de-ch",()=>import("./p-418be467.js")],["el",()=>import("./p-3d3772fb.js")],["en",()=>Promise.resolve().then((function(){return K}))],["en-au",()=>import("./p-71400268.js")],["en-ca",()=>import("./p-941721ba.js")],["en-gb",()=>import("./p-9504c1b7.js")],["es",()=>import("./p-38211628.js")],["es-mx",()=>import("./p-1f69762c.js")],["et",()=>import("./p-e9fcf408.js")],["fi",()=>import("./p-f6cf9943.js")],["fr",()=>import("./p-74aa84f6.js")],["fr-ch",()=>import("./p-4b4559f9.js")],["he",()=>import("./p-337f6adf.js")],["hi",()=>import("./p-82f0b25b.js")],["hr",()=>import("./p-45b829b5.js")],["hu",()=>import("./p-d902b790.js")],["id",()=>import("./p-62e3adbb.js")],["it",()=>import("./p-f7aa542c.js")],["it-ch",()=>import("./p-7a11983d.js")],["ja",()=>import("./p-a59dba2f.js")],["ko",()=>import("./p-79d7f324.js")],["lt",()=>import("./p-747a1293.js")],["lv",()=>import("./p-19ec0463.js")],["mk",()=>import("./p-0ca528ec.js")],["nl",()=>import("./p-127c3866.js")],["nb",()=>import("./p-702c6093.js")],["pl",()=>import("./p-b029c6d8.js")],["pt",()=>import("./p-b1daad7e.js")],["pt-br",()=>import("./p-dd5f68f2.js")],["ro",()=>import("./p-30542275.js")],["ru",()=>import("./p-245d667e.js")],["sk",()=>import("./p-90a9126f.js")],["sl",()=>import("./p-34169501.js")],["sr",()=>import("./p-bff158ff.js")],["sv",()=>import("./p-a19d8147.js")],["th",()=>import("./p-ae3ec77d.js")],["tr",()=>import("./p-f0f5ecb2.js")],["uk",()=>import("./p-318790b8.js")],["vi",()=>import("./p-9391bb74.js")],["zh-cn",()=>import("./p-300f4299.js")],["zh-hk",()=>import("./p-75e707d1.js")],["zh-tw",()=>import("./p-69e26726.js")]]);nt.extend((function(t,i,e){e.p.customParseFormat=!0,t&&t.parseTwoDigitYear&&(vt=t.parseTwoDigitYear);var s=i.prototype,n=s.parse;s.parse=function(t){var i=t.date,s=t.utc,r=t.args;this.$u=s;var a=r[1];if("string"==typeof a){var o=!0===r[2],h=!0===r[3],u=o||h,c=r[2];h&&(c=r[2]),pt=this.$locale(),!o&&c&&(pt=e.Ls[c]),this.$d=function(t,i,e){try{if(["x","X"].indexOf(i)>-1)return new Date(("X"===i?1e3:1)*t);var s=function(t){for(var i=(t=ct(t,pt&&pt.formats)).match(dt),e=i.length,s=0;s<e;s+=1){var n=i[s],r=Dt[n],a=r&&r[1];i[s]=a?{regex:r&&r[0],parser:a}:n.replace(/^\[|\]$/g,"")}return function(t){for(var s={},n=0,r=0;n<e;n+=1){var a=i[n];if("string"==typeof a)r+=a.length;else{var o=a.regex,h=a.parser,u=t.slice(r),c=o.exec(u)[0];h.call(s,c),t=t.replace(c,"")}}return function(t){var i=t.afternoon;if(void 0!==i){var e=t.hours;i?e<12&&(t.hours+=12):12===e&&(t.hours=0),delete t.afternoon}}(s),s}}(i),n=s(t),r=n.year,a=n.month,o=n.day,h=n.hours,u=n.minutes,c=n.seconds,d=n.milliseconds,f=n.zone,m=new Date,l=o||(r||a?1:m.getDate()),p=r||m.getFullYear(),v=0;r&&!a||(v=a>0?a-1:m.getMonth());var M=h||0,b=u||0,g=c||0,y=d||0;return f?new Date(Date.UTC(p,v,l,M,b,g,y+60*f.offset*1e3)):e?new Date(Date.UTC(p,v,l,M,b,g,y)):new Date(p,v,l,M,b,g,y)}catch(t){return new Date("")}}(i,a,s),this.init(),c&&!0!==c&&(this.$L=this.locale(c).$L),u&&i!=this.format(a)&&(this.$d=new Date("")),pt={}}else if(a instanceof Array)for(var d=a.length,f=1;f<=d;f+=1){r[1]=a[f-1];var m=e.apply(this,r);if(m.isValid()){this.$d=m.$d,this.$L=m.$L,this.init();break}f===d&&(this.$d=new Date(""))}else n.call(this,t)}})),nt.extend((function(t,i,e){var s=function(t){return t&&(t.indexOf?t:t.s)},n=function(t,i,e,n,r){var a=t.name?t:t.$locale(),o=s(a[i]),h=s(a[e]),u=o||h.map((function(t){return t.slice(0,n)}));if(!r)return u;var c=a.weekStart;return u.map((function(t,i){return u[(i+(c||0))%7]}))},r=function(){return e.Ls[e.locale()]},a=function(t,i){return t.formats[i]||ht(t.formats[i.toUpperCase()])},o=function(){var t=this;return{months:function(i){return i?i.format("MMMM"):n(t,"months")},monthsShort:function(i){return i?i.format("MMM"):n(t,"monthsShort","months",3)},firstDayOfWeek:function(){return t.$locale().weekStart||0},weekdays:function(i){return i?i.format("dddd"):n(t,"weekdays")},weekdaysMin:function(i){return i?i.format("dd"):n(t,"weekdaysMin","weekdays",2)},weekdaysShort:function(i){return i?i.format("ddd"):n(t,"weekdaysShort","weekdays",3)},longDateFormat:function(i){return a(t.$locale(),i)},meridiem:this.$locale().meridiem,ordinal:this.$locale().ordinal}};i.prototype.localeData=function(){return o.bind(this)()},e.localeData=function(){var t=r();return{firstDayOfWeek:function(){return t.weekStart||0},weekdays:function(){return e.weekdays()},weekdaysShort:function(){return e.weekdaysShort()},weekdaysMin:function(){return e.weekdaysMin()},months:function(){return e.months()},monthsShort:function(){return e.monthsShort()},longDateFormat:function(i){return a(t,i)},meridiem:t.meridiem,ordinal:t.ordinal}},e.months=function(){return n(r(),"months")},e.monthsShort=function(){return n(r(),"monthsShort","months",3)},e.weekdays=function(t){return n(r(),"weekdays",null,null,t)},e.weekdaysShort=function(t){return n(r(),"weekdaysShort","weekdays",3,t)},e.weekdaysMin=function(t){return n(r(),"weekdaysMin","weekdays",2,t)}})),nt.extend((function(t,i,e){var s=i.prototype,n=s.format;e.en.formats=ut,s.format=function(t){void 0===t&&(t=U);var i=this.$locale().formats,e=ct(t,void 0===i?{}:i);return n.call(this,e)}})),nt.extend((function(t,i){var e=i.prototype.parse;i.prototype.parse=function(t){if("string"==typeof t.date){var i=this.$locale();t.date=i&&i.preparse?i.preparse(t.date):t.date}return e.bind(this)(t)};var s=i.prototype.format;i.prototype.format=function(){for(var t=arguments.length,i=new Array(t),e=0;e<t;e++)i[e]=arguments[e];var n=s.call.apply(s,[this].concat(i)),r=this.$locale();return r&&r.postformat?r.postformat(n):n};var n=i.prototype.fromToBase;n&&(i.prototype.fromToBase=function(t,i,e,s){var r=this.$locale()||e.$locale();return n.call(this,t,i,e,s,r&&r.postformat)})})),nt.extend((function(t,i,e){e.updateLocale=function(t,i){var s=e.Ls[t];if(s)return(i?Object.keys(i):[]).forEach((function(t){s[t]=i[t]})),s}}));const St=class{constructor(e){t(this,e),this.calciteInputTimePickerChange=i(this,"calciteInputTimePickerChange",7),this.focusOnOpen=!1,this.dialogId=`time-picker-dialog--${u()}`,this.userChangedValue=!1,this.referenceElementId=`input-time-picker-${u()}`,this.hostBlurHandler=()=>{const t=this.calciteInputEl.value,i=this.delocalizeTimeString(t);if(!i)return void this.setValue("");i!==this.value&&this.setValue(i);const e=L({value:this.value,locale:this.effectiveLocale,numberingSystem:this.numberingSystem,includeSeconds:this.shouldIncludeSeconds()});e!==t&&this.setInputValue(e),this.deactivate()},this.calciteInternalInputFocusHandler=t=>{this.readOnly||t.stopPropagation()},this.calciteInternalInputInputHandler=t=>{const{effectiveLocale:i,numberingSystem:e}=this;if(e&&"latn"!==e){const s=t.target;y.numberFormatOptions={locale:i,numberingSystem:e,useGrouping:!1};const n=y.delocalize(s.value).split("").map((t=>m.includes(t)?y.numberFormatter.format(Number(t)):t)).join("");this.setInputValue(n)}},this.timePickerChangeHandler=t=>{t.stopPropagation();const i=t.target.value,e=this.shouldIncludeSeconds();this.setValue(H(i,e)),this.setInputValue(L({value:i,locale:this.effectiveLocale,numberingSystem:this.numberingSystem,includeSeconds:e}))},this.popoverCloseHandler=()=>{j(this,{onDeactivate:()=>{this.calciteInputEl.setFocus(),this.focusOnOpen=!1}})},this.popoverOpenHandler=()=>{w(this,{onActivate:()=>{this.focusOnOpen&&(this.calciteTimePickerEl.setFocus(),this.focusOnOpen=!1)}})},this.keyDownHandler=t=>{const{defaultPrevented:i,key:e}=t;if(!i)if("Enter"===e){if(r(this)&&(t.preventDefault(),this.calciteInputEl.setFocus()),t.composedPath().includes(this.calciteTimePickerEl))return;const i=this.delocalizeTimeString(this.calciteInputEl.value);this.setValue(i);const e=L({value:this.value,locale:this.effectiveLocale,numberingSystem:this.numberingSystem,includeSeconds:this.shouldIncludeSeconds()});i&&this.calciteInputEl.value!==e&&this.setInputValue(e)}else"ArrowDown"===e?(this.open=!0,this.focusOnOpen=!0,t.preventDefault()):"Escape"===e&&this.open&&(this.open=!1,t.preventDefault(),this.calciteInputEl.setFocus())},this.setCalcitePopoverEl=t=>{this.popoverEl=t},this.setCalciteInputEl=t=>{this.calciteInputEl=t},this.setCalciteTimePickerEl=t=>{this.calciteTimePickerEl=t,k(this,{focusTrapEl:t,focusTrapOptions:{initialFocus:!1,setReturnFocus:!1}})},this.setInputValue=t=>{this.calciteInputEl&&(this.calciteInputEl.value=t)},this.setValue=t=>{const i=this.value,e=A(t)||"";e!==i&&(this.userChangedValue=!0,this.value=e||"",this.calciteInputTimePickerChange.emit().defaultPrevented&&(this.userChangedValue=!1,this.value=i,this.setInputValue(L({value:i,locale:this.effectiveLocale,numberingSystem:this.numberingSystem,includeSeconds:this.shouldIncludeSeconds()}))))},this.setValueDirectly=t=>{const i=this.shouldIncludeSeconds();this.value=H(t,i),this.setInputValue(this.value?L({value:this.value,includeSeconds:i,locale:this.effectiveLocale,numberingSystem:this.numberingSystem}):"")},this.onInputWrapperClick=()=>{this.open=!this.open},this.deactivate=()=>{this.open=!1},this.open=!1,this.disabled=!1,this.focusTrapDisabled=!1,this.form=void 0,this.readOnly=!1,this.messageOverrides=void 0,this.messages=void 0,this.name=void 0,this.numberingSystem=void 0,this.required=!1,this.scale="m",this.overlayPositioning="absolute",this.placement="auto",this.step=60,this.value=null,this.defaultMessages=void 0,this.effectiveLocale=""}openHandler(t){this.disabled||this.readOnly?this.open=!1:t&&this.reposition(!0)}handleFocusTrapDisabled(t){this.open&&(t?j(this):w(this))}handleDisabledAndReadOnlyChange(t){t||(this.open=!1)}onMessagesChange(){}numberingSystemWatcher(t){this.setInputValue(L({value:this.value,locale:this.effectiveLocale,numberingSystem:t,includeSeconds:this.shouldIncludeSeconds()}))}stepWatcher(t,i){(i>=60&&t>0&&t<60||t>=60&&i>0&&i<60)&&this.setValueDirectly(this.value)}valueWatcher(t){this.userChangedValue||this.setValueDirectly(t),this.userChangedValue=!1}async effectiveLocaleWatcher(t){await this.loadDateTimeLocaleData(),this.setInputValue(L({value:this.value,locale:t,numberingSystem:this.numberingSystem,includeSeconds:this.shouldIncludeSeconds()}))}async setFocus(){await M(this),this.el.focus()}async reposition(t=!1){var i;null===(i=this.popoverEl)||void 0===i||i.reposition(t)}delocalizeTimeString(t){nt.locale(this.effectiveLocale.toLowerCase());const i=nt(t,["LTS","LT"]);if(i.isValid()){let t=`${i.get("hour")}:${i.get("minute")}`;return this.shouldIncludeSeconds()&&(t+=`:${i.get("seconds")||0}`),A(t)||""}return""}async loadDateTimeLocaleData(){let t=D(this.effectiveLocale).toLowerCase();"no"===t&&(t="nb"),"pt-pt"===t&&(t="pt");const{default:i}=await Yt.get(t)();nt.locale(i,null,!0),nt.updateLocale(t,this.getExtendedLocaleConfig(t))}getExtendedLocaleConfig(t){return"ar"===t?{meridiem:t=>t>12?"م":"ص",formats:{LT:"HH:mm A",LTS:"HH:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm A",LLLL:"dddd D MMMM YYYY HH:mm A"}}:"en-au"===t?{meridiem:t=>t>12?"pm":"am"}:"en-ca"===t?{meridiem:t=>t>12?"p.m.":"a.m."}:"el"===t?{meridiem:t=>t>12?"μ.μ.":"π.μ."}:"hi"===t?{formats:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, h:mm A",LLLL:"dddd, D MMMM YYYY, h:mm A"},meridiem:t=>t>12?"pm":"am"}:"ko"===t?{meridiem:t=>t>12?"오후":"오전"}:"zh-tw"===t?{formats:{LT:"AHH:mm",LTS:"AHH:mm:ss"}}:"zh-hk"===t?{formats:{LT:"AHH:mm",LTS:"AHH:mm:ss"},meridiem:t=>t>12?"下午":"上午"}:void 0}onLabelClick(){this.setFocus()}shouldIncludeSeconds(){return this.step<60}connectedCallback(){c(this),Y(this),T(this.value)?this.setValueDirectly(this.value):this.value=void 0,l(this),a(this),_(this)}async componentWillLoad(){b(this),await Promise.all([C(this),this.loadDateTimeLocaleData()])}componentDidLoad(){g(this),T(this.value)&&this.setInputValue(L({value:this.value,locale:this.effectiveLocale,numberingSystem:this.numberingSystem,includeSeconds:this.shouldIncludeSeconds()}))}disconnectedCallback(){d(this),p(this),o(this),S(this),j(this),$(this)}componentDidRender(){f(this)}render(){const{disabled:t,messages:i,readOnly:n,dialogId:r}=this;return e(s,{onBlur:this.hostBlurHandler,onKeyDown:this.keyDownHandler},e("div",{class:"input-wrapper",onClick:this.onInputWrapperClick},e("calcite-input",{"aria-autocomplete":"none","aria-haspopup":"dialog",disabled:t,icon:"clock",id:this.referenceElementId,label:v(this),lang:this.effectiveLocale,onCalciteInputInput:this.calciteInternalInputInputHandler,onCalciteInternalInputFocus:this.calciteInternalInputFocusHandler,readOnly:n,role:"combobox",scale:this.scale,step:this.step,ref:this.setCalciteInputEl}),this.renderToggleIcon(this.open)),e("calcite-popover",{focusTrapDisabled:!0,id:r,label:i.chooseTime,lang:this.effectiveLocale,onCalcitePopoverClose:this.popoverCloseHandler,onCalcitePopoverOpen:this.popoverOpenHandler,open:this.open,overlayPositioning:this.overlayPositioning,placement:this.placement,referenceElement:this.referenceElementId,triggerDisabled:!0,ref:this.setCalcitePopoverEl},e("calcite-time-picker",{lang:this.effectiveLocale,messageOverrides:this.messageOverrides,numberingSystem:this.numberingSystem,onCalciteInternalTimePickerChange:this.timePickerChangeHandler,scale:this.scale,step:this.step,tabIndex:this.open?void 0:-1,value:this.value,ref:this.setCalciteTimePickerEl})),e(h,{component:this}))}renderToggleIcon(t){return e("span",{class:"toggle-icon"},e("calcite-icon",{icon:t?"chevron-up":"chevron-down",scale:"s"}))}static get delegatesFocus(){return!0}static get assetsDirs(){return["assets"]}get el(){return n(this)}static get watchers(){return{open:["openHandler"],focusTrapDisabled:["handleFocusTrapDisabled"],disabled:["handleDisabledAndReadOnlyChange"],readOnly:["handleDisabledAndReadOnlyChange"],messageOverrides:["onMessagesChange"],numberingSystem:["numberingSystemWatcher"],step:["stepWatcher"],value:["valueWatcher"],effectiveLocale:["effectiveLocaleWatcher"]}}};St.style=":host([disabled]){cursor:default;-webkit-user-select:none;-moz-user-select:none;user-select:none;opacity:var(--calcite-ui-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host{display:inline-block;-webkit-user-select:none;-moz-user-select:none;user-select:none}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}::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([scale=s]){--calcite-toggle-spacing:0.5rem}:host([scale=m]){--calcite-toggle-spacing:0.75rem}:host([scale=l]){--calcite-toggle-spacing:1rem}.input-wrapper{position:relative}.toggle-icon{position:absolute;display:flex;inline-size:1rem;cursor:pointer;align-items:center;inset-inline-end:0;inset-block:0;padding-inline:var(--calcite-toggle-spacing)}:host([hidden]){display:none}[hidden]{display:none}";export{St as I,nt as d}
|
@@ -1,11 +0,0 @@
|
|
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{a as n}from"./p-33613993.js";import{c as o}from"./p-3766be72.js";import{g as s}from"./p-7f271c31.js";
|
7
|
-
/*!
|
8
|
-
* All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
9
|
-
* See https://github.com/Esri/calcite-design-system/blob/main/LICENSE.md for details.
|
10
|
-
* v1.6.1
|
11
|
-
*/const t={},a={};async function r(o){const i=s(o);if(t[i])return t[i];a[i]||(a[i]=fetch(n(`./assets/date-picker/nls/${i}.json`)).then((n=>n.json())).catch((()=>(console.error(`Translations for "${i}" not found or invalid, falling back to english`),r("en")))));const c=await a[i];return t[i]=c,c}function i(n){return n.map(((n,s)=>o(n,1===s)))}export{r as a,i as g}
|
@@ -1,6 +0,0 @@
|
|
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,c as i,h as s,H as e,g as o}from"./p-33613993.js";import{l as a}from"./p-0dab4c93.js";import{g as n}from"./p-22833bd3.js";import"./p-e1a4994d.js";const l=class{constructor(s){t(this,s),this.closeEdit=i(this,"closeEdit",7),this._shouldClose=!1,this.graphics=void 0,this.mapView=void 0,this.open=!1,this.graphicIndex=0,this._translations=void 0}graphicIndexWatchHandler(){this._initEditorWidget()}graphicsWatchHandler(){this._initEditorWidget()}mapViewWatchHandler(){this._initEditorWidget()}async componentWillLoad(){await this._initModules(),await this._getTranslations()}async componentWillRender(){var t,i;const s=document.getElementsByTagName("layer-table");if(1===s.length){const t=s[0];this.graphics=await t.getSelectedGraphics()}(null===(t=this.graphics)||void 0===t?void 0:t.length)>0&&(null===(i=this.graphics[0])||void 0===i?void 0:i.layer)&&(this._layer=this.graphics[0].layer)}render(){var t;const i=!((null===(t=this.graphics)||void 0===t?void 0:t.length)>0&&this.graphics[0]&&this.graphics[0].layer.editingEnabled);return s(e,null,s("div",{class:"position-relative"},i?s("calcite-notice",{kind:"warning",open:!0,slot:"content-top",width:"full"},s("div",{slot:"message"},this._translations.enableEditing)):void 0,s("div",{slot:"content"},s("div",{id:"feature-form",ref:t=>this._editContainer=t}))))}async _initModules(){const[t,i]=await a(["esri/widgets/Editor","esri/core/reactiveUtils"]);this.Editor=t,this.reactiveUtils=i}_initEditorWidget(){if(this.mapView&&this.graphics&&this.graphics.length>0&&this.graphics[0]){this._editor&&this._editor.destroy();const t=document.createElement("div");this._editor=new this.Editor({allowedWorkflows:"update",view:this.mapView,visibleElements:{snappingControls:!1,sketchTooltipControls:!1},container:t}),this._editHandle&&this._attachmentHandle&&this._activeWorkflowHandle&&(this._editHandle.remove(),this._attachmentHandle.remove(),this._activeWorkflowHandle.remove()),this._attachmentHandle=this.reactiveUtils.when((()=>"adding-attachment"===this._editor.viewModel.state||"editing-attachment"===this._editor.viewModel.state),(()=>{this._shouldClose=!1})),this._editHandle=this.reactiveUtils.when((()=>"ready"===this._editor.viewModel.state),(()=>{this._shouldClose&&(this.closeEdit.emit(),this._shouldClose=!1),this.graphicIndex>-1&&this.graphics.length>0&&this.open&&!this._shouldClose&&(this._editor.startUpdateWorkflowAtFeatureEdit(this.graphics[this.graphicIndex]),this._shouldClose=!0)})),this._activeWorkflowHandle=this.reactiveUtils.watch((()=>{var t;return null===(t=this._editor.viewModel.activeWorkflow)||void 0===t?void 0:t.activeWorkflow}),(t=>{"update-table-record"!==(null==t?void 0:t.type)&&"create-features"!==(null==t?void 0:t.type)||(this._shouldClose=!1)})),this._editContainer.appendChild(t)}}async _getTranslations(){const t=await n(this.el);this._translations=t[0]}get el(){return o(this)}static get watchers(){return{graphicIndex:["graphicIndexWatchHandler"],graphics:["graphicsWatchHandler"],mapView:["mapViewWatchHandler"]}}};l.style=":host{display:block}.padding-bottom-1{padding-bottom:1rem}.font-bold{font-weight:var(--calcite-font-weight-bold)}.font-500{font-weight:var(--calcite-font-weight-medium)}.font-italic{font-style:italic}#feature-form{--calcite-ui-background:none;padding-top:0px}.padding-sides-bottom-1{padding:0 1rem 1rem 1rem}.position-relative{position:relative}.esri-editor__prompt--danger{position:relative !important;width:100% !important;background-color:var(--calcite-ui-foreground-1) !important}";const h=class{constructor(s){t(this,s),this.selectionChanged=i(this,"selectionChanged",7),this.graphics=void 0,this.isLoading=!1,this.mapView=void 0,this.zoomAndScrollToSelected=void 0,this._alertOpen=!1,this._count="",this._editRecordOpen=!1,this._translations=void 0}async graphicsWatchHandler(){var t;if(this._features||await this._initFeaturesWidget(),this.graphics.length>0){const i=null===(t=this.graphics[0])||void 0===t?void 0:t.layer;this._editEnabled=i.editingEnabled&&i.capabilities.operations.supportsUpdate,this._features.open({features:this.graphics})}else this._features.clear(),this._features.close()}async mapViewWatchHandler(){return await this._initFeaturesWidget()}async getSelectedFeature(){return this._features.selectedFeature}async closeEdit(){this._editRecordOpen=!1}async componentWillLoad(){await this._initModules(),await this._getTranslations()}render(){var t;const i=this.isLoading||this._editRecordOpen?"display-none":"position-absolute",o=!this.isLoading&&this._editRecordOpen?"position-absolute":"display-none",a=!this.isLoading&&this._editRecordOpen?"display-none":"";return s(e,null,s("calcite-shell",null,s("calcite-loader",{class:this.isLoading?"":"display-none",label:this._translations.fetchingData}),s("div",{class:"esri-widget "+i,id:"features-node"}),s("div",{class:`${a} display-flex padding-1-2 button-container`,slot:"footer"},s("div",{class:"min-width-100"},s("calcite-button",{appearance:"outline",id:"solutions-back",onClick:()=>this._back(),width:"full"},this._translations.back),s("calcite-tooltip",{label:"",placement:"top","reference-element":"solutions-back"},s("span",null,this._translations.back))),s("div",null,this._getCount()),s("div",{class:"min-width-100"},s("calcite-button",{appearance:"outline",id:"solutions-next",onClick:()=>this._next(),width:"full"},this._translations.next),s("calcite-tooltip",{label:"",placement:"top","reference-element":"solutions-next"},s("span",null,this._translations.next)))),s("div",{class:`${a} edit-btn edit-btn-position`},s("calcite-button",{appearance:"outline","icon-start":"pencil",id:"solutions-edit",onClick:()=>this._openEditRecord()},this._translations.edit),s("calcite-tooltip",{label:"",placement:"bottom","reference-element":"solutions-edit"},s("span",null,this._translations.edit))),s("edit-card",{class:o,graphicIndex:null===(t=this._features)||void 0===t?void 0:t.selectedFeatureIndex,graphics:this.graphics,mapView:this.mapView,open:this._editRecordOpen}),s("calcite-alert",{icon:"layer-broken",kind:"warning",label:"",onCalciteAlertClose:()=>this._alertClosed(),open:this._alertOpen,placement:"top"},s("div",{slot:"title"},this._translations.editDisabled),s("div",{slot:"message"},this._translations.enableEditing))))}async _initModules(){const[t,i]=await a(["esri/widgets/Features","esri/core/reactiveUtils"]);this.Features=t,this.reactiveUtils=i}async _initFeaturesWidget(){return await this.mapView.when((()=>{this._features?this._features.view=this.mapView:(this._features=new this.Features({view:this.mapView,container:"features-node",visibleElements:{actionBar:!1,closeButton:!1,heading:!0}}),this.zoomAndScrollToSelected&&this.reactiveUtils.watch((()=>this._features.selectedFeatureIndex),(t=>{t>-1&&this.selectionChanged.emit(this._features.selectedFeature)})))}))}_alertClosed(){this._alertOpen=!1}_editRecordClosed(){this._editRecordOpen=!1}_openEditRecord(){this._editEnabled?this._editRecordOpen=!0:this._alertOpen=!0}_back(){this._features.previous(),this._count=this._getCount()}_next(){this._features.next(),this._count=this._getCount()}_getCount(){var t,i,s;const e=((null===(t=this._features)||void 0===t?void 0:t.viewModel.selectedFeatureIndex)+1).toString(),o=null===(s=null===(i=this._features)||void 0===i?void 0:i.features)||void 0===s?void 0:s.length.toString();return this._translations.indexOfTotal.replace("{{index}}",e).replace("{{total}}",o)}async _getTranslations(){const t=await n(this.el);this._translations=t[0]}get el(){return o(this)}static get watchers(){return{graphics:["graphicsWatchHandler"],mapView:["mapViewWatchHandler"]}}};h.style=':host{display:block;--calcite-label-margin-bottom:0}table{border-collapse:collapse;width:100%}th,td{text-align:left;padding:8px}tr:nth-child(odd){background:var(--calcite-ui-foreground-2)}.bottom-border{padding-bottom:0.5rem;border-bottom:1px solid var(--calcite-ui-border-1)}.padding-1-2{padding:0.5rem}.padding-top-1-2{padding-top:0.5rem}.font-color-3{color:var(--calcite-ui-text-3)}.display-none{display:none}.display-flex{display:flex}.position-absolute{position:absolute;top:0;right:0;bottom:0;left:0;overflow:auto}.edit-btn{z-index:999;position:absolute}.edit-btn-position{right:0.5rem;top:0.5rem}html[dir="rtl"] .edit-btn-position{left:0}.esri-features__footer{display:none !important}.button-container{justify-content:space-between;align-items:center}.min-width-100{min-width:100px}';export{l as edit_card,h as info_card}
|
@@ -1,37 +0,0 @@
|
|
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,h as e,H as i,g as n}from"./p-33613993.js";import{r,N as s,c as o,e as a,A as h,g as u,s as c}from"./p-afb35c95.js";import{g as l}from"./p-22833bd3.js";import"./p-cc462e38.js";import"./p-2a58e378.js";import"./p-e1a4994d.js";
|
7
|
-
/** @license
|
8
|
-
* Copyright 2022 Esri
|
9
|
-
*
|
10
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
11
|
-
* you may not use this file except in compliance with the License.
|
12
|
-
* You may obtain a copy of the License at
|
13
|
-
*
|
14
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
15
|
-
*
|
16
|
-
* Unless required by applicable law or agreed to in writing, software
|
17
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
18
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
19
|
-
* See the License for the specific language governing permissions and
|
20
|
-
* limitations under the License.
|
21
|
-
*/
|
22
|
-
function f(t){const e=function(t){const e=[];function i(e,r,s=[]){const o=function(t,e){const i=t.findIndex((t=>e===t.itemId));return i>=0?t[i]:null}(t,e);if(o){const t={id:e,dependencies:[]};s.indexOf(e)<0&&(s.push(e),o.dependencies.forEach((e=>{const r=n.indexOf(e);r>=0&&n.splice(r,1),i(e,t.dependencies,s)}))),r.push(t)}}let n=function(t){const e=t.map((t=>t.itemId));return t.forEach((t=>{(t.dependencies||[]).forEach((t=>{const i=e.indexOf(t);i>=0&&e.splice(i,1)}))})),e}(t);const r=t.filter((t=>n.indexOf(t.itemId)<0)).sort(((t,e)=>e.dependencies.length-t.dependencies.length));n=n.concat(r.map((t=>t.itemId)));let s=n.shift();for(;void 0!==s;)i(s,e),s=n.shift();return e}(t),i=e.reduce(((t,e)=>(t.push(e.id),t)),[]);return t.reduce(((n,r)=>{if(i.indexOf(r.itemId)>-1){const i=e.filter((t=>t.id===r.itemId));n.push(p(r,t,i[0].dependencies))}return n}),[])}function d(t,e,i,n){t.forEach((t=>{const r=t.name&&t.name.indexOf("||")>-1?t.name.split("||")[1].replace("}}","").trim():t.name;e.dependencies.push({id:i.itemId,title:`${r} (${n.id})`,value:`{{${i.itemId}.layer${t.id}.id}}`}),e.dependencies.push({id:i.itemId,title:`${r} (${n.name})`,value:`{{${i.itemId}.layer${t.id}.name||${r}}}`})}))}function p(t,e,i){return{id:t.itemId||"",title:t.item.title||"",dependencies:w(i,e),type:t.item.type||"",typeKeywords:t.item.typeKeywords||[]}}function w(t,e){const i=[],n=t.reduce(((t,e)=>(t.push(e.id),i.push(e),t)),[]);return e.reduce(((t,r)=>{const s=n.indexOf(r.itemId);return s>-1&&t.push(p(r,e,i[s].dependencies)),t}),[])}
|
23
|
-
/*! *****************************************************************************
|
24
|
-
Copyright (c) Microsoft Corporation.
|
25
|
-
|
26
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
27
|
-
purpose with or without fee is hereby granted.
|
28
|
-
|
29
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
30
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
31
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
32
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
33
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
34
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
35
|
-
PERFORMANCE OF THIS SOFTWARE.
|
36
|
-
***************************************************************************** */
|
37
|
-
var v=function(){return v=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var r in e=arguments[i])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t},v.apply(this,arguments)};function g(t,e){var i=e;return i.rawResponse=!1,r(t,i).then((function(t){var e={token:t.access_token,username:t.username,expires:new Date(Date.now()+(1e3*t.expires_in-1e3)),ssl:!0===t.ssl};return t.refresh_token&&(e.refreshToken=t.refresh_token),e}))}function m(t,e){var i=e;return i.params.referer="undefined"!=typeof window&&window.location&&window.location.host?window.location.host:s,r(t,i)}var b=/^https?:\/\/(\S+)\.arcgis\.com.+/;function k(t){return b.test(t)}function y(t){if(!b.test(t))return null;var e=t.match(b)[1].split(".").pop();return e.includes("dev")?"dev":e.includes("qa")?"qa":"production"}var x=function(){function t(t){if(this.clientId=t.clientId,this._refreshToken=t.refreshToken,this._refreshTokenExpires=t.refreshTokenExpires,this.username=t.username,this.password=t.password,this._token=t.token,this._tokenExpires=t.tokenExpires,this.portal=t.portal?o(t.portal):"https://www.arcgis.com/sharing/rest",this.ssl=t.ssl,this.provider=t.provider||"arcgis",this.tokenDuration=t.tokenDuration||20160,this.redirectUri=t.redirectUri,this.refreshTokenTTL=t.refreshTokenTTL||20160,this.server=t.server,this.federatedServers={},this.trustedDomains=[],t.server){var e=this.getServerRootUrl(t.server);this.federatedServers[e]={token:t.token,expires:t.tokenExpires}}this._pendingTokenRequests={}}return Object.defineProperty(t.prototype,"token",{get:function(){return this._token},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"tokenExpires",{get:function(){return this._tokenExpires},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"refreshToken",{get:function(){return this._refreshToken},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"refreshTokenExpires",{get:function(){return this._refreshTokenExpires},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"trustedServers",{get:function(){return console.log("DEPRECATED: use federatedServers instead"),this.federatedServers},enumerable:!1,configurable:!0}),t.beginOAuth2=function(e,i){void 0===i&&(i=window),e.duration&&console.log("DEPRECATED: 'duration' is deprecated - use 'expiration' instead");var n,r=v({portal:"https://www.arcgis.com/sharing/rest",provider:"arcgis",expiration:20160,popup:!0,popupWindowFeatures:"height=400,width=600,menubar=no,location=yes,resizable=yes,scrollbars=yes,status=yes",state:e.clientId,locale:""},e),s=r.portal,o=r.provider,u=r.clientId,c=r.expiration,l=r.redirectUri,f=r.popup,d=r.popupWindowFeatures,p=r.state,w=r.locale,g=r.params;if(n="arcgis"===o?s+"/oauth2/authorize?client_id="+u+"&response_type=token&expiration="+(e.duration||c)+"&redirect_uri="+encodeURIComponent(l)+"&state="+p+"&locale="+w:s+"/oauth2/social/authorize?client_id="+u+"&socialLoginProviderName="+o+"&autoAccountCreateForSocial=true&response_type=token&expiration="+(e.duration||c)+"&redirect_uri="+encodeURIComponent(l)+"&state="+p+"&locale="+w,g&&(n=n+"&"+a(g)),f){var m,b=((m={promise:null,resolve:null,reject:null}).promise=new Promise((function(t,e){m.resolve=t,m.reject=e})),m);return i["__ESRI_REST_AUTH_HANDLER_"+u]=function(e,i){if(e){var n=JSON.parse(e);b.reject(new h(n.errorMessage,n.error))}else if(i){var r=JSON.parse(i);b.resolve(new t({clientId:u,portal:s,ssl:r.ssl,token:r.token,tokenExpires:new Date(r.expires),username:r.username}))}},i.open(n,"oauth-window",d),b.promise}i.location.href=n},t.completeOAuth2=function(e,i){void 0===i&&(i=window);var n=v({portal:"https://www.arcgis.com/sharing/rest",popup:!0},e),r=n.portal,s=n.clientId,o=n.popup;function a(e,n){try{var a=void 0,u="__ESRI_REST_AUTH_HANDLER_"+s;if(o&&(i.opener?i.opener.parent&&i.opener.parent[u]?a=i.opener.parent[u]:i.opener&&i.opener[u]&&(a=i.opener[u]):i!==i.parent&&i.parent&&i.parent[u]&&(a=i.parent[u]),a))return a(e?JSON.stringify(e):void 0,JSON.stringify(n)),void i.close()}catch(t){throw new h('Unable to complete authentication. It\'s possible you specified popup based oAuth2 but no handler from "beginOAuth2()" present. This generally happens because the "popup" option differs between "beginOAuth2()" and "completeOAuth2()".')}if(e)throw new h(e.errorMessage,e.error);return new t({clientId:s,portal:r,ssl:n.ssl,token:n.token,tokenExpires:n.expires,username:n.username})}var u=i.location.hash.replace(/^#/,"").split("&").reduce((function(t,e){var i=function(t){var e=t.split("="),i=e[1];return{key:decodeURIComponent(e[0]),value:decodeURIComponent(i)}}(e);return t[i.key]=i.value,t}),{});if(!u.access_token){var c=void 0,l="Unknown error";return u.error&&(c=u.error,l=u.error_description),a({error:c,errorMessage:l})}return a(void 0,{token:u.access_token,expires:new Date(Date.now()+1e3*parseInt(u.expires_in,10)-6e4),ssl:"true"===u.ssl,username:u.username})},t.fromParent=function(e,i){var n;return!i&&window&&(i=window),new Promise((function(r,s){i.addEventListener("message",n=function(e){if(e.source===i.parent&&e.data)try{return r(t.parentMessageHandler(e))}catch(t){return s(t)}},!1),i.parent.postMessage({type:"arcgis:auth:requestCredential"},e)})).then((function(t){return i.removeEventListener("message",n,!1),t}))},t.authorize=function(t,e){t.duration&&console.log("DEPRECATED: 'duration' is deprecated - use 'expiration' instead");var i=v({portal:"https://arcgis.com/sharing/rest",expiration:20160},t);e.writeHead(301,{Location:i.portal+"/oauth2/authorize?client_id="+i.clientId+"&expiration="+(t.duration||i.expiration)+"&response_type=code&redirect_uri="+encodeURIComponent(i.redirectUri)}),e.end()},t.exchangeAuthorizationCode=function(e,i){var n=v({portal:"https://www.arcgis.com/sharing/rest",refreshTokenTTL:20160},e),r=n.portal,s=n.clientId,o=n.redirectUri,a=n.refreshTokenTTL;return g(r+"/oauth2/token",{params:{grant_type:"authorization_code",client_id:s,redirect_uri:o,code:i}}).then((function(e){return new t({clientId:s,portal:r,ssl:e.ssl,redirectUri:o,refreshToken:e.refreshToken,refreshTokenTTL:a,refreshTokenExpires:new Date(Date.now()+60*(a-1)*1e3),token:e.token,tokenExpires:e.expires,username:e.username})}))},t.deserialize=function(e){var i=JSON.parse(e);return new t({clientId:i.clientId,refreshToken:i.refreshToken,refreshTokenExpires:new Date(i.refreshTokenExpires),username:i.username,password:i.password,token:i.token,tokenExpires:new Date(i.tokenExpires),portal:i.portal,ssl:i.ssl,tokenDuration:i.tokenDuration,redirectUri:i.redirectUri,refreshTokenTTL:i.refreshTokenTTL})},t.fromCredential=function(e){var i=void 0===e.ssl||e.ssl,n=e.expires||Date.now()+72e5;return new t({portal:e.server.includes("sharing/rest")?e.server:e.server+"/sharing/rest",ssl:i,token:e.token,username:e.userId,tokenExpires:new Date(n)})},t.parentMessageHandler=function(e){if("arcgis:auth:credential"===e.data.type)return t.fromCredential(e.data.credential);if("arcgis:auth:error"===e.data.type){var i=new Error(e.data.error.message);throw i.name=e.data.error.name,i}throw new Error("Unknown message type.")},t.prototype.toCredential=function(){return{expires:this.tokenExpires.getTime(),server:this.portal,ssl:this.ssl,token:this.token,userId:this.username}},t.prototype.getUser=function(t){var e=this;if(this._pendingUserRequest)return this._pendingUserRequest;if(this._user)return Promise.resolve(this._user);var i=this.portal+"/community/self",n=v(v({httpMethod:"GET",authentication:this},t),{rawResponse:!1});return this._pendingUserRequest=r(i,n).then((function(t){return e._user=t,e._pendingUserRequest=null,t})),this._pendingUserRequest},t.prototype.getPortal=function(t){var e=this;if(this._pendingPortalRequest)return this._pendingPortalRequest;if(this._portalInfo)return Promise.resolve(this._portalInfo);var i=this.portal+"/portals/self",n=v(v({httpMethod:"GET",authentication:this},t),{rawResponse:!1});return this._pendingPortalRequest=r(i,n).then((function(t){return e._portalInfo=t,e._pendingPortalRequest=null,t})),this._pendingPortalRequest},t.prototype.getUsername=function(){return this.username?Promise.resolve(this.username):this._user?Promise.resolve(this._user.username):this.getUser().then((function(t){return t.username}))},t.prototype.getToken=function(t,e){return n=t,r=k(i=this.portal),s=k(n),o=y(i),a=y(n),r&&s&&o===a||new RegExp(this.portal,"i").test(t)?this.getFreshToken(e):this.getTokenForServer(t,e);var i,n,r,s,o,a},t.prototype.validateAppAccess=function(t){return this.getToken(this.portal).then((function(e){return function(t,e,i){return void 0===i&&(i="https://www.arcgis.com/sharing/rest"),r(i+"/oauth2/validateAppAccess",{method:"POST",params:{f:"json",client_id:e,token:t}})}(e,t)}))},t.prototype.toJSON=function(){return{clientId:this.clientId,refreshToken:this.refreshToken,refreshTokenExpires:this.refreshTokenExpires,username:this.username,password:this.password,token:this.token,tokenExpires:this.tokenExpires,portal:this.portal,ssl:this.ssl,tokenDuration:this.tokenDuration,redirectUri:this.redirectUri,refreshTokenTTL:this.refreshTokenTTL}},t.prototype.serialize=function(){return JSON.stringify(this)},t.prototype.enablePostMessageAuth=function(t,e){!e&&window&&(e=window),this._hostHandler=this.createPostMessageHandler(t),e.addEventListener("message",this._hostHandler,!1)},t.prototype.disablePostMessageAuth=function(t){!t&&window&&(t=window),t.removeEventListener("message",this._hostHandler,!1)},t.prototype.refreshSession=function(t){return this._user=null,this.username&&this.password?this.refreshWithUsernameAndPassword(t):this.clientId&&this.refreshToken?this.refreshWithRefreshToken():Promise.reject(new h("Unable to refresh token."))},t.prototype.getServerRootUrl=function(t){var e=o(t).split(/\/rest(\/admin)?\/services(?:\/|#|\?|$)/)[0].match(/(https?:\/\/)(.+)/),i=e[1],n=e[2].split("/"),r=n[0],s=n.slice(1);return""+i+r.toLowerCase()+"/"+s.join("/")},t.prototype.getDomainCredentials=function(t){return this.trustedDomains&&this.trustedDomains.length&&this.trustedDomains.some((function(e){return t.startsWith(e)}))?"include":"same-origin"},t.prototype.createPostMessageHandler=function(t){var e=this;return function(i){var n=t.indexOf(i.origin)>-1,r="arcgis:auth:requestCredential"===i.data.type,s=e.tokenExpires.getTime()>Date.now();if(n&&r){var o={};if(s){var a=e.toCredential();a.server=a.server.replace("/sharing/rest",""),o={type:"arcgis:auth:credential",credential:a}}else o={type:"arcgis:auth:error",error:{name:"tokenExpiredError",message:"Session token was expired, and not returned to the child application"}};i.source.postMessage(o,i.origin)}}},t.prototype.getTokenForServer=function(t,e){var i=this,n=this.getServerRootUrl(t),s=this.federatedServers[n];return s&&s.expires&&s.expires.getTime()>Date.now()?Promise.resolve(s.token):(this._pendingTokenRequests[n]||(this._pendingTokenRequests[n]=this.fetchAuthorizedDomains().then((function(){return r(n+"/rest/info",{credentials:i.getDomainCredentials(t)}).then((function(s){if(s.owningSystemUrl){if(a=s.owningSystemUrl,u=o(function(t){if(!b.test(t))return t;switch(y(t)){case"dev":return"https://devext.arcgis.com/sharing/rest";case"qa":return"https://qaext.arcgis.com/sharing/rest";default:return"https://www.arcgis.com/sharing/rest"}}(i.portal)).replace(/https?:\/\//,""),c=o(a).replace(/https?:\/\//,""),new RegExp(c,"i").test(u))return r(s.owningSystemUrl+"/sharing/rest/info",e);throw new h(t+" is not federated with "+i.portal+".","NOT_FEDERATED")}var a,u,c;if(s.authInfo&&void 0!==i.federatedServers[n])return Promise.resolve({authInfo:s.authInfo});throw new h(t+" is not federated with any portal and is not explicitly trusted.","NOT_FEDERATED")})).then((function(t){return t.authInfo.tokenServicesUrl})).then((function(e){return i.token&&i.tokenExpires.getTime()>Date.now()?m(e,{params:{token:i.token,serverUrl:t,expiration:i.tokenDuration,client:"referer"}}):m(e,{params:{username:i.username,password:i.password,expiration:i.tokenDuration,client:"referer"}}).then((function(t){return i._token=t.token,i._tokenExpires=new Date(t.expires),t}))})).then((function(t){return i.federatedServers[n]={expires:new Date(t.expires),token:t.token},delete i._pendingTokenRequests[n],t.token}))}))),this._pendingTokenRequests[n])},t.prototype.getFreshToken=function(t){var e=this;return this.token&&!this.tokenExpires||this.token&&this.tokenExpires&&this.tokenExpires.getTime()>Date.now()?Promise.resolve(this.token):(this._pendingTokenRequests[this.portal]||(this._pendingTokenRequests[this.portal]=this.refreshSession(t).then((function(t){return e._pendingTokenRequests[e.portal]=null,t.token}))),this._pendingTokenRequests[this.portal])},t.prototype.refreshWithUsernameAndPassword=function(t){var e=this,i=v({params:{username:this.username,password:this.password,expiration:this.tokenDuration}},t);return m(this.portal+"/generateToken",i).then((function(t){return e._token=t.token,e._tokenExpires=new Date(t.expires),e}))},t.prototype.refreshWithRefreshToken=function(t){var e=this;if(this.refreshToken&&this.refreshTokenExpires&&this.refreshTokenExpires.getTime()<Date.now())return this.refreshRefreshToken(t);var i=v({params:{client_id:this.clientId,refresh_token:this.refreshToken,grant_type:"refresh_token"}},t);return g(this.portal+"/oauth2/token",i).then((function(t){return e._token=t.token,e._tokenExpires=t.expires,e}))},t.prototype.refreshRefreshToken=function(t){var e=this,i=v({params:{client_id:this.clientId,refresh_token:this.refreshToken,redirect_uri:this.redirectUri,grant_type:"exchange_refresh_token"}},t);return g(this.portal+"/oauth2/token",i).then((function(t){return e._token=t.token,e._tokenExpires=t.expires,e._refreshToken=t.refreshToken,e._refreshTokenExpires=new Date(Date.now()+60*(e.refreshTokenTTL-1)*1e3),e}))},t.prototype.fetchAuthorizedDomains=function(){var t=this;return this.server||!this.portal?Promise.resolve(this):this.getPortal().then((function(e){return e.authorizedCrossOriginDomains&&e.authorizedCrossOriginDomains.length&&(t.trustedDomains=e.authorizedCrossOriginDomains.filter((function(t){return!t.startsWith("http://")})).map((function(t){return t.startsWith("https://")?t:"https://"+t}))),t}))},t}();const E=class{async serializedAuthenticationWatchHandler(){this.authentication=this.serializedAuthentication?x.deserialize(this.serializedAuthentication):new x({})}async valueWatchHandler(){await this._loadSolution(this.solutionItemId)}constructor(e){t(this,e),this._solutionStoreHasChanges=!1,this._solutionEditorHasChanges=!1,this._solutionEditorHasErrors=!1,this._canSave=!1,this.authentication=new x({}),this.serializedAuthentication="",this.solutionItemId="",this.showLoading=!1,this._currentEditItemId="",this._organizationVariables="",this._solutionContentsComponent=void 0,this._solutionIsLoaded=!1,this._solutionVariables="",this._templateHierarchy=[],this._translations=void 0,this._treeOpen=!0,this.serializedAuthentication&&(this.authentication=x.deserialize(this.serializedAuthentication)),this._loadSolution(this.solutionItemId),window.addEventListener("solutionStoreHasChanges",(t=>{this._updateSaveability(this._solutionStoreHasChanges=t.detail,this._solutionEditorHasChanges,this._solutionEditorHasErrors)})),window.addEventListener("solutionEditorHasChanges",(t=>{this._updateSaveability(this._solutionStoreHasChanges,this._solutionEditorHasChanges=t.detail,this._solutionEditorHasErrors)})),window.addEventListener("solutionEditorHasErrors",(t=>{this._updateSaveability(this._solutionStoreHasChanges,this._solutionEditorHasChanges,this._solutionEditorHasErrors=t.detail)}))}async componentWillLoad(){return this._getTranslations()}render(){const t=u(c.getStoreInfo("spatialReferenceInfo"),"spatialReference"),n=c.getStoreInfo("featureServices").length>0,r=c.getStoreInfo("solutionData");var s;return this._solutionVariables=JSON.stringify(function(t,e){const i=[];return t.forEach((t=>{const n={id:t.itemId,title:t.item.title||t.item.name,type:t.type,value:void 0,dependencies:[{id:t.itemId,title:e.itemId,value:`{{${t.itemId}.itemId}}`}]};t.item.url&&n.dependencies.push({id:t.itemId,title:e.url,value:`{{${t.itemId}.url}}`}),"Feature Service"===t.type&&(n.dependencies.push({id:t.itemId,title:e.solutionExtent,value:`{{${t.itemId}.solutionExtent}}`}),d(t.properties.layers||[],n,t,e),d(t.properties.tables||[],n,t,e)),i.push(n)})),i}(r.templates,this._translations)),this._organizationVariables=JSON.stringify([{id:"",title:(s=this._translations).geocodeUrl,value:"{{organization.helperServices.geocode:getDefaultLocatorURL}}"},{id:"",title:s.geometryUrl,value:"{{organization.helperServices.geometry.url}}"},{id:"",title:s.portalBaseUrl,value:"{{portalBaseUrl}}"},{id:"",title:s.routeUrl,value:"{{organization.helperServices.route.url}}"},{id:"",title:s.solutionItemExtent,value:"{{solutionItemExtent}}"}]),e(i,null,this._solutionIsLoaded?null:e("calcite-loader",{label:""}),e("div",{class:"configuration-container"},e("div",{class:"configuration"},e("calcite-tabs",{class:"config-tabs"},e("calcite-tab-nav",{slot:"tab-nav"},e("calcite-tab-title",null,this._translations.definitionTab),n?e("calcite-tab-title",null,this._translations.spatialReferenceTab):null),e("calcite-tab",{class:"config-tab",selected:!0},e("div",{class:"config-solution"},e("div",{class:this._treeOpen?"config-inventory":"config-inventory-hide"},e("solution-contents",{id:"configInventory",key:`${this.solutionItemId}-contents`,ref:t=>this._solutionContentsComponent=t})),e("calcite-button",{appearance:"transparent",class:"collapse-btn","icon-start":this._treeOpen?"chevrons-left":"chevrons-right",id:"collapse-vars",onClick:()=>this._toggleTree(),scale:"s",title:this._treeOpen?this._translations.collapse:this._translations.expand}),e("div",{class:"config-item"},e("solution-item",{authentication:this.authentication,"item-id":this._currentEditItemId,key:`${this.solutionItemId}-item`,"organization-variables":this._organizationVariables,"solution-item-id":this.solutionItemId,"solution-variables":this._solutionVariables})))),n?e("calcite-tab",{class:"config-tab"},e("div",{class:"config-solution"},e("solution-spatial-ref",{defaultWkid:t,id:"configure-solution-spatial-ref",key:`${this.solutionItemId}-spatial-ref`,locked:!t,services:c.getStoreInfo("featureServices").map((t=>t.name))}))):null))))}_solutionItemSelected(t){this._currentEditItemId=t.detail}async getSpatialReferenceInfo(){return Promise.resolve(c.getStoreInfo("spatialReferenceInfo"))}async saveSolution(){this._solutionIsLoaded=!1,await c.saveSolution(),this._solutionIsLoaded=!0,this.solutionItemId=null}async unloadSolution(){this.solutionItemId=null}_initProps(){const t=c.getStoreInfo("solutionData");let e;this._templateHierarchy=[...f(t.templates)],this._solutionContentsComponent&&(this._solutionContentsComponent.templateHierarchy=this._templateHierarchy),this._templateHierarchy.length>0&&(e=c.getItemInfo(this._templateHierarchy[0].id)),this._currentEditItemId=e?e.itemId:""}async _loadSolution(t){return t?(this._solutionIsLoaded=!1,await c.loadSolution(t,this.authentication),this._initProps(),this._solutionIsLoaded=!0):this._reset(),Promise.resolve()}_reset(){this._currentEditItemId="",this._organizationVariables="",this._solutionVariables="",this._templateHierarchy=[]}_toggleTree(){this._treeOpen=!this._treeOpen}_updateSaveability(t,e,i){const n=(t||e)&&!i;this._canSave!==n&&window.dispatchEvent(new CustomEvent("solutionCanSave",{detail:n,bubbles:!0,cancelable:!1,composed:!0})),this._canSave=n}async _getTranslations(){const t=await l(this.el);this._translations=t[0]}get el(){return n(this)}static get watchers(){return{serializedAuthentication:["serializedAuthenticationWatchHandler"],solutionItemId:["valueWatchHandler"]}}};E.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%}.config-solution{position:absolute;top:3.5rem;right:-1px;bottom:-1px;left:-1px;display:flex;padding:0.5rem}.config-inventory{display:inline;max-width:-moz-min-content;max-width:min-content;flex-grow:0;overflow-y:auto}.config-inventory-hide{display:none;max-width:-moz-min-content;max-width:min-content;flex-grow:0;overflow-y:auto}.config-item{position:relative;display:inline;flex-grow:1;overflow-y:auto;margin-inline-start:0.5rem}solution-contents{position:relative;height:100%}solution-item{position:relative;height:100%}solution-spatial-ref{position:relative;height:100%;width:100%;overflow-y:auto}";export{E as solution_configuration}
|
@@ -1,12 +0,0 @@
|
|
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{q as n,c as e}from"./p-a16feeec.js";import{h as t}from"./p-33613993.js";!function(n){function e(n,e,t){throw new n("Failed to execute 'requestSubmit' on 'HTMLFormElement': "+e+".",t)}"function"!=typeof n.requestSubmit&&(n.requestSubmit=function(n){n?(function(n,t){n instanceof HTMLElement||e(TypeError,"parameter 1 is not of type 'HTMLElement'"),"submit"==n.type||e(TypeError,"The specified element is not a submit button"),n.form==t||e(DOMException,"The specified element is not owned by this form element","NotFoundError")}(n,this),n.click()):((n=document.createElement("input")).type="submit",n.hidden=!0,this.appendChild(n),n.click(),this.removeChild(n))})}(HTMLFormElement.prototype);
|
7
|
-
/*!
|
8
|
-
* All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
9
|
-
* See https://github.com/Esri/calcite-design-system/blob/main/LICENSE.md for details.
|
10
|
-
* v1.6.1
|
11
|
-
*/
|
12
|
-
const o="hidden-form-input";function r(n){return"checked"in n}const i=new WeakMap,s=new WeakSet;function c(n){const{formEl:e}=n;return!!e&&(e.requestSubmit(),!0)}function u(n){n.formEl?.reset()}function f(n){const{el:t,value:o}=n,c=m(n);if(!c||function(n,t){if(e(t.parentElement,"[form]"))return!0;const o="calciteInternalFormComponentRegister";let r=!1;return n.addEventListener(o,(n=>{r=n.composedPath().some((n=>s.has(n))),n.stopPropagation()}),{once:!0}),t.dispatchEvent(new CustomEvent(o,{bubbles:!0,composed:!0})),r}(c,t))return;n.formEl=c,n.defaultValue=o,r(n)&&(n.defaultChecked=n.checked);const u=(n.onFormReset||a).bind(n);c.addEventListener("reset",u),i.set(n.el,u),s.add(t)}function m(t){const{el:o,form:r}=t;return r?n(o,{id:r}):e(o,"form")}function a(){r(this)?this.checked=this.defaultChecked:this.value=this.defaultValue}function l(n){const{el:e,formEl:t}=n;if(!t)return;const o=i.get(e);t.removeEventListener("reset",o),i.delete(e),n.formEl=null,s.delete(e)}function p(n,e){n.defaultValue=e}const d=n=>{n.target.dispatchEvent(new CustomEvent("calciteInternalHiddenInputChange",{bubbles:!0}))},h=n=>n.removeEventListener("change",d);function b(n,e,t){const{defaultValue:o,disabled:i,form:s,name:c,required:u}=n;e.defaultValue=o,e.disabled=i,e.name=c,e.required=u,e.tabIndex=-1,s?e.setAttribute("form",s):e.removeAttribute("form"),r(n)?(e.checked=n.checked,e.defaultChecked=n.defaultChecked,e.value=n.checked?t||"on":""):e.value=t||"",n.syncHiddenFormInput?.(e)}const E=({component:n})=>(function(n){const{el:e,formEl:t,name:r,value:i}=n,{ownerDocument:s}=e,c=e.querySelectorAll(`input[slot="${o}"]`);if(!t||!r)return void c.forEach((n=>{h(n),n.remove()}));const u=Array.isArray(i)?i:[i],f=[],m=new Set;let a;c.forEach((e=>{const t=u.find((n=>n==e.value));null!=t?(m.add(t),b(n,e,t)):f.push(e)})),u.forEach((e=>{if(m.has(e))return;let t=f.pop();t||(t=s.createElement("input"),t.slot=o),a||(a=s.createDocumentFragment()),a.append(t),t.addEventListener("change",d),b(n,t,e)})),a&&e.append(a),f.forEach((n=>{h(n),n.remove()}))}(n),t("slot",{name:o}));export{E as H,p as a,f as c,l as d,m as f,u as r,c as s}
|
@@ -1,6 +0,0 @@
|
|
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,c as i,a as s,h as e,H as a,g as l}from"./p-33613993.js";import{a as n,b as o,c}from"./p-2a58e378.js";import{l as h}from"./p-0dab4c93.js";import{g as d,h as r}from"./p-767002cd.js";import{s as p}from"./p-3691a072.js";import{g}from"./p-22833bd3.js";import{c as b,r as u}from"./p-0503c78d.js";import"./p-cc462e38.js";import"./p-e1a4994d.js";const m=class{constructor(s){t(this,s),this.searchConfigurationChange=i(this,"searchConfigurationChange",7),this._onboardingImageUrl="",this._titleValue=void 0,this._numSelected=0,this.addresseeLayerIds=[],this.bufferColor=[227,139,79,.8],this.bufferOutlineColor=[255,255,255],this.customLabelEnabled=void 0,this.defaultBufferDistance=void 0,this.defaultBufferUnit=void 0,this.defaultExportTitle="",this.defaultNumLabelsPerPage=void 0,this.featureEffect=void 0,this.featureHighlightEnabled=void 0,this.mapView=void 0,this.noResultText=void 0,this.searchConfiguration=void 0,this.selectionLayerIds=[],this.showRefineSelection=!1,this.showSearchSettings=!0,this.sketchLineSymbol=void 0,this.sketchPointSymbol=void 0,this.sketchPolygonSymbol=void 0,this._addMap=!1,this._addTitle=!1,this._downloadActive=!0,this._exportType=n.PDF,this._fetchingData=!1,this._isMobile=void 0,this._numDuplicates=0,this._pageType=o.LIST,this._saveEnabled=!1,this._selectionSets=[],this._translations=void 0}async mapViewWatchHandler(t){(null==t?void 0:t.popup)&&(this._popupsEnabled=null==t?void 0:t.popup.autoOpenEnabled)}async watchSearchConfigurationHandler(t,i){const s=JSON.stringify(t);s!==JSON.stringify(i)&&(this._searchConfiguration=JSON.parse(s),this.searchConfigurationChange.emit(this._searchConfiguration),this._home())}async sketchLineSymbolWatchHandler(t,i){t&&JSON.stringify(t)!==JSON.stringify(i)&&this._setLineSymbol(t)}async sketchPointSymbolWatchHandler(t,i){t&&JSON.stringify(t)!==JSON.stringify(i)&&this._setPointSymbol(t)}async sketchPolygonSymbolWatchHandler(t,i){t&&JSON.stringify(t)!==JSON.stringify(i)&&this._setPolygonSymbol(t)}async pageTypeWatchHandler(t,i){var s;if(this._checkPopups(),(null===(s=this.mapView)||void 0===s?void 0:s.popup)&&(this.mapView.popupEnabled=t===o.LIST&&this._popupsEnabled),t===o.EXPORT&&(this._fetchingData=!0,this._numDuplicates=await this._getNumDuplicates(),this._fetchingData=!1),this._clearHighlight(),i!==o.SELECT&&i!==o.REFINE||await this._clearSelection(),t!==o.SELECT)return this._highlightFeatures()}selectionSetsChanged(t){this._selectionSets=[...t.detail]}connectedCallback(){this._mediaQuery=window.matchMedia("(max-width: 600px)"),this._mediaQuery.addEventListener("change",(t=>this._setIsMobile(t)))}async componentWillLoad(){await this._getTranslations(),await this._initModules(),this._initSymbols(),this._onboardingImageUrl=s("../assets/data/images/onboarding.png")}render(){return e(a,null,e("calcite-shell",null,e("calcite-action-bar",{class:"border-bottom-1 action-bar-size","expand-disabled":!0,layout:"horizontal",slot:this._isMobile?"footer":"header"},this._getActionGroup("list-check",o.LIST,this._translations.myLists),this.showRefineSelection?this._getActionGroup("test-data",o.REFINE,this._translations.refineSelection):null,this._getActionGroup("export",o.EXPORT,this._translations.export)),this._getPage(this._pageType)))}disconnectedCallback(){this._mediaQuery.removeEventListener("change",(t=>this._setIsMobile(t)))}async _initModules(){const[t,i]=await h(["esri/geometry/geometryEngine","esri/symbols/support/jsonUtils"]);this._geometryEngine=t,this._jsonUtils=i}_initSymbols(){this._setLineSymbol(this.sketchLineSymbol),this._setPointSymbol(this.sketchPointSymbol),this._setPolygonSymbol(this.sketchPolygonSymbol)}_setLineSymbol(t){this.sketchLineSymbol="simple-line"===(null==t?void 0:t.type)?t:this._jsonUtils.fromJSON(t||{type:"esriSLS",color:[130,130,130,255],width:2,style:"esriSLSSolid"})}_setPointSymbol(t){this.sketchPointSymbol="simple-marker"===(null==t?void 0:t.type)?t:this._jsonUtils.fromJSON(t||{type:"esriSMS",color:[255,255,255,255],angle:0,xoffset:0,yoffset:0,size:6,style:"esriSMSCircle",outline:{type:"esriSLS",color:[50,50,50,255],width:1,style:"esriSLSSolid"}})}_setPolygonSymbol(t){this.sketchPolygonSymbol="simple-fill"===(null==t?void 0:t.type)?t:this._jsonUtils.fromJSON(t||{type:"esriSFS",color:[150,150,150,51],outline:{type:"esriSLS",color:[50,50,50,255],width:2,style:"esriSLSSolid"},style:"esriSFSSolid"})}_setIsMobile(t){this._isMobile=t.matches}_getActionGroup(t,i,s){return e("calcite-action-group",{class:"action-center"+(this.showRefineSelection?" w-1-3":" w-1-2"),layout:"horizontal"},e("div",{class:"background-override"},e("calcite-action",{active:this._pageType===i,alignment:"center",class:"width-full height-full",compact:!1,icon:t,id:t,onClick:()=>{this._setPageType(i)},text:""})),e("calcite-tooltip",{label:"",placement:"bottom","reference-element":t},e("span",null,s)))}_setPageType(t){this._pageType=t}_getPage(t){let i;switch(t){case o.LIST:i=this._getListPage();break;case o.SELECT:i=this._getSelectPage();break;case o.EXPORT:i=this._getExportPage();break;case o.REFINE:i=this._getRefinePage()}return i}_getListPage(){const t=this._hasSelections();return e("calcite-panel",null,this._getLabel(this._translations.myLists),this._getNotice(t?this._translations.listHasSetsTip:this._translations.selectLayerAndAdd,"padding-sides-1 padding-bottom-1","word-wrap-anywhere"),t?this._getSelectionSetList():this._getOnboardingImage(),e("div",{class:"display-flex padding-1"},e("calcite-button",{onClick:()=>{this._setPageType(o.SELECT)},width:"full"},e("span",{class:"font-weight-500"},this._translations.add))))}_getOnboardingImage(){return e("div",{class:"display-flex padding-sides-1"},e("img",{class:"img-container",src:this._onboardingImageUrl}))}_getSelectionSetList(){return e("div",{class:"padding-top-1-2 padding-bottom-1-2"},e("calcite-list",{class:"list-border margin-sides-1"},this._selectionSets.reduce(((t,i,s)=>{var a;const l=this._getSelectionSetIds(i);let n=!0;return i.workflowType===c.REFINE&&(n=Object.keys(i.refineInfos).reduce(((t,s)=>{const e=i.refineInfos[s];return t+(e.addIds.length+e.removeIds.length)}),0)>0),n&&t.push(e("calcite-list-item",{label:i.label,onClick:()=>this._gotoSelection(i,this.mapView)},e("div",{slot:"content"},e("div",{class:"list-label"},i.label),e("div",{class:"list-description"},null===(a=null==i?void 0:i.layerView)||void 0===a?void 0:a.layer.title),e("div",{class:"list-description"},this._translations.selectedFeatures.replace("{{n}}",l.length.toString()))),this._getAction(!0,"pencil","",(t=>this._openSelection(i,t)),!1,"actions-end"),this._getAction(!0,"x","",(t=>this._deleteSelection(s,t)),!1,"actions-end"))),t}),[])))}_getSelectionSetIds(t){return t.workflowType!==c.REFINE?t.selectedIds:Object.keys(t.refineInfos).reduce(((i,s)=>[...i,...t.refineInfos[s].addIds]),[])}_hasSelections(t=!1){let i=[];const s=this._selectionSets.some((t=>{if(t.workflowType===c.REFINE)return i=this._getSelectionSetIds(t),!0}));return t&&s?i.length>0||this._selectionSets.length>1:this._selectionSets.length>0}async _getNumDuplicates(){const t=this._getExportInfos(),i=await b(t),s=u(i);return i.length-s.length}_getExportInfos(){return this._selectionSets.reduce(((t,i)=>(i.download&&(i.workflowType!==c.REFINE?this._updateIds(i.layerView.layer.id,i.layerView,i.selectedIds,t):Object.keys(i.refineInfos).forEach((s=>{const e=i.refineInfos[s];e.addIds.length>0&&this._updateIds(s,e.layerView,e.addIds,t)}))),t)),{})}_updateIds(t,i,s,e){return e[t]?e[t].ids=e[t].ids.concat(s):e[t]={layerView:i,ids:s},e}_getSelectPage(){const t=this._translations.selectSearchTip;return e("calcite-panel",null,this._getLabel(this._translations.stepTwoFull,!0),this._getNotice(t,"padding-1","word-wrap-anywhere"),e("div",null,e("map-select-tools",{bufferColor:this.bufferColor,bufferOutlineColor:this.bufferOutlineColor,class:"font-bold",customLabelEnabled:this.customLabelEnabled,defaultBufferDistance:this.defaultBufferDistance,defaultBufferUnit:this.defaultBufferUnit,enabledLayerIds:this.addresseeLayerIds,isUpdate:!!this._activeSelection,mapView:this.mapView,noResultText:this.noResultText,onSelectionSetChange:t=>this._updateForSelection(t),ref:t=>{this._selectTools=t},searchConfiguration:this._searchConfiguration,selectionLayerIds:this.selectionLayerIds,selectionSet:this._activeSelection,sketchLineSymbol:this.sketchLineSymbol,sketchPointSymbol:this.sketchPointSymbol,sketchPolygonSymbol:this.sketchPolygonSymbol})),this._getPageNavButtons(this._translations.done,0===this._numSelected,(()=>{this._saveSelection()}),this._translations.cancel,!1,(()=>{this._home()})))}_getExportPage(){const t=this._hasSelections(this.showRefineSelection),i=this._numDuplicates>0?"display-block":"display-none";return e("calcite-panel",null,e("div",null,this._getLabel(this._translations.export,!1),t?e("div",null,this._getNotice(this._translations.exportTip,"padding-sides-1"),this._getLabel(this._translations.exportListsLabel),this._getExportSelectionLists(),e("div",{class:"padding-sides-1 "+i},e("div",{class:"display-flex"},e("calcite-label",{layout:"inline"},e("calcite-checkbox",{ref:t=>{this._removeDuplicates=t}}),e("div",{class:"display-flex"},this._translations.removeDuplicate,e("div",{class:"info-message padding-start-1-2"},e("calcite-input-message",{class:"info-blue margin-top-0",scale:"m"},` ${this._translations.numDuplicates.replace("{{n}}",this._numDuplicates.toString())}`)))),e("calcite-icon",{class:"padding-start-1-2 icon",icon:"question",id:"remove-duplicates-icon",scale:"s"})),e("calcite-popover",{closable:!0,label:"",referenceElement:"remove-duplicates-icon"},e("span",{class:"tooltip-message"},this._translations.duplicatesTip))),e("div",{class:"border-bottom"}),e("div",{class:"padding-top-sides-1"},e("calcite-segmented-control",{class:"w-100",onCalciteSegmentedControlChange:t=>this._exportTypeChange(t)},e("calcite-segmented-control-item",{checked:this._exportType===n.PDF,class:"w-50 end-border",value:n.PDF},e("span",{class:"font-weight-500"},this._translations.pdf)),e("calcite-segmented-control-item",{checked:this._exportType===n.CSV,class:"w-50",value:n.CSV},e("span",{class:"font-weight-500"},this._translations.csv)))),e("div",{class:"padding-bottom-1"},this._getExportOptions()),e("div",{class:"padding-1 display-flex"},e("calcite-button",{disabled:!this._downloadActive,loading:this._fetchingData,onClick:()=>{this._export()},width:"full"},e("span",{class:"font-weight-500"},this._translations.export)))):this._getNotice(this._translations.downloadNoLists,"padding-sides-1 padding-bottom-1")))}_exportTypeChange(t){this._exportType=t.target.value}_getExportOptions(){const t=this._addTitle?"display-block":"display-none",i=void 0!==this._titleValue?this._titleValue:this.defaultExportTitle?this.defaultExportTitle:"";return e("div",{class:this._exportType===n.PDF?"display-block":"display-none"},this._getLabel(this._translations.pdfOptions,!0),e("div",{class:"padding-top-sides-1"},e("calcite-label",{class:"label-margin-0"},this._translations.selectPDFLabelOption)),e("div",{class:"padding-sides-1"},e("pdf-download",{defaultNumLabelsPerPage:this.defaultNumLabelsPerPage,disabled:!this._downloadActive,ref:t=>{this._downloadTools=t}})),e("div",{class:"padding-top-sides-1"},e("calcite-label",{class:"label-margin-0",layout:"inline"},e("calcite-checkbox",{checked:this._addTitle,onCalciteCheckboxChange:()=>this._addTitle=!this._addTitle}),this._translations.addTitle)),e("div",{class:t},this._getLabel(this._translations.title,!0,""),e("calcite-input-text",{class:"padding-sides-1",onCalciteInputTextInput:()=>this._changeTitle(),placeholder:this._translations.titlePlaceholder,ref:t=>{this._titleElement=t},value:i})),e("div",{class:"padding-top-sides-1"},e("calcite-label",{class:"label-margin-0",layout:"inline"},e("calcite-checkbox",{checked:this._addMap,onCalciteCheckboxChange:()=>this._addMap=!this._addMap}),this._translations.includeMap)))}_getRefinePage(){const t=this._hasSelections();return e("calcite-panel",null,this._getLabel(this._translations.refineSelection),t?e("div",null,this._getNotice(this._translations.refineTip,"padding-sides-1"),e("refine-selection",{enabledLayerIds:this.selectionLayerIds,mapView:this.mapView,selectionSets:this._selectionSets,sketchLineSymbol:this.sketchLineSymbol,sketchPointSymbol:this.sketchPointSymbol,sketchPolygonSymbol:this.sketchPolygonSymbol})):this._getNotice(this._translations.refineTipNoSelections,"padding-sides-1"))}_getPageNavButtons(t,i,s,a,l,n){return e("div",{class:"padding-bottom-1"},e("div",{class:"display-flex padding-top-sides-1"},e("calcite-button",{disabled:i,onClick:s,width:"full"},e("span",{class:"font-weight-500"},t))),e("div",{class:"display-flex padding-top-1-2 padding-sides-1"},e("calcite-button",{appearance:"outline",disabled:l,onClick:n,width:"full"},e("span",{class:"font-weight-500"},a))))}_changeTitle(){this._titleValue=this._titleElement.value}_getNotice(t,i="padding-1",s=""){return e("calcite-notice",{class:i,icon:"lightbulb",kind:"success",open:!0},e("div",{class:s,slot:"message"},t))}_getLabel(t,i=!1,s="font-bold"){return e("div",{class:"padding-top-sides-1"},e("calcite-label",{class:s+=i?" label-margin-0":""},t))}_getExportSelectionLists(){return this._selectionSets.reduce(((t,i)=>{var s;const a=this._getSelectionSetIds(i),l=i.workflowType!==c.REFINE||a.length>0;return!this._downloadActive&&i.download&&l&&(this._downloadActive=!0),l&&t.push(e("div",{class:"display-flex padding-sides-1 padding-bottom-1"},e("calcite-checkbox",{checked:i.download,class:"align-center",onClick:()=>{this._toggleDownload(i.id)}}),e("calcite-list",{class:"list-border margin-start-1-2 width-full",id:"download-list"},e("calcite-list-item",{disabled:!i.download,label:i.label,onClick:()=>{this._toggleDownload(i.id)}},e("div",{slot:"content"},e("div",{class:"list-label"},i.label),e("div",{class:"list-description"},null===(s=null==i?void 0:i.layerView)||void 0===s?void 0:s.layer.title),e("div",{class:"list-description"},this._translations.selectedFeatures.replace("{{n}}",a.length.toString()))))))),t}),[])||e("div",null)}async _toggleDownload(t){let i=!1;this._selectionSets=this._selectionSets.map((s=>(s.download=s.id===t?!s.download:s.download,i=!!s.download||i,s))),this._downloadActive=i,this._fetchingData=!0,this._numDuplicates=await this._getNumDuplicates(),this._fetchingData=!1,await this._highlightFeatures()}async _export(){const t=this._getSelectionIdsAndViews(this._selectionSets,!0);if(this._exportType===n.PDF){let i="";if(this._addMap&&this.mapView){const t=await this.mapView.takeScreenshot({width:1500,height:2e3});i=null==t?void 0:t.dataUrl}this._fetchingData=!0,await this._downloadTools.downloadPDF(t,this._removeDuplicates.checked,this._addTitle?this._titleElement.value:"",i),this._fetchingData=!1}this._exportType===n.CSV&&(this._fetchingData=!0,await this._downloadTools.downloadCSV(t,this._removeDuplicates.checked),this._fetchingData=!1)}_getSelectionIdsAndViews(t,i=!1){return(i?t.filter((t=>t.download)):t).reduce(((t,i)=>{var s;if(i.workflowType===c.REFINE)Object.keys(i.refineInfos).forEach((s=>{const e=i.refineInfos[s];e.addIds&&(t=this._updateExportInfos(t,e.layerView.layer.id,i.label,e.addIds,e.layerView))}));else{const e=null===(s=null==i?void 0:i.layerView)||void 0===s?void 0:s.layer.id;t=this._updateExportInfos(t,e,i.label,i.selectedIds,i.layerView)}return t}),{})}_updateExportInfos(t,i,s,e,a){return i&&Object.keys(t).indexOf(i)>-1?(t[i].ids=[...new Set([...t[i].ids,...e])],t[i].selectionSetNames.push(s)):i&&(t[i]={ids:e,layerView:a,selectionSetNames:[s]}),t}_getAction(t,i,s,a,l=!1,n=""){return e("calcite-action",{disabled:!t,icon:i,indicator:l,onClick:a,slot:n,text:s})}_updateForSelection(t){this._numSelected=t.detail,this._saveEnabled=this._numSelected>0}async _home(){await this._clearSelection(),this._setPageType(o.LIST)}async _saveSelection(){var t,i;const s=await(null===(t=this._selectTools)||void 0===t?void 0:t.getSelection()),e=null===(i=this._selectTools)||void 0===i?void 0:i.isUpdate;return this._selectionSets=e?this._selectionSets.map((t=>t.id===s.id?s:t)):[...this._selectionSets,s],this._home()}async _clearSelection(){var t;await(null===(t=this._selectTools)||void 0===t?void 0:t.clearSelection()),this._numSelected=0,this._activeSelection=void 0}_deleteSelection(t,i){return i.stopPropagation(),this._selectionSets=this._selectionSets.filter(((i,s)=>{if(s!==t)return i})),this._highlightFeatures()}_gotoSelection(t,i){d(t.selectedIds,t.layerView,i,this.featureHighlightEnabled,this.featureEffect)}_openSelection(t,i){i.stopPropagation(),this._activeSelection=t,this._pageType=t.workflowType===c.REFINE?o.REFINE:o.SELECT}async _highlightFeatures(){this._clearHighlight();const t=this._getSelectionIdsAndViews(this._selectionSets,this._pageType===o.EXPORT),i=Object.keys(t);if(i.length>0)for(let s=0;s<i.length;s++){const e=t[i[s]];p.highlightHandles.push(await r(e.ids,e.layerView,this.mapView))}}_checkPopups(){var t;"boolean"!=typeof this._popupsEnabled&&(this._popupsEnabled=null===(t=this.mapView)||void 0===t?void 0:t.popupEnabled)}_clearHighlight(){p&&p.highlightHandles&&p.removeHandles()}async _getTranslations(){const t=await g(this.el);this._translations=t[0]}get el(){return l(this)}static get watchers(){return{mapView:["mapViewWatchHandler"],searchConfiguration:["watchSearchConfigurationHandler"],sketchLineSymbol:["sketchLineSymbolWatchHandler"],sketchPointSymbol:["sketchPointSymbolWatchHandler"],sketchPolygonSymbol:["sketchPolygonSymbolWatchHandler"],_pageType:["pageTypeWatchHandler"]}}};m.style=':host{display:block;--calcite-input-message-spacing-value:0}.align-center{align-items:center}.border-bottom-1{border-width:0px;border-bottom-width:1px;border-style:solid;border-color:var(--calcite-ui-border-3)}.action-bar-size{height:3.5rem;width:100%}.w-1-2{width:50%}.w-1-3{width:33.33%}.action-center{-webkit-box-align:center;-webkit-align-items:center;-ms-grid-row-align:center;align-items:center;align-content:center;justify-content:center}.width-full{width:100%}.height-full{height:100%}.padding-1{padding:1rem}.padding-top-sides-1{padding-block-start:1rem;padding-inline-start:1rem;padding-inline-end:1rem}.padding-sides-1{padding-inline-start:1rem;padding-inline-end:1rem}.padding-end-1-2{padding-inline-end:.5rem}.padding-top-1-2{padding-block-start:.5rem}.padding-top-1{padding-top:1rem}.padding-bottom-1{padding-bottom:1rem}.padding-bottom-1-2{padding-bottom:.5rem}.info-blue{color:#00A0FF}.info-message{justify-content:center;display:grid}.font-bold{font-weight:bold}.display-flex{display:flex}.display-block{display:block}.display-none{display:none}.border-bottom{border-bottom:1px solid var(--calcite-ui-border-2)}.padding-start-1-2{padding-inline-start:0.5rem}.list-border{border:1px solid var(--calcite-ui-border-2)}.margin-sides-1{margin-inline-start:1rem;margin-inline-end:1rem}.margin-start-1-2{margin-inline-start:0.5rem}.float-right{float:right}.float-right[dir="rtl"]{float:left}.float-left{float:left}.float-left[dir="rtl"]{float:right}.margin-top-0{margin-block-start:0 !important}.height-1-1-2{height:1.5rem}.main-background{background-color:var(--calcite-ui-foreground-2)}.position-right{position:absolute;right:1rem}.position-right[dir="rtl"]{position:absolute;left:1rem}.label-margin-0{--calcite-label-margin-bottom:0}.list-label{color:var(--calcite-ui-text-1)}.list-label,.list-description{font-family:var(--calcite-sans-family);font-size:var(--calcite-font-size--2);font-weight:var(--calcite-font-weight-normal);overflow-wrap:break-word;word-break:break-word}.list-description{margin-block-start:0.125rem;color:var(--calcite-ui-text-3)}.img-container{width:100%;height:100%}.font-weight-500{font-weight:500}.background-override{height:100%;width:100%;--calcite-ui-foreground-3:var(--calcite-ui-brand);--calcite-ui-foreground-2:var(--calcite-ui-brand-hover);--calcite-ui-text-1:var(--calcite-ui-text-inverse)}.word-wrap-anywhere{word-wrap:anywhere}';export{m as public_notification}
|
@@ -1,6 +0,0 @@
|
|
1
|
-
/*!
|
2
|
-
* Copyright 2022 Esri
|
3
|
-
* Licensed under the Apache License, Version 2.0
|
4
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
5
|
-
*/
|
6
|
-
export{I as calcite_input_time_picker}from"./p-06712292.js";import"./p-33613993.js";import"./p-8e9d9e6a.js";import"./p-a16feeec.js";import"./p-8b448a5b.js";import"./p-e3525c00.js";import"./p-ad75b9bb.js";import"./p-43ba7a04.js";import"./p-d2d3e4b5.js";import"./p-d74e95e5.js";import"./p-7f271c31.js";import"./p-588bc0c0.js";import"./p-80ea5869.js";import"./p-96239d0d.js";import"./p-557d4cc5.js";
|
@@ -1,6 +0,0 @@
|
|
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,h as i,H as s,g as e,c as a}from"./p-33613993.js";import{g as h}from"./p-22833bd3.js";import{q as l,a as o,b as n,g as c,c as r}from"./p-767002cd.js";import{l as d}from"./p-0dab4c93.js";import{d as p}from"./p-0503c78d.js";import"./p-e1a4994d.js";import"./p-2a58e378.js";const m=class{constructor(i){t(this,i),this.layer=void 0,this.mapView=void 0,this.zoomAndScrollToSelected=void 0,this._cardLoading=!1,this._graphics=void 0,this._translations=void 0}async featureSelectionChange(t){const i=t.detail;this._cardLoading=!0;const s=i.length>0?await l(i,this.layer,[],!1,this.mapView.spatialReference):[];this._graphics=s,this._cardLoading=!1}async layerSelectionChange(t){const i=t.detail[0];this.layer=await o(this.mapView,i)}async componentWillLoad(){await this._getTranslations()}render(){var t,e;const a=(null===(t=this._graphics)||void 0===t?void 0:t.length)>0?"":"display-none",h=(null===(e=this._graphics)||void 0===e?void 0:e.length)>0?"display-none":"";return i(s,null,i("div",{class:"border-rounded overflow-auto height-full"},i("calcite-shell",{class:"position-relative "+a},i("div",null,i("info-card",{graphics:this._graphics,isLoading:this._cardLoading,mapView:this.mapView,zoomAndScrollToSelected:this.zoomAndScrollToSelected}))),i("div",{class:"padding-1 "+h},i("calcite-notice",{icon:"table",open:!0},i("div",{slot:"message"},this._translations.selectFeaturesToStart)))))}async _getTranslations(){const t=await h(this.el);this._translations=t[0]}get el(){return e(this)}};m.style=":host{display:block !important}.display-flex{display:flex}.display-none{display:none}.w-100{width:100%}.padding-bottom-1{padding-bottom:1rem}.padding-1{padding:1rem}.position-relative{position:relative}.focus-margin{margin:1px 1px 0px 1px}.overflow-auto{overflow:auto}.border-rounded{border:1px solid var(--calcite-ui-border-2);border-radius:5px}.height-full{height:100%}card-manager{display:block}";const u=class{constructor(i){t(this,i),this.featureSelectionChange=a(this,"featureSelectionChange",7),this._allIds=[],this._tableSorting=!1,this.onTableNodeCreate=t=>{this._tableNode=t},this.mapInfo=void 0,this.mapView=void 0,this.showNewestFirst=void 0,this.zoomAndScrollToSelected=void 0,this._alertOpen=!1,this._fetchingData=!1,this._layer=void 0,this._selectedIndexes=[],this._showOnlySelected=!1,this._sortActive=!1,this._translations=void 0}async mapViewWatchHandler(){this._fetchingData=!0;const t=await n(this.mapView);this._layer=await o(this.mapView,t[0]),this.reactiveUtils.on((()=>this.mapView),"click",(t=>{this._mapClicked(t)})),this._fetchingData=!1}async _layerWatchHandler(){this._fetchingData=!0,await this._resetTable(),this._fetchingData=!1}async _sortActiveWatchHandler(){this._sortActive||await this._sortTable()}async getSelectedGraphics(){return this._selectedIndexes.length>0?await this._getGraphics(this._selectedIndexes):[]}async selectionChanged(t){if(this.zoomAndScrollToSelected){const i=t.detail,s=i.getObjectId(),e=this._table.viewModel.getObjectIdIndex(s);this._table.scrollToIndex(e);const a=i.layer;let h;this.mapView.allLayerViews.toArray().some((t=>{if(t.layer.title===a.title&&"feature"===t.layer.type)return h=t,!0})),h&&await c([s],h,this.mapView,!0)}}async componentWillLoad(){await this._getTranslations(),await this._initModules()}render(){if(!this._layer)return null;const t=this._fetchingData?"display-none":"",e=this._fetchingData?"":"display-none",a=this._alertShowAction?"":"display-none",h=this._allIds.length.toString(),l=this._selectedIndexes.length.toString();return i(s,null,i("calcite-shell",null,this._getTableControlRow("header"),i("div",{class:"height-full width-full"},i("calcite-panel",{class:"height-full width-full"},i("calcite-loader",{class:e,label:this._translations.fetchingData,scale:"l"}),i("div",{class:t,ref:this.onTableNodeCreate})),i("div",{class:"bottom-left background text-color"},this._translations.recordsSelected.replace("{{total}}",h).replace("{{selected}}",l))),i("calcite-alert",{icon:this._alertIcon,kind:this._alertKind,label:"",onCalciteAlertClose:()=>this._alertClosed(),open:this._alertOpen,placement:"top"},i("div",{slot:"title"},this._alertTitle),i("div",{slot:"message"},this._alertMessage),i("calcite-link",{class:a,onClick:this._alertActionFunction,slot:"link"},this._alertActionText))))}async _initModules(){const[t,i]=await d(["esri/widgets/FeatureTable","esri/core/reactiveUtils"]);this.FeatureTable=t,this.reactiveUtils=i}_getTableControlRow(t){const s=this._selectedIndexes.length>0;return i("div",{class:"display-flex table-border height-51",slot:t},i("calcite-action-bar",{expandDisabled:!0,expanded:!0,layout:"horizontal"},i("div",{class:"border-end"},i("map-layer-picker",{appearance:"transparent",mapView:this.mapView,onLayerSelectionChange:t=>this._layerSelectionChanged(t),placeholderIcon:"layers",scale:"l",type:"dropdown"})),i("calcite-action",{appearance:"solid",disabled:!s,icon:"magnifying-glass",id:"magnifying-glass",label:this._translations.zoom,onClick:()=>this._zoom(),text:this._translations.zoom,textEnabled:!0}),i("calcite-tooltip",{label:"",placement:"bottom","reference-element":"magnifying-glass"},i("span",null,this._translations.zoom)),i("calcite-action",{appearance:"solid",icon:"filter",id:"filter",onClick:()=>this._filter(),text:this._translations.filters,"text-enabled":"true",textEnabled:!0}),i("calcite-tooltip",{label:"",placement:"bottom","reference-element":"filter"},i("span",null,this._translations.filters)),i("calcite-action",{appearance:"solid",disabled:!s,id:"trash",onClick:()=>this._delete(),text:""},i("calcite-button",{appearance:"transparent",iconStart:"trash",kind:"danger"},this._translations.delete)),i("calcite-tooltip",{label:"",placement:"bottom","reference-element":"trash"},i("span",null,this._translations.delete)),i("calcite-action",{appearance:"solid",disabled:!s,icon:"erase",id:"erase",onClick:()=>this._clearSelection(),text:this._translations.clearSelection,"text-enabled":"true",textEnabled:!0}),i("calcite-tooltip",{label:"",placement:"bottom","reference-element":"erase"},i("span",null,this._translations.clearSelection))),i("calcite-dropdown",null,i("calcite-action",{appearance:"solid",label:"",slot:"trigger",text:""},i("calcite-button",{appearance:"transparent",iconEnd:"chevron-down",kind:"neutral"},this._translations.more)),i("calcite-dropdown-group",{"selection-mode":"none"},i("calcite-dropdown-item",{iconStart:"list-check-all",onClick:()=>this._selectAll()},this._translations.selectAll),i("calcite-dropdown-item",{iconStart:"selected-items-filter",onClick:()=>this._toggleShowSelected()},this._showOnlySelected?this._translations.showAll:this._translations.showSelected),i("calcite-dropdown-item",{iconStart:"compare",onClick:()=>this._switchSelected()},this._translations.switchSelected),i("calcite-dropdown-item",{iconStart:"refresh",onClick:()=>this._refresh()},this._translations.refresh),i("calcite-dropdown-item",{iconStart:"export",onClick:()=>{this._exportToCSV()}},this._translations.exportCSV))))}async _getTable(t,i){this._layer&&await this._layer.when((async()=>{this._table=new this.FeatureTable({layer:this._layer,view:this.mapView,highlightEnabled:!0,multiSortEnabled:!1,visibleElements:{header:!1,menu:!1},tableTemplate:{columnTemplates:i},container:t}),await this._table.when((async()=>{this._table.highlightIds.on("change",(()=>{this._selectedIndexes=this._table.highlightIds.toArray(),this._showOnlySelected&&(this._selectedIndexes.length>0?this._table.filterBySelection():this._toggleShowSelected()),this.featureSelectionChange.emit(this._selectedIndexes)})),this.reactiveUtils.watch((()=>this._table.activeSortOrders),(t=>{var i,s,e,a;this._sortActive=t.length>0&&"asc"===(null===(i=t[0])||void 0===i?void 0:i.direction)||"desc"===(null===(s=t[0])||void 0===s?void 0:s.direction)||null===(null===(e=t[0])||void 0===e?void 0:e.direction)&&(null===(a=t[0])||void 0===a?void 0:a.fieldName)===this._layer.objectIdField}))}))}))}async _resetTable(){if(this._layer&&this._table){this._clearSelection(),this._allIds=[],this.featureSelectionChange.emit(this._selectedIndexes);const t=this._getColumnTemplates(this._layer.id);this._table.layer=this._layer,this._table.tableTemplate.columnTemplates=t,this._editEnabled=this._layer.editingEnabled,this._table.view=this.mapView,this._table.editingEnabled=this._editEnabled,this._table.clearSelectionFilter(),this._showOnlySelected=!1,this._sortActive=!1,await this._sortTable()}}async _sortTable(){this._table&&this._layer&&!this._sortActive&&!this._tableSorting&&this.showNewestFirst&&(this._tableSorting=!0,await this._table.when((async()=>{await this._layer.when((async()=>{this._table.sortColumn(this._layer.objectIdField,"desc"),this._tableSorting=!1}))})))}async _mapClicked(t){const i={include:this._layer},s=await this.mapView.hitTest(t.screenPoint,i);s.results.length>0&&(s.results.forEach((t=>{const i=t.graphic.getObjectId(),s=this._table.highlightIds.indexOf(i);s>-1?this._table.highlightIds.removeAt(s):this._table.highlightIds.add(i)})),this._showOnlySelected&&this._table.filterBySelection())}_alertClosed(){this._alertOpen=!1}_selectAll(){const t=this._allIds;this._table.highlightIds.addMany(t),this._selectedIndexes=t}_toggleShowSelected(){this._showOnlySelected=!this._showOnlySelected,this._showOnlySelected?this._table.filterBySelection():this._table.clearSelectionFilter()}_clearSelection(){this._selectedIndexes=[],this._table.highlightIds.removeAll()}_filter(){alert("do whatever this button is supposed to do")}_switchSelected(){const t=[...this._selectedIndexes];this._table.highlightIds.removeAll();const i=this._allIds.reduce(((i,s)=>(t.indexOf(s)<0&&i.push(s),i)),[]);this._table.highlightIds.addMany(i),this._selectedIndexes=i}async _exportToCSV(){const t={},i=this._table.highlightIds.toArray();t[this._layer.id]={selectionSetNames:[this._layer.title],ids:i,layer:this._layer},p(t,!1,!1,!0)}_refresh(){this._table.refresh()}_zoom(){this._table.zoomToSelection()}_delete(){this._editEnabled?(this._alertIcon="trash",this._alertTitle=this._translations.deleteRows,this._alertActionText=this._translations.delete,this._alertShowAction=!0,this._alertMessage=this._translations.confirm,this._alertKind="danger",this._alertActionFunction=()=>{this._layer.applyEdits({deleteFeatures:this._table.highlightIds.toArray()}),this._alertOpen=!1}):(this._alertIcon="layer-broken",this._alertTitle=this._translations.deleteDisabled,this._alertShowAction=!1,this._alertMessage=this._translations.enableEditing,this._alertKind="warning"),this._alertOpen=!0}async _getGraphics(t){return t.length>0?l(t,this._table.layer,[],!1,this.mapView.spatialReference):[]}async _layerSelectionChanged(t){const i=t.detail[0];if(i!==this._layer.id||0===this._allIds.length){this._fetchingData=!0;const t=this._getColumnTemplates(i);this._layer=await o(this.mapView,i),this._allIds=await r(this._layer),this._table?t&&(this._table.tableTemplate.columnTemplates=t):await this._getTable(this._tableNode,t),await this._table.when((()=>{this._table.highlightIds.removeAll()})),this._selectedIndexes=[],this._table.layer=this._layer,this._table.render()}this._sortActive=!1,await this._sortTable(),this._fetchingData=!1}_getColumnTemplates(t){var i;let s;return null===(i=this.mapInfo.layerInfos)||void 0===i||i.some((i=>{if(i.id===t)return s=i,!0})),null==s?void 0:s.columnTemplates}async _getTranslations(){const t=await h(this.el);this._translations=t[0]}get el(){return e(this)}static get watchers(){return{mapView:["mapViewWatchHandler"],_layer:["_layerWatchHandler"],_sortActive:["_sortActiveWatchHandler"]}}};u.style=':host{display:block}.height-full{height:100%}.width-full{width:100%}.display-flex{display:flex}.table-border{border:1px solid var(--calcite-ui-border-2)}.border-end{border-inline-end:1px solid var(--calcite-ui-border-2)}.padding-5{padding:5px}.height-51{height:51px}.bottom-left{position:absolute;left:0;bottom:0}html[dir="rtl"] .bottom-left{position:absolute;right:0;bottom:0}.background{background-color:var(--calcite-ui-background)}.text-color{color:var(--calcite-ui-text-1)}';const g=class{constructor(i){t(this,i),this.mapChanged=a(this,"mapChanged",7),this._loadedId="",this.mapInfos=[],this.mapView=void 0,this._searchConfiguration=void 0,this._webMapInfo=void 0}async mapInfoChange(t){await this._loadMap(t.detail)}async componentWillLoad(){await this._initModules()}render(){return i(s,null,i("map-picker",{mapInfos:this.mapInfos}),i("div",{class:"map-height",ref:t=>this._mapDiv=t}),i("map-tools",{class:"box-shadow",mapView:this.mapView,ref:t=>this._mapTools=t,searchConfiguration:this._searchConfiguration}))}async _initModules(){const[t,i,s]=await d(["esri/WebMap","esri/views/MapView","esri/widgets/Home"]);this.WebMap=t,this.MapView=i,this.Home=s}async _loadMap(t){let i=null==t?void 0:t.id;if(this._webMapInfo=(""===i||!i)&&this.mapInfos.length>0?this.mapInfos[0]:t,i=this._webMapInfo.id,this._loadedId!==i){const t=new this.WebMap({portalItem:{id:i}});this.mapView=new this.MapView({container:this._mapDiv,map:t,resizeAlign:"top-left"}),this._loadedId=i,this._searchConfiguration=this._webMapInfo.searchConfiguration,this.mapChanged.emit({id:i,mapView:this.mapView}),await this.mapView.when((()=>{const t=new this.Home({view:this.mapView});this.mapView.ui.add(t,{position:"top-left",index:3}),this.mapView.ui.add(this._mapTools,{position:"top-right",index:0})}))}}get el(){return e(this)}};g.style=":host{display:block;--calcite-label-margin-bottom:0;--calcite-block-padding:0}.map-height{height:calc(100% - 58px)}.box-shadow{box-shadow:none !important}";export{m as card_manager,u as layer_table,g as map_card}
|