@esri/solutions-components 0.3.2 → 0.3.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (163) hide show
  1. package/dist/assets/t9n/public-notification/resources.json +4 -1
  2. package/dist/assets/t9n/public-notification/resources_en.json +4 -1
  3. package/dist/cjs/buffer-tools_6.cjs.entry.js +8 -7
  4. package/dist/cjs/calcite-combobox_3.cjs.entry.js +38 -25
  5. package/dist/cjs/calcite-input-message_5.cjs.entry.js +272 -21
  6. package/dist/cjs/{csvUtils-18a03353.js → csvUtils-83af7ae1.js} +5 -5
  7. package/dist/cjs/layer-table.cjs.entry.js +3 -3
  8. package/dist/cjs/loader.cjs.js +1 -1
  9. package/dist/cjs/map-search.cjs.entry.js +46 -7
  10. package/dist/cjs/{mapViewUtils-8ea9adc5.js → mapViewUtils-55ac76cb.js} +40 -25
  11. package/dist/cjs/public-notification.cjs.entry.js +101 -18
  12. package/dist/cjs/{publicNotificationStore-aca88430.js → publicNotificationStore-28a8759d.js} +3 -1
  13. package/dist/cjs/solutions-components.cjs.js +1 -1
  14. package/dist/collection/collection-manifest.json +0 -5
  15. package/dist/collection/components/buffer-tools/buffer-tools.js +7 -6
  16. package/dist/collection/components/layer-table/layer-table.js +1 -1
  17. package/dist/collection/components/map-layer-picker/map-layer-picker.js +47 -29
  18. package/dist/collection/components/map-search/map-search.js +66 -7
  19. package/dist/collection/components/map-select-tools/map-select-tools.js +125 -8
  20. package/dist/collection/components/pdf-download/pdf-download.js +32 -8
  21. package/dist/collection/components/public-notification/public-notification.css +46 -41
  22. package/dist/collection/components/public-notification/public-notification.js +267 -19
  23. package/dist/collection/components/refine-selection/refine-selection.js +18 -1
  24. package/dist/collection/components/refine-selection-tools/refine-selection-tools.js +22 -5
  25. package/dist/{solutions-components/demos/config-pdf-download.html → collection/demos/buffer-tools.html} +13 -21
  26. package/dist/collection/demos/index.html +0 -24
  27. package/dist/collection/demos/map-draw-tools.html +17 -17
  28. package/dist/collection/demos/map-layer-picker.html +2 -0
  29. package/dist/collection/demos/map-search.html +16 -15
  30. package/dist/collection/demos/map-select-tools.html +16 -24
  31. package/dist/collection/demos/new-public-notification.html +46 -35
  32. package/dist/collection/demos/pdf-download.html +8 -1
  33. package/dist/collection/utils/csvUtils.js +4 -4
  34. package/dist/collection/utils/csvUtils.ts +6 -4
  35. package/dist/collection/utils/interfaces.ts +65 -1
  36. package/dist/collection/utils/mapViewUtils.js +36 -22
  37. package/dist/collection/utils/mapViewUtils.ts +50 -27
  38. package/dist/collection/utils/publicNotificationStore.js +3 -1
  39. package/dist/collection/utils/publicNotificationStore.ts +3 -1
  40. package/dist/collection/utils/queryUtils.js +2 -2
  41. package/dist/collection/utils/queryUtils.ts +2 -2
  42. package/dist/components/buffer-tools2.js +1 -1
  43. package/dist/components/csvUtils.js +4 -4
  44. package/dist/components/index.d.ts +0 -5
  45. package/dist/components/index.js +0 -5
  46. package/dist/components/layer-table.js +2 -3
  47. package/dist/components/map-layer-picker2.js +177 -28
  48. package/dist/components/map-search.js +47 -7
  49. package/dist/components/map-select-tools2.js +56 -11
  50. package/dist/components/pdf-download2.js +217 -8
  51. package/dist/components/public-notification.js +154 -55
  52. package/dist/components/publicNotificationStore.js +3 -1
  53. package/dist/components/queryUtils.js +3 -3
  54. package/dist/components/refine-selection-tools2.js +9 -8
  55. package/dist/components/refine-selection2.js +3 -1
  56. package/dist/esm/buffer-tools_6.entry.js +8 -7
  57. package/dist/esm/calcite-combobox_3.entry.js +38 -25
  58. package/dist/esm/calcite-input-message_5.entry.js +271 -20
  59. package/dist/esm/{csvUtils-edc0c2a8.js → csvUtils-eb231cfb.js} +5 -5
  60. package/dist/esm/layer-table.entry.js +3 -3
  61. package/dist/esm/loader.js +1 -1
  62. package/dist/esm/map-search.entry.js +46 -7
  63. package/dist/esm/{mapViewUtils-31d2c2bb.js → mapViewUtils-e5d8a1e1.js} +39 -25
  64. package/dist/esm/public-notification.entry.js +101 -18
  65. package/dist/esm/{publicNotificationStore-3e762eea.js → publicNotificationStore-8e9cb73b.js} +3 -1
  66. package/dist/esm/solutions-components.js +1 -1
  67. package/dist/{collection/demos/config-pdf-download.html → solutions-components/demos/buffer-tools.html} +13 -21
  68. package/dist/solutions-components/demos/index.html +0 -24
  69. package/dist/solutions-components/demos/map-draw-tools.html +17 -17
  70. package/dist/solutions-components/demos/map-layer-picker.html +2 -0
  71. package/dist/solutions-components/demos/map-search.html +16 -15
  72. package/dist/solutions-components/demos/map-select-tools.html +16 -24
  73. package/dist/solutions-components/demos/new-public-notification.html +46 -35
  74. package/dist/solutions-components/demos/pdf-download.html +8 -1
  75. package/dist/solutions-components/p-07593958.entry.js +6 -0
  76. package/dist/solutions-components/p-3fa9b3c8.js +36 -0
  77. package/dist/solutions-components/p-9b5a9117.entry.js +12 -0
  78. package/dist/solutions-components/{p-15cd8a97.js → p-9c1ebc90.js} +1 -1
  79. package/dist/solutions-components/{p-c76f8ff7.entry.js → p-a516c658.entry.js} +1 -1
  80. package/dist/solutions-components/{p-ad42039f.js → p-b668daf8.js} +2 -2
  81. package/dist/solutions-components/p-bfa95147.entry.js +17 -0
  82. package/dist/solutions-components/p-d09a168c.entry.js +6 -0
  83. package/dist/solutions-components/{p-fa6046a8.entry.js → p-fc9609e6.entry.js} +2 -2
  84. package/dist/solutions-components/solutions-components.esm.js +1 -1
  85. package/dist/solutions-components/utils/csvUtils.ts +6 -4
  86. package/dist/solutions-components/utils/interfaces.ts +65 -1
  87. package/dist/solutions-components/utils/mapViewUtils.ts +50 -27
  88. package/dist/solutions-components/utils/publicNotificationStore.ts +3 -1
  89. package/dist/solutions-components/utils/queryUtils.ts +2 -2
  90. package/dist/types/components/buffer-tools/buffer-tools.d.ts +4 -3
  91. package/dist/types/components/map-layer-picker/map-layer-picker.d.ts +22 -11
  92. package/dist/types/components/map-search/map-search.d.ts +18 -1
  93. package/dist/types/components/map-select-tools/map-select-tools.d.ts +31 -1
  94. package/dist/types/components/pdf-download/pdf-download.d.ts +7 -2
  95. package/dist/types/components/public-notification/public-notification.d.ts +98 -4
  96. package/dist/types/components/refine-selection/refine-selection.d.ts +5 -0
  97. package/dist/types/components/refine-selection-tools/refine-selection-tools.d.ts +6 -1
  98. package/dist/types/components.d.ts +154 -180
  99. package/dist/types/preact.d.ts +0 -10
  100. package/dist/types/utils/csvUtils.d.ts +1 -1
  101. package/dist/types/utils/interfaces.d.ts +56 -1
  102. package/dist/types/utils/mapViewUtils.d.ts +19 -9
  103. package/dist/types/utils/publicNotificationStore.d.ts +1 -0
  104. package/package.json +1 -1
  105. package/dist/cjs/check-list.cjs.entry.js +0 -103
  106. package/dist/cjs/config-buffer-tools.cjs.entry.js +0 -125
  107. package/dist/cjs/config-draw-tools.cjs.entry.js +0 -85
  108. package/dist/cjs/config-layer-picker.cjs.entry.js +0 -113
  109. package/dist/cjs/config-pdf-download.cjs.entry.js +0 -117
  110. package/dist/cjs/labelFormats-3236d2e0.js +0 -212
  111. package/dist/collection/components/check-list/check-list.css +0 -3
  112. package/dist/collection/components/check-list/check-list.js +0 -179
  113. package/dist/collection/components/config-buffer-tools/config-buffer-tools.css +0 -34
  114. package/dist/collection/components/config-buffer-tools/config-buffer-tools.js +0 -209
  115. package/dist/collection/components/config-draw-tools/config-draw-tools.css +0 -17
  116. package/dist/collection/components/config-draw-tools/config-draw-tools.js +0 -150
  117. package/dist/collection/components/config-layer-picker/config-layer-picker.css +0 -17
  118. package/dist/collection/components/config-layer-picker/config-layer-picker.js +0 -218
  119. package/dist/collection/components/config-pdf-download/config-pdf-download.css +0 -17
  120. package/dist/collection/components/config-pdf-download/config-pdf-download.js +0 -183
  121. package/dist/collection/demos/check-list.html +0 -65
  122. package/dist/collection/demos/config-buffer-tools.html +0 -92
  123. package/dist/collection/demos/config-draw-tools.html +0 -58
  124. package/dist/collection/demos/config-layer-picker.html +0 -97
  125. package/dist/components/check-list.d.ts +0 -11
  126. package/dist/components/check-list.js +0 -11
  127. package/dist/components/check-list2.js +0 -131
  128. package/dist/components/config-buffer-tools.d.ts +0 -11
  129. package/dist/components/config-buffer-tools.js +0 -187
  130. package/dist/components/config-draw-tools.d.ts +0 -11
  131. package/dist/components/config-draw-tools.js +0 -121
  132. package/dist/components/config-layer-picker.d.ts +0 -11
  133. package/dist/components/config-layer-picker.js +0 -163
  134. package/dist/components/config-pdf-download.d.ts +0 -11
  135. package/dist/components/config-pdf-download.js +0 -154
  136. package/dist/components/labelFormats.js +0 -210
  137. package/dist/components/mapViewUtils.js +0 -129
  138. package/dist/esm/check-list.entry.js +0 -99
  139. package/dist/esm/config-buffer-tools.entry.js +0 -121
  140. package/dist/esm/config-draw-tools.entry.js +0 -81
  141. package/dist/esm/config-layer-picker.entry.js +0 -109
  142. package/dist/esm/config-pdf-download.entry.js +0 -113
  143. package/dist/esm/labelFormats-b37958c3.js +0 -210
  144. package/dist/solutions-components/demos/check-list.html +0 -65
  145. package/dist/solutions-components/demos/config-buffer-tools.html +0 -92
  146. package/dist/solutions-components/demos/config-draw-tools.html +0 -58
  147. package/dist/solutions-components/demos/config-layer-picker.html +0 -97
  148. package/dist/solutions-components/p-16a0e65a.entry.js +0 -6
  149. package/dist/solutions-components/p-35078393.entry.js +0 -17
  150. package/dist/solutions-components/p-3d72bba6.entry.js +0 -6
  151. package/dist/solutions-components/p-3e444242.entry.js +0 -6
  152. package/dist/solutions-components/p-67afea92.entry.js +0 -12
  153. package/dist/solutions-components/p-7dcab29d.js +0 -36
  154. package/dist/solutions-components/p-89f7b02a.entry.js +0 -6
  155. package/dist/solutions-components/p-906b7b96.entry.js +0 -6
  156. package/dist/solutions-components/p-99c98510.entry.js +0 -6
  157. package/dist/solutions-components/p-b1a3605f.entry.js +0 -6
  158. package/dist/solutions-components/p-e99b1247.js +0 -6
  159. package/dist/types/components/check-list/check-list.d.ts +0 -57
  160. package/dist/types/components/config-buffer-tools/config-buffer-tools.d.ts +0 -92
  161. package/dist/types/components/config-draw-tools/config-draw-tools.d.ts +0 -58
  162. package/dist/types/components/config-layer-picker/config-layer-picker.d.ts +0 -83
  163. package/dist/types/components/config-pdf-download/config-pdf-download.d.ts +0 -81
