@esri/solutions-components 0.3.2 → 0.3.3

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 (163) hide show
  1. package/dist/assets/t9n/public-notification/resources.json +4 -1
  2. package/dist/assets/t9n/public-notification/resources_en.json +4 -1
  3. package/dist/cjs/buffer-tools_6.cjs.entry.js +8 -7
  4. package/dist/cjs/calcite-combobox_3.cjs.entry.js +38 -25
  5. package/dist/cjs/calcite-input-message_5.cjs.entry.js +272 -21
  6. package/dist/cjs/{csvUtils-18a03353.js → csvUtils-83af7ae1.js} +5 -5
  7. package/dist/cjs/layer-table.cjs.entry.js +3 -3
  8. package/dist/cjs/loader.cjs.js +1 -1
  9. package/dist/cjs/map-search.cjs.entry.js +46 -7
  10. package/dist/cjs/{mapViewUtils-8ea9adc5.js → mapViewUtils-55ac76cb.js} +40 -25
  11. package/dist/cjs/public-notification.cjs.entry.js +101 -18
  12. package/dist/cjs/{publicNotificationStore-aca88430.js → publicNotificationStore-28a8759d.js} +3 -1
  13. package/dist/cjs/solutions-components.cjs.js +1 -1
  14. package/dist/collection/collection-manifest.json +0 -5
  15. package/dist/collection/components/buffer-tools/buffer-tools.js +7 -6
  16. package/dist/collection/components/layer-table/layer-table.js +1 -1
  17. package/dist/collection/components/map-layer-picker/map-layer-picker.js +47 -29
  18. package/dist/collection/components/map-search/map-search.js +66 -7
  19. package/dist/collection/components/map-select-tools/map-select-tools.js +125 -8
  20. package/dist/collection/components/pdf-download/pdf-download.js +32 -8
  21. package/dist/collection/components/public-notification/public-notification.css +46 -41
  22. package/dist/collection/components/public-notification/public-notification.js +267 -19
  23. package/dist/collection/components/refine-selection/refine-selection.js +18 -1
  24. package/dist/collection/components/refine-selection-tools/refine-selection-tools.js +22 -5
  25. package/dist/{solutions-components/demos/config-pdf-download.html → collection/demos/buffer-tools.html} +13 -21
  26. package/dist/collection/demos/index.html +0 -24
  27. package/dist/collection/demos/map-draw-tools.html +17 -17
  28. package/dist/collection/demos/map-layer-picker.html +2 -0
  29. package/dist/collection/demos/map-search.html +16 -15
  30. package/dist/collection/demos/map-select-tools.html +16 -24
  31. package/dist/collection/demos/new-public-notification.html +46 -35
  32. package/dist/collection/demos/pdf-download.html +8 -1
  33. package/dist/collection/utils/csvUtils.js +4 -4
  34. package/dist/collection/utils/csvUtils.ts +6 -4
  35. package/dist/collection/utils/interfaces.ts +65 -1
  36. package/dist/collection/utils/mapViewUtils.js +36 -22
  37. package/dist/collection/utils/mapViewUtils.ts +50 -27
  38. package/dist/collection/utils/publicNotificationStore.js +3 -1
  39. package/dist/collection/utils/publicNotificationStore.ts +3 -1
  40. package/dist/collection/utils/queryUtils.js +2 -2
  41. package/dist/collection/utils/queryUtils.ts +2 -2
  42. package/dist/components/buffer-tools2.js +1 -1
  43. package/dist/components/csvUtils.js +4 -4
  44. package/dist/components/index.d.ts +0 -5
  45. package/dist/components/index.js +0 -5
  46. package/dist/components/layer-table.js +2 -3
  47. package/dist/components/map-layer-picker2.js +177 -28
  48. package/dist/components/map-search.js +47 -7
  49. package/dist/components/map-select-tools2.js +56 -11
  50. package/dist/components/pdf-download2.js +217 -8
  51. package/dist/components/public-notification.js +154 -55
  52. package/dist/components/publicNotificationStore.js +3 -1
  53. package/dist/components/queryUtils.js +3 -3
  54. package/dist/components/refine-selection-tools2.js +9 -8
  55. package/dist/components/refine-selection2.js +3 -1
  56. package/dist/esm/buffer-tools_6.entry.js +8 -7
  57. package/dist/esm/calcite-combobox_3.entry.js +38 -25
  58. package/dist/esm/calcite-input-message_5.entry.js +271 -20
  59. package/dist/esm/{csvUtils-edc0c2a8.js → csvUtils-eb231cfb.js} +5 -5
  60. package/dist/esm/layer-table.entry.js +3 -3
  61. package/dist/esm/loader.js +1 -1
  62. package/dist/esm/map-search.entry.js +46 -7
  63. package/dist/esm/{mapViewUtils-31d2c2bb.js → mapViewUtils-e5d8a1e1.js} +39 -25
  64. package/dist/esm/public-notification.entry.js +101 -18
  65. package/dist/esm/{publicNotificationStore-3e762eea.js → publicNotificationStore-8e9cb73b.js} +3 -1
  66. package/dist/esm/solutions-components.js +1 -1
  67. package/dist/{collection/demos/config-pdf-download.html → solutions-components/demos/buffer-tools.html} +13 -21
  68. package/dist/solutions-components/demos/index.html +0 -24
  69. package/dist/solutions-components/demos/map-draw-tools.html +17 -17
  70. package/dist/solutions-components/demos/map-layer-picker.html +2 -0
  71. package/dist/solutions-components/demos/map-search.html +16 -15
  72. package/dist/solutions-components/demos/map-select-tools.html +16 -24
  73. package/dist/solutions-components/demos/new-public-notification.html +46 -35
  74. package/dist/solutions-components/demos/pdf-download.html +8 -1
  75. package/dist/solutions-components/p-07593958.entry.js +6 -0
  76. package/dist/solutions-components/p-3fa9b3c8.js +36 -0
  77. package/dist/solutions-components/p-9b5a9117.entry.js +12 -0
  78. package/dist/solutions-components/{p-15cd8a97.js → p-9c1ebc90.js} +1 -1
  79. package/dist/solutions-components/{p-c76f8ff7.entry.js → p-a516c658.entry.js} +1 -1
  80. package/dist/solutions-components/{p-ad42039f.js → p-b668daf8.js} +2 -2
  81. package/dist/solutions-components/p-bfa95147.entry.js +17 -0
  82. package/dist/solutions-components/p-d09a168c.entry.js +6 -0
  83. package/dist/solutions-components/{p-fa6046a8.entry.js → p-fc9609e6.entry.js} +2 -2
  84. package/dist/solutions-components/solutions-components.esm.js +1 -1
  85. package/dist/solutions-components/utils/csvUtils.ts +6 -4
  86. package/dist/solutions-components/utils/interfaces.ts +65 -1
  87. package/dist/solutions-components/utils/mapViewUtils.ts +50 -27
  88. package/dist/solutions-components/utils/publicNotificationStore.ts +3 -1
  89. package/dist/solutions-components/utils/queryUtils.ts +2 -2
  90. package/dist/types/components/buffer-tools/buffer-tools.d.ts +4 -3
  91. package/dist/types/components/map-layer-picker/map-layer-picker.d.ts +22 -11
  92. package/dist/types/components/map-search/map-search.d.ts +18 -1
  93. package/dist/types/components/map-select-tools/map-select-tools.d.ts +31 -1
  94. package/dist/types/components/pdf-download/pdf-download.d.ts +7 -2
  95. package/dist/types/components/public-notification/public-notification.d.ts +98 -4
  96. package/dist/types/components/refine-selection/refine-selection.d.ts +5 -0
  97. package/dist/types/components/refine-selection-tools/refine-selection-tools.d.ts +6 -1
  98. package/dist/types/components.d.ts +154 -180
  99. package/dist/types/preact.d.ts +0 -10
  100. package/dist/types/utils/csvUtils.d.ts +1 -1
  101. package/dist/types/utils/interfaces.d.ts +56 -1
  102. package/dist/types/utils/mapViewUtils.d.ts +19 -9
  103. package/dist/types/utils/publicNotificationStore.d.ts +1 -0
  104. package/package.json +1 -1
  105. package/dist/cjs/check-list.cjs.entry.js +0 -103
  106. package/dist/cjs/config-buffer-tools.cjs.entry.js +0 -125
  107. package/dist/cjs/config-draw-tools.cjs.entry.js +0 -85
  108. package/dist/cjs/config-layer-picker.cjs.entry.js +0 -113
  109. package/dist/cjs/config-pdf-download.cjs.entry.js +0 -117
  110. package/dist/cjs/labelFormats-3236d2e0.js +0 -212
  111. package/dist/collection/components/check-list/check-list.css +0 -3
  112. package/dist/collection/components/check-list/check-list.js +0 -179
  113. package/dist/collection/components/config-buffer-tools/config-buffer-tools.css +0 -34
  114. package/dist/collection/components/config-buffer-tools/config-buffer-tools.js +0 -209
  115. package/dist/collection/components/config-draw-tools/config-draw-tools.css +0 -17
  116. package/dist/collection/components/config-draw-tools/config-draw-tools.js +0 -150
  117. package/dist/collection/components/config-layer-picker/config-layer-picker.css +0 -17
  118. package/dist/collection/components/config-layer-picker/config-layer-picker.js +0 -218
  119. package/dist/collection/components/config-pdf-download/config-pdf-download.css +0 -17
  120. package/dist/collection/components/config-pdf-download/config-pdf-download.js +0 -183
  121. package/dist/collection/demos/check-list.html +0 -65
  122. package/dist/collection/demos/config-buffer-tools.html +0 -92
  123. package/dist/collection/demos/config-draw-tools.html +0 -58
  124. package/dist/collection/demos/config-layer-picker.html +0 -97
  125. package/dist/components/check-list.d.ts +0 -11
  126. package/dist/components/check-list.js +0 -11
  127. package/dist/components/check-list2.js +0 -131
  128. package/dist/components/config-buffer-tools.d.ts +0 -11
  129. package/dist/components/config-buffer-tools.js +0 -187
  130. package/dist/components/config-draw-tools.d.ts +0 -11
  131. package/dist/components/config-draw-tools.js +0 -121
  132. package/dist/components/config-layer-picker.d.ts +0 -11
  133. package/dist/components/config-layer-picker.js +0 -163
  134. package/dist/components/config-pdf-download.d.ts +0 -11
  135. package/dist/components/config-pdf-download.js +0 -154
  136. package/dist/components/labelFormats.js +0 -210
  137. package/dist/components/mapViewUtils.js +0 -129
  138. package/dist/esm/check-list.entry.js +0 -99
  139. package/dist/esm/config-buffer-tools.entry.js +0 -121
  140. package/dist/esm/config-draw-tools.entry.js +0 -81
  141. package/dist/esm/config-layer-picker.entry.js +0 -109
  142. package/dist/esm/config-pdf-download.entry.js +0 -113
  143. package/dist/esm/labelFormats-b37958c3.js +0 -210
  144. package/dist/solutions-components/demos/check-list.html +0 -65
  145. package/dist/solutions-components/demos/config-buffer-tools.html +0 -92
  146. package/dist/solutions-components/demos/config-draw-tools.html +0 -58
  147. package/dist/solutions-components/demos/config-layer-picker.html +0 -97
  148. package/dist/solutions-components/p-16a0e65a.entry.js +0 -6
  149. package/dist/solutions-components/p-35078393.entry.js +0 -17
  150. package/dist/solutions-components/p-3d72bba6.entry.js +0 -6
  151. package/dist/solutions-components/p-3e444242.entry.js +0 -6
  152. package/dist/solutions-components/p-67afea92.entry.js +0 -12
  153. package/dist/solutions-components/p-7dcab29d.js +0 -36
  154. package/dist/solutions-components/p-89f7b02a.entry.js +0 -6
  155. package/dist/solutions-components/p-906b7b96.entry.js +0 -6
  156. package/dist/solutions-components/p-99c98510.entry.js +0 -6
  157. package/dist/solutions-components/p-b1a3605f.entry.js +0 -6
  158. package/dist/solutions-components/p-e99b1247.js +0 -6
  159. package/dist/types/components/check-list/check-list.d.ts +0 -57
  160. package/dist/types/components/config-buffer-tools/config-buffer-tools.d.ts +0 -92
  161. package/dist/types/components/config-draw-tools/config-draw-tools.d.ts +0 -58
  162. package/dist/types/components/config-layer-picker/config-layer-picker.d.ts +0 -83
  163. package/dist/types/components/config-pdf-download/config-pdf-download.d.ts +0 -81
