@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.
@@ -29,8 +29,9 @@ export class CrowdsourceManager {
29
29
  * MapView.when is not fired when mapView is not currently visible
30
30
  */
31
31
  this._shouldSetMapView = false;
32
+ this._defaultCenterHonored = false;
33
+ this._defaultLevelHonored = false;
32
34
  this.defaultCenter = "";
33
- this.defaultFilter = "";
34
35
  this.defaultGlobalId = "";
35
36
  this.defaultLayer = "";
36
37
  this.defaultLevel = "";
@@ -75,39 +76,6 @@ export class CrowdsourceManager {
75
76
  // Watch handlers
76
77
  //
77
78
  //--------------------------------------------------------------------------
78
- /**
79
- * Watch for center url param to be set
80
- */
81
- defaultCenterWatchHandler() {
82
- this._defaultCenter = !this.defaultCenter ? undefined :
83
- this.defaultCenter.split(";").map(v => parseFloat(v));
84
- }
85
- /**
86
- * Watch for filter url param to be set
87
- */
88
- defaultFilterWatchHandler() {
89
- this._defaultFilter = JSON.parse(this.defaultFilter);
90
- }
91
- /**
92
- * Watch for globalid url param to be set
93
- */
94
- defaultGlobalIdWatchHandler() {
95
- this._defaultGlobalId = !this.defaultGlobalId ? undefined :
96
- this.defaultGlobalId.indexOf(",") > -1 ? this.defaultGlobalId.split(",") : [this.defaultGlobalId];
97
- }
98
- /**
99
- * Watch for oid url param to be set
100
- */
101
- defaultOidWatchHandler() {
102
- this._defaultOid = !this.defaultOid ? undefined :
103
- this.defaultOid.indexOf(",") > -1 ? this.defaultOid.split(",").map(o => parseInt(o, 10)) : [parseInt(this.defaultOid, 10)];
104
- }
105
- /**
106
- * Watch for zoom level param to be set
107
- */
108
- defaultLevelWatchHandler() {
109
- this._defaultLevel = !this.defaultLevel ? undefined : parseInt(this.defaultLevel, 10);
110
- }
111
79
  /**
112
80
  * When true the map zoom tools will be available
113
81
  */
@@ -399,6 +367,7 @@ export class CrowdsourceManager {
399
367
  * @protected
400
368
  */
401
369
  _getTable(layoutMode, panelOpen, hideTable) {
370
+ var _a, _b;
402
371
  const tableClass = hideTable && this._isMobile ? "visibility-hidden" : "";
403
372
  const tableSizeClass = this._getTableSizeClass(layoutMode, panelOpen);
404
373
  const icon = this._getDividerIcon(layoutMode, panelOpen);
@@ -407,7 +376,11 @@ export class CrowdsourceManager {
407
376
  const toggleLayout = layoutMode === ELayoutMode.HORIZONTAL ? "horizontal" : "vertical";
408
377
  const toggleSlot = layoutMode === ELayoutMode.HORIZONTAL ? "header" : "panel-start";
409
378
  const hasMapAndLayer = this.defaultWebmap && this.defaultLayer;
410
- 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 }))));
379
+ const globalId = !this.defaultGlobalId ? undefined :
380
+ ((_a = this.defaultGlobalId) === null || _a === void 0 ? void 0 : _a.indexOf(",")) > -1 ? this.defaultGlobalId.split(",") : [this.defaultGlobalId];
381
+ const defaultOid = !this.defaultOid ? undefined :
382
+ ((_b = this.defaultOid) === null || _b === void 0 ? void 0 : _b.indexOf(",")) > -1 ? this.defaultOid.split(",").map(o => parseInt(o, 10)) : [parseInt(this.defaultOid, 10)];
383
+ 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 }))));
411
384
  }
412
385
  /**
413
386
  * Update the component layout when its size changes
@@ -460,17 +433,22 @@ export class CrowdsourceManager {
460
433
  * @protected
461
434
  */
