@esri/solutions-components 0.8.5 → 0.8.7

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 (94) hide show
  1. package/dist/assets/t9n/crowdsource-reporter/resources.json +5 -6
  2. package/dist/assets/t9n/crowdsource-reporter/resources_en.json +5 -6
  3. package/dist/assets/t9n/feature-list/resources.json +1 -1
  4. package/dist/assets/t9n/feature-list/resources_en.json +1 -1
  5. package/dist/assets/t9n/public-notification/resources.json +3 -1
  6. package/dist/assets/t9n/public-notification/resources_en.json +3 -1
  7. package/dist/cjs/buffer-tools_3.cjs.entry.js +2 -2
  8. package/dist/cjs/calcite-alert_4.cjs.entry.js +2 -2
  9. package/dist/cjs/calcite-combobox_5.cjs.entry.js +2 -2
  10. package/dist/cjs/calcite-flow_5.cjs.entry.js +163 -16
  11. package/dist/cjs/crowdsource-manager.cjs.entry.js +6 -4
  12. package/dist/cjs/crowdsource-reporter.cjs.entry.js +124 -38
  13. package/dist/cjs/loader.cjs.js +1 -1
  14. package/dist/cjs/map-select-tools_3.cjs.entry.js +2 -2
  15. package/dist/cjs/public-notification.cjs.entry.js +110 -4
  16. package/dist/cjs/{publicNotificationStore-ef379d11.js → publicNotificationStore-e790601d.js} +2 -2
  17. package/dist/cjs/solutions-components.cjs.js +1 -1
  18. package/dist/collection/collection-manifest.json +1 -1
  19. package/dist/collection/components/create-feature/create-feature.css +9 -0
  20. package/dist/collection/components/create-feature/create-feature.js +134 -6
  21. package/dist/collection/components/crowdsource-manager/crowdsource-manager.js +102 -66
  22. package/dist/collection/components/crowdsource-reporter/crowdsource-reporter.css +5 -0
  23. package/dist/collection/components/crowdsource-reporter/crowdsource-reporter.js +196 -38
  24. package/dist/collection/components/feature-list/feature-list.js +93 -5
  25. package/dist/collection/components/info-card/info-card.css +1 -1
  26. package/dist/collection/components/info-card/info-card.js +1 -1
  27. package/dist/collection/components/layer-list/layer-list.js +6 -6
  28. package/dist/collection/components/map-draw-tools/map-draw-tools.js +1 -1
  29. package/dist/collection/components/map-layer-picker/map-layer-picker.js +1 -1
  30. package/dist/collection/components/map-select-tools/map-select-tools.js +1 -1
  31. package/dist/collection/components/public-notification/public-notification.js +110 -3
  32. package/dist/collection/demos/crowdsource-reporter.html +1 -1
  33. package/dist/collection/utils/interfaces.ts +23 -0
  34. package/dist/collection/utils/publicNotificationStore.js +2 -2
  35. package/dist/collection/utils/publicNotificationStore.ts +3 -2
  36. package/dist/components/create-feature2.js +111 -7
  37. package/dist/components/crowdsource-manager.js +12 -8
  38. package/dist/components/crowdsource-reporter.js +129 -39
  39. package/dist/components/feature-list2.js +54 -6
  40. package/dist/components/info-card2.js +2 -2
  41. package/dist/components/layer-list2.js +6 -6
  42. package/dist/components/map-draw-tools2.js +1 -1
  43. package/dist/components/map-layer-picker2.js +1 -1
  44. package/dist/components/map-select-tools2.js +1 -1
  45. package/dist/components/public-notification.js +110 -3
  46. package/dist/components/publicNotificationStore.js +2 -2
  47. package/dist/esm/buffer-tools_3.entry.js +2 -2
  48. package/dist/esm/calcite-alert_4.entry.js +3 -3
  49. package/dist/esm/calcite-combobox_5.entry.js +3 -3
  50. package/dist/esm/calcite-flow_5.entry.js +164 -17
  51. package/dist/esm/card-manager_3.entry.js +2 -2
  52. package/dist/esm/crowdsource-manager.entry.js +7 -5
  53. package/dist/esm/crowdsource-reporter.entry.js +125 -39
  54. package/dist/esm/{downloadUtils-0c13073b.js → downloadUtils-0c1e4d7b.js} +2 -2
  55. package/dist/esm/{index.es-ad250bc6.js → index.es-286e3cfa.js} +2 -2
  56. package/dist/esm/loader.js +1 -1
  57. package/dist/esm/map-select-tools_3.entry.js +4 -4
  58. package/dist/esm/{mapViewUtils-20504620.js → mapViewUtils-253178f1.js} +1 -1
  59. package/dist/esm/public-notification.entry.js +112 -6
  60. package/dist/esm/{publicNotificationStore-3bf4de75.js → publicNotificationStore-223faed2.js} +2 -2
  61. package/dist/esm/solutions-components.js +1 -1
  62. package/dist/solutions-components/demos/crowdsource-reporter.html +1 -1
  63. package/dist/solutions-components/p-15f9624a.entry.js +6 -0
  64. package/dist/solutions-components/{p-955647ea.entry.js → p-1ea5e061.entry.js} +2 -2
  65. package/dist/solutions-components/{p-590a2a26.js → p-212b02e7.js} +1 -1
  66. package/dist/solutions-components/p-238d3b5f.entry.js +6 -0
  67. package/dist/solutions-components/{p-cc280aa1.js → p-322868ec.js} +1 -1
  68. package/dist/solutions-components/{p-1d3a1794.js → p-331b5d1e.js} +2 -2
  69. package/dist/solutions-components/{p-c897e3eb.js → p-3af79063.js} +1 -1
  70. package/dist/solutions-components/p-6db185bf.entry.js +6 -0
  71. package/dist/solutions-components/p-80b11ec1.entry.js +17 -0
  72. package/dist/solutions-components/{p-5c7e3941.entry.js → p-813fd8a4.entry.js} +2 -2
  73. package/dist/solutions-components/{p-ff302d95.entry.js → p-d136eab0.entry.js} +2 -2
  74. package/dist/solutions-components/p-e0446d5b.entry.js +6 -0
  75. package/dist/solutions-components/p-e8f13354.entry.js +6 -0
  76. package/dist/solutions-components/solutions-components.esm.js +1 -1
  77. package/dist/solutions-components/utils/interfaces.ts +23 -0
  78. package/dist/solutions-components/utils/publicNotificationStore.ts +3 -2
  79. package/dist/types/components/create-feature/create-feature.d.ts +43 -1
  80. package/dist/types/components/crowdsource-manager/crowdsource-manager.d.ts +22 -14
  81. package/dist/types/components/crowdsource-reporter/crowdsource-reporter.d.ts +48 -11
  82. package/dist/types/components/feature-list/feature-list.d.ts +31 -0
  83. package/dist/types/components/layer-list/layer-list.d.ts +3 -3
  84. package/dist/types/components/public-notification/public-notification.d.ts +48 -0
  85. package/dist/types/components.d.ts +71 -2
  86. package/dist/types/utils/interfaces.d.ts +20 -0
  87. package/dist/types/utils/publicNotificationStore.d.ts +2 -1
  88. package/package.json +1 -1
  89. package/dist/solutions-components/p-6512dc44.entry.js +0 -6
  90. package/dist/solutions-components/p-6f65682c.entry.js +0 -6
  91. package/dist/solutions-components/p-989bf0bf.entry.js +0 -6
  92. package/dist/solutions-components/p-a0611720.entry.js +0 -6
  93. package/dist/solutions-components/p-b8c12736.entry.js +0 -6
  94. package/dist/solutions-components/p-efe1694a.entry.js +0 -17