@@ -34,6 +34,7 @@ export class RefineSelection {
34
34
  */
35
35
  this._addEnabled = true;
36
36
  this.addresseeLayer = undefined;
37
+ this.enabledLayerIds = [];
37
38
  this.mapView = undefined;
38
39
  this.selectionSets = [];
39
40
  this.GraphicsLayer = undefined;
@@ -66,7 +67,7 @@ export class RefineSelection {
66
67
  * Renders the component.
67
68
  */
68
69
  render() {
69
- return (h(Host, null, h("div", { class: "padding-1" }, h("div", null, h("calcite-radio-group", { class: "w-100", onCalciteRadioGroupChange: (evt) => this._modeChanged(evt) }, h("calcite-radio-group-item", { checked: this._addEnabled, class: "w-50", onClick: () => this._setSelectionMode(ESelectionMode.ADD), value: ESelectionMode.ADD }, this._translations.add), h("calcite-radio-group-item", { checked: !this._addEnabled, class: "w-50", onClick: () => this._setSelectionMode(ESelectionMode.REMOVE), value: ESelectionMode.REMOVE }, this._translations.remove)), h("refine-selection-tools", { border: true, ids: utils.getSelectionIds(this.selectionSets), layerViews: [this.addresseeLayer], mapView: this.mapView, mode: this._addEnabled ? ESelectionMode.ADD : ESelectionMode.REMOVE, ref: (el) => { this._refineTools = el; }, useLayerPicker: false })), h("br", null), (h("calcite-list", { class: "list-border" }, this._getRefineSelectionSetList())))));
70
+ return (h(Host, null, h("div", { class: "padding-1" }, h("div", null, h("calcite-radio-group", { class: "w-100", onCalciteRadioGroupChange: (evt) => this._modeChanged(evt) }, h("calcite-radio-group-item", { checked: this._addEnabled, class: "w-50", onClick: () => this._setSelectionMode(ESelectionMode.ADD), value: ESelectionMode.ADD }, this._translations.add), h("calcite-radio-group-item", { checked: !this._addEnabled, class: "w-50", onClick: () => this._setSelectionMode(ESelectionMode.REMOVE), value: ESelectionMode.REMOVE }, this._translations.remove)), h("refine-selection-tools", { border: true, enabledLayerIds: this.enabledLayerIds, ids: utils.getSelectionIds(this.selectionSets), layerViews: [this.addresseeLayer], mapView: this.mapView, mode: this._addEnabled ? ESelectionMode.ADD : ESelectionMode.REMOVE, ref: (el) => { this._refineTools = el; }, useLayerPicker: false })), h("br", null), (h("calcite-list", { class: "list-border" }, this._getRefineSelectionSetList())))));
70
71
  }
71
72
  //--------------------------------------------------------------------------
72
73
  //
@@ -283,6 +284,22 @@ export class RefineSelection {
283
284
  "text": "esri/views/layers/FeatureLayerView: https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-FeatureLayerView.html"
284
285
  }
285
286
  },
287
+ "enabledLayerIds": {
288
+ "type": "unknown",
289
+ "mutable": false,
290
+ "complexType": {
291
+ "original": "string[]",
292
+ "resolved": "string[]",
293
+ "references": {}
294
+ },
295
+ "required": false,
296
+ "optional": false,
297
+ "docs": {
298
+ "tags": [],
299
+ "text": "string[]: Optional list of enabled layer ids\r\n If empty all layers will be available"
300
+ },
301
+ "defaultValue": "[]"
302
+ },
286
303
  "mapView": {
287
304
  "type": "unknown",
288
305
  "mutable": false,
@@ -28,7 +28,7 @@ import { getLocaleComponentStrings } from "../../utils/locale";
28
28
  export class RefineSelectionTools {
29
29
  constructor() {
30
30
  /**
31
- * {<layer title>: Graphic[]}: Collection of graphics returned from queries to the layer
31
+ * {<layer id>: Graphic[]}: Collection of graphics returned from queries to the layer
32
32
  */
33
33
  this._featuresCollection = {};
34
34
  /**
@@ -41,6 +41,7 @@ export class RefineSelectionTools {
41
41
  this._undoStack = [];
42
42
  this.active = false;
43
43
  this.border = false;
44
+ this.enabledLayerIds = [];
44
45
  this.graphics = undefined;
45
46
  this.ids = [];
46
47
  this.layerView = undefined;
@@ -130,7 +131,7 @@ export class RefineSelectionTools {
130
131
  render() {
131
132
  const showLayerPickerClass = this.useLayerPicker ? "div-visible" : "div-not-visible";
132
133
  const drawClass = this.border ? " border" : "";
133
- return (h(Host, null, h("div", null, h("map-layer-picker", { class: showLayerPickerClass, mapView: this.mapView, onLayerSelectionChange: (evt) => { void this._layerSelectionChange(evt); }, selectedLayers: this.layerViews.map(l => l.layer.title), selectionMode: "single" }), h("div", { class: "margin-top-1" + drawClass }, h("div", { class: "esri-sketch esri-widget" }, h("div", { class: "esri-sketch__panel" }, h("div", { class: "esri-sketch__tool-section esri-sketch__section" }, h("calcite-action", { disabled: !this._selectEnabled, icon: "select", onClick: () => this._setSelectionMode(ESelectionType.POINT), scale: "s", text: this._translations.select })), h("div", { class: "esri-sketch__tool-section esri-sketch__section" }, h("calcite-action", { disabled: !this._selectEnabled, icon: "line", onClick: () => this._setSelectionMode(ESelectionType.LINE), scale: "s", text: this._translations.selectLine }), h("calcite-action", { disabled: !this._selectEnabled, icon: "polygon", onClick: () => this._setSelectionMode(ESelectionType.POLY), scale: "s", text: this._translations.selectPolygon }), h("calcite-action", { disabled: !this._selectEnabled, icon: "rectangle", onClick: () => this._setSelectionMode(ESelectionType.RECT), scale: "s", text: this._translations.selectRectangle })), h("div", { class: "esri-sketch__tool-section esri-sketch__section" }, h("calcite-action", { disabled: this._undoStack.length === 0, icon: "undo", onClick: () => this._undo(), scale: "s", text: this._translations.undo }), h("calcite-action", { disabled: this._redoStack.length === 0, icon: "redo", onClick: () => this._redo(), scale: "s", text: this._translations.redo }))))))));
134
+ return (h(Host, null, h("div", null, h("map-layer-picker", { class: showLayerPickerClass, enabledLayerIds: this.enabledLayerIds, mapView: this.mapView, onLayerSelectionChange: (evt) => { void this._layerSelectionChange(evt); }, selectedLayerIds: this.layerViews.map(l => l.layer.id), selectionMode: "single" }), h("div", { class: "margin-top-1" + drawClass }, h("div", { class: "esri-sketch esri-widget" }, h("div", { class: "esri-sketch__panel" }, h("div", { class: "esri-sketch__tool-section esri-sketch__section" }, h("calcite-action", { disabled: !this._selectEnabled, icon: "select", onClick: () => this._setSelectionMode(ESelectionType.POINT), scale: "s", text: this._translations.select })), h("div", { class: "esri-sketch__tool-section esri-sketch__section" }, h("calcite-action", { disabled: !this._selectEnabled, icon: "line", onClick: () => this._setSelectionMode(ESelectionType.LINE), scale: "s", text: this._translations.selectLine }), h("calcite-action", { disabled: !this._selectEnabled, icon: "polygon", onClick: () => this._setSelectionMode(ESelectionType.POLY), scale: "s", text: this._translations.selectPolygon }), h("calcite-action", { disabled: !this._selectEnabled, icon: "rectangle", onClick: () => this._setSelectionMode(ESelectionType.RECT), scale: "s", text: this._translations.selectRectangle })), h("div", { class: "esri-sketch__tool-section esri-sketch__section" }, h("calcite-action", { disabled: this._undoStack.length === 0, icon: "undo", onClick: () => this._undo(), scale: "s", text: this._translations.undo }), h("calcite-action", { disabled: this._redoStack.length === 0, icon: "redo", onClick: () => this._redo(), scale: "s", text: this._translations.redo }))))))));
134
135
  }
135
136
  //--------------------------------------------------------------------------
136
137
  //
@@ -257,8 +258,8 @@ export class RefineSelectionTools {
257
258
  async _layerSelectionChange(evt) {
258
259
  if (Array.isArray(evt.detail) && evt.detail.length > 0) {
259
260
  this._selectEnabled = true;
260
- const layerPromises = evt.detail.map(title => {
261
- return getMapLayerView(this.mapView, title);
261
+ const layerPromises = evt.detail.map(id => {
262
+ return getMapLayerView(this.mapView, id);
262
263
  });
263
264
  return Promise.all(layerPromises).then((layerViews) => {
264
265
  this.layerViews = layerViews;
@@ -305,7 +306,7 @@ export class RefineSelectionTools {
305
306
  */
306
307
  async _selectFeatures(geom) {
307
308
  const queryFeaturePromises = this.layerViews.map(layerView => {
308
- this._featuresCollection[layerView.layer.title] = [];
309
+ this._featuresCollection[layerView.layer.id] = [];
309
310
  return queryFeaturesByGeometry(0, layerView.layer, geom, this._featuresCollection);
310
311
  });
311
312
  return Promise.all(queryFeaturePromises).then(async (response) => {
@@ -455,6 +456,22 @@ export class RefineSelectionTools {
455
456
  "reflect": false,
456
457
  "defaultValue": "false"
457
458
  },
459
+ "enabledLayerIds": {
460
+ "type": "unknown",
461
+ "mutable": false,
462
+ "complexType": {
463
+ "original": "string[]",
464
+ "resolved": "string[]",
465
+ "references": {}
466
+ },
467
+ "required": false,
468
+ "optional": false,
469
+ "docs": {
470
+ "tags": [],
471
+ "text": "string[]: Optional list of enabled layer ids\r\n If empty all layers will be available"
472
+ },
473
+ "defaultValue": "[]"
474
+ },
458
475
  "graphics": {
459
476
  "type": "unknown",
460
477
  "mutable": true,
@@ -5,7 +5,7 @@
5
5
  name="viewport"
6
6
  content="initial-scale=1,maximum-scale=1,user-scalable=no"
7
7
  />
8
- <title>Config PDF Download</title>
8
+ <title>Buffer Tools</title>
9
9
  <!--
10
10
  | Copyright 2022 Esri
11
11
  |
@@ -22,7 +22,7 @@
22
22
  | limitations under the License.
23
23
  -->
24
24
  <style>
25
- .map-div {
25
+ #viewDiv {
26
26
  padding: 0;
27
27
  margin: 0;
28
28
  height: 100%;
@@ -39,6 +39,9 @@
39
39
  padding: 1rem;
40
40
  border: 1px solid;
41
41
  }
42
+ .column[dir="rtl"] {
43
+ float: left;
44
+ }
42
45
  </style>
43
46
 
44
47
  <link
@@ -51,39 +54,28 @@
51
54
  <script src="https://js.arcgis.com/4.25/"></script>
52
55
  <script type="module" src="../solutions-components.esm.js"></script>
53
56
  <script>
54
- require(["esri/WebMap", "esri/views/MapView"], (
55
- WebMap,
57
+ require(["esri/Map", "esri/views/MapView"], (
58
+ Map,
56
59
  MapView
57
60
  ) => {
58
- var webMap = new WebMap({
59
- portalItem: {
60
- id: "6a55f6678208461bb7a26d9e418a00bc"
61
- }
61
+
62
+ const map = new Map({
63
+ basemap: "topo-vector"
62
64
  });
63
65
 
64
66
  const demo = document.getElementById("demo");
65
67
  demo.mapView = new MapView({
66
68
  container: "viewDiv",
67
- map: webMap,
69
+ map: map,
68
70
  zoom: 5,
69
71
  center: [-98, 42]
70
72
  });
71
73
  });
72
-
73
- function showResults() {
74
- const demo = document.getElementById("demo");
75
- demo?.getConfigInfo().then(configInfo => {
76
- alert(JSON.stringify(configInfo));
77
- });
78
- };
79
74
  </script>
80
75
  </head>
81
76
 
82
77
  <body>
83
- <div id="viewDiv" class="map-div"></div>
84
- <div class="over-map column">
85
- <config-pdf-download id="demo"></config-pdf-download>
86
- <calcite-button onclick="showResults()">Demo Results</calcite-button>
87
- </div>
78
+ <div id="viewDiv"></div>
79
+ <buffer-tools id="demo" class="over-map column" distance="10" unit="miles"></map-search>
88
80
  </body>
89
81
  </html>
@@ -124,30 +124,6 @@
124
124
  </div>
125
125
  </div>
126
126
  </div>
127
- <div>
128
- <h3>Config Public Notification Examples!</h3>
129
- <div>
130
- <div class="demo-column">
131
- <ul class="nav">
132
- <li>
133
- <calcite-link href="./config-buffer-tools.html" target="_blank">&lt;config-buffer-tools&gt;</calcite-link>
134
- </li>
135
- <li>
136
- <calcite-link href="./config-draw-tools.html" target="_blank">&lt;config-draw-tools&gt;</calcite-link>
137
- </li>
138
- <li>
139
- <calcite-link href="./config-layer-picker.html" target="_blank">&lt;config-layer-picker&gt;</calcite-link>
140
- </li>
141
- <li>
142
- <calcite-link href="./config-pdf-download.html" target="_blank">&lt;config-pdf-download&gt;</calcite-link>
143
- </li>
144
- <li>
145
- <calcite-link href="./check-list.html" target="_blank">&lt;check-list&gt;</calcite-link>
146
- </li>
147
- </ul>
148
- </div>
149
- </div>
150
- </div>
151
127
 
152
128
  <div>
153
129
  <h3>Roadway Management</h3>
@@ -49,27 +49,27 @@
49
49
  <link rel="stylesheet" href="https://webapps-cdn.esri.com/CDN/fonts/v1.4.1/fonts.css" />
50
50
  <link rel="stylesheet" href="../solutions-components.css" type="text/css">
51
51
 
52
+ <script src="https://js.arcgis.com/4.25/"></script>
52
53
  <script type="module" src="../solutions-components.esm.js"></script>
53
- <script type="module">
54
- import Map from 'https://js.arcgis.com/4.25/@arcgis/core/Map.js';
55
- import MapView from 'https://js.arcgis.com/4.25/@arcgis/core/views/MapView.js';
56
- import Sketch from 'https://js.arcgis.com/4.25/@arcgis/core/widgets/Sketch.js';
57
- import GraphicsLayer from 'https://js.arcgis.com/4.25/@arcgis/core/layers/GraphicsLayer.js';
54
+ <script>
55
+ require(["esri/WebMap", "esri/views/MapView", "esri/widgets/Legend"], (
56
+ WebMap,
57
+ MapView,
58
+ Legend
59
+ ) => {
58
60
 
59
- const map = new Map({
60
- basemap: "topo-vector"
61
- });
61
+ const map = new Map({
62
+ basemap: "topo-vector"
63
+ });
62
64
 
63
- const demo = document.getElementById("demo");
64
- demo.mapView = new MapView({
65
- container: "viewDiv",
66
- map: map,
67
- zoom: 5,
68
- center: [-98, 42]
65
+ const demo = document.getElementById("demo");
66
+ demo.mapView = new MapView({
67
+ container: "viewDiv",
68
+ map: map,
69
+ zoom: 5,
70
+ center: [-98, 42]
71
+ });
69
72
  });
70
-
71
- demo.Sketch = Sketch;
72
- demo.GraphicsLayer = GraphicsLayer;
73
73
  </script>
74
74
  </head>
75
75
 
@@ -68,6 +68,8 @@
68
68
  zoom: 5,
69
69
  center: [-98, 42]
70
70
  });
71
+
72
+ demo.enabledLayerIds = ["Colorado14ers_916"];
71
73
  });
72
74
  </script>
73
75
  </head>
@@ -51,25 +51,26 @@
51
51
  <link rel="stylesheet" href="https://webapps-cdn.esri.com/CDN/fonts/v1.4.1/fonts.css" />
52
52
  <link rel="stylesheet" href="../solutions-components.css" type="text/css">
53
53
 
54
+ <script src="https://js.arcgis.com/4.25/"></script>
54
55
  <script type="module" src="../solutions-components.esm.js"></script>
55
- <script type="module">
56
- import Map from 'https://js.arcgis.com/4.25/@arcgis/core/Map.js';
57
- import MapView from 'https://js.arcgis.com/4.25/@arcgis/core/views/MapView.js';
58
- import Search from 'https://js.arcgis.com/4.25/@arcgis/core/widgets/Search.js';
56
+ <script>
57
+ require(["esri/Map", "esri/views/MapView"], (
58
+ Map,
59
+ MapView
60
+ ) => {
59
61
 
60
- const map = new Map({
61
- basemap: "topo-vector"
62
- });
62
+ const map = new Map({
63
+ basemap: "topo-vector"
64
+ });
63
65
 
64
- const demo = document.getElementById("demo");
65
- demo.mapView = new MapView({
66
- container: "viewDiv",
67
- map: map,
68
- zoom: 5,
69
- center: [-98, 42]
66
+ const demo = document.getElementById("demo");
67
+ demo.mapView = new MapView({
68
+ container: "viewDiv",
69
+ map: map,
70
+ zoom: 5,
71
+ center: [-98, 42]
72
+ });
70
73
  });
71
-
72
- demo.Search = Search;
73
74
  </script>
74
75
  </head>
75
76
 
@@ -51,33 +51,25 @@
51
51
  <link rel="stylesheet" href="https://webapps-cdn.esri.com/CDN/fonts/v1.4.1/fonts.css" />
52
52
  <link rel="stylesheet" href="../solutions-components.css" type="text/css">
53
53
 
54
+ <script src="https://js.arcgis.com/4.25/"></script>
54
55
  <script type="module" src="../solutions-components.esm.js"></script>
55
- <script type="module">
56
- import Map from 'https://js.arcgis.com/4.25/@arcgis/core/Map.js';
57
- import MapView from 'https://js.arcgis.com/4.25/@arcgis/core/views/MapView.js';
58
- import Sketch from 'https://js.arcgis.com/4.25/@arcgis/core/widgets/Sketch.js';
59
- import GraphicsLayer from 'https://js.arcgis.com/4.25/@arcgis/core/layers/GraphicsLayer.js';
60
- import Search from 'https://js.arcgis.com/4.25/@arcgis/core/widgets/Search.js';
61
- import Graphic from 'https://js.arcgis.com/4.25/@arcgis/core/Graphic.js';
62
- import SketchViewModel from 'https://js.arcgis.com/4.25/@arcgis/core/widgets/Sketch/SketchViewModel.js';
56
+ <script>
57
+ require(["esri/Map", "esri/views/MapView"], (
58
+ Map,
59
+ MapView
60
+ ) => {
61
+ const map = new Map({
62
+ basemap: "topo-vector"
63
+ });
63
64
 
64
- const map = new Map({
65
- basemap: "topo-vector"
65
+ const demo = document.getElementById("demo");
66
+ demo.mapView = new MapView({
67
+ container: "viewDiv",
68
+ map: map,
69
+ zoom: 5,
70
+ center: [-98, 42]
71
+ });
66
72
  });
67
-
68
- const demo = document.getElementById("demo");
69
- demo.mapView = new MapView({
70
- container: "viewDiv",
71
- map: map,
72
- zoom: 5,
73
- center: [-98, 42]
74
- });
75
-
76
- demo.Sketch = Sketch;
77
- demo.GraphicsLayer = GraphicsLayer;
78
- demo.Search = Search;
79
- demo.Graphic = Graphic;
80
- demo.SketchViewModel = SketchViewModel;
81
73
  </script>
82
74
  </head>
83
75
 
@@ -60,47 +60,58 @@
60
60
  <link rel="stylesheet" href="https://webapps-cdn.esri.com/CDN/fonts/v1.4.1/fonts.css" />
61
61
  <link rel="stylesheet" href="../solutions-components.css" type="text/css">
62
62
 
63
+ <script src="https://js.arcgis.com/4.25/"></script>
63
64
  <script type="module" src="../solutions-components.esm.js"></script>
64
65
 
65
- <script type="module">
66
- import WebMap from 'https://js.arcgis.com/4.25/@arcgis/core/WebMap.js';
67
- import MapView from 'https://js.arcgis.com/4.25/@arcgis/core/views/MapView.js';
68
- import Legend from 'https://js.arcgis.com/4.25/@arcgis/core/widgets/Legend.js';
69
- import Sketch from 'https://js.arcgis.com/4.25/@arcgis/core/widgets/Sketch.js';
70
- import GraphicsLayer from 'https://js.arcgis.com/4.25/@arcgis/core/layers/GraphicsLayer.js';
71
- import Search from 'https://js.arcgis.com/4.25/@arcgis/core/widgets/Search.js';
72
- import Graphic from 'https://js.arcgis.com/4.25/@arcgis/core/Graphic.js';
73
- import SketchViewModel from 'https://js.arcgis.com/4.25/@arcgis/core/widgets/Sketch/SketchViewModel.js';
74
- import * as geometryEngine from 'https://js.arcgis.com/4.25/@arcgis/core/geometry/geometryEngine.js';
75
-
76
- var webMap = new WebMap({
77
- portalItem: {
78
- // solutions
79
- // id: "3715f4899bea4b2a948347c5c2357e58"
80
- // InstantApps
81
- id: "863e4f6f2a7840db896cc1b1606d552d"
82
- }
83
- });
66
+ <script>
67
+ require(["esri/WebMap", "esri/views/MapView", "esri/widgets/Legend"], (
68
+ WebMap,
69
+ MapView,
70
+ Legend
71
+ ) => {
72
+ var webMap = new WebMap({
73
+ portalItem: {
74
+ // solutions
75
+ // id: "3715f4899bea4b2a948347c5c2357e58"
76
+ // InstantApps
77
+ id: "863e4f6f2a7840db896cc1b1606d552d"
78
+ }
79
+ });
84
80
 
85
- const demo = document.getElementById("demo");
86
- demo.mapView = new MapView({
87
- container: "viewDiv",
88
- map: webMap
89
- });
81
+ const demo = document.getElementById("demo");
82
+ demo.mapView = new MapView({
83
+ container: "viewDiv",
84
+ map: webMap
85
+ });
90
86
 
91
- demo.mapView.when(() => {
92
- const legend = new Legend({
93
- view: demo.mapView
87
+ demo.mapView.when(() => {
88
+ const legend = new Legend({
89
+ view: demo.mapView
90
+ });
91
+ demo.mapView.ui.add(legend, "top-left");
94
92
  });
95
- demo.mapView.ui.add(legend, "top-left");
93
+ demo.addresseeLayerIds = ["18434515eb8-layer-12"];
94
+ demo.defaultBufferDistance = 100;
95
+ demo.defaultBufferUnit = "kilometers";
96
+ demo.exportOptions = {
97
+ csvOptions: {
98
+ enabled: true, // I question if this should be exposed
99
+ addColumnTitle: false
100
+ },
101
+ pdfOptions: {
102
+ enabled: true, // I question if this should be exposed
103
+ enabledSizeValues: [6,10,14,20]
104
+ }
105
+ };
106
+ demo.featureEffect = {
107
+ includedEffect: "invert(100%)",
108
+ excludedEffect: "blur(5px)"
109
+ };
110
+ demo.featureHighlightEnabled = true;
111
+ demo.noResultText = "No results found";
112
+ demo.selectionLayerIds = ["1843422bf6b-layer-7"];
113
+ demo.showSearchSettings = false;
96
114
  });
97
-
98
- demo.Sketch = Sketch;
99
- demo.GraphicsLayer = GraphicsLayer;
100
- demo.Search = Search;
101
- demo.Graphic = Graphic;
102
- demo.SketchViewModel = SketchViewModel;
103
- demo.geometryEngine = geometryEngine;
104
115
  </script>
105
116
  </head>
106
117
 
@@ -39,9 +39,16 @@
39
39
  <link rel="stylesheet" href="../solutions-components.css" type="text/css">
40
40
 
41
41
  <script type="module" src="../solutions-components.esm.js"></script>
42
+ <script>
43
+ function init() {
44
+ const demo = document.getElementById("demo");
45
+ demo.enabledSizeValues = [6,10];
46
+ demo.disabled = false;
47
+ }
48
+ </script>
42
49
  </head>
43
50
 
44
- <body>
51
+ <body onload="init()">
45
52
  <pdf-download class="column over-map" id="demo"></pdf-download>
46
53
  </body>
47
54
  </html>
@@ -28,7 +28,7 @@ import { queryFeaturesByID } from "./queryUtils";
28
28
  *
29
29
  * @returns Promise when the function has completed
30
30
  */
31
- export async function exportCSV(layerView, ids) {
31
+ export async function exportCSV(layerView, ids, addColumnTitle) {
32
32
  const featureSet = await queryFeaturesByID(ids, layerView.layer);
33
33
  const attributes = featureSet.features.map(f => f.attributes);
34
34
  const fieldNames = {};
@@ -38,7 +38,7 @@ export async function exportCSV(layerView, ids) {
38
38
  fieldNames[k] = k;
39
39
  }
40
40
  });
41
- _downloadCSVFile(fieldNames, attributes, `notify-${Date.now().toString()}`);
41
+ _downloadCSVFile(fieldNames, attributes, `notify-${Date.now().toString()}`, addColumnTitle);
42
42
  }
43
43
  /**
44
44
  * Download the CSV file
@@ -51,8 +51,8 @@ export async function exportCSV(layerView, ids) {
51
51
  *
52
52
  * @returns void
53
53
  */
54
- function _downloadCSVFile(fieldNames, attributes, fileTitle) {
55
- if (fieldNames) {
54
+ function _downloadCSVFile(fieldNames, attributes, fileTitle, addColumnTitle) {
55
+ if (addColumnTitle && fieldNames) {
56
56
  attributes.unshift(fieldNames);
57
57
  }
58
58
  // format values to string so it doesn't get tripped up when a value has a comma
@@ -28,7 +28,8 @@ import { queryFeaturesByID } from "./queryUtils";
28
28
  */
29
29
  export async function exportCSV(
30
30
  layerView: __esri.FeatureLayerView,
31
- ids: number[]
31
+ ids: number[],
32
+ addColumnTitle: boolean
32
33
  ): Promise<void> {
33
34
  const featureSet = await queryFeaturesByID(ids, layerView.layer);
34
35
  const attributes = featureSet.features.map(f => f.attributes);
@@ -39,7 +40,7 @@ export async function exportCSV(
39
40
  fieldNames[k] = k;
40
41
  }
41
42
  });
42
- _downloadCSVFile(fieldNames, attributes, `notify-${Date.now().toString()}`);
43
+ _downloadCSVFile(fieldNames, attributes, `notify-${Date.now().toString()}`, addColumnTitle);
43
44
  }
44
45
 
45
46
  /**
@@ -56,9 +57,10 @@ export async function exportCSV(
56
57
  function _downloadCSVFile(
57
58
  fieldNames: {[key: string]: string},
58
59
  attributes: {[key: string]: string}[],
59
- fileTitle: string
60
+ fileTitle: string,
61
+ addColumnTitle: boolean
60
62
  ): void {
61
- if (fieldNames) {
63
+ if (addColumnTitle && fieldNames) {
62
64
  attributes.unshift(fieldNames);
63
65
  }
64
66
  // format values to string so it doesn't get tripped up when a value has a comma
@@ -81,6 +81,70 @@ export enum EExpandType {
81
81
 
82
82
  export type SelectionMode = "single" | "multi";
83
83
 
84
+ export type ValidSize = 6|10|14|20|30|60|80;
85
+
86
+ export type DistanceUnit = "feet"|"meters"|"miles"|"kilometers";
87
+
88
+ export interface IExportOptions {
89
+ csvOptions: ICsvOptions;
90
+ pdfOptions: IPdfOptions;
91
+ }
92
+
93
+ export interface ICsvOptions {
94
+ enabled: boolean;
95
+ addColumnTitle: boolean;
96
+ }
97
+
98
+ export interface IPdfOptions {
99
+ enabled: boolean;
100
+ enabledSizeValues: ValidSize[];
101
+ }
102
+
103
+ export interface ISearchConfiguration {
104
+ activeSourceIndex?: number;
105
+ allPlaceholder?: string;
106
+ includeDefaultSources?: boolean;
107
+ searchAllEnabled?: boolean;
108
+ sources: Array<ILocatorSourceConfigItem | ILayerSourceConfigItem>;
109
+ }
110
+
111
+ interface ISearchSourceConfigItem {
112
+ maxResults: number;
113
+ maxSuggestions: number;
114
+ minSuggestCharacters: number;
115
+ name: string;
116
+ suggestionsEnabled: boolean;
117
+ placeholder: string;
118
+ withinViewEnabled: boolean;
119
+ zoomScale: number;
120
+ }
121
+
122
+ export interface ILocatorSourceConfigItem extends ISearchSourceConfigItem {
123
+ url: string;
124
+ singleLineFieldName: string;
125
+ countryCode: string;
126
+ }
127
+
128
+ export interface ILayerSourceConfigItem extends ISearchSourceConfigItem {
129
+ displayField: string;
130
+ exactMatch: boolean;
131
+ layer: {
132
+ url: string | __esri.FeatureLayer;
133
+ id: string;
134
+ };
135
+ outFields: string[];
136
+ searchFields: string;
137
+ popupTemplate: any;
138
+ popupEnabled: boolean;
139
+ }
140
+
141
+ /**
142
+ * Layer id and title key value pair
143
+ */
144
+ export interface ILayerHash {
145
+ [key: string]: string;
146
+ }
147
+
84
148
  /**
85
149
  * Key details from the templates item
86
150
  */
@@ -309,7 +373,7 @@ export interface ISelectionSet {
309
373
  buffer: __esri.Geometry;
310
374
  distance: number;
311
375
  download: boolean;
312
- unit: __esri.LinearUnits;
376
+ unit: DistanceUnit;
313
377
  label: string;
314
378
  selectedIds: number[];
315
379
  layerView: __esri.FeatureLayerView;