462
435
  async _setMapView() {
436
+ var _a;
463
437
  this._mapInfo = this._getMapInfo(this._mapChange.id);
464
438
  this._mapView = this._mapChange.mapView;
465
439
  this._initMapZoom();
466
440
  this._mapView.popupEnabled = false;
467
- if (this._defaultCenter && this._defaultLevel) {
441
+ const center = !this.defaultCenter || this._defaultCenterHonored ?
442
+ undefined : (_a = this.defaultCenter) === null || _a === void 0 ? void 0 : _a.split(";").map(v => parseFloat(v));
443
+ const zoom = !this.defaultLevel || this._defaultLevelHonored ?
444
+ undefined : parseInt(this.defaultLevel, 10);
445
+ if (center && zoom) {
468
446
  await this._mapView.goTo({
469
- center: this._defaultCenter,
470
- zoom: this._defaultLevel
447
+ center,
448
+ zoom
471
449
  });
472
- this._defaultCenter = undefined;
473
- this._defaultLevel = undefined;
450
+ this._defaultCenterHonored = true;
451
+ this._defaultLevelHonored = true;
474
452
  }
475
453
  }
476
454
  /**
@@ -531,24 +509,6 @@ export class CrowdsourceManager {
531
509
  "reflect": false,
532
510
  "defaultValue": "\"\""
533
511
  },
534
- "defaultFilter": {
535
- "type": "string",
536
- "mutable": false,
537
- "complexType": {
538
- "original": "string",
539
- "resolved": "string",
540
- "references": {}
541
- },
542
- "required": false,
543
- "optional": false,
544
- "docs": {
545
- "tags": [],
546
- "text": "string: default layer expression to apply to the current layer"
547
- },
548
- "attribute": "default-filter",
549
- "reflect": false,
550
- "defaultValue": "\"\""
551
- },
552
512
  "defaultGlobalId": {
553
513
  "type": "string",
554
514
  "mutable": false,
@@ -1052,21 +1012,6 @@ export class CrowdsourceManager {
1052
1012
  static get elementRef() { return "el"; }
1053
1013
  static get watchers() {
1054
1014
  return [{
1055
- "propName": "defaultCenter",
1056
- "methodName": "defaultCenterWatchHandler"
1057
- }, {
1058
- "propName": "defaultFilter",
1059
- "methodName": "defaultFilterWatchHandler"
1060
- }, {
1061
- "propName": "defaultGlobalId",
1062
- "methodName": "defaultGlobalIdWatchHandler"
1063
- }, {
1064
- "propName": "defaultOid",
1065
- "methodName": "defaultOidWatchHandler"
1066
- }, {
1067
- "propName": "defaultLevel",
1068
- "methodName": "defaultLevelWatchHandler"
1069
- }, {
1070
1015
  "propName": "enableZoom",
1071
1016
  "methodName": "enableZoomWatchHandler"
1072
1017
  }];
@@ -64,7 +64,6 @@ export class LayerTable {
64
64
  this.onTableNodeCreate = (node) => {
65
65
  this._tableNode = node;
66
66
  };
67
- this.defaultFilter = undefined;
68
67
  this.defaultGlobalId = undefined;
69
68
  this.defaultLayerId = undefined;
70
69
  this.defaultOid = undefined;
@@ -100,6 +99,12 @@ export class LayerTable {
100
99
  // Watch handlers
101
100
  //
102
101
  //--------------------------------------------------------------------------
102
+ async defaultOidWatchHandler() {
103
+ await this._handleDefaults();
104
+ }
105
+ async defaultGlobalIdWatchHandler() {
106
+ await this._handleDefaults();
107
+ }
103
108
  /**
104
109
  * Reset the toolInfos when export csv is enabled/disabled
105
110
  */
@@ -787,22 +792,6 @@ export class LayerTable {
787
792
  else {
788
793
  urlObj.searchParams.delete("oid");
789
794
  }
790
- if (this._filterActive) {
791
- const filter = JSON.parse(this._filterList.urlParams.get("filter"));
792
- const layerExpressions = this._filterList.layerExpressions.map(layerExp => {
793
- layerExp.expressions = layerExp.expressions.map(exp => {
794
- if (exp.id.toString() === filter.expressionId.toString()) {
795
- exp.active = true;
796
- }
797
- return exp;
798
- });
799
- return layerExp;
800
- });
801
- urlObj.searchParams.set("filter", JSON.stringify(layerExpressions));
802
- }
803
- else {
804
- urlObj.searchParams.delete("filter");
805
- }
806
795
  this._shareNode.shareUrl = urlObj.href;
807
796
  }
808
797
  /**
@@ -816,7 +805,7 @@ export class LayerTable {
816
805
  * @returns VNode The tooltip node
817
806
  */
818
807
  _getToolTip(placement, referenceElement, text) {
819
- return (h("calcite-tooltip", { placement: placement, "reference-element": referenceElement }, h("span", null, text)));
808
+ return document.getElementById(referenceElement) ? (h("calcite-tooltip", { placement: placement, "reference-element": referenceElement }, h("span", null, text))) : undefined;
820
809
  }
821
810
  /**
822
811
  * Get an id with a prefix to the user supplied value
@@ -979,7 +968,11 @@ export class LayerTable {
979
968
  _resetColumnTemplates() {
980
969
  var _a, _b;
981
970
  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);
982
- if (this._table && columnTemplates) {
971
+ const hasChange = columnTemplates.some((ct, i) => {
972
+ var _a;
973
+ return JSON.stringify((_a = this._table) === null || _a === void 0 ? void 0 : _a.tableTemplate.columnTemplates[i]) !== JSON.stringify(ct);
974
+ });
975
+ if (this._table && columnTemplates && hasChange) {
983
976
  this._table.tableTemplate = new this.TableTemplate({
984
977
  columnTemplates
985
978
  });
@@ -1002,37 +995,64 @@ export class LayerTable {
1002
995
  this._table.view = this.mapView;
1003
996
  this._table.layer = this._layer;
1004
997
  }
998
+ await this._initLayerRefresh();
1005
999
  this._checkEditEnabled();
1006
1000
  this._table.editingEnabled = this._editEnabled && this.enableInlineEdit;
1007
1001
  await this.reactiveUtils.once(() => this._table.state === "loaded")
1008
1002
  .then(async () => {
1009
- var _a, _b, _c;
1010
1003
  this._table.highlightIds.removeAll();
1011
1004
  this._table.clearSelectionFilter();
1012
1005
  this._resetColumnTemplates();
1013
- if (!this._defaultOidHonored && ((_a = this.defaultOid) === null || _a === void 0 ? void 0 : _a.length) > 0 && this.defaultOid[0] > -1) {
1014
- this._selectDefaultFeature(this.defaultOid);
1015
- this._defaultOidHonored = true;
1016
- }
1017
- if (!this._defaultGlobalIdHonored && ((_b = this.defaultGlobalId) === null || _b === void 0 ? void 0 : _b.length) > 0) {
1018
- const features = await queryFeaturesByGlobalID(this.defaultGlobalId, this._layer);
1019
- const oids = (features === null || features === void 0 ? void 0 : features.length) > 0 ? features.map(f => f.getObjectId()) : undefined;
1020
- if (oids) {
1021
- this._selectDefaultFeature(oids);
1022
- }
1023
- this._defaultGlobalIdHonored = true;
1024
- }
1025
- if (!this._defaultFilterHonored && ((_c = this.defaultFilter) === null || _c === void 0 ? void 0 : _c.length) > 0 && this._filterList) {
1026
- this._layerExpressions = this.defaultFilter;
1027
- this._filterActive = true;
1028
- this._defaultFilterHonored = true;
1029
- }
1030
1006
  this._showOnlySelected = false;
1007
+ await this._handleDefaults();
1031
1008
  await this._sortTable();
1032
1009
  this._initToolInfos();
1033
1010
  this._updateToolbar();
1034
1011
  });
1035
1012
  }
1013
+ /**
1014
+ * Update the current IDs when that layers data is modified
1015
+ */
1016
+ async _initLayerRefresh() {
1017
+ if (this._refreshHandle) {
1018
+ this._refreshHandle.remove();
1019
+ }
1020
+ this._refreshHandle = this._layer.on("refresh", (evt) => {
1021
+ if (evt.dataChanged) {
1022
+ this._skipOnChange = true;
1023
+ void this._updateAllIds();
1024
+ }
1025
+ });
1026
+ }
1027
+ /**
1028
+ * Reset _allIds when the layers data has changed and refresh the selection ids and table
1029
+ */
1030
+ async _updateAllIds() {
1031
+ this._allIds = await queryAllIds(this._layer);
1032
+ this.selectedIds = this.selectedIds.filter(id => this._allIds.indexOf(id) > -1);
1033
+ await this._refresh();
1034
+ }
1035
+ async _handleDefaults() {
1036
+ var _a, _b;
1037
+ if (!this._defaultOidHonored && ((_a = this.defaultOid) === null || _a === void 0 ? void 0 : _a.length) > 0 && this.defaultOid[0] > -1 && this._table) {
1038
+ await this._selectDefaultFeature(this.defaultOid);
1039
+ this._defaultOidHonored = true;
1040
+ this.defaultOid = undefined;
1041
+ this._showOnlySelected = false;
1042
+ this._toggleShowSelected();
1043
+ }
1044
+ if (!this._defaultGlobalIdHonored && ((_b = this.defaultGlobalId) === null || _b === void 0 ? void 0 : _b.length) > 0 && this._table) {
1045
+ const features = await queryFeaturesByGlobalID(this.defaultGlobalId, this._layer);
1046
+ const oids = (features === null || features === void 0 ? void 0 : features.length) > 0 ? features.map(f => f.getObjectId()) : undefined;
1047
+ if (oids) {
1048
+ await this._selectDefaultFeature(oids);
1049
+ }
1050
+ this._defaultGlobalIdHonored = true;
1051
+ this.defaultGlobalId = undefined;
1052
+ this._showOnlySelected = false;
1053
+ this._toggleShowSelected();
1054
+ }
1055
+ }
1036
1056
  /**
1037
1057
  * Store the column names and current hidden status to support show/hide of columns
1038
1058
  * @param fieldNames optional list of names from new config options
@@ -1061,13 +1081,12 @@ export class LayerTable {
1061
1081
  /**
1062
1082
  * Select the feature that was specified via url params
1063
1083
  */
1064
- _selectDefaultFeature(oids) {
1084
+ async _selectDefaultFeature(oids) {
1065
1085
  if (oids.length > 0) {
1066
1086
  this._table.highlightIds.addMany(oids);
1067
- void this._table.when(() => {
1068
- const i = this._table.viewModel.getObjectIdIndex(oids[0]);
1069
- this._table.viewModel.scrollToIndex(i);
1070
- });
1087
+ // This is messed up and only make this worse
1088
+ //const i = this._table.viewModel.getObjectIdIndex(oids[0]);
1089
+ //this._table.viewModel.scrollToIndex(i);
1071
1090
  }
1072
1091
  }
1073
1092
  /**
@@ -1454,27 +1473,6 @@ export class LayerTable {
1454
1473
  }
1455
1474
  static get properties() {
1456
1475
  return {
1457
- "defaultFilter": {
1458
- "type": "unknown",
1459
- "mutable": false,
1460
- "complexType": {
1461
- "original": "LayerExpression[]",
1462
- "resolved": "LayerExpression[]",
1463
- "references": {
1464
- "LayerExpression": {
1465
- "location": "import",
1466
- "path": "@esri/instant-apps-components",
1467
- "id": ""
1468
- }
1469
- }
1470
- },
1471
- "required": false,
1472
- "optional": false,
1473
- "docs": {
1474
- "tags": [],
1475
- "text": "LayerExpression[]: default layer expression(s) to apply to the current layer"
1476
- }
1477
- },
1478
1476
  "defaultGlobalId": {
1479
1477
  "type": "unknown",
1480
1478
  "mutable": false,
@@ -1806,6 +1804,12 @@ export class LayerTable {
1806
1804
  static get elementRef() { return "el"; }
1807
1805
  static get watchers() {
1808
1806
  return [{
1807
+ "propName": "defaultOid",
1808
+ "methodName": "defaultOidWatchHandler"
1809
+ }, {
1810
+ "propName": "defaultGlobalId",
1811
+ "methodName": "defaultGlobalIdWatchHandler"
1812
+ }, {
1809
1813
  "propName": "enableCSV",
1810
1814
  "methodName": "enableCSVWatchHandler"
1811
1815
  }, {
@@ -76,8 +76,9 @@ const CrowdsourceManager$1 = /*@__PURE__*/ proxyCustomElement(class CrowdsourceM
76
76
  * MapView.when is not fired when mapView is not currently visible
77
77
  */
78
78
  this._shouldSetMapView = false;
79
+ this._defaultCenterHonored = false;
80
+ this._defaultLevelHonored = false;
79
81
  this.defaultCenter = "";
80
- this.defaultFilter = "";
81
82
  this.defaultGlobalId = "";
82
83
  this.defaultLayer = "";
83
84
  this.defaultLevel = "";
@@ -122,39 +123,6 @@ const CrowdsourceManager$1 = /*@__PURE__*/ proxyCustomElement(class CrowdsourceM
122
123
  // Watch handlers
123
124
  //
124
125
  //--------------------------------------------------------------------------
125
- /**
126
- * Watch for center url param to be set
127
- */
128
- defaultCenterWatchHandler() {
129
- this._defaultCenter = !this.defaultCenter ? undefined :
130
- this.defaultCenter.split(";").map(v => parseFloat(v));
131
- }
132
- /**
133
- * Watch for filter url param to be set
134
- */
135
- defaultFilterWatchHandler() {
136
- this._defaultFilter = JSON.parse(this.defaultFilter);
137
- }
138
- /**
139
- * Watch for globalid url param to be set
140
- */
141
- defaultGlobalIdWatchHandler() {
142
- this._defaultGlobalId = !this.defaultGlobalId ? undefined :
143
- this.defaultGlobalId.indexOf(",") > -1 ? this.defaultGlobalId.split(",") : [this.defaultGlobalId];
144
- }
145
- /**
146
- * Watch for oid url param to be set
147
- */
148
- defaultOidWatchHandler() {
149
- this._defaultOid = !this.defaultOid ? undefined :
150
- this.defaultOid.indexOf(",") > -1 ? this.defaultOid.split(",").map(o => parseInt(o, 10)) : [parseInt(this.defaultOid, 10)];
151
- }
152
- /**
153
- * Watch for zoom level param to be set
154
- */
155
- defaultLevelWatchHandler() {
156
- this._defaultLevel = !this.defaultLevel ? undefined : parseInt(this.defaultLevel, 10);
157
- }
158
126
  /**
159
127
  * When true the map zoom tools will be available
160
128
  */
@@ -446,6 +414,7 @@ const CrowdsourceManager$1 = /*@__PURE__*/ proxyCustomElement(class CrowdsourceM
446
414
  * @protected
447
415
  */
448
416
  _getTable(layoutMode, panelOpen, hideTable) {
417
+ var _a, _b;
449
418
  const tableClass = hideTable && this._isMobile ? "visibility-hidden" : "";
450
419
  const tableSizeClass = this._getTableSizeClass(layoutMode, panelOpen);
451
420
  const icon = this._getDividerIcon(layoutMode, panelOpen);
@@ -454,7 +423,11 @@ const CrowdsourceManager$1 = /*@__PURE__*/ proxyCustomElement(class CrowdsourceM
454
423
  const toggleLayout = layoutMode === ELayoutMode.HORIZONTAL ? "horizontal" : "vertical";
455
424
  const toggleSlot = layoutMode === ELayoutMode.HORIZONTAL ? "header" : "panel-start";
456
425
  const hasMapAndLayer = this.defaultWebmap && this.defaultLayer;
457
- 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 }))));
426
+ const globalId = !this.defaultGlobalId ? undefined :
427
+ ((_a = this.defaultGlobalId) === null || _a === void 0 ? void 0 : _a.indexOf(",")) > -1 ? this.defaultGlobalId.split(",") : [this.defaultGlobalId];
428
+ const defaultOid = !this.defaultOid ? undefined :
429
+ ((_b = this.defaultOid) === null || _b === void 0 ? void 0 : _b.indexOf(",")) > -1 ? this.defaultOid.split(",").map(o => parseInt(o, 10)) : [parseInt(this.defaultOid, 10)];
430
+ 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 }))));
458
431
  }
