@esri/solutions-components 0.7.40 → 0.7.42

Sign up to get free protection for your applications and to get access to all the features.
Files changed (44) hide show
  1. package/dist/cjs/calcite-flow_5.cjs.entry.js +3 -1
  2. package/dist/cjs/card-manager_3.cjs.entry.js +20 -23
  3. package/dist/cjs/crowdsource-reporter.cjs.entry.js +12 -3
  4. package/dist/cjs/{downloadUtils-b10e3b8c.js → downloadUtils-7d4985c0.js} +5 -3
  5. package/dist/cjs/{index.es-b9d6eff6.js → index.es-8cef354a.js} +1 -1
  6. package/dist/cjs/loader.cjs.js +1 -1
  7. package/dist/cjs/map-select-tools_3.cjs.entry.js +1 -1
  8. package/dist/cjs/public-notification.cjs.entry.js +1 -1
  9. package/dist/cjs/solutions-components.cjs.js +1 -1
  10. package/dist/collection/components/crowdsource-reporter/crowdsource-reporter.js +12 -3
  11. package/dist/collection/components/layer-list/layer-list.js +3 -1
  12. package/dist/collection/components/layer-table/layer-table.js +21 -24
  13. package/dist/collection/demos/crowdsource-reporter.html +5 -2
  14. package/dist/collection/utils/downloadUtils.js +4 -2
  15. package/dist/collection/utils/downloadUtils.ts +4 -2
  16. package/dist/components/crowdsource-reporter.js +12 -3
  17. package/dist/components/downloadUtils.js +4 -2
  18. package/dist/components/layer-list2.js +3 -1
  19. package/dist/components/layer-table2.js +20 -23
  20. package/dist/esm/calcite-flow_5.entry.js +3 -1
  21. package/dist/esm/card-manager_3.entry.js +20 -23
  22. package/dist/esm/crowdsource-reporter.entry.js +12 -3
  23. package/dist/esm/{downloadUtils-20d22198.js → downloadUtils-d5928e55.js} +5 -3
  24. package/dist/esm/{index.es-8b85f68d.js → index.es-a1725c19.js} +1 -1
  25. package/dist/esm/loader.js +1 -1
  26. package/dist/esm/map-select-tools_3.entry.js +1 -1
  27. package/dist/esm/public-notification.entry.js +1 -1
  28. package/dist/esm/solutions-components.js +1 -1
  29. package/dist/solutions-components/demos/crowdsource-reporter.html +5 -2
  30. package/dist/solutions-components/{p-f6536eae.js → p-12fc82a9.js} +2 -2
  31. package/dist/solutions-components/{p-2283ae14.entry.js → p-3e88e0bd.entry.js} +1 -1
  32. package/dist/solutions-components/p-52945707.entry.js +6 -0
  33. package/dist/solutions-components/{p-59c6f63f.entry.js → p-6c86a392.entry.js} +2 -2
  34. package/dist/solutions-components/{p-17e328bb.js → p-7f374ec7.js} +1 -1
  35. package/dist/solutions-components/{p-69a1df0f.entry.js → p-ac9c29da.entry.js} +1 -1
  36. package/dist/solutions-components/p-c6af6407.entry.js +6 -0
  37. package/dist/solutions-components/solutions-components.esm.js +1 -1
  38. package/dist/solutions-components/utils/downloadUtils.ts +4 -2
  39. package/dist/types/components/crowdsource-reporter/crowdsource-reporter.d.ts +1 -0
  40. package/dist/types/components/layer-list/layer-list.d.ts +1 -0
  41. package/dist/types/components/layer-table/layer-table.d.ts +4 -4
  42. package/package.json +1 -1
  43. package/dist/solutions-components/p-207fd378.entry.js +0 -6
  44. package/dist/solutions-components/p-aecf92f4.entry.js +0 -6
@@ -25,6 +25,8 @@ import { getAllLayers, getFeatureLayerView, getLayerOrTable, highlightFeatures }
25
25
  import { queryFeaturesByID } from "../../utils/queryUtils";
26
26
  export class CrowdsourceReporter {
27
27
  constructor() {
28
+ //HARDCODED IN EN
29
+ this._noLayerToDisplayErrorMsg = "Web map does not contain any editable layers.";
28
30
  this.description = undefined;
29
31
  this.isMobile = undefined;
30
32
  this.enableAnonymousAccess = undefined;
@@ -170,7 +172,7 @@ export class CrowdsourceReporter {
170
172
  */
171
173
  getLayerListFlowItem() {
172
174
  return (h("calcite-flow-item", { collapsed: this.isMobile && this._sidePanelCollapsed, heading: this.reportsHeader }, this.isMobile && this.getActionToExpandCollapsePanel(), this._hasValidLayers && this.enableNewReports &&
173
- h("calcite-button", { appearance: "solid", onClick: this.navigateToChooseCategory.bind(this), slot: "footer", width: "full" }, this.reportButtonText), h("calcite-panel", { "full-height": true, "full-width": true }, 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 }))));
175
+ h("calcite-button", { appearance: "solid", onClick: this.navigateToChooseCategory.bind(this), slot: "footer", width: "full" }, this.reportButtonText), h("calcite-panel", { "full-height": true, "full-width": true }, h("layer-list", { class: "height-full", layers: this.layers, mapView: this.mapView, noLayerErrorMsg: this._noLayerToDisplayErrorMsg, onLayerSelect: this.displayFeaturesList.bind(this), onLayersListLoaded: this.layerListLoaded.bind(this), ref: el => this._layerList = el, showFeatureCount: true, showNextIcon: true }))));
174
176
  }
175
177
  /**
176
178
  * Get the layer list for creating a report
@@ -178,7 +180,7 @@ export class CrowdsourceReporter {
178
180
  * @protected
179
181
  */
