@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
@@ -7,6 +7,7 @@ import { c as createCommonjsModule, g as getDefaultExportFromCjs } from './_comm
|
|
7
7
|
import { getAssetPath } from '@stencil/core/internal/client';
|
8
8
|
import { l as loadModules } from './loadModules.js';
|
9
9
|
import { q as queryFeaturesByID } from './queryUtils.js';
|
10
|
+
import { _ as __assign$1, r as request, c as cleanUrl } from './clean-url.js';
|
10
11
|
|
11
12
|
/** @license
|
12
13
|
* Copyright 2022 Esri
|
@@ -2240,6 +2241,94 @@ function downloadPDFFile(filename, labels, labelPageDescription, title = "", ini
|
|
2240
2241
|
}
|
2241
2242
|
//#endregion
|
2242
2243
|
|
2244
|
+
/*! *****************************************************************************
|
2245
|
+
Copyright (c) Microsoft Corporation.
|
2246
|
+
|
2247
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
2248
|
+
purpose with or without fee is hereby granted.
|
2249
|
+
|
2250
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
2251
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
2252
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
2253
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
2254
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
2255
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
2256
|
+
PERFORMANCE OF THIS SOFTWARE.
|
2257
|
+
***************************************************************************** */
|
2258
|
+
|
2259
|
+
var __assign = function() {
|
2260
|
+
__assign = Object.assign || function __assign(t) {
|
2261
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
2262
|
+
s = arguments[i];
|
2263
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
2264
|
+
}
|
2265
|
+
return t;
|
2266
|
+
};
|
2267
|
+
return __assign.apply(this, arguments);
|
2268
|
+
};
|
2269
|
+
|
2270
|
+
/* Copyright (c) 2017-2018 Environmental Systems Research Institute, Inc.
|
2271
|
+
* Apache-2.0 */
|
2272
|
+
/**
|
2273
|
+
* Helper for methods with lots of first order request options to pass through as request parameters.
|
2274
|
+
*/
|
2275
|
+
function appendCustomParams(customOptions, keys, baseOptions) {
|
2276
|
+
var requestOptionsKeys = [
|
2277
|
+
"params",
|
2278
|
+
"httpMethod",
|
2279
|
+
"rawResponse",
|
2280
|
+
"authentication",
|
2281
|
+
"portal",
|
2282
|
+
"fetch",
|
2283
|
+
"maxUrlLength",
|
2284
|
+
"headers"
|
2285
|
+
];
|
2286
|
+
var options = __assign$1(__assign$1({ params: {} }, baseOptions), customOptions);
|
2287
|
+
// merge all keys in customOptions into options.params
|
2288
|
+
options.params = keys.reduce(function (value, key) {
|
2289
|
+
if (customOptions[key] || typeof customOptions[key] === "boolean") {
|
2290
|
+
value[key] = customOptions[key];
|
2291
|
+
}
|
2292
|
+
return value;
|
2293
|
+
}, options.params);
|
2294
|
+
// now remove all properties in options that don't exist in IRequestOptions
|
2295
|
+
return requestOptionsKeys.reduce(function (value, key) {
|
2296
|
+
if (options[key]) {
|
2297
|
+
value[key] = options[key];
|
2298
|
+
}
|
2299
|
+
return value;
|
2300
|
+
}, {});
|
2301
|
+
}
|
2302
|
+
|
2303
|
+
/* Copyright (c) 2018 Environmental Systems Research Institute, Inc.
|
2304
|
+
* Apache-2.0 */
|
2305
|
+
/**
|
2306
|
+
*
|
2307
|
+
* ```js
|
2308
|
+
* import { queryRelated } from '@esri/arcgis-rest-feature-layer'
|
2309
|
+
* //
|
2310
|
+
* queryRelated({
|
2311
|
+
* url: "http://services.myserver/OrgID/ArcGIS/rest/services/Petroleum/KSPetro/FeatureServer/0",
|
2312
|
+
* relationshipId: 1,
|
2313
|
+
* params: { returnCountOnly: true }
|
2314
|
+
* })
|
2315
|
+
* .then(response) // response.relatedRecords
|
2316
|
+
* ```
|
2317
|
+
* Query the related records for a feature service. See the [REST Documentation](https://developers.arcgis.com/rest/services-reference/query-related-records-feature-service-.htm) for more information.
|
2318
|
+
*
|
2319
|
+
* @param requestOptions
|
2320
|
+
* @returns A Promise that will resolve with the query response
|
2321
|
+
*/
|
2322
|
+
function queryRelated(requestOptions) {
|
2323
|
+
var options = appendCustomParams(requestOptions, ["objectIds", "relationshipId", "definitionExpression", "outFields"], {
|
2324
|
+
httpMethod: "GET",
|
2325
|
+
params: __assign({
|
2326
|
+
// set default query parameters
|
2327
|
+
definitionExpression: "1=1", outFields: "*", relationshipId: 0 }, requestOptions.params)
|
2328
|
+
});
|
2329
|
+
return request(cleanUrl(requestOptions.url) + "/queryRelatedRecords", options);
|
2330
|
+
}
|
2331
|
+
|
2243
2332
|
/** @license
|
2244
2333
|
* Copyright 2022 Esri
|
2245
2334
|
*
|
@@ -2256,24 +2345,40 @@ function downloadPDFFile(filename, labels, labelPageDescription, title = "", ini
|
|
2256
2345
|
* limitations under the License.
|
2257
2346
|
*/
|
2258
2347
|
const lineSeparatorChar = "|";
|
2348
|
+
/**
|
2349
|
+
* Get the related records for a feature service.
|
2350
|
+
*
|
2351
|
+
* @param url Feature service's URL, e.g., layer.url
|
2352
|
+
* @param relationshipId Id of relationship
|
2353
|
+
* @param objectIds Objects in the feature service whose related records are sought
|
2354
|
+
*/
|
2355
|
+
function getFeatureServiceRelatedRecords(url, relationshipId, objectIds) {
|
2356
|
+
const options = {
|
2357
|
+
url: url + `/${relationshipId}`,
|
2358
|
+
relationshipId,
|
2359
|
+
objectIds
|
2360
|
+
};
|
2361
|
+
return queryRelated(options);
|
2362
|
+
}
|
2259
2363
|
//#endregion
|
2260
2364
|
// ------------------------------------------------------------------------------------------------------------------ //
|
2261
2365
|
//#region Public functions
|
2262
2366
|
/**
|
2263
2367
|
* Create and consolidate labels from all layers
|
2264
2368
|
*
|
2369
|
+
* @param webmap Webmap containing layer
|
2265
2370
|
* @param exportInfos Key details about what to export (ids, layer, and selectionSetNames)
|
2266
2371
|
* @param formatUsingLayerPopup When true, the layer's popup is used to choose attributes for each column; when false,
|
2267
2372
|
* all attributes are exported
|
2268
2373
|
* @param includeHeaderNames Add the label format at the front of the list of generated labels
|
2269
2374
|
* @returns selectionSetNames that will be used for export filenames
|
2270
2375
|
*/
|
2271
|
-
async function consolidateLabels(exportInfos, formatUsingLayerPopup = true, includeHeaderNames = false, isCSVExport = false) {
|
2376
|
+
async function consolidateLabels(webmap, exportInfos, formatUsingLayerPopup = true, includeHeaderNames = false, isCSVExport = false) {
|
2272
2377
|
const labelRequests = [];
|
2273
2378
|
Object.keys(exportInfos).forEach(k => {
|
2274
2379
|
var _a;
|
2275
2380
|
const labelInfo = exportInfos[k];
|
2276
|
-
labelRequests.push(_prepareLabels(((_a = labelInfo.layerView) === null || _a === void 0 ? void 0 : _a.layer) || labelInfo.layer, labelInfo.ids, formatUsingLayerPopup, includeHeaderNames));
|
2381
|
+
labelRequests.push(_prepareLabels(webmap, ((_a = labelInfo.layerView) === null || _a === void 0 ? void 0 : _a.layer) || labelInfo.layer, labelInfo.ids, formatUsingLayerPopup, includeHeaderNames));
|
2277
2382
|
if (isCSVExport) {
|
2278
2383
|
// add the layer id as a temp value separator that we can use to split values for CSV export
|
2279
2384
|
labelRequests.push(Promise.resolve([[k]]));
|
@@ -2285,6 +2390,7 @@ async function consolidateLabels(exportInfos, formatUsingLayerPopup = true, incl
|
|
2285
2390
|
/**
|
2286
2391
|
* Downloads csv of mailing labels for the provided list of ids
|
2287
2392
|
*
|
2393
|
+
* @param webmap Webmap containing layer
|
2288
2394
|
* @param exportInfos Key details about what to export (ids, layer, and selectionSetNames)
|
2289
2395
|
* @param formatUsingLayerPopup When true, the layer's popup is used to choose attributes for each column; when false,
|
2290
2396
|
* all attributes are exported
|
@@ -2292,8 +2398,8 @@ async function consolidateLabels(exportInfos, formatUsingLayerPopup = true, incl
|
|
2292
2398
|
* @param addColumnTitle Indicates if column headings should be included in output
|
2293
2399
|
* @returns Promise resolving when function is done
|
2294
2400
|
*/
|
2295
|
-
async function downloadCSV(exportInfos, formatUsingLayerPopup, removeDuplicates = false, addColumnTitle = false) {
|
2296
|
-
let labels = await consolidateLabels(exportInfos, formatUsingLayerPopup, addColumnTitle, true);
|
2401
|
+
async function downloadCSV(webmap, exportInfos, formatUsingLayerPopup, removeDuplicates = false, addColumnTitle = false) {
|
2402
|
+
let labels = await consolidateLabels(webmap, exportInfos, formatUsingLayerPopup, addColumnTitle, true);
|
2297
2403
|
labels = removeDuplicates ? removeDuplicateLabels(labels) : labels;
|
2298
2404
|
const layerIds = Object.keys(exportInfos);
|
2299
2405
|
let layerLabels = [];
|
@@ -2315,6 +2421,7 @@ async function downloadCSV(exportInfos, formatUsingLayerPopup, removeDuplicates
|
|
2315
2421
|
/**
|
2316
2422
|
* Downloads csv of mailing labels for the provided list of ids
|
2317
2423
|
*
|
2424
|
+
* @param webmap Webmap containing layer
|
2318
2425
|
* @param exportInfos Key details about what to export (ids, layer, and selectionSetNames)
|
2319
2426
|
* @param labelPageDescription Provides PDF page layout info
|
2320
2427
|
* @param removeDuplicates When true a single label is generated when multiple featues have a shared address value
|
@@ -2322,8 +2429,8 @@ async function downloadCSV(exportInfos, formatUsingLayerPopup, removeDuplicates
|
|
2322
2429
|
* @param initialImageDataUrl Data URL of image for first page
|
2323
2430
|
* @returns Promise resolving when function is done
|
2324
2431
|
*/
|
2325
|
-
async function downloadPDF(exportInfos, labelPageDescription, removeDuplicates = false, title = "", initialImageDataUrl = "") {
|
2326
|
-
let labels = await consolidateLabels(exportInfos);
|
2432
|
+
async function downloadPDF(webmap, exportInfos, labelPageDescription, removeDuplicates = false, title = "", initialImageDataUrl = "") {
|
2433
|
+
let labels = await consolidateLabels(webmap, exportInfos);
|
2327
2434
|
const selectionSetNames = _getSelectionSetNames(exportInfos);
|
2328
2435
|
labels =
|
2329
2436
|
// Remove empty lines in labels
|
@@ -2452,6 +2559,87 @@ async function _convertPopupArcadeToLabelSpec(expressionInfo) {
|
|
2452
2559
|
format: executor
|
2453
2560
|
});
|
2454
2561
|
}
|
2562
|
+
/**
|
2563
|
+
* Extracts Arcade expressions from the lines of a label format and creates an Arcade executor for each
|
2564
|
+
* referenced expression name.
|
2565
|
+
*
|
2566
|
+
* @param labelFormat Label to examine
|
2567
|
+
* @param layer Layer from which to fetch features
|
2568
|
+
* @return Promise resolving to a set of executors keyed using the expression name
|
2569
|
+
*/
|
2570
|
+
/*
|
2571
|
+
async function _createArcadeExecutors(
|
2572
|
+
labelFormat: string,
|
2573
|
+
layer: __esri.FeatureLayer
|
2574
|
+
): Promise<IArcadeExecutors> {
|
2575
|
+
const arcadeExecutors: IArcadeExecutors = {};
|
2576
|
+
|
2577
|
+
// Are any Arcade expressions in the layer?
|
2578
|
+
if (!Array.isArray(layer.popupTemplate.expressionInfos) || layer.popupTemplate.expressionInfos.length === 0) {
|
2579
|
+
return Promise.resolve(arcadeExecutors);
|
2580
|
+
}
|
2581
|
+
|
2582
|
+
// Are there any Arcade expressions in the label format?
|
2583
|
+
const arcadeExpressionRegExp = /\{expression\/\w+\}/g;
|
2584
|
+
const arcadeExpressionsMatches = labelFormat.match(arcadeExpressionRegExp);
|
2585
|
+
if (!arcadeExpressionsMatches) {
|
2586
|
+
return Promise.resolve(arcadeExecutors);
|
2587
|
+
}
|
2588
|
+
|
2589
|
+
// Generate an Arcade executor for each match
|
2590
|
+
const [arcade] = await loadModules(["esri/arcade"]);
|
2591
|
+
const labelingProfile: __esri.Profile = {
|
2592
|
+
variables: [
|
2593
|
+
{
|
2594
|
+
name: "$feature",
|
2595
|
+
type: "feature"
|
2596
|
+
},
|
2597
|
+
{
|
2598
|
+
name: "$layer",
|
2599
|
+
type: "featureSet"
|
2600
|
+
},
|
2601
|
+
{
|
2602
|
+
name: "$datastore",
|
2603
|
+
type: "featureSetCollection"
|
2604
|
+
},
|
2605
|
+
{
|
2606
|
+
name: "$map",
|
2607
|
+
type: "featureSetCollection"
|
2608
|
+
}
|
2609
|
+
]
|
2610
|
+
};
|
2611
|
+
|
2612
|
+
const createArcadeExecutorPromises: IArcadeExecutorPromises = {};
|
2613
|
+
arcadeExpressionsMatches.forEach(
|
2614
|
+
(match: string) => {
|
2615
|
+
const expressionName = match.substring(match.indexOf("/") + 1, match.length - 1);
|
2616
|
+
|
2617
|
+
(layer.popupTemplate.expressionInfos || []).forEach(
|
2618
|
+
expressionInfo => {
|
2619
|
+
if (expressionInfo.name === expressionName) {
|
2620
|
+
createArcadeExecutorPromises[expressionName] =
|
2621
|
+
arcade.createArcadeExecutor(expressionInfo.expression, labelingProfile);
|
2622
|
+
}
|
2623
|
+
}
|
2624
|
+
);
|
2625
|
+
}
|
2626
|
+
);
|
2627
|
+
|
2628
|
+
const promises = Object.values(createArcadeExecutorPromises);
|
2629
|
+
return Promise.all(promises)
|
2630
|
+
.then(
|
2631
|
+
executors => {
|
2632
|
+
const expressionNames = Object.keys(createArcadeExecutorPromises);
|
2633
|
+
|
2634
|
+
for (let i = 0; i < expressionNames.length; ++i) {
|
2635
|
+
arcadeExecutors[expressionNames[i]] = executors[i].valueOf() as __esri.ArcadeExecutor;
|
2636
|
+
}
|
2637
|
+
|
2638
|
+
return arcadeExecutors;
|
2639
|
+
}
|
2640
|
+
);
|
2641
|
+
}
|
2642
|
+
*/
|
2455
2643
|
/**
|
2456
2644
|
* Creates a title from a list of selection set names.
|
2457
2645
|
*
|
@@ -2515,52 +2703,73 @@ function _getFieldNamesFromFieldExpressions(fieldExpressions) {
|
|
2515
2703
|
/**
|
2516
2704
|
* Extracts the label format from the layer.
|
2517
2705
|
*
|
2706
|
+
* @param webmap Webmap containing layer
|
2518
2707
|
* @param layer Layer with label format
|
2519
2708
|
* @param formatUsingLayerPopup When true, the layer's popup is used to choose attributes for each column; when false,
|
2520
2709
|
* all attributes are exported
|
2521
|
-
* @param attributeFormats Empty object to hold the formats for each attribute in a feature; the object is filled
|
2522
|
-
* with formats by this function
|
2523
2710
|
* @returns A Promise resolving to the format of a single label with fields coerced to lowercase, e.g.,
|
2524
|
-
* for
|
2711
|
+
* for ILabelFormatProps type "pattern": "{name}|{street}|{city}, {state} {zip}"
|
2525
2712
|
*/
|
2526
|
-
async function _getLabelFormat(layer, formatUsingLayerPopup
|
2527
|
-
var _a, _b
|
2528
|
-
let
|
2529
|
-
|
2530
|
-
|
2713
|
+
async function _getLabelFormat(webmap, layer, formatUsingLayerPopup) {
|
2714
|
+
var _a, _b;
|
2715
|
+
let labelFormatProps = {
|
2716
|
+
layer,
|
2717
|
+
attributeFormats: {},
|
2718
|
+
relationshipId: undefined,
|
2719
|
+
labelFormat: {
|
2720
|
+
type: "unsupported",
|
2721
|
+
format: undefined
|
2722
|
+
}
|
2531
2723
|
};
|
2532
2724
|
if (layer.popupEnabled) {
|
2533
2725
|
layer.popupTemplate.fieldInfos.forEach(
|
2534
2726
|
// Extract any format info that we have
|
2535
2727
|
fieldInfo => {
|
2536
2728
|
if (fieldInfo.format) {
|
2537
|
-
attributeFormats[fieldInfo.fieldName.toLowerCase()] = fieldInfo.format;
|
2729
|
+
labelFormatProps.attributeFormats[fieldInfo.fieldName.toLowerCase()] = fieldInfo.format;
|
2538
2730
|
}
|
2539
2731
|
});
|
2540
2732
|
// What is the nature of the label content?
|
2541
2733
|
// Fields list
|
2542
|
-
if (formatUsingLayerPopup
|
2543
|
-
|
2544
|
-
|
2545
|
-
|
2546
|
-
|
2547
|
-
|
2548
|
-
|
2549
|
-
|
2550
|
-
|
2551
|
-
|
2734
|
+
if (formatUsingLayerPopup) {
|
2735
|
+
const labelFormatType = (_b = (_a = layer.popupTemplate) === null || _a === void 0 ? void 0 : _a.content[0]) === null || _b === void 0 ? void 0 : _b.type;
|
2736
|
+
if (labelFormatType === "relationship") {
|
2737
|
+
const relationshipId = layer.popupTemplate.content[0].relationshipId;
|
2738
|
+
const webmapLayers = webmap.layers.toArray().concat(webmap.tables.toArray())
|
2739
|
+
.filter((entry) => entry.type === "feature"
|
2740
|
+
&& entry.id !== layer.id
|
2741
|
+
&& entry.relationships
|
2742
|
+
&& entry.relationships.some(relationship => relationship.id === relationshipId));
|
2743
|
+
labelFormatProps = await _getLabelFormat(webmap, webmapLayers[0], formatUsingLayerPopup);
|
2744
|
+
labelFormatProps.relationshipId = relationshipId;
|
2745
|
+
}
|
2746
|
+
else if (labelFormatType === "fields") {
|
2747
|
+
labelFormatProps.labelFormat = _convertPopupFieldsToLabelSpec(layer.popupTemplate.fieldInfos);
|
2748
|
+
// If popup is configured with "no attribute information", then no fields will visible
|
2749
|
+
if (labelFormatProps.labelFormat.format.length === 0) {
|
2750
|
+
// Can we use the popup title?
|
2751
|
+
labelFormatProps.labelFormat = layer.popupTemplate.title && typeof layer.popupTemplate.title === "string" ?
|
2752
|
+
{ type: "pattern", format: layer.popupTemplate.title }
|
2753
|
+
:
|
2754
|
+
// Otherwise revert to using attributes
|
2755
|
+
_convertPopupFieldsToLabelSpec(layer.popupTemplate.fieldInfos, true);
|
2756
|
+
}
|
2757
|
+
// Example text: '<p>{name} {age} years </p><p>started: {start}</p>'
|
2758
|
+
}
|
2759
|
+
else if (labelFormatType === "text") {
|
2760
|
+
labelFormatProps.labelFormat = _convertPopupTextToLabelSpec(layer.popupTemplate.content[0].text);
|
2761
|
+
// Example expression: 'var feat = $feature\nvar label = `\n\t${feat["name"]} ${feat["age"]} years <br>\n\tstarted: ${feat["start"]}\n`\n\nreturn { \n type : \'text\', \n text : label\n}',
|
2762
|
+
}
|
2763
|
+
else if (labelFormatType === "expression") {
|
2764
|
+
labelFormatProps.labelFormat = await _convertPopupArcadeToLabelSpec(layer.popupTemplate.content[0].expressionInfo);
|
2765
|
+
// Fallback to all fields
|
2766
|
+
}
|
2767
|
+
else {
|
2768
|
+
labelFormatProps.labelFormat = _convertPopupFieldsToLabelSpec(layer.popupTemplate.fieldInfos);
|
2552
2769
|
}
|
2553
|
-
// Example text: '<p>{name} {age} years </p><p>started: {start}</p>'
|
2554
|
-
}
|
2555
|
-
else if (formatUsingLayerPopup && ((_d = (_c = layer.popupTemplate) === null || _c === void 0 ? void 0 : _c.content[0]) === null || _d === void 0 ? void 0 : _d.type) === "text") {
|
2556
|
-
labelFormat = _convertPopupTextToLabelSpec(layer.popupTemplate.content[0].text);
|
2557
|
-
// Example expression: 'var feat = $feature\nvar label = `\n\t${feat["name"]} ${feat["age"]} years <br>\n\tstarted: ${feat["start"]}\n`\n\nreturn { \n type : \'text\', \n text : label\n}',
|
2558
|
-
}
|
2559
|
-
else if (formatUsingLayerPopup && ((_f = (_e = layer.popupTemplate) === null || _e === void 0 ? void 0 : _e.content[0]) === null || _f === void 0 ? void 0 : _f.type) === "expression") {
|
2560
|
-
labelFormat = await _convertPopupArcadeToLabelSpec(layer.popupTemplate.content[0].expressionInfo);
|
2561
2770
|
}
|
2562
2771
|
}
|
2563
|
-
return Promise.resolve(
|
2772
|
+
return Promise.resolve(labelFormatProps);
|
2564
2773
|
}
|
2565
2774
|
/**
|
2566
2775
|
* Extract selectionSetNames from the provided exportInfos
|
@@ -2632,6 +2841,7 @@ function _prepareAttributeValue(attributeValue, attributeType, attributeDomain,
|
|
2632
2841
|
/**
|
2633
2842
|
* Creates labels from items.
|
2634
2843
|
*
|
2844
|
+
* @param webmap Webmap containing layer
|
2635
2845
|
* @param layer Layer from which to fetch features
|
2636
2846
|
* @param ids List of ids to download
|
2637
2847
|
* @param formatUsingLayerPopup When true, the layer's popup is used to choose attributes for each column; when false,
|
@@ -2639,32 +2849,51 @@ function _prepareAttributeValue(attributeValue, attributeType, attributeDomain,
|
|
2639
2849
|
* @param includeHeaderNames Add the label format at the front of the list of generated labels
|
2640
2850
|
* @returns Promise resolving when function is done
|
2641
2851
|
*/
|
2642
|
-
async function _prepareLabels(layer, ids, formatUsingLayerPopup = true, includeHeaderNames = false) {
|
2643
|
-
// Get the
|
2644
|
-
const
|
2852
|
+
async function _prepareLabels(webmap, layer, ids, formatUsingLayerPopup = true, includeHeaderNames = false) {
|
2853
|
+
// Get the label formatting, if any
|
2854
|
+
const labelFormatProps = await _getLabelFormat(webmap, layer, formatUsingLayerPopup);
|
2855
|
+
// Because the label may actually come from a related layer, we'll use the layer that comes back from _getLabelFormat.
|
2856
|
+
// That function returns the supplied layer in all cases except for a "relationship" type of popup.
|
2857
|
+
const featureLayer = labelFormatProps.layer;
|
2858
|
+
let featureSet = [];
|
2859
|
+
if (typeof (labelFormatProps.relationshipId) !== "undefined") {
|
2860
|
+
// Get the related items for each id
|
2861
|
+
const relatedRecResponse = await getFeatureServiceRelatedRecords(layer.url, labelFormatProps.relationshipId, ids);
|
2862
|
+
const objectIdField = layer.objectIdField;
|
2863
|
+
let relatedFeatureIds = [];
|
2864
|
+
relatedRecResponse.relatedRecordGroups.forEach((relatedRecGroup) => {
|
2865
|
+
relatedFeatureIds = relatedFeatureIds.concat(relatedRecGroup.relatedRecords.map((rec) => rec.attributes[objectIdField]));
|
2866
|
+
});
|
2867
|
+
// Remove duplicates
|
2868
|
+
relatedFeatureIds.sort();
|
2869
|
+
relatedFeatureIds = relatedFeatureIds.filter((id, i) => i === 0 ? true : id !== relatedFeatureIds[i - 1]);
|
2870
|
+
// Get the full items
|
2871
|
+
featureSet = await queryFeaturesByID(relatedFeatureIds, featureLayer, [], false);
|
2872
|
+
}
|
2873
|
+
else {
|
2874
|
+
// Get the features to export
|
2875
|
+
featureSet = await queryFeaturesByID(ids, featureLayer, [], false);
|
2876
|
+
}
|
2645
2877
|
// Get field data types. Do we have any domain-based fields?
|
2646
2878
|
const attributeOrigNames = {};
|
2647
2879
|
const attributeTypes = {};
|
2648
2880
|
const attributeDomains = {};
|
2649
|
-
|
2881
|
+
featureLayer.fields.forEach(field => {
|
2650
2882
|
const lowercaseFieldname = field.name.toLowerCase();
|
2651
2883
|
attributeOrigNames[lowercaseFieldname] = field.name;
|
2652
2884
|
attributeDomains[lowercaseFieldname] = field.domain;
|
2653
2885
|
attributeTypes[lowercaseFieldname] = field.type;
|
2654
2886
|
});
|
2655
|
-
const attributeFormats = {};
|
2656
|
-
// Get the label formatting, if any
|
2657
|
-
const labelFormat = await _getLabelFormat(layer, formatUsingLayerPopup, attributeFormats);
|
2658
2887
|
// Apply the label format
|
2659
|
-
const labels = labelFormat.type === "
|
2660
|
-
// Export
|
2661
|
-
await
|
2662
|
-
: labelFormat.type
|
2663
|
-
// Export attributes in
|
2664
|
-
await
|
2888
|
+
const labels = labelFormatProps.labelFormat.type === "pattern" ?
|
2889
|
+
// Export attributes in format
|
2890
|
+
await _prepareLabelsFromPattern(/*layer,*/ featureSet, attributeOrigNames, attributeTypes, attributeDomains, labelFormatProps.attributeFormats, labelFormatProps.labelFormat.format, includeHeaderNames)
|
2891
|
+
: labelFormatProps.labelFormat.type === "executor" ?
|
2892
|
+
// Export attributes in expression
|
2893
|
+
await _prepareLabelsUsingExecutor(featureSet, labelFormatProps.labelFormat.format)
|
2665
2894
|
:
|
2666
|
-
// Export attributes
|
2667
|
-
await
|
2895
|
+
// Export all attributes
|
2896
|
+
await _prepareLabelsFromAll(featureSet, attributeTypes, attributeDomains, includeHeaderNames);
|
2668
2897
|
return Promise.resolve(labels);
|
2669
2898
|
}
|
2670
2899
|
/**
|
@@ -2708,14 +2937,30 @@ async function _prepareLabelsFromAll(featureSet, attributeTypes, attributeDomain
|
|
2708
2937
|
* @param includeHeaderNames Add the label format at the front of the list of generated labels
|
2709
2938
|
* @returns Promise resolving with list of labels, each of which is a list of label lines
|
2710
2939
|
*/
|
2711
|
-
async function _prepareLabelsFromPattern(
|
2940
|
+
async function _prepareLabelsFromPattern(
|
2941
|
+
//layer: __esri.FeatureLayer,
|
2942
|
+
featureSet, attributeOrigNames, attributeTypes, attributeDomains, attributeFormats, labelFormat, includeHeaderNames = false) {
|
2712
2943
|
const [intl] = await loadModules(["esri/intl"]);
|
2713
2944
|
// Find the label fields that we need to replace with values
|
2714
2945
|
const attributeExpressionMatches = _getFieldExpressionsFromLabel(labelFormat);
|
2715
2946
|
const attributeNames = _getFieldNamesFromFieldExpressions(attributeExpressionMatches);
|
2947
|
+
// Do we need any Arcade executors?
|
2948
|
+
//const arcadeExecutors = await _createArcadeExecutors(labelFormat, layer);
|
2949
|
+
//const arcadeExpressionRegExp = /\{expression\/\w+\}/g;
|
2950
|
+
// Find the label fields that we need to replace with values
|
2951
|
+
//const arcadeExpressionMatches = labelFormat.match(arcadeExpressionRegExp) ?? [];
|
2716
2952
|
// Convert feature attributes into an array of labels
|
2717
2953
|
const labels = await Promise.all(featureSet.map(async (feature) => {
|
2718
2954
|
let labelPrep = labelFormat;
|
2955
|
+
/*
|
2956
|
+
// Replace Arcade expressions in this feature
|
2957
|
+
for (let i = 0; i < arcadeExpressionMatches.length; i++) {
|
2958
|
+
const match: string = arcadeExpressionMatches[i];
|
2959
|
+
const expressionName = match.substring(match.indexOf("/") + 1, match.length - 1);
|
2960
|
+
const value = await arcadeExecutors[expressionName].executeAsync({"$feature": feature, "$layer", layer});
|
2961
|
+
labelPrep = labelPrep.replace(match, value);
|
2962
|
+
}
|
2963
|
+
*/
|
2719
2964
|
// Replace non-Arcade fields in this feature
|
2720
2965
|
attributeNames.forEach((attributeName, i) => {
|
2721
2966
|
const lowercaseFieldname = attributeName.toLowerCase();
|
@@ -9,7 +9,7 @@ import { g as getLocaleComponentStrings } from './locale.js';
|
|
9
9
|
import { d as defineCustomElement$2 } from './icon.js';
|
10
10
|
import { d as defineCustomElement$1 } from './notice.js';
|
11
11
|
|
12
|
-
const editCardCss = ":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}";
|
12
|
+
const editCardCss = ":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}.esri-feature__content-node{background-color:var(--calcite-ui-foreground-1) !important}.esri-editor__panel-toolbar{display:none !important}";
|
13
13
|
|
14
14
|
const EditCard = /*@__PURE__*/ proxyCustomElement(class EditCard extends HTMLElement {
|
15
15
|
constructor() {
|
@@ -16,7 +16,7 @@ import { d as defineCustomElement$3 } from './shell.js';
|
|
16
16
|
import { d as defineCustomElement$2 } from './tooltip.js';
|
17
17
|
import { d as defineCustomElement$1 } from './edit-card2.js';
|
18
18
|
|
19
|
-
const infoCardCss = ":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}.
|
19
|
+
const infoCardCss = ":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}.esri-features__footer{display:none !important}.button-container{justify-content:space-between;align-items:center}.top-border{border-top:1px solid var(--calcite-ui-border-1)}.min-width-100{min-width:100px}.width-100{width:100%}.esri-features__container{padding:0.5rem !important;background-color:var(--calcite-ui-foreground-1) !important;height:100% !important}";
|
20
20
|
|
21
21
|
const InfoCard = /*@__PURE__*/ proxyCustomElement(class InfoCard extends HTMLElement {
|
22
22
|
constructor() {
|
@@ -107,7 +107,7 @@ const InfoCard = /*@__PURE__*/ proxyCustomElement(class InfoCard extends HTMLEle
|
|
107
107
|
const featureNodeClass = this.isLoading || this._editRecordOpen ? "display-none" : "position-absolute";
|
108
108
|
const editClass = !this.isLoading && this._editRecordOpen ? "position-absolute" : "display-none";
|
109
109
|
const editButtonClass = !this.isLoading && this._editRecordOpen ? "display-none" : "";
|
110
|
-
return (h(Host, null, h("calcite-shell", null, h("calcite-loader", { class: loadingClass, label: this._translations.fetchingData }), h("div", { class: "esri-widget " + featureNodeClass, id: "features-node" }), h("div", { class: `${editButtonClass}
|
110
|
+
return (h(Host, null, h("calcite-shell", null, h("calcite-loader", { class: loadingClass, label: this._translations.fetchingData }), h("div", { class: "esri-widget " + featureNodeClass, id: "features-node" }), h("div", { class: `${editButtonClass} width-100`, slot: "footer" }, h("div", { class: "display-flex top-border padding-1-2" }, h("calcite-button", { appearance: "solid", "icon-start": "pencil", id: "solutions-edit", onClick: () => this._openEditRecord(), width: "full" }, this._translations.edit), h("calcite-tooltip", { label: "", placement: "bottom", "reference-element": "solutions-edit" }, h("span", null, this._translations.edit))), h("div", { class: "display-flex padding-1-2 button-container top-border" }, h("div", { class: "min-width-100" }, h("calcite-button", { appearance: "outline", id: "solutions-back", onClick: () => this._back(), width: "full" }, this._translations.back), h("calcite-tooltip", { label: "", placement: "top", "reference-element": "solutions-back" }, h("span", null, this._translations.back))), h("div", null, this._getCount()), h("div", { class: "min-width-100" }, h("calcite-button", { appearance: "outline", id: "solutions-next", onClick: () => this._next(), width: "full" }, this._translations.next), h("calcite-tooltip", { label: "", placement: "top", "reference-element": "solutions-next" }, h("span", null, this._translations.next))))), h("edit-card", { class: editClass, graphicIndex: (_a = this._features) === null || _a === void 0 ? void 0 : _a.selectedFeatureIndex, graphics: this.graphics, mapView: this.mapView, open: this._editRecordOpen }), h("calcite-alert", { icon: "layer-broken", kind: "warning", label: "", onCalciteAlertClose: () => this._alertClosed(), open: this._alertOpen, placement: "top" }, h("div", { slot: "title" }, this._translations.editDisabled), h("div", { slot: "message" }, this._translations.enableEditing)))));
|
111
111
|
}
|
112
112
|
//--------------------------------------------------------------------------
|
113
113
|
//
|