@esri/solutions-components 0.4.1 → 0.4.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (41) hide show
  1. package/dist/assets/t9n/map-select-tools/resources.json +1 -1
  2. package/dist/assets/t9n/map-select-tools/resources_en.json +1 -1
  3. package/dist/assets/t9n/public-notification/resources.json +5 -3
  4. package/dist/assets/t9n/public-notification/resources_en.json +5 -3
  5. package/dist/assets/t9n/refine-selection/resources.json +3 -3
  6. package/dist/assets/t9n/refine-selection/resources_en.json +3 -3
  7. package/dist/cjs/calcite-input-message_5.cjs.entry.js +8 -6
  8. package/dist/cjs/{downloadUtils-27dbd8b9.js → downloadUtils-99981c6b.js} +88 -15
  9. package/dist/cjs/{index.es-40d341ed.js → index.es-53f3bc97.js} +1 -1
  10. package/dist/cjs/layer-table.cjs.entry.js +2 -2
  11. package/dist/cjs/public-notification.cjs.entry.js +24 -9
  12. package/dist/collection/components/layer-table/layer-table.js +1 -1
  13. package/dist/collection/components/map-select-tools/map-select-tools.js +1 -1
  14. package/dist/collection/components/pdf-download/pdf-download.js +26 -6
  15. package/dist/collection/components/public-notification/public-notification.js +24 -9
  16. package/dist/collection/utils/downloadUtils.js +87 -14
  17. package/dist/collection/utils/downloadUtils.ts +123 -14
  18. package/dist/components/downloadUtils.js +87 -14
  19. package/dist/components/layer-table.js +1 -1
  20. package/dist/components/map-select-tools2.js +1 -1
  21. package/dist/components/pdf-download2.js +6 -4
  22. package/dist/components/public-notification.js +24 -9
  23. package/dist/esm/calcite-input-message_5.entry.js +8 -6
  24. package/dist/esm/{downloadUtils-76e38a94.js → downloadUtils-4bb47330.js} +88 -15
  25. package/dist/esm/{index.es-489f4f08.js → index.es-4424d2f7.js} +1 -1
  26. package/dist/esm/layer-table.entry.js +2 -2
  27. package/dist/esm/public-notification.entry.js +24 -9
  28. package/dist/solutions-components/{p-caa7e7a7.js → p-0aed9b0d.js} +11 -11
  29. package/dist/solutions-components/{p-5d27b47d.entry.js → p-0d3b0fa0.entry.js} +2 -2
  30. package/dist/solutions-components/{p-bff8aa4e.js → p-50117f71.js} +1 -1
  31. package/dist/solutions-components/p-5e4dfbe4.entry.js +6 -0
  32. package/dist/solutions-components/{p-92cb569a.entry.js → p-ec7f7804.entry.js} +1 -1
  33. package/dist/solutions-components/solutions-components.esm.js +1 -1
  34. package/dist/solutions-components/utils/downloadUtils.ts +123 -14
  35. package/dist/types/components/map-select-tools/map-select-tools.d.ts +1 -1
  36. package/dist/types/components/pdf-download/pdf-download.d.ts +4 -2
  37. package/dist/types/components/public-notification/public-notification.d.ts +9 -1
  38. package/dist/types/components.d.ts +4 -2
  39. package/dist/types/utils/downloadUtils.d.ts +4 -2
  40. package/package.json +1 -1
  41. package/dist/solutions-components/p-4ef94c6b.entry.js +0 -6
@@ -74,7 +74,8 @@ const PublicNotification = class {
74
74
  console.log(oldValue);
75
75
  if (JSON.stringify(newValue) !== JSON.stringify(oldValue)) {
76
76
  console.log("Emit event from parent");
77
- this.searchConfigurationChange.emit(newValue);
77
+ this.searchConfiguration = Object.assign({}, newValue);
78
+ this.searchConfigurationChange.emit(this.searchConfiguration);
78
79
  }
79
80
  }
80
81
  /**
@@ -144,8 +145,7 @@ const PublicNotification = class {
144
145
  * Renders the component.
145
146
  */
