@esri/solutions-components 0.7.47 → 0.7.49

Sign up to get free protection for your applications and to get access to all the features.
Files changed (41) hide show
  1. package/dist/cjs/basemap-gallery_7.cjs.entry.js +13 -5
  2. package/dist/cjs/calcite-input-date-picker_3.cjs.entry.js +5 -5
  3. package/dist/cjs/card-manager_3.cjs.entry.js +43 -13
  4. package/dist/cjs/instant-apps-export.cjs.entry.js +5 -5
  5. package/dist/cjs/instant-apps-interactive-legend-classic.cjs.entry.js +16 -1
  6. package/dist/cjs/loader.cjs.js +1 -1
  7. package/dist/cjs/solutions-components.cjs.js +1 -1
  8. package/dist/collection/components/floor-filter/floor-filter.js +41 -5
  9. package/dist/collection/components/layer-table/layer-table.js +55 -13
  10. package/dist/collection/demos/crowdsource-manager.html +6 -0
  11. package/dist/components/floor-filter2.js +13 -5
  12. package/dist/components/instant-apps-export.js +5 -5
  13. package/dist/components/instant-apps-filter-list2.js +3 -3
  14. package/dist/components/instant-apps-interactive-legend-classic2.js +16 -1
  15. package/dist/components/instant-apps-social-share2.js +2 -2
  16. package/dist/components/layer-table2.js +44 -14
  17. package/dist/esm/basemap-gallery_7.entry.js +13 -5
  18. package/dist/esm/calcite-input-date-picker_3.entry.js +5 -5
  19. package/dist/esm/card-manager_3.entry.js +43 -13
  20. package/dist/esm/instant-apps-export.entry.js +5 -5
  21. package/dist/esm/instant-apps-interactive-legend-classic.entry.js +16 -1
  22. package/dist/esm/loader.js +1 -1
  23. package/dist/esm/solutions-components.js +1 -1
  24. package/dist/node_modules/@esri/instant-apps-components/dist/collection/components/instant-apps-filter-list/instant-apps-filter-list.css +2 -4
  25. package/dist/node_modules/@esri/instant-apps-components/dist/collection/components/instant-apps-social-share/instant-apps-social-share.css +5 -0
  26. package/dist/solutions-components/demos/crowdsource-manager.html +6 -0
  27. package/dist/solutions-components/p-6a83b842.entry.js +6 -0
  28. package/dist/solutions-components/p-6d9f6b6a.entry.js +6 -0
  29. package/dist/solutions-components/p-8595b4aa.entry.js +17 -0
  30. package/dist/solutions-components/p-ce4eed51.entry.js +6 -0
  31. package/dist/solutions-components/{p-f5b259f3.entry.js → p-de459c0a.entry.js} +1 -1
  32. package/dist/solutions-components/solutions-components.esm.js +1 -1
  33. package/dist/types/components/floor-filter/floor-filter.d.ts +16 -0
  34. package/dist/types/components/layer-table/layer-table.d.ts +21 -1
  35. package/dist/types/components.d.ts +10 -0
  36. package/dist/types/preact.d.ts +3 -1
  37. package/package.json +2 -2
  38. package/dist/solutions-components/p-26764dd7.entry.js +0 -6
  39. package/dist/solutions-components/p-704c9ba1.entry.js +0 -17
  40. package/dist/solutions-components/p-ac2799f6.entry.js +0 -6
  41. package/dist/solutions-components/p-fc4df904.entry.js +0 -6