180
182
  getChooseCategoryFlowItem() {
181
- return (h("calcite-flow-item", { collapsed: this.isMobile && this._sidePanelCollapsed, heading: this._translations.createReportHeader, onCalciteFlowItemBack: this.backFromSelectedPanel.bind(this) }, this.isMobile && this.getActionToExpandCollapsePanel(), h("div", { class: "width-full", slot: "footer" }, h("calcite-button", { appearance: "solid", class: "footer-top-button footer-button", disabled: !this._selectedLayerId, onClick: this.navigateToCreateFeature.bind(this), width: "full" }, this._translations.next), h("calcite-button", { appearance: "outline", class: "footer-button", onClick: this.backFromSelectedPanel.bind(this), width: "full" }, this._translations.cancel)), h("calcite-panel", { "full-height": true, "full-width": true }, h("calcite-notice", { class: "notice-msg", icon: "lightbulb", kind: "success", open: true }, h("div", { slot: "message" }, this._translations.chooseCategoryMsg)), h("layer-list", { class: "height-full", layers: this.layers, mapView: this.mapView, noLayerErrorMsg: this._translations.noLayerToDisplayErrorMsg, onLayerSelect: this.highlightSelectedLayer.bind(this), showFeatureCount: false, showNextIcon: false }))));
183
+ return (h("calcite-flow-item", { collapsed: this.isMobile && this._sidePanelCollapsed, heading: this._translations.createReportHeader, onCalciteFlowItemBack: this.backFromSelectedPanel.bind(this) }, this.isMobile && this.getActionToExpandCollapsePanel(), h("div", { class: "width-full", slot: "footer" }, h("calcite-button", { appearance: "solid", class: "footer-top-button footer-button", disabled: !this._selectedLayerId, onClick: this.navigateToCreateFeature.bind(this), width: "full" }, this._translations.next), h("calcite-button", { appearance: "outline", class: "footer-button", onClick: this.backFromSelectedPanel.bind(this), width: "full" }, this._translations.cancel)), h("calcite-panel", { "full-height": true, "full-width": true }, h("calcite-notice", { class: "notice-msg", icon: "lightbulb", kind: "success", open: true }, h("div", { slot: "message" }, this._translations.chooseCategoryMsg)), h("layer-list", { class: "height-full", layers: this.layers, mapView: this.mapView, noLayerErrorMsg: this._noLayerToDisplayErrorMsg, onLayerSelect: this.highlightSelectedLayer.bind(this), showFeatureCount: false, showNextIcon: false }))));
182
184
  }
183
185
  /**
184
186
  * Get Feature create form of the selected feature layer
@@ -524,11 +526,17 @@ export class CrowdsourceReporter {
524
526
  * @protected
525
527
  */
526
528
  async loadFeatureFromURLParams() {
529
+ if (this.center && this.level) {
530
+ await this.mapView.goTo({
531
+ center: this.center.split(';').map(Number),
532
+ zoom: this.level
533
+ });
534
+ }
527
535
  if (this.layerId && this.objectId) {
528
536
  const layer = await getLayerOrTable(this.mapView, this.layerId);
529
537
  if (layer) {
530
538
  // only query if we have some ids...query with no ids will result in all features being returned
531
- const featureSet = await queryFeaturesByID([Number(this.objectId)], layer, [], false, this.mapView.spatialReference);
539
+ const featureSet = await queryFeaturesByID([Number(this.objectId)], layer, [], true, this.mapView.spatialReference);
532
540
  if (featureSet.length) {
533
541
  //update the selectedFeature
534
542
  this._selectedFeature = featureSet;
@@ -540,6 +548,7 @@ export class CrowdsourceReporter {
540
548
  else {
541
549
  this._flowItems = [...this._flowItems];
542
550
  }
551
+ await this.highlightOnMap(featureSet[0]);
543
552
  }
544
553
  }
545
554
  }
@@ -24,6 +24,8 @@ import { getLocaleComponentStrings } from "../../utils/locale";
24
24
  import { formatNumber } from "../../utils/languageUtil";
25
25
  export class LayerList {
26
26
  constructor() {
27
+ //HARDCODED IN EN
28
+ this._noLayerToDisplayErrorMsg = "Web map does not contain any editable layers.";
27
29
  this.mapView = undefined;
28
30
  this.layers = undefined;
29
31
  this.noLayerErrorMsg = undefined;
@@ -76,7 +78,7 @@ export class LayerList {
76
78
  */
77
79
  render() {
78
80
  return (h(Fragment, null, this._isLoading && h("calcite-loader", { label: "", scale: "m" }), !this._isLoading && this.mapView && this._noLayersToDisplay &&
79
- h("calcite-notice", { class: "error-msg", icon: "layers-reference", kind: "danger", open: true }, h("div", { slot: "title" }, this._translations.error), h("div", { slot: "message" }, this.noLayerErrorMsg ? this.noLayerErrorMsg : this._translations.noLayerToDisplayErrorMsg)), !this._isLoading && this.mapView &&
81
+ h("calcite-notice", { class: "error-msg", icon: "layers-reference", kind: "danger", open: true }, h("div", { slot: "title" }, this._translations.error), h("div", { slot: "message" }, this.noLayerErrorMsg ? this.noLayerErrorMsg : this._noLayerToDisplayErrorMsg)), !this._isLoading && this.mapView &&
80
82
  h("calcite-list", { "selection-appearance": "border", "selection-mode": this.showNextIcon ? "none" : "single-persist" }, this.renderLayerList())));
81
83
  }
82
84
  //--------------------------------------------------------------------------
@@ -124,6 +124,16 @@ export class LayerTable {
124
124
  this._table.editingEnabled = this._editEnabled && this.enableInlineEdit;
125
125
  }
126
126
  }
127
+ /**
128
+ * Update the toolbar when the share button is enabled/disabled
129
+ */
130
+ enableShareWatchHandler() {
131
+ // this should be caught by component did render and is when I test locally
132
+ // however have had reported case where it is not somehow on devext so adding explicit check here
133
+ if (this._toolbar) {
134
+ this._updateToolbar();
135
+ }
136
+ }
127
137
  /**
128
138
  * watch for changes to the list of controls that will currently fit in the display
129
139
  */
@@ -149,17 +159,6 @@ export class LayerTable {
149
159
  this._initToolInfos();
150
160
  }
151
161
  }
152
- /**
153
- * watch for changes in map info and recheck the tool infos
154
- */
155
- async mapInfoWatchHandler() {
156
- var _a;
157
- if (((_a = this._toolInfos) === null || _a === void 0 ? void 0 : _a.length) > 0) {
158
- this._initToolInfos();
159
- }
160
- this._initLayerExpressions();
161
- this._resetColumnTemplates();
162
- }
163
162
  /**
164
163
  * watch for changes in map view and get the first layer
165
164
  */
@@ -634,7 +633,7 @@ export class LayerTable {
634
633
  this._setControlsThatFit(controlsThatFit, skipControls);
635
634
  }
636
635
  }
637
- }, 5);
636
+ }, 250);
638
637
  }
