@esri/solutions-components 0.3.8 → 0.3.9

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 (61) hide show
  1. package/dist/cjs/buffer-tools_6.cjs.entry.js +32 -31
  2. package/dist/cjs/calcite-combobox_3.cjs.entry.js +1 -1
  3. package/dist/cjs/{calcite-input-message.calcite-notice.map-select-tools.pdf-download.refine-selection-d5d5499f.js → calcite-input-message.calcite-notice.map-select-tools.pdf-download.refine-selection-cd8ad61e.js} +53 -19
  4. package/dist/cjs/calcite-input-message_5.cjs.entry.js +2 -2
  5. package/dist/cjs/{index.es-43f519b3.js → index.es-e89ba2a1.js} +2 -2
  6. package/dist/cjs/layer-table.cjs.entry.js +1 -1
  7. package/dist/cjs/loader.cjs.js +1 -1
  8. package/dist/cjs/{mapViewUtils-24d1d859.js → mapViewUtils-d250b1ed.js} +11 -6
  9. package/dist/cjs/public-notification.cjs.entry.js +3 -11
  10. package/dist/cjs/solutions-components.cjs.js +1 -1
  11. package/dist/collection/components/buffer-tools/buffer-tools.js +22 -20
  12. package/dist/collection/components/map-select-tools/map-select-tools.js +13 -0
  13. package/dist/collection/components/pdf-download/pdf-download.js +9 -19
  14. package/dist/collection/components/public-notification/public-notification.js +2 -30
  15. package/dist/collection/components/refine-selection/refine-selection.js +34 -14
  16. package/dist/collection/components/refine-selection-tools/refine-selection-tools.js +34 -16
  17. package/dist/collection/demos/new-public-notification.html +1 -11
  18. package/dist/collection/utils/interfaces.ts +2 -0
  19. package/dist/collection/utils/mapViewUtils.js +11 -6
  20. package/dist/collection/utils/mapViewUtils.ts +11 -6
  21. package/dist/components/buffer-tools2.js +19 -16
  22. package/dist/components/map-layer-picker2.js +11 -6
  23. package/dist/components/map-select-tools2.js +11 -0
  24. package/dist/components/pdf-download2.js +9 -4
  25. package/dist/components/public-notification.js +2 -11
  26. package/dist/components/refine-selection-tools2.js +15 -16
  27. package/dist/components/refine-selection2.js +32 -15
  28. package/dist/esm/buffer-tools_6.entry.js +32 -31
  29. package/dist/esm/calcite-combobox_3.entry.js +1 -1
  30. package/dist/esm/{calcite-input-message.calcite-notice.map-select-tools.pdf-download.refine-selection-b60306b8.js → calcite-input-message.calcite-notice.map-select-tools.pdf-download.refine-selection-ddd74bd6.js} +53 -19
  31. package/dist/esm/calcite-input-message_5.entry.js +2 -2
  32. package/dist/esm/{index.es-4a2bee8f.js → index.es-8edafdb2.js} +2 -2
  33. package/dist/esm/layer-table.entry.js +1 -1
  34. package/dist/esm/loader.js +1 -1
  35. package/dist/esm/{mapViewUtils-c2fb048d.js → mapViewUtils-63e118f8.js} +11 -6
  36. package/dist/esm/public-notification.entry.js +3 -11
  37. package/dist/esm/solutions-components.js +1 -1
  38. package/dist/solutions-components/demos/new-public-notification.html +1 -11
  39. package/dist/solutions-components/{p-21ae3f97.entry.js → p-117174e8.entry.js} +1 -1
  40. package/dist/solutions-components/p-15f9b0a0.entry.js +6 -0
  41. package/dist/solutions-components/{p-547cbe8a.js → p-238db156.js} +11 -11
  42. package/dist/solutions-components/{p-709c3f22.entry.js → p-2a96314a.entry.js} +2 -2
  43. package/dist/solutions-components/{p-b4be1c30.entry.js → p-6d28f991.entry.js} +1 -1
  44. package/dist/solutions-components/{p-1b7c13f8.js → p-98884f44.js} +1 -1
  45. package/dist/solutions-components/{p-c5f670fb.entry.js → p-c5341977.entry.js} +1 -1
  46. package/dist/solutions-components/p-cc2e20c8.js +36 -0
  47. package/dist/solutions-components/solutions-components.esm.js +1 -1
  48. package/dist/solutions-components/utils/interfaces.ts +2 -0
  49. package/dist/solutions-components/utils/mapViewUtils.ts +11 -6
  50. package/dist/types/components/buffer-tools/buffer-tools.d.ts +2 -2
  51. package/dist/types/components/map-select-tools/map-select-tools.d.ts +6 -0
  52. package/dist/types/components/pdf-download/pdf-download.d.ts +0 -5
  53. package/dist/types/components/public-notification/public-notification.d.ts +1 -6
  54. package/dist/types/components/refine-selection/refine-selection.d.ts +6 -4
  55. package/dist/types/components/refine-selection-tools/refine-selection-tools.d.ts +5 -9
  56. package/dist/types/components.d.ts +19 -27
  57. package/dist/types/utils/interfaces.d.ts +2 -0
  58. package/package.json +1 -1
  59. package/dist/solutions-components/p-b47d1a9a.entry.js +0 -6
  60. package/dist/solutions-components/p-cd7606eb.js +0 -36
  61. package/dist/types/components/json-editor/assets/monaco-editor/monaco.d.ts +0 -8262
