@esri/solutions-components 0.3.8 → 0.3.9

Sign up to get free protection for your applications and to get access to all the features.
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
@@ -41,6 +41,19 @@ export class RefineSelection {
41
41
  this.SketchViewModel = undefined;
42
42
  this._translations = undefined;
43
43
  }
44
+ //--------------------------------------------------------------------------
45
+ //
46
+ // Watch handlers
47
+ //
48
+ //--------------------------------------------------------------------------
49
+ /**
50
+ * Called each time the addresseeLayer is changed.
51
+ * Add a new clean refine set for the new addressee layer.
52
+ */
53
+ addresseeLayerWatchHandler() {
54
+ const selectionSets = this.selectionSets.filter(ss => ss.workflowType !== EWorkflowType.REFINE);
55
+ this.selectionSets = this._initRefineSelectionSet(selectionSets);
56
+ }
44
57
  /**
45
58
  * Handles changes to refine selection ids.
46
59
  *
@@ -62,12 +75,16 @@ export class RefineSelection {
62
75
  */
63
76
  async componentWillLoad() {
64
77
  await this._getTranslations();
78
+ const refineSet = this._getRefineSelectionSet(this.selectionSets);
79
+ if (!refineSet) {
80
+ this.selectionSets = this._initRefineSelectionSet(this.selectionSets);
81
+ }
65
82
  }
66
83
  /**
67
84
  * Renders the component.
68
85
  */
69
86
  render() {
70
- 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: utils.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())))));
87
+ 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: utils.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())))));
71
88
  }
72
89
  //--------------------------------------------------------------------------
73
90
  //
@@ -133,7 +150,7 @@ export class RefineSelection {
133
150
  if (removeIds.length > 0) {
134
151
  this.selectionSets = this.selectionSets.reduce((prev, cur) => {
135
152
  cur.selectedIds = cur.selectedIds.filter(id => removeIds.indexOf(id) < 0);
136
- if (cur.selectedIds.length > 0) {
153
+ if (cur.selectedIds.length > 0 || cur.workflowType === EWorkflowType.REFINE) {
137
154
  prev.push(cur);
138
155
  }
139
156
  return prev;
@@ -152,9 +169,7 @@ export class RefineSelection {
152
169
  */
153
170
  _updateRefineSelectionSet(addIds, removeIds) {
154
171
  const selectionSet = this._getRefineSelectionSet(this.selectionSets);
155
- this.selectionSets = selectionSet ?
156
- this._updateRefineIds(selectionSet, addIds, removeIds) :
157
- this._addRefineSelectionSet(addIds, removeIds);
172
+ this._updateRefineIds(selectionSet, addIds, removeIds);
158
173
  this.selectionSetsChanged.emit(this.selectionSets);
159
174
  }
160
175
  /**
@@ -187,15 +202,12 @@ export class RefineSelection {
187
202
  /**
188
203
  * Add a new refine selection set
189
204
  *
190
- * @param addIds any ids to add
191
- * @param removeIds any ids to remove
192
- *
193
205
  * @returns updated selection sets
194
206
  * @protected
195
207
  */
196
- _addRefineSelectionSet(addIds, removeIds) {
208
+ _initRefineSelectionSet(selectionSets) {
197
209
  return [
198
- ...this.selectionSets,
210
+ ...selectionSets,
199
211
  ({
200
212
  buffer: undefined,
201
213
  distance: 0,
@@ -206,13 +218,15 @@ export class RefineSelection {
206
218
  layerView: this.addresseeLayer,
207
219
  refineSelectLayers: [],
208
220
  searchResult: undefined,
209
- selectedIds: addIds,
221
+ selectedIds: [],
210
222
  unit: "feet",
211
223
  workflowType: EWorkflowType.REFINE,
212
224
  refineIds: {
213
- addIds: addIds,
214
- removeIds: removeIds
215
- }
225
+ addIds: [],
226
+ removeIds: []
227
+ },
228
+ redoStack: [],
229
+ undoStack: []
216
230
  })
217
231
  ];
218
232
  }
@@ -405,6 +419,12 @@ export class RefineSelection {
405
419
  }];
406
420
  }
407
421
  static get elementRef() { return "el"; }
422
+ static get watchers() {
423
+ return [{
424
+ "propName": "addresseeLayer",
425
+ "methodName": "addresseeLayerWatchHandler"
426
+ }];
427
+ }
408
428
  static get listeners() {
409
429
  return [{
410
430
  "name": "refineSelectionIdsChange",
@@ -31,14 +31,6 @@ export class RefineSelectionTools {
31
31
  * {<layer id>: Graphic[]}: Collection of graphics returned from queries to the layer
32
32
  */
33
33
  this._featuresCollection = {};
34
- /**
35
- * IRefineOperation[]: Array to maintain the possible redo operations
36
- */
37
- this._redoStack = [];
38
- /**
39
- * IRefineOperation[]: Array to maintain the possible undo operations
40
- */
41
- this._undoStack = [];
42
34
  this.active = false;
43
35
  this.border = false;
44
36
  this.enabledLayerIds = [];
@@ -49,6 +41,7 @@ export class RefineSelectionTools {
49
41
  this.mapView = undefined;
50
42
  this.mode = undefined;
51
43
  this.refineMode = undefined;
44
+ this.refineSelectionSet = undefined;
52
45
  this.useLayerPicker = true;
53
46
  this._selectEnabled = false;
54
47
  this._selectionMode = undefined;
@@ -129,10 +122,11 @@ export class RefineSelectionTools {
129
122
  * Renders the component.
130
123
  */
131
124
  render() {
125
+ var _a, _b;
132
126
  const showLayerPickerClass = this.useLayerPicker ? "div-visible" : "div-not-visible";
133
127
  const drawClass = this.border ? " border" : "";
134
128
  const showUndoRedo = this.refineMode === ERefineMode.ALL ? "div-visible" : "div-not-visible";
135
- 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 }))))))));
129
+ 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 }))))))));
136
130
  }
