@esri/solutions-components 0.7.35 → 0.7.37

Sign up to get free protection for your applications and to get access to all the features.
Files changed (60) hide show
  1. package/dist/cjs/calcite-alert_4.cjs.entry.js +3 -1
  2. package/dist/cjs/calcite-combobox_5.cjs.entry.js +1 -1
  3. package/dist/cjs/calcite-flow_5.cjs.entry.js +7 -9
  4. package/dist/cjs/card-manager_3.cjs.entry.js +38 -7
  5. package/dist/cjs/crowdsource-manager.cjs.entry.js +7 -3
  6. package/dist/cjs/crowdsource-reporter.cjs.entry.js +32 -8
  7. package/dist/cjs/{downloadUtils-8ca56dfa.js → downloadUtils-c22a71da.js} +2 -2
  8. package/dist/cjs/{index.es-3c36cde7.js → index.es-8d317f5e.js} +2 -2
  9. package/dist/cjs/loader.cjs.js +1 -1
  10. package/dist/cjs/map-select-tools_3.cjs.entry.js +2 -2
  11. package/dist/cjs/{mapViewUtils-8aa325de.js → mapViewUtils-cd29b129.js} +2 -0
  12. package/dist/cjs/public-notification.cjs.entry.js +2 -2
  13. package/dist/cjs/solutions-components.cjs.js +1 -1
  14. package/dist/collection/components/crowdsource-manager/crowdsource-manager.js +6 -2
  15. package/dist/collection/components/crowdsource-reporter/crowdsource-reporter.js +32 -8
  16. package/dist/collection/components/feature-list/feature-list.js +6 -8
  17. package/dist/collection/components/info-card/info-card.js +20 -0
  18. package/dist/collection/components/layer-table/layer-table.js +36 -5
  19. package/dist/collection/utils/mapViewUtils.js +2 -0
  20. package/dist/collection/utils/mapViewUtils.ts +2 -0
  21. package/dist/components/crowdsource-manager.js +6 -2
  22. package/dist/components/crowdsource-reporter.js +32 -8
  23. package/dist/components/feature-list2.js +6 -8
  24. package/dist/components/info-card2.js +3 -0
  25. package/dist/components/layer-table2.js +36 -5
  26. package/dist/components/mapViewUtils.js +2 -0
  27. package/dist/esm/calcite-alert_4.entry.js +3 -1
  28. package/dist/esm/calcite-combobox_5.entry.js +1 -1
  29. package/dist/esm/calcite-flow_5.entry.js +7 -9
  30. package/dist/esm/card-manager_3.entry.js +38 -7
  31. package/dist/esm/crowdsource-manager.entry.js +7 -3
  32. package/dist/esm/crowdsource-reporter.entry.js +32 -8
  33. package/dist/esm/{downloadUtils-8b83a40c.js → downloadUtils-985dcd1c.js} +2 -2
  34. package/dist/esm/{index.es-33e2ee2d.js → index.es-03d8386e.js} +2 -2
  35. package/dist/esm/loader.js +1 -1
  36. package/dist/esm/map-select-tools_3.entry.js +2 -2
  37. package/dist/esm/{mapViewUtils-cf05e880.js → mapViewUtils-257bc9b3.js} +3 -1
  38. package/dist/esm/public-notification.entry.js +2 -2
  39. package/dist/esm/solutions-components.js +1 -1
  40. package/dist/solutions-components/{p-e4e59f16.js → p-00ba5a2a.js} +2 -2
  41. package/dist/solutions-components/{p-d3da7497.entry.js → p-12492469.entry.js} +1 -1
  42. package/dist/solutions-components/{p-cf24dd35.entry.js → p-20b206f3.entry.js} +1 -1
  43. package/dist/solutions-components/{p-23d88af7.entry.js → p-23e58d7c.entry.js} +2 -2
  44. package/dist/solutions-components/{p-25894d7a.entry.js → p-34eaca46.entry.js} +1 -1
  45. package/dist/solutions-components/{p-c85ce035.entry.js → p-6419f8d7.entry.js} +2 -2
  46. package/dist/solutions-components/{p-5f814990.entry.js → p-7fec7066.entry.js} +1 -1
  47. package/dist/solutions-components/p-9161dca9.entry.js +6 -0
  48. package/dist/solutions-components/p-96f5be25.js +36 -0
  49. package/dist/solutions-components/p-d503e883.entry.js +6 -0
  50. package/dist/solutions-components/{p-ee1e4df3.js → p-df048b47.js} +1 -1
  51. package/dist/solutions-components/solutions-components.esm.js +1 -1
  52. package/dist/solutions-components/utils/mapViewUtils.ts +2 -0
  53. package/dist/types/components/crowdsource-reporter/crowdsource-reporter.d.ts +14 -0
  54. package/dist/types/components/info-card/info-card.d.ts +4 -0
  55. package/dist/types/components/layer-table/layer-table.d.ts +10 -1
  56. package/dist/types/components.d.ts +8 -0
  57. package/package.json +1 -1
  58. package/dist/solutions-components/p-2c382841.js +0 -36
  59. package/dist/solutions-components/p-6d0203ed.entry.js +0 -6
  60. package/dist/solutions-components/p-9dfe1301.entry.js +0 -6
