@esri/solutions-components 0.4.0 → 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 (76) 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 -5
  4. package/dist/assets/t9n/public-notification/resources_en.json +5 -5
  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 +1344 -18
  8. package/dist/cjs/{calcite-input-message.calcite-notice.map-select-tools.pdf-download.refine-selection-da276a1c.js → downloadUtils-99981c6b.js} +278 -1383
  9. package/dist/cjs/{index.es-176629d8.js → index.es-53f3bc97.js} +3 -13
  10. package/dist/cjs/layer-table.cjs.entry.js +5 -15
  11. package/dist/cjs/loader.cjs.js +1 -1
  12. package/dist/cjs/public-notification.cjs.entry.js +25 -10
  13. package/dist/cjs/solutions-components.cjs.js +1 -1
  14. package/dist/collection/components/layer-table/layer-table.js +4 -16
  15. package/dist/collection/components/map-search/map-search.js +1 -1
  16. package/dist/collection/components/map-select-tools/map-select-tools.js +43 -39
  17. package/dist/collection/components/pdf-download/pdf-download.js +33 -80
  18. package/dist/collection/components/public-notification/public-notification.js +26 -11
  19. package/dist/collection/components/refine-selection/refine-selection.js +1 -1
  20. package/dist/collection/utils/csvUtils.js +4 -0
  21. package/dist/collection/utils/csvUtils.ts +7 -0
  22. package/dist/collection/utils/downloadUtils.js +254 -0
  23. package/dist/collection/utils/downloadUtils.ts +344 -0
  24. package/dist/collection/utils/interfaces.ts +3 -2
  25. package/dist/collection/utils/pdfUtils.js +7 -0
  26. package/dist/collection/utils/pdfUtils.ts +13 -2
  27. package/dist/components/downloadUtils.js +2352 -0
  28. package/dist/components/index.es.js +1 -1
  29. package/dist/components/layer-table.js +5 -16
  30. package/dist/components/map-layer-picker2.js +1 -1
  31. package/dist/components/map-search.js +1 -1
  32. package/dist/components/map-select-tools2.js +45 -41
  33. package/dist/components/pdf-download2.js +14 -2126
  34. package/dist/components/public-notification.js +26 -11
  35. package/dist/components/queryUtils.js +1 -1
  36. package/dist/components/refine-selection-tools2.js +1 -1
  37. package/dist/components/refine-selection2.js +1 -1
  38. package/dist/esm/buffer-tools_6.entry.js +1 -1
  39. package/dist/esm/calcite-combobox_3.entry.js +1 -1
  40. package/dist/esm/calcite-input-message_5.entry.js +1343 -13
  41. package/dist/esm/{calcite-input-message.calcite-notice.map-select-tools.pdf-download.refine-selection-c6f63458.js → downloadUtils-4bb47330.js} +279 -1381
  42. package/dist/esm/{index.es-54a6f3a3.js → index.es-4424d2f7.js} +2 -12
  43. package/dist/esm/layer-table.entry.js +6 -16
  44. package/dist/esm/loader.js +1 -1
  45. package/dist/esm/{mapViewUtils-63e118f8.js → mapViewUtils-02696ab6.js} +1 -1
  46. package/dist/esm/public-notification.entry.js +26 -11
  47. package/dist/esm/solutions-components.js +1 -1
  48. package/dist/solutions-components/p-0aed9b0d.js +437 -0
  49. package/dist/solutions-components/p-0d3b0fa0.entry.js +17 -0
  50. package/dist/solutions-components/{p-cc2e20c8.js → p-1bfd07e3.js} +1 -1
  51. package/dist/solutions-components/{p-117174e8.entry.js → p-335fce8c.entry.js} +1 -1
  52. package/dist/solutions-components/{p-1e459361.js → p-50117f71.js} +3 -3
  53. package/dist/solutions-components/p-5e4dfbe4.entry.js +6 -0
  54. package/dist/solutions-components/{p-8a0c0935.entry.js → p-a3b60bc9.entry.js} +1 -1
  55. package/dist/solutions-components/p-ec7f7804.entry.js +6 -0
  56. package/dist/solutions-components/solutions-components.esm.js +1 -1
  57. package/dist/solutions-components/utils/csvUtils.ts +7 -0
  58. package/dist/solutions-components/utils/downloadUtils.ts +344 -0
  59. package/dist/solutions-components/utils/interfaces.ts +3 -2
  60. package/dist/solutions-components/utils/pdfUtils.ts +13 -2
  61. package/dist/types/components/map-select-tools/map-select-tools.d.ts +12 -6
  62. package/dist/types/components/pdf-download/pdf-download.d.ts +4 -20
  63. package/dist/types/components/public-notification/public-notification.d.ts +9 -1
  64. package/dist/types/components.d.ts +4 -2
  65. package/dist/types/utils/downloadUtils.d.ts +42 -0
  66. package/dist/types/utils/interfaces.d.ts +2 -3
  67. package/dist/types/utils/pdfUtils.d.ts +3 -1
  68. package/package.json +1 -1
  69. package/dist/cjs/csvUtils-3a56c6d8.js +0 -54
  70. package/dist/components/csvUtils.js +0 -52
  71. package/dist/esm/csvUtils-23b5418f.js +0 -52
  72. package/dist/solutions-components/p-3069e3b7.js +0 -21
  73. package/dist/solutions-components/p-6d28f991.entry.js +0 -6
  74. package/dist/solutions-components/p-80f5e33c.js +0 -416
  75. package/dist/solutions-components/p-8927862a.entry.js +0 -6
  76. package/dist/solutions-components/p-e69c58e5.entry.js +0 -6
