@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
@@ -5,10 +5,7 @@
|
|
5
5
|
*/
|
6
6
|
'use strict';
|
7
7
|
|
8
|
-
const index = require('./index-feeb7b6a.js');
|
9
|
-
const interfaces = require('./interfaces-000be6de.js');
|
10
8
|
const _commonjsHelpers = require('./_commonjsHelpers-384729db.js');
|
11
|
-
const cleanUrl = require('./clean-url-d5326abb.js');
|
12
9
|
|
13
10
|
/** @license
|
14
11
|
* Copyright 2018 Esri
|
@@ -65,263 +62,6 @@ var EItemProgressStatus;
|
|
65
62
|
})(EItemProgressStatus || (EItemProgressStatus = {}));
|
66
63
|
//#endregion ---------------------------------------------------------------------------------------------------------//
|
67
64
|
|
68
|
-
/* Copyright (c) 2018-2019 Environmental Systems Research Institute, Inc.
|
69
|
-
* Apache-2.0 */
|
70
|
-
/**
|
71
|
-
* Returns an array with arrays of the given size.
|
72
|
-
*
|
73
|
-
* @param arr Array to split
|
74
|
-
* @param size Size of every group
|
75
|
-
*/
|
76
|
-
function chunkArray(arr, size) {
|
77
|
-
const results = [];
|
78
|
-
let index = 0;
|
79
|
-
while (index < arr.length) {
|
80
|
-
results.push(arr.slice(index, index + size));
|
81
|
-
index += size;
|
82
|
-
}
|
83
|
-
return results;
|
84
|
-
}
|
85
|
-
|
86
|
-
/*! *****************************************************************************
|
87
|
-
Copyright (c) Microsoft Corporation.
|
88
|
-
|
89
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
90
|
-
purpose with or without fee is hereby granted.
|
91
|
-
|
92
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
93
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
94
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
95
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
96
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
97
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
98
|
-
PERFORMANCE OF THIS SOFTWARE.
|
99
|
-
***************************************************************************** */
|
100
|
-
|
101
|
-
var __assign = function() {
|
102
|
-
__assign = Object.assign || function __assign(t) {
|
103
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
104
|
-
s = arguments[i];
|
105
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
106
|
-
}
|
107
|
-
return t;
|
108
|
-
};
|
109
|
-
return __assign.apply(this, arguments);
|
110
|
-
};
|
111
|
-
|
112
|
-
/* Copyright (c) 2017 Environmental Systems Research Institute, Inc.
|
113
|
-
* Apache-2.0 */
|
114
|
-
/**
|
115
|
-
* Helper that returns the appropriate portal url for a given request. `requestOptions.portal` is given
|
116
|
-
* precedence over `authentication.portal`. If neither `portal` nor `authentication` is present,
|
117
|
-
* `www.arcgis.com/sharing/rest` is returned.
|
118
|
-
*
|
119
|
-
* @param requestOptions - Request options that may have authentication manager
|
120
|
-
* @returns Portal url to be used in API requests
|
121
|
-
*/
|
122
|
-
function getPortalUrl(requestOptions) {
|
123
|
-
if (requestOptions === void 0) { requestOptions = {}; }
|
124
|
-
// use portal in options if specified
|
125
|
-
if (requestOptions.portal) {
|
126
|
-
return cleanUrl.cleanUrl(requestOptions.portal);
|
127
|
-
}
|
128
|
-
// if auth was passed, use that portal
|
129
|
-
if (requestOptions.authentication) {
|
130
|
-
// the portal url is already scrubbed in the auth package
|
131
|
-
return requestOptions.authentication.portal;
|
132
|
-
}
|
133
|
-
// default to arcgis.com
|
134
|
-
return "https://www.arcgis.com/sharing/rest";
|
135
|
-
}
|
136
|
-
|
137
|
-
/* Copyright (c) 2017-2018 Environmental Systems Research Institute, Inc.
|
138
|
-
* Apache-2.0 */
|
139
|
-
/**
|
140
|
-
* Serialize an item and its data into a json format accepted by the Portal API for create and update operations
|
141
|
-
*
|
142
|
-
* @param item Item to be serialized
|
143
|
-
* @returns a formatted json object to be sent to Portal
|
144
|
-
*/
|
145
|
-
function serializeItem(item) {
|
146
|
-
// create a clone so we're not messing with the original
|
147
|
-
var clone = JSON.parse(JSON.stringify(item));
|
148
|
-
// binary data needs POSTed as a `file`
|
149
|
-
// JSON object literals should be passed as `text`.
|
150
|
-
if (clone.data) {
|
151
|
-
(typeof Blob !== "undefined" && item.data instanceof Blob) ||
|
152
|
-
// Node.js doesn't implement Blob
|
153
|
-
item.data.constructor.name === "ReadStream"
|
154
|
-
? (clone.file = item.data)
|
155
|
-
: (clone.text = item.data);
|
156
|
-
delete clone.data;
|
157
|
-
}
|
158
|
-
return clone;
|
159
|
-
}
|
160
|
-
/**
|
161
|
-
* `requestOptions.owner` is given priority, `requestOptions.item.owner` will be checked next. If neither are present, `authentication.getUserName()` will be used instead.
|
162
|
-
*/
|
163
|
-
function determineOwner(requestOptions) {
|
164
|
-
if (requestOptions.owner) {
|
165
|
-
return Promise.resolve(requestOptions.owner);
|
166
|
-
}
|
167
|
-
else if (requestOptions.item && requestOptions.item.owner) {
|
168
|
-
return Promise.resolve(requestOptions.item.owner);
|
169
|
-
}
|
170
|
-
else if (requestOptions.authentication &&
|
171
|
-
requestOptions.authentication.getUsername) {
|
172
|
-
return requestOptions.authentication.getUsername();
|
173
|
-
}
|
174
|
-
else {
|
175
|
-
return Promise.reject(new Error("Could not determine the owner of this item. Pass the `owner`, `item.owner`, or `authentication` option."));
|
176
|
-
}
|
177
|
-
}
|
178
|
-
/**
|
179
|
-
* checks if the extent is a valid BBox (2 element array of coordinate pair arrays)
|
180
|
-
* @param extent
|
181
|
-
* @returns
|
182
|
-
*/
|
183
|
-
function isBBox(extent) {
|
184
|
-
return (Array.isArray(extent) &&
|
185
|
-
Array.isArray(extent[0]) &&
|
186
|
-
Array.isArray(extent[1]));
|
187
|
-
}
|
188
|
-
/**
|
189
|
-
* Given a Bbox, convert it to a string. Some api endpoints expect a string
|
190
|
-
*
|
191
|
-
* @param {BBox} extent
|
192
|
-
* @return {*} {string}
|
193
|
-
*/
|
194
|
-
function bboxToString(extent) {
|
195
|
-
return extent.join(",");
|
196
|
-
}
|
197
|
-
|
198
|
-
/* Copyright (c) 2018 Environmental Systems Research Institute, Inc.
|
199
|
-
* Apache-2.0 */
|
200
|
-
/**
|
201
|
-
* ```js
|
202
|
-
* import { updateItem } from "@esri/arcgis-rest-portal";
|
203
|
-
* //
|
204
|
-
* updateItem({
|
205
|
-
* item: {
|
206
|
-
* id: "3ef",
|
207
|
-
* description: "A three hour tour"
|
208
|
-
* },
|
209
|
-
* authentication
|
210
|
-
* })
|
211
|
-
* .then(response)
|
212
|
-
* ```
|
213
|
-
* Update an Item. See the [REST Documentation](https://developers.arcgis.com/rest/users-groups-and-items/update-item.htm) for more information.
|
214
|
-
*
|
215
|
-
* @param requestOptions - Options for the request.
|
216
|
-
* @returns A Promise that updates an item.
|
217
|
-
*/
|
218
|
-
function updateItem$1(requestOptions) {
|
219
|
-
return determineOwner(requestOptions).then(function (owner) {
|
220
|
-
var url = requestOptions.folderId
|
221
|
-
? getPortalUrl(requestOptions) + "/content/users/" + owner + "/" + requestOptions.folderId + "/items/" + requestOptions.item.id + "/update"
|
222
|
-
: getPortalUrl(requestOptions) + "/content/users/" + owner + "/items/" + requestOptions.item.id + "/update";
|
223
|
-
// serialize the item into something Portal will accept
|
224
|
-
requestOptions.params = __assign(__assign({}, requestOptions.params), serializeItem(requestOptions.item));
|
225
|
-
// convert extent, if present, into a string from bbox
|
226
|
-
// processParams was previously doing this sort of work,
|
227
|
-
// however now we need to let array of arrays through
|
228
|
-
// Thus for extents we need to move this logic here
|
229
|
-
if (requestOptions.params.extent && isBBox(requestOptions.params.extent)) {
|
230
|
-
requestOptions.params.extent = bboxToString(requestOptions.params.extent);
|
231
|
-
}
|
232
|
-
return cleanUrl.request(url, requestOptions);
|
233
|
-
});
|
234
|
-
}
|
235
|
-
/**
|
236
|
-
* ```js
|
237
|
-
* import { updateItemResource } from "@esri/arcgis-rest-portal";
|
238
|
-
* //
|
239
|
-
* updateItemResource({
|
240
|
-
* id: '3ef',
|
241
|
-
* resource: file,
|
242
|
-
* name: 'bigkahuna.jpg',
|
243
|
-
* authentication
|
244
|
-
* })
|
245
|
-
* .then(response)
|
246
|
-
* ```
|
247
|
-
* 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.
|
248
|
-
*
|
249
|
-
* @param requestOptions - Options for the request
|
250
|
-
* @returns A Promise that updates an item resource.
|
251
|
-
*/
|
252
|
-
function updateItemResource(requestOptions) {
|
253
|
-
return determineOwner(requestOptions).then(function (owner) {
|
254
|
-
var url = getPortalUrl(requestOptions) + "/content/users/" + owner + "/items/" + requestOptions.id + "/updateResources";
|
255
|
-
// mix in user supplied params
|
256
|
-
requestOptions.params = __assign({ file: requestOptions.resource, fileName: requestOptions.name, resourcesPrefix: requestOptions.prefix, text: requestOptions.content }, requestOptions.params);
|
257
|
-
// only override the access specified previously if 'private' is passed explicitly
|
258
|
-
if (typeof requestOptions.private !== "undefined") {
|
259
|
-
requestOptions.params.access = requestOptions.private
|
260
|
-
? "private"
|
261
|
-
: "inherit";
|
262
|
-
}
|
263
|
-
return cleanUrl.request(url, requestOptions);
|
264
|
-
});
|
265
|
-
}
|
266
|
-
|
267
|
-
/* Copyright (c) 2018 Environmental Systems Research Institute, Inc.
|
268
|
-
* Apache-2.0 */
|
269
|
-
/**
|
270
|
-
* ```js
|
271
|
-
* import { addItemResource } from "@esri/arcgis-rest-portal";
|
272
|
-
* //
|
273
|
-
* // Add a file resource
|
274
|
-
* addItemResource({
|
275
|
-
* id: '3ef',
|
276
|
-
* resource: file,
|
277
|
-
* name: 'bigkahuna.jpg',
|
278
|
-
* authentication
|
279
|
-
* })
|
280
|
-
* .then(response)
|
281
|
-
* //
|
282
|
-
* // Add a text resource
|
283
|
-
* addItemResource({
|
284
|
-
* id: '4fg',
|
285
|
-
* content: "Text content",
|
286
|
-
* name: 'bigkahuna.txt',
|
287
|
-
* authentication
|
288
|
-
* })
|
289
|
-
* .then(response)
|
290
|
-
* ```
|
291
|
-
* 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.
|
292
|
-
*
|
293
|
-
* @param requestOptions - Options for the request
|
294
|
-
* @returns A Promise to add item resources.
|
295
|
-
*/
|
296
|
-
function addItemResource(requestOptions) {
|
297
|
-
return determineOwner(requestOptions).then(function (owner) {
|
298
|
-
var url = getPortalUrl(requestOptions) + "/content/users/" + owner + "/items/" + requestOptions.id + "/addResources";
|
299
|
-
requestOptions.params = __assign({ file: requestOptions.resource, fileName: requestOptions.name, resourcesPrefix: requestOptions.prefix, text: requestOptions.content, access: requestOptions.private ? "private" : "inherit" }, requestOptions.params);
|
300
|
-
return cleanUrl.request(url, requestOptions);
|
301
|
-
});
|
302
|
-
}
|
303
|
-
|
304
|
-
/* Copyright (c) 2018 Environmental Systems Research Institute, Inc.
|
305
|
-
* Apache-2.0 */
|
306
|
-
/**
|
307
|
-
* Remove a resource associated with an item
|
308
|
-
*
|
309
|
-
* @param requestOptions - Options for the request
|
310
|
-
* @returns A Promise that deletes an item resource.
|
311
|
-
*/
|
312
|
-
function removeItemResource(requestOptions) {
|
313
|
-
return determineOwner(requestOptions).then(function (owner) {
|
314
|
-
var url = getPortalUrl(requestOptions) + "/content/users/" + owner + "/items/" + requestOptions.id + "/removeResources";
|
315
|
-
// mix in user supplied params
|
316
|
-
requestOptions.params = __assign(__assign({}, requestOptions.params), { resource: requestOptions.resource });
|
317
|
-
// only override the deleteAll param specified previously if it is passed explicitly
|
318
|
-
if (typeof requestOptions.deleteAll !== "undefined") {
|
319
|
-
requestOptions.params.deleteAll = requestOptions.deleteAll;
|
320
|
-
}
|
321
|
-
return cleanUrl.request(url, requestOptions);
|
322
|
-
});
|
323
|
-
}
|
324
|
-
|
325
65
|
var jszip_min = _commonjsHelpers.createCommonjsModule(function (module, exports) {
|
326
66
|
/*!
|
327
67
|
|
@@ -2037,408 +1777,6 @@ var xss = FilterXSS;
|
|
2037
1777
|
}
|
2038
1778
|
} (lib$1, lib$1.exports));
|
2039
1779
|
|
2040
|
-
/** @license
|
2041
|
-
* Copyright 2020 Esri
|
2042
|
-
*
|
2043
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
2044
|
-
* you may not use this file except in compliance with the License.
|
2045
|
-
* You may obtain a copy of the License at
|
2046
|
-
*
|
2047
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
2048
|
-
*
|
2049
|
-
* Unless required by applicable law or agreed to in writing, software
|
2050
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
2051
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
2052
|
-
* See the License for the specific language governing permissions and
|
2053
|
-
* limitations under the License.
|
2054
|
-
*/
|
2055
|
-
/**
|
2056
|
-
* Supplies the File constructor for Microsoft Legacy Edge.
|
2057
|
-
*
|
2058
|
-
* @param fileBits Contents for file
|
2059
|
-
* @param fileName Name for file
|
2060
|
-
* @param options Bucket of options, euch as `type` for the MIME type; defaults to empty string for `type`
|
2061
|
-
* @returns File or, for Microsoft Legacy Edge, Blob
|
2062
|
-
* @see https://developer.mozilla.org/en-US/docs/Web/API/File/File
|
2063
|
-
* @see https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob
|
2064
|
-
*/
|
2065
|
-
function new_File(fileBits, fileName, options) {
|
2066
|
-
let file;
|
2067
|
-
try {
|
2068
|
-
// Modern browser
|
2069
|
-
file = new File(fileBits, fileName, options);
|
2070
|
-
}
|
2071
|
-
catch (error) {
|
2072
|
-
// Microsoft Legacy Edge
|
2073
|
-
/* istanbul ignore next */
|
2074
|
-
file = (function () {
|
2075
|
-
if (typeof options === "undefined") {
|
2076
|
-
// Microsoft Legacy Edge fails in karma if options is not defined
|
2077
|
-
options = {
|
2078
|
-
type: ""
|
2079
|
-
};
|
2080
|
-
}
|
2081
|
-
const blob = new Blob(fileBits, options);
|
2082
|
-
blob.lastModified = new Date();
|
2083
|
-
blob.name = fileName;
|
2084
|
-
return blob;
|
2085
|
-
})();
|
2086
|
-
}
|
2087
|
-
return file;
|
2088
|
-
}
|
2089
|
-
|
2090
|
-
/** @license
|
2091
|
-
* Copyright 2018 Esri
|
2092
|
-
*
|
2093
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
2094
|
-
* you may not use this file except in compliance with the License.
|
2095
|
-
* You may obtain a copy of the License at
|
2096
|
-
*
|
2097
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
2098
|
-
*
|
2099
|
-
* Unless required by applicable law or agreed to in writing, software
|
2100
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
2101
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
2102
|
-
* See the License for the specific language governing permissions and
|
2103
|
-
* limitations under the License.
|
2104
|
-
*/
|
2105
|
-
/**
|
2106
|
-
* Extracts JSON from a Blob.
|
2107
|
-
*
|
2108
|
-
* @param blob Blob to use as source
|
2109
|
-
* @returns A promise that will resolve with JSON or null
|
2110
|
-
*/
|
2111
|
-
function blobToJson(blob) {
|
2112
|
-
return new Promise(resolve => {
|
2113
|
-
blobToText(blob).then(blobContents => {
|
2114
|
-
try {
|
2115
|
-
resolve(JSON.parse(blobContents));
|
2116
|
-
}
|
2117
|
-
catch (err) {
|
2118
|
-
resolve(null);
|
2119
|
-
}
|
2120
|
-
}, () => resolve(null));
|
2121
|
-
});
|
2122
|
-
}
|
2123
|
-
/**
|
2124
|
-
* Converts a Blob to a File.
|
2125
|
-
*
|
2126
|
-
* @param blob Blob to use as source
|
2127
|
-
* @param filename Name to use for file
|
2128
|
-
* @param mimeType MIME type to override blob's MIME type
|
2129
|
-
* @returns File created out of Blob and filename
|
2130
|
-
*/
|
2131
|
-
function blobToFile(blob, filename, mimeType) {
|
2132
|
-
return blob
|
2133
|
-
? new_File([blob], filename ? filename : "", {
|
2134
|
-
type: mimeType || blob.type
|
2135
|
-
})
|
2136
|
-
: null;
|
2137
|
-
}
|
2138
|
-
/**
|
2139
|
-
* Extracts text from a Blob.
|
2140
|
-
*
|
2141
|
-
* @param blob Blob to use as source
|
2142
|
-
* @returns A promise that will resolve with text read from blob
|
2143
|
-
*/
|
2144
|
-
function blobToText(blob) {
|
2145
|
-
return new Promise(resolve => {
|
2146
|
-
const reader = new FileReader();
|
2147
|
-
reader.onload = function (evt) {
|
2148
|
-
// Disable needed because Node requires cast
|
2149
|
-
// tslint:disable-next-line: no-unnecessary-type-assertion
|
2150
|
-
const blobContents = evt.target.result;
|
2151
|
-
resolve(blobContents ? blobContents : ""); // not handling ArrayContents variant
|
2152
|
-
};
|
2153
|
-
reader.readAsText(blob);
|
2154
|
-
});
|
2155
|
-
}
|
2156
|
-
/**
|
2157
|
-
* Checks that a URL path ends with a slash.
|
2158
|
-
*
|
2159
|
-
* @param url URL to check
|
2160
|
-
* @returns URL, appended with slash if missing
|
2161
|
-
*/
|
2162
|
-
function checkUrlPathTermination(url) {
|
2163
|
-
return url ? (url.endsWith("/") ? url : url + "/") : url;
|
2164
|
-
}
|
2165
|
-
/**
|
2166
|
-
* Gets a property out of a deeply nested object.
|
2167
|
-
* Does not handle anything but nested object graph
|
2168
|
-
*
|
2169
|
-
* @param obj Object to retrieve value from
|
2170
|
-
* @param path Path into an object, e.g., "data.values.webmap", where "data" is a top-level property
|
2171
|
-
* in obj
|
2172
|
-
* @returns Value at end of path
|
2173
|
-
*/
|
2174
|
-
function getProp(obj, path) {
|
2175
|
-
return path.split(".").reduce(function (prev, curr) {
|
2176
|
-
/* istanbul ignore next no need to test undefined scenario */
|
2177
|
-
return prev ? prev[curr] : undefined;
|
2178
|
-
}, obj);
|
2179
|
-
}
|
2180
|
-
/**
|
2181
|
-
* Sets a deeply nested property of an object.
|
2182
|
-
* Creates the full path if it does not exist.
|
2183
|
-
*
|
2184
|
-
* @param obj Object to set value of
|
2185
|
-
* @param path Path into an object, e.g., "data.values.webmap", where "data" is a top-level property in obj
|
2186
|
-
* @param value The value to set at the end of the path
|
2187
|
-
*/
|
2188
|
-
function setCreateProp(obj, path, value) {
|
2189
|
-
const pathParts = path.split(".");
|
2190
|
-
pathParts.reduce((a, b, c) => {
|
2191
|
-
if (c === pathParts.length - 1) {
|
2192
|
-
a[b] = value;
|
2193
|
-
return value;
|
2194
|
-
}
|
2195
|
-
else {
|
2196
|
-
if (!a[b]) {
|
2197
|
-
a[b] = {};
|
2198
|
-
}
|
2199
|
-
return a[b];
|
2200
|
-
}
|
2201
|
-
}, obj);
|
2202
|
-
}
|
2203
|
-
|
2204
|
-
/**
|
2205
|
-
* Gets a Blob from a web site.
|
2206
|
-
*
|
2207
|
-
* @param url Address of Blob
|
2208
|
-
* @param authentication Credentials for the request
|
2209
|
-
* @param requestOptions - Options for the request, including parameters relevant to the endpoint.
|
2210
|
-
* @returns Promise that will resolve with Blob or an AGO-style JSON failure response
|
2211
|
-
*/
|
2212
|
-
function getBlob(url, authentication, requestOptions = {}) {
|
2213
|
-
if (!url) {
|
2214
|
-
return Promise.reject("Url must be provided");
|
2215
|
-
}
|
2216
|
-
const blobRequestOptions = {
|
2217
|
-
authentication: authentication,
|
2218
|
-
rawResponse: true,
|
2219
|
-
...requestOptions
|
2220
|
-
};
|
2221
|
-
return cleanUrl.request(url, blobRequestOptions).then(response => {
|
2222
|
-
return response.blob();
|
2223
|
-
});
|
2224
|
-
}
|
2225
|
-
|
2226
|
-
/** @license
|
2227
|
-
* Copyright 2018 Esri
|
2228
|
-
*
|
2229
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
2230
|
-
* you may not use this file except in compliance with the License.
|
2231
|
-
* You may obtain a copy of the License at
|
2232
|
-
*
|
2233
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
2234
|
-
*
|
2235
|
-
* Unless required by applicable law or agreed to in writing, software
|
2236
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
2237
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
2238
|
-
* See the License for the specific language governing permissions and
|
2239
|
-
* limitations under the License.
|
2240
|
-
*/
|
2241
|
-
// ------------------------------------------------------------------------------------------------------------------ //
|
2242
|
-
const ZIP_FILE_HEADER_SIGNATURE = "PK";
|
2243
|
-
/**
|
2244
|
-
* Gets a Blob from a web site and casts it as a file using the supplied name.
|
2245
|
-
*
|
2246
|
-
* @param url Address of Blob
|
2247
|
-
* @param filename Name to use for file
|
2248
|
-
* @param authentication Credentials for the request
|
2249
|
-
* @returns Promise that will resolve with a File, undefined if the Blob is null, or an AGO-style JSON failure response
|
2250
|
-
*/
|
2251
|
-
function getBlobAsFile(url, filename, authentication, ignoreErrors = [], mimeType) {
|
2252
|
-
return new Promise((resolve, reject) => {
|
2253
|
-
// Get the blob from the URL
|
2254
|
-
getBlobCheckForError(url, authentication, ignoreErrors).then(blob => !blob ? resolve(null) : resolve(blobToFile(blob, filename, mimeType)), reject);
|
2255
|
-
});
|
2256
|
-
}
|
2257
|
-
/**
|
2258
|
-
* Gets a Blob from a web site and checks for a JSON error packet in the Blob.
|
2259
|
-
*
|
2260
|
-
* @param url Address of Blob
|
2261
|
-
* @param authentication Credentials for the request
|
2262
|
-
* @param ignoreErrors List of HTTP error codes that should be ignored
|
2263
|
-
* @returns Promise that will resolve with Blob or an AGO-REST JSON failure response
|
2264
|
-
*/
|
2265
|
-
function getBlobCheckForError(url, authentication, ignoreErrors = []) {
|
2266
|
-
return new Promise((resolve, reject) => {
|
2267
|
-
// Get the blob from the URL
|
2268
|
-
getBlob(url, authentication).then(blob => {
|
2269
|
-
// Reclassify text/plain blobs as needed
|
2270
|
-
_fixTextBlobType(blob).then(adjustedBlob => {
|
2271
|
-
if (adjustedBlob.type === "application/json") {
|
2272
|
-
// Blob may be an error
|
2273
|
-
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
2274
|
-
blobToJson(adjustedBlob).then((json) => {
|
2275
|
-
// Check for valid JSON with an error
|
2276
|
-
if (json?.error) {
|
2277
|
-
const code = json.error.code;
|
2278
|
-
if (code !== undefined && ignoreErrors.indexOf(code) >= 0) {
|
2279
|
-
resolve(null); // Error, but ignored
|
2280
|
-
}
|
2281
|
-
else {
|
2282
|
-
reject(json); // Other error; fail with error
|
2283
|
-
}
|
2284
|
-
}
|
2285
|
-
else {
|
2286
|
-
resolve(adjustedBlob);
|
2287
|
-
}
|
2288
|
-
});
|
2289
|
-
}
|
2290
|
-
else {
|
2291
|
-
resolve(adjustedBlob);
|
2292
|
-
}
|
2293
|
-
}, reject);
|
2294
|
-
}, reject);
|
2295
|
-
});
|
2296
|
-
}
|
2297
|
-
/**
|
2298
|
-
* Gets the data information of an AGO item in its JSON form.
|
2299
|
-
*
|
2300
|
-
* @param itemId Id of an item whose data information is sought
|
2301
|
-
* @param filename Name to use for file
|
2302
|
-
* @param authentication Credentials for the request to AGO
|
2303
|
-
* @returns Promise that will resolve with JSON, or an AGO-style JSON failure response
|
2304
|
-
*/
|
2305
|
-
function getItemDataAsJson(itemId, authentication) {
|
2306
|
-
return new Promise(resolve => {
|
2307
|
-
getItemDataBlob(itemId, authentication).then(blob => resolve(blobToJson(blob)), () => resolve(null));
|
2308
|
-
});
|
2309
|
-
}
|
2310
|
-
/**
|
2311
|
-
* Gets the data information of an AGO item in its raw (Blob) form.
|
2312
|
-
*
|
2313
|
-
* @param itemId Id of an item whose data information is sought
|
2314
|
-
* @param authentication Credentials for the request to AGO
|
2315
|
-
* @returns A promise that will resolve with the data Blob or null if the item doesn't have a data section
|
2316
|
-
*/
|
2317
|
-
function getItemDataBlob(itemId, authentication) {
|
2318
|
-
return new Promise(resolve => {
|
2319
|
-
const url = getItemDataBlobUrl(itemId, authentication);
|
2320
|
-
getBlobCheckForError(url, authentication, [400, 500]).then(blob => resolve(_fixTextBlobType(blob)), () => resolve(null));
|
2321
|
-
});
|
2322
|
-
}
|
2323
|
-
/**
|
2324
|
-
* Gets the URL to the data information of an AGO item in its raw (Blob) form.
|
2325
|
-
*
|
2326
|
-
* @param itemId Id of an item whose data information is sought
|
2327
|
-
* @param authentication Credentials for the request to AGO
|
2328
|
-
* @returns URL string
|
2329
|
-
*/
|
2330
|
-
function getItemDataBlobUrl(itemId, authentication) {
|
2331
|
-
return `${getPortalSharingUrlFromAuth(authentication)}/content/items/${itemId}/data`;
|
2332
|
-
}
|
2333
|
-
/**
|
2334
|
-
* Extracts the portal sharing url from a supplied authentication.
|
2335
|
-
*
|
2336
|
-
* @param authentication Credentials for the request to AGO
|
2337
|
-
* @returns Portal sharing url to be used in API requests, defaulting to `https://www.arcgis.com/sharing/rest`
|
2338
|
-
*/
|
2339
|
-
function getPortalSharingUrlFromAuth(authentication) {
|
2340
|
-
// If auth was passed, use that portal
|
2341
|
-
return getProp(authentication, "portal") || "https://www.arcgis.com/sharing/rest";
|
2342
|
-
}
|
2343
|
-
function getThumbnailFile(url, filename, authentication) {
|
2344
|
-
return new Promise(resolve => {
|
2345
|
-
getBlobAsFile(url, filename, authentication, [500]).then(resolve, () => resolve(null));
|
2346
|
-
});
|
2347
|
-
}
|
2348
|
-
// ------------------------------------------------------------------------------------------------------------------ //
|
2349
|
-
/**
|
2350
|
-
* Fixes the types of Blobs incorrectly typed as text/plain.
|
2351
|
-
*
|
2352
|
-
* @param blob Blob to check
|
2353
|
-
* @returns Promise resolving to original Blob, unless it's originally typed as text/plain but is
|
2354
|
-
* really JSON, ZIP, or XML
|
2355
|
-
* @private
|
2356
|
-
*/
|
2357
|
-
function _fixTextBlobType(blob) {
|
2358
|
-
return new Promise((resolve, reject) => {
|
2359
|
-
if (blob &&
|
2360
|
-
blob.size > 0 &&
|
2361
|
-
(blob.type.startsWith("text/plain") ||
|
2362
|
-
blob.type.startsWith("application/json"))) {
|
2363
|
-
blobToText(blob).then(blobText => {
|
2364
|
-
// Convertible to JSON?
|
2365
|
-
try {
|
2366
|
-
JSON.parse(blobText);
|
2367
|
-
// Yes; reclassify as JSON
|
2368
|
-
resolve(new Blob([blob], { type: "application/json" }));
|
2369
|
-
}
|
2370
|
-
catch (ignored) {
|
2371
|
-
// Nope; test for ZIP file
|
2372
|
-
if (blobText.length > 4 &&
|
2373
|
-
blobText.substr(0, 4) === ZIP_FILE_HEADER_SIGNATURE) {
|
2374
|
-
// Yes; reclassify as ZIP
|
2375
|
-
resolve(new Blob([blob], { type: "application/zip" }));
|
2376
|
-
}
|
2377
|
-
else if (blobText.startsWith("<")) {
|
2378
|
-
// Reclassify as XML; since the blob started out as text/plain, it's more likely that is
|
2379
|
-
// meant to be human-readable, so we'll use text/xml instead of application/xml
|
2380
|
-
resolve(new Blob([blob], { type: "text/xml" }));
|
2381
|
-
}
|
2382
|
-
else {
|
2383
|
-
// Leave as text
|
2384
|
-
resolve(blob);
|
2385
|
-
}
|
2386
|
-
}
|
2387
|
-
},
|
2388
|
-
// Faulty blob
|
2389
|
-
reject);
|
2390
|
-
}
|
2391
|
-
else {
|
2392
|
-
// Empty or not typed as plain text, so simply return
|
2393
|
-
if (blob) {
|
2394
|
-
resolve(blob);
|
2395
|
-
}
|
2396
|
-
else {
|
2397
|
-
reject();
|
2398
|
-
}
|
2399
|
-
}
|
2400
|
-
});
|
2401
|
-
}
|
2402
|
-
|
2403
|
-
/** @license
|
2404
|
-
* Copyright 2018 Esri
|
2405
|
-
*
|
2406
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
2407
|
-
* you may not use this file except in compliance with the License.
|
2408
|
-
* You may obtain a copy of the License at
|
2409
|
-
*
|
2410
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
2411
|
-
*
|
2412
|
-
* Unless required by applicable law or agreed to in writing, software
|
2413
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
2414
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
2415
|
-
* See the License for the specific language governing permissions and
|
2416
|
-
* limitations under the License.
|
2417
|
-
*/
|
2418
|
-
/**
|
2419
|
-
* Updates an item.
|
2420
|
-
*
|
2421
|
-
* @param itemInfo The base info of an item; note that this content will be serialized, which doesn't work
|
2422
|
-
* for binary content
|
2423
|
-
* @param authentication Credentials for request
|
2424
|
-
* @param folderId Item's folder
|
2425
|
-
* @param additionalParams Updates that are put under the `params` property, which is not serialized
|
2426
|
-
* @return
|
2427
|
-
*/
|
2428
|
-
function updateItem(itemInfo, authentication, folderId, additionalParams) {
|
2429
|
-
return new Promise((resolve, reject) => {
|
2430
|
-
const updateOptions = {
|
2431
|
-
item: itemInfo,
|
2432
|
-
folderId: folderId,
|
2433
|
-
authentication: authentication,
|
2434
|
-
params: {
|
2435
|
-
...(additionalParams ?? {})
|
2436
|
-
}
|
2437
|
-
};
|
2438
|
-
updateItem$1(updateOptions).then(response => (response.success ? resolve(response) : reject(response)), err => reject(err));
|
2439
|
-
});
|
2440
|
-
}
|
2441
|
-
|
2442
1780
|
/** @license
|
2443
1781
|
* Copyright 2018 Esri
|
2444
1782
|
*
|
@@ -2497,1039 +1835,5 @@ var SolutionResourceType;
|
|
2497
1835
|
SolutionResourceType[SolutionResourceType["info"] = 5] = "info";
|
2498
1836
|
})(SolutionResourceType || (SolutionResourceType = {}));
|
2499
1837
|
|
2500
|
-
|
2501
|
-
|
2502
|
-
*
|
2503
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
2504
|
-
* you may not use this file except in compliance with the License.
|
2505
|
-
* You may obtain a copy of the License at
|
2506
|
-
*
|
2507
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
2508
|
-
*
|
2509
|
-
* Unless required by applicable law or agreed to in writing, software
|
2510
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
2511
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
2512
|
-
* See the License for the specific language governing permissions and
|
2513
|
-
* limitations under the License.
|
2514
|
-
*/
|
2515
|
-
/**
|
2516
|
-
* Extracts an item's resource folder and filename from the filename used to store a copy in a storage item.
|
2517
|
-
*
|
2518
|
-
* @param storageResourceFilename Filename used to store the resource, metadata, or thumbnail of an item
|
2519
|
-
* @param storageVersion Version of the Solution template
|
2520
|
-
* @returns Folder and filename for storing information in an item, as well as the type (resource, metadata,
|
2521
|
-
* or thumbnail) of the information; the folder property is only meaningful for the resource type
|
2522
|
-
* @see generateResourceStorageFilename
|
2523
|
-
* @see generateMetadataStorageFilename
|
2524
|
-
* @see generateThumbnailStorageFilename
|
2525
|
-
* @see convertItemResourceToStorageResource
|
2526
|
-
*/
|
2527
|
-
function convertStorageResourceToItemResource(storageResourceFilename, storageVersion = 0) {
|
2528
|
-
const nameParts = storageResourceFilename.split("/");
|
2529
|
-
let filename = nameParts.pop();
|
2530
|
-
let folder = "";
|
2531
|
-
const firstPrefixPart = nameParts.shift(); // undefined if there's no folder
|
2532
|
-
// Handle special "folders"
|
2533
|
-
let type = exports.EFileType.Resource;
|
2534
|
-
if (firstPrefixPart) {
|
2535
|
-
if (firstPrefixPart.endsWith("_info_thumbnail")) {
|
2536
|
-
type = exports.EFileType.Thumbnail;
|
2537
|
-
}
|
2538
|
-
else if (firstPrefixPart.endsWith("_info_metadata")) {
|
2539
|
-
type = exports.EFileType.Metadata;
|
2540
|
-
filename = "metadata.xml";
|
2541
|
-
}
|
2542
|
-
else if (firstPrefixPart.endsWith("_info_data")) {
|
2543
|
-
type = exports.EFileType.Data;
|
2544
|
-
}
|
2545
|
-
else if (firstPrefixPart.endsWith("_info_dataz")) {
|
2546
|
-
filename = filename.replace(/\.zip$/, "");
|
2547
|
-
type = exports.EFileType.Data;
|
2548
|
-
// Otherwise, strip off item id
|
2549
|
-
}
|
2550
|
-
else if (storageVersion < 1) {
|
2551
|
-
// Version 0
|
2552
|
-
const folderStart = firstPrefixPart.indexOf("_");
|
2553
|
-
if (folderStart > 0) {
|
2554
|
-
folder = firstPrefixPart.substr(folderStart + 1);
|
2555
|
-
}
|
2556
|
-
}
|
2557
|
-
else {
|
2558
|
-
// Version ≥ 1
|
2559
|
-
folder = nameParts.join("/"); // folder is optional, in which case this will be ""
|
2560
|
-
}
|
2561
|
-
}
|
2562
|
-
return { type, folder, filename };
|
2563
|
-
}
|
2564
|
-
|
2565
|
-
/** @license
|
2566
|
-
* Copyright 2021 Esri
|
2567
|
-
*
|
2568
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
2569
|
-
* you may not use this file except in compliance with the License.
|
2570
|
-
* You may obtain a copy of the License at
|
2571
|
-
*
|
2572
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
2573
|
-
*
|
2574
|
-
* Unless required by applicable law or agreed to in writing, software
|
2575
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
2576
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
2577
|
-
* See the License for the specific language governing permissions and
|
2578
|
-
* limitations under the License.
|
2579
|
-
*/
|
2580
|
-
// ------------------------------------------------------------------------------------------------------------------ //
|
2581
|
-
/**
|
2582
|
-
* Generates IAssociatedFileCopyResults object.
|
2583
|
-
*
|
2584
|
-
* @param fileInfo Info about item that was to be copied
|
2585
|
-
* @param fetchedFromSource Status of fetching item from source
|
2586
|
-
* @param copiedToDestination Status of copying item to destination
|
2587
|
-
* @returns IAssociatedFileCopyResults object
|
2588
|
-
*/
|
2589
|
-
function createCopyResults(fileInfo, fetchedFromSource, copiedToDestination) {
|
2590
|
-
return {
|
2591
|
-
...fileInfo,
|
2592
|
-
fetchedFromSource,
|
2593
|
-
copiedToDestination
|
2594
|
-
};
|
2595
|
-
}
|
2596
|
-
|
2597
|
-
/** @license
|
2598
|
-
* Copyright 2021 Esri
|
2599
|
-
*
|
2600
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
2601
|
-
* you may not use this file except in compliance with the License.
|
2602
|
-
* You may obtain a copy of the License at
|
2603
|
-
*
|
2604
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
2605
|
-
*
|
2606
|
-
* Unless required by applicable law or agreed to in writing, software
|
2607
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
2608
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
2609
|
-
* See the License for the specific language governing permissions and
|
2610
|
-
* limitations under the License.
|
2611
|
-
*/
|
2612
|
-
// ------------------------------------------------------------------------------------------------------------------ //
|
2613
|
-
/**
|
2614
|
-
* Copies a resource into a zipfile.
|
2615
|
-
*
|
2616
|
-
* @param file Information about the source and destination of the file such as its URL, folder, filename
|
2617
|
-
* @param zipInfo Information about a zipfile such as its name and its zip object
|
2618
|
-
* @returns The result of the copy
|
2619
|
-
*/
|
2620
|
-
function copyResourceIntoZip(file, zipInfo) {
|
2621
|
-
// Add it to the zip
|
2622
|
-
if (file.folder) {
|
2623
|
-
zipInfo.zip
|
2624
|
-
.folder(file.folder)
|
2625
|
-
.file(file.filename, file.file, { binary: true });
|
2626
|
-
}
|
2627
|
-
else {
|
2628
|
-
zipInfo.zip.file(file.filename, file.file, { binary: true });
|
2629
|
-
}
|
2630
|
-
zipInfo.filelist.push(file);
|
2631
|
-
return createCopyResults(file, true);
|
2632
|
-
}
|
2633
|
-
|
2634
|
-
/** @license
|
2635
|
-
* Copyright 2021 Esri
|
2636
|
-
*
|
2637
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
2638
|
-
* you may not use this file except in compliance with the License.
|
2639
|
-
* You may obtain a copy of the License at
|
2640
|
-
*
|
2641
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
2642
|
-
*
|
2643
|
-
* Unless required by applicable law or agreed to in writing, software
|
2644
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
2645
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
2646
|
-
* See the License for the specific language governing permissions and
|
2647
|
-
* limitations under the License.
|
2648
|
-
*/
|
2649
|
-
// ------------------------------------------------------------------------------------------------------------------ //
|
2650
|
-
/**
|
2651
|
-
* Copies a zipfile into an AGO item.
|
2652
|
-
*
|
2653
|
-
* @param zipInfo Information about a zipfile such as its name and its zip object
|
2654
|
-
* @param destinationItemId Id of item to receive copy of resource/metadata/thumbnail
|
2655
|
-
* @param destinationAuthentication Credentials for the request to the storage
|
2656
|
-
* @returns A promise which resolves to the result of the copy
|
2657
|
-
*/
|
2658
|
-
function copyZipIntoItem(zipInfo, destinationItemId, destinationAuthentication) {
|
2659
|
-
return new Promise(resolve => {
|
2660
|
-
zipInfo.zip
|
2661
|
-
.generateAsync({ type: "blob" })
|
2662
|
-
.then((content) => {
|
2663
|
-
return blobToFile(content, zipInfo.filename, "application/zip");
|
2664
|
-
})
|
2665
|
-
.then((zipfile) => {
|
2666
|
-
const addResourceOptions = {
|
2667
|
-
id: destinationItemId,
|
2668
|
-
resource: zipfile,
|
2669
|
-
authentication: destinationAuthentication,
|
2670
|
-
params: {
|
2671
|
-
archive: true
|
2672
|
-
}
|
2673
|
-
};
|
2674
|
-
return addItemResource(addResourceOptions);
|
2675
|
-
})
|
2676
|
-
.then(() => resolve(createCopyResults(zipInfo, true, true)), () => resolve(createCopyResults(zipInfo, true, false)) // unable to add resource
|
2677
|
-
);
|
2678
|
-
});
|
2679
|
-
}
|
2680
|
-
|
2681
|
-
/** @license
|
2682
|
-
* Copyright 2021 Esri
|
2683
|
-
*
|
2684
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
2685
|
-
* you may not use this file except in compliance with the License.
|
2686
|
-
* You may obtain a copy of the License at
|
2687
|
-
*
|
2688
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
2689
|
-
*
|
2690
|
-
* Unless required by applicable law or agreed to in writing, software
|
2691
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
2692
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
2693
|
-
* See the License for the specific language governing permissions and
|
2694
|
-
* limitations under the License.
|
2695
|
-
*/
|
2696
|
-
// ------------------------------------------------------------------------------------------------------------------ //
|
2697
|
-
/**
|
2698
|
-
* Copies the files for storing the resources, metadata, and thumbnail of an item or group to a storage item
|
2699
|
-
* with a specified path by collecting files into zip files.
|
2700
|
-
*
|
2701
|
-
* @param files List of item files' URLs and folder/filenames for storing the files
|
2702
|
-
* @param destinationItemId Id of item to receive copy of resource/metadata/thumbnail
|
2703
|
-
* @param destinationAuthentication Credentials for the request to the storage
|
2704
|
-
* @param filesPerZip Number of files to include per zip file; AGO limits zips to 50 files
|
2705
|
-
* @returns A promise which resolves to a list of the result of the copies
|
2706
|
-
*/
|
2707
|
-
function copyFilesAsResources(files, destinationItemId, destinationAuthentication, filesPerZip = 40) {
|
2708
|
-
return new Promise(resolve => {
|
2709
|
-
let awaitAllItems = [];
|
2710
|
-
const zipInfos = [];
|
2711
|
-
if (files.length > 0) {
|
2712
|
-
// Bundle the resources into chunked zip updates because AGO tends to have problems with
|
2713
|
-
// many updates in a row to the same item: it claims success despite randomly failing.
|
2714
|
-
// Note that AGO imposes a limit of 50 files per zip, so we break the list of resource
|
2715
|
-
// file info into chunks below this threshold and start a zip for each
|
2716
|
-
// https://developers.arcgis.com/rest/users-groups-and-items/add-resources.htm
|
2717
|
-
const chunkedResourceFiles = chunkArray(files, filesPerZip);
|
2718
|
-
chunkedResourceFiles.forEach((chunk, index) => {
|
2719
|
-
// Create a zip for this chunk
|
2720
|
-
const zipInfo = {
|
2721
|
-
filename: `resources${index}.zip`,
|
2722
|
-
zip: new jszip_min(),
|
2723
|
-
filelist: []
|
2724
|
-
};
|
2725
|
-
awaitAllItems = awaitAllItems.concat(chunk.map(file => copyResourceIntoZip(file, zipInfo)));
|
2726
|
-
zipInfos.push(zipInfo);
|
2727
|
-
});
|
2728
|
-
}
|
2729
|
-
if (awaitAllItems.length > 0) {
|
2730
|
-
// Wait until the Resource zip file(s) are prepared
|
2731
|
-
void Promise.all(awaitAllItems).then((results) => {
|
2732
|
-
// We have three types of results:
|
2733
|
-
// | fetchedFromSource | copiedToDestination | interpretation | |
|
2734
|
-
// +-------------------+---------------------+------------------------------------------------+
|
2735
|
-
// | false | * | could not fetch file from source |
|
2736
|
-
// | true | true | file has been fetched and sent to AGO |
|
2737
|
-
// | true | undefined | file has been fetched and will be sent via zip |
|
2738
|
-
// Filter out copiedToDestination===undefined; we'll get their status when we send their zip
|
2739
|
-
results = results.filter((result) => !(result.fetchedFromSource &&
|
2740
|
-
typeof result.copiedToDestination === "undefined"));
|
2741
|
-
// Now send the resources to AGO
|
2742
|
-
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
2743
|
-
_copyAssociatedFileZips(zipInfos, destinationItemId, destinationAuthentication).then((zipResults) => {
|
2744
|
-
resolve(results.concat(zipResults));
|
2745
|
-
});
|
2746
|
-
});
|
2747
|
-
}
|
2748
|
-
else {
|
2749
|
-
// No data, metadata, or resources to send; we're done
|
2750
|
-
resolve([]);
|
2751
|
-
}
|
2752
|
-
});
|
2753
|
-
}
|
2754
|
-
/**
|
2755
|
-
* Copies one or more zipfiles to a storage item.
|
2756
|
-
*
|
2757
|
-
* @param zipInfos List of zip files containing files to store
|
2758
|
-
* @param destinationItemId Id of item to receive copy of resource/metadata/thumbnail
|
2759
|
-
* @param destinationAuthentication Credentials for the request to the storage
|
2760
|
-
* @returns A promise which resolves to a list of the result of the copies
|
2761
|
-
* @private
|
2762
|
-
*/
|
2763
|
-
function _copyAssociatedFileZips(zipInfos, destinationItemId, destinationAuthentication) {
|
2764
|
-
return new Promise(resolve => {
|
2765
|
-
const results = [];
|
2766
|
-
// Filter out empty zips, which can happen when none of the files in the chunk going into a zip
|
2767
|
-
// can be fetched; e.g., the only file is metadata.xml, and the source item doesn't have metadata
|
2768
|
-
const nonEmptyZipInfos = zipInfos.filter((zipInfo) => Object.keys(zipInfo.zip.files).length > 0);
|
2769
|
-
if (nonEmptyZipInfos.length > 0) {
|
2770
|
-
// Send the zip(s) to AGO
|
2771
|
-
void _sendZipsSeriallyToItem(nonEmptyZipInfos, destinationItemId, destinationAuthentication).then((zipResults) => {
|
2772
|
-
resolve(zipResults);
|
2773
|
-
});
|
2774
|
-
}
|
2775
|
-
else {
|
2776
|
-
// No resources to send; we're done
|
2777
|
-
resolve(results);
|
2778
|
-
}
|
2779
|
-
});
|
2780
|
-
}
|
2781
|
-
/**
|
2782
|
-
* Copies one or more zipfiles to a storage item in a serial fashion, waiting a bit between sends.
|
2783
|
-
*
|
2784
|
-
* @param zipInfos List of zip files containing files to store
|
2785
|
-
* @param destinationItemId Id of item to receive copy of resource/metadata/thumbnail
|
2786
|
-
* @param destinationAuthentication Credentials for the request to the storage
|
2787
|
-
* @returns A promise which resolves to a list of the result of the copies
|
2788
|
-
*/
|
2789
|
-
function _sendZipsSeriallyToItem(zipInfos, destinationItemId, destinationAuthentication) {
|
2790
|
-
return new Promise(resolve => {
|
2791
|
-
let allResults = [];
|
2792
|
-
// Remove zip from bottom of list
|
2793
|
-
const zipInfoToSend = zipInfos.pop();
|
2794
|
-
// Send predecessors in list
|
2795
|
-
let sendOthersPromise = Promise.resolve([]);
|
2796
|
-
if (zipInfos.length > 0) {
|
2797
|
-
sendOthersPromise = _sendZipsSeriallyToItem(zipInfos, destinationItemId, destinationAuthentication);
|
2798
|
-
}
|
2799
|
-
void sendOthersPromise
|
2800
|
-
.then((response) => {
|
2801
|
-
allResults = response;
|
2802
|
-
// Stall a little to give AGO time to catch up
|
2803
|
-
return new Promise(resolveSleep => {
|
2804
|
-
setTimeout(() => resolveSleep(), 1000);
|
2805
|
-
});
|
2806
|
-
})
|
2807
|
-
.then(() => {
|
2808
|
-
// Now send the zip removed from bottom of the input list
|
2809
|
-
return copyZipIntoItem(zipInfoToSend, destinationItemId, destinationAuthentication);
|
2810
|
-
})
|
2811
|
-
.then((zipResult) => {
|
2812
|
-
// Save the result of copying this zip as a status for each of the files that it contains
|
2813
|
-
zipResult.filelist.forEach((fileInfo) => {
|
2814
|
-
allResults.push(createCopyResults(fileInfo, true, zipResult.copiedToDestination));
|
2815
|
-
});
|
2816
|
-
resolve(allResults);
|
2817
|
-
});
|
2818
|
-
});
|
2819
|
-
}
|
2820
|
-
|
2821
|
-
/** @license
|
2822
|
-
* Copyright 2018 Esri
|
2823
|
-
*
|
2824
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
2825
|
-
* you may not use this file except in compliance with the License.
|
2826
|
-
* You may obtain a copy of the License at
|
2827
|
-
*
|
2828
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
2829
|
-
*
|
2830
|
-
* Unless required by applicable law or agreed to in writing, software
|
2831
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
2832
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
2833
|
-
* See the License for the specific language governing permissions and
|
2834
|
-
* limitations under the License.
|
2835
|
-
*/
|
2836
|
-
/**
|
2837
|
-
* Copies the files for storing the resources, metadata, and thumbnail of an item or group to a storage item
|
2838
|
-
* with a specified path.
|
2839
|
-
*
|
2840
|
-
* @param files List of item files and paths for storing the files
|
2841
|
-
* @param storageItemId Id of item to receive copy of resource/metadata
|
2842
|
-
* @param storageAuthentication Credentials for the request to the storage
|
2843
|
-
* @returns A promise which resolves to a list of the filenames under which the resource/metadata are stored
|
2844
|
-
*/
|
2845
|
-
function copyFilesToStorageItem(files, storageItemId, storageAuthentication) {
|
2846
|
-
return new Promise(resolve => {
|
2847
|
-
// tslint:disable-next-line: no-floating-promises
|
2848
|
-
void copyFilesAsResources(files, storageItemId, storageAuthentication).then((results) => {
|
2849
|
-
resolve(results
|
2850
|
-
// Filter out failures
|
2851
|
-
.filter((result) => result.fetchedFromSource && result.copiedToDestination)
|
2852
|
-
// Return folder and filename in storage item's resources
|
2853
|
-
.map((result) => result.folder + "/" + result.filename));
|
2854
|
-
});
|
2855
|
-
});
|
2856
|
-
}
|
2857
|
-
/**
|
2858
|
-
* Generates the URL for reading an item's resource given the filename of the resource.
|
2859
|
-
*
|
2860
|
-
* @param sourcePortalSharingUrl Server/sharing
|
2861
|
-
* @param itemId Id of item
|
2862
|
-
* @param sourceResourceFilename Either filename or folder/filename to resource
|
2863
|
-
* @returns URL string
|
2864
|
-
*/
|
2865
|
-
function generateSourceResourceUrl(sourcePortalSharingUrl, itemId, sourceResourceFilename) {
|
2866
|
-
return (checkUrlPathTermination(sourcePortalSharingUrl) +
|
2867
|
-
"content/items/" +
|
2868
|
-
itemId +
|
2869
|
-
"/resources/" +
|
2870
|
-
sourceResourceFilename);
|
2871
|
-
}
|
2872
|
-
/**
|
2873
|
-
* Generates a list of full URLs and folder/filename combinations used to store the resources, metadata,
|
2874
|
-
* and thumbnail of an item.
|
2875
|
-
*
|
2876
|
-
* @param portalSharingUrl Server/sharing
|
2877
|
-
* @param storageItemId Id of storage item
|
2878
|
-
* @param resourceFilenames List of resource filenames for an item, e.g., ["file1", "myFolder/file2"]
|
2879
|
-
* @param storageVersion Version of the Solution template
|
2880
|
-
* @returns List of item files' URLs and folder/filenames for storing the files
|
2881
|
-
*/
|
2882
|
-
function generateStorageFilePaths(portalSharingUrl, storageItemId, resourceFilenames = [], storageVersion = 0) {
|
2883
|
-
return resourceFilenames.map(resourceFilename => {
|
2884
|
-
return {
|
2885
|
-
url: generateSourceResourceUrl(portalSharingUrl, storageItemId, resourceFilename),
|
2886
|
-
...convertStorageResourceToItemResource(resourceFilename, storageVersion)
|
2887
|
-
};
|
2888
|
-
});
|
2889
|
-
}
|
2890
|
-
function isSupportedFileType(filename) {
|
2891
|
-
// Supported file formats are: .json, .xml, .txt, .png, .pbf, .zip, .jpeg, .jpg, .gif, .bmp, .gz, .svg,
|
2892
|
-
// .svgz, .geodatabase (https://developers.arcgis.com/rest/users-groups-and-items/add-resources.htm)
|
2893
|
-
const filenameExtension = filename.match(/\.([a-z]+)$/i);
|
2894
|
-
const supportedExtensions = "|.json|.xml|.txt|.png|.pbf|.zip|.jpeg|.jpg|.gif|.bmp|.gz|.svg|.svgz|.geodatabase|";
|
2895
|
-
return (!!filenameExtension &&
|
2896
|
-
supportedExtensions.indexOf("|" + filenameExtension[0] + "|") >= 0);
|
2897
|
-
}
|
2898
|
-
/**
|
2899
|
-
* Gets the thumbnail of an item or group.
|
2900
|
-
*
|
2901
|
-
* @param authentication Credentials for the request to the storage
|
2902
|
-
* @param filePaths List of item files' URLs and folder/filenames for storing the files
|
2903
|
-
* @returns A promise which resolves to a boolean indicating if the copies were successful
|
2904
|
-
*/
|
2905
|
-
function getThumbnailFromStorageItem(authentication, filePaths) {
|
2906
|
-
let thumbnailUrl;
|
2907
|
-
let thumbnailFilename;
|
2908
|
-
filePaths.forEach(path => {
|
2909
|
-
if (path.type === exports.EFileType.Thumbnail) {
|
2910
|
-
thumbnailUrl = path.url;
|
2911
|
-
thumbnailFilename = path.filename;
|
2912
|
-
}
|
2913
|
-
});
|
2914
|
-
if (!thumbnailUrl) {
|
2915
|
-
return Promise.resolve(null);
|
2916
|
-
}
|
2917
|
-
return getThumbnailFile(thumbnailUrl, thumbnailFilename, authentication);
|
2918
|
-
}
|
2919
|
-
/**
|
2920
|
-
* Removes the item's resource that matches the filename with new content
|
2921
|
-
*
|
2922
|
-
* @param itemId Id of the item to remove
|
2923
|
-
* @param filename Name of the resource file to remove
|
2924
|
-
* @param authentication Credentials for the request to the storage
|
2925
|
-
* @returns A promise which resolves with a success true/false response
|
2926
|
-
*/
|
2927
|
-
function removeItemResourceFile(itemId, filename, authentication) {
|
2928
|
-
return removeItemResource({
|
2929
|
-
id: itemId,
|
2930
|
-
resource: filename,
|
2931
|
-
authentication: authentication
|
2932
|
-
});
|
2933
|
-
}
|
2934
|
-
/**
|
2935
|
-
* Updates the item's resource that matches the filename with new content
|
2936
|
-
*
|
2937
|
-
* @param itemId Id of the item to update
|
2938
|
-
* @param filename Name of the resource file to update; prefix optional (e.g., a/b/file.txt)
|
2939
|
-
* @param resource The new content to update the resource with
|
2940
|
-
* @param authentication Credentials for the request to the storage
|
2941
|
-
* @returns A promise which resolves with a success true/false response
|
2942
|
-
*/
|
2943
|
-
function updateItemResourceFile(itemId, filename, resource, authentication) {
|
2944
|
-
// Prefix has to be specified separately
|
2945
|
-
const prefixedFilenameParts = filename.split("/");
|
2946
|
-
const prefix = prefixedFilenameParts.length > 1 ? prefixedFilenameParts.slice(0, prefixedFilenameParts.length - 1).join("/") : undefined;
|
2947
|
-
const suffix = prefixedFilenameParts[prefixedFilenameParts.length - 1];
|
2948
|
-
return updateItemResource({
|
2949
|
-
id: itemId,
|
2950
|
-
prefix: prefix,
|
2951
|
-
name: suffix,
|
2952
|
-
resource,
|
2953
|
-
authentication: authentication
|
2954
|
-
});
|
2955
|
-
}
|
2956
|
-
|
2957
|
-
/** @license
|
2958
|
-
* Copyright 2022 Esri
|
2959
|
-
*
|
2960
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
2961
|
-
* you may not use this file except in compliance with the License.
|
2962
|
-
* You may obtain a copy of the License at
|
2963
|
-
*
|
2964
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
2965
|
-
*
|
2966
|
-
* Unless required by applicable law or agreed to in writing, software
|
2967
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
2968
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
2969
|
-
* See the License for the specific language governing permissions and
|
2970
|
-
* limitations under the License.
|
2971
|
-
*/
|
2972
|
-
const EmptySolutionStore = {
|
2973
|
-
solutionItemId: "",
|
2974
|
-
defaultWkid: undefined,
|
2975
|
-
solutionData: { metadata: {}, templates: [] },
|
2976
|
-
templateEdits: {},
|
2977
|
-
featureServices: [],
|
2978
|
-
spatialReferenceInfo: {
|
2979
|
-
enabled: false,
|
2980
|
-
services: {},
|
2981
|
-
spatialReference: undefined
|
2982
|
-
}
|
2983
|
-
};
|
2984
|
-
class SolutionStore {
|
2985
|
-
/**
|
2986
|
-
* Creates singleton instance when accessed; default export from module.
|
2987
|
-
*
|
2988
|
-
* @returns Static instance of the class
|
2989
|
-
*/
|
2990
|
-
static get Store() {
|
2991
|
-
return this._instance || (this._instance = new this());
|
2992
|
-
}
|
2993
|
-
/**
|
2994
|
-
* Creates an empty store.
|
2995
|
-
*
|
2996
|
-
* @protected
|
2997
|
-
*/
|
2998
|
-
constructor() {
|
2999
|
-
this._hasChanges = false;
|
3000
|
-
this._store = index.createStore(Object.assign({}, EmptySolutionStore));
|
3001
|
-
}
|
3002
|
-
/**
|
3003
|
-
* Returns the stored information of an item.
|
3004
|
-
*
|
3005
|
-
* @param itemId Id of item to fetch
|
3006
|
-
*
|
3007
|
-
* @returns Item information or `undefined` if not found
|
3008
|
-
*/
|
3009
|
-
getItemInfo(itemId) {
|
3010
|
-
const templates = this._store.get("solutionData").templates;
|
3011
|
-
let template;
|
3012
|
-
templates.some((t) => {
|
3013
|
-
if (itemId == t.itemId) {
|
3014
|
-
template = t;
|
3015
|
-
return true;
|
3016
|
-
}
|
3017
|
-
return false;
|
3018
|
-
});
|
3019
|
-
return template;
|
3020
|
-
}
|
3021
|
-
/**
|
3022
|
-
* Returns a top-level store property: solutionItemId, defaultWkid, etc.
|
3023
|
-
*
|
3024
|
-
* @param propName Name of property
|
3025
|
-
*
|
3026
|
-
* @returns Value of property
|
3027
|
-
*/
|
3028
|
-
getStoreInfo(propName) {
|
3029
|
-
return this._store.get(propName);
|
3030
|
-
}
|
3031
|
-
/**
|
3032
|
-
* Loads a Solution into the store from AGO.
|
3033
|
-
*
|
3034
|
-
* @param solutionItemId Id of the solution represented in the store
|
3035
|
-
* @param authentication Credentials for fetching information to be loaded into the store
|
3036
|
-
*
|
3037
|
-
* @returns Promise that resolves when task is done
|
3038
|
-
*/
|
3039
|
-
async loadSolution(solutionItemId, authentication) {
|
3040
|
-
this._authentication = authentication;
|
3041
|
-
const solutionData = await getItemDataAsJson(solutionItemId, authentication);
|
3042
|
-
if (solutionData) {
|
3043
|
-
const defaultWkid = getProp(solutionData, "params.wkid.default");
|
3044
|
-
await this._prepareSolutionItemsForEditing(solutionItemId, solutionData.templates, authentication);
|
3045
|
-
const featureServices = this._getFeatureServices(solutionData.templates);
|
3046
|
-
const spatialReferenceInfo = this._getSpatialReferenceInfo(featureServices, defaultWkid);
|
3047
|
-
this._store.set("solutionItemId", solutionItemId);
|
3048
|
-
this._store.set("defaultWkid", defaultWkid);
|
3049
|
-
this._store.set("solutionData", solutionData);
|
3050
|
-
this._store.set("featureServices", featureServices);
|
3051
|
-
this._store.set("spatialReferenceInfo", spatialReferenceInfo);
|
3052
|
-
}
|
3053
|
-
this._flagStoreHasChanges(false);
|
3054
|
-
}
|
3055
|
-
/**
|
3056
|
-
* Queues the replacement of the thumbnail associated with a template item in the store.
|
3057
|
-
*
|
3058
|
-
* @param itemEdit Details of the template to modify, containing the new thumbnail in the `thumbnail`
|
3059
|
-
* property
|
3060
|
-
*/
|
3061
|
-
replaceItemThumbnail(itemEdit) {
|
3062
|
-
// Flag the current thumbnail and any replacements for removal
|
3063
|
-
itemEdit.resourceFilePaths.forEach((path) => {
|
3064
|
-
if (path.type === exports.EFileType.Thumbnail) {
|
3065
|
-
if (path.updateType === interfaces.EUpdateType.None) {
|
3066
|
-
// Existing thumbnail not yet flagged for removal
|
3067
|
-
path.updateType = interfaces.EUpdateType.Remove;
|
3068
|
-
}
|
3069
|
-
else if (path.updateType === interfaces.EUpdateType.Add || path.updateType === interfaces.EUpdateType.Update) {
|
3070
|
-
// An earlier replacement
|
3071
|
-
path.updateType = interfaces.EUpdateType.Obsolete;
|
3072
|
-
}
|
3073
|
-
}
|
3074
|
-
});
|
3075
|
-
// Remove any replacements already queued
|
3076
|
-
itemEdit.resourceFilePaths =
|
3077
|
-
itemEdit.resourceFilePaths.filter((path) => path.updateType != interfaces.EUpdateType.Obsolete);
|
3078
|
-
// Add the new thumbnail to the store item
|
3079
|
-
itemEdit.resourceFilePaths.push({
|
3080
|
-
blob: itemEdit.thumbnail,
|
3081
|
-
filename: itemEdit.thumbnail.name,
|
3082
|
-
type: exports.EFileType.Thumbnail,
|
3083
|
-
updateType: interfaces.EUpdateType.Add
|
3084
|
-
});
|
3085
|
-
// Update the store
|
3086
|
-
this.setItemInfo(itemEdit);
|
3087
|
-
}
|
3088
|
-
/**
|
3089
|
-
* Writes a Solution into AGO from the store. Must use `loadSolution` to continue with solution.
|
3090
|
-
*
|
3091
|
-
* @returns Promise that resolves when task is done
|
3092
|
-
*/
|
3093
|
-
async saveSolution() {
|
3094
|
-
// Update the templates in the original solution item data
|
3095
|
-
const solutionItemId = this._store.get("solutionItemId");
|
3096
|
-
const solutionData = this._store.get("solutionData");
|
3097
|
-
const spatialReferenceInfo = this._store.get("spatialReferenceInfo");
|
3098
|
-
await this._prepareSolutionItemsForStorage(solutionItemId, solutionData.templates, this._authentication);
|
3099
|
-
const updatedDefaultWkid = this._setSpatialReferenceInfo(spatialReferenceInfo, solutionData.templates);
|
3100
|
-
if (updatedDefaultWkid) {
|
3101
|
-
setCreateProp(solutionData, "params.wkid", {
|
3102
|
-
"label": "Spatial Reference",
|
3103
|
-
"default": updatedDefaultWkid,
|
3104
|
-
"valueType": "spatialReference",
|
3105
|
-
"attributes": {
|
3106
|
-
"required": "true"
|
3107
|
-
}
|
3108
|
-
});
|
3109
|
-
}
|
3110
|
-
else {
|
3111
|
-
setCreateProp(solutionData, "params.wkid", {});
|
3112
|
-
}
|
3113
|
-
const itemInfo = {
|
3114
|
-
id: solutionItemId,
|
3115
|
-
text: solutionData
|
3116
|
-
};
|
3117
|
-
await updateItem(itemInfo, this._authentication);
|
3118
|
-
}
|
3119
|
-
/**
|
3120
|
-
* Stores information for item.
|
3121
|
-
*
|
3122
|
-
* @param itemEdit Item information
|
3123
|
-
*/
|
3124
|
-
setItemInfo(itemEdit) {
|
3125
|
-
const solutionData = this._store.get("solutionData");
|
3126
|
-
const templates = solutionData.templates;
|
3127
|
-
templates.some((t) => {
|
3128
|
-
if (itemEdit.itemId == t.itemId) {
|
3129
|
-
t = itemEdit;
|
3130
|
-
this._store.set("solutionData", solutionData);
|
3131
|
-
this._flagStoreHasChanges(true);
|
3132
|
-
return true;
|
3133
|
-
}
|
3134
|
-
return false;
|
3135
|
-
});
|
3136
|
-
}
|
3137
|
-
/**
|
3138
|
-
* Sets a top-level store property: solutionItemId, defaultWkid, etc.
|
3139
|
-
*
|
3140
|
-
* @param propName Name of property
|
3141
|
-
* @param value Value of property
|
3142
|
-
*/
|
3143
|
-
setStoreInfo(propName, value) {
|
3144
|
-
this._store.set(propName, value);
|
3145
|
-
this._flagStoreHasChanges(true);
|
3146
|
-
}
|
3147
|
-
//------------------------------------------------------------------------------------------------------------------//
|
3148
|
-
/** Provides access to protected methods for unit testing.
|
3149
|
-
*
|
3150
|
-
* @param methodName Name of protected method to run
|
3151
|
-
* @param arg1 First argument to forward to method, e.g., for "_prepareSolutionItemsForEditing", `solutionItemId`
|
3152
|
-
* @param arg2 Second argument to forward to method, e.g., for "_prepareSolutionItemsForEditing", `templates`
|
3153
|
-
* @param arg3 Third argument to forward to method, e.g., for "_prepareSolutionItemsForEditing", `authentication`
|
3154
|
-
*
|
3155
|
-
* @returns
|
3156
|
-
*/
|
3157
|
-
_testAccess(methodName, arg1, arg2, arg3) {
|
3158
|
-
switch (methodName) {
|
3159
|
-
case "_emptyTheStore":
|
3160
|
-
this._emptyTheStore();
|
3161
|
-
break;
|
3162
|
-
case "_getFeatureServices":
|
3163
|
-
return this._getFeatureServices(arg1);
|
3164
|
-
case "_getItemsSharedWithThisGroup":
|
3165
|
-
return this._getItemsSharedWithThisGroup(arg1, arg2);
|
3166
|
-
case "_getResourceFilePaths":
|
3167
|
-
return this._getResourceFilePaths(arg1, arg2, arg3);
|
3168
|
-
case "_getResourceStorageName":
|
3169
|
-
return this._getResourceStorageName(arg1, arg2);
|
3170
|
-
case "_getSpatialReferenceInfo":
|
3171
|
-
return this._getSpatialReferenceInfo(arg1, arg2);
|
3172
|
-
case "_prepareSolutionItemsForEditing":
|
3173
|
-
return this._prepareSolutionItemsForEditing(arg1, arg2, arg3);
|
3174
|
-
case "_prepareSolutionItemsForStorage":
|
3175
|
-
return this._prepareSolutionItemsForStorage(arg1, arg2, arg3);
|
3176
|
-
case "_setSpatialReferenceInfo":
|
3177
|
-
return this._setSpatialReferenceInfo(arg1, arg2);
|
3178
|
-
case "_splitFilename":
|
3179
|
-
return this._splitFilename(arg1);
|
3180
|
-
}
|
3181
|
-
return null;
|
3182
|
-
}
|
3183
|
-
/**
|
3184
|
-
* Returns the store to the empty state.
|
3185
|
-
*
|
3186
|
-
* @protected
|
3187
|
-
*/
|
3188
|
-
_emptyTheStore() {
|
3189
|
-
this._store.set("solutionItemId", EmptySolutionStore.solutionItemId);
|
3190
|
-
this._store.set("defaultWkid", EmptySolutionStore.defaultWkid);
|
3191
|
-
this._store.set("solutionData", EmptySolutionStore.solutionData);
|
3192
|
-
this._store.set("templateEdits", EmptySolutionStore.templateEdits);
|
3193
|
-
this._store.set("featureServices", EmptySolutionStore.featureServices);
|
3194
|
-
this._store.set("spatialReferenceInfo", EmptySolutionStore.spatialReferenceInfo);
|
3195
|
-
}
|
3196
|
-
/**
|
3197
|
-
* Sets the store's flag indicating if it has changes and dispatches an event when
|
3198
|
-
* the flag value changes.
|
3199
|
-
*
|
3200
|
-
* @param flagHasChanges Current state of change in the store; if it doesn't match the value saved in this
|
3201
|
-
* object, an event is dispatched with the new value and the saved value is updated
|
3202
|
-
*
|
3203
|
-
* @protected
|
3204
|
-
*/
|
3205
|
-
_flagStoreHasChanges(flagHasChanges) {
|
3206
|
-
// Event for notifying if the store has changes or not
|
3207
|
-
if (this._hasChanges !== flagHasChanges) {
|
3208
|
-
window.dispatchEvent(new CustomEvent("solutionStoreHasChanges", {
|
3209
|
-
detail: flagHasChanges,
|
3210
|
-
bubbles: true,
|
3211
|
-
cancelable: false,
|
3212
|
-
composed: true
|
3213
|
-
}));
|
3214
|
-
}
|
3215
|
-
this._hasChanges = flagHasChanges;
|
3216
|
-
}
|
3217
|
-
/**
|
3218
|
-
* Gets a list of Feature Services that are not views.
|
3219
|
-
*
|
3220
|
-
* @param templates A list of item templates from the solution
|
3221
|
-
*
|
3222
|
-
* @returns a list of feature services
|
3223
|
-
*
|
3224
|
-
* @protected
|
3225
|
-
*/
|
3226
|
-
_getCustomizableFeatureServices(templates) {
|
3227
|
-
return templates.reduce((prev, cur) => {
|
3228
|
-
if (cur.type === "Feature Service" && cur.item.typeKeywords.indexOf("View Service") < 0) {
|
3229
|
-
prev.push(cur);
|
3230
|
-
}
|
3231
|
-
return prev;
|
3232
|
-
}, []);
|
3233
|
-
}
|
3234
|
-
/**
|
3235
|
-
* Gets a list of Feature Services that are not views along with an enabled property that indicates
|
3236
|
-
* if the service currently uses a spatial reference variable.
|
3237
|
-
*
|
3238
|
-
* @param templates A list of item templates from the solution
|
3239
|
-
*
|
3240
|
-
* @returns a list of feature service names and an enabled property to indicate
|
3241
|
-
* if they currently use a spatial reference variable.
|
3242
|
-
*
|
3243
|
-
* @protected
|
3244
|
-
*/
|
3245
|
-
_getFeatureServices(templates) {
|
3246
|
-
const customizeableFeatureServices = this._getCustomizableFeatureServices(templates);
|
3247
|
-
return customizeableFeatureServices.map((fs) => {
|
3248
|
-
const name = fs.item.title || fs.item.name;
|
3249
|
-
const wkid = getProp(fs, "properties.service.spatialReference.wkid");
|
3250
|
-
return { name, enabled: wkid.toString().startsWith("{{params.wkid||") };
|
3251
|
-
});
|
3252
|
-
}
|
3253
|
-
/**
|
3254
|
-
* Capture the key item details for a given group template
|
3255
|
-
*
|
3256
|
-
* @param template one of the templates from the current solution
|
3257
|
-
* @param templates full list of templates
|
3258
|
-
*
|
3259
|
-
* @returns a list of IItemShare objects
|
3260
|
-
*
|
3261
|
-
* @protected
|
3262
|
-
*/
|
3263
|
-
_getItemsSharedWithThisGroup(template, templates) {
|
3264
|
-
return templates.reduce((prev, cur) => {
|
3265
|
-
if (cur.itemId !== template.itemId && cur.type !== "Group") {
|
3266
|
-
prev.push({
|
3267
|
-
id: cur.itemId,
|
3268
|
-
title: cur.item.name || cur.item.title,
|
3269
|
-
isShared: (cur.groups || []).indexOf(template.itemId) > -1,
|
3270
|
-
shareItem: (cur.groups || []).indexOf(template.itemId) > -1,
|
3271
|
-
type: cur.type,
|
3272
|
-
typeKeywords: cur.item.typeKeywords
|
3273
|
-
});
|
3274
|
-
}
|
3275
|
-
return prev;
|
3276
|
-
}, []);
|
3277
|
-
}
|
3278
|
-
/**
|
3279
|
-
* Generate storage file paths from the solution template
|
3280
|
-
*
|
3281
|
-
* @param solutionId the id of the current solution
|
3282
|
-
* @param template the current template from the solution
|
3283
|
-
* @param portal Portal where file is to be found
|
3284
|
-
*
|
3285
|
-
* @returns a list of resource file infos
|
3286
|
-
*
|
3287
|
-
* @protected
|
3288
|
-
*/
|
3289
|
-
_getResourceFilePaths(solutionId, template, portal) {
|
3290
|
-
const resourceFilePaths = generateStorageFilePaths(portal, solutionId, template.resources, SolutionTemplateFormatVersion);
|
3291
|
-
return resourceFilePaths.map((fp) => {
|
3292
|
-
fp.updateType = interfaces.EUpdateType.None;
|
3293
|
-
return fp;
|
3294
|
-
});
|
3295
|
-
}
|
3296
|
-
/**
|
3297
|
-
* Generates a resource name from a storage file path.
|
3298
|
-
*
|
3299
|
-
* @param templateItemId The id of the template item whose resource this is; used as a prefix in the resource name
|
3300
|
-
* @param resourcePath Resource file infos
|
3301
|
-
*
|
3302
|
-
* @returns The resource name to use when attaching a resource to the item.
|
3303
|
-
*
|
3304
|
-
* @protected
|
3305
|
-
*/
|
3306
|
-
_getResourceStorageName(templateItemId, resourcePath) {
|
3307
|
-
/* Converts
|
3308
|
-
{
|
3309
|
-
"url": "https://myorg.maps.arcgis.com/sharing/rest/content/items/ca924c6db7d247b9a31fa30532fb5913/resources/79036430a6274e17ae915d0278b8569c_info_metadata/metadata.xml",
|
3310
|
-
"type": 2,
|
3311
|
-
"folder": "",
|
3312
|
-
"filename": "metadata.xml",
|
3313
|
-
"updateType": 3
|
3314
|
-
}
|
3315
|
-
to
|
3316
|
-
ca924c6db7d247b9a31fa30532fb5913_info_metadata/metadata.xml
|
3317
|
-
*/
|
3318
|
-
let prefix = templateItemId;
|
3319
|
-
switch (resourcePath.type) {
|
3320
|
-
case exports.EFileType.Data:
|
3321
|
-
prefix = `${prefix}_info_data`;
|
3322
|
-
break;
|
3323
|
-
case exports.EFileType.Info:
|
3324
|
-
prefix = `${prefix}_info`;
|
3325
|
-
break;
|
3326
|
-
case exports.EFileType.Metadata:
|
3327
|
-
prefix = `${prefix}_info_metadata`;
|
3328
|
-
break;
|
3329
|
-
case exports.EFileType.Resource:
|
3330
|
-
break;
|
3331
|
-
case exports.EFileType.Thumbnail:
|
3332
|
-
prefix = `${prefix}_info_thumbnail`;
|
3333
|
-
break;
|
3334
|
-
}
|
3335
|
-
let filenameToUse = resourcePath.filename;
|
3336
|
-
if (resourcePath.type == exports.EFileType.Data && filenameToUse && !isSupportedFileType(filenameToUse)) {
|
3337
|
-
filenameToUse = filenameToUse + ".zip";
|
3338
|
-
prefix += "z";
|
3339
|
-
}
|
3340
|
-
const filename = resourcePath.folder ? resourcePath.folder + "/" + filenameToUse : filenameToUse;
|
3341
|
-
return prefix + "/" + filename;
|
3342
|
-
}
|
3343
|
-
/**
|
3344
|
-
* Extracts basic spatial reference information that is used to determine if a custom spatial reference parameter will
|
3345
|
-
* be exposed while deploying this solution and if so what feature services will support it and what will the default wkid be
|
3346
|
-
*
|
3347
|
-
* @param services a list of objects with service name and enabled property (indicates if they currently use a spatial reference var)
|
3348
|
-
* @param data the data object of a solution item
|
3349
|
-
*
|
3350
|
-
* @returns an object that stores if a custom spatial reference parameter is enabled/disabled,
|
3351
|
-
* a list of services and if they are enabled/disabled, and the default wkid
|
3352
|
-
*
|
3353
|
-
* @protected
|
3354
|
-
*/
|
3355
|
-
_getSpatialReferenceInfo(services, defaultWkid) {
|
3356
|
-
const defaultServices = {};
|
3357
|
-
services.forEach(service => {
|
3358
|
-
defaultServices[service.name] = service.enabled;
|
3359
|
-
});
|
3360
|
-
return {
|
3361
|
-
enabled: defaultWkid !== undefined,
|
3362
|
-
services: defaultServices,
|
3363
|
-
spatialReference: defaultWkid ? defaultWkid : undefined
|
3364
|
-
};
|
3365
|
-
}
|
3366
|
-
/**
|
3367
|
-
* Create and store template items for the editor.
|
3368
|
-
*
|
3369
|
-
* @param solutionItemId Id of the solution represented in the store
|
3370
|
-
* @param templates A list of item templates from the solution
|
3371
|
-
* @param authentication Credentials for fetching information to be loaded into the store
|
3372
|
-
*
|
3373
|
-
* @returns a promise that resolves when the templates are ready
|
3374
|
-
*
|
3375
|
-
* @protected
|
3376
|
-
*/
|
3377
|
-
async _prepareSolutionItemsForEditing(solutionItemId, templates, authentication) {
|
3378
|
-
const thumbnailPromises = [];
|
3379
|
-
// Augment the template with paths to resources and group information, if relevant
|
3380
|
-
templates.forEach((t) => {
|
3381
|
-
t.resourceFilePaths = this._getResourceFilePaths(solutionItemId, t, authentication.portal);
|
3382
|
-
thumbnailPromises.push(t.resourceFilePaths.length > 0 ?
|
3383
|
-
getThumbnailFromStorageItem(authentication, t.resourceFilePaths) :
|
3384
|
-
Promise.resolve());
|
3385
|
-
t.groupDetails = t.type === "Group" ? this._getItemsSharedWithThisGroup(t, templates) : [];
|
3386
|
-
});
|
3387
|
-
// Augment the template with its thumbnail file
|
3388
|
-
const thumbnails = await Promise.all(thumbnailPromises);
|
3389
|
-
templates.forEach((t, i) => {
|
3390
|
-
t.thumbnail = thumbnails[i] ? thumbnails[i] : undefined;
|
3391
|
-
});
|
3392
|
-
return Promise.resolve();
|
3393
|
-
}
|
3394
|
-
/**
|
3395
|
-
* Prepares template items for sending to AGO by updating the resources held by the solution item.
|
3396
|
-
*
|
3397
|
-
* @param solutionItemId Id of the solution represented in the store
|
3398
|
-
* @param templates A list of item templates from the solution
|
3399
|
-
* @param authentication Credentials for fetching information to be loaded into the store
|
3400
|
-
*
|
3401
|
-
* @returns a promise that resolves when the templates are ready
|
3402
|
-
*
|
3403
|
-
* @protected
|
3404
|
-
*/
|
3405
|
-
async _prepareSolutionItemsForStorage(solutionItemId, templates, authentication) {
|
3406
|
-
const resourceAdds = [];
|
3407
|
-
// Update the resources and remove the augmentation from a template
|
3408
|
-
const pendingTasks = [];
|
3409
|
-
templates.forEach((t) => {
|
3410
|
-
// Run through the resourceFilePaths for the item seeking modifications to be made to the solution item's
|
3411
|
-
// collection of resources; queue them for batching
|
3412
|
-
// eslint-disable-next-line @typescript-eslint/no-misused-promises
|
3413
|
-
t.resourceFilePaths.forEach(async (path) => {
|
3414
|
-
const storageName = this._getResourceStorageName(t.itemId, path);
|
3415
|
-
switch (path.updateType) {
|
3416
|
-
case interfaces.EUpdateType.Add:
|
3417
|
-
const { prefix, suffix } = this._splitFilename(storageName);
|
3418
|
-
t.resources.push(storageName);
|
3419
|
-
resourceAdds.push({
|
3420
|
-
itemId: t.itemId,
|
3421
|
-
file: path.blob,
|
3422
|
-
folder: prefix,
|
3423
|
-
filename: suffix
|
3424
|
-
});
|
3425
|
-
break;
|
3426
|
-
case interfaces.EUpdateType.Update:
|
3427
|
-
// eslint-disable-next-line @typescript-eslint/no-misused-promises
|
3428
|
-
pendingTasks.push(new Promise(async (resolve) => {
|
3429
|
-
try {
|
3430
|
-
await updateItemResourceFile(solutionItemId, storageName, path.blob, authentication);
|
3431
|
-
}
|
3432
|
-
catch (err) {
|
3433
|
-
console.log("Unable to update " + storageName + " for item " + t.itemId + ": " + JSON.stringify(err));
|
3434
|
-
}
|
3435
|
-
resolve();
|
3436
|
-
}));
|
3437
|
-
break;
|
3438
|
-
case interfaces.EUpdateType.Remove:
|
3439
|
-
// eslint-disable-next-line @typescript-eslint/no-misused-promises
|
3440
|
-
pendingTasks.push(new Promise(async (resolve) => {
|
3441
|
-
try {
|
3442
|
-
await removeItemResourceFile(solutionItemId, storageName, authentication);
|
3443
|
-
t.resources = t.resources.filter((path) => path !== storageName);
|
3444
|
-
}
|
3445
|
-
catch (err) {
|
3446
|
-
console.log("Unable to remove " + storageName + " for item " + t.itemId + ": " + JSON.stringify(err));
|
3447
|
-
}
|
3448
|
-
resolve();
|
3449
|
-
}));
|
3450
|
-
break;
|
3451
|
-
}
|
3452
|
-
return Promise.resolve();
|
3453
|
-
});
|
3454
|
-
delete t.resourceFilePaths;
|
3455
|
-
delete t.thumbnail;
|
3456
|
-
delete t.groupDetails;
|
3457
|
-
});
|
3458
|
-
// Update the resources
|
3459
|
-
return Promise.all(pendingTasks)
|
3460
|
-
.then(async () => {
|
3461
|
-
if (resourceAdds.length > 0) {
|
3462
|
-
await copyFilesToStorageItem(resourceAdds, solutionItemId, authentication);
|
3463
|
-
}
|
3464
|
-
return Promise.resolve();
|
3465
|
-
});
|
3466
|
-
}
|
3467
|
-
/**
|
3468
|
-
* Stores basic spatial reference information that is used to determine if a custom spatial reference parameter will
|
3469
|
-
* be exposed while deploying this solution and if so what feature services will support it and what will the default wkid be
|
3470
|
-
*
|
3471
|
-
* @param spatialReferenceInfo The configuration settings for a custom spatial reference
|
3472
|
-
* @param templates The templates in the current solution, which will be updated in place if
|
3473
|
-
* `spatialReferenceInfo.enabled` is true
|
3474
|
-
*
|
3475
|
-
* @returns The new default wkid
|
3476
|
-
*
|
3477
|
-
* @protected
|
3478
|
-
*/
|
3479
|
-
_setSpatialReferenceInfo(spatialReferenceInfo, templates) {
|
3480
|
-
const customizingPrefix = "{{params.wkid||";
|
3481
|
-
const customizeableFeatureServices = this._getCustomizableFeatureServices(templates);
|
3482
|
-
if (spatialReferenceInfo.enabled) {
|
3483
|
-
// Enable or disable this feature in each service
|
3484
|
-
customizeableFeatureServices.forEach((fs) => {
|
3485
|
-
const name = fs.item.title || fs.item.name;
|
3486
|
-
let wkid;
|
3487
|
-
if (spatialReferenceInfo.services[name]) { // enabled
|
3488
|
-
wkid = `{{params.wkid||${spatialReferenceInfo.spatialReference}}}`;
|
3489
|
-
setCreateProp(fs, "properties.service.spatialReference.wkid", wkid);
|
3490
|
-
}
|
3491
|
-
else { // disabled
|
3492
|
-
wkid = getProp(fs, "properties.service.spatialReference.wkid");
|
3493
|
-
// Remove customizing prefix if present
|
3494
|
-
if (wkid.toString().startsWith(customizingPrefix)) {
|
3495
|
-
wkid = wkid.toString().substring(customizingPrefix.length, wkid.length - 2);
|
3496
|
-
setCreateProp(fs, "properties.service.spatialReference.wkid", wkid);
|
3497
|
-
}
|
3498
|
-
}
|
3499
|
-
});
|
3500
|
-
return spatialReferenceInfo.spatialReference;
|
3501
|
-
}
|
3502
|
-
else {
|
3503
|
-
// Disable this feature in each service
|
3504
|
-
customizeableFeatureServices.forEach((fs) => {
|
3505
|
-
const wkid = getProp(fs, "properties.service.spatialReference.wkid");
|
3506
|
-
// Remove customizing prefix if present
|
3507
|
-
if (wkid.toString().startsWith(customizingPrefix)) {
|
3508
|
-
setCreateProp(fs, "properties.service.spatialReference.wkid", wkid.toString().substring(customizingPrefix.length, wkid.length - 2));
|
3509
|
-
}
|
3510
|
-
});
|
3511
|
-
return undefined;
|
3512
|
-
}
|
3513
|
-
}
|
3514
|
-
/**
|
3515
|
-
* Splits a pathed filename into a last term and a prefix; e.g., "a/b/c" returns "c" with a prefix of "a/b".
|
3516
|
-
*
|
3517
|
-
* @param filename Filename with optional path
|
3518
|
-
*
|
3519
|
-
* @returns An object consisting of a `prefix` (undefined if `filename` does not contain a path) and a `suffix`--the
|
3520
|
-
* filename at the end of a path
|
3521
|
-
*
|
3522
|
-
* @protected
|
3523
|
-
*/
|
3524
|
-
_splitFilename(filename) {
|
3525
|
-
const filenameParts = filename.split("/");
|
3526
|
-
return {
|
3527
|
-
prefix: filenameParts.length > 1 ? filenameParts.slice(0, filenameParts.length - 1).join("/") : undefined,
|
3528
|
-
suffix: filenameParts[filenameParts.length - 1]
|
3529
|
-
};
|
3530
|
-
}
|
3531
|
-
}
|
3532
|
-
const state = SolutionStore.Store;
|
3533
|
-
|
3534
|
-
exports.getProp = getProp;
|
3535
|
-
exports.state = state;
|
1838
|
+
exports.SolutionTemplateFormatVersion = SolutionTemplateFormatVersion;
|
1839
|
+
exports.jszip_min = jszip_min;
|