@esri/solutions-components 0.6.17 → 0.6.19
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +1 -1
- package/dist/assets/t9n/map-tools/resources.json +2 -1
- package/dist/assets/t9n/map-tools/resources_en.json +2 -1
- package/dist/assets/t9n/solution-spatial-ref/resources.json +0 -1
- package/dist/assets/t9n/solution-spatial-ref/resources_en.json +0 -1
- package/dist/assets/t9n/solution-spatial-ref/resources_fr.json +6 -0
- package/dist/assets/t9n/solution-spatial-ref/resources_he.json +6 -0
- package/dist/assets/t9n/spatial-ref/resources.json +3 -0
- package/dist/assets/t9n/spatial-ref/resources_en.json +3 -0
- package/dist/assets/t9n/spatial-ref/resources_fr.json +3 -0
- package/dist/assets/t9n/spatial-ref/resources_he.json +3 -0
- package/dist/cjs/{ExpandToggle-18c74d06.js → ExpandToggle-39e472da.js} +1 -1
- package/dist/cjs/{FloatingArrow-8cc84cea.js → FloatingArrow-8c88459a.js} +1 -1
- package/dist/cjs/{Heading-c02158c2.js → Heading-8b27f655.js} +1 -1
- package/dist/cjs/{ar-3ed0e602.js → ar-6b662222.js} +5 -5
- package/dist/cjs/{basemap-gallery_6.cjs.entry.js → basemap-gallery_7.cjs.entry.js} +128 -6
- package/dist/cjs/{bg-6057cefd.js → bg-fa2dc0d8.js} +5 -5
- package/dist/cjs/{bs-7a26fe7c.js → bs-feb3d9c5.js} +5 -5
- package/dist/cjs/buffer-tools_4.cjs.entry.js +7 -7
- package/dist/cjs/{ca-5f6c553c.js → ca-0277c48d.js} +5 -5
- package/dist/cjs/calcite-accordion-item.cjs.entry.js +2 -2
- package/dist/cjs/calcite-accordion.cjs.entry.js +1 -1
- package/dist/cjs/calcite-action-bar_3.cjs.entry.js +5 -5
- package/dist/cjs/calcite-action-group_2.cjs.entry.js +4 -4
- package/dist/cjs/calcite-action-pad.cjs.entry.js +5 -5
- package/dist/cjs/calcite-action_2.cjs.entry.js +6 -6
- package/dist/cjs/calcite-alert.cjs.entry.js +4 -4
- package/dist/cjs/calcite-avatar.cjs.entry.js +1 -1
- package/dist/cjs/calcite-block-section.cjs.entry.js +3 -3
- package/dist/cjs/calcite-block.cjs.entry.js +5 -5
- package/dist/cjs/calcite-button.cjs.entry.js +4 -4
- package/dist/cjs/calcite-card.cjs.entry.js +3 -3
- package/dist/cjs/{calcite-tree_3.cjs.entry.js → calcite-checkbox_3.cjs.entry.js} +124 -320
- package/dist/cjs/calcite-chip-group.cjs.entry.js +2 -2
- package/dist/cjs/calcite-chip.cjs.entry.js +4 -4
- package/dist/cjs/calcite-color-picker-hex-input_2.cjs.entry.js +2 -2
- package/dist/cjs/calcite-color-picker.cjs.entry.js +3 -3
- package/dist/cjs/calcite-combobox-item-group.cjs.entry.js +1 -1
- package/dist/cjs/calcite-combobox_6.cjs.entry.js +24 -20
- package/dist/cjs/calcite-date-picker-day_3.cjs.entry.js +2 -2
- package/dist/cjs/calcite-date-picker.cjs.entry.js +4 -4
- package/dist/cjs/calcite-fab.cjs.entry.js +2 -2
- package/dist/cjs/calcite-filter_3.cjs.entry.js +3 -3
- package/dist/cjs/calcite-flow-item.cjs.entry.js +3 -3
- package/dist/cjs/calcite-flow.cjs.entry.js +2 -2
- package/dist/cjs/calcite-graph.cjs.entry.js +1 -1
- package/dist/cjs/calcite-icon.cjs.entry.js +1 -1
- package/dist/cjs/calcite-inline-editable.cjs.entry.js +3 -3
- package/dist/cjs/calcite-input-date-picker.cjs.entry.js +6 -6
- package/dist/cjs/calcite-input-number_2.cjs.entry.js +4 -4
- package/dist/cjs/{calcite-input-time-picker-c1aa4c8f.js → calcite-input-time-picker-0b068c1f.js} +53 -53
- package/dist/cjs/calcite-input-time-picker.cjs.entry.js +5 -5
- package/dist/cjs/calcite-input-time-zone.cjs.entry.js +4 -4
- package/dist/cjs/calcite-input_2.cjs.entry.js +4 -4
- package/dist/cjs/calcite-label.cjs.entry.js +1 -1
- package/dist/cjs/calcite-link.cjs.entry.js +2 -2
- package/dist/cjs/calcite-list-item-group.cjs.entry.js +1 -1
- package/dist/cjs/calcite-loader.cjs.entry.js +1 -1
- package/dist/cjs/calcite-menu-item.cjs.entry.js +3 -3
- package/dist/cjs/calcite-menu.cjs.entry.js +3 -3
- package/dist/cjs/calcite-meter.cjs.entry.js +3 -3
- package/dist/cjs/calcite-modal.cjs.entry.js +5 -5
- package/dist/cjs/calcite-navigation-logo.cjs.entry.js +2 -2
- package/dist/cjs/calcite-navigation-user.cjs.entry.js +2 -2
- package/dist/cjs/calcite-navigation.cjs.entry.js +2 -2
- package/dist/cjs/calcite-notice_2.cjs.entry.js +6 -6
- package/dist/cjs/calcite-option-group.cjs.entry.js +1 -1
- package/dist/cjs/calcite-option_2.cjs.entry.js +3 -3
- package/dist/cjs/calcite-pagination.cjs.entry.js +3 -3
- package/dist/cjs/calcite-panel_2.cjs.entry.js +5 -5
- package/dist/cjs/calcite-pick-list-group.cjs.entry.js +3 -3
- package/dist/cjs/calcite-pick-list-item.cjs.entry.js +4 -4
- package/dist/cjs/calcite-pick-list.cjs.entry.js +3 -3
- package/dist/cjs/calcite-radio-button-group.cjs.entry.js +2 -2
- package/dist/cjs/calcite-radio-button.cjs.entry.js +3 -3
- package/dist/cjs/calcite-rating.cjs.entry.js +4 -4
- package/dist/cjs/calcite-scrim.cjs.entry.js +2 -2
- package/dist/cjs/calcite-segmented-control_2.cjs.entry.js +3 -3
- package/dist/cjs/calcite-sheet.cjs.entry.js +3 -3
- package/dist/cjs/calcite-shell-center-row.cjs.entry.js +2 -2
- package/dist/cjs/calcite-shell-panel_14.cjs.entry.js +11 -10
- package/dist/cjs/calcite-sortable-list.cjs.entry.js +1 -1
- package/dist/cjs/calcite-split-button.cjs.entry.js +2 -2
- package/dist/cjs/calcite-stepper-item.cjs.entry.js +2 -2
- package/dist/cjs/calcite-stepper.cjs.entry.js +1 -1
- package/dist/cjs/calcite-switch.cjs.entry.js +3 -3
- package/dist/cjs/calcite-table-cell_2.cjs.entry.js +3 -3
- package/dist/cjs/calcite-table-row.cjs.entry.js +1 -1
- package/dist/cjs/calcite-table.cjs.entry.js +3 -3
- package/dist/cjs/calcite-text-area.cjs.entry.js +4 -4
- package/dist/cjs/calcite-tile-select-group.cjs.entry.js +1 -1
- package/dist/cjs/calcite-tile-select.cjs.entry.js +2 -2
- package/dist/cjs/calcite-tile.cjs.entry.js +2 -2
- package/dist/cjs/calcite-time-picker.cjs.entry.js +3 -3
- package/dist/cjs/calcite-tip-group.cjs.entry.js +1 -1
- package/dist/cjs/calcite-tip-manager.cjs.entry.js +3 -3
- package/dist/cjs/calcite-tip.cjs.entry.js +4 -4
- package/dist/cjs/card-manager_3.cjs.entry.js +15 -12
- package/dist/{collection/components/card-manager/test/card-manager.e2e.js → cjs/common-13719149.js} +17 -9
- package/dist/cjs/{conditionalSlot-c989690a.js → conditionalSlot-795790b5.js} +1 -1
- package/dist/cjs/crowdsource-manager.cjs.entry.js +14 -9
- package/dist/cjs/crowdsource-reporter.cjs.entry.js +1 -1
- package/dist/cjs/{cs-532325fc.js → cs-6f20de14.js} +5 -5
- package/dist/cjs/{da-41411e1e.js → da-d4b3c7de.js} +5 -5
- package/dist/cjs/{de-at-31452a36.js → de-at-b9df2464.js} +5 -5
- package/dist/cjs/{de-7faafe28.js → de-cd070c4c.js} +5 -5
- package/dist/cjs/{de-ch-c05ad794.js → de-ch-8012e3ac.js} +5 -5
- package/dist/cjs/deduct-calculator.cjs.entry.js +1 -1
- package/dist/cjs/{downloadUtils-121fd7ff.js → downloadUtils-3e8b45ec.js} +3 -3
- package/dist/cjs/edit-card_2.cjs.entry.js +7 -6
- package/dist/cjs/{el-336b9b7a.js → el-3bafc319.js} +5 -5
- package/dist/cjs/{en-au-274bdf3e.js → en-au-69ac6dd5.js} +5 -5
- package/dist/cjs/{en-ca-feb0dab0.js → en-ca-e2d69548.js} +5 -5
- package/dist/cjs/{en-gb-0d00325d.js → en-gb-43cbe44d.js} +5 -5
- package/dist/cjs/{es-13de9478.js → es-f809bdee.js} +5 -5
- package/dist/cjs/{es-mx-a889d63d.js → es-mx-cb6bdcde.js} +5 -5
- package/dist/cjs/{et-e8b90e16.js → et-d1fb804f.js} +5 -5
- package/dist/cjs/{fi-7a32cf84.js → fi-809e575d.js} +5 -5
- package/dist/cjs/{form-44895e53.js → form-78a3337d.js} +1 -1
- package/dist/cjs/{fr-ch-1b79327b.js → fr-ch-ec117c1a.js} +5 -5
- package/dist/cjs/{fr-4b281d52.js → fr-e300020c.js} +5 -5
- package/dist/cjs/{he-b155cf0c.js → he-f419115b.js} +5 -5
- package/dist/cjs/{hi-f036e41f.js → hi-0837fa9e.js} +5 -5
- package/dist/cjs/{hr-ef421ab5.js → hr-26c92b0c.js} +5 -5
- package/dist/cjs/{hu-9a9495fa.js → hu-b4348f61.js} +5 -5
- package/dist/cjs/{id-57d1c6f3.js → id-39ae2fbb.js} +5 -5
- package/dist/cjs/{index-ee37804b.js → index-1ffa261f.js} +48 -18
- package/dist/cjs/{index-feeb7b6a.js → index-2bdbac04.js} +1 -1
- package/dist/cjs/{index.es-5c0c137a.js → index.es-bf2ee853.js} +4 -4
- package/dist/cjs/{it-cd26a173.js → it-c0010df5.js} +5 -5
- package/dist/cjs/{it-ch-7704635a.js → it-ch-1d96ff25.js} +5 -5
- package/dist/cjs/{ja-a40fc95f.js → ja-d612ffd0.js} +5 -5
- package/dist/cjs/{ko-1ca619b7.js → ko-3bacee3c.js} +5 -5
- package/dist/cjs/layout-manager.cjs.entry.js +2 -2
- package/dist/cjs/list-item.cjs.entry.js +1 -1
- package/dist/cjs/{loadModules-f6df8d6a.js → loadModules-03328b9d.js} +1 -1
- package/dist/cjs/{loadable-5d36908d.js → loadable-d12ec307.js} +1 -1
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/{locale-67f5f6b6.js → locale-d50f3250.js} +1 -1
- package/dist/cjs/{lt-1d18afa8.js → lt-3d9fa497.js} +5 -5
- package/dist/cjs/{lv-142ba83c.js → lv-3b7eddb4.js} +5 -5
- package/dist/cjs/map-select-tools_3.cjs.entry.js +6 -6
- package/dist/cjs/{mk-fa7c661d.js → mk-06e25b87.js} +5 -5
- package/dist/cjs/{nb-bae4efed.js → nb-631e48ca.js} +5 -5
- package/dist/cjs/{nl-2a0ce458.js → nl-6db6ac0b.js} +5 -5
- package/dist/cjs/{openCloseComponent-078fbb79.js → openCloseComponent-cfafcccc.js} +1 -1
- package/dist/cjs/pci-calculator.cjs.entry.js +1 -1
- package/dist/cjs/{pl-bbd4edda.js → pl-a139e04e.js} +5 -5
- package/dist/cjs/{pt-br-36764205.js → pt-br-11aab00e.js} +5 -5
- package/dist/cjs/{pt-74ab8ef9.js → pt-f3d702ac.js} +5 -5
- package/dist/cjs/public-notification.cjs.entry.js +6 -6
- package/dist/cjs/{publicNotificationStore-610bd880.js → publicNotificationStore-9c812ef4.js} +1 -1
- package/dist/cjs/{ro-ce2e1b5a.js → ro-49c70e64.js} +5 -5
- package/dist/cjs/{ru-0349726f.js → ru-304563d2.js} +5 -5
- package/dist/cjs/{shared-list-render-a5fb8233.js → shared-list-render-e6464688.js} +1 -1
- package/dist/cjs/{sk-2a42230b.js → sk-a8fe9263.js} +5 -5
- package/dist/cjs/{sl-27146799.js → sl-bf82d012.js} +5 -5
- package/dist/cjs/solution-configuration.cjs.entry.js +5 -4
- package/dist/cjs/solution-contents_3.cjs.entry.js +23 -21258
- package/dist/cjs/solution-item-icon.cjs.entry.js +327 -0
- package/dist/cjs/{solution-store-c443e657.js → solution-resource-f9e3b289.js} +2 -1698
- package/dist/cjs/solution-store-714601a2.js +1707 -0
- package/dist/cjs/solutions-components.cjs.js +3 -3
- package/dist/cjs/spatial-ref.cjs.entry.js +21293 -0
- package/dist/cjs/{sr-72fa52b5.js → sr-4f2f9974.js} +5 -5
- package/dist/cjs/store-manager.cjs.entry.js +1 -1
- package/dist/cjs/{sv-c7abc43b.js → sv-a2916e2b.js} +5 -5
- package/dist/cjs/{t9n-a3d7ce48.js → t9n-c630f16d.js} +1 -1
- package/dist/cjs/{th-e7620fd7.js → th-c5f23e8f.js} +5 -5
- package/dist/cjs/{tr-c1f9956d.js → tr-0486b336.js} +5 -5
- package/dist/cjs/{uk-a5fc4e4a.js → uk-3cf18069.js} +5 -5
- package/dist/cjs/{utils-a4918620.js → utils-0f154174.js} +1 -1
- package/dist/cjs/{vi-bd88795c.js → vi-813fe8f6.js} +5 -5
- package/dist/cjs/{zh-cn-797be53d.js → zh-cn-e835d4ea.js} +5 -5
- package/dist/cjs/{zh-hk-d1f6cd4e.js → zh-hk-cdc4af5b.js} +5 -5
- package/dist/cjs/{zh-tw-0342f9c3.js → zh-tw-5a93dab8.js} +5 -5
- package/dist/collection/collection-manifest.json +4 -2
- package/dist/collection/components/card-manager/card-manager.js +2 -2
- package/dist/collection/components/crowdsource-manager/crowdsource-manager.css +16 -0
- package/dist/collection/components/crowdsource-manager/crowdsource-manager.js +47 -6
- package/dist/collection/components/edit-card/edit-card.css +0 -12
- package/dist/collection/components/floor-filter/floor-filter.css +19 -0
- package/dist/collection/components/floor-filter/floor-filter.js +181 -0
- package/dist/collection/components/info-card/info-card.js +3 -2
- package/dist/collection/components/layer-table/layer-table.css +8 -0
- package/dist/collection/components/layer-table/layer-table.js +20 -4
- package/dist/collection/components/map-card/map-card.js +19 -1
- package/dist/collection/components/map-layer-picker/map-layer-picker.js +15 -11
- package/dist/collection/components/map-picker/map-picker.css +1 -4
- package/dist/collection/components/map-picker/map-picker.js +1 -1
- package/dist/collection/components/map-tools/map-tools.js +54 -1
- package/dist/collection/components/solution-configuration/solution-configuration.js +7 -1
- package/dist/collection/components/solution-spatial-ref/solution-spatial-ref.css +1 -7
- package/dist/collection/components/solution-spatial-ref/solution-spatial-ref.js +37 -291
- package/dist/collection/components/solution-spatial-ref/test/solution-spatial-ref.e2e.js +24 -12
- package/dist/collection/components/solution-spatial-ref/test/solution-spatial-ref.spec.js +32 -128
- package/dist/collection/components/spatial-ref/spatial-ref.css +20 -0
- package/dist/collection/components/spatial-ref/spatial-ref.js +445 -0
- package/dist/collection/components/spatial-ref/test/spatial-ref.e2e.js +71 -0
- package/dist/collection/components/spatial-ref/test/spatial-ref.spec.js +158 -0
- package/dist/collection/demos/crowdsource-manager.html +4 -0
- package/dist/collection/demos/solution-spatial-ref.html +9 -16
- package/dist/collection/demos/spatial-ref.html +53 -0
- package/dist/collection/utils/{templates.e2e.js → test/templates.e2e.js} +2 -2
- package/dist/collection/utils/{templates.e2e.ts → test/templates.e2e.ts} +2 -2
- package/dist/components/action-bar.js +7 -0
- package/dist/components/action-group.js +4 -0
- package/dist/components/action-menu.js +5 -1
- package/dist/components/action.js +3 -0
- package/dist/components/alert.js +8 -1
- package/dist/components/basemap-gallery2.js +2 -0
- package/dist/components/buffer-tools2.js +3 -0
- package/dist/components/button.js +4 -0
- package/dist/components/calcite-accordion.js +6 -1
- package/dist/components/calcite-action-pad.js +5 -0
- package/dist/components/calcite-block-section.js +3 -0
- package/dist/components/calcite-block.js +3 -0
- package/dist/components/calcite-card.js +3 -0
- package/dist/components/calcite-chip-group.js +3 -1
- package/dist/components/calcite-color-picker.js +9 -1
- package/dist/components/calcite-flow-item.js +3 -0
- package/dist/components/calcite-inline-editable.js +6 -1
- package/dist/components/calcite-input-date-picker.js +16 -1
- package/dist/components/calcite-input-time-picker.js +10 -0
- package/dist/components/calcite-input-time-zone.js +3 -0
- package/dist/components/calcite-menu-item.js +4 -1
- package/dist/components/calcite-meter.js +11 -0
- package/dist/components/calcite-option-group.js +3 -0
- package/dist/components/calcite-radio-button-group.js +6 -1
- package/dist/components/calcite-radio-button.js +6 -1
- package/dist/components/calcite-rating.js +4 -0
- package/dist/components/calcite-sheet.js +5 -1
- package/dist/components/calcite-split-button.js +3 -0
- package/dist/components/calcite-stepper-item.js +5 -1
- package/dist/components/calcite-stepper.js +7 -1
- package/dist/components/calcite-table-row.js +8 -1
- package/dist/components/calcite-table.js +10 -1
- package/dist/components/calcite-text-area.js +3 -0
- package/dist/components/calcite-tile-select.js +4 -1
- package/dist/components/calcite-tip-manager.js +5 -0
- package/dist/components/calcite-tip.js +3 -0
- package/dist/components/card-manager2.js +2 -2
- package/dist/components/chip.js +4 -1
- package/dist/components/color-picker-hex-input.js +2 -0
- package/dist/components/color-picker-swatch.js +2 -0
- package/dist/components/combobox-item.js +2 -0
- package/dist/components/combobox.js +14 -1
- package/dist/components/crowdsource-manager.js +86 -73
- package/dist/components/date-picker-month-header.js +4 -0
- package/dist/components/date-picker.js +8 -0
- package/dist/components/dropdown-group.js +3 -1
- package/dist/components/dropdown.js +9 -1
- package/dist/components/edit-card2.js +4 -1
- package/dist/components/filter2.js +5 -0
- package/dist/components/floor-filter.d.ts +11 -0
- package/dist/components/floor-filter.js +11 -0
- package/dist/components/floor-filter2.js +119 -0
- package/dist/components/handle.js +8 -0
- package/dist/components/icon.js +3 -0
- package/dist/components/info-card2.js +7 -3
- package/dist/components/input-message.js +3 -0
- package/dist/components/input-number.js +8 -0
- package/dist/components/input-text.js +6 -0
- package/dist/components/input.js +9 -0
- package/dist/components/layer-table2.js +12 -6
- package/dist/components/list-item2.js +8 -1
- package/dist/components/list.js +8 -1
- package/dist/components/map-card2.js +45 -37
- package/dist/components/map-draw-tools2.js +3 -0
- package/dist/components/map-fullscreen2.js +2 -0
- package/dist/components/map-layer-picker2.js +17 -11
- package/dist/components/map-legend2.js +2 -0
- package/dist/components/map-picker2.js +5 -2
- package/dist/components/map-search2.js +3 -0
- package/dist/components/map-select-tools2.js +4 -1
- package/dist/components/map-tools2.js +58 -11
- package/dist/components/menu.js +5 -1
- package/dist/components/modal.js +7 -1
- package/dist/components/notice.js +5 -0
- package/dist/components/option.js +5 -0
- package/dist/components/pagination.js +3 -0
- package/dist/components/panel.js +3 -0
- package/dist/components/pick-list-item.js +9 -0
- package/dist/components/popover.js +11 -0
- package/dist/components/public-notification.js +8 -1
- package/dist/components/scrim.js +3 -0
- package/dist/components/segmented-control-item.js +2 -0
- package/dist/components/segmented-control.js +7 -1
- package/dist/components/select.js +4 -1
- package/dist/components/shell-panel.js +8 -0
- package/dist/components/slider.js +7 -1
- package/dist/components/solution-configuration.js +83 -73
- package/dist/components/solution-contents2.js +2 -0
- package/dist/components/solution-item-sharing2.js +2 -0
- package/dist/components/solution-item2.js +2 -0
- package/dist/components/solution-organization-variables2.js +2 -0
- package/dist/components/solution-resource-item2.js +4 -1
- package/dist/components/solution-resource.js +1836 -0
- package/dist/components/solution-spatial-ref2.js +41 -21277
- package/dist/components/solution-store.js +2 -1830
- package/dist/components/solution-template-data2.js +2 -0
- package/dist/components/solution-variables2.js +2 -0
- package/dist/components/spatial-ref.d.ts +11 -0
- package/dist/components/spatial-ref.js +11 -0
- package/dist/components/spatial-ref2.js +21376 -0
- package/dist/components/tab-nav.js +4 -1
- package/dist/components/tab-title.js +5 -1
- package/dist/components/table-cell.js +4 -0
- package/dist/components/table-header.js +5 -0
- package/dist/components/time-picker.js +6 -1
- package/dist/components/tooltip.js +7 -0
- package/dist/components/tree-item.js +5 -1
- package/dist/components/value-list.js +4 -1
- package/dist/esm/{ExpandToggle-cc557b88.js → ExpandToggle-583be90e.js} +1 -1
- package/dist/esm/{FloatingArrow-2ae40cab.js → FloatingArrow-f3c4aaad.js} +1 -1
- package/dist/esm/{Heading-e0cca2ac.js → Heading-28b8fc31.js} +1 -1
- package/dist/esm/{ar-ddf52dcc.js → ar-d7509316.js} +5 -5
- package/dist/esm/{basemap-gallery_6.entry.js → basemap-gallery_7.entry.js} +128 -7
- package/dist/esm/{bg-6ae0e04d.js → bg-a6c0d55d.js} +5 -5
- package/dist/esm/{bs-b8b19908.js → bs-a98cc594.js} +5 -5
- package/dist/esm/buffer-tools_4.entry.js +7 -7
- package/dist/esm/{ca-35b5c182.js → ca-8d7b9677.js} +5 -5
- package/dist/esm/calcite-accordion-item.entry.js +2 -2
- package/dist/esm/calcite-accordion.entry.js +1 -1
- package/dist/esm/calcite-action-bar_3.entry.js +5 -5
- package/dist/esm/calcite-action-group_2.entry.js +4 -4
- package/dist/esm/calcite-action-pad.entry.js +5 -5
- package/dist/esm/calcite-action_2.entry.js +6 -6
- package/dist/esm/calcite-alert.entry.js +4 -4
- 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 +5 -5
- package/dist/esm/calcite-button.entry.js +4 -4
- package/dist/esm/calcite-card.entry.js +3 -3
- package/dist/esm/{calcite-tree_3.entry.js → calcite-checkbox_3.entry.js} +125 -321
- package/dist/esm/calcite-chip-group.entry.js +2 -2
- package/dist/esm/calcite-chip.entry.js +4 -4
- package/dist/esm/calcite-color-picker-hex-input_2.entry.js +2 -2
- package/dist/esm/calcite-color-picker.entry.js +3 -3
- package/dist/esm/calcite-combobox-item-group.entry.js +1 -1
- package/dist/esm/calcite-combobox_6.entry.js +24 -20
- package/dist/esm/calcite-date-picker-day_3.entry.js +2 -2
- package/dist/esm/calcite-date-picker.entry.js +4 -4
- package/dist/esm/calcite-fab.entry.js +2 -2
- package/dist/esm/calcite-filter_3.entry.js +3 -3
- package/dist/esm/calcite-flow-item.entry.js +3 -3
- package/dist/esm/calcite-flow.entry.js +2 -2
- package/dist/esm/calcite-graph.entry.js +1 -1
- package/dist/esm/calcite-icon.entry.js +1 -1
- package/dist/esm/calcite-inline-editable.entry.js +3 -3
- package/dist/esm/calcite-input-date-picker.entry.js +6 -6
- package/dist/esm/calcite-input-number_2.entry.js +4 -4
- package/dist/esm/{calcite-input-time-picker-25074af7.js → calcite-input-time-picker-f5250903.js} +53 -53
- package/dist/esm/calcite-input-time-picker.entry.js +5 -5
- package/dist/esm/calcite-input-time-zone.entry.js +4 -4
- package/dist/esm/calcite-input_2.entry.js +4 -4
- package/dist/esm/calcite-label.entry.js +1 -1
- package/dist/esm/calcite-link.entry.js +2 -2
- package/dist/esm/calcite-list-item-group.entry.js +1 -1
- package/dist/esm/calcite-loader.entry.js +1 -1
- package/dist/esm/calcite-menu-item.entry.js +3 -3
- package/dist/esm/calcite-menu.entry.js +3 -3
- package/dist/esm/calcite-meter.entry.js +3 -3
- package/dist/esm/calcite-modal.entry.js +5 -5
- package/dist/esm/calcite-navigation-logo.entry.js +2 -2
- package/dist/esm/calcite-navigation-user.entry.js +2 -2
- package/dist/esm/calcite-navigation.entry.js +2 -2
- package/dist/esm/calcite-notice_2.entry.js +6 -6
- package/dist/esm/calcite-option-group.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 +5 -5
- package/dist/esm/calcite-pick-list-group.entry.js +3 -3
- package/dist/esm/calcite-pick-list-item.entry.js +4 -4
- package/dist/esm/calcite-pick-list.entry.js +3 -3
- package/dist/esm/calcite-radio-button-group.entry.js +2 -2
- package/dist/esm/calcite-radio-button.entry.js +3 -3
- package/dist/esm/calcite-rating.entry.js +4 -4
- package/dist/esm/calcite-scrim.entry.js +2 -2
- package/dist/esm/calcite-segmented-control_2.entry.js +3 -3
- package/dist/esm/calcite-sheet.entry.js +3 -3
- package/dist/esm/calcite-shell-center-row.entry.js +2 -2
- package/dist/esm/calcite-shell-panel_14.entry.js +9 -8
- package/dist/esm/calcite-sortable-list.entry.js +1 -1
- package/dist/esm/calcite-split-button.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-table-cell_2.entry.js +3 -3
- package/dist/esm/calcite-table-row.entry.js +1 -1
- package/dist/esm/calcite-table.entry.js +3 -3
- package/dist/esm/calcite-text-area.entry.js +4 -4
- package/dist/esm/calcite-tile-select-group.entry.js +1 -1
- package/dist/esm/calcite-tile-select.entry.js +2 -2
- package/dist/esm/calcite-tile.entry.js +2 -2
- package/dist/esm/calcite-time-picker.entry.js +3 -3
- package/dist/esm/calcite-tip-group.entry.js +1 -1
- package/dist/esm/calcite-tip-manager.entry.js +3 -3
- package/dist/esm/calcite-tip.entry.js +4 -4
- package/dist/esm/card-manager_3.entry.js +15 -12
- package/dist/{collection/components/buffer-tools/test/buffer-tools.e2e.js → esm/common-e4a8e353.js} +15 -9
- package/dist/esm/{conditionalSlot-1fee63c6.js → conditionalSlot-7a5c509c.js} +1 -1
- package/dist/esm/crowdsource-manager.entry.js +14 -9
- package/dist/esm/crowdsource-reporter.entry.js +1 -1
- package/dist/esm/{cs-6b705d4a.js → cs-38f3de9d.js} +5 -5
- package/dist/esm/{da-98fb2f82.js → da-6ef39f6c.js} +5 -5
- package/dist/esm/{de-8c50f5a9.js → de-6aef04c8.js} +5 -5
- package/dist/esm/{de-at-1691a616.js → de-at-6617bb68.js} +5 -5
- package/dist/esm/{de-ch-79a84498.js → de-ch-552d1170.js} +5 -5
- package/dist/esm/deduct-calculator.entry.js +1 -1
- package/dist/esm/{downloadUtils-287994b1.js → downloadUtils-13d9188b.js} +3 -3
- package/dist/esm/edit-card_2.entry.js +7 -6
- package/dist/esm/{el-190e7ae2.js → el-36c2f66f.js} +5 -5
- package/dist/esm/{en-au-0ef540f4.js → en-au-d58f85c1.js} +5 -5
- package/dist/esm/{en-ca-7620d498.js → en-ca-1693b17f.js} +5 -5
- package/dist/esm/{en-gb-9979e5e6.js → en-gb-827d54cc.js} +5 -5
- package/dist/esm/{es-684f674f.js → es-adb3fd4e.js} +5 -5
- package/dist/esm/{es-mx-6557f849.js → es-mx-82199d09.js} +5 -5
- package/dist/esm/{et-39dc88ee.js → et-af7f407f.js} +5 -5
- package/dist/esm/{fi-ae888a7e.js → fi-37c08e8e.js} +5 -5
- package/dist/esm/{form-65431957.js → form-a6c0a47e.js} +1 -1
- package/dist/esm/{fr-0f3e5633.js → fr-1dbd68cf.js} +5 -5
- package/dist/esm/{fr-ch-1d3f3d8b.js → fr-ch-0da3f9d5.js} +5 -5
- package/dist/esm/{he-ded822de.js → he-970bc7e6.js} +5 -5
- package/dist/esm/{hi-2ac80022.js → hi-e332f8ea.js} +5 -5
- package/dist/esm/{hr-394e5f6e.js → hr-e7103f84.js} +5 -5
- package/dist/esm/{hu-20e6d5bf.js → hu-876d56a7.js} +5 -5
- package/dist/esm/{id-b3e29596.js → id-c53da15f.js} +5 -5
- package/dist/esm/{index-c7de2486.js → index-0740c914.js} +48 -18
- package/dist/esm/{index-f4bd5aa3.js → index-71d123d4.js} +1 -1
- package/dist/esm/{index.es-a3f8409f.js → index.es-edd974bc.js} +4 -4
- package/dist/esm/{it-ch-310cd66d.js → it-ch-c7aeaf03.js} +5 -5
- package/dist/esm/{it-fd4ce07f.js → it-f98d068c.js} +5 -5
- package/dist/esm/{ja-491a796f.js → ja-596aa74d.js} +5 -5
- package/dist/esm/{ko-4b0e597a.js → ko-bdf2643b.js} +5 -5
- package/dist/esm/layout-manager.entry.js +2 -2
- package/dist/esm/list-item.entry.js +1 -1
- package/dist/esm/{loadModules-2880c7e3.js → loadModules-687a30c5.js} +1 -1
- package/dist/esm/{loadable-d0274dee.js → loadable-54096620.js} +1 -1
- package/dist/esm/loader.js +3 -3
- package/dist/esm/{locale-9624832c.js → locale-6be4e8f0.js} +1 -1
- package/dist/esm/{lt-e3b6faa8.js → lt-029144ad.js} +5 -5
- package/dist/esm/{lv-843c127b.js → lv-00292bd8.js} +5 -5
- package/dist/esm/map-select-tools_3.entry.js +6 -6
- package/dist/esm/{mk-7d312f03.js → mk-ca84aaa7.js} +5 -5
- package/dist/esm/{nb-2e44a8ff.js → nb-3a17d242.js} +5 -5
- package/dist/esm/{nl-672e572a.js → nl-42fe3f2b.js} +5 -5
- package/dist/esm/{openCloseComponent-c3d01cbc.js → openCloseComponent-fd76e488.js} +1 -1
- package/dist/esm/pci-calculator.entry.js +1 -1
- package/dist/esm/{pl-2d04d234.js → pl-8ccccfb6.js} +5 -5
- package/dist/esm/{pt-03401582.js → pt-470ef28a.js} +5 -5
- package/dist/esm/{pt-br-d672a5e9.js → pt-br-15c5e95d.js} +5 -5
- package/dist/esm/public-notification.entry.js +6 -6
- package/dist/esm/{publicNotificationStore-dcf39a55.js → publicNotificationStore-f25d1e95.js} +1 -1
- package/dist/esm/{ro-af820149.js → ro-6ccfabcf.js} +5 -5
- package/dist/esm/{ru-1a0cd9d9.js → ru-4ca6ea5c.js} +5 -5
- package/dist/esm/{shared-list-render-e8aa5fa4.js → shared-list-render-0d4accf0.js} +1 -1
- package/dist/esm/{sk-1e1c79eb.js → sk-d2cc438e.js} +5 -5
- package/dist/esm/{sl-a99cc70f.js → sl-fa960833.js} +5 -5
- package/dist/esm/solution-configuration.entry.js +5 -4
- package/dist/esm/solution-contents_3.entry.js +22 -21257
- package/dist/esm/solution-item-icon.entry.js +323 -0
- package/dist/esm/{solution-store-b29d50f7.js → solution-resource-be35d35b.js} +1 -1697
- package/dist/esm/solution-store-3ee6c7a3.js +1704 -0
- package/dist/esm/solutions-components.js +4 -4
- package/dist/esm/spatial-ref.entry.js +21289 -0
- package/dist/esm/{sr-17c90387.js → sr-e13a01d0.js} +5 -5
- package/dist/esm/store-manager.entry.js +1 -1
- package/dist/esm/{sv-3a1f0f81.js → sv-ce009db9.js} +5 -5
- package/dist/esm/{t9n-142cc7d6.js → t9n-1eaba69b.js} +1 -1
- package/dist/esm/{th-5b5e589e.js → th-bd60a4c0.js} +5 -5
- package/dist/esm/{tr-2abb582d.js → tr-b117b905.js} +5 -5
- package/dist/esm/{uk-c4017d1c.js → uk-d75d58c8.js} +5 -5
- package/dist/esm/{utils-25bc3baa.js → utils-bc49354a.js} +1 -1
- package/dist/esm/{vi-7fcdb1c9.js → vi-d7057f94.js} +5 -5
- package/dist/esm/{zh-cn-dd3f8e1a.js → zh-cn-21968b0c.js} +5 -5
- package/dist/esm/{zh-hk-c3cc3efa.js → zh-hk-848e7600.js} +5 -5
- package/dist/esm/{zh-tw-9795e61e.js → zh-tw-9930054d.js} +5 -5
- package/dist/solutions-components/demos/crowdsource-manager.html +4 -0
- package/dist/solutions-components/demos/solution-spatial-ref.html +9 -16
- package/dist/solutions-components/demos/spatial-ref.html +53 -0
- package/dist/solutions-components/{p-5ce6c4f9.js → p-0014f93f.js} +1 -1
- package/dist/solutions-components/{p-172c2ff8.js → p-01a8ab25.js} +1 -1
- package/dist/solutions-components/{p-01b8dcb9.entry.js → p-01f06f9a.entry.js} +1 -1
- package/dist/solutions-components/{p-794f5ecf.entry.js → p-02637c3c.entry.js} +1 -1
- package/dist/solutions-components/{p-b08b69f3.entry.js → p-0272b972.entry.js} +3 -3
- package/dist/solutions-components/{p-34471053.entry.js → p-037f2f52.entry.js} +1 -1
- package/dist/solutions-components/{p-31c9aa38.entry.js → p-04660d48.entry.js} +1 -1
- package/dist/solutions-components/{p-d67cd53a.entry.js → p-04735c27.entry.js} +1 -1
- package/dist/solutions-components/{p-0dab4c93.js → p-05948b48.js} +1 -1
- package/dist/solutions-components/{p-04115935.entry.js → p-06bc850e.entry.js} +1 -1
- package/dist/solutions-components/{p-3f749459.entry.js → p-08b96a9c.entry.js} +1 -1
- package/dist/solutions-components/{p-77b3a53c.entry.js → p-09dda965.entry.js} +2 -2
- package/dist/solutions-components/{p-64d29ba2.entry.js → p-0aac33f5.entry.js} +2 -2
- package/dist/solutions-components/p-0d773964.entry.js +6 -0
- package/dist/solutions-components/{p-2e8ac8d0.entry.js → p-10131b72.entry.js} +1 -1
- package/dist/solutions-components/{p-745c7800.js → p-10f990d1.js} +1 -1
- package/dist/solutions-components/{p-267b290f.js → p-112c7f0b.js} +1 -1
- package/dist/solutions-components/p-12e15eaa.js +11 -0
- package/dist/solutions-components/{p-4d942b0f.entry.js → p-13b21d19.entry.js} +2 -2
- package/dist/solutions-components/{p-25489aec.entry.js → p-1468af6d.entry.js} +1 -1
- package/dist/solutions-components/{p-768de060.entry.js → p-15b2c977.entry.js} +1 -1
- package/dist/solutions-components/{p-280fcaab.entry.js → p-1ac699f8.entry.js} +1 -1
- package/dist/{collection/components/map-card/test/map-card.e2e.js → solutions-components/p-1b228f97.js} +2 -10
- package/dist/solutions-components/{p-9c79de73.entry.js → p-1b5fdc60.entry.js} +1 -1
- package/dist/solutions-components/{p-7810711d.js → p-1ed04a5a.js} +1 -1
- package/dist/solutions-components/{p-035a137a.entry.js → p-1fcee160.entry.js} +1 -1
- package/dist/solutions-components/p-2040681e.js +6 -0
- package/dist/solutions-components/{p-6b5f3b85.entry.js → p-22025739.entry.js} +1 -1
- package/dist/solutions-components/p-22edbea5.entry.js +6 -0
- package/dist/solutions-components/{p-129e03dd.entry.js → p-236b2000.entry.js} +1 -1
- package/dist/solutions-components/{p-fedd0f22.js → p-2406fda3.js} +1 -1
- package/dist/solutions-components/{p-7e378eb0.js → p-272018eb.js} +1 -1
- package/dist/solutions-components/{p-f524cc5b.entry.js → p-27492081.entry.js} +1 -1
- package/dist/solutions-components/{p-6fd92ce9.entry.js → p-296909a6.entry.js} +1 -1
- package/dist/solutions-components/{p-45f50640.js → p-29e42601.js} +1 -1
- package/dist/solutions-components/{p-b6babf4d.js → p-2a23b33c.js} +1 -1
- package/dist/solutions-components/{p-1139acc7.js → p-2b749168.js} +1 -1
- package/dist/solutions-components/{p-430a06d9.js → p-2ed7930b.js} +1 -1
- package/dist/solutions-components/{p-bb2a526a.entry.js → p-2ffbb0aa.entry.js} +1 -1
- package/dist/solutions-components/{p-baac72ec.entry.js → p-32d8a04d.entry.js} +1 -1
- package/dist/solutions-components/{p-b8859882.entry.js → p-33247dbf.entry.js} +1 -1
- package/dist/solutions-components/{p-3399ccfd.js → p-345a4781.js} +1 -1
- package/dist/solutions-components/{p-1ab414e0.js → p-375fd36b.js} +2 -2
- package/dist/solutions-components/{p-1cb9e670.js → p-38dcc542.js} +1 -1
- package/dist/solutions-components/{p-4b31c994.entry.js → p-41ee9121.entry.js} +1 -1
- package/dist/solutions-components/{p-7f76fe11.js → p-44f8ec67.js} +1 -1
- package/dist/solutions-components/{p-cc462e38.js → p-482534a7.js} +1 -1
- package/dist/solutions-components/{p-cbd1313c.entry.js → p-499bc634.entry.js} +2 -2
- package/dist/solutions-components/{p-80fea327.js → p-4a382f62.js} +1 -1
- package/dist/solutions-components/{p-4a3cdcab.js → p-4caa1f9d.js} +1 -1
- package/dist/solutions-components/{p-3166f85f.entry.js → p-4dd80a57.entry.js} +1 -1
- package/dist/solutions-components/{p-34a6324f.js → p-4f35e0b8.js} +1 -1
- package/dist/solutions-components/{p-b0f131a3.entry.js → p-521e30a8.entry.js} +1 -1
- package/dist/solutions-components/{p-0a883f51.entry.js → p-52db1792.entry.js} +1 -1
- package/dist/solutions-components/{p-f913ed49.entry.js → p-52f0f3ad.entry.js} +1 -1
- package/dist/solutions-components/{p-3cc30e11.entry.js → p-53fe14b3.entry.js} +1 -1
- package/dist/solutions-components/p-573d2241.entry.js +18 -0
- package/dist/solutions-components/{p-19c5e43e.entry.js → p-575f731c.entry.js} +1 -1
- package/dist/solutions-components/{p-60395ffe.entry.js → p-579cc100.entry.js} +1 -1
- package/dist/solutions-components/{p-b1b646e2.js → p-57f2b4f9.js} +1 -1
- package/dist/solutions-components/{p-698c6a56.js → p-58c2de0d.js} +2 -2
- package/dist/solutions-components/{p-6e8a194d.js → p-58da33ce.js} +1 -1
- package/dist/solutions-components/{p-bf528ffd.js → p-595b6177.js} +1 -1
- package/dist/solutions-components/{p-ba5bb069.js → p-5c83c577.js} +1 -1
- package/dist/solutions-components/{p-d32b683a.js → p-5dc13b6d.js} +2 -2
- package/dist/solutions-components/{p-15a9fe95.entry.js → p-5e8dee25.entry.js} +1 -1
- package/dist/solutions-components/{p-344f18cb.js → p-61f3b001.js} +1 -1
- package/dist/solutions-components/{p-469c8f8a.js → p-63a6c23c.js} +1 -1
- package/dist/solutions-components/{p-eb58da32.entry.js → p-649e12c3.entry.js} +1 -1
- package/dist/solutions-components/{p-4a1177cb.js → p-6610bad4.js} +1 -1
- package/dist/solutions-components/{p-c6ec3442.js → p-66380f26.js} +1 -1
- package/dist/solutions-components/{p-5ef595d1.entry.js → p-672d79f2.entry.js} +1 -1
- package/dist/solutions-components/{p-936f3d55.js → p-68b33cb6.js} +1 -1
- package/dist/solutions-components/{p-78d2e50c.entry.js → p-6954fc16.entry.js} +1 -1
- package/dist/solutions-components/{p-ab1136be.entry.js → p-6d50909d.entry.js} +1 -1
- package/dist/solutions-components/{p-7501734c.js → p-6e5bbdbd.js} +1 -1
- package/dist/solutions-components/{p-bca7e7eb.entry.js → p-6e89bbec.entry.js} +1 -1
- package/dist/solutions-components/{p-9d8f7215.js → p-6eecc279.js} +1 -1
- package/dist/solutions-components/{p-4797a3cf.entry.js → p-6f012379.entry.js} +1 -1
- package/dist/solutions-components/{p-8bed242f.entry.js → p-70c370a9.entry.js} +1 -1
- package/dist/solutions-components/{p-eaf5987f.js → p-71d0f30c.js} +1 -1
- package/dist/solutions-components/{p-cef70b7a.entry.js → p-740ef07f.entry.js} +1 -1
- package/dist/solutions-components/{p-dfd2bfd2.entry.js → p-7758f01f.entry.js} +1 -1
- package/dist/solutions-components/{p-14476bd9.js → p-7814f6db.js} +1 -1
- package/dist/solutions-components/{p-92ad7b80.entry.js → p-790dac6b.entry.js} +1 -1
- package/dist/solutions-components/{p-4e1cd165.entry.js → p-79396110.entry.js} +1 -1
- package/dist/solutions-components/p-79c55b19.entry.js +6 -0
- package/dist/solutions-components/{p-c52751f2.js → p-7c23c4cd.js} +1 -1
- package/dist/solutions-components/{p-c53e947f.entry.js → p-7d347571.entry.js} +1 -1
- package/dist/solutions-components/p-7d7b7536.entry.js +21 -0
- package/dist/solutions-components/{p-2a4dee2f.entry.js → p-7e2220d7.entry.js} +1 -1
- package/dist/solutions-components/{p-07163369.entry.js → p-7e6b953a.entry.js} +1 -1
- package/dist/solutions-components/{p-d65c4d90.entry.js → p-7f8be8cd.entry.js} +1 -1
- package/dist/solutions-components/{p-d2f24ad1.js → p-81a962c3.js} +1 -1
- package/dist/solutions-components/{p-2bfb8046.entry.js → p-85287a5e.entry.js} +2 -2
- package/dist/solutions-components/{p-76aba0ae.entry.js → p-892075e5.entry.js} +2 -2
- package/dist/solutions-components/{p-1603e9ff.js → p-89fc9c87.js} +2 -2
- package/dist/solutions-components/{p-3abd1256.entry.js → p-8cf4fd05.entry.js} +1 -1
- package/dist/solutions-components/{p-45489c38.js → p-903aa065.js} +1 -1
- package/dist/solutions-components/p-91c78d98.js +7 -0
- package/dist/solutions-components/{p-96fe0805.entry.js → p-947d032f.entry.js} +1 -1
- package/dist/solutions-components/{p-0c48d072.js → p-965495c7.js} +1 -1
- package/dist/solutions-components/{p-e755a394.entry.js → p-9654f62f.entry.js} +1 -1
- package/dist/solutions-components/{p-423e9751.entry.js → p-97082d8d.entry.js} +1 -1
- package/dist/solutions-components/{p-22833bd3.js → p-99d8a839.js} +1 -1
- package/dist/solutions-components/{p-af7c14db.js → p-9b3e8d42.js} +1 -1
- package/dist/solutions-components/{p-57e866b8.js → p-9c5e66fe.js} +1 -1
- package/dist/solutions-components/{p-f57ac880.entry.js → p-9de59894.entry.js} +1 -1
- package/dist/solutions-components/{p-73fb22e6.js → p-9f7d7413.js} +1 -1
- package/dist/solutions-components/p-a3ef570f.entry.js +6 -0
- package/dist/solutions-components/{p-2c551d05.entry.js → p-a4328542.entry.js} +1 -1
- package/dist/solutions-components/{p-1930b17b.js → p-a452c2a8.js} +1 -1
- package/dist/solutions-components/{p-b955d734.entry.js → p-a62ec89b.entry.js} +1 -1
- package/dist/solutions-components/{p-30d623da.js → p-a6cf2623.js} +2 -2
- package/dist/solutions-components/{p-8cb140c1.js → p-a7d5752b.js} +1 -1
- package/dist/solutions-components/p-a8a80924.entry.js +6 -0
- package/dist/solutions-components/{p-ef7f84f3.js → p-ab857e6d.js} +1 -1
- package/dist/solutions-components/p-ac7332b3.entry.js +6 -0
- package/dist/solutions-components/{p-9b274fb7.entry.js → p-ae443c91.entry.js} +1 -1
- package/dist/solutions-components/{p-90da2ee4.entry.js → p-af25c24c.entry.js} +3 -3
- package/dist/solutions-components/{p-02306194.entry.js → p-af68933d.entry.js} +1 -1
- package/dist/solutions-components/{p-f21953d6.js → p-b73319e1.js} +1 -1
- package/dist/solutions-components/{p-6767ad18.entry.js → p-bb6f49fb.entry.js} +1 -1
- package/dist/solutions-components/{p-732d1f36.entry.js → p-bf48be66.entry.js} +1 -1
- package/dist/solutions-components/{p-6fd5cad1.js → p-c1a86a7f.js} +1 -1
- package/dist/solutions-components/{p-1f555ffc.js → p-c347875f.js} +1 -1
- package/dist/solutions-components/{p-f670a739.js → p-c5fd52fa.js} +1 -1
- package/dist/solutions-components/{p-2379bf72.entry.js → p-c69de0fa.entry.js} +1 -1
- package/dist/solutions-components/{p-7c5eaf19.js → p-c6c4ed96.js} +1 -1
- package/dist/solutions-components/{p-3c5c1487.entry.js → p-ceffb944.entry.js} +2 -2
- package/dist/solutions-components/{p-e01bf2ec.entry.js → p-cfdb15b7.entry.js} +1 -1
- package/dist/solutions-components/p-d0544f24.js +192 -0
- package/dist/solutions-components/{p-01eb495b.entry.js → p-d2fab6cd.entry.js} +1 -1
- package/dist/solutions-components/{p-7749e304.entry.js → p-d31fe523.entry.js} +1 -1
- package/dist/solutions-components/{p-6ac61b3a.entry.js → p-d9229a22.entry.js} +1 -1
- package/dist/solutions-components/{p-e28bec90.js → p-dac63a50.js} +1 -1
- package/dist/solutions-components/{p-252a1df3.entry.js → p-dc38fe60.entry.js} +1 -1
- package/dist/solutions-components/{p-753da967.entry.js → p-dd7e8e5d.entry.js} +1 -1
- package/dist/solutions-components/{p-28238078.js → p-dec91018.js} +1 -1
- package/dist/solutions-components/{p-734cb206.entry.js → p-e03226cf.entry.js} +1 -1
- package/dist/solutions-components/{p-493efa67.entry.js → p-e4bd7ed1.entry.js} +1 -1
- package/dist/solutions-components/{p-12faff7c.js → p-e5e60190.js} +1 -1
- package/dist/solutions-components/{p-e4a3a8a2.entry.js → p-e770c412.entry.js} +1 -1
- package/dist/solutions-components/{p-38eb91d3.js → p-e7c11602.js} +1 -1
- package/dist/solutions-components/{p-b27c416e.entry.js → p-e851ead7.entry.js} +1 -1
- package/dist/solutions-components/{p-9f193b28.entry.js → p-e85ee6f1.entry.js} +1 -1
- package/dist/solutions-components/{p-d89050c9.js → p-e9148c7b.js} +2 -2
- package/dist/solutions-components/{p-2c99a243.js → p-e9ae9ec7.js} +1 -1
- package/dist/solutions-components/{p-8abdcfa4.js → p-e9f128b3.js} +1 -1
- package/dist/solutions-components/{p-1d84e73c.js → p-eb5e6881.js} +1 -1
- package/dist/solutions-components/{p-bfc9d4b0.entry.js → p-ecd5e842.entry.js} +1 -1
- package/dist/solutions-components/{p-66dd455f.entry.js → p-f2c3068e.entry.js} +1 -1
- package/dist/solutions-components/{p-86885106.js → p-f53a8e59.js} +1 -1
- package/dist/solutions-components/{p-cb6bba8a.entry.js → p-f5523c9d.entry.js} +2 -2
- package/dist/solutions-components/{p-b6e89988.entry.js → p-fa124fdf.entry.js} +1 -1
- package/dist/solutions-components/{p-29c26a5d.entry.js → p-fa3732fa.entry.js} +1 -1
- package/dist/solutions-components/{p-69cb8427.js → p-fad93fd0.js} +1 -1
- package/dist/solutions-components/{p-d22be647.entry.js → p-fb1a6e2e.entry.js} +1 -1
- package/dist/solutions-components/{p-71fb484a.entry.js → p-fc0ca498.entry.js} +2 -2
- package/dist/solutions-components/p-ff0d7712.js +44 -0
- package/dist/solutions-components/{p-e39f0574.js → p-ff40cfb2.js} +1 -1
- package/dist/solutions-components/{p-ff4351b7.entry.js → p-ff863f16.entry.js} +1 -1
- package/dist/solutions-components/{p-016f47e2.entry.js → p-ffb567ab.entry.js} +1 -1
- package/dist/solutions-components/solutions-components.esm.js +1 -1
- package/dist/solutions-components/utils/{templates.e2e.ts → test/templates.e2e.ts} +2 -2
- package/dist/types/components/crowdsource-manager/crowdsource-manager.d.ts +9 -1
- package/dist/types/components/floor-filter/floor-filter.d.ts +65 -0
- package/dist/types/components/layer-table/layer-table.d.ts +4 -0
- package/dist/types/components/map-card/map-card.d.ts +4 -0
- package/dist/types/components/map-layer-picker/map-layer-picker.d.ts +9 -5
- package/dist/types/components/map-tools/map-tools.d.ts +24 -0
- package/dist/types/components/solution-spatial-ref/solution-spatial-ref.d.ts +11 -93
- package/dist/types/components/spatial-ref/spatial-ref.d.ts +142 -0
- package/dist/types/components.d.ts +131 -16
- package/dist/types/preact.d.ts +8 -1
- package/dist/types/stencil-public-runtime.d.ts +3 -3
- package/package.json +6 -6
- package/dist/cjs/calcite-checkbox.cjs.entry.js +0 -136
- package/dist/collection/components/basemap-gallery/test/basemap-gallery.e2e.js +0 -29
- package/dist/collection/components/basemap-gallery/test/basemap-gallery.spec.js +0 -37
- package/dist/collection/components/buffer-tools/test/buffer-tools.spec.js +0 -160
- package/dist/collection/components/card-manager/test/card-manager.spec.js +0 -37
- package/dist/collection/components/crowdsource-manager/test/crowdsource-manager.e2e.js +0 -29
- package/dist/collection/components/crowdsource-manager/test/crowdsource-manager.spec.js +0 -37
- package/dist/collection/components/crowdsource-reporter/test/crowdsource-reporter.e2e.js +0 -29
- package/dist/collection/components/crowdsource-reporter/test/crowdsource-reporter.spec.js +0 -37
- package/dist/collection/components/deduct-calculator/test/deduct-calculator.e2e.js +0 -29
- package/dist/collection/components/deduct-calculator/test/deduct-calculator.spec.js +0 -37
- package/dist/collection/components/edit-card/test/edit-card.e2e.js +0 -14
- package/dist/collection/components/edit-card/test/edit-card.spec.js +0 -22
- package/dist/collection/components/info-card/test/info-card.e2e.js +0 -29
- package/dist/collection/components/info-card/test/info-card.spec.js +0 -37
- package/dist/collection/components/json-editor/test/json-editor.e2e.js +0 -36
- package/dist/collection/components/json-editor/test/json-editor.spec.js +0 -65
- package/dist/collection/components/layer-table/test/layer-table.e2e.js +0 -29
- package/dist/collection/components/layer-table/test/layer-table.spec.js +0 -37
- package/dist/collection/components/layout-manager/test/layout-manager.e2e.js +0 -29
- package/dist/collection/components/layout-manager/test/layout-manager.spec.js +0 -37
- package/dist/collection/components/list-item/test/list-item.e2e.js +0 -29
- package/dist/collection/components/list-item/test/list-item.spec.js +0 -37
- package/dist/collection/components/map-card/test/map-card.spec.js +0 -37
- package/dist/collection/components/map-draw-tools/test/map-draw-tools.e2e.js +0 -29
- package/dist/collection/components/map-draw-tools/test/map-draw-tools.spec.js +0 -37
- package/dist/collection/components/map-fullscreen/test/map-fullscreen.e2e.js +0 -29
- package/dist/collection/components/map-fullscreen/test/map-fullscreen.spec.js +0 -37
- package/dist/collection/components/map-layer-picker/test/map-layer-picker.e2e.js +0 -29
- package/dist/collection/components/map-layer-picker/test/map-layer-picker.spec.js +0 -114
- package/dist/collection/components/map-legend/test/map-legend.e2e.js +0 -14
- package/dist/collection/components/map-legend/test/map-legend.spec.js +0 -22
- package/dist/collection/components/map-picker/test/map-picker.e2e.js +0 -29
- package/dist/collection/components/map-picker/test/map-picker.spec.js +0 -37
- package/dist/collection/components/map-search/test/map-search.e2e.js +0 -29
- package/dist/collection/components/map-search/test/map-search.spec.js +0 -37
- package/dist/collection/components/map-select-tools/test/map-select-tools.e2e.js +0 -29
- package/dist/collection/components/map-select-tools/test/map-select-tools.spec.js +0 -366
- package/dist/collection/components/map-tools/test/map-tools.e2e.js +0 -29
- package/dist/collection/components/map-tools/test/map-tools.spec.js +0 -37
- package/dist/collection/components/pci-calculator/test/pci-calculator.e2e.js +0 -29
- package/dist/collection/components/pci-calculator/test/pci-calculator.spec.js +0 -37
- package/dist/collection/components/pdf-download/test/pdf-download.e2e.js +0 -76
- package/dist/collection/components/pdf-download/test/pdf-download.spec.js +0 -107
- package/dist/collection/components/public-notification/test/public-notification.spec.js +0 -161
- package/dist/collection/components/refine-selection/test/refine-selection.e2e.js +0 -14
- package/dist/collection/components/refine-selection/test/refine-selection.spec.js +0 -22
- package/dist/collection/components/solution-configuration/test/solution-configuration.e2e.js +0 -36
- package/dist/collection/components/solution-configuration/test/solution-configuration.spec.js +0 -119
- package/dist/collection/components/solution-contents/test/solution-contents.e2e.js +0 -94
- package/dist/collection/components/solution-contents/test/solution-contents.spec.js +0 -143
- package/dist/collection/components/solution-item/test/solution-item.e2e.js +0 -36
- package/dist/collection/components/solution-item/test/solution-item.spec.js +0 -77
- package/dist/collection/components/solution-item-details/test/solution-item-details.e2e.js +0 -36
- package/dist/collection/components/solution-item-details/test/solution-item-details.spec.js +0 -142
- package/dist/collection/components/solution-item-icon/test/solution-item-icon.e2e.js +0 -29
- package/dist/collection/components/solution-item-icon/test/solution-item-icon.spec.js +0 -39
- package/dist/collection/components/solution-item-sharing/test/solution-item-sharing.e2e.js +0 -36
- package/dist/collection/components/solution-item-sharing/test/solution-item-sharing.spec.js +0 -54
- package/dist/collection/components/solution-organization-variables/test/solution-organization-variables.e2e.js +0 -36
- package/dist/collection/components/solution-organization-variables/test/solution-organization-variables.spec.js +0 -65
- package/dist/collection/components/solution-resource-item/test/solution-resource-item.e2e.js +0 -36
- package/dist/collection/components/solution-resource-item/test/solution-resource-item.spec.js +0 -55
- package/dist/collection/components/solution-template-data/test/solution-template-data.e2e.js +0 -36
- package/dist/collection/components/solution-template-data/test/solution-template-data.spec.js +0 -60
- package/dist/collection/components/solution-variables/test/solution-variables.e2e.js +0 -36
- package/dist/collection/components/solution-variables/test/solution-variables.spec.js +0 -131
- package/dist/esm/calcite-checkbox.entry.js +0 -132
- package/dist/solutions-components/p-17d176b5.js +0 -230
- package/dist/solutions-components/p-1d9a5198.entry.js +0 -37
- package/dist/solutions-components/p-33613993.js +0 -7
- package/dist/solutions-components/p-3707d9bd.entry.js +0 -6
- package/dist/solutions-components/p-41bbccbc.entry.js +0 -6
- package/dist/solutions-components/p-4f2fce86.entry.js +0 -6
- package/dist/solutions-components/p-5079b190.js +0 -11
- package/dist/solutions-components/p-5ffaaaf4.entry.js +0 -6
- package/dist/solutions-components/p-736e76fb.entry.js +0 -17
- package/dist/solutions-components/p-dda517b9.entry.js +0 -6
- package/dist/solutions-components/p-fec5368b.js +0 -6
- /package/dist/collection/components/{solution-spatial-ref → spatial-ref}/spatialreferences.js +0 -0
- /package/dist/types/components/{solution-spatial-ref → spatial-ref}/spatialreferences.d.ts +0 -0
@@ -3,10 +3,7 @@
|
|
3
3
|
* Licensed under the Apache License, Version 2.0
|
4
4
|
* http://www.apache.org/licenses/LICENSE-2.0
|
5
5
|
*/
|
6
|
-
import { c as createStore } from './index-f4bd5aa3.js';
|
7
|
-
import { d as EUpdateType } from './interfaces-7470d906.js';
|
8
6
|
import { c as createCommonjsModule, a as commonjsGlobal, b as commonjsRequire } from './_commonjsHelpers-d5f9d613.js';
|
9
|
-
import { c as cleanUrl, r as request } from './clean-url-bce022e6.js';
|
10
7
|
|
11
8
|
/** @license
|
12
9
|
* Copyright 2018 Esri
|
@@ -63,263 +60,6 @@ var EItemProgressStatus;
|
|
63
60
|
})(EItemProgressStatus || (EItemProgressStatus = {}));
|
64
61
|
//#endregion ---------------------------------------------------------------------------------------------------------//
|
65
62
|
|
66
|
-
/* Copyright (c) 2018-2019 Environmental Systems Research Institute, Inc.
|
67
|
-
* Apache-2.0 */
|
68
|
-
/**
|
69
|
-
* Returns an array with arrays of the given size.
|
70
|
-
*
|
71
|
-
* @param arr Array to split
|
72
|
-
* @param size Size of every group
|
73
|
-
*/
|
74
|
-
function chunkArray(arr, size) {
|
75
|
-
const results = [];
|
76
|
-
let index = 0;
|
77
|
-
while (index < arr.length) {
|
78
|
-
results.push(arr.slice(index, index + size));
|
79
|
-
index += size;
|
80
|
-
}
|
81
|
-
return results;
|
82
|
-
}
|
83
|
-
|
84
|
-
/*! *****************************************************************************
|
85
|
-
Copyright (c) Microsoft Corporation.
|
86
|
-
|
87
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
88
|
-
purpose with or without fee is hereby granted.
|
89
|
-
|
90
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
91
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
92
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
93
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
94
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
95
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
96
|
-
PERFORMANCE OF THIS SOFTWARE.
|
97
|
-
***************************************************************************** */
|
98
|
-
|
99
|
-
var __assign = function() {
|
100
|
-
__assign = Object.assign || function __assign(t) {
|
101
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
102
|
-
s = arguments[i];
|
103
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
104
|
-
}
|
105
|
-
return t;
|
106
|
-
};
|
107
|
-
return __assign.apply(this, arguments);
|
108
|
-
};
|
109
|
-
|
110
|
-
/* Copyright (c) 2017 Environmental Systems Research Institute, Inc.
|
111
|
-
* Apache-2.0 */
|
112
|
-
/**
|
113
|
-
* Helper that returns the appropriate portal url for a given request. `requestOptions.portal` is given
|
114
|
-
* precedence over `authentication.portal`. If neither `portal` nor `authentication` is present,
|
115
|
-
* `www.arcgis.com/sharing/rest` is returned.
|
116
|
-
*
|
117
|
-
* @param requestOptions - Request options that may have authentication manager
|
118
|
-
* @returns Portal url to be used in API requests
|
119
|
-
*/
|
120
|
-
function getPortalUrl(requestOptions) {
|
121
|
-
if (requestOptions === void 0) { requestOptions = {}; }
|
122
|
-
// use portal in options if specified
|
123
|
-
if (requestOptions.portal) {
|
124
|
-
return cleanUrl(requestOptions.portal);
|
125
|
-
}
|
126
|
-
// if auth was passed, use that portal
|
127
|
-
if (requestOptions.authentication) {
|
128
|
-
// the portal url is already scrubbed in the auth package
|
129
|
-
return requestOptions.authentication.portal;
|
130
|
-
}
|
131
|
-
// default to arcgis.com
|
132
|
-
return "https://www.arcgis.com/sharing/rest";
|
133
|
-
}
|
134
|
-
|
135
|
-
/* Copyright (c) 2017-2018 Environmental Systems Research Institute, Inc.
|
136
|
-
* Apache-2.0 */
|
137
|
-
/**
|
138
|
-
* Serialize an item and its data into a json format accepted by the Portal API for create and update operations
|
139
|
-
*
|
140
|
-
* @param item Item to be serialized
|
141
|
-
* @returns a formatted json object to be sent to Portal
|
142
|
-
*/
|
143
|
-
function serializeItem(item) {
|
144
|
-
// create a clone so we're not messing with the original
|
145
|
-
var clone = JSON.parse(JSON.stringify(item));
|
146
|
-
// binary data needs POSTed as a `file`
|
147
|
-
// JSON object literals should be passed as `text`.
|
148
|
-
if (clone.data) {
|
149
|
-
(typeof Blob !== "undefined" && item.data instanceof Blob) ||
|
150
|
-
// Node.js doesn't implement Blob
|
151
|
-
item.data.constructor.name === "ReadStream"
|
152
|
-
? (clone.file = item.data)
|
153
|
-
: (clone.text = item.data);
|
154
|
-
delete clone.data;
|
155
|
-
}
|
156
|
-
return clone;
|
157
|
-
}
|
158
|
-
/**
|
159
|
-
* `requestOptions.owner` is given priority, `requestOptions.item.owner` will be checked next. If neither are present, `authentication.getUserName()` will be used instead.
|
160
|
-
*/
|
161
|
-
function determineOwner(requestOptions) {
|
162
|
-
if (requestOptions.owner) {
|
163
|
-
return Promise.resolve(requestOptions.owner);
|
164
|
-
}
|
165
|
-
else if (requestOptions.item && requestOptions.item.owner) {
|
166
|
-
return Promise.resolve(requestOptions.item.owner);
|
167
|
-
}
|
168
|
-
else if (requestOptions.authentication &&
|
169
|
-
requestOptions.authentication.getUsername) {
|
170
|
-
return requestOptions.authentication.getUsername();
|
171
|
-
}
|
172
|
-
else {
|
173
|
-
return Promise.reject(new Error("Could not determine the owner of this item. Pass the `owner`, `item.owner`, or `authentication` option."));
|
174
|
-
}
|
175
|
-
}
|
176
|
-
/**
|
177
|
-
* checks if the extent is a valid BBox (2 element array of coordinate pair arrays)
|
178
|
-
* @param extent
|
179
|
-
* @returns
|
180
|
-
*/
|
181
|
-
function isBBox(extent) {
|
182
|
-
return (Array.isArray(extent) &&
|
183
|
-
Array.isArray(extent[0]) &&
|
184
|
-
Array.isArray(extent[1]));
|
185
|
-
}
|
186
|
-
/**
|
187
|
-
* Given a Bbox, convert it to a string. Some api endpoints expect a string
|
188
|
-
*
|
189
|
-
* @param {BBox} extent
|
190
|
-
* @return {*} {string}
|
191
|
-
*/
|
192
|
-
function bboxToString(extent) {
|
193
|
-
return extent.join(",");
|
194
|
-
}
|
195
|
-
|
196
|
-
/* Copyright (c) 2018 Environmental Systems Research Institute, Inc.
|
197
|
-
* Apache-2.0 */
|
198
|
-
/**
|
199
|
-
* ```js
|
200
|
-
* import { updateItem } from "@esri/arcgis-rest-portal";
|
201
|
-
* //
|
202
|
-
* updateItem({
|
203
|
-
* item: {
|
204
|
-
* id: "3ef",
|
205
|
-
* description: "A three hour tour"
|
206
|
-
* },
|
207
|
-
* authentication
|
208
|
-
* })
|
209
|
-
* .then(response)
|
210
|
-
* ```
|
211
|
-
* Update an Item. See the [REST Documentation](https://developers.arcgis.com/rest/users-groups-and-items/update-item.htm) for more information.
|
212
|
-
*
|
213
|
-
* @param requestOptions - Options for the request.
|
214
|
-
* @returns A Promise that updates an item.
|
215
|
-
*/
|
216
|
-
function updateItem$1(requestOptions) {
|
217
|
-
return determineOwner(requestOptions).then(function (owner) {
|
218
|
-
var url = requestOptions.folderId
|
219
|
-
? getPortalUrl(requestOptions) + "/content/users/" + owner + "/" + requestOptions.folderId + "/items/" + requestOptions.item.id + "/update"
|
220
|
-
: getPortalUrl(requestOptions) + "/content/users/" + owner + "/items/" + requestOptions.item.id + "/update";
|
221
|
-
// serialize the item into something Portal will accept
|
222
|
-
requestOptions.params = __assign(__assign({}, requestOptions.params), serializeItem(requestOptions.item));
|
223
|
-
// convert extent, if present, into a string from bbox
|
224
|
-
// processParams was previously doing this sort of work,
|
225
|
-
// however now we need to let array of arrays through
|
226
|
-
// Thus for extents we need to move this logic here
|
227
|
-
if (requestOptions.params.extent && isBBox(requestOptions.params.extent)) {
|
228
|
-
requestOptions.params.extent = bboxToString(requestOptions.params.extent);
|
229
|
-
}
|
230
|
-
return request(url, requestOptions);
|
231
|
-
});
|
232
|
-
}
|
233
|
-
/**
|
234
|
-
* ```js
|
235
|
-
* import { updateItemResource } from "@esri/arcgis-rest-portal";
|
236
|
-
* //
|
237
|
-
* updateItemResource({
|
238
|
-
* id: '3ef',
|
239
|
-
* resource: file,
|
240
|
-
* name: 'bigkahuna.jpg',
|
241
|
-
* authentication
|
242
|
-
* })
|
243
|
-
* .then(response)
|
244
|
-
* ```
|
245
|
-
* Update a resource associated with an item. See the [REST Documentation](https://developers.arcgis.com/rest/users-groups-and-items/update-resources.htm) for more information.
|
246
|
-
*
|
247
|
-
* @param requestOptions - Options for the request
|
248
|
-
* @returns A Promise that updates an item resource.
|
249
|
-
*/
|
250
|
-
function updateItemResource(requestOptions) {
|
251
|
-
return determineOwner(requestOptions).then(function (owner) {
|
252
|
-
var url = getPortalUrl(requestOptions) + "/content/users/" + owner + "/items/" + requestOptions.id + "/updateResources";
|
253
|
-
// mix in user supplied params
|
254
|
-
requestOptions.params = __assign({ file: requestOptions.resource, fileName: requestOptions.name, resourcesPrefix: requestOptions.prefix, text: requestOptions.content }, requestOptions.params);
|
255
|
-
// only override the access specified previously if 'private' is passed explicitly
|
256
|
-
if (typeof requestOptions.private !== "undefined") {
|
257
|
-
requestOptions.params.access = requestOptions.private
|
258
|
-
? "private"
|
259
|
-
: "inherit";
|
260
|
-
}
|
261
|
-
return request(url, requestOptions);
|
262
|
-
});
|
263
|
-
}
|
264
|
-
|
265
|
-
/* Copyright (c) 2018 Environmental Systems Research Institute, Inc.
|
266
|
-
* Apache-2.0 */
|
267
|
-
/**
|
268
|
-
* ```js
|
269
|
-
* import { addItemResource } from "@esri/arcgis-rest-portal";
|
270
|
-
* //
|
271
|
-
* // Add a file resource
|
272
|
-
* addItemResource({
|
273
|
-
* id: '3ef',
|
274
|
-
* resource: file,
|
275
|
-
* name: 'bigkahuna.jpg',
|
276
|
-
* authentication
|
277
|
-
* })
|
278
|
-
* .then(response)
|
279
|
-
* //
|
280
|
-
* // Add a text resource
|
281
|
-
* addItemResource({
|
282
|
-
* id: '4fg',
|
283
|
-
* content: "Text content",
|
284
|
-
* name: 'bigkahuna.txt',
|
285
|
-
* authentication
|
286
|
-
* })
|
287
|
-
* .then(response)
|
288
|
-
* ```
|
289
|
-
* Add a resource associated with an item. See the [REST Documentation](https://developers.arcgis.com/rest/users-groups-and-items/add-resources.htm) for more information.
|
290
|
-
*
|
291
|
-
* @param requestOptions - Options for the request
|
292
|
-
* @returns A Promise to add item resources.
|
293
|
-
*/
|
294
|
-
function addItemResource(requestOptions) {
|
295
|
-
return determineOwner(requestOptions).then(function (owner) {
|
296
|
-
var url = getPortalUrl(requestOptions) + "/content/users/" + owner + "/items/" + requestOptions.id + "/addResources";
|
297
|
-
requestOptions.params = __assign({ file: requestOptions.resource, fileName: requestOptions.name, resourcesPrefix: requestOptions.prefix, text: requestOptions.content, access: requestOptions.private ? "private" : "inherit" }, requestOptions.params);
|
298
|
-
return request(url, requestOptions);
|
299
|
-
});
|
300
|
-
}
|
301
|
-
|
302
|
-
/* Copyright (c) 2018 Environmental Systems Research Institute, Inc.
|
303
|
-
* Apache-2.0 */
|
304
|
-
/**
|
305
|
-
* Remove a resource associated with an item
|
306
|
-
*
|
307
|
-
* @param requestOptions - Options for the request
|
308
|
-
* @returns A Promise that deletes an item resource.
|
309
|
-
*/
|
310
|
-
function removeItemResource(requestOptions) {
|
311
|
-
return determineOwner(requestOptions).then(function (owner) {
|
312
|
-
var url = getPortalUrl(requestOptions) + "/content/users/" + owner + "/items/" + requestOptions.id + "/removeResources";
|
313
|
-
// mix in user supplied params
|
314
|
-
requestOptions.params = __assign(__assign({}, requestOptions.params), { resource: requestOptions.resource });
|
315
|
-
// only override the deleteAll param specified previously if it is passed explicitly
|
316
|
-
if (typeof requestOptions.deleteAll !== "undefined") {
|
317
|
-
requestOptions.params.deleteAll = requestOptions.deleteAll;
|
318
|
-
}
|
319
|
-
return request(url, requestOptions);
|
320
|
-
});
|
321
|
-
}
|
322
|
-
|
323
63
|
var jszip_min = createCommonjsModule(function (module, exports) {
|
324
64
|
/*!
|
325
65
|
|
@@ -2035,408 +1775,6 @@ var xss = FilterXSS;
|
|
2035
1775
|
}
|
2036
1776
|
} (lib$1, lib$1.exports));
|
2037
1777
|
|
2038
|
-
/** @license
|
2039
|
-
* Copyright 2020 Esri
|
2040
|
-
*
|
2041
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
2042
|
-
* you may not use this file except in compliance with the License.
|
2043
|
-
* You may obtain a copy of the License at
|
2044
|
-
*
|
2045
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
2046
|
-
*
|
2047
|
-
* Unless required by applicable law or agreed to in writing, software
|
2048
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
2049
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
2050
|
-
* See the License for the specific language governing permissions and
|
2051
|
-
* limitations under the License.
|
2052
|
-
*/
|
2053
|
-
/**
|
2054
|
-
* Supplies the File constructor for Microsoft Legacy Edge.
|
2055
|
-
*
|
2056
|
-
* @param fileBits Contents for file
|
2057
|
-
* @param fileName Name for file
|
2058
|
-
* @param options Bucket of options, euch as `type` for the MIME type; defaults to empty string for `type`
|
2059
|
-
* @returns File or, for Microsoft Legacy Edge, Blob
|
2060
|
-
* @see https://developer.mozilla.org/en-US/docs/Web/API/File/File
|
2061
|
-
* @see https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob
|
2062
|
-
*/
|
2063
|
-
function new_File(fileBits, fileName, options) {
|
2064
|
-
let file;
|
2065
|
-
try {
|
2066
|
-
// Modern browser
|
2067
|
-
file = new File(fileBits, fileName, options);
|
2068
|
-
}
|
2069
|
-
catch (error) {
|
2070
|
-
// Microsoft Legacy Edge
|
2071
|
-
/* istanbul ignore next */
|
2072
|
-
file = (function () {
|
2073
|
-
if (typeof options === "undefined") {
|
2074
|
-
// Microsoft Legacy Edge fails in karma if options is not defined
|
2075
|
-
options = {
|
2076
|
-
type: ""
|
2077
|
-
};
|
2078
|
-
}
|
2079
|
-
const blob = new Blob(fileBits, options);
|
2080
|
-
blob.lastModified = new Date();
|
2081
|
-
blob.name = fileName;
|
2082
|
-
return blob;
|
2083
|
-
})();
|
2084
|
-
}
|
2085
|
-
return file;
|
2086
|
-
}
|
2087
|
-
|
2088
|
-
/** @license
|
2089
|
-
* Copyright 2018 Esri
|
2090
|
-
*
|
2091
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
2092
|
-
* you may not use this file except in compliance with the License.
|
2093
|
-
* You may obtain a copy of the License at
|
2094
|
-
*
|
2095
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
2096
|
-
*
|
2097
|
-
* Unless required by applicable law or agreed to in writing, software
|
2098
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
2099
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
2100
|
-
* See the License for the specific language governing permissions and
|
2101
|
-
* limitations under the License.
|
2102
|
-
*/
|
2103
|
-
/**
|
2104
|
-
* Extracts JSON from a Blob.
|
2105
|
-
*
|
2106
|
-
* @param blob Blob to use as source
|
2107
|
-
* @returns A promise that will resolve with JSON or null
|
2108
|
-
*/
|
2109
|
-
function blobToJson(blob) {
|
2110
|
-
return new Promise(resolve => {
|
2111
|
-
blobToText(blob).then(blobContents => {
|
2112
|
-
try {
|
2113
|
-
resolve(JSON.parse(blobContents));
|
2114
|
-
}
|
2115
|
-
catch (err) {
|
2116
|
-
resolve(null);
|
2117
|
-
}
|
2118
|
-
}, () => resolve(null));
|
2119
|
-
});
|
2120
|
-
}
|
2121
|
-
/**
|
2122
|
-
* Converts a Blob to a File.
|
2123
|
-
*
|
2124
|
-
* @param blob Blob to use as source
|
2125
|
-
* @param filename Name to use for file
|
2126
|
-
* @param mimeType MIME type to override blob's MIME type
|
2127
|
-
* @returns File created out of Blob and filename
|
2128
|
-
*/
|
2129
|
-
function blobToFile(blob, filename, mimeType) {
|
2130
|
-
return blob
|
2131
|
-
? new_File([blob], filename ? filename : "", {
|
2132
|
-
type: mimeType || blob.type
|
2133
|
-
})
|
2134
|
-
: null;
|
2135
|
-
}
|
2136
|
-
/**
|
2137
|
-
* Extracts text from a Blob.
|
2138
|
-
*
|
2139
|
-
* @param blob Blob to use as source
|
2140
|
-
* @returns A promise that will resolve with text read from blob
|
2141
|
-
*/
|
2142
|
-
function blobToText(blob) {
|
2143
|
-
return new Promise(resolve => {
|
2144
|
-
const reader = new FileReader();
|
2145
|
-
reader.onload = function (evt) {
|
2146
|
-
// Disable needed because Node requires cast
|
2147
|
-
// tslint:disable-next-line: no-unnecessary-type-assertion
|
2148
|
-
const blobContents = evt.target.result;
|
2149
|
-
resolve(blobContents ? blobContents : ""); // not handling ArrayContents variant
|
2150
|
-
};
|
2151
|
-
reader.readAsText(blob);
|
2152
|
-
});
|
2153
|
-
}
|
2154
|
-
/**
|
2155
|
-
* Checks that a URL path ends with a slash.
|
2156
|
-
*
|
2157
|
-
* @param url URL to check
|
2158
|
-
* @returns URL, appended with slash if missing
|
2159
|
-
*/
|
2160
|
-
function checkUrlPathTermination(url) {
|
2161
|
-
return url ? (url.endsWith("/") ? url : url + "/") : url;
|
2162
|
-
}
|
2163
|
-
/**
|
2164
|
-
* Gets a property out of a deeply nested object.
|
2165
|
-
* Does not handle anything but nested object graph
|
2166
|
-
*
|
2167
|
-
* @param obj Object to retrieve value from
|
2168
|
-
* @param path Path into an object, e.g., "data.values.webmap", where "data" is a top-level property
|
2169
|
-
* in obj
|
2170
|
-
* @returns Value at end of path
|
2171
|
-
*/
|
2172
|
-
function getProp(obj, path) {
|
2173
|
-
return path.split(".").reduce(function (prev, curr) {
|
2174
|
-
/* istanbul ignore next no need to test undefined scenario */
|
2175
|
-
return prev ? prev[curr] : undefined;
|
2176
|
-
}, obj);
|
2177
|
-
}
|
2178
|
-
/**
|
2179
|
-
* Sets a deeply nested property of an object.
|
2180
|
-
* Creates the full path if it does not exist.
|
2181
|
-
*
|
2182
|
-
* @param obj Object to set value of
|
2183
|
-
* @param path Path into an object, e.g., "data.values.webmap", where "data" is a top-level property in obj
|
2184
|
-
* @param value The value to set at the end of the path
|
2185
|
-
*/
|
2186
|
-
function setCreateProp(obj, path, value) {
|
2187
|
-
const pathParts = path.split(".");
|
2188
|
-
pathParts.reduce((a, b, c) => {
|
2189
|
-
if (c === pathParts.length - 1) {
|
2190
|
-
a[b] = value;
|
2191
|
-
return value;
|
2192
|
-
}
|
2193
|
-
else {
|
2194
|
-
if (!a[b]) {
|
2195
|
-
a[b] = {};
|
2196
|
-
}
|
2197
|
-
return a[b];
|
2198
|
-
}
|
2199
|
-
}, obj);
|
2200
|
-
}
|
2201
|
-
|
2202
|
-
/**
|
2203
|
-
* Gets a Blob from a web site.
|
2204
|
-
*
|
2205
|
-
* @param url Address of Blob
|
2206
|
-
* @param authentication Credentials for the request
|
2207
|
-
* @param requestOptions - Options for the request, including parameters relevant to the endpoint.
|
2208
|
-
* @returns Promise that will resolve with Blob or an AGO-style JSON failure response
|
2209
|
-
*/
|
2210
|
-
function getBlob(url, authentication, requestOptions = {}) {
|
2211
|
-
if (!url) {
|
2212
|
-
return Promise.reject("Url must be provided");
|
2213
|
-
}
|
2214
|
-
const blobRequestOptions = {
|
2215
|
-
authentication: authentication,
|
2216
|
-
rawResponse: true,
|
2217
|
-
...requestOptions
|
2218
|
-
};
|
2219
|
-
return request(url, blobRequestOptions).then(response => {
|
2220
|
-
return response.blob();
|
2221
|
-
});
|
2222
|
-
}
|
2223
|
-
|
2224
|
-
/** @license
|
2225
|
-
* Copyright 2018 Esri
|
2226
|
-
*
|
2227
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
2228
|
-
* you may not use this file except in compliance with the License.
|
2229
|
-
* You may obtain a copy of the License at
|
2230
|
-
*
|
2231
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
2232
|
-
*
|
2233
|
-
* Unless required by applicable law or agreed to in writing, software
|
2234
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
2235
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
2236
|
-
* See the License for the specific language governing permissions and
|
2237
|
-
* limitations under the License.
|
2238
|
-
*/
|
2239
|
-
// ------------------------------------------------------------------------------------------------------------------ //
|
2240
|
-
const ZIP_FILE_HEADER_SIGNATURE = "PK";
|
2241
|
-
/**
|
2242
|
-
* Gets a Blob from a web site and casts it as a file using the supplied name.
|
2243
|
-
*
|
2244
|
-
* @param url Address of Blob
|
2245
|
-
* @param filename Name to use for file
|
2246
|
-
* @param authentication Credentials for the request
|
2247
|
-
* @returns Promise that will resolve with a File, undefined if the Blob is null, or an AGO-style JSON failure response
|
2248
|
-
*/
|
2249
|
-
function getBlobAsFile(url, filename, authentication, ignoreErrors = [], mimeType) {
|
2250
|
-
return new Promise((resolve, reject) => {
|
2251
|
-
// Get the blob from the URL
|
2252
|
-
getBlobCheckForError(url, authentication, ignoreErrors).then(blob => !blob ? resolve(null) : resolve(blobToFile(blob, filename, mimeType)), reject);
|
2253
|
-
});
|
2254
|
-
}
|
2255
|
-
/**
|
2256
|
-
* Gets a Blob from a web site and checks for a JSON error packet in the Blob.
|
2257
|
-
*
|
2258
|
-
* @param url Address of Blob
|
2259
|
-
* @param authentication Credentials for the request
|
2260
|
-
* @param ignoreErrors List of HTTP error codes that should be ignored
|
2261
|
-
* @returns Promise that will resolve with Blob or an AGO-REST JSON failure response
|
2262
|
-
*/
|
2263
|
-
function getBlobCheckForError(url, authentication, ignoreErrors = []) {
|
2264
|
-
return new Promise((resolve, reject) => {
|
2265
|
-
// Get the blob from the URL
|
2266
|
-
getBlob(url, authentication).then(blob => {
|
2267
|
-
// Reclassify text/plain blobs as needed
|
2268
|
-
_fixTextBlobType(blob).then(adjustedBlob => {
|
2269
|
-
if (adjustedBlob.type === "application/json") {
|
2270
|
-
// Blob may be an error
|
2271
|
-
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
2272
|
-
blobToJson(adjustedBlob).then((json) => {
|
2273
|
-
// Check for valid JSON with an error
|
2274
|
-
if (json?.error) {
|
2275
|
-
const code = json.error.code;
|
2276
|
-
if (code !== undefined && ignoreErrors.indexOf(code) >= 0) {
|
2277
|
-
resolve(null); // Error, but ignored
|
2278
|
-
}
|
2279
|
-
else {
|
2280
|
-
reject(json); // Other error; fail with error
|
2281
|
-
}
|
2282
|
-
}
|
2283
|
-
else {
|
2284
|
-
resolve(adjustedBlob);
|
2285
|
-
}
|
2286
|
-
});
|
2287
|
-
}
|
2288
|
-
else {
|
2289
|
-
resolve(adjustedBlob);
|
2290
|
-
}
|
2291
|
-
}, reject);
|
2292
|
-
}, reject);
|
2293
|
-
});
|
2294
|
-
}
|
2295
|
-
/**
|
2296
|
-
* Gets the data information of an AGO item in its JSON form.
|
2297
|
-
*
|
2298
|
-
* @param itemId Id of an item whose data information is sought
|
2299
|
-
* @param filename Name to use for file
|
2300
|
-
* @param authentication Credentials for the request to AGO
|
2301
|
-
* @returns Promise that will resolve with JSON, or an AGO-style JSON failure response
|
2302
|
-
*/
|
2303
|
-
function getItemDataAsJson(itemId, authentication) {
|
2304
|
-
return new Promise(resolve => {
|
2305
|
-
getItemDataBlob(itemId, authentication).then(blob => resolve(blobToJson(blob)), () => resolve(null));
|
2306
|
-
});
|
2307
|
-
}
|
2308
|
-
/**
|
2309
|
-
* Gets the data information of an AGO item in its raw (Blob) form.
|
2310
|
-
*
|
2311
|
-
* @param itemId Id of an item whose data information is sought
|
2312
|
-
* @param authentication Credentials for the request to AGO
|
2313
|
-
* @returns A promise that will resolve with the data Blob or null if the item doesn't have a data section
|
2314
|
-
*/
|
2315
|
-
function getItemDataBlob(itemId, authentication) {
|
2316
|
-
return new Promise(resolve => {
|
2317
|
-
const url = getItemDataBlobUrl(itemId, authentication);
|
2318
|
-
getBlobCheckForError(url, authentication, [400, 500]).then(blob => resolve(_fixTextBlobType(blob)), () => resolve(null));
|
2319
|
-
});
|
2320
|
-
}
|
2321
|
-
/**
|
2322
|
-
* Gets the URL to the data information of an AGO item in its raw (Blob) form.
|
2323
|
-
*
|
2324
|
-
* @param itemId Id of an item whose data information is sought
|
2325
|
-
* @param authentication Credentials for the request to AGO
|
2326
|
-
* @returns URL string
|
2327
|
-
*/
|
2328
|
-
function getItemDataBlobUrl(itemId, authentication) {
|
2329
|
-
return `${getPortalSharingUrlFromAuth(authentication)}/content/items/${itemId}/data`;
|
2330
|
-
}
|
2331
|
-
/**
|
2332
|
-
* Extracts the portal sharing url from a supplied authentication.
|
2333
|
-
*
|
2334
|
-
* @param authentication Credentials for the request to AGO
|
2335
|
-
* @returns Portal sharing url to be used in API requests, defaulting to `https://www.arcgis.com/sharing/rest`
|
2336
|
-
*/
|
2337
|
-
function getPortalSharingUrlFromAuth(authentication) {
|
2338
|
-
// If auth was passed, use that portal
|
2339
|
-
return getProp(authentication, "portal") || "https://www.arcgis.com/sharing/rest";
|
2340
|
-
}
|
2341
|
-
function getThumbnailFile(url, filename, authentication) {
|
2342
|
-
return new Promise(resolve => {
|
2343
|
-
getBlobAsFile(url, filename, authentication, [500]).then(resolve, () => resolve(null));
|
2344
|
-
});
|
2345
|
-
}
|
2346
|
-
// ------------------------------------------------------------------------------------------------------------------ //
|
2347
|
-
/**
|
2348
|
-
* Fixes the types of Blobs incorrectly typed as text/plain.
|
2349
|
-
*
|
2350
|
-
* @param blob Blob to check
|
2351
|
-
* @returns Promise resolving to original Blob, unless it's originally typed as text/plain but is
|
2352
|
-
* really JSON, ZIP, or XML
|
2353
|
-
* @private
|
2354
|
-
*/
|
2355
|
-
function _fixTextBlobType(blob) {
|
2356
|
-
return new Promise((resolve, reject) => {
|
2357
|
-
if (blob &&
|
2358
|
-
blob.size > 0 &&
|
2359
|
-
(blob.type.startsWith("text/plain") ||
|
2360
|
-
blob.type.startsWith("application/json"))) {
|
2361
|
-
blobToText(blob).then(blobText => {
|
2362
|
-
// Convertible to JSON?
|
2363
|
-
try {
|
2364
|
-
JSON.parse(blobText);
|
2365
|
-
// Yes; reclassify as JSON
|
2366
|
-
resolve(new Blob([blob], { type: "application/json" }));
|
2367
|
-
}
|
2368
|
-
catch (ignored) {
|
2369
|
-
// Nope; test for ZIP file
|
2370
|
-
if (blobText.length > 4 &&
|
2371
|
-
blobText.substr(0, 4) === ZIP_FILE_HEADER_SIGNATURE) {
|
2372
|
-
// Yes; reclassify as ZIP
|
2373
|
-
resolve(new Blob([blob], { type: "application/zip" }));
|
2374
|
-
}
|
2375
|
-
else if (blobText.startsWith("<")) {
|
2376
|
-
// Reclassify as XML; since the blob started out as text/plain, it's more likely that is
|
2377
|
-
// meant to be human-readable, so we'll use text/xml instead of application/xml
|
2378
|
-
resolve(new Blob([blob], { type: "text/xml" }));
|
2379
|
-
}
|
2380
|
-
else {
|
2381
|
-
// Leave as text
|
2382
|
-
resolve(blob);
|
2383
|
-
}
|
2384
|
-
}
|
2385
|
-
},
|
2386
|
-
// Faulty blob
|
2387
|
-
reject);
|
2388
|
-
}
|
2389
|
-
else {
|
2390
|
-
// Empty or not typed as plain text, so simply return
|
2391
|
-
if (blob) {
|
2392
|
-
resolve(blob);
|
2393
|
-
}
|
2394
|
-
else {
|
2395
|
-
reject();
|
2396
|
-
}
|
2397
|
-
}
|
2398
|
-
});
|
2399
|
-
}
|
2400
|
-
|
2401
|
-
/** @license
|
2402
|
-
* Copyright 2018 Esri
|
2403
|
-
*
|
2404
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
2405
|
-
* you may not use this file except in compliance with the License.
|
2406
|
-
* You may obtain a copy of the License at
|
2407
|
-
*
|
2408
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
2409
|
-
*
|
2410
|
-
* Unless required by applicable law or agreed to in writing, software
|
2411
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
2412
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
2413
|
-
* See the License for the specific language governing permissions and
|
2414
|
-
* limitations under the License.
|
2415
|
-
*/
|
2416
|
-
/**
|
2417
|
-
* Updates an item.
|
2418
|
-
*
|
2419
|
-
* @param itemInfo The base info of an item; note that this content will be serialized, which doesn't work
|
2420
|
-
* for binary content
|
2421
|
-
* @param authentication Credentials for request
|
2422
|
-
* @param folderId Item's folder
|
2423
|
-
* @param additionalParams Updates that are put under the `params` property, which is not serialized
|
2424
|
-
* @return
|
2425
|
-
*/
|
2426
|
-
function updateItem(itemInfo, authentication, folderId, additionalParams) {
|
2427
|
-
return new Promise((resolve, reject) => {
|
2428
|
-
const updateOptions = {
|
2429
|
-
item: itemInfo,
|
2430
|
-
folderId: folderId,
|
2431
|
-
authentication: authentication,
|
2432
|
-
params: {
|
2433
|
-
...(additionalParams ?? {})
|
2434
|
-
}
|
2435
|
-
};
|
2436
|
-
updateItem$1(updateOptions).then(response => (response.success ? resolve(response) : reject(response)), err => reject(err));
|
2437
|
-
});
|
2438
|
-
}
|
2439
|
-
|
2440
1778
|
/** @license
|
2441
1779
|
* Copyright 2018 Esri
|
2442
1780
|
*
|
@@ -2495,1038 +1833,4 @@ var SolutionResourceType;
|
|
2495
1833
|
SolutionResourceType[SolutionResourceType["info"] = 5] = "info";
|
2496
1834
|
})(SolutionResourceType || (SolutionResourceType = {}));
|
2497
1835
|
|
2498
|
-
|
2499
|
-
* Copyright 2020 Esri
|
2500
|
-
*
|
2501
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
2502
|
-
* you may not use this file except in compliance with the License.
|
2503
|
-
* You may obtain a copy of the License at
|
2504
|
-
*
|
2505
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
2506
|
-
*
|
2507
|
-
* Unless required by applicable law or agreed to in writing, software
|
2508
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
2509
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
2510
|
-
* See the License for the specific language governing permissions and
|
2511
|
-
* limitations under the License.
|
2512
|
-
*/
|
2513
|
-
/**
|
2514
|
-
* Extracts an item's resource folder and filename from the filename used to store a copy in a storage item.
|
2515
|
-
*
|
2516
|
-
* @param storageResourceFilename Filename used to store the resource, metadata, or thumbnail of an item
|
2517
|
-
* @param storageVersion Version of the Solution template
|
2518
|
-
* @returns Folder and filename for storing information in an item, as well as the type (resource, metadata,
|
2519
|
-
* or thumbnail) of the information; the folder property is only meaningful for the resource type
|
2520
|
-
* @see generateResourceStorageFilename
|
2521
|
-
* @see generateMetadataStorageFilename
|
2522
|
-
* @see generateThumbnailStorageFilename
|
2523
|
-
* @see convertItemResourceToStorageResource
|
2524
|
-
*/
|
2525
|
-
function convertStorageResourceToItemResource(storageResourceFilename, storageVersion = 0) {
|
2526
|
-
const nameParts = storageResourceFilename.split("/");
|
2527
|
-
let filename = nameParts.pop();
|
2528
|
-
let folder = "";
|
2529
|
-
const firstPrefixPart = nameParts.shift(); // undefined if there's no folder
|
2530
|
-
// Handle special "folders"
|
2531
|
-
let type = EFileType.Resource;
|
2532
|
-
if (firstPrefixPart) {
|
2533
|
-
if (firstPrefixPart.endsWith("_info_thumbnail")) {
|
2534
|
-
type = EFileType.Thumbnail;
|
2535
|
-
}
|
2536
|
-
else if (firstPrefixPart.endsWith("_info_metadata")) {
|
2537
|
-
type = EFileType.Metadata;
|
2538
|
-
filename = "metadata.xml";
|
2539
|
-
}
|
2540
|
-
else if (firstPrefixPart.endsWith("_info_data")) {
|
2541
|
-
type = EFileType.Data;
|
2542
|
-
}
|
2543
|
-
else if (firstPrefixPart.endsWith("_info_dataz")) {
|
2544
|
-
filename = filename.replace(/\.zip$/, "");
|
2545
|
-
type = EFileType.Data;
|
2546
|
-
// Otherwise, strip off item id
|
2547
|
-
}
|
2548
|
-
else if (storageVersion < 1) {
|
2549
|
-
// Version 0
|
2550
|
-
const folderStart = firstPrefixPart.indexOf("_");
|
2551
|
-
if (folderStart > 0) {
|
2552
|
-
folder = firstPrefixPart.substr(folderStart + 1);
|
2553
|
-
}
|
2554
|
-
}
|
2555
|
-
else {
|
2556
|
-
// Version ≥ 1
|
2557
|
-
folder = nameParts.join("/"); // folder is optional, in which case this will be ""
|
2558
|
-
}
|
2559
|
-
}
|
2560
|
-
return { type, folder, filename };
|
2561
|
-
}
|
2562
|
-
|
2563
|
-
/** @license
|
2564
|
-
* Copyright 2021 Esri
|
2565
|
-
*
|
2566
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
2567
|
-
* you may not use this file except in compliance with the License.
|
2568
|
-
* You may obtain a copy of the License at
|
2569
|
-
*
|
2570
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
2571
|
-
*
|
2572
|
-
* Unless required by applicable law or agreed to in writing, software
|
2573
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
2574
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
2575
|
-
* See the License for the specific language governing permissions and
|
2576
|
-
* limitations under the License.
|
2577
|
-
*/
|
2578
|
-
// ------------------------------------------------------------------------------------------------------------------ //
|
2579
|
-
/**
|
2580
|
-
* Generates IAssociatedFileCopyResults object.
|
2581
|
-
*
|
2582
|
-
* @param fileInfo Info about item that was to be copied
|
2583
|
-
* @param fetchedFromSource Status of fetching item from source
|
2584
|
-
* @param copiedToDestination Status of copying item to destination
|
2585
|
-
* @returns IAssociatedFileCopyResults object
|
2586
|
-
*/
|
2587
|
-
function createCopyResults(fileInfo, fetchedFromSource, copiedToDestination) {
|
2588
|
-
return {
|
2589
|
-
...fileInfo,
|
2590
|
-
fetchedFromSource,
|
2591
|
-
copiedToDestination
|
2592
|
-
};
|
2593
|
-
}
|
2594
|
-
|
2595
|
-
/** @license
|
2596
|
-
* Copyright 2021 Esri
|
2597
|
-
*
|
2598
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
2599
|
-
* you may not use this file except in compliance with the License.
|
2600
|
-
* You may obtain a copy of the License at
|
2601
|
-
*
|
2602
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
2603
|
-
*
|
2604
|
-
* Unless required by applicable law or agreed to in writing, software
|
2605
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
2606
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
2607
|
-
* See the License for the specific language governing permissions and
|
2608
|
-
* limitations under the License.
|
2609
|
-
*/
|
2610
|
-
// ------------------------------------------------------------------------------------------------------------------ //
|
2611
|
-
/**
|
2612
|
-
* Copies a resource into a zipfile.
|
2613
|
-
*
|
2614
|
-
* @param file Information about the source and destination of the file such as its URL, folder, filename
|
2615
|
-
* @param zipInfo Information about a zipfile such as its name and its zip object
|
2616
|
-
* @returns The result of the copy
|
2617
|
-
*/
|
2618
|
-
function copyResourceIntoZip(file, zipInfo) {
|
2619
|
-
// Add it to the zip
|
2620
|
-
if (file.folder) {
|
2621
|
-
zipInfo.zip
|
2622
|
-
.folder(file.folder)
|
2623
|
-
.file(file.filename, file.file, { binary: true });
|
2624
|
-
}
|
2625
|
-
else {
|
2626
|
-
zipInfo.zip.file(file.filename, file.file, { binary: true });
|
2627
|
-
}
|
2628
|
-
zipInfo.filelist.push(file);
|
2629
|
-
return createCopyResults(file, true);
|
2630
|
-
}
|
2631
|
-
|
2632
|
-
/** @license
|
2633
|
-
* Copyright 2021 Esri
|
2634
|
-
*
|
2635
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
2636
|
-
* you may not use this file except in compliance with the License.
|
2637
|
-
* You may obtain a copy of the License at
|
2638
|
-
*
|
2639
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
2640
|
-
*
|
2641
|
-
* Unless required by applicable law or agreed to in writing, software
|
2642
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
2643
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
2644
|
-
* See the License for the specific language governing permissions and
|
2645
|
-
* limitations under the License.
|
2646
|
-
*/
|
2647
|
-
// ------------------------------------------------------------------------------------------------------------------ //
|
2648
|
-
/**
|
2649
|
-
* Copies a zipfile into an AGO item.
|
2650
|
-
*
|
2651
|
-
* @param zipInfo Information about a zipfile such as its name and its zip object
|
2652
|
-
* @param destinationItemId Id of item to receive copy of resource/metadata/thumbnail
|
2653
|
-
* @param destinationAuthentication Credentials for the request to the storage
|
2654
|
-
* @returns A promise which resolves to the result of the copy
|
2655
|
-
*/
|
2656
|
-
function copyZipIntoItem(zipInfo, destinationItemId, destinationAuthentication) {
|
2657
|
-
return new Promise(resolve => {
|
2658
|
-
zipInfo.zip
|
2659
|
-
.generateAsync({ type: "blob" })
|
2660
|
-
.then((content) => {
|
2661
|
-
return blobToFile(content, zipInfo.filename, "application/zip");
|
2662
|
-
})
|
2663
|
-
.then((zipfile) => {
|
2664
|
-
const addResourceOptions = {
|
2665
|
-
id: destinationItemId,
|
2666
|
-
resource: zipfile,
|
2667
|
-
authentication: destinationAuthentication,
|
2668
|
-
params: {
|
2669
|
-
archive: true
|
2670
|
-
}
|
2671
|
-
};
|
2672
|
-
return addItemResource(addResourceOptions);
|
2673
|
-
})
|
2674
|
-
.then(() => resolve(createCopyResults(zipInfo, true, true)), () => resolve(createCopyResults(zipInfo, true, false)) // unable to add resource
|
2675
|
-
);
|
2676
|
-
});
|
2677
|
-
}
|
2678
|
-
|
2679
|
-
/** @license
|
2680
|
-
* Copyright 2021 Esri
|
2681
|
-
*
|
2682
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
2683
|
-
* you may not use this file except in compliance with the License.
|
2684
|
-
* You may obtain a copy of the License at
|
2685
|
-
*
|
2686
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
2687
|
-
*
|
2688
|
-
* Unless required by applicable law or agreed to in writing, software
|
2689
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
2690
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
2691
|
-
* See the License for the specific language governing permissions and
|
2692
|
-
* limitations under the License.
|
2693
|
-
*/
|
2694
|
-
// ------------------------------------------------------------------------------------------------------------------ //
|
2695
|
-
/**
|
2696
|
-
* Copies the files for storing the resources, metadata, and thumbnail of an item or group to a storage item
|
2697
|
-
* with a specified path by collecting files into zip files.
|
2698
|
-
*
|
2699
|
-
* @param files List of item files' URLs and folder/filenames for storing the files
|
2700
|
-
* @param destinationItemId Id of item to receive copy of resource/metadata/thumbnail
|
2701
|
-
* @param destinationAuthentication Credentials for the request to the storage
|
2702
|
-
* @param filesPerZip Number of files to include per zip file; AGO limits zips to 50 files
|
2703
|
-
* @returns A promise which resolves to a list of the result of the copies
|
2704
|
-
*/
|
2705
|
-
function copyFilesAsResources(files, destinationItemId, destinationAuthentication, filesPerZip = 40) {
|
2706
|
-
return new Promise(resolve => {
|
2707
|
-
let awaitAllItems = [];
|
2708
|
-
const zipInfos = [];
|
2709
|
-
if (files.length > 0) {
|
2710
|
-
// Bundle the resources into chunked zip updates because AGO tends to have problems with
|
2711
|
-
// many updates in a row to the same item: it claims success despite randomly failing.
|
2712
|
-
// Note that AGO imposes a limit of 50 files per zip, so we break the list of resource
|
2713
|
-
// file info into chunks below this threshold and start a zip for each
|
2714
|
-
// https://developers.arcgis.com/rest/users-groups-and-items/add-resources.htm
|
2715
|
-
const chunkedResourceFiles = chunkArray(files, filesPerZip);
|
2716
|
-
chunkedResourceFiles.forEach((chunk, index) => {
|
2717
|
-
// Create a zip for this chunk
|
2718
|
-
const zipInfo = {
|
2719
|
-
filename: `resources${index}.zip`,
|
2720
|
-
zip: new jszip_min(),
|
2721
|
-
filelist: []
|
2722
|
-
};
|
2723
|
-
awaitAllItems = awaitAllItems.concat(chunk.map(file => copyResourceIntoZip(file, zipInfo)));
|
2724
|
-
zipInfos.push(zipInfo);
|
2725
|
-
});
|
2726
|
-
}
|
2727
|
-
if (awaitAllItems.length > 0) {
|
2728
|
-
// Wait until the Resource zip file(s) are prepared
|
2729
|
-
void Promise.all(awaitAllItems).then((results) => {
|
2730
|
-
// We have three types of results:
|
2731
|
-
// | fetchedFromSource | copiedToDestination | interpretation | |
|
2732
|
-
// +-------------------+---------------------+------------------------------------------------+
|
2733
|
-
// | false | * | could not fetch file from source |
|
2734
|
-
// | true | true | file has been fetched and sent to AGO |
|
2735
|
-
// | true | undefined | file has been fetched and will be sent via zip |
|
2736
|
-
// Filter out copiedToDestination===undefined; we'll get their status when we send their zip
|
2737
|
-
results = results.filter((result) => !(result.fetchedFromSource &&
|
2738
|
-
typeof result.copiedToDestination === "undefined"));
|
2739
|
-
// Now send the resources to AGO
|
2740
|
-
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
2741
|
-
_copyAssociatedFileZips(zipInfos, destinationItemId, destinationAuthentication).then((zipResults) => {
|
2742
|
-
resolve(results.concat(zipResults));
|
2743
|
-
});
|
2744
|
-
});
|
2745
|
-
}
|
2746
|
-
else {
|
2747
|
-
// No data, metadata, or resources to send; we're done
|
2748
|
-
resolve([]);
|
2749
|
-
}
|
2750
|
-
});
|
2751
|
-
}
|
2752
|
-
/**
|
2753
|
-
* Copies one or more zipfiles to a storage item.
|
2754
|
-
*
|
2755
|
-
* @param zipInfos List of zip files containing files to store
|
2756
|
-
* @param destinationItemId Id of item to receive copy of resource/metadata/thumbnail
|
2757
|
-
* @param destinationAuthentication Credentials for the request to the storage
|
2758
|
-
* @returns A promise which resolves to a list of the result of the copies
|
2759
|
-
* @private
|
2760
|
-
*/
|
2761
|
-
function _copyAssociatedFileZips(zipInfos, destinationItemId, destinationAuthentication) {
|
2762
|
-
return new Promise(resolve => {
|
2763
|
-
const results = [];
|
2764
|
-
// Filter out empty zips, which can happen when none of the files in the chunk going into a zip
|
2765
|
-
// can be fetched; e.g., the only file is metadata.xml, and the source item doesn't have metadata
|
2766
|
-
const nonEmptyZipInfos = zipInfos.filter((zipInfo) => Object.keys(zipInfo.zip.files).length > 0);
|
2767
|
-
if (nonEmptyZipInfos.length > 0) {
|
2768
|
-
// Send the zip(s) to AGO
|
2769
|
-
void _sendZipsSeriallyToItem(nonEmptyZipInfos, destinationItemId, destinationAuthentication).then((zipResults) => {
|
2770
|
-
resolve(zipResults);
|
2771
|
-
});
|
2772
|
-
}
|
2773
|
-
else {
|
2774
|
-
// No resources to send; we're done
|
2775
|
-
resolve(results);
|
2776
|
-
}
|
2777
|
-
});
|
2778
|
-
}
|
2779
|
-
/**
|
2780
|
-
* Copies one or more zipfiles to a storage item in a serial fashion, waiting a bit between sends.
|
2781
|
-
*
|
2782
|
-
* @param zipInfos List of zip files containing files to store
|
2783
|
-
* @param destinationItemId Id of item to receive copy of resource/metadata/thumbnail
|
2784
|
-
* @param destinationAuthentication Credentials for the request to the storage
|
2785
|
-
* @returns A promise which resolves to a list of the result of the copies
|
2786
|
-
*/
|
2787
|
-
function _sendZipsSeriallyToItem(zipInfos, destinationItemId, destinationAuthentication) {
|
2788
|
-
return new Promise(resolve => {
|
2789
|
-
let allResults = [];
|
2790
|
-
// Remove zip from bottom of list
|
2791
|
-
const zipInfoToSend = zipInfos.pop();
|
2792
|
-
// Send predecessors in list
|
2793
|
-
let sendOthersPromise = Promise.resolve([]);
|
2794
|
-
if (zipInfos.length > 0) {
|
2795
|
-
sendOthersPromise = _sendZipsSeriallyToItem(zipInfos, destinationItemId, destinationAuthentication);
|
2796
|
-
}
|
2797
|
-
void sendOthersPromise
|
2798
|
-
.then((response) => {
|
2799
|
-
allResults = response;
|
2800
|
-
// Stall a little to give AGO time to catch up
|
2801
|
-
return new Promise(resolveSleep => {
|
2802
|
-
setTimeout(() => resolveSleep(), 1000);
|
2803
|
-
});
|
2804
|
-
})
|
2805
|
-
.then(() => {
|
2806
|
-
// Now send the zip removed from bottom of the input list
|
2807
|
-
return copyZipIntoItem(zipInfoToSend, destinationItemId, destinationAuthentication);
|
2808
|
-
})
|
2809
|
-
.then((zipResult) => {
|
2810
|
-
// Save the result of copying this zip as a status for each of the files that it contains
|
2811
|
-
zipResult.filelist.forEach((fileInfo) => {
|
2812
|
-
allResults.push(createCopyResults(fileInfo, true, zipResult.copiedToDestination));
|
2813
|
-
});
|
2814
|
-
resolve(allResults);
|
2815
|
-
});
|
2816
|
-
});
|
2817
|
-
}
|
2818
|
-
|
2819
|
-
/** @license
|
2820
|
-
* Copyright 2018 Esri
|
2821
|
-
*
|
2822
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
2823
|
-
* you may not use this file except in compliance with the License.
|
2824
|
-
* You may obtain a copy of the License at
|
2825
|
-
*
|
2826
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
2827
|
-
*
|
2828
|
-
* Unless required by applicable law or agreed to in writing, software
|
2829
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
2830
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
2831
|
-
* See the License for the specific language governing permissions and
|
2832
|
-
* limitations under the License.
|
2833
|
-
*/
|
2834
|
-
/**
|
2835
|
-
* Copies the files for storing the resources, metadata, and thumbnail of an item or group to a storage item
|
2836
|
-
* with a specified path.
|
2837
|
-
*
|
2838
|
-
* @param files List of item files and paths for storing the files
|
2839
|
-
* @param storageItemId Id of item to receive copy of resource/metadata
|
2840
|
-
* @param storageAuthentication Credentials for the request to the storage
|
2841
|
-
* @returns A promise which resolves to a list of the filenames under which the resource/metadata are stored
|
2842
|
-
*/
|
2843
|
-
function copyFilesToStorageItem(files, storageItemId, storageAuthentication) {
|
2844
|
-
return new Promise(resolve => {
|
2845
|
-
// tslint:disable-next-line: no-floating-promises
|
2846
|
-
void copyFilesAsResources(files, storageItemId, storageAuthentication).then((results) => {
|
2847
|
-
resolve(results
|
2848
|
-
// Filter out failures
|
2849
|
-
.filter((result) => result.fetchedFromSource && result.copiedToDestination)
|
2850
|
-
// Return folder and filename in storage item's resources
|
2851
|
-
.map((result) => result.folder + "/" + result.filename));
|
2852
|
-
});
|
2853
|
-
});
|
2854
|
-
}
|
2855
|
-
/**
|
2856
|
-
* Generates the URL for reading an item's resource given the filename of the resource.
|
2857
|
-
*
|
2858
|
-
* @param sourcePortalSharingUrl Server/sharing
|
2859
|
-
* @param itemId Id of item
|
2860
|
-
* @param sourceResourceFilename Either filename or folder/filename to resource
|
2861
|
-
* @returns URL string
|
2862
|
-
*/
|
2863
|
-
function generateSourceResourceUrl(sourcePortalSharingUrl, itemId, sourceResourceFilename) {
|
2864
|
-
return (checkUrlPathTermination(sourcePortalSharingUrl) +
|
2865
|
-
"content/items/" +
|
2866
|
-
itemId +
|
2867
|
-
"/resources/" +
|
2868
|
-
sourceResourceFilename);
|
2869
|
-
}
|
2870
|
-
/**
|
2871
|
-
* Generates a list of full URLs and folder/filename combinations used to store the resources, metadata,
|
2872
|
-
* and thumbnail of an item.
|
2873
|
-
*
|
2874
|
-
* @param portalSharingUrl Server/sharing
|
2875
|
-
* @param storageItemId Id of storage item
|
2876
|
-
* @param resourceFilenames List of resource filenames for an item, e.g., ["file1", "myFolder/file2"]
|
2877
|
-
* @param storageVersion Version of the Solution template
|
2878
|
-
* @returns List of item files' URLs and folder/filenames for storing the files
|
2879
|
-
*/
|
2880
|
-
function generateStorageFilePaths(portalSharingUrl, storageItemId, resourceFilenames = [], storageVersion = 0) {
|
2881
|
-
return resourceFilenames.map(resourceFilename => {
|
2882
|
-
return {
|
2883
|
-
url: generateSourceResourceUrl(portalSharingUrl, storageItemId, resourceFilename),
|
2884
|
-
...convertStorageResourceToItemResource(resourceFilename, storageVersion)
|
2885
|
-
};
|
2886
|
-
});
|
2887
|
-
}
|
2888
|
-
function isSupportedFileType(filename) {
|
2889
|
-
// Supported file formats are: .json, .xml, .txt, .png, .pbf, .zip, .jpeg, .jpg, .gif, .bmp, .gz, .svg,
|
2890
|
-
// .svgz, .geodatabase (https://developers.arcgis.com/rest/users-groups-and-items/add-resources.htm)
|
2891
|
-
const filenameExtension = filename.match(/\.([a-z]+)$/i);
|
2892
|
-
const supportedExtensions = "|.json|.xml|.txt|.png|.pbf|.zip|.jpeg|.jpg|.gif|.bmp|.gz|.svg|.svgz|.geodatabase|";
|
2893
|
-
return (!!filenameExtension &&
|
2894
|
-
supportedExtensions.indexOf("|" + filenameExtension[0] + "|") >= 0);
|
2895
|
-
}
|
2896
|
-
/**
|
2897
|
-
* Gets the thumbnail of an item or group.
|
2898
|
-
*
|
2899
|
-
* @param authentication Credentials for the request to the storage
|
2900
|
-
* @param filePaths List of item files' URLs and folder/filenames for storing the files
|
2901
|
-
* @returns A promise which resolves to a boolean indicating if the copies were successful
|
2902
|
-
*/
|
2903
|
-
function getThumbnailFromStorageItem(authentication, filePaths) {
|
2904
|
-
let thumbnailUrl;
|
2905
|
-
let thumbnailFilename;
|
2906
|
-
filePaths.forEach(path => {
|
2907
|
-
if (path.type === EFileType.Thumbnail) {
|
2908
|
-
thumbnailUrl = path.url;
|
2909
|
-
thumbnailFilename = path.filename;
|
2910
|
-
}
|
2911
|
-
});
|
2912
|
-
if (!thumbnailUrl) {
|
2913
|
-
return Promise.resolve(null);
|
2914
|
-
}
|
2915
|
-
return getThumbnailFile(thumbnailUrl, thumbnailFilename, authentication);
|
2916
|
-
}
|
2917
|
-
/**
|
2918
|
-
* Removes the item's resource that matches the filename with new content
|
2919
|
-
*
|
2920
|
-
* @param itemId Id of the item to remove
|
2921
|
-
* @param filename Name of the resource file to remove
|
2922
|
-
* @param authentication Credentials for the request to the storage
|
2923
|
-
* @returns A promise which resolves with a success true/false response
|
2924
|
-
*/
|
2925
|
-
function removeItemResourceFile(itemId, filename, authentication) {
|
2926
|
-
return removeItemResource({
|
2927
|
-
id: itemId,
|
2928
|
-
resource: filename,
|
2929
|
-
authentication: authentication
|
2930
|
-
});
|
2931
|
-
}
|
2932
|
-
/**
|
2933
|
-
* Updates the item's resource that matches the filename with new content
|
2934
|
-
*
|
2935
|
-
* @param itemId Id of the item to update
|
2936
|
-
* @param filename Name of the resource file to update; prefix optional (e.g., a/b/file.txt)
|
2937
|
-
* @param resource The new content to update the resource with
|
2938
|
-
* @param authentication Credentials for the request to the storage
|
2939
|
-
* @returns A promise which resolves with a success true/false response
|
2940
|
-
*/
|
2941
|
-
function updateItemResourceFile(itemId, filename, resource, authentication) {
|
2942
|
-
// Prefix has to be specified separately
|
2943
|
-
const prefixedFilenameParts = filename.split("/");
|
2944
|
-
const prefix = prefixedFilenameParts.length > 1 ? prefixedFilenameParts.slice(0, prefixedFilenameParts.length - 1).join("/") : undefined;
|
2945
|
-
const suffix = prefixedFilenameParts[prefixedFilenameParts.length - 1];
|
2946
|
-
return updateItemResource({
|
2947
|
-
id: itemId,
|
2948
|
-
prefix: prefix,
|
2949
|
-
name: suffix,
|
2950
|
-
resource,
|
2951
|
-
authentication: authentication
|
2952
|
-
});
|
2953
|
-
}
|
2954
|
-
|
2955
|
-
/** @license
|
2956
|
-
* Copyright 2022 Esri
|
2957
|
-
*
|
2958
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
2959
|
-
* you may not use this file except in compliance with the License.
|
2960
|
-
* You may obtain a copy of the License at
|
2961
|
-
*
|
2962
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
2963
|
-
*
|
2964
|
-
* Unless required by applicable law or agreed to in writing, software
|
2965
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
2966
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
2967
|
-
* See the License for the specific language governing permissions and
|
2968
|
-
* limitations under the License.
|
2969
|
-
*/
|
2970
|
-
const EmptySolutionStore = {
|
2971
|
-
solutionItemId: "",
|
2972
|
-
defaultWkid: undefined,
|
2973
|
-
solutionData: { metadata: {}, templates: [] },
|
2974
|
-
templateEdits: {},
|
2975
|
-
featureServices: [],
|
2976
|
-
spatialReferenceInfo: {
|
2977
|
-
enabled: false,
|
2978
|
-
services: {},
|
2979
|
-
spatialReference: undefined
|
2980
|
-
}
|
2981
|
-
};
|
2982
|
-
class SolutionStore {
|
2983
|
-
/**
|
2984
|
-
* Creates singleton instance when accessed; default export from module.
|
2985
|
-
*
|
2986
|
-
* @returns Static instance of the class
|
2987
|
-
*/
|
2988
|
-
static get Store() {
|
2989
|
-
return this._instance || (this._instance = new this());
|
2990
|
-
}
|
2991
|
-
/**
|
2992
|
-
* Creates an empty store.
|
2993
|
-
*
|
2994
|
-
* @protected
|
2995
|
-
*/
|
2996
|
-
constructor() {
|
2997
|
-
this._hasChanges = false;
|
2998
|
-
this._store = createStore(Object.assign({}, EmptySolutionStore));
|
2999
|
-
}
|
3000
|
-
/**
|
3001
|
-
* Returns the stored information of an item.
|
3002
|
-
*
|
3003
|
-
* @param itemId Id of item to fetch
|
3004
|
-
*
|
3005
|
-
* @returns Item information or `undefined` if not found
|
3006
|
-
*/
|
3007
|
-
getItemInfo(itemId) {
|
3008
|
-
const templates = this._store.get("solutionData").templates;
|
3009
|
-
let template;
|
3010
|
-
templates.some((t) => {
|
3011
|
-
if (itemId == t.itemId) {
|
3012
|
-
template = t;
|
3013
|
-
return true;
|
3014
|
-
}
|
3015
|
-
return false;
|
3016
|
-
});
|
3017
|
-
return template;
|
3018
|
-
}
|
3019
|
-
/**
|
3020
|
-
* Returns a top-level store property: solutionItemId, defaultWkid, etc.
|
3021
|
-
*
|
3022
|
-
* @param propName Name of property
|
3023
|
-
*
|
3024
|
-
* @returns Value of property
|
3025
|
-
*/
|
3026
|
-
getStoreInfo(propName) {
|
3027
|
-
return this._store.get(propName);
|
3028
|
-
}
|
3029
|
-
/**
|
3030
|
-
* Loads a Solution into the store from AGO.
|
3031
|
-
*
|
3032
|
-
* @param solutionItemId Id of the solution represented in the store
|
3033
|
-
* @param authentication Credentials for fetching information to be loaded into the store
|
3034
|
-
*
|
3035
|
-
* @returns Promise that resolves when task is done
|
3036
|
-
*/
|
3037
|
-
async loadSolution(solutionItemId, authentication) {
|
3038
|
-
this._authentication = authentication;
|
3039
|
-
const solutionData = await getItemDataAsJson(solutionItemId, authentication);
|
3040
|
-
if (solutionData) {
|
3041
|
-
const defaultWkid = getProp(solutionData, "params.wkid.default");
|
3042
|
-
await this._prepareSolutionItemsForEditing(solutionItemId, solutionData.templates, authentication);
|
3043
|
-
const featureServices = this._getFeatureServices(solutionData.templates);
|
3044
|
-
const spatialReferenceInfo = this._getSpatialReferenceInfo(featureServices, defaultWkid);
|
3045
|
-
this._store.set("solutionItemId", solutionItemId);
|
3046
|
-
this._store.set("defaultWkid", defaultWkid);
|
3047
|
-
this._store.set("solutionData", solutionData);
|
3048
|
-
this._store.set("featureServices", featureServices);
|
3049
|
-
this._store.set("spatialReferenceInfo", spatialReferenceInfo);
|
3050
|
-
}
|
3051
|
-
this._flagStoreHasChanges(false);
|
3052
|
-
}
|
3053
|
-
/**
|
3054
|
-
* Queues the replacement of the thumbnail associated with a template item in the store.
|
3055
|
-
*
|
3056
|
-
* @param itemEdit Details of the template to modify, containing the new thumbnail in the `thumbnail`
|
3057
|
-
* property
|
3058
|
-
*/
|
3059
|
-
replaceItemThumbnail(itemEdit) {
|
3060
|
-
// Flag the current thumbnail and any replacements for removal
|
3061
|
-
itemEdit.resourceFilePaths.forEach((path) => {
|
3062
|
-
if (path.type === EFileType.Thumbnail) {
|
3063
|
-
if (path.updateType === EUpdateType.None) {
|
3064
|
-
// Existing thumbnail not yet flagged for removal
|
3065
|
-
path.updateType = EUpdateType.Remove;
|
3066
|
-
}
|
3067
|
-
else if (path.updateType === EUpdateType.Add || path.updateType === EUpdateType.Update) {
|
3068
|
-
// An earlier replacement
|
3069
|
-
path.updateType = EUpdateType.Obsolete;
|
3070
|
-
}
|
3071
|
-
}
|
3072
|
-
});
|
3073
|
-
// Remove any replacements already queued
|
3074
|
-
itemEdit.resourceFilePaths =
|
3075
|
-
itemEdit.resourceFilePaths.filter((path) => path.updateType != EUpdateType.Obsolete);
|
3076
|
-
// Add the new thumbnail to the store item
|
3077
|
-
itemEdit.resourceFilePaths.push({
|
3078
|
-
blob: itemEdit.thumbnail,
|
3079
|
-
filename: itemEdit.thumbnail.name,
|
3080
|
-
type: EFileType.Thumbnail,
|
3081
|
-
updateType: EUpdateType.Add
|
3082
|
-
});
|
3083
|
-
// Update the store
|
3084
|
-
this.setItemInfo(itemEdit);
|
3085
|
-
}
|
3086
|
-
/**
|
3087
|
-
* Writes a Solution into AGO from the store. Must use `loadSolution` to continue with solution.
|
3088
|
-
*
|
3089
|
-
* @returns Promise that resolves when task is done
|
3090
|
-
*/
|
3091
|
-
async saveSolution() {
|
3092
|
-
// Update the templates in the original solution item data
|
3093
|
-
const solutionItemId = this._store.get("solutionItemId");
|
3094
|
-
const solutionData = this._store.get("solutionData");
|
3095
|
-
const spatialReferenceInfo = this._store.get("spatialReferenceInfo");
|
3096
|
-
await this._prepareSolutionItemsForStorage(solutionItemId, solutionData.templates, this._authentication);
|
3097
|
-
const updatedDefaultWkid = this._setSpatialReferenceInfo(spatialReferenceInfo, solutionData.templates);
|
3098
|
-
if (updatedDefaultWkid) {
|
3099
|
-
setCreateProp(solutionData, "params.wkid", {
|
3100
|
-
"label": "Spatial Reference",
|
3101
|
-
"default": updatedDefaultWkid,
|
3102
|
-
"valueType": "spatialReference",
|
3103
|
-
"attributes": {
|
3104
|
-
"required": "true"
|
3105
|
-
}
|
3106
|
-
});
|
3107
|
-
}
|
3108
|
-
else {
|
3109
|
-
setCreateProp(solutionData, "params.wkid", {});
|
3110
|
-
}
|
3111
|
-
const itemInfo = {
|
3112
|
-
id: solutionItemId,
|
3113
|
-
text: solutionData
|
3114
|
-
};
|
3115
|
-
await updateItem(itemInfo, this._authentication);
|
3116
|
-
}
|
3117
|
-
/**
|
3118
|
-
* Stores information for item.
|
3119
|
-
*
|
3120
|
-
* @param itemEdit Item information
|
3121
|
-
*/
|
3122
|
-
setItemInfo(itemEdit) {
|
3123
|
-
const solutionData = this._store.get("solutionData");
|
3124
|
-
const templates = solutionData.templates;
|
3125
|
-
templates.some((t) => {
|
3126
|
-
if (itemEdit.itemId == t.itemId) {
|
3127
|
-
t = itemEdit;
|
3128
|
-
this._store.set("solutionData", solutionData);
|
3129
|
-
this._flagStoreHasChanges(true);
|
3130
|
-
return true;
|
3131
|
-
}
|
3132
|
-
return false;
|
3133
|
-
});
|
3134
|
-
}
|
3135
|
-
/**
|
3136
|
-
* Sets a top-level store property: solutionItemId, defaultWkid, etc.
|
3137
|
-
*
|
3138
|
-
* @param propName Name of property
|
3139
|
-
* @param value Value of property
|
3140
|
-
*/
|
3141
|
-
setStoreInfo(propName, value) {
|
3142
|
-
this._store.set(propName, value);
|
3143
|
-
this._flagStoreHasChanges(true);
|
3144
|
-
}
|
3145
|
-
//------------------------------------------------------------------------------------------------------------------//
|
3146
|
-
/** Provides access to protected methods for unit testing.
|
3147
|
-
*
|
3148
|
-
* @param methodName Name of protected method to run
|
3149
|
-
* @param arg1 First argument to forward to method, e.g., for "_prepareSolutionItemsForEditing", `solutionItemId`
|
3150
|
-
* @param arg2 Second argument to forward to method, e.g., for "_prepareSolutionItemsForEditing", `templates`
|
3151
|
-
* @param arg3 Third argument to forward to method, e.g., for "_prepareSolutionItemsForEditing", `authentication`
|
3152
|
-
*
|
3153
|
-
* @returns
|
3154
|
-
*/
|
3155
|
-
_testAccess(methodName, arg1, arg2, arg3) {
|
3156
|
-
switch (methodName) {
|
3157
|
-
case "_emptyTheStore":
|
3158
|
-
this._emptyTheStore();
|
3159
|
-
break;
|
3160
|
-
case "_getFeatureServices":
|
3161
|
-
return this._getFeatureServices(arg1);
|
3162
|
-
case "_getItemsSharedWithThisGroup":
|
3163
|
-
return this._getItemsSharedWithThisGroup(arg1, arg2);
|
3164
|
-
case "_getResourceFilePaths":
|
3165
|
-
return this._getResourceFilePaths(arg1, arg2, arg3);
|
3166
|
-
case "_getResourceStorageName":
|
3167
|
-
return this._getResourceStorageName(arg1, arg2);
|
3168
|
-
case "_getSpatialReferenceInfo":
|
3169
|
-
return this._getSpatialReferenceInfo(arg1, arg2);
|
3170
|
-
case "_prepareSolutionItemsForEditing":
|
3171
|
-
return this._prepareSolutionItemsForEditing(arg1, arg2, arg3);
|
3172
|
-
case "_prepareSolutionItemsForStorage":
|
3173
|
-
return this._prepareSolutionItemsForStorage(arg1, arg2, arg3);
|
3174
|
-
case "_setSpatialReferenceInfo":
|
3175
|
-
return this._setSpatialReferenceInfo(arg1, arg2);
|
3176
|
-
case "_splitFilename":
|
3177
|
-
return this._splitFilename(arg1);
|
3178
|
-
}
|
3179
|
-
return null;
|
3180
|
-
}
|
3181
|
-
/**
|
3182
|
-
* Returns the store to the empty state.
|
3183
|
-
*
|
3184
|
-
* @protected
|
3185
|
-
*/
|
3186
|
-
_emptyTheStore() {
|
3187
|
-
this._store.set("solutionItemId", EmptySolutionStore.solutionItemId);
|
3188
|
-
this._store.set("defaultWkid", EmptySolutionStore.defaultWkid);
|
3189
|
-
this._store.set("solutionData", EmptySolutionStore.solutionData);
|
3190
|
-
this._store.set("templateEdits", EmptySolutionStore.templateEdits);
|
3191
|
-
this._store.set("featureServices", EmptySolutionStore.featureServices);
|
3192
|
-
this._store.set("spatialReferenceInfo", EmptySolutionStore.spatialReferenceInfo);
|
3193
|
-
}
|
3194
|
-
/**
|
3195
|
-
* Sets the store's flag indicating if it has changes and dispatches an event when
|
3196
|
-
* the flag value changes.
|
3197
|
-
*
|
3198
|
-
* @param flagHasChanges Current state of change in the store; if it doesn't match the value saved in this
|
3199
|
-
* object, an event is dispatched with the new value and the saved value is updated
|
3200
|
-
*
|
3201
|
-
* @protected
|
3202
|
-
*/
|
3203
|
-
_flagStoreHasChanges(flagHasChanges) {
|
3204
|
-
// Event for notifying if the store has changes or not
|
3205
|
-
if (this._hasChanges !== flagHasChanges) {
|
3206
|
-
window.dispatchEvent(new CustomEvent("solutionStoreHasChanges", {
|
3207
|
-
detail: flagHasChanges,
|
3208
|
-
bubbles: true,
|
3209
|
-
cancelable: false,
|
3210
|
-
composed: true
|
3211
|
-
}));
|
3212
|
-
}
|
3213
|
-
this._hasChanges = flagHasChanges;
|
3214
|
-
}
|
3215
|
-
/**
|
3216
|
-
* Gets a list of Feature Services that are not views.
|
3217
|
-
*
|
3218
|
-
* @param templates A list of item templates from the solution
|
3219
|
-
*
|
3220
|
-
* @returns a list of feature services
|
3221
|
-
*
|
3222
|
-
* @protected
|
3223
|
-
*/
|
3224
|
-
_getCustomizableFeatureServices(templates) {
|
3225
|
-
return templates.reduce((prev, cur) => {
|
3226
|
-
if (cur.type === "Feature Service" && cur.item.typeKeywords.indexOf("View Service") < 0) {
|
3227
|
-
prev.push(cur);
|
3228
|
-
}
|
3229
|
-
return prev;
|
3230
|
-
}, []);
|
3231
|
-
}
|
3232
|
-
/**
|
3233
|
-
* Gets a list of Feature Services that are not views along with an enabled property that indicates
|
3234
|
-
* if the service currently uses a spatial reference variable.
|
3235
|
-
*
|
3236
|
-
* @param templates A list of item templates from the solution
|
3237
|
-
*
|
3238
|
-
* @returns a list of feature service names and an enabled property to indicate
|
3239
|
-
* if they currently use a spatial reference variable.
|
3240
|
-
*
|
3241
|
-
* @protected
|
3242
|
-
*/
|
3243
|
-
_getFeatureServices(templates) {
|
3244
|
-
const customizeableFeatureServices = this._getCustomizableFeatureServices(templates);
|
3245
|
-
return customizeableFeatureServices.map((fs) => {
|
3246
|
-
const name = fs.item.title || fs.item.name;
|
3247
|
-
const wkid = getProp(fs, "properties.service.spatialReference.wkid");
|
3248
|
-
return { name, enabled: wkid.toString().startsWith("{{params.wkid||") };
|
3249
|
-
});
|
3250
|
-
}
|
3251
|
-
/**
|
3252
|
-
* Capture the key item details for a given group template
|
3253
|
-
*
|
3254
|
-
* @param template one of the templates from the current solution
|
3255
|
-
* @param templates full list of templates
|
3256
|
-
*
|
3257
|
-
* @returns a list of IItemShare objects
|
3258
|
-
*
|
3259
|
-
* @protected
|
3260
|
-
*/
|
3261
|
-
_getItemsSharedWithThisGroup(template, templates) {
|
3262
|
-
return templates.reduce((prev, cur) => {
|
3263
|
-
if (cur.itemId !== template.itemId && cur.type !== "Group") {
|
3264
|
-
prev.push({
|
3265
|
-
id: cur.itemId,
|
3266
|
-
title: cur.item.name || cur.item.title,
|
3267
|
-
isShared: (cur.groups || []).indexOf(template.itemId) > -1,
|
3268
|
-
shareItem: (cur.groups || []).indexOf(template.itemId) > -1,
|
3269
|
-
type: cur.type,
|
3270
|
-
typeKeywords: cur.item.typeKeywords
|
3271
|
-
});
|
3272
|
-
}
|
3273
|
-
return prev;
|
3274
|
-
}, []);
|
3275
|
-
}
|
3276
|
-
/**
|
3277
|
-
* Generate storage file paths from the solution template
|
3278
|
-
*
|
3279
|
-
* @param solutionId the id of the current solution
|
3280
|
-
* @param template the current template from the solution
|
3281
|
-
* @param portal Portal where file is to be found
|
3282
|
-
*
|
3283
|
-
* @returns a list of resource file infos
|
3284
|
-
*
|
3285
|
-
* @protected
|
3286
|
-
*/
|
3287
|
-
_getResourceFilePaths(solutionId, template, portal) {
|
3288
|
-
const resourceFilePaths = generateStorageFilePaths(portal, solutionId, template.resources, SolutionTemplateFormatVersion);
|
3289
|
-
return resourceFilePaths.map((fp) => {
|
3290
|
-
fp.updateType = EUpdateType.None;
|
3291
|
-
return fp;
|
3292
|
-
});
|
3293
|
-
}
|
3294
|
-
/**
|
3295
|
-
* Generates a resource name from a storage file path.
|
3296
|
-
*
|
3297
|
-
* @param templateItemId The id of the template item whose resource this is; used as a prefix in the resource name
|
3298
|
-
* @param resourcePath Resource file infos
|
3299
|
-
*
|
3300
|
-
* @returns The resource name to use when attaching a resource to the item.
|
3301
|
-
*
|
3302
|
-
* @protected
|
3303
|
-
*/
|
3304
|
-
_getResourceStorageName(templateItemId, resourcePath) {
|
3305
|
-
/* Converts
|
3306
|
-
{
|
3307
|
-
"url": "https://myorg.maps.arcgis.com/sharing/rest/content/items/ca924c6db7d247b9a31fa30532fb5913/resources/79036430a6274e17ae915d0278b8569c_info_metadata/metadata.xml",
|
3308
|
-
"type": 2,
|
3309
|
-
"folder": "",
|
3310
|
-
"filename": "metadata.xml",
|
3311
|
-
"updateType": 3
|
3312
|
-
}
|
3313
|
-
to
|
3314
|
-
ca924c6db7d247b9a31fa30532fb5913_info_metadata/metadata.xml
|
3315
|
-
*/
|
3316
|
-
let prefix = templateItemId;
|
3317
|
-
switch (resourcePath.type) {
|
3318
|
-
case EFileType.Data:
|
3319
|
-
prefix = `${prefix}_info_data`;
|
3320
|
-
break;
|
3321
|
-
case EFileType.Info:
|
3322
|
-
prefix = `${prefix}_info`;
|
3323
|
-
break;
|
3324
|
-
case EFileType.Metadata:
|
3325
|
-
prefix = `${prefix}_info_metadata`;
|
3326
|
-
break;
|
3327
|
-
case EFileType.Resource:
|
3328
|
-
break;
|
3329
|
-
case EFileType.Thumbnail:
|
3330
|
-
prefix = `${prefix}_info_thumbnail`;
|
3331
|
-
break;
|
3332
|
-
}
|
3333
|
-
let filenameToUse = resourcePath.filename;
|
3334
|
-
if (resourcePath.type == EFileType.Data && filenameToUse && !isSupportedFileType(filenameToUse)) {
|
3335
|
-
filenameToUse = filenameToUse + ".zip";
|
3336
|
-
prefix += "z";
|
3337
|
-
}
|
3338
|
-
const filename = resourcePath.folder ? resourcePath.folder + "/" + filenameToUse : filenameToUse;
|
3339
|
-
return prefix + "/" + filename;
|
3340
|
-
}
|
3341
|
-
/**
|
3342
|
-
* Extracts basic spatial reference information that is used to determine if a custom spatial reference parameter will
|
3343
|
-
* be exposed while deploying this solution and if so what feature services will support it and what will the default wkid be
|
3344
|
-
*
|
3345
|
-
* @param services a list of objects with service name and enabled property (indicates if they currently use a spatial reference var)
|
3346
|
-
* @param data the data object of a solution item
|
3347
|
-
*
|
3348
|
-
* @returns an object that stores if a custom spatial reference parameter is enabled/disabled,
|
3349
|
-
* a list of services and if they are enabled/disabled, and the default wkid
|
3350
|
-
*
|
3351
|
-
* @protected
|
3352
|
-
*/
|
3353
|
-
_getSpatialReferenceInfo(services, defaultWkid) {
|
3354
|
-
const defaultServices = {};
|
3355
|
-
services.forEach(service => {
|
3356
|
-
defaultServices[service.name] = service.enabled;
|
3357
|
-
});
|
3358
|
-
return {
|
3359
|
-
enabled: defaultWkid !== undefined,
|
3360
|
-
services: defaultServices,
|
3361
|
-
spatialReference: defaultWkid ? defaultWkid : undefined
|
3362
|
-
};
|
3363
|
-
}
|
3364
|
-
/**
|
3365
|
-
* Create and store template items for the editor.
|
3366
|
-
*
|
3367
|
-
* @param solutionItemId Id of the solution represented in the store
|
3368
|
-
* @param templates A list of item templates from the solution
|
3369
|
-
* @param authentication Credentials for fetching information to be loaded into the store
|
3370
|
-
*
|
3371
|
-
* @returns a promise that resolves when the templates are ready
|
3372
|
-
*
|
3373
|
-
* @protected
|
3374
|
-
*/
|
3375
|
-
async _prepareSolutionItemsForEditing(solutionItemId, templates, authentication) {
|
3376
|
-
const thumbnailPromises = [];
|
3377
|
-
// Augment the template with paths to resources and group information, if relevant
|
3378
|
-
templates.forEach((t) => {
|
3379
|
-
t.resourceFilePaths = this._getResourceFilePaths(solutionItemId, t, authentication.portal);
|
3380
|
-
thumbnailPromises.push(t.resourceFilePaths.length > 0 ?
|
3381
|
-
getThumbnailFromStorageItem(authentication, t.resourceFilePaths) :
|
3382
|
-
Promise.resolve());
|
3383
|
-
t.groupDetails = t.type === "Group" ? this._getItemsSharedWithThisGroup(t, templates) : [];
|
3384
|
-
});
|
3385
|
-
// Augment the template with its thumbnail file
|
3386
|
-
const thumbnails = await Promise.all(thumbnailPromises);
|
3387
|
-
templates.forEach((t, i) => {
|
3388
|
-
t.thumbnail = thumbnails[i] ? thumbnails[i] : undefined;
|
3389
|
-
});
|
3390
|
-
return Promise.resolve();
|
3391
|
-
}
|
3392
|
-
/**
|
3393
|
-
* Prepares template items for sending to AGO by updating the resources held by the solution item.
|
3394
|
-
*
|
3395
|
-
* @param solutionItemId Id of the solution represented in the store
|
3396
|
-
* @param templates A list of item templates from the solution
|
3397
|
-
* @param authentication Credentials for fetching information to be loaded into the store
|
3398
|
-
*
|
3399
|
-
* @returns a promise that resolves when the templates are ready
|
3400
|
-
*
|
3401
|
-
* @protected
|
3402
|
-
*/
|
3403
|
-
async _prepareSolutionItemsForStorage(solutionItemId, templates, authentication) {
|
3404
|
-
const resourceAdds = [];
|
3405
|
-
// Update the resources and remove the augmentation from a template
|
3406
|
-
const pendingTasks = [];
|
3407
|
-
templates.forEach((t) => {
|
3408
|
-
// Run through the resourceFilePaths for the item seeking modifications to be made to the solution item's
|
3409
|
-
// collection of resources; queue them for batching
|
3410
|
-
// eslint-disable-next-line @typescript-eslint/no-misused-promises
|
3411
|
-
t.resourceFilePaths.forEach(async (path) => {
|
3412
|
-
const storageName = this._getResourceStorageName(t.itemId, path);
|
3413
|
-
switch (path.updateType) {
|
3414
|
-
case EUpdateType.Add:
|
3415
|
-
const { prefix, suffix } = this._splitFilename(storageName);
|
3416
|
-
t.resources.push(storageName);
|
3417
|
-
resourceAdds.push({
|
3418
|
-
itemId: t.itemId,
|
3419
|
-
file: path.blob,
|
3420
|
-
folder: prefix,
|
3421
|
-
filename: suffix
|
3422
|
-
});
|
3423
|
-
break;
|
3424
|
-
case EUpdateType.Update:
|
3425
|
-
// eslint-disable-next-line @typescript-eslint/no-misused-promises
|
3426
|
-
pendingTasks.push(new Promise(async (resolve) => {
|
3427
|
-
try {
|
3428
|
-
await updateItemResourceFile(solutionItemId, storageName, path.blob, authentication);
|
3429
|
-
}
|
3430
|
-
catch (err) {
|
3431
|
-
console.log("Unable to update " + storageName + " for item " + t.itemId + ": " + JSON.stringify(err));
|
3432
|
-
}
|
3433
|
-
resolve();
|
3434
|
-
}));
|
3435
|
-
break;
|
3436
|
-
case EUpdateType.Remove:
|
3437
|
-
// eslint-disable-next-line @typescript-eslint/no-misused-promises
|
3438
|
-
pendingTasks.push(new Promise(async (resolve) => {
|
3439
|
-
try {
|
3440
|
-
await removeItemResourceFile(solutionItemId, storageName, authentication);
|
3441
|
-
t.resources = t.resources.filter((path) => path !== storageName);
|
3442
|
-
}
|
3443
|
-
catch (err) {
|
3444
|
-
console.log("Unable to remove " + storageName + " for item " + t.itemId + ": " + JSON.stringify(err));
|
3445
|
-
}
|
3446
|
-
resolve();
|
3447
|
-
}));
|
3448
|
-
break;
|
3449
|
-
}
|
3450
|
-
return Promise.resolve();
|
3451
|
-
});
|
3452
|
-
delete t.resourceFilePaths;
|
3453
|
-
delete t.thumbnail;
|
3454
|
-
delete t.groupDetails;
|
3455
|
-
});
|
3456
|
-
// Update the resources
|
3457
|
-
return Promise.all(pendingTasks)
|
3458
|
-
.then(async () => {
|
3459
|
-
if (resourceAdds.length > 0) {
|
3460
|
-
await copyFilesToStorageItem(resourceAdds, solutionItemId, authentication);
|
3461
|
-
}
|
3462
|
-
return Promise.resolve();
|
3463
|
-
});
|
3464
|
-
}
|
3465
|
-
/**
|
3466
|
-
* Stores basic spatial reference information that is used to determine if a custom spatial reference parameter will
|
3467
|
-
* be exposed while deploying this solution and if so what feature services will support it and what will the default wkid be
|
3468
|
-
*
|
3469
|
-
* @param spatialReferenceInfo The configuration settings for a custom spatial reference
|
3470
|
-
* @param templates The templates in the current solution, which will be updated in place if
|
3471
|
-
* `spatialReferenceInfo.enabled` is true
|
3472
|
-
*
|
3473
|
-
* @returns The new default wkid
|
3474
|
-
*
|
3475
|
-
* @protected
|
3476
|
-
*/
|
3477
|
-
_setSpatialReferenceInfo(spatialReferenceInfo, templates) {
|
3478
|
-
const customizingPrefix = "{{params.wkid||";
|
3479
|
-
const customizeableFeatureServices = this._getCustomizableFeatureServices(templates);
|
3480
|
-
if (spatialReferenceInfo.enabled) {
|
3481
|
-
// Enable or disable this feature in each service
|
3482
|
-
customizeableFeatureServices.forEach((fs) => {
|
3483
|
-
const name = fs.item.title || fs.item.name;
|
3484
|
-
let wkid;
|
3485
|
-
if (spatialReferenceInfo.services[name]) { // enabled
|
3486
|
-
wkid = `{{params.wkid||${spatialReferenceInfo.spatialReference}}}`;
|
3487
|
-
setCreateProp(fs, "properties.service.spatialReference.wkid", wkid);
|
3488
|
-
}
|
3489
|
-
else { // disabled
|
3490
|
-
wkid = getProp(fs, "properties.service.spatialReference.wkid");
|
3491
|
-
// Remove customizing prefix if present
|
3492
|
-
if (wkid.toString().startsWith(customizingPrefix)) {
|
3493
|
-
wkid = wkid.toString().substring(customizingPrefix.length, wkid.length - 2);
|
3494
|
-
setCreateProp(fs, "properties.service.spatialReference.wkid", wkid);
|
3495
|
-
}
|
3496
|
-
}
|
3497
|
-
});
|
3498
|
-
return spatialReferenceInfo.spatialReference;
|
3499
|
-
}
|
3500
|
-
else {
|
3501
|
-
// Disable this feature in each service
|
3502
|
-
customizeableFeatureServices.forEach((fs) => {
|
3503
|
-
const wkid = getProp(fs, "properties.service.spatialReference.wkid");
|
3504
|
-
// Remove customizing prefix if present
|
3505
|
-
if (wkid.toString().startsWith(customizingPrefix)) {
|
3506
|
-
setCreateProp(fs, "properties.service.spatialReference.wkid", wkid.toString().substring(customizingPrefix.length, wkid.length - 2));
|
3507
|
-
}
|
3508
|
-
});
|
3509
|
-
return undefined;
|
3510
|
-
}
|
3511
|
-
}
|
3512
|
-
/**
|
3513
|
-
* Splits a pathed filename into a last term and a prefix; e.g., "a/b/c" returns "c" with a prefix of "a/b".
|
3514
|
-
*
|
3515
|
-
* @param filename Filename with optional path
|
3516
|
-
*
|
3517
|
-
* @returns An object consisting of a `prefix` (undefined if `filename` does not contain a path) and a `suffix`--the
|
3518
|
-
* filename at the end of a path
|
3519
|
-
*
|
3520
|
-
* @protected
|
3521
|
-
*/
|
3522
|
-
_splitFilename(filename) {
|
3523
|
-
const filenameParts = filename.split("/");
|
3524
|
-
return {
|
3525
|
-
prefix: filenameParts.length > 1 ? filenameParts.slice(0, filenameParts.length - 1).join("/") : undefined,
|
3526
|
-
suffix: filenameParts[filenameParts.length - 1]
|
3527
|
-
};
|
3528
|
-
}
|
3529
|
-
}
|
3530
|
-
const state = SolutionStore.Store;
|
3531
|
-
|
3532
|
-
export { EFileType as E, getProp as g, state as s };
|
1836
|
+
export { EFileType as E, SolutionTemplateFormatVersion as S, jszip_min as j };
|