@esri/solutions-components 0.3.2 → 0.3.4
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/assets/t9n/public-notification/resources.json +4 -1
- package/dist/assets/t9n/public-notification/resources_en.json +4 -1
- package/dist/cjs/buffer-tools_6.cjs.entry.js +8 -7
- package/dist/cjs/calcite-combobox_3.cjs.entry.js +38 -25
- package/dist/cjs/calcite-input-message_5.cjs.entry.js +272 -21
- package/dist/cjs/{csvUtils-18a03353.js → csvUtils-83af7ae1.js} +5 -5
- package/dist/cjs/layer-table.cjs.entry.js +3 -3
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/map-search.cjs.entry.js +46 -7
- package/dist/cjs/{mapViewUtils-8ea9adc5.js → mapViewUtils-55ac76cb.js} +40 -25
- package/dist/cjs/public-notification.cjs.entry.js +101 -18
- package/dist/cjs/{publicNotificationStore-aca88430.js → publicNotificationStore-28a8759d.js} +3 -1
- package/dist/cjs/solutions-components.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +0 -5
- package/dist/collection/components/buffer-tools/buffer-tools.js +7 -6
- package/dist/collection/components/layer-table/layer-table.js +1 -1
- package/dist/collection/components/map-layer-picker/map-layer-picker.js +47 -29
- package/dist/collection/components/map-search/map-search.js +66 -7
- package/dist/collection/components/map-select-tools/map-select-tools.js +125 -8
- package/dist/collection/components/pdf-download/pdf-download.js +32 -8
- package/dist/collection/components/public-notification/public-notification.css +46 -41
- package/dist/collection/components/public-notification/public-notification.js +267 -19
- package/dist/collection/components/refine-selection/refine-selection.js +18 -1
- package/dist/collection/components/refine-selection-tools/refine-selection-tools.js +22 -5
- package/dist/{solutions-components/demos/config-pdf-download.html → collection/demos/buffer-tools.html} +13 -21
- package/dist/collection/demos/index.html +0 -24
- package/dist/collection/demos/map-draw-tools.html +17 -17
- package/dist/collection/demos/map-layer-picker.html +2 -0
- package/dist/collection/demos/map-search.html +16 -15
- package/dist/collection/demos/map-select-tools.html +16 -24
- package/dist/collection/demos/new-public-notification.html +46 -35
- package/dist/collection/demos/pdf-download.html +8 -1
- package/dist/collection/utils/csvUtils.js +4 -4
- package/dist/collection/utils/csvUtils.ts +6 -4
- package/dist/collection/utils/interfaces.ts +65 -1
- package/dist/collection/utils/mapViewUtils.js +36 -22
- package/dist/collection/utils/mapViewUtils.ts +50 -27
- package/dist/collection/utils/publicNotificationStore.js +3 -1
- package/dist/collection/utils/publicNotificationStore.ts +3 -1
- package/dist/collection/utils/queryUtils.js +2 -2
- package/dist/collection/utils/queryUtils.ts +2 -2
- package/dist/components/buffer-tools2.js +1 -1
- package/dist/components/csvUtils.js +4 -4
- package/dist/components/index.d.ts +0 -5
- package/dist/components/index.js +0 -5
- package/dist/components/layer-table.js +2 -3
- package/dist/components/map-layer-picker2.js +177 -28
- package/dist/components/map-search.js +47 -7
- package/dist/components/map-select-tools2.js +56 -11
- package/dist/components/pdf-download2.js +217 -8
- package/dist/components/public-notification.js +154 -55
- package/dist/components/publicNotificationStore.js +3 -1
- package/dist/components/queryUtils.js +3 -3
- package/dist/components/refine-selection-tools2.js +9 -8
- package/dist/components/refine-selection2.js +3 -1
- package/dist/esm/buffer-tools_6.entry.js +8 -7
- package/dist/esm/calcite-combobox_3.entry.js +38 -25
- package/dist/esm/calcite-input-message_5.entry.js +271 -20
- package/dist/esm/{csvUtils-edc0c2a8.js → csvUtils-eb231cfb.js} +5 -5
- package/dist/esm/layer-table.entry.js +3 -3
- package/dist/esm/loader.js +1 -1
- package/dist/esm/map-search.entry.js +46 -7
- package/dist/esm/{mapViewUtils-31d2c2bb.js → mapViewUtils-e5d8a1e1.js} +39 -25
- package/dist/esm/public-notification.entry.js +101 -18
- package/dist/esm/{publicNotificationStore-3e762eea.js → publicNotificationStore-8e9cb73b.js} +3 -1
- package/dist/esm/solutions-components.js +1 -1
- package/dist/{collection/demos/config-pdf-download.html → solutions-components/demos/buffer-tools.html} +13 -21
- package/dist/solutions-components/demos/index.html +0 -24
- package/dist/solutions-components/demos/map-draw-tools.html +17 -17
- package/dist/solutions-components/demos/map-layer-picker.html +2 -0
- package/dist/solutions-components/demos/map-search.html +16 -15
- package/dist/solutions-components/demos/map-select-tools.html +16 -24
- package/dist/solutions-components/demos/new-public-notification.html +46 -35
- package/dist/solutions-components/demos/pdf-download.html +8 -1
- package/dist/solutions-components/p-07593958.entry.js +6 -0
- package/dist/solutions-components/p-3fa9b3c8.js +36 -0
- package/dist/solutions-components/p-9b5a9117.entry.js +12 -0
- package/dist/solutions-components/{p-15cd8a97.js → p-9c1ebc90.js} +1 -1
- package/dist/solutions-components/{p-c76f8ff7.entry.js → p-a516c658.entry.js} +1 -1
- package/dist/solutions-components/{p-ad42039f.js → p-b668daf8.js} +2 -2
- package/dist/solutions-components/p-bfa95147.entry.js +17 -0
- package/dist/solutions-components/p-d09a168c.entry.js +6 -0
- package/dist/solutions-components/{p-fa6046a8.entry.js → p-fc9609e6.entry.js} +2 -2
- package/dist/solutions-components/solutions-components.esm.js +1 -1
- package/dist/solutions-components/utils/csvUtils.ts +6 -4
- package/dist/solutions-components/utils/interfaces.ts +65 -1
- package/dist/solutions-components/utils/mapViewUtils.ts +50 -27
- package/dist/solutions-components/utils/publicNotificationStore.ts +3 -1
- package/dist/solutions-components/utils/queryUtils.ts +2 -2
- package/dist/types/components/buffer-tools/buffer-tools.d.ts +4 -3
- package/dist/types/components/map-layer-picker/map-layer-picker.d.ts +22 -11
- package/dist/types/components/map-search/map-search.d.ts +18 -1
- package/dist/types/components/map-select-tools/map-select-tools.d.ts +31 -1
- package/dist/types/components/pdf-download/pdf-download.d.ts +7 -2
- package/dist/types/components/public-notification/public-notification.d.ts +98 -4
- package/dist/types/components/refine-selection/refine-selection.d.ts +5 -0
- package/dist/types/components/refine-selection-tools/refine-selection-tools.d.ts +6 -1
- package/dist/types/components.d.ts +154 -180
- package/dist/types/preact.d.ts +0 -10
- package/dist/types/utils/csvUtils.d.ts +1 -1
- package/dist/types/utils/interfaces.d.ts +56 -1
- package/dist/types/utils/mapViewUtils.d.ts +19 -9
- package/dist/types/utils/publicNotificationStore.d.ts +1 -0
- package/package.json +1 -1
- package/dist/cjs/check-list.cjs.entry.js +0 -103
- package/dist/cjs/config-buffer-tools.cjs.entry.js +0 -125
- package/dist/cjs/config-draw-tools.cjs.entry.js +0 -85
- package/dist/cjs/config-layer-picker.cjs.entry.js +0 -113
- package/dist/cjs/config-pdf-download.cjs.entry.js +0 -117
- package/dist/cjs/labelFormats-3236d2e0.js +0 -212
- package/dist/collection/components/check-list/check-list.css +0 -3
- package/dist/collection/components/check-list/check-list.js +0 -179
- package/dist/collection/components/config-buffer-tools/config-buffer-tools.css +0 -34
- package/dist/collection/components/config-buffer-tools/config-buffer-tools.js +0 -209
- package/dist/collection/components/config-draw-tools/config-draw-tools.css +0 -17
- package/dist/collection/components/config-draw-tools/config-draw-tools.js +0 -150
- package/dist/collection/components/config-layer-picker/config-layer-picker.css +0 -17
- package/dist/collection/components/config-layer-picker/config-layer-picker.js +0 -218
- package/dist/collection/components/config-pdf-download/config-pdf-download.css +0 -17
- package/dist/collection/components/config-pdf-download/config-pdf-download.js +0 -183
- package/dist/collection/demos/check-list.html +0 -65
- package/dist/collection/demos/config-buffer-tools.html +0 -92
- package/dist/collection/demos/config-draw-tools.html +0 -58
- package/dist/collection/demos/config-layer-picker.html +0 -97
- package/dist/components/check-list.d.ts +0 -11
- package/dist/components/check-list.js +0 -11
- package/dist/components/check-list2.js +0 -131
- package/dist/components/config-buffer-tools.d.ts +0 -11
- package/dist/components/config-buffer-tools.js +0 -187
- package/dist/components/config-draw-tools.d.ts +0 -11
- package/dist/components/config-draw-tools.js +0 -121
- package/dist/components/config-layer-picker.d.ts +0 -11
- package/dist/components/config-layer-picker.js +0 -163
- package/dist/components/config-pdf-download.d.ts +0 -11
- package/dist/components/config-pdf-download.js +0 -154
- package/dist/components/labelFormats.js +0 -210
- package/dist/components/mapViewUtils.js +0 -129
- package/dist/esm/check-list.entry.js +0 -99
- package/dist/esm/config-buffer-tools.entry.js +0 -121
- package/dist/esm/config-draw-tools.entry.js +0 -81
- package/dist/esm/config-layer-picker.entry.js +0 -109
- package/dist/esm/config-pdf-download.entry.js +0 -113
- package/dist/esm/labelFormats-b37958c3.js +0 -210
- package/dist/solutions-components/demos/check-list.html +0 -65
- package/dist/solutions-components/demos/config-buffer-tools.html +0 -92
- package/dist/solutions-components/demos/config-draw-tools.html +0 -58
- package/dist/solutions-components/demos/config-layer-picker.html +0 -97
- package/dist/solutions-components/p-16a0e65a.entry.js +0 -6
- package/dist/solutions-components/p-35078393.entry.js +0 -17
- package/dist/solutions-components/p-3d72bba6.entry.js +0 -6
- package/dist/solutions-components/p-3e444242.entry.js +0 -6
- package/dist/solutions-components/p-67afea92.entry.js +0 -12
- package/dist/solutions-components/p-7dcab29d.js +0 -36
- package/dist/solutions-components/p-89f7b02a.entry.js +0 -6
- package/dist/solutions-components/p-906b7b96.entry.js +0 -6
- package/dist/solutions-components/p-99c98510.entry.js +0 -6
- package/dist/solutions-components/p-b1a3605f.entry.js +0 -6
- package/dist/solutions-components/p-e99b1247.js +0 -6
- package/dist/types/components/check-list/check-list.d.ts +0 -57
- package/dist/types/components/config-buffer-tools/config-buffer-tools.d.ts +0 -92
- package/dist/types/components/config-draw-tools/config-draw-tools.d.ts +0 -58
- package/dist/types/components/config-layer-picker/config-layer-picker.d.ts +0 -83
- package/dist/types/components/config-pdf-download/config-pdf-download.d.ts +0 -81
@@ -6,29 +6,30 @@
|
|
6
6
|
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
7
7
|
import { a as EPageType, b as ESketchType, c as EWorkflowType, d as EExportType } from './interfaces3.js';
|
8
8
|
import { l as loadModules } from './loadModules.js';
|
9
|
-
import {
|
9
|
+
import { a as getMapLayerView, g as goToSelection, h as highlightFeatures, d as defineCustomElement$6 } from './map-layer-picker2.js';
|
10
10
|
import { g as getSelectionSetQuery } from './queryUtils.js';
|
11
11
|
import { s as state } from './publicNotificationStore.js';
|
12
12
|
import { g as getLocaleComponentStrings } from './locale.js';
|
13
13
|
import { g as getTotal, a as getSelectionIds, d as defineCustomElement$3 } from './refine-selection2.js';
|
14
|
-
import { d as defineCustomElement$
|
15
|
-
import { d as defineCustomElement$
|
16
|
-
import { d as defineCustomElement$
|
17
|
-
import { d as defineCustomElement$
|
18
|
-
import { d as defineCustomElement$
|
19
|
-
import { d as defineCustomElement$
|
20
|
-
import { d as defineCustomElement$
|
21
|
-
import { d as defineCustomElement$
|
22
|
-
import { d as defineCustomElement$
|
23
|
-
import { d as defineCustomElement$
|
24
|
-
import { d as defineCustomElement$
|
25
|
-
import { d as defineCustomElement$
|
26
|
-
import { d as defineCustomElement$
|
27
|
-
import { d as defineCustomElement$
|
28
|
-
import { d as defineCustomElement$
|
29
|
-
import { d as defineCustomElement$
|
30
|
-
import { d as defineCustomElement$
|
31
|
-
import { d as defineCustomElement$
|
14
|
+
import { d as defineCustomElement$C } from './buffer-tools2.js';
|
15
|
+
import { d as defineCustomElement$B } from './action.js';
|
16
|
+
import { d as defineCustomElement$A } from './action-bar.js';
|
17
|
+
import { d as defineCustomElement$z } from './action-group.js';
|
18
|
+
import { d as defineCustomElement$y } from './action-menu.js';
|
19
|
+
import { d as defineCustomElement$x } from './button.js';
|
20
|
+
import { d as defineCustomElement$w } from './checkbox.js';
|
21
|
+
import { d as defineCustomElement$v } from './chip.js';
|
22
|
+
import { d as defineCustomElement$u } from './combobox.js';
|
23
|
+
import { d as defineCustomElement$t } from './combobox-item.js';
|
24
|
+
import { d as defineCustomElement$s } from './graph.js';
|
25
|
+
import { d as defineCustomElement$r } from './icon.js';
|
26
|
+
import { d as defineCustomElement$q } from './input.js';
|
27
|
+
import { d as defineCustomElement$p } from './input-message.js';
|
28
|
+
import { d as defineCustomElement$o } from './label.js';
|
29
|
+
import { d as defineCustomElement$n } from './list.js';
|
30
|
+
import { d as defineCustomElement$m } from './list-item2.js';
|
31
|
+
import { d as defineCustomElement$l } from './loader.js';
|
32
|
+
import { d as defineCustomElement$k } from './modal.js';
|
32
33
|
import { d as defineCustomElement$j } from './notice.js';
|
33
34
|
import { d as defineCustomElement$i } from './option.js';
|
34
35
|
import { d as defineCustomElement$h } from './panel.js';
|
@@ -42,20 +43,29 @@ import { d as defineCustomElement$a } from './shell.js';
|
|
42
43
|
import { d as defineCustomElement$9 } from './slider.js';
|
43
44
|
import { d as defineCustomElement$8 } from './tooltip.js';
|
44
45
|
import { d as defineCustomElement$7 } from './map-draw-tools2.js';
|
45
|
-
import { d as defineCustomElement$6 } from './map-layer-picker2.js';
|
46
46
|
import { d as defineCustomElement$5 } from './map-select-tools2.js';
|
47
47
|
import { d as defineCustomElement$4 } from './pdf-download2.js';
|
48
48
|
import { d as defineCustomElement$2 } from './refine-selection-tools2.js';
|
49
49
|
|
50
|
-
const publicNotificationCss = ":host{display:block}.border-bottom-1{border-width:0px;border-bottom-width:1px;border-style:solid;border-color:var(--calcite-ui-border-3)}.action-bar-size{height:3.5rem;width:100%}.w-1-3{width:33.3%}.w-1-4{width:25%}.action-center{-webkit-box-align:center;-webkit-align-items:center;-ms-grid-row-align:center;align-items:center;align-content:center;justify-content:center}.width-full{width:100%}.height-full{height:100%}.padding-1{padding:1rem}.padding-top-sides-1{-webkit-padding-before:1rem;padding-block-start:1rem;-webkit-padding-start:1rem;padding-inline-start:1rem;-webkit-padding-end:1rem;padding-inline-end:1rem}.padding-sides-1{-webkit-padding-start:1rem;padding-inline-start:1rem;-webkit-padding-end:1rem;padding-inline-end:1rem}.padding-end-1-2{-webkit-padding-end:.5rem;padding-inline-end:.5rem}.padding-top-1-2{-webkit-padding-before:.5rem;padding-block-start:.5rem}.padding-top-1{padding-top:1rem}.padding-bottom-1{padding-bottom:1rem}.info-blue{color:#00A0FF}.info-message{justify-content:center;display:grid}.font-bold{font-weight:bold}.display-flex{display:flex}.display-block{display:block}.display-none{display:none}.main-label{float:left}html[dir=\"rtl\"] .main-label{float:right}.back-label:hover{cursor:pointer;color:var(--calcite-ui-brand-hover)}.border-bottom{border-bottom:1px solid var(--calcite-ui-border-2)}.margin-side-1{-webkit-margin-start:1rem;margin-inline-start:1rem;-webkit-margin-end:1rem;margin-inline-end:1rem}.border-top{border-top:1px solid var(--calcite-ui-border-2)}.w-100{width:100%}.w-50{width:50%}.padding-1-2{padding:0.5rem}.list-border{border:1px solid var(--calcite-ui-border-2)}.margin-sides-1{-webkit-margin-start:1rem;margin-inline-start:1rem;-webkit-margin-end:1rem;margin-inline-end:1rem}.margin-start-1-2{-webkit-margin-start:0.5rem;margin-inline-start:0.5rem}.position-right{position:absolute;right:1rem}.position-right[dir=\"rtl\"]{position:absolute;left:1rem}.position-left{position:absolute;left:1rem}.position-left[dir=\"rtl\"]{position:absolute;right:1rem}.margin-top-0{-webkit-margin-before:0 !important;margin-block-start:0 !important}.height-1-1-2{height:1.5rem}.main-background{background-color:var(--calcite-ui-foreground-2)}";
|
50
|
+
const publicNotificationCss = ":host{display:block;--calcite-input-message-spacing-value:0}.border-bottom-1{border-width:0px;border-bottom-width:1px;border-style:solid;border-color:var(--calcite-ui-border-3)}.action-bar-size{height:3.5rem;width:100%}.w-1-3{width:33.3%}.w-1-4{width:25%}.action-center{-webkit-box-align:center;-webkit-align-items:center;-ms-grid-row-align:center;align-items:center;align-content:center;justify-content:center}.width-full{width:100%}.height-full{height:100%}.padding-1{padding:1rem}.padding-top-sides-1{-webkit-padding-before:1rem;padding-block-start:1rem;-webkit-padding-start:1rem;padding-inline-start:1rem;-webkit-padding-end:1rem;padding-inline-end:1rem}.padding-sides-1{-webkit-padding-start:1rem;padding-inline-start:1rem;-webkit-padding-end:1rem;padding-inline-end:1rem}.padding-end-1-2{-webkit-padding-end:.5rem;padding-inline-end:.5rem}.padding-top-1-2{-webkit-padding-before:.5rem;padding-block-start:.5rem}.padding-top-1{padding-top:1rem}.padding-bottom-1{padding-bottom:1rem}.info-blue{color:#00A0FF}.info-message{justify-content:center;display:grid}.font-bold{font-weight:bold}.display-flex{display:flex}.display-block{display:block}.display-none{display:none}.main-label{float:left}html[dir=\"rtl\"] .main-label{float:right}.back-label:hover{cursor:pointer;color:var(--calcite-ui-brand-hover)}.border-bottom{border-bottom:1px solid var(--calcite-ui-border-2)}.margin-side-1{-webkit-margin-start:1rem;margin-inline-start:1rem;-webkit-margin-end:1rem;margin-inline-end:1rem}.border-top{border-top:1px solid var(--calcite-ui-border-2)}.w-100{width:100%}.w-50{width:50%}.padding-1-2{padding:0.5rem}.list-border{border:1px solid var(--calcite-ui-border-2)}.margin-sides-1{-webkit-margin-start:1rem;margin-inline-start:1rem;-webkit-margin-end:1rem;margin-inline-end:1rem}.margin-start-1-2{-webkit-margin-start:0.5rem;margin-inline-start:0.5rem}.position-right{position:absolute;right:1rem}.position-right[dir=\"rtl\"]{position:absolute;left:1rem}.position-left{position:absolute;left:1rem}.position-left[dir=\"rtl\"]{position:absolute;right:1rem}.margin-top-0{-webkit-margin-before:0 !important;margin-block-start:0 !important}.height-1-1-2{height:1.5rem}.main-background{background-color:var(--calcite-ui-foreground-2)}.num-selected{align-items:center;display:flex}";
|
51
51
|
|
52
52
|
const PublicNotification$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
53
53
|
constructor() {
|
54
54
|
super();
|
55
55
|
this.__registerHost();
|
56
|
-
this.
|
56
|
+
this.addresseeLayerIds = [];
|
57
|
+
this.defaultBufferDistance = undefined;
|
58
|
+
this.defaultBufferUnit = undefined;
|
59
|
+
this.exportOptions = undefined;
|
60
|
+
this.featureEffect = undefined;
|
61
|
+
this.featureHighlightEnabled = undefined;
|
57
62
|
this.mapView = undefined;
|
63
|
+
this.noResultText = undefined;
|
64
|
+
this.searchConfiguration = undefined;
|
65
|
+
this.selectionLayerIds = [];
|
58
66
|
this.showRefineSelection = false;
|
67
|
+
this.showSearchSettings = true;
|
68
|
+
this.addresseeLayer = undefined;
|
59
69
|
this._downloadActive = true;
|
60
70
|
this._numSelected = 0;
|
61
71
|
this._pageType = EPageType.LIST;
|
@@ -63,6 +73,7 @@ const PublicNotification$1 = /*@__PURE__*/ proxyCustomElement(class extends HTML
|
|
63
73
|
this._selectionSets = [];
|
64
74
|
this._sketchType = ESketchType.INTERACTIVE;
|
65
75
|
this._selectionWorkflowType = EWorkflowType.SEARCH;
|
76
|
+
this._showLayerSelectionChangeModal = false;
|
66
77
|
this._translations = undefined;
|
67
78
|
}
|
68
79
|
//--------------------------------------------------------------------------
|
@@ -141,8 +152,13 @@ const PublicNotification$1 = /*@__PURE__*/ proxyCustomElement(class extends HTML
|
|
141
152
|
* Renders the component.
|
142
153
|
*/
|
143
154
|
render() {
|
155
|
+
var _a, _b, _c, _d, _e, _f;
|
144
156
|
const hasSelections = this._selectionSets.length > 0;
|
145
|
-
|
157
|
+
const csvEnabled = typeof ((_b = (_a = this.exportOptions) === null || _a === void 0 ? void 0 : _a.csvOptions) === null || _b === void 0 ? void 0 : _b.enabled) === "boolean" ?
|
158
|
+
(_c = this.exportOptions) === null || _c === void 0 ? void 0 : _c.csvOptions.enabled : true;
|
159
|
+
const pdfEnabled = typeof ((_e = (_d = this.exportOptions) === null || _d === void 0 ? void 0 : _d.pdfOptions) === null || _e === void 0 ? void 0 : _e.enabled) === "boolean" ?
|
160
|
+
(_f = this.exportOptions) === null || _f === void 0 ? void 0 : _f.pdfOptions.enabled : true;
|
161
|
+
return (h(Host, null, h("calcite-shell", null, h("calcite-action-bar", { class: "border-bottom-1 action-bar-size", "expand-disabled": true, layout: "horizontal", slot: "header" }, this._getActionGroup("list-check", false, EPageType.LIST, this._translations.myLists), this.showRefineSelection ? this._getActionGroup("test-data", !hasSelections, EPageType.REFINE, this._translations.refineSelection) : undefined, pdfEnabled ? this._getActionGroup("file-pdf", !hasSelections, EPageType.PDF, this._translations.downloadPDF) : undefined, csvEnabled ? this._getActionGroup("file-csv", !hasSelections, EPageType.CSV, this._translations.downloadCSV) : undefined), this._getPage(this._pageType))));
|
146
162
|
}
|
147
163
|
//--------------------------------------------------------------------------
|
148
164
|
//
|
@@ -223,10 +239,19 @@ const PublicNotification$1 = /*@__PURE__*/ proxyCustomElement(class extends HTML
|
|
223
239
|
* @protected
|
224
240
|
*/
|
225
241
|
_getListPage() {
|
226
|
-
var _a, _b;
|
227
242
|
const hasSets = this._selectionSets.filter(ss => ss.workflowType !== EWorkflowType.REFINE).length > 0;
|
228
243
|
const total = getTotal(this._selectionSets);
|
229
|
-
return hasSets ? (h("calcite-panel", null, h("div", { class: "padding-top-sides-1" }, h("calcite-label", { class: "font-bold" }, this._translations.myLists)), this._getNotice(this._translations.listHasSetsTip, "padding-sides-1 padding-bottom-1"),
|
244
|
+
return hasSets ? (h("calcite-panel", null, h("div", { class: "padding-top-sides-1" }, h("calcite-label", { class: "font-bold" }, this._translations.myLists)), this._getNotice(this._translations.listHasSetsTip, "padding-sides-1 padding-bottom-1"), this._getMapLayerPicker(), h("div", { class: "padding-sides-1 height-1-1-2" }, h("div", { class: "position-left" }, h("calcite-label", { alignment: "start", class: "font-bold" }, this._translations.notifications)), h("div", { class: "position-right" }, h("calcite-input-message", { active: true, class: "info-blue margin-top-0", scale: "m" }, this._translations.uniqueCout.replace("{{n}}", total.toString())))), hasSets ? this._getSelectionSetList() : (h("div", { class: "info-message" }, h("calcite-input-message", { active: true, class: "info-blue", scale: "m" }, this._translations.noNotifications))), h("div", { class: "display-flex padding-1" }, h("calcite-button", { onClick: () => { this._setPageType(EPageType.SELECT); }, width: "full" }, this._translations.add)), this._showModal(this._showLayerSelectionChangeModal))) : (h("calcite-panel", null, h("div", { class: "padding-top-sides-1" }, h("calcite-label", { class: "font-bold" }, this._translations.myLists)), h("div", { class: "padding-sides-1" }, h("calcite-label", null, this._translations.notifications)), h("div", { class: "info-message padding-bottom-1" }, h("calcite-input-message", { active: true, class: "info-blue", scale: "m" }, this._translations.noNotifications)), this._getNotice(this._translations.selectLayerAndAdd, "padding-sides-1 padding-bottom-1"), this._getMapLayerPicker(), h("div", { class: "display-flex padding-1" }, h("calcite-button", { onClick: () => { this._setPageType(EPageType.SELECT); }, width: "full" }, this._translations.add))));
|
245
|
+
}
|
246
|
+
/**
|
247
|
+
* Create the UI element that will expose the addressee layers
|
248
|
+
*
|
249
|
+
* @returns addressee layer list node
|
250
|
+
* @protected
|
251
|
+
*/
|
252
|
+
_getMapLayerPicker() {
|
253
|
+
var _a;
|
254
|
+
return (h("div", { class: "display-flex padding-sides-1" }, h("calcite-label", { class: "font-bold width-full" }, this._translations.addresseeLayer, h("map-layer-picker", { enabledLayerIds: this.addresseeLayerIds, mapView: this.mapView, onLayerSelectionChange: (evt) => this._layerSelectionChange(evt), selectedLayerIds: this.addresseeLayer ? [(_a = this.addresseeLayer) === null || _a === void 0 ? void 0 : _a.layer.id] : [], selectionMode: "single" }))));
|
230
255
|
}
|
231
256
|
/**
|
232
257
|
* Create the selection sets list node for the List page
|
@@ -245,6 +270,40 @@ const PublicNotification$1 = /*@__PURE__*/ proxyCustomElement(class extends HTML
|
|
245
270
|
return prev;
|
246
271
|
}, [])));
|
247
272
|
}
|
273
|
+
/**
|
274
|
+
* Alert the user of the potential change to the selection sets and ask if they would like to proceed.
|
275
|
+
*
|
276
|
+
* @returns the page node
|
277
|
+
* @protected
|
278
|
+
*/
|
279
|
+
_showModal(open) {
|
280
|
+
return (h("calcite-modal", { "aria-labelledby": "modal-title", "background-color": "grey", color: "red", open: open, scale: "s", width: "s" }, h("div", { id: "modal-title", slot: "header" }, this._translations.shouldProceed), h("div", { slot: "content" }, this._translations.proceedInfo), h("calcite-button", { appearance: "outline", onClick: () => this._cancelLayerChange(), slot: "secondary", width: "full" }, this._translations.cancel), h("calcite-button", { onClick: () => this._handleLayerChange(), slot: "primary", width: "full" }, this._translations.proceed)));
|
281
|
+
}
|
282
|
+
/**
|
283
|
+
* Prevent the default behavior of layer selection change and close the modal.
|
284
|
+
*
|
285
|
+
* @returns the page node
|
286
|
+
* @protected
|
287
|
+
*/
|
288
|
+
_cancelLayerChange() {
|
289
|
+
this._layerSelectionChangeEvt.preventDefault();
|
290
|
+
this._layerSelectionChangeEvt.stopPropagation();
|
291
|
+
this._layerSelectionChangeEvt = undefined;
|
292
|
+
this._showLayerSelectionChangeModal = false;
|
293
|
+
}
|
294
|
+
/**
|
295
|
+
* Allow the default behavior of layer selection change and close the modal.
|
296
|
+
*
|
297
|
+
* @returns the page node
|
298
|
+
* @protected
|
299
|
+
*/
|
300
|
+
async _handleLayerChange() {
|
301
|
+
var _a, _b;
|
302
|
+
this._showLayerSelectionChangeModal = false;
|
303
|
+
const id = ((_b = (_a = this._layerSelectionChangeEvt) === null || _a === void 0 ? void 0 : _a.detail) === null || _b === void 0 ? void 0 : _b.length) > 0 ?
|
304
|
+
this._layerSelectionChangeEvt.detail[0] : "";
|
305
|
+
await this._updateAddresseeLayer(id);
|
306
|
+
}
|
248
307
|
/**
|
249
308
|
* Create the Select page that shows the selection workflows
|
250
309
|
*
|
@@ -265,7 +324,8 @@ const PublicNotification$1 = /*@__PURE__*/ proxyCustomElement(class extends HTML
|
|
265
324
|
this._translations.selectLayerTip;
|
266
325
|
const noticeText = this._selectionWorkflowType === EWorkflowType.SELECT ? selectTip :
|
267
326
|
this._selectionWorkflowType === EWorkflowType.SKETCH ? sketchTip : searchTip;
|
268
|
-
return (h("calcite-panel", null, this._getLabel(this._translations.stepTwoFull.replace("{{layer}}", (_a = this.addresseeLayer) === null || _a === void 0 ? void 0 : _a.layer.title)), this._getNotice(noticeText), h("div", { class: "padding-1" }, h("map-select-tools", { class: "font-bold", isUpdate: !!this._activeSelection, mapView: this.mapView, onSelectionSetChange: (evt) => this._updateForSelection(evt), onWorkflowTypeChange: (evt) => this._updateForWorkflowType(evt), ref: (el) => { this._selectTools = el; }, selectLayerView: this.addresseeLayer, selectionSet: this._activeSelection })), h("div", { class: "padding-sides-1 padding-bottom-1", style: { "align-items": "end", "display": "flex" } }, h("calcite-icon", { class: "info-blue padding-end-1-2", icon: "feature-layer", scale: "s" }), h("calcite-input-message", { active: true, class: "info-blue", scale: "m" }, this.
|
327
|
+
return (h("calcite-panel", null, this._getLabel(this._translations.stepTwoFull.replace("{{layer}}", (_a = this.addresseeLayer) === null || _a === void 0 ? void 0 : _a.layer.title)), this._getNotice(noticeText), h("div", { class: "padding-1" }, h("map-select-tools", { class: "font-bold", enabledLayerIds: this.selectionLayerIds, isUpdate: !!this._activeSelection, mapView: this.mapView, onSelectionSetChange: (evt) => this._updateForSelection(evt), onWorkflowTypeChange: (evt) => this._updateForWorkflowType(evt), ref: (el) => { this._selectTools = el; }, searchConfiguration: this.searchConfiguration, selectLayerView: this.addresseeLayer, selectionSet: this._activeSelection, showBufferTools: this.showSearchSettings })), h("div", { class: "padding-sides-1 padding-bottom-1", style: { "align-items": "end", "display": "flex" } }, h("calcite-icon", { class: "info-blue padding-end-1-2", icon: "feature-layer", scale: "s" }), h("calcite-input-message", { active: true, class: "info-blue", scale: "m" }, this.noResultText && this._numSelected === 0 ? this.noResultText :
|
328
|
+
this._translations.selectedAddresses.replace("{{n}}", this._numSelected.toString()).replace("{{layer}}", ((_b = this.addresseeLayer) === null || _b === void 0 ? void 0 : _b.layer.title) || ""))), this._getPageNavButtons(this._translations.done, this._numSelected === 0, () => { void this._saveSelection(); }, this._translations.cancel, false, () => { void this._home(); })));
|
269
329
|
}
|
270
330
|
/**
|
271
331
|
* Create the Refine page that users can interactively add/remove features from existing selection sets
|
@@ -274,7 +334,7 @@ const PublicNotification$1 = /*@__PURE__*/ proxyCustomElement(class extends HTML
|
|
274
334
|
* @protected
|
275
335
|
*/
|
276
336
|
_getRefinePage() {
|
277
|
-
return (h("calcite-panel", null, this._getLabel(this._translations.refineSelection), this._getNotice(this._translations.refineTip, "padding-sides-1"), h("refine-selection", { addresseeLayer: this.addresseeLayer, mapView: this.mapView, selectionSets: this._selectionSets })));
|
337
|
+
return (h("calcite-panel", null, this._getLabel(this._translations.refineSelection), this._getNotice(this._translations.refineTip, "padding-sides-1"), h("refine-selection", { addresseeLayer: this.addresseeLayer, enabledLayerIds: this.selectionLayerIds, mapView: this.mapView, selectionSets: this._selectionSets })));
|
278
338
|
}
|
279
339
|
/**
|
280
340
|
* Create the PDF download page that shows the download options
|
@@ -304,8 +364,10 @@ const PublicNotification$1 = /*@__PURE__*/ proxyCustomElement(class extends HTML
|
|
304
364
|
* @protected
|
305
365
|
*/
|
306
366
|
_getDownloadPage(type) {
|
367
|
+
var _a, _b;
|
307
368
|
const isPdf = type === EExportType.PDF;
|
308
|
-
|
369
|
+
const multiPdfOptions = ((_a = this.exportOptions) === null || _a === void 0 ? void 0 : _a.pdfOptions.enabledSizeValues.length) > 1;
|
370
|
+
return (h("calcite-panel", null, h("div", null, h("div", { class: "padding-top-sides-1" }, h("calcite-label", { class: "font-bold" }, isPdf ? this._translations.pdfDownloads : this._translations.csvDownloads), h("calcite-label", null, this._translations.notifications)), this._getSelectionLists(), h("div", { class: "margin-side-1 padding-top-1 border-bottom" }), h("div", { class: "padding-top-sides-1" }, h("calcite-label", { layout: "inline" }, h("calcite-checkbox", { disabled: !this._downloadActive, ref: (el) => { this._removeDuplicates = el; } }), this._translations.removeDuplicate)), h("div", { class: isPdf && multiPdfOptions ? "" : "display-none" }, this._getLabel(this._translations.selectPDFLabelOption, false), h("div", { class: "padding-sides-1" }, h("pdf-download", { disabled: !this._downloadActive, enabledSizeValues: (_b = this.exportOptions) === null || _b === void 0 ? void 0 : _b.pdfOptions.enabledSizeValues, layerView: this.addresseeLayer, ref: (el) => { this._downloadTools = el; } }))), h("div", { class: "padding-1 display-flex" }, h("calcite-button", { disabled: !this._downloadActive, onClick: isPdf ? () => this._downloadPDF() : () => this._downloadCSV(), width: "full" }, isPdf ? this._translations.downloadPDF : this._translations.downloadCSV)))));
|
309
371
|
}
|
310
372
|
/**
|
311
373
|
* Create the stacked navigation buttons for a page
|
@@ -396,8 +458,9 @@ const PublicNotification$1 = /*@__PURE__*/ proxyCustomElement(class extends HTML
|
|
396
458
|
* @protected
|
397
459
|
*/
|
398
460
|
_downloadCSV() {
|
461
|
+
var _a;
|
399
462
|
const ids = getSelectionIds(this._getDownloadSelectionSets());
|
400
|
-
void this._downloadTools.downloadCSV(ids, this._removeDuplicates.checked);
|
463
|
+
void this._downloadTools.downloadCSV(ids, this._removeDuplicates.checked, (_a = this.exportOptions) === null || _a === void 0 ? void 0 : _a.csvOptions.addColumnTitle);
|
401
464
|
}
|
402
465
|
/**
|
403
466
|
* Get all enabled selection sets
|
@@ -458,19 +521,39 @@ const PublicNotification$1 = /*@__PURE__*/ proxyCustomElement(class extends HTML
|
|
458
521
|
this._setPageType(EPageType.LIST);
|
459
522
|
}
|
460
523
|
/**
|
461
|
-
* Fetch the layer
|
524
|
+
* Fetch the addressee layer from the map if no selection sets exist.
|
525
|
+
* Alert the user of the potential change to the selection sets if they exist.
|
526
|
+
*
|
527
|
+
* @param evt layer selection change event
|
462
528
|
*
|
463
529
|
* @returns Promise when the function has completed
|
464
530
|
* @protected
|
465
531
|
*/
|
466
532
|
async _layerSelectionChange(evt) {
|
467
|
-
var _a, _b;
|
468
|
-
const
|
469
|
-
if (
|
470
|
-
this.
|
471
|
-
|
533
|
+
var _a, _b, _c;
|
534
|
+
const id = ((_a = evt === null || evt === void 0 ? void 0 : evt.detail) === null || _a === void 0 ? void 0 : _a.length) > 0 ? evt.detail[0] : "";
|
535
|
+
if (id !== ((_b = this.addresseeLayer) === null || _b === void 0 ? void 0 : _b.layer.id)) {
|
536
|
+
this._showLayerSelectionChangeModal = ((_c = this.addresseeLayer) === null || _c === void 0 ? void 0 : _c.layer.id) !== undefined && this._selectionSets.length > 0;
|
537
|
+
if (this._showLayerSelectionChangeModal) {
|
538
|
+
this._layerSelectionChangeEvt = evt;
|
539
|
+
}
|
540
|
+
else {
|
541
|
+
await this._updateAddresseeLayer(id);
|
542
|
+
}
|
472
543
|
}
|
473
544
|
}
|
545
|
+
/**
|
546
|
+
* Fetch the new addressee layer and update the selection sets
|
547
|
+
*
|
548
|
+
* @param id the id of the layer to fetch
|
549
|
+
*
|
550
|
+
* @returns Promise when the function has completed
|
551
|
+
* @protected
|
552
|
+
*/
|
553
|
+
async _updateAddresseeLayer(id) {
|
554
|
+
this.addresseeLayer = await getMapLayerView(this.mapView, id);
|
555
|
+
await this._updateSelectionSets(this.addresseeLayer);
|
556
|
+
}
|
474
557
|
/**
|
475
558
|
* Update selection sets when the addressee layer changes.
|
476
559
|
* Will remove any "refine" selection set.
|
@@ -554,7 +637,7 @@ const PublicNotification$1 = /*@__PURE__*/ proxyCustomElement(class extends HTML
|
|
554
637
|
* @protected
|
555
638
|
*/
|
556
639
|
_gotoSelection(selSet, mapView) {
|
557
|
-
void goToSelection(selSet.selectedIds, selSet.layerView, mapView);
|
640
|
+
void goToSelection(selSet.selectedIds, selSet.layerView, mapView, this.featureHighlightEnabled, this.featureEffect);
|
558
641
|
}
|
559
642
|
/**
|
560
643
|
* Open the selection set for further adjustment
|
@@ -617,9 +700,19 @@ const PublicNotification$1 = /*@__PURE__*/ proxyCustomElement(class extends HTML
|
|
617
700
|
}; }
|
618
701
|
static get style() { return publicNotificationCss; }
|
619
702
|
}, [0, "public-notification", {
|
620
|
-
"
|
703
|
+
"addresseeLayerIds": [16],
|
704
|
+
"defaultBufferDistance": [2, "default-buffer-distance"],
|
705
|
+
"defaultBufferUnit": [1, "default-buffer-unit"],
|
706
|
+
"exportOptions": [16],
|
707
|
+
"featureEffect": [16],
|
708
|
+
"featureHighlightEnabled": [4, "feature-highlight-enabled"],
|
621
709
|
"mapView": [16],
|
710
|
+
"noResultText": [1, "no-result-text"],
|
711
|
+
"searchConfiguration": [16],
|
712
|
+
"selectionLayerIds": [16],
|
622
713
|
"showRefineSelection": [4, "show-refine-selection"],
|
714
|
+
"showSearchSettings": [4, "show-search-settings"],
|
715
|
+
"addresseeLayer": [32],
|
623
716
|
"_downloadActive": [32],
|
624
717
|
"_numSelected": [32],
|
625
718
|
"_pageType": [32],
|
@@ -627,13 +720,14 @@ const PublicNotification$1 = /*@__PURE__*/ proxyCustomElement(class extends HTML
|
|
627
720
|
"_selectionSets": [32],
|
628
721
|
"_sketchType": [32],
|
629
722
|
"_selectionWorkflowType": [32],
|
723
|
+
"_showLayerSelectionChangeModal": [32],
|
630
724
|
"_translations": [32]
|
631
725
|
}, [[8, "selectionSetsChanged", "selectionSetsChanged"], [8, "sketchTypeChange", "sketchTypeChange"]]]);
|
632
726
|
function defineCustomElement$1() {
|
633
727
|
if (typeof customElements === "undefined") {
|
634
728
|
return;
|
635
729
|
}
|
636
|
-
const components = ["public-notification", "buffer-tools", "calcite-action", "calcite-action-bar", "calcite-action-group", "calcite-action-menu", "calcite-button", "calcite-checkbox", "calcite-chip", "calcite-combobox", "calcite-combobox-item", "calcite-graph", "calcite-icon", "calcite-input", "calcite-input-message", "calcite-label", "calcite-list", "calcite-list-item", "calcite-loader", "calcite-notice", "calcite-option", "calcite-panel", "calcite-popover", "calcite-progress", "calcite-radio-group", "calcite-radio-group-item", "calcite-scrim", "calcite-select", "calcite-shell", "calcite-slider", "calcite-tooltip", "map-draw-tools", "map-layer-picker", "map-select-tools", "pdf-download", "refine-selection", "refine-selection-tools"];
|
730
|
+
const components = ["public-notification", "buffer-tools", "calcite-action", "calcite-action-bar", "calcite-action-group", "calcite-action-menu", "calcite-button", "calcite-checkbox", "calcite-chip", "calcite-combobox", "calcite-combobox-item", "calcite-graph", "calcite-icon", "calcite-input", "calcite-input-message", "calcite-label", "calcite-list", "calcite-list-item", "calcite-loader", "calcite-modal", "calcite-notice", "calcite-option", "calcite-panel", "calcite-popover", "calcite-progress", "calcite-radio-group", "calcite-radio-group-item", "calcite-scrim", "calcite-select", "calcite-shell", "calcite-slider", "calcite-tooltip", "map-draw-tools", "map-layer-picker", "map-select-tools", "pdf-download", "refine-selection", "refine-selection-tools"];
|
637
731
|
components.forEach(tagName => { switch (tagName) {
|
638
732
|
case "public-notification":
|
639
733
|
if (!customElements.get(tagName)) {
|
@@ -642,90 +736,95 @@ function defineCustomElement$1() {
|
|
642
736
|
break;
|
643
737
|
case "buffer-tools":
|
644
738
|
if (!customElements.get(tagName)) {
|
645
|
-
defineCustomElement$
|
739
|
+
defineCustomElement$C();
|
646
740
|
}
|
647
741
|
break;
|
648
742
|
case "calcite-action":
|
649
743
|
if (!customElements.get(tagName)) {
|
650
|
-
defineCustomElement$
|
744
|
+
defineCustomElement$B();
|
651
745
|
}
|
652
746
|
break;
|
653
747
|
case "calcite-action-bar":
|
654
748
|
if (!customElements.get(tagName)) {
|
655
|
-
defineCustomElement$
|
749
|
+
defineCustomElement$A();
|
656
750
|
}
|
657
751
|
break;
|
658
752
|
case "calcite-action-group":
|
659
753
|
if (!customElements.get(tagName)) {
|
660
|
-
defineCustomElement$
|
754
|
+
defineCustomElement$z();
|
661
755
|
}
|
662
756
|
break;
|
663
757
|
case "calcite-action-menu":
|
664
758
|
if (!customElements.get(tagName)) {
|
665
|
-
defineCustomElement$
|
759
|
+
defineCustomElement$y();
|
666
760
|
}
|
667
761
|
break;
|
668
762
|
case "calcite-button":
|
669
763
|
if (!customElements.get(tagName)) {
|
670
|
-
defineCustomElement$
|
764
|
+
defineCustomElement$x();
|
671
765
|
}
|
672
766
|
break;
|
673
767
|
case "calcite-checkbox":
|
674
768
|
if (!customElements.get(tagName)) {
|
675
|
-
defineCustomElement$
|
769
|
+
defineCustomElement$w();
|
676
770
|
}
|
677
771
|
break;
|
678
772
|
case "calcite-chip":
|
679
773
|
if (!customElements.get(tagName)) {
|
680
|
-
defineCustomElement$
|
774
|
+
defineCustomElement$v();
|
681
775
|
}
|
682
776
|
break;
|
683
777
|
case "calcite-combobox":
|
684
778
|
if (!customElements.get(tagName)) {
|
685
|
-
defineCustomElement$
|
779
|
+
defineCustomElement$u();
|
686
780
|
}
|
687
781
|
break;
|
688
782
|
case "calcite-combobox-item":
|
689
783
|
if (!customElements.get(tagName)) {
|
690
|
-
defineCustomElement$
|
784
|
+
defineCustomElement$t();
|
691
785
|
}
|
692
786
|
break;
|
693
787
|
case "calcite-graph":
|
694
788
|
if (!customElements.get(tagName)) {
|
695
|
-
defineCustomElement$
|
789
|
+
defineCustomElement$s();
|
696
790
|
}
|
697
791
|
break;
|
698
792
|
case "calcite-icon":
|
699
793
|
if (!customElements.get(tagName)) {
|
700
|
-
defineCustomElement$
|
794
|
+
defineCustomElement$r();
|
701
795
|
}
|
702
796
|
break;
|
703
797
|
case "calcite-input":
|
704
798
|
if (!customElements.get(tagName)) {
|
705
|
-
defineCustomElement$
|
799
|
+
defineCustomElement$q();
|
706
800
|
}
|
707
801
|
break;
|
708
802
|
case "calcite-input-message":
|
709
803
|
if (!customElements.get(tagName)) {
|
710
|
-
defineCustomElement$
|
804
|
+
defineCustomElement$p();
|
711
805
|
}
|
712
806
|
break;
|
713
807
|
case "calcite-label":
|
714
808
|
if (!customElements.get(tagName)) {
|
715
|
-
defineCustomElement$
|
809
|
+
defineCustomElement$o();
|
716
810
|
}
|
717
811
|
break;
|
718
812
|
case "calcite-list":
|
719
813
|
if (!customElements.get(tagName)) {
|
720
|
-
defineCustomElement$
|
814
|
+
defineCustomElement$n();
|
721
815
|
}
|
722
816
|
break;
|
723
817
|
case "calcite-list-item":
|
724
818
|
if (!customElements.get(tagName)) {
|
725
|
-
defineCustomElement$
|
819
|
+
defineCustomElement$m();
|
726
820
|
}
|
727
821
|
break;
|
728
822
|
case "calcite-loader":
|
823
|
+
if (!customElements.get(tagName)) {
|
824
|
+
defineCustomElement$l();
|
825
|
+
}
|
826
|
+
break;
|
827
|
+
case "calcite-modal":
|
729
828
|
if (!customElements.get(tagName)) {
|
730
829
|
defineCustomElement$k();
|
731
830
|
}
|
@@ -24,7 +24,9 @@ const { state, onChange } = createStore({
|
|
24
24
|
// List of layers added and managed by the component
|
25
25
|
managedLayers: [],
|
26
26
|
// Handle: https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Handles.html#Handle
|
27
|
-
highlightHandle: undefined
|
27
|
+
highlightHandle: undefined,
|
28
|
+
// ILayerHash title: id lookup to be used across components
|
29
|
+
layerNameHash: {}
|
28
30
|
});
|
29
31
|
const managedLayersChangedEvent = new CustomEvent("managedLayersChanged", {
|
30
32
|
bubbles: true,
|
@@ -61,7 +61,7 @@ async function queryObjectIds(geometries, layer) {
|
|
61
61
|
results.forEach(resultIds => {
|
62
62
|
ids = [
|
63
63
|
...ids,
|
64
|
-
...resultIds
|
64
|
+
...resultIds || []
|
65
65
|
];
|
66
66
|
});
|
67
67
|
return ids;
|
@@ -100,7 +100,7 @@ async function queryFeaturesByGeometry(start, layer, geometry, featuresCollectio
|
|
100
100
|
geometry
|
101
101
|
};
|
102
102
|
const result = await layer.queryFeatures(query);
|
103
|
-
featuresCollection[layer.
|
103
|
+
featuresCollection[layer.id] = featuresCollection[layer.id].concat(result.features);
|
104
104
|
return result.exceededTransferLimit ?
|
105
105
|
queryFeaturesByGeometry(start += num, layer, geometry, featuresCollection) :
|
106
106
|
Promise.resolve(featuresCollection);
|
@@ -184,4 +184,4 @@ async function _intersectQuery(geometry, layer) {
|
|
184
184
|
return layer.queryObjectIds(q);
|
185
185
|
}
|
186
186
|
|
187
|
-
export {
|
187
|
+
export { queryExtent as a, queryObjectIds as b, getQueryGeoms as c, queryFeaturesByGeometry as d, queryFeaturesByID as e, getSelectionSetQuery as g, queryAllFeatures as q };
|
@@ -6,8 +6,8 @@
|
|
6
6
|
import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
7
7
|
import { g as ESelectionType, f as ERefineMode, e as ESelectionMode } from './interfaces3.js';
|
8
8
|
import { l as loadModules } from './loadModules.js';
|
9
|
-
import {
|
10
|
-
import {
|
9
|
+
import { a as getMapLayerView, h as highlightFeatures, d as defineCustomElement$1 } from './map-layer-picker2.js';
|
10
|
+
import { d as queryFeaturesByGeometry } from './queryUtils.js';
|
11
11
|
import { s as state } from './publicNotificationStore.js';
|
12
12
|
import { g as getLocaleComponentStrings } from './locale.js';
|
13
13
|
import { d as defineCustomElement$9 } from './action.js';
|
@@ -18,7 +18,6 @@ import { d as defineCustomElement$5 } from './icon.js';
|
|
18
18
|
import { d as defineCustomElement$4 } from './loader.js';
|
19
19
|
import { d as defineCustomElement$3 } from './option.js';
|
20
20
|
import { d as defineCustomElement$2 } from './select.js';
|
21
|
-
import { d as defineCustomElement$1 } from './map-layer-picker2.js';
|
22
21
|
|
23
22
|
const refineSelectionToolsCss = ":host{display:block}.div-visible{display:inherit}.div-not-visible{display:none !important}.padding-top-1-2{padding-top:.5rem}.main-label{display:flex;float:left}html[dir=\"rtl\"] .main-label{display:flex;float:right}.border{outline:1px solid var(--calcite-ui-border-input)}.margin-top-1{margin-top:1rem}.esri-sketch{display:flex;flex-flow:column wrap}.esri-widget{box-sizing:border-box;color:#323232;font-size:14px;font-family:\"Avenir Next\",\"Helvetica Neue\",Helvetica,Arial,sans-serif;line-height:1.3em}.esri-sketch__panel{align-items:center;display:flex;flex-flow:row nowrap;padding:0}*/ .esri-sketch__tool-section{border-right:1px solid rgba(110,110,110,.3)}.esri-sketch__section{align-items:center;display:flex;flex-flow:row nowrap;padding:0 7px;margin:6px 0;border-right:1px solid rgba(110,110,110,.3)}";
|
24
23
|
|
@@ -30,7 +29,7 @@ const RefineSelectionTools = /*@__PURE__*/ proxyCustomElement(class extends HTML
|
|
30
29
|
this.refineSelectionGraphicsChange = createEvent(this, "refineSelectionGraphicsChange", 7);
|
31
30
|
this.refineSelectionIdsChange = createEvent(this, "refineSelectionIdsChange", 7);
|
32
31
|
/**
|
33
|
-
* {<layer
|
32
|
+
* {<layer id>: Graphic[]}: Collection of graphics returned from queries to the layer
|
34
33
|
*/
|
35
34
|
this._featuresCollection = {};
|
36
35
|
/**
|
@@ -43,6 +42,7 @@ const RefineSelectionTools = /*@__PURE__*/ proxyCustomElement(class extends HTML
|
|
43
42
|
this._undoStack = [];
|
44
43
|
this.active = false;
|
45
44
|
this.border = false;
|
45
|
+
this.enabledLayerIds = [];
|
46
46
|
this.graphics = undefined;
|
47
47
|
this.ids = [];
|
48
48
|
this.layerView = undefined;
|
@@ -132,7 +132,7 @@ const RefineSelectionTools = /*@__PURE__*/ proxyCustomElement(class extends HTML
|
|
132
132
|
render() {
|
133
133
|
const showLayerPickerClass = this.useLayerPicker ? "div-visible" : "div-not-visible";
|
134
134
|
const drawClass = this.border ? " border" : "";
|
135
|
-
return (h(Host, null, h("div", null, h("map-layer-picker", { class: showLayerPickerClass, mapView: this.mapView, onLayerSelectionChange: (evt) => { void this._layerSelectionChange(evt); },
|
135
|
+
return (h(Host, null, h("div", null, h("map-layer-picker", { class: showLayerPickerClass, enabledLayerIds: this.enabledLayerIds, mapView: this.mapView, onLayerSelectionChange: (evt) => { void this._layerSelectionChange(evt); }, selectedLayerIds: this.layerViews.map(l => l.layer.id), selectionMode: "single" }), h("div", { class: "margin-top-1" + drawClass }, h("div", { class: "esri-sketch esri-widget" }, h("div", { class: "esri-sketch__panel" }, h("div", { class: "esri-sketch__tool-section esri-sketch__section" }, h("calcite-action", { disabled: !this._selectEnabled, icon: "select", onClick: () => this._setSelectionMode(ESelectionType.POINT), scale: "s", text: this._translations.select })), h("div", { class: "esri-sketch__tool-section esri-sketch__section" }, h("calcite-action", { disabled: !this._selectEnabled, icon: "line", onClick: () => this._setSelectionMode(ESelectionType.LINE), scale: "s", text: this._translations.selectLine }), h("calcite-action", { disabled: !this._selectEnabled, icon: "polygon", onClick: () => this._setSelectionMode(ESelectionType.POLY), scale: "s", text: this._translations.selectPolygon }), h("calcite-action", { disabled: !this._selectEnabled, icon: "rectangle", onClick: () => this._setSelectionMode(ESelectionType.RECT), scale: "s", text: this._translations.selectRectangle })), h("div", { class: "esri-sketch__tool-section esri-sketch__section" }, h("calcite-action", { disabled: this._undoStack.length === 0, icon: "undo", onClick: () => this._undo(), scale: "s", text: this._translations.undo }), h("calcite-action", { disabled: this._redoStack.length === 0, icon: "redo", onClick: () => this._redo(), scale: "s", text: this._translations.redo }))))))));
|
136
136
|
}
|
137
137
|
//--------------------------------------------------------------------------
|
138
138
|
//
|
@@ -259,8 +259,8 @@ const RefineSelectionTools = /*@__PURE__*/ proxyCustomElement(class extends HTML
|
|
259
259
|
async _layerSelectionChange(evt) {
|
260
260
|
if (Array.isArray(evt.detail) && evt.detail.length > 0) {
|
261
261
|
this._selectEnabled = true;
|
262
|
-
const layerPromises = evt.detail.map(
|
263
|
-
return getMapLayerView(this.mapView,
|
262
|
+
const layerPromises = evt.detail.map(id => {
|
263
|
+
return getMapLayerView(this.mapView, id);
|
264
264
|
});
|
265
265
|
return Promise.all(layerPromises).then((layerViews) => {
|
266
266
|
this.layerViews = layerViews;
|
@@ -307,7 +307,7 @@ const RefineSelectionTools = /*@__PURE__*/ proxyCustomElement(class extends HTML
|
|
307
307
|
*/
|
308
308
|
async _selectFeatures(geom) {
|
309
309
|
const queryFeaturePromises = this.layerViews.map(layerView => {
|
310
|
-
this._featuresCollection[layerView.layer.
|
310
|
+
this._featuresCollection[layerView.layer.id] = [];
|
311
311
|
return queryFeaturesByGeometry(0, layerView.layer, geom, this._featuresCollection);
|
312
312
|
});
|
313
313
|
return Promise.all(queryFeaturePromises).then(async (response) => {
|
@@ -415,6 +415,7 @@ const RefineSelectionTools = /*@__PURE__*/ proxyCustomElement(class extends HTML
|
|
415
415
|
}, [1, "refine-selection-tools", {
|
416
416
|
"active": [4],
|
417
417
|
"border": [4],
|
418
|
+
"enabledLayerIds": [16],
|
418
419
|
"graphics": [1040],
|
419
420
|
"ids": [16],
|
420
421
|
"layerView": [16],
|
@@ -65,6 +65,7 @@ const RefineSelection = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
|
|
65
65
|
*/
|
66
66
|
this._addEnabled = true;
|
67
67
|
this.addresseeLayer = undefined;
|
68
|
+
this.enabledLayerIds = [];
|
68
69
|
this.mapView = undefined;
|
69
70
|
this.selectionSets = [];
|
70
71
|
this.GraphicsLayer = undefined;
|
@@ -97,7 +98,7 @@ const RefineSelection = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
|
|
97
98
|
* Renders the component.
|
98
99
|
*/
|
99
100
|
render() {
|
100
|
-
return (h(Host, null, h("div", { class: "padding-1" }, h("div", null, h("calcite-radio-group", { class: "w-100", onCalciteRadioGroupChange: (evt) => this._modeChanged(evt) }, h("calcite-radio-group-item", { checked: this._addEnabled, class: "w-50", onClick: () => this._setSelectionMode(ESelectionMode.ADD), value: ESelectionMode.ADD }, this._translations.add), h("calcite-radio-group-item", { checked: !this._addEnabled, class: "w-50", onClick: () => this._setSelectionMode(ESelectionMode.REMOVE), value: ESelectionMode.REMOVE }, this._translations.remove)), h("refine-selection-tools", { border: true, ids: getSelectionIds(this.selectionSets), layerViews: [this.addresseeLayer], mapView: this.mapView, mode: this._addEnabled ? ESelectionMode.ADD : ESelectionMode.REMOVE, ref: (el) => { this._refineTools = el; }, useLayerPicker: false })), h("br", null), (h("calcite-list", { class: "list-border" }, this._getRefineSelectionSetList())))));
|
101
|
+
return (h(Host, null, h("div", { class: "padding-1" }, h("div", null, h("calcite-radio-group", { class: "w-100", onCalciteRadioGroupChange: (evt) => this._modeChanged(evt) }, h("calcite-radio-group-item", { checked: this._addEnabled, class: "w-50", onClick: () => this._setSelectionMode(ESelectionMode.ADD), value: ESelectionMode.ADD }, this._translations.add), h("calcite-radio-group-item", { checked: !this._addEnabled, class: "w-50", onClick: () => this._setSelectionMode(ESelectionMode.REMOVE), value: ESelectionMode.REMOVE }, this._translations.remove)), h("refine-selection-tools", { border: true, enabledLayerIds: this.enabledLayerIds, ids: getSelectionIds(this.selectionSets), layerViews: [this.addresseeLayer], mapView: this.mapView, mode: this._addEnabled ? ESelectionMode.ADD : ESelectionMode.REMOVE, ref: (el) => { this._refineTools = el; }, useLayerPicker: false })), h("br", null), (h("calcite-list", { class: "list-border" }, this._getRefineSelectionSetList())))));
|
101
102
|
}
|
102
103
|
//--------------------------------------------------------------------------
|
103
104
|
//
|
@@ -286,6 +287,7 @@ const RefineSelection = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
|
|
286
287
|
static get style() { return refineSelectionCss; }
|
287
288
|
}, [0, "refine-selection", {
|
288
289
|
"addresseeLayer": [16],
|
290
|
+
"enabledLayerIds": [16],
|
289
291
|
"mapView": [16],
|
290
292
|
"selectionSets": [1040],
|
291
293
|
"GraphicsLayer": [8, "graphics-layer"],
|