@@ -109,7 +109,8 @@ const PublicNotification$1 = /*@__PURE__*/ proxyCustomElement(class extends HTML
109
109
  console.log(oldValue);
110
110
  if (JSON.stringify(newValue) !== JSON.stringify(oldValue)) {
111
111
  console.log("Emit event from parent");
112
- this.searchConfigurationChange.emit(newValue);
112
+ this.searchConfiguration = Object.assign({}, newValue);
113
+ this.searchConfigurationChange.emit(this.searchConfiguration);
113
114
  }
114
115
  }
115
116
  /**
@@ -179,8 +180,7 @@ const PublicNotification$1 = /*@__PURE__*/ proxyCustomElement(class extends HTML
179
180
  * Renders the component.
180
181
  */
181
182
  render() {
182
- const hasSelections = this._selectionSets.length > 0;
183
- 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))));
183
+ 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))));
184
184
  }
185
185
  //--------------------------------------------------------------------------
186
186
  //
@@ -210,9 +210,9 @@ const PublicNotification$1 = /*@__PURE__*/ proxyCustomElement(class extends HTML
210
210
  *
211
211
  * @protected
212
212
  */
213
- _getActionGroup(icon, disabled, pageType, tip) {
213
+ _getActionGroup(icon, pageType, tip) {
214
214
  const groupClass = this.showRefineSelection ? "action-center w-1-4" : "action-center w-1-3";
215
- 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))));
215
+ 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))));
216
216
  }
217
217
  /**
218
218
  * Navigate to the defined page type
@@ -326,6 +326,16 @@ const PublicNotification$1 = /*@__PURE__*/ proxyCustomElement(class extends HTML
326
326
  this._layerSelectionChangeEvt.detail[0] : "";
327
327
  await this._updateAddresseeLayer(id);
328
328
  }
329
+ /**
330
+ * Check if any selection sets exist.
331
+ *
332
+ * @returns true if selection sets exist
333
+ *
334
+ * @protected
335
+ */
336
+ _hasSelections() {
337
+ return this._selectionSets.length > 0;
338
+ }
329
339
  /**
330
340
  * Create the Select page that shows the selection workflows
331
341
  *
@@ -343,7 +353,7 @@ const PublicNotification$1 = /*@__PURE__*/ proxyCustomElement(class extends HTML
343
353
  this._selectionWorkflowType === EWorkflowType.SKETCH ? sketchTip : searchTip;
344
354
  const nameLabelClass = this.customLabelEnabled ? "" : "display-none";
345
355
  return (h("calcite-panel", null, this._getLabel(this._translations.stepTwoFull.replace("{{layer}}", (_a = this.addresseeLayer) === null || _a === void 0 ? void 0 : _a.layer.title)), this._getNotice(noticeText), h("div", { class: "padding-top-sides-1" }, h("map-select-tools", { bufferColor: this.bufferColor, bufferOutlineColor: this.bufferOutlineColor, class: "font-bold", defaultBufferDistance: this.defaultBufferDistance, defaultBufferUnit: this.defaultBufferUnit, enabledLayerIds: this.selectionLayerIds, isUpdate: !!this._activeSelection, mapView: this.mapView, onSelectionSetChange: (evt) => this._updateForSelection(evt), onWorkflowTypeChange: (evt) => this._updateForWorkflowType(evt), ref: (el) => { this._selectTools = el; }, searchConfiguration: this.searchConfiguration, selectLayerView: this.addresseeLayer, selectionSet: this._activeSelection, showBufferTools: this.showSearchSettings })), h("div", { class: "padding-sides-1 padding-bottom-1", style: { "align-items": "end", "display": "flex" } }, h("calcite-icon", { class: "info-blue padding-end-1-2", icon: "feature-layer", scale: "s" }), h("calcite-input-message", { active: true, class: "info-blue", scale: "m" }, this.noResultText && this._numSelected === 0 ? this.noResultText :
346
- this._translations.selectedAddresses.replace("{{n}}", this._numSelected.toString()).replace("{{layer}}", ((_b = this.addresseeLayer) === null || _b === void 0 ? void 0 : _b.layer.title) || ""))), h("div", { class: "padding-sides-1 " + nameLabelClass }, h("calcite-label", { class: "font-bold" }, "Name label", h("calcite-input", { onInput: () => {
356
+ this._translations.selectedAddresses.replace("{{n}}", this._numSelected.toString()).replace("{{layer}}", ((_b = this.addresseeLayer) === null || _b === void 0 ? void 0 : _b.layer.title) || ""))), h("div", { class: "padding-sides-1 " + nameLabelClass }, h("calcite-label", { class: "font-bold" }, "List name", h("calcite-input", { onInput: () => {
347
357
  this.labelChange.emit(this._labelName.value);
348
358
  }, placeholder: "Insert label here...", ref: (el) => { this._labelName = el; }, value: this._customLabel || "" }))), this._getPageNavButtons(this._translations.done, this._numSelected === 0, () => { void this._saveSelection(); }, this._translations.cancel, false, () => { void this._home(); })));
349
359
  }
@@ -354,7 +364,9 @@ const PublicNotification$1 = /*@__PURE__*/ proxyCustomElement(class extends HTML
354
364
  * @protected
355
365
  */
356
366
  _getRefinePage() {
357
- 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 })));
367
+ const hasSelections = this._hasSelections();
368
+ 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 }))) :
369
+ this._getNotice(this._translations.refineTipNoSelections, "padding-sides-1")));
358
370
  }