@@ -74,22 +74,28 @@ export class FloorFilter {
74
74
  * Initialize the floor filter or reset the current view if it already exists
75
75
  */
76
76
  _initFloorFilter(view) {
77
- var _a;
77
+ var _a, _b, _c, _d;
78
78
  if (view && this.enabled && this.FloorFilter && ((_a = view === null || view === void 0 ? void 0 : view.map) === null || _a === void 0 ? void 0 : _a.floorInfo)) {
79
79
  if (!this.floorFilterWidget) {
80
80
  this.floorFilterWidget = new this.FloorFilter({
81
81
  container: this._floorFilterElement,
82
82
  view
83
83
  });
84
- if (this._levelHandle) {
85
- this._levelHandle.remove();
86
- }
84
+ (_b = this._facilityHandle) === null || _b === void 0 ? void 0 : _b.remove();
85
+ this._facilityHandle = this.reactiveUtils.watch(() => this.floorFilterWidget.facility, (facility) => {
86
+ this.facilityChanged.emit(facility);
87
+ });
88
+ (_c = this._levelHandle) === null || _c === void 0 ? void 0 : _c.remove();
87
89
  this._levelHandle = this.reactiveUtils.watch(() => this.floorFilterWidget.level, (level) => {
88
90
  this.levelChanged.emit(level);
89
91
  });
92
+ (_d = this._siteHandle) === null || _d === void 0 ? void 0 : _d.remove();
93
+ this._siteHandle = this.reactiveUtils.watch(() => this.floorFilterWidget.site, (site) => {
94
+ this.siteChanged.emit(site);
95
+ });
90
96
  }
91
97
  else {
92
- this.floorFilterWidget.view = view;
98
+ this.floorFilterWidget.viewModel.view = view;
93
99
  }
94
100
  }
95
101
  }
@@ -168,6 +174,21 @@ export class FloorFilter {
168
174
  }
169
175
  static get events() {
170
176
  return [{
177
+ "method": "facilityChanged",
178
+ "name": "facilityChanged",
179
+ "bubbles": true,
180
+ "cancelable": true,
181
+ "composed": true,
182
+ "docs": {
183
+ "tags": [],
184
+ "text": "Emitted on demand when the Facility is changed"
185
+ },
186
+ "complexType": {
187
+ "original": "string",
188
+ "resolved": "string",
189
+ "references": {}
190
+ }
191
+ }, {
171
192
  "method": "levelChanged",
172
193
  "name": "levelChanged",
173
194
  "bubbles": true,
@@ -182,6 +203,21 @@ export class FloorFilter {
182
203
  "resolved": "string",
183
204
  "references": {}
184
205
  }
206
+ }, {
207
+ "method": "siteChanged",
208
+ "name": "siteChanged",
209
+ "bubbles": true,
210
+ "cancelable": true,
211
+ "composed": true,
212
+ "docs": {
213
+ "tags": [],
214
+ "text": "Emitted on demand when the Site is changed"
215
+ },
216
+ "complexType": {
217
+ "original": "string",
218
+ "resolved": "string",
219
+ "references": {}
220
+ }
185
221
  }];
186
222
  }
187
223
  static get elementRef() { return "el"; }
@@ -156,6 +156,8 @@ export class LayerTable {
156
156
  * watch for changes in map info and update the toolbar
157
157
  */
158
158
  async mapInfoWatchHandler() {
159
+ this._resetColumnTemplates();
160
+ this._initLayerExpressions();
159
161
  this._initToolInfos();
160
162
  this._updateToolbar();
161
163
  }
@@ -167,6 +169,7 @@ export class LayerTable {
167
169
  this._mapClickHandle.remove();
168
170
  }
169
171
  if (this.mapView) {
172
+ this._floorExpression = undefined;
170
173
  this._updateShareUrl();
171
174
  this._mapClickHandle = this.reactiveUtils.on(() => this.mapView, "click", (event) => {
172
175
  void this._mapClicked(event);
@@ -185,8 +188,8 @@ export class LayerTable {
185
188
  this._floorField = (_a = this._layer.floorInfo) === null || _a === void 0 ? void 0 : _a.floorField;
186
189
  this._updateFloorDefinitionExpression();
187
190
  await this._resetTable();
188
- this._updateShareUrl();
189
191
  this._initLayerExpressions();
192
+ this._updateShareUrl();
190
193
  this._fetchingData = false;
191
194
  }));
192
195
  }
@@ -235,6 +238,13 @@ export class LayerTable {
235
238
  }
236
239
  await this._refresh();
237
240
  }
241
+ /**
242
+ * Refresh the table when floor filter facility is changed
243
+ */
244
+ async facilityChanged(evt) {
245
+ this._floorFacility = evt.detail;
246
+ this._updateFloorDefinitionExpression();
247
+ }
238
248
  /**
239
249
  * Refresh the table when floor filter level is changed
240
250
  */
@@ -242,6 +252,13 @@ export class LayerTable {
242
252
  this._floorLevel = evt.detail;
243
253
  this._updateFloorDefinitionExpression();
244
254
  }
255
+ /**
256
+ * Refresh the table when floor filter site is changed
257
+ */
258
+ async siteChanged(evt) {
259
+ this._floorSite = evt.detail;
260
+ this._updateFloorDefinitionExpression();
261
+ }
245
262
  /**
246
263
  * Refresh the table when
247
264
  */
@@ -538,7 +555,12 @@ export class LayerTable {
538
555
  */
539
556
  _updateFloorDefinitionExpression() {
540
557
  if (this._floorField && this._floorLevel) {
541
- this._layer.definitionExpression = `${this._floorField} = '${this._floorLevel}'`;
558
+ const floorExp = `${this._floorField} = '${this._floorLevel}'`;
559
+ const defExp = this._layer.definitionExpression;
560
+ this._layer.definitionExpression = (defExp === null || defExp === void 0 ? void 0 : defExp.indexOf(this._floorExpression)) > -1 ?
561
+ defExp.replace(this._floorExpression, floorExp) :
562
+ defExp ? `${defExp} AND (${floorExp})` : floorExp;
563
+ this._floorExpression = floorExp;
542
564
  }
543
565
  }
544
566
  /**
@@ -854,8 +876,6 @@ export class LayerTable {
854
876
  container: node
855
877
  });
856
878
  });
857
- this._initColumnsInfo();
858
- this._checkEditEnabled();
859
879
  await this._table.when(() => {
860
880
  this._table.highlightIds.on("change", (evt) => {
861
881
  void this._handleOnChange(evt);
@@ -973,20 +993,20 @@ export class LayerTable {
973
993
  async _resetTable() {
974
994
  var _a;
975
995
  this._clearSelection();
976
- this._allIds = [];
977
- this.featureSelectionChange.emit(this.selectedIds);
978
- const columnTemplates = this._getColumnTemplates(this._layer.id, (_a = this._layer) === null || _a === void 0 ? void 0 : _a.fields);
979
996
  this._allIds = await queryAllIds(this._layer);
980
997
  if (!this._table) {
998
+ const columnTemplates = this._getColumnTemplates(this._layer.id, (_a = this._layer) === null || _a === void 0 ? void 0 : _a.fields);
981
999
  await this._getTable(this._tableNode, columnTemplates);
982
1000
  }
983
- this._table.layer = this._layer;
984
- this._table.view = this.mapView;
1001
+ else {
1002
+ this._table.view = this.mapView;
1003
+ this._table.layer = this._layer;
1004
+ }
985
1005
  this._checkEditEnabled();
986
1006
  this._table.editingEnabled = this._editEnabled && this.enableInlineEdit;
987
1007
  await this.reactiveUtils.once(() => this._table.state === "loaded")
988
1008
  .then(async () => {
989
- var _a, _b;
1009
+ var _a, _b, _c;
990
1010
  this._table.highlightIds.removeAll();
991
1011
  this._table.clearSelectionFilter();
992
1012
  this._resetColumnTemplates();
@@ -1002,7 +1022,7 @@ export class LayerTable {
1002
1022
  }
1003
1023
  this._defaultGlobalIdHonored = true;
1004
1024
  }
1005
- if (!this._defaultFilterHonored && this.defaultFilter && this._filterList) {
1025
+ if (!this._defaultFilterHonored && ((_c = this.defaultFilter) === null || _c === void 0 ? void 0 : _c.length) > 0 && this._filterList) {
1006
1026
  this._layerExpressions = this.defaultFilter;
1007
1027
  this._filterActive = true;
1008
1028
  this._defaultFilterHonored = true;
@@ -1141,7 +1161,15 @@ export class LayerTable {
1141
1161
  * Check if the layers definitionExpression has been modified
1142
1162
  */
1143
1163
  _handleFilterUpdate() {
1144
- this._filterActive = this._definitionExpression !== this._layer.definitionExpression;
1164
+ const defExp = this._layer.definitionExpression;
1165
+ if (this._floorExpression) {
1166
+ const regEx = new RegExp(`${this._floorField} = ['].+[']`, "gm");
1167
+ this._layer.definitionExpression = defExp && this._floorField && defExp.indexOf(`${this._floorField} = '`) > -1 ?
1168
+ defExp.replace(regEx, this._floorExpression) : defExp ?
1169
+ `${defExp} AND (${this._floorExpression})` : this._floorExpression;
1170
+ }
1171
+ this._filterActive = this._definitionExpression !== this._layer.definitionExpression &&
1172
+ (this._floorExpression ? this._layer.definitionExpression !== this._floorExpression : true);
1145
1173
  this._updateShareUrl();
1146
1174
  }
1147
1175
  /**
@@ -1229,7 +1257,9 @@ export class LayerTable {
1229
1257
  const layerExpressions = (_b = (_a = this.mapInfo) === null || _a === void 0 ? void 0 : _a.filterConfig) === null || _b === void 0 ? void 0 : _b.layerExpressions;
1230
1258
  this._layerExpressions = layerExpressions ? layerExpressions.filter((exp) => { var _a; return exp.id === ((_a = this._layer) === null || _a === void 0 ? void 0 : _a.id); }) : [];
1231
1259
  this._filterList.layerExpressions = this._layerExpressions;
1232
- this._filterActive = false;
1260
+ this._filterActive = this._layerExpressions.filter(lyrExp => {
1261
+ return lyrExp.expressions.filter(exp => exp.active).length > 0;
1262
+ }).length > 0;
1233
1263
  }
1234
1264
  /**
1235
1265
  * Select all rows that are not currently selectd
@@ -1817,12 +1847,24 @@ export class LayerTable {
1817
1847
  "target": "window",
1818
1848
  "capture": false,
1819
1849
  "passive": false
1850
+ }, {
1851
+ "name": "facilityChanged",
1852
+ "method": "facilityChanged",
1853
+ "target": "window",
1854
+ "capture": false,
1855
+ "passive": false
1820
1856
  }, {
1821
1857
  "name": "levelChanged",
1822
1858
  "method": "levelChanged",
1823
1859
  "target": "window",
1824
1860
  "capture": false,
1825
1861
  "passive": false
1862
+ }, {
1863
+ "name": "siteChanged",
1864
+ "method": "siteChanged",
1865
+ "target": "window",
1866
+ "capture": false,
1867
+ "passive": false
1826
1868
  }, {
1827
1869
  "name": "noLayersFound",
1828
1870
  "method": "noLayersFound",
@@ -38,6 +38,12 @@
38
38
  <script type="module" src="../solutions-components.esm.js"></script>
39
39
 
40
40
  <script>
41
+ // require(["esri/config"], (
42
+ // esriConfig
43
+ // ) => {
44
+ // esriConfig.portalUrl = "https://holistic.mapsdevext.arcgis.com";
45
+ // });
46
+
41
47
  function addValues() {
42
48
  const demo = document.getElementById("demo");
43
49
 
@@ -13,7 +13,9 @@ const FloorFilter = /*@__PURE__*/ proxyCustomElement(class FloorFilter extends H
13
13
  super();
14
14
  this.__registerHost();
15
15
  this.__attachShadow();
16
+ this.facilityChanged = createEvent(this, "facilityChanged", 7);
16
17
  this.levelChanged = createEvent(this, "levelChanged", 7);
18
+ this.siteChanged = createEvent(this, "siteChanged", 7);
17
19
  this.enabled = undefined;
18
20
  this.floorFilterWidget = undefined;
19
21
  this.mapView = undefined;
@@ -66,22 +68,28 @@ const FloorFilter = /*@__PURE__*/ proxyCustomElement(class FloorFilter extends H
66
68
  * Initialize the floor filter or reset the current view if it already exists
67
69
  */
68
70
  _initFloorFilter(view) {
69
- var _a;
71
+ var _a, _b, _c, _d;
70
72
  if (view && this.enabled && this.FloorFilter && ((_a = view === null || view === void 0 ? void 0 : view.map) === null || _a === void 0 ? void 0 : _a.floorInfo)) {
71
73
  if (!this.floorFilterWidget) {
72
74
  this.floorFilterWidget = new this.FloorFilter({
73
75
  container: this._floorFilterElement,
74
76
  view
75
77
  });
76
- if (this._levelHandle) {
77
- this._levelHandle.remove();
78
- }
78
+ (_b = this._facilityHandle) === null || _b === void 0 ? void 0 : _b.remove();
79
+ this._facilityHandle = this.reactiveUtils.watch(() => this.floorFilterWidget.facility, (facility) => {
80
+ this.facilityChanged.emit(facility);
81
+ });
82
+ (_c = this._levelHandle) === null || _c === void 0 ? void 0 : _c.remove();
79
83
  this._levelHandle = this.reactiveUtils.watch(() => this.floorFilterWidget.level, (level) => {
80
84
  this.levelChanged.emit(level);
81
85
  });
86
+ (_d = this._siteHandle) === null || _d === void 0 ? void 0 : _d.remove();
87
+ this._siteHandle = this.reactiveUtils.watch(() => this.floorFilterWidget.site, (site) => {
88
+ this.siteChanged.emit(site);
89
+ });
82
90
  }
83
91
  else {
84
- this.floorFilterWidget.view = view;
92
+ this.floorFilterWidget.viewModel.view = view;
85
93
  }
86
94
  }
87
95
  }
@@ -664,13 +664,13 @@ const InstantAppsExport$1 = /*@__PURE__*/ proxyCustomElement(class InstantAppsEx
664
664
  });
665
665
  }
666
666
  updateScaleBar() {
667
- var _a, _b, _c;
668
- if (this.scaleBarContainerEl) {
667
+ if (this.scaleBarContainerEl && this.view != null) {
669
668
  this.scaleBarContainerEl.innerHTML = '';
670
669
  if (this.showScaleBar) {
671
- const scaleBar = (_c = (_b = (_a = this.view) === null || _a === void 0 ? void 0 : _a.container) === null || _b === void 0 ? void 0 : _b.querySelector('.esri-scale-bar.esri-widget')) === null || _c === void 0 ? void 0 : _c.cloneNode(true);
672
- if (scaleBar != null) {
673
- this.scaleBarContainerEl.append(scaleBar);
670
+ const widgets = this.view.ui.getComponents();
671
+ const scaleBar = widgets === null || widgets === void 0 ? void 0 : widgets.find(({ container }) => { var _a; return (_a = container === null || container === void 0 ? void 0 : container.className) === null || _a === void 0 ? void 0 : _a.includes('esri-scale-bar'); });
672
+ if ((scaleBar === null || scaleBar === void 0 ? void 0 : scaleBar.container) != null && typeof scaleBar.container !== 'string') {
673
+ this.scaleBarContainerEl.append(scaleBar.container.cloneNode(true));
674
674
  }
675
675
  }
676
676
  }
@@ -65,7 +65,7 @@ function resetDatePicker(datePicker) {
65
65
  }
66
66
  }
67
67
 
68
- const instantAppsFilterListCss = ":host{display:block}.instant-apps-filter-list *{box-sizing:border-box}.instant-apps-filter-list__container{height:100%}.instant-apps-filter-list__container calcite-block:last-of-type{margin-bottom:0}.instant-apps-filter-list__footer{padding:12px;display:flex}.instant-apps-filter-list__footer calcite-button:nth-child(2){margin-left:6px}.instant-apps-filter-list__item-container,.instant-apps-filter-list__item-container--user-input{display:flex;justify-content:space-between;align-items:center}.instant-apps-filter-list__item-container:not(:last-child),.instant-apps-filter-list__item-container--user-input:not(:last-child){padding-bottom:20px}.instant-apps-filter-list__item-container--user-input{margin:0;display:flex;flex-direction:column;align-items:flex-start}.instant-apps-filter-list__item-container--user-input>span{margin:0 0 6px;font-size:14px;font-weight:normal}.instant-apps-filter-list__item-container--user-input calcite-combobox{width:100%;--calcite-font-size--1:16px}.instant-apps-filter-list__item-container--user-input calcite-combobox-item{--calcite-font-size--1:12px}.instant-apps-filter-list__number-input-container{width:100%;display:flex;justify-content:center}.instant-apps-filter-list__number-input-container calcite-slider{width:90%}.instant-apps-filter-list__date-picker-input-container{display:flex;align-items:center;justify-content:unset;width:100%}.instant-apps-filter-list__date-picker-input-container calcite-action{height:64px;border-top:1px solid var(--calcite-color-border-input);border-right:1px solid var(--calcite-color-border-input);border-bottom:1px solid var(--calcite-color-border-input)}.instant-apps-filter-list__title{margin-right:20px}.instant-apps-filter-list__title>p{font-size:14px;font-weight:normal;margin:0}.instant-apps-filter-list__checkbox-container{display:flex}.instant-apps-filter-list__checkbox-container calcite-checkbox{height:18px}.instant-apps-filter-list__operator-description{margin:0;--calcite-font-size--1:12px}.instant-apps-filter-list__zoom-to{display:flex;justify-content:flex-end;margin:8px 0 20px}.instant-apps-filter-list__zoom-to calcite-action{width:-moz-min-content;width:min-content}.instant-apps-filter-list calcite-input-date-picker{--calcite-font-size--1:16px}@media (prefers-reduced-motion){.instant-apps-filter-list calcite-loader{--calcite-internal-duration-factor:2;--calcite-internal-animation-timing-slow:calc(300ms * 2)}}.instant-apps-filter-list.calcite-mode-dark .instant-apps-filter-list__header-container{background:#2b2b2b;color:#fff}.instant-apps-filter-list.calcite-mode-dark .instant-apps-filter-list__operator-description{background:#353535}";
68
+ const instantAppsFilterListCss = ":host{display:block}.instant-apps-filter-list *{box-sizing:border-box}.instant-apps-filter-list__container{height:100%}.instant-apps-filter-list__container calcite-block:last-of-type{margin-bottom:0}.instant-apps-filter-list__footer{padding:12px;display:flex}.instant-apps-filter-list__footer calcite-button:nth-child(2){margin-left:6px}.instant-apps-filter-list__item-container,.instant-apps-filter-list__item-container--user-input{display:flex;justify-content:space-between;align-items:center}.instant-apps-filter-list__item-container:not(:last-child),.instant-apps-filter-list__item-container--user-input:not(:last-child){padding-bottom:20px}.instant-apps-filter-list__item-container--user-input{margin:0;display:flex;flex-direction:column;align-items:flex-start}.instant-apps-filter-list__item-container--user-input>span{margin:0 0 6px;font-size:14px;font-weight:normal}.instant-apps-filter-list__item-container--user-input calcite-combobox{width:100%;font-size:16px;--calcite-combobox-input-height:24px}.instant-apps-filter-list__number-input-container{width:100%;display:flex;justify-content:center}.instant-apps-filter-list__number-input-container calcite-slider{width:90%}.instant-apps-filter-list__date-picker-input-container{display:flex;align-items:center;justify-content:unset;width:100%}.instant-apps-filter-list__date-picker-input-container calcite-action{height:64px;border-top:1px solid var(--calcite-color-border-input);border-right:1px solid var(--calcite-color-border-input);border-bottom:1px solid var(--calcite-color-border-input)}.instant-apps-filter-list__title{margin-right:20px}.instant-apps-filter-list__title>p{font-size:14px;font-weight:normal;margin:0}.instant-apps-filter-list__checkbox-container{display:flex}.instant-apps-filter-list__checkbox-container calcite-checkbox{height:18px}.instant-apps-filter-list__operator-description{margin:0;--calcite-font-size--1:12px}.instant-apps-filter-list__zoom-to{display:flex;justify-content:flex-end;margin:8px 0 20px}.instant-apps-filter-list__zoom-to calcite-action{width:-moz-min-content;width:min-content}.instant-apps-filter-list calcite-input-date-picker{--calcite-font-size--1:16px}@media (prefers-reduced-motion){.instant-apps-filter-list calcite-loader{--calcite-internal-duration-factor:2;--calcite-internal-animation-timing-slow:calc(300ms * 2)}}.instant-apps-filter-list.calcite-mode-dark .instant-apps-filter-list__header-container{background:#2b2b2b;color:#fff}.instant-apps-filter-list.calcite-mode-dark .instant-apps-filter-list__operator-description{background:#353535}";
69
69
 
70
70
  const CSS = {
71
71
  base: 'instant-apps-filter-list',
@@ -91,7 +91,7 @@ const InstantAppsFilterList = /*@__PURE__*/ proxyCustomElement(class InstantApps
91
91
  this.autoUpdateUrl = false;
92
92
  this.closeBtn = false;
93
93
  this.closeBtnOnClick = undefined;
94
- this.comboboxOverlayPositioning = "absolute";
94
+ this.comboboxOverlayPositioning = 'absolute';
95
95
  this.closeBtnText = undefined;
96
96
  this.openFilters = false;
97
97
  this.extentSelector = false;
@@ -188,7 +188,7 @@ const InstantAppsFilterList = /*@__PURE__*/ proxyCustomElement(class InstantApps
188
188
  }
189
189
  renderCombobox(layerExpression, expression) {
190
190
  var _a;
191
- return (h("label", { key: "combo-select", class: CSS.filterUIItemContainer }, h("span", null, expression.name), h("calcite-combobox", { id: expression.id.toString(), onCalciteComboboxChange: this.handleComboSelect.bind(this, expression, layerExpression), label: expression.name, placeholder: expression.placeholder, selectionMode: "multiple", "max-items": "6", overlayPositioning: this.comboboxOverlayPositioning }, (_a = expression.fields) === null || _a === void 0 ? void 0 : _a.map((value, index) => this.renderComboboxItem(expression, value, index)))));
191
+ return (h("label", { key: "combo-select", class: CSS.filterUIItemContainer }, h("span", null, expression.name), h("calcite-combobox", { id: expression.id.toString(), onCalciteComboboxChange: this.handleComboSelect.bind(this, expression, layerExpression), label: expression.name, placeholder: expression.placeholder, selectionMode: "multiple", "max-items": "6", scale: "s", overlayPositioning: this.comboboxOverlayPositioning }, (_a = expression.fields) === null || _a === void 0 ? void 0 : _a.map((value, index) => this.renderComboboxItem(expression, value, index)))));
192
192
  }
193
193
  renderComboboxItem(expression, value, index) {
194
194
  var _a;
@@ -1200,11 +1200,26 @@ const InstantAppsInteractiveLegendClassic = /*@__PURE__*/ proxyCustomElement(cla
1200
1200
  var _a, _b, _c, _d;
1201
1201
  try {
1202
1202
  // Initial data setup
1203
+ // Loads map/basemap
1203
1204
  const map = await ((_c = (_b = (_a = this.legendvm) === null || _a === void 0 ? void 0 : _a.view) === null || _b === void 0 ? void 0 : _b.map) === null || _c === void 0 ? void 0 : _c.load());
1204
1205
  await ((_d = map === null || map === void 0 ? void 0 : map.basemap) === null || _d === void 0 ? void 0 : _d.load());
1206
+ // Loads all layers in webmap and waits until all settled promises
1205
1207
  const allLayers = map === null || map === void 0 ? void 0 : map.allLayers;
1206
1208
  const promises = allLayers === null || allLayers === void 0 ? void 0 : allLayers.map(layer => layer.load());
1207
- await Promise.allSettled(promises);
1209
+ const settled = await Promise.allSettled(promises);
1210
+ const settledLayerPromises = settled
1211
+ .map(settledLayer => ((settledLayer === null || settledLayer === void 0 ? void 0 : settledLayer.status) === 'fulfilled' && (settledLayer === null || settledLayer === void 0 ? void 0 : settledLayer.value) ? settledLayer.value : null))
1212
+ .filter(layer => !!layer);
1213
+ // Wait until all layer views are settled/available
1214
+ const lvPromises = [];
1215
+ settledLayerPromises.forEach(layer => {
1216
+ var _a;
1217
+ if ((_a = this.legendvm) === null || _a === void 0 ? void 0 : _a.view) {
1218
+ lvPromises.push(this.legendvm.view.whenLayerView(layer));
1219
+ }
1220
+ });
1221
+ await Promise.allSettled(lvPromises);
1222
+ // Generate data once all layers/layer views are complete
1208
1223
  const data = await generateData(this.legendvm, this.reactiveUtils);
1209
1224
  store.set('data', Object.assign(Object.assign({}, interactiveLegendState.data), data));
1210
1225
  this.isLoading = false;
@@ -12,7 +12,7 @@ import { d as defineCustomElement$3 } from './icon.js';
12
12
  import { d as defineCustomElement$2 } from './loader.js';
13
13
  import { d as defineCustomElement$1 } from './popover.js';
14
14
 
15
- const instantAppsSocialShareCss = ":host{display:block;--instant-apps-social-share-width--s:200px;--instant-apps-social-share-width--m:280px;--instant-apps-social-share-width--l:320px;--instant-apps-social-share-width-horizontal--s:300px;--instant-apps-social-share-width-horizontal--m:380px;--instant-apps-social-share-width-horizontal--l:420px;--instant-apps-social-share-background-color:var(--calcite-color-foreground-1);--instant-apps-social-share-popover-button-background-color:transparent;--instant-apps-social-share-popover-button-icon-color:var(--calcite-ui-icon-color);--instant-apps-social-share-embed-border:1px solid $border;--instant-apps-social-share-embed-text-area-text:#468540}:host .instant-apps-social-share__popover-button{background-color:var(--instant-apps-social-share-popover-button-background-color)}:host .instant-apps-social-share__popover-button calcite-icon{color:var(--instant-apps-social-share-popover-button-icon-color)}:host .instant-apps-social-share__dialog,:host .instant-apps-social-share__dialog-embed{background-color:var(--instant-apps-social-share-background-color);border:var(--instant-apps-social-share-embed-border)}:host .instant-apps-social-share__dialog{box-sizing:border-box;height:auto;padding:10px 0;border-radius:5px}:host .instant-apps-social-share__options{margin:0;padding:1% 0 0 0;list-style-type:none}:host .instant-apps-social-share__options li{box-sizing:border-box;display:flex;align-items:center;width:100%;padding:5%;transition:background-color 0.15s ease-out 0s}:host .instant-apps-social-share__options li .instant-apps-social-share__icon,:host .instant-apps-social-share__options li .instant-apps-social-share__option-text{display:inline-block}:host .instant-apps-social-share__options li .instant-apps-social-share__icon{display:flex;align-items:center}:host .instant-apps-social-share__options li .instant-apps-social-share__option-text{width:85%;margin-left:10px;word-break:break-word}:host .instant-apps-social-share__options li .instant-apps-social-share__option-text--rtl{margin-left:0;margin-right:10px}:host .instant-apps-social-share__options li:hover{cursor:pointer;background-color:var(--calcite-color-foreground-2)}:host .instant-apps-social-share__tip{box-sizing:border-box;padding:0 5% 1% 5%}:host .instant-apps-social-share__tip-header{display:flex;align-items:center;color:#007ac2;margin:8px 0 5px 0}:host .instant-apps-social-share__tip-header calcite-icon{margin-right:5px}:host .instant-apps-social-share__tip-content{line-height:17px;margin:0;padding-top:2%}:host .instant-apps-social-share__success{display:flex;flex-direction:column;padding:15px}:host .instant-apps-social-share__success-header{display:flex;align-items:center;font-weight:bold;margin-bottom:10px}:host .instant-apps-social-share__success-icon{display:flex;align-items:center;margin-right:5px}:host .instant-apps-social-share__success-icon calcite-icon{color:var(--calcite-color-status-success)}:host .instant-apps-social-share__success-message{line-height:16px}:host .instant-apps-social-share__embed{box-sizing:border-box;width:100%;padding:5%;margin-bottom:10px;border-top:1px solid #d3d3d3}:host .instant-apps-social-share__embed-header{display:flex;align-items:center;margin-bottom:5px}:host .instant-apps-social-share__embed-header calcite-icon{margin-right:5px}:host .instant-apps-social-share__embed-code-text-area{border:1px solid #d3d3d3}:host .instant-apps-social-share__embed-code-text-area textarea{box-sizing:border-box;padding:4%;border:none;resize:none;background:transparent;width:100%;font-family:var(--calcite-sans-family);color:var(--calcite-color-text-1)}:host .instant-apps-social-share__embed-code-text-area button{display:flex;align-items:center;text-align:start;width:100%;border:none;border-top:1px solid #d3d3d3;background-color:transparent;line-height:16px;font-weight:400;padding:3%;color:var(--calcite-color-text-1)}:host .instant-apps-social-share__embed-code-text-area button calcite-icon{color:#007ac2;margin-right:3px}:host .instant-apps-social-share__embed-code-text-area button:hover{cursor:pointer;background-color:var(--calcite-color-foreground-2);transition:background-color 0.15s ease-out 0s}:host .instant-apps-social-share__embed-text-area-text{font-weight:600;color:var(--instant-apps-social-share-embed-text-area-text)}:host .instant-apps-social-share__embed .instant-apps-social-share__text-area--rtl{text-align:left}:host .instant-apps-social-share__embed-dimensions{display:flex;justify-content:space-between;margin-top:10px}:host .instant-apps-social-share__embed-dimensions-input{width:47%;box-sizing:border-box}:host .instant-apps-social-share__embed-dimensions-input input{border:1px solid #d3d3d3;width:100%;height:25px;font-family:var(--calcite-sans-family)}:host .instant-apps-social-share__layout--horizontal .instant-apps-social-share__options{display:flex;justify-content:space-around;margin-bottom:8%}:host .instant-apps-social-share__layout--horizontal .instant-apps-social-share__options li{flex-direction:column;padding:0}:host .instant-apps-social-share__layout--horizontal .instant-apps-social-share__options li .instant-apps-social-share__option-text{word-break:break-word;margin-left:0;margin-top:10px;text-align:center}:host .instant-apps-social-share__layout--horizontal .instant-apps-social-share__options li:hover{background-color:unset}:host .instant-apps-social-share__icon-container{display:flex;align-items:center}:host([scale=s]) .instant-apps-social-share__dialog{width:var(--instant-apps-social-share-width--s)}:host([scale=s]) .instant-apps-social-share__icon{width:16px;height:16px}:host([scale=s]) .instant-apps-social-share__option-text{font-size:var(--calcite-font-size--1)}:host([scale=s]) .instant-apps-social-share__dialog.instant-apps-social-share__layout--horizontal{width:var(--instant-apps-social-share-width-horizontal--s)}:host([scale=s]) .instant-apps-social-share__tip-header,:host([scale=s]) .instant-apps-social-share__tip-content,:host([scale=s]) .instant-apps-social-share__embed-header,:host([scale=s]) .instant-apps-social-share__embed-dimensions-input{font-size:var(--calcite-font-size--2)}:host([scale=m]) .instant-apps-social-share__dialog{width:var(--instant-apps-social-share-width--m)}:host([scale=m]) .instant-apps-social-share__icon{width:24px;height:24px}:host([scale=m]) .instant-apps-social-share__option-text{font-size:var(--calcite-font-size-0)}:host([scale=m]) .instant-apps-social-share__dialog.instant-apps-social-share__layout--horizontal{width:var(--instant-apps-social-share-width-horizontal--m)}:host([scale=m]) .instant-apps-social-share__tip-header,:host([scale=m]) .instant-apps-social-share__tip-content,:host([scale=m]) .instant-apps-social-share__embed-header,:host([scale=m]) .instant-apps-social-share__embed-dimensions-input{font-size:var(--calcite-font-size--1)}:host([scale=l]) .instant-apps-social-share__dialog{width:var(--instant-apps-social-share-width--l)}:host([scale=l]) .instant-apps-social-share__icon{width:32px;height:32px}:host([scale=l]) .instant-apps-social-share__option-text{font-size:var(--calcite-font-size-1)}:host([scale=l]) .instant-apps-social-share__dialog.instant-apps-social-share__layout--horizontal{width:var(--instant-apps-social-share-width-horizontal--l)}:host([scale=l]) .instant-apps-social-share__tip-header,:host([scale=l]) .instant-apps-social-share__tip-content,:host([scale=l]) .instant-apps-social-share__embed-header,:host([scale=l]) .instant-apps-social-share__embed-dimensions-input{font-size:var(--calcite-font-size-0)}";
15
+ const instantAppsSocialShareCss = ":host{display:block;--instant-apps-social-share-action-width:initial;--instant-apps-social-share-width--s:200px;--instant-apps-social-share-width--m:280px;--instant-apps-social-share-width--l:320px;--instant-apps-social-share-width-horizontal--s:300px;--instant-apps-social-share-width-horizontal--m:380px;--instant-apps-social-share-width-horizontal--l:420px;--instant-apps-social-share-background-color:var(--calcite-color-foreground-1);--instant-apps-social-share-popover-button-background-color:transparent;--instant-apps-social-share-popover-button-icon-color:var(--calcite-ui-icon-color);--instant-apps-social-share-embed-border:1px solid $border;--instant-apps-social-share-embed-text-area-text:#468540}:host .instant-apps-social-share__popover-button{background-color:var(--instant-apps-social-share-popover-button-background-color)}:host .instant-apps-social-share__popover-button calcite-icon{color:var(--instant-apps-social-share-popover-button-icon-color)}:host .instant-apps-social-share__dialog,:host .instant-apps-social-share__dialog-embed{background-color:var(--instant-apps-social-share-background-color);border:var(--instant-apps-social-share-embed-border)}:host .instant-apps-social-share__dialog{box-sizing:border-box;height:auto;padding:10px 0;border-radius:5px}:host .instant-apps-social-share__options{margin:0;padding:1% 0 0 0;list-style-type:none}:host .instant-apps-social-share__options li{box-sizing:border-box;display:flex;align-items:center;width:100%;padding:5%;transition:background-color 0.15s ease-out 0s}:host .instant-apps-social-share__options li .instant-apps-social-share__icon,:host .instant-apps-social-share__options li .instant-apps-social-share__option-text{display:inline-block}:host .instant-apps-social-share__options li .instant-apps-social-share__icon{display:flex;align-items:center}:host .instant-apps-social-share__options li .instant-apps-social-share__option-text{width:85%;margin-left:10px;word-break:break-word}:host .instant-apps-social-share__options li .instant-apps-social-share__option-text--rtl{margin-left:0;margin-right:10px}:host .instant-apps-social-share__options li:hover{cursor:pointer;background-color:var(--calcite-color-foreground-2)}:host .instant-apps-social-share__tip{box-sizing:border-box;padding:0 5% 1% 5%}:host .instant-apps-social-share__tip-header{display:flex;align-items:center;color:#007ac2;margin:8px 0 5px 0}:host .instant-apps-social-share__tip-header calcite-icon{margin-right:5px}:host .instant-apps-social-share__tip-content{line-height:17px;margin:0;padding-top:2%}:host .instant-apps-social-share__success{display:flex;flex-direction:column;padding:15px}:host .instant-apps-social-share__success-header{display:flex;align-items:center;font-weight:bold;margin-bottom:10px}:host .instant-apps-social-share__success-icon{display:flex;align-items:center;margin-right:5px}:host .instant-apps-social-share__success-icon calcite-icon{color:var(--calcite-color-status-success)}:host .instant-apps-social-share__success-message{line-height:16px}:host .instant-apps-social-share__embed{box-sizing:border-box;width:100%;padding:5%;margin-bottom:10px;border-top:1px solid #d3d3d3}:host .instant-apps-social-share__embed-header{display:flex;align-items:center;margin-bottom:5px}:host .instant-apps-social-share__embed-header calcite-icon{margin-right:5px}:host .instant-apps-social-share__embed-code-text-area{border:1px solid #d3d3d3}:host .instant-apps-social-share__embed-code-text-area textarea{box-sizing:border-box;padding:4%;border:none;resize:none;background:transparent;width:100%;font-family:var(--calcite-sans-family);color:var(--calcite-color-text-1)}:host .instant-apps-social-share__embed-code-text-area button{display:flex;align-items:center;text-align:start;width:100%;border:none;border-top:1px solid #d3d3d3;background-color:transparent;line-height:16px;font-weight:400;padding:3%;color:var(--calcite-color-text-1)}:host .instant-apps-social-share__embed-code-text-area button calcite-icon{color:#007ac2;margin-right:3px}:host .instant-apps-social-share__embed-code-text-area button:hover{cursor:pointer;background-color:var(--calcite-color-foreground-2);transition:background-color 0.15s ease-out 0s}:host .instant-apps-social-share__embed-text-area-text{font-weight:600;color:var(--instant-apps-social-share-embed-text-area-text)}:host .instant-apps-social-share__embed .instant-apps-social-share__text-area--rtl{text-align:left}:host .instant-apps-social-share__embed-dimensions{display:flex;justify-content:space-between;margin-top:10px}:host .instant-apps-social-share__embed-dimensions-input{width:47%;box-sizing:border-box}:host .instant-apps-social-share__embed-dimensions-input input{border:1px solid #d3d3d3;width:100%;height:25px;font-family:var(--calcite-sans-family)}:host .instant-apps-social-share__layout--horizontal .instant-apps-social-share__options{display:flex;justify-content:space-around;margin-bottom:8%}:host .instant-apps-social-share__layout--horizontal .instant-apps-social-share__options li{flex-direction:column;padding:0}:host .instant-apps-social-share__layout--horizontal .instant-apps-social-share__options li .instant-apps-social-share__option-text{word-break:break-word;margin-left:0;margin-top:10px;text-align:center}:host .instant-apps-social-share__layout--horizontal .instant-apps-social-share__options li:hover{background-color:unset}:host .instant-apps-social-share__icon-container{display:flex;align-items:center}:host calcite-action{width:var(--instant-apps-social-share-action-width)}:host([scale=s]) .instant-apps-social-share__dialog{width:var(--instant-apps-social-share-width--s)}:host([scale=s]) .instant-apps-social-share__icon{width:16px;height:16px}:host([scale=s]) .instant-apps-social-share__option-text{font-size:var(--calcite-font-size--1)}:host([scale=s]) .instant-apps-social-share__dialog.instant-apps-social-share__layout--horizontal{width:var(--instant-apps-social-share-width-horizontal--s)}:host([scale=s]) .instant-apps-social-share__tip-header,:host([scale=s]) .instant-apps-social-share__tip-content,:host([scale=s]) .instant-apps-social-share__embed-header,:host([scale=s]) .instant-apps-social-share__embed-dimensions-input{font-size:var(--calcite-font-size--2)}:host([scale=m]) .instant-apps-social-share__dialog{width:var(--instant-apps-social-share-width--m)}:host([scale=m]) .instant-apps-social-share__icon{width:24px;height:24px}:host([scale=m]) .instant-apps-social-share__option-text{font-size:var(--calcite-font-size-0)}:host([scale=m]) .instant-apps-social-share__dialog.instant-apps-social-share__layout--horizontal{width:var(--instant-apps-social-share-width-horizontal--m)}:host([scale=m]) .instant-apps-social-share__tip-header,:host([scale=m]) .instant-apps-social-share__tip-content,:host([scale=m]) .instant-apps-social-share__embed-header,:host([scale=m]) .instant-apps-social-share__embed-dimensions-input{font-size:var(--calcite-font-size--1)}:host([scale=l]) .instant-apps-social-share__dialog{width:var(--instant-apps-social-share-width--l)}:host([scale=l]) .instant-apps-social-share__icon{width:32px;height:32px}:host([scale=l]) .instant-apps-social-share__option-text{font-size:var(--calcite-font-size-1)}:host([scale=l]) .instant-apps-social-share__dialog.instant-apps-social-share__layout--horizontal{width:var(--instant-apps-social-share-width-horizontal--l)}:host([scale=l]) .instant-apps-social-share__tip-header,:host([scale=l]) .instant-apps-social-share__tip-content,:host([scale=l]) .instant-apps-social-share__embed-header,:host([scale=l]) .instant-apps-social-share__embed-dimensions-input{font-size:var(--calcite-font-size-0)}";
16
16
 
17
17
  const base = 'instant-apps-social-share';
18
18
  const CSS = {
@@ -219,7 +219,7 @@ const InstantAppsSocialShare = /*@__PURE__*/ proxyCustomElement(class InstantApp
219
219
  renderButton() {
220
220
  var _a, _b, _c, _d, _e, _f, _g, _h;
221
221
  const scale = this.shareButtonScale != null ? this.shareButtonScale : this.scale;
222
- return this.shareButtonType === 'button' ? (h("calcite-button", { ref: el => (this.popoverButtonRef = el), onClick: this.togglePopover.bind(this), id: "shareButton", class: CSS.popoverButton, kind: this.shareButtonColor, appearance: "transparent", label: (_b = (_a = this.messages) === null || _a === void 0 ? void 0 : _a.share) === null || _b === void 0 ? void 0 : _b.label, title: (_d = (_c = this.messages) === null || _c === void 0 ? void 0 : _c.share) === null || _d === void 0 ? void 0 : _d.label, scale: scale }, h("div", { class: CSS.iconContainer }, h("calcite-icon", { icon: "share", scale: this.popoverButtonIconScale })))) : (h("calcite-action", { ref: el => (this.popoverButtonRef = el), onClick: this.togglePopover.bind(this), id: "shareButton", class: CSS.popoverButton, appearance: "transparent", label: (_f = (_e = this.messages) === null || _e === void 0 ? void 0 : _e.share) === null || _f === void 0 ? void 0 : _f.label, title: (_h = (_g = this.messages) === null || _g === void 0 ? void 0 : _g.share) === null || _h === void 0 ? void 0 : _h.label, scale: scale, text: "" }, h("div", { class: CSS.iconContainer }, h("calcite-icon", { icon: "share", scale: this.popoverButtonIconScale }))));
222
+ return this.shareButtonType === 'button' ? (h("calcite-button", { ref: el => (this.popoverButtonRef = el), onClick: this.togglePopover.bind(this), id: "shareButton", class: CSS.popoverButton, kind: this.shareButtonColor, appearance: "transparent", label: (_b = (_a = this.messages) === null || _a === void 0 ? void 0 : _a.share) === null || _b === void 0 ? void 0 : _b.label, title: (_d = (_c = this.messages) === null || _c === void 0 ? void 0 : _c.share) === null || _d === void 0 ? void 0 : _d.label, scale: scale }, h("div", { class: CSS.iconContainer }, h("calcite-icon", { icon: "share", scale: this.popoverButtonIconScale })))) : (h("calcite-action", { ref: el => (this.popoverButtonRef = el), onClick: this.togglePopover.bind(this), id: "shareButton", class: CSS.popoverButton, appearance: "transparent", label: (_f = (_e = this.messages) === null || _e === void 0 ? void 0 : _e.share) === null || _f === void 0 ? void 0 : _f.label, title: (_h = (_g = this.messages) === null || _g === void 0 ? void 0 : _g.share) === null || _h === void 0 ? void 0 : _h.label, scale: scale, text: "", alignment: "center" }, h("div", { class: CSS.iconContainer }, h("calcite-icon", { icon: "share", scale: this.popoverButtonIconScale }))));
223
223
  }
224
224
  renderSuccess() {
225
225
  var _a;
@@ -185,6 +185,8 @@ const LayerTable = /*@__PURE__*/ proxyCustomElement(class LayerTable extends HTM
185
185
  * watch for changes in map info and update the toolbar
186
186
  */
187
187
  async mapInfoWatchHandler() {
188
+ this._resetColumnTemplates();
189
+ this._initLayerExpressions();
188
190
  this._initToolInfos();
189
191
  this._updateToolbar();
190
192
  }
@@ -196,6 +198,7 @@ const LayerTable = /*@__PURE__*/ proxyCustomElement(class LayerTable extends HTM
196
198
  this._mapClickHandle.remove();
197
199
  }
198
200
  if (this.mapView) {
201
+ this._floorExpression = undefined;
199
202
  this._updateShareUrl();
200
203
  this._mapClickHandle = this.reactiveUtils.on(() => this.mapView, "click", (event) => {
201
204
  void this._mapClicked(event);
@@ -214,8 +217,8 @@ const LayerTable = /*@__PURE__*/ proxyCustomElement(class LayerTable extends HTM
214
217
  this._floorField = (_a = this._layer.floorInfo) === null || _a === void 0 ? void 0 : _a.floorField;
215
218
  this._updateFloorDefinitionExpression();
216
219
  await this._resetTable();
217
- this._updateShareUrl();
218
220
  this._initLayerExpressions();
221
+ this._updateShareUrl();
219
222
  this._fetchingData = false;
220
223
  }));
221
224
  }
@@ -264,6 +267,13 @@ const LayerTable = /*@__PURE__*/ proxyCustomElement(class LayerTable extends HTM
264
267
  }
265
268
  await this._refresh();
266
269
  }
270
+ /**
271
+ * Refresh the table when floor filter facility is changed
272
+ */
273
+ async facilityChanged(evt) {
274
+ this._floorFacility = evt.detail;
275
+ this._updateFloorDefinitionExpression();
276
+ }
267
277
  /**
268
278
  * Refresh the table when floor filter level is changed
269
279
  */
@@ -271,6 +281,13 @@ const LayerTable = /*@__PURE__*/ proxyCustomElement(class LayerTable extends HTM
271
281
  this._floorLevel = evt.detail;
272
282
  this._updateFloorDefinitionExpression();
273
283
  }
284
+ /**
285
+ * Refresh the table when floor filter site is changed
286
+ */
287
+ async siteChanged(evt) {
288
+ this._floorSite = evt.detail;
289
+ this._updateFloorDefinitionExpression();
290
+ }
274
291
  /**
275
292
  * Refresh the table when
276
293
  */
@@ -567,7 +584,12 @@ const LayerTable = /*@__PURE__*/ proxyCustomElement(class LayerTable extends HTM
567
584
  */
568
585
  _updateFloorDefinitionExpression() {
569
586
  if (this._floorField && this._floorLevel) {
570
- this._layer.definitionExpression = `${this._floorField} = '${this._floorLevel}'`;
587
+ const floorExp = `${this._floorField} = '${this._floorLevel}'`;
588
+ const defExp = this._layer.definitionExpression;
589
+ this._layer.definitionExpression = (defExp === null || defExp === void 0 ? void 0 : defExp.indexOf(this._floorExpression)) > -1 ?
590
+ defExp.replace(this._floorExpression, floorExp) :
591
+ defExp ? `${defExp} AND (${floorExp})` : floorExp;
592
+ this._floorExpression = floorExp;
571
593
  }
572
594
  }
573
595
  /**
@@ -883,8 +905,6 @@ const LayerTable = /*@__PURE__*/ proxyCustomElement(class LayerTable extends HTM
883
905
  container: node
884
906
  });
885
907
  });
886
- this._initColumnsInfo();
887
- this._checkEditEnabled();
888
908
  await this._table.when(() => {
889
909
  this._table.highlightIds.on("change", (evt) => {
890
910
  void this._handleOnChange(evt);
@@ -1002,20 +1022,20 @@ const LayerTable = /*@__PURE__*/ proxyCustomElement(class LayerTable extends HTM
1002
1022
  async _resetTable() {
1003
1023
  var _a;
1004
1024
  this._clearSelection();
1005
- this._allIds = [];
1006
- this.featureSelectionChange.emit(this.selectedIds);
1007
- const columnTemplates = this._getColumnTemplates(this._layer.id, (_a = this._layer) === null || _a === void 0 ? void 0 : _a.fields);
1008
1025
  this._allIds = await queryAllIds(this._layer);
1009
1026
  if (!this._table) {
1027
+ const columnTemplates = this._getColumnTemplates(this._layer.id, (_a = this._layer) === null || _a === void 0 ? void 0 : _a.fields);
1010
1028
  await this._getTable(this._tableNode, columnTemplates);
1011
1029
  }
1012
- this._table.layer = this._layer;
1013
- this._table.view = this.mapView;
1030
+ else {
1031
+ this._table.view = this.mapView;
1032
+ this._table.layer = this._layer;
1033
+ }
1014
1034
  this._checkEditEnabled();
1015
1035
  this._table.editingEnabled = this._editEnabled && this.enableInlineEdit;
1016
1036
  await this.reactiveUtils.once(() => this._table.state === "loaded")
1017
1037
  .then(async () => {
1018
- var _a, _b;
1038
+ var _a, _b, _c;
1019
1039
  this._table.highlightIds.removeAll();
1020
1040
  this._table.clearSelectionFilter();
1021
1041
  this._resetColumnTemplates();
@@ -1031,7 +1051,7 @@ const LayerTable = /*@__PURE__*/ proxyCustomElement(class LayerTable extends HTM
1031
1051
  }
1032
1052
  this._defaultGlobalIdHonored = true;
1033
1053
  }
1034
- if (!this._defaultFilterHonored && this.defaultFilter && this._filterList) {
1054
+ if (!this._defaultFilterHonored && ((_c = this.defaultFilter) === null || _c === void 0 ? void 0 : _c.length) > 0 && this._filterList) {
1035
1055
  this._layerExpressions = this.defaultFilter;
1036
1056
  this._filterActive = true;
1037
1057
  this._defaultFilterHonored = true;
@@ -1170,7 +1190,15 @@ const LayerTable = /*@__PURE__*/ proxyCustomElement(class LayerTable extends HTM
1170
1190
  * Check if the layers definitionExpression has been modified
1171
1191
  */
1172
1192
  _handleFilterUpdate() {
1173
- this._filterActive = this._definitionExpression !== this._layer.definitionExpression;
1193
+ const defExp = this._layer.definitionExpression;
1194
+ if (this._floorExpression) {
1195
+ const regEx = new RegExp(`${this._floorField} = ['].+[']`, "gm");
1196
+ this._layer.definitionExpression = defExp && this._floorField && defExp.indexOf(`${this._floorField} = '`) > -1 ?
1197
+ defExp.replace(regEx, this._floorExpression) : defExp ?
1198
+ `${defExp} AND (${this._floorExpression})` : this._floorExpression;
1199
+ }
1200
+ this._filterActive = this._definitionExpression !== this._layer.definitionExpression &&
1201
+ (this._floorExpression ? this._layer.definitionExpression !== this._floorExpression : true);
1174
1202
  this._updateShareUrl();
1175
1203
  }
1176
1204
  /**
@@ -1258,7 +1286,9 @@ const LayerTable = /*@__PURE__*/ proxyCustomElement(class LayerTable extends HTM
1258
1286
  const layerExpressions = (_b = (_a = this.mapInfo) === null || _a === void 0 ? void 0 : _a.filterConfig) === null || _b === void 0 ? void 0 : _b.layerExpressions;
1259
1287
  this._layerExpressions = layerExpressions ? layerExpressions.filter((exp) => { var _a; return exp.id === ((_a = this._layer) === null || _a === void 0 ? void 0 : _a.id); }) : [];
1260
1288
  this._filterList.layerExpressions = this._layerExpressions;
1261
- this._filterActive = false;
1289
+ this._filterActive = this._layerExpressions.filter(lyrExp => {
1290
+ return lyrExp.expressions.filter(exp => exp.active).length > 0;
1291
+ }).length > 0;
1262
1292
  }
1263
1293
  /**
1264
1294
  * Select all rows that are not currently selectd
@@ -1484,7 +1514,7 @@ const LayerTable = /*@__PURE__*/ proxyCustomElement(class LayerTable extends HTM
1484
1514
  "_showOnlySelected": [32],
1485
1515
  "_toolInfos": [32],
1486
1516
  "_translations": [32]
1487
- }, [[8, "selectionChanged", "selectionChanged"], [8, "editsComplete", "editsComplete"], [8, "levelChanged", "levelChanged"], [8, "noLayersFound", "noLayersFound"]], {
1517
+ }, [[8, "selectionChanged", "selectionChanged"], [8, "editsComplete", "editsComplete"], [8, "facilityChanged", "facilityChanged"], [8, "levelChanged", "levelChanged"], [8, "siteChanged", "siteChanged"], [8, "noLayersFound", "noLayersFound"]], {
1488
1518
  "enableCSV": ["enableCSVWatchHandler"],
1489
1519
  "enableInlineEdit": ["enableInlineEditWatchHandler"],
1490
1520
  "enableShare": ["enableShareWatchHandler"],
@@ -119,7 +119,9 @@ const floorFilterCss = ":host{display:block}";
119
119
  const FloorFilter = class {
120
120
  constructor(hostRef) {
121
121
  registerInstance(this, hostRef);
122
+ this.facilityChanged = createEvent(this, "facilityChanged", 7);
122
123
  this.levelChanged = createEvent(this, "levelChanged", 7);
124
+ this.siteChanged = createEvent(this, "siteChanged", 7);
123
125
  this.enabled = undefined;
124
126
  this.floorFilterWidget = undefined;
125
127
  this.mapView = undefined;
@@ -172,22 +174,28 @@ const FloorFilter = class {
172
174
  * Initialize the floor filter or reset the current view if it already exists
173
175
  */
174
176
  _initFloorFilter(view) {
175
- var _a;
177
+ var _a, _b, _c, _d;
176
178
  if (view && this.enabled && this.FloorFilter && ((_a = view === null || view === void 0 ? void 0 : view.map) === null || _a === void 0 ? void 0 : _a.floorInfo)) {
177
179
  if (!this.floorFilterWidget) {
178
180
  this.floorFilterWidget = new this.FloorFilter({
179
181
  container: this._floorFilterElement,
180
182
  view
181
183
  });
182
- if (this._levelHandle) {
183
- this._levelHandle.remove();
184
- }
184
+ (_b = this._facilityHandle) === null || _b === void 0 ? void 0 : _b.remove();
185
+ this._facilityHandle = this.reactiveUtils.watch(() => this.floorFilterWidget.facility, (facility) => {
186
+ this.facilityChanged.emit(facility);
187
+ });
188
+ (_c = this._levelHandle) === null || _c === void 0 ? void 0 : _c.remove();
185
189
  this._levelHandle = this.reactiveUtils.watch(() => this.floorFilterWidget.level, (level) => {
186
190
  this.levelChanged.emit(level);
187
191
  });
192
+ (_d = this._siteHandle) === null || _d === void 0 ? void 0 : _d.remove();
193
+ this._siteHandle = this.reactiveUtils.watch(() => this.floorFilterWidget.site, (site) => {
194
+ this.siteChanged.emit(site);
195
+ });
188
196
  }
189
197
  else {
190
- this.floorFilterWidget.view = view;
198
+ this.floorFilterWidget.viewModel.view = view;
191
199
  }
192
200
  }
193
201
  }