@esri/solutions-components 0.10.45 → 0.10.47

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 (51) hide show
  1. package/dist/cjs/calcite-block_5.cjs.entry.js +21 -1
  2. package/dist/cjs/crowdsource-reporter.cjs.entry.js +53 -3
  3. package/dist/cjs/instant-apps-export.cjs.entry.js +18 -5
  4. package/dist/cjs/instant-apps-language-switcher.cjs.entry.js +5 -6
  5. package/dist/cjs/instant-apps-scoreboard.cjs.entry.js +13 -6
  6. package/dist/cjs/instant-apps-time-filter.cjs.entry.js +7 -12
  7. package/dist/cjs/loader.cjs.js +1 -1
  8. package/dist/cjs/map-select-tools_3.cjs.entry.js +17 -17
  9. package/dist/cjs/public-notification.cjs.entry.js +1 -1
  10. package/dist/cjs/solutions-components.cjs.js +1 -1
  11. package/dist/collection/components/crowdsource-reporter/crowdsource-reporter.js +84 -2
  12. package/dist/collection/components/map-select-tools/map-select-tools.js +54 -20
  13. package/dist/collection/components/public-notification/public-notification.js +1 -1
  14. package/dist/components/crowdsource-reporter.js +57 -5
  15. package/dist/components/instant-apps-export.js +18 -5
  16. package/dist/components/instant-apps-filter-list2.js +23 -2
  17. package/dist/components/instant-apps-language-switcher.js +5 -6
  18. package/dist/components/instant-apps-scoreboard.js +14 -6
  19. package/dist/components/instant-apps-time-filter.js +7 -12
  20. package/dist/components/map-select-tools2.js +19 -19
  21. package/dist/components/public-notification.js +1 -1
  22. package/dist/esm/calcite-block_5.entry.js +21 -1
  23. package/dist/esm/crowdsource-reporter.entry.js +53 -3
  24. package/dist/esm/instant-apps-export.entry.js +18 -5
  25. package/dist/esm/instant-apps-language-switcher.entry.js +5 -6
  26. package/dist/esm/instant-apps-scoreboard.entry.js +13 -6
  27. package/dist/esm/instant-apps-time-filter.entry.js +7 -12
  28. package/dist/esm/loader.js +1 -1
  29. package/dist/esm/map-select-tools_3.entry.js +17 -17
  30. package/dist/esm/public-notification.entry.js +1 -1
  31. package/dist/esm/solutions-components.js +1 -1
  32. package/dist/solutions-components/p-1336a071.entry.js +6 -0
  33. package/dist/solutions-components/p-41503b16.entry.js +6 -0
  34. package/dist/solutions-components/p-94e51621.entry.js +6 -0
  35. package/dist/solutions-components/{p-2cf41651.entry.js → p-c7f86f73.entry.js} +1 -1
  36. package/dist/solutions-components/p-e9a0d2f3.entry.js +6 -0
  37. package/dist/solutions-components/p-f09744aa.entry.js +6 -0
  38. package/dist/solutions-components/p-f86c2a0c.entry.js +6 -0
  39. package/dist/solutions-components/p-fdeceaf6.entry.js +29 -0
  40. package/dist/solutions-components/solutions-components.esm.js +1 -1
  41. package/dist/types/components/crowdsource-reporter/crowdsource-reporter.d.ts +17 -0
  42. package/dist/types/components/map-select-tools/map-select-tools.d.ts +8 -8
  43. package/dist/types/components.d.ts +20 -0
  44. package/package.json +7 -7
  45. package/dist/solutions-components/p-112df7b2.entry.js +0 -6
  46. package/dist/solutions-components/p-2291bf3f.entry.js +0 -6
  47. package/dist/solutions-components/p-5e694bcc.entry.js +0 -29
  48. package/dist/solutions-components/p-6e5ea1cb.entry.js +0 -6
  49. package/dist/solutions-components/p-add973e2.entry.js +0 -6
  50. package/dist/solutions-components/p-cb27611e.entry.js +0 -6
  51. package/dist/solutions-components/p-f4880179.entry.js +0 -6
@@ -224,6 +224,10 @@ export class CrowdsourceReporter {
224
224
  * { [key: string]: string }: definitionExpressions for each layer
225
225
  */
226
226
  _initDefExpressions;
227
+ /**
228
+ * ILayerExpression[]: translated values for layerExpressions
229
+ */
230
+ _t9nLayerExpressions;
227
231
  //--------------------------------------------------------------------------
228
232
  //
229
233
  // Watch handlers
@@ -294,11 +298,34 @@ export class CrowdsourceReporter {
294
298
  }, 50);
295
299
  }
296
300
  }
301
+ /**
302
+ * Called each time the layerExpressions prop is changed
303
+ */
304
+ async layerExpressionsWatchHandler() {
305
+ this.resetFilterList();
306
+ await this.handleSelectedLayersFilter();
307
+ await this._featureList?.refresh();
308
+ }
297
309
  //--------------------------------------------------------------------------
298
310
  //
299
311
  // Methods (public)
300
312
  //
301
313
  //--------------------------------------------------------------------------
314
+ /**
315
+ * Method to update layerExpressions with the translated values
316
+ */
317
+ async updateLayerExpressionsT9n(t9nLayerExpressions) {
318
+ this._t9nLayerExpressions = t9nLayerExpressions ? t9nLayerExpressions : this.layerExpressions;
319
+ if (this._filterList != null) {
320
+ await this._filterList.handleUpdatingT9nData(this._t9nLayerExpressions);
321
+ }
322
+ else if (this._currentLayerExpressions != null) {
323
+ const currentLayerExpressions = structuredClone(this._currentLayerExpressions);
324
+ this.handleLayerExpressionsT9n(currentLayerExpressions, this._t9nLayerExpressions);
325
+ this._currentLayerExpressions = currentLayerExpressions;
326
+ }
327
+ return Promise.resolve();
328
+ }
302
329
  //--------------------------------------------------------------------------
303
330
  //
304
331
  // Events (public)
