@esri/solutions-components 0.3.9 → 0.4.0

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.
Files changed (39) hide show
  1. package/dist/cjs/buffer-tools_6.cjs.entry.js +5 -2
  2. package/dist/cjs/{calcite-input-message.calcite-notice.map-select-tools.pdf-download.refine-selection-cd8ad61e.js → calcite-input-message.calcite-notice.map-select-tools.pdf-download.refine-selection-da276a1c.js} +60 -14
  3. package/dist/cjs/calcite-input-message_5.cjs.entry.js +1 -1
  4. package/dist/cjs/{index.es-e89ba2a1.js → index.es-176629d8.js} +1 -1
  5. package/dist/cjs/loader.cjs.js +1 -1
  6. package/dist/cjs/public-notification.cjs.entry.js +21 -0
  7. package/dist/cjs/solutions-components.cjs.js +1 -1
  8. package/dist/collection/components/map-select-tools/map-select-tools.js +65 -13
  9. package/dist/collection/components/public-notification/public-notification.js +42 -0
  10. package/dist/collection/components/refine-selection-tools/refine-selection-tools.js +13 -5
  11. package/dist/collection/demos/buffer-tools.html +1 -1
  12. package/dist/collection/utils/interfaces.ts +6 -0
  13. package/dist/components/map-select-tools2.js +61 -15
  14. package/dist/components/public-notification.js +21 -0
  15. package/dist/components/refine-selection-tools2.js +5 -2
  16. package/dist/esm/buffer-tools_6.entry.js +5 -2
  17. package/dist/esm/{calcite-input-message.calcite-notice.map-select-tools.pdf-download.refine-selection-ddd74bd6.js → calcite-input-message.calcite-notice.map-select-tools.pdf-download.refine-selection-c6f63458.js} +61 -15
  18. package/dist/esm/calcite-input-message_5.entry.js +1 -1
  19. package/dist/esm/{index.es-8edafdb2.js → index.es-54a6f3a3.js} +1 -1
  20. package/dist/esm/loader.js +1 -1
  21. package/dist/esm/public-notification.entry.js +21 -0
  22. package/dist/esm/solutions-components.js +1 -1
  23. package/dist/solutions-components/demos/buffer-tools.html +1 -1
  24. package/dist/solutions-components/{p-98884f44.js → p-1e459361.js} +1 -1
  25. package/dist/solutions-components/{p-238db156.js → p-80f5e33c.js} +12 -12
  26. package/dist/solutions-components/{p-c5341977.entry.js → p-8927862a.entry.js} +1 -1
  27. package/dist/solutions-components/{p-2a96314a.entry.js → p-8a0c0935.entry.js} +2 -2
  28. package/dist/solutions-components/p-e69c58e5.entry.js +6 -0
  29. package/dist/solutions-components/solutions-components.esm.js +1 -1
  30. package/dist/solutions-components/utils/interfaces.ts +6 -0
  31. package/dist/types/components/json-editor/assets/monaco-editor/monaco.d.ts +8262 -0
  32. package/dist/types/components/map-select-tools/map-select-tools.d.ts +13 -1
  33. package/dist/types/components/public-notification/public-notification.d.ts +10 -0
  34. package/dist/types/components/refine-selection-tools/refine-selection-tools.d.ts +2 -2
  35. package/dist/types/components.d.ts +6 -2
  36. package/dist/types/preact.d.ts +2 -1
  37. package/dist/types/utils/interfaces.d.ts +5 -0
  38. package/package.json +1 -1
  39. package/dist/solutions-components/p-15f9b0a0.entry.js +0 -6