639
638
  }
640
639
  /**
@@ -859,7 +858,6 @@ export class LayerTable {
859
858
  },
860
859
  container: node
861
860
  });
862
- this._table.columnPerformanceModeEnabled = false;
863
861
  });
864
862
  this._initColumnsInfo();
865
863
  this._checkEditEnabled();
@@ -992,19 +990,17 @@ export class LayerTable {
992
990
  if (!this._table) {
993
991
  await this._getTable(this._tableNode, columnTemplates);
994
992
  }
995
- else if (columnTemplates) {
996
- this._table.tableTemplate.columnTemplates = columnTemplates;
997
- }
998
993
  this._table.layer = this._layer;
999
994
  this._table.view = this.mapView;
1000
995
  this._checkEditEnabled();
1001
996
  this._table.editingEnabled = this._editEnabled && this.enableInlineEdit;
1002
997
  this._initToolInfos();
1003
- await this._table.when(async () => {
998
+ await this.reactiveUtils.once(() => this._table.state === "loaded")
999
+ .then(async () => {
1004
1000
  var _a, _b;
1005
1001
  this._table.highlightIds.removeAll();
1006
1002
  this._table.clearSelectionFilter();
1007
- this._initColumnsInfo();
1003
+ this._resetColumnTemplates();
1008
1004
  if (!this._defaultOidHonored && ((_a = this.defaultOid) === null || _a === void 0 ? void 0 : _a.length) > 0 && this.defaultOid[0] > -1) {
1009
1005
  this._selectDefaultFeature(this.defaultOid);
1010
1006
  this._defaultOidHonored = true;
@@ -1022,10 +1018,11 @@ export class LayerTable {
1022
1018
  this._filterActive = true;
1023
1019
  this._defaultFilterHonored = true;
1024
1020
  }
1021
+ this._showOnlySelected = false;
1022
+ this._sortActive = false;
1023
+ await this._sortTable();
1024
+ this._updateToolbar();
1025
1025
  });
1026
- this._showOnlySelected = false;
1027
- this._sortActive = false;
1028
- await this._sortTable();
1029
1026
  }
1030
1027
  /**
1031
1028
  * Store the column names and current hidden status to support show/hide of columns
@@ -1798,15 +1795,15 @@ export class LayerTable {
1798
1795
  }, {
1799
1796
  "propName": "enableInlineEdit",
1800
1797
  "methodName": "enableInlineEditWatchHandler"
1798
+ }, {
1799
+ "propName": "enableShare",
1800
+ "methodName": "enableShareWatchHandler"
1801
1801
  }, {
1802
1802
  "propName": "_controlsThatFit",
1803
1803
  "methodName": "_controlsThatFitWatchHandler"
1804
1804
  }, {
1805
1805
  "propName": "isMobile",
1806
1806
  "methodName": "isMobileWatchHandler"
1807
- }, {
1808
- "propName": "mapInfo",
1809
- "methodName": "mapInfoWatchHandler"
1810
1807
  }, {
1811
1808
  "propName": "mapView",
1812
1809
  "methodName": "mapViewWatchHandler"
@@ -115,8 +115,11 @@
115
115
  break;
116
116
  case 'oid':
117
117
  demo.objectId = value;
118
- case 'center' || 'level':
119
- demo[key] = value;
118
+ case 'center':
119
+ demo.center = value;
120
+ break;
121
+ case 'level':
122
+ demo.level = value;
120
123
  break;
121
124
  }
122
125
  }
@@ -606,6 +606,9 @@ export function _prepareAttributeValue(attributeValue, attributeType, attributeD
606
606
  * @returns Promise resolving when function is done
607
607
  */
