@esri/solutions-components 5.1.0-next.129 → 5.1.0-next.130

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 (52) hide show
  1. package/dist/cdn/CSS4AELA.js +2 -0
  2. package/dist/cdn/EVGXFAJU.js +2 -0
  3. package/dist/cdn/J5K2SIY6.js +4 -0
  4. package/dist/cdn/{HZOBBQYW.js → JSQHZGE3.js} +91 -91
  5. package/dist/cdn/RMCQZMLA.js +2 -0
  6. package/dist/cdn/U4A4FLFF.js +2 -0
  7. package/dist/cdn/{N2UNOXJ6.js → W5L4RUZC.js} +1 -1
  8. package/dist/cdn/{DYCGZ67C.js → WK7CB4GW.js} +1 -1
  9. package/dist/cdn/{6IMLSV3Z.js → YZVDT3ZT.js} +1 -1
  10. package/dist/cdn/Z4BCFJUQ.js +88 -0
  11. package/dist/cdn/ZTO4S3BZ.js +2 -0
  12. package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.en.json +1 -1
  13. package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.json +1 -1
  14. package/dist/cdn/assets/create-feature/t9n/messages.en.json +1 -1
  15. package/dist/cdn/assets/create-feature/t9n/messages.json +1 -1
  16. package/dist/cdn/assets/crowdsource-reporter/t9n/messages.en.json +1 -1
  17. package/dist/cdn/assets/crowdsource-reporter/t9n/messages.json +1 -1
  18. package/dist/cdn/index.js +1 -1
  19. package/dist/chunks/updateDesign.js +1 -1
  20. package/dist/components/arcgis-solutions-assistant/customElement.d.ts +6 -0
  21. package/dist/components/arcgis-solutions-assistant/customElement.js +340 -340
  22. package/dist/components/create-feature/customElement.d.ts +35 -3
  23. package/dist/components/create-feature/customElement.js +176 -76
  24. package/dist/components/create-feature/index.js +2 -1
  25. package/dist/components/create-related-feature/customElement.d.ts +4 -4
  26. package/dist/components/create-related-feature/customElement.js +60 -80
  27. package/dist/components/create-related-feature/index.js +1 -0
  28. package/dist/components/crowdsource-reporter/customElement.d.ts +16 -2
  29. package/dist/components/crowdsource-reporter/customElement.js +75 -49
  30. package/dist/components/feature-list/customElement.d.ts +1 -1
  31. package/dist/components/feature-list/customElement.js +2 -2
  32. package/dist/components/layer-list/customElement.d.ts +1 -1
  33. package/dist/components/solution-builder-assistant/customElement.js +97 -98
  34. package/dist/docs/api.json +1 -1
  35. package/dist/docs/docs.json +1 -1
  36. package/dist/docs/vscode.html-custom-data.json +1 -1
  37. package/dist/docs/web-types.json +1 -1
  38. package/dist/loader.js +2 -2
  39. package/dist/solutions-components_commit.txt +7 -7
  40. package/dist/types/lumina.d.ts +2 -2
  41. package/dist/types/preact.d.ts +2 -2
  42. package/dist/types/react.d.ts +2 -2
  43. package/dist/types/stencil.d.ts +2 -2
  44. package/dist/utils/interfaces.d.ts +17 -0
  45. package/package.json +1 -1
  46. package/dist/cdn/53MDMQSB.js +0 -88
  47. package/dist/cdn/H4YPSJ5G.js +0 -2
  48. package/dist/cdn/KLCBAO3U.js +0 -4
  49. package/dist/cdn/NSKVOAA7.js +0 -2
  50. package/dist/cdn/ODB4CELR.js +0 -2
  51. package/dist/cdn/QYWT7Y5Q.js +0 -2
  52. package/dist/cdn/UYOTCDME.js +0 -2
@@ -1,35 +1,35 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import { c as y } from "../../chunks/runtime.js";
2
+ import { c as w } from "../../chunks/runtime.js";
3
3
  import { d as c, g as u, a as f, b as m, j as b, e as L } from "../../chunks/mapViewUtils.js";
4
- import { c as F } from "../../chunks/queryUtils.js";
5
- import { u as I } from "../../chunks/useT9n.js";
4
+ import { c as I } from "../../chunks/queryUtils.js";
5
+ import { u as F } from "../../chunks/useT9n.js";
6
6
  import { css as v, html as a, nothing as _ } from "lit";
7
- import { createRef as d, ref as n } from "lit-html/directives/ref.js";
8
- import { LitElement as $, createEvent as C, noShadowRoot as x, safeClassMap as g } from "@arcgis/lumina";
7
+ import { createRef as d, ref as h } from "lit-html/directives/ref.js";
8
+ import { LitElement as $, createEvent as S, noShadowRoot as x, safeClassMap as g } from "@arcgis/lumina";
9
9
  import "@arcgis/instant-apps-components";
10
- import { defineCustomElements as S } from "@arcgis/instant-apps-components/loader";
10
+ import { defineCustomElements as C } from "@arcgis/instant-apps-components/loader";
11
11
  import * as E from "@arcgis/core/core/reactiveUtils.js";
12
12
  import V from "@arcgis/core/layers/support/FeatureFilter.js";
