@esri/solutions-components 5.1.0-next.155 → 5.1.0-next.156

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (41) hide show
  1. package/dist/cdn/{G4ADX65Y.js → 6RTL3IJQ.js} +1 -1
  2. package/dist/cdn/{5KWJUQRY.js → 7CZG6NDM.js} +1 -1
  3. package/dist/cdn/{CEPWTLDN.js → 7NKBQ4G6.js} +1 -1
  4. package/dist/cdn/{MDXI36JJ.js → BYGOJ5ML.js} +141 -138
  5. package/dist/cdn/{CSAXBV46.js → DQ7I7HGP.js} +1 -1
  6. package/dist/cdn/E4BPYNC5.js +4 -0
  7. package/dist/cdn/EKRMEQQI.js +2 -0
  8. package/dist/cdn/EZ5PKNLU.js +2 -0
  9. package/dist/cdn/HDTRW7I6.js +4 -0
  10. package/dist/cdn/{M3NML7ZV.js → IMJTIIHG.js} +1 -1
  11. package/dist/cdn/{CPBEDBQJ.js → JAYARGS3.js} +1 -1
  12. package/dist/cdn/{TM6TYAW2.js → KDSK7F55.js} +18 -18
  13. package/dist/cdn/LZTAD4IE.js +2 -0
  14. package/dist/cdn/{QSGVCMF2.js → OL5LAOD5.js} +1 -1
  15. package/dist/cdn/{QCNGBMWJ.js → PBENK36A.js} +1 -1
  16. package/dist/cdn/{PJTHEJG4.js → QCXOGAWW.js} +1 -1
  17. package/dist/cdn/{2K4FSWCI.js → R7A62RZ4.js} +1 -1
  18. package/dist/cdn/{QU25YPPX.js → ZZJHOJM5.js} +1 -1
  19. package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.en.json +1 -1
  20. package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.json +1 -1
  21. package/dist/cdn/assets/solutions-deploy-app/t9n/messages.en.json +1 -1
  22. package/dist/cdn/assets/solutions-deploy-app/t9n/messages.json +1 -1
  23. package/dist/cdn/index.js +1 -1
  24. package/dist/chunks/solution-builder-assistant.js +3 -3
  25. package/dist/components/arcgis-solutions-assistant/customElement.d.ts +6 -0
  26. package/dist/components/arcgis-solutions-assistant/customElement.js +18 -4
  27. package/dist/components/create-feature/customElement.js +101 -74
  28. package/dist/components/crowdsource-reporter/customElement.d.ts +6 -2
  29. package/dist/components/crowdsource-reporter/customElement.js +1 -1
  30. package/dist/components/solutions-deploy-app/customElement.d.ts +8 -0
  31. package/dist/components/solutions-deploy-app/customElement.js +19 -19
  32. package/dist/docs/api.json +1 -1
  33. package/dist/docs/docs.json +1 -1
  34. package/dist/docs/web-types.json +1 -1
  35. package/dist/solutions-components_commit.txt +5 -8
  36. package/package.json +1 -1
  37. package/dist/cdn/6Y47Z4QA.js +0 -4
  38. package/dist/cdn/GYTMAAVH.js +0 -2
  39. package/dist/cdn/ON244IGD.js +0 -2
  40. package/dist/cdn/WFWEWVGR.js +0 -2
  41. package/dist/cdn/WUKFT5AY.js +0 -4
@@ -2,26 +2,26 @@
2
2
  import { c as I } from "../../chunks/runtime.js";
3
3
  import { a as x, g as w } from "../../chunks/mapViewUtils.js";
4
4
  import { u as A } from "../../chunks/useT9n.js";
5
- import { css as M, html as r, nothing as _ } from "lit";
6
- import { createRef as g, ref as u } from "lit-html/directives/ref.js";
5
+ import { css as M, html as o, nothing as y } from "lit";
6
+ import { createRef as p, ref as u } from "lit-html/directives/ref.js";
7
7
  import { LitElement as L, createEvent as c, noShadowRoot as E, safeClassMap as v } from "@arcgis/lumina";
8
8
  import { p as k } from "../../chunks/queryUtils.js";
9
9
  import P from "@arcgis/core/form/ExpressionInfo.js";
10
- import $ from "@arcgis/core/layers/FeatureLayer.js";
11
- import C from "@arcgis/core/form/elements/FieldElement.js";
12
- import S from "@arcgis/core/form/FormTemplate.js";
13
- import V from "@arcgis/core/views/MapView.js";
14
- import F from "@arcgis/core/Graphic.js";
15
- import * as y from "@arcgis/core/core/reactiveUtils.js";
10
+ import S from "@arcgis/core/layers/FeatureLayer.js";
11
+ import $ from "@arcgis/core/form/elements/FieldElement.js";
12
+ import C from "@arcgis/core/form/FormTemplate.js";
13
+ import F from "@arcgis/core/views/MapView.js";
14
+ import V from "@arcgis/core/Graphic.js";
15
+ import * as f from "@arcgis/core/core/reactiveUtils.js";
16
16
  import * as T from "@arcgis/core/rest/locator.js";
17
17
  import b from "@arcgis/core/request.js";
18
18
  import * as R from "exifr";
19
19
  import U from "@arcgis/core/geometry/Point.js";
20
20
  import z from "@arcgis/core/geometry/SpatialReference.js";