@@ -16,7 +16,7 @@ const openCloseComponent = require('./openCloseComponent-19a769d0.js');
16
16
  const t9n = require('./t9n-993a84de.js');
17
17
  const resources = require('./resources-dd8ff1b4.js');
18
18
  const locale$1 = require('./locale-8c42ba7a.js');
19
- const mapViewUtils = require('./mapViewUtils-8aa325de.js');
19
+ const mapViewUtils = require('./mapViewUtils-cd29b129.js');
20
20
  const popupUtils = require('./popupUtils-824d2f7c.js');
21
21
  require('./guid-ae73cd27.js');
22
22
  require('./resources-9447c777.js');
@@ -681,6 +681,7 @@ const InfoCard = class {
681
681
  this.mapView = undefined;
682
682
  this.zoomAndScrollToSelected = undefined;
683
683
  this.allowEditing = true;
684
+ this.highlightEnabled = true;
684
685
  this._alertOpen = false;
685
686
  this._count = "";
686
687
  this._editRecordOpen = false;
@@ -857,6 +858,7 @@ const InfoCard = class {
857
858
  heading: !this.isMobile
858
859
  }
859
860
  });
861
+ this._features.viewModel.highlightEnabled = this.highlightEnabled;
860
862
  this.reactiveUtils.watch(() => this._features.viewModel.featureMenuOpen, (isOpen) => {
861
863
  if (!isOpen) {
862
864
  this._showListView = isOpen;
@@ -26,7 +26,7 @@ const Validation = require('./Validation-b02c6710.js');
26
26
  const debounce = require('./debounce-30afab47.js');
27
27
  const key = require('./key-c5504030.js');
28
28
  const locale$1 = require('./locale-8c42ba7a.js');
29
- const mapViewUtils = require('./mapViewUtils-8aa325de.js');
29
+ const mapViewUtils = require('./mapViewUtils-cd29b129.js');
30
30
  const publicNotificationStore = require('./publicNotificationStore-ef379d11.js');
31
31
  require('./resources-9447c777.js');
32
32
  require('./browser-d08a5f99.js');
@@ -16,7 +16,7 @@ const locale = require('./locale-d237c9d5.js');
16
16
  const t9n = require('./t9n-993a84de.js');
17
17
  const resources = require('./resources-3e593312.js');
18
18
  const locale$1 = require('./locale-8c42ba7a.js');
19
- const mapViewUtils = require('./mapViewUtils-8aa325de.js');
19
+ const mapViewUtils = require('./mapViewUtils-cd29b129.js');
20
20
  const popupUtils = require('./popupUtils-824d2f7c.js');
21
21
  require('./guid-ae73cd27.js');
22
22
  require('./resources-9447c777.js');
@@ -641,7 +641,7 @@ const FeatureList = class {
641
641
  */
642
642
  render() {
643
643
  return (index.h("calcite-panel", { "full-height": true, "full-width": true }, this._isLoading && index.h("calcite-loader", { label: "", scale: "m" }), this._featureItems.length === 0 && !this._isLoading &&
644
- index.h("calcite-notice", { class: "error-msg", icon: "feature-details", kind: "info", open: true }, index.h("div", { slot: "message" }, this.noFeaturesFoundMsg ? this.noFeaturesFoundMsg : this._translations.featureErrorMsg)), index.h("calcite-list", { "selection-appearance": "border", "selection-mode": "single" }, !this._isLoading && this._featureItems.length > 0 && this._featureItems), this._featuresCount > this.pageSize &&
644
+ index.h("calcite-notice", { class: "error-msg", icon: "feature-details", kind: "info", open: true }, index.h("div", { slot: "message" }, this.noFeaturesFoundMsg ? this.noFeaturesFoundMsg : this._translations.featureErrorMsg)), index.h("calcite-list", { "selection-appearance": "border", "selection-mode": "none" }, !this._isLoading && this._featureItems.length > 0 && this._featureItems), this._featuresCount > this.pageSize &&
645
645
  index.h("div", { class: "width-full", slot: "footer" }, index.h("calcite-pagination", { class: "pagination", "full-width": true, onCalcitePaginationChange: this.pageChanged.bind(this), "page-size": this.pageSize, "start-item": "1", "total-items": this._featuresCount }))));
646
646
  }
647
647
  //--------------------------------------------------------------------------
@@ -689,14 +689,12 @@ const FeatureList = class {
689
689
  this._highlightHandle = null;
690
690
  }
691
691
  //highlight on map only if it is selected item
692
- if (event.target.selected) {
693
- if (this.highlightOnMap) {
694
- const selectedFeatureObjectId = Number(event.target.value);
695
- const selectedLayerView = await mapViewUtils.getFeatureLayerView(this.mapView, this.selectedLayerId);
696
- this._highlightHandle = await mapViewUtils.highlightFeatures([selectedFeatureObjectId], selectedLayerView, this.mapView, true);
697
- }
698
- this.featureSelect.emit(selectedFeature);
692
+ if (this.highlightOnMap) {
693
+ const selectedFeatureObjectId = Number(event.target.value);
694
+ const selectedLayerView = await mapViewUtils.getFeatureLayerView(this.mapView, this.selectedLayerId);
695
+ this._highlightHandle = await mapViewUtils.highlightFeatures([selectedFeatureObjectId], selectedLayerView, this.mapView, true);
699
696
  }
697
+ this.featureSelect.emit(selectedFeature);
700
698
  }
701
699
  /**
702
700
  * Query the selected feature layer, in descending order of object id's
@@ -9,8 +9,8 @@ Object.defineProperty(exports, '__esModule', { value: true });
9
9
 
10
10
  const index = require('./index-105cf2b9.js');
11
11
  const locale = require('./locale-8c42ba7a.js');
12
- const mapViewUtils = require('./mapViewUtils-8aa325de.js');
13
- const downloadUtils = require('./downloadUtils-8ca56dfa.js');
12
+ const mapViewUtils = require('./mapViewUtils-cd29b129.js');
13
+ const downloadUtils = require('./downloadUtils-c22a71da.js');
14
14
  require('./esri-loader-a91c0ec1.js');
15
15
  require('./_commonjsHelpers-384729db.js');
16
16
  require('./interfaces-7cd0a48a.js');
@@ -242,6 +242,7 @@ const LayerTable = class {
242
242
  this._initToolInfos();
243
243
  }
244
244
  this._initLayerExpressions();
245
+ this._resetColumnTemplates();
245
246
  }
246
247
  /**
247
248
  * watch for changes in map view and get the first layer
@@ -402,12 +403,14 @@ const LayerTable = class {
402
403
  * @protected
403
404
  */
404
405
  async _initModules() {
405
- const [FeatureTable, reactiveUtils] = await locale.loadModules([
406
+ const [FeatureTable, reactiveUtils, TableTemplate] = await locale.loadModules([
406
407
  "esri/widgets/FeatureTable",
407
- "esri/core/reactiveUtils"
408
+ "esri/core/reactiveUtils",
409
+ "esri/widgets/FeatureTable/support/TableTemplate"
408
410
  ]);
409
411
  this.FeatureTable = FeatureTable;
410
412
  this.reactiveUtils = reactiveUtils;
413
+ this.TableTemplate = TableTemplate;
411
414
  }
412
415
  /**
413
416
  * Update the toolbar when its size changes
@@ -1044,6 +1047,18 @@ const LayerTable = class {
1044
1047
  }
1045
1048
  this.featureSelectionChange.emit(this.selectedIds);
1046
1049
  }
1050
+ /**
1051
+ * Reset the tables column templates when we get new column config
1052
+ */
1053
+ _resetColumnTemplates() {
1054
+ var _a, _b;
1055
+ const columnTemplates = this._getColumnTemplates((_a = this._layer) === null || _a === void 0 ? void 0 : _a.id, (_b = this._layer) === null || _b === void 0 ? void 0 : _b.fields);
1056
+ this._table.tableTemplate = new this.TableTemplate({
1057
+ columnTemplates
1058
+ });
1059
+ const fieldNames = columnTemplates.map(f => f.fieldName);
1060
+ this._initColumnsInfo(fieldNames);
1061
+ }
1047
1062
  /**
1048
1063
  * Reset basic table props
1049
1064
  */
@@ -1094,12 +1109,28 @@ const LayerTable = class {
1094
1109
  }
1095
1110
  /**
1096
1111
  * Store the column names and current hidden status to support show/hide of columns
1112
+ * @param fieldNames optional list of names from new config options
1097
1113
  */
1098
- _initColumnsInfo() {
1099
- this._columnsInfo = this._table.columns.reduce((prev, cur) => {
1100
- prev[cur.name] = !cur.hidden;
1114
+ _initColumnsInfo(fieldNames) {
1115
+ var _a, _b;
1116
+ // this._table.columns is not reflecting correct list when new
1117
+ // tableTemplate.columnTemplates have been defined on an existing FeatureTable
1118
+ // TODO review for better solution post 2024 R01 release
1119
+ const columnsInfo = (_a = this._table) === null || _a === void 0 ? void 0 : _a.columns.reduce((prev, cur) => {
1120
+ if (!fieldNames || ((fieldNames === null || fieldNames === void 0 ? void 0 : fieldNames.indexOf(cur.name)) > -1)) {
1121
+ prev[cur.name] = !cur.hidden;
1122
+ }
1101
1123
  return prev;
1102
1124
  }, {});
1125
+ const oldColumnNames = (_b = this._table) === null || _b === void 0 ? void 0 : _b.columns.map((c) => c.name);
1126
+ const newColumnNames = fieldNames ? fieldNames.filter(n => oldColumnNames.indexOf(n) < 0) : [];
1127
+ newColumnNames.forEach(c => {
1128
+ columnsInfo[c] = true;
1129
+ });
1130
+ this._columnsInfo = fieldNames ? fieldNames.reduce((prev, cur) => {
1131
+ prev[cur] = columnsInfo[cur];
1132
+ return prev;
1133
+ }, {}) : columnsInfo;
1103
1134
  }
1104
1135
  /**
1105
1136
  * Select the feature that was specified via url params
@@ -10,7 +10,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
10
10
  const index = require('./index-105cf2b9.js');
11
11
  const locale = require('./locale-8c42ba7a.js');
12
12
  const interfaces = require('./interfaces-7cd0a48a.js');
13
- const mapViewUtils = require('./mapViewUtils-8aa325de.js');
13
+ const mapViewUtils = require('./mapViewUtils-cd29b129.js');
14
14
  require('./esri-loader-a91c0ec1.js');
15
15
  require('./_commonjsHelpers-384729db.js');
16
16
 
@@ -409,9 +409,13 @@ const CrowdsourceManager = class {
409
409
  * Update the component layout when its size changes
410
410
  */
411
411
  _onResize() {
412
- this._isMobile = this.el.offsetWidth < 1024;
412
+ const isMobile = this.el.offsetWidth < 1024;
413
+ const forceOpen = !this._isMobile && isMobile;
414
+ this._isMobile = isMobile;
413
415
  this._layoutMode = this._isMobile ? interfaces.ELayoutMode.HORIZONTAL : interfaces.ELayoutMode.GRID;
414
- this._panelOpen = true;
416
+ if (forceOpen) {
417
+ this._panelOpen = true;
418
+ }
415
419
  }
416
420
  /**
417
421
  * Open/Close the appropriate panel.
@@ -9,7 +9,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
9
9
 
10
10
  const index = require('./index-105cf2b9.js');
11
11
  const locale = require('./locale-8c42ba7a.js');
12
- const mapViewUtils = require('./mapViewUtils-8aa325de.js');
12
+ const mapViewUtils = require('./mapViewUtils-cd29b129.js');
13
13
  require('./esri-loader-a91c0ec1.js');
14
14
  require('./_commonjsHelpers-384729db.js');
15
15
  require('./interfaces-7cd0a48a.js');
@@ -92,7 +92,7 @@ const CrowdsourceReporter = class {
92
92
  */
93
93
  render() {
94
94
  const themeClass = this.theme === "dark" ? "calcite-mode-dark" : "calcite-mode-light";
95
- return (index.h(index.Host, null, this._reportSubmitted && index.h("calcite-alert", { "auto-close": true, class: themeClass, icon: "check-circle", kind: "success", label: "", onCalciteAlertClose: () => { this._reportSubmitted = false; }, open: true, placement: "top" }, index.h("div", { slot: "title" }, this._translations.reportSubmit), index.h("div", { slot: "message" }, this._translations.submitMsg)), this._featureCreationFailedErrorMsg && index.h("calcite-alert", { "auto-close": true, class: themeClass, icon: "x-octagon", kind: "danger", label: "", onCalciteAlertClose: () => { this._featureCreationFailedErrorMsg = ""; }, open: true, placement: "top" }, index.h("div", { slot: "title" }, this._translations.error), index.h("div", { slot: "message" }, this._featureCreationFailedErrorMsg)), index.h("div", null, index.h("calcite-shell", { "content-behind": true }, this._getReporter()))));
95
+ return (index.h(index.Host, null, this._reportSubmitted && index.h("calcite-alert", { "auto-close": true, class: themeClass, icon: "check-circle", kind: "success", label: "", onCalciteAlertClose: () => { this._reportSubmitted = false; }, open: true, placement: "top" }, index.h("div", { slot: "title" }, this._translations.reportSubmit), index.h("div", { slot: "message" }, this.reportSubmittedMessage ? this.reportSubmittedMessage : this._translations.submitMsg)), this._featureCreationFailedErrorMsg && index.h("calcite-alert", { "auto-close": true, class: themeClass, icon: "x-octagon", kind: "danger", label: "", onCalciteAlertClose: () => { this._featureCreationFailedErrorMsg = ""; }, open: true, placement: "top" }, index.h("div", { slot: "title" }, this._translations.error), index.h("div", { slot: "message" }, this._featureCreationFailedErrorMsg)), index.h("div", null, index.h("calcite-shell", { "content-behind": true }, this._getReporter()))));
96
96
  }
97
97
  //--------------------------------------------------------------------------
98
98
  //
@@ -162,9 +162,7 @@ const CrowdsourceReporter = class {
162
162
  * @protected
163
163
  */
164
164
  getLayerListFlowItem() {
165
- return (index.h("calcite-flow-item", { collapsed: this.isMobile && this._sidePanelCollapsed, heading: this.reportsHeader }, this._hasValidLayers &&
166
- index.h("calcite-action", { icon: "sort-ascending-arrow", slot: this.isMobile ? "header-menu-actions" : "header-actions-end", text: this._translations.sort, "text-enabled": this.isMobile }), this._hasValidLayers &&
167
- index.h("calcite-action", { icon: "filter", slot: this.isMobile ? "header-menu-actions" : "header-actions-end", text: this._translations.filter, "text-enabled": this.isMobile }), this.isMobile && this.getActionToExpandCollapsePanel(), this._hasValidLayers && this.enableNewReports &&
165
+ return (index.h("calcite-flow-item", { collapsed: this.isMobile && this._sidePanelCollapsed, heading: this.reportsHeader }, this.isMobile && this.getActionToExpandCollapsePanel(), this._hasValidLayers && this.enableNewReports &&
168
166
  index.h("calcite-button", { appearance: "solid", onClick: this.navigateToChooseCategory.bind(this), slot: "footer", width: "full" }, this.reportButtonText), index.h("calcite-panel", { "full-height": true, "full-width": true }, index.h("layer-list", { class: "height-full", layers: this.layers, mapView: this.mapView, noLayerErrorMsg: this._translations.noLayerToDisplayErrorMsg, onLayerSelect: this.displayFeaturesList.bind(this), onLayersListLoaded: this.layerListLoaded.bind(this), ref: el => this._layerList = el, showFeatureCount: true, showNextIcon: true }))));
169
167
  }
170
168
  /**
@@ -310,6 +308,7 @@ const CrowdsourceReporter = class {
310
308
  backFromSelectedPanel() {
311
309
  const updatedFlowItems = [...this._flowItems];
312
310
  updatedFlowItems.pop();
311
+ this.clearHighlights();
313
312
  //Back to layer list, and return as the flowItems will be reset in navigateToHomePage
314
313
  if (updatedFlowItems.length === 1) {
315
314
  this.navigateToHomePage();
@@ -341,15 +340,15 @@ const CrowdsourceReporter = class {
341
340
  * @protected
342
341
  */
343
342
  getFeatureListFlowItem(layerId, layerName) {
344
- return (index.h("calcite-flow-item", { collapsed: this.isMobile && this._sidePanelCollapsed, heading: layerName, onCalciteFlowItemBack: this.backFromSelectedPanel.bind(this) }, index.h("calcite-action", { icon: "sort-ascending-arrow", slot: this.isMobile ? "header-menu-actions" : "header-actions-end", text: this._translations.sort, "text-enabled": this.isMobile }), index.h("calcite-action", { icon: "filter", slot: this.isMobile ? "header-menu-actions" : "header-actions-end", text: this._translations.filter, "text-enabled": this.isMobile }), this.isMobile && this.getActionToExpandCollapsePanel(), this.enableNewReports &&
345
- index.h("calcite-button", { appearance: "solid", onClick: this.navigateToCreateFeature.bind(this), slot: "footer", width: "full" }, this.reportButtonText), index.h("calcite-panel", { "full-height": true }, index.h("feature-list", { class: "height-full", highlightOnMap: true, mapView: this.mapView, noFeaturesFoundMsg: this._translations.featureErrorMsg, onFeatureSelect: this.onFeatureSelectFromList.bind(this), pageSize: 30, selectedLayerId: layerId }))));
343
+ return (index.h("calcite-flow-item", { collapsed: this.isMobile && this._sidePanelCollapsed, heading: layerName, onCalciteFlowItemBack: this.backFromSelectedPanel.bind(this) }, this.isMobile && this.getActionToExpandCollapsePanel(), this.enableNewReports &&
344
+ index.h("calcite-button", { appearance: "solid", onClick: this.navigateToCreateFeature.bind(this), slot: "footer", width: "full" }, this.reportButtonText), index.h("calcite-panel", { "full-height": true }, index.h("feature-list", { class: "height-full", mapView: this.mapView, noFeaturesFoundMsg: this._translations.featureErrorMsg, onFeatureSelect: this.onFeatureSelectFromList.bind(this), pageSize: 30, selectedLayerId: layerId }))));
346
345
  }
347
346
  /**
348
347
  * Returns the calcite-flow item for feature details
349
348
  * @returns Node
350
349
  */
351
350
  getFeatureDetailsFlowItem() {
352
- return (index.h("calcite-flow-item", { collapsed: this.isMobile && this._sidePanelCollapsed, heading: this._selectedLayerName, onCalciteFlowItemBack: this.backFromSelectedPanel.bind(this) }, this.isMobile && this.getActionToExpandCollapsePanel(), index.h("instant-apps-social-share", { autoUpdateShareUrl: false, embed: false, popoverButtonIconScale: "s", ref: el => this._shareNode = el, scale: "m", shareButtonColor: "neutral", shareButtonType: "action", slot: "header-actions-end", socialMedia: true, view: this.mapView }), index.h("calcite-panel", { "full-height": true }, index.h("info-card", { allowEditing: false, graphics: this._selectedFeature, isLoading: false, isMobile: false, mapView: this.mapView, onSelectionChanged: this.featureDetailsChanged.bind(this), zoomAndScrollToSelected: true }))));
351
+ return (index.h("calcite-flow-item", { collapsed: this.isMobile && this._sidePanelCollapsed, heading: this._selectedLayerName, onCalciteFlowItemBack: this.backFromSelectedPanel.bind(this) }, this.isMobile && this.getActionToExpandCollapsePanel(), index.h("instant-apps-social-share", { autoUpdateShareUrl: false, embed: false, popoverButtonIconScale: "s", ref: el => this._shareNode = el, scale: "m", shareButtonColor: "neutral", shareButtonType: "action", slot: "header-actions-end", socialMedia: true, view: this.mapView }), index.h("calcite-panel", { "full-height": true }, index.h("info-card", { allowEditing: false, graphics: this._selectedFeature, highlightEnabled: false, isLoading: false, isMobile: false, mapView: this.mapView, onSelectionChanged: this.featureDetailsChanged.bind(this), zoomAndScrollToSelected: true }))));
353
352
  }
354
353
  /**
355
354
  * Sets the selected features and updates the first feature as the current selected feature
@@ -381,6 +380,30 @@ const CrowdsourceReporter = class {
381
380
  */
382
381
  featureDetailsChanged(evt) {
383
382
  this.setCurrentFeature(evt.detail[0]);
383
+ void this.highlightOnMap(evt.detail[0]);
384
+ }
385
+ /**
386
+ * Highlights the feature on map
387
+ * @param selectedFeature Graphic currently shown in feature details
388
+ */
389
+ async highlightOnMap(selectedFeature) {
390
+ // if a feature is already highlighted, remove the previous highlight
391
+ this.clearHighlights();
392
+ // highlight the newly selected feature only when it has valid geometry
393
+ if (selectedFeature && selectedFeature.geometry && selectedFeature.layer) {
394
+ const selectedLayerView = await mapViewUtils.getFeatureLayerView(this.mapView, selectedFeature.layer.id);
395
+ this._highlightHandle = await mapViewUtils.highlightFeatures([selectedFeature.getObjectId()], selectedLayerView, this.mapView, true);
396
+ }
397
+ }
398
+ /**
399
+ * Clears the highlight
400
+ * @protected
401
+ */
402
+ clearHighlights() {
403
+ //if a feature is already highlighted, then remove the highlight
404
+ if (this._highlightHandle) {
405
+ this._highlightHandle.remove();
406
+ }
384
407
  }
385
408
  /**
386
409
  * Returns the action button to Expand/Collapse side panel in mobile mode
@@ -448,6 +471,7 @@ const CrowdsourceReporter = class {
448
471
  }
449
472
  else {
450
473
  this._flowItems = [...this._flowItems];
474
+ void this.highlightOnMap(clickedGraphics[0]);
451
475
  }
452
476
  }
453
477
  }
@@ -8,7 +8,7 @@
8
8
  const _commonjsHelpers = require('./_commonjsHelpers-384729db.js');
9
9
  const index = require('./index-105cf2b9.js');
10
10
  const locale = require('./locale-8c42ba7a.js');
11
- const mapViewUtils = require('./mapViewUtils-8aa325de.js');
11
+ const mapViewUtils = require('./mapViewUtils-cd29b129.js');
12
12
  require('./solution-resource-abec7452.js');
13
13
  require('./index-f64944ad.js');
14
14
  const restHelpersGet = require('./restHelpersGet-e0737480.js');
@@ -1510,7 +1510,7 @@ function(t){var e=function(t){for(var e=t.length,r=new Uint8Array(e),n=0;n<e;n++
1510
1510
  * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
1511
1511
  * ====================================================================
1512
1512
  */
1513
- function(t){function e(){return (n.canvg?Promise.resolve(n.canvg):Promise.resolve().then(function () { return require('./index.es-3c36cde7.js'); })).catch((function(t){return Promise.reject(new Error("Could not load canvg: "+t))})).then((function(t){return t.default?t.default:t}))}E.API.addSvgAsImage=function(t,r,n,i,o,s,c,u){if(isNaN(r)||isNaN(n))throw a.error("jsPDF.addSvgAsImage: Invalid coordinates",arguments),new Error("Invalid coordinates passed to jsPDF.addSvgAsImage");if(isNaN(i)||isNaN(o))throw a.error("jsPDF.addSvgAsImage: Invalid measurements",arguments),new Error("Invalid measurements (width and/or height) passed to jsPDF.addSvgAsImage");var h=document.createElement("canvas");h.width=i,h.height=o;var l=h.getContext("2d");l.fillStyle="#fff",l.fillRect(0,0,h.width,h.height);var f={ignoreMouse:!0,ignoreAnimation:!0,ignoreDimensions:!0},d=this;return e().then((function(e){return e.fromString(l,t,f)}),(function(){return Promise.reject(new Error("Could not load canvg."))})).then((function(t){return t.render(f)})).then((function(){d.addImage(h.toDataURL("image/jpeg",1),r,n,i,o,c,u);}))};}(),E.API.putTotalPages=function(t){var e,r=0;parseInt(this.internal.getFont().id.substr(1),10)<15?(e=new RegExp(t,"g"),r=this.internal.getNumberOfPages()):(e=new RegExp(this.pdfEscape16(t,this.internal.getFont()),"g"),r=this.pdfEscape16(this.internal.getNumberOfPages()+"",this.internal.getFont()));for(var n=1;n<=this.internal.getNumberOfPages();n++)for(var i=0;i<this.internal.pages[n].length;i++)this.internal.pages[n][i]=this.internal.pages[n][i].replace(e,r);return this},E.API.viewerPreferences=function(e,r){var n;e=e||{},r=r||!1;var i,a,o,s={HideToolbar:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},HideMenubar:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},HideWindowUI:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},FitWindow:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},CenterWindow:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},DisplayDocTitle:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.4},NonFullScreenPageMode:{defaultValue:"UseNone",value:"UseNone",type:"name",explicitSet:!1,valueSet:["UseNone","UseOutlines","UseThumbs","UseOC"],pdfVersion:1.3},Direction:{defaultValue:"L2R",value:"L2R",type:"name",explicitSet:!1,valueSet:["L2R","R2L"],pdfVersion:1.3},ViewArea:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},ViewClip:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintArea:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintClip:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintScaling:{defaultValue:"AppDefault",value:"AppDefault",type:"name",explicitSet:!1,valueSet:["AppDefault","None"],pdfVersion:1.6},Duplex:{defaultValue:"",value:"none",type:"name",explicitSet:!1,valueSet:["Simplex","DuplexFlipShortEdge","DuplexFlipLongEdge","none"],pdfVersion:1.7},PickTrayByPDFSize:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.7},PrintPageRange:{defaultValue:"",value:"",type:"array",explicitSet:!1,valueSet:null,pdfVersion:1.7},NumCopies:{defaultValue:1,value:1,type:"integer",explicitSet:!1,valueSet:null,pdfVersion:1.7}},c=Object.keys(s),u=[],h=0,l=0,f=0;function d(t,e){var r,n=!1;for(r=0;r<t.length;r+=1)t[r]===e&&(n=!0);return n}if(void 0===this.internal.viewerpreferences&&(this.internal.viewerpreferences={},this.internal.viewerpreferences.configuration=JSON.parse(JSON.stringify(s)),this.internal.viewerpreferences.isSubscribed=!1),n=this.internal.viewerpreferences.configuration,"reset"===e||!0===r){var p=c.length;for(f=0;f<p;f+=1)n[c[f]].value=n[c[f]].defaultValue,n[c[f]].explicitSet=!1;}if("object"===t(e))for(a in e)if(o=e[a],d(c,a)&&void 0!==o){if("boolean"===n[a].type&&"boolean"==typeof o)n[a].value=o;else if("name"===n[a].type&&d(n[a].valueSet,o))n[a].value=o;else if("integer"===n[a].type&&Number.isInteger(o))n[a].value=o;else if("array"===n[a].type){for(h=0;h<o.length;h+=1)if(i=!0,1===o[h].length&&"number"==typeof o[h][0])u.push(String(o[h]-1));else if(o[h].length>1){for(l=0;l<o[h].length;l+=1)"number"!=typeof o[h][l]&&(i=!1);!0===i&&u.push([o[h][0]-1,o[h][1]-1].join(" "));}n[a].value="["+u.join(" ")+"]";}else n[a].value=n[a].defaultValue;n[a].explicitSet=!0;}return !1===this.internal.viewerpreferences.isSubscribed&&(this.internal.events.subscribe("putCatalog",(function(){var t,e=[];for(t in n)!0===n[t].explicitSet&&("name"===n[t].type?e.push("/"+t+" /"+n[t].value):e.push("/"+t+" "+n[t].value));0!==e.length&&this.internal.write("/ViewerPreferences\n<<\n"+e.join("\n")+"\n>>");})),this.internal.viewerpreferences.isSubscribed=!0),this.internal.viewerpreferences.configuration=n,this},
1513
+ function(t){function e(){return (n.canvg?Promise.resolve(n.canvg):Promise.resolve().then(function () { return require('./index.es-8d317f5e.js'); })).catch((function(t){return Promise.reject(new Error("Could not load canvg: "+t))})).then((function(t){return t.default?t.default:t}))}E.API.addSvgAsImage=function(t,r,n,i,o,s,c,u){if(isNaN(r)||isNaN(n))throw a.error("jsPDF.addSvgAsImage: Invalid coordinates",arguments),new Error("Invalid coordinates passed to jsPDF.addSvgAsImage");if(isNaN(i)||isNaN(o))throw a.error("jsPDF.addSvgAsImage: Invalid measurements",arguments),new Error("Invalid measurements (width and/or height) passed to jsPDF.addSvgAsImage");var h=document.createElement("canvas");h.width=i,h.height=o;var l=h.getContext("2d");l.fillStyle="#fff",l.fillRect(0,0,h.width,h.height);var f={ignoreMouse:!0,ignoreAnimation:!0,ignoreDimensions:!0},d=this;return e().then((function(e){return e.fromString(l,t,f)}),(function(){return Promise.reject(new Error("Could not load canvg."))})).then((function(t){return t.render(f)})).then((function(){d.addImage(h.toDataURL("image/jpeg",1),r,n,i,o,c,u);}))};}(),E.API.putTotalPages=function(t){var e,r=0;parseInt(this.internal.getFont().id.substr(1),10)<15?(e=new RegExp(t,"g"),r=this.internal.getNumberOfPages()):(e=new RegExp(this.pdfEscape16(t,this.internal.getFont()),"g"),r=this.pdfEscape16(this.internal.getNumberOfPages()+"",this.internal.getFont()));for(var n=1;n<=this.internal.getNumberOfPages();n++)for(var i=0;i<this.internal.pages[n].length;i++)this.internal.pages[n][i]=this.internal.pages[n][i].replace(e,r);return this},E.API.viewerPreferences=function(e,r){var n;e=e||{},r=r||!1;var i,a,o,s={HideToolbar:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},HideMenubar:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},HideWindowUI:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},FitWindow:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},CenterWindow:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},DisplayDocTitle:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.4},NonFullScreenPageMode:{defaultValue:"UseNone",value:"UseNone",type:"name",explicitSet:!1,valueSet:["UseNone","UseOutlines","UseThumbs","UseOC"],pdfVersion:1.3},Direction:{defaultValue:"L2R",value:"L2R",type:"name",explicitSet:!1,valueSet:["L2R","R2L"],pdfVersion:1.3},ViewArea:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},ViewClip:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintArea:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintClip:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintScaling:{defaultValue:"AppDefault",value:"AppDefault",type:"name",explicitSet:!1,valueSet:["AppDefault","None"],pdfVersion:1.6},Duplex:{defaultValue:"",value:"none",type:"name",explicitSet:!1,valueSet:["Simplex","DuplexFlipShortEdge","DuplexFlipLongEdge","none"],pdfVersion:1.7},PickTrayByPDFSize:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.7},PrintPageRange:{defaultValue:"",value:"",type:"array",explicitSet:!1,valueSet:null,pdfVersion:1.7},NumCopies:{defaultValue:1,value:1,type:"integer",explicitSet:!1,valueSet:null,pdfVersion:1.7}},c=Object.keys(s),u=[],h=0,l=0,f=0;function d(t,e){var r,n=!1;for(r=0;r<t.length;r+=1)t[r]===e&&(n=!0);return n}if(void 0===this.internal.viewerpreferences&&(this.internal.viewerpreferences={},this.internal.viewerpreferences.configuration=JSON.parse(JSON.stringify(s)),this.internal.viewerpreferences.isSubscribed=!1),n=this.internal.viewerpreferences.configuration,"reset"===e||!0===r){var p=c.length;for(f=0;f<p;f+=1)n[c[f]].value=n[c[f]].defaultValue,n[c[f]].explicitSet=!1;}if("object"===t(e))for(a in e)if(o=e[a],d(c,a)&&void 0!==o){if("boolean"===n[a].type&&"boolean"==typeof o)n[a].value=o;else if("name"===n[a].type&&d(n[a].valueSet,o))n[a].value=o;else if("integer"===n[a].type&&Number.isInteger(o))n[a].value=o;else if("array"===n[a].type){for(h=0;h<o.length;h+=1)if(i=!0,1===o[h].length&&"number"==typeof o[h][0])u.push(String(o[h]-1));else if(o[h].length>1){for(l=0;l<o[h].length;l+=1)"number"!=typeof o[h][l]&&(i=!1);!0===i&&u.push([o[h][0]-1,o[h][1]-1].join(" "));}n[a].value="["+u.join(" ")+"]";}else n[a].value=n[a].defaultValue;n[a].explicitSet=!0;}return !1===this.internal.viewerpreferences.isSubscribed&&(this.internal.events.subscribe("putCatalog",(function(){var t,e=[];for(t in n)!0===n[t].explicitSet&&("name"===n[t].type?e.push("/"+t+" /"+n[t].value):e.push("/"+t+" "+n[t].value));0!==e.length&&this.internal.write("/ViewerPreferences\n<<\n"+e.join("\n")+"\n>>");})),this.internal.viewerpreferences.isSubscribed=!0),this.internal.viewerpreferences.configuration=n,this},
1514
1514
  /** ====================================================================
1515
1515
  * @license
1516
1516
  * jsPDF XMP metadata plugin
@@ -6,11 +6,11 @@
6
6
  'use strict';
7
7
 
8
8
  const _commonjsHelpers = require('./_commonjsHelpers-384729db.js');
9
- const downloadUtils = require('./downloadUtils-8ca56dfa.js');
9
+ const downloadUtils = require('./downloadUtils-c22a71da.js');
10
10
  require('./index-105cf2b9.js');
11
11
  require('./locale-8c42ba7a.js');
12
12
  require('./esri-loader-a91c0ec1.js');
13
- require('./mapViewUtils-8aa325de.js');
13
+ require('./mapViewUtils-cd29b129.js');
14
14
  require('./interfaces-7cd0a48a.js');
15
15
  require('./solution-resource-abec7452.js');
16
16
  require('./index-f64944ad.js');