608
608
  export async function _prepareLabels(webmap, layer, ids, formatUsingLayerPopup = true, includeHeaderNames = false, fields = [], useFieldAliasNames = false) {
609
+ if (fields.length === 0) {
610
+ fields = layer.fields.map(f => f.name.toLowerCase());
611
+ }
609
612
  // Get the label formatting, if any
610
613
  const labelFormatProps = await _getLabelFormat(webmap, layer, formatUsingLayerPopup);
611
614
  // Because the label may actually come from a related layer, we'll use the layer that comes back from _getLabelFormat.
@@ -664,8 +667,7 @@ export async function _prepareLabels(webmap, layer, ids, formatUsingLayerPopup =
664
667
  }
665
668
  else {
666
669
  // Get the features to export
667
- const outFields = fields.length > 0 ? fields : undefined;
668
- featureSet = await queryFeaturesByID(ids, featureLayer, [], false, undefined, outFields);
670
+ featureSet = await queryFeaturesByID(ids, featureLayer, [], false, undefined, fields);
669
671
  }
670
672
  // Get field data types. Do we have any domain-based fields?
671
673
  const attributeOrigNames = {};
@@ -846,6 +846,9 @@ export async function _prepareLabels(
846
846
  fields = [],
847
847
  useFieldAliasNames = false
848
848
  ): Promise<string[][]> {
849
+ if (fields.length === 0) {
850
+ fields = layer.fields.map(f => f.name.toLowerCase())
851
+ }
849
852
  // Get the label formatting, if any
850
853
  const labelFormatProps: ILabelFormatProps = await _getLabelFormat(webmap, layer, formatUsingLayerPopup);
851
854
 
@@ -915,8 +918,7 @@ export async function _prepareLabels(
915
918
 
916
919
  } else {
917
920
  // Get the features to export
918
- const outFields = fields.length > 0 ? fields : undefined;
919
- featureSet = await queryFeaturesByID(ids, featureLayer, [], false, undefined, outFields);
921
+ featureSet = await queryFeaturesByID(ids, featureLayer, [], false, undefined, fields);
920
922
  }
921
923
 
922
924
  // Get field data types. Do we have any domain-based fields?
@@ -47,6 +47,8 @@ const CrowdsourceReporter$1 = /*@__PURE__*/ proxyCustomElement(class Crowdsource
47
47
  super();
48
48
  this.__registerHost();
49
49
  this.togglePanel = createEvent(this, "togglePanel", 7);
50
+ //HARDCODED IN EN
51
+ this._noLayerToDisplayErrorMsg = "Web map does not contain any editable layers.";
50
52
  this.description = undefined;
51
53
  this.isMobile = undefined;
52
54
  this.enableAnonymousAccess = undefined;
@@ -192,7 +194,7 @@ const CrowdsourceReporter$1 = /*@__PURE__*/ proxyCustomElement(class Crowdsource
192
194
  */
193
195
  getLayerListFlowItem() {
194
196
  return (h("calcite-flow-item", { collapsed: this.isMobile && this._sidePanelCollapsed, heading: this.reportsHeader }, this.isMobile && this.getActionToExpandCollapsePanel(), this._hasValidLayers && this.enableNewReports &&
195
- h("calcite-button", { appearance: "solid", onClick: this.navigateToChooseCategory.bind(this), slot: "footer", width: "full" }, this.reportButtonText), h("calcite-panel", { "full-height": true, "full-width": true }, 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 }))));
197
+ h("calcite-button", { appearance: "solid", onClick: this.navigateToChooseCategory.bind(this), slot: "footer", width: "full" }, this.reportButtonText), h("calcite-panel", { "full-height": true, "full-width": true }, h("layer-list", { class: "height-full", layers: this.layers, mapView: this.mapView, noLayerErrorMsg: this._noLayerToDisplayErrorMsg, onLayerSelect: this.displayFeaturesList.bind(this), onLayersListLoaded: this.layerListLoaded.bind(this), ref: el => this._layerList = el, showFeatureCount: true, showNextIcon: true }))));
196
198
  }