146
147
  render() {
147
- const hasSelections = this._selectionSets.length > 0;
148
- return (h(Host, null, h("calcite-shell", null, h("calcite-action-bar", { class: "border-bottom-1 action-bar-size", "expand-disabled": true, layout: "horizontal", slot: "header" }, this._getActionGroup("list-check", false, EPageType.LIST, this._translations.myLists), this.showRefineSelection ? this._getActionGroup("test-data", !hasSelections, EPageType.REFINE, this._translations.refineSelection) : undefined, this._getActionGroup("file-pdf", !hasSelections, EPageType.PDF, this._translations.downloadPDF), this._getActionGroup("file-csv", !hasSelections, EPageType.CSV, this._translations.downloadCSV)), this._getPage(this._pageType))));
148
+ return (h(Host, null, h("calcite-shell", null, h("calcite-action-bar", { class: "border-bottom-1 action-bar-size", "expand-disabled": true, layout: "horizontal", slot: "header" }, this._getActionGroup("list-check", EPageType.LIST, this._translations.myLists), this.showRefineSelection ? this._getActionGroup("test-data", EPageType.REFINE, this._translations.refineSelection) : undefined, this._getActionGroup("file-pdf", EPageType.PDF, this._translations.downloadPDF), this._getActionGroup("file-csv", EPageType.CSV, this._translations.downloadCSV)), this._getPage(this._pageType))));
149
149
  }
150
150
  //--------------------------------------------------------------------------
151
151
  //