@@ -25,5 +25,8 @@
25
25
  "selectSketchTip": "Draw shapes to select features from the addressee layer",
26
26
  "optionalSearchDistance": "and optionally add search distance.",
27
27
  "listHasSetsTip": "For existing notification lists optionally edit or remove each list. Also, refine across all selection sets or export to PDF or CSV.",
28
- "uniqueCout": "Unique Count: {{n}}"
28
+ "uniqueCout": "Unique Count: {{n}}",
29
+ "shouldProceed": "Would you like to proceed?",
30
+ "proceed": "Proceed",
31
+ "proceedInfo": "Notification lists will be updated based on the existing search or sketch geometries."
29
32
  }
@@ -25,5 +25,8 @@
25
25
  "selectSketchTip": "Draw shapes to select features from the addressee layer",
26
26
  "optionalSearchDistance": "and optionally add search distance.",
27
27
  "listHasSetsTip": "For existing notification lists optionally edit or remove each list. Also, refine across all selection sets or export to PDF or CSV.",
28
- "uniqueCout": "Unique Count: {{n}}"
28
+ "uniqueCout": "Unique Count: {{n}}",
29
+ "shouldProceed": "Would you like to proceed?",
30
+ "proceed": "Proceed",
31
+ "proceedInfo": "Notification lists will be updated based on the existing search or sketch geometries."
29
32
  }
