@esri/solutions-components 0.3.9 → 0.4.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (79) hide show
  1. package/dist/assets/t9n/public-notification/resources.json +0 -2
  2. package/dist/assets/t9n/public-notification/resources_en.json +0 -2
  3. package/dist/cjs/buffer-tools_6.cjs.entry.js +5 -2
  4. package/dist/cjs/calcite-input-message_5.cjs.entry.js +1342 -18
  5. package/dist/cjs/{calcite-input-message.calcite-notice.map-select-tools.pdf-download.refine-selection-cd8ad61e.js → downloadUtils-27dbd8b9.js} +205 -1337
  6. package/dist/cjs/{index.es-e89ba2a1.js → index.es-40d341ed.js} +3 -13
  7. package/dist/cjs/layer-table.cjs.entry.js +5 -15
  8. package/dist/cjs/loader.cjs.js +1 -1
  9. package/dist/cjs/public-notification.cjs.entry.js +23 -2
  10. package/dist/cjs/solutions-components.cjs.js +1 -1
  11. package/dist/collection/components/layer-table/layer-table.js +4 -16
  12. package/dist/collection/components/map-search/map-search.js +1 -1
  13. package/dist/collection/components/map-select-tools/map-select-tools.js +73 -17
  14. package/dist/collection/components/pdf-download/pdf-download.js +9 -76
  15. package/dist/collection/components/public-notification/public-notification.js +45 -3
  16. package/dist/collection/components/refine-selection/refine-selection.js +1 -1
  17. package/dist/collection/components/refine-selection-tools/refine-selection-tools.js +13 -5
  18. package/dist/collection/demos/buffer-tools.html +1 -1
  19. package/dist/collection/utils/csvUtils.js +4 -0
  20. package/dist/collection/utils/csvUtils.ts +7 -0
  21. package/dist/collection/utils/downloadUtils.js +181 -0
  22. package/dist/collection/utils/downloadUtils.ts +235 -0
  23. package/dist/collection/utils/interfaces.ts +8 -1
  24. package/dist/collection/utils/pdfUtils.js +7 -0
  25. package/dist/collection/utils/pdfUtils.ts +13 -2
  26. package/dist/components/downloadUtils.js +2279 -0
  27. package/dist/components/index.es.js +1 -1
  28. package/dist/components/layer-table.js +5 -16
  29. package/dist/components/map-layer-picker2.js +1 -1
  30. package/dist/components/map-search.js +1 -1
  31. package/dist/components/map-select-tools2.js +69 -19
  32. package/dist/components/pdf-download2.js +10 -2124
  33. package/dist/components/public-notification.js +24 -3
  34. package/dist/components/queryUtils.js +1 -1
  35. package/dist/components/refine-selection-tools2.js +6 -3
  36. package/dist/components/refine-selection2.js +1 -1
  37. package/dist/esm/buffer-tools_6.entry.js +6 -3
  38. package/dist/esm/calcite-combobox_3.entry.js +1 -1
  39. package/dist/esm/calcite-input-message_5.entry.js +1341 -13
  40. package/dist/esm/{calcite-input-message.calcite-notice.map-select-tools.pdf-download.refine-selection-ddd74bd6.js → downloadUtils-76e38a94.js} +206 -1335
  41. package/dist/esm/{index.es-8edafdb2.js → index.es-489f4f08.js} +2 -12
  42. package/dist/esm/layer-table.entry.js +6 -16
  43. package/dist/esm/loader.js +1 -1
  44. package/dist/esm/{mapViewUtils-63e118f8.js → mapViewUtils-02696ab6.js} +1 -1
  45. package/dist/esm/public-notification.entry.js +24 -3
  46. package/dist/esm/solutions-components.js +1 -1
  47. package/dist/solutions-components/demos/buffer-tools.html +1 -1
  48. package/dist/solutions-components/{p-cc2e20c8.js → p-1bfd07e3.js} +1 -1
  49. package/dist/solutions-components/{p-117174e8.entry.js → p-335fce8c.entry.js} +1 -1
  50. package/dist/solutions-components/p-4ef94c6b.entry.js +6 -0
  51. package/dist/solutions-components/p-5d27b47d.entry.js +17 -0
  52. package/dist/solutions-components/p-92cb569a.entry.js +6 -0
  53. package/dist/solutions-components/{p-2a96314a.entry.js → p-a3b60bc9.entry.js} +2 -2
  54. package/dist/solutions-components/{p-98884f44.js → p-bff8aa4e.js} +3 -3
  55. package/dist/solutions-components/p-caa7e7a7.js +437 -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 +235 -0
  59. package/dist/solutions-components/utils/interfaces.ts +8 -1
  60. package/dist/solutions-components/utils/pdfUtils.ts +13 -2
  61. package/dist/types/components/json-editor/assets/monaco-editor/monaco.d.ts +8262 -0
  62. package/dist/types/components/map-select-tools/map-select-tools.d.ts +19 -1
  63. package/dist/types/components/pdf-download/pdf-download.d.ts +0 -18
  64. package/dist/types/components/public-notification/public-notification.d.ts +10 -0
  65. package/dist/types/components/refine-selection-tools/refine-selection-tools.d.ts +2 -2
  66. package/dist/types/components.d.ts +6 -2
  67. package/dist/types/preact.d.ts +2 -1
  68. package/dist/types/utils/downloadUtils.d.ts +40 -0
  69. package/dist/types/utils/interfaces.d.ts +6 -2
  70. package/dist/types/utils/pdfUtils.d.ts +3 -1
  71. package/package.json +1 -1
  72. package/dist/cjs/csvUtils-3a56c6d8.js +0 -54
  73. package/dist/components/csvUtils.js +0 -52
  74. package/dist/esm/csvUtils-23b5418f.js +0 -52
  75. package/dist/solutions-components/p-15f9b0a0.entry.js +0 -6
  76. package/dist/solutions-components/p-238db156.js +0 -416
  77. package/dist/solutions-components/p-3069e3b7.js +0 -21
  78. package/dist/solutions-components/p-6d28f991.entry.js +0 -6
  79. package/dist/solutions-components/p-c5341977.entry.js +0 -6