197
199
  /**
198
200
  * Get the layer list for creating a report
@@ -200,7 +202,7 @@ const CrowdsourceReporter$1 = /*@__PURE__*/ proxyCustomElement(class Crowdsource
200
202
  * @protected
201
203
  */
202
204
  getChooseCategoryFlowItem() {
203
- return (h("calcite-flow-item", { collapsed: this.isMobile && this._sidePanelCollapsed, heading: this._translations.createReportHeader, onCalciteFlowItemBack: this.backFromSelectedPanel.bind(this) }, this.isMobile && this.getActionToExpandCollapsePanel(), h("div", { class: "width-full", slot: "footer" }, h("calcite-button", { appearance: "solid", class: "footer-top-button footer-button", disabled: !this._selectedLayerId, onClick: this.navigateToCreateFeature.bind(this), width: "full" }, this._translations.next), h("calcite-button", { appearance: "outline", class: "footer-button", onClick: this.backFromSelectedPanel.bind(this), width: "full" }, this._translations.cancel)), h("calcite-panel", { "full-height": true, "full-width": true }, h("calcite-notice", { class: "notice-msg", icon: "lightbulb", kind: "success", open: true }, h("div", { slot: "message" }, this._translations.chooseCategoryMsg)), h("layer-list", { class: "height-full", layers: this.layers, mapView: this.mapView, noLayerErrorMsg: this._translations.noLayerToDisplayErrorMsg, onLayerSelect: this.highlightSelectedLayer.bind(this), showFeatureCount: false, showNextIcon: false }))));
205
+ return (h("calcite-flow-item", { collapsed: this.isMobile && this._sidePanelCollapsed, heading: this._translations.createReportHeader, onCalciteFlowItemBack: this.backFromSelectedPanel.bind(this) }, this.isMobile && this.getActionToExpandCollapsePanel(), h("div", { class: "width-full", slot: "footer" }, h("calcite-button", { appearance: "solid", class: "footer-top-button footer-button", disabled: !this._selectedLayerId, onClick: this.navigateToCreateFeature.bind(this), width: "full" }, this._translations.next), h("calcite-button", { appearance: "outline", class: "footer-button", onClick: this.backFromSelectedPanel.bind(this), width: "full" }, this._translations.cancel)), h("calcite-panel", { "full-height": true, "full-width": true }, h("calcite-notice", { class: "notice-msg", icon: "lightbulb", kind: "success", open: true }, h("div", { slot: "message" }, this._translations.chooseCategoryMsg)), h("layer-list", { class: "height-full", layers: this.layers, mapView: this.mapView, noLayerErrorMsg: this._noLayerToDisplayErrorMsg, onLayerSelect: this.highlightSelectedLayer.bind(this), showFeatureCount: false, showNextIcon: false }))));
204
206
  }
205
207
  /**
206
208
  * Get Feature create form of the selected feature layer
@@ -546,11 +548,17 @@ const CrowdsourceReporter$1 = /*@__PURE__*/ proxyCustomElement(class Crowdsource
546
548
  * @protected
547
549
  */
548
550
  async loadFeatureFromURLParams() {
551
+ if (this.center && this.level) {
552
+ await this.mapView.goTo({
553
+ center: this.center.split(';').map(Number),
554
+ zoom: this.level
555
+ });
556
+ }
549
557
  if (this.layerId && this.objectId) {
550
558
  const layer = await getLayerOrTable(this.mapView, this.layerId);
551
559
  if (layer) {
552
560
  // only query if we have some ids...query with no ids will result in all features being returned
553
- const featureSet = await queryFeaturesByID([Number(this.objectId)], layer, [], false, this.mapView.spatialReference);
561
+ const featureSet = await queryFeaturesByID([Number(this.objectId)], layer, [], true, this.mapView.spatialReference);
554
562
  if (featureSet.length) {
555
563
  //update the selectedFeature
556
564
  this._selectedFeature = featureSet;
@@ -562,6 +570,7 @@ const CrowdsourceReporter$1 = /*@__PURE__*/ proxyCustomElement(class Crowdsource
562
570
  else {
563
571
  this._flowItems = [...this._flowItems];
564
572
  }
573
+ await this.highlightOnMap(featureSet[0]);
565
574
  }
566
575
  }
567
576
  }
@@ -2925,6 +2925,9 @@ function _prepareAttributeValue(attributeValue, attributeType, attributeDomain,
2925
2925
  * @returns Promise resolving when function is done
2926
2926
  */
2927
2927
  async function _prepareLabels(webmap, layer, ids, formatUsingLayerPopup = true, includeHeaderNames = false, fields = [], useFieldAliasNames = false) {
2928
+ if (fields.length === 0) {
2929
+ fields = layer.fields.map(f => f.name.toLowerCase());
2930
+ }
2928
2931
  // Get the label formatting, if any
2929
2932
  const labelFormatProps = await _getLabelFormat(webmap, layer, formatUsingLayerPopup);
2930
2933
  // Because the label may actually come from a related layer, we'll use the layer that comes back from _getLabelFormat.
@@ -2983,8 +2986,7 @@ async function _prepareLabels(webmap, layer, ids, formatUsingLayerPopup = true,
2983
2986
  }
2984
2987
  else {
2985
2988
  // Get the features to export
2986
- const outFields = fields.length > 0 ? fields : undefined;
2987
- featureSet = await queryFeaturesByID(ids, featureLayer, [], false, undefined, outFields);
2989
+ featureSet = await queryFeaturesByID(ids, featureLayer, [], false, undefined, fields);
2988
2990
  }
2989
2991
  // Get field data types. Do we have any domain-based fields?
2990
2992
  const attributeOrigNames = {};
@@ -27,6 +27,8 @@ const LayerList = /*@__PURE__*/ proxyCustomElement(class LayerList extends HTMLE
27
27
  this.__registerHost();
28
28
  this.layerSelect = createEvent(this, "layerSelect", 7);
29
29
  this.layersListLoaded = createEvent(this, "layersListLoaded", 7);
30
+ //HARDCODED IN EN
31
+ this._noLayerToDisplayErrorMsg = "Web map does not contain any editable layers.";
30
32
  this.mapView = undefined;
31
33
  this.layers = undefined;
32
34
  this.noLayerErrorMsg = undefined;
@@ -79,7 +81,7 @@ const LayerList = /*@__PURE__*/ proxyCustomElement(class LayerList extends HTMLE
79
81
  */
80
82
  render() {
81
83
  return (h(Fragment, null, this._isLoading && h("calcite-loader", { label: "", scale: "m" }), !this._isLoading && this.mapView && this._noLayersToDisplay &&
82
- h("calcite-notice", { class: "error-msg", icon: "layers-reference", kind: "danger", open: true }, h("div", { slot: "title" }, this._translations.error), h("div", { slot: "message" }, this.noLayerErrorMsg ? this.noLayerErrorMsg : this._translations.noLayerToDisplayErrorMsg)), !this._isLoading && this.mapView &&
84
+ h("calcite-notice", { class: "error-msg", icon: "layers-reference", kind: "danger", open: true }, h("div", { slot: "title" }, this._translations.error), h("div", { slot: "message" }, this.noLayerErrorMsg ? this.noLayerErrorMsg : this._noLayerToDisplayErrorMsg)), !this._isLoading && this.mapView &&
83
85
  h("calcite-list", { "selection-appearance": "border", "selection-mode": this.showNextIcon ? "none" : "single-persist" }, this.renderLayerList())));
84
86
  }
85
87
  //--------------------------------------------------------------------------
@@ -153,6 +153,16 @@ const LayerTable = /*@__PURE__*/ proxyCustomElement(class LayerTable extends HTM
153
153
  this._table.editingEnabled = this._editEnabled && this.enableInlineEdit;
154
154
  }
155
155
  }
156
+ /**
157
+ * Update the toolbar when the share button is enabled/disabled
158
+ */
159
+ enableShareWatchHandler() {
160
+ // this should be caught by component did render and is when I test locally
161
+ // however have had reported case where it is not somehow on devext so adding explicit check here
162
+ if (this._toolbar) {
163
+ this._updateToolbar();
164
+ }
165
+ }
156
166
  /**
157
167
  * watch for changes to the list of controls that will currently fit in the display
158
168
  */
@@ -178,17 +188,6 @@ const LayerTable = /*@__PURE__*/ proxyCustomElement(class LayerTable extends HTM
178
188
  this._initToolInfos();
179
189
  }
180
190
  }
181
- /**
182
- * watch for changes in map info and recheck the tool infos
183
- */
184
- async mapInfoWatchHandler() {
185
- var _a;
186
- if (((_a = this._toolInfos) === null || _a === void 0 ? void 0 : _a.length) > 0) {
187
- this._initToolInfos();
188
- }
189
- this._initLayerExpressions();
190
- this._resetColumnTemplates();
191
- }
192
191
  /**
193
192
  * watch for changes in map view and get the first layer
194
193
  */
@@ -663,7 +662,7 @@ const LayerTable = /*@__PURE__*/ proxyCustomElement(class LayerTable extends HTM
663
662
  this._setControlsThatFit(controlsThatFit, skipControls);
664
663
  }
665
664
  }
666
- }, 5);
665
+ }, 250);
667
666
  }