137
131
  //--------------------------------------------------------------------------
138
132
  //
@@ -322,7 +316,7 @@ export class RefineSelectionTools {
322
316
  }
323
317
  else {
324
318
  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]; }) : [];
325
- await this._updateIds(oids, this.mode, this._undoStack, this.mode);
319
+ await this._updateIds(oids, this.mode, this.refineSelectionSet.undoStack, this.mode);
326
320
  }
327
321
  this._clear();
328
322
  });
@@ -365,12 +359,16 @@ export class RefineSelectionTools {
365
359
  if (mode === ESelectionMode.ADD) {
366
360
  idUpdates.addIds = oids.filter(id => this.ids.indexOf(id) < 0);
367
361
  this.ids = [...this.ids, ...idUpdates.addIds];
368
- operationStack.push({ mode: operationMode, ids: idUpdates.addIds });
362
+ if (idUpdates.addIds.length > 0) {
363
+ operationStack.push({ mode: operationMode, ids: idUpdates.addIds });
364
+ }
369
365
  }
370
366
  else {
371
367
  idUpdates.removeIds = oids.filter(id => this.ids.indexOf(id) > -1);
372
368
  this.ids = this.ids.filter(id => idUpdates.removeIds.indexOf(id) < 0);
373
- operationStack.push({ mode: operationMode, ids: idUpdates.removeIds });
369
+ if (idUpdates.removeIds.length > 0) {
370
+ operationStack.push({ mode: operationMode, ids: idUpdates.removeIds });
371
+ }
374
372
  }
375
373
  await this._highlightFeatures(this.ids).then(() => {
376
374
  this.refineSelectionIdsChange.emit(idUpdates);
@@ -384,8 +382,8 @@ export class RefineSelectionTools {
384
382
  * @protected
385
383
  */
386
384
  _undo() {
387
- const undoOp = this._undoStack.pop();
388
- void this._updateIds(undoOp.ids, undoOp.mode === ESelectionMode.ADD ? ESelectionMode.REMOVE : ESelectionMode.ADD, this._redoStack, undoOp.mode);
385
+ const undoOp = this.refineSelectionSet.undoStack.pop();
386
+ void this._updateIds(undoOp.ids, undoOp.mode === ESelectionMode.ADD ? ESelectionMode.REMOVE : ESelectionMode.ADD, this.refineSelectionSet.redoStack, undoOp.mode);
389
387
  }
390
388
  /**
391
389
  * Redo the most current ADD or REMOVE operation
@@ -395,8 +393,8 @@ export class RefineSelectionTools {
395
393
  * @protected
396
394
  */
397
395
  _redo() {
398
- const redoOp = this._redoStack.pop();
399
- void this._updateIds(redoOp.ids, redoOp.mode, this._undoStack, redoOp.mode);
396
+ const redoOp = this.refineSelectionSet.redoStack.pop();
397
+ void this._updateIds(redoOp.ids, redoOp.mode, this.refineSelectionSet.undoStack, redoOp.mode);
400
398
  }
401
399
  /**
402
400
  * Fetches the component's translations
@@ -610,6 +608,26 @@ export class RefineSelectionTools {
610
608
  "attribute": "refine-mode",
611
609
  "reflect": false
612
610
  },
611
+ "refineSelectionSet": {
612
+ "type": "unknown",
613
+ "mutable": true,
614
+ "complexType": {
615
+ "original": "ISelectionSet",
616
+ "resolved": "ISelectionSet",
617
+ "references": {
618
+ "ISelectionSet": {
619
+ "location": "import",
620
+ "path": "../../utils/interfaces"
621
+ }
622
+ }
623
+ },
624
+ "required": false,
625
+ "optional": false,
626
+ "docs": {
627
+ "tags": [],
628
+ "text": "utils/interfaces/ISelectionSet: Refine selection set"
629
+ }
630
+ },
613
631
  "useLayerPicker": {
614
632
  "type": "boolean",
615
633
  "mutable": false,
@@ -93,16 +93,6 @@
93
93
  //demo.addresseeLayerIds = ["18434515eb8-layer-12"];
94
94
  //demo.defaultBufferDistance = 100;
95
95
  //demo.defaultBufferUnit = "kilometers";
96
- demo.exportOptions = {
97
- csvOptions: {
98
- enabled: true, // I question if this should be exposed
99
- addColumnTitle: false
100
- },
101
- pdfOptions: {
102
- enabled: true, // I question if this should be exposed
103
- enabledSizeValues: [6,10,14,20]
104
- }
105
- };
106
96
  demo.featureEffect = {
107
97
  includedEffect: "invert(100%)",
108
98
  excludedEffect: "blur(5px)"
@@ -111,7 +101,7 @@
111
101
  demo.noResultText = "No results found";
112
102
  //demo.selectionLayerIds = ["1843422bf6b-layer-7"];
113
103
  demo.showSearchSettings = true;
114
- demo.customLabelEnabled = false;
104
+ demo.customLabelEnabled = true;
115
105
  // demo.bufferColor = [227, 0, 0, 0.8];
116
106
  // demo.bufferOutlineColor = [0, 255, 0];
117
107
  demo.showRefineSelection = true;
@@ -385,6 +385,8 @@ export interface ISelectionSet {
385
385
  geometries: __esri.Geometry[];
386
386
  refineSelectLayers: __esri.FeatureLayerView[];
387
387
  refineIds: IRefineIds;
388
+ redoStack?: IRefineOperation[];
389
+ undoStack?: IRefineOperation[];
388
390
  }
389
391
 
390
392
  export interface IRefineIds {
@@ -30,8 +30,10 @@ import { queryExtent } from "./queryUtils";
30
30
  export async function getMapLayerHash(mapView) {
31
31
  let layerHash = {};
32
32
  await mapView.when(() => {
33
- layerHash = mapView.map.layers.toArray().reduce((prev, cur) => {
34
- prev[cur.id] = cur.title;
33
+ layerHash = mapView.map.allLayers.toArray().reduce((prev, cur) => {
34
+ if (cur.type === "feature") {
35
+ prev[cur.id] = cur.title;
36
+ }
35
37
  return prev;
36
38
  }, {});
37
39
  });
@@ -48,9 +50,12 @@ export async function getMapLayerHash(mapView) {
48
50
  export async function getMapLayerIds(mapView) {
49
51
  let layerIds = [];
50
52
  await mapView.when(() => {
51
- layerIds = mapView.map.layers.toArray().map((l) => {
52
- return l.id;
53
- });
53
+ layerIds = mapView.map.allLayers.toArray().reduce((prev, cur) => {
54
+ if (cur.type === "feature") {
55
+ prev.push(cur.id);
56
+ }
57
+ return prev;
58
+ }, []);
54
59
  });
55
60
  return layerIds;
56
61
  }
@@ -79,7 +84,7 @@ export async function getMapLayerView(mapView, id) {
79
84
  export async function getMapLayer(mapView, id) {
80
85
  let layers = [];
81
86
  await mapView.when(() => {
82
- layers = mapView.map.layers.toArray().filter((l) => {
87
+ layers = mapView.map.allLayers.toArray().filter((l) => {
83
88
  return l.id === id;
84
89
  });
85
90
  });
@@ -30,8 +30,10 @@ export async function getMapLayerHash(
30
30
  ): Promise<ILayerHash> {
31
31
  let layerHash = {};
32
32
  await mapView.when(() => {
33
- layerHash = mapView.map.layers.toArray().reduce((prev, cur) => {
34
- prev[cur.id] = cur.title;
33
+ layerHash = mapView.map.allLayers.toArray().reduce((prev, cur) => {
34
+ if (cur.type === "feature") {
35
+ prev[cur.id] = cur.title;
36
+ }
35
37
  return prev;
36
38
  }, {});
37
39
  });
@@ -51,9 +53,12 @@ export async function getMapLayerIds(
51
53
  ): Promise<string[]> {
52
54
  let layerIds = [];
53
55
  await mapView.when(() => {
54
- layerIds = mapView.map.layers.toArray().map((l) => {
55
- return l.id;
56
- });
56
+ layerIds = mapView.map.allLayers.toArray().reduce((prev, cur) => {
57
+ if (cur.type === "feature") {
58
+ prev.push(cur.id);
59
+ }
60
+ return prev;
61
+ }, []);
57
62
  });
58
63
  return layerIds;
59
64
  }
@@ -90,7 +95,7 @@ export async function getMapLayer(
90
95
  ): Promise<__esri.FeatureLayer> {
91
96
  let layers = [];
92
97
  await mapView.when(() => {
93
- layers = mapView.map.layers.toArray().filter((l) => {
98
+ layers = mapView.map.allLayers.toArray().filter((l) => {
94
99
  return l.id === id;
95
100
  });
96
101
  });
@@ -27,8 +27,8 @@ const BufferTools = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
27
27
  this.appearance = "text";
28
28
  this.distance = 0;
29
29
  this.geometries = [];
30
- this.sliderMax = 100;
31
- this.sliderMin = 0;
30
+ this.max = undefined;
31
+ this.min = 0;
32
32
  this.sliderTicks = 10;
33
33
  this.unionResults = true;
34
34
  this.unit = "meters";
@@ -113,16 +113,19 @@ const BufferTools = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
113
113
  * @protected
114
114
  */
115
115
  _setDistance(event) {
116
- this.distanceChanged.emit({
117
- oldValue: this.distance,
118
- newValue: event.detail.value
119
- });
120
- this.distance = event.detail.value;
121
- if (this.distance > 0) {
122
- this._buffer();
123
- }
124
- else {
125
- this.bufferComplete.emit(undefined);
116
+ const v = parseInt(event.detail.value, 10);
117
+ if (this.distance !== v && v >= this.min) {
118
+ this.distanceChanged.emit({
119
+ oldValue: this.distance,
120
+ newValue: event.detail.value
121
+ });
122
+ this.distance = v;
123
+ if (this.distance > 0) {
124
+ this._buffer();
125
+ }
126
+ else {
127
+ this.bufferComplete.emit(undefined);
128
+ }
126
129
  }
127
130
  }
128
131
  /**
@@ -165,7 +168,7 @@ const BufferTools = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
165
168
  * @protected
166
169
  */
167
170
  _getTextBoxDisplay() {
168
- 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())));
171
+ 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())));
169
172
  }
