@esri/solutions-components 0.2.1 → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/calcite-shell-panel_14.cjs.entry.js +16 -6
- package/dist/cjs/calcite-shell-panel_14.cjs.entry.js.map +1 -1
- package/dist/cjs/solution-configuration.cjs.entry.js +10 -3
- package/dist/cjs/solution-configuration.cjs.entry.js.map +1 -1
- package/dist/cjs/solution-contents_3.cjs.entry.js +3 -1
- package/dist/cjs/solution-contents_3.cjs.entry.js.map +1 -1
- package/dist/cjs/{solution-store-e2fc11ac.js → solution-store-893499a5.js} +3 -1
- package/dist/cjs/solution-store-893499a5.js.map +1 -0
- package/dist/collection/components/solution-configuration/solution-configuration.js +9 -2
- package/dist/collection/components/solution-configuration/solution-configuration.js.map +1 -1
- package/dist/collection/components/solution-item/solution-item.js +2 -0
- package/dist/collection/components/solution-item/solution-item.js.map +1 -1
- package/dist/collection/components/solution-item-details/solution-item-details.js +15 -5
- package/dist/collection/components/solution-item-details/solution-item-details.js.map +1 -1
- package/dist/collection/utils/solution-store.js +2 -0
- package/dist/collection/utils/solution-store.js.map +1 -1
- package/dist/collection/utils/solution-store.ts +2 -0
- package/dist/esm/calcite-shell-panel_14.entry.js +16 -6
- package/dist/esm/calcite-shell-panel_14.entry.js.map +1 -1
- package/dist/esm/solution-configuration.entry.js +10 -3
- package/dist/esm/solution-configuration.entry.js.map +1 -1
- package/dist/esm/solution-contents_3.entry.js +3 -1
- package/dist/esm/solution-contents_3.entry.js.map +1 -1
- package/dist/esm/{solution-store-b3c65467.js → solution-store-0c58c852.js} +3 -1
- package/dist/esm/solution-store-0c58c852.js.map +1 -0
- package/dist/solutions-components/{p-b25f6ebe.js → p-659edb14.js} +3 -1
- package/dist/solutions-components/p-659edb14.js.map +1 -0
- package/dist/solutions-components/{p-638738f2.entry.js → p-77c75f3a.entry.js} +4 -2
- package/dist/solutions-components/p-77c75f3a.entry.js.map +1 -0
- package/dist/solutions-components/{p-7e8985f2.entry.js → p-90629c1d.entry.js} +11 -4
- package/dist/solutions-components/p-90629c1d.entry.js.map +1 -0
- package/dist/solutions-components/{p-542189bc.entry.js → p-984cb687.entry.js} +17 -7
- package/dist/solutions-components/p-984cb687.entry.js.map +1 -0
- package/dist/solutions-components/solutions-components.esm.js +1 -1
- package/dist/solutions-components/utils/solution-store.ts +2 -0
- package/dist/solutions-components_commit.txt +9 -6
- package/dist/types/components/solution-item-details/solution-item-details.d.ts +2 -1
- package/package.json +1 -1
- package/dist/cjs/solution-store-e2fc11ac.js.map +0 -1
- package/dist/components/ExpandToggle.js +0 -112
- package/dist/components/ExpandToggle.js.map +0 -1
- package/dist/components/Heading.js +0 -24
- package/dist/components/Heading.js.map +0 -1
- package/dist/components/_commonjsHelpers.js +0 -24
- package/dist/components/_commonjsHelpers.js.map +0 -1
- package/dist/components/action-bar.js +0 -278
- package/dist/components/action-bar.js.map +0 -1
- package/dist/components/action-group.js +0 -151
- package/dist/components/action-group.js.map +0 -1
- package/dist/components/action-menu.js +0 -358
- package/dist/components/action-menu.js.map +0 -1
- package/dist/components/action.js +0 -216
- package/dist/components/action.js.map +0 -1
- package/dist/components/array.js +0 -17
- package/dist/components/array.js.map +0 -1
- package/dist/components/buffer-tools.d.ts +0 -11
- package/dist/components/buffer-tools.js +0 -13
- package/dist/components/buffer-tools.js.map +0 -1
- package/dist/components/buffer-tools2.js +0 -256
- package/dist/components/buffer-tools2.js.map +0 -1
- package/dist/components/button.js +0 -265
- package/dist/components/button.js.map +0 -1
- package/dist/components/calcite-accordion-item.js +0 -246
- package/dist/components/calcite-accordion-item.js.map +0 -1
- package/dist/components/calcite-accordion.js +0 -182
- package/dist/components/calcite-accordion.js.map +0 -1
- package/dist/components/calcite-action-bar.js +0 -13
- package/dist/components/calcite-action-bar.js.map +0 -1
- package/dist/components/calcite-action-group.js +0 -13
- package/dist/components/calcite-action-group.js.map +0 -1
- package/dist/components/calcite-action-menu.js +0 -13
- package/dist/components/calcite-action-menu.js.map +0 -1
- package/dist/components/calcite-action-pad.js +0 -199
- package/dist/components/calcite-action-pad.js.map +0 -1
- package/dist/components/calcite-action.js +0 -13
- package/dist/components/calcite-action.js.map +0 -1
- package/dist/components/calcite-alert.js +0 -299
- package/dist/components/calcite-alert.js.map +0 -1
- package/dist/components/calcite-avatar.js +0 -184
- package/dist/components/calcite-avatar.js.map +0 -1
- package/dist/components/calcite-block-section.js +0 -157
- package/dist/components/calcite-block-section.js.map +0 -1
- package/dist/components/calcite-block.js +0 -277
- package/dist/components/calcite-block.js.map +0 -1
- package/dist/components/calcite-button.js +0 -13
- package/dist/components/calcite-button.js.map +0 -1
- package/dist/components/calcite-card.js +0 -189
- package/dist/components/calcite-card.js.map +0 -1
- package/dist/components/calcite-checkbox.js +0 -13
- package/dist/components/calcite-checkbox.js.map +0 -1
- package/dist/components/calcite-chip.js +0 -13
- package/dist/components/calcite-chip.js.map +0 -1
- package/dist/components/calcite-color-picker-hex-input.js +0 -13
- package/dist/components/calcite-color-picker-hex-input.js.map +0 -1
- package/dist/components/calcite-color-picker-swatch.js +0 -13
- package/dist/components/calcite-color-picker-swatch.js.map +0 -1
- package/dist/components/calcite-color-picker.js +0 -1038
- package/dist/components/calcite-color-picker.js.map +0 -1
- package/dist/components/calcite-combobox-item-group.js +0 -77
- package/dist/components/calcite-combobox-item-group.js.map +0 -1
- package/dist/components/calcite-combobox-item.js +0 -13
- package/dist/components/calcite-combobox-item.js.map +0 -1
- package/dist/components/calcite-combobox.js +0 -13
- package/dist/components/calcite-combobox.js.map +0 -1
- package/dist/components/calcite-date-picker-day.js +0 -13
- package/dist/components/calcite-date-picker-day.js.map +0 -1
- package/dist/components/calcite-date-picker-month-header.js +0 -13
- package/dist/components/calcite-date-picker-month-header.js.map +0 -1
- package/dist/components/calcite-date-picker-month.js +0 -13
- package/dist/components/calcite-date-picker-month.js.map +0 -1
- package/dist/components/calcite-date-picker.js +0 -13
- package/dist/components/calcite-date-picker.js.map +0 -1
- package/dist/components/calcite-dropdown-group.js +0 -101
- package/dist/components/calcite-dropdown-group.js.map +0 -1
- package/dist/components/calcite-dropdown-item.js +0 -237
- package/dist/components/calcite-dropdown-item.js.map +0 -1
- package/dist/components/calcite-dropdown.js +0 -13
- package/dist/components/calcite-dropdown.js.map +0 -1
- package/dist/components/calcite-fab.js +0 -146
- package/dist/components/calcite-fab.js.map +0 -1
- package/dist/components/calcite-filter.js +0 -197
- package/dist/components/calcite-filter.js.map +0 -1
- package/dist/components/calcite-flow-item.js +0 -245
- package/dist/components/calcite-flow-item.js.map +0 -1
- package/dist/components/calcite-flow.js +0 -149
- package/dist/components/calcite-flow.js.map +0 -1
- package/dist/components/calcite-graph.js +0 -13
- package/dist/components/calcite-graph.js.map +0 -1
- package/dist/components/calcite-handle.js +0 -13
- package/dist/components/calcite-handle.js.map +0 -1
- package/dist/components/calcite-icon.js +0 -13
- package/dist/components/calcite-icon.js.map +0 -1
- package/dist/components/calcite-inline-editable.js +0 -296
- package/dist/components/calcite-inline-editable.js.map +0 -1
- package/dist/components/calcite-input-date-picker.js +0 -715
- package/dist/components/calcite-input-date-picker.js.map +0 -1
- package/dist/components/calcite-input-message.js +0 -13
- package/dist/components/calcite-input-message.js.map +0 -1
- package/dist/components/calcite-input-number.js +0 -639
- package/dist/components/calcite-input-number.js.map +0 -1
- package/dist/components/calcite-input-text.js +0 -402
- package/dist/components/calcite-input-text.js.map +0 -1
- package/dist/components/calcite-input-time-picker.js +0 -436
- package/dist/components/calcite-input-time-picker.js.map +0 -1
- package/dist/components/calcite-input.js +0 -13
- package/dist/components/calcite-input.js.map +0 -1
- package/dist/components/calcite-label.js +0 -13
- package/dist/components/calcite-label.js.map +0 -1
- package/dist/components/calcite-link.js +0 -13
- package/dist/components/calcite-link.js.map +0 -1
- package/dist/components/calcite-list-item-group.js +0 -67
- package/dist/components/calcite-list-item-group.js.map +0 -1
- package/dist/components/calcite-list-item.js +0 -13
- package/dist/components/calcite-list-item.js.map +0 -1
- package/dist/components/calcite-list.js +0 -13
- package/dist/components/calcite-list.js.map +0 -1
- package/dist/components/calcite-loader.js +0 -13
- package/dist/components/calcite-loader.js.map +0 -1
- package/dist/components/calcite-modal.js +0 -500
- package/dist/components/calcite-modal.js.map +0 -1
- package/dist/components/calcite-notice.js +0 -13
- package/dist/components/calcite-notice.js.map +0 -1
- package/dist/components/calcite-option-group.js +0 -66
- package/dist/components/calcite-option-group.js.map +0 -1
- package/dist/components/calcite-option.js +0 -13
- package/dist/components/calcite-option.js.map +0 -1
- package/dist/components/calcite-pagination.js +0 -260
- package/dist/components/calcite-pagination.js.map +0 -1
- package/dist/components/calcite-panel.js +0 -13
- package/dist/components/calcite-panel.js.map +0 -1
- package/dist/components/calcite-pick-list-group.js +0 -76
- package/dist/components/calcite-pick-list-group.js.map +0 -1
- package/dist/components/calcite-pick-list-item.js +0 -13
- package/dist/components/calcite-pick-list-item.js.map +0 -1
- package/dist/components/calcite-pick-list.js +0 -175
- package/dist/components/calcite-pick-list.js.map +0 -1
- package/dist/components/calcite-popover-manager.js +0 -96
- package/dist/components/calcite-popover-manager.js.map +0 -1
- package/dist/components/calcite-popover.js +0 -13
- package/dist/components/calcite-popover.js.map +0 -1
- package/dist/components/calcite-progress.js +0 -13
- package/dist/components/calcite-progress.js.map +0 -1
- package/dist/components/calcite-radio-button-group.js +0 -134
- package/dist/components/calcite-radio-button-group.js.map +0 -1
- package/dist/components/calcite-radio-button.js +0 -312
- package/dist/components/calcite-radio-button.js.map +0 -1
- package/dist/components/calcite-radio-group-item.js +0 -13
- package/dist/components/calcite-radio-group-item.js.map +0 -1
- package/dist/components/calcite-radio-group.js +0 -13
- package/dist/components/calcite-radio-group.js.map +0 -1
- package/dist/components/calcite-rating.js +0 -203
- package/dist/components/calcite-rating.js.map +0 -1
- package/dist/components/calcite-scrim.js +0 -13
- package/dist/components/calcite-scrim.js.map +0 -1
- package/dist/components/calcite-select.js +0 -13
- package/dist/components/calcite-select.js.map +0 -1
- package/dist/components/calcite-shell-center-row.js +0 -102
- package/dist/components/calcite-shell-center-row.js.map +0 -1
- package/dist/components/calcite-shell-panel.js +0 -13
- package/dist/components/calcite-shell-panel.js.map +0 -1
- package/dist/components/calcite-shell.js +0 -13
- package/dist/components/calcite-shell.js.map +0 -1
- package/dist/components/calcite-slider.js +0 -13
- package/dist/components/calcite-slider.js.map +0 -1
- package/dist/components/calcite-sortable-list.js +0 -204
- package/dist/components/calcite-sortable-list.js.map +0 -1
- package/dist/components/calcite-split-button.js +0 -170
- package/dist/components/calcite-split-button.js.map +0 -1
- package/dist/components/calcite-stepper-item.js +0 -273
- package/dist/components/calcite-stepper-item.js.map +0 -1
- package/dist/components/calcite-stepper.js +0 -258
- package/dist/components/calcite-stepper.js.map +0 -1
- package/dist/components/calcite-switch.js +0 -13
- package/dist/components/calcite-switch.js.map +0 -1
- package/dist/components/calcite-tab-nav.js +0 -13
- package/dist/components/calcite-tab-nav.js.map +0 -1
- package/dist/components/calcite-tab-title.js +0 -13
- package/dist/components/calcite-tab-title.js.map +0 -1
- package/dist/components/calcite-tab.js +0 -13
- package/dist/components/calcite-tab.js.map +0 -1
- package/dist/components/calcite-tabs.js +0 -13
- package/dist/components/calcite-tabs.js.map +0 -1
- package/dist/components/calcite-tile-select-group.js +0 -67
- package/dist/components/calcite-tile-select-group.js.map +0 -1
- package/dist/components/calcite-tile-select.js +0 -268
- package/dist/components/calcite-tile-select.js.map +0 -1
- package/dist/components/calcite-tile.js +0 -13
- package/dist/components/calcite-tile.js.map +0 -1
- package/dist/components/calcite-time-picker.js +0 -13
- package/dist/components/calcite-time-picker.js.map +0 -1
- package/dist/components/calcite-tip-group.js +0 -43
- package/dist/components/calcite-tip-group.js.map +0 -1
- package/dist/components/calcite-tip-manager.js +0 -225
- package/dist/components/calcite-tip-manager.js.map +0 -1
- package/dist/components/calcite-tip.js +0 -164
- package/dist/components/calcite-tip.js.map +0 -1
- package/dist/components/calcite-tooltip-manager.js +0 -59
- package/dist/components/calcite-tooltip-manager.js.map +0 -1
- package/dist/components/calcite-tooltip.js +0 -13
- package/dist/components/calcite-tooltip.js.map +0 -1
- package/dist/components/calcite-tree-item.js +0 -13
- package/dist/components/calcite-tree-item.js.map +0 -1
- package/dist/components/calcite-tree.js +0 -13
- package/dist/components/calcite-tree.js.map +0 -1
- package/dist/components/calcite-value-list-item.js +0 -13
- package/dist/components/calcite-value-list-item.js.map +0 -1
- package/dist/components/calcite-value-list.js +0 -13
- package/dist/components/calcite-value-list.js.map +0 -1
- package/dist/components/check-list.d.ts +0 -11
- package/dist/components/check-list.js +0 -13
- package/dist/components/check-list.js.map +0 -1
- package/dist/components/check-list2.js +0 -128
- package/dist/components/check-list2.js.map +0 -1
- package/dist/components/checkbox.js +0 -167
- package/dist/components/checkbox.js.map +0 -1
- package/dist/components/chip.js +0 -172
- package/dist/components/chip.js.map +0 -1
- package/dist/components/color-picker-hex-input.js +0 -365
- package/dist/components/color-picker-hex-input.js.map +0 -1
- package/dist/components/color-picker-swatch.js +0 -2036
- package/dist/components/color-picker-swatch.js.map +0 -1
- package/dist/components/combobox-item.js +0 -184
- package/dist/components/combobox-item.js.map +0 -1
- package/dist/components/combobox.js +0 -914
- package/dist/components/combobox.js.map +0 -1
- package/dist/components/conditionalSlot.js +0 -52
- package/dist/components/conditionalSlot.js.map +0 -1
- package/dist/components/config-buffer-tools.d.ts +0 -11
- package/dist/components/config-buffer-tools.js +0 -185
- package/dist/components/config-buffer-tools.js.map +0 -1
- package/dist/components/config-draw-tools.d.ts +0 -11
- package/dist/components/config-draw-tools.js +0 -124
- package/dist/components/config-draw-tools.js.map +0 -1
- package/dist/components/config-layer-picker.d.ts +0 -11
- package/dist/components/config-layer-picker.js +0 -148
- package/dist/components/config-layer-picker.js.map +0 -1
- package/dist/components/config-pdf-download.d.ts +0 -11
- package/dist/components/config-pdf-download.js +0 -157
- package/dist/components/config-pdf-download.js.map +0 -1
- package/dist/components/date-picker-day.js +0 -113
- package/dist/components/date-picker-day.js.map +0 -1
- package/dist/components/date-picker-month-header.js +0 -226
- package/dist/components/date-picker-month-header.js.map +0 -1
- package/dist/components/date-picker-month.js +0 -346
- package/dist/components/date-picker-month.js.map +0 -1
- package/dist/components/date-picker.js +0 -577
- package/dist/components/date-picker.js.map +0 -1
- package/dist/components/date.js +0 -182
- package/dist/components/date.js.map +0 -1
- package/dist/components/debounce.js +0 -489
- package/dist/components/debounce.js.map +0 -1
- package/dist/components/dom.js +0 -233
- package/dist/components/dom.js.map +0 -1
- package/dist/components/dropdown.js +0 -507
- package/dist/components/dropdown.js.map +0 -1
- package/dist/components/filter.js +0 -765
- package/dist/components/filter.js.map +0 -1
- package/dist/components/floating-ui.js +0 -1787
- package/dist/components/floating-ui.js.map +0 -1
- package/dist/components/form.js +0 -230
- package/dist/components/form.js.map +0 -1
- package/dist/components/graph.js +0 -256
- package/dist/components/graph.js.map +0 -1
- package/dist/components/guid.js +0 -26
- package/dist/components/guid.js.map +0 -1
- package/dist/components/handle.js +0 -121
- package/dist/components/handle.js.map +0 -1
- package/dist/components/icon.js +0 -204
- package/dist/components/icon.js.map +0 -1
- package/dist/components/index.d.ts +0 -48
- package/dist/components/index.js +0 -190
- package/dist/components/index.js.map +0 -1
- package/dist/components/index2.js +0 -201
- package/dist/components/index2.js.map +0 -1
- package/dist/components/input-message.js +0 -103
- package/dist/components/input-message.js.map +0 -1
- package/dist/components/input.js +0 -742
- package/dist/components/input.js.map +0 -1
- package/dist/components/interactive.js +0 -53
- package/dist/components/interactive.js.map +0 -1
- package/dist/components/interfaces.js +0 -21
- package/dist/components/interfaces.js.map +0 -1
- package/dist/components/interfaces2.js +0 -23
- package/dist/components/interfaces2.js.map +0 -1
- package/dist/components/interfaces3.js +0 -72
- package/dist/components/interfaces3.js.map +0 -1
- package/dist/components/json-editor.d.ts +0 -11
- package/dist/components/json-editor.js +0 -13
- package/dist/components/json-editor.js.map +0 -1
- package/dist/components/json-editor2.js +0 -443
- package/dist/components/json-editor2.js.map +0 -1
- package/dist/components/key.js +0 -18
- package/dist/components/key.js.map +0 -1
- package/dist/components/label.js +0 -108
- package/dist/components/label.js.map +0 -1
- package/dist/components/label2.js +0 -133
- package/dist/components/label2.js.map +0 -1
- package/dist/components/labelFormats.js +0 -212
- package/dist/components/labelFormats.js.map +0 -1
- package/dist/components/link.js +0 -125
- package/dist/components/link.js.map +0 -1
- package/dist/components/list-item.js +0 -151
- package/dist/components/list-item.js.map +0 -1
- package/dist/components/list.js +0 -85
- package/dist/components/list.js.map +0 -1
- package/dist/components/loadModules.js +0 -30
- package/dist/components/loadModules.js.map +0 -1
- package/dist/components/loader.js +0 -118
- package/dist/components/loader.js.map +0 -1
- package/dist/components/locale.js +0 -414
- package/dist/components/locale.js.map +0 -1
- package/dist/components/locale2.js +0 -415
- package/dist/components/locale2.js.map +0 -1
- package/dist/components/map-draw-tools.d.ts +0 -11
- package/dist/components/map-draw-tools.js +0 -13
- package/dist/components/map-draw-tools.js.map +0 -1
- package/dist/components/map-draw-tools2.js +0 -230
- package/dist/components/map-draw-tools2.js.map +0 -1
- package/dist/components/map-layer-picker.d.ts +0 -11
- package/dist/components/map-layer-picker.js +0 -13
- package/dist/components/map-layer-picker.js.map +0 -1
- package/dist/components/map-layer-picker2.js +0 -190
- package/dist/components/map-layer-picker2.js.map +0 -1
- package/dist/components/map-search.d.ts +0 -11
- package/dist/components/map-search.js +0 -157
- package/dist/components/map-search.js.map +0 -1
- package/dist/components/map-select-tools.d.ts +0 -11
- package/dist/components/map-select-tools.js +0 -13
- package/dist/components/map-select-tools.js.map +0 -1
- package/dist/components/map-select-tools2.js +0 -555
- package/dist/components/map-select-tools2.js.map +0 -1
- package/dist/components/mapViewUtils.js +0 -131
- package/dist/components/mapViewUtils.js.map +0 -1
- package/dist/components/math.js +0 -26
- package/dist/components/math.js.map +0 -1
- package/dist/components/nonChromiumPlatformUtils.js +0 -505
- package/dist/components/nonChromiumPlatformUtils.js.map +0 -1
- package/dist/components/notice.js +0 -194
- package/dist/components/notice.js.map +0 -1
- package/dist/components/observers.js +0 -58
- package/dist/components/observers.js.map +0 -1
- package/dist/components/openCloseComponent.js +0 -58
- package/dist/components/openCloseComponent.js.map +0 -1
- package/dist/components/option.js +0 -111
- package/dist/components/option.js.map +0 -1
- package/dist/components/panel.js +0 -461
- package/dist/components/panel.js.map +0 -1
- package/dist/components/pdf-download.d.ts +0 -11
- package/dist/components/pdf-download.js +0 -13
- package/dist/components/pdf-download.js.map +0 -1
- package/dist/components/pdf-download2.js +0 -243
- package/dist/components/pdf-download2.js.map +0 -1
- package/dist/components/pick-list-item.js +0 -257
- package/dist/components/pick-list-item.js.map +0 -1
- package/dist/components/popover.js +0 -502
- package/dist/components/popover.js.map +0 -1
- package/dist/components/progress.js +0 -62
- package/dist/components/progress.js.map +0 -1
- package/dist/components/public-notification.d.ts +0 -11
- package/dist/components/public-notification.js +0 -784
- package/dist/components/public-notification.js.map +0 -1
- package/dist/components/publicNotificationStore.js +0 -40
- package/dist/components/publicNotificationStore.js.map +0 -1
- package/dist/components/queryUtils.js +0 -163
- package/dist/components/queryUtils.js.map +0 -1
- package/dist/components/radio-group-item.js +0 -103
- package/dist/components/radio-group-item.js.map +0 -1
- package/dist/components/radio-group.js +0 -237
- package/dist/components/radio-group.js.map +0 -1
- package/dist/components/refine-selection-tools.d.ts +0 -11
- package/dist/components/refine-selection-tools.js +0 -13
- package/dist/components/refine-selection-tools.js.map +0 -1
- package/dist/components/refine-selection-tools2.js +0 -500
- package/dist/components/refine-selection-tools2.js.map +0 -1
- package/dist/components/refine-selection.d.ts +0 -11
- package/dist/components/refine-selection.js +0 -13
- package/dist/components/refine-selection.js.map +0 -1
- package/dist/components/refine-selection2.js +0 -369
- package/dist/components/refine-selection2.js.map +0 -1
- package/dist/components/resources.js +0 -26
- package/dist/components/resources.js.map +0 -1
- package/dist/components/resources2.js +0 -23
- package/dist/components/resources2.js.map +0 -1
- package/dist/components/resources3.js +0 -40
- package/dist/components/resources3.js.map +0 -1
- package/dist/components/scrim.js +0 -85
- package/dist/components/scrim.js.map +0 -1
- package/dist/components/select.js +0 -261
- package/dist/components/select.js.map +0 -1
- package/dist/components/shared-list-render.js +0 -321
- package/dist/components/shared-list-render.js.map +0 -1
- package/dist/components/shell-panel.js +0 -283
- package/dist/components/shell-panel.js.map +0 -1
- package/dist/components/shell.js +0 -123
- package/dist/components/shell.js.map +0 -1
- package/dist/components/slider.js +0 -898
- package/dist/components/slider.js.map +0 -1
- package/dist/components/solution-configuration.d.ts +0 -11
- package/dist/components/solution-configuration.js +0 -2225
- package/dist/components/solution-configuration.js.map +0 -1
- package/dist/components/solution-contents.d.ts +0 -11
- package/dist/components/solution-contents.js +0 -13
- package/dist/components/solution-contents.js.map +0 -1
- package/dist/components/solution-contents2.js +0 -130
- package/dist/components/solution-contents2.js.map +0 -1
- package/dist/components/solution-item-details.d.ts +0 -11
- package/dist/components/solution-item-details.js +0 -13
- package/dist/components/solution-item-details.js.map +0 -1
- package/dist/components/solution-item-details2.js +0 -236
- package/dist/components/solution-item-details2.js.map +0 -1
- package/dist/components/solution-item-icon.d.ts +0 -11
- package/dist/components/solution-item-icon.js +0 -13
- package/dist/components/solution-item-icon.js.map +0 -1
- package/dist/components/solution-item-icon2.js +0 -344
- package/dist/components/solution-item-icon2.js.map +0 -1
- package/dist/components/solution-item-sharing.d.ts +0 -11
- package/dist/components/solution-item-sharing.js +0 -13
- package/dist/components/solution-item-sharing.js.map +0 -1
- package/dist/components/solution-item-sharing2.js +0 -169
- package/dist/components/solution-item-sharing2.js.map +0 -1
- package/dist/components/solution-item.d.ts +0 -11
- package/dist/components/solution-item.js +0 -13
- package/dist/components/solution-item.js.map +0 -1
- package/dist/components/solution-item2.js +0 -317
- package/dist/components/solution-item2.js.map +0 -1
- package/dist/components/solution-organization-variables.d.ts +0 -11
- package/dist/components/solution-organization-variables.js +0 -13
- package/dist/components/solution-organization-variables.js.map +0 -1
- package/dist/components/solution-organization-variables2.js +0 -134
- package/dist/components/solution-organization-variables2.js.map +0 -1
- package/dist/components/solution-resource-item.d.ts +0 -11
- package/dist/components/solution-resource-item.js +0 -13
- package/dist/components/solution-resource-item.js.map +0 -1
- package/dist/components/solution-resource-item2.js +0 -358
- package/dist/components/solution-resource-item2.js.map +0 -1
- package/dist/components/solution-spatial-ref.d.ts +0 -11
- package/dist/components/solution-spatial-ref.js +0 -13
- package/dist/components/solution-spatial-ref.js.map +0 -1
- package/dist/components/solution-spatial-ref2.js +0 -21448
- package/dist/components/solution-spatial-ref2.js.map +0 -1
- package/dist/components/solution-store.js +0 -4094
- package/dist/components/solution-store.js.map +0 -1
- package/dist/components/solution-template-data.d.ts +0 -11
- package/dist/components/solution-template-data.js +0 -13
- package/dist/components/solution-template-data.js.map +0 -1
- package/dist/components/solution-template-data2.js +0 -235
- package/dist/components/solution-template-data2.js.map +0 -1
- package/dist/components/solution-variables.d.ts +0 -11
- package/dist/components/solution-variables.js +0 -13
- package/dist/components/solution-variables.js.map +0 -1
- package/dist/components/solution-variables2.js +0 -152
- package/dist/components/solution-variables2.js.map +0 -1
- package/dist/components/sortable.esm.js +0 -3028
- package/dist/components/sortable.esm.js.map +0 -1
- package/dist/components/store-manager.d.ts +0 -11
- package/dist/components/store-manager.js +0 -85
- package/dist/components/store-manager.js.map +0 -1
- package/dist/components/switch.js +0 -141
- package/dist/components/switch.js.map +0 -1
- package/dist/components/tab-nav.js +0 -243
- package/dist/components/tab-nav.js.map +0 -1
- package/dist/components/tab-title.js +0 -278
- package/dist/components/tab-title.js.map +0 -1
- package/dist/components/tab.js +0 -156
- package/dist/components/tab.js.map +0 -1
- package/dist/components/tabs.js +0 -190
- package/dist/components/tabs.js.map +0 -1
- package/dist/components/tile.js +0 -131
- package/dist/components/tile.js.map +0 -1
- package/dist/components/time-picker.js +0 -945
- package/dist/components/time-picker.js.map +0 -1
- package/dist/components/tooltip.js +0 -401
- package/dist/components/tooltip.js.map +0 -1
- package/dist/components/tree-item.js +0 -296
- package/dist/components/tree-item.js.map +0 -1
- package/dist/components/tree.js +0 -329
- package/dist/components/tree.js.map +0 -1
- package/dist/components/utils.js +0 -121
- package/dist/components/utils.js.map +0 -1
- package/dist/components/utils2.js +0 -53
- package/dist/components/utils2.js.map +0 -1
- package/dist/components/value-list-item.js +0 -206
- package/dist/components/value-list-item.js.map +0 -1
- package/dist/components/value-list.js +0 -335
- package/dist/components/value-list.js.map +0 -1
- package/dist/esm/solution-store-b3c65467.js.map +0 -1
- package/dist/solutions-components/p-542189bc.entry.js.map +0 -1
- package/dist/solutions-components/p-638738f2.entry.js.map +0 -1
- package/dist/solutions-components/p-7e8985f2.entry.js.map +0 -1
- package/dist/solutions-components/p-b25f6ebe.js.map +0 -1
@@ -1,555 +0,0 @@
|
|
1
|
-
/*!
|
2
|
-
* Copyright 2022 Esri
|
3
|
-
* Licensed under the Apache License, Version 2.0
|
4
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
5
|
-
*/
|
6
|
-
import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
7
|
-
import { l as loadModules } from './loadModules.js';
|
8
|
-
import { a as goToSelection, h as highlightFeatures } from './mapViewUtils.js';
|
9
|
-
import { q as queryObjectIds, a as getQueryGeoms } from './queryUtils.js';
|
10
|
-
import { a as EWorkflowType, c as ESelectionMode, d as ERefineMode } from './interfaces3.js';
|
11
|
-
import { s as state } from './publicNotificationStore.js';
|
12
|
-
import { g as getLocaleComponentStrings } from './locale.js';
|
13
|
-
import { d as defineCustomElement$j } from './buffer-tools2.js';
|
14
|
-
import { d as defineCustomElement$i } from './action.js';
|
15
|
-
import { d as defineCustomElement$h } from './chip.js';
|
16
|
-
import { d as defineCustomElement$g } from './combobox.js';
|
17
|
-
import { d as defineCustomElement$f } from './combobox-item.js';
|
18
|
-
import { d as defineCustomElement$e } from './graph.js';
|
19
|
-
import { d as defineCustomElement$d } from './icon.js';
|
20
|
-
import { d as defineCustomElement$c } from './input.js';
|
21
|
-
import { d as defineCustomElement$b } from './label.js';
|
22
|
-
import { d as defineCustomElement$a } from './loader.js';
|
23
|
-
import { d as defineCustomElement$9 } from './option.js';
|
24
|
-
import { d as defineCustomElement$8 } from './progress.js';
|
25
|
-
import { d as defineCustomElement$7 } from './radio-group.js';
|
26
|
-
import { d as defineCustomElement$6 } from './radio-group-item.js';
|
27
|
-
import { d as defineCustomElement$5 } from './select.js';
|
28
|
-
import { d as defineCustomElement$4 } from './slider.js';
|
29
|
-
import { d as defineCustomElement$3 } from './map-draw-tools2.js';
|
30
|
-
import { d as defineCustomElement$2 } from './map-layer-picker2.js';
|
31
|
-
import { d as defineCustomElement$1 } from './refine-selection-tools2.js';
|
32
|
-
|
33
|
-
const mapSelectToolsCss = ":host{display:block}.div-visible{display:inherit}.div-visible-search{display:flex;height:44px;align-items:center;padding-bottom:0}.div-not-visible{display:none}.padding-bottom-1{padding-bottom:1rem}.search-widget{width:100% !important;border:1px solid var(--calcite-ui-border-input)}.w-100{width:100%}.w-50{width:50%}.search-distance-container{padding-top:\"1rem\" !important}.end-border{-webkit-border-end:1px solid var(--calcite-ui-border-2);border-inline-end:1px solid var(--calcite-ui-border-2)}";
|
34
|
-
|
35
|
-
const MapSelectTools = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
36
|
-
constructor() {
|
37
|
-
super();
|
38
|
-
this.__registerHost();
|
39
|
-
this.selectionSetChange = createEvent(this, "selectionSetChange", 7);
|
40
|
-
this.workflowTypeChange = createEvent(this, "workflowTypeChange", 7);
|
41
|
-
/**
|
42
|
-
* number[]: the oids of the selected features
|
43
|
-
*/
|
44
|
-
this._selectedIds = [];
|
45
|
-
/**
|
46
|
-
* string: A label to help uniquely identify the selection set
|
47
|
-
*/
|
48
|
-
this._selectionLabel = "";
|
49
|
-
this.mapView = undefined;
|
50
|
-
this.selectLayerView = undefined;
|
51
|
-
this.geometries = undefined;
|
52
|
-
this.selectionSet = undefined;
|
53
|
-
this.isUpdate = false;
|
54
|
-
this._searchTerm = undefined;
|
55
|
-
this._translations = undefined;
|
56
|
-
this._workflowType = undefined;
|
57
|
-
}
|
58
|
-
//--------------------------------------------------------------------------
|
59
|
-
//
|
60
|
-
// Watch handlers
|
61
|
-
//
|
62
|
-
//--------------------------------------------------------------------------
|
63
|
-
/**
|
64
|
-
* Called each time the geometries prop is changed.
|
65
|
-
*
|
66
|
-
* @returns Promise when complete
|
67
|
-
*/
|
68
|
-
async watchGeometriesHandler(newValue, oldValue) {
|
69
|
-
if (newValue !== oldValue) {
|
70
|
-
if (newValue.length > 0) {
|
71
|
-
return this._geomQuery(this.geometries);
|
72
|
-
}
|
73
|
-
else if (newValue.length === 0) {
|
74
|
-
return this._clearResults(true, true);
|
75
|
-
}
|
76
|
-
}
|
77
|
-
}
|
78
|
-
/**
|
79
|
-
* Called each time the workflowType prop is changed and emits the workflowTypeChange event.
|
80
|
-
*
|
81
|
-
* @returns Promise when complete
|
82
|
-
*/
|
83
|
-
async workflowTypeHandler(newValue, oldValue) {
|
84
|
-
if (newValue !== oldValue) {
|
85
|
-
this.workflowTypeChange.emit(newValue);
|
86
|
-
}
|
87
|
-
}
|
88
|
-
//--------------------------------------------------------------------------
|
89
|
-
//
|
90
|
-
// Methods (public)
|
91
|
-
//
|
92
|
-
//--------------------------------------------------------------------------
|
93
|
-
/**
|
94
|
-
* Clear any selection results
|
95
|
-
*
|
96
|
-
* @returns Promise when the results have been cleared
|
97
|
-
*/
|
98
|
-
async clearSelection() {
|
99
|
-
return this._clearResults();
|
100
|
-
}
|
101
|
-
/**
|
102
|
-
* Get the new selection set
|
103
|
-
*
|
104
|
-
* @returns Promise with the new selection set
|
105
|
-
*/
|
106
|
-
async getSelection() {
|
107
|
-
return {
|
108
|
-
id: this.isUpdate ? this.selectionSet.id : Date.now(),
|
109
|
-
workflowType: this._workflowType,
|
110
|
-
searchResult: this._searchResult,
|
111
|
-
buffer: this._bufferGeometry,
|
112
|
-
distance: this._bufferTools.distance,
|
113
|
-
download: true,
|
114
|
-
unit: this._bufferTools.unit,
|
115
|
-
label: this._workflowType === EWorkflowType.SEARCH ?
|
116
|
-
this._selectionLabel : `${this._selectionLabel} ${this._bufferTools.distance} ${this._bufferTools.unit}`,
|
117
|
-
selectedIds: this._selectedIds,
|
118
|
-
layerView: this.selectLayerView,
|
119
|
-
geometries: this.geometries,
|
120
|
-
refineSelectLayers: this._refineTools.layerViews
|
121
|
-
};
|
122
|
-
}
|
123
|
-
/**
|
124
|
-
* Listen to changes in the sketch graphics
|
125
|
-
*
|
126
|
-
*/
|
127
|
-
sketchGraphicsChange(event) {
|
128
|
-
this._updateSelection(EWorkflowType.SKETCH, event.detail, this._translations.sketch);
|
129
|
-
}
|
130
|
-
/**
|
131
|
-
* Listen to changes in the refine graphics
|
132
|
-
*
|
133
|
-
*/
|
134
|
-
refineSelectionGraphicsChange(event) {
|
135
|
-
const graphics = event.detail;
|
136
|
-
this._updateSelection(EWorkflowType.SELECT, graphics, this._translations.select);
|
137
|
-
// Using OIDs to avoid issue with points
|
138
|
-
const oids = Array.isArray(graphics) ? graphics.map(g => { var _a; return g.attributes[(_a = g === null || g === void 0 ? void 0 : g.layer) === null || _a === void 0 ? void 0 : _a.objectIdField]; }) : [];
|
139
|
-
return this._highlightFeatures(oids);
|
140
|
-
}
|
141
|
-
//--------------------------------------------------------------------------
|
142
|
-
//
|
143
|
-
// Functions (lifecycle)
|
144
|
-
//
|
145
|
-
//--------------------------------------------------------------------------
|
146
|
-
/**
|
147
|
-
* StencilJS: Called once just after the component is first connected to the DOM.
|
148
|
-
*/
|
149
|
-
async componentWillLoad() {
|
150
|
-
await this._getTranslations();
|
151
|
-
await this._initModules();
|
152
|
-
}
|
153
|
-
/**
|
154
|
-
* StencilJS: Called once just after the component is fully loaded and the first render() occurs.
|
155
|
-
*/
|
156
|
-
async componentDidLoad() {
|
157
|
-
return this._init();
|
158
|
-
}
|
159
|
-
/**
|
160
|
-
* Renders the component.
|
161
|
-
*/
|
162
|
-
render() {
|
163
|
-
var _a, _b, _c;
|
164
|
-
const searchEnabled = this._workflowType === EWorkflowType.SEARCH;
|
165
|
-
const showSearchClass = searchEnabled ? " div-visible-search" : " div-not-visible";
|
166
|
-
const drawEnabled = this._workflowType === EWorkflowType.SKETCH;
|
167
|
-
const showDrawToolsClass = drawEnabled ? " div-visible" : " div-not-visible";
|
168
|
-
const selectEnabled = this._workflowType === EWorkflowType.SELECT;
|
169
|
-
const showSelectToolsClass = selectEnabled ? " div-visible" : " div-not-visible";
|
170
|
-
return (h(Host, null, h("div", { class: "padding-bottom-1" }, h("calcite-radio-group", { class: "w-100", onCalciteRadioGroupChange: (evt) => this._workflowChange(evt) }, h("calcite-radio-group-item", { checked: searchEnabled, class: "w-50 end-border", value: EWorkflowType.SEARCH }, this._translations.search), h("calcite-radio-group-item", { checked: selectEnabled, class: "w-50 end-border", value: EWorkflowType.SELECT }, this._translations.select), h("calcite-radio-group-item", { checked: drawEnabled, class: "w-50", value: EWorkflowType.SKETCH }, this._translations.sketch))), h("div", { class: showSearchClass }, h("div", { class: "search-widget", ref: (el) => { this._searchElement = el; } })), h("map-draw-tools", { active: drawEnabled, border: true, class: showDrawToolsClass, mapView: this.mapView, ref: (el) => { this._drawTools = el; } }), h("refine-selection-tools", { active: selectEnabled, border: true, class: showSelectToolsClass, layerViews: this._refineSelectLayers, mapView: this.mapView, mode: ESelectionMode.ADD, ref: (el) => { this._refineTools = el; }, refineMode: ERefineMode.SUBSET }), h("calcite-label", { style: { "display": "flex", "padding-top": "1rem" } }, (_a = this._translations) === null || _a === void 0 ? void 0 :
|
171
|
-
_a.searchDistance, h("buffer-tools", { distance: (_b = this.selectionSet) === null || _b === void 0 ? void 0 : _b.distance, geometries: this.geometries, onBufferComplete: (evt) => this._bufferComplete(evt), ref: (el) => this._bufferTools = el, unit: (_c = this.selectionSet) === null || _c === void 0 ? void 0 : _c.unit })), h("slot", null)));
|
172
|
-
}
|
173
|
-
//--------------------------------------------------------------------------
|
174
|
-
//
|
175
|
-
// Functions (protected)
|
176
|
-
//
|
177
|
-
//--------------------------------------------------------------------------
|
178
|
-
/**
|
179
|
-
* Load esri javascript api modules
|
180
|
-
*
|
181
|
-
* @returns Promise resolving when function is done
|
182
|
-
*
|
183
|
-
* @protected
|
184
|
-
*/
|
185
|
-
async _initModules() {
|
186
|
-
const [GraphicsLayer, Graphic, Search, Geometry, geometryEngine] = await loadModules([
|
187
|
-
"esri/layers/GraphicsLayer",
|
188
|
-
"esri/Graphic",
|
189
|
-
"esri/widgets/Search",
|
190
|
-
"esri/geometry/Geometry",
|
191
|
-
"esri/geometry/geometryEngine"
|
192
|
-
]);
|
193
|
-
this.GraphicsLayer = GraphicsLayer;
|
194
|
-
this.Graphic = Graphic;
|
195
|
-
this.Search = Search;
|
196
|
-
this.Geometry = Geometry;
|
197
|
-
this._geometryEngine = geometryEngine;
|
198
|
-
}
|
199
|
-
/**
|
200
|
-
* Initialize the graphics layer, selection set, and search widget
|
201
|
-
*
|
202
|
-
* @returns Promise when the operation has completed
|
203
|
-
*/
|
204
|
-
async _init() {
|
205
|
-
this._initGraphicsLayer();
|
206
|
-
this._initSelectionSet();
|
207
|
-
this._initSearchWidget();
|
208
|
-
}
|
209
|
-
/**
|
210
|
-
* Initialize the state of the component with any stored values in a selection set
|
211
|
-
*
|
212
|
-
* @protected
|
213
|
-
*/
|
214
|
-
_initSelectionSet() {
|
215
|
-
var _a, _b, _c, _d, _e, _f, _g;
|
216
|
-
if (this.selectionSet) {
|
217
|
-
this._searchTerm = (_b = (_a = this.selectionSet) === null || _a === void 0 ? void 0 : _a.searchResult) === null || _b === void 0 ? void 0 : _b.name;
|
218
|
-
this._workflowType = (_c = this.selectionSet) === null || _c === void 0 ? void 0 : _c.workflowType;
|
219
|
-
this._searchResult = (_d = this.selectionSet) === null || _d === void 0 ? void 0 : _d.searchResult;
|
220
|
-
this._refineSelectLayers = (_e = this.selectionSet) === null || _e === void 0 ? void 0 : _e.refineSelectLayers;
|
221
|
-
this.geometries = [
|
222
|
-
...(_f = this.selectionSet) === null || _f === void 0 ? void 0 : _f.geometries
|
223
|
-
];
|
224
|
-
// reset selection label base
|
225
|
-
this._selectionLabel = this._workflowType === EWorkflowType.SKETCH ?
|
226
|
-
this._translations.sketch : this._workflowType === EWorkflowType.SELECT ?
|
227
|
-
this._translations.select : (_g = this.selectionSet) === null || _g === void 0 ? void 0 : _g.label;
|
228
|
-
void goToSelection(this.selectionSet.selectedIds, this.selectionSet.layerView, this.mapView, false);
|
229
|
-
}
|
230
|
-
else {
|
231
|
-
this._workflowType = EWorkflowType.SEARCH;
|
232
|
-
}
|
233
|
-
}
|
234
|
-
/**
|
235
|
-
* Initialize the search widget
|
236
|
-
*
|
237
|
-
* @protected
|
238
|
-
*/
|
239
|
-
_initSearchWidget() {
|
240
|
-
if (this.mapView && this._searchElement) {
|
241
|
-
const searchOptions = {
|
242
|
-
view: this.mapView,
|
243
|
-
container: this._searchElement,
|
244
|
-
searchTerm: this._searchTerm
|
245
|
-
};
|
246
|
-
this._searchWidget = new this.Search(searchOptions);
|
247
|
-
this._searchWidget.on("search-clear", () => {
|
248
|
-
void this._clearResults(false);
|
249
|
-
});
|
250
|
-
this._searchWidget.on("select-result", (searchResults) => {
|
251
|
-
var _a;
|
252
|
-
void this._clearResults(false);
|
253
|
-
if (searchResults.result) {
|
254
|
-
this._searchResult = searchResults.result;
|
255
|
-
this._updateSelection(EWorkflowType.SEARCH, [searchResults.result.feature], (_a = searchResults === null || searchResults === void 0 ? void 0 : searchResults.result) === null || _a === void 0 ? void 0 : _a.name);
|
256
|
-
}
|
257
|
-
});
|
258
|
-
}
|
259
|
-
}
|
260
|
-
/**
|
261
|
-
* Initialize the graphics layer used to store any buffer grapghics
|
262
|
-
*
|
263
|
-
* @protected
|
264
|
-
*/
|
265
|
-
_initGraphicsLayer() {
|
266
|
-
const title = this._translations.bufferLayer;
|
267
|
-
const bufferIndex = this.mapView.map.layers.findIndex((l) => l.title === title);
|
268
|
-
if (bufferIndex > -1) {
|
269
|
-
this._bufferGraphicsLayer = this.mapView.map.layers.getItemAt(bufferIndex);
|
270
|
-
}
|
271
|
-
else {
|
272
|
-
this._bufferGraphicsLayer = new this.GraphicsLayer({ title });
|
273
|
-
state.managedLayers.push(title);
|
274
|
-
const sketchIndex = this.mapView.map.layers.findIndex((l) => l.title === this._translations.sketchLayer);
|
275
|
-
if (sketchIndex > -1) {
|
276
|
-
this.mapView.map.layers.add(this._bufferGraphicsLayer, sketchIndex);
|
277
|
-
}
|
278
|
-
else {
|
279
|
-
this.mapView.map.layers.add(this._bufferGraphicsLayer);
|
280
|
-
}
|
281
|
-
}
|
282
|
-
}
|
283
|
-
/**
|
284
|
-
* Store workflow type change
|
285
|
-
*
|
286
|
-
* @protected
|
287
|
-
*/
|
288
|
-
_workflowChange(evt) {
|
289
|
-
this._workflowType = evt.detail;
|
290
|
-
}
|
291
|
-
/**
|
292
|
-
* Highlight the features in the map
|
293
|
-
*
|
294
|
-
* @protected
|
295
|
-
*/
|
296
|
-
async _highlightFeatures(ids) {
|
297
|
-
var _a;
|
298
|
-
(_a = state.highlightHandle) === null || _a === void 0 ? void 0 : _a.remove();
|
299
|
-
if (ids.length > 0) {
|
300
|
-
state.highlightHandle = await highlightFeatures(ids, this.selectLayerView, this.mapView);
|
301
|
-
}
|
302
|
-
this.selectionSetChange.emit(ids.length);
|
303
|
-
}
|
304
|
-
/**
|
305
|
-
* Query the selectLayerView based on any user drawn geometries or buffers
|
306
|
-
*
|
307
|
-
* @param geometries Array of geometries used for the selection of ids from the select layer view
|
308
|
-
*
|
309
|
-
* @returns Promise when the selection is complete and the graphics have been highlighted
|
310
|
-
*/
|
311
|
-
async _selectFeatures(geometries) {
|
312
|
-
this._selectedIds = await queryObjectIds(geometries, this.selectLayerView.layer);
|
313
|
-
// Add geometries used for selecting features as graphics
|
314
|
-
this._drawTools.graphics = this.geometries.map(geom => {
|
315
|
-
var _a, _b, _c;
|
316
|
-
const props = {
|
317
|
-
"geometry": geom,
|
318
|
-
"symbol": geom.type === "point" ?
|
319
|
-
(_a = this._drawTools) === null || _a === void 0 ? void 0 : _a.pointSymbol : geom.type === "polyline" ?
|
320
|
-
(_b = this._drawTools) === null || _b === void 0 ? void 0 : _b.polylineSymbol : geom.type === "polygon" ?
|
321
|
-
(_c = this._drawTools) === null || _c === void 0 ? void 0 : _c.polygonSymbol : undefined
|
322
|
-
};
|
323
|
-
return new this.Graphic(props);
|
324
|
-
});
|
325
|
-
void this._highlightFeatures(this._selectedIds);
|
326
|
-
}
|
327
|
-
/**
|
328
|
-
* Query the selectLayerView based on any user drawn geometries or buffers
|
329
|
-
*
|
330
|
-
* @param evt CustomEvent that contains the result of the buffer
|
331
|
-
*
|
332
|
-
* @protected
|
333
|
-
*/
|
334
|
-
async _bufferComplete(evt) {
|
335
|
-
this._bufferGeometry = Array.isArray(evt.detail) ?
|
336
|
-
evt.detail[0] : evt.detail;
|
337
|
-
if (this._bufferGeometry) {
|
338
|
-
// Create a symbol for rendering the graphic
|
339
|
-
const symbol = {
|
340
|
-
type: "simple-fill",
|
341
|
-
color: [227, 139, 79, 0.8],
|
342
|
-
outline: {
|
343
|
-
color: [255, 255, 255],
|
344
|
-
width: 1
|
345
|
-
}
|
346
|
-
};
|
347
|
-
// Add the geometry and symbol to a new graphic
|
348
|
-
const polygonGraphic = new this.Graphic({
|
349
|
-
geometry: this._bufferGeometry,
|
350
|
-
symbol
|
351
|
-
});
|
352
|
-
this._bufferGraphicsLayer.removeAll();
|
353
|
-
this._bufferGraphicsLayer.add(polygonGraphic);
|
354
|
-
void this._selectFeatures([this._bufferGeometry]);
|
355
|
-
void this.mapView.goTo(polygonGraphic.geometry.extent);
|
356
|
-
}
|
357
|
-
else {
|
358
|
-
if (this._bufferGraphicsLayer) {
|
359
|
-
this._bufferGraphicsLayer.removeAll();
|
360
|
-
}
|
361
|
-
void this._geomQuery(this.geometries);
|
362
|
-
}
|
363
|
-
}
|
364
|
-
/**
|
365
|
-
* Fetch a single geometry for each potential geometry type
|
366
|
-
*
|
367
|
-
* @param geometries All current selection geometries
|
368
|
-
*
|
369
|
-
* @protected
|
370
|
-
*/
|
371
|
-
_geomQuery(geometries) {
|
372
|
-
const queryGeoms = getQueryGeoms(geometries, this._geometryEngine);
|
373
|
-
return this._selectFeatures(queryGeoms);
|
374
|
-
}
|
375
|
-
/**
|
376
|
-
* Clear all stored values and general state for the component
|
377
|
-
*
|
378
|
-
* @param clearSearchWidget Optional boolean for clearing the search widget (default is true)
|
379
|
-
* @param clearLabel Optional boolean for clearing the search label (default is true)
|
380
|
-
*
|
381
|
-
* @protected
|
382
|
-
*/
|
383
|
-
async _clearResults(clearSearchWidget = true, clearLabel = true) {
|
384
|
-
var _a;
|
385
|
-
this._selectedIds = [];
|
386
|
-
if (clearLabel) {
|
387
|
-
this._selectionLabel = "";
|
388
|
-
}
|
389
|
-
if (this._bufferGraphicsLayer) {
|
390
|
-
this._bufferGraphicsLayer.removeAll();
|
391
|
-
}
|
392
|
-
if (clearSearchWidget && this._searchWidget) {
|
393
|
-
this._searchWidget.clear();
|
394
|
-
}
|
395
|
-
(_a = state.highlightHandle) === null || _a === void 0 ? void 0 : _a.remove();
|
396
|
-
// for sketch
|
397
|
-
if (this._drawTools) {
|
398
|
-
void this._drawTools.clear();
|
399
|
-
}
|
400
|
-
this.selectionSetChange.emit(this._selectedIds.length);
|
401
|
-
}
|
402
|
-
/**
|
403
|
-
* Fetch a single geometry for the current geometry type
|
404
|
-
*
|
405
|
-
* @param type worflow type
|
406
|
-
* @param graphics graphics to be used for selection
|
407
|
-
* @param label selection label
|
408
|
-
*
|
409
|
-
* @protected
|
410
|
-
*/
|
411
|
-
_updateSelection(type, graphics, label) {
|
412
|
-
this.geometries = Array.isArray(graphics) ? graphics.map(g => g.geometry) : this.geometries;
|
413
|
-
this._workflowType = type;
|
414
|
-
this._selectionLabel = label;
|
415
|
-
}
|
416
|
-
/**
|
417
|
-
* Fetches the component's translations
|
418
|
-
*
|
419
|
-
* @protected
|
420
|
-
*/
|
421
|
-
async _getTranslations() {
|
422
|
-
const translations = await getLocaleComponentStrings(this.el);
|
423
|
-
this._translations = translations[0];
|
424
|
-
}
|
425
|
-
get el() { return this; }
|
426
|
-
static get watchers() { return {
|
427
|
-
"geometries": ["watchGeometriesHandler"],
|
428
|
-
"_workflowType": ["workflowTypeHandler"]
|
429
|
-
}; }
|
430
|
-
static get style() { return mapSelectToolsCss; }
|
431
|
-
}, [4, "map-select-tools", {
|
432
|
-
"mapView": [16],
|
433
|
-
"selectLayerView": [16],
|
434
|
-
"geometries": [16],
|
435
|
-
"selectionSet": [16],
|
436
|
-
"isUpdate": [4, "is-update"],
|
437
|
-
"_searchTerm": [32],
|
438
|
-
"_translations": [32],
|
439
|
-
"_workflowType": [32],
|
440
|
-
"clearSelection": [64],
|
441
|
-
"getSelection": [64]
|
442
|
-
}, [[8, "sketchGraphicsChange", "sketchGraphicsChange"], [8, "refineSelectionGraphicsChange", "refineSelectionGraphicsChange"]]]);
|
443
|
-
function defineCustomElement() {
|
444
|
-
if (typeof customElements === "undefined") {
|
445
|
-
return;
|
446
|
-
}
|
447
|
-
const components = ["map-select-tools", "buffer-tools", "calcite-action", "calcite-chip", "calcite-combobox", "calcite-combobox-item", "calcite-graph", "calcite-icon", "calcite-input", "calcite-label", "calcite-loader", "calcite-option", "calcite-progress", "calcite-radio-group", "calcite-radio-group-item", "calcite-select", "calcite-slider", "map-draw-tools", "map-layer-picker", "refine-selection-tools"];
|
448
|
-
components.forEach(tagName => { switch (tagName) {
|
449
|
-
case "map-select-tools":
|
450
|
-
if (!customElements.get(tagName)) {
|
451
|
-
customElements.define(tagName, MapSelectTools);
|
452
|
-
}
|
453
|
-
break;
|
454
|
-
case "buffer-tools":
|
455
|
-
if (!customElements.get(tagName)) {
|
456
|
-
defineCustomElement$j();
|
457
|
-
}
|
458
|
-
break;
|
459
|
-
case "calcite-action":
|
460
|
-
if (!customElements.get(tagName)) {
|
461
|
-
defineCustomElement$i();
|
462
|
-
}
|
463
|
-
break;
|
464
|
-
case "calcite-chip":
|
465
|
-
if (!customElements.get(tagName)) {
|
466
|
-
defineCustomElement$h();
|
467
|
-
}
|
468
|
-
break;
|
469
|
-
case "calcite-combobox":
|
470
|
-
if (!customElements.get(tagName)) {
|
471
|
-
defineCustomElement$g();
|
472
|
-
}
|
473
|
-
break;
|
474
|
-
case "calcite-combobox-item":
|
475
|
-
if (!customElements.get(tagName)) {
|
476
|
-
defineCustomElement$f();
|
477
|
-
}
|
478
|
-
break;
|
479
|
-
case "calcite-graph":
|
480
|
-
if (!customElements.get(tagName)) {
|
481
|
-
defineCustomElement$e();
|
482
|
-
}
|
483
|
-
break;
|
484
|
-
case "calcite-icon":
|
485
|
-
if (!customElements.get(tagName)) {
|
486
|
-
defineCustomElement$d();
|
487
|
-
}
|
488
|
-
break;
|
489
|
-
case "calcite-input":
|
490
|
-
if (!customElements.get(tagName)) {
|
491
|
-
defineCustomElement$c();
|
492
|
-
}
|
493
|
-
break;
|
494
|
-
case "calcite-label":
|
495
|
-
if (!customElements.get(tagName)) {
|
496
|
-
defineCustomElement$b();
|
497
|
-
}
|
498
|
-
break;
|
499
|
-
case "calcite-loader":
|
500
|
-
if (!customElements.get(tagName)) {
|
501
|
-
defineCustomElement$a();
|
502
|
-
}
|
503
|
-
break;
|
504
|
-
case "calcite-option":
|
505
|
-
if (!customElements.get(tagName)) {
|
506
|
-
defineCustomElement$9();
|
507
|
-
}
|
508
|
-
break;
|
509
|
-
case "calcite-progress":
|
510
|
-
if (!customElements.get(tagName)) {
|
511
|
-
defineCustomElement$8();
|
512
|
-
}
|
513
|
-
break;
|
514
|
-
case "calcite-radio-group":
|
515
|
-
if (!customElements.get(tagName)) {
|
516
|
-
defineCustomElement$7();
|
517
|
-
}
|
518
|
-
break;
|
519
|
-
case "calcite-radio-group-item":
|
520
|
-
if (!customElements.get(tagName)) {
|
521
|
-
defineCustomElement$6();
|
522
|
-
}
|
523
|
-
break;
|
524
|
-
case "calcite-select":
|
525
|
-
if (!customElements.get(tagName)) {
|
526
|
-
defineCustomElement$5();
|
527
|
-
}
|
528
|
-
break;
|
529
|
-
case "calcite-slider":
|
530
|
-
if (!customElements.get(tagName)) {
|
531
|
-
defineCustomElement$4();
|
532
|
-
}
|
533
|
-
break;
|
534
|
-
case "map-draw-tools":
|
535
|
-
if (!customElements.get(tagName)) {
|
536
|
-
defineCustomElement$3();
|
537
|
-
}
|
538
|
-
break;
|
539
|
-
case "map-layer-picker":
|
540
|
-
if (!customElements.get(tagName)) {
|
541
|
-
defineCustomElement$2();
|
542
|
-
}
|
543
|
-
break;
|
544
|
-
case "refine-selection-tools":
|
545
|
-
if (!customElements.get(tagName)) {
|
546
|
-
defineCustomElement$1();
|
547
|
-
}
|
548
|
-
break;
|
549
|
-
} });
|
550
|
-
}
|
551
|
-
defineCustomElement();
|
552
|
-
|
553
|
-
export { MapSelectTools as M, defineCustomElement as d };
|
554
|
-
|
555
|
-
//# sourceMappingURL=map-select-tools2.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"file":"map-select-tools2.js","mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,MAAM,iBAAiB,GAAG,qfAAqf;;MC8BlgB,cAAc;;;;;;;;;IAuIf,iBAAY,GAAa,EAAE,CAAC;;;;IAK5B,oBAAe,GAAG,EAAE,CAAC;;;;;oBAvGZ,KAAK;;;;;;;;;;;;;;;EAqHxB,MAAM,sBAAsB,CAC1B,QAA2B,EAC3B,QAA2B;IAE3B,IAAI,QAAQ,KAAK,QAAQ,EAAE;MACzB,IAAI,QAAQ,CAAC,MAAM,GAAG,CAAC,EAAE;QACvB,OAAO,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;OACzC;WAAM,IAAI,QAAQ,CAAC,MAAM,KAAK,CAAC,EAAE;QAChC,OAAO,IAAI,CAAC,aAAa,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;OACvC;KACF;GACF;;;;;;EAQD,MAAM,mBAAmB,CACvB,QAAuB,EACvB,QAAuB;IAEvB,IAAI,QAAQ,KAAK,QAAQ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AI,CAAC,oBAAoB,EAAE;MAC7B,IAAI,CAAC,oBAAoB,CAAC,SAAS,EAAE,CAAC;KACvC;IAED,IAAI,iBAAiB,IAAI,IAAI,CAAC,aAAa,EAAE;MAC3C,IAAI,CAAC,aAAa,CAAC,KAAK,EAAE,CAAC;KAC5B;IAED,MAAA,KAAK,CAAC,eAAe,0CAAE,MAAM,EAAE,CAAC;;IAGhC,IAAI,IAAI,CAAC,UAAU,EAAE;MACnB,KAAK,IAAI,CAAC,UAAU,CAAC,KAAK,EAAE,CAAC;KAC9B;IACD,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC;GACxD;;;;;;;;;;EAWS,gBAAgB,CACxB,IAAmB,EACnB,QAA0B,EAC1B,KAAa;IAEb,IAAI,CAAC,UAAU,GAAG,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,GAAG,QAAQ,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,GAAG,IAAI,CAAC,UAAU,CAAC;IAC5F,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC;IAC1B,IAAI,CAAC,eAAe,GAAG,KAAK,CAAC;GAC9B;;;;;;EAOS,MAAM,gBAAgB;IAC9B,MAAM,YAAY,GAAG,MAAM,yBAAyB,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAC9D,IAAI,CAAC,aAAa,GAAG,YAAY,CAAC,CAAC,CAA8B,CAAC;GACnE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["./src/components/map-select-tools/map-select-tools.css?tag=map-select-tools","./src/components/map-select-tools/map-select-tools.tsx"],"sourcesContent":["/** @license\r\n * Copyright 2022 Esri\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\n\r\n:host {\r\n display: block;\r\n}\r\n\r\n.div-visible {\r\n display: inherit;\r\n}\r\n\r\n.div-visible-search {\r\n display: flex;\r\n height: 44px;\r\n align-items: center;\r\n padding-bottom: 0;\r\n}\r\n\r\n.div-not-visible {\r\n display: none;\r\n}\r\n\r\n.padding-bottom-1 {\r\n padding-bottom: 1rem;\r\n}\r\n\r\n.search-widget {\r\n width: 100% !important;\r\n border: 1px solid var(--calcite-ui-border-input);\r\n}\r\n\r\n.w-100 {\r\n width: 100%;\r\n}\r\n\r\n.w-50 {\r\n width: 50%;\r\n}\r\n\r\n.search-distance-container {\r\n padding-top: \"1rem\" !important;\r\n}\r\n\r\n.end-border {\r\n border-inline-end: 1px solid var(--calcite-ui-border-2);\r\n}\r\n","/** @license\r\n * Copyright 2022 Esri\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\n\r\nimport { Component, Element, Event, EventEmitter, Host, h, Method, Listen, Prop, State, VNode, Watch } from \"@stencil/core\";\r\nimport { loadModules } from \"../../utils/loadModules\";\r\nimport { highlightFeatures, goToSelection } from \"../../utils/mapViewUtils\";\r\nimport { getQueryGeoms, queryObjectIds } from \"../../utils/queryUtils\";\r\nimport { EWorkflowType, ESelectionMode, ISelectionSet, ERefineMode } from \"../../utils/interfaces\";\r\nimport state from \"../../utils/publicNotificationStore\";\r\nimport MapSelectTools_T9n from \"../../assets/t9n/map-select-tools/resources.json\";\r\nimport { getLocaleComponentStrings } from \"../../utils/locale\";\r\n\r\n@Component({\r\n tag: \"map-select-tools\",\r\n styleUrl: \"map-select-tools.css\",\r\n shadow: false,\r\n})\r\nexport class MapSelectTools {\r\n //--------------------------------------------------------------------------\r\n //\r\n // Host element access\r\n //\r\n //--------------------------------------------------------------------------\r\n @Element() el: HTMLElement;\r\n\r\n //--------------------------------------------------------------------------\r\n //\r\n // Properties (public)\r\n //\r\n //--------------------------------------------------------------------------\r\n\r\n /**\r\n * esri/views/View: https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html\r\n */\r\n @Prop() mapView: __esri.MapView;\r\n\r\n /**\r\n * esri/views/layers/FeatureLayerView: https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-FeatureLayerView.html\r\n */\r\n @Prop() selectLayerView: __esri.FeatureLayerView;\r\n\r\n /**\r\n * esri/geometry: https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry.html\r\n */\r\n @Prop() geometries: __esri.Geometry[];\r\n\r\n /**\r\n * utils/interfaces/ISelectionSet: Used to store key details about any selections that have been made.\r\n */\r\n @Prop({reflect: false}) selectionSet: ISelectionSet;\r\n\r\n /**\r\n * boolean: When true a new label is not generated for the stored selection set\r\n */\r\n @Prop() isUpdate = false;\r\n\r\n //--------------------------------------------------------------------------\r\n //\r\n // Properties (protected)\r\n //\r\n //--------------------------------------------------------------------------\r\n\r\n /**\r\n * string: Text entered by the end user.\r\n * Used to search against the locator.\r\n */\r\n @State() _searchTerm: string;\r\n\r\n /**\r\n * Contains the translations for this component.\r\n * All UI strings should be defined here.\r\n */\r\n @State() protected _translations: typeof MapSelectTools_T9n;\r\n\r\n /**\r\n * EWorkflowType: \"SEARCH\", \"SELECT\", \"SKETCH\", \"REFINE\"\r\n */\r\n @State() _workflowType: EWorkflowType;\r\n\r\n /**\r\n * esri/geometry/Geometry: https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Geometry.html\r\n */\r\n protected Geometry: typeof __esri.Geometry;\r\n\r\n /**\r\n * esri/Graphic: https://developers.arcgis.com/javascript/latest/api-reference/esri-Graphic.html\r\n */\r\n protected Graphic: typeof __esri.Graphic;\r\n\r\n /**\r\n * esri/layers/GraphicsLayer: https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GraphicsLayer.html\r\n */\r\n protected GraphicsLayer: typeof __esri.GraphicsLayer;\r\n\r\n /**\r\n * esri/widgets/Search: https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search.html\r\n */\r\n protected Search: typeof __esri.widgetsSearch;\r\n\r\n /**\r\n * esri/geometry: https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry.html\r\n */\r\n protected _bufferGeometry: __esri.Geometry;\r\n\r\n /**\r\n * esri/layers/GraphicsLayer: https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GraphicsLayer.html\r\n */\r\n protected _bufferGraphicsLayer: __esri.GraphicsLayer;\r\n\r\n /**\r\n * HTMLBufferToolsElement: The container div for the buffer tools\r\n */\r\n protected _bufferTools: HTMLBufferToolsElement;\r\n\r\n /**\r\n * HTMLMapDrawToolsElement: The container div for the sketch widget\r\n */\r\n protected _drawTools: HTMLMapDrawToolsElement;\r\n\r\n /**\r\n * esri/geometry/geometryEngine: https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-geometryEngine.html\r\n */\r\n protected _geometryEngine: __esri.geometryEngine;\r\n\r\n /**\r\n * esri/views/layers/FeatureLayerView: https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-FeatureLayerView.html\r\n */\r\n protected _refineSelectLayers: __esri.FeatureLayerView[];\r\n\r\n /**\r\n * HTMLRefineSelectionToolsElement: The container div for the sketch widget\r\n */\r\n protected _refineTools: HTMLRefineSelectionToolsElement;\r\n\r\n /**\r\n * HTMLElement: The container div for the search widget\r\n */\r\n protected _searchElement: HTMLElement;\r\n\r\n /**\r\n * An array of objects representing the results of search\r\n */\r\n protected _searchResult: any;\r\n\r\n /**\r\n * esri/widgets/Search: https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search.html\r\n */\r\n protected _searchWidget: __esri.widgetsSearch;\r\n\r\n /**\r\n * number[]: the oids of the selected features\r\n */\r\n protected _selectedIds: number[] = [];\r\n\r\n /**\r\n * string: A label to help uniquely identify the selection set\r\n */\r\n protected _selectionLabel = \"\";\r\n\r\n //--------------------------------------------------------------------------\r\n //\r\n // Watch handlers\r\n //\r\n //--------------------------------------------------------------------------\r\n\r\n /**\r\n * Called each time the geometries prop is changed.\r\n *\r\n * @returns Promise when complete\r\n */\r\n @Watch(\"geometries\")\r\n async watchGeometriesHandler(\r\n newValue: __esri.Geometry[],\r\n oldValue: __esri.Geometry[]\r\n ): Promise<void> {\r\n if (newValue !== oldValue) {\r\n if (newValue.length > 0) {\r\n return this._geomQuery(this.geometries);\r\n } else if (newValue.length === 0) {\r\n return this._clearResults(true, true);\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Called each time the workflowType prop is changed and emits the workflowTypeChange event.\r\n *\r\n * @returns Promise when complete\r\n */\r\n @Watch(\"_workflowType\")\r\n async workflowTypeHandler(\r\n newValue: EWorkflowType,\r\n oldValue: EWorkflowType\r\n ): Promise<void> {\r\n if (newValue !== oldValue) {\r\n this.workflowTypeChange.emit(newValue);\r\n }\r\n }\r\n\r\n //--------------------------------------------------------------------------\r\n //\r\n // Methods (public)\r\n //\r\n //--------------------------------------------------------------------------\r\n\r\n /**\r\n * Clear any selection results\r\n *\r\n * @returns Promise when the results have been cleared\r\n */\r\n @Method()\r\n async clearSelection(): Promise<void> {\r\n return this._clearResults();\r\n }\r\n\r\n /**\r\n * Get the new selection set\r\n *\r\n * @returns Promise with the new selection set\r\n */\r\n @Method()\r\n async getSelection(): Promise<ISelectionSet> {\r\n return {\r\n id: this.isUpdate ? this.selectionSet.id : Date.now(),\r\n workflowType: this._workflowType,\r\n searchResult: this._searchResult,\r\n buffer: this._bufferGeometry,\r\n distance: this._bufferTools.distance,\r\n download: true,\r\n unit: this._bufferTools.unit,\r\n label: this._workflowType === EWorkflowType.SEARCH ?\r\n this._selectionLabel : `${this._selectionLabel} ${this._bufferTools.distance} ${this._bufferTools.unit}`,\r\n selectedIds: this._selectedIds,\r\n layerView: this.selectLayerView,\r\n geometries: this.geometries,\r\n refineSelectLayers: this._refineTools.layerViews\r\n } as ISelectionSet;\r\n }\r\n\r\n //--------------------------------------------------------------------------\r\n //\r\n // Events (public)\r\n //\r\n //--------------------------------------------------------------------------\r\n\r\n /**\r\n * Emitted on demand when the selection set changes.\r\n *\r\n */\r\n @Event() selectionSetChange: EventEmitter<number>;\r\n\r\n /**\r\n * Emitted on demand when the workflow type changes.\r\n *\r\n */\r\n @Event() workflowTypeChange: EventEmitter<EWorkflowType>;\r\n\r\n /**\r\n * Listen to changes in the sketch graphics\r\n *\r\n */\r\n @Listen(\"sketchGraphicsChange\", { target: \"window\" })\r\n sketchGraphicsChange(event: CustomEvent): void {\r\n this._updateSelection(EWorkflowType.SKETCH, event.detail, this._translations.sketch);\r\n }\r\n\r\n /**\r\n * Listen to changes in the refine graphics\r\n *\r\n */\r\n @Listen(\"refineSelectionGraphicsChange\", { target: \"window\" })\r\n refineSelectionGraphicsChange(event: CustomEvent): Promise<void> {\r\n const graphics = event.detail;\r\n\r\n this._updateSelection(EWorkflowType.SELECT, graphics, this._translations.select);\r\n // Using OIDs to avoid issue with points\r\n const oids = Array.isArray(graphics) ? graphics.map(g => g.attributes[g?.layer?.objectIdField]) : [];\r\n return this._highlightFeatures(oids);\r\n }\r\n\r\n //--------------------------------------------------------------------------\r\n //\r\n // Functions (lifecycle)\r\n //\r\n //--------------------------------------------------------------------------\r\n\r\n /**\r\n * StencilJS: Called once just after the component is first connected to the DOM.\r\n */\r\n async componentWillLoad(): Promise<void> {\r\n await this._getTranslations();\r\n await this._initModules();\r\n }\r\n\r\n /**\r\n * StencilJS: Called once just after the component is fully loaded and the first render() occurs.\r\n */\r\n async componentDidLoad(): Promise<void> {\r\n return this._init();\r\n }\r\n\r\n /**\r\n * Renders the component.\r\n */\r\n render(): VNode {\r\n const searchEnabled = this._workflowType === EWorkflowType.SEARCH;\r\n const showSearchClass = searchEnabled ? \" div-visible-search\" : \" div-not-visible\";\r\n\r\n const drawEnabled = this._workflowType === EWorkflowType.SKETCH;\r\n const showDrawToolsClass = drawEnabled ? \" div-visible\" : \" div-not-visible\";\r\n\r\n const selectEnabled = this._workflowType === EWorkflowType.SELECT;\r\n const showSelectToolsClass = selectEnabled ? \" div-visible\" : \" div-not-visible\";\r\n\r\n return (\r\n <Host>\r\n <div class=\"padding-bottom-1\">\r\n <calcite-radio-group\r\n class=\"w-100\"\r\n onCalciteRadioGroupChange={(evt) => this._workflowChange(evt)}\r\n >\r\n <calcite-radio-group-item\r\n checked={searchEnabled}\r\n class=\"w-50 end-border\"\r\n value={EWorkflowType.SEARCH}\r\n >\r\n {this._translations.search}\r\n </calcite-radio-group-item>\r\n <calcite-radio-group-item\r\n checked={selectEnabled}\r\n class=\"w-50 end-border\"\r\n value={EWorkflowType.SELECT}\r\n >\r\n {this._translations.select}\r\n </calcite-radio-group-item>\r\n <calcite-radio-group-item\r\n checked={drawEnabled}\r\n class=\"w-50\"\r\n value={EWorkflowType.SKETCH}\r\n >\r\n {this._translations.sketch}\r\n </calcite-radio-group-item>\r\n </calcite-radio-group>\r\n </div>\r\n <div class={showSearchClass}>\r\n <div class=\"search-widget\" ref={(el) => { this._searchElement = el }} />\r\n </div>\r\n <map-draw-tools\r\n active={drawEnabled}\r\n border={true}\r\n class={showDrawToolsClass}\r\n mapView={this.mapView}\r\n ref={(el) => { this._drawTools = el}}\r\n />\r\n <refine-selection-tools\r\n active={selectEnabled}\r\n border={true}\r\n class={showSelectToolsClass}\r\n layerViews={this._refineSelectLayers}\r\n mapView={this.mapView}\r\n mode={ESelectionMode.ADD}\r\n ref={(el) => { this._refineTools = el }}\r\n refineMode={ERefineMode.SUBSET}\r\n />\r\n <calcite-label style={{ \"display\": \"flex\", \"padding-top\": \"1rem\" }}>\r\n {this._translations?.searchDistance}\r\n <buffer-tools\r\n distance={this.selectionSet?.distance}\r\n geometries={this.geometries}\r\n onBufferComplete={(evt) => this._bufferComplete(evt)}\r\n ref={(el) => this._bufferTools = el}\r\n unit={this.selectionSet?.unit}\r\n />\r\n </calcite-label>\r\n <slot />\r\n </Host>\r\n );\r\n }\r\n\r\n //--------------------------------------------------------------------------\r\n //\r\n // Functions (protected)\r\n //\r\n //--------------------------------------------------------------------------\r\n\r\n /**\r\n * Load esri javascript api modules\r\n *\r\n * @returns Promise resolving when function is done\r\n *\r\n * @protected\r\n */\r\n protected async _initModules(): Promise<void> {\r\n const [GraphicsLayer, Graphic, Search, Geometry, geometryEngine]: [\r\n __esri.GraphicsLayerConstructor,\r\n __esri.GraphicConstructor,\r\n __esri.widgetsSearchConstructor,\r\n __esri.GeometryConstructor,\r\n __esri.geometryEngine\r\n ] = await loadModules([\r\n \"esri/layers/GraphicsLayer\",\r\n \"esri/Graphic\",\r\n \"esri/widgets/Search\",\r\n \"esri/geometry/Geometry\",\r\n \"esri/geometry/geometryEngine\"\r\n ]);\r\n this.GraphicsLayer = GraphicsLayer;\r\n this.Graphic = Graphic;\r\n this.Search = Search;\r\n this.Geometry = Geometry;\r\n this._geometryEngine = geometryEngine;\r\n }\r\n\r\n /**\r\n * Initialize the graphics layer, selection set, and search widget\r\n *\r\n * @returns Promise when the operation has completed\r\n */\r\n protected async _init(): Promise<void> {\r\n this._initGraphicsLayer();\r\n this._initSelectionSet();\r\n this._initSearchWidget();\r\n }\r\n\r\n /**\r\n * Initialize the state of the component with any stored values in a selection set\r\n *\r\n * @protected\r\n */\r\n protected _initSelectionSet(): void {\r\n if (this.selectionSet) {\r\n this._searchTerm = this.selectionSet?.searchResult?.name;\r\n this._workflowType = this.selectionSet?.workflowType;\r\n this._searchResult = this.selectionSet?.searchResult;\r\n this._refineSelectLayers = this.selectionSet?.refineSelectLayers;\r\n this.geometries = [\r\n ...this.selectionSet?.geometries\r\n ];\r\n // reset selection label base\r\n this._selectionLabel = this._workflowType === EWorkflowType.SKETCH ?\r\n this._translations.sketch : this._workflowType === EWorkflowType.SELECT ?\r\n this._translations.select : this.selectionSet?.label;\r\n\r\n void goToSelection(this.selectionSet.selectedIds, this.selectionSet.layerView, this.mapView, false);\r\n } else {\r\n this._workflowType = EWorkflowType.SEARCH;\r\n }\r\n }\r\n\r\n /**\r\n * Initialize the search widget\r\n *\r\n * @protected\r\n */\r\n protected _initSearchWidget(): void {\r\n if (this.mapView && this._searchElement) {\r\n const searchOptions: __esri.widgetsSearchProperties = {\r\n view: this.mapView,\r\n container: this._searchElement,\r\n searchTerm: this._searchTerm\r\n };\r\n\r\n this._searchWidget = new this.Search(searchOptions);\r\n\r\n this._searchWidget.on(\"search-clear\", () => {\r\n void this._clearResults(false);\r\n });\r\n\r\n this._searchWidget.on(\"select-result\", (searchResults) => {\r\n void this._clearResults(false);\r\n if (searchResults.result) {\r\n this._searchResult = searchResults.result;\r\n this._updateSelection(\r\n EWorkflowType.SEARCH,\r\n [searchResults.result.feature],\r\n searchResults?.result?.name\r\n );\r\n }\r\n });\r\n }\r\n }\r\n\r\n /**\r\n * Initialize the graphics layer used to store any buffer grapghics\r\n *\r\n * @protected\r\n */\r\n protected _initGraphicsLayer(): void {\r\n const title = this._translations.bufferLayer;\r\n\r\n const bufferIndex = this.mapView.map.layers.findIndex((l) => l.title === title);\r\n if (bufferIndex > -1) {\r\n this._bufferGraphicsLayer = this.mapView.map.layers.getItemAt(bufferIndex) as __esri.GraphicsLayer;\r\n } else {\r\n this._bufferGraphicsLayer = new this.GraphicsLayer({ title });\r\n state.managedLayers.push(title);\r\n const sketchIndex = this.mapView.map.layers.findIndex((l) => l.title === this._translations.sketchLayer);\r\n if (sketchIndex > -1) {\r\n this.mapView.map.layers.add(this._bufferGraphicsLayer, sketchIndex);\r\n } else {\r\n this.mapView.map.layers.add(this._bufferGraphicsLayer);\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Store workflow type change\r\n *\r\n * @protected\r\n */\r\n protected _workflowChange(evt: CustomEvent): void {\r\n this._workflowType = evt.detail;\r\n }\r\n\r\n /**\r\n * Highlight the features in the map\r\n *\r\n * @protected\r\n */\r\n protected async _highlightFeatures(\r\n ids: number[]\r\n ): Promise<void> {\r\n state.highlightHandle?.remove();\r\n if (ids.length > 0) {\r\n state.highlightHandle = await highlightFeatures(\r\n ids,\r\n this.selectLayerView,\r\n this.mapView\r\n );\r\n }\r\n this.selectionSetChange.emit(ids.length);\r\n }\r\n\r\n /**\r\n * Query the selectLayerView based on any user drawn geometries or buffers\r\n *\r\n * @param geometries Array of geometries used for the selection of ids from the select layer view\r\n *\r\n * @returns Promise when the selection is complete and the graphics have been highlighted\r\n */\r\n protected async _selectFeatures(\r\n geometries: __esri.Geometry[]\r\n ): Promise<void> {\r\n this._selectedIds = await queryObjectIds(\r\n geometries,\r\n this.selectLayerView.layer\r\n );\r\n // Add geometries used for selecting features as graphics\r\n this._drawTools.graphics = this.geometries.map(geom => {\r\n const props = {\r\n \"geometry\": geom,\r\n \"symbol\": geom.type === \"point\" ?\r\n this._drawTools?.pointSymbol : geom.type === \"polyline\" ?\r\n this._drawTools?.polylineSymbol : geom.type === \"polygon\" ?\r\n this._drawTools?.polygonSymbol : undefined\r\n };\r\n return new this.Graphic(props)\r\n });\r\n void this._highlightFeatures(this._selectedIds);\r\n }\r\n\r\n /**\r\n * Query the selectLayerView based on any user drawn geometries or buffers\r\n *\r\n * @param evt CustomEvent that contains the result of the buffer\r\n *\r\n * @protected\r\n */\r\n protected async _bufferComplete(\r\n evt: CustomEvent\r\n ): Promise<void> {\r\n this._bufferGeometry = Array.isArray(evt.detail) ?\r\n evt.detail[0] : evt.detail;\r\n\r\n if (this._bufferGeometry) {\r\n // Create a symbol for rendering the graphic\r\n const symbol = {\r\n type: \"simple-fill\",\r\n color: [227, 139, 79, 0.8],\r\n outline: {\r\n color: [255, 255, 255],\r\n width: 1\r\n }\r\n };\r\n\r\n // Add the geometry and symbol to a new graphic\r\n const polygonGraphic = new this.Graphic({\r\n geometry: this._bufferGeometry,\r\n symbol\r\n });\r\n\r\n this._bufferGraphicsLayer.removeAll();\r\n this._bufferGraphicsLayer.add(polygonGraphic);\r\n void this._selectFeatures([this._bufferGeometry]);\r\n void this.mapView.goTo(polygonGraphic.geometry.extent);\r\n } else {\r\n if (this._bufferGraphicsLayer) {\r\n this._bufferGraphicsLayer.removeAll();\r\n }\r\n void this._geomQuery(this.geometries);\r\n }\r\n }\r\n\r\n /**\r\n * Fetch a single geometry for each potential geometry type\r\n *\r\n * @param geometries All current selection geometries\r\n *\r\n * @protected\r\n */\r\n protected _geomQuery(\r\n geometries: __esri.Geometry[]\r\n ): Promise<void> {\r\n const queryGeoms = getQueryGeoms(geometries, this._geometryEngine);\r\n return this._selectFeatures(queryGeoms);\r\n }\r\n\r\n /**\r\n * Clear all stored values and general state for the component\r\n *\r\n * @param clearSearchWidget Optional boolean for clearing the search widget (default is true)\r\n * @param clearLabel Optional boolean for clearing the search label (default is true)\r\n *\r\n * @protected\r\n */\r\n protected async _clearResults(\r\n clearSearchWidget = true,\r\n clearLabel = true\r\n ): Promise<void> {\r\n this._selectedIds = [];\r\n\r\n if (clearLabel) {\r\n this._selectionLabel = \"\";\r\n }\r\n\r\n if (this._bufferGraphicsLayer) {\r\n this._bufferGraphicsLayer.removeAll();\r\n }\r\n\r\n if (clearSearchWidget && this._searchWidget) {\r\n this._searchWidget.clear();\r\n }\r\n\r\n state.highlightHandle?.remove();\r\n\r\n // for sketch\r\n if (this._drawTools) {\r\n void this._drawTools.clear();\r\n }\r\n this.selectionSetChange.emit(this._selectedIds.length);\r\n }\r\n\r\n /**\r\n * Fetch a single geometry for the current geometry type\r\n *\r\n * @param type worflow type\r\n * @param graphics graphics to be used for selection\r\n * @param label selection label\r\n *\r\n * @protected\r\n */\r\n protected _updateSelection(\r\n type: EWorkflowType,\r\n graphics: __esri.Graphic[],\r\n label: string\r\n ): void {\r\n this.geometries = Array.isArray(graphics) ? graphics.map(g => g.geometry) : this.geometries;\r\n this._workflowType = type;\r\n this._selectionLabel = label;\r\n }\r\n\r\n /**\r\n * Fetches the component's translations\r\n *\r\n * @protected\r\n */\r\n protected async _getTranslations(): Promise<void> {\r\n const translations = await getLocaleComponentStrings(this.el);\r\n this._translations = translations[0] as typeof MapSelectTools_T9n;\r\n }\r\n}\r\n"],"version":3}
|