@@ -18,9 +18,9 @@ const guid = require('./guid-84ac4d91.js');
18
18
  const math = require('./math-460fffaf.js');
19
19
  const key = require('./key-55aca5c0.js');
20
20
  const locale$1 = require('./locale-73cab8e8.js');
21
- const publicNotificationStore = require('./publicNotificationStore-aca88430.js');
21
+ const publicNotificationStore = require('./publicNotificationStore-28a8759d.js');
22
22
  const interfaces = require('./interfaces-772edf61.js');
23
- const mapViewUtils = require('./mapViewUtils-8ea9adc5.js');
23
+ const mapViewUtils = require('./mapViewUtils-55ac76cb.js');
24
24
  require('./_commonjsHelpers-6aafa5de.js');
25
25
  require('./resources-b56bce71.js');
26
26
  require('./observers-5311faf8.js');
@@ -1495,7 +1495,7 @@ const RefineSelectionTools = class {
1495
1495
  this.refineSelectionGraphicsChange = index.createEvent(this, "refineSelectionGraphicsChange", 7);
1496
1496
  this.refineSelectionIdsChange = index.createEvent(this, "refineSelectionIdsChange", 7);
1497
1497
  /**
1498
- * {<layer title>: Graphic[]}: Collection of graphics returned from queries to the layer
1498
+ * {<layer id>: Graphic[]}: Collection of graphics returned from queries to the layer
1499
1499
  */
1500
1500
  this._featuresCollection = {};
1501
1501
  /**
@@ -1508,6 +1508,7 @@ const RefineSelectionTools = class {
1508
1508
  this._undoStack = [];
1509
1509
  this.active = false;
1510
1510
  this.border = false;
1511
+ this.enabledLayerIds = [];
1511
1512
  this.graphics = undefined;
1512
1513
  this.ids = [];
1513
1514
  this.layerView = undefined;
@@ -1597,7 +1598,7 @@ const RefineSelectionTools = class {
1597
1598
  render() {
1598
1599
  const showLayerPickerClass = this.useLayerPicker ? "div-visible" : "div-not-visible";
1599
1600
  const drawClass = this.border ? " border" : "";
1600
- return (index.h(index.Host, null, index.h("div", null, index.h("map-layer-picker", { class: showLayerPickerClass, mapView: this.mapView, onLayerSelectionChange: (evt) => { void this._layerSelectionChange(evt); }, selectedLayers: this.layerViews.map(l => l.layer.title), selectionMode: "single" }), index.h("div", { class: "margin-top-1" + drawClass }, index.h("div", { class: "esri-sketch esri-widget" }, index.h("div", { class: "esri-sketch__panel" }, index.h("div", { class: "esri-sketch__tool-section esri-sketch__section" }, index.h("calcite-action", { disabled: !this._selectEnabled, icon: "select", onClick: () => this._setSelectionMode(interfaces.ESelectionType.POINT), scale: "s", text: this._translations.select })), index.h("div", { class: "esri-sketch__tool-section esri-sketch__section" }, index.h("calcite-action", { disabled: !this._selectEnabled, icon: "line", onClick: () => this._setSelectionMode(interfaces.ESelectionType.LINE), scale: "s", text: this._translations.selectLine }), index.h("calcite-action", { disabled: !this._selectEnabled, icon: "polygon", onClick: () => this._setSelectionMode(interfaces.ESelectionType.POLY), scale: "s", text: this._translations.selectPolygon }), index.h("calcite-action", { disabled: !this._selectEnabled, icon: "rectangle", onClick: () => this._setSelectionMode(interfaces.ESelectionType.RECT), scale: "s", text: this._translations.selectRectangle })), index.h("div", { class: "esri-sketch__tool-section esri-sketch__section" }, index.h("calcite-action", { disabled: this._undoStack.length === 0, icon: "undo", onClick: () => this._undo(), scale: "s", text: this._translations.undo }), index.h("calcite-action", { disabled: this._redoStack.length === 0, icon: "redo", onClick: () => this._redo(), scale: "s", text: this._translations.redo }))))))));
1601
+ return (index.h(index.Host, null, index.h("div", null, index.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" }), index.h("div", { class: "margin-top-1" + drawClass }, index.h("div", { class: "esri-sketch esri-widget" }, index.h("div", { class: "esri-sketch__panel" }, index.h("div", { class: "esri-sketch__tool-section esri-sketch__section" }, index.h("calcite-action", { disabled: !this._selectEnabled, icon: "select", onClick: () => this._setSelectionMode(interfaces.ESelectionType.POINT), scale: "s", text: this._translations.select })), index.h("div", { class: "esri-sketch__tool-section esri-sketch__section" }, index.h("calcite-action", { disabled: !this._selectEnabled, icon: "line", onClick: () => this._setSelectionMode(interfaces.ESelectionType.LINE), scale: "s", text: this._translations.selectLine }), index.h("calcite-action", { disabled: !this._selectEnabled, icon: "polygon", onClick: () => this._setSelectionMode(interfaces.ESelectionType.POLY), scale: "s", text: this._translations.selectPolygon }), index.h("calcite-action", { disabled: !this._selectEnabled, icon: "rectangle", onClick: () => this._setSelectionMode(interfaces.ESelectionType.RECT), scale: "s", text: this._translations.selectRectangle })), index.h("div", { class: "esri-sketch__tool-section esri-sketch__section" }, index.h("calcite-action", { disabled: this._undoStack.length === 0, icon: "undo", onClick: () => this._undo(), scale: "s", text: this._translations.undo }), index.h("calcite-action", { disabled: this._redoStack.length === 0, icon: "redo", onClick: () => this._redo(), scale: "s", text: this._translations.redo }))))))));
1601
1602
  }
1602
1603
  //--------------------------------------------------------------------------
1603
1604
  //
@@ -1724,8 +1725,8 @@ const RefineSelectionTools = class {
1724
1725
  async _layerSelectionChange(evt) {
1725
1726
  if (Array.isArray(evt.detail) && evt.detail.length > 0) {
1726
1727
  this._selectEnabled = true;
1727
- const layerPromises = evt.detail.map(title => {
1728
- return mapViewUtils.getMapLayerView(this.mapView, title);
1728
+ const layerPromises = evt.detail.map(id => {
1729
+ return mapViewUtils.getMapLayerView(this.mapView, id);
1729
1730
  });
1730
1731
  return Promise.all(layerPromises).then((layerViews) => {
1731
1732
  this.layerViews = layerViews;
@@ -1772,7 +1773,7 @@ const RefineSelectionTools = class {
1772
1773
  */
1773
1774
  async _selectFeatures(geom) {
1774
1775
  const queryFeaturePromises = this.layerViews.map(layerView => {
1775
- this._featuresCollection[layerView.layer.title] = [];
1776
+ this._featuresCollection[layerView.layer.id] = [];
1776
1777
  return mapViewUtils.queryFeaturesByGeometry(0, layerView.layer, geom, this._featuresCollection);
1777
1778
  });
1778
1779
  return Promise.all(queryFeaturePromises).then(async (response) => {
@@ -20,8 +20,8 @@ const dom = require('./dom-4a580af6.js');
20
20
  const openCloseComponent = require('./openCloseComponent-bf986132.js');
21
21
  const debounce = require('./debounce-69c3bada.js');
22
22
  const conditionalSlot = require('./conditionalSlot-d8471163.js');
23
- const mapViewUtils = require('./mapViewUtils-8ea9adc5.js');
24
- const publicNotificationStore = require('./publicNotificationStore-aca88430.js');
23
+ const mapViewUtils = require('./mapViewUtils-55ac76cb.js');
24
+ const publicNotificationStore = require('./publicNotificationStore-28a8759d.js');
25
25
  require('./resources-b56bce71.js');
26
26
  require('./interfaces-772edf61.js');
27
27
  require('./index-a2ef93bb.js');
@@ -1004,10 +1004,11 @@ const MapLayerPicker = class {
1004
1004
  constructor(hostRef) {
1005
1005
  index.registerInstance(this, hostRef);
1006
1006
  this.layerSelectionChange = index.createEvent(this, "layerSelectionChange", 7);
1007
- this.layerNames = [];
1007
+ this.enabledLayerIds = [];
1008
1008
  this.mapView = undefined;
1009
- this.selectedLayers = [];
1009
+ this.selectedLayerIds = [];
1010
1010
  this.selectionMode = "single";
1011
+ this.layerIds = [];
1011
1012
  }
1012
1013
  //--------------------------------------------------------------------------
1013
1014
  //
@@ -1022,7 +1023,7 @@ const MapLayerPicker = class {
1022
1023
  if (newValue !== oldValue) {
1023
1024
  await this._setLayers();
1024
1025
  if (this.selectionMode === "single") {
1025
- this.layerSelectionChange.emit([this.layerNames[0]]);
1026
+ this.layerSelectionChange.emit([this.layerIds[0]]);
1026
1027
  }
1027
1028
  }
1028
1029
  }
@@ -1036,8 +1037,8 @@ const MapLayerPicker = class {
1036
1037
  */
1037
1038
  async componentWillLoad() {
1038
1039
  await this._setLayers();
1039
- if (this.selectionMode === "single" && (this.layerNames.length > 0 || this.selectedLayers.length === 1)) {
1040
- this.layerSelectionChange.emit(this.selectedLayers.length === 1 ? [this.selectedLayers[0]] : [this.layerNames[0]]);
1040
+ if (this.selectionMode === "single" && (this.layerIds.length > 0 || this.selectedLayerIds.length === 1)) {
1041
+ this.layerSelectionChange.emit(this.selectedLayerIds.length === 1 ? [this.selectedLayerIds[0]] : [this.layerIds[0]]);
1041
1042
  }
1042
1043
  }
1043
1044
  /**
@@ -1056,62 +1057,74 @@ const MapLayerPicker = class {
1056
1057
  *
1057
1058
  * Used for selecting a single layer.
1058
1059
  *
1059
- * @returns Calcite Select component with the names of the layers from the map
1060
+ * @returns Calcite Select component with the ids of the layers from the map
1060
1061
  */
1061
1062
  _getSelect() {
1062
1063
  return (index.h("calcite-select", { label: "", onCalciteSelectChange: (evt) => this._layerSelectionChange(evt), ref: (el) => { this._layerElement = el; } }, this._addMapLayersOptions()));
1063
1064
  }
1064
1065
  /**
1065
- * Create a list of layers from the map
1066
+ * Create a list of layer ids from the map
1066
1067
  *
1067
1068
  * Used for selecting multiple layers
1068
1069
  *
1069
- * @returns Calcite ComboBox component with the names of the layers from the map
1070
+ * @returns Calcite ComboBox component with the ids of the layers from the map
1070
1071
  */
1071
1072
  _getCombobox() {
1072
1073
  return (index.h("calcite-combobox", { label: "", onCalciteComboboxChange: (evt) => this._layerSelectionChange(evt), "selection-mode": this.selectionMode }, this._addMapLayersOptions()));
1073
1074
  }
1074
1075
  /**
1075
- * Hydrate a select or combobox component with the names of the layers in the map
1076
+ * Hydrate a select or combobox component with the ids of the layers in the map
1076
1077
  *
1077
- * @returns Array of ComboBox items or Select options for the names of the layers
1078
+ * @returns Array of ComboBox items or Select options for the ids of the layers
1078
1079
  */
1079
1080
  _addMapLayersOptions() {
1080
- return this.layerNames.reduce((prev, cur) => {
1081
- if (publicNotificationStore.state.managedLayers.indexOf(cur) < 0) {
1082
- prev.push(this.selectionMode === "multi" && this.selectedLayers.indexOf(cur) > -1 ?
1083
- (index.h("calcite-combobox-item", { selected: true, textLabel: cur, value: cur })) :
1081
+ return this.layerIds.reduce((prev, cur) => {
1082
+ if (publicNotificationStore.state.managedLayers.indexOf(publicNotificationStore.state.layerNameHash[cur]) < 0 && (this.enabledLayerIds.length > 0 ? this.enabledLayerIds.indexOf(cur) > -1 : true)) {
1083
+ prev.push(this.selectionMode === "multi" && this.selectedLayerIds.indexOf(cur) > -1 ?
1084
+ (index.h("calcite-combobox-item", { selected: true, textLabel: publicNotificationStore.state.layerNameHash[cur], value: cur })) :
1084
1085
  this.selectionMode === "multi" ?
1085
- (index.h("calcite-combobox-item", { textLabel: cur, value: cur })) :
1086
- this.selectedLayers.indexOf(cur) > -1 ?
1087
- (index.h("calcite-option", { label: cur, selected: true, value: cur })) :
1088
- (index.h("calcite-option", { label: cur, value: cur })));
1086
+ (index.h("calcite-combobox-item", { textLabel: publicNotificationStore.state.layerNameHash[cur], value: cur })) :
1087
+ this.selectedLayerIds.indexOf(cur) > -1 ?
1088
+ (index.h("calcite-option", { label: publicNotificationStore.state.layerNameHash[cur], selected: true, value: cur })) :
1089
+ (index.h("calcite-option", { label: publicNotificationStore.state.layerNameHash[cur], value: cur })));
1089
1090
  }
1090
1091
  return prev;
1091
1092
  }, []);
1092
1093
  }
1093
1094
  /**
1094
- * Fetch the names of the layers from the map
1095
+ * Fetch the ids of the layers from the map
1095
1096
  *
1096
1097
  * @returns Promise when the operation has completed
1097
1098
  */
1098
1099
  async _setLayers() {
1099
1100
  if (this.mapView) {
1100
- this.layerNames = await mapViewUtils.getMapLayerNames(this.mapView);
1101
+ const mapLayerIds = await mapViewUtils.getMapLayerIds(this.mapView);
1102
+ this.layerIds = mapLayerIds.filter(n => { var _a; return ((_a = this.enabledLayerIds) === null || _a === void 0 ? void 0 : _a.length) > 0 ? this.enabledLayerIds.indexOf(n) > -1 : true; });
1103
+ await this._initLayerHashState();
1104
+ }
1105
+ }
1106
+ /**
1107
+ * Create a layer id:title hash for layer name display
1108
+ *
1109
+ * @returns Promise when the operation has completed
1110
+ */
1111
+ async _initLayerHashState() {
1112
+ if (this.mapView) {
1113
+ publicNotificationStore.state.layerNameHash = await mapViewUtils.getMapLayerHash(this.mapView);
1101
1114
  }
1102
1115
  }
1103
1116
  /**
1104
- * Fetch the names of the layers from the map
1117
+ * Fetch the ids of the layers from the map
1105
1118
  *
1106
1119
  * @returns Promise when the operation has completed
1107
1120
  */
1108
1121
  _layerSelectionChange(evt) {
1109
1122
  var _a;
1110
- this.selectedLayers = this.selectionMode === "single" ?
1123
+ this.selectedLayerIds = this.selectionMode === "single" ?
1111
1124
  [this._layerElement.value] : ((_a = evt.detail) === null || _a === void 0 ? void 0 : _a.selectedItems.map((item) => {
1112
1125
  return item.value;
1113
1126
  })) || [];
1114
- this.layerSelectionChange.emit(this.selectedLayers);
1127
+ this.layerSelectionChange.emit(this.selectedLayerIds);
1115
1128
  }
1116
1129
  get el() { return index.getElement(this); }
1117
1130
  static get watchers() { return {
@@ -12,12 +12,11 @@ const dom = require('./dom-4a580af6.js');
12
12
  const interfaces = require('./interfaces-e76f31e9.js');
13
13
  const conditionalSlot = require('./conditionalSlot-d8471163.js');
14
14
  const loadModules = require('./loadModules-e9007588.js');
15
- const mapViewUtils = require('./mapViewUtils-8ea9adc5.js');
15
+ const mapViewUtils = require('./mapViewUtils-55ac76cb.js');
16
16
  const interfaces$1 = require('./interfaces-772edf61.js');
17
- const publicNotificationStore = require('./publicNotificationStore-aca88430.js');
17
+ const publicNotificationStore = require('./publicNotificationStore-28a8759d.js');
18
18
  const locale = require('./locale-d15229c4.js');
19
- const labelFormats = require('./labelFormats-3236d2e0.js');
20
- const csvUtils = require('./csvUtils-18a03353.js');
19
+ const csvUtils = require('./csvUtils-83af7ae1.js');
21
20
  const publicNotificationUtils = require('./publicNotificationUtils-9d585d8d.js');
22
21
  require('./resources-b56bce71.js');
23
22
  require('./guid-84ac4d91.js');
@@ -253,9 +252,13 @@ const MapSelectTools = class {
253
252
  * string: A label to help uniquely identify the selection set
254
253
  */
255
254
  this._selectionLabel = "";
255
+ this.enabledLayerIds = [];
256
+ this.defaultBufferDistance = undefined;
257
+ this.defaultBufferUnit = undefined;
256
258
  this.geometries = undefined;
257
259
  this.isUpdate = false;
258
260
  this.mapView = undefined;
261
+ this.searchConfiguration = undefined;
259
262
  this.selectionSet = undefined;
260
263
  this.selectLayerView = undefined;
261
264
  this.showBufferTools = true;
@@ -381,7 +384,7 @@ const MapSelectTools = class {
381
384
  const useSelectClass = this._layerSelectChecked && !searchEnabled ? " div-visible" : " div-not-visible";
382
385
  const useDrawClass = !this._layerSelectChecked && !searchEnabled ? " div-visible" : " div-not-visible";
383
386
  const showLayerChoiceClass = searchEnabled ? "div-not-visible" : "div-visible";
384
- return (index.h(index.Host, null, index.h("div", { class: "padding-bottom-1" }, index.h("calcite-radio-group", { class: "w-100", onCalciteRadioGroupChange: (evt) => this._workflowChange(evt) }, index.h("calcite-radio-group-item", { checked: searchEnabled, class: "w-50 end-border", value: interfaces$1.EWorkflowType.SEARCH }, this._translations.search), index.h("calcite-radio-group-item", { checked: drawEnabled, class: "w-50", value: interfaces$1.EWorkflowType.SKETCH }, this._translations.sketch))), index.h("div", { class: showSearchClass }, index.h("div", { class: "search-widget", ref: (el) => { this._searchElement = el; } })), index.h("div", { class: showLayerChoiceClass }, index.h("calcite-label", { layout: "inline" }, index.h("calcite-checkbox", { onCalciteCheckboxChange: () => this._layerSelectChanged(), ref: (el) => this._selectFromLayerElement = el }), "Use layer features")), index.h("div", { class: useDrawClass }, index.h("map-draw-tools", { active: true, border: true, mapView: this.mapView, ref: (el) => { this._drawTools = el; } })), index.h("div", { class: useSelectClass }, index.h("refine-selection-tools", { active: true, border: true, layerViews: this._refineSelectLayers, mapView: this.mapView, mode: interfaces$1.ESelectionMode.ADD, ref: (el) => { this._refineTools = el; }, refineMode: interfaces$1.ERefineMode.SUBSET })), index.h("calcite-label", { class: showBufferToolsClass }, this._translations.searchDistance, index.h("buffer-tools", { distance: (_a = this.selectionSet) === null || _a === void 0 ? void 0 : _a.distance, geometries: this.geometries, onBufferComplete: (evt) => this._bufferComplete(evt), ref: (el) => this._bufferTools = el, unit: (_b = this.selectionSet) === null || _b === void 0 ? void 0 : _b.unit })), index.h("slot", null)));
387
+ return (index.h(index.Host, null, index.h("div", { class: "padding-bottom-1" }, index.h("calcite-radio-group", { class: "w-100", onCalciteRadioGroupChange: (evt) => this._workflowChange(evt) }, index.h("calcite-radio-group-item", { checked: searchEnabled, class: "w-50 end-border", value: interfaces$1.EWorkflowType.SEARCH }, this._translations.search), index.h("calcite-radio-group-item", { checked: drawEnabled, class: "w-50", value: interfaces$1.EWorkflowType.SKETCH }, this._translations.sketch))), index.h("div", { class: showSearchClass }, index.h("div", { class: "search-widget", ref: (el) => { this._searchElement = el; } })), index.h("div", { class: showLayerChoiceClass }, index.h("calcite-label", { layout: "inline" }, index.h("calcite-checkbox", { onCalciteCheckboxChange: () => this._layerSelectChanged(), ref: (el) => this._selectFromLayerElement = el }), "Use layer features")), index.h("div", { class: useDrawClass }, index.h("map-draw-tools", { active: true, border: true, mapView: this.mapView, ref: (el) => { this._drawTools = el; } })), index.h("div", { class: useSelectClass }, index.h("refine-selection-tools", { active: true, border: true, enabledLayerIds: this.enabledLayerIds, layerViews: this._refineSelectLayers, mapView: this.mapView, mode: interfaces$1.ESelectionMode.ADD, ref: (el) => { this._refineTools = el; }, refineMode: interfaces$1.ERefineMode.SUBSET })), index.h("calcite-label", { class: showBufferToolsClass }, this._translations.searchDistance, index.h("buffer-tools", { distance: ((_a = this.selectionSet) === null || _a === void 0 ? void 0 : _a.distance) || this.defaultBufferDistance, geometries: this.geometries, onBufferComplete: (evt) => this._bufferComplete(evt), ref: (el) => this._bufferTools = el, unit: ((_b = this.selectionSet) === null || _b === void 0 ? void 0 : _b.unit) || this.defaultBufferUnit })), index.h("slot", null)));
385
388
  }
386
389
  //--------------------------------------------------------------------------
387
390
  //
@@ -396,16 +399,18 @@ const MapSelectTools = class {
396
399
  * @protected
397
400
  */
398
401
  async _initModules() {
399
- const [GraphicsLayer, Graphic, Search, geometryEngine] = await loadModules.loadModules([
402
+ const [GraphicsLayer, Graphic, Search, geometryEngine, FeatureLayer] = await loadModules.loadModules([
400
403
  "esri/layers/GraphicsLayer",
401
404
  "esri/Graphic",
402
405
  "esri/widgets/Search",
403
- "esri/geometry/geometryEngine"
406
+ "esri/geometry/geometryEngine",
407
+ "esri/layers/FeatureLayer"
404
408
  ]);
405
409
  this.GraphicsLayer = GraphicsLayer;
406
410
  this.Graphic = Graphic;
407
411
  this.Search = Search;
408
412
  this._geometryEngine = geometryEngine;
413
+ this.FeatureLayer = FeatureLayer;
409
414
  }
410
415
  /**
411
416
  * Initialize the graphics layer, selection set, and search widget
@@ -449,11 +454,8 @@ const MapSelectTools = class {
449
454
  */
450
455
  _initSearchWidget() {
451
456
  if (this.mapView && this._searchElement) {
452
- const searchOptions = {
453
- view: this.mapView,
454
- container: this._searchElement,
455
- searchTerm: this._searchTerm
456
- };
457
+ const searchConfiguration = this._getSearchConfig(this.searchConfiguration, this.mapView);
458
+ const searchOptions = Object.assign({ view: this.mapView, container: this._searchElement, searchTerm: this._searchTerm }, searchConfiguration);
457
459
  this._searchWidget = new this.Search(searchOptions);
458
460
  this._searchWidget.on("search-clear", () => {
459
461
  void this._clearResults(false);
@@ -468,6 +470,45 @@ const MapSelectTools = class {
468
470
  });
469
471
  }
470
472
  }
473
+ /**
474
+ * Initialize the search widget based on user defined configuration
475
+ *
476
+ * @param searchConfiguration search configuration defined by the user
477
+ * @param view the current map view
478
+ *
479
+ * @protected
480
+ */
481
+ _getSearchConfig(searchConfiguration, view) {
482
+ var _a;
483
+ const sources = searchConfiguration === null || searchConfiguration === void 0 ? void 0 : searchConfiguration.sources;
484
+ if (sources) {
485
+ sources.forEach(source => {
486
+ var _a, _b, _c;
487
+ const isLayerSource = source.hasOwnProperty("layer");
488
+ if (isLayerSource) {
489
+ const layerSource = source;
490
+ const layerFromMap = ((_a = layerSource.layer) === null || _a === void 0 ? void 0 : _a.id)
491
+ ? view.map.findLayerById(layerSource.layer.id)
492
+ : null;
493
+ if (layerFromMap) {
494
+ layerSource.layer = layerFromMap;
495
+ }
496
+ else if ((_b = layerSource === null || layerSource === void 0 ? void 0 : layerSource.layer) === null || _b === void 0 ? void 0 : _b.url) {
497
+ layerSource.layer = new this.FeatureLayer((_c = layerSource === null || layerSource === void 0 ? void 0 : layerSource.layer) === null || _c === void 0 ? void 0 : _c.url);
498
+ }
499
+ }
500
+ });
501
+ }
502
+ (_a = searchConfiguration === null || searchConfiguration === void 0 ? void 0 : searchConfiguration.sources) === null || _a === void 0 ? void 0 : _a.forEach(source => {
503
+ const isLocatorSource = source.hasOwnProperty("locator");
504
+ if (isLocatorSource) {
505
+ const locatorSource = source;
506
+ locatorSource.url = locatorSource.url;
507
+ delete locatorSource.url;
508
+ }
509
+ });
510
+ return searchConfiguration;
511
+ }
471
512
  /**
472
513
  * Initialize the graphics layer used to store any buffer grapghics
473
514
  *
@@ -651,12 +692,217 @@ const MapSelectTools = class {
651
692
  };
652
693
  MapSelectTools.style = mapSelectToolsCss;
653
694
 
695
+ const labelFormats = [
696
+ {
697
+ descriptionPDF: {
698
+ labelWidthDisplay: "2-5/8",
699
+ labelHeightDisplay: "1",
700
+ labelsPerPageDisplay: "30",
701
+ averyPartNumber: "*60"
702
+ },
703
+ labelSpec: {
704
+ type: "AVERY",
705
+ pageDimensions: {
706
+ width: 8.5,
707
+ height: 11,
708
+ leftMargin: 0.1875,
709
+ rightMargin: 0.1875,
710
+ topMargin: 0.5,
711
+ bottomMargin: 0.5
712
+ },
713
+ numLabelsAcross: 3,
714
+ numLabelsDown: 10,
715
+ labelWidth: 2.625,
716
+ labelHeight: 1,
717
+ horizGapIn: 0.125,
718
+ vertGapIn: 0,
719
+ labelPadding: 0.1,
720
+ fontSizePx: 11,
721
+ maxNumLabelLines: 4
722
+ }
723
+ },
724
+ {
725
+ descriptionPDF: {
726
+ labelWidthDisplay: "4",
727
+ labelHeightDisplay: "1",
728
+ labelsPerPageDisplay: "20",
729
+ averyPartNumber: "*61"
730
+ },
731
+ labelSpec: {
732
+ type: "AVERY",
733
+ pageDimensions: {
734
+ width: 8.5,
735
+ height: 11,
736
+ leftMargin: 0.15625,
737
+ rightMargin: 0.15625,
738
+ topMargin: 0.47637821,
739
+ bottomMargin: 0.5
740
+ },
741
+ numLabelsAcross: 2,
742
+ numLabelsDown: 10,
743
+ labelWidth: 4,
744
+ labelHeight: 1.0025,
745
+ horizGapIn: 0.1875,
746
+ vertGapIn: 0,
747
+ labelPadding: 0.1,
748
+ fontSizePx: 11,
749
+ maxNumLabelLines: 4
750
+ }
751
+ },
752
+ {
753
+ descriptionPDF: {
754
+ labelWidthDisplay: "4",
755
+ labelHeightDisplay: "1-1/3",
756
+ labelsPerPageDisplay: "14",
757
+ averyPartNumber: "*62"
758
+ },
759
+ labelSpec: {
760
+ type: "AVERY",
761
+ pageDimensions: {
762
+ width: 8.5,
763
+ height: 11,
764
+ leftMargin: 0.15625,
765
+ rightMargin: 0.15625,
766
+ topMargin: 0.81889808,
767
+ bottomMargin: 0.83464612
768
+ },
769
+ numLabelsAcross: 2,
770
+ numLabelsDown: 7,
771
+ labelWidth: 4,
772
+ labelHeight: 1.3352,
773
+ horizGapIn: 0.1875,
774
+ vertGapIn: 0,
775
+ labelPadding: 0.1,
776
+ fontSizePx: 11,
777
+ maxNumLabelLines: 6
778
+ }
779
+ },
780
+ {
781
+ descriptionPDF: {
782
+ labelWidthDisplay: "4",
783
+ labelHeightDisplay: "2",
784
+ labelsPerPageDisplay: "10",
785
+ averyPartNumber: "*63"
786
+ },
787
+ labelSpec: {
788
+ type: "AVERY",
789
+ pageDimensions: {
790
+ width: 8.5,
791
+ height: 11,
792
+ leftMargin: 0.15625,
793
+ rightMargin: 0.15625,
794
+ topMargin: 0.5,
795
+ bottomMargin: 0.5
796
+ },
797
+ numLabelsAcross: 2,
798
+ numLabelsDown: 5,
799
+ labelWidth: 4,
800
+ labelHeight: 2,
801
+ horizGapIn: 0.1875,
802
+ vertGapIn: 0,
803
+ labelPadding: 0.1,
804
+ fontSizePx: 12,
805
+ maxNumLabelLines: 10
806
+ }
807
+ },
808
+ {
809
+ descriptionPDF: {
810
+ labelWidthDisplay: "4",
811
+ labelHeightDisplay: "3-1/3",
812
+ labelsPerPageDisplay: "6",
813
+ averyPartNumber: "*64"
814
+ },
815
+ labelSpec: {
816
+ type: "AVERY",
817
+ pageDimensions: {
818
+ width: 8.5,
819
+ height: 11,
820
+ leftMargin: 0.15625,
821
+ rightMargin: 0.15625,
822
+ topMargin: 0.4724412,
823
+ bottomMargin: 0.50000027
824
+ },
825
+ numLabelsAcross: 2,
826
+ numLabelsDown: 3,
827
+ labelWidth: 4,
828
+ labelHeight: 3.342,
829
+ horizGapIn: 0.1875,
830
+ vertGapIn: 0,
831
+ labelPadding: 0.1,
832
+ fontSizePx: 14,
833
+ maxNumLabelLines: 12
834
+ }
835
+ },
836
+ {
837
+ descriptionPDF: {
838
+ labelWidthDisplay: "1-3/4",
839
+ labelHeightDisplay: "1/2",
840
+ labelsPerPageDisplay: "80",
841
+ averyPartNumber: "*67"
842
+ },
843
+ labelSpec: {
844
+ type: "AVERY",
845
+ pageDimensions: {
846
+ width: 8.5,
847
+ height: 11,
848
+ leftMargin: 0.307086375,
849
+ rightMargin: 0.307086375,
850
+ topMargin: 0.4724412,
851
+ bottomMargin: 0.49606326
852
+ },
853
+ numLabelsAcross: 4,
854
+ numLabelsDown: 20,
855
+ labelWidth: 1.75,
856
+ labelHeight: 0.50155,
857
+ horizGapIn: 0.29527575,
858
+ vertGapIn: 0,
859
+ labelPadding: 0.1,
860
+ fontSizePx: 8,
861
+ maxNumLabelLines: 3
862
+ }
863
+ },
864
+ {
865
+ descriptionPDF: {
866
+ labelWidthDisplay: "1-3/4",
867
+ labelHeightDisplay: "2/3",
868
+ labelsPerPageDisplay: "60",
869
+ averyPartNumber: "*95"
870
+ },
871
+ labelSpec: {
872
+ type: "AVERY",
873
+ pageDimensions: {
874
+ width: 8.5,
875
+ height: 11,
876
+ leftMargin: 0.28936983,
877
+ rightMargin: 0.28936983,
878
+ topMargin: 0.53937037,
879
+ bottomMargin: 0.5511814
880
+ },
881
+ numLabelsAcross: 4,
882
+ numLabelsDown: 15,
883
+ labelWidth: 1.75,
884
+ labelHeight: 0.6605,
885
+ horizGapIn: 0.30708678,
886
+ vertGapIn: 0,
887
+ labelPadding: 0.1,
888
+ fontSizePx: 8,
889
+ maxNumLabelLines: 4
890
+ }
891
+ }
892
+ ];
893
+
894
+ const pdfUtils = /*#__PURE__*/Object.freeze({
895
+ __proto__: null,
896
+ 'default': labelFormats
897
+ });
898
+
654
899
  const pdfDownloadCss = ":host{display:block}";
655
900
 
656
901
  const PdfDownload = class {
657
902
  constructor(hostRef) {
658
903
  index.registerInstance(this, hostRef);
659
904
  this.disabled = true;
905
+ this.enabledSizeValues = [];
660
906
  this.layerView = undefined;
661
907
  this._translations = undefined;
662
908
  }
@@ -687,8 +933,8 @@ const PdfDownload = class {
687
933
  * @param removeDuplicates When true a single label is generated when multiple featues have a shared address value
688
934
  * @returns Promise resolving when function is done
689
935
  */
690
- async downloadCSV(ids, removeDuplicates) {
691
- return this._downloadCSV(ids, removeDuplicates);
936
+ async downloadCSV(ids, removeDuplicates, addColumnTitle) {
937
+ return this._downloadCSV(ids, removeDuplicates, addColumnTitle);
692
938
  }
693
939
  //--------------------------------------------------------------------------
694
940
  //
@@ -725,15 +971,19 @@ const PdfDownload = class {
725
971
  * @protected
726
972
  */
727
973
  _renderItems() {
728
- const s = labelFormats.pdfUtils;
974
+ const s = pdfUtils;
729
975
  const sortedPdfIndo = (s.default || s).sort((a, b) => {
730
976
  const _a = parseInt(a.descriptionPDF.labelsPerPageDisplay, 10);
731
977
  const _b = parseInt(b.descriptionPDF.labelsPerPageDisplay, 10);
732
978
  return _a < _b ? -1 : _a > _b ? 1 : 0;
733
979
  });
734
- return sortedPdfIndo.map((l) => {
735
- return (index.h("calcite-option", { value: l }, this._getLabelSizeText(l)));
736
- });
980
+ return sortedPdfIndo.reduce((prev, cur) => {
981
+ if (this.enabledSizeValues.length === 0 ||
982
+ this.enabledSizeValues.indexOf(parseInt(cur.descriptionPDF.labelsPerPageDisplay, 10)) > -1) {
983
+ prev.push((index.h("calcite-option", { value: cur }, this._getLabelSizeText(cur))));
984
+ }
985
+ return prev;
986
+ }, []);
737
987
  }
738
988
  /**
739
989
  * Downloads pdf of mailing labels for the provided list of ids
@@ -758,10 +1008,10 @@ const PdfDownload = class {
758
1008
  * @returns Promise that will resolve when the download is complete
759
1009
  * @protected
760
1010
  */
761
- async _downloadCSV(ids, removeDuplicates) {
1011
+ async _downloadCSV(ids, removeDuplicates, addColumnTitle) {
762
1012
  // TODO this will be leveraged when we do the real implementation of this
763
1013
  console.log(removeDuplicates);
764
- await csvUtils.exportCSV(this.layerView, ids);
1014
+ await csvUtils.exportCSV(this.layerView, ids, addColumnTitle);
765
1015
  }
766
1016
  /**
767
1017
  * Gets the formatted pdf export size text
@@ -805,6 +1055,7 @@ const RefineSelection = class {
805
1055
  */
806
1056
  this._addEnabled = true;
807
1057
  this.addresseeLayer = undefined;
1058
+ this.enabledLayerIds = [];
808
1059
  this.mapView = undefined;
809
1060
  this.selectionSets = [];
810
1061
  this.GraphicsLayer = undefined;
@@ -837,7 +1088,7 @@ const RefineSelection = class {
837
1088
  * Renders the component.
838
1089
  */
839
1090
  render() {
840
- return (index.h(index.Host, null, index.h("div", { class: "padding-1" }, index.h("div", null, index.h("calcite-radio-group", { class: "w-100", onCalciteRadioGroupChange: (evt) => this._modeChanged(evt) }, index.h("calcite-radio-group-item", { checked: this._addEnabled, class: "w-50", onClick: () => this._setSelectionMode(interfaces$1.ESelectionMode.ADD), value: interfaces$1.ESelectionMode.ADD }, this._translations.add), index.h("calcite-radio-group-item", { checked: !this._addEnabled, class: "w-50", onClick: () => this._setSelectionMode(interfaces$1.ESelectionMode.REMOVE), value: interfaces$1.ESelectionMode.REMOVE }, this._translations.remove)), index.h("refine-selection-tools", { border: true, ids: publicNotificationUtils.getSelectionIds(this.selectionSets), layerViews: [this.addresseeLayer], mapView: this.mapView, mode: this._addEnabled ? interfaces$1.ESelectionMode.ADD : interfaces$1.ESelectionMode.REMOVE, ref: (el) => { this._refineTools = el; }, useLayerPicker: false })), index.h("br", null), (index.h("calcite-list", { class: "list-border" }, this._getRefineSelectionSetList())))));
1091
+ return (index.h(index.Host, null, index.h("div", { class: "padding-1" }, index.h("div", null, index.h("calcite-radio-group", { class: "w-100", onCalciteRadioGroupChange: (evt) => this._modeChanged(evt) }, index.h("calcite-radio-group-item", { checked: this._addEnabled, class: "w-50", onClick: () => this._setSelectionMode(interfaces$1.ESelectionMode.ADD), value: interfaces$1.ESelectionMode.ADD }, this._translations.add), index.h("calcite-radio-group-item", { checked: !this._addEnabled, class: "w-50", onClick: () => this._setSelectionMode(interfaces$1.ESelectionMode.REMOVE), value: interfaces$1.ESelectionMode.REMOVE }, this._translations.remove)), index.h("refine-selection-tools", { border: true, enabledLayerIds: this.enabledLayerIds, ids: publicNotificationUtils.getSelectionIds(this.selectionSets), layerViews: [this.addresseeLayer], mapView: this.mapView, mode: this._addEnabled ? interfaces$1.ESelectionMode.ADD : interfaces$1.ESelectionMode.REMOVE, ref: (el) => { this._refineTools = el; }, useLayerPicker: false })), index.h("br", null), (index.h("calcite-list", { class: "list-border" }, this._getRefineSelectionSetList())))));
841
1092
  }
842
1093
  //--------------------------------------------------------------------------
843
1094
  //
@@ -5,7 +5,7 @@
5
5
  */
6
6
  'use strict';
7
7
 
8
- const mapViewUtils = require('./mapViewUtils-8ea9adc5.js');
8
+ const mapViewUtils = require('./mapViewUtils-55ac76cb.js');
9
9
 
10
10
  /** @license
11
11
  * Copyright 2022 Esri
@@ -30,7 +30,7 @@ const mapViewUtils = require('./mapViewUtils-8ea9adc5.js');
30
30
  *
31
31
  * @returns Promise when the function has completed
32
32
  */
33
- async function exportCSV(layerView, ids) {
33
+ async function exportCSV(layerView, ids, addColumnTitle) {
34
34
  const featureSet = await mapViewUtils.queryFeaturesByID(ids, layerView.layer);
35
35
  const attributes = featureSet.features.map(f => f.attributes);
36
36
  const fieldNames = {};
@@ -40,7 +40,7 @@ async function exportCSV(layerView, ids) {
40
40
  fieldNames[k] = k;
41
41
  }
42
42
  });
43
- _downloadCSVFile(fieldNames, attributes, `notify-${Date.now().toString()}`);
43
+ _downloadCSVFile(fieldNames, attributes, `notify-${Date.now().toString()}`, addColumnTitle);
44
44
  }
45
45
  /**
46
46
  * Download the CSV file
@@ -53,8 +53,8 @@ async function exportCSV(layerView, ids) {
53
53
  *
54
54
  * @returns void
55
55
  */
56
- function _downloadCSVFile(fieldNames, attributes, fileTitle) {
57
- if (fieldNames) {
56
+ function _downloadCSVFile(fieldNames, attributes, fileTitle, addColumnTitle) {
57
+ if (addColumnTitle && fieldNames) {
58
58
  attributes.unshift(fieldNames);
59
59
  }
60
60
  // format values to string so it doesn't get tripped up when a value has a comma