@esri/solutions-components 0.3.9 → 0.4.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (79) hide show
  1. package/dist/assets/t9n/public-notification/resources.json +0 -2
  2. package/dist/assets/t9n/public-notification/resources_en.json +0 -2
  3. package/dist/cjs/buffer-tools_6.cjs.entry.js +5 -2
  4. package/dist/cjs/calcite-input-message_5.cjs.entry.js +1342 -18
  5. package/dist/cjs/{calcite-input-message.calcite-notice.map-select-tools.pdf-download.refine-selection-cd8ad61e.js → downloadUtils-27dbd8b9.js} +205 -1337
  6. package/dist/cjs/{index.es-e89ba2a1.js → index.es-40d341ed.js} +3 -13
  7. package/dist/cjs/layer-table.cjs.entry.js +5 -15
  8. package/dist/cjs/loader.cjs.js +1 -1
  9. package/dist/cjs/public-notification.cjs.entry.js +23 -2
  10. package/dist/cjs/solutions-components.cjs.js +1 -1
  11. package/dist/collection/components/layer-table/layer-table.js +4 -16
  12. package/dist/collection/components/map-search/map-search.js +1 -1
  13. package/dist/collection/components/map-select-tools/map-select-tools.js +73 -17
  14. package/dist/collection/components/pdf-download/pdf-download.js +9 -76
  15. package/dist/collection/components/public-notification/public-notification.js +45 -3
  16. package/dist/collection/components/refine-selection/refine-selection.js +1 -1
  17. package/dist/collection/components/refine-selection-tools/refine-selection-tools.js +13 -5
  18. package/dist/collection/demos/buffer-tools.html +1 -1
  19. package/dist/collection/utils/csvUtils.js +4 -0
  20. package/dist/collection/utils/csvUtils.ts +7 -0
  21. package/dist/collection/utils/downloadUtils.js +181 -0
  22. package/dist/collection/utils/downloadUtils.ts +235 -0
  23. package/dist/collection/utils/interfaces.ts +8 -1
  24. package/dist/collection/utils/pdfUtils.js +7 -0
  25. package/dist/collection/utils/pdfUtils.ts +13 -2
  26. package/dist/components/downloadUtils.js +2279 -0
  27. package/dist/components/index.es.js +1 -1
  28. package/dist/components/layer-table.js +5 -16
  29. package/dist/components/map-layer-picker2.js +1 -1
  30. package/dist/components/map-search.js +1 -1
  31. package/dist/components/map-select-tools2.js +69 -19
  32. package/dist/components/pdf-download2.js +10 -2124
  33. package/dist/components/public-notification.js +24 -3
  34. package/dist/components/queryUtils.js +1 -1
  35. package/dist/components/refine-selection-tools2.js +6 -3
  36. package/dist/components/refine-selection2.js +1 -1
  37. package/dist/esm/buffer-tools_6.entry.js +6 -3
  38. package/dist/esm/calcite-combobox_3.entry.js +1 -1
  39. package/dist/esm/calcite-input-message_5.entry.js +1341 -13
  40. package/dist/esm/{calcite-input-message.calcite-notice.map-select-tools.pdf-download.refine-selection-ddd74bd6.js → downloadUtils-76e38a94.js} +206 -1335
  41. package/dist/esm/{index.es-8edafdb2.js → index.es-489f4f08.js} +2 -12
  42. package/dist/esm/layer-table.entry.js +6 -16
  43. package/dist/esm/loader.js +1 -1
  44. package/dist/esm/{mapViewUtils-63e118f8.js → mapViewUtils-02696ab6.js} +1 -1
  45. package/dist/esm/public-notification.entry.js +24 -3
  46. package/dist/esm/solutions-components.js +1 -1
  47. package/dist/solutions-components/demos/buffer-tools.html +1 -1
  48. package/dist/solutions-components/{p-cc2e20c8.js → p-1bfd07e3.js} +1 -1
  49. package/dist/solutions-components/{p-117174e8.entry.js → p-335fce8c.entry.js} +1 -1
  50. package/dist/solutions-components/p-4ef94c6b.entry.js +6 -0
  51. package/dist/solutions-components/p-5d27b47d.entry.js +17 -0
  52. package/dist/solutions-components/p-92cb569a.entry.js +6 -0
  53. package/dist/solutions-components/{p-2a96314a.entry.js → p-a3b60bc9.entry.js} +2 -2
  54. package/dist/solutions-components/{p-98884f44.js → p-bff8aa4e.js} +3 -3
  55. package/dist/solutions-components/p-caa7e7a7.js +437 -0
  56. package/dist/solutions-components/solutions-components.esm.js +1 -1
  57. package/dist/solutions-components/utils/csvUtils.ts +7 -0
  58. package/dist/solutions-components/utils/downloadUtils.ts +235 -0
  59. package/dist/solutions-components/utils/interfaces.ts +8 -1
  60. package/dist/solutions-components/utils/pdfUtils.ts +13 -2
  61. package/dist/types/components/json-editor/assets/monaco-editor/monaco.d.ts +8262 -0
  62. package/dist/types/components/map-select-tools/map-select-tools.d.ts +19 -1
  63. package/dist/types/components/pdf-download/pdf-download.d.ts +0 -18
  64. package/dist/types/components/public-notification/public-notification.d.ts +10 -0
  65. package/dist/types/components/refine-selection-tools/refine-selection-tools.d.ts +2 -2
  66. package/dist/types/components.d.ts +6 -2
  67. package/dist/types/preact.d.ts +2 -1
  68. package/dist/types/utils/downloadUtils.d.ts +40 -0
  69. package/dist/types/utils/interfaces.d.ts +6 -2
  70. package/dist/types/utils/pdfUtils.d.ts +3 -1
  71. package/package.json +1 -1
  72. package/dist/cjs/csvUtils-3a56c6d8.js +0 -54
  73. package/dist/components/csvUtils.js +0 -52
  74. package/dist/esm/csvUtils-23b5418f.js +0 -52
  75. package/dist/solutions-components/p-15f9b0a0.entry.js +0 -6
  76. package/dist/solutions-components/p-238db156.js +0 -416
  77. package/dist/solutions-components/p-3069e3b7.js +0 -21
  78. package/dist/solutions-components/p-6d28f991.entry.js +0 -6
  79. package/dist/solutions-components/p-c5341977.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 './pdf-download2.js';
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 queryFeaturesByID, a as queryAllFeatures } from './queryUtils.js';
10
- import { e as exportCSV } from './csvUtils.js';
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
- // Get the attributes of the features to export
241
- const ids = this._getSelectedIds();
242
- const featureSet = await queryFeaturesByID(ids, this._layerView.layer);
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 { b as queryExtent } from './queryUtils.js';
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": [16],
172
+ "searchConfiguration": [1040],
173
173
  "_searchTerm": [32],
