@esri/solutions-components 0.5.9 → 0.5.10

Sign up to get free protection for your applications and to get access to all the features.
Files changed (98) hide show
  1. package/dist/assets/t9n/public-notification/resources.json +1 -1
  2. package/dist/assets/t9n/public-notification/resources_ar.json +5 -4
  3. package/dist/assets/t9n/public-notification/resources_bg.json +5 -4
  4. package/dist/assets/t9n/public-notification/resources_bs.json +5 -4
  5. package/dist/assets/t9n/public-notification/resources_ca.json +5 -4
  6. package/dist/assets/t9n/public-notification/resources_cs.json +5 -4
  7. package/dist/assets/t9n/public-notification/resources_da.json +5 -4
  8. package/dist/assets/t9n/public-notification/resources_de.json +5 -4
  9. package/dist/assets/t9n/public-notification/resources_el.json +5 -4
  10. package/dist/assets/t9n/public-notification/resources_en.json +1 -1
  11. package/dist/assets/t9n/public-notification/resources_es.json +5 -4
  12. package/dist/assets/t9n/public-notification/resources_et.json +5 -4
  13. package/dist/assets/t9n/public-notification/resources_fi.json +5 -4
  14. package/dist/assets/t9n/public-notification/resources_fr.json +5 -4
  15. package/dist/assets/t9n/public-notification/resources_he.json +5 -4
  16. package/dist/assets/t9n/public-notification/resources_hr.json +5 -4
  17. package/dist/assets/t9n/public-notification/resources_hu.json +5 -4
  18. package/dist/assets/t9n/public-notification/resources_id.json +5 -4
  19. package/dist/assets/t9n/public-notification/resources_it.json +5 -4
  20. package/dist/assets/t9n/public-notification/resources_ja.json +5 -4
  21. package/dist/assets/t9n/public-notification/resources_ko.json +5 -4
  22. package/dist/assets/t9n/public-notification/resources_lt.json +5 -4
  23. package/dist/assets/t9n/public-notification/resources_lv.json +5 -4
  24. package/dist/assets/t9n/public-notification/resources_nb.json +5 -4
  25. package/dist/assets/t9n/public-notification/resources_nl.json +5 -4
  26. package/dist/assets/t9n/public-notification/resources_pl.json +5 -4
  27. package/dist/assets/t9n/public-notification/resources_pt-BR.json +5 -4
  28. package/dist/assets/t9n/public-notification/resources_pt-PT.json +5 -4
  29. package/dist/assets/t9n/public-notification/resources_ro.json +5 -4
  30. package/dist/assets/t9n/public-notification/resources_ru.json +5 -4
  31. package/dist/assets/t9n/public-notification/resources_sk.json +5 -4
  32. package/dist/assets/t9n/public-notification/resources_sl.json +5 -4
  33. package/dist/assets/t9n/public-notification/resources_sr.json +5 -4
  34. package/dist/assets/t9n/public-notification/resources_sv.json +5 -4
  35. package/dist/assets/t9n/public-notification/resources_th.json +5 -4
  36. package/dist/assets/t9n/public-notification/resources_tr.json +5 -4
  37. package/dist/assets/t9n/public-notification/resources_uk.json +5 -4
  38. package/dist/assets/t9n/public-notification/resources_vi.json +5 -4
  39. package/dist/assets/t9n/public-notification/resources_zh-CN.json +5 -4
  40. package/dist/assets/t9n/public-notification/resources_zh-HK.json +5 -4
  41. package/dist/assets/t9n/public-notification/resources_zh-TW.json +5 -4
  42. package/dist/cjs/buffer-tools_4.cjs.entry.js +3 -3
  43. package/dist/cjs/calcite-input-text_5.cjs.entry.js +6 -11
  44. package/dist/cjs/{downloadUtils-4ef4b28b.js → downloadUtils-7a0fd3c0.js} +77 -20
  45. package/dist/cjs/{index.es-cbe67d5b.js → index.es-9965b78c.js} +1 -1
  46. package/dist/cjs/layer-table_2.cjs.entry.js +8 -3
  47. package/dist/cjs/loader.cjs.js +1 -1
  48. package/dist/cjs/public-notification.cjs.entry.js +56 -21
  49. package/dist/cjs/solutions-components.cjs.js +1 -1
  50. package/dist/collection/components/buffer-tools/buffer-tools.css +4 -0
  51. package/dist/collection/components/buffer-tools/buffer-tools.js +1 -1
  52. package/dist/collection/components/layer-table/layer-table.js +7 -2
  53. package/dist/collection/components/map-draw-tools/map-draw-tools.css +4 -0
  54. package/dist/collection/components/map-select-tools/map-select-tools.js +18 -1
  55. package/dist/collection/components/pdf-download/pdf-download.js +3 -9
  56. package/dist/collection/components/public-notification/public-notification.js +57 -21
  57. package/dist/collection/demos/new-public-notification.html +6 -4
  58. package/dist/collection/utils/downloadUtils.js +74 -19
  59. package/dist/collection/utils/downloadUtils.ts +93 -26
  60. package/dist/collection/utils/interfaces.ts +2 -2
  61. package/dist/components/buffer-tools2.js +2 -2
  62. package/dist/components/downloadUtils.js +75 -20
  63. package/dist/components/layer-table2.js +7 -2
  64. package/dist/components/map-draw-tools2.js +1 -1
  65. package/dist/components/map-select-tools2.js +3 -1
  66. package/dist/components/pdf-download2.js +3 -9
  67. package/dist/components/public-notification.js +57 -21
  68. package/dist/esm/buffer-tools_4.entry.js +3 -3
  69. package/dist/esm/calcite-combobox_3.entry.js +1 -1
  70. package/dist/esm/calcite-input-text_5.entry.js +7 -12
  71. package/dist/esm/{downloadUtils-2ebeb46d.js → downloadUtils-a447bab1.js} +77 -22
  72. package/dist/esm/{index.es-6dd27a48.js → index.es-b9cb902a.js} +2 -2
  73. package/dist/esm/layer-table_2.entry.js +9 -4
  74. package/dist/esm/loader.js +1 -1
  75. package/dist/esm/{mapViewUtils-ebbd4733.js → mapViewUtils-27dfdc29.js} +1 -1
  76. package/dist/esm/public-notification.entry.js +57 -22
  77. package/dist/esm/solutions-components.js +1 -1
  78. package/dist/solutions-components/demos/new-public-notification.html +6 -4
  79. package/dist/solutions-components/p-2f4e1ddf.entry.js +6 -0
  80. package/dist/solutions-components/{p-657caece.js → p-345f517c.js} +5 -5
  81. package/dist/solutions-components/{p-390d7de8.js → p-4b426bab.js} +1 -1
  82. package/dist/solutions-components/{p-b4d4b50a.entry.js → p-52b747fa.entry.js} +3 -3
  83. package/dist/solutions-components/p-62492a2d.entry.js +17 -0
  84. package/dist/solutions-components/{p-ad82c173.js → p-80757ebd.js} +1 -1
  85. package/dist/solutions-components/p-cf00a2ef.entry.js +6 -0
  86. package/dist/solutions-components/{p-83e3db8e.entry.js → p-db099e05.entry.js} +1 -1
  87. package/dist/solutions-components/solutions-components.esm.js +1 -1
  88. package/dist/solutions-components/utils/downloadUtils.ts +93 -26
  89. package/dist/solutions-components/utils/interfaces.ts +2 -2
  90. package/dist/types/components/map-select-tools/map-select-tools.d.ts +5 -0
  91. package/dist/types/components/public-notification/public-notification.d.ts +18 -11
  92. package/dist/types/components.d.ts +8 -0
  93. package/dist/types/utils/downloadUtils.d.ts +22 -8
  94. package/dist/types/utils/interfaces.d.ts +2 -2
  95. package/package.json +1 -1
  96. package/dist/solutions-components/p-6f27bea2.entry.js +0 -17
  97. package/dist/solutions-components/p-db82a9ce.entry.js +0 -6
  98. package/dist/solutions-components/p-deb90ce7.entry.js +0 -6