13
- import * as P from "@arcgis/core/rest/identify.js";
14
- import k from "@arcgis/core/rest/support/IdentifyParameters.js";
15
- const O = 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}.report-submitted-msg{position:absolute;z-index:1000}.share-node{display:flex}.overflow-auto{overflow:auto}}`;
13
+ import * as O from "@arcgis/core/rest/identify.js";
14
+ import P from "@arcgis/core/rest/support/IdentifyParameters.js";
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.aiImageExtraction = [], 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 = I({ 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 = C(), S(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.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
- 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, aiImageExtraction: 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 };
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 };
22
22
  }
23
23
  static {
24
- this.styles = O;
24
+ this.styles = k;
25
25
  }
26
26
  static {
27
27
  this.shadowRootOptions = x;
28
28
  }
29
29
  willUpdate(e) {
30
- e.has("isMobile") && this.isMobileWatchHandler(this.isMobile), e.has("mapView") && this.hasUpdated && this.mapViewWatchHandler(), e.has("floorLevel") && this.floorLevelWatchHandler(), (e.has("reportingAreaLayer") || e.has("reportingArea") && this.hasUpdated) && setTimeout(() => {
30
+ e.has("isMobile") && this.isMobileWatchHandler(this.isMobile), e.has("mapView") && this.hasUpdated && this.mapViewWatchHandler(), e.has("floorLevel") && this.floorLevelWatchHandler(), e.has("reportingOptions") && this.hasUpdated && this.reportingOptionsWatchHandler(), (e.has("reportingAreaLayer") || e.has("reportingArea") && this.hasUpdated) && setTimeout(() => {
31
31
  this._createFeature.value && this._createFeature.value.refresh(this.floorLevel);
32
- }, 50), e.has("showMyReportsOnly") && (this.hasUpdated || this.showMyReportsOnly !== !1) && this.showMyReportsOnlyWatchHandler(), e.has("sortOption") && (this.hasUpdated || this.sortOption !== "newest") && this.sortOptionWatchHandler(), e.has("filterByMapExtent") && (this.hasUpdated || this.filterByMapExtent !== !1) && this.filterByMapExtentChangeWatchHandler(), e.has("layerExpressions") && (this.hasUpdated || this.layerExpressions?.length > 0) && this.layerExpressionsWatchHandler(), e.has("showFeatureSymbol") && (this.hasUpdated || this.showFeatureSymbol !== !1) && this.showFeatureSymbolWatchHandler(), (this._flowItems.includes("filter-panel") || this._filterOpen) && this._filterList?.updateInitDefExpressions({ initDefExpressions: this._initDefExpressions });
32
+ }, 50), e.has("showMyReportsOnly") && (this.hasUpdated || this.showMyReportsOnly !== !1) && this.showMyReportsOnlyWatchHandler(), e.has("sortOption") && (this.hasUpdated || this.sortOption !== "newest") && this.sortOptionWatchHandler(), e.has("filterByMapExtent") && (this.hasUpdated || this.filterByMapExtent !== !1) && this.filterByMapExtentChangeWatchHandler(), e.has("layerExpressions") && (this.hasUpdated || this.layerExpressions?.length > 0) && this.layerExpressionsWatchHandler(), e.has("showFeatureSymbol") && (this.hasUpdated || this.showFeatureSymbol !== !1) && this.showFeatureSymbolWatchHandler(), (this._flowItems.includes("filter-panel") || this._filterOpen) && this._filterList?.updateInitDefExpressions({ initDefExpressions: this._initDefExpressions }), e.has("sortFields") && this.hasUpdated && this._selectedLayerId && (this._updatedSortOption === "alphabetical" || this._updatedSortOption === "reverseAlphabetical") && this.sortFieldsWatchHandler();
33
33
  }
34
34
  async isMobileWatchHandler(e) {
35
35
  this.updatePanelState(!1, this._showFullPanel), e && this._flowItems[this._flowItems.length - 1] === "filter-panel" ? (await this.backFromFilterPanel(), this._filterOpen = !0) : !e && this._filterOpen && (await this._closeFilter(), this._flowItems = [...this._flowItems, "filter-panel"]);
@@ -39,6 +39,9 @@ class M extends $ {
39
39
  this.setInitExpressions(), await this.setMapView();
40
40
  });
41
41
  }
42
+ async reportingOptionsWatchHandler() {
43
+ this.setInitExpressions(), await this.setMapView(), this.refreshLists();
44
+ }
42
45
  async floorLevelWatchHandler() {
43
46
  if (this._editableLayerIds)
44
47
  for (const e of this._editableLayerIds) {
@@ -53,6 +56,15 @@ class M extends $ {
53
56
  async sortOptionWatchHandler() {
54
57
  this.updateSortingOptions();
55
58
  }
59
+ sortFieldsWatchHandler() {
60
+ const e = this._getConfiguredLayerSortInfo(this._selectedLayerId);
61
+ if (e?.id === this._selectedLayerId && this._flowItems[this._flowItems.length - 1] === "feature-list") {
62
+ if (e?.fields.length > 0) {
63
+ const t = this._updatedSorting?.order === "asc" ? "asc" : "desc";
64
+ this.sortOptionClick(e.fields[0], t, this._updatedSortOption);
65
+ }
66
+ } else this._flowItems[this._flowItems.length - 1] === "feature-list" && this.updateSortingOptions();
67
+ }
56
68
  filterByMapExtentChangeWatchHandler() {
57
69
  this.refreshLists();
58
70
  }
@@ -83,11 +95,11 @@ class M extends $ {
83
95
  const e = this.theme === "dark" ? "calcite-mode-dark" : "calcite-mode-light";
84
96
  return a`${this._reportSubmitted && a`<calcite-alert auto-close class=${`${e} report-submitted-msg`} icon=check-circle kind=success .label=${this._translations.notification} @calciteAlertClose=${() => {
85
97
  this._reportSubmitted = !1;
86
- }} open placement=top><div slot=message .innerHTML=${(this.reportSubmittedMessage || this._translations.submitMsg) ?? ""} ${n(this._reportSubmittedAlertNode)}></div></calcite-alert>` || ""}${this._featureCreationFailedErrorMsg && a`<calcite-alert auto-close class=${g(e)} icon=x-octagon kind=danger .label=${this._translations.notification} @calciteAlertClose=${() => {
98
+ }} open placement=top><div slot=message .innerHTML=${(this.reportSubmittedMessage || this._translations.submitMsg) ?? ""} ${h(this._reportSubmittedAlertNode)}></div></calcite-alert>` || ""}${this._featureCreationFailedErrorMsg && a`<calcite-alert auto-close class=${g(e)} icon=x-octagon kind=danger .label=${this._translations.notification} @calciteAlertClose=${() => {
87
99
  this._featureCreationFailedErrorMsg = "";
88
100
  }} open placement=top><div slot=title>${this._translations.error}</div><div slot=message>${this._featureCreationFailedErrorMsg}</div></calcite-alert>` || ""}${this._commentSubmitted && a`<calcite-alert auto-close class=${`report-submitted ${e}`} icon=check-circle kind=success .label=${this._translations.notification} @calciteAlertClose=${() => {
89
101
  this._commentSubmitted = !1;
90
- }} open placement=top><div slot=message .innerHTML=${(this.commentSubmittedMessage || this._translations.commentSubmittedMsg) ?? ""} ${n(this._commentSubmittedAlertNode)}></div></calcite-alert>` || ""}${this._addingCommentFailed && a`<calcite-alert auto-close class=${g(e)} icon=x-octagon kind=danger .label=${this._translations.notification} @calciteAlertClose=${() => {
102
+ }} open placement=top><div slot=message .innerHTML=${(this.commentSubmittedMessage || this._translations.commentSubmittedMsg) ?? ""} ${h(this._commentSubmittedAlertNode)}></div></calcite-alert>` || ""}${this._addingCommentFailed && a`<calcite-alert auto-close class=${g(e)} icon=x-octagon kind=danger .label=${this._translations.notification} @calciteAlertClose=${() => {
91
103
  this._addingCommentFailed = !1;
92
104
  }} open placement=top><div slot=title>${this._translations.error}</div><div slot=message>${this._translations.addingCommentFailedMsg}</div></calcite-alert>` || ""}<div><calcite-shell content-behind>${this._getReporter()}</calcite-shell></div>${this.isMobile && this.filterModal() || ""}`;
93
105
  }
@@ -144,7 +156,7 @@ class M extends $ {
144
156
  this._filterActive = !1, this._featureList.value && this._featureList.value.refresh();
145
157
  }} @filterUpdate=${() => {
146
158
  this._filterList?.filterCount !== void 0 && this._handleFilterUpdate(this._filterList?.filterCount > 0);
147
- }} .view=${this.mapView} ${n(this._setFilterList)}></instant-apps-filter-list>` || ""}</div></calcite-dialog>` || "";
159
+ }} .view=${this.mapView} ${h(this._setFilterList)}></instant-apps-filter-list>` || ""}</div></calcite-dialog>` || "";
148
160
  }
149
161
  _setFilterList(e) {
150
162
  this._filterList = e, e && (e.autoUpdateUrl = !1, e.resetBtn = this.isMobile, e.resetFiltersOnDisconnect = !1, e.zoomBtn = !1);
@@ -164,19 +176,28 @@ class M extends $ {
164
176
  order: t
165
177
  }, this._updatedSortOption = i, this._sortPopoverNode.value && (this._sortPopoverNode.value.open = !1);
166
178
  }
179
+ _getConfiguredLayerSortInfo(e) {
180
+ return this.sortFields && this.sortFields.layers.find((t) => t.id === e) || null;
181
+ }
167
182
  _toggleSort() {
168
- const e = this.reportingOptions && this.reportingOptions[this._selectedLayerId] && this.reportingOptions[this._selectedLayerId].like && this.reportingOptions[this._selectedLayerId].likeField;
169
- return a`<calcite-popover auto-close .label=${this._translations.sortOptions} offset-distance=0 .placement=${this.isMobile ? "leading-start" : "bottom-start"} pointer-disabled reference-element=sort-popover ${n(this._sortPopoverNode)}><calcite-list .label=${this._translations.sortOptions} selection-mode=single-persist><calcite-list-item .label=${this._translations.sortNewest} @calciteListItemSelect=${() => {
183
+ const e = this.reportingOptions && this.reportingOptions[this._selectedLayerId] && this.reportingOptions[this._selectedLayerId].like && this.reportingOptions[this._selectedLayerId].likeField, t = this._getConfiguredLayerSortInfo(this._selectedLayerId);
184
+ return a`<calcite-popover auto-close .label=${this._translations.sortOptions} offset-distance=0 .placement=${this.isMobile ? "leading-start" : "bottom-start"} pointer-disabled reference-element=sort-popover ${h(this._sortPopoverNode)}><calcite-list .label=${this._translations.sortOptions} selection-mode=single-persist><calcite-list-item .label=${this._translations.sortNewest} @calciteListItemSelect=${() => {
170
185
  this._selectedLayer && this.sortOptionClick(this._selectedLayer.objectIdField, "desc", "newest");
171
186
  }} .selected=${this._updatedSortOption === "newest"} value=newest></calcite-list-item><calcite-list-item .label=${this._translations.sortOldest} @calciteListItemSelect=${() => {
172
187
  this._selectedLayer && this.sortOptionClick(this._selectedLayer.objectIdField, "asc", "oldest");
173
188
  }} .selected=${this._updatedSortOption === "oldest"} value=oldest></calcite-list-item>${e && a`<calcite-list-item .label=${this._translations.sortHighestVoted} @calciteListItemSelect=${() => {
174
- const t = this.reportingOptions && this.reportingOptions[this._selectedLayerId].likeField;
175
- t !== void 0 && this.sortOptionClick(t, "desc", "highestVoted");
189
+ const i = this.reportingOptions && this.reportingOptions[this._selectedLayerId].likeField;
190
+ i !== void 0 && this.sortOptionClick(i, "desc", "highestVoted");
176
191
  }} .selected=${this._updatedSortOption === "highestVoted"} value=highestVoted></calcite-list-item><calcite-list-item .label=${this._translations.sortLowestVoted} @calciteListItemSelect=${() => {
177
- const t = this.reportingOptions && this.reportingOptions[this._selectedLayerId].likeField;
178
- t && this.sortOptionClick(t, "asc", "lowestVoted");
179
- }} .selected=${this._updatedSortOption === "lowestVoted"} value=lowestVoted></calcite-list-item>` || ""}</calcite-list></calcite-popover>`;
192
+ const i = this.reportingOptions && this.reportingOptions[this._selectedLayerId].likeField;
193
+ i && this.sortOptionClick(i, "asc", "lowestVoted");
194
+ }} .selected=${this._updatedSortOption === "lowestVoted"} value=lowestVoted></calcite-list-item>` || ""}${t && a`<calcite-list-item .label=${this._translations.sortAlphabetical} @calciteListItemSelect=${() => {
195
+ const i = this._getConfiguredLayerSortInfo(this._selectedLayerId);
196
+ i?.fields && this.sortOptionClick(i.fields[0], "asc", "alphabetical");
197
+ }} .selected=${this._updatedSortOption === "alphabetical"} value=alphabetical></calcite-list-item><calcite-list-item .label=${this._translations.reverseSortAlphabetical} @calciteListItemSelect=${() => {
198
+ const i = this._getConfiguredLayerSortInfo(this._selectedLayerId);
199
+ i?.fields && this.sortOptionClick(i.fields[0], "desc", "reverseAlphabetical");
200
+ }} .selected=${this._updatedSortOption === "reverseAlphabetical"} value=reverseAlphabetical></calcite-list-item>` || ""}</calcite-list></calcite-popover>`;
180
201
  }