174
174
  "_translations": [32],
175
175
  "clear": [64]
@@ -6,7 +6,7 @@
6
6
  import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
7
7
  import { l as loadModules } from './loadModules.js';
8
8
  import { g as goToSelection, h as highlightFeatures, d as defineCustomElement$2 } from './map-layer-picker2.js';
9
- import { c as queryObjectIds, d as getQueryGeoms } from './queryUtils.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';
@@ -77,7 +77,7 @@ const MapSelectTools = /*@__PURE__*/ proxyCustomElement(class extends HTMLElemen
77
77
  async watchGeometriesHandler(newValue, oldValue) {
78
78
  if (newValue !== oldValue) {
79
79
  if (newValue.length > 0) {
80
- return this._geomQuery(this.geometries);
80
+ return this._highlightWithOIDsOrGeoms();
81
81
  }
82
82
  else if (newValue.length === 0) {
83
83
  return this._clearResults(true, true);
@@ -90,6 +90,11 @@ const MapSelectTools = /*@__PURE__*/ proxyCustomElement(class extends HTMLElemen
90
90
  * @returns Promise when complete
91
91
  */
92
92
  async watchSearchConfigurationHandler(newValue, oldValue) {
93
+ console.log("watchSearchConfigurationHandler");
94
+ console.log("newValue");
95
+ console.log(newValue);
96
+ console.log("oldValue");
97
+ console.log(oldValue);
93
98
  if (JSON.stringify(newValue) !== JSON.stringify(oldValue)) {
94
99
  this._initSearchWidget();
95
100
  }
@@ -101,7 +106,7 @@ const MapSelectTools = /*@__PURE__*/ proxyCustomElement(class extends HTMLElemen
101
106
  */
102
107
  async workflowTypeHandler(newValue, oldValue) {
103
108
  if (newValue !== oldValue) {
104
- this.mapView.popup.autoOpenEnabled = ["SELECT", "SKETCH", "REFINE"].indexOf(newValue) < 0;
109
+ this.mapView.popup.autoOpenEnabled = ["SELECT", "SKETCH", "REFINE", "SEARCH"].indexOf(newValue) < 0;
105
110
  this.workflowTypeChange.emit(newValue);
106
111
  }
107
112
  }
@@ -142,7 +147,8 @@ const MapSelectTools = /*@__PURE__*/ proxyCustomElement(class extends HTMLElemen
142
147
  selectedIds: this._selectedIds,
143
148
  layerView: this.selectLayerView,
144
149
  geometries: this.geometries,
145
- refineSelectLayers: this._refineTools.layerViews
150
+ refineSelectLayers: this._refineTools.layerViews,
151
+ skipGeomOIDs: this._skipGeomOIDs
146
152
  };
147
153
  }
148
154
  /**
@@ -151,22 +157,28 @@ const MapSelectTools = /*@__PURE__*/ proxyCustomElement(class extends HTMLElemen
151
157
  labelChange(event) {
152
158
  this._selectionLabel = event.detail;
153
159
  }
160
+ /**
161
+ * Handle changes to the search configuration
162
+ */
163
+ searchConfigurationChangeChanged(event) {
164
+ console.log("searchConfigurationChange listener");
165
+ this.searchConfiguration = event.detail;
166
+ }
154
167
  /**
155
168
  * Listen to changes in the sketch graphics
156
169
  *
157
170
  */
158
171
  sketchGraphicsChange(event) {
159
- this._updateSelection(EWorkflowType.SKETCH, event.detail, this._selectionLabel || this._translations.sketch);
172
+ this._updateSelection(EWorkflowType.SKETCH, event.detail, this._selectionLabel || this._translations.sketch, false);
160
173
  }
161
174
  /**
162
175
  * Listen to changes in the refine graphics
163
176
  *
164
177
  */
165
178
  refineSelectionGraphicsChange(event) {
166
- const graphics = event.detail;
167
- this._updateSelection(EWorkflowType.SELECT, graphics, this._selectionLabel || this._translations.select);
168
- // Using OIDs to avoid issue with points
179
+ const graphics = event.detail.graphics;
169
180
  const oids = Array.isArray(graphics) ? graphics.map(g => g.attributes[g.layer.objectIdField]) : [];
181
+ this._updateSelection(EWorkflowType.SELECT, graphics, this._selectionLabel || this._translations.select, event.detail.useOIDs, oids);
170
182
  return this._highlightFeatures(oids);
171
183
  }
172
184
  //--------------------------------------------------------------------------
@@ -191,7 +203,7 @@ const MapSelectTools = /*@__PURE__*/ proxyCustomElement(class extends HTMLElemen
191
203
  * Renders the component.
192
204
  */
193
205
  render() {
194
- var _a, _b, _c;
206
+ var _a, _b;
195
207
  const searchEnabled = this._workflowType === EWorkflowType.SEARCH;
196
208
  const showSearchClass = searchEnabled ? " div-visible-search" : " div-not-visible";
197
209
  const drawEnabled = this._workflowType === EWorkflowType.SKETCH || this._workflowType === EWorkflowType.SELECT;
@@ -199,7 +211,7 @@ const MapSelectTools = /*@__PURE__*/ proxyCustomElement(class extends HTMLElemen
199
211
  const useSelectClass = this._layerSelectChecked && !searchEnabled ? " div-visible" : " div-not-visible";
200
212
  const useDrawClass = !this._layerSelectChecked && !searchEnabled ? " div-visible" : " div-not-visible";
201
213
  const showLayerChoiceClass = searchEnabled ? "div-not-visible" : "div-visible";
202
- 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: ((_a = this.selectionSet) === null || _a === void 0 ? void 0 : _a.workflowType) === EWorkflowType.SELECT, 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, 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: ((_b = this.selectionSet) === null || _b === void 0 ? void 0 : _b.distance) || this.defaultBufferDistance, geometries: this.geometries, onBufferComplete: (evt) => this._bufferComplete(evt), ref: (el) => this._bufferTools = el, unit: ((_c = this.selectionSet) === null || _c === void 0 ? void 0 : _c.unit) || this.defaultBufferUnit })), h("slot", null)));
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)));
203
215
  }
204
216
  //--------------------------------------------------------------------------
205
217
  //
@@ -243,21 +255,25 @@ const MapSelectTools = /*@__PURE__*/ proxyCustomElement(class extends HTMLElemen
243
255
  * @protected
244
256
  */
245
257
  _initSelectionSet() {
246
- var _a, _b, _c, _d, _e, _f, _g;
258
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
247
259
  if (this.selectionSet) {
248
260
  this._searchTerm = (_b = (_a = this.selectionSet) === null || _a === void 0 ? void 0 : _a.searchResult) === null || _b === void 0 ? void 0 : _b.name;
249
261
  this._workflowType = (_c = this.selectionSet) === null || _c === void 0 ? void 0 : _c.workflowType;
250
262
  this._searchResult = (_d = this.selectionSet) === null || _d === void 0 ? void 0 : _d.searchResult;
251
263
  this._refineSelectLayers = (_e = this.selectionSet) === null || _e === void 0 ? void 0 : _e.refineSelectLayers;
264
+ this._selectedIds = (_f = this.selectionSet) === null || _f === void 0 ? void 0 : _f.selectedIds;
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;
252
267
  this.geometries = [
253
- ...(_f = this.selectionSet) === null || _f === void 0 ? void 0 : _f.geometries
268
+ ...((_j = this.selectionSet) === null || _j === void 0 ? void 0 : _j.geometries) || []
254
269
  ];
255
270
  // reset selection label base
256
- this._selectionLabel = ((_g = this.selectionSet) === null || _g === void 0 ? void 0 : _g.label) || this._getSelectionBaseLabel();
271
+ this._selectionLabel = ((_k = this.selectionSet) === null || _k === void 0 ? void 0 : _k.label) || this._getSelectionBaseLabel();
257
272
  void goToSelection(this.selectionSet.selectedIds, this.selectionSet.layerView, this.mapView, false);
258
273
  }
259
274
  else {
260
275
  this._workflowType = EWorkflowType.SEARCH;
276
+ this.mapView.popup.autoOpenEnabled = false;
261
277
  }
262
278
  }
263
279
  /**
@@ -278,21 +294,33 @@ const MapSelectTools = /*@__PURE__*/ proxyCustomElement(class extends HTMLElemen
278
294
  * @protected
279
295
  */
280
296
  _initSearchWidget() {
297
+ console.log("_initSearchWidget");
298
+ console.log("this.mapView");
299
+ console.log(this.mapView);
300
+ console.log("this._searchElement");
301
+ console.log(this._searchElement);
281
302
  if (this.mapView && this._searchElement) {
303
+ console.log("this._getSearchConfig");
282
304
  const searchConfiguration = this._getSearchConfig(this.searchConfiguration, this.mapView);
305
+ console.log("searchConfiguration");
306
+ console.log(searchConfiguration);
283
307
  const searchOptions = Object.assign({ view: this.mapView, container: this._searchElement, searchTerm: this._searchTerm }, searchConfiguration);
284
308
  this._searchWidget = new this.Search(searchOptions);
309
+ this._searchWidget.popupEnabled = false;
285
310
  this._searchWidget.on("search-clear", () => {
286
311
  void this._clearResults(false);
287
312
  });
288
313
  this._searchWidget.on("select-result", (searchResults) => {
289
- var _a;
314
+ var _a, _b;
290
315
  void this._clearResults(false);
291
316
  if (searchResults.result) {
292
317
  this._searchResult = searchResults.result;
293
- this._updateSelection(EWorkflowType.SEARCH, [searchResults.result.feature], (_a = searchResults === null || searchResults === void 0 ? void 0 : searchResults.result) === null || _a === void 0 ? void 0 : _a.name);
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);
294
321
  }
295
322
  });
323
+ console.log("END search widget init");
296
324
  }
297
325
  }
298
326
  /**
@@ -316,9 +344,11 @@ const MapSelectTools = /*@__PURE__*/ proxyCustomElement(class extends HTMLElemen
316
344
  ? view.map.findLayerById(layerSource.layer.id)
317
345
  : null;
318
346
  if (layerFromMap) {
347
+ console.log("layerFromMap");
319
348
  layerSource.layer = layerFromMap;
320
349
  }
321
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");
322
352
  layerSource.layer = new this.FeatureLayer((_c = layerSource === null || layerSource === void 0 ? void 0 : layerSource.layer) === null || _c === void 0 ? void 0 : _c.url);
323
353
  }
324
354
  }
@@ -374,6 +404,21 @@ const MapSelectTools = /*@__PURE__*/ proxyCustomElement(class extends HTMLElemen
374
404
  _workflowChange(evt) {
375
405
  this._workflowType = evt.detail;
376
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
+ }
377
422
  /**
378
423
  * Highlight the features in the map
379
424
  *
@@ -444,7 +489,7 @@ const MapSelectTools = /*@__PURE__*/ proxyCustomElement(class extends HTMLElemen
444
489
  if (this._bufferGraphicsLayer) {
445
490
  this._bufferGraphicsLayer.removeAll();
446
491
  }
447
- void this._geomQuery(this.geometries);
492
+ return this._highlightWithOIDsOrGeoms();
448
493
  }
449
494
  }
450
495
  /**
@@ -492,10 +537,15 @@ const MapSelectTools = /*@__PURE__*/ proxyCustomElement(class extends HTMLElemen
492
537
  * @param type worflow type
493
538
  * @param graphics graphics to be used for selection
494
539
  * @param label selection label
540
+ * @param useOIDs indicates if the OIDs should override the geometry for selection
541
+ * @param oids list of IDs to select when useGeoms is false
495
542
  *
496
543
  * @protected
497
544
  */
498
- _updateSelection(type, graphics, label) {
545
+ _updateSelection(type, graphics, label, useOIDs, oids) {
546
+ this._selectedIds = useOIDs && oids ? oids : this._selectedIds;
547
+ // see https://github.com/Esri/solutions-components/issues/148
548
+ this._skipGeomOIDs = useOIDs ? oids : undefined;
499
549
  this.geometries = Array.isArray(graphics) ? graphics.map(g => g.geometry) : this.geometries;
500
550
  this._workflowType = type;
501
551
  this._selectionLabel = label;
@@ -525,7 +575,7 @@ const MapSelectTools = /*@__PURE__*/ proxyCustomElement(class extends HTMLElemen
525
575
  "geometries": [16],
526
576
  "isUpdate": [4, "is-update"],
527
577
  "mapView": [16],
528
- "searchConfiguration": [16],
578
+ "searchConfiguration": [1040],
529
579
  "selectionSet": [16],
530
580
  "selectLayerView": [16],
531
581
  "showBufferTools": [4, "show-buffer-tools"],
@@ -535,7 +585,7 @@ const MapSelectTools = /*@__PURE__*/ proxyCustomElement(class extends HTMLElemen
535
585
  "_workflowType": [32],
536
586
  "clearSelection": [64],
537
587
  "getSelection": [64]
538
- }, [[8, "labelChange", "labelChange"], [8, "sketchGraphicsChange", "sketchGraphicsChange"], [8, "refineSelectionGraphicsChange", "refineSelectionGraphicsChange"]]]);
588
+ }, [[8, "labelChange", "labelChange"], [8, "searchConfigurationChange", "searchConfigurationChangeChanged"], [8, "sketchGraphicsChange", "sketchGraphicsChange"], [8, "refineSelectionGraphicsChange", "refineSelectionGraphicsChange"]]]);
539
589
  function defineCustomElement() {
540
590
  if (typeof customElements === "undefined") {
541
591
  return;