@esri/solutions-components 0.4.0 → 0.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/t9n/map-select-tools/resources.json +1 -1
- package/dist/assets/t9n/map-select-tools/resources_en.json +1 -1
- package/dist/assets/t9n/public-notification/resources.json +5 -5
- package/dist/assets/t9n/public-notification/resources_en.json +5 -5
- package/dist/assets/t9n/refine-selection/resources.json +3 -3
- package/dist/assets/t9n/refine-selection/resources_en.json +3 -3
- package/dist/cjs/calcite-input-message_5.cjs.entry.js +1344 -18
- package/dist/cjs/{calcite-input-message.calcite-notice.map-select-tools.pdf-download.refine-selection-da276a1c.js → downloadUtils-99981c6b.js} +278 -1383
- package/dist/cjs/{index.es-176629d8.js → index.es-53f3bc97.js} +3 -13
- package/dist/cjs/layer-table.cjs.entry.js +5 -15
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/public-notification.cjs.entry.js +25 -10
- package/dist/cjs/solutions-components.cjs.js +1 -1
- package/dist/collection/components/layer-table/layer-table.js +4 -16
- package/dist/collection/components/map-search/map-search.js +1 -1
- package/dist/collection/components/map-select-tools/map-select-tools.js +43 -39
- package/dist/collection/components/pdf-download/pdf-download.js +33 -80
- package/dist/collection/components/public-notification/public-notification.js +26 -11
- package/dist/collection/components/refine-selection/refine-selection.js +1 -1
- package/dist/collection/utils/csvUtils.js +4 -0
- package/dist/collection/utils/csvUtils.ts +7 -0
- package/dist/collection/utils/downloadUtils.js +254 -0
- package/dist/collection/utils/downloadUtils.ts +344 -0
- package/dist/collection/utils/interfaces.ts +3 -2
- package/dist/collection/utils/pdfUtils.js +7 -0
- package/dist/collection/utils/pdfUtils.ts +13 -2
- package/dist/components/downloadUtils.js +2352 -0
- package/dist/components/index.es.js +1 -1
- package/dist/components/layer-table.js +5 -16
- package/dist/components/map-layer-picker2.js +1 -1
- package/dist/components/map-search.js +1 -1
- package/dist/components/map-select-tools2.js +45 -41
- package/dist/components/pdf-download2.js +14 -2126
- package/dist/components/public-notification.js +26 -11
- package/dist/components/queryUtils.js +1 -1
- package/dist/components/refine-selection-tools2.js +1 -1
- package/dist/components/refine-selection2.js +1 -1
- package/dist/esm/buffer-tools_6.entry.js +1 -1
- package/dist/esm/calcite-combobox_3.entry.js +1 -1
- package/dist/esm/calcite-input-message_5.entry.js +1343 -13
- package/dist/esm/{calcite-input-message.calcite-notice.map-select-tools.pdf-download.refine-selection-c6f63458.js → downloadUtils-4bb47330.js} +279 -1381
- package/dist/esm/{index.es-54a6f3a3.js → index.es-4424d2f7.js} +2 -12
- package/dist/esm/layer-table.entry.js +6 -16
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{mapViewUtils-63e118f8.js → mapViewUtils-02696ab6.js} +1 -1
- package/dist/esm/public-notification.entry.js +26 -11
- package/dist/esm/solutions-components.js +1 -1
- package/dist/solutions-components/p-0aed9b0d.js +437 -0
- package/dist/solutions-components/p-0d3b0fa0.entry.js +17 -0
- package/dist/solutions-components/{p-cc2e20c8.js → p-1bfd07e3.js} +1 -1
- package/dist/solutions-components/{p-117174e8.entry.js → p-335fce8c.entry.js} +1 -1
- package/dist/solutions-components/{p-1e459361.js → p-50117f71.js} +3 -3
- package/dist/solutions-components/p-5e4dfbe4.entry.js +6 -0
- package/dist/solutions-components/{p-8a0c0935.entry.js → p-a3b60bc9.entry.js} +1 -1
- package/dist/solutions-components/p-ec7f7804.entry.js +6 -0
- package/dist/solutions-components/solutions-components.esm.js +1 -1
- package/dist/solutions-components/utils/csvUtils.ts +7 -0
- package/dist/solutions-components/utils/downloadUtils.ts +344 -0
- package/dist/solutions-components/utils/interfaces.ts +3 -2
- package/dist/solutions-components/utils/pdfUtils.ts +13 -2
- package/dist/types/components/map-select-tools/map-select-tools.d.ts +12 -6
- package/dist/types/components/pdf-download/pdf-download.d.ts +4 -20
- package/dist/types/components/public-notification/public-notification.d.ts +9 -1
- package/dist/types/components.d.ts +4 -2
- package/dist/types/utils/downloadUtils.d.ts +42 -0
- package/dist/types/utils/interfaces.d.ts +2 -3
- package/dist/types/utils/pdfUtils.d.ts +3 -1
- package/package.json +1 -1
- package/dist/cjs/csvUtils-3a56c6d8.js +0 -54
- package/dist/components/csvUtils.js +0 -52
- package/dist/esm/csvUtils-23b5418f.js +0 -52
- package/dist/solutions-components/p-3069e3b7.js +0 -21
- package/dist/solutions-components/p-6d28f991.entry.js +0 -6
- package/dist/solutions-components/p-80f5e33c.js +0 -416
- package/dist/solutions-components/p-8927862a.entry.js +0 -6
- package/dist/solutions-components/p-e69c58e5.entry.js +0 -6
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
5
5
|
*/
|
|
6
6
|
import { a as commonjsGlobal, c as createCommonjsModule, g as getDefaultExportFromCjs } from './_commonjsHelpers.js';
|
|
7
|
-
import { _ as _typeof_1 } from './
|
|
7
|
+
import { _ as _typeof_1 } from './downloadUtils.js';
|
|
8
8
|
|
|
9
9
|
var check = function (it) {
|
|
10
10
|
return it && it.Math == Math && it;
|
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
7
7
|
import { g as getLocaleComponentStrings } from './locale.js';
|
|
8
8
|
import { g as goToSelection, a as getMapLayerView, d as defineCustomElement$2 } from './map-layer-picker2.js';
|
|
9
|
-
import { q as
|
|
10
|
-
import {
|
|
9
|
+
import { q as queryAllFeatures } from './queryUtils.js';
|
|
10
|
+
import { d as downloadCSV } from './downloadUtils.js';
|
|
11
11
|
import { d as defineCustomElement$l } from './button.js';
|
|
12
12
|
import { d as defineCustomElement$k } from './checkbox.js';
|
|
13
13
|
import { d as defineCustomElement$j } from './chip.js';
|
|
@@ -237,20 +237,9 @@ const LayerTable$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
|
237
237
|
* @returns a promise that will resolve when the operation is complete
|
|
238
238
|
*/
|
|
239
239
|
async _exportToCSV() {
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
const attributes = featureSet.features.map(f => f.attributes);
|
|
244
|
-
// Get the column headings from the first record and add to front of list of attributes
|
|
245
|
-
const columnNames = [];
|
|
246
|
-
const entry = attributes[0];
|
|
247
|
-
Object.keys(entry).forEach(k => {
|
|
248
|
-
if (entry.hasOwnProperty(k)) {
|
|
249
|
-
columnNames.push(k);
|
|
250
|
-
}
|
|
251
|
-
});
|
|
252
|
-
attributes.unshift(columnNames);
|
|
253
|
-
return exportCSV(attributes);
|
|
240
|
+
return downloadCSV([], this._layerView.layer, this._getSelectedIds(), false, // formatUsingLayerPopup
|
|
241
|
+
false, // removeDuplicates
|
|
242
|
+
true);
|
|
254
243
|
}
|
|
255
244
|
/**
|
|
256
245
|
* Zoom to all selected features
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
5
5
|
*/
|
|
6
6
|
import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
|
7
|
-
import {
|
|
7
|
+
import { a as queryExtent } from './queryUtils.js';
|
|
8
8
|
import { s as state } from './publicNotificationStore.js';
|
|
9
9
|
import { d as defineCustomElement$6 } from './chip.js';
|
|
10
10
|
import { d as defineCustomElement$5 } from './combobox.js';
|
|
@@ -169,7 +169,7 @@ const MapSearch$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
169
169
|
static get style() { return mapSearchCss; }
|
|
170
170
|
}, [0, "map-search", {
|
|
171
171
|
"mapView": [16],
|
|
172
|
-
"searchConfiguration": [
|
|
172
|
+
"searchConfiguration": [1040],
|
|
173
173
|
"_searchTerm": [32],
|
|
174
174
|
"_translations": [32],
|
|
175
175
|
"clear": [64]
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
|
7
7
|
import { l as loadModules } from './loadModules.js';
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
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
10
|
import { c as EWorkflowType, e as ESelectionMode, f as ERefineMode, b as ESketchType } from './interfaces3.js';
|
|
11
11
|
import { s as state } from './publicNotificationStore.js';
|
|
12
12
|
import { g as getLocaleComponentStrings } from './locale.js';
|
|
@@ -47,12 +47,6 @@ const MapSelectTools = /*@__PURE__*/ proxyCustomElement(class extends HTMLElemen
|
|
|
47
47
|
* string: A label to help uniquely identify the selection set
|
|
48
48
|
*/
|
|
49
49
|
this._selectionLabel = "";
|
|
50
|
-
/**
|
|
51
|
-
* boolean: When false the geometries will be used for selection
|
|
52
|
-
* When true a list of OIDs will be used
|
|
53
|
-
* see https://github.com/Esri/solutions-components/issues/148
|
|
54
|
-
*/
|
|
55
|
-
this._skipGeomQuery = false;
|
|
56
50
|
this.bufferColor = [227, 139, 79, 0.8];
|
|
57
51
|
this.bufferOutlineColor = [255, 255, 255];
|
|
58
52
|
this.enabledLayerIds = [];
|
|
@@ -83,12 +77,7 @@ const MapSelectTools = /*@__PURE__*/ proxyCustomElement(class extends HTMLElemen
|
|
|
83
77
|
async watchGeometriesHandler(newValue, oldValue) {
|
|
84
78
|
if (newValue !== oldValue) {
|
|
85
79
|
if (newValue.length > 0) {
|
|
86
|
-
|
|
87
|
-
void highlightFeatures(this._selectedIds, this.selectLayerView, this.mapView);
|
|
88
|
-
}
|
|
89
|
-
else {
|
|
90
|
-
return this._geomQuery(this.geometries);
|
|
91
|
-
}
|
|
80
|
+
return this._highlightWithOIDsOrGeoms();
|
|
92
81
|
}
|
|
93
82
|
else if (newValue.length === 0) {
|
|
94
83
|
return this._clearResults(true, true);
|
|
@@ -117,7 +106,7 @@ const MapSelectTools = /*@__PURE__*/ proxyCustomElement(class extends HTMLElemen
|
|
|
117
106
|
*/
|
|
118
107
|
async workflowTypeHandler(newValue, oldValue) {
|
|
119
108
|
if (newValue !== oldValue) {
|
|
120
|
-
this.mapView.popup.autoOpenEnabled = ["SELECT", "SKETCH", "REFINE"].indexOf(newValue) < 0;
|
|
109
|
+
this.mapView.popup.autoOpenEnabled = ["SELECT", "SKETCH", "REFINE", "SEARCH"].indexOf(newValue) < 0;
|
|
121
110
|
this.workflowTypeChange.emit(newValue);
|
|
122
111
|
}
|
|
123
112
|
}
|
|
@@ -159,7 +148,7 @@ const MapSelectTools = /*@__PURE__*/ proxyCustomElement(class extends HTMLElemen
|
|
|
159
148
|
layerView: this.selectLayerView,
|
|
160
149
|
geometries: this.geometries,
|
|
161
150
|
refineSelectLayers: this._refineTools.layerViews,
|
|
162
|
-
|
|
151
|
+
skipGeomOIDs: this._skipGeomOIDs
|
|
163
152
|
};
|
|
164
153
|
}
|
|
165
154
|
/**
|
|
@@ -172,6 +161,7 @@ const MapSelectTools = /*@__PURE__*/ proxyCustomElement(class extends HTMLElemen
|
|
|
172
161
|
* Handle changes to the search configuration
|
|
173
162
|
*/
|
|
174
163
|
searchConfigurationChangeChanged(event) {
|
|
164
|
+
console.log("searchConfigurationChange listener");
|
|
175
165
|
this.searchConfiguration = event.detail;
|
|
176
166
|
}
|
|
177
167
|
/**
|
|
@@ -179,7 +169,7 @@ const MapSelectTools = /*@__PURE__*/ proxyCustomElement(class extends HTMLElemen
|
|
|
179
169
|
*
|
|
180
170
|
*/
|
|
181
171
|
sketchGraphicsChange(event) {
|
|
182
|
-
this._updateSelection(EWorkflowType.SKETCH, event.detail, this._selectionLabel || this._translations.sketch,
|
|
172
|
+
this._updateSelection(EWorkflowType.SKETCH, event.detail, this._selectionLabel || this._translations.sketch, false);
|
|
183
173
|
}
|
|
184
174
|
/**
|
|
185
175
|
* Listen to changes in the refine graphics
|
|
@@ -187,9 +177,8 @@ const MapSelectTools = /*@__PURE__*/ proxyCustomElement(class extends HTMLElemen
|
|
|
187
177
|
*/
|
|
188
178
|
refineSelectionGraphicsChange(event) {
|
|
189
179
|
const graphics = event.detail.graphics;
|
|
190
|
-
this._skipGeomQuery = event.detail.useOIDs;
|
|
191
180
|
const oids = Array.isArray(graphics) ? graphics.map(g => g.attributes[g.layer.objectIdField]) : [];
|
|
192
|
-
this._updateSelection(EWorkflowType.SELECT, graphics, this._selectionLabel || this._translations.select,
|
|
181
|
+
this._updateSelection(EWorkflowType.SELECT, graphics, this._selectionLabel || this._translations.select, event.detail.useOIDs, oids);
|
|
193
182
|
return this._highlightFeatures(oids);
|
|
194
183
|
}
|
|
195
184
|
//--------------------------------------------------------------------------
|
|
@@ -214,7 +203,7 @@ const MapSelectTools = /*@__PURE__*/ proxyCustomElement(class extends HTMLElemen
|
|
|
214
203
|
* Renders the component.
|
|
215
204
|
*/
|
|
216
205
|
render() {
|
|
217
|
-
var _a, _b
|
|
206
|
+
var _a, _b;
|
|
218
207
|
const searchEnabled = this._workflowType === EWorkflowType.SEARCH;
|
|
219
208
|
const showSearchClass = searchEnabled ? " div-visible-search" : " div-not-visible";
|
|
220
209
|
const drawEnabled = this._workflowType === EWorkflowType.SKETCH || this._workflowType === EWorkflowType.SELECT;
|
|
@@ -222,7 +211,7 @@ const MapSelectTools = /*@__PURE__*/ proxyCustomElement(class extends HTMLElemen
|
|
|
222
211
|
const useSelectClass = this._layerSelectChecked && !searchEnabled ? " div-visible" : " div-not-visible";
|
|
223
212
|
const useDrawClass = !this._layerSelectChecked && !searchEnabled ? " div-visible" : " div-not-visible";
|
|
224
213
|
const showLayerChoiceClass = searchEnabled ? "div-not-visible" : "div-visible";
|
|
225
|
-
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:
|
|
214
|
+
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: ((_a = this.selectionSet) === null || _a === void 0 ? void 0 : _a.distance) || this.defaultBufferDistance, 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)));
|
|
226
215
|
}
|
|
227
216
|
//--------------------------------------------------------------------------
|
|
228
217
|
//
|
|
@@ -266,23 +255,25 @@ const MapSelectTools = /*@__PURE__*/ proxyCustomElement(class extends HTMLElemen
|
|
|
266
255
|
* @protected
|
|
267
256
|
*/
|
|
268
257
|
_initSelectionSet() {
|
|
269
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
258
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
270
259
|
if (this.selectionSet) {
|
|
271
260
|
this._searchTerm = (_b = (_a = this.selectionSet) === null || _a === void 0 ? void 0 : _a.searchResult) === null || _b === void 0 ? void 0 : _b.name;
|
|
272
261
|
this._workflowType = (_c = this.selectionSet) === null || _c === void 0 ? void 0 : _c.workflowType;
|
|
273
262
|
this._searchResult = (_d = this.selectionSet) === null || _d === void 0 ? void 0 : _d.searchResult;
|
|
274
263
|
this._refineSelectLayers = (_e = this.selectionSet) === null || _e === void 0 ? void 0 : _e.refineSelectLayers;
|
|
275
264
|
this._selectedIds = (_f = this.selectionSet) === null || _f === void 0 ? void 0 : _f.selectedIds;
|
|
276
|
-
this.
|
|
265
|
+
this._skipGeomOIDs = (_g = this.selectionSet) === null || _g === void 0 ? void 0 : _g.skipGeomOIDs;
|
|
266
|
+
this._layerSelectChecked = ((_h = this.selectionSet) === null || _h === void 0 ? void 0 : _h.workflowType) === EWorkflowType.SELECT;
|
|
277
267
|
this.geometries = [
|
|
278
|
-
...((
|
|
268
|
+
...((_j = this.selectionSet) === null || _j === void 0 ? void 0 : _j.geometries) || []
|
|
279
269
|
];
|
|
280
270
|
// reset selection label base
|
|
281
|
-
this._selectionLabel = ((
|
|
271
|
+
this._selectionLabel = ((_k = this.selectionSet) === null || _k === void 0 ? void 0 : _k.label) || this._getSelectionBaseLabel();
|
|
282
272
|
void goToSelection(this.selectionSet.selectedIds, this.selectionSet.layerView, this.mapView, false);
|
|
283
273
|
}
|
|
284
274
|
else {
|
|
285
275
|
this._workflowType = EWorkflowType.SEARCH;
|
|
276
|
+
this.mapView.popup.autoOpenEnabled = false;
|
|
286
277
|
}
|
|
287
278
|
}
|
|
288
279
|
/**
|
|
@@ -315,15 +306,18 @@ const MapSelectTools = /*@__PURE__*/ proxyCustomElement(class extends HTMLElemen
|
|
|
315
306
|
console.log(searchConfiguration);
|
|
316
307
|
const searchOptions = Object.assign({ view: this.mapView, container: this._searchElement, searchTerm: this._searchTerm }, searchConfiguration);
|
|
317
308
|
this._searchWidget = new this.Search(searchOptions);
|
|
309
|
+
this._searchWidget.popupEnabled = false;
|
|
318
310
|
this._searchWidget.on("search-clear", () => {
|
|
319
311
|
void this._clearResults(false);
|
|
320
312
|
});
|
|
321
313
|
this._searchWidget.on("select-result", (searchResults) => {
|
|
322
|
-
var _a;
|
|
314
|
+
var _a, _b;
|
|
323
315
|
void this._clearResults(false);
|
|
324
316
|
if (searchResults.result) {
|
|
325
317
|
this._searchResult = searchResults.result;
|
|
326
|
-
|
|
318
|
+
const useOIDs = ((_a = searchResults.source) === null || _a === void 0 ? void 0 : _a.layer.id) === this.selectLayerView.layer.id;
|
|
319
|
+
const oids = useOIDs ? [searchResults.result.feature.getObjectId()] : undefined;
|
|
320
|
+
this._updateSelection(EWorkflowType.SEARCH, [searchResults.result.feature], (_b = searchResults === null || searchResults === void 0 ? void 0 : searchResults.result) === null || _b === void 0 ? void 0 : _b.name, useOIDs, oids);
|
|
327
321
|
}
|
|
328
322
|
});
|
|
329
323
|
console.log("END search widget init");
|
|
@@ -350,9 +344,11 @@ const MapSelectTools = /*@__PURE__*/ proxyCustomElement(class extends HTMLElemen
|
|
|
350
344
|
? view.map.findLayerById(layerSource.layer.id)
|
|
351
345
|
: null;
|
|
352
346
|
if (layerFromMap) {
|
|
347
|
+
console.log("layerFromMap");
|
|
353
348
|
layerSource.layer = layerFromMap;
|
|
354
349
|
}
|
|
355
350
|
else if ((_b = layerSource === null || layerSource === void 0 ? void 0 : layerSource.layer) === null || _b === void 0 ? void 0 : _b.url) {
|
|
351
|
+
console.log("create new");
|
|
356
352
|
layerSource.layer = new this.FeatureLayer((_c = layerSource === null || layerSource === void 0 ? void 0 : layerSource.layer) === null || _c === void 0 ? void 0 : _c.url);
|
|
357
353
|
}
|
|
358
354
|
}
|
|
@@ -408,6 +404,21 @@ const MapSelectTools = /*@__PURE__*/ proxyCustomElement(class extends HTMLElemen
|
|
|
408
404
|
_workflowChange(evt) {
|
|
409
405
|
this._workflowType = evt.detail;
|
|
410
406
|
}
|
|
407
|
+
/**
|
|
408
|
+
* Highlight the features in the map based on OIDs when skipOIDs have been defined
|
|
409
|
+
*
|
|
410
|
+
* @protected
|
|
411
|
+
*/
|
|
412
|
+
async _highlightWithOIDsOrGeoms() {
|
|
413
|
+
var _a;
|
|
414
|
+
if (((_a = this._skipGeomOIDs) === null || _a === void 0 ? void 0 : _a.length) > 0) {
|
|
415
|
+
this._selectedIds = this._skipGeomOIDs;
|
|
416
|
+
return this._highlightFeatures(this._selectedIds);
|
|
417
|
+
}
|
|
418
|
+
else {
|
|
419
|
+
return this._geomQuery(this.geometries);
|
|
420
|
+
}
|
|
421
|
+
}
|
|
411
422
|
/**
|
|
412
423
|
* Highlight the features in the map
|
|
413
424
|
*
|
|
@@ -452,7 +463,6 @@ const MapSelectTools = /*@__PURE__*/ proxyCustomElement(class extends HTMLElemen
|
|
|
452
463
|
* @protected
|
|
453
464
|
*/
|
|
454
465
|
async _bufferComplete(evt) {
|
|
455
|
-
var _a, _b;
|
|
456
466
|
this._bufferGeometry = Array.isArray(evt.detail) ?
|
|
457
467
|
evt.detail[0] : evt.detail;
|
|
458
468
|
if (this._bufferGeometry) {
|
|
@@ -479,13 +489,7 @@ const MapSelectTools = /*@__PURE__*/ proxyCustomElement(class extends HTMLElemen
|
|
|
479
489
|
if (this._bufferGraphicsLayer) {
|
|
480
490
|
this._bufferGraphicsLayer.removeAll();
|
|
481
491
|
}
|
|
482
|
-
|
|
483
|
-
this._selectedIds = (_b = this.selectionSet) === null || _b === void 0 ? void 0 : _b.selectedIds;
|
|
484
|
-
void this._highlightFeatures(this._selectedIds);
|
|
485
|
-
}
|
|
486
|
-
else {
|
|
487
|
-
void this._geomQuery(this.geometries);
|
|
488
|
-
}
|
|
492
|
+
return this._highlightWithOIDsOrGeoms();
|
|
489
493
|
}
|
|
490
494
|
}
|
|
491
495
|
/**
|
|
@@ -533,15 +537,15 @@ const MapSelectTools = /*@__PURE__*/ proxyCustomElement(class extends HTMLElemen
|
|
|
533
537
|
* @param type worflow type
|
|
534
538
|
* @param graphics graphics to be used for selection
|
|
535
539
|
* @param label selection label
|
|
536
|
-
* @param
|
|
537
|
-
* @param oids list of IDs to select when
|
|
540
|
+
* @param useOIDs indicates if the OIDs should override the geometry for selection
|
|
541
|
+
* @param oids list of IDs to select when useOIDs is true
|
|
538
542
|
*
|
|
539
543
|
* @protected
|
|
540
544
|
*/
|
|
541
|
-
_updateSelection(type, graphics, label,
|
|
542
|
-
this._selectedIds = oids ? oids : this._selectedIds;
|
|
545
|
+
_updateSelection(type, graphics, label, useOIDs, oids) {
|
|
546
|
+
this._selectedIds = useOIDs && oids ? oids : this._selectedIds;
|
|
543
547
|
// see https://github.com/Esri/solutions-components/issues/148
|
|
544
|
-
this.
|
|
548
|
+
this._skipGeomOIDs = useOIDs ? oids : undefined;
|
|
545
549
|
this.geometries = Array.isArray(graphics) ? graphics.map(g => g.geometry) : this.geometries;
|
|
546
550
|
this._workflowType = type;
|
|
547
551
|
this._selectionLabel = label;
|
|
@@ -571,7 +575,7 @@ const MapSelectTools = /*@__PURE__*/ proxyCustomElement(class extends HTMLElemen
|
|
|
571
575
|
"geometries": [16],
|
|
572
576
|
"isUpdate": [4, "is-update"],
|
|
573
577
|
"mapView": [16],
|
|
574
|
-
"searchConfiguration": [
|
|
578
|
+
"searchConfiguration": [1040],
|
|
575
579
|
"selectionSet": [16],
|
|
576
580
|
"selectLayerView": [16],
|
|
577
581
|
"showBufferTools": [4, "show-buffer-tools"],
|