181
202
  async _handleFilterListReset() {
182
203
  this._filterActive = !1;
@@ -185,14 +206,14 @@ class M extends $ {
185
206
  this._showLoadingIndicator = !0, this._filterActive = e, this._featureList.value && await this._featureList.value.refresh(), this._showLoadingIndicator = !1;
186
207
  }
187
208
  getLayerListFlowItem() {
188
- return a`<calcite-flow-item .collapsed=${this.isMobile && this._sidePanelCollapsed} .heading=${this.reportsHeader} .loading=${this._showLoadingIndicator} .selected=${this._flowItems[this._flowItems.length - 1] === "layer-list"}>${this.isMobile && this.getActionToExpandCollapsePanel() || ""}${this._hasValidLayers && this.enableNewReports && a`<calcite-button appearance=solid @click=${this.navigateToChooseCategory} slot=footer width=full>${this.reportButtonText ? this.reportButtonText : this._translations.createReportButtonText}</calcite-button>` || ""}<calcite-panel><layer-list .applyLayerViewFilter=${this.showMyReportsOnly} class="height-full" .filterByMapExtent=${this.filterByMapExtent} .layers=${this._editableLayerIds?.length > 0 ? this._editableLayerIds : this._layers} .mapView=${this.mapView} @layerSelect=${this.displayFeaturesList} @layersListLoaded=${this.layerListLoaded} show-feature-count show-next-icon ${n(this._layerList)}></layer-list></calcite-panel></calcite-flow-item>`;
209
+ return a`<calcite-flow-item .collapsed=${this.isMobile && this._sidePanelCollapsed} .heading=${this.reportsHeader} .loading=${this._showLoadingIndicator} .selected=${this._flowItems[this._flowItems.length - 1] === "layer-list"}>${this.isMobile && this.getActionToExpandCollapsePanel() || ""}${this._hasValidLayers && this.enableNewReports && a`<calcite-button appearance=solid @click=${this.navigateToChooseCategory} slot=footer width=full>${this.reportButtonText ? this.reportButtonText : this._translations.createReportButtonText}</calcite-button>` || ""}<calcite-panel><layer-list .applyLayerViewFilter=${this.showMyReportsOnly} class="height-full" .filterByMapExtent=${this.filterByMapExtent} .layers=${this._editableLayerIds?.length > 0 ? this._editableLayerIds : this._layers} .mapView=${this.mapView} @layerSelect=${this.displayFeaturesList} @layersListLoaded=${this.layerListLoaded} show-feature-count show-next-icon ${h(this._layerList)}></layer-list></calcite-panel></calcite-flow-item>`;
189
210
  }
190
211
  getChooseCategoryFlowItem() {
191
212
  const e = this.reportingOptions ? Object.keys(this.reportingOptions).filter((t) => this.reportingOptions && this.reportingOptions[t].visible && this.reportingOptions[t].reporting && this._layerItemsHash && this._layerItemsHash[t] && this._layerItemsHash[t].supportsAdd) : [];
192
213
  return a`<calcite-flow-item .collapsed=${this.isMobile && this._sidePanelCollapsed} .heading=${this.reportButtonText ? this.reportButtonText : this._translations.createReportButtonText} @calciteFlowItemBack=${this.backFromSelectedPanel} .selected=${this._flowItems[this._flowItems.length - 1] === "reporting-layer-list"}><calcite-panel><div class="progress-bar"><calcite-progress type=determinate .value=${this._updatedProgressBarStatus}></calcite-progress></div><calcite-notice class="notice-msg" icon=lightbulb kind=success open><div slot=message>${this._translations.chooseCategoryMsg}</div></calcite-notice><layer-list class="height-full" .layers=${e} .mapView=${this.mapView} @layerSelect=${this.navigateToCreateFeature}></layer-list></calcite-panel></calcite-flow-item>`;
193
214
  }
194
215
  getFeatureCreateFlowItem() {
195
- return a`<calcite-flow-item .collapsed=${this.isMobile && this._sidePanelCollapsed} .heading=${this._selectedLayerName} @calciteFlowItemBack=${this.backFromCreateFeaturePanel} .selected=${this._flowItems[this._flowItems.length - 1] === "feature-create"}>${this._showSubmitCancelButton && a`<div class=width-full slot=footer><calcite-button appearance=solid class="footer-top-button footer-button" .disabled=${this._submitNextButtonDisabled} @click=${this._showNextButton ? this.onNextButtonClick.bind(this) : this.onCreateFeatureSubmitButtonClick.bind(this)} width=full>${this._showNextButton ? this._translations.next : this._translations.submit}</calcite-button><calcite-button appearance=outline class=footer-button @click=${this.backFromCreateFeaturePanel} width=full>${this._translations.cancel}</calcite-button></div>` || ""}<calcite-panel><div class="progress-bar"><calcite-progress type=determinate .value=${this._updatedProgressBarStatus}></calcite-progress></div><create-feature app-name=reporter .aiImageExtraction=${this.aiImageExtraction} class="height-full overflow-auto" customize-submit enable-search .enablePhotoLocation=${this.enablePhotoLocation} .enableSnapping=${this.enableSnapping} .floorLevel=${this.floorLevel} .formElements=${this._formElements.find((e) => e.id === this._selectedLayerId)} .reportingAreaLayer=${this.reportingAreaLayer} .isMobile=${this.isMobile} .mapView=${this.mapView} @drawComplete=${this.onFormReady} @editingLocation=${this.editingLocation} @editingAttachment=${this.showSubmitCancelButton} @fail=${this.createFeatureFailed} @modeChanged=${this.backFromCreateFeaturePanel} @progressStatus=${this.updatedProgressStatus} @success=${this.onReportSubmitted} .searchConfiguration=${this.searchConfiguration} .selectedLayerId=${this._selectedLayerId} .reportingArea=${this.reportingArea} .reportingAreaMessage=${this.reportingAreaMessage} .submitNewReportsMessage=${this.submitNewReportsMessage} update-map-position ${n(this._createFeature)}></create-feature></calcite-panel></calcite-flow-item>`;
216
+ return a`<calcite-flow-item .collapsed=${this.isMobile && this._sidePanelCollapsed} .heading=${this._selectedLayerName} @calciteFlowItemBack=${this.backFromCreateFeaturePanel} .selected=${this._flowItems[this._flowItems.length - 1] === "feature-create"}>${this._showSubmitCancelButton && a`<div class=width-full slot=footer><calcite-button appearance=solid class="footer-top-button footer-button" .disabled=${this._submitNextButtonDisabled} @click=${this._showNextButton ? this.onNextButtonClick.bind(this) : this.onCreateFeatureSubmitButtonClick.bind(this)} width=full>${this._showNextButton ? this._translations.next : this._translations.submit}</calcite-button><calcite-button appearance=outline class=footer-button @click=${this.backFromCreateFeaturePanel} width=full>${this._translations.cancel}</calcite-button></div>` || ""}<calcite-panel><div class="progress-bar"><calcite-progress type=determinate .value=${this._updatedProgressBarStatus}></calcite-progress></div><create-feature app-name=reporter .aiImageExtraction=${this.aiImageExtraction} .aiTextExtraction=${this.aiTextExtraction} class="height-full overflow-auto" customize-submit .enableSearch=${this.enableSearch} .enablePhotoLocation=${this.enablePhotoLocation} .enableMessageLocation=${this.enableMessageLocation} .enableSnapping=${this.enableSnapping} .floorLevel=${this.floorLevel} .formElements=${this._formElements.find((e) => e.id === this._selectedLayerId)} .reportingAreaLayer=${this.reportingAreaLayer} .isMobile=${this.isMobile} .mapView=${this.mapView} @drawComplete=${this.onFormReady} @editingLocation=${this.editingLocation} @editingAttachment=${this.showSubmitCancelButton} @fail=${this.createFeatureFailed} @modeChanged=${this.backFromCreateFeaturePanel} @progressStatus=${this.updatedProgressStatus} @success=${this.onReportSubmitted} .searchConfiguration=${this.searchConfiguration} .selectedLayerId=${this._selectedLayerId} .reportingArea=${this.reportingArea} .reportingAreaMessage=${this.reportingAreaMessage} .submitNewReportsMessage=${this.submitNewReportsMessage} update-map-position ${h(this._createFeature)}></create-feature></calcite-panel></calcite-flow-item>`;
196
217
  }
197
218
  updatedProgressStatus(e) {
198
219
  this._updatedProgressBarStatus = e.detail;
@@ -236,7 +257,12 @@ class M extends $ {
236
257
  }, 300);
237
258
  }