@@ -5,7 +5,7 @@
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 { g as goToSelection, h as highlightFeatures, d as defineCustomElement$2 } from './map-layer-picker2.js';
8
+ import { h as highlightFeatures, g as goToSelection, d as defineCustomElement$2 } from './map-layer-picker2.js';
9
9
  import { c as queryObjectIds, d 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';
@@ -47,6 +47,12 @@ 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;
50
56
  this.bufferColor = [227, 139, 79, 0.8];
51
57
  this.bufferOutlineColor = [255, 255, 255];
52
58
  this.enabledLayerIds = [];
@@ -77,7 +83,12 @@ const MapSelectTools = /*@__PURE__*/ proxyCustomElement(class extends HTMLElemen
77
83
  async watchGeometriesHandler(newValue, oldValue) {
78
84
  if (newValue !== oldValue) {
79
85
  if (newValue.length > 0) {
80
- return this._geomQuery(this.geometries);
86
+ if (this._skipGeomQuery) {
87
+ void highlightFeatures(this._selectedIds, this.selectLayerView, this.mapView);
88
+ }
89
+ else {
90
+ return this._geomQuery(this.geometries);
91
+ }
81
92
  }
82
93
  else if (newValue.length === 0) {
83
94
  return this._clearResults(true, true);
@@ -90,6 +101,11 @@ const MapSelectTools = /*@__PURE__*/ proxyCustomElement(class extends HTMLElemen
90
101
  * @returns Promise when complete
91
102
  */
92
103
  async watchSearchConfigurationHandler(newValue, oldValue) {
104
+ console.log("watchSearchConfigurationHandler");
105
+ console.log("newValue");
106
+ console.log(newValue);
107
+ console.log("oldValue");
108
+ console.log(oldValue);
93
109
  if (JSON.stringify(newValue) !== JSON.stringify(oldValue)) {
94
110
  this._initSearchWidget();
95
111
  }
@@ -142,7 +158,8 @@ const MapSelectTools = /*@__PURE__*/ proxyCustomElement(class extends HTMLElemen
142
158
  selectedIds: this._selectedIds,
143
159
  layerView: this.selectLayerView,
144
160
  geometries: this.geometries,
145
- refineSelectLayers: this._refineTools.layerViews
161
+ refineSelectLayers: this._refineTools.layerViews,
162
+ skipGeomQuery: this._skipGeomQuery
146
163
  };
147
164
  }
148
165
  /**
@@ -151,22 +168,28 @@ const MapSelectTools = /*@__PURE__*/ proxyCustomElement(class extends HTMLElemen
151
168
  labelChange(event) {
152
169
  this._selectionLabel = event.detail;
153
170
  }
171
+ /**
172
+ * Handle changes to the search configuration
173
+ */
174
+ searchConfigurationChangeChanged(event) {
175
+ this.searchConfiguration = event.detail;
176
+ }
154
177
  /**
155
178
  * Listen to changes in the sketch graphics
156
179
  *
157
180
  */
158
181
  sketchGraphicsChange(event) {
159
- this._updateSelection(EWorkflowType.SKETCH, event.detail, this._selectionLabel || this._translations.sketch);
182
+ this._updateSelection(EWorkflowType.SKETCH, event.detail, this._selectionLabel || this._translations.sketch, true);
160
183
  }
161
184
  /**
162
185
  * Listen to changes in the refine graphics
163
186
  *
164
187
  */
165
188
  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
189
+ const graphics = event.detail.graphics;
190
+ this._skipGeomQuery = event.detail.useOIDs;
169
191
  const oids = Array.isArray(graphics) ? graphics.map(g => g.attributes[g.layer.objectIdField]) : [];
192
+ this._updateSelection(EWorkflowType.SELECT, graphics, this._selectionLabel || this._translations.select, !event.detail.useOIDs, oids);
170
193
  return this._highlightFeatures(oids);
171
194
  }
172
195
  //--------------------------------------------------------------------------
@@ -199,7 +222,7 @@ const MapSelectTools = /*@__PURE__*/ proxyCustomElement(class extends HTMLElemen
199
222
  const useSelectClass = this._layerSelectChecked && !searchEnabled ? " div-visible" : " div-not-visible";
200
223
  const useDrawClass = !this._layerSelectChecked && !searchEnabled ? " div-visible" : " div-not-visible";
201
224
  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)));
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: ((_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, 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: ((_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)));
203
226
  }
204
227
  //--------------------------------------------------------------------------
205
228
  //
@@ -243,17 +266,19 @@ const MapSelectTools = /*@__PURE__*/ proxyCustomElement(class extends HTMLElemen
243
266
  * @protected
244
267
  */
245
268
  _initSelectionSet() {
246
- var _a, _b, _c, _d, _e, _f, _g;
269
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
247
270
  if (this.selectionSet) {
248
271
  this._searchTerm = (_b = (_a = this.selectionSet) === null || _a === void 0 ? void 0 : _a.searchResult) === null || _b === void 0 ? void 0 : _b.name;
249
272
  this._workflowType = (_c = this.selectionSet) === null || _c === void 0 ? void 0 : _c.workflowType;
250
273
  this._searchResult = (_d = this.selectionSet) === null || _d === void 0 ? void 0 : _d.searchResult;
251
274
  this._refineSelectLayers = (_e = this.selectionSet) === null || _e === void 0 ? void 0 : _e.refineSelectLayers;
275
+ this._selectedIds = (_f = this.selectionSet) === null || _f === void 0 ? void 0 : _f.selectedIds;
276
+ this._skipGeomQuery = (_g = this.selectionSet) === null || _g === void 0 ? void 0 : _g.skipGeomQuery;
252
277
  this.geometries = [
253
- ...(_f = this.selectionSet) === null || _f === void 0 ? void 0 : _f.geometries
278
+ ...((_h = this.selectionSet) === null || _h === void 0 ? void 0 : _h.geometries) || []
254
279
  ];
255
280
  // reset selection label base
256
- this._selectionLabel = ((_g = this.selectionSet) === null || _g === void 0 ? void 0 : _g.label) || this._getSelectionBaseLabel();
281
+ this._selectionLabel = ((_j = this.selectionSet) === null || _j === void 0 ? void 0 : _j.label) || this._getSelectionBaseLabel();
257
282
  void goToSelection(this.selectionSet.selectedIds, this.selectionSet.layerView, this.mapView, false);
258
283
  }
259
284
  else {
@@ -278,8 +303,16 @@ const MapSelectTools = /*@__PURE__*/ proxyCustomElement(class extends HTMLElemen
278
303
  * @protected
279
304
  */
280
305
  _initSearchWidget() {
306
+ console.log("_initSearchWidget");
307
+ console.log("this.mapView");
308
+ console.log(this.mapView);
309
+ console.log("this._searchElement");
310
+ console.log(this._searchElement);
281
311
  if (this.mapView && this._searchElement) {
312
+ console.log("this._getSearchConfig");
282
313
  const searchConfiguration = this._getSearchConfig(this.searchConfiguration, this.mapView);
314
+ console.log("searchConfiguration");
315
+ console.log(searchConfiguration);
283
316
  const searchOptions = Object.assign({ view: this.mapView, container: this._searchElement, searchTerm: this._searchTerm }, searchConfiguration);
284
317
  this._searchWidget = new this.Search(searchOptions);
285
318
  this._searchWidget.on("search-clear", () => {
@@ -290,9 +323,10 @@ const MapSelectTools = /*@__PURE__*/ proxyCustomElement(class extends HTMLElemen
290
323
  void this._clearResults(false);
291
324
  if (searchResults.result) {
292
325
  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);
326
+ 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, true);
294
327
  }
295
328
  });
329
+ console.log("END search widget init");
296
330
  }
297
331
  }
298
332
  /**
@@ -418,6 +452,7 @@ const MapSelectTools = /*@__PURE__*/ proxyCustomElement(class extends HTMLElemen
418
452
  * @protected
419
453
  */
420
454
  async _bufferComplete(evt) {
455
+ var _a, _b;
421
456
  this._bufferGeometry = Array.isArray(evt.detail) ?
422
457
  evt.detail[0] : evt.detail;
423
458
  if (this._bufferGeometry) {
@@ -444,7 +479,13 @@ const MapSelectTools = /*@__PURE__*/ proxyCustomElement(class extends HTMLElemen
444
479
  if (this._bufferGraphicsLayer) {
445
480
  this._bufferGraphicsLayer.removeAll();
446
481
  }
447
- void this._geomQuery(this.geometries);
482
+ if (this._skipGeomQuery || ((_a = this.selectionSet) === null || _a === void 0 ? void 0 : _a.skipGeomQuery)) {
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
+ }
448
489
  }
449
490
  }
450
491
  /**
@@ -492,10 +533,15 @@ const MapSelectTools = /*@__PURE__*/ proxyCustomElement(class extends HTMLElemen
492
533
  * @param type worflow type
493
534
  * @param graphics graphics to be used for selection
494
535
  * @param label selection label
536
+ * @param useGeoms indicates if the geometries should be used directly for selections
537
+ * @param oids list of IDs to select when useGeoms is false
495
538
  *
496
539
  * @protected
497
540
  */
498
- _updateSelection(type, graphics, label) {
541
+ _updateSelection(type, graphics, label, useGeoms, oids) {
542
+ this._selectedIds = oids ? oids : this._selectedIds;
543
+ // see https://github.com/Esri/solutions-components/issues/148
544
+ this._skipGeomQuery = !useGeoms;
499
545
  this.geometries = Array.isArray(graphics) ? graphics.map(g => g.geometry) : this.geometries;
500
546
  this._workflowType = type;
501
547
  this._selectionLabel = label;
@@ -535,7 +581,7 @@ const MapSelectTools = /*@__PURE__*/ proxyCustomElement(class extends HTMLElemen
535
581
  "_workflowType": [32],
536
582
  "clearSelection": [64],
537
583
  "getSelection": [64]
538
- }, [[8, "labelChange", "labelChange"], [8, "sketchGraphicsChange", "sketchGraphicsChange"], [8, "refineSelectionGraphicsChange", "refineSelectionGraphicsChange"]]]);
584
+ }, [[8, "labelChange", "labelChange"], [8, "searchConfigurationChange", "searchConfigurationChangeChanged"], [8, "sketchGraphicsChange", "sketchGraphicsChange"], [8, "refineSelectionGraphicsChange", "refineSelectionGraphicsChange"]]]);
539
585
  function defineCustomElement() {
540
586
  if (typeof customElements === "undefined") {
541
587
  return;
@@ -54,6 +54,7 @@ const PublicNotification$1 = /*@__PURE__*/ proxyCustomElement(class extends HTML
54
54
  super();
55
55
  this.__registerHost();
56
56
  this.labelChange = createEvent(this, "labelChange", 7);
57
+ this.searchConfigurationChange = createEvent(this, "searchConfigurationChange", 7);
57
58
  this.addresseeLayerIds = [];
58
59
  this.bufferColor = [227, 139, 79, 0.8];
59
60
  this.bufferOutlineColor = [255, 255, 255];
@@ -92,6 +93,25 @@ const PublicNotification$1 = /*@__PURE__*/ proxyCustomElement(class extends HTML
92
93
  this._popupsEnabled = v === null || v === void 0 ? void 0 : v.popup.autoOpenEnabled;
93
94
  }
94
95
  }
96
+ /**
97
+ * Called each time the searchConfiguration prop is changed.
98
+ *
99
+ * @returns Promise when complete
100
+ */
101
+ async watchSearchConfigurationHandler(newValue, oldValue) {
102
+ //TODO adding this here to see if its any different than having in map-select-tools
103
+ // I would have thought that the prop would have made it through on the next render of map-select-tools
104
+ // however we are still seeing a broken search...need to understand why and don't see a clean way to debug in devext
105
+ console.log("PN watchSearchConfigurationHandler");
106
+ console.log("PN newValue");
107
+ console.log(newValue);
108
+ console.log("PN oldValue");
109
+ console.log(oldValue);
110
+ if (JSON.stringify(newValue) !== JSON.stringify(oldValue)) {
111
+ console.log("Emit event from parent");
112
+ this.searchConfigurationChange.emit(newValue);
113
+ }
114
+ }
95
115
  /**
96
116
  * Called each time the selectionSets prop is changed.
97
117
  */
@@ -712,6 +732,7 @@ const PublicNotification$1 = /*@__PURE__*/ proxyCustomElement(class extends HTML
712
732
  get el() { return this; }
713
733
  static get watchers() { return {
714
734
  "mapView": ["mapViewWatchHandler"],
735
+ "searchConfiguration": ["watchSearchConfigurationHandler"],
715
736
  "_selectionSets": ["selectionSetsWatchHandler"],
716
737
  "_pageType": ["pageTypeWatchHandler"]
717
738
  }; }
@@ -239,7 +239,7 @@ const RefineSelectionTools = /*@__PURE__*/ proxyCustomElement(class extends HTML
239
239
  return prev;
240
240
  }, []);
241
241
  }
242
- this.refineSelectionGraphicsChange.emit(graphics);
242
+ this.refineSelectionGraphicsChange.emit({ graphics, useOIDs: false });
243
243
  this._clear();
244
244
  });
245
245
  });
@@ -313,7 +313,10 @@ const RefineSelectionTools = /*@__PURE__*/ proxyCustomElement(class extends HTML
313
313
  });
314
314
  });
315
315
  if (this.refineMode === ERefineMode.SUBSET) {
316
- this.refineSelectionGraphicsChange.emit(graphics);
316
+ this.refineSelectionGraphicsChange.emit({
317
+ graphics,
318
+ useOIDs: this.layerViews[0].layer.title === this.layerView.layer.title
319
+ });
317
320
  }
318
321
  else {
319
322
  const oids = Array.isArray(graphics) ? graphics.map(g => { var _a; return g.attributes[(_a = g === null || g === void 0 ? void 0 : g.layer) === null || _a === void 0 ? void 0 : _a.objectIdField]; }) : [];
@@ -1739,7 +1739,7 @@ const RefineSelectionTools = class {
1739
1739
  return prev;
1740
1740
  }, []);
1741
1741
  }