459
432
  /**
460
433
  * Update the component layout when its size changes
@@ -507,17 +480,22 @@ const CrowdsourceManager$1 = /*@__PURE__*/ proxyCustomElement(class CrowdsourceM
507
480
  * @protected
508
481
  */
509
482
  async _setMapView() {
483
+ var _a;
510
484
  this._mapInfo = this._getMapInfo(this._mapChange.id);
511
485
  this._mapView = this._mapChange.mapView;
512
486
  this._initMapZoom();
513
487
  this._mapView.popupEnabled = false;
514
- if (this._defaultCenter && this._defaultLevel) {
488
+ const center = !this.defaultCenter || this._defaultCenterHonored ?
489
+ undefined : (_a = this.defaultCenter) === null || _a === void 0 ? void 0 : _a.split(";").map(v => parseFloat(v));
490
+ const zoom = !this.defaultLevel || this._defaultLevelHonored ?
491
+ undefined : parseInt(this.defaultLevel, 10);
492
+ if (center && zoom) {
515
493
  await this._mapView.goTo({
516
- center: this._defaultCenter,
517
- zoom: this._defaultLevel
494
+ center,
495
+ zoom
518
496
  });
519
- this._defaultCenter = undefined;
520
- this._defaultLevel = undefined;
497
+ this._defaultCenterHonored = true;
498
+ this._defaultLevelHonored = true;
521
499
  }
522
500
  }
523
501
  /**
@@ -549,17 +527,11 @@ const CrowdsourceManager$1 = /*@__PURE__*/ proxyCustomElement(class CrowdsourceM
549
527
  }
550
528
  get el() { return this; }
551
529
  static get watchers() { return {
552
- "defaultCenter": ["defaultCenterWatchHandler"],
553
- "defaultFilter": ["defaultFilterWatchHandler"],
554
- "defaultGlobalId": ["defaultGlobalIdWatchHandler"],
555
- "defaultOid": ["defaultOidWatchHandler"],
556
- "defaultLevel": ["defaultLevelWatchHandler"],
557
530
  "enableZoom": ["enableZoomWatchHandler"]
558
531
  }; }
559
532
  static get style() { return crowdsourceManagerCss; }
560
533
  }, [0, "crowdsource-manager", {
561
534
  "defaultCenter": [1, "default-center"],
562
- "defaultFilter": [1, "default-filter"],
563
535
  "defaultGlobalId": [1, "default-global-id"],
564
536
  "defaultLayer": [1, "default-layer"],
565
537
  "defaultLevel": [1, "default-level"],
@@ -599,11 +571,6 @@ const CrowdsourceManager$1 = /*@__PURE__*/ proxyCustomElement(class CrowdsourceM
599
571
  "_numSelected": [32],
600
572
  "_tableOnly": [32]
601
573
  }, [[8, "featureSelectionChange", "featureSelectionChange"], [8, "popupClosed", "popupClosed"], [8, "idsFound", "idsFound"], [8, "layoutChanged", "layoutChanged"], [8, "mapChanged", "mapChanged"], [8, "beforeMapChanged", "beforeMapChanged"], [8, "layerSelectionChange", "layerSelectionChange"]], {
602
- "defaultCenter": ["defaultCenterWatchHandler"],
603
- "defaultFilter": ["defaultFilterWatchHandler"],
604
- "defaultGlobalId": ["defaultGlobalIdWatchHandler"],
605
- "defaultOid": ["defaultOidWatchHandler"],
606
- "defaultLevel": ["defaultLevelWatchHandler"],
607
574
  "enableZoom": ["enableZoomWatchHandler"]
608
575
  }]);
609
576
  function defineCustomElement$1() {