238
259
  async navigateToHomePage() {
239
- await this.setSelectedFeatures([]), this._layerList.value && await this._layerList.value.refresh(), this._editableLayerIds.length === 1 ? (this._featureList.value && await this._featureList.value.refresh(), this._flowItems = ["feature-list"]) : this._flowItems = ["layer-list"];
260
+ if (await this.setSelectedFeatures([]), this._editableLayerIds.length === 1)
261
+ this._featureList.value && await this._featureList.value.refresh(), this._flowItems = ["feature-list"];
262
+ else {
263
+ const e = this.mapView && await c(this.mapView, this._prevSelectedLayerId);
264
+ this.floorLevel && e?.floorInfo?.floorField && this._updateFloorDefinitionExpression(e), this._layerList.value && await this._layerList.value.refresh(), this._flowItems = ["layer-list"];
265
+ }
240
266
  }
241
267
  async navigateToCreateFeature(e) {
242
268
  e.detail.layerId && e.detail.layerName && await this.setSelectedLayer(e.detail.layerId, e.detail.layerName), this.updateNonVisibleLayersOnMap(!0), this._getFormElements(), this._showSubmitCancelButton = !1, this._showNextButton = !1, this.updatePanelState(!1, !0), this._flowItems = [...this._flowItems, "feature-create"];
@@ -267,11 +293,11 @@ class M extends $ {
267
293
  this._showLoadingIndicator = !0, await this.setSelectedLayer(e.detail.layerId, e.detail.layerName), this.updateSortingOptions(), this.handleSelectedLayersFilter(), this._flowItems = [...this._flowItems, "feature-list"], this._prevSelectedLayerId = this._selectedLayerId, this._showLoadingIndicator = !1;
268
294
  }
269
295
  updateSortingOptions() {
270
- const e = this.sortOption === "" ? "newest" : this.sortOption, t = e === "oldest" || e === "lowestVoted" ? "asc" : "desc", i = this.reportingOptions?.[this._selectedLayerId]?.like ? this.reportingOptions?.[this._selectedLayerId]?.likeField : "", s = this._selectedLayer && (e === "newest" || e === "oldest") ? this._selectedLayer?.objectIdField : i;
296
+ const e = this.sortOption === "" ? "newest" : this.sortOption, t = e === "oldest" || e === "lowestVoted" || e === "alphabetical" ? "asc" : "desc", i = this.reportingOptions?.[this._selectedLayerId]?.like ? this.reportingOptions?.[this._selectedLayerId]?.likeField : "", l = this._getConfiguredLayerSortInfo(this._selectedLayerId)?.fields?.[0] || "", r = this._selectedLayer && (e === "newest" || e === "oldest") ? this._selectedLayer?.objectIdField : e === "alphabetical" || e === "reverseAlphabetical" ? l : i, n = !!i && (e === "highestVoted" || e === "lowestVoted"), o = !!l && (e === "alphabetical" || e === "reverseAlphabetical");
271
297
  this._updatedSorting = {
272
- field: s || "",
298
+ field: r || "",
273
299
  order: t
274
- }, this._updatedSortOption = !i && (e === "highestVoted" || e === "lowestVoted") ? "newest" : e;
300
+ }, this._updatedSortOption = n || o || !(e === "highestVoted" || e === "lowestVoted" || e === "alphabetical" || e === "reverseAlphabetical") ? e : "newest";
275
301
  }