1742
- this.refineSelectionGraphicsChange.emit(graphics);
1742
+ this.refineSelectionGraphicsChange.emit({ graphics, useOIDs: false });
1743
1743
  this._clear();
1744
1744
  });
1745
1745
  });
@@ -1813,7 +1813,10 @@ const RefineSelectionTools = class {
1813
1813
  });
1814
1814
  });
1815
1815
  if (this.refineMode === ERefineMode.SUBSET) {
1816
- this.refineSelectionGraphicsChange.emit(graphics);
1816
+ this.refineSelectionGraphicsChange.emit({
1817
+ graphics,
1818
+ useOIDs: this.layerViews[0].layer.title === this.layerView.layer.title
1819
+ });
1817
1820
  }
1818
1821
  else {
1819
1822
  const oids = Array.isArray(graphics) ? graphics.map(g => { var _a; return g.attributes[(_a = g === null || g === void 0 ? void 0 : g.layer) === null || _a === void 0 ? void 0 : _a.objectIdField]; }) : [];
@@ -8,7 +8,7 @@ import { s as setRequestedIcon, g as getElementProp, a as getSlotted } from './d
8
8
  import { S as StatusIcons } from './interfaces-4ae145eb.js';
9
9
  import { c as connectConditionalSlotComponent, d as disconnectConditionalSlotComponent } from './conditionalSlot-d09506c4.js';
10
10
  import { l as loadModules } from './loadModules-649aedac.js';
11
- import { g as goToSelection, h as highlightFeatures, d as queryObjectIds, e as getQueryGeoms, q as queryFeaturesByID } from './mapViewUtils-63e118f8.js';
11
+ import { h as highlightFeatures, g as goToSelection, d as queryObjectIds, e as getQueryGeoms, q as queryFeaturesByID } from './mapViewUtils-63e118f8.js';
12
12
  import { E as EWorkflowType, f as ESelectionMode, g as ERefineMode, c as ESketchType } from './interfaces-d0d83efa.js';
13
13
  import { s as state } from './publicNotificationStore-b9daaee4.js';
14
14
  import { g as getLocaleComponentStrings } from './locale-4a87aff1.js';
@@ -244,6 +244,12 @@ const MapSelectTools = class {
244
244
  * string: A label to help uniquely identify the selection set
245
245
  */
246
246
  this._selectionLabel = "";
247
+ /**
248
+ * boolean: When false the geometries will be used for selection
249
+ * When true a list of OIDs will be used
250
+ * see https://github.com/Esri/solutions-components/issues/148
251
+ */
252
+ this._skipGeomQuery = false;
247
253
  this.bufferColor = [227, 139, 79, 0.8];
248
254
  this.bufferOutlineColor = [255, 255, 255];
249
255
  this.enabledLayerIds = [];
@@ -274,7 +280,12 @@ const MapSelectTools = class {
274
280
  async watchGeometriesHandler(newValue, oldValue) {
275
281
  if (newValue !== oldValue) {
276
282
  if (newValue.length > 0) {
277
- return this._geomQuery(this.geometries);
283
+ if (this._skipGeomQuery) {
284
+ void highlightFeatures(this._selectedIds, this.selectLayerView, this.mapView);
285
+ }
286
+ else {
287
+ return this._geomQuery(this.geometries);
288
+ }
278
289
  }
279
290
  else if (newValue.length === 0) {
280
291
  return this._clearResults(true, true);
@@ -287,6 +298,11 @@ const MapSelectTools = class {
287
298
  * @returns Promise when complete
288
299
  */
289
300
  async watchSearchConfigurationHandler(newValue, oldValue) {
301
+ console.log("watchSearchConfigurationHandler");
302
+ console.log("newValue");
303
+ console.log(newValue);
304
+ console.log("oldValue");
305
+ console.log(oldValue);
290
306
  if (JSON.stringify(newValue) !== JSON.stringify(oldValue)) {
291
307
  this._initSearchWidget();
292
308
  }
@@ -339,7 +355,8 @@ const MapSelectTools = class {
339
355
  selectedIds: this._selectedIds,
340
356
  layerView: this.selectLayerView,
341
357
  geometries: this.geometries,
342
- refineSelectLayers: this._refineTools.layerViews
358
+ refineSelectLayers: this._refineTools.layerViews,
359
+ skipGeomQuery: this._skipGeomQuery
343
360
  };
344
361
  }
345
362
  /**
@@ -348,22 +365,28 @@ const MapSelectTools = class {
348
365
  labelChange(event) {
349
366
  this._selectionLabel = event.detail;
350
367
  }
368
+ /**
369
+ * Handle changes to the search configuration
370
+ */
371
+ searchConfigurationChangeChanged(event) {
372
+ this.searchConfiguration = event.detail;
373
+ }
351
374
  /**
352
375
  * Listen to changes in the sketch graphics
353
376
  *
354
377
  */
355
378
  sketchGraphicsChange(event) {
356
- this._updateSelection(EWorkflowType.SKETCH, event.detail, this._selectionLabel || this._translations.sketch);
379
+ this._updateSelection(EWorkflowType.SKETCH, event.detail, this._selectionLabel || this._translations.sketch, true);
357
380
  }
358
381
  /**
359
382
  * Listen to changes in the refine graphics
360
383
  *
361
384
  */
362
385
  refineSelectionGraphicsChange(event) {
363
- const graphics = event.detail;
364
- this._updateSelection(EWorkflowType.SELECT, graphics, this._selectionLabel || this._translations.select);
365
- // Using OIDs to avoid issue with points
386
+ const graphics = event.detail.graphics;
387
+ this._skipGeomQuery = event.detail.useOIDs;
366
388
  const oids = Array.isArray(graphics) ? graphics.map(g => g.attributes[g.layer.objectIdField]) : [];
389
+ this._updateSelection(EWorkflowType.SELECT, graphics, this._selectionLabel || this._translations.select, !event.detail.useOIDs, oids);
367
390
  return this._highlightFeatures(oids);
368
391
  }
369
392
  //--------------------------------------------------------------------------
@@ -396,7 +419,7 @@ const MapSelectTools = class {
396
419
  const useSelectClass = this._layerSelectChecked && !searchEnabled ? " div-visible" : " div-not-visible";
397
420
  const useDrawClass = !this._layerSelectChecked && !searchEnabled ? " div-visible" : " div-not-visible";
398
421
  const showLayerChoiceClass = searchEnabled ? "div-not-visible" : "div-visible";
399
- return (h$1(Host, null, h$1("div", { class: "padding-bottom-1" }, h$1("calcite-radio-group", { class: "w-100", onCalciteRadioGroupChange: (evt) => this._workflowChange(evt) }, h$1("calcite-radio-group-item", { checked: searchEnabled, class: "w-50 end-border", value: EWorkflowType.SEARCH }, this._translations.search), h$1("calcite-radio-group-item", { checked: drawEnabled, class: "w-50", value: EWorkflowType.SKETCH }, this._translations.sketch))), h$1("div", { class: showSearchClass }, h$1("div", { class: "search-widget", ref: (el) => { this._searchElement = el; } })), h$1("div", { class: showLayerChoiceClass }, h$1("calcite-label", { layout: "inline" }, h$1("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$1("div", { class: useDrawClass }, h$1("map-draw-tools", { active: true, border: true, mapView: this.mapView, ref: (el) => { this._drawTools = el; } })), h$1("div", { class: useSelectClass }, h$1("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$1("calcite-label", { class: showBufferToolsClass }, this._translations.searchDistance, h$1("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$1("slot", null)));
422
+ return (h$1(Host, null, h$1("div", { class: "padding-bottom-1" }, h$1("calcite-radio-group", { class: "w-100", onCalciteRadioGroupChange: (evt) => this._workflowChange(evt) }, h$1("calcite-radio-group-item", { checked: searchEnabled, class: "w-50 end-border", value: EWorkflowType.SEARCH }, this._translations.search), h$1("calcite-radio-group-item", { checked: drawEnabled, class: "w-50", value: EWorkflowType.SKETCH }, this._translations.sketch))), h$1("div", { class: showSearchClass }, h$1("div", { class: "search-widget", ref: (el) => { this._searchElement = el; } })), h$1("div", { class: showLayerChoiceClass }, h$1("calcite-label", { layout: "inline" }, h$1("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$1("div", { class: useDrawClass }, h$1("map-draw-tools", { active: true, border: true, mapView: this.mapView, ref: (el) => { this._drawTools = el; } })), h$1("div", { class: useSelectClass }, h$1("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$1("calcite-label", { class: showBufferToolsClass }, this._translations.searchDistance, h$1("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$1("slot", null)));
400
423
  }
401
424
  //--------------------------------------------------------------------------
402
425
  //
@@ -440,17 +463,19 @@ const MapSelectTools = class {
440
463
  * @protected
441
464
  */
442
465
  _initSelectionSet() {
443
- var _a, _b, _c, _d, _e, _f, _g;
466
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
444
467
  if (this.selectionSet) {
445
468
  this._searchTerm = (_b = (_a = this.selectionSet) === null || _a === void 0 ? void 0 : _a.searchResult) === null || _b === void 0 ? void 0 : _b.name;
446
469
  this._workflowType = (_c = this.selectionSet) === null || _c === void 0 ? void 0 : _c.workflowType;
447
470
  this._searchResult = (_d = this.selectionSet) === null || _d === void 0 ? void 0 : _d.searchResult;
448
471
  this._refineSelectLayers = (_e = this.selectionSet) === null || _e === void 0 ? void 0 : _e.refineSelectLayers;
472
+ this._selectedIds = (_f = this.selectionSet) === null || _f === void 0 ? void 0 : _f.selectedIds;
473
+ this._skipGeomQuery = (_g = this.selectionSet) === null || _g === void 0 ? void 0 : _g.skipGeomQuery;
449
474
  this.geometries = [
450
- ...(_f = this.selectionSet) === null || _f === void 0 ? void 0 : _f.geometries
475
+ ...((_h = this.selectionSet) === null || _h === void 0 ? void 0 : _h.geometries) || []
451
476
  ];
452
477
  // reset selection label base
453
- this._selectionLabel = ((_g = this.selectionSet) === null || _g === void 0 ? void 0 : _g.label) || this._getSelectionBaseLabel();
478
+ this._selectionLabel = ((_j = this.selectionSet) === null || _j === void 0 ? void 0 : _j.label) || this._getSelectionBaseLabel();
454
479
  void goToSelection(this.selectionSet.selectedIds, this.selectionSet.layerView, this.mapView, false);
455
480
  }
456
481
  else {
@@ -475,8 +500,16 @@ const MapSelectTools = class {
475
500
  * @protected
476
501
  */
477
502
  _initSearchWidget() {
503
+ console.log("_initSearchWidget");
504
+ console.log("this.mapView");
505
+ console.log(this.mapView);
506
+ console.log("this._searchElement");
507
+ console.log(this._searchElement);
478
508
  if (this.mapView && this._searchElement) {
509
+ console.log("this._getSearchConfig");
479
510
  const searchConfiguration = this._getSearchConfig(this.searchConfiguration, this.mapView);
511
+ console.log("searchConfiguration");
512
+ console.log(searchConfiguration);
480
513
  const searchOptions = Object.assign({ view: this.mapView, container: this._searchElement, searchTerm: this._searchTerm }, searchConfiguration);
481
514
  this._searchWidget = new this.Search(searchOptions);
482
515
  this._searchWidget.on("search-clear", () => {
@@ -487,9 +520,10 @@ const MapSelectTools = class {
487
520
  void this._clearResults(false);
488
521
  if (searchResults.result) {
489
522
  this._searchResult = searchResults.result;
490
- 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);
523
+ 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, true);
491
524
  }
492
525
  });
526
+ console.log("END search widget init");
493
527
  }
494
528
  }
495
529
  /**
@@ -615,6 +649,7 @@ const MapSelectTools = class {
615
649
  * @protected
616
650
  */
617
651
  async _bufferComplete(evt) {
652
+ var _a, _b;
618
653
  this._bufferGeometry = Array.isArray(evt.detail) ?
619
654
  evt.detail[0] : evt.detail;
620
655
  if (this._bufferGeometry) {
@@ -641,7 +676,13 @@ const MapSelectTools = class {
641
676
  if (this._bufferGraphicsLayer) {
642
677
  this._bufferGraphicsLayer.removeAll();
643
678
  }
644
- void this._geomQuery(this.geometries);
679
+ if (this._skipGeomQuery || ((_a = this.selectionSet) === null || _a === void 0 ? void 0 : _a.skipGeomQuery)) {
680
+ this._selectedIds = (_b = this.selectionSet) === null || _b === void 0 ? void 0 : _b.selectedIds;
681
+ void this._highlightFeatures(this._selectedIds);
682
+ }
683
+ else {
684
+ void this._geomQuery(this.geometries);
685
+ }
645
686
  }
646
687
  }
647
688
  /**
@@ -689,10 +730,15 @@ const MapSelectTools = class {
689
730
  * @param type worflow type
690
731
  * @param graphics graphics to be used for selection
691
732
  * @param label selection label
733
+ * @param useGeoms indicates if the geometries should be used directly for selections
734
+ * @param oids list of IDs to select when useGeoms is false
692
735
  *
693
736
  * @protected
694
737
  */
695
- _updateSelection(type, graphics, label) {
738
+ _updateSelection(type, graphics, label, useGeoms, oids) {
739
+ this._selectedIds = oids ? oids : this._selectedIds;
740
+ // see https://github.com/Esri/solutions-components/issues/148
741
+ this._skipGeomQuery = !useGeoms;
696
742
  this.geometries = Array.isArray(graphics) ? graphics.map(g => g.geometry) : this.geometries;
697
743
  this._workflowType = type;
698
744
  this._selectionLabel = label;
@@ -1934,7 +1980,7 @@ function(t){var e=function(t){for(var e=t.length,r=new Uint8Array(e),n=0;n<e;n++
1934
1980
  * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
1935
1981
  * ====================================================================
1936
1982
  */
1937
- function(t){function e(){return (n.canvg?Promise.resolve(n.canvg):import('./index.es-8edafdb2.js')).catch((function(t){return Promise.reject(new Error("Could not load canvg: "+t))})).then((function(t){return t.default?t.default:t}))}E.API.addSvgAsImage=function(t,r,n,i,o,s,c,u){if(isNaN(r)||isNaN(n))throw a.error("jsPDF.addSvgAsImage: Invalid coordinates",arguments),new Error("Invalid coordinates passed to jsPDF.addSvgAsImage");if(isNaN(i)||isNaN(o))throw a.error("jsPDF.addSvgAsImage: Invalid measurements",arguments),new Error("Invalid measurements (width and/or height) passed to jsPDF.addSvgAsImage");var h=document.createElement("canvas");h.width=i,h.height=o;var l=h.getContext("2d");l.fillStyle="#fff",l.fillRect(0,0,h.width,h.height);var f={ignoreMouse:!0,ignoreAnimation:!0,ignoreDimensions:!0},d=this;return e().then((function(e){return e.fromString(l,t,f)}),(function(){return Promise.reject(new Error("Could not load canvg."))})).then((function(t){return t.render(f)})).then((function(){d.addImage(h.toDataURL("image/jpeg",1),r,n,i,o,c,u);}))};}(),E.API.putTotalPages=function(t){var e,r=0;parseInt(this.internal.getFont().id.substr(1),10)<15?(e=new RegExp(t,"g"),r=this.internal.getNumberOfPages()):(e=new RegExp(this.pdfEscape16(t,this.internal.getFont()),"g"),r=this.pdfEscape16(this.internal.getNumberOfPages()+"",this.internal.getFont()));for(var n=1;n<=this.internal.getNumberOfPages();n++)for(var i=0;i<this.internal.pages[n].length;i++)this.internal.pages[n][i]=this.internal.pages[n][i].replace(e,r);return this},E.API.viewerPreferences=function(e,r){var n;e=e||{},r=r||!1;var i,a,o,s={HideToolbar:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},HideMenubar:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},HideWindowUI:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},FitWindow:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},CenterWindow:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},DisplayDocTitle:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.4},NonFullScreenPageMode:{defaultValue:"UseNone",value:"UseNone",type:"name",explicitSet:!1,valueSet:["UseNone","UseOutlines","UseThumbs","UseOC"],pdfVersion:1.3},Direction:{defaultValue:"L2R",value:"L2R",type:"name",explicitSet:!1,valueSet:["L2R","R2L"],pdfVersion:1.3},ViewArea:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},ViewClip:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintArea:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintClip:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintScaling:{defaultValue:"AppDefault",value:"AppDefault",type:"name",explicitSet:!1,valueSet:["AppDefault","None"],pdfVersion:1.6},Duplex:{defaultValue:"",value:"none",type:"name",explicitSet:!1,valueSet:["Simplex","DuplexFlipShortEdge","DuplexFlipLongEdge","none"],pdfVersion:1.7},PickTrayByPDFSize:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.7},PrintPageRange:{defaultValue:"",value:"",type:"array",explicitSet:!1,valueSet:null,pdfVersion:1.7},NumCopies:{defaultValue:1,value:1,type:"integer",explicitSet:!1,valueSet:null,pdfVersion:1.7}},c=Object.keys(s),u=[],h=0,l=0,f=0;function d(t,e){var r,n=!1;for(r=0;r<t.length;r+=1)t[r]===e&&(n=!0);return n}if(void 0===this.internal.viewerpreferences&&(this.internal.viewerpreferences={},this.internal.viewerpreferences.configuration=JSON.parse(JSON.stringify(s)),this.internal.viewerpreferences.isSubscribed=!1),n=this.internal.viewerpreferences.configuration,"reset"===e||!0===r){var p=c.length;for(f=0;f<p;f+=1)n[c[f]].value=n[c[f]].defaultValue,n[c[f]].explicitSet=!1;}if("object"===t(e))for(a in e)if(o=e[a],d(c,a)&&void 0!==o){if("boolean"===n[a].type&&"boolean"==typeof o)n[a].value=o;else if("name"===n[a].type&&d(n[a].valueSet,o))n[a].value=o;else if("integer"===n[a].type&&Number.isInteger(o))n[a].value=o;else if("array"===n[a].type){for(h=0;h<o.length;h+=1)if(i=!0,1===o[h].length&&"number"==typeof o[h][0])u.push(String(o[h]-1));else if(o[h].length>1){for(l=0;l<o[h].length;l+=1)"number"!=typeof o[h][l]&&(i=!1);!0===i&&u.push([o[h][0]-1,o[h][1]-1].join(" "));}n[a].value="["+u.join(" ")+"]";}else n[a].value=n[a].defaultValue;n[a].explicitSet=!0;}return !1===this.internal.viewerpreferences.isSubscribed&&(this.internal.events.subscribe("putCatalog",(function(){var t,e=[];for(t in n)!0===n[t].explicitSet&&("name"===n[t].type?e.push("/"+t+" /"+n[t].value):e.push("/"+t+" "+n[t].value));0!==e.length&&this.internal.write("/ViewerPreferences\n<<\n"+e.join("\n")+"\n>>");})),this.internal.viewerpreferences.isSubscribed=!0),this.internal.viewerpreferences.configuration=n,this},
1983
+ function(t){function e(){return (n.canvg?Promise.resolve(n.canvg):import('./index.es-54a6f3a3.js')).catch((function(t){return Promise.reject(new Error("Could not load canvg: "+t))})).then((function(t){return t.default?t.default:t}))}E.API.addSvgAsImage=function(t,r,n,i,o,s,c,u){if(isNaN(r)||isNaN(n))throw a.error("jsPDF.addSvgAsImage: Invalid coordinates",arguments),new Error("Invalid coordinates passed to jsPDF.addSvgAsImage");if(isNaN(i)||isNaN(o))throw a.error("jsPDF.addSvgAsImage: Invalid measurements",arguments),new Error("Invalid measurements (width and/or height) passed to jsPDF.addSvgAsImage");var h=document.createElement("canvas");h.width=i,h.height=o;var l=h.getContext("2d");l.fillStyle="#fff",l.fillRect(0,0,h.width,h.height);var f={ignoreMouse:!0,ignoreAnimation:!0,ignoreDimensions:!0},d=this;return e().then((function(e){return e.fromString(l,t,f)}),(function(){return Promise.reject(new Error("Could not load canvg."))})).then((function(t){return t.render(f)})).then((function(){d.addImage(h.toDataURL("image/jpeg",1),r,n,i,o,c,u);}))};}(),E.API.putTotalPages=function(t){var e,r=0;parseInt(this.internal.getFont().id.substr(1),10)<15?(e=new RegExp(t,"g"),r=this.internal.getNumberOfPages()):(e=new RegExp(this.pdfEscape16(t,this.internal.getFont()),"g"),r=this.pdfEscape16(this.internal.getNumberOfPages()+"",this.internal.getFont()));for(var n=1;n<=this.internal.getNumberOfPages();n++)for(var i=0;i<this.internal.pages[n].length;i++)this.internal.pages[n][i]=this.internal.pages[n][i].replace(e,r);return this},E.API.viewerPreferences=function(e,r){var n;e=e||{},r=r||!1;var i,a,o,s={HideToolbar:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},HideMenubar:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},HideWindowUI:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},FitWindow:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},CenterWindow:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},DisplayDocTitle:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.4},NonFullScreenPageMode:{defaultValue:"UseNone",value:"UseNone",type:"name",explicitSet:!1,valueSet:["UseNone","UseOutlines","UseThumbs","UseOC"],pdfVersion:1.3},Direction:{defaultValue:"L2R",value:"L2R",type:"name",explicitSet:!1,valueSet:["L2R","R2L"],pdfVersion:1.3},ViewArea:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},ViewClip:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintArea:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintClip:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintScaling:{defaultValue:"AppDefault",value:"AppDefault",type:"name",explicitSet:!1,valueSet:["AppDefault","None"],pdfVersion:1.6},Duplex:{defaultValue:"",value:"none",type:"name",explicitSet:!1,valueSet:["Simplex","DuplexFlipShortEdge","DuplexFlipLongEdge","none"],pdfVersion:1.7},PickTrayByPDFSize:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.7},PrintPageRange:{defaultValue:"",value:"",type:"array",explicitSet:!1,valueSet:null,pdfVersion:1.7},NumCopies:{defaultValue:1,value:1,type:"integer",explicitSet:!1,valueSet:null,pdfVersion:1.7}},c=Object.keys(s),u=[],h=0,l=0,f=0;function d(t,e){var r,n=!1;for(r=0;r<t.length;r+=1)t[r]===e&&(n=!0);return n}if(void 0===this.internal.viewerpreferences&&(this.internal.viewerpreferences={},this.internal.viewerpreferences.configuration=JSON.parse(JSON.stringify(s)),this.internal.viewerpreferences.isSubscribed=!1),n=this.internal.viewerpreferences.configuration,"reset"===e||!0===r){var p=c.length;for(f=0;f<p;f+=1)n[c[f]].value=n[c[f]].defaultValue,n[c[f]].explicitSet=!1;}if("object"===t(e))for(a in e)if(o=e[a],d(c,a)&&void 0!==o){if("boolean"===n[a].type&&"boolean"==typeof o)n[a].value=o;else if("name"===n[a].type&&d(n[a].valueSet,o))n[a].value=o;else if("integer"===n[a].type&&Number.isInteger(o))n[a].value=o;else if("array"===n[a].type){for(h=0;h<o.length;h+=1)if(i=!0,1===o[h].length&&"number"==typeof o[h][0])u.push(String(o[h]-1));else if(o[h].length>1){for(l=0;l<o[h].length;l+=1)"number"!=typeof o[h][l]&&(i=!1);!0===i&&u.push([o[h][0]-1,o[h][1]-1].join(" "));}n[a].value="["+u.join(" ")+"]";}else n[a].value=n[a].defaultValue;n[a].explicitSet=!0;}return !1===this.internal.viewerpreferences.isSubscribed&&(this.internal.events.subscribe("putCatalog",(function(){var t,e=[];for(t in n)!0===n[t].explicitSet&&("name"===n[t].type?e.push("/"+t+" /"+n[t].value):e.push("/"+t+" "+n[t].value));0!==e.length&&this.internal.write("/ViewerPreferences\n<<\n"+e.join("\n")+"\n>>");})),this.internal.viewerpreferences.isSubscribed=!0),this.internal.viewerpreferences.configuration=n,this},
1938
1984
  /** ====================================================================
1939
1985
  * @license
1940
1986
  * jsPDF XMP metadata plugin
@@ -3,7 +3,7 @@
3
3
  * Licensed under the Apache License, Version 2.0
4
4
  * http://www.apache.org/licenses/LICENSE-2.0
5
5
  */
6
- export { I as calcite_input_message, N as calcite_notice, M as map_select_tools, P as pdf_download, R as refine_selection } from './calcite-input-message.calcite-notice.map-select-tools.pdf-download.refine-selection-ddd74bd6.js';
6
+ export { I as calcite_input_message, N as calcite_notice, M as map_select_tools, P as pdf_download, R as refine_selection } from './calcite-input-message.calcite-notice.map-select-tools.pdf-download.refine-selection-c6f63458.js';
7
7
  import './index-c246d90e.js';
8
8
  import './dom-3bdc69ee.js';
9
9
  import './resources-436ae282.js';
@@ -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-d5f9d613.js';
7
- import { _ as _typeof_1 } from './calcite-input-message.calcite-notice.map-select-tools.pdf-download.refine-selection-ddd74bd6.js';
7
+ import { _ as _typeof_1 } from './calcite-input-message.calcite-notice.map-select-tools.pdf-download.refine-selection-c6f63458.js';
8
8
  import './index-c246d90e.js';
9
9
  import './dom-3bdc69ee.js';
10
10
  import './resources-436ae282.js';