@@ -92,6 +92,7 @@ const PublicNotification$1 = /*@__PURE__*/ proxyCustomElement(class PublicNotifi
92
92
  this.sketchLineSymbol = undefined;
93
93
  this.sketchPointSymbol = undefined;
94
94
  this.sketchPolygonSymbol = undefined;
95
+ this._exportGraphics = false;
95
96
  this._addMap = false;
96
97
  this._addResults = true;
97
98
  this._addTitle = false;
@@ -170,6 +171,7 @@ const PublicNotification$1 = /*@__PURE__*/ proxyCustomElement(class PublicNotifi
170
171
  if (pageType === EPageType.EXPORT) {
171
172
  this._fetchingData = true;
172
173
  this._numDuplicates = await this._getNumDuplicates();
174
+ this._updateExportGraphics();
173
175
  this._fetchingData = false;
174
176
  }
175
177
  this._clearHighlight();
@@ -177,6 +179,9 @@ const PublicNotification$1 = /*@__PURE__*/ proxyCustomElement(class PublicNotifi
177
179
  // clear any draw shapes or buffers
178
180
  await this._clearSelection();
179
181
  }
182
+ if (oldPageType === EPageType.EXPORT) {
183
+ this._removeExportGraphics();
184
+ }
180
185
  if (pageType !== EPageType.SELECT) {
181
186
  return this._highlightFeatures();
182
187
  }
@@ -240,12 +245,14 @@ const PublicNotification$1 = /*@__PURE__*/ proxyCustomElement(class PublicNotifi
240
245
  * @protected
241
246
  */
242
247
  async _initModules() {
243
- const [geometryEngine, jsonUtils] = await loadModules([
248
+ const [geometryEngine, jsonUtils, graphic] = await loadModules([
244
249
  "esri/geometry/geometryEngine",
245
- "esri/symbols/support/jsonUtils"
250
+ "esri/symbols/support/jsonUtils",
251
+ "esri/Graphic"
246
252
  ]);
247
253
  this._geometryEngine = geometryEngine;
248
254
  this._jsonUtils = jsonUtils;
255
+ this.Graphic = graphic;
249
256
  }
250
257
  /**
251
258
  * Load the search configuration
@@ -573,9 +580,107 @@ const PublicNotification$1 = /*@__PURE__*/ proxyCustomElement(class PublicNotifi
573
580
  _getExportOptions() {
574
581
  const displayClass = this._exportType === EExportType.PDF ? "display-block" : "display-none";
575
582
  const titleOptionsClass = this._addTitle ? "display-block" : "display-none";
583
+ const graphicsOptionsClass = this._addMap ? "display-flex" : "display-none";
576
584
  const title = this._titleValue ? this._titleValue : this.defaultExportTitle ? this.defaultExportTitle : "";
577
585
  const formatOptionsClass = this._addResults ? "" : "display-none";
578
- return (h("div", { class: displayClass }, this._getLabel(this._translations.pdfOptions, true), h("div", { class: "padding-top-sides-1" }, h("calcite-label", { class: "label-margin-0", layout: "inline" }, h("calcite-checkbox", { checked: this._addResults, onCalciteCheckboxChange: () => this._addResults = !this._addResults }), this._translations.addResults)), h("div", { class: `padding-top-sides-1 ${formatOptionsClass}` }, h("calcite-label", { class: "label-margin-0" }, this._translations.selectPDFLabelOption)), h("div", { class: `padding-sides-1 ${formatOptionsClass}` }, h("pdf-download", { defaultNumLabelsPerPage: parseInt(this.defaultNumLabelsPerPage.toString(), 10), disabled: !this._downloadActive, ref: (el) => { this._downloadTools = el; } })), h("div", { class: "padding-top-sides-1" }, h("calcite-label", { class: "label-margin-0", layout: "inline" }, h("calcite-checkbox", { checked: this._addTitle, onCalciteCheckboxChange: () => this._addTitle = !this._addTitle }), this._translations.title)), h("div", { class: titleOptionsClass }, this._getLabel(this._translations.title, true, ""), h("calcite-input-text", { class: "padding-sides-1", onCalciteInputTextInput: () => this._changeTitle(), placeholder: this._translations.titlePlaceholder, ref: (el) => { this._titleElement = el; }, value: title })), h("div", { class: "padding-top-sides-1" }, h("calcite-label", { class: "label-margin-0", layout: "inline" }, h("calcite-checkbox", { checked: this._addMap, onCalciteCheckboxChange: () => this._addMap = !this._addMap }), this._translations.includeMap))));
586
+ return (h("div", { class: displayClass }, this._getLabel(this._translations.pdfOptions, true), h("div", { class: "padding-top-sides-1" }, h("calcite-label", { class: "label-margin-0", layout: "inline" }, h("calcite-checkbox", { checked: this._addResults, onCalciteCheckboxChange: () => this._addResults = !this._addResults }), this._translations.addResults)), h("div", { class: `padding-top-sides-1 ${formatOptionsClass}` }, h("calcite-label", { class: "label-margin-0" }, this._translations.selectPDFLabelOption)), h("div", { class: `padding-sides-1 ${formatOptionsClass}` }, h("pdf-download", { defaultNumLabelsPerPage: parseInt(this.defaultNumLabelsPerPage.toString(), 10), disabled: !this._downloadActive, ref: (el) => { this._downloadTools = el; } })), h("div", { class: "padding-top-sides-1" }, h("calcite-label", { class: "label-margin-0", layout: "inline" }, h("calcite-checkbox", { checked: this._addTitle, onCalciteCheckboxChange: () => this._addTitle = !this._addTitle }), this._translations.title)), h("div", { class: titleOptionsClass }, this._getLabel(this._translations.title, true, ""), h("calcite-input-text", { class: "padding-sides-1", onCalciteInputTextInput: () => this._changeTitle(), placeholder: this._translations.titlePlaceholder, ref: (el) => { this._titleElement = el; }, value: title })), h("div", { class: "padding-top-sides-1" }, h("calcite-label", { class: "label-margin-0", layout: "inline" }, h("calcite-checkbox", { checked: this._addMap, onCalciteCheckboxChange: () => this._handleAddMapChange() }), this._translations.includeMap)), h("div", { class: `padding-top-sides-1 ${graphicsOptionsClass}` }, h("calcite-label", { class: "label-margin-0", layout: "inline" }, h("calcite-checkbox", { checked: this._exportGraphics, onCalciteCheckboxChange: () => this._handleExportGraphicsChange() }), this._translations.listGraphics), h("calcite-icon", { class: "padding-start-1-2 icon", icon: "question", id: "list-graphics-icon", scale: "s" }), h("calcite-popover", { closable: true, label: "", referenceElement: "list-graphics-icon" }, h("span", { class: "tooltip-message" }, this._translations.listGraphicsTip)))));
587
+ }
588
+ /**
589
+ * Toggle the _addMap state variable and update the graphics on the map
590
+ *
591
+ * @protected
592
+ */
593
+ _handleAddMapChange() {
594
+ this._addMap = !this._addMap;
595
+ this._updateExportGraphics();
596
+ }
597
+ /**
598
+ * Toggle the _exportGraphics state variable and update the graphics on the map
599
+ *
600
+ * @protected
601
+ */
602
+ _handleExportGraphicsChange() {
603
+ this._exportGraphics = !this._exportGraphics;
604
+ this._updateExportGraphics();
605
+ }
606
+ /**
607
+ * Get the "sketch" or "buffer" graphics layer
608
+ *
609
+ * @param type The type of managed layer to fetch "sketch" | "buffer"
610
+ *
611
+ * @protected
612
+ */
613
+ _getManagedLayer(type) {
614
+ let layer;
615
+ Object.keys(state.managedLayers).some((k) => {
616
+ const i = this.mapView.map.layers.findIndex((l) => l.title === k);
617
+ if (state.managedLayers[k] === type) {
618
+ layer = this.mapView.map.layers.getItemAt(i);
619
+ return true;
620
+ }
621
+ });
622
+ return layer;
623
+ }
624
+ /**
625
+ * Update the export graphics by adding or removeing them
626
+ *
627
+ * @param clear When true the graphics layers will be cleared prior to adding any new graphics, defaults to false
628
+ *
629
+ * @protected
630
+ */
631
+ _updateExportGraphics(clear = false) {
632
+ if (clear || !this._exportGraphics || !this._addMap) {
633
+ this._removeExportGraphics();
634
+ }
635
+ if (this._exportGraphics && this._addMap) {
636
+ this._addExportGraphics();
637
+ }
638
+ }
639
+ /**
640
+ * Remove all buffer and sketch graphics
641
+ *
642
+ * @protected
643
+ */
644
+ _removeExportGraphics() {
645
+ const sketchLayer = this._getManagedLayer("sketch");
646
+ const bufferLayer = this._getManagedLayer("buffer");
647
+ if (sketchLayer) {
648
+ sketchLayer.graphics.removeAll();
649
+ }
650
+ if (bufferLayer) {
651
+ bufferLayer.graphics.removeAll();
652
+ }
653
+ }
654
+ /**
655
+ * Add all buffer and sketch graphics that are flagged for download
656
+ *
657
+ * @protected
658
+ */
659
+ _addExportGraphics() {
660
+ const sketchLayer = this._getManagedLayer("sketch");
661
+ const bufferLayer = this._getManagedLayer("buffer");
662
+ this._selectionSets.forEach(ss => {
663
+ if (ss.download) {
664
+ if (sketchLayer) {
665
+ sketchLayer.graphics.add(ss.sketchGraphic);
666
+ }
667
+ if (bufferLayer) {
668
+ const symbol = {
669
+ type: "simple-fill",
670
+ color: this.bufferColor,
671
+ outline: {
672
+ color: this.bufferOutlineColor,
673
+ width: 1
674
+ }
675
+ };
676
+ const bufferGraphic = new this.Graphic({
677
+ geometry: ss.buffer,
678
+ symbol
679
+ });
680
+ bufferLayer.graphics.add(bufferGraphic);
681
+ }
682
+ }
683
+ });
579
684
  }
580
685
  /**
581
686
  * Render the refine page
@@ -669,6 +774,7 @@ const PublicNotification$1 = /*@__PURE__*/ proxyCustomElement(class PublicNotifi
669
774
  isActive = ss.download ? true : isActive;
670
775
  return ss;
671
776
  });
777
+ this._updateExportGraphics(true);
672
778
  this._downloadActive = isActive;
673
779
  this._fetchingData = true;
674
780
  this._numDuplicates = await this._getNumDuplicates();
@@ -939,6 +1045,7 @@ const PublicNotification$1 = /*@__PURE__*/ proxyCustomElement(class PublicNotifi
939
1045
  "sketchLineSymbol": [8, "sketch-line-symbol"],
940
1046
  "sketchPointSymbol": [8, "sketch-point-symbol"],
941
1047
  "sketchPolygonSymbol": [8, "sketch-polygon-symbol"],
1048
+ "_exportGraphics": [32],
942
1049
  "_addMap": [32],
943
1050
  "_addResults": [32],
944
1051
  "_addTitle": [32],
@@ -21,8 +21,8 @@ import { c as createStore } from './index4.js';
21
21
  * limitations under the License.
22
22
  */
23
23
  const { state, onChange } = createStore({
24
- // List of layers added and managed by the component
25
- managedLayers: [],
24
+ // Key Value pair whose Key is the layer name and the Value is the type of layer ("buffer" | "sketch")
25
+ managedLayers: {},
26
26
  // List of tables added and managed by the component
27
27
  managedTables: [],
28
28
  // Handle[]: https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Handles.html#Handle
@@ -7,7 +7,7 @@ import { r as registerInstance, c as createEvent, h, H as Host, g as getElement
7
7
  import { l as loadModules, g as getLocaleComponentStrings } from './locale-bcbea4ef.js';
8
8
  import { x as setRequestedIcon } from './dom-38c6f027.js';
9
9
  import { f as EDrawMode } from './interfaces-586e863c.js';
10
- import { s as state } from './publicNotificationStore-3bf4de75.js';
10
+ import { s as state } from './publicNotificationStore-223faed2.js';
11
11
  import './esri-loader-1b324844.js';
12
12
  import './_commonjsHelpers-0f74c230.js';
13
13
  import './guid-b75a5f7b.js';
@@ -464,7 +464,7 @@ const MapDrawTools = class {
464
464
  }
465
465
  else {
466
466
  this._sketchGraphicsLayer = new this.GraphicsLayer({ title, listMode: "hide" });
467
- state.managedLayers.push(title);
467
+ state.managedLayers[title] = "sketch";
468
468
  this.mapView.map.layers.add(this._sketchGraphicsLayer);
469
469
  }
470
470
  if (this.graphics && this.graphics.length > 0) {
@@ -12,7 +12,7 @@ import { o as onToggleOpenCloseComponent } from './openCloseComponent-9f90f493.j
12
12
  import { c as connectMessages, s as setUpMessages, d as disconnectMessages, u as updateMessages } from './t9n-436fb2b1.js';
13
13
  import { K as KindIcons } from './resources-88a48c5c.js';
14
14
  import { g as getLocaleComponentStrings, l as loadModules } from './locale-bcbea4ef.js';
15
- import { a as getAllLayers } from './mapViewUtils-20504620.js';
15
+ import { a as getAllLayers } from './mapViewUtils-253178f1.js';
16
16
  import { P as PopupUtils } from './popupUtils-af124b47.js';
17
17
  import './guid-b75a5f7b.js';
18
18
  import './resources-8834f920.js';
@@ -664,7 +664,7 @@ const EditCard = class {
664
664
  };
665
665
  EditCard.style = editCardCss;
666
666
 
667
- const infoCardCss = ":host{display:block;--calcite-label-margin-bottom:0}.padding-1-2{padding:0.5rem}.display-none{display:none !important}.display-flex{display:flex}.position-absolute{position:absolute;top:0;right:0;bottom:0;left:0;overflow:auto}.esri-features__footer{display:none !important}.button-container{justify-content:space-between;align-items:center}.top-border{border-top:1px solid var(--calcite-color-border-1)}.min-width-100{min-width:100px}.width-100{width:100%}.esri-features__container{padding:0.5rem !important;background-color:var(--calcite-color-foreground-1) !important;height:100% !important}.overflow-hidden{overflow:hidden}.height-40{height:40px}.end-border{border-inline-end:1px solid var(--calcite-color-border-1)}.font-bold{font-weight:bold}.visibility-hidden{visibility:hidden;height:0px}.padding-inline-start-1{padding-inline-start:1rem}.border-width-0{border-width:0px}";
667
+ const infoCardCss = ":host{display:block;--calcite-label-margin-bottom:0}.padding-1-2{padding:0.5rem}.display-none{display:none !important}.display-flex{display:flex}.position-absolute{position:absolute;top:0;right:0;bottom:0;left:0;overflow:auto}.feature-node .esri-features__footer{display:none !important}.button-container{justify-content:space-between;align-items:center}.top-border{border-top:1px solid var(--calcite-color-border-1)}.min-width-100{min-width:100px}.width-100{width:100%}.esri-features__container{padding:0.5rem !important;background-color:var(--calcite-color-foreground-1) !important;height:100% !important}.overflow-hidden{overflow:hidden}.height-40{height:40px}.end-border{border-inline-end:1px solid var(--calcite-color-border-1)}.font-bold{font-weight:bold}.visibility-hidden{visibility:hidden;height:0px}.padding-inline-start-1{padding-inline-start:1rem}.border-width-0{border-width:0px}";
668
668
 
669
669
  const InfoCard = class {
670
670
  constructor(hostRef) {
@@ -787,7 +787,7 @@ const InfoCard = class {
787
787
  const id = (_d = (_c = this._features) === null || _c === void 0 ? void 0 : _c.selectedFeature) === null || _d === void 0 ? void 0 : _d.getObjectId();
788
788
  const ids = parseInt(id === null || id === void 0 ? void 0 : id.toString(), 10) > -1 ? [id] : [];
789
789
  const deleteEnabled = ((_e = this._layer) === null || _e === void 0 ? void 0 : _e.editingEnabled) && ((_h = (_g = (_f = this._layer) === null || _f === void 0 ? void 0 : _f.capabilities) === null || _g === void 0 ? void 0 : _g.operations) === null || _h === void 0 ? void 0 : _h.supportsDelete);
790
- return (h(Host, null, h("calcite-shell", null, this._getHeader(), h("calcite-loader", { class: loadingClass, label: this._translations.fetchingData }), h("div", { class: "esri-widget " + featureNodeClass, id: "features-node" }), h("div", { class: `${editButtonClass} width-100`, slot: "footer" }, this.allowEditing &&
790
+ return (h(Host, null, h("calcite-shell", null, this._getHeader(), h("calcite-loader", { class: loadingClass, label: this._translations.fetchingData }), h("div", { class: "esri-widget feature-node " + featureNodeClass, id: "features-node" }), h("div", { class: `${editButtonClass} width-100`, slot: "footer" }, this.allowEditing &&
791
791
  h("div", { class: "display-flex top-border padding-1-2" }, h("calcite-button", { appearance: "solid", id: "solutions-edit", onClick: () => this._openEditRecord(), width: "full" }, this._translations.edit), this.isMobile && deleteEnabled ? (h("delete-button", { class: "padding-inline-start-1 width-100", id: "solutions-delete", ids: ids, layer: this._layer, onEditsComplete: () => this._closePopup() })) : undefined, h("calcite-tooltip", { label: "", placement: "bottom", "reference-element": "solutions-edit" }, h("span", null, this._translations.edit)), this.isMobile ? (h("calcite-tooltip", { label: "", placement: "bottom", "reference-element": "solutions-delete" }, h("span", null, this._translations.delete))) : undefined), !nextBackDisabled && h("div", { class: `display-flex padding-1-2 button-container top-border ${nextBackClass}` }, h("div", { class: "min-width-100" }, h("calcite-button", { appearance: "outline", disabled: nextBackDisabled, id: "solutions-back", onClick: () => this._back(), width: "full" }, this._translations.back), h("calcite-tooltip", { label: "", placement: "top", "reference-element": "solutions-back" }, h("span", null, this._translations.back))), h("div", null, h("calcite-action", { icon: "list", onClick: () => this._toggleListView(), scale: "s", text: this._count, textEnabled: true })), h("div", { class: "min-width-100" }, h("calcite-button", { appearance: "outline", disabled: nextBackDisabled, id: "solutions-next", onClick: () => this._next(), width: "full" }, this._translations.next), h("calcite-tooltip", { label: "", placement: "top", "reference-element": "solutions-next" }, h("span", null, this._translations.next))))), h("edit-card", { class: editClass, graphicIndex: (_j = this._features) === null || _j === void 0 ? void 0 : _j.selectedFeatureIndex, graphics: this.graphics, mapView: this.mapView, open: this._editRecordOpen }), h("calcite-alert", { icon: "layer-broken", kind: "warning", label: "", onCalciteAlertClose: () => this._alertClosed(), open: this._alertOpen, placement: "top" }, h("div", { slot: "title" }, this._translations.editDisabled), h("div", { slot: "message" }, this._translations.enableEditing)))));
792
792
  }
793
793
  //--------------------------------------------------------------------------
@@ -22,8 +22,8 @@ import { V as Validation } from './Validation-ea480265.js';
22
22
  import { d as debounce } from './debounce-229b1a22.js';
23
23
  import { i as isActivationKey } from './key-c83d835f.js';
24
24
  import { g as getLocaleComponentStrings } from './locale-bcbea4ef.js';
25
- import { d as getMapLayerHash, o as getMapTableHash } from './mapViewUtils-20504620.js';
26
- import { s as state } from './publicNotificationStore-3bf4de75.js';
25
+ import { c as getMapLayerHash, o as getMapTableHash } from './mapViewUtils-253178f1.js';
26
+ import { s as state } from './publicNotificationStore-223faed2.js';
27
27
  import './resources-8834f920.js';
28
28
  import './browser-d60104bd.js';
29
29
  import './esri-loader-1b324844.js';
@@ -2065,7 +2065,7 @@ const MapLayerPicker = class {
2065
2065
  _validLayer(id) {
2066
2066
  var _a;
2067
2067
  const name = (_a = this._layerNameHash[id]) === null || _a === void 0 ? void 0 : _a.name;
2068
- return name && state.managedLayers.indexOf(name) < 0 && (this.enabledLayerIds.length > 0 ?
2068
+ return name && Object.keys(state.managedLayers).indexOf(name) < 0 && (this.enabledLayerIds.length > 0 ?
2069
2069
  this.enabledLayerIds.indexOf(id) > -1 : true);
2070
2070
  }
2071
2071
  /**
@@ -12,7 +12,7 @@ import { c as connectLocalized, d as disconnectLocalized } from './locale-904407
12
12
  import { c as connectMessages, s as setUpMessages, d as disconnectMessages, u as updateMessages } from './t9n-436fb2b1.js';
13
13
  import { S as SLOTS$1 } from './resources-00983bd3.js';
14
14
  import { l as loadModules, g as getLocaleComponentStrings, f as formatNumber } from './locale-bcbea4ef.js';
15
- import { a as getAllLayers, g as getLayerOrTable, b as getFeatureLayerView, h as highlightFeatures, d as getMapLayerHash } from './mapViewUtils-20504620.js';
15
+ import { a as getAllLayers, g as getLayerOrTable, b as getFeatureLayerView, h as highlightFeatures, c as getMapLayerHash } from './mapViewUtils-253178f1.js';
16
16
  import { P as PopupUtils } from './popupUtils-af124b47.js';
17
17
  import './guid-b75a5f7b.js';
18
18
  import './resources-8834f920.js';
@@ -336,7 +336,7 @@ const FlowItem = class {
336
336
  };
337
337
  FlowItem.style = flowItemCss;
338
338
 
339
- const createFeatureCss = ":host{display:block}.esri-editor__panel-toolbar{display:none !important}.esri-editor__update-actions{display:none !important}.esri-editor__panel-content{padding-block:0px !important}.esri-editor .esri-item-list__group__header{display:none !important}.esri-editor__panel-content__section .esri-widget__heading{display:none !important}.esri-editor .esri-item-list__filter-container--sticky{padding-block:0px !important;padding-inline:10px !important}";
339
+ const createFeatureCss = ":host{display:block}.esri-editor__panel-toolbar{display:none !important}.esri-editor__update-actions{display:none !important}.esri-editor__panel-content{padding-block:0px !important}.esri-editor .esri-item-list__group__header{display:none !important}.esri-editor__panel-content__section .esri-widget__heading{display:none !important}.esri-editor .esri-item-list__filter-container--sticky{padding-block:0px !important;padding-inline:10px !important}.search-widget{width:92% !important;margin:5px 0 20px 14px}.display-none{display:none !important}";
340
340
 
341
341
  const CreateFeature = class {
342
342
  constructor(hostRef) {
@@ -348,6 +348,8 @@ const CreateFeature = class {
348
348
  this.mapView = undefined;
349
349
  this.selectedLayerId = undefined;
350
350
  this.customizeSubmit = false;
351
+ this.searchConfiguration = undefined;
352
+ this.showSearchWidget = undefined;
351
353
  }
352
354
  //--------------------------------------------------------------------------
353
355
  //
@@ -407,7 +409,8 @@ const CreateFeature = class {
407
409
  * Renders the component.
408
410
  */
409
411
  render() {
410
- return (h(Host, { id: "feature-form" }));
412
+ const showSearchWidget = this.showSearchWidget ? '' : 'display-none';
413
+ return (h(Fragment, null, h("div", { id: "feature-form" }), h("div", { class: `search-widget ${showSearchWidget}`, id: "search-widget-ref" })));
411
414
  }
412
415
  //--------------------------------------------------------------------------
413
416
  //
@@ -415,11 +418,12 @@ const CreateFeature = class {
415
418
  //
416
419
  //--------------------------------------------------------------------------
417
420
  /**
418
- * Init Editor widget and starts the create workflow
421
+ * Init Editor widget and Search widget
419
422
  */
420
423
  async init() {
421
424
  if (this.mapView && this.selectedLayerId) {
422
425
  await this.createEditorWidget();
426
+ await this.createSearchWidget();
423
427
  }
424
428
  }
425
429
  /**
@@ -428,12 +432,14 @@ const CreateFeature = class {
428
432
  * @protected
429
433
  */
430
434
  async initModules() {
431
- const [Editor, reactiveUtils] = await loadModules([
435
+ const [Editor, reactiveUtils, Search] = await loadModules([
432
436
  "esri/widgets/Editor",
433
- "esri/core/reactiveUtils"
437
+ "esri/core/reactiveUtils",
438
+ "esri/widgets/Search"
434
439
  ]);
435
440
  this.Editor = Editor;
436
441
  this.reactiveUtils = reactiveUtils;
442
+ this.Search = Search;
437
443
  }
438
444
  /**
439
445
  * Display editor widget to create the new feature
@@ -487,6 +493,13 @@ const CreateFeature = class {
487
493
  }
488
494
  });
489
495
  this._editor.viewModel.addHandles(handle);
496
+ //Add handle to watch editor viewmodel state and then show the search widget
497
+ const formHandle = this.reactiveUtils.watch(() => this._editor.viewModel.state, (state) => {
498
+ if (state === 'creating-features') {
499
+ this.showSearchWidget = true;
500
+ }
501
+ });
502
+ this._editor.viewModel.addHandles(formHandle);
490
503
  }
491
504
  /**
492
505
  * Start creating the feature
@@ -505,6 +518,7 @@ const CreateFeature = class {
505
518
  //on sketch complete emit the event
506
519
  this._editor.viewModel.sketchViewModel.on("create", (evt) => {
507
520
  if (evt.state === "complete") {
521
+ this.showSearchWidget = false;
508
522
  this.drawComplete.emit();
509
523
  }
510
524
  });
@@ -521,6 +535,94 @@ const CreateFeature = class {
521
535
  this.hideEditorsElements();
522
536
  }
523
537
  }
538
+ /**
539
+ * Display search widget to search location
540
+ * @protected
541
+ */
542
+ async createSearchWidget() {
543
+ let searchOptions = {
544
+ view: this.mapView,
545
+ };
546
+ if (this.searchConfiguration) {
547
+ const searchConfiguration = this._getSearchConfig(this.searchConfiguration, this.mapView);
548
+ searchOptions = Object.assign({}, searchConfiguration);
549
+ }
550
+ this._search = new this.Search(searchOptions);
551
+ this._search.container = 'search-widget-ref';
552
+ this._search.popupEnabled = false;
553
+ this._search.resultGraphicEnabled = false;
554
+ const layer = await getLayerOrTable(this.mapView, this.selectedLayerId);
555
+ let pointGeometry = null;
556
+ // on search get the geometry of the searched location and pass it in sketchViewModel and go to featureForm page
557
+ this._search.on('search-complete', (e) => {
558
+ var _a;
559
+ void this.mapView.goTo(e.results[0].results[0].extent);
560
+ if (layer.geometryType === 'point') {
561
+ pointGeometry = (_a = e.results[0].results[0]) === null || _a === void 0 ? void 0 : _a.feature.geometry;
562
+ }
563
+ });
564
+ //Add handle to watch if search viewModel state is ready
565
+ const createFeatureHandle = this.reactiveUtils.watch(() => this._search.viewModel.state, (state) => {
566
+ if (state === 'ready') {
567
+ setTimeout(() => {
568
+ if (this._editor.viewModel.sketchViewModel.createGraphic && pointGeometry) {
569
+ this._editor.viewModel.sketchViewModel.createGraphic.set('geometry', pointGeometry);
570
+ this._editor.viewModel.sketchViewModel.complete();
571
+ this.hideEditorsElements();
572
+ }
573
+ }, 100);
574
+ }
575
+ });
576
+ this._search.viewModel.addHandles(createFeatureHandle);
577
+ }
578
+ /**
579
+ * Initialize the search widget based on user defined configuration
580
+ *
581
+ * @param searchConfiguration search configuration defined by the user
582
+ * @param view the current map view
583
+ *
584
+ * @protected
585
+ */
586
+ _getSearchConfig(searchConfiguration, view) {
587
+ const INCLUDE_DEFAULT_SOURCES = "includeDefaultSources";
588
+ const sources = searchConfiguration.sources;
589
+ if ((sources === null || sources === void 0 ? void 0 : sources.length) > 0) {
590
+ searchConfiguration[INCLUDE_DEFAULT_SOURCES] = false;
591
+ sources.forEach((source) => {
592
+ var _a, _b;
593
+ const isLayerSource = source.hasOwnProperty("layer");
594
+ if (isLayerSource) {
595
+ const layerSource = source;
596
+ const layerId = (_a = layerSource.layer) === null || _a === void 0 ? void 0 : _a.id;
597
+ const layerFromMap = layerId ? view.map.findLayerById(layerId) : null;
598
+ const layerUrl = (_b = layerSource === null || layerSource === void 0 ? void 0 : layerSource.layer) === null || _b === void 0 ? void 0 : _b.url;
599
+ if (layerFromMap) {
600
+ layerSource.layer = layerFromMap;
601
+ }
602
+ else if (layerUrl) {
603
+ layerSource.layer = new this.FeatureLayer(layerUrl);
604
+ }
605
+ }
606
+ });
607
+ sources === null || sources === void 0 ? void 0 : sources.forEach((source) => {
608
+ const isLocatorSource = source.hasOwnProperty("locator");
609
+ if (isLocatorSource) {
610
+ const locatorSource = source;
611
+ if ((locatorSource === null || locatorSource === void 0 ? void 0 : locatorSource.name) === "ArcGIS World Geocoding Service") {
612
+ const outFields = locatorSource.outFields || ["Addr_type", "Match_addr", "StAddr", "City"];
613
+ locatorSource.outFields = outFields;
614
+ locatorSource.singleLineFieldName = "SingleLine";
615
+ }
616
+ locatorSource.url = locatorSource.url;
617
+ delete locatorSource.url;
618
+ }
619
+ });
620
+ }
621
+ else {
622
+ searchConfiguration = Object.assign(Object.assign({}, searchConfiguration), { includeDefaultSources: true });
623
+ }
624
+ return searchConfiguration;
625
+ }
524
626
  /**
525
627
  * Hides the elements of editor widget
526
628
  * @protected
@@ -592,6 +694,7 @@ const FeatureList = class {
592
694
  this.noFeaturesFoundMsg = undefined;
593
695
  this.pageSize = 100;
594
696
  this.highlightOnMap = false;
697
+ this.highlightOnHover = false;
595
698
  this._featureItems = [];
596
699
  this._featuresCount = 0;
597
700
  this._isLoading = false;
@@ -611,6 +714,16 @@ const FeatureList = class {
611
714
  }
612
715
  //--------------------------------------------------------------------------
613
716
  //
717
+ // Methods (public)
718
+ /**
719
+ * Refresh the feature list which will fetch the latest features and update the features list
720
+ * @returns Promise that resolves when the operation is complete
721
+ */
722
+ async refresh() {
723
+ await this.initializeFeatureItems();
724
+ }
725
+ //--------------------------------------------------------------------------
726
+ //
614
727
  // Functions (lifecycle)
615
728
  //
616
729
  //--------------------------------------------------------------------------
@@ -619,6 +732,7 @@ const FeatureList = class {
619
732
  * @returns Promise when complete
620
733
  */
621
734
  async componentWillLoad() {
735
+ await this.initModules();
622
736
  await this._getTranslations();
623
737
  this._isLoading = true;
624
738
  this._popupUtils = new PopupUtils();
@@ -645,6 +759,17 @@ const FeatureList = class {
645
759
  // Functions (protected)
646
760
  //
647
761
  //--------------------------------------------------------------------------
762
+ /**
763
+ * Load esri javascript api modules
764
+ * @returns Promise resolving when function is done
765
+ * @protected
766
+ */
767
+ async initModules() {
768
+ const [Color] = await loadModules([
769
+ "esri/Color"
770
+ ]);
771
+ this.Color = Color;
772
+ }
648
773
  /**
649
774
  * Initialize the features list using the selected layer
650
775
  * @protected
@@ -680,10 +805,7 @@ const FeatureList = class {
680
805
  */
681
806
  async featureClicked(event, selectedFeature) {
682
807
  //clear previous highlight and remove the highlightHandle
683
- if (this.highlightOnMap && this._highlightHandle) {
684
- this._highlightHandle.remove();
685
- this._highlightHandle = null;
686
- }
808
+ this.clearHighlights();
687
809
  //highlight on map only if it is selected item
688
810
  if (this.highlightOnMap) {
689
811
  const selectedFeatureObjectId = Number(event.target.value);
@@ -692,6 +814,31 @@ const FeatureList = class {
692
814
  }
693
815
  this.featureSelect.emit(selectedFeature);
694
816
  }
817
+ /**
818
+ * On feature hover in feature list highlight the feature on the map
819
+ * @param selectedFeature mouseovered feature graphic
820
+ * @protected
821
+ */
822
+ async onFeatureHover(selectedFeature) {
823
+ //clear previous highlight and remove the highlightHandle
824
+ this.clearHighlights();
825
+ if (this.highlightOnHover) {
826
+ const oId = selectedFeature.getObjectId();
827
+ const selectedLayerView = await getFeatureLayerView(this.mapView, this.selectedLayerId);
828
+ selectedLayerView.highlightOptions = { color: new this.Color("#FFFF00") };
829
+ this._highlightHandle = selectedLayerView.highlight([oId]);
830
+ }
831
+ }
832
+ /**
833
+ * Clears the highlight
834
+ * @protected
835
+ */
836
+ clearHighlights() {
837
+ //if a feature is already highlighted, then remove the highlight
838
+ if (this._highlightHandle) {
839
+ this._highlightHandle.remove();
840
+ }
841
+ }
695
842
  /**
696
843
  * Query the selected feature layer, in descending order of object id's
697
844
  * @param page 0th page number in the pagination item
@@ -742,7 +889,7 @@ const FeatureList = class {
742
889
  const oId = selectedFeature.attributes[this._selectedLayer.objectIdField].toString();
743
890
  //use object id if popupTitle is null or undefined
744
891
  popupTitle = popupTitle !== null && popupTitle !== void 0 ? popupTitle : oId;
745
- return (h("calcite-list-item", { onCalciteListItemSelect: (e) => { void this.featureClicked(e, selectedFeature); }, value: oId }, h("div", { class: "popup-title", slot: "content-start" }, popupTitle), h("calcite-icon", { icon: "chevron-right", scale: "s", slot: "content-end" })));
892
+ return (h("calcite-list-item", { onCalciteListItemSelect: (e) => { void this.featureClicked(e, selectedFeature); }, onMouseLeave: () => { void this.clearHighlights(); }, onMouseOver: () => { void this.onFeatureHover(selectedFeature); }, value: oId }, h("div", { class: "popup-title", slot: "content-start" }, popupTitle), h("calcite-icon", { icon: "chevron-right", scale: "s", slot: "content-end" })));
746
893
  }
747
894
  /**
748
895
  * Fetches the component's translations
@@ -822,7 +969,7 @@ const LayerList = class {
822
969
  render() {
823
970
  return (h(Fragment, null, this._isLoading && h("calcite-loader", { label: "", scale: "m" }), !this._isLoading && this.mapView && this._noLayersToDisplay &&
824
971
  h("calcite-notice", { class: "error-msg", icon: "layers-reference", kind: "danger", open: true }, h("div", { slot: "title" }, this._translations.error), h("div", { slot: "message" }, this.noLayerErrorMsg ? this.noLayerErrorMsg : this._noLayerToDisplayErrorMsg)), !this._isLoading && this.mapView &&
825
- h("calcite-list", { "selection-appearance": "border", "selection-mode": this.showNextIcon ? "none" : "single-persist" }, this.renderLayerList())));
972
+ h("calcite-list", { "selection-appearance": "border", "selection-mode": "none" }, this.renderLayerList())));
826
973
  }
827
974
  //--------------------------------------------------------------------------
828
975
  //
@@ -870,7 +1017,7 @@ const LayerList = class {
870
1017
  }
871
1018
  });
872
1019
  await Promise.all(def).then(() => {
873
- const editableLayerIds = this.getEditableIds(this._layerItemsHash);
1020
+ const editableLayerIds = this.getLayersToBeShownInList(this._layerItemsHash);
874
1021
  this._mapLayerIds = editableLayerIds.reverse();
875
1022
  this.handleNoLayersToDisplay();
876
1023
  }, () => {
@@ -886,17 +1033,17 @@ const LayerList = class {
886
1033
  this.layersListLoaded.emit(this._mapLayerIds);
887
1034
  }
888
1035
  /**
889
- * Returns the ids of all OR configured layers that support edits with the update capability
1036
+ * Returns the ids of all OR configured layers that needs to be shown in the list
890
1037
  * @param hash each layer item details
891
1038
  * @returns array of layer ids
892
1039
  */
893
- getEditableIds(hash) {
1040
+ getLayersToBeShownInList(hash) {
894
1041
  var _a;
895
1042
  const configuredLayers = ((_a = this.layers) === null || _a === void 0 ? void 0 : _a.length) > 0 ? this.layers : [];
896
1043
  return Object.keys(hash).reduce((prev, cur) => {
897
- let showLayer = hash[cur].supportsAdd;
1044
+ let showLayer = true;
898
1045
  if ((configuredLayers === null || configuredLayers === void 0 ? void 0 : configuredLayers.length) > 0) {
899
- showLayer = configuredLayers.indexOf(cur) > -1 ? hash[cur].supportsAdd : false;
1046
+ showLayer = configuredLayers.indexOf(cur) > -1;
900
1047
  }
901
1048
  if (showLayer) {
902
1049
  prev.push(cur);
@@ -5,8 +5,8 @@
5
5
  */
6
6
  import { r as registerInstance, h, H as Host, g as getElement, c as createEvent } from './index-164d485a.js';
7
7
  import { g as getLocaleComponentStrings, l as loadModules } from './locale-bcbea4ef.js';
8
- import { q as queryFeaturesByID, g as getLayerOrTable, c as goToSelection, e as queryAllIds, f as queryFeatureIds, i as queryFeaturesByGlobalID } from './mapViewUtils-20504620.js';
9
- import { d as downloadCSV } from './downloadUtils-0c13073b.js';
8
+ import { q as queryFeaturesByID, g as getLayerOrTable, d as goToSelection, e as queryAllIds, f as queryFeatureIds, i as queryFeaturesByGlobalID } from './mapViewUtils-253178f1.js';
9
+ import { d as downloadCSV } from './downloadUtils-0c1e4d7b.js';
10
10
  import './esri-loader-1b324844.js';
11
11
  import './_commonjsHelpers-0f74c230.js';
12
12
  import './interfaces-586e863c.js';
@@ -6,7 +6,7 @@
6
6
  import { r as registerInstance, h, H as Host, g as getElement } from './index-164d485a.js';
7
7
  import { g as getLocaleComponentStrings } from './locale-bcbea4ef.js';
8
8
  import { E as ELayoutMode } from './interfaces-586e863c.js';
9
- import { g as getLayerOrTable } from './mapViewUtils-20504620.js';
9
+ import { g as getLayerOrTable } from './mapViewUtils-253178f1.js';
10
10
  import './esri-loader-1b324844.js';
11
11
  import './_commonjsHelpers-0f74c230.js';
12
12
 
@@ -36,6 +36,7 @@ const CrowdsourceManager = class {
36
36
  */
37
37
  this._shouldSetMapView = false;
38
38
  this.appProxies = undefined;
39
+ this.basemapConfig = undefined;
39
40
  this.defaultCenter = "";
40
41
  this.defaultGlobalId = "";
41
42
  this.defaultLayer = "";
@@ -43,26 +44,27 @@ const CrowdsourceManager = class {
43
44
  this.defaultOid = "";
44
45
  this.defaultWebmap = "";
45
46
  this.enableAutoRefresh = false;
47
+ this.enableBasemap = true;
46
48
  this.enableColumnReorder = true;
47
49
  this.enableCSV = true;
48
50
  this.enableFloorFilter = true;
49
51
  this.enableFullscreen = true;
52
+ this.enableHome = true;
50
53
  this.enableInlineEdit = false;
51
54
  this.enableLegend = true;
52
55
  this.enableSearch = true;
53
56
  this.enableShare = false;
54
- this.enableHome = true;
55
57
  this.enableZoom = true;
56
- this.enableBasemap = true;
57
- this.basemapConfig = undefined;
58
- this.showNewestFirst = true;
58
+ this.hideMapOnLoad = undefined;
59
59
  this.mapInfos = [];
60
60
  this.onlyShowUpdatableLayers = true;
61
61
  this.searchConfiguration = undefined;
62
62
  this.shareIncludeEmbed = undefined;
63
63
  this.shareIncludeSocial = undefined;
64
+ this.showNewestFirst = true;
64
65
  this.theme = "light";
65
66
  this.zoomAndScrollToSelected = false;
67
+ this.zoomToScale = undefined;
66
68
  this._expandPopup = false;
67
69
  this._hideFooter = false;
68
70
  this._hideTable = false;