@@ -345,7 +372,7 @@ export class CrowdsourceReporter {
345
372
  */
346
373
  render() {
347
374
  const themeClass = this.theme === "dark" ? "calcite-mode-dark" : "calcite-mode-light";
348
- return (h(Host, { key: 'f1dd6d85210210a73fff30a5d98370da1834be7b' }, this._reportSubmitted && h("calcite-alert", { key: 'b84760fcbf4bfcf0f038be272f74eda97ce17bd9', "auto-close": true, class: themeClass + " report-submitted-msg", icon: "check-circle", kind: "success", label: "", onCalciteAlertClose: () => { this._reportSubmitted = false; }, open: true, placement: "top" }, h("div", { key: '27aa04dd8575ad27898f7848bc2733a03a33e70f', slot: "message" }, this.reportSubmittedMessage ? this.reportSubmittedMessage : this._translations.submitMsg)), this._featureCreationFailedErrorMsg && h("calcite-alert", { key: '3fc2721bed573ad10bbb1c81af126e2e8ca90b12', "auto-close": true, class: themeClass, icon: "x-octagon", kind: "danger", label: "", onCalciteAlertClose: () => { this._featureCreationFailedErrorMsg = ""; }, open: true, placement: "top" }, h("div", { key: '4993e5c5b52d650b094c2890d0e4516cc87ffb69', slot: "title" }, this._translations.error), h("div", { key: '272b17f4c0239d8b295d6f2c0c02f1ba236d840d', slot: "message" }, this._featureCreationFailedErrorMsg)), this._commentSubmitted && h("calcite-alert", { key: '5b9e1a2bd129888ec0764ad9b05e5056653d3c33', "auto-close": true, class: 'report-submitted ' + themeClass, icon: "check-circle", kind: "success", label: "", onCalciteAlertClose: () => { this._commentSubmitted = false; }, open: true, placement: "top" }, h("div", { key: 'bd428297f5fe85cbf7edc42c61c64c299d7954b7', slot: "message" }, this.commentSubmittedMessage || this._translations.commentSubmittedMsg)), this._addingCommentFailed && h("calcite-alert", { key: '2aa1927ca27f9ec15a16f8e68905a1cf203ef833', "auto-close": true, class: themeClass, icon: "x-octagon", kind: "danger", label: "", onCalciteAlertClose: () => { this._addingCommentFailed = false; }, open: true, placement: "top" }, h("div", { key: '4bff5fb03586edf0f9ea21649d1de4c34034e539', slot: "title" }, this._translations.error), h("div", { key: '7ea6c71dbbac15c2f43242ba00c9e461177051a1', slot: "message" }, this._translations.addingCommentFailedMsg)), h("div", { key: '3aa6bfc19a1e82ab90d2ab42aa9a577b3a2b6d8f' }, h("calcite-shell", { key: 'f27355d4f655c0a0931158f38f0be3eb28f6c4d4', "content-behind": true }, this._getReporter()))));
375
+ return (h(Host, { key: 'b6052369762b8c3e58ef1a4bf49f9f639e8f20f0' }, this._reportSubmitted && h("calcite-alert", { key: 'ea78ecf7f186cd9d2642288cd20017fc51945a47', "auto-close": true, class: themeClass + " report-submitted-msg", icon: "check-circle", kind: "success", label: "", onCalciteAlertClose: () => { this._reportSubmitted = false; }, open: true, placement: "top" }, h("div", { key: 'bca0fe4cc41938d401f2209e8e0eeb0ec8eb7eb4', slot: "message" }, this.reportSubmittedMessage ? this.reportSubmittedMessage : this._translations.submitMsg)), this._featureCreationFailedErrorMsg && h("calcite-alert", { key: '3cc3f7823c77997002261e5a44da38b798355078', "auto-close": true, class: themeClass, icon: "x-octagon", kind: "danger", label: "", onCalciteAlertClose: () => { this._featureCreationFailedErrorMsg = ""; }, open: true, placement: "top" }, h("div", { key: 'bfb524575668f85759111f71ed76a62aa4d8ff36', slot: "title" }, this._translations.error), h("div", { key: '25b174bdcf9126a6ea2ee3bf0b0a3d3e1a84d37f', slot: "message" }, this._featureCreationFailedErrorMsg)), this._commentSubmitted && h("calcite-alert", { key: 'f2cf41d7f1a09a8c56a8a70ec9c87685463e0ed3', "auto-close": true, class: 'report-submitted ' + themeClass, icon: "check-circle", kind: "success", label: "", onCalciteAlertClose: () => { this._commentSubmitted = false; }, open: true, placement: "top" }, h("div", { key: '000e66b1b85c954da28eda2cdde44d6a4f441ff8', slot: "message" }, this.commentSubmittedMessage || this._translations.commentSubmittedMsg)), this._addingCommentFailed && h("calcite-alert", { key: 'ec0d3b4ca27690452bb14777e716cf1c100e0ec8', "auto-close": true, class: themeClass, icon: "x-octagon", kind: "danger", label: "", onCalciteAlertClose: () => { this._addingCommentFailed = false; }, open: true, placement: "top" }, h("div", { key: 'dedf6bbf4d250e7108562a9bd05417e71c94dad4', slot: "title" }, this._translations.error), h("div", { key: 'b5c591bcc14feed655fa07e8d87accd281108f09', slot: "message" }, this._translations.addingCommentFailedMsg)), h("div", { key: '301ea807350d9c0a2bf5f45c01e40897bf644dd8' }, h("calcite-shell", { key: '386e94e32d12bf41ae76e9c78ad26a3d00158db6', "content-behind": true }, this._getReporter()))));
349
376
  }
350
377
  //--------------------------------------------------------------------------
351
378
  //
@@ -1228,7 +1255,11 @@ export class CrowdsourceReporter {
1228
1255
  */
1229
1256
  async handleSelectedLayersFilter() {
1230
1257
  if (this._selectedLayer) {
1231
- this._currentLayerExpressions = this.layerExpressions ? this.layerExpressions.filter(exp => exp.id === this._selectedLayerId) : [];
1258
+ const currentLayerExpressions = this.layerExpressions ? structuredClone(this.layerExpressions.filter(exp => exp.id === this._selectedLayerId)) : [];
1259
+ if (this._t9nLayerExpressions != null) {
1260
+ this.handleLayerExpressionsT9n(currentLayerExpressions, this._t9nLayerExpressions);
1261
+ }
1262
+ this._currentLayerExpressions = currentLayerExpressions;
1232
1263
  this.setActiveDefinitionExpressions();
1233
1264
  }
1234
1265
  }
@@ -1307,6 +1338,24 @@ export class CrowdsourceReporter {
1307
1338
  this._initDefExpressions[fl.id] = fl.definitionExpression;
1308
1339
  });
1309
1340
  }
1341
+ /**
1342
+ * Handles updating the layer expressions with the translated strings
1343
+ * @protected
1344
+ */
1345
+ handleLayerExpressionsT9n(layerExpressions, layerExpressionsT9n) {
1346
+ layerExpressions?.forEach(layerExpression => {
1347
+ const t9nLayerExpression = layerExpressionsT9n?.find(t9nLayerExpression => t9nLayerExpression.id === layerExpression.id);
1348
+ if (t9nLayerExpression != null) {
1349
+ layerExpression.title = t9nLayerExpression.title;
1350
+ layerExpression.expressions?.forEach(expression => {
1351
+ const t9nExpression = t9nLayerExpression.expressions?.find(t9nExpression => t9nExpression.id === expression.id);
1352
+ if (t9nExpression != null) {
1353
+ expression.name = t9nExpression.name;
1354
+ }
1355
+ });
1356
+ }
1357
+ });
1358
+ }
1310
1359
  static get is() { return "crowdsource-reporter"; }
1311
1360
  static get originalStyleUrls() {
1312
1361
  return {
@@ -1973,6 +2022,36 @@ export class CrowdsourceReporter {
1973
2022
  }
1974
2023
  }];
1975
2024
  }
2025
+ static get methods() {
2026
+ return {
2027
+ "updateLayerExpressionsT9n": {
2028
+ "complexType": {
2029
+ "signature": "(t9nLayerExpressions: ILayerExpression[]) => Promise<void>",
2030
+ "parameters": [{
2031
+ "name": "t9nLayerExpressions",
2032
+ "type": "ILayerExpression[]",
2033
+ "docs": ""
2034
+ }],
2035
+ "references": {
2036
+ "Promise": {
2037
+ "location": "global",
2038
+ "id": "global::Promise"
2039
+ },
2040
+ "ILayerExpression": {
2041
+ "location": "import",
2042
+ "path": "../../utils/interfaces",
2043
+ "id": "src/utils/interfaces.ts::ILayerExpression"
2044
+ }
2045
+ },
2046
+ "return": "Promise<void>"
2047
+ },
2048
+ "docs": {
2049
+ "text": "Method to update layerExpressions with the translated values",
2050
+ "tags": []
2051
+ }
2052
+ }
2053
+ };
2054
+ }
1976
2055
  static get elementRef() { return "el"; }