@@ -2261,39 +2261,52 @@ const lineSeparatorChar = "|";
2261
2261
  /**
2262
2262
  * Downloads csv of mailing labels for the provided list of ids
2263
2263
  *
2264
- * @param selectionSetNames Names of the selection sets used to provide ids
2265
- * @param layer Layer providing features and attributes for download
2266
- * @param ids List of ids to download
2264
+ * @param exportInfos Key details about what to export (ids, layer, and selectionSetNames)
2267
2265
  * @param formatUsingLayerPopup When true, the layer's popup is used to choose attributes for each column; when false,
2268
2266
  * all attributes are exported
2269
2267
  * @param removeDuplicates When true a single label is generated when multiple featues have a shared address value
2270
2268
  * @param addColumnTitle Indicates if column headings should be included in output
2271
2269
  * @returns Promise resolving when function is done
2272
2270
  */
2273
- async function downloadCSV(selectionSetNames, layer, ids, formatUsingLayerPopup, removeDuplicates = false, addColumnTitle = false) {
2274
- const labels = await _prepareLabels(layer, ids, removeDuplicates, formatUsingLayerPopup, addColumnTitle);
2275
- exportCSV(_createFilename(selectionSetNames), labels);
2271
+ async function downloadCSV(exportInfos, formatUsingLayerPopup, removeDuplicates = false, addColumnTitle = false) {
2272
+ let labels = await consolidateLabels(exportInfos, formatUsingLayerPopup, addColumnTitle, true);
2273
+ labels = removeDuplicates ? removeDuplicateLabels(labels) : labels;
2274
+ const layerIds = Object.keys(exportInfos);
2275
+ let layerLabels = [];
2276
+ labels.forEach(label => {
2277
+ const id = label[0];
2278
+ // layerIds are stored as value separator at the end of the values for a given layer
2279
+ if (layerIds.indexOf(id) < 0) {
2280
+ layerLabels.push(label);
2281
+ }
2282
+ else {
2283
+ const selectionSetNames = _getSelectionSetNames(exportInfos, new RegExp(`\\b${id}\\b`));
2284
+ // once we see the layerId we have reached the end of it's values and should export
2285
+ exportCSV(_createFilename(selectionSetNames), layerLabels);
2286
+ layerLabels = [];
2287
+ }
2288
+ });
2276
2289
  return Promise.resolve();
2277
2290
  }
2278
2291
  /**
2279
2292
  * Downloads csv of mailing labels for the provided list of ids
2280
2293
  *
2281
- * @param selectionSetNames Names of the selection sets used to provide ids
2282
- * @param layer Layer providing features and attributes for download
2283
- * @param ids List of ids to download
2294
+ * @param exportInfos Key details about what to export (ids, layer, and selectionSetNames)
2284
2295
  * @param labelPageDescription Provides PDF page layout info
2285
2296
  * @param removeDuplicates When true a single label is generated when multiple featues have a shared address value
2286
2297
  * @param title Title for each page
2287
2298
  * @param initialImageDataUrl Data URL of image for first page
2288
2299
  * @returns Promise resolving when function is done
2289
2300
  */
2290
- async function downloadPDF(selectionSetNames, layer, ids, labelPageDescription, removeDuplicates = false, title = "", initialImageDataUrl = "") {
2291
- let labels = await _prepareLabels(layer, ids, removeDuplicates);
2301
+ async function downloadPDF(exportInfos, labelPageDescription, removeDuplicates = false, title = "", initialImageDataUrl = "") {
2302
+ let labels = await consolidateLabels(exportInfos);
2303
+ const selectionSetNames = _getSelectionSetNames(exportInfos);
2292
2304
  labels =
2293
2305
  // Remove empty lines in labels
2294
2306
  labels.map(labelLines => labelLines.filter(line => line.length > 0))
2295
2307
  // Remove empty labels
2296
2308
  .filter(label => label.length > 0);
2309
+ labels = removeDuplicates ? removeDuplicateLabels(labels) : labels;
2297
2310
  exportPDF(_createFilename(selectionSetNames), labels, labelPageDescription, title, initialImageDataUrl);
2298
2311
  return Promise.resolve();
2299
2312
  }
@@ -2510,13 +2523,12 @@ function _prepareAttributeValue(attributeValue, attributeType, attributeDomain,
2510
2523
  *
2511
2524
  * @param layer Layer from which to fetch features
2512
2525
  * @param ids List of ids to download
2513
- * @param removeDuplicates When true a single label is generated when multiple featues have a shared address value
2514
2526
  * @param formatUsingLayerPopup When true, the layer's popup is used to choose attributes for each column; when false,
2515
2527
  * all attributes are exported
2516
2528
  * @param includeHeaderNames Add the label format at the front of the list of generated labels
2517
2529
  * @returns Promise resolving when function is done
2518
2530
  */
2519
- async function _prepareLabels(layer, ids, removeDuplicates = true, formatUsingLayerPopup = true, includeHeaderNames = false) {
2531
+ async function _prepareLabels(layer, ids, formatUsingLayerPopup = true, includeHeaderNames = false) {
2520
2532
  var _a, _b, _c, _d, _e, _f;
2521
2533
  const [intl] = await loadModules(["esri/intl"]);
2522
2534
  // Get the features to export
@@ -2641,12 +2653,6 @@ async function _prepareLabels(layer, ids, removeDuplicates = true, formatUsingLa
2641
2653
  });
2642
2654
  });
2643
2655
  }
2644
- // Remove duplicates
2645
- if (removeDuplicates) {
2646
- const labelsAsStrings = labels.map(label => JSON.stringify(label));
2647
- const uniqueLabels = new Set(labelsAsStrings);
2648
- labels = Array.from(uniqueLabels, labelString => JSON.parse(labelString));
2649
- }
2650
2656
  // Add header names
2651
2657
  if (includeHeaderNames) {
2652
2658
  let headerNames = [];
@@ -2663,6 +2669,55 @@ async function _prepareLabels(layer, ids, removeDuplicates = true, formatUsingLa
2663
2669
  }
2664
2670
  return Promise.resolve(labels);
2665
2671
  }
2672
+ /**
2673
+ * Remove any duplicate labels
2674
+ *
2675
+ * @param labels Labels to evaluate for duplicates
2676
+ * @returns labels with duplicates removed
2677
+ */
2678
+ function removeDuplicateLabels(labels) {
2679
+ const labelsAsStrings = labels.map(label => JSON.stringify(label));
2680
+ const uniqueLabels = new Set(labelsAsStrings);
2681
+ return Array.from(uniqueLabels, labelString => JSON.parse(labelString));
2682
+ }
2683
+ /**
2684
+ * Extract selectionSetNames from the provided exportInfos
2685
+ *
2686
+ * @param exportInfos Key details about what to export (ids, layer, and selectionSetNames)
2687
+ * @returns selectionSetNames that will be used for export filenames
2688
+ */
2689
+ function _getSelectionSetNames(exportInfos, id = /.+/) {
2690
+ let selectionSetNames = [];
2691
+ Object.keys(exportInfos).forEach(k => {
2692
+ const exportInfo = exportInfos[k];
2693
+ if (id.test(k)) {
2694
+ selectionSetNames = selectionSetNames.concat(exportInfo.selectionSetNames);
2695
+ }
2696
+ });
2697
+ return selectionSetNames;
2698
+ }
2699
+ /**
2700
+ * Create and consolidate labels from all layers
2701
+ *
2702
+ * @param exportInfos Key details about what to export (ids, layer, and selectionSetNames)
2703
+ * @param formatUsingLayerPopup When true, the layer's popup is used to choose attributes for each column; when false,
2704
+ * all attributes are exported
2705
+ * @param includeHeaderNames Add the label format at the front of the list of generated labels
2706
+ * @returns selectionSetNames that will be used for export filenames
2707
+ */
2708
+ async function consolidateLabels(exportInfos, formatUsingLayerPopup = true, includeHeaderNames = false, isCSVExport = false) {
2709
+ const labelRequests = [];
2710
+ Object.keys(exportInfos).forEach(k => {
2711
+ const labelInfo = exportInfos[k];
2712
+ labelRequests.push(_prepareLabels(labelInfo.layerView.layer, labelInfo.ids, formatUsingLayerPopup, includeHeaderNames));
2713
+ if (isCSVExport) {
2714
+ // add the layer id as a temp value separator that we can use to split values for CSV export
2715
+ labelRequests.push(Promise.resolve([[k]]));
2716
+ }
2717
+ });
2718
+ const labels = await Promise.all(labelRequests);
2719
+ return labels.reduce((prev, cur) => prev.concat(cur), []);
2720
+ }
2666
2721
  //#endregion
2667
2722
 
2668
- export { _typeof_1 as _, downloadPDF as a, downloadCSV as d };
2723
+ export { _typeof_1 as _, downloadPDF as a, consolidateLabels as c, downloadCSV as d, removeDuplicateLabels as r };
@@ -195,8 +195,13 @@ const LayerTable = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
195
195
  * @returns a promise that will resolve when the operation is complete
196
196
  */
197
197
  _exportToCSV() {
198
- void downloadCSV([], this._layerView.layer, this._getSelectedIds(), false, // formatUsingLayerPopup
199
- false, // removeDuplicates
198
+ const exportInfos = {};
199
+ exportInfos[this._layerView.layer.id] = {
200
+ selectionSetNames: [],
201
+ ids: this._getSelectedIds(),
202
+ layerView: this._layerView
203
+ };
204
+ void downloadCSV(exportInfos, false, // formatUsingLayerPopup
200
205
  true);
201
206
  }
202
207
  /**
@@ -12,7 +12,7 @@ import { d as defineCustomElement$3 } from './action.js';
12
12
  import { d as defineCustomElement$2 } from './icon.js';
13
13
  import { d as defineCustomElement$1 } from './loader.js';
14
14
 
15
- const mapDrawToolsCss = ":host{display:block}.border{outline:1px solid var(--calcite-ui-border-input)}.div-visible{display:inherit}.div-not-visible{display:none !important}.padding-top-1-2{padding-top:.5rem}.main-label{display:flex;float:left}html[dir=\"rtl\"] .main-label{display:flex;float:right}.margin-top-1{margin-top:1rem}.border-left{border-left:1px solid rgba(110,110,110,.3)}.border-left[dir=\"rtl\"]{border-right:1px solid rgba(110,110,110,.3)}.esri-widget{box-sizing:border-box;color:#323232;font-size:14px;font-family:\"Avenir Next\",\"Helvetica Neue\",Helvetica,Arial,sans-serif;line-height:1.3em;background-color:#fff;--esri-widget-padding-v:12px;--esri-widget-padding-h:15px;--esri-widget-padding:var(--esri-widget-padding-v) var(--esri-widget-padding-h)}.esri-sketch__panel{align-items:center;display:flex;flex-flow:row wrap;padding:0}.esri-sketch__section{align-items:center;display:flex;flex-flow:row wrap;padding:0 7px;margin:6px 0}";
15
+ const mapDrawToolsCss = ":host{display:block}.border{outline:1px solid var(--calcite-ui-border-input)}.div-visible{display:inherit}.div-not-visible{display:none !important}.padding-top-1-2{padding-top:.5rem}.main-label{display:flex;float:left}html[dir=\"rtl\"] .main-label{display:flex;float:right}.margin-top-1{margin-top:1rem}.border-left{border-left:1px solid rgba(110,110,110,.3)}.border-left[dir=\"rtl\"]{border-right:1px solid rgba(110,110,110,.3)}.esri-widget{box-sizing:border-box;color:#323232;font-size:14px;font-family:\"Avenir Next\",\"Helvetica Neue\",Helvetica,Arial,sans-serif;line-height:1.3em;background-color:#fff;--esri-widget-padding-v:12px;--esri-widget-padding-h:15px;--esri-widget-padding:var(--esri-widget-padding-v) var(--esri-widget-padding-h)}.esri-sketch__panel{align-items:center;display:flex;flex-flow:row wrap;padding:0}.esri-sketch__section{align-items:center;display:flex;flex-flow:row wrap;padding:0 7px;margin:6px 0}.esri-sketch__section.esri-sketch__info-section>calcite-action:first-of-type{display:none}";
16
16
 
17
17
  const MapDrawTools = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
18
18
  constructor() {
@@ -65,6 +65,7 @@ const MapSelectTools = /*@__PURE__*/ proxyCustomElement(class extends HTMLElemen
65
65
  this.noResultText = undefined;
66
66
  this.searchConfiguration = undefined;
67
67
  this.selectionSet = undefined;
68
+ this.selectionLayerIds = [];
68
69
  this.selectLayerView = undefined;
69
70
  this.sketchLineSymbol = undefined;
70
71
  this.sketchPointSymbol = undefined;
@@ -207,7 +208,7 @@ const MapSelectTools = /*@__PURE__*/ proxyCustomElement(class extends HTMLElemen
207
208
  */
208
209
  _getUseLayerFeaturesOptions() {
209
210
  const useLayerFeaturesClass = this._useLayerFeaturesEnabled ? "div-visible" : "div-not-visible";
210
- return (h("div", null, h("div", { class: "padding-top-1 display-flex" }, h("calcite-label", { class: "label-margin-0 w-100", layout: "inline-space-between" }, h("div", { class: "tooltip-container" }, this._translations.useLayerFeatures, h("calcite-icon", { class: "padding-start-1-2 icon", icon: "question", id: "use-layer-features-icon", scale: "s" }))), h("calcite-popover", { closable: true, label: "", referenceElement: "use-layer-features-icon" }, h("span", { class: "tooltip-message" }, this._translations.useLayerFeaturesTooltip)), h("calcite-switch", { checked: this._useLayerFeaturesEnabled, onCalciteSwitchChange: () => { this._useLayerFeaturesEnabledChanged(); } })), h("div", { class: useLayerFeaturesClass + " padding-top-1" }, h("map-layer-picker", { enabledLayerIds: this.enabledLayerIds, mapView: this.mapView, onLayerSelectionChange: (evt) => { void this._layerSelectionChange(evt); }, selectedLayerIds: this.layerViews.map(l => l.layer.id), selectionMode: "single" }))));
211
+ return (h("div", null, h("div", { class: "padding-top-1 display-flex" }, h("calcite-label", { class: "label-margin-0 w-100", layout: "inline-space-between" }, h("div", { class: "tooltip-container" }, this._translations.useLayerFeatures, h("calcite-icon", { class: "padding-start-1-2 icon", icon: "question", id: "use-layer-features-icon", scale: "s" }))), h("calcite-popover", { closable: true, label: "", referenceElement: "use-layer-features-icon" }, h("span", { class: "tooltip-message" }, this._translations.useLayerFeaturesTooltip)), h("calcite-switch", { checked: this._useLayerFeaturesEnabled, onCalciteSwitchChange: () => { this._useLayerFeaturesEnabledChanged(); } })), h("div", { class: useLayerFeaturesClass + " padding-top-1" }, h("map-layer-picker", { enabledLayerIds: this.selectionLayerIds, mapView: this.mapView, onLayerSelectionChange: (evt) => { void this._layerSelectionChange(evt); }, selectedLayerIds: this.layerViews.map(l => l.layer.id), selectionMode: "single" }))));
211
212
  }
212
213
  /**
213
214
  * Renders the number of selected features
@@ -792,6 +793,7 @@ const MapSelectTools = /*@__PURE__*/ proxyCustomElement(class extends HTMLElemen
792
793
  "noResultText": [1, "no-result-text"],
793
794
  "searchConfiguration": [1040],
794
795
  "selectionSet": [16],
796
+ "selectionLayerIds": [16],
795
797
  "selectLayerView": [16],
796
798
  "sketchLineSymbol": [16],
797
799
  "sketchPointSymbol": [16],
@@ -237,11 +237,8 @@ const PdfDownload = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
237
237
  * @returns Promise resolving when function is done
238
238
  */
239
239
  async downloadCSV(exportInfos, removeDuplicates, addColumnTitle = true) {
240
- Object.keys(exportInfos).forEach(k => {
241
- const exportInfo = exportInfos[k];
242
- void downloadCSV(exportInfo.selectionSetNames, exportInfo.layerView.layer, exportInfo.ids, true, // formatUsingLayerPopup
243
- removeDuplicates, addColumnTitle);
244
- });
240
+ void downloadCSV(exportInfos, true, // formatUsingLayerPopup
241
+ removeDuplicates, addColumnTitle);
245
242
  }
246
243
  /**
247
244
  * Downloads pdf of mailing labels for the provided list of ids
@@ -253,10 +250,7 @@ const PdfDownload = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
253
250
  * @returns Promise resolving when function is done
254
251
  */
255
252
  async downloadPDF(exportInfos, removeDuplicates = false, title = "", initialImageDataUrl = "") {
256
- Object.keys(exportInfos).forEach(k => {
257
- const exportInfo = exportInfos[k];
258
- void downloadPDF(exportInfo.selectionSetNames, exportInfo.layerView.layer, exportInfo.ids, this._labelInfoElement.selectedOption.value, removeDuplicates, title, initialImageDataUrl);
259
- });
253
+ void downloadPDF(exportInfos, this._labelInfoElement.selectedOption.value, removeDuplicates, title, initialImageDataUrl);
260
254
  }
261
255
  //--------------------------------------------------------------------------
262
256
  //
@@ -9,6 +9,7 @@ import { l as loadModules } from './loadModules.js';
9
9
  import { g as goToSelection, h as highlightFeatures, d as defineCustomElement$5 } from './map-layer-picker2.js';
10
10
  import { s as state } from './publicNotificationStore.js';
11
11
  import { g as getLocaleComponentStrings } from './locale.js';
12
+ import { c as consolidateLabels, r as removeDuplicateLabels } from './downloadUtils.js';
12
13
  import { d as defineCustomElement$D } from './buffer-tools2.js';
13
14
  import { d as defineCustomElement$C } from './action.js';
14
15
  import { d as defineCustomElement$B } from './action-bar.js';
@@ -79,6 +80,7 @@ const PublicNotification$1 = /*@__PURE__*/ proxyCustomElement(class extends HTML
79
80
  this._addTitle = false;
80
81
  this._downloadActive = true;
81
82
  this._exportType = EExportType.PDF;
83
+ this._numDuplicates = 0;
82
84
  this._pageType = EPageType.LIST;
83
85
  this._saveEnabled = false;
84
86
  this._selectionSets = [];
@@ -145,6 +147,9 @@ const PublicNotification$1 = /*@__PURE__*/ proxyCustomElement(class extends HTML
145
147
  if ((_a = this.mapView) === null || _a === void 0 ? void 0 : _a.popup) {
146
148
  this.mapView.popup.autoOpenEnabled = pageType !== EPageType.LIST ? false : this._popupsEnabled;
147
149
  }
150
+ if (pageType === EPageType.EXPORT) {
151
+ this._numDuplicates = await this._getNumDuplicates();
152
+ }
148
153
  this._clearHighlight();
149
154
  if (oldPageType === EPageType.SELECT || oldPageType === EPageType.REFINE) {
150
155
  // clear any draw shapes or buffers
@@ -352,7 +357,7 @@ const PublicNotification$1 = /*@__PURE__*/ proxyCustomElement(class extends HTML
352
357
  validSet = numIds > 0;
353
358
  }
354
359
  if (validSet) {
355
- prev.push((h("calcite-list-item", { description: this._translations.selectedFeatures.replace("{{n}}", ids.length.toString()), label: cur.label, onClick: () => this._gotoSelection(cur, this.mapView) }, h("div", { slot: "content" }, h("div", { class: "list-label" }, cur.label), h("div", { class: "list-description" }, (_a = cur === null || cur === void 0 ? void 0 : cur.layerView) === null || _a === void 0 ? void 0 : _a.layer.title), h("div", { class: "list-description" }, this._translations.selectedFeatures.replace("{{n}}", ids.length.toString()))), this._getAction(true, "pencil", "", (evt) => this._openSelection(cur, evt), false, "actions-end"), this._getAction(true, "x", "", (evt) => this._deleteSelection(i, evt), false, "actions-end"))));
360
+ prev.push((h("calcite-list-item", { label: cur.label, onClick: () => this._gotoSelection(cur, this.mapView) }, h("div", { slot: "content" }, h("div", { class: "list-label" }, cur.label), h("div", { class: "list-description" }, (_a = cur === null || cur === void 0 ? void 0 : cur.layerView) === null || _a === void 0 ? void 0 : _a.layer.title), h("div", { class: "list-description" }, this._translations.selectedFeatures.replace("{{n}}", ids.length.toString()))), this._getAction(true, "pencil", "", (evt) => this._openSelection(cur, evt), false, "actions-end"), this._getAction(true, "x", "", (evt) => this._deleteSelection(i, evt), false, "actions-end"))));
356
361
  }
357
362
  return prev;
358
363
  }, []))));
@@ -388,39 +393,67 @@ const PublicNotification$1 = /*@__PURE__*/ proxyCustomElement(class extends HTML
388
393
  return validateRefineSet && hasRefineSet ? ids.length > 0 || this._selectionSets.length > 1 : this._selectionSets.length > 0;
389
394
  }
390
395
  /**
391
- * Check if any duplicates exist
396
+ * Check if any duplicate labels exist
392
397
  *
393
398
  * @returns true if duplicates are found
394
399
  *
395
400
  * @protected
396
401
  */
397
- _hasDuplicates() {
398
- const selectedIds = this._getSelectedIds();
399
- return this._getNumDuplicates(selectedIds) > 0;
402
+ async _getNumDuplicates() {
403
+ const exportInfos = this._getExportInfos();
404
+ const labels = await consolidateLabels(exportInfos);
405
+ const duplicatesRemoved = removeDuplicateLabels(labels);
406
+ return labels.length - duplicatesRemoved.length;
400
407
  }
401
408
  /**
402
- * Return the number of duplicates
403
- *
404
- * @param ids the list of currently selected ids
409
+ * Get key details about what to export
405
410
  *
406
- * @returns the number of duplicates
411
+ * @returns IExportInfos that contain ids and layer
407
412
  *
408
413
  * @protected
409
414
  */
410
- _getNumDuplicates(ids) {
411
- return ids.length - new Set(ids).size;
415
+ _getExportInfos() {
416
+ return this._selectionSets.reduce((prev, cur) => {
417
+ if (cur.download) {
418
+ if (cur.workflowType !== EWorkflowType.REFINE) {
419
+ const id = cur.layerView.layer.id;
420
+ this._updateIds(id, cur.layerView, cur.selectedIds, prev);
421
+ }
422
+ else {
423
+ // REFINE stores ids differently as it can contain ids from multiple layers
424
+ // REFINE will only ever be 1 ISelectionSet
425
+ Object.keys(cur.refineInfos).forEach(k => {
426
+ const refineIds = cur.refineInfos[k];
427
+ this._updateIds(k, refineIds.layerView, refineIds.addIds, prev);
428
+ });
429
+ }
430
+ }
431
+ return prev;
432
+ }, {});
412
433
  }
413
434
  /**
414
- * Get the complete list of selected ids
435
+ * Consolidate ids for each layer
415
436
  *
416
- * @returns all currently selected IDs
437
+ * @param id the layer id from the selectionSet
438
+ * @param layerView the layerView from the selectionSet
439
+ * @param ids the selectedIds from the selectionSet
440
+ * @param obj the object that will store the consolidated ids and layer info
441
+ *
442
+ * @returns IExportInfo key details that will be used for export
417
443
  *
418
444
  * @protected
419
445
  */
420
- _getSelectedIds() {
421
- return this._selectionSets.reduce((prev, cur) => {
422
- return prev.concat(cur.download ? cur.selectedIds : []);
423
- }, []);
446
+ _updateIds(id, layerView, ids, obj) {
447
+ if (obj[id]) {
448
+ obj[id].ids = obj[id].ids.concat(ids);
449
+ }
450
+ else {
451
+ obj[id] = {
452
+ layerView,
453
+ ids
454
+ };
455
+ }
456
+ return obj;
424
457
  }
425
458
  /**
426
459
  * Create the Select page that shows the selection workflows
@@ -430,7 +463,7 @@ const PublicNotification$1 = /*@__PURE__*/ proxyCustomElement(class extends HTML
430
463
  */
431
464
  _getSelectPage() {
432
465
  const noticeText = this._translations.selectSearchTip;
433
- return (h("calcite-panel", null, this._getLabel(this._translations.stepTwoFull, true), this._getNotice(noticeText), h("div", null, h("map-select-tools", { bufferColor: this.bufferColor, bufferOutlineColor: this.bufferOutlineColor, class: "font-bold", customLabelEnabled: this.customLabelEnabled, defaultBufferDistance: this.defaultBufferDistance, defaultBufferUnit: this.defaultBufferUnit, enabledLayerIds: this.selectionLayerIds, isUpdate: !!this._activeSelection, mapView: this.mapView, noResultText: this.noResultText, onSelectionSetChange: (evt) => this._updateForSelection(evt), ref: (el) => { this._selectTools = el; }, searchConfiguration: this._searchConfiguration, selectionSet: this._activeSelection, sketchLineSymbol: this.sketchLineSymbol, sketchPointSymbol: this.sketchPointSymbol, sketchPolygonSymbol: this.sketchPolygonSymbol })), this._getPageNavButtons(this._translations.done, this._numSelected === 0, () => { void this._saveSelection(); }, this._translations.cancel, false, () => { void this._home(); })));
466
+ return (h("calcite-panel", null, this._getLabel(this._translations.stepTwoFull, true), this._getNotice(noticeText), h("div", null, h("map-select-tools", { bufferColor: this.bufferColor, bufferOutlineColor: this.bufferOutlineColor, class: "font-bold", customLabelEnabled: this.customLabelEnabled, defaultBufferDistance: this.defaultBufferDistance, defaultBufferUnit: this.defaultBufferUnit, enabledLayerIds: this.addresseeLayerIds, isUpdate: !!this._activeSelection, mapView: this.mapView, noResultText: this.noResultText, onSelectionSetChange: (evt) => this._updateForSelection(evt), ref: (el) => { this._selectTools = el; }, searchConfiguration: this._searchConfiguration, selectionLayerIds: this.selectionLayerIds, selectionSet: this._activeSelection, sketchLineSymbol: this.sketchLineSymbol, sketchPointSymbol: this.sketchPointSymbol, sketchPolygonSymbol: this.sketchPolygonSymbol })), this._getPageNavButtons(this._translations.done, this._numSelected === 0, () => { void this._saveSelection(); }, this._translations.cancel, false, () => { void this._home(); })));
434
467
  }
435
468
  /**
436
469
  * Create the main download page that has the shared aspects of both PDF and CSV
@@ -441,8 +474,8 @@ const PublicNotification$1 = /*@__PURE__*/ proxyCustomElement(class extends HTML
441
474
  */
442
475
  _getExportPage() {
443
476
  const hasSelections = this._hasSelections(this.showRefineSelection);
444
- const numDuplicates = this._getNumDuplicates(this._getSelectedIds());
445
- return (h("calcite-panel", null, h("div", null, this._getLabel(this._translations.export, false), hasSelections ? (h("div", null, this._getNotice(this._translations.exportTip, "padding-sides-1"), this._getLabel(this._translations.exportListsLabel), this._getExportSelectionLists(), h("div", { class: "padding-sides-1" }, h("div", { class: "display-flex" }, h("calcite-label", { layout: "inline" }, h("calcite-checkbox", { ref: (el) => { this._removeDuplicates = el; } }), h("div", { class: "display-flex" }, this._translations.removeDuplicate, h("div", { class: "info-message padding-start-1-2" }, h("calcite-input-message", { class: "info-blue margin-top-0", scale: "m" }, ` ${this._translations.numDuplicates.replace("{{n}}", numDuplicates.toString())}`)))), h("calcite-icon", { class: "padding-start-1-2 icon", icon: "question", id: "remove-duplicates-icon", scale: "s" })), h("calcite-popover", { closable: true, label: "", referenceElement: "remove-duplicates-icon" }, h("span", { class: "tooltip-message" }, this._translations.duplicatesTip))), h("div", { class: "border-bottom" }), h("div", { class: "padding-top-sides-1" }, h("calcite-segmented-control", { class: "w-100", onCalciteSegmentedControlChange: (evt) => this._exportTypeChange(evt) }, h("calcite-segmented-control-item", { checked: this._exportType === EExportType.PDF, class: "w-50 end-border", value: EExportType.PDF }, this._translations.pdf), h("calcite-segmented-control-item", { checked: this._exportType === EExportType.CSV, class: "w-50", value: EExportType.CSV }, this._translations.csv))), h("div", { class: "padding-bottom-1" }, this._getExportOptions()), h("div", { class: "padding-1 display-flex" }, h("calcite-button", { disabled: !this._downloadActive, onClick: () => void this._export(), width: "full" }, this._translations.export)))) : (this._getNotice(this._translations.downloadNoLists, "padding-sides-1 padding-bottom-1")))));
477
+ const displayDuplicatesClass = this._numDuplicates > 0 ? "display-block" : "display-none";
478
+ return (h("calcite-panel", null, h("div", null, this._getLabel(this._translations.export, false), hasSelections ? (h("div", null, this._getNotice(this._translations.exportTip, "padding-sides-1"), this._getLabel(this._translations.exportListsLabel), this._getExportSelectionLists(), h("div", { class: "padding-sides-1 " + displayDuplicatesClass }, h("div", { class: "display-flex" }, h("calcite-label", { layout: "inline" }, h("calcite-checkbox", { ref: (el) => { this._removeDuplicates = el; } }), h("div", { class: "display-flex" }, this._translations.removeDuplicate, h("div", { class: "info-message padding-start-1-2" }, h("calcite-input-message", { class: "info-blue margin-top-0", scale: "m" }, ` ${this._translations.numDuplicates.replace("{{n}}", this._numDuplicates.toString())}`)))), h("calcite-icon", { class: "padding-start-1-2 icon", icon: "question", id: "remove-duplicates-icon", scale: "s" })), h("calcite-popover", { closable: true, label: "", referenceElement: "remove-duplicates-icon" }, h("span", { class: "tooltip-message" }, this._translations.duplicatesTip))), h("div", { class: "border-bottom" }), h("div", { class: "padding-top-sides-1" }, h("calcite-segmented-control", { class: "w-100", onCalciteSegmentedControlChange: (evt) => this._exportTypeChange(evt) }, h("calcite-segmented-control-item", { checked: this._exportType === EExportType.PDF, class: "w-50 end-border", value: EExportType.PDF }, this._translations.pdf), h("calcite-segmented-control-item", { checked: this._exportType === EExportType.CSV, class: "w-50", value: EExportType.CSV }, this._translations.csv))), h("div", { class: "padding-bottom-1" }, this._getExportOptions()), h("div", { class: "padding-1 display-flex" }, h("calcite-button", { disabled: !this._downloadActive, onClick: () => void this._export(), width: "full" }, this._translations.export)))) : (this._getNotice(this._translations.downloadNoLists, "padding-sides-1 padding-bottom-1")))));
446
479
  }
447
480
  /**
448
481
  * Store the user selected export type CSV || PDF
@@ -522,13 +555,14 @@ const PublicNotification$1 = /*@__PURE__*/ proxyCustomElement(class extends HTML
522
555
  */
523
556
  _getExportSelectionLists() {
524
557
  return this._selectionSets.reduce((prev, cur) => {
558
+ var _a;
525
559
  const ids = this._getSelectionSetIds(cur);
526
560
  const validSet = cur.workflowType !== EWorkflowType.REFINE || ids.length > 0;
527
561
  if (!this._downloadActive && cur.download && validSet) {
528
562
  this._downloadActive = true;
529
563
  }
530
564
  if (validSet) {
531
- prev.push((h("div", { class: "display-flex padding-sides-1 padding-bottom-1" }, h("calcite-checkbox", { checked: cur.download, class: "align-center", onClick: () => { void this._toggleDownload(cur.id); } }), h("calcite-list", { class: "list-border margin-start-1-2 width-full", id: "download-list" }, h("calcite-list-item", { description: this._translations.selectedFeatures.replace("{{n}}", ids.length.toString()), disabled: !cur.download, label: cur.label, onClick: () => { void this._toggleDownload(cur.id); } })))));
565
+ prev.push((h("div", { class: "display-flex padding-sides-1 padding-bottom-1" }, h("calcite-checkbox", { checked: cur.download, class: "align-center", onClick: () => { void this._toggleDownload(cur.id); } }), h("calcite-list", { class: "list-border margin-start-1-2 width-full", id: "download-list" }, h("calcite-list-item", { disabled: !cur.download, label: cur.label, onClick: () => { void this._toggleDownload(cur.id); } }, h("div", { slot: "content" }, h("div", { class: "list-label" }, cur.label), h("div", { class: "list-description" }, (_a = cur === null || cur === void 0 ? void 0 : cur.layerView) === null || _a === void 0 ? void 0 : _a.layer.title), h("div", { class: "list-description" }, this._translations.selectedFeatures.replace("{{n}}", ids.length.toString()))))))));
532
566
  }
533
567
  return prev;
534
568
  }, []) || (h("div", null));
@@ -548,6 +582,7 @@ const PublicNotification$1 = /*@__PURE__*/ proxyCustomElement(class extends HTML
548
582
  return ss;
549
583
  });
550
584
  this._downloadActive = isActive;
585
+ this._numDuplicates = await this._getNumDuplicates();
551
586
  await this._highlightFeatures();
552
587
  }
553
588
  /**
@@ -811,6 +846,7 @@ const PublicNotification$1 = /*@__PURE__*/ proxyCustomElement(class extends HTML
811
846
  "_addTitle": [32],
812
847
  "_downloadActive": [32],
813
848
  "_exportType": [32],
849
+ "_numDuplicates": [32],
814
850
  "_pageType": [32],
815
851
  "_saveEnabled": [32],
816
852
  "_selectionSets": [32],
@@ -22,7 +22,7 @@ import './resources-e83f65b3.js';
22
22
  import './observers-81c91acd.js';
23
23
  import './index-4c4a4f3d.js';
24
24
 
25
- const bufferToolsCss = ":host{display:block}.c-container{display:inline-flex}.flex-1{flex:\"1\"}.padding-end-1{-webkit-padding-end:1rem;padding-inline-end:1rem}";
25
+ const bufferToolsCss = ":host{display:block}.c-container{display:inline-flex}.flex-1{flex:\"1\"}.padding-end-1{-webkit-padding-end:1rem;padding-inline-end:1rem}.w-50{width:50%}";
26
26
 
27
27
  const BufferTools = class {
28
28
  constructor(hostRef) {
@@ -181,7 +181,7 @@ const BufferTools = class {
181
181
  * @protected
182
182
  */
183
183
  _getTextBoxDisplay() {
184
- 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())));
184
+ return (h("div", { class: "c-container" }, h("calcite-input", { class: "padding-end-1 w-50", 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 w-50", label: "label", onCalciteSelectChange: () => this._setUnit(this._unitElement.value), ref: (el) => { this._unitElement = el; } }, this._getUnits())));
185
185
  }
186
186
  /**
187
187
  * Render distance control as a slider
@@ -1122,7 +1122,7 @@ const Slider = class {
1122
1122
  };
1123
1123
  Slider.style = sliderCss;
1124
1124
 
1125
- const mapDrawToolsCss = ":host{display:block}.border{outline:1px solid var(--calcite-ui-border-input)}.div-visible{display:inherit}.div-not-visible{display:none !important}.padding-top-1-2{padding-top:.5rem}.main-label{display:flex;float:left}html[dir=\"rtl\"] .main-label{display:flex;float:right}.margin-top-1{margin-top:1rem}.border-left{border-left:1px solid rgba(110,110,110,.3)}.border-left[dir=\"rtl\"]{border-right:1px solid rgba(110,110,110,.3)}.esri-widget{box-sizing:border-box;color:#323232;font-size:14px;font-family:\"Avenir Next\",\"Helvetica Neue\",Helvetica,Arial,sans-serif;line-height:1.3em;background-color:#fff;--esri-widget-padding-v:12px;--esri-widget-padding-h:15px;--esri-widget-padding:var(--esri-widget-padding-v) var(--esri-widget-padding-h)}.esri-sketch__panel{align-items:center;display:flex;flex-flow:row wrap;padding:0}.esri-sketch__section{align-items:center;display:flex;flex-flow:row wrap;padding:0 7px;margin:6px 0}";
1125
+ const mapDrawToolsCss = ":host{display:block}.border{outline:1px solid var(--calcite-ui-border-input)}.div-visible{display:inherit}.div-not-visible{display:none !important}.padding-top-1-2{padding-top:.5rem}.main-label{display:flex;float:left}html[dir=\"rtl\"] .main-label{display:flex;float:right}.margin-top-1{margin-top:1rem}.border-left{border-left:1px solid rgba(110,110,110,.3)}.border-left[dir=\"rtl\"]{border-right:1px solid rgba(110,110,110,.3)}.esri-widget{box-sizing:border-box;color:#323232;font-size:14px;font-family:\"Avenir Next\",\"Helvetica Neue\",Helvetica,Arial,sans-serif;line-height:1.3em;background-color:#fff;--esri-widget-padding-v:12px;--esri-widget-padding-h:15px;--esri-widget-padding:var(--esri-widget-padding-v) var(--esri-widget-padding-h)}.esri-sketch__panel{align-items:center;display:flex;flex-flow:row wrap;padding:0}.esri-sketch__section{align-items:center;display:flex;flex-flow:row wrap;padding:0 7px;margin:6px 0}.esri-sketch__section.esri-sketch__info-section>calcite-action:first-of-type{display:none}";
1126
1126
 
1127
1127
  const MapDrawTools = class {
1128
1128
  constructor(hostRef) {
@@ -19,7 +19,7 @@ import { c as connectMessages, s as setUpMessages, d as disconnectMessages, u as
19
19
  import { C as ComboboxChildSelector, b as getItemAncestors, c as getItemChildren, h as hasActiveChildren, d as ComboboxItem$1, e as ComboboxItemGroup, g as getAncestors, a as getDepth } from './utils-1095d24d.js';
20
20
  import { d as debounce } from './debounce-4c884e5c.js';
21
21
  import { c as connectConditionalSlotComponent, d as disconnectConditionalSlotComponent } from './conditionalSlot-d3eebe7f.js';
22
- import { i as getMapLayerIds, k as getMapLayerHash } from './mapViewUtils-ebbd4733.js';
22
+ import { i as getMapLayerIds, k as getMapLayerHash } from './mapViewUtils-27dfdc29.js';
23
23
  import { s as state } from './publicNotificationStore-c36d95bf.js';
24
24
  import './resources-e83f65b3.js';
25
25
  import './key-218d8d4d.js';
@@ -16,11 +16,11 @@ import { u as updateMessages, c as connectMessages, d as disconnectMessages, s a
16
16
  import { c as connectConditionalSlotComponent, d as disconnectConditionalSlotComponent } from './conditionalSlot-d3eebe7f.js';
17
17
  import { K as KindIcons } from './resources-cfdc6def.js';
18
18
  import { l as loadModules } from './loadModules-cd3569de.js';
19
- import { g as goToSelection, h as highlightFeatures, q as queryObjectIds, a as getQueryGeoms, b as getMapLayerView, c as queryFeaturesByGeometry, d as getIdSets, e as highlightAllFeatures } from './mapViewUtils-ebbd4733.js';
19
+ import { g as goToSelection, h as highlightFeatures, a as queryObjectIds, b as getQueryGeoms, c as getMapLayerView, d as queryFeaturesByGeometry, e as getIdSets, f as highlightAllFeatures } from './mapViewUtils-27dfdc29.js';
20
20
  import { c as EWorkflowType, e as ESelectionMode, f as EDrawMode } from './interfaces-523c6558.js';
21
21
  import { s as state } from './publicNotificationStore-c36d95bf.js';
22
22
  import { a as getComponentClosestLanguage, g as getLocaleComponentStrings } from './locale-54cac39a.js';
23
- import { d as downloadCSV, a as downloadPDF } from './downloadUtils-2ebeb46d.js';
23
+ import { d as downloadCSV, a as downloadPDF } from './downloadUtils-a447bab1.js';
24
24
  import './guid-2069664e.js';
25
25
  import './key-218d8d4d.js';
26
26
  import './index-4c4a4f3d.js';
@@ -505,6 +505,7 @@ const MapSelectTools = class {
505
505
  this.noResultText = undefined;
506
506
  this.searchConfiguration = undefined;
507
507
  this.selectionSet = undefined;
508
+ this.selectionLayerIds = [];
508
509
  this.selectLayerView = undefined;
509
510
  this.sketchLineSymbol = undefined;
510
511
  this.sketchPointSymbol = undefined;
@@ -647,7 +648,7 @@ const MapSelectTools = class {
647
648
  */
648
649
  _getUseLayerFeaturesOptions() {
649
650
  const useLayerFeaturesClass = this._useLayerFeaturesEnabled ? "div-visible" : "div-not-visible";
650
- return (h("div", null, h("div", { class: "padding-top-1 display-flex" }, h("calcite-label", { class: "label-margin-0 w-100", layout: "inline-space-between" }, h("div", { class: "tooltip-container" }, this._translations.useLayerFeatures, h("calcite-icon", { class: "padding-start-1-2 icon", icon: "question", id: "use-layer-features-icon", scale: "s" }))), h("calcite-popover", { closable: true, label: "", referenceElement: "use-layer-features-icon" }, h("span", { class: "tooltip-message" }, this._translations.useLayerFeaturesTooltip)), h("calcite-switch", { checked: this._useLayerFeaturesEnabled, onCalciteSwitchChange: () => { this._useLayerFeaturesEnabledChanged(); } })), h("div", { class: useLayerFeaturesClass + " padding-top-1" }, h("map-layer-picker", { enabledLayerIds: this.enabledLayerIds, mapView: this.mapView, onLayerSelectionChange: (evt) => { void this._layerSelectionChange(evt); }, selectedLayerIds: this.layerViews.map(l => l.layer.id), selectionMode: "single" }))));
651
+ return (h("div", null, h("div", { class: "padding-top-1 display-flex" }, h("calcite-label", { class: "label-margin-0 w-100", layout: "inline-space-between" }, h("div", { class: "tooltip-container" }, this._translations.useLayerFeatures, h("calcite-icon", { class: "padding-start-1-2 icon", icon: "question", id: "use-layer-features-icon", scale: "s" }))), h("calcite-popover", { closable: true, label: "", referenceElement: "use-layer-features-icon" }, h("span", { class: "tooltip-message" }, this._translations.useLayerFeaturesTooltip)), h("calcite-switch", { checked: this._useLayerFeaturesEnabled, onCalciteSwitchChange: () => { this._useLayerFeaturesEnabledChanged(); } })), h("div", { class: useLayerFeaturesClass + " padding-top-1" }, h("map-layer-picker", { enabledLayerIds: this.selectionLayerIds, mapView: this.mapView, onLayerSelectionChange: (evt) => { void this._layerSelectionChange(evt); }, selectedLayerIds: this.layerViews.map(l => l.layer.id), selectionMode: "single" }))));
651
652
  }
652
653
  /**
653
654
  * Renders the number of selected features
@@ -1444,11 +1445,8 @@ const PdfDownload = class {
1444
1445
  * @returns Promise resolving when function is done
1445
1446
  */
1446
1447
  async downloadCSV(exportInfos, removeDuplicates, addColumnTitle = true) {
1447
- Object.keys(exportInfos).forEach(k => {
1448
- const exportInfo = exportInfos[k];
1449
- void downloadCSV(exportInfo.selectionSetNames, exportInfo.layerView.layer, exportInfo.ids, true, // formatUsingLayerPopup
1450
- removeDuplicates, addColumnTitle);
1451
- });
1448
+ void downloadCSV(exportInfos, true, // formatUsingLayerPopup
1449
+ removeDuplicates, addColumnTitle);
1452
1450
  }
1453
1451
  /**
1454
1452
  * Downloads pdf of mailing labels for the provided list of ids
@@ -1460,10 +1458,7 @@ const PdfDownload = class {
1460
1458
  * @returns Promise resolving when function is done
1461
1459
  */
1462
1460
  async downloadPDF(exportInfos, removeDuplicates = false, title = "", initialImageDataUrl = "") {
1463
- Object.keys(exportInfos).forEach(k => {
1464
- const exportInfo = exportInfos[k];
1465
- void downloadPDF(exportInfo.selectionSetNames, exportInfo.layerView.layer, exportInfo.ids, this._labelInfoElement.selectedOption.value, removeDuplicates, title, initialImageDataUrl);
1466
- });
1461
+ void downloadPDF(exportInfos, this._labelInfoElement.selectedOption.value, removeDuplicates, title, initialImageDataUrl);
1467
1462
  }
1468
1463
  //--------------------------------------------------------------------------
1469
1464
  //