359
371
  /**
360
372
  * Create the PDF download page that shows the download options
@@ -385,7 +397,8 @@ const PublicNotification$1 = /*@__PURE__*/ proxyCustomElement(class extends HTML
385
397
  */
386
398
  _getDownloadPage(type) {
387
399
  const isPdf = type === EExportType.PDF;
388
- return (h("calcite-panel", null, h("div", null, h("div", { class: "padding-top-sides-1" }, h("calcite-label", { class: "font-bold" }, isPdf ? this._translations.pdfDownloads : this._translations.csvDownloads), h("calcite-label", null, this._translations.notifications)), this._getSelectionLists(), h("div", { class: "margin-side-1 padding-top-1 border-bottom" }), h("div", { class: "padding-top-sides-1" }, h("calcite-label", { layout: "inline" }, h("calcite-checkbox", { disabled: !this._downloadActive, ref: (el) => { this._removeDuplicates = el; } }), this._translations.removeDuplicate)), h("div", { class: isPdf ? "" : "display-none" }, this._getLabel(this._translations.selectPDFLabelOption, false), h("div", { class: "padding-sides-1" }, h("pdf-download", { disabled: !this._downloadActive, layerView: this.addresseeLayer, ref: (el) => { this._downloadTools = el; } }))), h("div", { class: "padding-1 display-flex" }, h("calcite-button", { disabled: !this._downloadActive, onClick: isPdf ? () => this._downloadPDF() : () => this._downloadCSV(), width: "full" }, isPdf ? this._translations.downloadPDF : this._translations.downloadCSV)))));
400
+ const hasSelections = this._hasSelections();
401
+ 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")))));
389
402
  }
390
403
  /**
391
404
  * Create the stacked navigation buttons for a page
@@ -468,7 +481,8 @@ const PublicNotification$1 = /*@__PURE__*/ proxyCustomElement(class extends HTML
468
481
  */
469
482
  _downloadPDF() {
470
483
  const ids = getSelectionIds(this._getDownloadSelectionSets());
471
- void this._downloadTools.downloadPDF(ids, this._removeDuplicates.checked);
484
+ const selectionSetNames = this._selectionSets.map(set => set.label);
485
+ void this._downloadTools.downloadPDF(selectionSetNames, ids, this._removeDuplicates.checked);
472
486
  }
473
487
  /**
474
488
  * Download all selection sets as CSV
@@ -477,7 +491,8 @@ const PublicNotification$1 = /*@__PURE__*/ proxyCustomElement(class extends HTML
477
491
  */
478
492
  _downloadCSV() {
479
493
  const ids = getSelectionIds(this._getDownloadSelectionSets());
480
- void this._downloadTools.downloadCSV(ids, this._removeDuplicates.checked);
494
+ const selectionSetNames = this._selectionSets.map(set => set.label);
495
+ void this._downloadTools.downloadCSV(selectionSetNames, ids, this._removeDuplicates.checked);
481
496
  }
482
497
  /**
483
498
  * Get all enabled selection sets
@@ -748,7 +763,7 @@ const PublicNotification$1 = /*@__PURE__*/ proxyCustomElement(class extends HTML
748
763
  "featureHighlightEnabled": [4, "feature-highlight-enabled"],
749
764
  "mapView": [16],
750
765
  "noResultText": [1, "no-result-text"],
751
- "searchConfiguration": [16],
766
+ "searchConfiguration": [1040],
752
767
  "selectionLayerIds": [16],
753
768
  "showRefineSelection": [4, "show-refine-selection"],
754
769
  "showSearchSettings": [4, "show-search-settings"],
@@ -184,4 +184,4 @@ async function _intersectQuery(geometry, layer) {
184
184
  return layer.queryObjectIds(q);
185
185
  }
186
186
 
187
- export { queryAllFeatures as a, queryExtent as b, queryObjectIds as c, getQueryGeoms as d, queryFeaturesByGeometry as e, getSelectionSetQuery as g, queryFeaturesByID as q };
187
+ export { queryExtent as a, queryObjectIds as b, getQueryGeoms as c, queryFeaturesByGeometry as d, queryFeaturesByID as e, getSelectionSetQuery as g, queryAllFeatures as q };
@@ -7,7 +7,7 @@ import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/
7
7
  import { g as ESelectionType, f as ERefineMode, e as ESelectionMode } from './interfaces3.js';
8
8
  import { l as loadModules } from './loadModules.js';
9
9
  import { a as getMapLayerView, h as highlightFeatures, d as defineCustomElement$1 } from './map-layer-picker2.js';
10
- import { e as queryFeaturesByGeometry } from './queryUtils.js';
10
+ import { d as queryFeaturesByGeometry } from './queryUtils.js';
11
11
  import { s as state } from './publicNotificationStore.js';
12
12
  import { g as getLocaleComponentStrings } from './locale.js';
13
13
  import { d as defineCustomElement$9 } from './action.js';
@@ -149,7 +149,7 @@ const RefineSelection = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
149
149
  const refineSet = this._getRefineSelectionSet(this.selectionSets);
150
150
  const numAdded = (refineSet === null || refineSet === void 0 ? void 0 : refineSet.refineIds.addIds.length) || 0;
151
151
  const numRemoved = (refineSet === null || refineSet === void 0 ? void 0 : refineSet.refineIds.removeIds.length) || 0;
152
- return [(h("calcite-list-item", { label: this._translations.featuresAdded.replace("{{n}}", numAdded.toString()) })), (h("calcite-list-item", { label: this._translations.featuresRemoved.replace("{{n}}", numRemoved.toString()) })), (h("calcite-list-item", { label: this._translations.totalSelected.replace("{{n}}", total.toString()) }))];
152
+ return [(h("calcite-list-item", { label: this._translations.featuresAdded.replace("{{n}}", numAdded.toString()), "non-interactive": true })), (h("calcite-list-item", { label: this._translations.featuresRemoved.replace("{{n}}", numRemoved.toString()), "non-interactive": true })), (h("calcite-list-item", { label: this._translations.totalSelected.replace("{{n}}", total.toString()), "non-interactive": true }))];
153
153
  }
154
154
  /**
155
155
  * Fetch the refine selection set
@@ -16,7 +16,7 @@ import { i as isActivationKey } from './key-acb660e7.js';
16
16
  import { n as numberStringFormatter, c as connectLocalized, d as disconnectLocalized } from './locale-9dd0777b.js';
17
17
  import { s as state } from './publicNotificationStore-b9daaee4.js';
18
18
  import { h as ESelectionType, g as ERefineMode, f as ESelectionMode } from './interfaces-d0d83efa.js';
19
- import { a as getMapLayerView, f as queryFeaturesByGeometry, h as highlightFeatures } from './mapViewUtils-63e118f8.js';
19
+ import { a as getMapLayerView, f as queryFeaturesByGeometry, h as highlightFeatures } from './mapViewUtils-02696ab6.js';
20
20
  import './_commonjsHelpers-d5f9d613.js';
21
21
  import './resources-436ae282.js';
22
22
  import './observers-31601001.js';
@@ -16,7 +16,7 @@ import { i as isPrimaryPointerButton, t as toAriaBoolean, g as getElementProp, a
16
16
  import { c as connectOpenCloseComponent, d as disconnectOpenCloseComponent } from './openCloseComponent-5caff873.js';
17
17
  import { d as debounce } from './debounce-4c884e5c.js';
18
18
  import { c as connectConditionalSlotComponent, d as disconnectConditionalSlotComponent } from './conditionalSlot-d09506c4.js';
19
- import { i as getMapLayerIds, j as getMapLayerHash } from './mapViewUtils-63e118f8.js';
19
+ import { i as getMapLayerIds, j as getMapLayerHash } from './mapViewUtils-02696ab6.js';
20
20
  import { s as state } from './publicNotificationStore-b9daaee4.js';
21
21
  import './resources-436ae282.js';
22
22
  import './interfaces-d0d83efa.js';