1977
2056
  static get watchers() {
1978
2057
  return [{
@@ -1990,6 +2069,9 @@ export class CrowdsourceReporter {
1990
2069
  }, {
1991
2070
  "propName": "showMyReportsOnly",
1992
2071
  "methodName": "showMyReportsOnlyWatchHandler"
2072
+ }, {
2073
+ "propName": "layerExpressions",
2074
+ "methodName": "layerExpressionsWatchHandler"
1993
2075
  }];
1994
2076
  }
1995
2077
  }
@@ -51,12 +51,12 @@ export class MapSelectTools {
51
51
  this.sketchLineSymbol = undefined;
52
52
  this.sketchPointSymbol = undefined;
53
53
  this.sketchPolygonSymbol = undefined;
54
+ this.searchDistanceEnabled = false;
55
+ this.useLayerFeaturesEnabled = false;
54
56
  this._numSelected = 0;
55
- this._searchDistanceEnabled = false;
56
57
  this._searchTerm = undefined;
57
58
  this._selectionLoading = false;
58
59
  this._translations = undefined;
59
- this._useLayerFeaturesEnabled = false;
60
60
  }
61
61
  //--------------------------------------------------------------------------
62
62
  //
@@ -250,9 +250,9 @@ export class MapSelectTools {
250
250
  graphics: this._graphics,
251
251
  selectLayers: this.layerViews,
252
252
  skipGeomOIDs: this._skipGeomOIDs,
253
- searchDistanceEnabled: this._searchDistanceEnabled,
253
+ searchDistanceEnabled: this.searchDistanceEnabled,
254
254
  workflowType: this._workflowType,
255
- useLayerFeaturesEnabled: this._useLayerFeaturesEnabled,
255
+ useLayerFeaturesEnabled: this.useLayerFeaturesEnabled,
256
256
  sketchGraphic: this._sketchGraphic
257
257
  };
258
258
  }
