@esri/solutions-components 0.5.0 → 0.5.1
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/buffer-tools_6.cjs.entry.js +4 -8
- package/dist/cjs/calcite-combobox_3.cjs.entry.js +61 -61
- package/dist/cjs/calcite-input-message_5.cjs.entry.js +297 -295
- package/dist/cjs/{downloadUtils-415ab342.js → downloadUtils-b85476e8.js} +1093 -1093
- package/dist/cjs/{index.es-98008aa0.js → index.es-3ba50626.js} +10682 -10682
- package/dist/cjs/layer-table.cjs.entry.js +22 -22
- package/dist/cjs/loader.cjs.js +30 -30
- package/dist/cjs/{mapViewUtils-f617ae9a.js → mapViewUtils-df63bfa4.js} +26 -26
- package/dist/cjs/public-notification.cjs.entry.js +109 -4
- package/dist/cjs/solutions-components.cjs.js +31 -31
- package/dist/collection/components/map-draw-tools/map-draw-tools.js +3 -7
- package/dist/collection/components/map-select-tools/map-select-tools.js +74 -14
- package/dist/collection/components/public-notification/public-notification.js +177 -3
- package/dist/collection/utils/queryUtils.js +2 -2
- package/dist/collection/utils/queryUtils.ts +2 -2
- package/dist/components/map-draw-tools2.js +3 -7
- package/dist/components/map-select-tools2.js +55 -50
- package/dist/components/public-notification.js +111 -3
- package/dist/components/queryUtils.js +12 -12
- package/dist/esm/buffer-tools_6.entry.js +4 -8
- package/dist/esm/calcite-combobox_3.entry.js +55 -55
- package/dist/esm/calcite-input-message_5.entry.js +289 -287
- package/dist/esm/{downloadUtils-606b0f0e.js → downloadUtils-f278742f.js} +1089 -1089
- package/dist/esm/{index.es-c736c805.js → index.es-6f3a1143.js} +10596 -10596
- package/dist/esm/layer-table.entry.js +18 -18
- package/dist/esm/loader.js +26 -26
- package/dist/esm/{mapViewUtils-4e945e07.js → mapViewUtils-bd1809f0.js} +14 -14
- package/dist/esm/public-notification.entry.js +109 -4
- package/dist/esm/solutions-components.js +26 -26
- package/dist/solutions-components/{p-72117a18.js → p-03e2c6fd.js} +60 -60
- package/dist/solutions-components/{p-5ee7b022.entry.js → p-045d3988.entry.js} +11 -11
- package/dist/solutions-components/{p-6a657ff6.js → p-40c12650.js} +436 -436
- package/dist/solutions-components/p-70e1d4d8.entry.js +17 -0
- package/dist/solutions-components/p-88e5a76d.js +36 -0
- package/dist/solutions-components/p-bc39f296.entry.js +6 -0
- package/dist/solutions-components/{p-84bbaebf.entry.js → p-c93d8e80.entry.js} +6 -6
- package/dist/solutions-components/{p-4f5641b4.entry.js → p-cbac29fb.entry.js} +2 -2
- package/dist/solutions-components/solutions-components.esm.js +1 -1
- package/dist/solutions-components/utils/queryUtils.ts +2 -2
- package/dist/types/components/map-select-tools/map-select-tools.d.ts +16 -1
- package/dist/types/components/public-notification/public-notification.d.ts +70 -0
- package/dist/types/components.d.ts +1601 -1553
- package/package.json +1 -1
- package/dist/solutions-components/p-88e28de2.js +0 -36
- package/dist/solutions-components/p-ac76d270.entry.js +0 -17
- package/dist/solutions-components/p-e162304e.entry.js +0 -6
@@ -40,13 +40,16 @@ export class MapSelectTools {
|
|
40
40
|
this.enabledLayerIds = [];
|
41
41
|
this.defaultBufferDistance = undefined;
|
42
42
|
this.defaultBufferUnit = undefined;
|
43
|
-
this.geometries =
|
43
|
+
this.geometries = [];
|
44
44
|
this.isUpdate = false;
|
45
45
|
this.mapView = undefined;
|
46
46
|
this.searchConfiguration = undefined;
|
47
47
|
this.selectionSet = undefined;
|
48
48
|
this.selectLayerView = undefined;
|
49
49
|
this.showBufferTools = true;
|
50
|
+
this.sketchLineSymbol = undefined;
|
51
|
+
this.sketchPointSymbol = undefined;
|
52
|
+
this.sketchPolygonSymbol = undefined;
|
50
53
|
this._layerSelectChecked = undefined;
|
51
54
|
this._searchTerm = undefined;
|
52
55
|
this._translations = undefined;
|
@@ -193,7 +196,7 @@ export class MapSelectTools {
|
|
193
196
|
const useDrawClass = !this._layerSelectChecked && !searchEnabled ? " div-visible" : " div-not-visible";
|
194
197
|
const showLayerChoiceClass = searchEnabled ? "div-not-visible" : "div-visible";
|
195
198
|
const bufferDistance = typeof ((_a = this.selectionSet) === null || _a === void 0 ? void 0 : _a.distance) === "number" ? this.selectionSet.distance : this.defaultBufferDistance;
|
196
|
-
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: 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("div", { class: showLayerChoiceClass }, h("calcite-label", { layout: "inline" }, h("calcite-checkbox", { checked: this._layerSelectChecked, onCalciteCheckboxChange: () => this._layerSelectChanged(), ref: (el) => this._selectFromLayerElement = el }), "Use layer features")), h("div", { class: useDrawClass }, h("map-draw-tools", { active: true, border: true, mapView: this.mapView, ref: (el) => { this._drawTools = el; } })), h("div", { class: useSelectClass }, h("refine-selection-tools", { active: true, border: true, enabledLayerIds: this.enabledLayerIds, layerView: this.selectLayerView, layerViews: this._refineSelectLayers, mapView: this.mapView, mode: ESelectionMode.ADD, ref: (el) => { this._refineTools = el; }, refineMode: ERefineMode.SUBSET })), h("calcite-label", { class: showBufferToolsClass }, this._translations.searchDistance, h("buffer-tools", { distance: bufferDistance, geometries: this.geometries, onBufferComplete: (evt) => this._bufferComplete(evt), ref: (el) => this._bufferTools = el, unit: ((_b = this.selectionSet) === null || _b === void 0 ? void 0 : _b.unit) || this.defaultBufferUnit })), h("slot", null)));
|
199
|
+
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: 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("div", { class: showLayerChoiceClass }, h("calcite-label", { layout: "inline" }, h("calcite-checkbox", { checked: this._layerSelectChecked, onCalciteCheckboxChange: () => this._layerSelectChanged(), ref: (el) => this._selectFromLayerElement = el }), "Use layer features")), h("div", { class: useDrawClass }, h("map-draw-tools", { active: true, border: true, mapView: this.mapView, pointSymbol: this.sketchPointSymbol, polygonSymbol: this.sketchPolygonSymbol, polylineSymbol: this.sketchLineSymbol, ref: (el) => { this._drawTools = el; } })), h("div", { class: useSelectClass }, h("refine-selection-tools", { active: true, border: true, enabledLayerIds: this.enabledLayerIds, layerView: this.selectLayerView, layerViews: this._refineSelectLayers, mapView: this.mapView, mode: ESelectionMode.ADD, ref: (el) => { this._refineTools = el; }, refineMode: ERefineMode.SUBSET })), h("calcite-label", { class: showBufferToolsClass }, this._translations.searchDistance, h("buffer-tools", { distance: bufferDistance, geometries: this.geometries, onBufferComplete: (evt) => this._bufferComplete(evt), ref: (el) => this._bufferTools = el, unit: ((_b = this.selectionSet) === null || _b === void 0 ? void 0 : _b.unit) || this.defaultBufferUnit })), h("slot", null)));
|
197
200
|
}
|
198
201
|
//--------------------------------------------------------------------------
|
199
202
|
//
|
@@ -228,7 +231,7 @@ export class MapSelectTools {
|
|
228
231
|
*/
|
229
232
|
async _init() {
|
230
233
|
this._initGraphicsLayer();
|
231
|
-
this._initSelectionSet();
|
234
|
+
await this._initSelectionSet();
|
232
235
|
this._initSearchWidget();
|
233
236
|
}
|
234
237
|
/**
|
@@ -236,7 +239,7 @@ export class MapSelectTools {
|
|
236
239
|
*
|
237
240
|
* @protected
|
238
241
|
*/
|
239
|
-
_initSelectionSet() {
|
242
|
+
async _initSelectionSet() {
|
240
243
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
241
244
|
if (this.selectionSet) {
|
242
245
|
this._searchTerm = (_b = (_a = this.selectionSet) === null || _a === void 0 ? void 0 : _a.searchResult) === null || _b === void 0 ? void 0 : _b.name;
|
@@ -251,7 +254,7 @@ export class MapSelectTools {
|
|
251
254
|
];
|
252
255
|
// reset selection label base
|
253
256
|
this._selectionLabel = ((_k = this.selectionSet) === null || _k === void 0 ? void 0 : _k.label) || this._getSelectionBaseLabel();
|
254
|
-
|
257
|
+
await goToSelection(this.selectionSet.selectedIds, this.selectionSet.layerView, this.mapView, false);
|
255
258
|
}
|
256
259
|
else {
|
257
260
|
this._workflowType = EWorkflowType.SEARCH;
|
@@ -427,17 +430,16 @@ export class MapSelectTools {
|
|
427
430
|
this.selectionLoadingChange.emit(false);
|
428
431
|
// Add geometries used for selecting features as graphics
|
429
432
|
this._drawTools.graphics = this.geometries.map(geom => {
|
430
|
-
var _a, _b, _c;
|
431
433
|
const props = {
|
432
434
|
"geometry": geom,
|
433
435
|
"symbol": geom.type === "point" ?
|
434
|
-
|
435
|
-
|
436
|
-
|
436
|
+
this.sketchPointSymbol : geom.type === "polyline" ?
|
437
|
+
this.sketchLineSymbol : geom.type === "polygon" ?
|
438
|
+
this.sketchPolygonSymbol : undefined
|
437
439
|
};
|
438
440
|
return new this.Graphic(props);
|
439
441
|
});
|
440
|
-
|
442
|
+
await this._highlightFeatures(this._selectedIds);
|
441
443
|
}
|
442
444
|
/**
|
443
445
|
* Query the selectLayerView based on any user drawn geometries or buffers
|
@@ -466,8 +468,8 @@ export class MapSelectTools {
|
|
466
468
|
});
|
467
469
|
this._bufferGraphicsLayer.removeAll();
|
468
470
|
this._bufferGraphicsLayer.add(polygonGraphic);
|
469
|
-
|
470
|
-
|
471
|
+
await this._selectFeatures([this._bufferGeometry]);
|
472
|
+
await this.mapView.goTo(polygonGraphic.geometry.extent);
|
471
473
|
}
|
472
474
|
else {
|
473
475
|
if (this._bufferGraphicsLayer) {
|
@@ -511,7 +513,7 @@ export class MapSelectTools {
|
|
511
513
|
// for sketch
|
512
514
|
// checking for clear as it would throw off tests
|
513
515
|
if ((_b = this._drawTools) === null || _b === void 0 ? void 0 : _b.clear) {
|
514
|
-
|
516
|
+
await this._drawTools.clear();
|
515
517
|
}
|
516
518
|
this.selectionSetChange.emit(this._selectedIds.length);
|
517
519
|
}
|
@@ -664,7 +666,8 @@ export class MapSelectTools {
|
|
664
666
|
"docs": {
|
665
667
|
"tags": [],
|
666
668
|
"text": "esri/geometry: https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry.html"
|
667
|
-
}
|
669
|
+
},
|
670
|
+
"defaultValue": "[]"
|
668
671
|
},
|
669
672
|
"isUpdate": {
|
670
673
|
"type": "boolean",
|
@@ -779,6 +782,63 @@ export class MapSelectTools {
|
|
779
782
|
"attribute": "show-buffer-tools",
|
780
783
|
"reflect": false,
|
781
784
|
"defaultValue": "true"
|
785
|
+
},
|
786
|
+
"sketchLineSymbol": {
|
787
|
+
"type": "unknown",
|
788
|
+
"mutable": false,
|
789
|
+
"complexType": {
|
790
|
+
"original": "__esri.SimpleLineSymbol",
|
791
|
+
"resolved": "SimpleLineSymbol",
|
792
|
+
"references": {
|
793
|
+
"___esri": {
|
794
|
+
"location": "global"
|
795
|
+
}
|
796
|
+
}
|
797
|
+
},
|
798
|
+
"required": false,
|
799
|
+
"optional": false,
|
800
|
+
"docs": {
|
801
|
+
"tags": [],
|
802
|
+
"text": "esri/symbols/SimpleLineSymbol | JSON representation : https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-SimpleLineSymbol.html"
|
803
|
+
}
|
804
|
+
},
|
805
|
+
"sketchPointSymbol": {
|
806
|
+
"type": "unknown",
|
807
|
+
"mutable": false,
|
808
|
+
"complexType": {
|
809
|
+
"original": "__esri.SimpleMarkerSymbol",
|
810
|
+
"resolved": "SimpleMarkerSymbol",
|
811
|
+
"references": {
|
812
|
+
"___esri": {
|
813
|
+
"location": "global"
|
814
|
+
}
|
815
|
+
}
|
816
|
+
},
|
817
|
+
"required": false,
|
818
|
+
"optional": false,
|
819
|
+
"docs": {
|
820
|
+
"tags": [],
|
821
|
+
"text": "esri/symbols/SimpleMarkerSymbol | JSON representation: https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-SimpleMarkerSymbol.html"
|
822
|
+
}
|
823
|
+
},
|
824
|
+
"sketchPolygonSymbol": {
|
825
|
+
"type": "unknown",
|
826
|
+
"mutable": false,
|
827
|
+
"complexType": {
|
828
|
+
"original": "__esri.SimpleFillSymbol",
|
829
|
+
"resolved": "SimpleFillSymbol",
|
830
|
+
"references": {
|
831
|
+
"___esri": {
|
832
|
+
"location": "global"
|
833
|
+
}
|
834
|
+
}
|
835
|
+
},
|
836
|
+
"required": false,
|
837
|
+
"optional": false,
|
838
|
+
"docs": {
|
839
|
+
"tags": [],
|
840
|
+
"text": "esri/symbols/SimpleFillSymbol | JSON representation: https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-SimpleFillSymbol.html"
|
841
|
+
}
|
782
842
|
}
|
783
843
|
};
|
784
844
|
}
|
@@ -42,6 +42,9 @@ export class PublicNotification {
|
|
42
42
|
this.selectionLayerIds = [];
|
43
43
|
this.showRefineSelection = false;
|
44
44
|
this.showSearchSettings = true;
|
45
|
+
this.sketchLineSymbol = undefined;
|
46
|
+
this.sketchPointSymbol = undefined;
|
47
|
+
this.sketchPolygonSymbol = undefined;
|
45
48
|
this.addresseeLayer = undefined;
|
46
49
|
this._downloadActive = true;
|
47
50
|
this._numSelected = 0;
|
@@ -93,6 +96,30 @@ export class PublicNotification {
|
|
93
96
|
}
|
94
97
|
}
|
95
98
|
}
|
99
|
+
/**
|
100
|
+
* Called each time the sketchLineSymbol prop is changed.
|
101
|
+
*/
|
102
|
+
async sketchLineSymbolWatchHandler(v, oldV) {
|
103
|
+
if (v && JSON.stringify(v) !== JSON.stringify(oldV)) {
|
104
|
+
this._setLineSymbol(v);
|
105
|
+
}
|
106
|
+
}
|
107
|
+
/**
|
108
|
+
* Called each time the sketchPointSymbol prop is changed.
|
109
|
+
*/
|
110
|
+
async sketchPointSymbolWatchHandler(v, oldV) {
|
111
|
+
if (v && JSON.stringify(v) !== JSON.stringify(oldV)) {
|
112
|
+
this._setPointSymbol(v);
|
113
|
+
}
|
114
|
+
}
|
115
|
+
/**
|
116
|
+
* Called each time the sketchPolygonSymbol prop is changed.
|
117
|
+
*/
|
118
|
+
async sketchPolygonSymbolWatchHandler(v, oldV) {
|
119
|
+
if (v && JSON.stringify(v) !== JSON.stringify(oldV)) {
|
120
|
+
this._setPolygonSymbol(v);
|
121
|
+
}
|
122
|
+
}
|
96
123
|
/**
|
97
124
|
* Called each time the pageType prop is changed.
|
98
125
|
*/
|
@@ -150,6 +177,7 @@ export class PublicNotification {
|
|
150
177
|
async componentWillLoad() {
|
151
178
|
await this._getTranslations();
|
152
179
|
await this._initModules();
|
180
|
+
this._initSymbols();
|
153
181
|
}
|
154
182
|
/**
|
155
183
|
* Renders the component.
|
@@ -170,10 +198,84 @@ export class PublicNotification {
|
|
170
198
|
* @protected
|
171
199
|
*/
|
172
200
|
async _initModules() {
|
173
|
-
const [geometryEngine] = await loadModules([
|
174
|
-
"esri/geometry/geometryEngine"
|
201
|
+
const [geometryEngine, jsonUtils] = await loadModules([
|
202
|
+
"esri/geometry/geometryEngine",
|
203
|
+
"esri/symbols/support/jsonUtils"
|
175
204
|
]);
|
176
205
|
this._geometryEngine = geometryEngine;
|
206
|
+
this._jsonUtils = jsonUtils;
|
207
|
+
}
|
208
|
+
/**
|
209
|
+
* Initialize the default symbols that will be used when creating new graphics
|
210
|
+
*
|
211
|
+
* @protected
|
212
|
+
*/
|
213
|
+
_initSymbols() {
|
214
|
+
this._setLineSymbol(this.sketchLineSymbol);
|
215
|
+
this._setPointSymbol(this.sketchPointSymbol);
|
216
|
+
this._setPolygonSymbol(this.sketchPolygonSymbol);
|
217
|
+
}
|
218
|
+
/**
|
219
|
+
* Convert a JSON representation of a line symbol and/or set the line symbol
|
220
|
+
*
|
221
|
+
* @param v SimpleLineSymbol or a JSON representation of a line symbol
|
222
|
+
*
|
223
|
+
* @protected
|
224
|
+
*/
|
225
|
+
_setLineSymbol(v) {
|
226
|
+
const isSymbol = (v === null || v === void 0 ? void 0 : v.type) === 'simple-line';
|
227
|
+
this.sketchLineSymbol = isSymbol ? v : this._jsonUtils.fromJSON(v ? v : {
|
228
|
+
"type": "esriSLS",
|
229
|
+
"color": [130, 130, 130, 255],
|
230
|
+
"width": 2,
|
231
|
+
"style": "esriSLSSolid"
|
232
|
+
});
|
233
|
+
}
|
234
|
+
/**
|
235
|
+
* Convert a JSON representation of a point symbol and/or set the point symbol
|
236
|
+
*
|
237
|
+
* @param v SimpleMarkerSymbol or a JSON representation of a point symbol
|
238
|
+
*
|
239
|
+
* @protected
|
240
|
+
*/
|
241
|
+
_setPointSymbol(v) {
|
242
|
+
const isSymbol = (v === null || v === void 0 ? void 0 : v.type) === 'simple-marker';
|
243
|
+
this.sketchPointSymbol = isSymbol ? v : this._jsonUtils.fromJSON(v ? v : {
|
244
|
+
"type": "esriSMS",
|
245
|
+
"color": [255, 255, 255, 255],
|
246
|
+
"angle": 0,
|
247
|
+
"xoffset": 0,
|
248
|
+
"yoffset": 0,
|
249
|
+
"size": 6,
|
250
|
+
"style": "esriSMSCircle",
|
251
|
+
"outline": {
|
252
|
+
"type": "esriSLS",
|
253
|
+
"color": [50, 50, 50, 255],
|
254
|
+
"width": 1,
|
255
|
+
"style": "esriSLSSolid"
|
256
|
+
}
|
257
|
+
});
|
258
|
+
}
|
259
|
+
/**
|
260
|
+
* Convert a JSON representation of a polygon symbol and/or set the polygon symbol
|
261
|
+
*
|
262
|
+
* @param v SimpleFillSymbol or a JSON representation of a polygon symbol
|
263
|
+
*
|
264
|
+
* @protected
|
265
|
+
*/
|
266
|
+
_setPolygonSymbol(v) {
|
267
|
+
const isSymbol = (v === null || v === void 0 ? void 0 : v.type) === 'simple-fill';
|
268
|
+
this.sketchPolygonSymbol = isSymbol ? v : this._jsonUtils.fromJSON(v ? v : {
|
269
|
+
"type": "esriSFS",
|
270
|
+
"color": [150, 150, 150, 51],
|
271
|
+
"outline": {
|
272
|
+
"type": "esriSLS",
|
273
|
+
"color": [50, 50, 50, 255],
|
274
|
+
"width": 2,
|
275
|
+
"style": "esriSLSSolid"
|
276
|
+
},
|
277
|
+
"style": "esriSFSSolid"
|
278
|
+
});
|
177
279
|
}
|
178
280
|
/**
|
179
281
|
* Get a calcite action group for the current action
|
@@ -331,7 +433,7 @@ export class PublicNotification {
|
|
331
433
|
const locale = getComponentClosestLanguage(this.el);
|
332
434
|
const selectionLoading = locale && locale === "en" ?
|
333
435
|
`${this._translations.selectionLoading}...` : this._translations.selectionLoading;
|
334
|
-
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-top-sides-1" }, h("map-select-tools", { bufferColor: this.bufferColor, bufferOutlineColor: this.bufferOutlineColor, class: "font-bold", defaultBufferDistance: this.defaultBufferDistance, defaultBufferUnit: this.defaultBufferUnit, 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" } }, this._selectionLoading ? (h("div", null, h("calcite-loader", { active: true, class: "info-blue", inline: true, label: selectionLoading, scale: "m", type: "indeterminate" }))) : (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._selectionLoading ? selectionLoading :
|
436
|
+
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-top-sides-1" }, h("map-select-tools", { bufferColor: this.bufferColor, bufferOutlineColor: this.bufferOutlineColor, class: "font-bold", defaultBufferDistance: this.defaultBufferDistance, defaultBufferUnit: this.defaultBufferUnit, 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, sketchLineSymbol: this.sketchLineSymbol, sketchPointSymbol: this.sketchPointSymbol, sketchPolygonSymbol: this.sketchPolygonSymbol })), h("div", { class: "padding-sides-1 padding-bottom-1", style: { "align-items": "end", "display": "flex" } }, this._selectionLoading ? (h("div", null, h("calcite-loader", { active: true, class: "info-blue", inline: true, label: selectionLoading, scale: "m", type: "indeterminate" }))) : (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._selectionLoading ? selectionLoading :
|
335
437
|
this.noResultText && this._numSelected === 0 ? this.noResultText :
|
336
438
|
this._translations.selectedAddresses.replace("{{n}}", this._numSelected.toString()).replace("{{layer}}", ((_b = this.addresseeLayer) === null || _b === void 0 ? void 0 : _b.layer.title) || ""))), h("div", { class: "padding-sides-1 " + nameLabelClass }, h("calcite-label", { class: "font-bold" }, "List name", h("calcite-input", { onInput: () => {
|
337
439
|
this.labelChange.emit(this._labelName.value);
|
@@ -988,6 +1090,69 @@ export class PublicNotification {
|
|
988
1090
|
"attribute": "show-search-settings",
|
989
1091
|
"reflect": false,
|
990
1092
|
"defaultValue": "true"
|
1093
|
+
},
|
1094
|
+
"sketchLineSymbol": {
|
1095
|
+
"type": "any",
|
1096
|
+
"mutable": false,
|
1097
|
+
"complexType": {
|
1098
|
+
"original": "__esri.SimpleLineSymbol | any",
|
1099
|
+
"resolved": "any",
|
1100
|
+
"references": {
|
1101
|
+
"___esri": {
|
1102
|
+
"location": "global"
|
1103
|
+
}
|
1104
|
+
}
|
1105
|
+
},
|
1106
|
+
"required": false,
|
1107
|
+
"optional": false,
|
1108
|
+
"docs": {
|
1109
|
+
"tags": [],
|
1110
|
+
"text": "esri/symbols/SimpleLineSymbol | JSON representation : https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-SimpleLineSymbol.html\r\n\r\nA JSON representation of the instance in the ArcGIS format.\r\nSee the ArcGIS REST API documentation for examples of the structure of various input JSON objects.\r\nhttps://developers.arcgis.com/documentation/common-data-types/symbol-objects.htm"
|
1111
|
+
},
|
1112
|
+
"attribute": "sketch-line-symbol",
|
1113
|
+
"reflect": false
|
1114
|
+
},
|
1115
|
+
"sketchPointSymbol": {
|
1116
|
+
"type": "any",
|
1117
|
+
"mutable": false,
|
1118
|
+
"complexType": {
|
1119
|
+
"original": "__esri.SimpleMarkerSymbol | any",
|
1120
|
+
"resolved": "any",
|
1121
|
+
"references": {
|
1122
|
+
"___esri": {
|
1123
|
+
"location": "global"
|
1124
|
+
}
|
1125
|
+
}
|
1126
|
+
},
|
1127
|
+
"required": false,
|
1128
|
+
"optional": false,
|
1129
|
+
"docs": {
|
1130
|
+
"tags": [],
|
1131
|
+
"text": "esri/symbols/SimpleMarkerSymbol | JSON representation: https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-SimpleMarkerSymbol.html\r\n\r\nA JSON representation of the instance in the ArcGIS format.\r\nSee the ArcGIS REST API documentation for examples of the structure of various input JSON objects.\r\nhttps://developers.arcgis.com/documentation/common-data-types/symbol-objects.htm"
|
1132
|
+
},
|
1133
|
+
"attribute": "sketch-point-symbol",
|
1134
|
+
"reflect": false
|
1135
|
+
},
|
1136
|
+
"sketchPolygonSymbol": {
|
1137
|
+
"type": "any",
|
1138
|
+
"mutable": false,
|
1139
|
+
"complexType": {
|
1140
|
+
"original": "__esri.SimpleFillSymbol | any",
|
1141
|
+
"resolved": "any",
|
1142
|
+
"references": {
|
1143
|
+
"___esri": {
|
1144
|
+
"location": "global"
|
1145
|
+
}
|
1146
|
+
}
|
1147
|
+
},
|
1148
|
+
"required": false,
|
1149
|
+
"optional": false,
|
1150
|
+
"docs": {
|
1151
|
+
"tags": [],
|
1152
|
+
"text": "esri/symbols/SimpleFillSymbol | JSON representation: https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-SimpleFillSymbol.html\r\n\r\nA JSON representation of the instance in the ArcGIS format.\r\nSee the ArcGIS REST API documentation for examples of the structure of various input JSON objects.\r\nhttps://developers.arcgis.com/documentation/common-data-types/symbol-objects.htm"
|
1153
|
+
},
|
1154
|
+
"attribute": "sketch-polygon-symbol",
|
1155
|
+
"reflect": false
|
991
1156
|
}
|
992
1157
|
};
|
993
1158
|
}
|
@@ -1055,6 +1220,15 @@ export class PublicNotification {
|
|
1055
1220
|
}, {
|
1056
1221
|
"propName": "_selectionSets",
|
1057
1222
|
"methodName": "selectionSetsWatchHandler"
|
1223
|
+
}, {
|
1224
|
+
"propName": "sketchLineSymbol",
|
1225
|
+
"methodName": "sketchLineSymbolWatchHandler"
|
1226
|
+
}, {
|
1227
|
+
"propName": "sketchPointSymbol",
|
1228
|
+
"methodName": "sketchPointSymbolWatchHandler"
|
1229
|
+
}, {
|
1230
|
+
"propName": "sketchPolygonSymbol",
|
1231
|
+
"methodName": "sketchPolygonSymbolWatchHandler"
|
1058
1232
|
}, {
|
1059
1233
|
"propName": "_pageType",
|
1060
1234
|
"methodName": "pageTypeWatchHandler"
|
@@ -51,7 +51,7 @@ export async function queryAllFeatures(start, layer, graphics) {
|
|
51
51
|
*/
|
52
52
|
export async function queryObjectIds(geometries, layer) {
|
53
53
|
let ids = [];
|
54
|
-
const queryDefs = geometries.map(g => _intersectQuery(g, layer));
|
54
|
+
const queryDefs = geometries ? geometries.map(g => _intersectQuery(g, layer)) : [Promise.resolve()];
|
55
55
|
const results = await Promise.all(queryDefs);
|
56
56
|
results.forEach(resultIds => {
|
57
57
|
ids = [
|
@@ -157,7 +157,7 @@ export function getSelectionSetQuery(selectionSet, geometryEngine) {
|
|
157
157
|
* @returns Array of single unioned geometry for the provided geometry type
|
158
158
|
*/
|
159
159
|
function _unionGeoms(geometries, type, geometryEngine) {
|
160
|
-
const geoms = geometries.filter(g => g.type === type);
|
160
|
+
const geoms = (geometries === null || geometries === void 0 ? void 0 : geometries.filter(g => g.type === type)) || [];
|
161
161
|
return geoms.length <= 1 ? geoms : [geometryEngine.union(geoms)];
|
162
162
|
}
|
163
163
|
/**
|
@@ -61,7 +61,7 @@ export async function queryObjectIds(
|
|
61
61
|
layer: __esri.FeatureLayer
|
62
62
|
): Promise<number[]> {
|
63
63
|
let ids = [];
|
64
|
-
const queryDefs = geometries.map(g => _intersectQuery(g, layer))
|
64
|
+
const queryDefs = geometries ? geometries.map(g => _intersectQuery(g, layer)) : [Promise.resolve()];
|
65
65
|
const results = await Promise.all(queryDefs);
|
66
66
|
results.forEach(resultIds => {
|
67
67
|
ids = [
|
@@ -206,7 +206,7 @@ export function getSelectionSetQuery(
|
|
206
206
|
type: string,
|
207
207
|
geometryEngine: __esri.geometryEngine
|
208
208
|
): __esri.Geometry[] {
|
209
|
-
const geoms = geometries
|
209
|
+
const geoms = geometries?.filter(g => g.type === type) || [];
|
210
210
|
return geoms.length <= 1 ? geoms : [geometryEngine.union(geoms)];
|
211
211
|
}
|
212
212
|
|
@@ -156,9 +156,9 @@ const MapDrawTools = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
156
156
|
"mode": "hybrid"
|
157
157
|
}
|
158
158
|
});
|
159
|
-
this.
|
160
|
-
this.
|
161
|
-
this.polygonSymbol = this.
|
159
|
+
this._sketchWidget.viewModel.polylineSymbol = this.polylineSymbol;
|
160
|
+
this._sketchWidget.viewModel.pointSymbol = this.pointSymbol;
|
161
|
+
this._sketchWidget.viewModel.polygonSymbol = this.polygonSymbol;
|
162
162
|
this._sketchWidget.visibleElements = {
|
163
163
|
selectionTools: {
|
164
164
|
"lasso-selection": false,
|
@@ -169,10 +169,6 @@ const MapDrawTools = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
169
169
|
undoRedoMenu: false
|
170
170
|
};
|
171
171
|
this._sketchWidget.on("update", (evt) => {
|
172
|
-
if (evt.state === "start") {
|
173
|
-
this.graphics = evt.graphics;
|
174
|
-
this.sketchGraphicsChange.emit(this.graphics);
|
175
|
-
}
|
176
172
|
if (evt.state === "active") {
|
177
173
|
clearTimeout(this._selectionTimer);
|
178
174
|
this._selectionTimer = setTimeout(() => {
|
@@ -1,37 +1,37 @@
|
|
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 { g as goToSelection, h as highlightFeatures, d as defineCustomElement$2 } from './map-layer-picker2.js';
|
9
|
-
import { b as queryObjectIds, c as getQueryGeoms } from './queryUtils.js';
|
10
|
-
import { c as EWorkflowType, e as ESelectionMode, f as ERefineMode, b as ESketchType } from './interfaces3.js';
|
11
|
-
import { s as state } from './publicNotificationStore.js';
|
12
|
-
import { g as getLocaleComponentStrings } from './locale.js';
|
13
|
-
import { d as defineCustomElement$k } from './buffer-tools2.js';
|
14
|
-
import { d as defineCustomElement$j } from './action.js';
|
15
|
-
import { d as defineCustomElement$i } from './checkbox.js';
|
16
|
-
import { d as defineCustomElement$h } from './chip.js';
|
17
|
-
import { d as defineCustomElement$g } from './combobox.js';
|
18
|
-
import { d as defineCustomElement$f } from './combobox-item.js';
|
19
|
-
import { d as defineCustomElement$e } from './graph.js';
|
20
|
-
import { d as defineCustomElement$d } from './icon.js';
|
21
|
-
import { d as defineCustomElement$c } from './input.js';
|
22
|
-
import { d as defineCustomElement$b } from './label.js';
|
23
|
-
import { d as defineCustomElement$a } from './loader.js';
|
24
|
-
import { d as defineCustomElement$9 } from './option.js';
|
25
|
-
import { d as defineCustomElement$8 } from './progress.js';
|
26
|
-
import { d as defineCustomElement$7 } from './radio-group.js';
|
27
|
-
import { d as defineCustomElement$6 } from './radio-group-item.js';
|
28
|
-
import { d as defineCustomElement$5 } from './select.js';
|
29
|
-
import { d as defineCustomElement$4 } from './slider.js';
|
30
|
-
import { d as defineCustomElement$3 } from './map-draw-tools2.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)}.search-distance{display:flex;padding-top:1rem}";
|
34
|
-
|
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 { g as goToSelection, h as highlightFeatures, d as defineCustomElement$2 } from './map-layer-picker2.js';
|
9
|
+
import { b as queryObjectIds, c as getQueryGeoms } from './queryUtils.js';
|
10
|
+
import { c as EWorkflowType, e as ESelectionMode, f as ERefineMode, b as ESketchType } from './interfaces3.js';
|
11
|
+
import { s as state } from './publicNotificationStore.js';
|
12
|
+
import { g as getLocaleComponentStrings } from './locale.js';
|
13
|
+
import { d as defineCustomElement$k } from './buffer-tools2.js';
|
14
|
+
import { d as defineCustomElement$j } from './action.js';
|
15
|
+
import { d as defineCustomElement$i } from './checkbox.js';
|
16
|
+
import { d as defineCustomElement$h } from './chip.js';
|
17
|
+
import { d as defineCustomElement$g } from './combobox.js';
|
18
|
+
import { d as defineCustomElement$f } from './combobox-item.js';
|
19
|
+
import { d as defineCustomElement$e } from './graph.js';
|
20
|
+
import { d as defineCustomElement$d } from './icon.js';
|
21
|
+
import { d as defineCustomElement$c } from './input.js';
|
22
|
+
import { d as defineCustomElement$b } from './label.js';
|
23
|
+
import { d as defineCustomElement$a } from './loader.js';
|
24
|
+
import { d as defineCustomElement$9 } from './option.js';
|
25
|
+
import { d as defineCustomElement$8 } from './progress.js';
|
26
|
+
import { d as defineCustomElement$7 } from './radio-group.js';
|
27
|
+
import { d as defineCustomElement$6 } from './radio-group-item.js';
|
28
|
+
import { d as defineCustomElement$5 } from './select.js';
|
29
|
+
import { d as defineCustomElement$4 } from './slider.js';
|
30
|
+
import { d as defineCustomElement$3 } from './map-draw-tools2.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)}.search-distance{display:flex;padding-top:1rem}";
|
34
|
+
|
35
35
|
const MapSelectTools = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
36
36
|
constructor() {
|
37
37
|
super();
|
@@ -53,13 +53,16 @@ const MapSelectTools = /*@__PURE__*/ proxyCustomElement(class extends HTMLElemen
|
|
53
53
|
this.enabledLayerIds = [];
|
54
54
|
this.defaultBufferDistance = undefined;
|
55
55
|
this.defaultBufferUnit = undefined;
|
56
|
-
this.geometries =
|
56
|
+
this.geometries = [];
|
57
57
|
this.isUpdate = false;
|
58
58
|
this.mapView = undefined;
|
59
59
|
this.searchConfiguration = undefined;
|
60
60
|
this.selectionSet = undefined;
|
61
61
|
this.selectLayerView = undefined;
|
62
62
|
this.showBufferTools = true;
|
63
|
+
this.sketchLineSymbol = undefined;
|
64
|
+
this.sketchPointSymbol = undefined;
|
65
|
+
this.sketchPolygonSymbol = undefined;
|
63
66
|
this._layerSelectChecked = undefined;
|
64
67
|
this._searchTerm = undefined;
|
65
68
|
this._translations = undefined;
|
@@ -206,7 +209,7 @@ const MapSelectTools = /*@__PURE__*/ proxyCustomElement(class extends HTMLElemen
|
|
206
209
|
const useDrawClass = !this._layerSelectChecked && !searchEnabled ? " div-visible" : " div-not-visible";
|
207
210
|
const showLayerChoiceClass = searchEnabled ? "div-not-visible" : "div-visible";
|
208
211
|
const bufferDistance = typeof ((_a = this.selectionSet) === null || _a === void 0 ? void 0 : _a.distance) === "number" ? this.selectionSet.distance : this.defaultBufferDistance;
|
209
|
-
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: 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("div", { class: showLayerChoiceClass }, h("calcite-label", { layout: "inline" }, h("calcite-checkbox", { checked: this._layerSelectChecked, onCalciteCheckboxChange: () => this._layerSelectChanged(), ref: (el) => this._selectFromLayerElement = el }), "Use layer features")), h("div", { class: useDrawClass }, h("map-draw-tools", { active: true, border: true, mapView: this.mapView, ref: (el) => { this._drawTools = el; } })), h("div", { class: useSelectClass }, h("refine-selection-tools", { active: true, border: true, enabledLayerIds: this.enabledLayerIds, layerView: this.selectLayerView, layerViews: this._refineSelectLayers, mapView: this.mapView, mode: ESelectionMode.ADD, ref: (el) => { this._refineTools = el; }, refineMode: ERefineMode.SUBSET })), h("calcite-label", { class: showBufferToolsClass }, this._translations.searchDistance, h("buffer-tools", { distance: bufferDistance, geometries: this.geometries, onBufferComplete: (evt) => this._bufferComplete(evt), ref: (el) => this._bufferTools = el, unit: ((_b = this.selectionSet) === null || _b === void 0 ? void 0 : _b.unit) || this.defaultBufferUnit })), h("slot", null)));
|
212
|
+
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: 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("div", { class: showLayerChoiceClass }, h("calcite-label", { layout: "inline" }, h("calcite-checkbox", { checked: this._layerSelectChecked, onCalciteCheckboxChange: () => this._layerSelectChanged(), ref: (el) => this._selectFromLayerElement = el }), "Use layer features")), h("div", { class: useDrawClass }, h("map-draw-tools", { active: true, border: true, mapView: this.mapView, pointSymbol: this.sketchPointSymbol, polygonSymbol: this.sketchPolygonSymbol, polylineSymbol: this.sketchLineSymbol, ref: (el) => { this._drawTools = el; } })), h("div", { class: useSelectClass }, h("refine-selection-tools", { active: true, border: true, enabledLayerIds: this.enabledLayerIds, layerView: this.selectLayerView, layerViews: this._refineSelectLayers, mapView: this.mapView, mode: ESelectionMode.ADD, ref: (el) => { this._refineTools = el; }, refineMode: ERefineMode.SUBSET })), h("calcite-label", { class: showBufferToolsClass }, this._translations.searchDistance, h("buffer-tools", { distance: bufferDistance, geometries: this.geometries, onBufferComplete: (evt) => this._bufferComplete(evt), ref: (el) => this._bufferTools = el, unit: ((_b = this.selectionSet) === null || _b === void 0 ? void 0 : _b.unit) || this.defaultBufferUnit })), h("slot", null)));
|
210
213
|
}
|
211
214
|
//--------------------------------------------------------------------------
|
212
215
|
//
|
@@ -241,7 +244,7 @@ const MapSelectTools = /*@__PURE__*/ proxyCustomElement(class extends HTMLElemen
|
|
241
244
|
*/
|
242
245
|
async _init() {
|
243
246
|
this._initGraphicsLayer();
|
244
|
-
this._initSelectionSet();
|
247
|
+
await this._initSelectionSet();
|
245
248
|
this._initSearchWidget();
|
246
249
|
}
|
247
250
|
/**
|
@@ -249,7 +252,7 @@ const MapSelectTools = /*@__PURE__*/ proxyCustomElement(class extends HTMLElemen
|
|
249
252
|
*
|
250
253
|
* @protected
|
251
254
|
*/
|
252
|
-
_initSelectionSet() {
|
255
|
+
async _initSelectionSet() {
|
253
256
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
254
257
|
if (this.selectionSet) {
|
255
258
|
this._searchTerm = (_b = (_a = this.selectionSet) === null || _a === void 0 ? void 0 : _a.searchResult) === null || _b === void 0 ? void 0 : _b.name;
|
@@ -264,7 +267,7 @@ const MapSelectTools = /*@__PURE__*/ proxyCustomElement(class extends HTMLElemen
|
|
264
267
|
];
|
265
268
|
// reset selection label base
|
266
269
|
this._selectionLabel = ((_k = this.selectionSet) === null || _k === void 0 ? void 0 : _k.label) || this._getSelectionBaseLabel();
|
267
|
-
|
270
|
+
await goToSelection(this.selectionSet.selectedIds, this.selectionSet.layerView, this.mapView, false);
|
268
271
|
}
|
269
272
|
else {
|
270
273
|
this._workflowType = EWorkflowType.SEARCH;
|
@@ -440,17 +443,16 @@ const MapSelectTools = /*@__PURE__*/ proxyCustomElement(class extends HTMLElemen
|
|
440
443
|
this.selectionLoadingChange.emit(false);
|
441
444
|
// Add geometries used for selecting features as graphics
|
442
445
|
this._drawTools.graphics = this.geometries.map(geom => {
|
443
|
-
var _a, _b, _c;
|
444
446
|
const props = {
|
445
447
|
"geometry": geom,
|
446
448
|
"symbol": geom.type === "point" ?
|
447
|
-
|
448
|
-
|
449
|
-
|
449
|
+
this.sketchPointSymbol : geom.type === "polyline" ?
|
450
|
+
this.sketchLineSymbol : geom.type === "polygon" ?
|
451
|
+
this.sketchPolygonSymbol : undefined
|
450
452
|
};
|
451
453
|
return new this.Graphic(props);
|
452
454
|
});
|
453
|
-
|
455
|
+
await this._highlightFeatures(this._selectedIds);
|
454
456
|
}
|
455
457
|
/**
|
456
458
|
* Query the selectLayerView based on any user drawn geometries or buffers
|
@@ -479,8 +481,8 @@ const MapSelectTools = /*@__PURE__*/ proxyCustomElement(class extends HTMLElemen
|
|
479
481
|
});
|
480
482
|
this._bufferGraphicsLayer.removeAll();
|
481
483
|
this._bufferGraphicsLayer.add(polygonGraphic);
|
482
|
-
|
483
|
-
|
484
|
+
await this._selectFeatures([this._bufferGeometry]);
|
485
|
+
await this.mapView.goTo(polygonGraphic.geometry.extent);
|
484
486
|
}
|
485
487
|
else {
|
486
488
|
if (this._bufferGraphicsLayer) {
|
@@ -524,7 +526,7 @@ const MapSelectTools = /*@__PURE__*/ proxyCustomElement(class extends HTMLElemen
|
|
524
526
|
// for sketch
|
525
527
|
// checking for clear as it would throw off tests
|
526
528
|
if ((_b = this._drawTools) === null || _b === void 0 ? void 0 : _b.clear) {
|
527
|
-
|
529
|
+
await this._drawTools.clear();
|
528
530
|
}
|
529
531
|
this.selectionSetChange.emit(this._selectedIds.length);
|
530
532
|
}
|
@@ -576,6 +578,9 @@ const MapSelectTools = /*@__PURE__*/ proxyCustomElement(class extends HTMLElemen
|
|
576
578
|
"selectionSet": [16],
|
577
579
|
"selectLayerView": [16],
|
578
580
|
"showBufferTools": [4, "show-buffer-tools"],
|
581
|
+
"sketchLineSymbol": [16],
|
582
|
+
"sketchPointSymbol": [16],
|
583
|
+
"sketchPolygonSymbol": [16],
|
579
584
|
"_layerSelectChecked": [32],
|
580
585
|
"_searchTerm": [32],
|
581
586
|
"_translations": [32],
|
@@ -696,6 +701,6 @@ function defineCustomElement() {
|
|
696
701
|
break;
|
697
702
|
} });
|
698
703
|
}
|
699
|
-
defineCustomElement();
|
700
|
-
|
701
|
-
export { MapSelectTools as M, defineCustomElement as d };
|
704
|
+
defineCustomElement();
|
705
|
+
|
706
|
+
export { MapSelectTools as M, defineCustomElement as d };
|