276
302
  async backFromFilterPanel() {
277
303
  this._filterList != null && (this._currentLayerExpressions = await this._filterList.getCurrentLayerExpressions(), this._showFilterIcon = this._currentLayerExpressions?.length > 0), this._featureList.value && await this._featureList.value.refresh(), this.backFromSelectedPanel();
@@ -315,11 +341,11 @@ class M extends $ {
315
341
  }
316
342
  getFeatureListFlowItem(e, t) {
317
343
  const i = this._getLayersConfig(this._selectedLayerId)?.reporting && this._layerItemsHash && this._layerItemsHash[this._selectedLayerId].supportsAdd, s = this._showFilterIcon;
318
- return a`<calcite-flow-item .collapsed=${this.isMobile && this._sidePanelCollapsed} .heading=${t} .loading=${!this.isMobile && this._showLoadingIndicator} @calciteFlowItemBack=${this.backFromSelectedPanel} .selected=${this._flowItems[this._flowItems.length - 1] === "feature-list"}>${this._toggleSort()}<calcite-action appearance=solid icon=sort-ascending-arrow id=sort-popover slot=header-actions-end .text=${this._translations.sort} title=${this._translations.sort ?? _}></calcite-action>${s && a`<calcite-action appearance=solid icon=filter .indicator=${this._filterActive} @click=${() => {
344
+ return a`<calcite-flow-item .collapsed=${this.isMobile && this._sidePanelCollapsed} .heading=${t} .loading=${!this.isMobile && this._showLoadingIndicator} @calciteFlowItemBack=${this.backFromSelectedPanel} .selected=${this._flowItems[this._flowItems.length - 1] === "feature-list"}>${this._toggleSort()}<calcite-action icon=sort-ascending-arrow id=sort-popover slot=header-actions-end .text=${this._translations.sort} title=${this._translations.sort ?? _}></calcite-action>${s && a`<calcite-action icon=filter .indicator=${this._filterActive} @click=${() => {
319
345
  this.isMobile ? this._toggleFilter() : this._flowItems = [...this._flowItems, "filter-panel"];
320
346
  }} slot=header-actions-end .text=${this._translations.filter} title=${this._translations.filter ?? _}></calcite-action>` || ""}${this.isMobile && this.getActionToExpandCollapsePanel() || ""}${this.enableNewReports && i && a`<calcite-button appearance=solid @click=${this.navigateToCreateFeature} slot=footer width=full>${this.reportButtonText ? this.reportButtonText : this._translations.createReportButtonText}</calcite-button>` || ""}<calcite-panel>${a`<feature-list .applyLayerViewFilter=${this.showMyReportsOnly} class="height-full" .filterByMapExtent=${this.filterByMapExtent} highlight-on-hover .mapView=${this.mapView} .noFeaturesFoundMsg=${this._translations.featureErrorMsg} @featureClick=${() => {
321
347
  this._showLoadingIndicator = !0;
322
- }} @featureSelect=${this.onFeatureSelectFromList} page-size=30 .reportingOptions=${this.reportingOptions} .selectedLayerId=${e} .showFeatureSymbol=${this.showFeatureSymbol} .sortingInfo=${this._updatedSorting} ${n(this._featureList)}></feature-list>`}</calcite-panel></calcite-flow-item>`;
348
+ }} @featureSelect=${this.onFeatureSelectFromList} page-size=30 .reportingOptions=${this.reportingOptions} .selectedLayerId=${e} show-error-when-no-features .showFeatureSymbol=${this.showFeatureSymbol} .sortingInfo=${this._updatedSorting} ${h(this._featureList)}></feature-list>`}</calcite-panel></calcite-flow-item>`;
323
349
  }
324
350
  getFilterPanel() {
325
351
  return a`<calcite-flow-item .collapsed=${this.isMobile && this._sidePanelCollapsed} .heading=${this._translations.filterLayerTitle.replace("{{title}}", this._selectedLayerName)} .loading=${this._showLoadingIndicator} @calciteFlowItemBack=${this.backFromFilterPanel} .selected=${this._flowItems[this._flowItems.length - 1] === "filter-panel"}>${this.isMobile && this.getActionToExpandCollapsePanel() || ""}<div class=width-full slot=footer><div class=width-full slot=footer><calcite-button appearance=solid class="footer-top-button footer-button" .disabled=${!this._filterActive} @click=${this.resetFilterList} width=full>${this._translations.resetFilter}</calcite-button><calcite-button appearance=outline class=footer-button @click=${this.backFromFilterPanel} width=full>${this._translations.close}</calcite-button></div></div><calcite-panel>${this.mapView && a`<instant-apps-filter-list .closeBtnOnClick=${() => {
@@ -328,17 +354,17 @@ class M extends $ {
328
354
  }} @filterUpdate=${() => {
329
355
  const e = this._filterList?.filterCount;
330
356
  e !== void 0 && this._handleFilterUpdate(e > 0);
331
- }} .view=${this.mapView} ${n(this._setFilterList)}></instant-apps-filter-list>` || ""}</calcite-panel></calcite-flow-item>`;
357
+ }} .view=${this.mapView} ${h(this._setFilterList)}></instant-apps-filter-list>` || ""}</calcite-panel></calcite-flow-item>`;
332
358
  }