170
173
  /**
171
174
  * Render distance control as a slider
@@ -176,7 +179,7 @@ const BufferTools = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
176
179
  * @protected
177
180
  */
178
181
  _getSliderDisplay() {
179
- return (h("div", null, h("calcite-slider", { labelHandles: true, max: this.sliderMax, min: this.sliderMin, ticks: this.sliderTicks })));
182
+ return (h("div", null, h("calcite-slider", { labelHandles: true, max: this.max && this.max > 0 ? this.max : undefined, min: this.min, ticks: this.sliderTicks })));
180
183
  }
181
184
  /**
182
185
  * Fetches the component's translations
@@ -212,8 +215,8 @@ const BufferTools = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
212
215
  "appearance": [1025],
213
216
  "distance": [1026],
214
217
  "geometries": [1040],
215
- "sliderMax": [1026, "slider-max"],
216
- "sliderMin": [1026, "slider-min"],
218
+ "max": [1026],
219
+ "min": [1026],
217
220
  "sliderTicks": [1026, "slider-ticks"],
218
221
  "unionResults": [1028, "union-results"],
219
222
  "unit": [1025],
@@ -39,8 +39,10 @@ import { d as defineCustomElement$1 } from './select.js';
39
39
  async function getMapLayerHash(mapView) {
40
40
  let layerHash = {};
41
41
  await mapView.when(() => {
42
- layerHash = mapView.map.layers.toArray().reduce((prev, cur) => {
43
- prev[cur.id] = cur.title;
42
+ layerHash = mapView.map.allLayers.toArray().reduce((prev, cur) => {
43
+ if (cur.type === "feature") {
44
+ prev[cur.id] = cur.title;
45
+ }
44
46
  return prev;
45
47
  }, {});
46
48
  });
@@ -57,9 +59,12 @@ async function getMapLayerHash(mapView) {
57
59
  async function getMapLayerIds(mapView) {
58
60
  let layerIds = [];
59
61
  await mapView.when(() => {
60
- layerIds = mapView.map.layers.toArray().map((l) => {
61
- return l.id;
62
- });
62
+ layerIds = mapView.map.allLayers.toArray().reduce((prev, cur) => {
63
+ if (cur.type === "feature") {
64
+ prev.push(cur.id);
65
+ }
66
+ return prev;
67
+ }, []);
63
68
  });
64
69
  return layerIds;
65
70
  }
@@ -88,7 +93,7 @@ async function getMapLayerView(mapView, id) {
88
93
  async function getMapLayer(mapView, id) {
89
94
  let layers = [];
90
95
  await mapView.when(() => {
91
- layers = mapView.map.layers.toArray().filter((l) => {
96
+ layers = mapView.map.allLayers.toArray().filter((l) => {
92
97
  return l.id === id;
93
98
  });
94
99
  });
@@ -84,6 +84,16 @@ const MapSelectTools = /*@__PURE__*/ proxyCustomElement(class extends HTMLElemen
84
84
  }
