@esri/solutions-components 0.8.32 → 0.8.33

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -140,12 +140,17 @@ const FloorFilter = class {
140
140
  * Watch for changes to the mapView and re-init the floor filter
141
141
  */
142
142
  async mapViewWatchHandler() {
143
+ console.log("mapViewWatchHandler");
144
+ console.log(`this.mapView: ${this.mapView}`);
143
145
  await this._initFloorFilter(this.mapView);
144
146
  }
145
147
  /**
146
148
  * Watch for changes to the enabled property and re-init or destroy the floor filter
147
149
  */
148
150
  async enabledWatchHandler() {
151
+ console.log("enabledWatchHandler");
152
+ console.log(`this.enabled: ${this.enabled}`);
153
+ console.log(`this.mapView: ${this.mapView}`);
149
154
  if (this.enabled) {
150
155
  await this._initFloorFilter(this.mapView);
151
156
  }
@@ -168,7 +173,9 @@ const FloorFilter = class {
168
173
  * Renders the component.
169
174
  */
170
175
  render() {
171
- return (index.h(index.Host, { key: 'c80a8d46fb48f3789d9fa09c2400faad49e2e236' }, index.h("div", { key: '82919a3ba061a17c8aeaa0d2f6f4f13bc428b519', ref: (el) => { this._floorFilterElement = el; } })));
176
+ console.log("render");
177
+ console.log(`this._floorFilterElement: ${this._floorFilterElement}`);
178
+ return (index.h(index.Host, { key: '01b71c71af2a183b85c8620c338512fd338f19ef' }, index.h("div", { key: '752d397c6e3b6a2257d0a8a05051ed821eca4b94', ref: (el) => { this._floorFilterElement = el; } })));
172
179
  }
173
180
  //--------------------------------------------------------------------------
174
181
  //
@@ -196,6 +203,7 @@ const FloorFilter = class {
196
203
  * @protected
197
204
  */
198
205
  _destroyWidget() {
206
+ console.log("_destroyWidget");
199
207
  if (this.floorFilterWidget) {
200
208
  this.floorFilterWidget.destroy();
201
209
  this.floorFilterWidget = undefined;
@@ -210,6 +218,7 @@ const FloorFilter = class {
210
218
  * @protected
211
219
  */
212
220
  _initContainer() {
221
+ console.log("_initContainer");
213
222
  this._destroyWidget();
214
223
  this._floorFilterElement = document.createElement("div");
215
224
  }
@@ -217,11 +226,18 @@ const FloorFilter = class {
217
226
  * Initialize the floor filter or reset the current view if it already exists
218
227
  */
219
228
  async _initFloorFilter(view) {
229
+ console.log("_initFloorFilter");
220
230
  const webMap = view === null || view === void 0 ? void 0 : view.map;
221
- if (view && this.enabled && this.FloorFilter && (webMap === null || webMap === void 0 ? void 0 : webMap.floorInfo)) {
222
- this._initContainer();
223
- await webMap.when(() => {
224
- var _a, _b, _c;
231
+ await webMap.when(() => {
232
+ var _a, _b, _c;
233
+ console.log("webMap.when");
234
+ console.log("_initFloorFilter");
235
+ console.log(`view: ${view}`);
236
+ console.log(`this.enabled: ${this.enabled}`);
237
+ console.log(`this.FloorFilter: ${this.FloorFilter}`);
238
+ console.log(`webMap?.floorInfo: ${webMap === null || webMap === void 0 ? void 0 : webMap.floorInfo}`);
239
+ if (view && this.enabled && this.FloorFilter && (webMap === null || webMap === void 0 ? void 0 : webMap.floorInfo)) {
240
+ this._initContainer();
225
241
  this.floorFilterWidget = new this.FloorFilter({
226
242
  container: this._floorFilterElement,
227
243
  view
@@ -238,8 +254,8 @@ const FloorFilter = class {
238
254
  this._siteHandle = this.reactiveUtils.watch(() => this.floorFilterWidget.site, (site) => {
239
255
  this.siteChanged.emit(site);
240
256
  });
241
- });
242
- }
257
+ }
258
+ });
243
259
  }
244
260
  get el() { return index.getElement(this); }
245
261
  static get watchers() { return {
@@ -208,7 +208,9 @@ const CrowdsourceManager = class {
208
208
  async componentDidRender() {
209
209
  if (this._shouldSetMapView) {
210
210
  this._shouldSetMapView = false;
211
- await this._setMapView();
211
+ if (this._mapChange) {
212
+ await this._setMapView();
213
+ }
212
214
  }
213
215
  }
214
216
  /**
@@ -211,7 +211,9 @@ export class CrowdsourceManager {
211
211
  async componentDidRender() {
212
212
  if (this._shouldSetMapView) {
213
213
  this._shouldSetMapView = false;
214
- await this._setMapView();
214
+ if (this._mapChange) {
215
+ await this._setMapView();
216
+ }
215
217
  }
216
218
  }
217
219
  /**
@@ -35,12 +35,17 @@ export class FloorFilter {
35
35
  * Watch for changes to the mapView and re-init the floor filter
36
36
  */
37
37
  async mapViewWatchHandler() {
38
+ console.log("mapViewWatchHandler");
39
+ console.log(`this.mapView: ${this.mapView}`);
38
40
  await this._initFloorFilter(this.mapView);
39
41
  }
40
42
  /**
41
43
  * Watch for changes to the enabled property and re-init or destroy the floor filter
42
44
  */
43
45
  async enabledWatchHandler() {
46
+ console.log("enabledWatchHandler");
47
+ console.log(`this.enabled: ${this.enabled}`);
48
+ console.log(`this.mapView: ${this.mapView}`);
44
49
  if (this.enabled) {
45
50
  await this._initFloorFilter(this.mapView);
46
51
  }
@@ -63,7 +68,9 @@ export class FloorFilter {
63
68
  * Renders the component.
64
69
  */
65
70
  render() {
66
- return (h(Host, { key: 'c80a8d46fb48f3789d9fa09c2400faad49e2e236' }, h("div", { key: '82919a3ba061a17c8aeaa0d2f6f4f13bc428b519', ref: (el) => { this._floorFilterElement = el; } })));
71
+ console.log("render");
72
+ console.log(`this._floorFilterElement: ${this._floorFilterElement}`);
73
+ return (h(Host, { key: '01b71c71af2a183b85c8620c338512fd338f19ef' }, h("div", { key: '752d397c6e3b6a2257d0a8a05051ed821eca4b94', ref: (el) => { this._floorFilterElement = el; } })));
67
74
  }
68
75
  //--------------------------------------------------------------------------
69
76
  //
@@ -91,6 +98,7 @@ export class FloorFilter {
91
98
  * @protected
92
99
  */
93
100
  _destroyWidget() {
101
+ console.log("_destroyWidget");
94
102
  if (this.floorFilterWidget) {
95
103
  this.floorFilterWidget.destroy();
96
104
  this.floorFilterWidget = undefined;
@@ -105,6 +113,7 @@ export class FloorFilter {
105
113
  * @protected
106
114
  */
107
115
  _initContainer() {
116
+ console.log("_initContainer");
108
117
  this._destroyWidget();
109
118
  this._floorFilterElement = document.createElement("div");
110
119
  }
@@ -112,11 +121,18 @@ export class FloorFilter {
112
121
  * Initialize the floor filter or reset the current view if it already exists
113
122
  */
114
123
  async _initFloorFilter(view) {
124
+ console.log("_initFloorFilter");
115
125
  const webMap = view === null || view === void 0 ? void 0 : view.map;
116
- if (view && this.enabled && this.FloorFilter && (webMap === null || webMap === void 0 ? void 0 : webMap.floorInfo)) {
117
- this._initContainer();
118
- await webMap.when(() => {
119
- var _a, _b, _c;
126
+ await webMap.when(() => {
127
+ var _a, _b, _c;
128
+ console.log("webMap.when");
129
+ console.log("_initFloorFilter");
130
+ console.log(`view: ${view}`);
131
+ console.log(`this.enabled: ${this.enabled}`);
132
+ console.log(`this.FloorFilter: ${this.FloorFilter}`);
133
+ console.log(`webMap?.floorInfo: ${webMap === null || webMap === void 0 ? void 0 : webMap.floorInfo}`);
134
+ if (view && this.enabled && this.FloorFilter && (webMap === null || webMap === void 0 ? void 0 : webMap.floorInfo)) {
135
+ this._initContainer();
120
136
  this.floorFilterWidget = new this.FloorFilter({
121
137
  container: this._floorFilterElement,
122
138
  view
@@ -133,8 +149,8 @@ export class FloorFilter {
133
149
  this._siteHandle = this.reactiveUtils.watch(() => this.floorFilterWidget.site, (site) => {
134
150
  this.siteChanged.emit(site);
135
151
  });
136
- });
137
- }
152
+ }
153
+ });
138
154
  }
139
155
  static get is() { return "floor-filter"; }
140
156
  static get encapsulation() { return "shadow"; }
@@ -261,7 +261,9 @@ const CrowdsourceManager$1 = /*@__PURE__*/ proxyCustomElement(class CrowdsourceM
261
261
  async componentDidRender() {
262
262
  if (this._shouldSetMapView) {
263
263
  this._shouldSetMapView = false;
264
- await this._setMapView();
264
+ if (this._mapChange) {
265
+ await this._setMapView();
266
+ }
265
267
  }
266
268
  }
267
269
  /**
@@ -30,12 +30,17 @@ const FloorFilter = /*@__PURE__*/ proxyCustomElement(class FloorFilter extends H
30
30
  * Watch for changes to the mapView and re-init the floor filter
31
31
  */
32
32
  async mapViewWatchHandler() {
33
+ console.log("mapViewWatchHandler");
34
+ console.log(`this.mapView: ${this.mapView}`);
33
35
  await this._initFloorFilter(this.mapView);
34
36
  }
35
37
  /**
36
38
  * Watch for changes to the enabled property and re-init or destroy the floor filter
37
39
  */
38
40
  async enabledWatchHandler() {
41
+ console.log("enabledWatchHandler");
42
+ console.log(`this.enabled: ${this.enabled}`);
43
+ console.log(`this.mapView: ${this.mapView}`);
39
44
  if (this.enabled) {
40
45
  await this._initFloorFilter(this.mapView);
41
46
  }
@@ -58,7 +63,9 @@ const FloorFilter = /*@__PURE__*/ proxyCustomElement(class FloorFilter extends H
58
63
  * Renders the component.
59
64
  */
60
65
  render() {
61
- return (h(Host, { key: 'c80a8d46fb48f3789d9fa09c2400faad49e2e236' }, h("div", { key: '82919a3ba061a17c8aeaa0d2f6f4f13bc428b519', ref: (el) => { this._floorFilterElement = el; } })));
66
+ console.log("render");
67
+ console.log(`this._floorFilterElement: ${this._floorFilterElement}`);
68
+ return (h(Host, { key: '01b71c71af2a183b85c8620c338512fd338f19ef' }, h("div", { key: '752d397c6e3b6a2257d0a8a05051ed821eca4b94', ref: (el) => { this._floorFilterElement = el; } })));
62
69
  }
63
70
  //--------------------------------------------------------------------------
64
71
  //
@@ -86,6 +93,7 @@ const FloorFilter = /*@__PURE__*/ proxyCustomElement(class FloorFilter extends H
86
93
  * @protected
87
94
  */
88
95
  _destroyWidget() {
96
+ console.log("_destroyWidget");
89
97
  if (this.floorFilterWidget) {
90
98
  this.floorFilterWidget.destroy();
91
99
  this.floorFilterWidget = undefined;
@@ -100,6 +108,7 @@ const FloorFilter = /*@__PURE__*/ proxyCustomElement(class FloorFilter extends H
100
108
  * @protected
101
109
  */
102
110
  _initContainer() {
111
+ console.log("_initContainer");
103
112
  this._destroyWidget();
104
113
  this._floorFilterElement = document.createElement("div");
105
114
  }
@@ -107,11 +116,18 @@ const FloorFilter = /*@__PURE__*/ proxyCustomElement(class FloorFilter extends H
107
116
  * Initialize the floor filter or reset the current view if it already exists
108
117
  */
109
118
  async _initFloorFilter(view) {
119
+ console.log("_initFloorFilter");
110
120
  const webMap = view === null || view === void 0 ? void 0 : view.map;
111
- if (view && this.enabled && this.FloorFilter && (webMap === null || webMap === void 0 ? void 0 : webMap.floorInfo)) {
112
- this._initContainer();
113
- await webMap.when(() => {
114
- var _a, _b, _c;
121
+ await webMap.when(() => {
122
+ var _a, _b, _c;
123
+ console.log("webMap.when");
124
+ console.log("_initFloorFilter");
125
+ console.log(`view: ${view}`);
126
+ console.log(`this.enabled: ${this.enabled}`);
127
+ console.log(`this.FloorFilter: ${this.FloorFilter}`);
128
+ console.log(`webMap?.floorInfo: ${webMap === null || webMap === void 0 ? void 0 : webMap.floorInfo}`);
129
+ if (view && this.enabled && this.FloorFilter && (webMap === null || webMap === void 0 ? void 0 : webMap.floorInfo)) {
130
+ this._initContainer();
115
131
  this.floorFilterWidget = new this.FloorFilter({
116
132
  container: this._floorFilterElement,
117
133
  view
@@ -128,8 +144,8 @@ const FloorFilter = /*@__PURE__*/ proxyCustomElement(class FloorFilter extends H
128
144
  this._siteHandle = this.reactiveUtils.watch(() => this.floorFilterWidget.site, (site) => {
129
145
  this.siteChanged.emit(site);
130
146
  });
131
- });
132
- }
147
+ }
148
+ });
133
149
  }
134
150
  get el() { return this; }
135
151
  static get watchers() { return {
@@ -136,12 +136,17 @@ const FloorFilter = class {
136
136
  * Watch for changes to the mapView and re-init the floor filter
137
137
  */
138
138
  async mapViewWatchHandler() {
139
+ console.log("mapViewWatchHandler");
140
+ console.log(`this.mapView: ${this.mapView}`);
139
141
  await this._initFloorFilter(this.mapView);
140
142
  }
141
143
  /**
142
144
  * Watch for changes to the enabled property and re-init or destroy the floor filter
143
145
  */
144
146
  async enabledWatchHandler() {
147
+ console.log("enabledWatchHandler");
148
+ console.log(`this.enabled: ${this.enabled}`);
149
+ console.log(`this.mapView: ${this.mapView}`);
145
150
  if (this.enabled) {
146
151
  await this._initFloorFilter(this.mapView);
147
152
  }
@@ -164,7 +169,9 @@ const FloorFilter = class {
164
169
  * Renders the component.
165
170
  */
166
171
  render() {
167
- return (h(Host, { key: 'c80a8d46fb48f3789d9fa09c2400faad49e2e236' }, h("div", { key: '82919a3ba061a17c8aeaa0d2f6f4f13bc428b519', ref: (el) => { this._floorFilterElement = el; } })));
172
+ console.log("render");
173
+ console.log(`this._floorFilterElement: ${this._floorFilterElement}`);
174
+ return (h(Host, { key: '01b71c71af2a183b85c8620c338512fd338f19ef' }, h("div", { key: '752d397c6e3b6a2257d0a8a05051ed821eca4b94', ref: (el) => { this._floorFilterElement = el; } })));
168
175
  }
169
176
  //--------------------------------------------------------------------------
170
177
  //
@@ -192,6 +199,7 @@ const FloorFilter = class {
192
199
  * @protected
193
200
  */
194
201
  _destroyWidget() {
202
+ console.log("_destroyWidget");
195
203
  if (this.floorFilterWidget) {
196
204
  this.floorFilterWidget.destroy();
197
205
  this.floorFilterWidget = undefined;
@@ -206,6 +214,7 @@ const FloorFilter = class {
206
214
  * @protected
207
215
  */
208
216
  _initContainer() {
217
+ console.log("_initContainer");
209
218
  this._destroyWidget();
210
219
  this._floorFilterElement = document.createElement("div");
211
220
  }
@@ -213,11 +222,18 @@ const FloorFilter = class {
213
222
  * Initialize the floor filter or reset the current view if it already exists
214
223
  */
215
224
  async _initFloorFilter(view) {
225
+ console.log("_initFloorFilter");
216
226
  const webMap = view === null || view === void 0 ? void 0 : view.map;
217
- if (view && this.enabled && this.FloorFilter && (webMap === null || webMap === void 0 ? void 0 : webMap.floorInfo)) {
218
- this._initContainer();
219
- await webMap.when(() => {
220
- var _a, _b, _c;
227
+ await webMap.when(() => {
228
+ var _a, _b, _c;
229
+ console.log("webMap.when");
230
+ console.log("_initFloorFilter");
231
+ console.log(`view: ${view}`);
232
+ console.log(`this.enabled: ${this.enabled}`);
233
+ console.log(`this.FloorFilter: ${this.FloorFilter}`);
234
+ console.log(`webMap?.floorInfo: ${webMap === null || webMap === void 0 ? void 0 : webMap.floorInfo}`);
235
+ if (view && this.enabled && this.FloorFilter && (webMap === null || webMap === void 0 ? void 0 : webMap.floorInfo)) {
236
+ this._initContainer();
221
237
  this.floorFilterWidget = new this.FloorFilter({
222
238
  container: this._floorFilterElement,
223
239
  view
@@ -234,8 +250,8 @@ const FloorFilter = class {
234
250
  this._siteHandle = this.reactiveUtils.watch(() => this.floorFilterWidget.site, (site) => {
235
251
  this.siteChanged.emit(site);
236
252
  });
237
- });
238
- }
253
+ }
254
+ });
239
255
  }
240
256
  get el() { return getElement(this); }
241
257
  static get watchers() { return {
@@ -204,7 +204,9 @@ const CrowdsourceManager = class {
204
204
  async componentDidRender() {
205
205
  if (this._shouldSetMapView) {
206
206
  this._shouldSetMapView = false;
207
- await this._setMapView();
207
+ if (this._mapChange) {
208
+ await this._setMapView();
209
+ }
208
210
  }
209
211
  }
210
212
  /**
@@ -0,0 +1,6 @@
1
+ /*!
2
+ * Copyright 2022 Esri
3
+ * Licensed under the Apache License, Version 2.0
4
+ * http://www.apache.org/licenses/LICENSE-2.0
5
+ */
6
+ import{r as i,h as t,H as s,g as e,c as a}from"./p-6d753a3d.js";import{l as h,g as o}from"./p-896c9644.js";import"./p-82e085d0.js";const n=class{constructor(t){i(this,t),this.mapView=void 0,this.basemapConfig=void 0,this.basemapWidget=void 0}async mapViewWatchHandler(){await this.mapView.when((()=>{this._initBaseMapGallery(this.mapView)}))}async componentWillLoad(){return this._initModules()}render(){return t(s,{key:"7fe5ef48d77de087f17498e2e1f3370a069e8629"},t("div",{key:"aca555c687352046a138343cab6f656234069644",ref:i=>{this._basemapElement=i}}))}async componentDidLoad(){this.mapView&&await this.mapViewWatchHandler()}async _initModules(){const[i,t]=await h(["esri/widgets/BasemapGallery","esri/widgets/BasemapGallery/support/PortalBasemapsSource"]);this.BasemapGallery=i,this.PortalBasemapsSource=t}async _initBaseMapGallery(i){var t;if(this.BasemapGallery){this.basemapWidget&&this.basemapWidget.destroy();const s=new this.PortalBasemapsSource({query:(null===(t=this.basemapConfig)||void 0===t?void 0:t.basemapGroupId)?`id:${this.basemapConfig.basemapGroupId}`:null,filterFunction:this.basemapConfig?i=>!this.basemapConfig.basemapIdsToFilter.includes(i.portalItem.id):()=>!0});await s.refresh(),this.basemapWidget=new this.BasemapGallery({container:this._basemapElement,view:i,source:s})}}get el(){return e(this)}static get watchers(){return{mapView:["mapViewWatchHandler"]}}};n.style=":host{display:block}";const c=class{constructor(t){i(this,t),this.facilityChanged=a(this,"facilityChanged",7),this.levelChanged=a(this,"levelChanged",7),this.siteChanged=a(this,"siteChanged",7),this.enabled=void 0,this.floorFilterWidget=void 0,this.mapView=void 0}async mapViewWatchHandler(){console.log("mapViewWatchHandler"),console.log(`this.mapView: ${this.mapView}`),await this._initFloorFilter(this.mapView)}async enabledWatchHandler(){console.log("enabledWatchHandler"),console.log(`this.enabled: ${this.enabled}`),console.log(`this.mapView: ${this.mapView}`),this.enabled?await this._initFloorFilter(this.mapView):this.enabled||this._destroyWidget()}async componentWillLoad(){return this._initModules()}render(){return console.log("render"),console.log(`this._floorFilterElement: ${this._floorFilterElement}`),t(s,{key:"01b71c71af2a183b85c8620c338512fd338f19ef"},t("div",{key:"752d397c6e3b6a2257d0a8a05051ed821eca4b94",ref:i=>{this._floorFilterElement=i}}))}async _initModules(){const[i,t]=await h(["esri/widgets/FloorFilter","esri/core/reactiveUtils"]);this.FloorFilter=i,this.reactiveUtils=t}_destroyWidget(){console.log("_destroyWidget"),this.floorFilterWidget&&(this.floorFilterWidget.destroy(),this.floorFilterWidget=void 0),this._floorFilterElement&&this._floorFilterElement.remove()}_initContainer(){console.log("_initContainer"),this._destroyWidget(),this._floorFilterElement=document.createElement("div")}async _initFloorFilter(i){console.log("_initFloorFilter");const t=null==i?void 0:i.map;await t.when((()=>{var s,e,a;console.log("webMap.when"),console.log("_initFloorFilter"),console.log(`view: ${i}`),console.log(`this.enabled: ${this.enabled}`),console.log(`this.FloorFilter: ${this.FloorFilter}`),console.log(`webMap?.floorInfo: ${null==t?void 0:t.floorInfo}`),i&&this.enabled&&this.FloorFilter&&(null==t?void 0:t.floorInfo)&&(this._initContainer(),this.floorFilterWidget=new this.FloorFilter({container:this._floorFilterElement,view:i}),null===(s=this._facilityHandle)||void 0===s||s.remove(),this._facilityHandle=this.reactiveUtils.watch((()=>this.floorFilterWidget.facility),(i=>{this.facilityChanged.emit(i)})),null===(e=this._levelHandle)||void 0===e||e.remove(),this._levelHandle=this.reactiveUtils.watch((()=>this.floorFilterWidget.level),(i=>{this.levelChanged.emit(i)})),null===(a=this._siteHandle)||void 0===a||a.remove(),this._siteHandle=this.reactiveUtils.watch((()=>this.floorFilterWidget.site),(i=>{this.siteChanged.emit(i)})))}))}get el(){return e(this)}static get watchers(){return{mapView:["mapViewWatchHandler"],enabled:["enabledWatchHandler"]}}};c.style=":host{display:block}";const l=class{constructor(t){i(this,t),this.fullscreenStateChange=a(this,"fullscreenStateChange",7),this.mapView=void 0,this.fullscreenWidget=void 0}async mapViewWatchHandler(){await this.mapView.when((async()=>{await this._initFullscreenWidget()}))}async componentWillLoad(){await this._initModules()}render(){return t(s,{key:"943217d26f3cf5861c165c3300ba24736ce8f7dc"},t("div",{key:"6c76ebf6e63dab19f24d776cd27cd86b74ea93d0",class:"fullscreen-widget",ref:i=>{this._fullscreenElement=i}}))}async componentDidUpdate(){await this._initFullscreenWidget()}async componentDidLoad(){await this._initFullscreenWidget()}async _initModules(){const[i,t]=await h(["esri/widgets/Fullscreen","esri/core/reactiveUtils"]);this.Fullscreen=i,this.reactiveUtils=t}async _initFullscreenWidget(){this.mapView&&this._fullscreenElement&&!this.fullscreenWidget?(this.fullscreenWidget=new this.Fullscreen({view:this.mapView}),await this.fullscreenWidget.when((()=>{this._fullscreenStateChangeHandle&&this._fullscreenStateChangeHandle.remove(),this._fullscreenStateChangeHandle=this.reactiveUtils.watch((()=>this.fullscreenWidget.viewModel.state),(i=>this.fullscreenStateChange.emit(i)))}))):this.fullscreenWidget&&(this.fullscreenWidget.view=this.mapView)}static get watchers(){return{mapView:["mapViewWatchHandler"]}}};l.style=":host{display:block}";const r=class{constructor(t){i(this,t),this.mapView=void 0,this.legendWidget=void 0}async mapViewWatchHandler(){await this.mapView.when((()=>{this._initLegend(this.mapView)}))}async componentWillLoad(){return this._initModules()}render(){return t(s,{key:"bdd3b848bec1aec6f8c7676f8bab5e9463b16064"},t("div",{key:"d7bb217db6971758ef8774d19d6ac5cfa94a0ddc",ref:i=>{this._legendElement=i}}))}async componentDidLoad(){this.mapView&&await this.mapViewWatchHandler()}async _initModules(){const[i]=await h(["esri/widgets/Legend"]);this.Legend=i}_initLegend(i){i&&this.Legend&&(this.legendWidget?this.legendWidget.view=i:this.legendWidget=new this.Legend({container:this._legendElement,view:i}))}get el(){return e(this)}static get watchers(){return{mapView:["mapViewWatchHandler"]}}};r.style=":host{display:block}";const d=class{constructor(t){i(this,t),this.mapInfoChange=a(this,"mapInfoChange",7),this._loadedId="",this.mapInfos=[],this._mapListExpanded=!1,this._translations=void 0,this._webMapInfo=void 0}_webMapInfoWatchHandler(i,t){i&&JSON.stringify(i)!==JSON.stringify(t)&&(this._loadedId=null==i?void 0:i.id,this.mapInfoChange.emit(i))}async mapInfosWatchHandler(i,t){i&&JSON.stringify(i)!==JSON.stringify(t)&&this._webMapSelected(i[0])}async setMapByID(i){var t;const s=null===(t=this.mapInfos)||void 0===t?void 0:t.filter((t=>t.id===i));i&&(null==s?void 0:s.length)>0&&this._webMapSelected(s[0])}async componentWillLoad(){await this._getTranslations()}render(){return t(s,{key:"86994e2c4d87809c1508b073c3af1c0975c2d81d"},this._getToolbar(),this._getMapNameList(this._mapListExpanded))}async componentDidLoad(){const i=this.mapInfos&&this.mapInfos.length>0?this.mapInfos[0]:void 0;i&&this._webMapSelected(i)}_getMapPicker(){var i;const s="map-picker-expand-toggle";return t("div",{class:"width-full"},t("calcite-button",{alignment:"icon-end-space-between",appearance:"transparent",class:"width-full height-full",iconEnd:this._mapListExpanded?"chevron-up":"chevron-down",id:s,kind:"neutral",onClick:()=>this._chooseMap(),width:"full"},null===(i=this._webMapInfo)||void 0===i?void 0:i.name),t("calcite-tooltip",{label:"",placement:"bottom","reference-element":s},t("span",null,this._translations.switchMap)))}_getToolbar(){return t("div",{class:"display-flex"},t("calcite-action-bar",{class:"border-bottom-1 action-bar-size","expand-disabled":!0,layout:"horizontal",slot:"header"},this._getMapPicker()))}_getMapNameList(i){return t("div",{class:i?"map-list border-bottom-1":"display-none"},t("calcite-list",{id:"mapList",ref:i=>this._list=i,selectionAppearance:"border",selectionMode:"single"},this.mapInfos.map((i=>t("calcite-list-item",{label:i.name,onClick:()=>this._webMapSelected(i),selected:i.id===this._loadedId,value:i.id})))))}_webMapSelected(i){this._mapListExpanded=!1,this._webMapInfo=i}_chooseMap(){this._mapListExpanded=!this._mapListExpanded}async _getTranslations(){const i=await o(this.el);this._translations=i[0]}get el(){return e(this)}static get watchers(){return{_webMapInfo:["_webMapInfoWatchHandler"],mapInfos:["mapInfosWatchHandler"]}}};d.style=":host{display:block;--solutions-theme-foreground-color:var(--calcite-color-foreground-1)}.width-full{width:100%}.height-full{height:100%}.display-flex{display:flex}.border-bottom-1{border-width:0px;border-bottom-width:1px;border-style:solid;border-color:var(--calcite-color-border-3)}.action-bar-size{height:51px;width:100%}.map-list{position:absolute;display:flex;flex-direction:column;overflow:hidden;animation:calcite-scrim-fade-in var(--calcite-internal-animation-timing-medium) ease-in-out;background-color:var(--calcite-color-background);z-index:1000;width:100%;height:-moz-fit-content;height:fit-content}.display-none{display:none}.align-center{align-items:center}";const p=class{constructor(t){i(this,t),this.mapView=void 0,this.popupEnabled=!1,this.resultGraphicEnabled=!1,this.searchConfiguration=void 0,this.searchTerm=void 0,this.searchWidget=void 0}async watchSearchConfigurationHandler(){this._initSearchWidget()}async mapViewWatchHandler(){await this.mapView.when((()=>{this._initSearchWidget()}))}async componentWillLoad(){await this._initModules()}async componentDidLoad(){return this._initSearchWidget()}render(){return t(s,{key:"5036a89c6a686b2486ff88dffd06f0bed1ea510e"},t("div",{key:"4c5ede4d9877ff0ca0f16706c99aba354df21fd1",class:"search-widget",ref:i=>{this._searchElement=i}}))}async _initModules(){const[i,t]=await h(["esri/widgets/Search","esri/layers/FeatureLayer"]);this.Search=i,this.FeatureLayer=t}_initSearchWidget(){if(this.mapView&&this._searchElement&&!this.searchWidget){let i={view:this.mapView,container:this._searchElement,searchTerm:this.searchTerm};if(this.searchConfiguration){const t=this._getSearchConfig(this.searchConfiguration,this.mapView);i=Object.assign({},t)}this.searchWidget=new this.Search(i),this.searchWidget.popupEnabled=this.popupEnabled,this.searchWidget.resultGraphicEnabled=this.resultGraphicEnabled}else this.searchWidget&&(this.searchWidget.view=this.mapView)}_getSearchConfig(i,t){const s=i.sources;return(null==s?void 0:s.length)>0?(i.includeDefaultSources=!1,s.forEach((i=>{var s,e;if(i.hasOwnProperty("layer")){const a=i,h=null===(s=a.layer)||void 0===s?void 0:s.id,o=h?t.map.findLayerById(h):null,n=null===(e=null==a?void 0:a.layer)||void 0===e?void 0:e.url;o?a.layer=o:n&&(a.layer=new this.FeatureLayer(n))}})),null==s||s.forEach((i=>{if(i.hasOwnProperty("locator")){const t=i;"ArcGIS World Geocoding Service"===(null==t?void 0:t.name)&&(t.outFields=t.outFields||["Addr_type","Match_addr","StAddr","City"],t.singleLineFieldName="SingleLine"),t.url=t.url,delete t.url}}))):i=Object.assign(Object.assign({},i),{includeDefaultSources:!0}),i}static get watchers(){return{searchConfiguration:["watchSearchConfigurationHandler"],mapView:["mapViewWatchHandler"]}}};p.style=":host{display:block}.search-widget{width:100% !important;border:1px solid var(--calcite-color-border-input)}";const u=class{constructor(t){i(this,t),this._widgets=[],this.basemapConfig=void 0,this.enableLegend=void 0,this.enableFloorFilter=void 0,this.enableFullscreen=void 0,this.enableSearch=void 0,this.enableBasemap=void 0,this.enableHome=void 0,this.enableSingleExpand=void 0,this.homeZoomToolsSize="m",this.layout="vertical",this.mapView=void 0,this.mapWidgetsSize="m",this.position="top-right",this.searchConfiguration=void 0,this.stackTools=!0,this.toolOrder=void 0,this._hasFloorInfo=!1,this._translations=void 0,this._showTools=!0,this._showBasemapWidget=!1,this._showFloorFilter=!1,this._showFullscreen=!1,this._showLegendWidget=!1,this._showSearchWidget=!1}async mapViewWatchHandler(){await this.mapView.when((()=>{var i,t;this._hasFloorInfo=null===(t=null===(i=this.mapView)||void 0===i?void 0:i.map)||void 0===t?void 0:t.floorInfo}))}async _showBasemapWidgetWatchHandler(i){i?this.mapView.ui.add(this._basemapElement.basemapWidget,{position:this.position,index:1}):this.mapView.ui.remove(this._basemapElement.basemapWidget)}async _showFloorFilterWatchHandler(i){const t=this._floorFilterElement.floorFilterWidget;i?this.mapView.ui.add(t,{position:this.position,index:1}):this.mapView.ui.remove(t)}async _showFullscreenWatchHandler(i){const t=this._fullscreenElement.fullscreenWidget;i?"ready"===t.viewModel.state&&t.viewModel.enter():"active"===t.viewModel.state&&t.viewModel.exit()}async _showLegendWidgetWatchHandler(i){i?this.mapView.ui.add(this._legendElement.legendWidget,{position:this.position,index:1}):this.mapView.ui.remove(this._legendElement.legendWidget)}async _showSearchWidgetWatchHandler(i){i?this.mapView.ui.add(this._searchElement.searchWidget,{position:this.position,index:1}):this.mapView.ui.remove(this._searchElement.searchWidget)}async componentWillLoad(){await this._getTranslations(),await this._initModules()}render(){this._setZoomToolsSize();const i=this._showTools?"":"display-none",e=this._showSearchWidget?"":"display-none",a=this._showBasemapWidget?"":"display-none",h=this._showLegendWidget?"":"display-none",o=this._showFloorFilter?"":"display-none",n=this._showFullscreen?"":"display-none",c=this.enableSingleExpand?"margin-top-1-2":"",l=this.toolOrder?this.toolOrder:["legend","search","fullscreen","floorfilter"],r=this.stackTools?"box-shadow":"";return t(s,{key:"a1557491ffd833bed11843dbe1bd040a9d2d6b15"},t("div",{key:"8866b3bc6e05fa75605b078e1a3deecaf6392024",class:this.enableBasemap||this.enableFullscreen||this.enableLegend||this.enableSearch?"":"display-none"},this.enableSingleExpand?t("div",{class:"box-shadow"},this._getActionGroup(this._showTools?"chevrons-up":"chevrons-down",!1,this._showTools?this._translations.collapse:this._translations.expand,(()=>this._toggleTools()))):void 0,t("div",{key:"6a4e62ad1afcca39365aa965ffabedf8933051d4",class:`${c} ${r} ${i}`},this._getMapWidgets(l))),t("basemap-gallery",{key:"4edade9536c0912a89f6a9335ae05ae46669e14d",basemapConfig:this.basemapConfig,class:a,mapView:this.mapView,ref:i=>{this._basemapElement=i}}),t("map-search",{key:"046d02c1927def025294645c6e855906fabd30aa",class:e,mapView:this.mapView,ref:i=>{this._searchElement=i},resultGraphicEnabled:!0,searchConfiguration:this.searchConfiguration}),t("map-legend",{key:"54575e31073bdc68b611939eb0e619e4479b26f3",class:h,mapView:this.mapView,ref:i=>{this._legendElement=i}}),t("map-fullscreen",{key:"9a54a22e12c372dd85717f83cf31b4ace80489eb",class:n,mapView:this.mapView,onFullscreenStateChange:i=>this._fullscreenStateChange(i.detail),ref:i=>{this._fullscreenElement=i}}),t("floor-filter",{key:"ffadf501a03186ed6f2fec8754cd758faea5b4dd",class:o,enabled:this.enableFloorFilter,mapView:this.mapView,ref:i=>{this._floorFilterElement=i}}))}async _initModules(){const[i]=await h(["esri/widgets/Expand"]);this.Expand=i}_setZoomToolsSize(){var i,t;const s=null===(i=document.getElementsByClassName("esri-zoom")[0])||void 0===i?void 0:i.children[0],e=null===(t=document.getElementsByClassName("esri-zoom")[0])||void 0===t?void 0:t.children[1];if(s&&e){const i="s"===this.homeZoomToolsSize?"32px":"m"===this.homeZoomToolsSize?"40px":"48px";s.style.width=i,s.style.height=i,e.style.width=i,e.style.height=i}}_getMapWidgets(i){const t=this._showFullscreen?"full-screen-exit":"full-screen",s=this._showFullscreen?this._translations.exitFullscreen:this._translations.enterFullscreen;return i.map((i=>{var e,a,h,o,n;switch(i){case"legend":return this.enableLegend&&this.enableSingleExpand?this._getActionGroup("legend",!1,this._translations.legend,(()=>this._showLegend())):this.enableLegend?this._getWidget(i,null===(e=this._legendElement)||void 0===e?void 0:e.legendWidget,!0):void 0;case"search":return this.enableSearch&&this.enableSingleExpand?this._getActionGroup("magnifying-glass",!1,this._translations.search,(()=>this._search())):this.enableSearch?this._getWidget(i,null===(a=this._searchElement)||void 0===a?void 0:a.searchWidget,!0):void 0;case"fullscreen":return this.enableFullscreen&&this.enableSingleExpand?this._getActionGroup(t,!1,s,(()=>this._expand())):this.enableFullscreen?this._getWidget(i,null===(h=this._fullscreenElement)||void 0===h?void 0:h.fullscreenWidget,!1):void 0;case"basemap":return this.enableBasemap&&this.enableSingleExpand?this._getActionGroup("basemap",!1,this._translations.basemap,(()=>this._toggleBasemapPicker())):this.enableBasemap?this._getWidget(i,null===(o=this._basemapElement)||void 0===o?void 0:o.basemapWidget,!0):void 0;case"floorfilter":return this.enableFloorFilter&&this._hasFloorInfo&&this.enableSingleExpand?this._getActionGroup("urban-model",!1,this._translations.floorFilter,(()=>this._toggleFloorFilter())):this.enableFloorFilter&&this._hasFloorInfo?this._getWidget(i,null===(n=this._floorFilterElement)||void 0===n?void 0:n.floorFilterWidget,!0):void 0}}))}_fullscreenStateChange(i){"ready"===i&&this._showFullscreen?this._showFullscreen=!1:"active"!==i||this._showFullscreen||(this._showFullscreen=!0)}_getActionGroup(i,s,e,a){return t("div",null,t("calcite-action",{alignment:"center",class:`${"s"===this.mapWidgetsSize?"square-32":"m"===this.mapWidgetsSize?"square-40":"square-48"} ${this.stackTools?"":"margin-bottom-1-2"} border-bottom ${this.stackTools?"":"box-shadow"}`,compact:!1,disabled:s,icon:i,id:i,onClick:a,scale:"s",text:""},t("calcite-icon",{icon:"cheveron-up",scale:"s",slot:"icon"})),t("calcite-tooltip",{label:"",placement:"trailing","reference-element":i},t("span",null,e)))}_getWidget(i,t,s){if(this._widgets.indexOf(i)<0&&this.mapView&&t){const e=this.toolOrder.indexOf(i),a=new this.Expand({view:this.mapView,content:t});this.mapView.ui.add(s?a:t,{position:this.position,index:e>-1?e+(this.enableHome?2:1):1}),this._widgets.push(i)}}_showLegend(){this._showLegendWidget=!this._showLegendWidget,this._showTools=!1}_search(){this._showSearchWidget=!this._showSearchWidget,this._showTools=!1}_toggleBasemapPicker(){this._showBasemapWidget=!this._showBasemapWidget,this._showTools=!1}_toggleFloorFilter(){this._showFloorFilter=!this._showFloorFilter,this._showTools=!1}_expand(){this._showFullscreen=!this._showFullscreen}_toggleTools(){this._showTools||(this._showBasemapWidget=!1,this._showSearchWidget=!1,this._showLegendWidget=!1,this._showFloorFilter=!1),this._showTools=!this._showTools}async _getTranslations(){const i=await o(this.el);this._translations=i[0]}get el(){return e(this)}static get watchers(){return{mapView:["mapViewWatchHandler"],_showBasemapWidget:["_showBasemapWidgetWatchHandler"],_showFloorFilter:["_showFloorFilterWatchHandler"],_showFullscreen:["_showFullscreenWatchHandler"],_showLegendWidget:["_showLegendWidgetWatchHandler"],_showSearchWidget:["_showSearchWidgetWatchHandler"]}}};u.style=":host{display:block}.display-none{display:none}.margin-top-1-2{margin-top:0.5rem}.square-32{width:32px;height:32px}.square-40{width:40px;height:40px}.square-48{width:48px;height:48px}.width-40{width:40px}.square-40-41{width:40px;height:41px}.border-bottom{border-bottom:1px solid var(--calcite-color-border-3)}.box-shadow{box-shadow:0 1px 2px rgba(0, 0, 0, 0.3)}.margin-bottom-1-2{margin-bottom:0.5rem}";export{n as basemap_gallery,c as floor_filter,l as map_fullscreen,r as map_legend,d as map_picker,p as map_search,u as map_tools}
@@ -0,0 +1,6 @@
1
+ /*!
2
+ * Copyright 2022 Esri
3
+ * Licensed under the Apache License, Version 2.0
4
+ * http://www.apache.org/licenses/LICENSE-2.0
5
+ */
6
+ import{r as i,c as t,h as e,H as s,g as o}from"./p-6d753a3d.js";import{g as h}from"./p-896c9644.js";import{E as l}from"./p-c1cf3ebc.js";import{g as a}from"./p-5aaa05ef.js";import"./p-82e085d0.js";const d=class{constructor(e){i(this,e),this.showIntroductionWindow=t(this,"showIntroductionWindow",7),this.showCoverPage=t(this,"showCoverPage",7),this._defaultCenterHonored=!1,this._defaultLevelHonored=!1,this._shouldSetMapView=!1,this.appProxies=void 0,this.basemapConfig=void 0,this.coverPageEnabled=void 0,this.defaultCenter="",this.defaultGlobalId="",this.defaultLayer="",this.defaultLevel="",this.defaultOid="",this.defaultWebmap="",this.introductionWindowEnabled=!1,this.enableAutoRefresh=!1,this.enableBasemap=!0,this.enableColumnReorder=!0,this.enableCSV=!0,this.enableFloorFilter=!0,this.enableFullscreen=!0,this.enableHome=!0,this.enableInlineEdit=!1,this.enableLegend=!0,this.enableSearch=!0,this.enableShare=!1,this.enableZoom=!0,this.hideMapOnLoad=!1,this.mapInfos=[],this.onlyShowUpdatableLayers=!0,this.popupHeaderColor=void 0,this.popupHeaderHoverColor=void 0,this.popupHeaderHoverTextColor=void 0,this.popupHeaderTextColor=void 0,this.searchConfiguration=void 0,this.shareIncludeEmbed=void 0,this.shareIncludeSocial=void 0,this.showNewestFirst=!0,this.theme="light",this.zoomAndScrollToSelected=!1,this.zoomToScale=void 0,this._expandPopup=this.hideMapOnLoad,this._hideFooter=!1,this._hideTable=!1,this._isMobile=void 0,this._translations=void 0,this._layer=void 0,this._layoutMode=l.GRID,this._mapInfo=void 0,this._mapView=void 0,this._panelOpen=!0,this._numSelected=0,this._tableOnly=!1}enableZoomWatchHandler(){this._initMapZoom()}hideMapOnLoadWatchHandler(){this.showHideMapPopupAndTable(this.hideMapOnLoad),this._expandPopup=this.hideMapOnLoad}mapInfosWatchHandler(){console.log("mapInfosWatchHandler"),console.log(this.mapInfos)}async featureSelectionChange(i){var t;this._numSelected=null===(t=i.detail)||void 0===t?void 0:t.length}async popupClosed(){this._isMobile&&this.showHideMapPopupAndTable(!1)}async idsFound(i){const t=i.detail;this._tableOnly=t.tableIds.length>0&&0===t.layerIds.length,this._tableOnly&&(this._expandPopup=!0)}async layoutChanged(i){this._layoutMode=i.detail}async mapChanged(i){this._mapChange=i.detail,await this._mapChange.mapView.when((async()=>{await this._setMapView()}))}async beforeMapChanged(){this._expandPopup&&(this._shouldSetMapView=!0)}async layerSelectionChange(i){const t=i.detail[0],e=await a(this._mapView,t);await e.when((()=>{this._layer=e}))}async mapInfoChange(){this._expandPopup=this.hideMapOnLoad}async componentWillLoad(){await this._getTranslations(),this._resizeObserver=new ResizeObserver((()=>this._onResize()))}render(){return e(s,{key:"9624c9a65dfde0984d1abdc8ed78f709d58874f3"},e("calcite-shell",{key:"0b54737e19b7ab1b17a1841b7b83267515a5de51",class:"position-relative"},e("calcite-panel",{key:"aea71b81bd854548f921920cb6dc259d8441a2b2",class:"width-full height-full "+(this.popupHeaderColor&&"#FFFFFF"!==this.popupHeaderColor?"border-width-0":"")},this._getBody(this._layoutMode,this._panelOpen,this._hideTable)),this._getFooter()))}async componentDidRender(){this._shouldSetMapView&&(this._shouldSetMapView=!1,this._mapChange&&await this._setMapView())}async componentDidLoad(){this._resizeObserver.observe(this.el)}_getFooter(){var i,t,s,o;const h=(null===(i=this._layer)||void 0===i?void 0:i.editingEnabled)&&(null===(o=null===(s=null===(t=this._layer)||void 0===t?void 0:t.capabilities)||void 0===s?void 0:s.operations)||void 0===o?void 0:o.supportsDelete);return this._isMobile&&this._numSelected>0&&!this._hideFooter?e("div",{class:"width-100",slot:"footer"},e("div",{class:"display-flex padding-1-2"},e("calcite-button",{appearance:"solid",id:"solutions-show",onClick:()=>this.showHideMapPopupAndTable(!0),width:"full"},this._translations.view.replace("{{n}}",this._numSelected.toString())),h?e("delete-button",{class:"padding-inline-start-1 width-full",id:"solutions-delete",ids:this._layerTable.selectedIds,layer:this._layer}):void 0)):void 0}_getDividerIcon(i,t){let e="";switch(i){case l.HORIZONTAL:e=t?"chevrons-up":"chevrons-down";break;case l.VERTICAL:case l.GRID:e=t?"chevrons-left":"chevrons-right"}return e}_getMapSizeClass(i,t,e){let s="";switch(i){case l.HORIZONTAL:s=(t&&!e?"height-1-2 display-grid":t&&e?"height-full":"height-0")+" width-full position-relative";break;case l.GRID:s="height-full position-relative "+(t?"width-1-3":"width-0");break;case l.VERTICAL:s="height-full position-relative "+(t?"width-1-2":"width-0")}return s}_getTableSizeClass(i,t){let e="";switch(i){case l.HORIZONTAL:e=(t?"height-1-2":"height-full")+" width-full display-flex flex-column";break;case l.GRID:e=(t?"width-2-3":"width-full")+" height-full display-flex";break;case l.VERTICAL:e=(t?"width-1-2":"width-full")+" height-full display-flex"}return e}_getBody(i,t,s){const o="dark"===this.theme?"calcite-mode-dark":"calcite-mode-light";return e("calcite-panel",{class:"width-full height-full"},e("div",{class:"width-full height-full overflow-hidden "+(i===l.HORIZONTAL?"":"display-flex")},this._getMapAndCard(i,t,s),this._getTable(i,t,s)),this.coverPageEnabled&&e("div",{class:"floating-container",onClick:this.coverPageButtonClick.bind(this)},e("calcite-button",{appearance:"solid",class:`floating-button ${o}`,"icon-start":"content-minimal",kind:"neutral",label:"",round:!0,scale:"l","split-child":"primary",width:"auto"})),this.introductionWindowEnabled&&e("div",{class:"floating-container",onClick:this.infoButtonClick.bind(this)},e("calcite-button",{appearance:"solid",class:`floating-button ${o}`,"icon-start":"information-letter",kind:"neutral",label:"",round:!0,scale:"l","split-child":"primary",width:"auto"})))}infoButtonClick(){this.showIntroductionWindow.emit()}coverPageButtonClick(){this.showCoverPage.emit()}_getMapAndCard(i,t,s){const o=this._getMapSizeClass(i,t,s);return e("div",{class:`${o} overflow-hidden`},this._getMapNode(t),this._getPopupExpandNode())}_getMapNode(i){var t;return e("div",{class:(this._layoutMode!==l.HORIZONTAL||this._isMobile&&!i?"adjusted-height-50":"")+" overflow-hidden"},e("map-card",{appProxies:this.appProxies,basemapConfig:this.basemapConfig,class:"width-full",defaultWebmapId:this.defaultWebmap,enableBasemap:this.enableBasemap,enableFloorFilter:this.enableFloorFilter,enableFullscreen:this.enableFullscreen,enableHome:this.enableHome,enableLegend:this.enableLegend,enableSearch:this.enableSearch,enableSingleExpand:!0,hidden:this._expandPopup&&!this._isMobile,homeZoomIndex:3,homeZoomPosition:"top-left",homeZoomToolsSize:"s",mapInfos:null===(t=this.mapInfos)||void 0===t?void 0:t.filter((i=>!1!==i.visible)),mapWidgetsIndex:0,mapWidgetsPosition:"top-right",mapWidgetsSize:"m",stackTools:!0,theme:this.theme,toolOrder:["legend","search","fullscreen","basemap","floorfilter"]}))}_getPopupExpandNode(){var i;const t=this._expandPopup?"chevrons-down":"chevrons-up",s="expand-popup",o=this._expandPopup?this._translations.collapsePopup:this._translations.expandPopup,h="dark"===this.theme?"calcite-mode-dark":"calcite-mode-light",l=this._expandPopup?1===(null===(i=this.mapInfos)||void 0===i?void 0:i.length)||this._isMobile?"position-absolute-0":"position-absolute-50":"height-full",a=this._isMobile?"display-none height-0":"";return e("div",{class:`${this.popupHeaderColor?"":this._isMobile?"calcite-mode-light":"calcite-mode-dark"} ${l} ${this._isMobile&&this._hideTable?"position-absolute-0 width-full height-full":this._isMobile?"display-none height-0":""}`,style:{"--calcite-color-foreground-1":this.popupHeaderColor,"--calcite-color-foreground-2":this.popupHeaderHoverColor,"--calcite-color-text-3":this.popupHeaderTextColor,"--calcite-color-text-2":this.popupHeaderTextColor}},e("calcite-panel",null,this._isMobile?void 0:e("div",{class:`display-flex align-items-center ${a}`,slot:"header-content"},e("calcite-icon",{icon:"information",scale:"s"}),e("div",{class:"padding-inline-start-75"},this._translations.information)),e("calcite-action",{class:a,disabled:this._tableOnly,icon:t,id:s,onClick:()=>this._togglePopup(),slot:"header-actions-end",text:""}),this._tableOnly?void 0:e("calcite-tooltip",{class:h,label:"",placement:"bottom","reference-element":s},e("span",null,o)),this._getCardNode()))}_togglePopup(){this._expandPopup=!this._expandPopup}_getCardNode(){return e("div",{class:"width-50 height-full "+("dark"===this.theme?"calcite-mode-dark":"calcite-mode-light")},e("card-manager",{class:(this._expandPopup||this._isMobile?"height-full":"height-50")+" width-full",isMobile:this._isMobile,mapView:null==this?void 0:this._mapView,zoomAndScrollToSelected:this.zoomAndScrollToSelected}))}_getTable(i,t,s){var o,h;const a=s&&this._isMobile?"visibility-hidden":"",d=this._getTableSizeClass(i,t),n=this._getDividerIcon(i,t),r=t?this._translations.close:this._translations.open,c="toggle-layout",p=i===l.HORIZONTAL?"horizontal":"vertical",g=i===l.HORIZONTAL?"header":"panel-start",u=this.defaultWebmap&&this.defaultLayer,b=this.defaultGlobalId?(null===(o=this.defaultGlobalId)||void 0===o?void 0:o.indexOf(","))>-1?this.defaultGlobalId.split(","):[this.defaultGlobalId]:void 0,f=this.defaultOid?(null===(h=this.defaultOid)||void 0===h?void 0:h.indexOf(","))>-1?this.defaultOid.split(",").map((i=>parseInt(i,10))):[parseInt(this.defaultOid,10)]:void 0;return e("calcite-shell",{class:`${d} ${a} border-bottom`},this._isMobile?void 0:e("calcite-action-bar",{class:"border-sides",expandDisabled:!0,layout:p,slot:g},e("calcite-action",{class:"toggle-node",icon:n,id:c,onClick:()=>this._toggleLayout(),text:""}),e("calcite-tooltip",{label:r,placement:"bottom","reference-element":c},e("span",null,r))),e("div",{class:"width-full height-full position-relative"},e("layer-table",{defaultGlobalId:u?b:void 0,defaultLayerId:u?this.defaultLayer:"",defaultOid:u&&!b?f:void 0,enableAutoRefresh:this.enableAutoRefresh,enableCSV:this.enableCSV,enableColumnReorder:this.enableColumnReorder,enableInlineEdit:this.enableInlineEdit,enableShare:this.enableShare,isMobile:this._isMobile,mapHidden:this._expandPopup,mapInfo:this._mapInfo,mapView:null==this?void 0:this._mapView,onlyShowUpdatableLayers:this.onlyShowUpdatableLayers,ref:i=>this._layerTable=i,shareIncludeEmbed:this.shareIncludeEmbed,shareIncludeSocial:this.shareIncludeSocial,showNewestFirst:this.showNewestFirst,zoomAndScrollToSelected:this.zoomAndScrollToSelected,zoomToScale:this.zoomToScale})))}_onResize(){const i=this.el.offsetWidth<1024,t=!this._isMobile&&i;this._isMobile=i,this._layoutMode=this._isMobile?l.HORIZONTAL:l.GRID,t&&(this._panelOpen=!0)}_toggleLayout(){this._panelOpen=!this._panelOpen}showHideMapPopupAndTable(i){this._expandPopup=!1,this._hideTable=i,this._hideFooter=i}_getMapInfo(i){let t;return this.mapInfos.some((e=>{if(e.id===i)return t=e,!0})),Object.assign({},t)}async _setMapView(){var i;this._mapInfo=this._getMapInfo(this._mapChange.id),this._mapView=this._mapChange.mapView,this._initMapZoom(),this._mapView.popupEnabled=!1;const t=!this.defaultCenter||this._defaultCenterHonored||null===(i=this.defaultCenter)||void 0===i?void 0:i.split(";").map((i=>parseFloat(i))),e=!this.defaultLevel||this._defaultLevelHonored?void 0:parseInt(this.defaultLevel,10);t&&e&&(await this._mapView.goTo({center:t,zoom:e}),this._defaultCenterHonored=!0,this._defaultLevelHonored=!0)}_initMapZoom(){this.enableZoom?this.enableZoom&&this._mapView.ui.add({component:"zoom",position:"top-left",index:0}):this._mapView.ui.remove("zoom")}async _getTranslations(){const i=await h(this.el);this._translations=i[0]}get el(){return o(this)}static get watchers(){return{enableZoom:["enableZoomWatchHandler"],hideMapOnLoad:["hideMapOnLoadWatchHandler"],mapInfos:["mapInfosWatchHandler"]}}};d.style=":host{display:block;--calcite-label-margin-bottom:0px;--solutions-theme-foreground-color:var(--calcite-color-foreground-1)}.padding-1-2{padding:0.5rem}.display-flex{display:flex}.width-full{width:100%}.width-1-2{position:relative;width:50%}.width-1-3{position:relative;width:33.33%}.width-2-3{position:relative;width:66.66%}.width-0{width:0}.height-full{height:100%}.height-1-2{position:relative;height:50%}.height-0{height:0}.toggle-node{width:51px;height:51px}.overflow-hidden{overflow:hidden}.flex-column{flex-direction:column}.border{border:1px solid var(--calcite-color-border-3)}.border-bottom{border-bottom:1px solid var(--calcite-color-border-3)}.border-sides{border-left:1px solid var(--calcite-color-border-3);border-right:1px solid var(--calcite-color-border-3)}.position-relative{position:relative}.height-50{height:50%}.adjusted-height-50{height:calc(50% - 25px)}.adjusted-height-100{height:calc(100% - 50px)}.adjusted-height-100-50{height:calc(100% - 50px)}.display-none{display:none}.height-53{height:53px}.position-absolute-53{position:absolute;top:53px}.display-grid{display:grid}.height-50-px{height:50px}.padding-inline-start-75{padding-inline-start:0.75rem}.align-items-center{align-items:center}.esri-floor-filter__close-levels-button{width:40px !important;height:40px !important}.esri-floor-filter__level-button{width:40px !important;height:40px !important}.esri-floor-filter__browse-button{width:40px !important;height:40px !important}.position-absolute-50{position:absolute;top:50px;bottom:0px;left:0px;right:0px}.position-absolute-0{position:absolute;top:0px;bottom:0px;left:0px;right:0px}.visibility-hidden{visibility:hidden;height:0px}.position-fixed{position:fixed}.border-width-0{border-width:0px}.border-bottom-width-0{border-bottom-width:0px}.floating-container{position:fixed;width:100px;height:10px;bottom:0;right:0;margin:100px 0px}.floating-container .floating-button{box-shadow:0 10px 25px rgb(92 93 94 / 60%);transform:translatey(5px);transition:all 0.3s}";export{d as crowdsource_manager}