@@ -54,6 +54,7 @@ const PublicNotification$1 = /*@__PURE__*/ proxyCustomElement(class extends HTML
54
54
  super();
55
55
  this.__registerHost();
56
56
  this.labelChange = createEvent(this, "labelChange", 7);
57
+ this.searchConfigurationChange = createEvent(this, "searchConfigurationChange", 7);
57
58
  this.addresseeLayerIds = [];
58
59
  this.bufferColor = [227, 139, 79, 0.8];
59
60
  this.bufferOutlineColor = [255, 255, 255];
@@ -92,6 +93,25 @@ const PublicNotification$1 = /*@__PURE__*/ proxyCustomElement(class extends HTML
92
93
  this._popupsEnabled = v === null || v === void 0 ? void 0 : v.popup.autoOpenEnabled;
93
94
  }
94
95
  }
96
+ /**
97
+ * Called each time the searchConfiguration prop is changed.
98
+ *
99
+ * @returns Promise when complete
100
+ */
101
+ async watchSearchConfigurationHandler(newValue, oldValue) {
102
+ //TODO adding this here to see if its any different than having in map-select-tools
103
+ // I would have thought that the prop would have made it through on the next render of map-select-tools
104
+ // however we are still seeing a broken search...need to understand why and don't see a clean way to debug in devext
105
+ console.log("PN watchSearchConfigurationHandler");
106
+ console.log("PN newValue");
107
+ console.log(newValue);
108
+ console.log("PN oldValue");
109
+ console.log(oldValue);
110
+ if (JSON.stringify(newValue) !== JSON.stringify(oldValue)) {
111
+ console.log("Emit event from parent");
112
+ this.searchConfigurationChange.emit(newValue);
113
+ }
114
+ }
95
115
  /**
96
116
  * Called each time the selectionSets prop is changed.
97
117
  */
@@ -323,7 +343,7 @@ const PublicNotification$1 = /*@__PURE__*/ proxyCustomElement(class extends HTML
323
343
  this._selectionWorkflowType === EWorkflowType.SKETCH ? sketchTip : searchTip;
324
344
  const nameLabelClass = this.customLabelEnabled ? "" : "display-none";
325
345
  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 :
326
- 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: () => {
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" }, "List name", h("calcite-input", { onInput: () => {
327
347
  this.labelChange.emit(this._labelName.value);
328
348
  }, 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(); })));
329
349
  }