@@ -32,14 +32,6 @@ const RefineSelectionTools = /*@__PURE__*/ proxyCustomElement(class extends HTML
32
32
  * {<layer id>: Graphic[]}: Collection of graphics returned from queries to the layer
33
33
  */
34
34
  this._featuresCollection = {};
35
- /**
36
- * IRefineOperation[]: Array to maintain the possible redo operations
37
- */
38
- this._redoStack = [];
39
- /**
40
- * IRefineOperation[]: Array to maintain the possible undo operations
41
- */
42
- this._undoStack = [];
43
35
  this.active = false;
44
36
  this.border = false;
45
37
  this.enabledLayerIds = [];
@@ -50,6 +42,7 @@ const RefineSelectionTools = /*@__PURE__*/ proxyCustomElement(class extends HTML
50
42
  this.mapView = undefined;
51
43
  this.mode = undefined;
52
44
  this.refineMode = undefined;
45
+ this.refineSelectionSet = undefined;
53
46
  this.useLayerPicker = true;
54
47
  this._selectEnabled = false;
55
48
  this._selectionMode = undefined;
@@ -130,10 +123,11 @@ const RefineSelectionTools = /*@__PURE__*/ proxyCustomElement(class extends HTML
130
123
  * Renders the component.
131
124
  */
132
125
  render() {
126
+ var _a, _b;
133
127
  const showLayerPickerClass = this.useLayerPicker ? "div-visible" : "div-not-visible";
134
128
  const drawClass = this.border ? " border" : "";
135
129
  const showUndoRedo = this.refineMode === ERefineMode.ALL ? "div-visible" : "div-not-visible";
136
- return (h(Host, null, h("div", null, h("map-layer-picker", { class: showLayerPickerClass, enabledLayerIds: this.enabledLayerIds, mapView: this.mapView, onLayerSelectionChange: (evt) => { void this._layerSelectionChange(evt); }, selectedLayerIds: this.layerViews.map(l => l.layer.id), selectionMode: "single" }), h("div", { class: "margin-top-1" + drawClass }, h("div", { class: "esri-sketch esri-widget" }, h("div", { class: "esri-sketch__panel" }, h("div", { class: "esri-sketch__tool-section esri-sketch__section" }, h("calcite-action", { disabled: !this._selectEnabled, icon: "select", onClick: () => this._setSelectionMode(ESelectionType.POINT), scale: "s", text: this._translations.select })), h("div", { class: "esri-sketch__tool-section esri-sketch__section" }, h("calcite-action", { disabled: !this._selectEnabled, icon: "line", onClick: () => this._setSelectionMode(ESelectionType.LINE), scale: "s", text: this._translations.selectLine }), h("calcite-action", { disabled: !this._selectEnabled, icon: "polygon", onClick: () => this._setSelectionMode(ESelectionType.POLY), scale: "s", text: this._translations.selectPolygon }), h("calcite-action", { disabled: !this._selectEnabled, icon: "rectangle", onClick: () => this._setSelectionMode(ESelectionType.RECT), scale: "s", text: this._translations.selectRectangle })), h("div", { class: showUndoRedo + " esri-sketch__tool-section esri-sketch__section" }, h("calcite-action", { disabled: this._undoStack.length === 0, icon: "undo", onClick: () => this._undo(), scale: "s", text: this._translations.undo }), h("calcite-action", { disabled: this._redoStack.length === 0, icon: "redo", onClick: () => this._redo(), scale: "s", text: this._translations.redo }))))))));
130
+ return (h(Host, null, h("div", null, h("map-layer-picker", { class: showLayerPickerClass, enabledLayerIds: this.enabledLayerIds, mapView: this.mapView, onLayerSelectionChange: (evt) => { void this._layerSelectionChange(evt); }, selectedLayerIds: this.layerViews.map(l => l.layer.id), selectionMode: "single" }), h("div", { class: "margin-top-1" + drawClass }, h("div", { class: "esri-sketch esri-widget" }, h("div", { class: "esri-sketch__panel" }, h("div", { class: "esri-sketch__tool-section esri-sketch__section" }, h("calcite-action", { disabled: !this._selectEnabled, icon: "pin", onClick: () => this._setSelectionMode(ESelectionType.POINT), scale: "s", text: this._translations.select }), h("calcite-action", { disabled: !this._selectEnabled, icon: "line", onClick: () => this._setSelectionMode(ESelectionType.LINE), scale: "s", text: this._translations.selectLine }), h("calcite-action", { disabled: !this._selectEnabled, icon: "polygon", onClick: () => this._setSelectionMode(ESelectionType.POLY), scale: "s", text: this._translations.selectPolygon }), h("calcite-action", { disabled: !this._selectEnabled, icon: "rectangle", onClick: () => this._setSelectionMode(ESelectionType.RECT), scale: "s", text: this._translations.selectRectangle })), h("div", { class: showUndoRedo + " esri-sketch__tool-section esri-sketch__section" }, h("calcite-action", { disabled: ((_a = this.refineSelectionSet) === null || _a === void 0 ? void 0 : _a.undoStack) ? this.refineSelectionSet.undoStack.length === 0 : true, icon: "undo", onClick: () => this._undo(), scale: "s", text: this._translations.undo }), h("calcite-action", { disabled: ((_b = this.refineSelectionSet) === null || _b === void 0 ? void 0 : _b.redoStack) ? this.refineSelectionSet.redoStack.length === 0 : true, icon: "redo", onClick: () => this._redo(), scale: "s", text: this._translations.redo }))))))));
137
131
  }
138
132
  //--------------------------------------------------------------------------
139
133
  //
@@ -323,7 +317,7 @@ const RefineSelectionTools = /*@__PURE__*/ proxyCustomElement(class extends HTML
323
317
  }
324
318
  else {
325
319
  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]; }) : [];
326
- await this._updateIds(oids, this.mode, this._undoStack, this.mode);
320
+ await this._updateIds(oids, this.mode, this.refineSelectionSet.undoStack, this.mode);
327
321
  }
328
322
  this._clear();
329
323
  });