85
85
  }
86
86
  }
87
+ /**
88
+ * Called each time the searchConfiguration prop is changed.
89
+ *
90
+ * @returns Promise when complete
91
+ */
92
+ async watchSearchConfigurationHandler(newValue, oldValue) {
93
+ if (JSON.stringify(newValue) !== JSON.stringify(oldValue)) {
94
+ this._initSearchWidget();
95
+ }
96
+ }
87
97
  /**
88
98
  * Called each time the workflowType prop is changed and emits the workflowTypeChange event.
89
99
  *
@@ -502,6 +512,7 @@ const MapSelectTools = /*@__PURE__*/ proxyCustomElement(class extends HTMLElemen
502
512
  get el() { return this; }
503
513
  static get watchers() { return {
504
514
  "geometries": ["watchGeometriesHandler"],
515
+ "searchConfiguration": ["watchSearchConfigurationHandler"],
505
516
  "_workflowType": ["workflowTypeHandler"]
506
517
  }; }
507
518
  static get style() { return mapSelectToolsCss; }
@@ -2262,7 +2262,6 @@ const PdfDownload = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
2262
2262
  this.__registerHost();
2263
2263
  this.__attachShadow();
2264
2264
  this.disabled = false;
2265
- this.enabledSizeValues = [];
2266
2265
  this.layerView = undefined;
2267
2266
  this._translations = undefined;
2268
2267
  }
