@esri/solutions-components 0.7.10 → 0.7.11
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/cjs/card-manager_3.cjs.entry.js +20 -0
- package/dist/cjs/crowdsource-manager.cjs.entry.js +2 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/solutions-components.cjs.js +1 -1
- package/dist/collection/components/crowdsource-manager/crowdsource-manager.js +3 -1
- package/dist/collection/components/layer-table/layer-table.js +12 -0
- package/dist/collection/components/map-card/map-card.js +10 -0
- package/dist/collection/demos/crowdsource-manager.html +19 -1
- package/dist/components/crowdsource-manager.js +3 -1
- package/dist/components/layer-table2.js +11 -0
- package/dist/components/map-card2.js +10 -0
- package/dist/esm/card-manager_3.entry.js +20 -0
- package/dist/esm/crowdsource-manager.entry.js +2 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/solutions-components.js +1 -1
- package/dist/solutions-components/demos/crowdsource-manager.html +19 -1
- package/dist/solutions-components/p-623321ac.entry.js +6 -0
- package/dist/solutions-components/p-e726ae50.entry.js +6 -0
- package/dist/solutions-components/solutions-components.esm.js +1 -1
- package/dist/types/components/crowdsource-manager/crowdsource-manager.d.ts +4 -4
- package/dist/types/components/layer-table/layer-table.d.ts +4 -0
- package/package.json +1 -1
- package/dist/solutions-components/p-f7870ec1.entry.js +0 -6
- package/dist/solutions-components/p-ffae568b.entry.js +0 -6
@@ -60,6 +60,7 @@ export class CrowdsourceManager {
|
|
60
60
|
this._expandPopup = false;
|
61
61
|
this._translations = undefined;
|
62
62
|
this._layoutMode = ELayoutMode.GRID;
|
63
|
+
this._mapInfo = undefined;
|
63
64
|
this._mapView = undefined;
|
64
65
|
this._panelOpen = true;
|
65
66
|
this._tableOnly = false;
|
@@ -388,7 +389,7 @@ export class CrowdsourceManager {
|
|
388
389
|
return true;
|
389
390
|
}
|
390
391
|
});
|
391
|
-
return mapInfo;
|
392
|
+
return Object.assign({}, mapInfo);
|
392
393
|
}
|
393
394
|
/**
|
394
395
|
* Set the current map info when maps change
|
@@ -992,6 +993,7 @@ export class CrowdsourceManager {
|
|
992
993
|
"_expandPopup": {},
|
993
994
|
"_translations": {},
|
994
995
|
"_layoutMode": {},
|
996
|
+
"_mapInfo": {},
|
995
997
|
"_mapView": {},
|
996
998
|
"_panelOpen": {},
|
997
999
|
"_tableOnly": {}
|
@@ -141,6 +141,15 @@ export class LayerTable {
|
|
141
141
|
}
|
142
142
|
});
|
143
143
|
}
|
144
|
+
/**
|
145
|
+
* watch for changes in map info and recheck the tool infos
|
146
|
+
*/
|
147
|
+
async mapInfoWatchHandler() {
|
148
|
+
var _a;
|
149
|
+
if (((_a = this._toolInfos) === null || _a === void 0 ? void 0 : _a.length) > 0) {
|
150
|
+
this._initToolInfos();
|
151
|
+
}
|
152
|
+
}
|
144
153
|
/**
|
145
154
|
* watch for changes in map view and get the first layer
|
146
155
|
*/
|
@@ -1630,6 +1639,9 @@ export class LayerTable {
|
|
1630
1639
|
}, {
|
1631
1640
|
"propName": "_controlsThatFit",
|
1632
1641
|
"methodName": "_controlsThatFitWatchHandler"
|
1642
|
+
}, {
|
1643
|
+
"propName": "mapInfo",
|
1644
|
+
"methodName": "mapInfoWatchHandler"
|
1633
1645
|
}, {
|
1634
1646
|
"propName": "mapView",
|
1635
1647
|
"methodName": "mapViewWatchHandler"
|
@@ -126,6 +126,7 @@ export class MapCard {
|
|
126
126
|
// on the first render use the default webmap id if provided otherwise use the first child of the provided mapInfos
|
127
127
|
const loadDefaultMap = !this._defaultWebmapHonored && this.defaultWebmapId;
|
128
128
|
const defaultMap = (_a = this.mapInfos) === null || _a === void 0 ? void 0 : _a.filter(i => i.id === this.defaultWebmapId);
|
129
|
+
const mapConfigChanged = JSON.stringify(webMapInfo) !== JSON.stringify(this._webMapInfo);
|
129
130
|
this._webMapInfo = loadDefaultMap && defaultMap ? defaultMap[0] :
|
130
131
|
!(webMapInfo === null || webMapInfo === void 0 ? void 0 : webMapInfo.id) && this.mapInfos.length > 0 ? this.mapInfos[0] : webMapInfo;
|
131
132
|
const id = this._webMapInfo.id;
|
@@ -156,6 +157,15 @@ export class MapCard {
|
|
156
157
|
this._defaultWebmapHonored = true;
|
157
158
|
this._mapPicker.setMapByID(id);
|
158
159
|
}
|
160
|
+
else if (mapConfigChanged) {
|
161
|
+
// Map is the same so no need to reload but we need to update for any changes from the config
|
162
|
+
this._searchConfiguration = this._webMapInfo.searchConfiguration;
|
163
|
+
this.beforeMapChanged.emit();
|
164
|
+
this.mapChanged.emit({
|
165
|
+
id: id,
|
166
|
+
mapView: this.mapView
|
167
|
+
});
|
168
|
+
}
|
159
169
|
}
|
160
170
|
/**
|
161
171
|
* Add/remove the home widget base on enableHome prop
|
@@ -145,7 +145,25 @@
|
|
145
145
|
}, {
|
146
146
|
id: "b422923b7a4c4958b9788118255f2f0a",
|
147
147
|
name: "Floor aware map"
|
148
|
-
}
|
148
|
+
}, {
|
149
|
+
id: "5dc8ae351ff34280a75f7ffe1115b36b",
|
150
|
+
name: "Standalone table",
|
151
|
+
filterConfig: {
|
152
|
+
"mapId": "5dc8ae351ff34280a75f7ffe1115b36b",
|
153
|
+
"layerExpressions": [{
|
154
|
+
"id": "18c4a8cda15-layer-2",
|
155
|
+
"title": "Table_1",
|
156
|
+
"operator": " AND ",
|
157
|
+
"expressions": [{
|
158
|
+
"definitionExpression": "OBJECTID > 14",
|
159
|
+
"id": 1702486334825,
|
160
|
+
"index": 0,
|
161
|
+
"name": "> 14",
|
162
|
+
"active": false
|
163
|
+
}]
|
164
|
+
}]
|
165
|
+
}
|
166
|
+
}, ]
|
149
167
|
];
|
150
168
|
}
|
151
169
|
</script>
|
@@ -106,6 +106,7 @@ const CrowdsourceManager$1 = /*@__PURE__*/ proxyCustomElement(class CrowdsourceM
|
|
106
106
|
this._expandPopup = false;
|
107
107
|
this._translations = undefined;
|
108
108
|
this._layoutMode = ELayoutMode.GRID;
|
109
|
+
this._mapInfo = undefined;
|
109
110
|
this._mapView = undefined;
|
110
111
|
this._panelOpen = true;
|
111
112
|
this._tableOnly = false;
|
@@ -434,7 +435,7 @@ const CrowdsourceManager$1 = /*@__PURE__*/ proxyCustomElement(class CrowdsourceM
|
|
434
435
|
return true;
|
435
436
|
}
|
436
437
|
});
|
437
|
-
return mapInfo;
|
438
|
+
return Object.assign({}, mapInfo);
|
438
439
|
}
|
439
440
|
/**
|
440
441
|
* Set the current map info when maps change
|
@@ -524,6 +525,7 @@ const CrowdsourceManager$1 = /*@__PURE__*/ proxyCustomElement(class CrowdsourceM
|
|
524
525
|
"_expandPopup": [32],
|
525
526
|
"_translations": [32],
|
526
527
|
"_layoutMode": [32],
|
528
|
+
"_mapInfo": [32],
|
527
529
|
"_mapView": [32],
|
528
530
|
"_panelOpen": [32],
|
529
531
|
"_tableOnly": [32]
|
@@ -169,6 +169,15 @@ const LayerTable = /*@__PURE__*/ proxyCustomElement(class LayerTable extends HTM
|
|
169
169
|
}
|
170
170
|
});
|
171
171
|
}
|
172
|
+
/**
|
173
|
+
* watch for changes in map info and recheck the tool infos
|
174
|
+
*/
|
175
|
+
async mapInfoWatchHandler() {
|
176
|
+
var _a;
|
177
|
+
if (((_a = this._toolInfos) === null || _a === void 0 ? void 0 : _a.length) > 0) {
|
178
|
+
this._initToolInfos();
|
179
|
+
}
|
180
|
+
}
|
172
181
|
/**
|
173
182
|
* watch for changes in map view and get the first layer
|
174
183
|
*/
|
@@ -1326,6 +1335,7 @@ const LayerTable = /*@__PURE__*/ proxyCustomElement(class LayerTable extends HTM
|
|
1326
1335
|
"enableCSV": ["enableCSVWatchHandler"],
|
1327
1336
|
"enableInlineEdit": ["enableInlineEditWatchHandler"],
|
1328
1337
|
"_controlsThatFit": ["_controlsThatFitWatchHandler"],
|
1338
|
+
"mapInfo": ["mapInfoWatchHandler"],
|
1329
1339
|
"mapView": ["mapViewWatchHandler"],
|
1330
1340
|
"_layer": ["_layerWatchHandler"],
|
1331
1341
|
"_selectedIndexes": ["_selectedIndexesWatchHandler"],
|
@@ -1365,6 +1375,7 @@ const LayerTable = /*@__PURE__*/ proxyCustomElement(class LayerTable extends HTM
|
|
1365
1375
|
"enableCSV": ["enableCSVWatchHandler"],
|
1366
1376
|
"enableInlineEdit": ["enableInlineEditWatchHandler"],
|
1367
1377
|
"_controlsThatFit": ["_controlsThatFitWatchHandler"],
|
1378
|
+
"mapInfo": ["mapInfoWatchHandler"],
|
1368
1379
|
"mapView": ["mapViewWatchHandler"],
|
1369
1380
|
"_layer": ["_layerWatchHandler"],
|
1370
1381
|
"_selectedIndexes": ["_selectedIndexesWatchHandler"],
|
@@ -136,6 +136,7 @@ const MapCard = /*@__PURE__*/ proxyCustomElement(class MapCard extends HTMLEleme
|
|
136
136
|
// on the first render use the default webmap id if provided otherwise use the first child of the provided mapInfos
|
137
137
|
const loadDefaultMap = !this._defaultWebmapHonored && this.defaultWebmapId;
|
138
138
|
const defaultMap = (_a = this.mapInfos) === null || _a === void 0 ? void 0 : _a.filter(i => i.id === this.defaultWebmapId);
|
139
|
+
const mapConfigChanged = JSON.stringify(webMapInfo) !== JSON.stringify(this._webMapInfo);
|
139
140
|
this._webMapInfo = loadDefaultMap && defaultMap ? defaultMap[0] :
|
140
141
|
!(webMapInfo === null || webMapInfo === void 0 ? void 0 : webMapInfo.id) && this.mapInfos.length > 0 ? this.mapInfos[0] : webMapInfo;
|
141
142
|
const id = this._webMapInfo.id;
|
@@ -166,6 +167,15 @@ const MapCard = /*@__PURE__*/ proxyCustomElement(class MapCard extends HTMLEleme
|
|
166
167
|
this._defaultWebmapHonored = true;
|
167
168
|
this._mapPicker.setMapByID(id);
|
168
169
|
}
|
170
|
+
else if (mapConfigChanged) {
|
171
|
+
// Map is the same so no need to reload but we need to update for any changes from the config
|
172
|
+
this._searchConfiguration = this._webMapInfo.searchConfiguration;
|
173
|
+
this.beforeMapChanged.emit();
|
174
|
+
this.mapChanged.emit({
|
175
|
+
id: id,
|
176
|
+
mapView: this.mapView
|
177
|
+
});
|
178
|
+
}
|
169
179
|
}
|
170
180
|
/**
|
171
181
|
* Add/remove the home widget base on enableHome prop
|
@@ -222,6 +222,15 @@ const LayerTable = class {
|
|
222
222
|
}
|
223
223
|
});
|
224
224
|
}
|
225
|
+
/**
|
226
|
+
* watch for changes in map info and recheck the tool infos
|
227
|
+
*/
|
228
|
+
async mapInfoWatchHandler() {
|
229
|
+
var _a;
|
230
|
+
if (((_a = this._toolInfos) === null || _a === void 0 ? void 0 : _a.length) > 0) {
|
231
|
+
this._initToolInfos();
|
232
|
+
}
|
233
|
+
}
|
225
234
|
/**
|
226
235
|
* watch for changes in map view and get the first layer
|
227
236
|
*/
|
@@ -1379,6 +1388,7 @@ const LayerTable = class {
|
|
1379
1388
|
"enableCSV": ["enableCSVWatchHandler"],
|
1380
1389
|
"enableInlineEdit": ["enableInlineEditWatchHandler"],
|
1381
1390
|
"_controlsThatFit": ["_controlsThatFitWatchHandler"],
|
1391
|
+
"mapInfo": ["mapInfoWatchHandler"],
|
1382
1392
|
"mapView": ["mapViewWatchHandler"],
|
1383
1393
|
"_layer": ["_layerWatchHandler"],
|
1384
1394
|
"_selectedIndexes": ["_selectedIndexesWatchHandler"],
|
@@ -1492,6 +1502,7 @@ const MapCard = class {
|
|
1492
1502
|
// on the first render use the default webmap id if provided otherwise use the first child of the provided mapInfos
|
1493
1503
|
const loadDefaultMap = !this._defaultWebmapHonored && this.defaultWebmapId;
|
1494
1504
|
const defaultMap = (_a = this.mapInfos) === null || _a === void 0 ? void 0 : _a.filter(i => i.id === this.defaultWebmapId);
|
1505
|
+
const mapConfigChanged = JSON.stringify(webMapInfo) !== JSON.stringify(this._webMapInfo);
|
1495
1506
|
this._webMapInfo = loadDefaultMap && defaultMap ? defaultMap[0] :
|
1496
1507
|
!(webMapInfo === null || webMapInfo === void 0 ? void 0 : webMapInfo.id) && this.mapInfos.length > 0 ? this.mapInfos[0] : webMapInfo;
|
1497
1508
|
const id = this._webMapInfo.id;
|
@@ -1522,6 +1533,15 @@ const MapCard = class {
|
|
1522
1533
|
this._defaultWebmapHonored = true;
|
1523
1534
|
this._mapPicker.setMapByID(id);
|
1524
1535
|
}
|
1536
|
+
else if (mapConfigChanged) {
|
1537
|
+
// Map is the same so no need to reload but we need to update for any changes from the config
|
1538
|
+
this._searchConfiguration = this._webMapInfo.searchConfiguration;
|
1539
|
+
this.beforeMapChanged.emit();
|
1540
|
+
this.mapChanged.emit({
|
1541
|
+
id: id,
|
1542
|
+
mapView: this.mapView
|
1543
|
+
});
|
1544
|
+
}
|
1525
1545
|
}
|
1526
1546
|
/**
|
1527
1547
|
* Add/remove the home widget base on enableHome prop
|
@@ -51,6 +51,7 @@ const CrowdsourceManager = class {
|
|
51
51
|
this._expandPopup = false;
|
52
52
|
this._translations = undefined;
|
53
53
|
this._layoutMode = ELayoutMode.GRID;
|
54
|
+
this._mapInfo = undefined;
|
54
55
|
this._mapView = undefined;
|
55
56
|
this._panelOpen = true;
|
56
57
|
this._tableOnly = false;
|
@@ -379,7 +380,7 @@ const CrowdsourceManager = class {
|
|
379
380
|
return true;
|
380
381
|
}
|
381
382
|
});
|
382
|
-
return mapInfo;
|
383
|
+
return Object.assign({}, mapInfo);
|
383
384
|
}
|
384
385
|
/**
|
385
386
|
* Set the current map info when maps change
|