21
- const H = M`@layer{:host{display:block}.hide-editor-toolbar .esri-editor__panel-toolbar{display:none!important}.esri-editor__panel-content{padding-block:0px!important}.esri-editor .esri-item-list__group__header,.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 14px 20px}.display-none{display:none!important}.hide-map{height:1%!important;visibility:hidden;position:static!important}.show-map{padding:10px!important;position:absolute!important;bottom:0;height:auto!important;width:calc(100% - 22px)}.notice-msg{padding:10px;width:calc(100% - 20px)}.edit-location-btn{margin:5px;display:flex}.esri-editor__panel-content{padding-block:10px!important}.image-preview-container{padding:10px}.esri-editor{height:auto!important}.height-fit-content{height:fit-content!important}.content-container{padding:1.5rem}.instruction-text{margin-bottom:1.5rem;font-size:1rem}.selected-card{border:2px solid var(--calcite-ui-brand)}.upload-img-footer-container{width:100%;gap:5px;display:grid}.info-container{display:flex;align-items:center;gap:6px;margin-bottom:10px}.info-container calcite-icon{--calcite-icon-color: var(--calcite-color-brand)}.info-container span{font-size:12px;color:var(--calcite-ui-text-3)}.padding-10{padding:10px}.report-selection-container{display:flex;flex-direction:column;padding:10px;--calcite-card-border-color: var(--calcite-color-border-1)}.pb-12{padding-bottom:12px!important}.pt-0{padding-top:0!important}.pt-15{padding-top:15px!important}.option-description-container{display:flex;align-items:center;gap:6px}.cursor-pointer{cursor:pointer;padding:6px 0}.card-body-content{display:flex;flex-direction:row;align-items:center;padding:10px 5px;gap:15px}.text-stack{display:flex;flex-direction:column;gap:2px}.option-title{font-weight:var(--calcite-font-weight-bold);color:var(--calcite-ui-text-1);font-size:var(--calcite-font-size--1)}.option-description{color:var(--calcite-ui-text-3);font-size:var(--calcite-font-size--1)}.action-footer{display:flex;justify-content:center;margin-top:16px}.analysis-wrapper{display:flex;flex-direction:column;align-items:center;gap:5px;text-align:center;margin:auto}.analyzing-icon{--calcite-icon-color: var(--calcite-color-brand);animation:sparkle 2s infinite ease-in-out}.adjusted-height{height:30px!important;min-height:auto!important}@keyframes sparkle{0%,to{transform:scale(1)}50%{transform:scale(1.5)}}@media only screen and (max-width:600px){.esri-editor__panel-content{padding-block:0!important;min-height:0!important}}}`, f = "geocodedLocation", D = `Extract the address from the user's message and return it in JSON format '{"address":"<address>"}'. If no address is found, return null.`;
21
+ const H = M`@layer{:host{display:block}.hide-editor-toolbar .esri-editor__panel-toolbar{display:none!important}.esri-editor__panel-content{padding-block:0px!important}.esri-editor .esri-item-list__group__header,.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 14px 20px}.display-none{display:none!important}.hide-map{height:1%!important;visibility:hidden;position:static!important}.show-map{padding:10px!important;position:absolute!important;bottom:0;height:auto!important;width:calc(100% - 22px)}.notice-msg{padding:10px;width:calc(100% - 20px)}.edit-location-btn{margin:5px;display:flex}.esri-editor__panel-content{padding-block:10px!important}.image-preview-container{padding:10px}.esri-editor{height:auto!important}.height-fit-content{height:fit-content!important}.content-container{padding:1.5rem}.instruction-text{margin-bottom:1.5rem;font-size:1rem}.selected-card{border:2px solid var(--calcite-ui-brand)}.upload-img-footer-container{width:100%;gap:5px;display:grid}.info-container{display:flex;align-items:center;gap:6px;margin-bottom:10px}.info-container calcite-icon{--calcite-icon-color: var(--calcite-color-brand)}.info-container span{font-size:12px;color:var(--calcite-ui-text-3)}.padding-10{padding:10px}.report-selection-container{display:flex;flex-direction:column;padding:10px;--calcite-card-border-color: var(--calcite-color-border-1)}.pb-12{padding-bottom:12px!important}.pt-0{padding-top:0!important}.pt-15{padding-top:15px!important}.option-description-container{display:flex;align-items:center;gap:6px}.cursor-pointer{cursor:pointer;padding:6px 0}.card-body-content{display:flex;flex-direction:row;align-items:center;padding:10px 5px;gap:15px}.text-stack{display:flex;flex-direction:column;gap:2px}.option-title{font-weight:var(--calcite-font-weight-bold);color:var(--calcite-ui-text-1);font-size:var(--calcite-font-size--1)}.option-description{color:var(--calcite-ui-text-3);font-size:var(--calcite-font-size--1)}.action-footer{display:flex;justify-content:center;margin-top:16px}.analysis-wrapper{display:flex;flex-direction:column;align-items:center;gap:5px;text-align:center;margin:auto}.analyzing-icon{--calcite-icon-color: var(--calcite-color-brand);animation:sparkle 2s infinite ease-in-out}.adjusted-height{height:30px!important;min-height:auto!important}@keyframes sparkle{0%,to{transform:scale(1)}50%{transform:scale(1.5)}}@media only screen and (max-width:600px){.esri-editor__panel-content{padding-block:0!important;min-height:0!important}}}`, _ = "geocodedLocation", D = `Extract the address from the user's message and return it in JSON format '{"address":"<address>"}'. If no address is found, return null.`;
22
22
  class N extends L {
23
23
  constructor() {
24
- super(...arguments), this.customizeSubmit = !1, this.enableSearch = !1, this.enableSnapping = !1, this.floorLevel = "", this.isMobile = !1, this.selectedLayerId = "", this.showGuidingMsg = !0, this.submitNewReportsMessage = "", this.updateMapPosition = !1, this.reportingArea = !1, this.reportingAreaLayer = "", this.reportingAreaMessage = "", this.showSketchWidgets = !1, this.allowMultipleCreation = !1, this.popupEnabled = !1, this.showLayerVisibilityMsg = !1, this.enablePhotoLocation = !1, this.enableMessageLocation = !1, this._currentPage = "templatePicker", this._showSearchComponent = this.enableSearch, this._layerInfos = [], this._inValidGeometryDrawn = !1, this._selectedImageBase64 = "", this._enteredMessage = "", this._analysisFailed = !1, this._translations = A({ name: "create-feature", blocking: !0 }), this._addingAttachment = !1, this._uploadedImage = null, this._calciteNotice = g(), this._editor = g(), this._mapViewContainer = g(), this._searchRef = g(), this._inputImageForAI = g(), this._guidingMessageRefNode = g(), this._abortController = new AbortController(), this._awaitingLayerEdits = !1, this._pendingAttachmentUpload = !1, this.success = c(), this.fail = c(), this.drawComplete = c(), this.editingLocation = c(), this.editingAttachment = c(), this.progressStatus = c(), this.modeChanged = c(), this.activeFeatureCountChange = c(), this._onLayerEdits = async (e) => {
24
+ super(...arguments), this.customizeSubmit = !1, this.enableSearch = !1, this.enableSnapping = !1, this.floorLevel = "", this.isMobile = !1, this.selectedLayerId = "", this.showGuidingMsg = !0, this.submitNewReportsMessage = "", this.updateMapPosition = !1, this.reportingArea = !1, this.reportingAreaLayer = "", this.reportingAreaMessage = "", this.showSketchWidgets = !1, this.allowMultipleCreation = !1, this.popupEnabled = !1, this.showLayerVisibilityMsg = !1, this.enablePhotoLocation = !1, this.enableMessageLocation = !1, this._currentPage = "templatePicker", this._showSearchComponent = this.enableSearch, this._layerInfos = [], this._inValidGeometryDrawn = !1, this._selectedImageBase64 = "", this._enteredMessage = "", this._analysisFailed = !1, this._translations = A({ name: "create-feature", blocking: !0 }), this._addingAttachment = !1, this._uploadedImage = null, this._calciteNotice = p(), this._editor = p(), this._mapViewContainer = p(), this._searchRef = p(), this._inputImageForAI = p(), this._guidingMessageRefNode = p(), this._abortController = new AbortController(), this._awaitingLayerEdits = !1, this._pendingAttachmentUpload = !1, this.success = c(), this.fail = c(), this.drawComplete = c(), this.editingLocation = c(), this.editingAttachment = c(), this.progressStatus = c(), this.modeChanged = c(), this.activeFeatureCountChange = c(), this._onLayerEdits = async (e) => {
25
25
  if (!this._awaitingLayerEdits)
26
26
  return;
27
27
  const t = [
@@ -37,7 +37,7 @@ class N extends L {
37
37
  try {
38
38
  const a = new FormData();
39
39
  a.set("keywords", "ai-image"), a.set("attachment", this._uploadedImage), a.append("f", "json");
40
- const s = new F({
40
+ const s = new V({
41
41
  attributes: {
42
42
  [this._selectedLayer.objectIdField]: i
43
43
  }
@@ -75,7 +75,7 @@ class N extends L {
75
75
  this._showSearchComponent = this.enableSearch, this.isMobile && this._adjustPanelContentHeight();
76
76
  }
77
77
  async searchConfigurationHandler(e, t) {
78
- !this._searchRef.value || !e || !t || (e.allPlaceholder !== t.allPlaceholder ? this._searchRef.value.allPlaceholder = e.allPlaceholder || "" : !this._searchRef.value.searchAllDisabled !== e.searchAllEnabled ? this._searchRef.value.searchAllDisabled = !e.searchAllEnabled : this._updatedMapView && JSON.stringify(e.sources) !== JSON.stringify(t.sources) && (this._searchRef.value.sources = this._getSearchConfig(e, this._updatedMapView)?.sources || []));
78
+ !this._searchRef.value || !e || !t || (e.allPlaceholder !== t.allPlaceholder ? this._searchRef.value.allPlaceholder = e.allPlaceholder || "" : !this._searchRef.value.searchAllDisabled !== e.searchAllEnabled ? this._searchRef.value.searchAllDisabled = !e.searchAllEnabled : this._updatedMapView && JSON.stringify(e.sources) !== JSON.stringify(t.sources) && (this._searchRef.value.sources = this._getSearchConfig(e, this._updatedMapView)?.sources || []), this._updateSearchActiveSourceIndex());
79
79
  }
80
80
  async submit() {
81
81
  const e = this._editor.value?.activeWorkflow;
@@ -112,18 +112,18 @@ class N extends L {
112
112
  super.disconnectedCallback(), this._editor.value && (this._editor.value.destroy(), this.enableSnapping && this.mapView?.ui.view && (this.mapView.ui.view.grid = null), this._removeHandlers());
113
113
  }
114
114
  render() {
115
- const e = this._currentPage === "loading" ? "" : "display-none", t = this.isMobile && this.updateMapPosition ? "show-map" : "display-none", i = this._inValidGeometryDrawn ? "danger" : "success", a = this._inValidGeometryDrawn ? "exclamation-mark-triangle" : "lightbulb", s = this.showLayerVisibilityMsg && this._currentPage === "templatePicker", o = (this.showGuidingMsg || s) && this._currentPage !== "loading" && this._currentPage !== "drawingMultipleFeatures";
116
- let n = this._translations.chooseCategoryMsg;
117
- const l = this._aiAnalysisInfo?.results?.filter((p) => !p.success && p.key !== f), h = l?.length ? !0 : this._analysisFailed, d = this._getAnalysisErrorMessage(l?.length), m = this._aiAnalysisInfo?.canUseAI && ["chooseReportType", "analyzingImage", "analyzingMessage", "imageUpload", "messageInput"].includes(this._currentPage);
118
- return this._inValidGeometryDrawn ? n = this.reportingAreaMessage || this._translations.reportOutsideAreaMessage : this._currentPage === "drawing" || this._currentPage === "editing" ? n = this._translations.provideLocationMsg : this._currentPage === "featureForm" ? n = this._aiAnalysisInfo?.results?.filter((p) => p.success).length ? this._analysisMode === "text" ? this._translations.textReviewMsg : this._translations.formReviewMsg : this._translations.provideDetailsMsg : s && (n = this._translations.enableFeatureTemplatesMessage), r`${h && r`<calcite-alert auto-close icon=x-octagon kind=danger label @calciteAlertClose=${() => {
115
+ const e = this._currentPage === "loading" ? "" : "display-none", t = this.isMobile && this.updateMapPosition ? "show-map" : "display-none", i = this._inValidGeometryDrawn ? "danger" : "success", a = this._inValidGeometryDrawn ? "exclamation-mark-triangle" : "lightbulb", s = this.showLayerVisibilityMsg && this._currentPage === "templatePicker", n = (this.showGuidingMsg || s) && this._currentPage !== "loading" && this._currentPage !== "drawingMultipleFeatures";
116
+ let r = this._translations.chooseCategoryMsg;
117
+ const l = this._aiAnalysisInfo?.results?.filter((h) => !h.success && h.key !== _), d = l?.length ? !0 : this._analysisFailed, m = this._getAnalysisErrorMessage(l?.length), g = this._aiAnalysisInfo?.canUseAI && ["chooseReportType", "analyzingImage", "analyzingMessage", "imageUpload", "messageInput"].includes(this._currentPage);
118
+ return this._inValidGeometryDrawn ? r = this.reportingAreaMessage || this._translations.reportOutsideAreaMessage : this._currentPage === "drawing" || this._currentPage === "editing" ? r = this._translations.provideLocationMsg : this._currentPage === "featureForm" ? r = this._aiAnalysisInfo?.results?.filter((h) => h.success).length ? this._analysisMode === "text" ? this._translations.textReviewMsg : this._translations.formReviewMsg : this._translations.provideDetailsMsg : s && (r = this._translations.enableFeatureTemplatesMessage), o`${d && o`<calcite-alert auto-close icon=x-octagon kind=danger label @calciteAlertClose=${() => {
119
119
  this._analysisFailed = !1;
120
- }} open placement=top><div slot=title>${this._translations.error}</div><div slot=message>${d}</div></calcite-alert>` || ""}${m && r`<calcite-panel>${this._currentPage === "chooseReportType" && this._getReportTypePage() || ""}${this._currentPage === "imageUpload" && this._aiImageExtractionPage() || ""}${this._currentPage === "messageInput" && this._aiTextExtractionPage() || ""}${this._currentPage === "analyzingImage" && this._getAnalyzingImagePage() || ""}${this._currentPage === "analyzingMessage" && this._getAnalyzingMessagePage() || ""}</calcite-panel>` || ""}${!m && r`${o && r`<calcite-notice class="notice-msg" .icon=${a} .kind=${i} open ${u(this._calciteNotice)}><div slot=message .innerHTML=${n ?? ""} ${u(this._guidingMessageRefNode)}></div></calcite-notice>` || ""}${this._selectedImageBase64 && this._currentPage === "featureForm" && r`<div class="image-preview-container"><calcite-label>${this._translations.photo}</calcite-label><img class="width-full" src=${this._selectedImageBase64 ?? _}></div>` || ""}<calcite-loader class=${v(e)} label scale=s></calcite-loader>${this._currentPage === "featureForm" && this.isMobile && r`<calcite-button appearance=transparent class="edit-location-btn" icon-start=pin @click=${this.editLocation}>${this._translations.editLocationLabel}</calcite-button>` || ""}${this._showSearchComponent && this._updatedMapView && this._selectedLayer && this._getSearchComponent() || ""}${this._updatedMapView && this._selectedLayer && this._getEditor() || ""}` || ""}<div class=${v(t)} ${u(this._mapViewContainer)}></div>`;
120
+ }} open placement=top><div slot=title>${this._translations.error}</div><div slot=message>${m}</div></calcite-alert>` || ""}${g && o`<calcite-panel>${this._currentPage === "chooseReportType" && this._getReportTypePage() || ""}${this._currentPage === "imageUpload" && this._aiImageExtractionPage() || ""}${this._currentPage === "messageInput" && this._aiTextExtractionPage() || ""}${this._currentPage === "analyzingImage" && this._getAnalyzingImagePage() || ""}${this._currentPage === "analyzingMessage" && this._getAnalyzingMessagePage() || ""}</calcite-panel>` || ""}${!g && o`${n && o`<calcite-notice class="notice-msg" .icon=${a} .kind=${i} open ${u(this._calciteNotice)}><div slot=message .innerHTML=${r ?? ""} ${u(this._guidingMessageRefNode)}></div></calcite-notice>` || ""}${this._selectedImageBase64 && this._currentPage === "featureForm" && o`<div class="image-preview-container"><calcite-label>${this._translations.photo}</calcite-label><img class="width-full" src=${this._selectedImageBase64 ?? y}></div>` || ""}<calcite-loader class=${v(e)} label scale=s></calcite-loader>${this._currentPage === "featureForm" && this.isMobile && o`<calcite-button appearance=transparent class="edit-location-btn" icon-start=pin @click=${this.editLocation}>${this._translations.editLocationLabel}</calcite-button>` || ""}${this._showSearchComponent && this._updatedMapView && this._selectedLayer && this._getSearchComponent() || ""}${this._updatedMapView && this._selectedLayer && this._getEditor() || ""}` || ""}<div class=${v(t)} ${u(this._mapViewContainer)}></div>`;
121
121
  }
122
122
  async init() {
123
123
  this.mapView && this.selectedLayerId && (this._updatedMapView = this.mapView, await (this.isMobile && this.updateMapPosition ? this.createMobileMapView() : this._loadLayerInfos()));
124
124
  }
125
125
  async createMobileMapView() {
126
- this._mapViewContainer.value && this.mapView && (this._mapViewContainer.value.classList.add("hide-map"), await new V({
126
+ this._mapViewContainer.value && this.mapView && (this._mapViewContainer.value.classList.add("hide-map"), await new F({
127
127
  map: this.mapView.map,
128
128
  container: this._mapViewContainer.value,
129
129
  zoom: this.mapView.zoom,
@@ -157,38 +157,53 @@ class N extends L {
157
157
  }
158
158
  _getReportTypePage() {
159
159
  const e = this._hasImageExtraction(), t = this._hasTextExtraction();
160
- return r`<div class="report-selection-container"><calcite-label class="pb-12">${this._translations.createReportHeading}</calcite-label><div class="option-description-container"><span class="option-description">${this._translations.aiAssistedReport}</span><calcite-icon icon=effects scale=s></calcite-icon></div>${t && r`<calcite-card class="cursor-pointer pt-0" @click=${() => {
160
+ return o`<div class="report-selection-container"><calcite-label class="pb-12">${this._translations.createReportHeading}</calcite-label><div class="option-description-container"><span class="option-description">${this._translations.aiAssistedReport}</span><calcite-icon icon=effects scale=s></calcite-icon></div>${t && o`<calcite-card class="cursor-pointer pt-0" @click=${() => {
161
161
  this._analysisMode = "text", this.progressStatus.emit(35), this._currentPage = "messageInput";
162
- }}><div slot=description class="card-body-content"><calcite-icon icon=speech-bubble scale=m></calcite-icon><div class="text-stack"><span class="option-title">${this._translations.useDescription}</span><span class="option-description">${this._translations.aiTextAssistantDescription}</span></div></div></calcite-card>` || ""}${e && r`<calcite-card class="cursor-pointer" @click=${() => {
162
+ }} @keydown=${(i) => {
163
+ this._activateCardFromKeyboard(i, () => {
164
+ this._analysisMode = "text", this.progressStatus.emit(35), this._currentPage = "messageInput";
165
+ });
166
+ }}><div slot=description class="card-body-content"><calcite-icon icon=speech-bubble scale=m></calcite-icon><div class="text-stack"><span class="option-title">${this._translations.useDescription}</span><span class="option-description">${this._translations.aiTextAssistantDescription}</span></div></div></calcite-card>` || ""}${e && o`<calcite-card class="cursor-pointer" @click=${() => {
163
167
  this._analysisMode = "image", this.progressStatus.emit(35), this._currentPage = "imageUpload";
168
+ }} @keydown=${(i) => {
169
+ this._activateCardFromKeyboard(i, () => {
170
+ this._analysisMode = "image", this.progressStatus.emit(35), this._currentPage = "imageUpload";
171
+ });
164
172
  }}><div slot=description class="card-body-content"><calcite-icon aria-hidden=true icon=camera scale=m style="color: var(--calcite-ui-text-2)"></calcite-icon><div class="text-stack"><span class="option-title">${this._translations.usePhoto}</span><span class="option-description">${this._translations.aiAssistantDescription}</span></div></div></calcite-card>` || ""}<span class="option-description pt-15">${this._translations.manualReport}</span><calcite-card class="cursor-pointer pt-0" @click=${() => {
165
173
  this._currentPage = "templatePicker", this.init();
174
+ }} @keydown=${(i) => {
175
+ this._activateCardFromKeyboard(i, () => {
176
+ this._currentPage = "templatePicker", this.init();
177
+ });
166
178
  }}><div slot=description class="card-body-content"><calcite-icon aria-hidden=true icon=pencil scale=m></calcite-icon><div class="text-stack"><span class="option-title">${this._translations.fillOutManually}</span><span class="option-description">${this._translations.startBlank}</span></div></div></calcite-card></div>`;
167
179
  }
180
+ _activateCardFromKeyboard(e, t) {
181
+ (e.key === "Enter" || e.key === " ") && (e.preventDefault(), t());
182
+ }
168
183
  _getEditor() {
169
- return r`<arcgis-editor class=height-fit-content .view=${this._updatedMapView} .layerInfos=${this._layerInfos} hide-edit-features-section .hideSettingsMenu=${!this.enableSnapping} .hideSketch=${!this.showSketchWidgets || this._selectedLayer?.geometryType === "point"} .hideSnappingControlsElementsEnabledToggle=${!this.enableSnapping} @arcgisReady=${this._onEditorComponentReady} @arcgisPropertyChange=${this._onEditorPropertyChange} @arcgisSketchUpdate=${this._onSketchUpdate} ${u(this._editor)}></arcgis-editor>`;
184
+ return o`<arcgis-editor class=height-fit-content .view=${this._updatedMapView} .layerInfos=${this._layerInfos} hide-edit-features-section .hideSettingsMenu=${!this.enableSnapping} .hideSketch=${!this.showSketchWidgets || this._selectedLayer?.geometryType === "point"} .hideSnappingControlsElementsEnabledToggle=${!this.enableSnapping} @arcgisReady=${this._onEditorComponentReady} @arcgisPropertyChange=${this._onEditorPropertyChange} @arcgisSketchUpdate=${this._onSketchUpdate} ${u(this._editor)}></arcgis-editor>`;
170
185
  }
171
186
  _getSearchComponent() {
172
187
  const e = this._currentPage === "drawing" || this._currentPage === "editing" ? "" : "display-none", t = this.searchConfiguration && this._updatedMapView ? this._getSearchConfig(this.searchConfiguration, this._updatedMapView) : void 0;
173
- return r`<arcgis-search class=${`search-widget ${e}`} .view=${this._updatedMapView} @arcgisSearchComplete=${this.searchComplete} popup-disabled result-graphic-disabled .sources=${t?.sources || []} .allPlaceholder=${t?.allPlaceholder} .searchAllDisabled=${!t?.searchAllEnabled} ${u(this._searchRef)}></arcgis-search>`;
188
+ return this._updateSearchActiveSourceIndex(), o`<arcgis-search class=${`search-widget ${e}`} .view=${this._updatedMapView} @arcgisSearchComplete=${this.searchComplete} popup-disabled result-graphic-disabled .includeDefaultSourcesDisabled=${!!t?.sources?.length} .sources=${t?.sources || []} .allPlaceholder=${t?.allPlaceholder} .searchAllDisabled=${!t?.searchAllEnabled} ${u(this._searchRef)}></arcgis-search>`;
174
189
  }
175
190
  _aiImageExtractionPage() {
176
191
  const e = this._selectedImageBase64 !== "", t = e ? this._translations.replaceImage : this._translations.imageUploadLimitHint;
177
- return r`<calcite-notice class="notice-msg" icon=effects kind=brand open><div slot=message>${this._translations.aiAssistantProcessingHint}</div></calcite-notice><div class="padding-10"><calcite-label><div>${this._translations.photo}<span style="color: var(--calcite-color-status-danger)">*</span></div><calcite-input type=file accept="image/*;capture=camera" @calciteInputInput=${this._onImageUpload} ${u(this._inputImageForAI)}></calcite-input></calcite-label><div class="info-container"><calcite-icon aria-hidden=true icon=information scale=s></calcite-icon><span>${t}</span></div>${e && r`<img alt=${this._translations.photo ?? _} class="width-full" src=${this._selectedImageBase64 ?? _}>` || ""}</div><div slot=footer class="upload-img-footer-container"><calcite-button width=full .disabled=${!e} id=next-btn @click=${this._analyzeImage}>${this._translations.next}</calcite-button><calcite-button width=full appearance=outline kind=brand @click=${() => this.modeChanged.emit()}>${this._translations.cancel}</calcite-button></div>`;
192
+ return o`<calcite-notice class="notice-msg" icon=effects kind=brand open><div slot=message>${this._translations.aiAssistantProcessingHint}</div></calcite-notice><div class="padding-10"><calcite-label><div>${this._translations.photo}<span style="color: var(--calcite-color-status-danger)">*</span></div><calcite-input type=file accept="image/*;capture=camera" @calciteInputInput=${this._onImageUpload} ${u(this._inputImageForAI)}></calcite-input></calcite-label><div class="info-container"><calcite-icon aria-hidden=true icon=information scale=s></calcite-icon><span>${t}</span></div>${e && o`<img alt=${this._translations.photo ?? y} class="width-full" src=${this._selectedImageBase64 ?? y}>` || ""}</div><div slot=footer class="upload-img-footer-container"><calcite-button width=full .disabled=${!e} id=next-btn @click=${this._analyzeImage}>${this._translations.next}</calcite-button><calcite-button width=full appearance=outline kind=brand @click=${() => this.modeChanged.emit()}>${this._translations.cancel}</calcite-button></div>`;
178
193
  }
179
194
  _aiTextExtractionPage() {
180
195
  const e = this._enteredMessage.trim();
181
- return r`<calcite-notice class="notice-msg" icon=effects kind=brand open><div slot=message>${this._translations.aiTextProcessingHint}</div></calcite-notice><div class="padding-10"><calcite-label><div>${this._translations.description}<span style="color: var(--calcite-color-status-danger)">*</span></div><calcite-text-area @input=${(t) => {
196
+ return o`<calcite-notice class="notice-msg" icon=effects kind=brand open><div slot=message>${this._translations.aiTextProcessingHint}</div></calcite-notice><div class="padding-10"><calcite-label><div>${this._translations.description}<span style="color: var(--calcite-color-status-danger)">*</span></div><calcite-text-area @input=${(t) => {
182
197
  this._enteredMessage = t.target.value;
183
198
  }} .placeholder=${this._translations.messageInputHint} resize=vertical rows=6 .value=${this._enteredMessage}></calcite-text-area></calcite-label><div class="info-container"><calcite-icon icon=information scale=s></calcite-icon><span>${this._translations.descriptionRequiredHint}</span></div></div><div slot=footer class="upload-img-footer-container"><calcite-button width=full .disabled=${!e} id=next-btn @click=${this._analyzeMessage}>${this._translations.next}</calcite-button><calcite-button width=full appearance=outline kind=brand @click=${() => this.modeChanged.emit()}>${this._translations.cancel}</calcite-button></div>`;
184
199
  }
185
200
  _getAnalyzingImagePage() {
186
- return r`<div class="analysis-wrapper"><calcite-label layout=inline><calcite-icon class="analyzing-icon" icon=effects scale=s></calcite-icon><span>${this._translations.analyzingImage}</span></calcite-label><calcite-button class="skip-btn" appearance=transparent @click=${() => {
201
+ return o`<div class="analysis-wrapper"><calcite-label layout=inline><calcite-icon class="analyzing-icon" icon=effects scale=s></calcite-icon><span>${this._translations.analyzingImage}</span></calcite-label><calcite-button class="skip-btn" appearance=transparent @click=${() => {
187
202
  this._abortController.abort(), this._currentPage = "templatePicker";
188
203
  }}>${this._translations.skip}</calcite-button></div>`;
189
204
  }
190
205
  _getAnalyzingMessagePage() {
191
- return r`<div class="analysis-wrapper"><calcite-label layout=inline><calcite-icon class="analyzing-icon" icon=effects scale=s></calcite-icon><span>${this._translations.analyzingText}</span></calcite-label><calcite-button class="skip-btn" appearance=transparent @click=${() => {
206
+ return o`<div class="analysis-wrapper"><calcite-label layout=inline><calcite-icon class="analyzing-icon" icon=effects scale=s></calcite-icon><span>${this._translations.analyzingText}</span></calcite-label><calcite-button class="skip-btn" appearance=transparent @click=${() => {
192
207
  this._abortController.abort(), this._currentPage = "templatePicker";
193
208
  }}>${this._translations.skip}</calcite-button></div>`;
194
209
  }
@@ -210,38 +225,38 @@ class N extends L {
210
225
  }
211
226
  try {
212
227
  this._analysisMode = "image", this._currentPage = "analyzingImage", this.progressStatus.emit(45);
213
- const i = this._inputImageForAI.value.files[0], a = await new Promise((o, n) => {
228
+ const i = this._inputImageForAI.value.files[0], a = await new Promise((n, r) => {
214
229
  const l = new FileReader();
215
- l.onloadend = () => o(l.result), l.onerror = n, this._inputImageForAI.value && l.readAsDataURL(i);
230
+ l.onloadend = () => n(l.result), l.onerror = r, this._inputImageForAI.value && l.readAsDataURL(i);
216
231
  });
217
232
  if (this.enablePhotoLocation) {
218
- const o = await R.gps(i);
219
- if (o?.longitude && o.latitude && this.mapView?.spatialReference) {
220
- const n = new U({
221
- longitude: o.longitude,
222
- latitude: o.latitude,
233
+ const n = await R.gps(i);
234
+ if (n?.longitude && n.latitude && this.mapView?.spatialReference) {
235
+ const r = new U({
236
+ longitude: n.longitude,
237
+ latitude: n.latitude,
223
238
  spatialReference: new z({ wkid: 4326 })
224
- }), l = await k(n, this.mapView.spatialReference);
239
+ }), l = await k(r, this.mapView.spatialReference);
225
240
  this._aiAnalysisInfo && (this._aiAnalysisInfo.location = l);
226
241
  }
227
242
  }
228
243
  const s = this._getImageExtractionData();
229
244
  if (s.length) {
230
- const o = {
245
+ const n = {
231
246
  input: a,
232
247
  data: s
233
- }, n = await b(t.imageUrl, {
248
+ }, r = await b(t.imageUrl, {
234
249
  method: "post",
235
250
  headers: {
236
251
  "Content-Type": "application/json",
237
252
  "x-esri-authorization": `Bearer ${t.token}`,
238
253
  "x-esri-request-source": `instantapps/${this.appName}`
239
254
  },
240
- body: JSON.stringify(o),
255
+ body: JSON.stringify(n),
241
256
  responseType: "json",
242
257
  signal: e
243
258
  });
244
- this._aiAnalysisInfo && (this._aiAnalysisInfo.results = n.data.results);
259
+ this._aiAnalysisInfo && (this._aiAnalysisInfo.results = r.data.results);
245
260
  }
246
261
  this._currentPage = "loading", await this.init();
247
262
  } catch (i) {
@@ -252,13 +267,13 @@ class N extends L {
252
267
  this._abortController = new AbortController();
253
268
  const e = this._abortController.signal, t = await this._getAIAnalysisInfo(), i = this._enteredMessage.trim(), a = this._getTextExtractionData();
254
269
  let s = { url: "", singleLineFieldName: "" };
255
- if (this.enableMessageLocation && (s = this._getLocatorConfig(), this._shouldExtractLocationFromText() && s.url && a.push({ key: f, context: D })), !t.canUseAI || !t.textUrl || !i || !a.length) {
270
+ if (this.enableMessageLocation && (s = this._getLocatorConfig(), this._shouldExtractLocationFromText() && s.url && a.push({ key: _, context: D })), !t.canUseAI || !t.textUrl || !i || !a.length) {
256
271
  this._analysisFailed = !0, console.error(this._translations.error), this._resetAIAnalysisInfo(), await this.init();
257
272
  return;
258
273
  }
259
274
  try {
260
275
  this._analysisMode = "text", this._currentPage = "analyzingMessage", this.progressStatus.emit(45);
261
- const o = await b(t.textUrl, {
276
+ const n = await b(t.textUrl, {
262
277
  method: "post",
263
278
  headers: {
264
279
  "Content-Type": "application/json",
@@ -272,16 +287,16 @@ class N extends L {
272
287
  responseType: "json",
273
288
  signal: e
274
289
  });
275
- if (this._aiAnalysisInfo && (this._aiAnalysisInfo.results = o.data.results, s.url)) {
276
- const n = this._getExtractedAddress(o.data.results);
277
- n && (this._aiAnalysisInfo.location = await this._geocodeExtractedAddress(n, {
290
+ if (this._aiAnalysisInfo && (this._aiAnalysisInfo.results = n.data.results, s.url)) {
291
+ const r = this._getExtractedAddress(n.data.results);
292
+ r && (this._aiAnalysisInfo.location = await this._geocodeExtractedAddress(r, {
278
293
  url: s.url,
279
294
  singleLineFieldName: s.singleLineFieldName
280
295
  }));
281
296
  }
282
297
  this._currentPage = "loading", await this.init();
283
- } catch (o) {
284
- o.name === "AbortError" ? console.error("Aborted", o) : (this._analysisFailed = !0, console.error("Analyzing failed", o)), this._resetAIAnalysisInfo(), this.init();
298
+ } catch (n) {
299
+ n.name === "AbortError" ? console.error("Aborted", n) : (this._analysisFailed = !0, console.error("Analyzing failed", n)), this._resetAIAnalysisInfo(), this.init();
285
300
  }
286
301
  }
287
302
  _resetAIAnalysisInfo() {
@@ -335,14 +350,14 @@ class N extends L {
335
350
  }
336
351
  async _onEditorPropertyChange() {
337
352
  const e = this._editor.value;
338
- e?.state && (this._drawingHandler || (this._drawingHandler = y.watch(() => e.state, async (t) => {
353
+ e?.state && (this._drawingHandler || (this._drawingHandler = f.watch(() => e.state, async (t) => {
339
354
  const i = this._editor.value?.activeWorkflow;
340
- t === "creating-features" && i?.formViewModel?.state === "disabled" && (this._mapViewContainer.value?.classList.replace("hide-map", "show-map"), this._selectedLayer && !this._selectedLayer.isTable && (this._currentPage = "drawing", this.progressStatus.emit(50), i?.sketchViewModel?.createGraphic && this._aiAnalysisInfo?.location && (await this._updatedMapView?.goTo({ center: this._aiAnalysisInfo.location }), this._selectedLayer.geometryType === "point" && await this._initializeSketchPoint(this._aiAnalysisInfo.location.clone()))), this.isMobile && this._adjustPanelContentHeight()), t === "adding-attachment" || t === "editing-attachment" ? (this._addingAttachment = !0, this.editingAttachment.emit(!0)) : this._addingAttachment && (this.editingAttachment.emit(!1), this._addingAttachment = !1);
341
- })), this._featureFormHandler || (this._featureFormHandler = y.watch(() => e.activeWorkflow?.formViewModel?.state, (t) => {
355
+ t === "creating-features" && i?.formViewModel?.state === "disabled" && (this._mapViewContainer.value?.classList.replace("hide-map", "show-map"), this._selectedLayer && !this._selectedLayer.isTable && (this._currentPage = "drawing", this.progressStatus.emit(50), i?.sketchViewModel?.createGraphic && this._aiAnalysisInfo?.location && (await this._goToAndWaitForStationary({ center: this._aiAnalysisInfo.location }), this._selectedLayer.geometryType === "point" && await this._initializeSketchPoint(this._aiAnalysisInfo.location.clone()))), this.isMobile && this._adjustPanelContentHeight(), this._searchRef.value && await this._searchRef.value.setFocus()), t === "adding-attachment" || t === "editing-attachment" ? (this._addingAttachment = !0, this.editingAttachment.emit(!0)) : this._addingAttachment && (this.editingAttachment.emit(!1), this._addingAttachment = !1);
356
+ })), this._featureFormHandler || (this._featureFormHandler = f.watch(() => e.activeWorkflow?.formViewModel?.state, (t) => {
342
357
  t === "ready" && this._currentPage !== "editing" ? (this._mapViewContainer.value?.classList?.replace("show-map", "hide-map"), setTimeout(() => {
343
358
  this._setFloorLevel(this.floorLevel), this._aiAnalysisInfo?.results && this._setAttributeValuesFromAIAnalysis();
344
359
  }, 500), !this.allowMultipleCreation && this._editor.value?.activeWorkflow && (this._editor.value.activeWorkflow.data.creationInfo.maxFeatures = 1), this._currentPage = "featureForm", this.progressStatus.emit(100), this.drawComplete.emit(!1)) : t === "disabled" && this.allowMultipleCreation && this._currentPage !== "editing" && (this._currentPage = "drawingMultipleFeatures");
345
- })), this.allowMultipleCreation && e.activeWorkflow && (this._activeFeatureCountHandler || (this._activeFeatureCountHandler = y.watch(() => e.activeWorkflow?.data?.viewModel?.activeFeatureCount, (t) => {
360
+ })), this.allowMultipleCreation && e.activeWorkflow && (this._activeFeatureCountHandler || (this._activeFeatureCountHandler = f.watch(() => e.activeWorkflow?.data?.viewModel?.activeFeatureCount, (t) => {
346
361
  t === 0 && (this._currentPage = "drawing"), this.activeFeatureCountChange.emit(t);
347
362
  }))), await this.hideEditorsElements());
348
363
  }
@@ -365,7 +380,7 @@ class N extends L {
365
380
  return;
366
381
  const t = e.detail.results[0].results[0].feature;
367
382
  let i;
368
- t && (await this._updatedMapView?.goTo(t.geometry), this._selectedLayer?.geometryType === "point" && t?.geometry && (i = t.geometry));
383
+ t && (await this._goToAndWaitForStationary(t.geometry), this._selectedLayer?.geometryType === "point" && t?.geometry && (i = t.geometry));
369
384
  const a = this._editor.value?.activeWorkflow;
370
385
  if (i && a?.sketchViewModel?.createGraphic)
371
386
  await this._initializeSketchPoint(i);
@@ -374,7 +389,16 @@ class N extends L {
374
389
  s && (s.set("geometry", i), a.sketchViewModel.update(s));
375
390
  }
376
391
  }
392
+ async _goToAndWaitForStationary(e) {
393
+ const t = this._updatedMapView;
394
+ t && (await t.goTo(e, {
395
+ animate: !0,
396
+ duration: this.isMobile ? 1200 : 800,
397
+ easing: "ease-in-out"
398
+ }), await f.whenOnce(() => t.stationary));
399
+ }
377
400
  async _initializeSketchPoint(e) {
401
+ this.isMobile && await new Promise((s) => setTimeout(s, 1e3));
378
402
  const t = this._editor.value?.activeWorkflow, a = t.sketchViewModel.createGraphic.set("geometry", e).clone();
379
403
  t.sketchViewModel.addGraphic(a), t.sketchViewModel.emit("create", {
380
404
  graphic: a,
@@ -384,26 +408,28 @@ class N extends L {
384
408
  }), await t.sketchViewModel.update(a);
385
409
  }
386
410
  _getSearchConfig(e, t) {
387
- const i = "includeDefaultSources", a = e.sources;
388
- return a && a?.length > 0 ? (e[i] = !1, a.forEach((s) => {
389
- if (s.hasOwnProperty("layer")) {
390
- const n = s, l = n.layer?.id, h = l ? t.map?.findLayerById(l) : "", d = n?.layer?.url;
391
- h ? n.layer = h : d && (n.layer = new $(d));
411
+ const i = e.sources;
412
+ return i && i?.length > 0 ? (i.forEach((a) => {
413
+ if (a.hasOwnProperty("layer")) {
414
+ const n = a, r = n.layer?.id, l = r ? t.map?.findLayerById(r) : "", d = n?.layer?.url;
415
+ l ? n.layer = l : d && (n.layer = new S(d));
392
416
  }
393
- }), a?.forEach((s) => {
394
- if (s.hasOwnProperty("locator")) {
395
- const n = s;
417
+ }), i?.forEach((a) => {
418
+ if (a.hasOwnProperty("locator")) {
419
+ const n = a;
396
420
  if (n?.name === "ArcGIS World Geocoding Service") {
397
- const l = n.outFields || ["Addr_type", "Match_addr", "StAddr", "City"];
398
- n.outFields = l, n.singleLineFieldName = "SingleLine";
421
+ const r = n.outFields || ["Addr_type", "Match_addr", "StAddr", "City"];
422
+ n.outFields = r, n.singleLineFieldName = "SingleLine";
399
423
  }
400
424
  n.url = n.url, delete n.url;
401
425
  }
402
426
  })) : e = {
403
- ...e,
404
- includeDefaultSources: !0
427
+ ...e
405
428
  }, e;
406
429
  }
430
+ _updateSearchActiveSourceIndex() {
431
+ this._searchRef.value && (this._searchRef.value.searchAllDisabled ? this._searchRef.value.activeSourceIndex = 0 : this._searchRef.value.activeSourceIndex = -1);
432
+ }
407
433
  async _setFloorLevel(e) {
408
434
  if (!e)
409
435
  return;
@@ -419,7 +445,7 @@ class N extends L {
419
445
  name: "floor-info-test",
420
446
  title: "Floor Info",
421
447
  returnType: "string"
422
- }), o = new C({
448
+ }), n = new $({
423
449
  label: i,
424
450
  editableExpression: "false",
425
451
  fieldName: i,
@@ -430,16 +456,16 @@ class N extends L {
430
456
  },
431
457
  valueExpression: s.name
432
458
  });
433
- this._updatedMapView?.map.editableLayers.forEach((n) => {
434
- const l = this.formElements.orgElements, h = this.formElements.orgExpressionInfos, d = [...l];
435
- if (d.push(o), n.type === "feature") {
436
- const m = n, p = new S({
437
- title: m?.formTemplate?.title,
438
- description: m?.formTemplate?.description,
439
- elements: d,
440
- expressionInfos: [s].concat(h)
459
+ this._updatedMapView?.map.editableLayers.forEach((r) => {
460
+ const l = this.formElements.orgElements, d = this.formElements.orgExpressionInfos, m = [...l];
461
+ if (m.push(n), r.type === "feature") {
462
+ const g = r, h = new C({
463
+ title: g?.formTemplate?.title,
464
+ description: g?.formTemplate?.description,
465
+ elements: m,
466
+ expressionInfos: [s].concat(d)
441
467
  });
442
- n.formTemplate = p;
468
+ r.formTemplate = h;
443
469
  }
444
470
  });
445
471
  }
@@ -448,7 +474,7 @@ class N extends L {
448
474
  _setAttributeValuesFromAIAnalysis() {
449
475
  this._aiAnalysisInfo?.results && this._aiAnalysisInfo.results.forEach((e) => {
450
476
  const t = this._editor?.value?.activeWorkflow;
451
- t?.formViewModel && e.key && e.key !== f && e.success && t.formViewModel.setValue(e.key, e.value);
477
+ t?.formViewModel && e.key && e.key !== _ && e.success && t.formViewModel.setValue(e.key, e.value);
452
478
  });
453
479
  }
454
480
  _getImageExtractionData() {
@@ -477,7 +503,7 @@ class N extends L {
477
503
  return this._analysisMode === "text" ? e && e === t ? this._translations.textExtractionError : this._translations.textExtractionPartialError : e && e === t ? this._translations.imageExtractionError : this._translations.imageExtractionPartialError;
478
504
  }
479
505
  _getExtractedAddress(e) {
480
- const t = e.find((i) => i.key === f && i.success && i.value !== null);
506
+ const t = e.find((i) => i.key === _ && i.success && i.value !== null);
481
507
  if (t) {
482
508
  if (typeof t.value == "string")
483
509
  return t.value.trim() || void 0;
@@ -489,6 +515,7 @@ class N extends L {
489
515
  if (!(!this.mapView?.spatialReference || !e))
490
516
  try {
491
517
  const a = (await T.addressToLocations(t.url, {
518
+ location: this.mapView.center,
492
519
  address: { [t.singleLineFieldName]: e },
493
520
  outSpatialReference: this.mapView.spatialReference,
494
521
  maxLocations: 1
@@ -324,8 +324,12 @@ export abstract class CrowdsourceReporter extends LitElement {
324
324
  * @default 'light'
325
325
  */
326
326
  accessor theme: theme;
327
- /** number: default scale to zoom to when zooming to a single point feature */
328
- accessor zoomToScale: number | undefined;
327
+ /**
328
+ * number: default scale to zoom to when zooming to a single point feature
329
+ *
330
+ * @default 15358
331
+ */
332
+ accessor zoomToScale: number;
329
333
  /**
330
334
  * Method to update layerExpressions with the translated values
331
335
  *
@@ -15,7 +15,7 @@ import P from "@arcgis/core/rest/support/IdentifyParameters.js";
15
15
  const k = v`@layer{:host{display:block;--calcite-label-margin-bottom: 0px;--solutions-theme-foreground-color: var(--calcite-color-surface-2)}.width-full{width:100%!important}.height-full{height:100%!important}.notice-msg{padding:10px;width:calc(100% - 20px)}.progress-bar{padding:12px}.footer-top-button{padding-bottom:7px}.footer-button{height:35px}.feature-pagination{background-color:var(--calcite-color-surface-2)!important;border-block-end:1px solid var(--calcite-color-border-3);display:flex;justify-content:center;padding:5px 0}.pagination-count{color:var(--calcite-color-brand);border-bottom:1px solid var(--calcite-color-brand);font-weight:700}.footer-button-container{width:100%;display:flex;gap:10px}.report-submitted-msg{position:absolute;z-index:1000}.share-node{display:flex}.overflow-auto{overflow:auto}}`;
16
16
  class M extends $ {
17
17
  constructor() {
18
- super(), this.center = "", this.commentButtonText = "", this.commentSubmittedMessage = "", this.defaultWebmap = "", this.description = "", this.enableAnonymousAccess = !1, this.enableAnonymousComments = !1, this.enableComments = !1, this.enableHome = !0, this.enableLogin = !1, this.enableNewReports = !1, this.enableSearch = !0, this.enableSnapping = !1, this.enableZoom = !0, this.isMobile = !1, this.layerExpressions = [], this.layerId = "", this.level = "", this.loginTitle = "", this.mapInfos = [], this.objectId = "", this.reportButtonText = "", this.reportsHeader = "", this.reportSubmittedMessage = "", this.showComments = !1, this.showUserImageInCommentsList = !1, this.showFeatureSymbol = !1, this.showMyReportsOnly = !1, this.submitNewReportsMessage = "", this.theme = "light", this.floorLevel = "", this.showFullCommentTitle = !0, this.filterByMapExtent = !1, this.sortOption = "newest", this.reportingArea = !1, this.reportingAreaLayer = "", this.reportingAreaMessage = "", this.enablePhotoLocation = !1, this.enableMessageLocation = !1, this.aiImageExtraction = [], this.aiTextExtraction = [], this._featureCreationFailedErrorMsg = "", this._filterActive = !1, this._flowItems = [], this._hasValidLayers = !1, this._reportSubmitted = !1, this._selectedLayerName = "", this._showSubmitCancelButton = !1, this._showLoadingIndicator = !1, this._sidePanelCollapsed = !1, this._translations = F({ name: "crowdsource-reporter", blocking: !0 }), this._updatedProgressBarStatus = 25, this._updatedSortOption = "newest", this._commentSubmitted = !1, this._addingCommentFailed = !1, this._filterOpen = !1, this._showNextButton = !1, this._submitNextButtonDisabled = !1, this._showFilterIcon = !1, this._createFeature = d(), this._currentFeatureId = "", this._editableLayerIds = [], this._featureDetails = d(), this._featureList = d(), this._selectedRelatedFeature = [], this._layerList = d(), this._createRelatedFeature = d(), this._layers = [], this._mapImageryLayersId = [], this._selectedFeature = [], this._selectedFeatureIndex = 0, this._selectedLayerId = "", this._shareNode = d(), this._urlParamsLoaded = !1, this._validLayers = [], this._nonVisibleValidLayers = [], this._showFullPanel = !1, this._floorExpression = "", this._formElements = [], this._prevSelectedLayerId = "", this._t9nLayerExpressions = [], this._reportSubmittedAlertNode = d(), this._commentSubmittedAlertNode = d(), this._sortPopoverNode = d(), this.togglePanel = S(), C(window);
18
+ super(), this.center = "", this.commentButtonText = "", this.commentSubmittedMessage = "", this.defaultWebmap = "", this.description = "", this.enableAnonymousAccess = !1, this.enableAnonymousComments = !1, this.enableComments = !1, this.enableHome = !0, this.enableLogin = !1, this.enableNewReports = !1, this.enableSearch = !0, this.enableSnapping = !1, this.enableZoom = !0, this.isMobile = !1, this.layerExpressions = [], this.layerId = "", this.level = "", this.loginTitle = "", this.mapInfos = [], this.objectId = "", this.reportButtonText = "", this.reportsHeader = "", this.reportSubmittedMessage = "", this.showComments = !1, this.showUserImageInCommentsList = !1, this.showFeatureSymbol = !1, this.showMyReportsOnly = !1, this.submitNewReportsMessage = "", this.theme = "light", this.zoomToScale = 15358, this.floorLevel = "", this.showFullCommentTitle = !0, this.filterByMapExtent = !1, this.sortOption = "newest", this.reportingArea = !1, this.reportingAreaLayer = "", this.reportingAreaMessage = "", this.enablePhotoLocation = !1, this.enableMessageLocation = !1, this.aiImageExtraction = [], this.aiTextExtraction = [], this._featureCreationFailedErrorMsg = "", this._filterActive = !1, this._flowItems = [], this._hasValidLayers = !1, this._reportSubmitted = !1, this._selectedLayerName = "", this._showSubmitCancelButton = !1, this._showLoadingIndicator = !1, this._sidePanelCollapsed = !1, this._translations = F({ name: "crowdsource-reporter", blocking: !0 }), this._updatedProgressBarStatus = 25, this._updatedSortOption = "newest", this._commentSubmitted = !1, this._addingCommentFailed = !1, this._filterOpen = !1, this._showNextButton = !1, this._submitNextButtonDisabled = !1, this._showFilterIcon = !1, this._createFeature = d(), this._currentFeatureId = "", this._editableLayerIds = [], this._featureDetails = d(), this._featureList = d(), this._selectedRelatedFeature = [], this._layerList = d(), this._createRelatedFeature = d(), this._layers = [], this._mapImageryLayersId = [], this._selectedFeature = [], this._selectedFeatureIndex = 0, this._selectedLayerId = "", this._shareNode = d(), this._urlParamsLoaded = !1, this._validLayers = [], this._nonVisibleValidLayers = [], this._showFullPanel = !1, this._floorExpression = "", this._formElements = [], this._prevSelectedLayerId = "", this._t9nLayerExpressions = [], this._reportSubmittedAlertNode = d(), this._commentSubmittedAlertNode = d(), this._sortPopoverNode = d(), this.togglePanel = S(), C(window);
19
19
  }
20
20
  static {
21
21
  this.properties = { center: 1, commentButtonText: 1, commentSubmittedMessage: 1, defaultWebmap: 1, description: 1, enableAnonymousAccess: 5, enableAnonymousComments: 5, enableComments: 5, enableHome: 5, enableLogin: 5, enableNewReports: 5, enableSearch: 5, enableSnapping: 5, enableZoom: 5, isMobile: 5, layerExpressions: 0, layerId: 1, level: 1, loginTitle: 1, mapInfos: 0, mapView: 0, objectId: 1, reportButtonText: 1, reportingOptions: 0, reportsHeader: 1, reportSubmittedMessage: 1, searchConfiguration: 0, showComments: 5, showUserImageInCommentsList: 5, showFeatureSymbol: 5, showMyReportsOnly: 5, submitNewReportsMessage: 1, theme: 1, zoomToScale: 9, floorLevel: 1, showFullCommentTitle: 5, filterByMapExtent: 5, sortOption: 1, reportingArea: 5, reportingAreaLayer: 1, reportingAreaMessage: 1, enablePhotoLocation: 5, enableMessageLocation: 5, aiImageExtraction: 0, aiTextExtraction: 0, sortFields: 0, _featureCreationFailedErrorMsg: 16, _filterActive: 16, _flowItems: 16, _hasValidLayers: 16, _mapInfo: 16, _reportSubmitted: 16, _selectedLayerName: 16, _showSubmitCancelButton: 16, _showLoadingIndicator: 16, _sidePanelCollapsed: 16, _translations: 16, _updatedProgressBarStatus: 16, _updatedSorting: 16, _updatedSortOption: 16, _commentSubmitted: 16, _addingCommentFailed: 16, _filterOpen: 16, _showNextButton: 16, _submitNextButtonDisabled: 16, _showFilterIcon: 16 };
@@ -19,6 +19,10 @@ export abstract class SolutionsDeployApp extends LitElement {
19
19
  fetchingAllSolutions: string;
20
20
  mySolutions: string;
21
21
  solutionResources: string;
22
+ resourcesGetStarted: string;
23
+ resourcesDocumentation: string;
24
+ resourcesNavigationMenuLabel: string;
25
+ resourcesSupport: string;
22
26
  metaAllSolutionsTitle: string;
23
27
  metaAllSolutionsDescription: string;
24
28
  metaDeploymentsTitle: string;
@@ -38,6 +42,10 @@ export abstract class SolutionsDeployApp extends LitElement {
38
42
  fetchingAllSolutions: string;
39
43
  mySolutions: string;
40
44
  solutionResources: string;
45
+ resourcesGetStarted: string;
46
+ resourcesDocumentation: string;
47
+ resourcesNavigationMenuLabel: string;
48
+ resourcesSupport: string;
41
49
  metaAllSolutionsTitle: string;
42
50
  metaAllSolutionsDescription: string;
43
51
  metaDeploymentsTitle: string;