@esri/solutions-components 0.7.50 → 0.7.52
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/cjs/basemap-gallery_7.cjs.entry.js +30 -26
- package/dist/cjs/card-manager_3.cjs.entry.js +11 -2
- package/dist/cjs/crowdsource-manager.cjs.entry.js +14 -1
- package/dist/collection/components/crowdsource-manager/crowdsource-manager.js +14 -1
- package/dist/collection/components/floor-filter/floor-filter.js +30 -26
- package/dist/collection/components/layer-table/layer-table.js +11 -2
- package/dist/components/crowdsource-manager.js +14 -1
- package/dist/components/floor-filter2.js +30 -26
- package/dist/components/layer-table2.js +11 -2
- package/dist/esm/basemap-gallery_7.entry.js +30 -26
- package/dist/esm/card-manager_3.entry.js +11 -2
- package/dist/esm/crowdsource-manager.entry.js +14 -1
- package/dist/solutions-components/{p-21bc3c8a.entry.js → p-54b7b859.entry.js} +1 -1
- package/dist/solutions-components/{p-a5fd812c.entry.js → p-697e9e11.entry.js} +1 -1
- package/dist/solutions-components/p-7cfc4ba5.entry.js +6 -0
- package/dist/solutions-components/solutions-components.esm.js +1 -1
- package/dist/types/components/crowdsource-manager/crowdsource-manager.d.ts +10 -2
- package/dist/types/components/floor-filter/floor-filter.d.ts +1 -1
- package/dist/types/components/layer-table/layer-table.d.ts +9 -0
- package/package.json +1 -1
- package/dist/solutions-components/p-6a83b842.entry.js +0 -6
@@ -136,8 +136,17 @@ const FloorFilter = class {
|
|
136
136
|
//
|
137
137
|
//--------------------------------------------------------------------------
|
138
138
|
async mapViewWatchHandler() {
|
139
|
-
|
140
|
-
|
139
|
+
const webMap = this.mapView.map;
|
140
|
+
await webMap.when(() => {
|
141
|
+
if (this.floorFilterWidget) {
|
142
|
+
this.floorFilterWidget.destroy();
|
143
|
+
this.floorFilterWidget = undefined;
|
144
|
+
}
|
145
|
+
if (this._floorFilterElement) {
|
146
|
+
this._floorFilterElement.remove();
|
147
|
+
this._floorFilterElement = document.createElement("div");
|
148
|
+
}
|
149
|
+
this._initFloorFilter(this.mapView, webMap);
|
141
150
|
});
|
142
151
|
}
|
143
152
|
//--------------------------------------------------------------------------
|
@@ -177,30 +186,25 @@ const FloorFilter = class {
|
|
177
186
|
/**
|
178
187
|
* Initialize the floor filter or reset the current view if it already exists
|
179
188
|
*/
|
180
|
-
_initFloorFilter(view) {
|
181
|
-
var _a, _b, _c
|
182
|
-
if (view && this.enabled && this.FloorFilter && (
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
this.
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
this.
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
this.
|
198
|
-
|
199
|
-
});
|
200
|
-
}
|
201
|
-
else {
|
202
|
-
this.floorFilterWidget.viewModel.view = view;
|
203
|
-
}
|
189
|
+
_initFloorFilter(view, webMap) {
|
190
|
+
var _a, _b, _c;
|
191
|
+
if (view && this.enabled && this.FloorFilter && (webMap === null || webMap === void 0 ? void 0 : webMap.floorInfo)) {
|
192
|
+
this.floorFilterWidget = new this.FloorFilter({
|
193
|
+
container: this._floorFilterElement,
|
194
|
+
view
|
195
|
+
});
|
196
|
+
(_a = this._facilityHandle) === null || _a === void 0 ? void 0 : _a.remove();
|
197
|
+
this._facilityHandle = this.reactiveUtils.watch(() => this.floorFilterWidget.facility, (facility) => {
|
198
|
+
this.facilityChanged.emit(facility);
|
199
|
+
});
|
200
|
+
(_b = this._levelHandle) === null || _b === void 0 ? void 0 : _b.remove();
|
201
|
+
this._levelHandle = this.reactiveUtils.watch(() => this.floorFilterWidget.level, (level) => {
|
202
|
+
this.levelChanged.emit(level);
|
203
|
+
});
|
204
|
+
(_c = this._siteHandle) === null || _c === void 0 ? void 0 : _c.remove();
|
205
|
+
this._siteHandle = this.reactiveUtils.watch(() => this.floorFilterWidget.site, (site) => {
|
206
|
+
this.siteChanged.emit(site);
|
207
|
+
});
|
204
208
|
}
|
205
209
|
}
|
206
210
|
get el() { return index.getElement(this); }
|
@@ -184,9 +184,15 @@ const LayerTable = class {
|
|
184
184
|
// Watch handlers
|
185
185
|
//
|
186
186
|
//--------------------------------------------------------------------------
|
187
|
+
/**
|
188
|
+
* Handle url defaults when defaultOid is set
|
189
|
+
*/
|
187
190
|
async defaultOidWatchHandler() {
|
188
191
|
await this._handleDefaults();
|
189
192
|
}
|
193
|
+
/**
|
194
|
+
* Handle url defaults when defaultGlobalId is set
|
195
|
+
*/
|
190
196
|
async defaultGlobalIdWatchHandler() {
|
191
197
|
await this._handleDefaults();
|
192
198
|
}
|
@@ -1053,11 +1059,11 @@ const LayerTable = class {
|
|
1053
1059
|
_resetColumnTemplates() {
|
1054
1060
|
var _a, _b;
|
1055
1061
|
const columnTemplates = this._getColumnTemplates((_a = this._layer) === null || _a === void 0 ? void 0 : _a.id, (_b = this._layer) === null || _b === void 0 ? void 0 : _b.fields);
|
1056
|
-
const hasChange = columnTemplates.some((ct, i) => {
|
1062
|
+
const hasChange = columnTemplates === null || columnTemplates === void 0 ? void 0 : columnTemplates.some((ct, i) => {
|
1057
1063
|
var _a;
|
1058
1064
|
return JSON.stringify((_a = this._table) === null || _a === void 0 ? void 0 : _a.tableTemplate.columnTemplates[i]) !== JSON.stringify(ct);
|
1059
1065
|
});
|
1060
|
-
if (this._table && columnTemplates && hasChange) {
|
1066
|
+
if (this._table && columnTemplates && (hasChange || !this._columnsInfo)) {
|
1061
1067
|
this._table.tableTemplate = new this.TableTemplate({
|
1062
1068
|
columnTemplates
|
1063
1069
|
});
|
@@ -1117,6 +1123,9 @@ const LayerTable = class {
|
|
1117
1123
|
this.selectedIds = this.selectedIds.filter(id => this._allIds.indexOf(id) > -1);
|
1118
1124
|
await this._refresh();
|
1119
1125
|
}
|
1126
|
+
/**
|
1127
|
+
* Handle default OID or GlobalID from url parameters
|
1128
|
+
*/
|
1120
1129
|
async _handleDefaults() {
|
1121
1130
|
var _a, _b;
|
1122
1131
|
if (!this._defaultOidHonored && ((_a = this.defaultOid) === null || _a === void 0 ? void 0 : _a.length) > 0 && this.defaultOid[0] > -1 && this._table) {
|
@@ -19,13 +19,26 @@ const crowdsourceManagerCss = ":host{display:block;--calcite-label-margin-bottom
|
|
19
19
|
const CrowdsourceManager = class {
|
20
20
|
constructor(hostRef) {
|
21
21
|
index.registerInstance(this, hostRef);
|
22
|
+
//--------------------------------------------------------------------------
|
23
|
+
//
|
24
|
+
// Properties (protected)
|
25
|
+
//
|
26
|
+
//--------------------------------------------------------------------------
|
22
27
|
/**
|
23
28
|
* boolean: When true the map view will be set after render due to popup obstructing the view
|
24
29
|
* MapView.when is not fired when mapView is not currently visible
|
25
30
|
*/
|
26
|
-
this._shouldSetMapView = false;
|
27
31
|
this._defaultCenterHonored = false;
|
32
|
+
/**
|
33
|
+
* boolean: When true the map view will be set after render due to popup obstructing the view
|
34
|
+
* MapView.when is not fired when mapView is not currently visible
|
35
|
+
*/
|
28
36
|
this._defaultLevelHonored = false;
|
37
|
+
/**
|
38
|
+
* boolean: When true the map view will be set after render due to popup obstructing the view
|
39
|
+
* MapView.when is not fired when mapView is not currently visible
|
40
|
+
*/
|
41
|
+
this._shouldSetMapView = false;
|
29
42
|
this.defaultCenter = "";
|
30
43
|
this.defaultGlobalId = "";
|
31
44
|
this.defaultLayer = "";
|
@@ -24,13 +24,26 @@ import { ELayoutMode } from "../../utils/interfaces";
|
|
24
24
|
import { getLayerOrTable } from "../../utils/mapViewUtils";
|
25
25
|
export class CrowdsourceManager {
|
26
26
|
constructor() {
|
27
|
+
//--------------------------------------------------------------------------
|
28
|
+
//
|
29
|
+
// Properties (protected)
|
30
|
+
//
|
31
|
+
//--------------------------------------------------------------------------
|
27
32
|
/**
|
28
33
|
* boolean: When true the map view will be set after render due to popup obstructing the view
|
29
34
|
* MapView.when is not fired when mapView is not currently visible
|
30
35
|
*/
|
31
|
-
this._shouldSetMapView = false;
|
32
36
|
this._defaultCenterHonored = false;
|
37
|
+
/**
|
38
|
+
* boolean: When true the map view will be set after render due to popup obstructing the view
|
39
|
+
* MapView.when is not fired when mapView is not currently visible
|
40
|
+
*/
|
33
41
|
this._defaultLevelHonored = false;
|
42
|
+
/**
|
43
|
+
* boolean: When true the map view will be set after render due to popup obstructing the view
|
44
|
+
* MapView.when is not fired when mapView is not currently visible
|
45
|
+
*/
|
46
|
+
this._shouldSetMapView = false;
|
34
47
|
this.defaultCenter = "";
|
35
48
|
this.defaultGlobalId = "";
|
36
49
|
this.defaultLayer = "";
|
@@ -32,8 +32,17 @@ export class FloorFilter {
|
|
32
32
|
//
|
33
33
|
//--------------------------------------------------------------------------
|
34
34
|
async mapViewWatchHandler() {
|
35
|
-
|
36
|
-
|
35
|
+
const webMap = this.mapView.map;
|
36
|
+
await webMap.when(() => {
|
37
|
+
if (this.floorFilterWidget) {
|
38
|
+
this.floorFilterWidget.destroy();
|
39
|
+
this.floorFilterWidget = undefined;
|
40
|
+
}
|
41
|
+
if (this._floorFilterElement) {
|
42
|
+
this._floorFilterElement.remove();
|
43
|
+
this._floorFilterElement = document.createElement("div");
|
44
|
+
}
|
45
|
+
this._initFloorFilter(this.mapView, webMap);
|
37
46
|
});
|
38
47
|
}
|
39
48
|
//--------------------------------------------------------------------------
|
@@ -73,30 +82,25 @@ export class FloorFilter {
|
|
73
82
|
/**
|
74
83
|
* Initialize the floor filter or reset the current view if it already exists
|
75
84
|
*/
|
76
|
-
_initFloorFilter(view) {
|
77
|
-
var _a, _b, _c
|
78
|
-
if (view && this.enabled && this.FloorFilter && (
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
this.
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
this.
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
this.
|
94
|
-
|
95
|
-
});
|
96
|
-
}
|
97
|
-
else {
|
98
|
-
this.floorFilterWidget.viewModel.view = view;
|
99
|
-
}
|
85
|
+
_initFloorFilter(view, webMap) {
|
86
|
+
var _a, _b, _c;
|
87
|
+
if (view && this.enabled && this.FloorFilter && (webMap === null || webMap === void 0 ? void 0 : webMap.floorInfo)) {
|
88
|
+
this.floorFilterWidget = new this.FloorFilter({
|
89
|
+
container: this._floorFilterElement,
|
90
|
+
view
|
91
|
+
});
|
92
|
+
(_a = this._facilityHandle) === null || _a === void 0 ? void 0 : _a.remove();
|
93
|
+
this._facilityHandle = this.reactiveUtils.watch(() => this.floorFilterWidget.facility, (facility) => {
|
94
|
+
this.facilityChanged.emit(facility);
|
95
|
+
});
|
96
|
+
(_b = this._levelHandle) === null || _b === void 0 ? void 0 : _b.remove();
|
97
|
+
this._levelHandle = this.reactiveUtils.watch(() => this.floorFilterWidget.level, (level) => {
|
98
|
+
this.levelChanged.emit(level);
|
99
|
+
});
|
100
|
+
(_c = this._siteHandle) === null || _c === void 0 ? void 0 : _c.remove();
|
101
|
+
this._siteHandle = this.reactiveUtils.watch(() => this.floorFilterWidget.site, (site) => {
|
102
|
+
this.siteChanged.emit(site);
|
103
|
+
});
|
100
104
|
}
|
101
105
|
}
|
102
106
|
static get is() { return "floor-filter"; }
|
@@ -99,9 +99,15 @@ export class LayerTable {
|
|
99
99
|
// Watch handlers
|
100
100
|
//
|
101
101
|
//--------------------------------------------------------------------------
|
102
|
+
/**
|
103
|
+
* Handle url defaults when defaultOid is set
|
104
|
+
*/
|
102
105
|
async defaultOidWatchHandler() {
|
103
106
|
await this._handleDefaults();
|
104
107
|
}
|
108
|
+
/**
|
109
|
+
* Handle url defaults when defaultGlobalId is set
|
110
|
+
*/
|
105
111
|
async defaultGlobalIdWatchHandler() {
|
106
112
|
await this._handleDefaults();
|
107
113
|
}
|
@@ -968,11 +974,11 @@ export class LayerTable {
|
|
968
974
|
_resetColumnTemplates() {
|
969
975
|
var _a, _b;
|
970
976
|
const columnTemplates = this._getColumnTemplates((_a = this._layer) === null || _a === void 0 ? void 0 : _a.id, (_b = this._layer) === null || _b === void 0 ? void 0 : _b.fields);
|
971
|
-
const hasChange = columnTemplates.some((ct, i) => {
|
977
|
+
const hasChange = columnTemplates === null || columnTemplates === void 0 ? void 0 : columnTemplates.some((ct, i) => {
|
972
978
|
var _a;
|
973
979
|
return JSON.stringify((_a = this._table) === null || _a === void 0 ? void 0 : _a.tableTemplate.columnTemplates[i]) !== JSON.stringify(ct);
|
974
980
|
});
|
975
|
-
if (this._table && columnTemplates && hasChange) {
|
981
|
+
if (this._table && columnTemplates && (hasChange || !this._columnsInfo)) {
|
976
982
|
this._table.tableTemplate = new this.TableTemplate({
|
977
983
|
columnTemplates
|
978
984
|
});
|
@@ -1032,6 +1038,9 @@ export class LayerTable {
|
|
1032
1038
|
this.selectedIds = this.selectedIds.filter(id => this._allIds.indexOf(id) > -1);
|
1033
1039
|
await this._refresh();
|
1034
1040
|
}
|
1041
|
+
/**
|
1042
|
+
* Handle default OID or GlobalID from url parameters
|
1043
|
+
*/
|
1035
1044
|
async _handleDefaults() {
|
1036
1045
|
var _a, _b;
|
1037
1046
|
if (!this._defaultOidHonored && ((_a = this.defaultOid) === null || _a === void 0 ? void 0 : _a.length) > 0 && this.defaultOid[0] > -1 && this._table) {
|
@@ -71,13 +71,26 @@ const CrowdsourceManager$1 = /*@__PURE__*/ proxyCustomElement(class CrowdsourceM
|
|
71
71
|
constructor() {
|
72
72
|
super();
|
73
73
|
this.__registerHost();
|
74
|
+
//--------------------------------------------------------------------------
|
75
|
+
//
|
76
|
+
// Properties (protected)
|
77
|
+
//
|
78
|
+
//--------------------------------------------------------------------------
|
74
79
|
/**
|
75
80
|
* boolean: When true the map view will be set after render due to popup obstructing the view
|
76
81
|
* MapView.when is not fired when mapView is not currently visible
|
77
82
|
*/
|
78
|
-
this._shouldSetMapView = false;
|
79
83
|
this._defaultCenterHonored = false;
|
84
|
+
/**
|
85
|
+
* boolean: When true the map view will be set after render due to popup obstructing the view
|
86
|
+
* MapView.when is not fired when mapView is not currently visible
|
87
|
+
*/
|
80
88
|
this._defaultLevelHonored = false;
|
89
|
+
/**
|
90
|
+
* boolean: When true the map view will be set after render due to popup obstructing the view
|
91
|
+
* MapView.when is not fired when mapView is not currently visible
|
92
|
+
*/
|
93
|
+
this._shouldSetMapView = false;
|
81
94
|
this.defaultCenter = "";
|
82
95
|
this.defaultGlobalId = "";
|
83
96
|
this.defaultLayer = "";
|
@@ -26,8 +26,17 @@ const FloorFilter = /*@__PURE__*/ proxyCustomElement(class FloorFilter extends H
|
|
26
26
|
//
|
27
27
|
//--------------------------------------------------------------------------
|
28
28
|
async mapViewWatchHandler() {
|
29
|
-
|
30
|
-
|
29
|
+
const webMap = this.mapView.map;
|
30
|
+
await webMap.when(() => {
|
31
|
+
if (this.floorFilterWidget) {
|
32
|
+
this.floorFilterWidget.destroy();
|
33
|
+
this.floorFilterWidget = undefined;
|
34
|
+
}
|
35
|
+
if (this._floorFilterElement) {
|
36
|
+
this._floorFilterElement.remove();
|
37
|
+
this._floorFilterElement = document.createElement("div");
|
38
|
+
}
|
39
|
+
this._initFloorFilter(this.mapView, webMap);
|
31
40
|
});
|
32
41
|
}
|
33
42
|
//--------------------------------------------------------------------------
|
@@ -67,30 +76,25 @@ const FloorFilter = /*@__PURE__*/ proxyCustomElement(class FloorFilter extends H
|
|
67
76
|
/**
|
68
77
|
* Initialize the floor filter or reset the current view if it already exists
|
69
78
|
*/
|
70
|
-
_initFloorFilter(view) {
|
71
|
-
var _a, _b, _c
|
72
|
-
if (view && this.enabled && this.FloorFilter && (
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
this.
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
this.
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
this.
|
88
|
-
|
89
|
-
});
|
90
|
-
}
|
91
|
-
else {
|
92
|
-
this.floorFilterWidget.viewModel.view = view;
|
93
|
-
}
|
79
|
+
_initFloorFilter(view, webMap) {
|
80
|
+
var _a, _b, _c;
|
81
|
+
if (view && this.enabled && this.FloorFilter && (webMap === null || webMap === void 0 ? void 0 : webMap.floorInfo)) {
|
82
|
+
this.floorFilterWidget = new this.FloorFilter({
|
83
|
+
container: this._floorFilterElement,
|
84
|
+
view
|
85
|
+
});
|
86
|
+
(_a = this._facilityHandle) === null || _a === void 0 ? void 0 : _a.remove();
|
87
|
+
this._facilityHandle = this.reactiveUtils.watch(() => this.floorFilterWidget.facility, (facility) => {
|
88
|
+
this.facilityChanged.emit(facility);
|
89
|
+
});
|
90
|
+
(_b = this._levelHandle) === null || _b === void 0 ? void 0 : _b.remove();
|
91
|
+
this._levelHandle = this.reactiveUtils.watch(() => this.floorFilterWidget.level, (level) => {
|
92
|
+
this.levelChanged.emit(level);
|
93
|
+
});
|
94
|
+
(_c = this._siteHandle) === null || _c === void 0 ? void 0 : _c.remove();
|
95
|
+
this._siteHandle = this.reactiveUtils.watch(() => this.floorFilterWidget.site, (site) => {
|
96
|
+
this.siteChanged.emit(site);
|
97
|
+
});
|
94
98
|
}
|
95
99
|
}
|
96
100
|
get el() { return this; }
|
@@ -128,9 +128,15 @@ const LayerTable = /*@__PURE__*/ proxyCustomElement(class LayerTable extends HTM
|
|
128
128
|
// Watch handlers
|
129
129
|
//
|
130
130
|
//--------------------------------------------------------------------------
|
131
|
+
/**
|
132
|
+
* Handle url defaults when defaultOid is set
|
133
|
+
*/
|
131
134
|
async defaultOidWatchHandler() {
|
132
135
|
await this._handleDefaults();
|
133
136
|
}
|
137
|
+
/**
|
138
|
+
* Handle url defaults when defaultGlobalId is set
|
139
|
+
*/
|
134
140
|
async defaultGlobalIdWatchHandler() {
|
135
141
|
await this._handleDefaults();
|
136
142
|
}
|
@@ -997,11 +1003,11 @@ const LayerTable = /*@__PURE__*/ proxyCustomElement(class LayerTable extends HTM
|
|
997
1003
|
_resetColumnTemplates() {
|
998
1004
|
var _a, _b;
|
999
1005
|
const columnTemplates = this._getColumnTemplates((_a = this._layer) === null || _a === void 0 ? void 0 : _a.id, (_b = this._layer) === null || _b === void 0 ? void 0 : _b.fields);
|
1000
|
-
const hasChange = columnTemplates.some((ct, i) => {
|
1006
|
+
const hasChange = columnTemplates === null || columnTemplates === void 0 ? void 0 : columnTemplates.some((ct, i) => {
|
1001
1007
|
var _a;
|
1002
1008
|
return JSON.stringify((_a = this._table) === null || _a === void 0 ? void 0 : _a.tableTemplate.columnTemplates[i]) !== JSON.stringify(ct);
|
1003
1009
|
});
|
1004
|
-
if (this._table && columnTemplates && hasChange) {
|
1010
|
+
if (this._table && columnTemplates && (hasChange || !this._columnsInfo)) {
|
1005
1011
|
this._table.tableTemplate = new this.TableTemplate({
|
1006
1012
|
columnTemplates
|
1007
1013
|
});
|
@@ -1061,6 +1067,9 @@ const LayerTable = /*@__PURE__*/ proxyCustomElement(class LayerTable extends HTM
|
|
1061
1067
|
this.selectedIds = this.selectedIds.filter(id => this._allIds.indexOf(id) > -1);
|
1062
1068
|
await this._refresh();
|
1063
1069
|
}
|
1070
|
+
/**
|
1071
|
+
* Handle default OID or GlobalID from url parameters
|
1072
|
+
*/
|
1064
1073
|
async _handleDefaults() {
|
1065
1074
|
var _a, _b;
|
1066
1075
|
if (!this._defaultOidHonored && ((_a = this.defaultOid) === null || _a === void 0 ? void 0 : _a.length) > 0 && this.defaultOid[0] > -1 && this._table) {
|
@@ -132,8 +132,17 @@ const FloorFilter = class {
|
|
132
132
|
//
|
133
133
|
//--------------------------------------------------------------------------
|
134
134
|
async mapViewWatchHandler() {
|
135
|
-
|
136
|
-
|
135
|
+
const webMap = this.mapView.map;
|
136
|
+
await webMap.when(() => {
|
137
|
+
if (this.floorFilterWidget) {
|
138
|
+
this.floorFilterWidget.destroy();
|
139
|
+
this.floorFilterWidget = undefined;
|
140
|
+
}
|
141
|
+
if (this._floorFilterElement) {
|
142
|
+
this._floorFilterElement.remove();
|
143
|
+
this._floorFilterElement = document.createElement("div");
|
144
|
+
}
|
145
|
+
this._initFloorFilter(this.mapView, webMap);
|
137
146
|
});
|
138
147
|
}
|
139
148
|
//--------------------------------------------------------------------------
|
@@ -173,30 +182,25 @@ const FloorFilter = class {
|
|
173
182
|
/**
|
174
183
|
* Initialize the floor filter or reset the current view if it already exists
|
175
184
|
*/
|
176
|
-
_initFloorFilter(view) {
|
177
|
-
var _a, _b, _c
|
178
|
-
if (view && this.enabled && this.FloorFilter && (
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
this.
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
this.
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
this.
|
194
|
-
|
195
|
-
});
|
196
|
-
}
|
197
|
-
else {
|
198
|
-
this.floorFilterWidget.viewModel.view = view;
|
199
|
-
}
|
185
|
+
_initFloorFilter(view, webMap) {
|
186
|
+
var _a, _b, _c;
|
187
|
+
if (view && this.enabled && this.FloorFilter && (webMap === null || webMap === void 0 ? void 0 : webMap.floorInfo)) {
|
188
|
+
this.floorFilterWidget = new this.FloorFilter({
|
189
|
+
container: this._floorFilterElement,
|
190
|
+
view
|
191
|
+
});
|
192
|
+
(_a = this._facilityHandle) === null || _a === void 0 ? void 0 : _a.remove();
|
193
|
+
this._facilityHandle = this.reactiveUtils.watch(() => this.floorFilterWidget.facility, (facility) => {
|
194
|
+
this.facilityChanged.emit(facility);
|
195
|
+
});
|
196
|
+
(_b = this._levelHandle) === null || _b === void 0 ? void 0 : _b.remove();
|
197
|
+
this._levelHandle = this.reactiveUtils.watch(() => this.floorFilterWidget.level, (level) => {
|
198
|
+
this.levelChanged.emit(level);
|
199
|
+
});
|
200
|
+
(_c = this._siteHandle) === null || _c === void 0 ? void 0 : _c.remove();
|
201
|
+
this._siteHandle = this.reactiveUtils.watch(() => this.floorFilterWidget.site, (site) => {
|
202
|
+
this.siteChanged.emit(site);
|
203
|
+
});
|
200
204
|
}
|
201
205
|
}
|
202
206
|
get el() { return getElement(this); }
|
@@ -180,9 +180,15 @@ const LayerTable = class {
|
|
180
180
|
// Watch handlers
|
181
181
|
//
|
182
182
|
//--------------------------------------------------------------------------
|
183
|
+
/**
|
184
|
+
* Handle url defaults when defaultOid is set
|
185
|
+
*/
|
183
186
|
async defaultOidWatchHandler() {
|
184
187
|
await this._handleDefaults();
|
185
188
|
}
|
189
|
+
/**
|
190
|
+
* Handle url defaults when defaultGlobalId is set
|
191
|
+
*/
|
186
192
|
async defaultGlobalIdWatchHandler() {
|
187
193
|
await this._handleDefaults();
|
188
194
|
}
|
@@ -1049,11 +1055,11 @@ const LayerTable = class {
|
|
1049
1055
|
_resetColumnTemplates() {
|
1050
1056
|
var _a, _b;
|
1051
1057
|
const columnTemplates = this._getColumnTemplates((_a = this._layer) === null || _a === void 0 ? void 0 : _a.id, (_b = this._layer) === null || _b === void 0 ? void 0 : _b.fields);
|
1052
|
-
const hasChange = columnTemplates.some((ct, i) => {
|
1058
|
+
const hasChange = columnTemplates === null || columnTemplates === void 0 ? void 0 : columnTemplates.some((ct, i) => {
|
1053
1059
|
var _a;
|
1054
1060
|
return JSON.stringify((_a = this._table) === null || _a === void 0 ? void 0 : _a.tableTemplate.columnTemplates[i]) !== JSON.stringify(ct);
|
1055
1061
|
});
|
1056
|
-
if (this._table && columnTemplates && hasChange) {
|
1062
|
+
if (this._table && columnTemplates && (hasChange || !this._columnsInfo)) {
|
1057
1063
|
this._table.tableTemplate = new this.TableTemplate({
|
1058
1064
|
columnTemplates
|
1059
1065
|
});
|
@@ -1113,6 +1119,9 @@ const LayerTable = class {
|
|
1113
1119
|
this.selectedIds = this.selectedIds.filter(id => this._allIds.indexOf(id) > -1);
|
1114
1120
|
await this._refresh();
|
1115
1121
|
}
|
1122
|
+
/**
|
1123
|
+
* Handle default OID or GlobalID from url parameters
|
1124
|
+
*/
|
1116
1125
|
async _handleDefaults() {
|
1117
1126
|
var _a, _b;
|
1118
1127
|
if (!this._defaultOidHonored && ((_a = this.defaultOid) === null || _a === void 0 ? void 0 : _a.length) > 0 && this.defaultOid[0] > -1 && this._table) {
|
@@ -15,13 +15,26 @@ const crowdsourceManagerCss = ":host{display:block;--calcite-label-margin-bottom
|
|
15
15
|
const CrowdsourceManager = class {
|
16
16
|
constructor(hostRef) {
|
17
17
|
registerInstance(this, hostRef);
|
18
|
+
//--------------------------------------------------------------------------
|
19
|
+
//
|
20
|
+
// Properties (protected)
|
21
|
+
//
|
22
|
+
//--------------------------------------------------------------------------
|
18
23
|
/**
|
19
24
|
* boolean: When true the map view will be set after render due to popup obstructing the view
|
20
25
|
* MapView.when is not fired when mapView is not currently visible
|
21
26
|
*/
|
22
|
-
this._shouldSetMapView = false;
|
23
27
|
this._defaultCenterHonored = false;
|
28
|
+
/**
|
29
|
+
* boolean: When true the map view will be set after render due to popup obstructing the view
|
30
|
+
* MapView.when is not fired when mapView is not currently visible
|
31
|
+
*/
|
24
32
|
this._defaultLevelHonored = false;
|
33
|
+
/**
|
34
|
+
* boolean: When true the map view will be set after render due to popup obstructing the view
|
35
|
+
* MapView.when is not fired when mapView is not currently visible
|
36
|
+
*/
|
37
|
+
this._shouldSetMapView = false;
|
25
38
|
this.defaultCenter = "";
|
26
39
|
this.defaultGlobalId = "";
|
27
40
|
this.defaultLayer = "";
|