668
667
  }
669
668
  /**
@@ -888,7 +887,6 @@ const LayerTable = /*@__PURE__*/ proxyCustomElement(class LayerTable extends HTM
888
887
  },
889
888
  container: node
890
889
  });
891
- this._table.columnPerformanceModeEnabled = false;
892
890
  });
893
891
  this._initColumnsInfo();
894
892
  this._checkEditEnabled();
@@ -1021,19 +1019,17 @@ const LayerTable = /*@__PURE__*/ proxyCustomElement(class LayerTable extends HTM
1021
1019
  if (!this._table) {
1022
1020
  await this._getTable(this._tableNode, columnTemplates);
1023
1021
  }
1024
- else if (columnTemplates) {
1025
- this._table.tableTemplate.columnTemplates = columnTemplates;
1026
- }
1027
1022
  this._table.layer = this._layer;
1028
1023
  this._table.view = this.mapView;
1029
1024
  this._checkEditEnabled();
1030
1025
  this._table.editingEnabled = this._editEnabled && this.enableInlineEdit;
1031
1026
  this._initToolInfos();
1032
- await this._table.when(async () => {
1027
+ await this.reactiveUtils.once(() => this._table.state === "loaded")
1028
+ .then(async () => {
1033
1029
  var _a, _b;
1034
1030
  this._table.highlightIds.removeAll();
1035
1031
  this._table.clearSelectionFilter();
1036
- this._initColumnsInfo();
1032
+ this._resetColumnTemplates();
1037
1033
  if (!this._defaultOidHonored && ((_a = this.defaultOid) === null || _a === void 0 ? void 0 : _a.length) > 0 && this.defaultOid[0] > -1) {
1038
1034
  this._selectDefaultFeature(this.defaultOid);
1039
1035
  this._defaultOidHonored = true;
@@ -1051,10 +1047,11 @@ const LayerTable = /*@__PURE__*/ proxyCustomElement(class LayerTable extends HTM
1051
1047
  this._filterActive = true;
1052
1048
  this._defaultFilterHonored = true;
1053
1049
  }
1050
+ this._showOnlySelected = false;
1051
+ this._sortActive = false;
1052
+ await this._sortTable();
1053
+ this._updateToolbar();
1054
1054
  });
1055
- this._showOnlySelected = false;
1056
- this._sortActive = false;
1057
- await this._sortTable();
1058
1055
  }
1059
1056
  /**
1060
1057
  * Store the column names and current hidden status to support show/hide of columns
@@ -1462,9 +1459,9 @@ const LayerTable = /*@__PURE__*/ proxyCustomElement(class LayerTable extends HTM
1462
1459
  static get watchers() { return {
1463
1460
  "enableCSV": ["enableCSVWatchHandler"],
1464
1461
  "enableInlineEdit": ["enableInlineEditWatchHandler"],
1462
+ "enableShare": ["enableShareWatchHandler"],
1465
1463
  "_controlsThatFit": ["_controlsThatFitWatchHandler"],
1466
1464
  "isMobile": ["isMobileWatchHandler"],
1467
- "mapInfo": ["mapInfoWatchHandler"],
1468
1465
  "mapView": ["mapViewWatchHandler"],
1469
1466
  "_layer": ["_layerWatchHandler"],
1470
1467
  "selectedIds": ["selectedIdsWatchHandler"],
@@ -1504,9 +1501,9 @@ const LayerTable = /*@__PURE__*/ proxyCustomElement(class LayerTable extends HTM
1504
1501
  }, [[8, "selectionChanged", "selectionChanged"], [8, "editsComplete", "editsComplete"], [8, "levelChanged", "levelChanged"], [8, "noLayersFound", "noLayersFound"]], {
1505
1502
  "enableCSV": ["enableCSVWatchHandler"],
1506
1503
  "enableInlineEdit": ["enableInlineEditWatchHandler"],
1504
+ "enableShare": ["enableShareWatchHandler"],
1507
1505
  "_controlsThatFit": ["_controlsThatFitWatchHandler"],
1508
1506
  "isMobile": ["isMobileWatchHandler"],
1509
- "mapInfo": ["mapInfoWatchHandler"],
1510
1507
  "mapView": ["mapViewWatchHandler"],
1511
1508
  "_layer": ["_layerWatchHandler"],
1512
1509
  "selectedIds": ["selectedIdsWatchHandler"],
@@ -767,6 +767,8 @@ const LayerList = class {
767
767
  registerInstance(this, hostRef);
768
768
  this.layerSelect = createEvent(this, "layerSelect", 7);
769
769
  this.layersListLoaded = createEvent(this, "layersListLoaded", 7);
770
+ //HARDCODED IN EN
771
+ this._noLayerToDisplayErrorMsg = "Web map does not contain any editable layers.";
770
772
  this.mapView = undefined;
771
773
  this.layers = undefined;
772
774
  this.noLayerErrorMsg = undefined;
@@ -819,7 +821,7 @@ const LayerList = class {
819
821
  */
820
822
  render() {
821
823
  return (h(Fragment, null, this._isLoading && h("calcite-loader", { label: "", scale: "m" }), !this._isLoading && this.mapView && this._noLayersToDisplay &&
822
- h("calcite-notice", { class: "error-msg", icon: "layers-reference", kind: "danger", open: true }, h("div", { slot: "title" }, this._translations.error), h("div", { slot: "message" }, this.noLayerErrorMsg ? this.noLayerErrorMsg : this._translations.noLayerToDisplayErrorMsg)), !this._isLoading && this.mapView &&
824
+ h("calcite-notice", { class: "error-msg", icon: "layers-reference", kind: "danger", open: true }, h("div", { slot: "title" }, this._translations.error), h("div", { slot: "message" }, this.noLayerErrorMsg ? this.noLayerErrorMsg : this._noLayerToDisplayErrorMsg)), !this._isLoading && this.mapView &&
823
825
  h("calcite-list", { "selection-appearance": "border", "selection-mode": this.showNextIcon ? "none" : "single-persist" }, this.renderLayerList())));
824
826
  }
825
827
  //--------------------------------------------------------------------------
@@ -6,7 +6,7 @@
6
6
  import { r as registerInstance, h, H as Host, g as getElement, c as createEvent } from './index-164d485a.js';
7
7
  import { g as getLocaleComponentStrings, l as loadModules } from './locale-25a5ae3e.js';
8
8
  import { q as queryFeaturesByID, g as getLayerOrTable, c as goToSelection, e as queryAllIds, f as queryFeatureIds, i as queryFeaturesByGlobalID } from './mapViewUtils-a177d4f9.js';
9
- import { d as downloadCSV } from './downloadUtils-20d22198.js';
9
+ import { d as downloadCSV } from './downloadUtils-d5928e55.js';
10
10
  import './esri-loader-eda07632.js';
11
11
  import './_commonjsHelpers-d5f9d613.js';
12
12
  import './interfaces-586e863c.js';
@@ -205,6 +205,16 @@ const LayerTable = class {
205
205
  this._table.editingEnabled = this._editEnabled && this.enableInlineEdit;
206
206
  }
207
207
  }
208
+ /**
209
+ * Update the toolbar when the share button is enabled/disabled
210
+ */
211
+ enableShareWatchHandler() {
212
+ // this should be caught by component did render and is when I test locally
213
+ // however have had reported case where it is not somehow on devext so adding explicit check here
214
+ if (this._toolbar) {
215
+ this._updateToolbar();
216
+ }
217
+ }
208
218
  /**
209
219
  * watch for changes to the list of controls that will currently fit in the display
210
220
  */
@@ -230,17 +240,6 @@ const LayerTable = class {
230
240
  this._initToolInfos();
231
241
  }
232
242
  }
233
- /**
234
- * watch for changes in map info and recheck the tool infos
235
- */
236
- async mapInfoWatchHandler() {
237
- var _a;
238
- if (((_a = this._toolInfos) === null || _a === void 0 ? void 0 : _a.length) > 0) {
239
- this._initToolInfos();
240
- }
241
- this._initLayerExpressions();
242
- this._resetColumnTemplates();
243
- }
244
243
  /**
245
244
  * watch for changes in map view and get the first layer
246
245
  */
@@ -715,7 +714,7 @@ const LayerTable = class {
715
714
  this._setControlsThatFit(controlsThatFit, skipControls);
716
715
  }
717
716
  }
718
- }, 5);
717
+ }, 250);
719
718
  }
720
719
  }