@@ -366,12 +360,16 @@ const RefineSelectionTools = /*@__PURE__*/ proxyCustomElement(class extends HTML
366
360
  if (mode === ESelectionMode.ADD) {
367
361
  idUpdates.addIds = oids.filter(id => this.ids.indexOf(id) < 0);
368
362
  this.ids = [...this.ids, ...idUpdates.addIds];
369
- operationStack.push({ mode: operationMode, ids: idUpdates.addIds });
363
+ if (idUpdates.addIds.length > 0) {
364
+ operationStack.push({ mode: operationMode, ids: idUpdates.addIds });
365
+ }
370
366
  }
371
367
  else {
372
368
  idUpdates.removeIds = oids.filter(id => this.ids.indexOf(id) > -1);
373
369
  this.ids = this.ids.filter(id => idUpdates.removeIds.indexOf(id) < 0);
374
- operationStack.push({ mode: operationMode, ids: idUpdates.removeIds });
370
+ if (idUpdates.removeIds.length > 0) {
371
+ operationStack.push({ mode: operationMode, ids: idUpdates.removeIds });
372
+ }
375
373
  }
376
374
  await this._highlightFeatures(this.ids).then(() => {
377
375
  this.refineSelectionIdsChange.emit(idUpdates);
@@ -385,8 +383,8 @@ const RefineSelectionTools = /*@__PURE__*/ proxyCustomElement(class extends HTML
385
383
  * @protected
386
384
  */
387
385
  _undo() {
388
- const undoOp = this._undoStack.pop();
389
- void this._updateIds(undoOp.ids, undoOp.mode === ESelectionMode.ADD ? ESelectionMode.REMOVE : ESelectionMode.ADD, this._redoStack, undoOp.mode);
386
+ const undoOp = this.refineSelectionSet.undoStack.pop();
387
+ void this._updateIds(undoOp.ids, undoOp.mode === ESelectionMode.ADD ? ESelectionMode.REMOVE : ESelectionMode.ADD, this.refineSelectionSet.redoStack, undoOp.mode);
390
388
  }
391
389
  /**
392
390
  * Redo the most current ADD or REMOVE operation
@@ -396,8 +394,8 @@ const RefineSelectionTools = /*@__PURE__*/ proxyCustomElement(class extends HTML
396
394
  * @protected
397
395
  */
398
396
  _redo() {
399
- const redoOp = this._redoStack.pop();
400
- void this._updateIds(redoOp.ids, redoOp.mode, this._undoStack, redoOp.mode);
397
+ const redoOp = this.refineSelectionSet.redoStack.pop();
398
+ void this._updateIds(redoOp.ids, redoOp.mode, this.refineSelectionSet.undoStack, redoOp.mode);
401
399
  }
402
400
  /**
403
401
  * Fetches the component's translations
@@ -424,6 +422,7 @@ const RefineSelectionTools = /*@__PURE__*/ proxyCustomElement(class extends HTML
424
422
  "mapView": [16],
425
423
  "mode": [1],
426
424
  "refineMode": [1, "refine-mode"],
425
+ "refineSelectionSet": [1040],
427
426
  "useLayerPicker": [4, "use-layer-picker"],
428
427
  "_selectEnabled": [32],
429
428
  "_selectionMode": [32],
@@ -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 { e as ESelectionMode, f as ERefineMode, c as EWorkflowType } from './interfaces3.js';
7
+ import { c as EWorkflowType, e as ESelectionMode, f as ERefineMode } from './interfaces3.js';
8
8
  import { g as getLocaleComponentStrings } from './locale.js';
9
9
  import { d as defineCustomElement$e } from './action.js';
10
10
  import { d as defineCustomElement$d } from './chip.js';
@@ -72,6 +72,19 @@ const RefineSelection = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
72
72
  this.SketchViewModel = undefined;
73
73
  this._translations = undefined;
74
74
  }
75
+ //--------------------------------------------------------------------------
76
+ //
77
+ // Watch handlers
78
+ //
79
+ //--------------------------------------------------------------------------
80
+ /**
81
+ * Called each time the addresseeLayer is changed.
82
+ * Add a new clean refine set for the new addressee layer.
83
+ */
84
+ addresseeLayerWatchHandler() {
85
+ const selectionSets = this.selectionSets.filter(ss => ss.workflowType !== EWorkflowType.REFINE);
86
+ this.selectionSets = this._initRefineSelectionSet(selectionSets);
87
+ }
75
88
  /**
76
89
  * Handles changes to refine selection ids.
77
90
  *
@@ -93,12 +106,16 @@ const RefineSelection = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
93
106
  */
94
107
  async componentWillLoad() {
95
108
  await this._getTranslations();
109
+ const refineSet = this._getRefineSelectionSet(this.selectionSets);
110
+ if (!refineSet) {
111
+ this.selectionSets = this._initRefineSelectionSet(this.selectionSets);
112
+ }
96
113
  }
97
114
  /**
98
115
  * Renders the component.
99
116
  */
100
117
  render() {
101
- return (h(Host, null, h("div", { class: "padding-1" }, h("div", null, h("calcite-radio-group", { class: "w-100", onCalciteRadioGroupChange: (evt) => this._modeChanged(evt) }, h("calcite-radio-group-item", { checked: this._addEnabled, class: "w-50", onClick: () => this._setSelectionMode(ESelectionMode.ADD), value: ESelectionMode.ADD }, this._translations.add), h("calcite-radio-group-item", { checked: !this._addEnabled, class: "w-50", onClick: () => this._setSelectionMode(ESelectionMode.REMOVE), value: ESelectionMode.REMOVE }, this._translations.remove)), h("refine-selection-tools", { border: true, enabledLayerIds: this.enabledLayerIds, ids: getSelectionIds(this.selectionSets), layerViews: [this.addresseeLayer], mapView: this.mapView, mode: this._addEnabled ? ESelectionMode.ADD : ESelectionMode.REMOVE, ref: (el) => { this._refineTools = el; }, refineMode: ERefineMode.ALL, useLayerPicker: false })), h("br", null), (h("calcite-list", { class: "list-border" }, this._getRefineSelectionSetList())))));
118
+ return (h(Host, null, h("div", { class: "padding-1" }, h("div", null, h("calcite-radio-group", { class: "w-100", onCalciteRadioGroupChange: (evt) => this._modeChanged(evt) }, h("calcite-radio-group-item", { checked: this._addEnabled, class: "w-50", onClick: () => this._setSelectionMode(ESelectionMode.ADD), value: ESelectionMode.ADD }, this._translations.add), h("calcite-radio-group-item", { checked: !this._addEnabled, class: "w-50", onClick: () => this._setSelectionMode(ESelectionMode.REMOVE), value: ESelectionMode.REMOVE }, this._translations.remove)), h("refine-selection-tools", { border: true, enabledLayerIds: this.enabledLayerIds, ids: getSelectionIds(this.selectionSets), layerViews: [this.addresseeLayer], mapView: this.mapView, mode: this._addEnabled ? ESelectionMode.ADD : ESelectionMode.REMOVE, ref: (el) => { this._refineTools = el; }, refineMode: ERefineMode.ALL, refineSelectionSet: this._getRefineSelectionSet(this.selectionSets), useLayerPicker: false })), h("br", null), (h("calcite-list", { class: "list-border" }, this._getRefineSelectionSetList())))));
102
119
  }
103
120
  //--------------------------------------------------------------------------
104
121
  //
@@ -164,7 +181,7 @@ const RefineSelection = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
164
181
  if (removeIds.length > 0) {
165
182
  this.selectionSets = this.selectionSets.reduce((prev, cur) => {
166
183
  cur.selectedIds = cur.selectedIds.filter(id => removeIds.indexOf(id) < 0);
167
- if (cur.selectedIds.length > 0) {
184
+ if (cur.selectedIds.length > 0 || cur.workflowType === EWorkflowType.REFINE) {
168
185
  prev.push(cur);
169
186
  }
170
187
  return prev;
@@ -183,9 +200,7 @@ const RefineSelection = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
183
200
  */
184
201
  _updateRefineSelectionSet(addIds, removeIds) {
185
202
  const selectionSet = this._getRefineSelectionSet(this.selectionSets);
186
- this.selectionSets = selectionSet ?
187
- this._updateRefineIds(selectionSet, addIds, removeIds) :
188
- this._addRefineSelectionSet(addIds, removeIds);
203
+ this._updateRefineIds(selectionSet, addIds, removeIds);
189
204
  this.selectionSetsChanged.emit(this.selectionSets);
190
205
  }
191
206
  /**
@@ -218,15 +233,12 @@ const RefineSelection = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
218
233
  /**
219
234
  * Add a new refine selection set
220
235
  *
221
- * @param addIds any ids to add
222
- * @param removeIds any ids to remove
223
- *
224
236
  * @returns updated selection sets
225
237
  * @protected
226
238
  */
227
- _addRefineSelectionSet(addIds, removeIds) {
239
+ _initRefineSelectionSet(selectionSets) {
228
240
  return [
229
- ...this.selectionSets,
241
+ ...selectionSets,
230
242
  ({
231
243
  buffer: undefined,
232
244
  distance: 0,
@@ -237,13 +249,15 @@ const RefineSelection = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
237
249
  layerView: this.addresseeLayer,
238
250
  refineSelectLayers: [],
239
251
  searchResult: undefined,
240
- selectedIds: addIds,
252
+ selectedIds: [],
241
253
  unit: "feet",
242
254
  workflowType: EWorkflowType.REFINE,
243
255
  refineIds: {
244
- addIds: addIds,
245
- removeIds: removeIds
246
- }
256
+ addIds: [],
257
+ removeIds: []
258
+ },
259
+ redoStack: [],
260
+ undoStack: []
247
261
  })
248
262
  ];
249
263
  }
@@ -284,6 +298,9 @@ const RefineSelection = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
284
298
  return null;
285
299
  }
286
300
  get el() { return this; }
301
+ static get watchers() { return {
302
+ "addresseeLayer": ["addresseeLayerWatchHandler"]
303
+ }; }
287
304
  static get style() { return refineSelectionCss; }
288
305
  }, [0, "refine-selection", {
289
306
  "addresseeLayer": [16],
@@ -16,7 +16,7 @@ import { i as isActivationKey } from './key-acb660e7.js';
16
16
  import { n as numberStringFormatter, c as connectLocalized, d as disconnectLocalized } from './locale-9dd0777b.js';
17
17
  import { s as state } from './publicNotificationStore-b9daaee4.js';
18
18
  import { h as ESelectionType, g as ERefineMode, f as ESelectionMode } from './interfaces-d0d83efa.js';
19
- import { a as getMapLayerView, f as queryFeaturesByGeometry, h as highlightFeatures } from './mapViewUtils-c2fb048d.js';
19
+ import { a as getMapLayerView, f as queryFeaturesByGeometry, h as highlightFeatures } from './mapViewUtils-63e118f8.js';
20
20
  import './_commonjsHelpers-d5f9d613.js';
21
21
  import './resources-436ae282.js';
22
22
  import './observers-31601001.js';
@@ -33,8 +33,8 @@ const BufferTools = class {
33
33
  this.appearance = "text";
34
34
  this.distance = 0;
35
35
  this.geometries = [];
36
- this.sliderMax = 100;
37
- this.sliderMin = 0;
36
+ this.max = undefined;
37
+ this.min = 0;
38
38
  this.sliderTicks = 10;
39
39
  this.unionResults = true;
40
40
  this.unit = "meters";
@@ -119,16 +119,19 @@ const BufferTools = class {
119
119
  * @protected
120
120
  */
121
121
  _setDistance(event) {
122
- this.distanceChanged.emit({
123
- oldValue: this.distance,
124
- newValue: event.detail.value
125
- });
126
- this.distance = event.detail.value;
127
- if (this.distance > 0) {
128
- this._buffer();
129
- }
130
- else {
131
- this.bufferComplete.emit(undefined);
122
+ const v = parseInt(event.detail.value, 10);
123
+ if (this.distance !== v && v >= this.min) {
124
+ this.distanceChanged.emit({
125
+ oldValue: this.distance,
126
+ newValue: event.detail.value
127
+ });
128
+ this.distance = v;
129
+ if (this.distance > 0) {
130
+ this._buffer();
131
+ }
132
+ else {
133
+ this.bufferComplete.emit(undefined);
134
+ }
132
135
  }
133
136
  }
134
137
  /**
@@ -171,7 +174,7 @@ const BufferTools = class {
171
174
  * @protected
172
175
  */
173
176
  _getTextBoxDisplay() {
174
- return (h("div", { class: "c-container" }, h("calcite-input", { class: "padding-end-1", "number-button-type": "vertical", onCalciteInputInput: (evt) => this._setDistance(evt), placeholder: "0", type: "number", value: this.distance ? this.distance.toString() : undefined }), h("calcite-select", { class: "flex-1", label: "label", onCalciteSelectChange: () => this._setUnit(this._unitElement.value), ref: (el) => { this._unitElement = el; } }, this._getUnits())));
177
+ return (h("div", { class: "c-container" }, h("calcite-input", { class: "padding-end-1", max: this.max && this.max > 0 ? this.max : undefined, min: this.min, "number-button-type": "vertical", onCalciteInputInput: (evt) => this._setDistance(evt), placeholder: "0", type: "number", value: this.distance ? this.distance.toString() : undefined }), h("calcite-select", { class: "flex-1", label: "label", onCalciteSelectChange: () => this._setUnit(this._unitElement.value), ref: (el) => { this._unitElement = el; } }, this._getUnits())));
175
178
  }
176
179
  /**
177
180
  * Render distance control as a slider
@@ -182,7 +185,7 @@ const BufferTools = class {
182
185
  * @protected
183
186
  */
184
187
  _getSliderDisplay() {
185
- return (h("div", null, h("calcite-slider", { labelHandles: true, max: this.sliderMax, min: this.sliderMin, ticks: this.sliderTicks })));
188
+ return (h("div", null, h("calcite-slider", { labelHandles: true, max: this.max && this.max > 0 ? this.max : undefined, min: this.min, ticks: this.sliderTicks })));
186
189
  }
187
190
  /**
188
191
  * Fetches the component's translations
@@ -1529,14 +1532,6 @@ const RefineSelectionTools = class {
1529
1532
  * {<layer id>: Graphic[]}: Collection of graphics returned from queries to the layer
1530
1533
  */
1531
1534
  this._featuresCollection = {};
1532
- /**
1533
- * IRefineOperation[]: Array to maintain the possible redo operations
1534
- */
1535
- this._redoStack = [];
1536
- /**
1537
- * IRefineOperation[]: Array to maintain the possible undo operations
1538
- */
1539
- this._undoStack = [];
1540
1535
  this.active = false;
1541
1536
  this.border = false;
1542
1537
  this.enabledLayerIds = [];
@@ -1547,6 +1542,7 @@ const RefineSelectionTools = class {
1547
1542
  this.mapView = undefined;
1548
1543
  this.mode = undefined;
1549
1544
  this.refineMode = undefined;
1545
+ this.refineSelectionSet = undefined;
1550
1546
  this.useLayerPicker = true;
1551
1547
  this._selectEnabled = false;
1552
1548
  this._selectionMode = undefined;
@@ -1627,10 +1623,11 @@ const RefineSelectionTools = class {
1627
1623
  * Renders the component.
1628
1624
  */
1629
1625
  render() {
1626
+ var _a, _b;
1630
1627
  const showLayerPickerClass = this.useLayerPicker ? "div-visible" : "div-not-visible";
1631
1628
  const drawClass = this.border ? " border" : "";
1632
1629
  const showUndoRedo = this.refineMode === ERefineMode.ALL ? "div-visible" : "div-not-visible";
1633
- return (h(Host, null, h("div", null, h("map-layer-picker", { class: showLayerPickerClass, enabledLayerIds: this.enabledLayerIds, mapView: this.mapView, onLayerSelectionChange: (evt) => { void this._layerSelectionChange(evt); }, selectedLayerIds: this.layerViews.map(l => l.layer.id), selectionMode: "single" }), h("div", { class: "margin-top-1" + drawClass }, h("div", { class: "esri-sketch esri-widget" }, h("div", { class: "esri-sketch__panel" }, h("div", { class: "esri-sketch__tool-section esri-sketch__section" }, h("calcite-action", { disabled: !this._selectEnabled, icon: "select", onClick: () => this._setSelectionMode(ESelectionType.POINT), scale: "s", text: this._translations.select })), h("div", { class: "esri-sketch__tool-section esri-sketch__section" }, h("calcite-action", { disabled: !this._selectEnabled, icon: "line", onClick: () => this._setSelectionMode(ESelectionType.LINE), scale: "s", text: this._translations.selectLine }), h("calcite-action", { disabled: !this._selectEnabled, icon: "polygon", onClick: () => this._setSelectionMode(ESelectionType.POLY), scale: "s", text: this._translations.selectPolygon }), h("calcite-action", { disabled: !this._selectEnabled, icon: "rectangle", onClick: () => this._setSelectionMode(ESelectionType.RECT), scale: "s", text: this._translations.selectRectangle })), h("div", { class: showUndoRedo + " esri-sketch__tool-section esri-sketch__section" }, h("calcite-action", { disabled: this._undoStack.length === 0, icon: "undo", onClick: () => this._undo(), scale: "s", text: this._translations.undo }), h("calcite-action", { disabled: this._redoStack.length === 0, icon: "redo", onClick: () => this._redo(), scale: "s", text: this._translations.redo }))))))));
1630
+ return (h(Host, null, h("div", null, h("map-layer-picker", { class: showLayerPickerClass, enabledLayerIds: this.enabledLayerIds, mapView: this.mapView, onLayerSelectionChange: (evt) => { void this._layerSelectionChange(evt); }, selectedLayerIds: this.layerViews.map(l => l.layer.id), selectionMode: "single" }), h("div", { class: "margin-top-1" + drawClass }, h("div", { class: "esri-sketch esri-widget" }, h("div", { class: "esri-sketch__panel" }, h("div", { class: "esri-sketch__tool-section esri-sketch__section" }, h("calcite-action", { disabled: !this._selectEnabled, icon: "pin", onClick: () => this._setSelectionMode(ESelectionType.POINT), scale: "s", text: this._translations.select }), h("calcite-action", { disabled: !this._selectEnabled, icon: "line", onClick: () => this._setSelectionMode(ESelectionType.LINE), scale: "s", text: this._translations.selectLine }), h("calcite-action", { disabled: !this._selectEnabled, icon: "polygon", onClick: () => this._setSelectionMode(ESelectionType.POLY), scale: "s", text: this._translations.selectPolygon }), h("calcite-action", { disabled: !this._selectEnabled, icon: "rectangle", onClick: () => this._setSelectionMode(ESelectionType.RECT), scale: "s", text: this._translations.selectRectangle })), h("div", { class: showUndoRedo + " esri-sketch__tool-section esri-sketch__section" }, h("calcite-action", { disabled: ((_a = this.refineSelectionSet) === null || _a === void 0 ? void 0 : _a.undoStack) ? this.refineSelectionSet.undoStack.length === 0 : true, icon: "undo", onClick: () => this._undo(), scale: "s", text: this._translations.undo }), h("calcite-action", { disabled: ((_b = this.refineSelectionSet) === null || _b === void 0 ? void 0 : _b.redoStack) ? this.refineSelectionSet.redoStack.length === 0 : true, icon: "redo", onClick: () => this._redo(), scale: "s", text: this._translations.redo }))))))));
1634
1631
  }
1635
1632
  //--------------------------------------------------------------------------
1636
1633
  //
@@ -1820,7 +1817,7 @@ const RefineSelectionTools = class {
1820
1817
  }
1821
1818
  else {
1822
1819
  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]; }) : [];
1823
- await this._updateIds(oids, this.mode, this._undoStack, this.mode);
1820
+ await this._updateIds(oids, this.mode, this.refineSelectionSet.undoStack, this.mode);
1824
1821
  }
1825
1822
  this._clear();
1826
1823
  });
@@ -1863,12 +1860,16 @@ const RefineSelectionTools = class {
1863
1860
  if (mode === ESelectionMode.ADD) {
1864
1861
  idUpdates.addIds = oids.filter(id => this.ids.indexOf(id) < 0);
1865
1862
  this.ids = [...this.ids, ...idUpdates.addIds];
1866
- operationStack.push({ mode: operationMode, ids: idUpdates.addIds });
1863
+ if (idUpdates.addIds.length > 0) {
1864
+ operationStack.push({ mode: operationMode, ids: idUpdates.addIds });
1865
+ }
1867
1866
  }
1868
1867
  else {
1869
1868
  idUpdates.removeIds = oids.filter(id => this.ids.indexOf(id) > -1);
1870
1869
  this.ids = this.ids.filter(id => idUpdates.removeIds.indexOf(id) < 0);
1871
- operationStack.push({ mode: operationMode, ids: idUpdates.removeIds });
1870
+ if (idUpdates.removeIds.length > 0) {
1871
+ operationStack.push({ mode: operationMode, ids: idUpdates.removeIds });
1872
+ }
1872
1873
  }
1873
1874
  await this._highlightFeatures(this.ids).then(() => {
1874
1875
  this.refineSelectionIdsChange.emit(idUpdates);
@@ -1882,8 +1883,8 @@ const RefineSelectionTools = class {
1882
1883
  * @protected
1883
1884
  */
1884
1885
  _undo() {
1885
- const undoOp = this._undoStack.pop();
1886
- void this._updateIds(undoOp.ids, undoOp.mode === ESelectionMode.ADD ? ESelectionMode.REMOVE : ESelectionMode.ADD, this._redoStack, undoOp.mode);
1886
+ const undoOp = this.refineSelectionSet.undoStack.pop();
1887
+ void this._updateIds(undoOp.ids, undoOp.mode === ESelectionMode.ADD ? ESelectionMode.REMOVE : ESelectionMode.ADD, this.refineSelectionSet.redoStack, undoOp.mode);
1887
1888
  }
1888
1889
  /**
1889
1890
  * Redo the most current ADD or REMOVE operation
@@ -1893,8 +1894,8 @@ const RefineSelectionTools = class {
1893
1894
  * @protected
1894
1895
  */
1895
1896
  _redo() {
1896
- const redoOp = this._redoStack.pop();
1897
- void this._updateIds(redoOp.ids, redoOp.mode, this._undoStack, redoOp.mode);
1897
+ const redoOp = this.refineSelectionSet.redoStack.pop();
1898
+ void this._updateIds(redoOp.ids, redoOp.mode, this.refineSelectionSet.undoStack, redoOp.mode);
1898
1899
  }
1899
1900
  /**
1900
1901
  * Fetches the component's translations
@@ -16,7 +16,7 @@ import { i as isPrimaryPointerButton, t as toAriaBoolean, g as getElementProp, a
16
16
  import { c as connectOpenCloseComponent, d as disconnectOpenCloseComponent } from './openCloseComponent-5caff873.js';
17
17
  import { d as debounce } from './debounce-4c884e5c.js';
18
18
  import { c as connectConditionalSlotComponent, d as disconnectConditionalSlotComponent } from './conditionalSlot-d09506c4.js';
19
- import { i as getMapLayerIds, j as getMapLayerHash } from './mapViewUtils-c2fb048d.js';
19
+ import { i as getMapLayerIds, j as getMapLayerHash } from './mapViewUtils-63e118f8.js';
20
20
  import { s as state } from './publicNotificationStore-b9daaee4.js';
21
21
  import './resources-436ae282.js';
22
22
  import './interfaces-d0d83efa.js';
@@ -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-c2fb048d.js';
11
+ import { g as goToSelection, h as highlightFeatures, 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';
@@ -281,6 +281,16 @@ const MapSelectTools = class {
281
281
  }
282
282
  }
283
283
  }
284
+ /**
285
+ * Called each time the searchConfiguration prop is changed.
286
+ *
287
+ * @returns Promise when complete
288
+ */
289
+ async watchSearchConfigurationHandler(newValue, oldValue) {
290
+ if (JSON.stringify(newValue) !== JSON.stringify(oldValue)) {
291
+ this._initSearchWidget();
292
+ }
293
+ }
284
294
  /**
285
295
  * Called each time the workflowType prop is changed and emits the workflowTypeChange event.
286
296
  *
@@ -699,6 +709,7 @@ const MapSelectTools = class {
699
709
  get el() { return getElement(this); }
700
710
  static get watchers() { return {
701
711
  "geometries": ["watchGeometriesHandler"],
712
+ "searchConfiguration": ["watchSearchConfigurationHandler"],
702
713
  "_workflowType": ["workflowTypeHandler"]
703
714
  }; }
704
715
  };
@@ -1923,7 +1934,7 @@ function(t){var e=function(t){for(var e=t.length,r=new Uint8Array(e),n=0;n<e;n++
1923
1934
  * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
1924
1935
  * ====================================================================
1925
1936
  */
1926
- function(t){function e(){return (n.canvg?Promise.resolve(n.canvg):import('./index.es-4a2bee8f.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},
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},
1927
1938
  /** ====================================================================
1928
1939
  * @license
1929
1940
  * jsPDF XMP metadata plugin
@@ -2951,7 +2962,6 @@ const PdfDownload = class {
2951
2962
  constructor(hostRef) {
2952
2963
  registerInstance(this, hostRef);
2953
2964
  this.disabled = false;
2954
- this.enabledSizeValues = [];
2955
2965
  this.layerView = undefined;
2956
2966
  this._translations = undefined;
2957
2967
  }
@@ -3041,8 +3051,15 @@ const PdfDownload = class {
3041
3051
  _convertPopupToLabelSpec(popupInfo) {
3042
3052
  // Replace <br>, <br/> with |
3043
3053
  popupInfo = popupInfo.replace(/<br\s*\/?>/gi, "|");
3044
- // Remove remaining HTML tags and replace 0xA0 that popup uses for spaces
3045
- let labelSpec = popupInfo.replace(/<[\s.]*[^<>]*\/?>/gi, "").replace(/\xA0/gi, " ").split("|");
3054
+ // Remove remaining HTML tags, replace 0xA0 that popup uses for spaces, replace some char representations,
3055
+ // and split the label back into individual lines
3056
+ let labelSpec = popupInfo
3057
+ .replace(/<[\s.]*[^<>]*\/?>/gi, "")
3058
+ .replace(/\xA0/gi, " ")
3059
+ .replace(/&lt;/gi, "<")
3060
+ .replace(/&gt;/gi, ">")
3061
+ .replace(/&nbsp;/gi, " ")
3062
+ .split("|");
3046
3063
  // Trim lines and remove empties
3047
3064
  labelSpec = labelSpec.map(line => line.trim()).filter(line => line.length > 0);
3048
3065
  return labelSpec;
@@ -3156,6 +3173,19 @@ const RefineSelection = class {
3156
3173
  this.SketchViewModel = undefined;
3157
3174
  this._translations = undefined;
3158
3175
  }
3176
+ //--------------------------------------------------------------------------
3177
+ //
3178
+ // Watch handlers
3179
+ //
3180
+ //--------------------------------------------------------------------------
3181
+ /**
3182
+ * Called each time the addresseeLayer is changed.
3183
+ * Add a new clean refine set for the new addressee layer.
3184
+ */
3185
+ addresseeLayerWatchHandler() {
3186
+ const selectionSets = this.selectionSets.filter(ss => ss.workflowType !== EWorkflowType.REFINE);
3187
+ this.selectionSets = this._initRefineSelectionSet(selectionSets);
3188
+ }
3159
3189
  /**
3160
3190
  * Handles changes to refine selection ids.
3161
3191
  *
@@ -3177,12 +3207,16 @@ const RefineSelection = class {
3177
3207
  */
3178
3208
  async componentWillLoad() {
3179
3209
  await this._getTranslations();
3210
+ const refineSet = this._getRefineSelectionSet(this.selectionSets);
3211
+ if (!refineSet) {
3212
+ this.selectionSets = this._initRefineSelectionSet(this.selectionSets);
3213
+ }
3180
3214
  }
3181
3215
  /**
3182
3216
  * Renders the component.
3183
3217
  */
3184
3218
  render() {
3185
- return (h$1(Host, null, h$1("div", { class: "padding-1" }, h$1("div", null, h$1("calcite-radio-group", { class: "w-100", onCalciteRadioGroupChange: (evt) => this._modeChanged(evt) }, h$1("calcite-radio-group-item", { checked: this._addEnabled, class: "w-50", onClick: () => this._setSelectionMode(ESelectionMode.ADD), value: ESelectionMode.ADD }, this._translations.add), h$1("calcite-radio-group-item", { checked: !this._addEnabled, class: "w-50", onClick: () => this._setSelectionMode(ESelectionMode.REMOVE), value: ESelectionMode.REMOVE }, this._translations.remove)), h$1("refine-selection-tools", { border: true, enabledLayerIds: this.enabledLayerIds, ids: getSelectionIds(this.selectionSets), layerViews: [this.addresseeLayer], mapView: this.mapView, mode: this._addEnabled ? ESelectionMode.ADD : ESelectionMode.REMOVE, ref: (el) => { this._refineTools = el; }, refineMode: ERefineMode.ALL, useLayerPicker: false })), h$1("br", null), (h$1("calcite-list", { class: "list-border" }, this._getRefineSelectionSetList())))));
3219
+ return (h$1(Host, null, h$1("div", { class: "padding-1" }, h$1("div", null, h$1("calcite-radio-group", { class: "w-100", onCalciteRadioGroupChange: (evt) => this._modeChanged(evt) }, h$1("calcite-radio-group-item", { checked: this._addEnabled, class: "w-50", onClick: () => this._setSelectionMode(ESelectionMode.ADD), value: ESelectionMode.ADD }, this._translations.add), h$1("calcite-radio-group-item", { checked: !this._addEnabled, class: "w-50", onClick: () => this._setSelectionMode(ESelectionMode.REMOVE), value: ESelectionMode.REMOVE }, this._translations.remove)), h$1("refine-selection-tools", { border: true, enabledLayerIds: this.enabledLayerIds, ids: getSelectionIds(this.selectionSets), layerViews: [this.addresseeLayer], mapView: this.mapView, mode: this._addEnabled ? ESelectionMode.ADD : ESelectionMode.REMOVE, ref: (el) => { this._refineTools = el; }, refineMode: ERefineMode.ALL, refineSelectionSet: this._getRefineSelectionSet(this.selectionSets), useLayerPicker: false })), h$1("br", null), (h$1("calcite-list", { class: "list-border" }, this._getRefineSelectionSetList())))));
3186
3220
  }
3187
3221
  //--------------------------------------------------------------------------
3188
3222
  //
@@ -3248,7 +3282,7 @@ const RefineSelection = class {
3248
3282
  if (removeIds.length > 0) {
3249
3283
  this.selectionSets = this.selectionSets.reduce((prev, cur) => {
3250
3284
  cur.selectedIds = cur.selectedIds.filter(id => removeIds.indexOf(id) < 0);
3251
- if (cur.selectedIds.length > 0) {
3285
+ if (cur.selectedIds.length > 0 || cur.workflowType === EWorkflowType.REFINE) {
3252
3286
  prev.push(cur);
3253
3287
  }
3254
3288
  return prev;
@@ -3267,9 +3301,7 @@ const RefineSelection = class {
3267
3301
  */
3268
3302
  _updateRefineSelectionSet(addIds, removeIds) {
3269
3303
  const selectionSet = this._getRefineSelectionSet(this.selectionSets);
3270
- this.selectionSets = selectionSet ?
3271
- this._updateRefineIds(selectionSet, addIds, removeIds) :
3272
- this._addRefineSelectionSet(addIds, removeIds);
3304
+ this._updateRefineIds(selectionSet, addIds, removeIds);
3273
3305
  this.selectionSetsChanged.emit(this.selectionSets);
3274
3306
  }
3275
3307
  /**
@@ -3302,15 +3334,12 @@ const RefineSelection = class {
3302
3334
  /**
3303
3335
  * Add a new refine selection set
3304
3336
  *
3305
- * @param addIds any ids to add
3306
- * @param removeIds any ids to remove
3307
- *
3308
3337
  * @returns updated selection sets
3309
3338
  * @protected
3310
3339
  */
3311
- _addRefineSelectionSet(addIds, removeIds) {
3340
+ _initRefineSelectionSet(selectionSets) {
3312
3341
  return [
3313
- ...this.selectionSets,
3342
+ ...selectionSets,
3314
3343
  ({
3315
3344
  buffer: undefined,
3316
3345
  distance: 0,
@@ -3321,13 +3350,15 @@ const RefineSelection = class {
3321
3350
  layerView: this.addresseeLayer,
3322
3351
  refineSelectLayers: [],
3323
3352
  searchResult: undefined,
3324
- selectedIds: addIds,
3353
+ selectedIds: [],
3325
3354
  unit: "feet",
3326
3355
  workflowType: EWorkflowType.REFINE,
3327
3356
  refineIds: {
3328
- addIds: addIds,
3329
- removeIds: removeIds
3330
- }
3357
+ addIds: [],
3358
+ removeIds: []
3359
+ },
3360
+ redoStack: [],
3361
+ undoStack: []
3331
3362
  })
3332
3363
  ];
3333
3364
  }
@@ -3368,6 +3399,9 @@ const RefineSelection = class {
3368
3399
  return null;
3369
3400
  }
3370
3401
  get el() { return getElement(this); }
3402
+ static get watchers() { return {
3403
+ "addresseeLayer": ["addresseeLayerWatchHandler"]
3404
+ }; }
3371
3405
  };
3372
3406
  RefineSelection.style = refineSelectionCss;
3373
3407
 
@@ -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-b60306b8.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-ddd74bd6.js';
7
7
  import './index-c246d90e.js';
8
8
  import './dom-3bdc69ee.js';
9
9
  import './resources-436ae282.js';
@@ -14,7 +14,7 @@ import './observers-31601001.js';
14
14
  import './loadModules-649aedac.js';
15
15
  import './locale-4a87aff1.js';
16
16
  import './_commonjsHelpers-d5f9d613.js';
17
- import './mapViewUtils-c2fb048d.js';
17
+ import './mapViewUtils-63e118f8.js';
18
18
  import './interfaces-d0d83efa.js';
19
19
  import './publicNotificationStore-b9daaee4.js';
20
20
  import './index-ac7f66eb.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-b60306b8.js';
7
+ import { _ as _typeof_1 } from './calcite-input-message.calcite-notice.map-select-tools.pdf-download.refine-selection-ddd74bd6.js';
8
8
  import './index-c246d90e.js';
9
9
  import './dom-3bdc69ee.js';
10
10
  import './resources-436ae282.js';
@@ -14,7 +14,7 @@ import './conditionalSlot-d09506c4.js';
14
14
  import './observers-31601001.js';
15
15
  import './loadModules-649aedac.js';
16
16
  import './locale-4a87aff1.js';
17
- import './mapViewUtils-c2fb048d.js';
17
+ import './mapViewUtils-63e118f8.js';
18
18
  import './interfaces-d0d83efa.js';
19
19
  import './publicNotificationStore-b9daaee4.js';
20
20
  import './index-ac7f66eb.js';
@@ -5,7 +5,7 @@
5
5
  */
6
6
  import { r as registerInstance, h, H as Host, g as getElement } from './index-c246d90e.js';
7
7
  import { g as getLocaleComponentStrings } from './locale-4a87aff1.js';
8
- import { q as queryFeaturesByID, g as goToSelection, a as getMapLayerView, b as queryAllFeatures } from './mapViewUtils-c2fb048d.js';
8
+ import { q as queryFeaturesByID, g as goToSelection, a as getMapLayerView, b as queryAllFeatures } from './mapViewUtils-63e118f8.js';
9
9
  import { e as exportCSV } from './csvUtils-23b5418f.js';
10
10
  import './_commonjsHelpers-d5f9d613.js';
11
11
  import './interfaces-d0d83efa.js';