@esri/solutions-components 0.6.12 → 0.6.14
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/assets/t9n/map-layer-picker/resources.json +4 -0
- package/dist/assets/t9n/map-layer-picker/resources_en.json +4 -0
- package/dist/cjs/basemap-gallery_6.cjs.entry.js +20 -5
- package/dist/cjs/buffer-tools_4.cjs.entry.js +1 -1
- package/dist/cjs/calcite-chip_3.cjs.entry.js +803 -0
- package/dist/cjs/calcite-combobox_6.cjs.entry.js +76 -28
- package/dist/cjs/calcite-shell-panel_14.cjs.entry.js +2 -1
- package/dist/cjs/card-manager_3.cjs.entry.js +169 -79
- package/dist/cjs/clean-url-d5326abb.js +573 -0
- package/dist/cjs/crowdsource-manager.cjs.entry.js +22 -7
- package/dist/cjs/{downloadUtils-43f5be48.js → downloadUtils-34a515ad.js} +297 -52
- package/dist/cjs/edit-card_2.cjs.entry.js +8 -3
- package/dist/cjs/{index.es-8da43c21.js → index.es-0ba11065.js} +3 -2
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/map-select-tools_3.cjs.entry.js +10 -7
- package/dist/cjs/{mapViewUtils-a4dd36ec.js → mapViewUtils-a2884698.js} +39 -55
- package/dist/cjs/public-notification.cjs.entry.js +7 -6
- package/dist/cjs/{publicNotificationStore-b69862af.js → publicNotificationStore-610bd880.js} +0 -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/basemap-gallery/basemap-gallery.js +23 -1
- package/dist/collection/components/card-manager/card-manager.css +0 -5
- package/dist/collection/components/card-manager/card-manager.js +3 -3
- package/dist/collection/components/crowdsource-manager/crowdsource-manager.css +2 -2
- package/dist/collection/components/crowdsource-manager/crowdsource-manager.js +210 -6
- package/dist/collection/components/edit-card/edit-card.css +8 -0
- package/dist/collection/components/edit-card/edit-card.js +19 -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 +215 -69
- package/dist/collection/components/map-card/map-card.js +115 -5
- package/dist/collection/components/map-layer-picker/map-layer-picker.css +4 -0
- package/dist/collection/components/map-layer-picker/map-layer-picker.js +107 -27
- package/dist/collection/components/map-picker/map-picker.css +5 -1
- package/dist/collection/components/map-picker/map-picker.js +3 -3
- package/dist/collection/components/map-tools/map-tools.js +104 -1
- 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/interfaces.ts +12 -1
- package/dist/collection/utils/mapViewUtils.js +38 -52
- package/dist/collection/utils/mapViewUtils.ts +41 -57
- package/dist/collection/utils/publicNotificationStore.js +0 -4
- package/dist/collection/utils/publicNotificationStore.ts +0 -4
- package/dist/collection/utils/test/downloadUtils.spec.js +163 -134
- package/dist/collection/utils/test/downloadUtils.spec.tsx +2 -0
- package/dist/components/basemap-gallery2.js +2 -0
- package/dist/components/calcite-modal.js +1 -409
- package/dist/components/card-manager2.js +4 -4
- package/dist/components/clean-url.js +567 -0
- package/dist/components/crowdsource-manager.js +42 -17
- package/dist/components/downloadUtils.js +295 -50
- package/dist/components/edit-card2.js +6 -1
- package/dist/components/info-card2.js +2 -2
- package/dist/components/layer-table2.js +194 -102
- package/dist/components/map-card2.js +17 -5
- package/dist/components/map-layer-picker2.js +114 -52
- package/dist/components/map-picker2.js +4 -4
- package/dist/components/map-select-tools2.js +55 -43
- package/dist/components/map-tools2.js +20 -1
- package/dist/components/mapViewUtils.js +39 -53
- package/dist/components/modal.js +416 -0
- package/dist/components/pdf-download2.js +6 -4
- package/dist/components/public-notification.js +4 -4
- package/dist/components/publicNotificationStore.js +0 -4
- package/dist/components/refine-selection2.js +61 -49
- 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/basemap-gallery_6.entry.js +20 -5
- 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 +5 -5
- 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_3.entry.js +797 -0
- 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 +83 -35
- 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-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-tree_3.entry.js +1 -1
- package/dist/esm/card-manager_3.entry.js +169 -79
- package/dist/esm/clean-url-bce022e6.js +567 -0
- package/dist/esm/crowdsource-manager.entry.js +22 -7
- 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-ac67a786.js} +297 -52
- package/dist/esm/edit-card_2.entry.js +8 -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-f553598f.js} +3 -2
- 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 +10 -7
- package/dist/esm/{mapViewUtils-00a04d52.js → mapViewUtils-8141d8c1.js} +39 -53
- 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 +7 -6
- package/dist/esm/{publicNotificationStore-90a6a274.js → publicNotificationStore-dcf39a55.js} +0 -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-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-08b52ed8.entry.js +6 -0
- 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-16362eb4.js +36 -0
- package/dist/solutions-components/{p-afb35c95.js → p-17d176b5.js} +14 -43
- package/dist/solutions-components/{p-3691a072.js → p-1ab414e0.js} +2 -2
- 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-3a8d82a2.js +11 -0
- package/dist/solutions-components/{p-628c170b.entry.js → p-3ab94526.entry.js} +1 -1
- package/dist/solutions-components/{p-9791fbf1.entry.js → p-3d7aa1b2.entry.js} +1 -1
- 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-57cf6784.entry.js +6 -0
- 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-64b22d57.entry.js +6 -0
- package/dist/solutions-components/{p-747a1293.js → p-6510c06c.js} +1 -1
- package/dist/solutions-components/p-654dd5df.entry.js +6 -0
- 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-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-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-89cbb86a.js → p-a26711e8.js} +3 -3
- 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-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-b1c8c6d7.entry.js +6 -0
- 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-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-b9d29f30.entry.js +6 -0
- 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-9b75102b.entry.js → p-c073d2d6.entry.js} +1 -1
- package/dist/solutions-components/p-c6b7e7ff.js +11 -0
- package/dist/solutions-components/{p-0503c78d.js → p-c8d0ce92.js} +44 -29
- package/dist/solutions-components/{p-dc80cb69.entry.js → p-ca0b3a2b.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-d793ec96.entry.js → p-e76949eb.entry.js} +5 -5
- 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-ee7e2f00.entry.js +34 -0
- 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-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/interfaces.ts +12 -1
- package/dist/solutions-components/utils/mapViewUtils.ts +41 -57
- package/dist/solutions-components/utils/publicNotificationStore.ts +0 -4
- package/dist/solutions-components/utils/test/downloadUtils.spec.tsx +2 -0
- package/dist/types/components/basemap-gallery/basemap-gallery.d.ts +5 -0
- package/dist/types/components/crowdsource-manager/crowdsource-manager.d.ts +45 -1
- package/dist/types/components/edit-card/edit-card.d.ts +8 -0
- package/dist/types/components/layer-table/layer-table.d.ts +82 -26
- package/dist/types/components/map-card/map-card.d.ts +25 -1
- package/dist/types/components/map-layer-picker/map-layer-picker.d.ts +50 -3
- package/dist/types/components/map-picker/map-picker.d.ts +2 -2
- package/dist/types/components/map-tools/map-tools.d.ts +21 -1
- package/dist/types/components/pdf-download/pdf-download.d.ts +4 -2
- package/dist/types/components.d.ts +218 -4
- package/dist/types/preact.d.ts +6 -3
- package/dist/types/utils/downloadUtils.d.ts +34 -16
- package/dist/types/utils/interfaces.d.ts +10 -1
- package/dist/types/utils/mapViewUtils.d.ts +8 -24
- package/dist/types/utils/publicNotificationStore.d.ts +0 -2
- package/package.json +8 -9
- package/dist/cjs/calcite-chip.cjs.entry.js +0 -259
- package/dist/cjs/calcite-notice.cjs.entry.js +0 -139
- package/dist/cjs/calcite-tooltip.cjs.entry.js +0 -439
- package/dist/esm/calcite-chip.entry.js +0 -255
- package/dist/esm/calcite-notice.entry.js +0 -135
- package/dist/esm/calcite-tooltip.entry.js +0 -435
- 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-1a47516a.entry.js +0 -22
- package/dist/solutions-components/p-2cff8331.entry.js +0 -6
- package/dist/solutions-components/p-3a7cd2b0.entry.js +0 -37
- package/dist/solutions-components/p-3e9fc0aa.entry.js +0 -11
- package/dist/solutions-components/p-712ea336.entry.js +0 -11
- package/dist/solutions-components/p-767002cd.js +0 -36
- 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
@@ -0,0 +1,567 @@
|
|
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
|
+
/*! *****************************************************************************
|
7
|
+
Copyright (c) Microsoft Corporation.
|
8
|
+
|
9
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
10
|
+
purpose with or without fee is hereby granted.
|
11
|
+
|
12
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
13
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
14
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
15
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
16
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
17
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
18
|
+
PERFORMANCE OF THIS SOFTWARE.
|
19
|
+
***************************************************************************** */
|
20
|
+
/* global Reflect, Promise */
|
21
|
+
|
22
|
+
var extendStatics = function(d, b) {
|
23
|
+
extendStatics = Object.setPrototypeOf ||
|
24
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
25
|
+
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
26
|
+
return extendStatics(d, b);
|
27
|
+
};
|
28
|
+
|
29
|
+
function __extends(d, b) {
|
30
|
+
extendStatics(d, b);
|
31
|
+
function __() { this.constructor = d; }
|
32
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
33
|
+
}
|
34
|
+
|
35
|
+
var __assign = function() {
|
36
|
+
__assign = Object.assign || function __assign(t) {
|
37
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
38
|
+
s = arguments[i];
|
39
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
40
|
+
}
|
41
|
+
return t;
|
42
|
+
};
|
43
|
+
return __assign.apply(this, arguments);
|
44
|
+
};
|
45
|
+
|
46
|
+
/* Copyright (c) 2017 Environmental Systems Research Institute, Inc.
|
47
|
+
* Apache-2.0 */
|
48
|
+
/**
|
49
|
+
* Checks parameters to see if we should use FormData to send the request
|
50
|
+
* @param params The object whose keys will be encoded.
|
51
|
+
* @return A boolean indicating if FormData will be required.
|
52
|
+
*/
|
53
|
+
function requiresFormData(params) {
|
54
|
+
return Object.keys(params).some(function (key) {
|
55
|
+
var value = params[key];
|
56
|
+
if (!value) {
|
57
|
+
return false;
|
58
|
+
}
|
59
|
+
if (value && value.toParam) {
|
60
|
+
value = value.toParam();
|
61
|
+
}
|
62
|
+
var type = value.constructor.name;
|
63
|
+
switch (type) {
|
64
|
+
case "Array":
|
65
|
+
return false;
|
66
|
+
case "Object":
|
67
|
+
return false;
|
68
|
+
case "Date":
|
69
|
+
return false;
|
70
|
+
case "Function":
|
71
|
+
return false;
|
72
|
+
case "Boolean":
|
73
|
+
return false;
|
74
|
+
case "String":
|
75
|
+
return false;
|
76
|
+
case "Number":
|
77
|
+
return false;
|
78
|
+
default:
|
79
|
+
return true;
|
80
|
+
}
|
81
|
+
});
|
82
|
+
}
|
83
|
+
/**
|
84
|
+
* Converts parameters to the proper representation to send to the ArcGIS REST API.
|
85
|
+
* @param params The object whose keys will be encoded.
|
86
|
+
* @return A new object with properly encoded values.
|
87
|
+
*/
|
88
|
+
function processParams(params) {
|
89
|
+
var newParams = {};
|
90
|
+
Object.keys(params).forEach(function (key) {
|
91
|
+
var _a, _b;
|
92
|
+
var param = params[key];
|
93
|
+
if (param && param.toParam) {
|
94
|
+
param = param.toParam();
|
95
|
+
}
|
96
|
+
if (!param &&
|
97
|
+
param !== 0 &&
|
98
|
+
typeof param !== "boolean" &&
|
99
|
+
typeof param !== "string") {
|
100
|
+
return;
|
101
|
+
}
|
102
|
+
var type = param.constructor.name;
|
103
|
+
var value;
|
104
|
+
// properly encodes objects, arrays and dates for arcgis.com and other services.
|
105
|
+
// ported from https://github.com/Esri/esri-leaflet/blob/master/src/Request.js#L22-L30
|
106
|
+
// also see https://github.com/Esri/arcgis-rest-js/issues/18:
|
107
|
+
// null, undefined, function are excluded. If you want to send an empty key you need to send an empty string "".
|
108
|
+
switch (type) {
|
109
|
+
case "Array":
|
110
|
+
// Based on the first element of the array, classify array as an array of arrays, an array of objects
|
111
|
+
// to be stringified, or an array of non-objects to be comma-separated
|
112
|
+
// eslint-disable-next-line no-case-declarations
|
113
|
+
var firstElementType = (_b = (_a = param[0]) === null || _a === void 0 ? void 0 : _a.constructor) === null || _b === void 0 ? void 0 : _b.name;
|
114
|
+
value =
|
115
|
+
firstElementType === "Array" ? param : // pass thru array of arrays
|
116
|
+
firstElementType === "Object" ? JSON.stringify(param) : // stringify array of objects
|
117
|
+
param.join(","); // join other types of array elements
|
118
|
+
break;
|
119
|
+
case "Object":
|
120
|
+
value = JSON.stringify(param);
|
121
|
+
break;
|
122
|
+
case "Date":
|
123
|
+
value = param.valueOf();
|
124
|
+
break;
|
125
|
+
case "Function":
|
126
|
+
value = null;
|
127
|
+
break;
|
128
|
+
case "Boolean":
|
129
|
+
value = param + "";
|
130
|
+
break;
|
131
|
+
default:
|
132
|
+
value = param;
|
133
|
+
break;
|
134
|
+
}
|
135
|
+
if (value || value === 0 || typeof value === "string" || Array.isArray(value)) {
|
136
|
+
newParams[key] = value;
|
137
|
+
}
|
138
|
+
});
|
139
|
+
return newParams;
|
140
|
+
}
|
141
|
+
|
142
|
+
/* Copyright (c) 2017 Environmental Systems Research Institute, Inc.
|
143
|
+
* Apache-2.0 */
|
144
|
+
/**
|
145
|
+
* Encodes keys and parameters for use in a URL's query string.
|
146
|
+
*
|
147
|
+
* @param key Parameter's key
|
148
|
+
* @param value Parameter's value
|
149
|
+
* @returns Query string with key and value pairs separated by "&"
|
150
|
+
*/
|
151
|
+
function encodeParam(key, value) {
|
152
|
+
// For array of arrays, repeat key=value for each element of containing array
|
153
|
+
if (Array.isArray(value) && value[0] && Array.isArray(value[0])) {
|
154
|
+
return value.map(function (arrayElem) { return encodeParam(key, arrayElem); }).join("&");
|
155
|
+
}
|
156
|
+
return encodeURIComponent(key) + "=" + encodeURIComponent(value);
|
157
|
+
}
|
158
|
+
/**
|
159
|
+
* Encodes the passed object as a query string.
|
160
|
+
*
|
161
|
+
* @param params An object to be encoded.
|
162
|
+
* @returns An encoded query string.
|
163
|
+
*/
|
164
|
+
function encodeQueryString(params) {
|
165
|
+
var newParams = processParams(params);
|
166
|
+
return Object.keys(newParams)
|
167
|
+
.map(function (key) {
|
168
|
+
return encodeParam(key, newParams[key]);
|
169
|
+
})
|
170
|
+
.join("&");
|
171
|
+
}
|
172
|
+
|
173
|
+
/* Copyright (c) 2017 Environmental Systems Research Institute, Inc.
|
174
|
+
* Apache-2.0 */
|
175
|
+
/**
|
176
|
+
* Encodes parameters in a [FormData](https://developer.mozilla.org/en-US/docs/Web/API/FormData) object in browsers or in a [FormData](https://github.com/form-data/form-data) in Node.js
|
177
|
+
*
|
178
|
+
* @param params An object to be encoded.
|
179
|
+
* @returns The complete [FormData](https://developer.mozilla.org/en-US/docs/Web/API/FormData) object.
|
180
|
+
*/
|
181
|
+
function encodeFormData(params, forceFormData) {
|
182
|
+
// see https://github.com/Esri/arcgis-rest-js/issues/499 for more info.
|
183
|
+
var useFormData = requiresFormData(params) || forceFormData;
|
184
|
+
var newParams = processParams(params);
|
185
|
+
if (useFormData) {
|
186
|
+
var formData_1 = new FormData();
|
187
|
+
Object.keys(newParams).forEach(function (key) {
|
188
|
+
if (typeof Blob !== "undefined" && newParams[key] instanceof Blob) {
|
189
|
+
/* To name the Blob:
|
190
|
+
1. look to an alternate request parameter called 'fileName'
|
191
|
+
2. see if 'name' has been tacked onto the Blob manually
|
192
|
+
3. if all else fails, use the request parameter
|
193
|
+
*/
|
194
|
+
var filename = newParams["fileName"] || newParams[key].name || key;
|
195
|
+
formData_1.append(key, newParams[key], filename);
|
196
|
+
}
|
197
|
+
else {
|
198
|
+
formData_1.append(key, newParams[key]);
|
199
|
+
}
|
200
|
+
});
|
201
|
+
return formData_1;
|
202
|
+
}
|
203
|
+
else {
|
204
|
+
return encodeQueryString(params);
|
205
|
+
}
|
206
|
+
}
|
207
|
+
|
208
|
+
/* Copyright (c) 2017 Environmental Systems Research Institute, Inc.
|
209
|
+
* Apache-2.0 */
|
210
|
+
// TypeScript 2.1 no longer allows you to extend built in types. See https://github.com/Microsoft/TypeScript/issues/12790#issuecomment-265981442
|
211
|
+
// and https://github.com/Microsoft/TypeScript-wiki/blob/master/Breaking-Changes.md#extending-built-ins-like-error-array-and-map-may-no-longer-work
|
212
|
+
//
|
213
|
+
// This code is from MDN https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error#Custom_Error_Types.
|
214
|
+
var ArcGISRequestError = /** @class */ (function () {
|
215
|
+
/**
|
216
|
+
* Create a new `ArcGISRequestError` object.
|
217
|
+
*
|
218
|
+
* @param message - The error message from the API
|
219
|
+
* @param code - The error code from the API
|
220
|
+
* @param response - The original response from the API that caused the error
|
221
|
+
* @param url - The original url of the request
|
222
|
+
* @param options - The original options and parameters of the request
|
223
|
+
*/
|
224
|
+
function ArcGISRequestError(message, code, response, url, options) {
|
225
|
+
message = message || "UNKNOWN_ERROR";
|
226
|
+
code = code || "UNKNOWN_ERROR_CODE";
|
227
|
+
this.name = "ArcGISRequestError";
|
228
|
+
this.message =
|
229
|
+
code === "UNKNOWN_ERROR_CODE" ? message : code + ": " + message;
|
230
|
+
this.originalMessage = message;
|
231
|
+
this.code = code;
|
232
|
+
this.response = response;
|
233
|
+
this.url = url;
|
234
|
+
this.options = options;
|
235
|
+
}
|
236
|
+
return ArcGISRequestError;
|
237
|
+
}());
|
238
|
+
ArcGISRequestError.prototype = Object.create(Error.prototype);
|
239
|
+
ArcGISRequestError.prototype.constructor = ArcGISRequestError;
|
240
|
+
|
241
|
+
/* Copyright (c) 2017-2018 Environmental Systems Research Institute, Inc.
|
242
|
+
* Apache-2.0 */
|
243
|
+
var NODEJS_DEFAULT_REFERER_HEADER = "@esri/arcgis-rest-js";
|
244
|
+
var DEFAULT_ARCGIS_REQUEST_OPTIONS = {
|
245
|
+
httpMethod: "POST",
|
246
|
+
params: {
|
247
|
+
f: "json",
|
248
|
+
},
|
249
|
+
};
|
250
|
+
var ArcGISAuthError = /** @class */ (function (_super) {
|
251
|
+
__extends(ArcGISAuthError, _super);
|
252
|
+
/**
|
253
|
+
* Create a new `ArcGISAuthError` object.
|
254
|
+
*
|
255
|
+
* @param message - The error message from the API
|
256
|
+
* @param code - The error code from the API
|
257
|
+
* @param response - The original response from the API that caused the error
|
258
|
+
* @param url - The original url of the request
|
259
|
+
* @param options - The original options of the request
|
260
|
+
*/
|
261
|
+
function ArcGISAuthError(message, code, response, url, options) {
|
262
|
+
if (message === void 0) { message = "AUTHENTICATION_ERROR"; }
|
263
|
+
if (code === void 0) { code = "AUTHENTICATION_ERROR_CODE"; }
|
264
|
+
var _this = _super.call(this, message, code, response, url, options) || this;
|
265
|
+
_this.name = "ArcGISAuthError";
|
266
|
+
_this.message =
|
267
|
+
code === "AUTHENTICATION_ERROR_CODE" ? message : code + ": " + message;
|
268
|
+
return _this;
|
269
|
+
}
|
270
|
+
ArcGISAuthError.prototype.retry = function (getSession, retryLimit) {
|
271
|
+
var _this = this;
|
272
|
+
if (retryLimit === void 0) { retryLimit = 3; }
|
273
|
+
var tries = 0;
|
274
|
+
var retryRequest = function (resolve, reject) {
|
275
|
+
getSession(_this.url, _this.options)
|
276
|
+
.then(function (session) {
|
277
|
+
var newOptions = __assign(__assign({}, _this.options), { authentication: session });
|
278
|
+
tries = tries + 1;
|
279
|
+
return request(_this.url, newOptions);
|
280
|
+
})
|
281
|
+
.then(function (response) {
|
282
|
+
resolve(response);
|
283
|
+
})
|
284
|
+
.catch(function (e) {
|
285
|
+
if (e.name === "ArcGISAuthError" && tries < retryLimit) {
|
286
|
+
retryRequest(resolve, reject);
|
287
|
+
}
|
288
|
+
else if (e.name === "ArcGISAuthError" && tries >= retryLimit) {
|
289
|
+
reject(_this);
|
290
|
+
}
|
291
|
+
else {
|
292
|
+
reject(e);
|
293
|
+
}
|
294
|
+
});
|
295
|
+
};
|
296
|
+
return new Promise(function (resolve, reject) {
|
297
|
+
retryRequest(resolve, reject);
|
298
|
+
});
|
299
|
+
};
|
300
|
+
return ArcGISAuthError;
|
301
|
+
}(ArcGISRequestError));
|
302
|
+
/**
|
303
|
+
* Checks for errors in a JSON response from the ArcGIS REST API. If there are no errors, it will return the `data` passed in. If there is an error, it will throw an `ArcGISRequestError` or `ArcGISAuthError`.
|
304
|
+
*
|
305
|
+
* @param data The response JSON to check for errors.
|
306
|
+
* @param url The url of the original request
|
307
|
+
* @param params The parameters of the original request
|
308
|
+
* @param options The options of the original request
|
309
|
+
* @returns The data that was passed in the `data` parameter
|
310
|
+
*/
|
311
|
+
function checkForErrors(response, url, params, options, originalAuthError) {
|
312
|
+
// this is an error message from billing.arcgis.com backend
|
313
|
+
if (response.code >= 400) {
|
314
|
+
var message = response.message, code = response.code;
|
315
|
+
throw new ArcGISRequestError(message, code, response, url, options);
|
316
|
+
}
|
317
|
+
// error from ArcGIS Online or an ArcGIS Portal or server instance.
|
318
|
+
if (response.error) {
|
319
|
+
var _a = response.error, message = _a.message, code = _a.code, messageCode = _a.messageCode;
|
320
|
+
var errorCode = messageCode || code || "UNKNOWN_ERROR_CODE";
|
321
|
+
if (code === 498 ||
|
322
|
+
code === 499 ||
|
323
|
+
messageCode === "GWM_0003" ||
|
324
|
+
(code === 400 && message === "Unable to generate token.")) {
|
325
|
+
if (originalAuthError) {
|
326
|
+
throw originalAuthError;
|
327
|
+
}
|
328
|
+
else {
|
329
|
+
throw new ArcGISAuthError(message, errorCode, response, url, options);
|
330
|
+
}
|
331
|
+
}
|
332
|
+
throw new ArcGISRequestError(message, errorCode, response, url, options);
|
333
|
+
}
|
334
|
+
// error from a status check
|
335
|
+
if (response.status === "failed" || response.status === "failure") {
|
336
|
+
var message = void 0;
|
337
|
+
var code = "UNKNOWN_ERROR_CODE";
|
338
|
+
try {
|
339
|
+
message = JSON.parse(response.statusMessage).message;
|
340
|
+
code = JSON.parse(response.statusMessage).code;
|
341
|
+
}
|
342
|
+
catch (e) {
|
343
|
+
message = response.statusMessage || response.message;
|
344
|
+
}
|
345
|
+
throw new ArcGISRequestError(message, code, response, url, options);
|
346
|
+
}
|
347
|
+
return response;
|
348
|
+
}
|
349
|
+
/**
|
350
|
+
* ```js
|
351
|
+
* import { request } from '@esri/arcgis-rest-request';
|
352
|
+
* //
|
353
|
+
* request('https://www.arcgis.com/sharing/rest')
|
354
|
+
* .then(response) // response.currentVersion === 5.2
|
355
|
+
* //
|
356
|
+
* request('https://www.arcgis.com/sharing/rest', {
|
357
|
+
* httpMethod: "GET"
|
358
|
+
* })
|
359
|
+
* //
|
360
|
+
* request('https://www.arcgis.com/sharing/rest/search', {
|
361
|
+
* params: { q: 'parks' }
|
362
|
+
* })
|
363
|
+
* .then(response) // response.total => 78379
|
364
|
+
* ```
|
365
|
+
* Generic method for making HTTP requests to ArcGIS REST API endpoints.
|
366
|
+
*
|
367
|
+
* @param url - The URL of the ArcGIS REST API endpoint.
|
368
|
+
* @param requestOptions - Options for the request, including parameters relevant to the endpoint.
|
369
|
+
* @returns A Promise that will resolve with the data from the response.
|
370
|
+
*/
|
371
|
+
function request(url, requestOptions) {
|
372
|
+
if (requestOptions === void 0) { requestOptions = { params: { f: "json" } }; }
|
373
|
+
var options = __assign(__assign(__assign({ httpMethod: "POST" }, DEFAULT_ARCGIS_REQUEST_OPTIONS), requestOptions), {
|
374
|
+
params: __assign(__assign({}, DEFAULT_ARCGIS_REQUEST_OPTIONS.params), requestOptions.params),
|
375
|
+
headers: __assign(__assign({}, DEFAULT_ARCGIS_REQUEST_OPTIONS.headers), requestOptions.headers),
|
376
|
+
});
|
377
|
+
var missingGlobals = [];
|
378
|
+
var recommendedPackages = [];
|
379
|
+
// don't check for a global fetch if a custom implementation was passed through
|
380
|
+
if (!options.fetch && typeof fetch !== "undefined") {
|
381
|
+
options.fetch = fetch.bind(Function("return this")());
|
382
|
+
}
|
383
|
+
else {
|
384
|
+
missingGlobals.push("`fetch`");
|
385
|
+
recommendedPackages.push("`node-fetch`");
|
386
|
+
}
|
387
|
+
if (typeof Promise === "undefined") {
|
388
|
+
missingGlobals.push("`Promise`");
|
389
|
+
recommendedPackages.push("`es6-promise`");
|
390
|
+
}
|
391
|
+
if (typeof FormData === "undefined") {
|
392
|
+
missingGlobals.push("`FormData`");
|
393
|
+
recommendedPackages.push("`isomorphic-form-data`");
|
394
|
+
}
|
395
|
+
if (!options.fetch ||
|
396
|
+
typeof Promise === "undefined" ||
|
397
|
+
typeof FormData === "undefined") {
|
398
|
+
throw new Error("`arcgis-rest-request` requires a `fetch` implementation and global variables for `Promise` and `FormData` to be present in the global scope. You are missing " + missingGlobals.join(", ") + ". We recommend installing the " + recommendedPackages.join(", ") + " modules at the root of your application to add these to the global scope. See https://bit.ly/2KNwWaJ for more info.");
|
399
|
+
}
|
400
|
+
var httpMethod = options.httpMethod, authentication = options.authentication, rawResponse = options.rawResponse;
|
401
|
+
var params = __assign({ f: "json" }, options.params);
|
402
|
+
var originalAuthError = null;
|
403
|
+
var fetchOptions = {
|
404
|
+
method: httpMethod,
|
405
|
+
/* ensures behavior mimics XMLHttpRequest.
|
406
|
+
needed to support sending IWA cookies */
|
407
|
+
credentials: options.credentials || "same-origin",
|
408
|
+
};
|
409
|
+
// the /oauth2/platformSelf route will add X-Esri-Auth-Client-Id header
|
410
|
+
// and that request needs to send cookies cross domain
|
411
|
+
// so we need to set the credentials to "include"
|
412
|
+
if (options.headers &&
|
413
|
+
options.headers["X-Esri-Auth-Client-Id"] &&
|
414
|
+
url.indexOf("/oauth2/platformSelf") > -1) {
|
415
|
+
fetchOptions.credentials = "include";
|
416
|
+
}
|
417
|
+
return (authentication
|
418
|
+
? authentication.getToken(url, { fetch: options.fetch }).catch(function (err) {
|
419
|
+
/**
|
420
|
+
* append original request url and requestOptions
|
421
|
+
* to the error thrown by getToken()
|
422
|
+
* to assist with retrying
|
423
|
+
*/
|
424
|
+
err.url = url;
|
425
|
+
err.options = options;
|
426
|
+
/**
|
427
|
+
* if an attempt is made to talk to an unfederated server
|
428
|
+
* first try the request anonymously. if a 'token required'
|
429
|
+
* error is thrown, throw the UNFEDERATED error then.
|
430
|
+
*/
|
431
|
+
originalAuthError = err;
|
432
|
+
return Promise.resolve("");
|
433
|
+
})
|
434
|
+
: Promise.resolve(""))
|
435
|
+
.then(function (token) {
|
436
|
+
if (token.length) {
|
437
|
+
params.token = token;
|
438
|
+
}
|
439
|
+
if (authentication && authentication.getDomainCredentials) {
|
440
|
+
fetchOptions.credentials = authentication.getDomainCredentials(url);
|
441
|
+
}
|
442
|
+
// Custom headers to add to request. IRequestOptions.headers with merge over requestHeaders.
|
443
|
+
var requestHeaders = {};
|
444
|
+
if (fetchOptions.method === "GET") {
|
445
|
+
// Prevents token from being passed in query params when hideToken option is used.
|
446
|
+
/* istanbul ignore if - window is always defined in a browser. Test case is covered by Jasmine in node test */
|
447
|
+
if (params.token &&
|
448
|
+
options.hideToken &&
|
449
|
+
// Sharing API does not support preflight check required by modern browsers https://developer.mozilla.org/en-US/docs/Glossary/Preflight_request
|
450
|
+
typeof window === "undefined") {
|
451
|
+
requestHeaders["X-Esri-Authorization"] = "Bearer " + params.token;
|
452
|
+
delete params.token;
|
453
|
+
}
|
454
|
+
// encode the parameters into the query string
|
455
|
+
var queryParams = encodeQueryString(params);
|
456
|
+
// dont append a '?' unless parameters are actually present
|
457
|
+
var urlWithQueryString = queryParams === "" ? url : url + "?" + encodeQueryString(params);
|
458
|
+
if (
|
459
|
+
// This would exceed the maximum length for URLs specified by the consumer and requires POST
|
460
|
+
(options.maxUrlLength &&
|
461
|
+
urlWithQueryString.length > options.maxUrlLength) ||
|
462
|
+
// Or if the customer requires the token to be hidden and it has not already been hidden in the header (for browsers)
|
463
|
+
(params.token && options.hideToken)) {
|
464
|
+
// the consumer specified a maximum length for URLs
|
465
|
+
// and this would exceed it, so use post instead
|
466
|
+
fetchOptions.method = "POST";
|
467
|
+
// If the token was already added as a Auth header, add the token back to body with other params instead of header
|
468
|
+
if (token.length && options.hideToken) {
|
469
|
+
params.token = token;
|
470
|
+
// Remove existing header that was added before url query length was checked
|
471
|
+
delete requestHeaders["X-Esri-Authorization"];
|
472
|
+
}
|
473
|
+
}
|
474
|
+
else {
|
475
|
+
// just use GET
|
476
|
+
url = urlWithQueryString;
|
477
|
+
}
|
478
|
+
}
|
479
|
+
/* updateResources currently requires FormData even when the input parameters dont warrant it.
|
480
|
+
https://developers.arcgis.com/rest/users-groups-and-items/update-resources.htm
|
481
|
+
see https://github.com/Esri/arcgis-rest-js/pull/500 for more info. */
|
482
|
+
var forceFormData = new RegExp("/items/.+/updateResources").test(url);
|
483
|
+
if (fetchOptions.method === "POST") {
|
484
|
+
fetchOptions.body = encodeFormData(params, forceFormData);
|
485
|
+
}
|
486
|
+
// Mixin headers from request options
|
487
|
+
fetchOptions.headers = __assign(__assign({}, requestHeaders), options.headers);
|
488
|
+
/* istanbul ignore next - karma reports coverage on browser tests only */
|
489
|
+
if (typeof window === "undefined" && !fetchOptions.headers.referer) {
|
490
|
+
fetchOptions.headers.referer = NODEJS_DEFAULT_REFERER_HEADER;
|
491
|
+
}
|
492
|
+
/* istanbul ignore else blob responses are difficult to make cross platform we will just have to trust the isomorphic fetch will do its job */
|
493
|
+
if (!requiresFormData(params) && !forceFormData) {
|
494
|
+
fetchOptions.headers["Content-Type"] =
|
495
|
+
"application/x-www-form-urlencoded";
|
496
|
+
}
|
497
|
+
return options.fetch(url, fetchOptions);
|
498
|
+
})
|
499
|
+
.then(function (response) {
|
500
|
+
if (!response.ok) {
|
501
|
+
// server responded w/ an actual error (404, 500, etc)
|
502
|
+
var status_1 = response.status, statusText = response.statusText;
|
503
|
+
throw new ArcGISRequestError(statusText, "HTTP " + status_1, response, url, options);
|
504
|
+
}
|
505
|
+
if (rawResponse) {
|
506
|
+
return response;
|
507
|
+
}
|
508
|
+
switch (params.f) {
|
509
|
+
case "json":
|
510
|
+
return response.json();
|
511
|
+
case "geojson":
|
512
|
+
return response.json();
|
513
|
+
case "html":
|
514
|
+
return response.text();
|
515
|
+
case "text":
|
516
|
+
return response.text();
|
517
|
+
/* istanbul ignore next blob responses are difficult to make cross platform we will just have to trust that isomorphic fetch will do its job */
|
518
|
+
default:
|
519
|
+
return response.blob();
|
520
|
+
}
|
521
|
+
})
|
522
|
+
.then(function (data) {
|
523
|
+
if ((params.f === "json" || params.f === "geojson") && !rawResponse) {
|
524
|
+
var response = checkForErrors(data, url, params, options, originalAuthError);
|
525
|
+
if (originalAuthError) {
|
526
|
+
/* If the request was made to an unfederated service that
|
527
|
+
didn't require authentication, add the base url and a dummy token
|
528
|
+
to the list of trusted servers to avoid another federation check
|
529
|
+
in the event of a repeat request */
|
530
|
+
var truncatedUrl = url
|
531
|
+
.toLowerCase()
|
532
|
+
.split(/\/rest(\/admin)?\/services\//)[0];
|
533
|
+
options.authentication.federatedServers[truncatedUrl] = {
|
534
|
+
token: [],
|
535
|
+
// default to 24 hours
|
536
|
+
expires: new Date(Date.now() + 86400 * 1000),
|
537
|
+
};
|
538
|
+
originalAuthError = null;
|
539
|
+
}
|
540
|
+
return response;
|
541
|
+
}
|
542
|
+
else {
|
543
|
+
return data;
|
544
|
+
}
|
545
|
+
});
|
546
|
+
}
|
547
|
+
|
548
|
+
/* Copyright (c) 2018 Environmental Systems Research Institute, Inc.
|
549
|
+
* Apache-2.0 */
|
550
|
+
/**
|
551
|
+
* Helper method to ensure that user supplied urls don't include whitespace or a trailing slash.
|
552
|
+
*/
|
553
|
+
function cleanUrl(url) {
|
554
|
+
// Guard so we don't try to trim something that's not a string
|
555
|
+
if (typeof url !== "string") {
|
556
|
+
return url;
|
557
|
+
}
|
558
|
+
// trim leading and trailing spaces, but not spaces inside the url
|
559
|
+
url = url.trim();
|
560
|
+
// remove the trailing slash to the url if one was included
|
561
|
+
if (url[url.length - 1] === "/") {
|
562
|
+
url = url.slice(0, -1);
|
563
|
+
}
|
564
|
+
return url;
|
565
|
+
}
|
566
|
+
|
567
|
+
export { ArcGISAuthError as A, NODEJS_DEFAULT_REFERER_HEADER as N, __assign as _, cleanUrl as c, encodeQueryString as e, request as r };
|
@@ -8,7 +8,7 @@ import { g as getLocaleComponentStrings } from './locale-9624832c.js';
|
|
8
8
|
import { E as ELayoutMode } from './interfaces-7470d906.js';
|
9
9
|
import './_commonjsHelpers-d5f9d613.js';
|
10
10
|
|
11
|
-
const crowdsourceManagerCss = ":host{display:block;--calcite-label-margin-bottom:0px}.padding-1-2{padding:0.5rem}.display-flex{display:flex}.width-full{width:100%}.width-1-2{position:relative;width:50%}.width-1-3{position:relative;width:33.33%}.width-2-3{position:relative;width:66.66%}.width-0{width:0}.height-full{height:100%}.height-1-2{position:relative;height:50%}.height-0{height:0}.toggle-node{width:51px;height:51px}.overflow-hidden{overflow:hidden}.flex-column{flex-direction:column}.border{border:1px solid var(--calcite-ui-border-3)}.border-bottom{border-bottom:1px solid var(--calcite-ui-border-3)}.position-relative{position:relative}.height-50{height:50%}.adjusted-height-50{height:calc(50% -
|
11
|
+
const crowdsourceManagerCss = ":host{display:block;--calcite-label-margin-bottom:0px}.padding-1-2{padding:0.5rem}.display-flex{display:flex}.width-full{width:100%}.width-1-2{position:relative;width:50%}.width-1-3{position:relative;width:33.33%}.width-2-3{position:relative;width:66.66%}.width-0{width:0}.height-full{height:100%}.height-1-2{position:relative;height:50%}.height-0{height:0}.toggle-node{width:51px;height:51px}.overflow-hidden{overflow:hidden}.flex-column{flex-direction:column}.border{border:1px solid var(--calcite-ui-border-3)}.border-bottom{border-bottom:1px solid var(--calcite-ui-border-3)}.position-relative{position:relative}.height-50{height:50%}.adjusted-height-50{height:calc(50% - 25px)}.adjusted-height-100{height:calc(100% - 50px)}.adjusted-height-100-50{height:calc(100% - 50px)}.display-none{display:none}.height-53{height:53px}.position-absolute-53{position:absolute;top:53px}.display-grid{display:grid}.height-49-px{height:49px}.height-50-px{height:50px}.padding-inline-end-75{padding-inline-end:0.75rem}.align-items-center{align-items:center}";
|
12
12
|
|
13
13
|
const CrowdsourceManager = class {
|
14
14
|
constructor(hostRef) {
|
@@ -19,9 +19,19 @@ const CrowdsourceManager = class {
|
|
19
19
|
*/
|
20
20
|
this._shouldSetMapView = false;
|
21
21
|
this.classicGrid = false;
|
22
|
+
this.enableAutoRefresh = true;
|
23
|
+
this.enableFullscreen = true;
|
24
|
+
this.enableInlineEdit = false;
|
25
|
+
this.enableLegend = true;
|
26
|
+
this.enableSearch = true;
|
27
|
+
this.enableHome = true;
|
28
|
+
this.enableZoom = true;
|
29
|
+
this.enableBasemap = true;
|
30
|
+
this.basemapConfig = undefined;
|
22
31
|
this.showNewestFirst = true;
|
23
32
|
this.hideMap = false;
|
24
33
|
this.mapInfos = [];
|
34
|
+
this.onlyShowUpdatableLayers = true;
|
25
35
|
this.searchConfiguration = undefined;
|
26
36
|
this.zoomAndScrollToSelected = false;
|
27
37
|
this._expandPopup = false;
|
@@ -56,13 +66,18 @@ const CrowdsourceManager = class {
|
|
56
66
|
*/
|
57
67
|
async mapChanged(evt) {
|
58
68
|
this._mapChange = evt.detail;
|
69
|
+
await this._mapChange.mapView.when(() => {
|
70
|
+
this._setMapView();
|
71
|
+
});
|
72
|
+
}
|
73
|
+
/**
|
74
|
+
* Listen for beforeMapChanged and minimize the popup if it's expanded
|
75
|
+
*/
|
76
|
+
async beforeMapChanged() {
|
59
77
|
if (this._expandPopup) {
|
60
78
|
this._shouldSetMapView = true;
|
61
79
|
this._expandPopup = false;
|
62
80
|
}
|
63
|
-
else {
|
64
|
-
this._setMapView();
|
65
|
-
}
|
66
81
|
}
|
67
82
|
//--------------------------------------------------------------------------
|
68
83
|
//
|
@@ -221,7 +236,7 @@ const CrowdsourceManager = class {
|
|
221
236
|
const mapDisplayClass = this.classicGrid && layoutMode === ELayoutMode.GRID ? "display-flex height-full width-1-2" :
|
222
237
|
layoutMode === ELayoutMode.GRID && !hideMap ? "" : "display-none";
|
223
238
|
const mapContainerClass = this.classicGrid && layoutMode === ELayoutMode.GRID ? "width-full" : this._expandPopup ? "height-50-px" : "adjusted-height-50";
|
224
|
-
return (h("div", { class: `${mapContainerClass} overflow-hidden ${mapDisplayClass}` }, h("map-card", { class: "width-full", mapInfos: this.mapInfos })));
|
239
|
+
return (h("div", { class: `${mapContainerClass} overflow-hidden ${mapDisplayClass}` }, h("map-card", { basemapConfig: this.basemapConfig, class: "width-full", enableBasemap: this.enableBasemap, enableFullscreen: this.enableFullscreen, enableLegend: this.enableLegend, enableSearch: this.enableSearch, mapInfos: this.mapInfos })));
|
225
240
|
}
|
226
241
|
/**
|
227
242
|
* Get the expand node for the popup information
|
@@ -255,7 +270,7 @@ const CrowdsourceManager = class {
|
|
255
270
|
layoutMode === ELayoutMode.GRID && !this._expandPopup && !hideMap ? "adjusted-height-50" : "adjusted-height-100";
|
256
271
|
const cardManagerContainer = this.classicGrid && layoutMode === ELayoutMode.GRID ?
|
257
272
|
"width-full adjusted-height-100" : this._expandPopup ? "width-50 adjusted-height-100-50" : "width-50 height-full";
|
258
|
-
return (h("div", { class:
|
273
|
+
return (h("div", { class: `${cardManagerContainer}` }, h("card-manager", { class: `${cardManagerHeight} width-full`, mapView: this === null || this === void 0 ? void 0 : this._mapView, zoomAndScrollToSelected: this.zoomAndScrollToSelected })));
|
259
274
|
}
|
260
275
|
/**
|
261
276
|
* Get the table node based for the current layout
|
@@ -275,7 +290,7 @@ const CrowdsourceManager = class {
|
|
275
290
|
const toggleSlot = this.classicGrid && layoutMode !== ELayoutMode.VERTICAL ? "footer" :
|
276
291
|
this.classicGrid && layoutMode === ELayoutMode.VERTICAL ? "panel-end" :
|
277
292
|
layoutMode === ELayoutMode.HORIZONTAL ? "header" : "panel-start";
|
278
|
-
return (h("calcite-shell", { class: tableSizeClass + " border-bottom" }, h("calcite-action-bar", { class: "border", expandDisabled: true, layout: toggleLayout, slot: toggleSlot }, h("calcite-action", { class: "toggle-node", icon: icon, id: id, onClick: () => this._toggleLayout(), text: "" }), h("calcite-tooltip", { label: tooltip, placement: "bottom", "reference-element": id }, h("span", null, tooltip))), h("div", { class: "width-full height-full position-relative" }, h("layer-table", { mapInfo: this._mapInfo, mapView: this === null || this === void 0 ? void 0 : this._mapView, showNewestFirst: this.showNewestFirst, zoomAndScrollToSelected: this.zoomAndScrollToSelected }))));
|
293
|
+
return (h("calcite-shell", { class: tableSizeClass + " border-bottom" }, h("calcite-action-bar", { class: "border", expandDisabled: true, layout: toggleLayout, slot: toggleSlot }, h("calcite-action", { class: "toggle-node", icon: icon, id: id, onClick: () => this._toggleLayout(), text: "" }), h("calcite-tooltip", { label: tooltip, placement: "bottom", "reference-element": id }, h("span", null, tooltip))), h("div", { class: "width-full height-full position-relative" }, h("layer-table", { enableAutoRefresh: this.enableAutoRefresh, enableInlineEdit: this.enableInlineEdit, mapInfo: this._mapInfo, mapView: this === null || this === void 0 ? void 0 : this._mapView, onlyShowUpdatableLayers: this.onlyShowUpdatableLayers, showNewestFirst: this.showNewestFirst, zoomAndScrollToSelected: this.zoomAndScrollToSelected }))));
|
279
294
|
}
|
280
295
|
/**
|
281
296
|
* Open/Close the appropriate panel.
|
@@ -3,21 +3,21 @@
|
|
3
3
|
* Licensed under the Apache License, Version 2.0
|
4
4
|
* http://www.apache.org/licenses/LICENSE-2.0
|
5
5
|
*/
|
6
|
-
import { d as dayjs } from './calcite-input-time-picker-
|
6
|
+
import { d as dayjs } from './calcite-input-time-picker-fe6e499a.js';
|
7
7
|
import './index-c7de2486.js';
|
8
|
-
import './form-
|
9
|
-
import './dom-
|
8
|
+
import './form-0871d2c6.js';
|
9
|
+
import './dom-2b326ec3.js';
|
10
10
|
import './guid-70cda807.js';
|
11
11
|
import './resources-1e6d76df.js';
|
12
12
|
import './interactive-bd6837bc.js';
|
13
13
|
import './key-02fa06ae.js';
|
14
|
-
import './label-
|
14
|
+
import './label-b8caf984.js';
|
15
15
|
import './loadable-f848be11.js';
|
16
|
-
import './locale-
|
16
|
+
import './locale-00000ab4.js';
|
17
17
|
import './observers-95c50046.js';
|
18
|
-
import './focusTrapComponent-
|
19
|
-
import './time-
|
20
|
-
import './t9n-
|
18
|
+
import './focusTrapComponent-ad2c3a31.js';
|
19
|
+
import './time-73378c4a.js';
|
20
|
+
import './t9n-9791aa0c.js';
|
21
21
|
|
22
22
|
// Czech [cs]
|
23
23
|
|