721
720
  /**
@@ -940,7 +939,6 @@ const LayerTable = class {
940
939
  },
941
940
  container: node
942
941
  });
943
- this._table.columnPerformanceModeEnabled = false;
944
942
  });
945
943
  this._initColumnsInfo();
946
944
  this._checkEditEnabled();
@@ -1073,19 +1071,17 @@ const LayerTable = class {
1073
1071
  if (!this._table) {
1074
1072
  await this._getTable(this._tableNode, columnTemplates);
1075
1073
  }
1076
- else if (columnTemplates) {
1077
- this._table.tableTemplate.columnTemplates = columnTemplates;
1078
- }
1079
1074
  this._table.layer = this._layer;
1080
1075
  this._table.view = this.mapView;
1081
1076
  this._checkEditEnabled();
1082
1077
  this._table.editingEnabled = this._editEnabled && this.enableInlineEdit;
1083
1078
  this._initToolInfos();
1084
- await this._table.when(async () => {
1079
+ await this.reactiveUtils.once(() => this._table.state === "loaded")
1080
+ .then(async () => {
1085
1081
  var _a, _b;
1086
1082
  this._table.highlightIds.removeAll();
1087
1083
  this._table.clearSelectionFilter();
1088
- this._initColumnsInfo();
1084
+ this._resetColumnTemplates();
1089
1085
  if (!this._defaultOidHonored && ((_a = this.defaultOid) === null || _a === void 0 ? void 0 : _a.length) > 0 && this.defaultOid[0] > -1) {
1090
1086
  this._selectDefaultFeature(this.defaultOid);
1091
1087
  this._defaultOidHonored = true;
@@ -1103,10 +1099,11 @@ const LayerTable = class {
1103
1099
  this._filterActive = true;
1104
1100
  this._defaultFilterHonored = true;
1105
1101
  }
1102
+ this._showOnlySelected = false;
1103
+ this._sortActive = false;
1104
+ await this._sortTable();
1105
+ this._updateToolbar();
1106
1106
  });
1107
- this._showOnlySelected = false;
1108
- this._sortActive = false;
1109
- await this._sortTable();
1110
1107
  }
1111
1108
  /**
1112
1109
  * Store the column names and current hidden status to support show/hide of columns
@@ -1514,9 +1511,9 @@ const LayerTable = class {
1514
1511
  static get watchers() { return {
1515
1512
  "enableCSV": ["enableCSVWatchHandler"],
1516
1513
  "enableInlineEdit": ["enableInlineEditWatchHandler"],
1514
+ "enableShare": ["enableShareWatchHandler"],
1517
1515
  "_controlsThatFit": ["_controlsThatFitWatchHandler"],
1518
1516
  "isMobile": ["isMobileWatchHandler"],
1519
- "mapInfo": ["mapInfoWatchHandler"],
1520
1517
  "mapView": ["mapViewWatchHandler"],
1521
1518
  "_layer": ["_layerWatchHandler"],
1522
1519
  "selectedIds": ["selectedIdsWatchHandler"],
@@ -16,6 +16,8 @@ const CrowdsourceReporter = class {
16
16
  constructor(hostRef) {
17
17
  registerInstance(this, hostRef);
18
18
  this.togglePanel = createEvent(this, "togglePanel", 7);
19
+ //HARDCODED IN EN
20
+ this._noLayerToDisplayErrorMsg = "Web map does not contain any editable layers.";
19
21
  this.description = undefined;
20
22
  this.isMobile = undefined;
21
23
  this.enableAnonymousAccess = undefined;
@@ -161,7 +163,7 @@ const CrowdsourceReporter = class {
161
163
  */
