@esri/solutions-components 0.7.49 → 0.7.50

Sign up to get free protection for your applications and to get access to all the features.
@@ -93,7 +93,6 @@ const LayerTable = /*@__PURE__*/ proxyCustomElement(class LayerTable extends HTM
93
93
  this.onTableNodeCreate = (node) => {
94
94
  this._tableNode = node;
95
95
  };
96
- this.defaultFilter = undefined;
97
96
  this.defaultGlobalId = undefined;
98
97
  this.defaultLayerId = undefined;
99
98
  this.defaultOid = undefined;
@@ -129,6 +128,12 @@ const LayerTable = /*@__PURE__*/ proxyCustomElement(class LayerTable extends HTM
129
128
  // Watch handlers
130
129
  //
131
130
  //--------------------------------------------------------------------------
131
+ async defaultOidWatchHandler() {
132
+ await this._handleDefaults();
133
+ }
134
+ async defaultGlobalIdWatchHandler() {
135
+ await this._handleDefaults();
136
+ }
132
137
  /**
133
138
  * Reset the toolInfos when export csv is enabled/disabled
134
139
  */
@@ -816,22 +821,6 @@ const LayerTable = /*@__PURE__*/ proxyCustomElement(class LayerTable extends HTM
816
821
  else {
817
822
  urlObj.searchParams.delete("oid");
818
823
  }
819
- if (this._filterActive) {
820
- const filter = JSON.parse(this._filterList.urlParams.get("filter"));
821
- const layerExpressions = this._filterList.layerExpressions.map(layerExp => {
822
- layerExp.expressions = layerExp.expressions.map(exp => {
823
- if (exp.id.toString() === filter.expressionId.toString()) {
824
- exp.active = true;
825
- }
826
- return exp;
827
- });
828
- return layerExp;
829
- });
830
- urlObj.searchParams.set("filter", JSON.stringify(layerExpressions));
831
- }
832
- else {
833
- urlObj.searchParams.delete("filter");
834
- }
835
824
  this._shareNode.shareUrl = urlObj.href;
836
825
  }
837
826
  /**
@@ -845,7 +834,7 @@ const LayerTable = /*@__PURE__*/ proxyCustomElement(class LayerTable extends HTM
845
834
  * @returns VNode The tooltip node
846
835
  */
847
836
  _getToolTip(placement, referenceElement, text) {
848
- return (h("calcite-tooltip", { placement: placement, "reference-element": referenceElement }, h("span", null, text)));
837
+ return document.getElementById(referenceElement) ? (h("calcite-tooltip", { placement: placement, "reference-element": referenceElement }, h("span", null, text))) : undefined;
849
838
  }
850
839
  /**
851
840
  * Get an id with a prefix to the user supplied value
@@ -1008,7 +997,11 @@ const LayerTable = /*@__PURE__*/ proxyCustomElement(class LayerTable extends HTM
1008
997
  _resetColumnTemplates() {
1009
998
  var _a, _b;
1010
999
  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);
1011
- if (this._table && columnTemplates) {
1000
+ const hasChange = columnTemplates.some((ct, i) => {
1001
+ var _a;
1002
+ return JSON.stringify((_a = this._table) === null || _a === void 0 ? void 0 : _a.tableTemplate.columnTemplates[i]) !== JSON.stringify(ct);
1003
+ });
1004
+ if (this._table && columnTemplates && hasChange) {
1012
1005
  this._table.tableTemplate = new this.TableTemplate({
1013
1006
  columnTemplates
1014
1007
  });
@@ -1031,37 +1024,64 @@ const LayerTable = /*@__PURE__*/ proxyCustomElement(class LayerTable extends HTM
1031
1024
  this._table.view = this.mapView;
1032
1025
  this._table.layer = this._layer;
1033
1026
  }
1027
+ await this._initLayerRefresh();
1034
1028
  this._checkEditEnabled();
1035
1029
  this._table.editingEnabled = this._editEnabled && this.enableInlineEdit;
1036
1030
  await this.reactiveUtils.once(() => this._table.state === "loaded")
1037
1031
  .then(async () => {
1038
- var _a, _b, _c;
1039
1032
  this._table.highlightIds.removeAll();
1040
1033
  this._table.clearSelectionFilter();
1041
1034
  this._resetColumnTemplates();
1042
- if (!this._defaultOidHonored && ((_a = this.defaultOid) === null || _a === void 0 ? void 0 : _a.length) > 0 && this.defaultOid[0] > -1) {
1043
- this._selectDefaultFeature(this.defaultOid);
1044
- this._defaultOidHonored = true;
1045
- }
1046
- if (!this._defaultGlobalIdHonored && ((_b = this.defaultGlobalId) === null || _b === void 0 ? void 0 : _b.length) > 0) {
1047
- const features = await queryFeaturesByGlobalID(this.defaultGlobalId, this._layer);
1048
- const oids = (features === null || features === void 0 ? void 0 : features.length) > 0 ? features.map(f => f.getObjectId()) : undefined;
1049
- if (oids) {
1050
- this._selectDefaultFeature(oids);
1051
- }
1052
- this._defaultGlobalIdHonored = true;
1053
- }
1054
- if (!this._defaultFilterHonored && ((_c = this.defaultFilter) === null || _c === void 0 ? void 0 : _c.length) > 0 && this._filterList) {
1055
- this._layerExpressions = this.defaultFilter;
1056
- this._filterActive = true;
1057
- this._defaultFilterHonored = true;
1058
- }
1059
1035
  this._showOnlySelected = false;
1036
+ await this._handleDefaults();
1060
1037
  await this._sortTable();
1061
1038
  this._initToolInfos();
1062
1039
  this._updateToolbar();
1063
1040
  });
1064
1041
  }
1042
+ /**
1043
+ * Update the current IDs when that layers data is modified
1044
+ */
1045
+ async _initLayerRefresh() {
1046
+ if (this._refreshHandle) {
1047
+ this._refreshHandle.remove();
1048
+ }
1049
+ this._refreshHandle = this._layer.on("refresh", (evt) => {
1050
+ if (evt.dataChanged) {
1051
+ this._skipOnChange = true;
1052
+ void this._updateAllIds();
1053
+ }
1054
+ });
1055
+ }
1056
+ /**
1057
+ * Reset _allIds when the layers data has changed and refresh the selection ids and table
1058
+ */
1059
+ async _updateAllIds() {
1060
+ this._allIds = await queryAllIds(this._layer);
1061
+ this.selectedIds = this.selectedIds.filter(id => this._allIds.indexOf(id) > -1);
1062
+ await this._refresh();
1063
+ }
1064
+ async _handleDefaults() {
1065
+ var _a, _b;
1066
+ if (!this._defaultOidHonored && ((_a = this.defaultOid) === null || _a === void 0 ? void 0 : _a.length) > 0 && this.defaultOid[0] > -1 && this._table) {
1067
+ await this._selectDefaultFeature(this.defaultOid);
1068
+ this._defaultOidHonored = true;
1069
+ this.defaultOid = undefined;
1070
+ this._showOnlySelected = false;
1071
+ this._toggleShowSelected();
1072
+ }
1073
+ if (!this._defaultGlobalIdHonored && ((_b = this.defaultGlobalId) === null || _b === void 0 ? void 0 : _b.length) > 0 && this._table) {
1074
+ const features = await queryFeaturesByGlobalID(this.defaultGlobalId, this._layer);
1075
+ const oids = (features === null || features === void 0 ? void 0 : features.length) > 0 ? features.map(f => f.getObjectId()) : undefined;
1076
+ if (oids) {
1077
+ await this._selectDefaultFeature(oids);
1078
+ }
1079
+ this._defaultGlobalIdHonored = true;
1080
+ this.defaultGlobalId = undefined;
1081
+ this._showOnlySelected = false;
1082
+ this._toggleShowSelected();
1083
+ }
1084
+ }
1065
1085
  /**
1066
1086
  * Store the column names and current hidden status to support show/hide of columns
1067
1087
  * @param fieldNames optional list of names from new config options
@@ -1090,13 +1110,12 @@ const LayerTable = /*@__PURE__*/ proxyCustomElement(class LayerTable extends HTM
1090
1110
  /**
1091
1111
  * Select the feature that was specified via url params
1092
1112
  */
1093
- _selectDefaultFeature(oids) {
1113
+ async _selectDefaultFeature(oids) {
1094
1114
  if (oids.length > 0) {
1095
1115
  this._table.highlightIds.addMany(oids);
1096
- void this._table.when(() => {
1097
- const i = this._table.viewModel.getObjectIdIndex(oids[0]);
1098
- this._table.viewModel.scrollToIndex(i);
1099
- });
1116
+ // This is messed up and only make this worse
1117
+ //const i = this._table.viewModel.getObjectIdIndex(oids[0]);
1118
+ //this._table.viewModel.scrollToIndex(i);
1100
1119
  }
1101
1120
  }
1102
1121
  /**
@@ -1472,6 +1491,8 @@ const LayerTable = /*@__PURE__*/ proxyCustomElement(class LayerTable extends HTM
1472
1491
  }
1473
1492
  get el() { return this; }
1474
1493
  static get watchers() { return {
1494
+ "defaultOid": ["defaultOidWatchHandler"],
1495
+ "defaultGlobalId": ["defaultGlobalIdWatchHandler"],
1475
1496
  "enableCSV": ["enableCSVWatchHandler"],
1476
1497
  "enableInlineEdit": ["enableInlineEditWatchHandler"],
1477
1498
  "enableShare": ["enableShareWatchHandler"],
@@ -1484,7 +1505,6 @@ const LayerTable = /*@__PURE__*/ proxyCustomElement(class LayerTable extends HTM
1484
1505
  }; }
1485
1506
  static get style() { return layerTableCss; }
1486
1507
  }, [0, "layer-table", {
1487
- "defaultFilter": [16],
1488
1508
  "defaultGlobalId": [16],
1489
1509
  "defaultLayerId": [1, "default-layer-id"],
1490
1510
  "defaultOid": [16],
@@ -1515,6 +1535,8 @@ const LayerTable = /*@__PURE__*/ proxyCustomElement(class LayerTable extends HTM
1515
1535
  "_toolInfos": [32],
1516
1536
  "_translations": [32]
1517
1537
  }, [[8, "selectionChanged", "selectionChanged"], [8, "editsComplete", "editsComplete"], [8, "facilityChanged", "facilityChanged"], [8, "levelChanged", "levelChanged"], [8, "siteChanged", "siteChanged"], [8, "noLayersFound", "noLayersFound"]], {
1538
+ "defaultOid": ["defaultOidWatchHandler"],
1539
+ "defaultGlobalId": ["defaultGlobalIdWatchHandler"],
1518
1540
  "enableCSV": ["enableCSVWatchHandler"],
1519
1541
  "enableInlineEdit": ["enableInlineEditWatchHandler"],
1520
1542
  "enableShare": ["enableShareWatchHandler"],
@@ -145,7 +145,6 @@ const LayerTable = class {
145
145
  this.onTableNodeCreate = (node) => {
146
146
  this._tableNode = node;
147
147
  };
148
- this.defaultFilter = undefined;
149
148
  this.defaultGlobalId = undefined;
150
149
  this.defaultLayerId = undefined;
151
150
  this.defaultOid = undefined;
@@ -181,6 +180,12 @@ const LayerTable = class {
181
180
  // Watch handlers
182
181
  //
183
182
  //--------------------------------------------------------------------------
183
+ async defaultOidWatchHandler() {
184
+ await this._handleDefaults();
185
+ }
186
+ async defaultGlobalIdWatchHandler() {
187
+ await this._handleDefaults();
188
+ }
184
189
  /**
185
190
  * Reset the toolInfos when export csv is enabled/disabled
186
191
  */
@@ -868,22 +873,6 @@ const LayerTable = class {
868
873
  else {
869
874
  urlObj.searchParams.delete("oid");
870
875
  }
871
- if (this._filterActive) {
872
- const filter = JSON.parse(this._filterList.urlParams.get("filter"));
873
- const layerExpressions = this._filterList.layerExpressions.map(layerExp => {
874
- layerExp.expressions = layerExp.expressions.map(exp => {
875
- if (exp.id.toString() === filter.expressionId.toString()) {
876
- exp.active = true;
877
- }
878
- return exp;
879
- });
880
- return layerExp;
881
- });
882
- urlObj.searchParams.set("filter", JSON.stringify(layerExpressions));
883
- }
884
- else {
885
- urlObj.searchParams.delete("filter");
886
- }
887
876
  this._shareNode.shareUrl = urlObj.href;
888
877
  }
889
878
  /**
@@ -897,7 +886,7 @@ const LayerTable = class {
897
886
  * @returns VNode The tooltip node
898
887
  */
899
888
  _getToolTip(placement, referenceElement, text) {
900
- return (h("calcite-tooltip", { placement: placement, "reference-element": referenceElement }, h("span", null, text)));
889
+ return document.getElementById(referenceElement) ? (h("calcite-tooltip", { placement: placement, "reference-element": referenceElement }, h("span", null, text))) : undefined;
901
890
  }
902
891
  /**
903
892
  * Get an id with a prefix to the user supplied value
@@ -1060,7 +1049,11 @@ const LayerTable = class {
1060
1049
  _resetColumnTemplates() {
1061
1050
  var _a, _b;
1062
1051
  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);
1063
- if (this._table && columnTemplates) {
1052
+ const hasChange = columnTemplates.some((ct, i) => {
1053
+ var _a;
1054
+ return JSON.stringify((_a = this._table) === null || _a === void 0 ? void 0 : _a.tableTemplate.columnTemplates[i]) !== JSON.stringify(ct);
1055
+ });
1056
+ if (this._table && columnTemplates && hasChange) {
1064
1057
  this._table.tableTemplate = new this.TableTemplate({
1065
1058
  columnTemplates
1066
1059
  });
@@ -1083,37 +1076,64 @@ const LayerTable = class {
1083
1076
  this._table.view = this.mapView;
1084
1077
  this._table.layer = this._layer;
1085
1078
  }
1079
+ await this._initLayerRefresh();
1086
1080
  this._checkEditEnabled();
1087
1081
  this._table.editingEnabled = this._editEnabled && this.enableInlineEdit;
1088
1082
  await this.reactiveUtils.once(() => this._table.state === "loaded")
1089
1083
  .then(async () => {
1090
- var _a, _b, _c;
1091
1084
  this._table.highlightIds.removeAll();
1092
1085
  this._table.clearSelectionFilter();
1093
1086
  this._resetColumnTemplates();
1094
- if (!this._defaultOidHonored && ((_a = this.defaultOid) === null || _a === void 0 ? void 0 : _a.length) > 0 && this.defaultOid[0] > -1) {
1095
- this._selectDefaultFeature(this.defaultOid);
1096
- this._defaultOidHonored = true;
1097
- }
1098
- if (!this._defaultGlobalIdHonored && ((_b = this.defaultGlobalId) === null || _b === void 0 ? void 0 : _b.length) > 0) {
1099
- const features = await queryFeaturesByGlobalID(this.defaultGlobalId, this._layer);
1100
- const oids = (features === null || features === void 0 ? void 0 : features.length) > 0 ? features.map(f => f.getObjectId()) : undefined;
1101
- if (oids) {
1102
- this._selectDefaultFeature(oids);
1103
- }
1104
- this._defaultGlobalIdHonored = true;
1105
- }
1106
- if (!this._defaultFilterHonored && ((_c = this.defaultFilter) === null || _c === void 0 ? void 0 : _c.length) > 0 && this._filterList) {
1107
- this._layerExpressions = this.defaultFilter;
1108
- this._filterActive = true;
1109
- this._defaultFilterHonored = true;
1110
- }
1111
1087
  this._showOnlySelected = false;
1088
+ await this._handleDefaults();
1112
1089
  await this._sortTable();
1113
1090
  this._initToolInfos();
1114
1091
  this._updateToolbar();
1115
1092
  });
1116
1093
  }
1094
+ /**
1095
+ * Update the current IDs when that layers data is modified
1096
+ */
1097
+ async _initLayerRefresh() {
1098
+ if (this._refreshHandle) {
1099
+ this._refreshHandle.remove();
1100
+ }
1101
+ this._refreshHandle = this._layer.on("refresh", (evt) => {
1102
+ if (evt.dataChanged) {
1103
+ this._skipOnChange = true;
1104
+ void this._updateAllIds();
1105
+ }
1106
+ });
1107
+ }
1108
+ /**
1109
+ * Reset _allIds when the layers data has changed and refresh the selection ids and table
1110
+ */
1111
+ async _updateAllIds() {
1112
+ this._allIds = await queryAllIds(this._layer);
1113
+ this.selectedIds = this.selectedIds.filter(id => this._allIds.indexOf(id) > -1);
1114
+ await this._refresh();
1115
+ }
1116
+ async _handleDefaults() {
1117
+ var _a, _b;
1118
+ if (!this._defaultOidHonored && ((_a = this.defaultOid) === null || _a === void 0 ? void 0 : _a.length) > 0 && this.defaultOid[0] > -1 && this._table) {
1119
+ await this._selectDefaultFeature(this.defaultOid);
1120
+ this._defaultOidHonored = true;
1121
+ this.defaultOid = undefined;
1122
+ this._showOnlySelected = false;
1123
+ this._toggleShowSelected();
1124
+ }
1125
+ if (!this._defaultGlobalIdHonored && ((_b = this.defaultGlobalId) === null || _b === void 0 ? void 0 : _b.length) > 0 && this._table) {
1126
+ const features = await queryFeaturesByGlobalID(this.defaultGlobalId, this._layer);
1127
+ const oids = (features === null || features === void 0 ? void 0 : features.length) > 0 ? features.map(f => f.getObjectId()) : undefined;
1128
+ if (oids) {
1129
+ await this._selectDefaultFeature(oids);
1130
+ }
1131
+ this._defaultGlobalIdHonored = true;
1132
+ this.defaultGlobalId = undefined;
1133
+ this._showOnlySelected = false;
1134
+ this._toggleShowSelected();
1135
+ }
1136
+ }
1117
1137
  /**
1118
1138
  * Store the column names and current hidden status to support show/hide of columns
1119
1139
  * @param fieldNames optional list of names from new config options
@@ -1142,13 +1162,12 @@ const LayerTable = class {
1142
1162
  /**
1143
1163
  * Select the feature that was specified via url params
1144
1164
  */
1145
- _selectDefaultFeature(oids) {
1165
+ async _selectDefaultFeature(oids) {
1146
1166
  if (oids.length > 0) {
1147
1167
  this._table.highlightIds.addMany(oids);
1148
- void this._table.when(() => {
1149
- const i = this._table.viewModel.getObjectIdIndex(oids[0]);
1150
- this._table.viewModel.scrollToIndex(i);
1151
- });
1168
+ // This is messed up and only make this worse
1169
+ //const i = this._table.viewModel.getObjectIdIndex(oids[0]);
1170
+ //this._table.viewModel.scrollToIndex(i);
1152
1171
  }
1153
1172
  }
1154
1173
  /**
@@ -1524,6 +1543,8 @@ const LayerTable = class {
1524
1543
  }
1525
1544
  get el() { return getElement(this); }
1526
1545
  static get watchers() { return {
1546
+ "defaultOid": ["defaultOidWatchHandler"],
1547
+ "defaultGlobalId": ["defaultGlobalIdWatchHandler"],
1527
1548
  "enableCSV": ["enableCSVWatchHandler"],
1528
1549
  "enableInlineEdit": ["enableInlineEditWatchHandler"],
1529
1550
  "enableShare": ["enableShareWatchHandler"],
@@ -20,8 +20,9 @@ const CrowdsourceManager = class {
20
20
  * MapView.when is not fired when mapView is not currently visible
21
21
  */
22
22
  this._shouldSetMapView = false;
23
+ this._defaultCenterHonored = false;
24
+ this._defaultLevelHonored = false;
23
25
  this.defaultCenter = "";
24
- this.defaultFilter = "";
25
26
  this.defaultGlobalId = "";
26
27
  this.defaultLayer = "";
27
28
  this.defaultLevel = "";
@@ -66,39 +67,6 @@ const CrowdsourceManager = class {
66
67
  // Watch handlers
67
68
  //
68
69
  //--------------------------------------------------------------------------
69
- /**
70
- * Watch for center url param to be set
71
- */
72
- defaultCenterWatchHandler() {
73
- this._defaultCenter = !this.defaultCenter ? undefined :
74
- this.defaultCenter.split(";").map(v => parseFloat(v));
75
- }
76
- /**
77
- * Watch for filter url param to be set
78
- */
79
- defaultFilterWatchHandler() {
80
- this._defaultFilter = JSON.parse(this.defaultFilter);
81
- }
82
- /**
83
- * Watch for globalid url param to be set
84
- */
85
- defaultGlobalIdWatchHandler() {
86
- this._defaultGlobalId = !this.defaultGlobalId ? undefined :
87
- this.defaultGlobalId.indexOf(",") > -1 ? this.defaultGlobalId.split(",") : [this.defaultGlobalId];
88
- }
89
- /**
90
- * Watch for oid url param to be set
91
- */
92
- defaultOidWatchHandler() {
93
- this._defaultOid = !this.defaultOid ? undefined :
94
- this.defaultOid.indexOf(",") > -1 ? this.defaultOid.split(",").map(o => parseInt(o, 10)) : [parseInt(this.defaultOid, 10)];
95
- }
96
- /**
97
- * Watch for zoom level param to be set
98
- */
99
- defaultLevelWatchHandler() {
100
- this._defaultLevel = !this.defaultLevel ? undefined : parseInt(this.defaultLevel, 10);
101
- }
102
70
  /**
103
71
  * When true the map zoom tools will be available
104
72
  */
@@ -390,6 +358,7 @@ const CrowdsourceManager = class {
390
358
  * @protected
391
359
  */
392
360
  _getTable(layoutMode, panelOpen, hideTable) {
361
+ var _a, _b;
393
362
  const tableClass = hideTable && this._isMobile ? "visibility-hidden" : "";
394
363
  const tableSizeClass = this._getTableSizeClass(layoutMode, panelOpen);
395
364
  const icon = this._getDividerIcon(layoutMode, panelOpen);
@@ -398,7 +367,11 @@ const CrowdsourceManager = class {
398
367
  const toggleLayout = layoutMode === ELayoutMode.HORIZONTAL ? "horizontal" : "vertical";
399
368
  const toggleSlot = layoutMode === ELayoutMode.HORIZONTAL ? "header" : "panel-start";
400
369
  const hasMapAndLayer = this.defaultWebmap && this.defaultLayer;
401
- return (h("calcite-shell", { class: `${tableSizeClass} ${tableClass} border-bottom` }, !this._isMobile ? (h("calcite-action-bar", { class: "border-sides", expandDisabled: true, layout: toggleLayout, slot: toggleSlot }, h("calcite-action", { class: "toggle-node", icon: icon, id: id, onClick: () => this._toggleLayout(), text: "" }), h("calcite-tooltip", { label: tooltip, placement: "bottom", "reference-element": id }, h("span", null, tooltip)))) : undefined, h("div", { class: `width-full height-full position-relative` }, h("layer-table", { defaultFilter: hasMapAndLayer ? this._defaultFilter : undefined, defaultGlobalId: hasMapAndLayer ? this._defaultGlobalId : undefined, defaultLayerId: hasMapAndLayer ? this.defaultLayer : "", defaultOid: hasMapAndLayer && !this.defaultGlobalId ? this._defaultOid : undefined, enableAutoRefresh: this.enableAutoRefresh, enableCSV: this.enableCSV, enableColumnReorder: this.enableColumnReorder, enableInlineEdit: this.enableInlineEdit, enableShare: this.enableShare, isMobile: this._isMobile, mapInfo: this._mapInfo, mapView: this === null || this === void 0 ? void 0 : this._mapView, onlyShowUpdatableLayers: this.onlyShowUpdatableLayers, ref: (el) => this._layerTable = el, shareIncludeEmbed: this.shareIncludeEmbed, shareIncludeSocial: this.shareIncludeSocial, showNewestFirst: this.showNewestFirst, zoomAndScrollToSelected: this.zoomAndScrollToSelected }))));
370
+ const globalId = !this.defaultGlobalId ? undefined :
371
+ ((_a = this.defaultGlobalId) === null || _a === void 0 ? void 0 : _a.indexOf(",")) > -1 ? this.defaultGlobalId.split(",") : [this.defaultGlobalId];
372
+ const defaultOid = !this.defaultOid ? undefined :
373
+ ((_b = this.defaultOid) === null || _b === void 0 ? void 0 : _b.indexOf(",")) > -1 ? this.defaultOid.split(",").map(o => parseInt(o, 10)) : [parseInt(this.defaultOid, 10)];
374
+ return (h("calcite-shell", { class: `${tableSizeClass} ${tableClass} border-bottom` }, !this._isMobile ? (h("calcite-action-bar", { class: "border-sides", expandDisabled: true, layout: toggleLayout, slot: toggleSlot }, h("calcite-action", { class: "toggle-node", icon: icon, id: id, onClick: () => this._toggleLayout(), text: "" }), h("calcite-tooltip", { label: tooltip, placement: "bottom", "reference-element": id }, h("span", null, tooltip)))) : undefined, h("div", { class: `width-full height-full position-relative` }, h("layer-table", { defaultGlobalId: hasMapAndLayer ? globalId : undefined, defaultLayerId: hasMapAndLayer ? this.defaultLayer : "", defaultOid: hasMapAndLayer && !globalId ? defaultOid : undefined, enableAutoRefresh: this.enableAutoRefresh, enableCSV: this.enableCSV, enableColumnReorder: this.enableColumnReorder, enableInlineEdit: this.enableInlineEdit, enableShare: this.enableShare, isMobile: this._isMobile, mapInfo: this._mapInfo, mapView: this === null || this === void 0 ? void 0 : this._mapView, onlyShowUpdatableLayers: this.onlyShowUpdatableLayers, ref: (el) => this._layerTable = el, shareIncludeEmbed: this.shareIncludeEmbed, shareIncludeSocial: this.shareIncludeSocial, showNewestFirst: this.showNewestFirst, zoomAndScrollToSelected: this.zoomAndScrollToSelected }))));
402
375
  }
403
376
  /**
404
377
  * Update the component layout when its size changes
@@ -451,17 +424,22 @@ const CrowdsourceManager = class {
451
424
  * @protected
452
425
  */
453
426
  async _setMapView() {
427
+ var _a;
454
428
  this._mapInfo = this._getMapInfo(this._mapChange.id);
455
429
  this._mapView = this._mapChange.mapView;
456
430
  this._initMapZoom();
457
431
  this._mapView.popupEnabled = false;
458
- if (this._defaultCenter && this._defaultLevel) {
432
+ const center = !this.defaultCenter || this._defaultCenterHonored ?
433
+ undefined : (_a = this.defaultCenter) === null || _a === void 0 ? void 0 : _a.split(";").map(v => parseFloat(v));
434
+ const zoom = !this.defaultLevel || this._defaultLevelHonored ?
435
+ undefined : parseInt(this.defaultLevel, 10);
436
+ if (center && zoom) {
459
437
  await this._mapView.goTo({
460
- center: this._defaultCenter,
461
- zoom: this._defaultLevel
438
+ center,
439
+ zoom
462
440
  });
463
- this._defaultCenter = undefined;
464
- this._defaultLevel = undefined;
441
+ this._defaultCenterHonored = true;
442
+ this._defaultLevelHonored = true;
465
443
  }
466
444
  }
467
445
  /**
@@ -493,11 +471,6 @@ const CrowdsourceManager = class {
493
471
  }
494
472
  get el() { return getElement(this); }
495
473
  static get watchers() { return {
496
- "defaultCenter": ["defaultCenterWatchHandler"],
497
- "defaultFilter": ["defaultFilterWatchHandler"],
498
- "defaultGlobalId": ["defaultGlobalIdWatchHandler"],
499
- "defaultOid": ["defaultOidWatchHandler"],
500
- "defaultLevel": ["defaultLevelWatchHandler"],
501
474
  "enableZoom": ["enableZoomWatchHandler"]
502
475
  }; }
503
476
  };