@@ -2352,8 +2351,15 @@ const PdfDownload = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
2352
2351
  _convertPopupToLabelSpec(popupInfo) {
2353
2352
  // Replace <br>, <br/> with |
2354
2353
  popupInfo = popupInfo.replace(/<br\s*\/?>/gi, "|");
2355
- // Remove remaining HTML tags and replace 0xA0 that popup uses for spaces
2356
- let labelSpec = popupInfo.replace(/<[\s.]*[^<>]*\/?>/gi, "").replace(/\xA0/gi, " ").split("|");
2354
+ // Remove remaining HTML tags, replace 0xA0 that popup uses for spaces, replace some char representations,
2355
+ // and split the label back into individual lines
2356
+ let labelSpec = popupInfo
2357
+ .replace(/<[\s.]*[^<>]*\/?>/gi, "")
2358
+ .replace(/\xA0/gi, " ")
2359
+ .replace(/&lt;/gi, "<")
2360
+ .replace(/&gt;/gi, ">")
2361
+ .replace(/&nbsp;/gi, " ")
2362
+ .split("|");
2357
2363
  // Trim lines and remove empties
2358
2364
  labelSpec = labelSpec.map(line => line.trim()).filter(line => line.length > 0);
2359
2365
  return labelSpec;
@@ -2444,7 +2450,6 @@ const PdfDownload = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
2444
2450
  static get style() { return pdfDownloadCss; }
2445
2451
  }, [1, "pdf-download", {
2446
2452
  "disabled": [4],
2447
- "enabledSizeValues": [16],
2448
2453
  "layerView": [16],
2449
2454
  "_translations": [32],
2450
2455
  "downloadCSV": [64],
@@ -60,7 +60,6 @@ const PublicNotification$1 = /*@__PURE__*/ proxyCustomElement(class extends HTML
60
60
  this.customLabelEnabled = undefined;
61
61
  this.defaultBufferDistance = undefined;
62
62
  this.defaultBufferUnit = undefined;
63
- this.exportOptions = undefined;
64
63
  this.featureEffect = undefined;
65
64
  this.featureHighlightEnabled = undefined;
66
65
  this.mapView = undefined;
@@ -160,13 +159,8 @@ const PublicNotification$1 = /*@__PURE__*/ proxyCustomElement(class extends HTML
160
159
  * Renders the component.
161
160
  */
162
161
  render() {
163
- var _a, _b, _c, _d, _e, _f;
164
162
  const hasSelections = this._selectionSets.length > 0;
165
- const csvEnabled = typeof ((_b = (_a = this.exportOptions) === null || _a === void 0 ? void 0 : _a.csvOptions) === null || _b === void 0 ? void 0 : _b.enabled) === "boolean" ?
166
- (_c = this.exportOptions) === null || _c === void 0 ? void 0 : _c.csvOptions.enabled : true;
167
- const pdfEnabled = typeof ((_e = (_d = this.exportOptions) === null || _d === void 0 ? void 0 : _d.pdfOptions) === null || _e === void 0 ? void 0 : _e.enabled) === "boolean" ?
168
- (_f = this.exportOptions) === null || _f === void 0 ? void 0 : _f.pdfOptions.enabled : true;
169
- return (h(Host, null, h("calcite-shell", null, h("calcite-action-bar", { class: "border-bottom-1 action-bar-size", "expand-disabled": true, layout: "horizontal", slot: "header" }, this._getActionGroup("list-check", false, EPageType.LIST, this._translations.myLists), this.showRefineSelection ? this._getActionGroup("test-data", !hasSelections, EPageType.REFINE, this._translations.refineSelection) : undefined, pdfEnabled ? this._getActionGroup("file-pdf", !hasSelections, EPageType.PDF, this._translations.downloadPDF) : undefined, csvEnabled ? this._getActionGroup("file-csv", !hasSelections, EPageType.CSV, this._translations.downloadCSV) : undefined), this._getPage(this._pageType))));
163
+ return (h(Host, null, h("calcite-shell", null, h("calcite-action-bar", { class: "border-bottom-1 action-bar-size", "expand-disabled": true, layout: "horizontal", slot: "header" }, this._getActionGroup("list-check", false, EPageType.LIST, this._translations.myLists), this.showRefineSelection ? this._getActionGroup("test-data", !hasSelections, EPageType.REFINE, this._translations.refineSelection) : undefined, this._getActionGroup("file-pdf", !hasSelections, EPageType.PDF, this._translations.downloadPDF), this._getActionGroup("file-csv", !hasSelections, EPageType.CSV, this._translations.downloadCSV)), this._getPage(this._pageType))));
170
164
  }
171
165
  //--------------------------------------------------------------------------
172
166
  //
@@ -370,10 +364,8 @@ const PublicNotification$1 = /*@__PURE__*/ proxyCustomElement(class extends HTML
370
364
  * @protected
371
365
  */
372
366
  _getDownloadPage(type) {
373
- var _a, _b;
374
367
  const isPdf = type === EExportType.PDF;
375
- const multiPdfOptions = ((_a = this.exportOptions) === null || _a === void 0 ? void 0 : _a.pdfOptions.enabledSizeValues.length) > 1;
376
- return (h("calcite-panel", null, h("div", null, h("div", { class: "padding-top-sides-1" }, h("calcite-label", { class: "font-bold" }, isPdf ? this._translations.pdfDownloads : this._translations.csvDownloads), h("calcite-label", null, this._translations.notifications)), this._getSelectionLists(), h("div", { class: "margin-side-1 padding-top-1 border-bottom" }), h("div", { class: "padding-top-sides-1" }, h("calcite-label", { layout: "inline" }, h("calcite-checkbox", { disabled: !this._downloadActive, ref: (el) => { this._removeDuplicates = el; } }), this._translations.removeDuplicate)), h("div", { class: isPdf && multiPdfOptions ? "" : "display-none" }, this._getLabel(this._translations.selectPDFLabelOption, false), h("div", { class: "padding-sides-1" }, h("pdf-download", { disabled: !this._downloadActive, enabledSizeValues: (_b = this.exportOptions) === null || _b === void 0 ? void 0 : _b.pdfOptions.enabledSizeValues, layerView: this.addresseeLayer, ref: (el) => { this._downloadTools = el; } }))), h("div", { class: "padding-1 display-flex" }, h("calcite-button", { disabled: !this._downloadActive, onClick: isPdf ? () => this._downloadPDF() : () => this._downloadCSV(), width: "full" }, isPdf ? this._translations.downloadPDF : this._translations.downloadCSV)))));
368
+ return (h("calcite-panel", null, h("div", null, h("div", { class: "padding-top-sides-1" }, h("calcite-label", { class: "font-bold" }, isPdf ? this._translations.pdfDownloads : this._translations.csvDownloads), h("calcite-label", null, this._translations.notifications)), this._getSelectionLists(), h("div", { class: "margin-side-1 padding-top-1 border-bottom" }), h("div", { class: "padding-top-sides-1" }, h("calcite-label", { layout: "inline" }, h("calcite-checkbox", { disabled: !this._downloadActive, ref: (el) => { this._removeDuplicates = el; } }), this._translations.removeDuplicate)), h("div", { class: isPdf ? "" : "display-none" }, this._getLabel(this._translations.selectPDFLabelOption, false), h("div", { class: "padding-sides-1" }, h("pdf-download", { disabled: !this._downloadActive, layerView: this.addresseeLayer, ref: (el) => { this._downloadTools = el; } }))), h("div", { class: "padding-1 display-flex" }, h("calcite-button", { disabled: !this._downloadActive, onClick: isPdf ? () => this._downloadPDF() : () => this._downloadCSV(), width: "full" }, isPdf ? this._translations.downloadPDF : this._translations.downloadCSV)))));
377
369
  }
378
370
  /**
379
371
  * Create the stacked navigation buttons for a page
@@ -731,7 +723,6 @@ const PublicNotification$1 = /*@__PURE__*/ proxyCustomElement(class extends HTML
731
723
  "customLabelEnabled": [4, "custom-label-enabled"],
732
724
  "defaultBufferDistance": [2, "default-buffer-distance"],
733
725
  "defaultBufferUnit": [1, "default-buffer-unit"],
734
- "exportOptions": [16],
735
726
  "featureEffect": [16],
736
727
  "featureHighlightEnabled": [4, "feature-highlight-enabled"],
737
728
  "mapView": [16],