162
164
  getLayerListFlowItem() {
163
165
  return (h("calcite-flow-item", { collapsed: this.isMobile && this._sidePanelCollapsed, heading: this.reportsHeader }, this.isMobile && this.getActionToExpandCollapsePanel(), this._hasValidLayers && this.enableNewReports &&
164
- h("calcite-button", { appearance: "solid", onClick: this.navigateToChooseCategory.bind(this), slot: "footer", width: "full" }, this.reportButtonText), h("calcite-panel", { "full-height": true, "full-width": true }, 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 }))));
166
+ h("calcite-button", { appearance: "solid", onClick: this.navigateToChooseCategory.bind(this), slot: "footer", width: "full" }, this.reportButtonText), h("calcite-panel", { "full-height": true, "full-width": true }, h("layer-list", { class: "height-full", layers: this.layers, mapView: this.mapView, noLayerErrorMsg: this._noLayerToDisplayErrorMsg, onLayerSelect: this.displayFeaturesList.bind(this), onLayersListLoaded: this.layerListLoaded.bind(this), ref: el => this._layerList = el, showFeatureCount: true, showNextIcon: true }))));
165
167
  }
166
168
  /**
167
169
  * Get the layer list for creating a report
@@ -169,7 +171,7 @@ const CrowdsourceReporter = class {
169
171
  * @protected
170
172
  */
171
173
  getChooseCategoryFlowItem() {
172
- return (h("calcite-flow-item", { collapsed: this.isMobile && this._sidePanelCollapsed, heading: this._translations.createReportHeader, onCalciteFlowItemBack: this.backFromSelectedPanel.bind(this) }, this.isMobile && this.getActionToExpandCollapsePanel(), h("div", { class: "width-full", slot: "footer" }, h("calcite-button", { appearance: "solid", class: "footer-top-button footer-button", disabled: !this._selectedLayerId, onClick: this.navigateToCreateFeature.bind(this), width: "full" }, this._translations.next), h("calcite-button", { appearance: "outline", class: "footer-button", onClick: this.backFromSelectedPanel.bind(this), width: "full" }, this._translations.cancel)), h("calcite-panel", { "full-height": true, "full-width": true }, h("calcite-notice", { class: "notice-msg", icon: "lightbulb", kind: "success", open: true }, h("div", { slot: "message" }, this._translations.chooseCategoryMsg)), h("layer-list", { class: "height-full", layers: this.layers, mapView: this.mapView, noLayerErrorMsg: this._translations.noLayerToDisplayErrorMsg, onLayerSelect: this.highlightSelectedLayer.bind(this), showFeatureCount: false, showNextIcon: false }))));
174
+ return (h("calcite-flow-item", { collapsed: this.isMobile && this._sidePanelCollapsed, heading: this._translations.createReportHeader, onCalciteFlowItemBack: this.backFromSelectedPanel.bind(this) }, this.isMobile && this.getActionToExpandCollapsePanel(), h("div", { class: "width-full", slot: "footer" }, h("calcite-button", { appearance: "solid", class: "footer-top-button footer-button", disabled: !this._selectedLayerId, onClick: this.navigateToCreateFeature.bind(this), width: "full" }, this._translations.next), h("calcite-button", { appearance: "outline", class: "footer-button", onClick: this.backFromSelectedPanel.bind(this), width: "full" }, this._translations.cancel)), h("calcite-panel", { "full-height": true, "full-width": true }, h("calcite-notice", { class: "notice-msg", icon: "lightbulb", kind: "success", open: true }, h("div", { slot: "message" }, this._translations.chooseCategoryMsg)), h("layer-list", { class: "height-full", layers: this.layers, mapView: this.mapView, noLayerErrorMsg: this._noLayerToDisplayErrorMsg, onLayerSelect: this.highlightSelectedLayer.bind(this), showFeatureCount: false, showNextIcon: false }))));
173
175
  }
174
176
  /**
175
177
  * Get Feature create form of the selected feature layer
@@ -515,11 +517,17 @@ const CrowdsourceReporter = class {
515
517
  * @protected
516
518
  */
517
519
  async loadFeatureFromURLParams() {
520
+ if (this.center && this.level) {
521
+ await this.mapView.goTo({
522
+ center: this.center.split(';').map(Number),
523
+ zoom: this.level
524
+ });
525
+ }
518
526
  if (this.layerId && this.objectId) {
519
527
  const layer = await getLayerOrTable(this.mapView, this.layerId);
520
528
  if (layer) {
521
529
  // only query if we have some ids...query with no ids will result in all features being returned
522
- const featureSet = await queryFeaturesByID([Number(this.objectId)], layer, [], false, this.mapView.spatialReference);
530
+ const featureSet = await queryFeaturesByID([Number(this.objectId)], layer, [], true, this.mapView.spatialReference);
523
531
  if (featureSet.length) {
524
532
  //update the selectedFeature
525
533
  this._selectedFeature = featureSet;
@@ -531,6 +539,7 @@ const CrowdsourceReporter = class {
531
539
  else {
532
540
  this._flowItems = [...this._flowItems];
533
541
  }
542
+ await this.highlightOnMap(featureSet[0]);
534
543
  }
535
544
  }
536
545
  }