@@ -365,7 +385,7 @@ const PublicNotification$1 = /*@__PURE__*/ proxyCustomElement(class extends HTML
365
385
  */
366
386
  _getDownloadPage(type) {
367
387
  const isPdf = type === EExportType.PDF;
368
- return (h("calcite-panel", null, h("div", null, h("div", { class: "padding-top-sides-1" }, h("calcite-label", { class: "font-bold" }, isPdf ? this._translations.pdfDownloads : this._translations.csvDownloads), h("calcite-label", null, this._translations.notifications)), this._getSelectionLists(), h("div", { class: "margin-side-1 padding-top-1 border-bottom" }), h("div", { class: "padding-top-sides-1" }, h("calcite-label", { layout: "inline" }, h("calcite-checkbox", { disabled: !this._downloadActive, ref: (el) => { this._removeDuplicates = el; } }), this._translations.removeDuplicate)), h("div", { class: isPdf ? "" : "display-none" }, this._getLabel(this._translations.selectPDFLabelOption, false), h("div", { class: "padding-sides-1" }, h("pdf-download", { disabled: !this._downloadActive, layerView: this.addresseeLayer, ref: (el) => { this._downloadTools = el; } }))), h("div", { class: "padding-1 display-flex" }, h("calcite-button", { disabled: !this._downloadActive, onClick: isPdf ? () => this._downloadPDF() : () => this._downloadCSV(), width: "full" }, isPdf ? this._translations.downloadPDF : this._translations.downloadCSV)))));
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.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)))));
369
389
  }
370
390
  /**
371
391
  * Create the stacked navigation buttons for a page
@@ -712,6 +732,7 @@ const PublicNotification$1 = /*@__PURE__*/ proxyCustomElement(class extends HTML
712
732
  get el() { return this; }
713
733
  static get watchers() { return {
714
734
  "mapView": ["mapViewWatchHandler"],
735
+ "searchConfiguration": ["watchSearchConfigurationHandler"],
715
736
  "_selectionSets": ["selectionSetsWatchHandler"],
716
737
  "_pageType": ["pageTypeWatchHandler"]
717
738
  }; }
@@ -727,7 +748,7 @@ const PublicNotification$1 = /*@__PURE__*/ proxyCustomElement(class extends HTML
727
748
  "featureHighlightEnabled": [4, "feature-highlight-enabled"],
728
749
  "mapView": [16],
729
750
  "noResultText": [1, "no-result-text"],
730
- "searchConfiguration": [16],
751
+ "searchConfiguration": [1040],
731
752
  "selectionLayerIds": [16],
732
753
  "showRefineSelection": [4, "show-refine-selection"],
733
754
  "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';
@@ -239,7 +239,7 @@ const RefineSelectionTools = /*@__PURE__*/ proxyCustomElement(class extends HTML
239
239
  return prev;
240
240
  }, []);
241
241
  }
242
- this.refineSelectionGraphicsChange.emit(graphics);
242
+ this.refineSelectionGraphicsChange.emit({ graphics, useOIDs: false });
243
243
  this._clear();
244
244
  });
245
245
  });
@@ -313,7 +313,10 @@ const RefineSelectionTools = /*@__PURE__*/ proxyCustomElement(class extends HTML
313
313
  });
314
314
  });
315
315
  if (this.refineMode === ERefineMode.SUBSET) {
316
- this.refineSelectionGraphicsChange.emit(graphics);
316
+ this.refineSelectionGraphicsChange.emit({
317
+ graphics,
318
+ useOIDs: this.layerViews[0].layer.title === this.layerView.layer.title
319
+ });
317
320
  }
318
321
  else {
319
322
  const oids = Array.isArray(graphics) ? graphics.map(g => { var _a; return g.attributes[(_a = g === null || g === void 0 ? void 0 : g.layer) === null || _a === void 0 ? void 0 : _a.objectIdField]; }) : [];
@@ -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';
@@ -1739,7 +1739,7 @@ const RefineSelectionTools = class {
1739
1739
  return prev;
1740
1740
  }, []);
1741
1741
  }
1742
- this.refineSelectionGraphicsChange.emit(graphics);
1742
+ this.refineSelectionGraphicsChange.emit({ graphics, useOIDs: false });
1743
1743
  this._clear();
1744
1744
  });
1745
1745
  });
@@ -1813,7 +1813,10 @@ const RefineSelectionTools = class {
1813
1813
  });
1814
1814
  });
1815
1815
  if (this.refineMode === ERefineMode.SUBSET) {
1816
- this.refineSelectionGraphicsChange.emit(graphics);
1816
+ this.refineSelectionGraphicsChange.emit({
1817
+ graphics,
1818
+ useOIDs: this.layerViews[0].layer.title === this.layerView.layer.title
1819
+ });
1817
1820
  }
1818
1821
  else {
1819
1822
  const oids = Array.isArray(graphics) ? graphics.map(g => { var _a; return g.attributes[(_a = g === null || g === void 0 ? void 0 : g.layer) === null || _a === void 0 ? void 0 : _a.objectIdField]; }) : [];
@@ -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';