@esri/solutions-components 0.7.45 → 0.7.46

Sign up to get free protection for your applications and to get access to all the features.
@@ -92,6 +92,7 @@ export class LayerTable {
92
92
  this._selectAllActive = false;
93
93
  this._showHideOpen = false;
94
94
  this._showOnlySelected = false;
95
+ this._toolInfos = undefined;
95
96
  this._translations = undefined;
96
97
  }
97
98
  //--------------------------------------------------------------------------
@@ -176,15 +177,18 @@ export class LayerTable {
176
177
  * watch for changes in layer view and verify if it has editing enabled
177
178
  */
178
179
  async _layerWatchHandler() {
179
- var _a, _b, _c;
180
+ var _a;
180
181
  this._fetchingData = true;
181
- this._definitionExpression = (_a = this._layer) === null || _a === void 0 ? void 0 : _a.definitionExpression;
182
- this._floorField = (_c = (_b = this._layer) === null || _b === void 0 ? void 0 : _b.floorInfo) === null || _c === void 0 ? void 0 : _c.floorField;
183
- this._updateFloorDefinitionExpression();
184
- await this._resetTable();
185
- this._updateShareUrl();
186
- this._initLayerExpressions();
187
- this._fetchingData = false;
182
+ await ((_a = this._layer) === null || _a === void 0 ? void 0 : _a.when(async () => {
183
+ var _a;
184
+ this._definitionExpression = this._layer.definitionExpression;
185
+ this._floorField = (_a = this._layer.floorInfo) === null || _a === void 0 ? void 0 : _a.floorField;
186
+ this._updateFloorDefinitionExpression();
187
+ await this._resetTable();
188
+ this._updateShareUrl();
189
+ this._initLayerExpressions();
190
+ this._fetchingData = false;
191
+ }));
188
192
  }
189
193
  /**
190
194
  * watch for selection changes
@@ -354,7 +358,7 @@ export class LayerTable {
354
358
  */
355
359
  _getActions() {
356
360
  const actions = this._getActionItems();
357
- return actions.reduce((prev, cur) => {
361
+ return actions === null || actions === void 0 ? void 0 : actions.reduce((prev, cur) => {
358
362
  if (cur && !cur.isOverflow) {
359
363
  prev.push(cur.isDanger ?
360
364
  this._getDangerAction(cur.icon, cur.label, cur.func, cur.disabled) :
@@ -573,7 +577,7 @@ export class LayerTable {
573
577
  if (this._timeout) {
574
578
  clearTimeout(this._timeout);
575
579
  }
576
- if (!this.isMobile) {
580
+ if (!this.isMobile && this._toolbar && this._toolInfos) {
577
581
  this._timeout = setTimeout(() => {
578
582
  clearTimeout(this._timeout);
579
583
  this._setToolbarSizeInfos();
@@ -980,7 +984,6 @@ export class LayerTable {
980
984
  this._table.view = this.mapView;
981
985
  this._checkEditEnabled();
982
986
  this._table.editingEnabled = this._editEnabled && this.enableInlineEdit;
983
- this._initToolInfos();
984
987
  await this.reactiveUtils.once(() => this._table.state === "loaded")
985
988
  .then(async () => {
986
989
  var _a, _b;
@@ -1006,6 +1009,7 @@ export class LayerTable {
1006
1009
  }
1007
1010
  this._showOnlySelected = false;
1008
1011
  await this._sortTable();
1012
+ this._initToolInfos();
1009
1013
  this._updateToolbar();
1010
1014
  });
1011
1015
  }
@@ -1747,6 +1751,7 @@ export class LayerTable {
1747
1751
  "_selectAllActive": {},
1748
1752
  "_showHideOpen": {},
1749
1753
  "_showOnlySelected": {},
1754
+ "_toolInfos": {},
1750
1755
  "_translations": {}
1751
1756
  };
1752
1757
  }
@@ -121,6 +121,7 @@ const LayerTable = /*@__PURE__*/ proxyCustomElement(class LayerTable extends HTM
121
121
  this._selectAllActive = false;
122
122
  this._showHideOpen = false;
123
123
  this._showOnlySelected = false;
124
+ this._toolInfos = undefined;
124
125
  this._translations = undefined;
125
126
  }
126
127
  //--------------------------------------------------------------------------
@@ -205,15 +206,18 @@ const LayerTable = /*@__PURE__*/ proxyCustomElement(class LayerTable extends HTM
205
206
  * watch for changes in layer view and verify if it has editing enabled
206
207
  */
207
208
  async _layerWatchHandler() {
208
- var _a, _b, _c;
209
+ var _a;
209
210
  this._fetchingData = true;
210
- this._definitionExpression = (_a = this._layer) === null || _a === void 0 ? void 0 : _a.definitionExpression;
211
- this._floorField = (_c = (_b = this._layer) === null || _b === void 0 ? void 0 : _b.floorInfo) === null || _c === void 0 ? void 0 : _c.floorField;
212
- this._updateFloorDefinitionExpression();
213
- await this._resetTable();
214
- this._updateShareUrl();
215
- this._initLayerExpressions();
216
- this._fetchingData = false;
211
+ await ((_a = this._layer) === null || _a === void 0 ? void 0 : _a.when(async () => {
212
+ var _a;
213
+ this._definitionExpression = this._layer.definitionExpression;
214
+ this._floorField = (_a = this._layer.floorInfo) === null || _a === void 0 ? void 0 : _a.floorField;
215
+ this._updateFloorDefinitionExpression();
216
+ await this._resetTable();
217
+ this._updateShareUrl();
218
+ this._initLayerExpressions();
219
+ this._fetchingData = false;
220
+ }));
217
221
  }
218
222
  /**
219
223
  * watch for selection changes
@@ -383,7 +387,7 @@ const LayerTable = /*@__PURE__*/ proxyCustomElement(class LayerTable extends HTM
383
387
  */
384
388
  _getActions() {
385
389
  const actions = this._getActionItems();
386
- return actions.reduce((prev, cur) => {
390
+ return actions === null || actions === void 0 ? void 0 : actions.reduce((prev, cur) => {
387
391
  if (cur && !cur.isOverflow) {
388
392
  prev.push(cur.isDanger ?
389
393
  this._getDangerAction(cur.icon, cur.label, cur.func, cur.disabled) :
@@ -602,7 +606,7 @@ const LayerTable = /*@__PURE__*/ proxyCustomElement(class LayerTable extends HTM
602
606
  if (this._timeout) {
603
607
  clearTimeout(this._timeout);
604
608
  }
605
- if (!this.isMobile) {
609
+ if (!this.isMobile && this._toolbar && this._toolInfos) {
606
610
  this._timeout = setTimeout(() => {
607
611
  clearTimeout(this._timeout);
608
612
  this._setToolbarSizeInfos();
@@ -1009,7 +1013,6 @@ const LayerTable = /*@__PURE__*/ proxyCustomElement(class LayerTable extends HTM
1009
1013
  this._table.view = this.mapView;
1010
1014
  this._checkEditEnabled();
1011
1015
  this._table.editingEnabled = this._editEnabled && this.enableInlineEdit;
1012
- this._initToolInfos();
1013
1016
  await this.reactiveUtils.once(() => this._table.state === "loaded")
1014
1017
  .then(async () => {
1015
1018
  var _a, _b;
@@ -1035,6 +1038,7 @@ const LayerTable = /*@__PURE__*/ proxyCustomElement(class LayerTable extends HTM
1035
1038
  }
1036
1039
  this._showOnlySelected = false;
1037
1040
  await this._sortTable();
1041
+ this._initToolInfos();
1038
1042
  this._updateToolbar();
1039
1043
  });
1040
1044
  }
@@ -1478,6 +1482,7 @@ const LayerTable = /*@__PURE__*/ proxyCustomElement(class LayerTable extends HTM
1478
1482
  "_selectAllActive": [32],
1479
1483
  "_showHideOpen": [32],
1480
1484
  "_showOnlySelected": [32],
1485
+ "_toolInfos": [32],
1481
1486
  "_translations": [32]
1482
1487
  }, [[8, "selectionChanged", "selectionChanged"], [8, "editsComplete", "editsComplete"], [8, "levelChanged", "levelChanged"], [8, "noLayersFound", "noLayersFound"]], {
1483
1488
  "enableCSV": ["enableCSVWatchHandler"],
@@ -173,6 +173,7 @@ const LayerTable = class {
173
173
  this._selectAllActive = false;
174
174
  this._showHideOpen = false;
175
175
  this._showOnlySelected = false;
176
+ this._toolInfos = undefined;
176
177
  this._translations = undefined;
177
178
  }
178
179
  //--------------------------------------------------------------------------
@@ -257,15 +258,18 @@ const LayerTable = class {
257
258
  * watch for changes in layer view and verify if it has editing enabled
258
259
  */
259
260
  async _layerWatchHandler() {
260
- var _a, _b, _c;
261
+ var _a;
261
262
  this._fetchingData = true;
262
- this._definitionExpression = (_a = this._layer) === null || _a === void 0 ? void 0 : _a.definitionExpression;
263
- this._floorField = (_c = (_b = this._layer) === null || _b === void 0 ? void 0 : _b.floorInfo) === null || _c === void 0 ? void 0 : _c.floorField;
264
- this._updateFloorDefinitionExpression();
265
- await this._resetTable();
266
- this._updateShareUrl();
267
- this._initLayerExpressions();
268
- this._fetchingData = false;
263
+ await ((_a = this._layer) === null || _a === void 0 ? void 0 : _a.when(async () => {
264
+ var _a;
265
+ this._definitionExpression = this._layer.definitionExpression;
266
+ this._floorField = (_a = this._layer.floorInfo) === null || _a === void 0 ? void 0 : _a.floorField;
267
+ this._updateFloorDefinitionExpression();
268
+ await this._resetTable();
269
+ this._updateShareUrl();
270
+ this._initLayerExpressions();
271
+ this._fetchingData = false;
272
+ }));
269
273
  }
270
274
  /**
271
275
  * watch for selection changes
@@ -435,7 +439,7 @@ const LayerTable = class {
435
439
  */
436
440
  _getActions() {
437
441
  const actions = this._getActionItems();
438
- return actions.reduce((prev, cur) => {
442
+ return actions === null || actions === void 0 ? void 0 : actions.reduce((prev, cur) => {
439
443
  if (cur && !cur.isOverflow) {
440
444
  prev.push(cur.isDanger ?
441
445
  this._getDangerAction(cur.icon, cur.label, cur.func, cur.disabled) :
@@ -654,7 +658,7 @@ const LayerTable = class {
654
658
  if (this._timeout) {
655
659
  clearTimeout(this._timeout);
656
660
  }
657
- if (!this.isMobile) {
661
+ if (!this.isMobile && this._toolbar && this._toolInfos) {
658
662
  this._timeout = setTimeout(() => {
659
663
  clearTimeout(this._timeout);
660
664
  this._setToolbarSizeInfos();
@@ -1061,7 +1065,6 @@ const LayerTable = class {
1061
1065
  this._table.view = this.mapView;
1062
1066
  this._checkEditEnabled();
1063
1067
  this._table.editingEnabled = this._editEnabled && this.enableInlineEdit;
1064
- this._initToolInfos();
1065
1068
  await this.reactiveUtils.once(() => this._table.state === "loaded")
1066
1069
  .then(async () => {
1067
1070
  var _a, _b;
@@ -1087,6 +1090,7 @@ const LayerTable = class {
1087
1090
  }
1088
1091
  this._showOnlySelected = false;
1089
1092
  await this._sortTable();
1093
+ this._initToolInfos();
1090
1094
  this._updateToolbar();
1091
1095
  });
1092
1096
  }