@@ -175,9 +175,9 @@ const PublicNotification = class {
175
175
  *
176
176
  * @protected
177
177
  */
178
- _getActionGroup(icon, disabled, pageType, tip) {
178
+ _getActionGroup(icon, pageType, tip) {
179
179
  const groupClass = this.showRefineSelection ? "action-center w-1-4" : "action-center w-1-3";
180
- return (h("calcite-action-group", { class: groupClass, layout: "horizontal" }, h("calcite-action", { active: this._pageType === pageType, alignment: "center", class: "width-full height-full", compact: false, disabled: disabled, icon: icon, id: icon, onClick: () => { this._setPageType(pageType); }, text: "" }), h("calcite-tooltip", { label: "", placement: "bottom", "reference-element": icon }, h("span", null, tip))));
180
+ return (h("calcite-action-group", { class: groupClass, layout: "horizontal" }, h("calcite-action", { active: this._pageType === pageType, alignment: "center", class: "width-full height-full", compact: false, icon: icon, id: icon, onClick: () => { this._setPageType(pageType); }, text: "" }), h("calcite-tooltip", { label: "", placement: "bottom", "reference-element": icon }, h("span", null, tip))));
181
181
  }
182
182
  /**
183
183
  * Navigate to the defined page type
@@ -291,6 +291,16 @@ const PublicNotification = class {
291
291
  this._layerSelectionChangeEvt.detail[0] : "";
292
292
  await this._updateAddresseeLayer(id);
293
293
  }
294
+ /**
295
+ * Check if any selection sets exist.
296
+ *
297
+ * @returns true if selection sets exist
298
+ *
299
+ * @protected
300
+ */
301
+ _hasSelections() {
302
+ return this._selectionSets.length > 0;
303
+ }
294
304
  /**
295
305
  * Create the Select page that shows the selection workflows
296
306
  *
@@ -319,7 +329,9 @@ const PublicNotification = class {
319
329
  * @protected
320
330
  */
321
331
  _getRefinePage() {
322
- return (h("calcite-panel", null, this._getLabel(this._translations.refineSelection), this._getNotice(this._translations.refineTip, "padding-sides-1"), h("refine-selection", { addresseeLayer: this.addresseeLayer, enabledLayerIds: this.selectionLayerIds, mapView: this.mapView, selectionSets: this._selectionSets })));
332
+ const hasSelections = this._hasSelections();
333
+ return (h("calcite-panel", null, this._getLabel(this._translations.refineSelection), hasSelections ? (h("div", null, this._getNotice(this._translations.refineTip, "padding-sides-1"), h("refine-selection", { addresseeLayer: this.addresseeLayer, enabledLayerIds: this.selectionLayerIds, mapView: this.mapView, selectionSets: this._selectionSets }))) :
334
+ this._getNotice(this._translations.refineTipNoSelections, "padding-sides-1")));
323
335
  }
324
336
  /**
325
337
  * Create the PDF download page that shows the download options
@@ -350,7 +362,8 @@ const PublicNotification = class {
350
362
  */
351
363
  _getDownloadPage(type) {
352
364
  const isPdf = type === EExportType.PDF;
353
- return (h("calcite-panel", null, h("div", null, h("div", { class: "padding-top-sides-1" }, h("calcite-label", { class: "font-bold" }, isPdf ? this._translations.downloadPDF : this._translations.downloadCSV), h("calcite-label", null, this._translations.notifications)), this._getSelectionLists(), h("div", { class: "margin-side-1 padding-top-1 border-bottom" }), h("div", { class: "padding-top-sides-1" }, h("calcite-label", { layout: "inline" }, h("calcite-checkbox", { disabled: !this._downloadActive, ref: (el) => { this._removeDuplicates = el; } }), this._translations.removeDuplicate)), h("div", { class: isPdf ? "" : "display-none" }, this._getLabel(this._translations.selectPDFLabelOption, false), h("div", { class: "padding-sides-1" }, h("pdf-download", { disabled: !this._downloadActive, layerView: this.addresseeLayer, ref: (el) => { this._downloadTools = el; } }))), h("div", { class: "padding-1 display-flex" }, h("calcite-button", { disabled: !this._downloadActive, onClick: isPdf ? () => this._downloadPDF() : () => this._downloadCSV(), width: "full" }, isPdf ? this._translations.downloadPDF : this._translations.downloadCSV)))));
365
+ const hasSelections = this._hasSelections();
366
+ return (h("calcite-panel", null, h("div", null, h("div", { class: "padding-top-sides-1" }, h("calcite-label", { class: "font-bold" }, isPdf ? this._translations.downloadPDF : this._translations.downloadCSV)), hasSelections ? (h("div", null, h("calcite-label", null, this._translations.notifications), this._getSelectionLists(), h("div", { class: "margin-side-1 padding-top-1 border-bottom" }), h("div", { class: "padding-top-sides-1" }, h("calcite-label", { layout: "inline" }, h("calcite-checkbox", { disabled: !this._downloadActive, ref: (el) => { this._removeDuplicates = el; } }), this._translations.removeDuplicate)), h("div", { class: isPdf ? "" : "display-none" }, this._getLabel(this._translations.selectPDFLabelOption, false), h("div", { class: "padding-sides-1" }, h("pdf-download", { disabled: !this._downloadActive, layerView: this.addresseeLayer, ref: (el) => { this._downloadTools = el; } }))), h("div", { class: "padding-1 display-flex" }, h("calcite-button", { disabled: !this._downloadActive, onClick: isPdf ? () => this._downloadPDF() : () => this._downloadCSV(), width: "full" }, isPdf ? this._translations.downloadPDF : this._translations.downloadCSV)))) : (this._getNotice(this._translations.downloadNoLists, "padding-sides-1 padding-bottom-1")))));
354
367
  }
355
368
  /**
356
369
  * Create the stacked navigation buttons for a page
@@ -433,7 +446,8 @@ const PublicNotification = class {
433
446
  */
434
447
  _downloadPDF() {
435
448
  const ids = getSelectionIds(this._getDownloadSelectionSets());
436
- void this._downloadTools.downloadPDF(ids, this._removeDuplicates.checked);
449
+ const selectionSetNames = this._selectionSets.map(set => set.label);
450
+ void this._downloadTools.downloadPDF(selectionSetNames, ids, this._removeDuplicates.checked);
437
451
  }
438
452
  /**
439
453
  * Download all selection sets as CSV
@@ -442,7 +456,8 @@ const PublicNotification = class {
442
456
  */
443
457
  _downloadCSV() {
444
458
  const ids = getSelectionIds(this._getDownloadSelectionSets());
445
- void this._downloadTools.downloadCSV(ids, this._removeDuplicates.checked);
459
+ const selectionSetNames = this._selectionSets.map(set => set.label);
460
+ void this._downloadTools.downloadCSV(selectionSetNames, ids, this._removeDuplicates.checked);
446
461
  }
447
462
  /**
448
463
  * Get all enabled selection sets