333
359
  getFeatureDetailsFlowItem() {
334
360
  const e = this._selectedLayer?.relationships, t = this._getLayersConfig(this._selectedLayerId)?.comment && e && e.length > 0 && this._relatedTable;
335
- return a`<calcite-flow-item .collapsed=${this.isMobile && this._sidePanelCollapsed} .heading=${this._selectedLayerName} .loading=${this._showLoadingIndicator} @calciteFlowItemBack=${this.backFromSelectedPanel} .selected=${this._flowItems[this._flowItems.length - 1] === "feature-details"}>${this.isMobile && this.getActionToExpandCollapsePanel() || ""}${this.mapView && a`<instant-apps-social-share class=share-node flip-rtl popover-button-icon-scale=s remove-popover-offset scale=m share-button-color=neutral share-button-type=action slot=header-actions-end social-media .view=${this.mapView} ${n(this._shareNode)}></instant-apps-social-share>` || ""}${this._selectedFeature.length > 1 && this.getFeaturesPagination() || ""}<calcite-panel><feature-details class=full-height .enableSnapping=${this.enableSnapping} .graphics=${this._selectedFeature} .layerItemsHash=${this._layerItemsHash} .mapView=${this.mapView} @addComment=${this.showAddCommentsPanel} @commentClick=${() => {
361
+ return a`<calcite-flow-item .collapsed=${this.isMobile && this._sidePanelCollapsed} .heading=${this._selectedLayerName} .loading=${this._showLoadingIndicator} @calciteFlowItemBack=${this.backFromSelectedPanel} .selected=${this._flowItems[this._flowItems.length - 1] === "feature-details"}>${this.isMobile && this.getActionToExpandCollapsePanel() || ""}${this.mapView && a`<instant-apps-social-share class=share-node flip-rtl popover-button-icon-scale=s remove-popover-offset scale=m share-button-color=neutral share-button-type=action slot=header-actions-end social-media .view=${this.mapView} ${h(this._shareNode)}></instant-apps-social-share>` || ""}${this._selectedFeature.length > 1 && this.getFeaturesPagination() || ""}<calcite-panel><feature-details class=full-height .enableSnapping=${this.enableSnapping} .graphics=${this._selectedFeature} .layerItemsHash=${this._layerItemsHash} .mapView=${this.mapView} @addComment=${this.showAddCommentsPanel} @commentClick=${() => {
336
362
  this._showLoadingIndicator = !0;
337
363
  }} @commentSelect=${this.onCommentSelectFromList} @featureSelectionChange=${this.selectionChanged} @likeOrDislikeClicked=${() => {
338
364
  this._featureList.value && this._featureList.value.refresh(!0);
339
365
  }} @loadingStatus=${(i) => {
340
366
  this.updatingFeatureDetails(i.detail);
341
- }} .reportingOptions=${this.reportingOptions} .showFullCommentTitle=${this.showFullCommentTitle} .showUserImageInCommentsList=${this.showUserImageInCommentsList} ${n(this._featureDetails)}></feature-details>${t && a`<calcite-button appearance=solid @click=${this.showAddCommentsPanel} slot=footer width=full>${this.commentButtonText || this._translations.comment}</calcite-button>` || ""}</calcite-panel></calcite-flow-item>`;
367
+ }} .reportingOptions=${this.reportingOptions} .showFullCommentTitle=${this.showFullCommentTitle} .showUserImageInCommentsList=${this.showUserImageInCommentsList} ${h(this._featureDetails)}></feature-details>${t && a`<calcite-button appearance=solid @click=${this.showAddCommentsPanel} slot=footer width=full>${this.commentButtonText || this._translations.comment}</calcite-button>` || ""}</calcite-panel></calcite-flow-item>`;
342
368
  }