@@ -310,30 +310,30 @@ export class MapSelectTools {
310
310
  render() {
311
311
  const mapToolsClass = this.enableSketchTools ? "" : "display-none";
312
312
  const mapToolsContainerClass = this.enableSketchTools ? "padding-top-1" : "";
313
- return (h(Host, { key: '24382e9b9e955147bcdbf4bf65fb3672c121a8e9' }, this._getMapLayerPicker(), h("div", { key: '9c0d835c1ebb8020619c0629517021ea257ff38f', class: "border-bottom" }), h("div", { key: '19caa1aad9667d1b518d0e5ebe6deeeb44fbdbcf', class: "padding-top-sides-1" }, h("div", { key: 'e9cd25ddbb4c47d6fef8c670507bb1039ae9f360', class: "search-widget", ref: (el) => { this._searchElement = el; } }), h("div", { key: 'b44dae71755a90cf675ba213704be1c65e5d5f1f', class: mapToolsContainerClass }, h("map-draw-tools", { key: '8f9ec344e4056cbc456ea721f4ccdd7311d34797', active: true, class: mapToolsClass, editGraphicsEnabled: !this._useLayerFeaturesEnabled, graphics: this._graphics, locale: this.locale, mapView: this.mapView, onSketchGraphicsChange: (evt) => void this._sketchGraphicsChanged(evt), pointSymbol: this.sketchPointSymbol, polygonSymbol: this.sketchPolygonSymbol, polylineSymbol: this.sketchLineSymbol, ref: (el) => { this._drawTools = el; } })), this.enableSearchDistance ? this._getBufferOptions() : undefined, this.enableLayerFeatures ? this._getUseLayerFeaturesOptions() : undefined, this._getNumSelected()), h("div", { key: 'b93bf01281a8b2ffc5cf23536b40e380b95da3c8', class: "border-bottom" }), this._getNameInput()));
313
+ return (h(Host, { key: '1c312d53b800ca401726c653e12465e92abf0eef' }, this._getMapLayerPicker(), h("div", { key: '2da9eb5316656769ec2f80dfa5fbdc190c62b1cb', class: "border-bottom" }), h("div", { key: 'b21d332e5da0aa8cfb34fdab7a1075bfbd5efb42', class: "padding-top-sides-1" }, h("div", { key: '2dd59511d4f07cc2cd43b5b5c2a8037303d21546', class: "search-widget", ref: (el) => { this._searchElement = el; } }), h("div", { key: '1149bcd2f36171b82f6902fbf89bb0400383fdde', class: mapToolsContainerClass }, h("map-draw-tools", { key: '2d3b1b91a108bf2bb2db463e7ffd4574f4a36dac', active: true, class: mapToolsClass, editGraphicsEnabled: !this.useLayerFeaturesEnabled, graphics: this._graphics, locale: this.locale, mapView: this.mapView, onSketchGraphicsChange: (evt) => void this._sketchGraphicsChanged(evt), pointSymbol: this.sketchPointSymbol, polygonSymbol: this.sketchPolygonSymbol, polylineSymbol: this.sketchLineSymbol, ref: (el) => { this._drawTools = el; } })), this.enableSearchDistance ? this._getBufferOptions() : undefined, this.enableLayerFeatures ? this._getUseLayerFeaturesOptions() : undefined, this._getNumSelected()), h("div", { key: 'd4068bef106e1f4226b1f9c104a626fe0a0f6700', class: "border-bottom" }), this._getNameInput()));
314
314
  }
315
315
  /**
316
316
  * Renders the buffer tools component.
317
317
  */
318
318
  _getBufferOptions() {
319
319
  if (this.enableSearchDistanceOnLoad) {
320
- this._searchDistanceEnabled = true;
320
+ this.searchDistanceEnabled = true;
321
321
  this.enableSearchDistanceOnLoad = false;
322
322
  }
323
- const showBufferToolsClass = this._searchDistanceEnabled ? "search-distance" : "div-not-visible";
323
+ const showBufferToolsClass = this.searchDistanceEnabled ? "search-distance" : "div-not-visible";
324
324
  const bufferDistance = typeof this.selectionSet?.distance === "number" ? this.selectionSet.distance : this.defaultBufferDistance;
325
- return (h("div", null, h("div", { class: "padding-top-1 display-flex" }, h("calcite-label", { class: "label-margin-0 w-100", layout: "inline-space-between" }, h("div", { class: "tooltip-container" }, this._translations.searchDistance, h("calcite-icon", { class: "padding-start-1-2 icon", flipRtl: !(this.locale?.toLowerCase() === "he"), icon: "question", id: "search-distance-icon", scale: "s" }))), h("calcite-popover", { closable: true, label: "", referenceElement: "search-distance-icon" }, h("span", { class: "tooltip-message" }, this._translations.useSearchDistanceTootip)), h("calcite-switch", { checked: this._searchDistanceEnabled, onCalciteSwitchChange: () => this._searchDistanceEnabled = !this._searchDistanceEnabled })), h("div", { class: showBufferToolsClass }, h("buffer-tools", { disabled: !this._searchDistanceEnabled, distance: bufferDistance, geometries: this.geometries, locale: this.locale, onBufferComplete: (evt) => void this._bufferComplete(evt), ref: (el) => this._bufferTools = el, unit: this.selectionSet?.unit || this.defaultBufferUnit }))));
325
+ return (h("div", null, h("div", { class: "padding-top-1 display-flex" }, h("calcite-label", { class: "label-margin-0 w-100", layout: "inline-space-between" }, h("div", { class: "tooltip-container" }, this._translations.searchDistance, h("calcite-icon", { class: "padding-start-1-2 icon", flipRtl: !(this.locale?.toLowerCase() === "he"), icon: "question", id: "search-distance-icon", scale: "s" }))), h("calcite-popover", { closable: true, label: "", referenceElement: "search-distance-icon" }, h("span", { class: "tooltip-message" }, this._translations.useSearchDistanceTootip)), h("calcite-switch", { checked: this.searchDistanceEnabled, onCalciteSwitchChange: () => this.searchDistanceEnabled = !this.searchDistanceEnabled })), h("div", { class: showBufferToolsClass }, h("buffer-tools", { disabled: !this.searchDistanceEnabled, distance: bufferDistance, geometries: this.geometries, locale: this.locale, onBufferComplete: (evt) => void this._bufferComplete(evt), ref: (el) => this._bufferTools = el, unit: this.selectionSet?.unit || this.defaultBufferUnit }))));
326
326
  }
327
327
  /**
328
328
  * Renders the map layer picker component.
329
329
  */
330
330
  _getUseLayerFeaturesOptions() {
331
331
  if (this.enableLayerFeaturesOnLoad) {
332
- this._useLayerFeaturesEnabled = true;
332
+ this.useLayerFeaturesEnabled = true;
333
333
  this.enableLayerFeaturesOnLoad = false;
334
334
  }
335
- const useLayerFeaturesClass = this._useLayerFeaturesEnabled ? "div-visible" : "div-not-visible";
336
- return (h("div", null, h("div", { class: "padding-top-1 display-flex" }, h("calcite-label", { class: "label-margin-0 w-100", layout: "inline-space-between" }, h("div", { class: "tooltip-container" }, this._translations.useLayerFeatures, h("calcite-icon", { class: "padding-start-1-2 icon", flipRtl: !(this.locale?.toLowerCase() === "he"), icon: "question", id: "use-layer-features-icon", scale: "s" }))), h("calcite-popover", { closable: true, label: "", referenceElement: "use-layer-features-icon" }, h("span", { class: "tooltip-message" }, this._translations.useLayerFeaturesTooltip)), h("calcite-switch", { checked: this._useLayerFeaturesEnabled, onCalciteSwitchChange: () => { this._useLayerFeaturesEnabledChanged(); } })), h("div", { class: useLayerFeaturesClass + " padding-top-1" }, h("map-layer-picker", { enabledLayerIds: this.selectionLayerIds, locale: this.locale, mapView: this.mapView, onLayerSelectionChange: (evt) => { void this._layerSelectionChange(evt); }, selectedIds: this.layerViews.map(l => l.layer.id), showTables: false }))));
335
+ const useLayerFeaturesClass = this.useLayerFeaturesEnabled ? "div-visible" : "div-not-visible";
336
+ return (h("div", null, h("div", { class: "padding-top-1 display-flex" }, h("calcite-label", { class: "label-margin-0 w-100", layout: "inline-space-between" }, h("div", { class: "tooltip-container" }, this._translations.useLayerFeatures, h("calcite-icon", { class: "padding-start-1-2 icon", flipRtl: !(this.locale?.toLowerCase() === "he"), icon: "question", id: "use-layer-features-icon", scale: "s" }))), h("calcite-popover", { closable: true, label: "", referenceElement: "use-layer-features-icon" }, h("span", { class: "tooltip-message" }, this._translations.useLayerFeaturesTooltip)), h("calcite-switch", { checked: this.useLayerFeaturesEnabled, onCalciteSwitchChange: () => { this._useLayerFeaturesEnabledChanged(); } })), h("div", { class: useLayerFeaturesClass + " padding-top-1" }, h("map-layer-picker", { enabledLayerIds: this.selectionLayerIds, locale: this.locale, mapView: this.mapView, onLayerSelectionChange: (evt) => { void this._layerSelectionChange(evt); }, selectedIds: this.layerViews.map(l => l.layer.id), showTables: false }))));
337
337
  }
338
338
  /**
339
339
  * Renders the number of selected features
@@ -414,8 +414,8 @@ export class MapSelectTools {
414
414
  this._selectLayers = this.selectionSet.selectLayers;
415
415
  this._selectedIds = this.selectionSet.selectedIds;
416
416
  this._skipGeomOIDs = this.selectionSet.skipGeomOIDs;
417
- this._searchDistanceEnabled = this.selectionSet.searchDistanceEnabled;
418
- this._useLayerFeaturesEnabled = this.selectionSet.useLayerFeaturesEnabled;
417
+ this.searchDistanceEnabled = this.selectionSet.searchDistanceEnabled;
418
+ this.useLayerFeaturesEnabled = this.selectionSet.useLayerFeaturesEnabled;
419
419
  this._distance = this.selectionSet.searchDistanceEnabled ? this.selectionSet.distance : 0;
420
420
  this._unit = this.selectionSet.unit;
421
421
  this._workflowType = this.selectionSet.workflowType;
@@ -434,7 +434,7 @@ export class MapSelectTools {
434
434
  });
435
435
  });
436
436
  this._selectionLabel = this.selectionSet?.label;
437
- if (!this._useLayerFeaturesEnabled) {
437
+ if (!this.useLayerFeaturesEnabled) {
438
438
  await this._drawTools?.updateGraphics();
439
439
  }
440
440
  await goToSelection(this.selectionSet.selectedIds, this.selectionSet.layerView, this.mapView, false);
@@ -640,13 +640,13 @@ export class MapSelectTools {
640
640
  if (!forceUpdate) {
641
641
  this._sketchGraphic = graphics[0];
642
642
  }
643
- this._workflowType = this._useLayerFeaturesEnabled ? EWorkflowType.SELECT : EWorkflowType.SKETCH;
643
+ this._workflowType = this.useLayerFeaturesEnabled ? EWorkflowType.SELECT : EWorkflowType.SKETCH;
644
644
  if (this._workflowType === EWorkflowType.SKETCH) {
645
645
  await this._drawTools.updateGraphics();
646
646
  }
647
647
  await this._updateLabel();
648
648
  this._clearSearchWidget();
649
- if (this._useLayerFeaturesEnabled && !forceUpdate) {
649
+ if (this.useLayerFeaturesEnabled && !forceUpdate) {
650
650
  // Will only ever be a single graphic
651
651
  const geometries = Array.isArray(graphics) ? graphics.map(g => g.geometry) : this.geometries;
652
652
  await this._selectLayerFeatures(geometries[0]);
@@ -960,7 +960,7 @@ export class MapSelectTools {
960
960
  * @protected
961
961
  */
962
962
  _useLayerFeaturesEnabledChanged() {
963
- this._useLayerFeaturesEnabled = !this._useLayerFeaturesEnabled;
963
+ this.useLayerFeaturesEnabled = !this.useLayerFeaturesEnabled;
964
964
  if (this._sketchGraphic) {
965
965
  void this._sketchGraphicsChanged({
966
966
  detail: {
@@ -1442,17 +1442,51 @@ export class MapSelectTools {
1442
1442
  "tags": [],
1443
1443
  "text": "esri/symbols/SimpleFillSymbol | JSON representation: https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-SimpleFillSymbol.html"
1444
1444
  }
1445
+ },
1446
+ "searchDistanceEnabled": {
1447
+ "type": "boolean",
1448
+ "mutable": false,
1449
+ "complexType": {
1450
+ "original": "boolean",
1451
+ "resolved": "boolean",
1452
+ "references": {}
1453
+ },
1454
+ "required": false,
1455
+ "optional": false,
1456
+ "docs": {
1457
+ "tags": [],
1458
+ "text": "boolean: when true buffer tools controls are enabled"
1459
+ },
1460
+ "attribute": "search-distance-enabled",
1461
+ "reflect": false,
1462
+ "defaultValue": "false"
1463
+ },
1464
+ "useLayerFeaturesEnabled": {
1465
+ "type": "boolean",
1466
+ "mutable": false,
1467
+ "complexType": {
1468
+ "original": "boolean",
1469
+ "resolved": "boolean",
1470
+ "references": {}
1471
+ },
1472
+ "required": false,
1473
+ "optional": false,
1474
+ "docs": {
1475
+ "tags": [],
1476
+ "text": "boolean: when true drawn graphics will be used to select features"
1477
+ },
1478
+ "attribute": "use-layer-features-enabled",
1479
+ "reflect": false,
1480
+ "defaultValue": "false"
1445
1481
  }
1446
1482
  };
1447
1483
  }
1448
1484
  static get states() {
1449
1485
  return {
1450
1486
  "_numSelected": {},
1451
- "_searchDistanceEnabled": {},
1452
1487
  "_searchTerm": {},
1453
1488
  "_selectionLoading": {},
1454
- "_translations": {},
1455
- "_useLayerFeaturesEnabled": {}
1489
+ "_translations": {}
1456
1490
  };
1457
1491
  }
1458
1492
  static get events() {
@@ -610,7 +610,7 @@ export class PublicNotification {
610
610
  */
611
611
  _getSelectPage() {
612
612
  const noticeText = this._translations.selectSearchTip;
613
- return (h("calcite-panel", null, this._getLabel(this._translations.stepTwoFull, true), this._getNotice(noticeText, "padding-1", "word-wrap-anywhere"), h("div", null, h("map-select-tools", { bufferColor: this.bufferColor, bufferOutlineColor: this.bufferOutlineColor, class: "font-bold", customLabelEnabled: this.customLabelEnabled, defaultBufferDistance: this.defaultBufferDistance, defaultBufferUnit: this.defaultBufferUnit, enableLayerFeatures: this.enableLayerFeatures, enableLayerFeaturesOnLoad: this.enableLayerFeaturesOnLoad, enableSearchDistance: this.enableSearchDistance, enableSearchDistanceOnLoad: this.enableSearchDistanceOnLoad, enableSketchTools: this.enableSketchTools, enabledLayerIds: this.addresseeLayerIds, isUpdate: !!this._activeSelection, locale: this.locale, mapView: this.mapView, noResultText: this.noResultText, onSelectionSetChange: (evt) => this._updateForSelection(evt), ref: (el) => { this._selectTools = el; }, searchConfiguration: this._searchConfiguration, selectionLayerIds: this.selectionLayerIds, selectionSet: this._activeSelection, sketchLineSymbol: this.sketchLineSymbol, sketchPointSymbol: this.sketchPointSymbol, sketchPolygonSymbol: this.sketchPolygonSymbol })), this._getPageNavButtons(this._translations.done, this._numSelected === 0, () => { void this._saveSelection(); }, this._translations.cancel, false, () => { void this._home(); })));
613
+ return (h("calcite-panel", null, this._getLabel(this._translations.stepTwoFull, true), this._getNotice(noticeText, "padding-1", "word-wrap-anywhere"), h("div", null, h("map-select-tools", { bufferColor: this.bufferColor, bufferOutlineColor: this.bufferOutlineColor, class: "font-bold", customLabelEnabled: this.customLabelEnabled, defaultBufferDistance: this.defaultBufferDistance, defaultBufferUnit: this.defaultBufferUnit, enableLayerFeatures: this.enableLayerFeatures, enableLayerFeaturesOnLoad: this.enableLayerFeaturesOnLoad, enableSearchDistance: this.enableSearchDistance, enableSearchDistanceOnLoad: this.enableSearchDistanceOnLoad, enableSketchTools: this.enableSketchTools, enabledLayerIds: this.addresseeLayerIds, isUpdate: !!this._activeSelection, locale: this.locale, mapView: this.mapView, noResultText: this.noResultText, onSelectionSetChange: (evt) => this._updateForSelection(evt), ref: (el) => { this._selectTools = el; }, searchConfiguration: this._searchConfiguration, searchDistanceEnabled: this.enableSearchDistanceOnLoad, selectionLayerIds: this.selectionLayerIds, selectionSet: this._activeSelection, sketchLineSymbol: this.sketchLineSymbol, sketchPointSymbol: this.sketchPointSymbol, sketchPolygonSymbol: this.sketchPolygonSymbol, useLayerFeaturesEnabled: this.enableLayerFeaturesOnLoad })), this._getPageNavButtons(this._translations.done, this._numSelected === 0, () => { void this._saveSelection(); }, this._translations.cancel, false, () => { void this._home(); })));
614
614
  }
615
615
  /**
616
616
  * Create the main download page that has the shared aspects of both PDF and CSV
@@ -259,6 +259,10 @@ const CrowdsourceReporter$1 = /*@__PURE__*/ proxyCustomElement(class Crowdsource
259
259
  * { [key: string]: string }: definitionExpressions for each layer
260
260
  */
261
261
  _initDefExpressions;
262
+ /**
263
+ * ILayerExpression[]: translated values for layerExpressions
264
+ */
265
+ _t9nLayerExpressions;
262
266
  //--------------------------------------------------------------------------
263
267
  //
264
268
  // Watch handlers
@@ -329,11 +333,34 @@ const CrowdsourceReporter$1 = /*@__PURE__*/ proxyCustomElement(class Crowdsource
329
333
  }, 50);
330
334
  }
331
335
  }
336
+ /**
337
+ * Called each time the layerExpressions prop is changed
338
+ */
339
+ async layerExpressionsWatchHandler() {
340
+ this.resetFilterList();
341
+ await this.handleSelectedLayersFilter();
342
+ await this._featureList?.refresh();
343
+ }
332
344
  //--------------------------------------------------------------------------
333
345
  //
334
346
  // Methods (public)
335
347
  //
336
348
  //--------------------------------------------------------------------------
349
+ /**
350
+ * Method to update layerExpressions with the translated values
351
+ */
352
+ async updateLayerExpressionsT9n(t9nLayerExpressions) {
353
+ this._t9nLayerExpressions = t9nLayerExpressions ? t9nLayerExpressions : this.layerExpressions;
354
+ if (this._filterList != null) {
355
+ await this._filterList.handleUpdatingT9nData(this._t9nLayerExpressions);
356
+ }
357
+ else if (this._currentLayerExpressions != null) {
358
+ const currentLayerExpressions = structuredClone(this._currentLayerExpressions);
359
+ this.handleLayerExpressionsT9n(currentLayerExpressions, this._t9nLayerExpressions);
360
+ this._currentLayerExpressions = currentLayerExpressions;
361
+ }
362
+ return Promise.resolve();
363
+ }
337
364
  //--------------------------------------------------------------------------
338
365
  //
339
366
  // Events (public)
@@ -380,7 +407,7 @@ const CrowdsourceReporter$1 = /*@__PURE__*/ proxyCustomElement(class Crowdsource
380
407
  */
381
408
  render() {
382
409
  const themeClass = this.theme === "dark" ? "calcite-mode-dark" : "calcite-mode-light";
383
- return (h(Host, { key: 'f1dd6d85210210a73fff30a5d98370da1834be7b' }, this._reportSubmitted && h("calcite-alert", { key: 'b84760fcbf4bfcf0f038be272f74eda97ce17bd9', "auto-close": true, class: themeClass + " report-submitted-msg", icon: "check-circle", kind: "success", label: "", onCalciteAlertClose: () => { this._reportSubmitted = false; }, open: true, placement: "top" }, h("div", { key: '27aa04dd8575ad27898f7848bc2733a03a33e70f', slot: "message" }, this.reportSubmittedMessage ? this.reportSubmittedMessage : this._translations.submitMsg)), this._featureCreationFailedErrorMsg && h("calcite-alert", { key: '3fc2721bed573ad10bbb1c81af126e2e8ca90b12', "auto-close": true, class: themeClass, icon: "x-octagon", kind: "danger", label: "", onCalciteAlertClose: () => { this._featureCreationFailedErrorMsg = ""; }, open: true, placement: "top" }, h("div", { key: '4993e5c5b52d650b094c2890d0e4516cc87ffb69', slot: "title" }, this._translations.error), h("div", { key: '272b17f4c0239d8b295d6f2c0c02f1ba236d840d', slot: "message" }, this._featureCreationFailedErrorMsg)), this._commentSubmitted && h("calcite-alert", { key: '5b9e1a2bd129888ec0764ad9b05e5056653d3c33', "auto-close": true, class: 'report-submitted ' + themeClass, icon: "check-circle", kind: "success", label: "", onCalciteAlertClose: () => { this._commentSubmitted = false; }, open: true, placement: "top" }, h("div", { key: 'bd428297f5fe85cbf7edc42c61c64c299d7954b7', slot: "message" }, this.commentSubmittedMessage || this._translations.commentSubmittedMsg)), this._addingCommentFailed && h("calcite-alert", { key: '2aa1927ca27f9ec15a16f8e68905a1cf203ef833', "auto-close": true, class: themeClass, icon: "x-octagon", kind: "danger", label: "", onCalciteAlertClose: () => { this._addingCommentFailed = false; }, open: true, placement: "top" }, h("div", { key: '4bff5fb03586edf0f9ea21649d1de4c34034e539', slot: "title" }, this._translations.error), h("div", { key: '7ea6c71dbbac15c2f43242ba00c9e461177051a1', slot: "message" }, this._translations.addingCommentFailedMsg)), h("div", { key: '3aa6bfc19a1e82ab90d2ab42aa9a577b3a2b6d8f' }, h("calcite-shell", { key: 'f27355d4f655c0a0931158f38f0be3eb28f6c4d4', "content-behind": true }, this._getReporter()))));
410
+ return (h(Host, { key: 'b6052369762b8c3e58ef1a4bf49f9f639e8f20f0' }, this._reportSubmitted && h("calcite-alert", { key: 'ea78ecf7f186cd9d2642288cd20017fc51945a47', "auto-close": true, class: themeClass + " report-submitted-msg", icon: "check-circle", kind: "success", label: "", onCalciteAlertClose: () => { this._reportSubmitted = false; }, open: true, placement: "top" }, h("div", { key: 'bca0fe4cc41938d401f2209e8e0eeb0ec8eb7eb4', slot: "message" }, this.reportSubmittedMessage ? this.reportSubmittedMessage : this._translations.submitMsg)), this._featureCreationFailedErrorMsg && h("calcite-alert", { key: '3cc3f7823c77997002261e5a44da38b798355078', "auto-close": true, class: themeClass, icon: "x-octagon", kind: "danger", label: "", onCalciteAlertClose: () => { this._featureCreationFailedErrorMsg = ""; }, open: true, placement: "top" }, h("div", { key: 'bfb524575668f85759111f71ed76a62aa4d8ff36', slot: "title" }, this._translations.error), h("div", { key: '25b174bdcf9126a6ea2ee3bf0b0a3d3e1a84d37f', slot: "message" }, this._featureCreationFailedErrorMsg)), this._commentSubmitted && h("calcite-alert", { key: 'f2cf41d7f1a09a8c56a8a70ec9c87685463e0ed3', "auto-close": true, class: 'report-submitted ' + themeClass, icon: "check-circle", kind: "success", label: "", onCalciteAlertClose: () => { this._commentSubmitted = false; }, open: true, placement: "top" }, h("div", { key: '000e66b1b85c954da28eda2cdde44d6a4f441ff8', slot: "message" }, this.commentSubmittedMessage || this._translations.commentSubmittedMsg)), this._addingCommentFailed && h("calcite-alert", { key: 'ec0d3b4ca27690452bb14777e716cf1c100e0ec8', "auto-close": true, class: themeClass, icon: "x-octagon", kind: "danger", label: "", onCalciteAlertClose: () => { this._addingCommentFailed = false; }, open: true, placement: "top" }, h("div", { key: 'dedf6bbf4d250e7108562a9bd05417e71c94dad4', slot: "title" }, this._translations.error), h("div", { key: 'b5c591bcc14feed655fa07e8d87accd281108f09', slot: "message" }, this._translations.addingCommentFailedMsg)), h("div", { key: '301ea807350d9c0a2bf5f45c01e40897bf644dd8' }, h("calcite-shell", { key: '386e94e32d12bf41ae76e9c78ad26a3d00158db6', "content-behind": true }, this._getReporter()))));
384
411
  }
385
412
  //--------------------------------------------------------------------------
386
413
  //
@@ -1263,7 +1290,11 @@ const CrowdsourceReporter$1 = /*@__PURE__*/ proxyCustomElement(class Crowdsource
1263
1290
  */
1264
1291
  async handleSelectedLayersFilter() {
1265
1292
  if (this._selectedLayer) {
1266
- this._currentLayerExpressions = this.layerExpressions ? this.layerExpressions.filter(exp => exp.id === this._selectedLayerId) : [];
1293
+ const currentLayerExpressions = this.layerExpressions ? structuredClone(this.layerExpressions.filter(exp => exp.id === this._selectedLayerId)) : [];
1294
+ if (this._t9nLayerExpressions != null) {
1295
+ this.handleLayerExpressionsT9n(currentLayerExpressions, this._t9nLayerExpressions);
1296
+ }
1297
+ this._currentLayerExpressions = currentLayerExpressions;
1267
1298
  this.setActiveDefinitionExpressions();
1268
1299
  }
1269
1300
  }
@@ -1342,12 +1373,31 @@ const CrowdsourceReporter$1 = /*@__PURE__*/ proxyCustomElement(class Crowdsource
1342
1373
  this._initDefExpressions[fl.id] = fl.definitionExpression;
1343
1374
  });
1344
1375
  }
1376
+ /**
1377
+ * Handles updating the layer expressions with the translated strings
1378
+ * @protected
1379
+ */
1380
+ handleLayerExpressionsT9n(layerExpressions, layerExpressionsT9n) {
1381
+ layerExpressions?.forEach(layerExpression => {
1382
+ const t9nLayerExpression = layerExpressionsT9n?.find(t9nLayerExpression => t9nLayerExpression.id === layerExpression.id);
1383
+ if (t9nLayerExpression != null) {
1384
+ layerExpression.title = t9nLayerExpression.title;
1385
+ layerExpression.expressions?.forEach(expression => {
1386
+ const t9nExpression = t9nLayerExpression.expressions?.find(t9nExpression => t9nExpression.id === expression.id);
1387
+ if (t9nExpression != null) {
1388
+ expression.name = t9nExpression.name;
1389
+ }
1390
+ });
1391
+ }
1392
+ });
1393
+ }
1345
1394
  static get watchers() { return {
1346
1395
  "isMobile": ["isMobileWatchHandler"],
1347
1396
  "locale": ["localeWatchHandler"],
1348
1397
  "mapView": ["mapViewWatchHandler"],
1349
1398
  "floorLevel": ["floorLevelWatchHandler"],
1350
- "showMyReportsOnly": ["showMyReportsOnlyWatchHandler"]
1399
+ "showMyReportsOnly": ["showMyReportsOnlyWatchHandler"],
1400
+ "layerExpressions": ["layerExpressionsWatchHandler"]
1351
1401
  }; }
1352
1402
  static get style() { return CrowdsourceReporterStyle0; }
1353
1403
  }, [0, "crowdsource-reporter", {
@@ -1400,13 +1450,15 @@ const CrowdsourceReporter$1 = /*@__PURE__*/ proxyCustomElement(class Crowdsource
1400
1450
  "_updatedSorting": [32],
1401
1451
  "_updatedSortOption": [32],
1402
1452
  "_commentSubmitted": [32],
1403
- "_addingCommentFailed": [32]
1453
+ "_addingCommentFailed": [32],
1454
+ "updateLayerExpressionsT9n": [64]
1404
1455
  }, undefined, {
1405
1456
  "isMobile": ["isMobileWatchHandler"],
1406
1457
  "locale": ["localeWatchHandler"],
1407
1458
  "mapView": ["mapViewWatchHandler"],
1408
1459
  "floorLevel": ["floorLevelWatchHandler"],
1409
- "showMyReportsOnly": ["showMyReportsOnlyWatchHandler"]
1460
+ "showMyReportsOnly": ["showMyReportsOnlyWatchHandler"],
1461
+ "layerExpressions": ["layerExpressionsWatchHandler"]
1410
1462
  }]);
1411
1463
  function defineCustomElement$1() {
1412
1464
  if (typeof customElements === "undefined") {
@@ -1559,18 +1559,31 @@ const InstantAppsExport$1 = /*@__PURE__*/ proxyCustomElement(class InstantAppsEx
1559
1559
  }
1560
1560
  }
1561
1561
  }
1562
- convertToImage() {
1562
+ async convertToImage() {
1563
1563
  const options = { backgroundColor: '#FFF', skipFonts: true };
1564
- if (this.selectedFileType === 'JPG') {
1565
- toJpeg(this.printEl, options).then(this.handleGetImage.bind(this));
1564
+ let data = '';
1565
+ try {
1566
+ if (this.selectedFileType === 'JPG') {
1567
+ data = await toJpeg(this.printEl, options);
1568
+ }
1569
+ else {
1570
+ data = await toPng(this.printEl, options);
1571
+ }
1566
1572
  }
1567
- else {
1568
- toPng(this.printEl, options).then(this.handleGetImage.bind(this));
1573
+ catch (_a) {
1574
+ this.logoImage = undefined;
1575
+ await new Promise(resolve => setTimeout(resolve, 500));
1576
+ data = await toJpeg(this.printEl, options);
1577
+ }
1578
+ finally {
1579
+ this.handleGetImage(data);
1569
1580
  }
1570
1581
  }
1571
1582
  handleGetImage(dataUrl) {
1572
1583
  var _a;
1573
1584
  this.resetPrintContent();
1585
+ if (!dataUrl)
1586
+ return;
1574
1587
  this.dataUrl = dataUrl;
1575
1588
  this.setMapAreaOnClick(false);
1576
1589
  this.showPreview(dataUrl);
@@ -141,6 +141,26 @@ const InstantAppsFilterList = /*@__PURE__*/ proxyCustomElement(class InstantApps
141
141
  const currentLayerExpressions = structuredClone(this.filterLayerExpressions);
142
142
  return Promise.resolve(currentLayerExpressions);
143
143
  }
144
+ handleUpdatingT9nData(t9nLayerExpressions) {
145
+ var _a;
146
+ if (t9nLayerExpressions == null)
147
+ return Promise.resolve();
148
+ (_a = this.filterLayerExpressions) === null || _a === void 0 ? void 0 : _a.forEach(layerExpression => {
149
+ var _a;
150
+ const t9nLayerExpression = t9nLayerExpressions === null || t9nLayerExpressions === void 0 ? void 0 : t9nLayerExpressions.find(t9nLayerExpression => t9nLayerExpression.id === layerExpression.id);
151
+ if (t9nLayerExpression != null) {
152
+ layerExpression.title = t9nLayerExpression.title;
153
+ (_a = layerExpression.expressions) === null || _a === void 0 ? void 0 : _a.forEach(expression => {
154
+ var _a;
155
+ const t9nExpression = (_a = t9nLayerExpression.expressions) === null || _a === void 0 ? void 0 : _a.find(t9nExpression => t9nExpression.id === expression.id);
156
+ if (t9nExpression != null) {
157
+ expression.name = t9nExpression.name;
158
+ }
159
+ });
160
+ }
161
+ });
162
+ return Promise.resolve();
163
+ }
144
164
  connectedCallback() {
145
165
  if (this.layerExpressions == null && this.view == null)
146
166
  return;
@@ -182,7 +202,7 @@ const InstantAppsFilterList = /*@__PURE__*/ proxyCustomElement(class InstantApps
182
202
  render() {
183
203
  const filterConfig = this.loading ? this.renderLoading() : this.initFilterConfig();
184
204
  const footer = this.renderFooter();
185
- return (h(Host, { key: '92daa28c3cada3360d3b3d4202f54842e2e42923' }, h("calcite-panel", { key: '43ed17c41f1c42dcb25a19423e1638885a4ca64b', class: this.baseClass, ref: el => (this.panelEl = el) }, h("slot", { key: 'df4bc6bdf21127e781f930cf476af2a5d8199c87', slot: "header-content", name: "filter-header-content" }), h("slot", { key: 'c2e6744535fb85e40ddd4de215f693258bf31e87', slot: "header-actions-end", name: "filter-header-actions-end" }), h("div", { key: "filter-container", class: CSS.filterContainer }, filterConfig, footer))));
205
+ return (h(Host, { key: 'b3949fb2efa7587520eee01619be306a936b2f05' }, h("calcite-panel", { key: '2336ee3cd209346516ebb12780f7158fc88aa35c', class: this.baseClass, ref: el => (this.panelEl = el) }, h("slot", { key: 'd7400f3192055b45d9f75d19fcac85138f2958f8', slot: "header-content", name: "filter-header-content" }), h("slot", { key: 'fb684d06b51fd62fcc56129851444fad10beafc4', slot: "header-actions-end", name: "filter-header-actions-end" }), h("div", { key: "filter-container", class: CSS.filterContainer }, filterConfig, footer))));
186
206
  }
187
207
  renderLoading() {
188
208
  return h("calcite-loader", { label: "Loading filters..." });
@@ -1114,7 +1134,8 @@ const InstantAppsFilterList = /*@__PURE__*/ proxyCustomElement(class InstantApps
1114
1134
  "getFilterInitState": [64],
1115
1135
  "forceReset": [64],
1116
1136
  "updateInitDefExpressions": [64],
1117
- "getCurrentLayerExpressions": [64]
1137
+ "getCurrentLayerExpressions": [64],
1138
+ "handleUpdatingT9nData": [64]
1118
1139
  }, undefined, {
1119
1140
  "view": ["watchViewHandler"],
1120
1141
  "layerExpressions": ["watchLayerExpressions"]
@@ -122,14 +122,13 @@ const InstantAppsLanguageSwitcher$1 = /*@__PURE__*/ proxyCustomElement(class Ins
122
122
  if (selectedLanguage !== userLocale)
123
123
  eventData['data'] = t9nData[translatedLanguage];
124
124
  const params = new URLSearchParams(window.location.search);
125
- if (selectedLanguage !== userLocale) {
126
- // Set url parameter 'locale' with value
125
+ const locale = this.intl.normalizeMessageBundleLocale(this.selectedLanguage);
126
+ intl.setLocale(locale);
127
+ // Set url parameter 'locale' with value
128
+ const docElLang = this.intl.normalizeMessageBundleLocale(document.documentElement.lang);
129
+ if (docElLang !== this.selectedLanguage) {
127
130
  params.set('locale', this.selectedLanguage);
128
131
  }
129
- else {
130
- params.delete('locale');
131
- }
132
- intl.setLocale(selectedLanguage);
133
132
  if (this.view) {
134
133
  const [WebMap] = await loadModules(['esri/WebMap']);
135
134
  const webmap = (_b = (_a = this.locales.filter(localeItem => localeItem.locale === selectedLanguage)) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.webmap;
@@ -53,6 +53,7 @@ const InstantAppsScoreboard$1 = /*@__PURE__*/ proxyCustomElement(class InstantAp
53
53
  this.itemLimit = 6;
54
54
  this.autoDockEnabled = true;
55
55
  this.geometry = null;
56
+ this.queryType = 'layerView';
56
57
  this.state = "loading" /* Scoreboard.Loading */;
57
58
  this.messages = undefined;
58
59
  this.itemIndex = 0;
@@ -244,10 +245,10 @@ const InstantAppsScoreboard$1 = /*@__PURE__*/ proxyCustomElement(class InstantAp
244
245
  const isLoading = state === "loading" /* Scoreboard.Loading */;
245
246
  const isCalculating = state === "calculating" /* Scoreboard.Calculating */;
246
247
  const isDisabled = state === "disabled" /* Scoreboard.Disabled */;
247
- const progress = isLoading || isCalculating || ((_a = this.view) === null || _a === void 0 ? void 0 : _a.updating) ? this.renderProgress() : null;
248
+ const progress = isLoading || isCalculating || (this.queryType === 'layerView' && ((_a = this.view) === null || _a === void 0 ? void 0 : _a.updating)) ? this.renderProgress() : null;
248
249
  const positionClass = this.getPositionClass;
249
250
  const styleClass = this.getStyleClass;
250
- return h(Host, { key: '5fed5010f728e5d8c4866af3bc38b41ac9b5424f', class: `${positionClass} ${styleClass}` }, isDisabled ? null : [progress, ((_b = this.items) === null || _b === void 0 ? void 0 : _b.length) > 0 ? this.renderBase() : null]);
251
+ return h(Host, { key: '5a7e3fdc0753d3f951a71397519ebf07ecd68e03', class: `${positionClass} ${styleClass}` }, isDisabled ? null : [progress, ((_b = this.items) === null || _b === void 0 ? void 0 : _b.length) > 0 ? this.renderBase() : null]);
251
252
  }
252
253
  renderBase() {
253
254
  return (h("div", { key: "instant-apps-scoreboard-base", class: BASE }, this.renderContent()));
@@ -365,7 +366,7 @@ const InstantAppsScoreboard$1 = /*@__PURE__*/ proxyCustomElement(class InstantAp
365
366
  };
366
367
  const getStatDefinitionQuery = (layerView, statDefinition) => {
367
368
  var _a, _b, _c, _d, _e;
368
- const query = layerView.createQuery();
369
+ const query = this.queryType === 'layer' ? layerView.layer.createQuery() : layerView.createQuery();
369
370
  const outStatistics = [statDefinition];
370
371
  const geometry = this.geometry ? this.geometry : this.view.extent;
371
372
  query.outStatistics = outStatistics;
@@ -383,7 +384,7 @@ const InstantAppsScoreboard$1 = /*@__PURE__*/ proxyCustomElement(class InstantAp
383
384
  return;
384
385
  const statDefinition = getStatsDefinition(item);
385
386
  const query = getStatDefinitionQuery(layerView, statDefinition);
386
- const queryFeaturesRes = layerView.queryFeatures(query);
387
+ const queryFeaturesRes = this.queryType === 'layer' ? layerView.layer.queryFeatures(query) : layerView.queryFeatures(query);
387
388
  queryFeaturePromises.push(queryFeaturesRes);
388
389
  };
389
390
  };
@@ -420,7 +421,10 @@ const InstantAppsScoreboard$1 = /*@__PURE__*/ proxyCustomElement(class InstantAp
420
421
  const whenOnceConfig = { once: true, initial: true };
421
422
  const isNotInteractingWatcher = () => {
422
423
  var _a;
423
- return (_a = this.reactiveUtils) === null || _a === void 0 ? void 0 : _a.when(() => { var _a; return !((_a = this.view) === null || _a === void 0 ? void 0 : _a.interacting); }, () => this.calculateScoreboardItemValues(), whenOnceConfig);
424
+ return (_a = this.reactiveUtils) === null || _a === void 0 ? void 0 : _a.when(() => { var _a; return !((_a = this.view) === null || _a === void 0 ? void 0 : _a.interacting); }, () => {
425
+ if (this.queryType === 'layerView')
426
+ this.calculateScoreboardItemValues();
427
+ }, whenOnceConfig);
424
428
  };
425
429
  const stationaryWatcher = () => {
426
430
  var _a;
@@ -433,7 +437,10 @@ const InstantAppsScoreboard$1 = /*@__PURE__*/ proxyCustomElement(class InstantAp
433
437
  }
434
438
  initViewUpdateWatcher() {
435
439
  return this.reactiveUtils.watch(() => { var _a; return (_a = this.view) === null || _a === void 0 ? void 0 : _a.updating; }, () => {
436
- this.reactiveUtils.when(() => { var _a; return !((_a = this.view) === null || _a === void 0 ? void 0 : _a.updating); }, () => this.calculateScoreboardItemValues(), { once: true, initial: true });
440
+ this.reactiveUtils.when(() => { var _a; return !((_a = this.view) === null || _a === void 0 ? void 0 : _a.updating); }, () => {
441
+ if (this.queryType === 'layerView')
442
+ this.calculateScoreboardItemValues();
443
+ }, { once: true, initial: true });
437
444
  }, { initial: true });
438
445
  }
439
446
  watchLayerVisibility() {
@@ -474,6 +481,7 @@ const InstantAppsScoreboard$1 = /*@__PURE__*/ proxyCustomElement(class InstantAp
474
481
  "itemLimit": [2, "item-limit"],
475
482
  "autoDockEnabled": [4, "auto-dock-enabled"],
476
483
  "geometry": [1040],
484
+ "queryType": [1, "query-type"],
477
485
  "state": [32],
478
486
  "messages": [32],
479
487
  "itemIndex": [32],