343
369
  getFeaturesPagination() {
344
370
  return a`<div class="feature-pagination"><div><calcite-button appearance=transparent icon-start=chevron-left icon-flip-rtl=both id=solutions-back .label=${this._translations.back} @click=${() => this._featureDetails.value && void this._featureDetails.value.back()} scale=s width=full></calcite-button><calcite-tooltip placement=top reference-element=solutions-back><span>${this._translations.back}</span></calcite-tooltip></div><calcite-button appearance=transparent .label=${this._translations.toggleListView} @click=${() => this._featureDetails.value && void this._featureDetails.value.toggleListView()} scale=s><span class="pagination-count">${this._getCount()}</span></calcite-button><div><calcite-button appearance=transparent icon-flip-rtl=both icon-start=chevron-right id=solutions-next .label=${this._translations.next} @click=${() => this._featureDetails.value && void this._featureDetails.value.next()} scale=s width=full></calcite-button><calcite-tooltip placement=top reference-element=solutions-next><span>${this._translations.next}</span></calcite-tooltip></div></div>`;
@@ -349,7 +375,7 @@ class M extends $ {
349
375
  }}></info-card></calcite-panel></calcite-flow-item>`;
350
376
  }
351
377
  getAddCommentFlowItem() {
352
- return a`<calcite-flow-item .collapsed=${this.isMobile && this._sidePanelCollapsed} .heading=${this._relatedTable?.title || ""} @calciteFlowItemBack=${this.backFromCreateRelatedFeaturePanel} .selected=${this._flowItems[this._flowItems.length - 1] === "add-comment"}>${this.isMobile && this.getActionToExpandCollapsePanel() || ""}<div class=width-full slot=footer>${this._showSubmitCancelButton && a`<div class=width-full slot=footer><calcite-button appearance=solid class="footer-top-button footer-button" @click=${this.onCreateRelatedFeatureSubmitButtonClick} width=full>${this._translations.submit}</calcite-button><calcite-button appearance=outline class=footer-button @click=${this.backFromCreateRelatedFeaturePanel} width=full>${this._translations.cancel}</calcite-button></div>` || ""}</div><calcite-panel><create-related-feature customize-submit .enableSnapping=${this.enableSnapping} .mapView=${this.mapView} @fail=${this.addCommentFailed} @formReady=${this.onFormReady} @isActionPending=${this.showSubmitCancelButton} @success=${this.onCommentSubmitted} .selectedFeature=${this._currentFeature} .table=${this._relatedTable} ${n(this._createRelatedFeature)}></create-related-feature></calcite-panel></calcite-flow-item>`;
378
+ return a`<calcite-flow-item .collapsed=${this.isMobile && this._sidePanelCollapsed} .heading=${this._relatedTable?.title || ""} @calciteFlowItemBack=${this.backFromCreateRelatedFeaturePanel} .selected=${this._flowItems[this._flowItems.length - 1] === "add-comment"}>${this.isMobile && this.getActionToExpandCollapsePanel() || ""}<div class=width-full slot=footer>${this._showSubmitCancelButton && a`<div class=width-full slot=footer><calcite-button appearance=solid class="footer-top-button footer-button" @click=${this.onCreateRelatedFeatureSubmitButtonClick} width=full>${this._translations.submit}</calcite-button><calcite-button appearance=outline class=footer-button @click=${this.backFromCreateRelatedFeaturePanel} width=full>${this._translations.cancel}</calcite-button></div>` || ""}</div><calcite-panel><create-related-feature customize-submit .enableSnapping=${this.enableSnapping} .mapView=${this.mapView} @fail=${this.addCommentFailed} @formReady=${this.onFormReady} @isActionPending=${this.showSubmitCancelButton} @success=${this.onCommentSubmitted} .selectedFeature=${this._currentFeature} .table=${this._relatedTable} ${h(this._createRelatedFeature)}></create-related-feature></calcite-panel></calcite-flow-item>`;
353
379
  }
354
380
  async setSelectedFeatures(e) {
355
381
  this._selectedFeature = e, await this.setCurrentFeature(this._selectedFeature.length ? this._selectedFeature[0] : void 0);
@@ -376,7 +402,7 @@ class M extends $ {
376
402
  this._highlightHandle && this._highlightHandle.remove();
377
403
  }
378
404
  getActionToExpandCollapsePanel() {
379
- return a`<calcite-action appearance=solid .icon=${this._sidePanelCollapsed ? "chevrons-up" : "chevrons-down"} @click=${this.toggleSidePanel} slot=header-actions-end .text=${(this._sidePanelCollapsed ? this._translations.expand : this._translations.collapse) || ""}></calcite-action>`;
405
+ return a`<calcite-action .icon=${this._sidePanelCollapsed ? "chevrons-up" : "chevrons-down"} @click=${this.toggleSidePanel} slot=header-actions-end .text=${(this._sidePanelCollapsed ? this._translations.expand : this._translations.collapse) || ""}></calcite-action>`;
380
406
  }
381
407
  async setMapView() {
382
408
  this.mapView && await f(this.mapView), await this.getLayersToShowInList(), await this._updateFeatures(), this._editableLayerIds?.length === 1 ? await this.renderFeaturesList() : this._flowItems = ["layer-list"], this.mapView && (this.mapView.popupEnabled = !1, this._defaultCenter && this._defaultLevel && (await this.mapView.goTo({
@@ -396,11 +422,11 @@ class M extends $ {
396
422
  t.results.length > 0 && t.results.forEach((o) => {
397
423
  o.type === "graphic" && i.push(o.graphic);
398
424
  }), i.length > 0 && (await this._setReportingGraphics(i), s = this._getNonReportingLayerGraphics(i)), this._mapImageryLayersId.length > 0 && (l = await this._getIdentifiedGraphics(e.mapPoint), r = l.length > 0);
399
- const h = s.concat(l);
400
- if (h.length > 0) {
425
+ const n = s.concat(l);
426
+ if (n.length > 0) {
401
427
  this.mapView.popupEnabled = !0;
402
428
  const o = {
403
- features: h,
429
+ features: n,
404
430
  location: e.mapPoint,
405
431
  updateLocationEnabled: !r
406
432
  // if identify graphics is present then dont update location
@@ -429,19 +455,19 @@ class M extends $ {
429
455
  });
430
456
  }
431
457
  async _getIdentifiedGraphics(e) {
432
- const t = new k({
458
+ const t = new P({
433
459
  geometry: e,
434
460
  tolerance: 3,
435
461
  mapExtent: this.mapView?.extent
436
462
  });
437
463
  let i, s = [];
438
464
  for (const r of this._mapImageryLayersId) {
439
- const h = this.mapView && await c(this.mapView, r);
440
- if (h?.url && t)
465
+ const n = this.mapView && await c(this.mapView, r);
466
+ if (n?.url && t)
441
467
  try {
442
- const o = await P?.identify(h.url, t);
468
+ const o = await O?.identify(n.url, t);
443
469
  if (o?.results?.length) {
444
- s = o.results, i = h;
470
+ s = o.results, i = n;
445
471
  break;
446
472
  }
447
473
  } catch (o) {
@@ -450,7 +476,7 @@ class M extends $ {
450
476
  }
451
477
  const l = [];
452
478
  return s.forEach((r) => {
453
- const h = r.layerId, o = i?.sublayers?.items.find((w) => w.id === h), p = o?.popupTemplate;
479
+ const n = r.layerId, o = i?.sublayers?.items.find((y) => y.id === n), p = o?.popupTemplate;
454
480
  o?.popupEnabled && p && (r.feature.popupTemplate = p, l.push(r.feature));
455
481
  }), l;
456
482
  }
@@ -526,7 +552,7 @@ class M extends $ {
526
552
  }), this.layerId && this.objectId) {
527
553
  const e = this.mapView && await c(this.mapView, this.layerId);
528
554
  if (e) {
529
- const t = this.mapView && await F([Number(this.objectId)], e, [], !0, this.mapView.spatialReference);
555
+ const t = this.mapView && await I([Number(this.objectId)], e, [], !0, this.mapView.spatialReference);
530
556
  t?.length && (await this.setSelectedFeatures(t), this._flowItems.length && this._flowItems[this._flowItems.length - 1] !== "feature-details" ? this._flowItems = [...this._flowItems, "feature-details"] : this._flowItems = [...this._flowItems]);
531
557
  }
532
558
  }
@@ -582,13 +608,13 @@ class M extends $ {
582
608
  e?.forEach((i) => {
583
609
  const s = t?.find((l) => l.id === i.id);
584
610
  s != null && (i.title = s.title, i.expressions?.forEach((l) => {
585
- const r = s.expressions?.find((h) => h.id === l.id);
611
+ const r = s.expressions?.find((n) => n.id === l.id);
586
612
  r != null && (l.name = r.name);
587
613
  }));
588
614
  });
589
615
  }
590
616
  }
591
- y("crowdsource-reporter", M);
617
+ w("crowdsource-reporter", M);
592
618
  export {
593
619
  M as CrowdsourceReporter
594
620
  };
@@ -53,7 +53,7 @@ export abstract class FeatureList extends LitElement {
53
53
  * @default false
54
54
  */
55
55
  accessor highlightOnMap: boolean | undefined;
56
- /** esri/views/View: https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html */
56
+ /** esri/views/MapView: https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html */
57
57
  accessor mapView: MapView | undefined;
58
58
  /**
59
59
  * string: Message to be displayed when features are not found
@@ -84,7 +84,7 @@ class T extends F {
84
84
  where: await this.getWhereCondition(),
85
85
  geometry: this.filterByMapExtent ? this.mapView?.extent : null
86
86
  };
87
- this._featuresCount = await this._selectedLayer.queryFeatureCount(e), this._isLoading = !1;
87
+ this._featuresCount = await this._selectedLayer?.queryFeatureCount(e), this._isLoading = !1;
88
88
  }
89
89
  }
90
90
  initializeMapExtentFilter() {
@@ -198,7 +198,7 @@ class T extends F {
198
198
  return;
199
199
  }
200
200
  async createFeatureItem(t) {
201
- const e = t?.features, s = this.reportingOptions && this.reportingOptions[this.selectedLayerId].like, i = e.map(async (a) => {
201
+ const e = t?.features, s = this.reportingOptions && this.reportingOptions[this.selectedLayerId]?.like, i = e.map(async (a) => {
202
202
  const r = this.mapView?.map && await this._popupUtils?.getPopupTitle(a, this.mapView.map) || "";
203
203
  let n, o;
204
204
  return this.showUserImageInList && this._selectedLayer?.editFieldsInfo?.creatorField && (n = await this.getUserInformation(a)), this.showFeatureSymbol && (o = await this.getFeatureSymbol(a)), s && this.getAbbreviatedLikeCount(a), this.getFeatureItem(a, r, o, n);
@@ -33,7 +33,7 @@ export abstract class LayerList extends LitElement {
33
33
  accessor filterByMapExtent: boolean;
34
34
  /** string[]: If passed will show only these layers in the list if they are present in map and are editable */
35
35
  accessor layers: string[];
36
- /** esri/views/View: https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html */
36
+ /** esri/views/MapView: https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html */
37
37
  accessor mapView: MapView | undefined;
38
38
  /**
39
39
  * boolean: if true display's feature count for each layer