@esri/solutions-components 0.7.48 → 0.7.50
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/cjs/calcite-input-date-picker_3.cjs.entry.js +5 -5
- package/dist/cjs/card-manager_3.cjs.entry.js +71 -51
- package/dist/cjs/crowdsource-manager.cjs.entry.js +18 -45
- package/dist/cjs/instant-apps-export.cjs.entry.js +5 -5
- package/dist/cjs/instant-apps-interactive-legend-classic.cjs.entry.js +16 -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 +18 -73
- package/dist/collection/components/layer-table/layer-table.js +75 -72
- package/dist/components/crowdsource-manager.js +18 -51
- package/dist/components/instant-apps-export.js +5 -5
- package/dist/components/instant-apps-filter-list2.js +3 -3
- package/dist/components/instant-apps-interactive-legend-classic2.js +16 -1
- package/dist/components/instant-apps-social-share2.js +2 -2
- package/dist/components/layer-table2.js +73 -52
- package/dist/esm/calcite-input-date-picker_3.entry.js +5 -5
- package/dist/esm/card-manager_3.entry.js +71 -51
- package/dist/esm/crowdsource-manager.entry.js +18 -45
- package/dist/esm/instant-apps-export.entry.js +5 -5
- package/dist/esm/instant-apps-interactive-legend-classic.entry.js +16 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/solutions-components.js +1 -1
- package/dist/node_modules/@esri/instant-apps-components/dist/collection/components/instant-apps-filter-list/instant-apps-filter-list.css +2 -4
- package/dist/node_modules/@esri/instant-apps-components/dist/collection/components/instant-apps-social-share/instant-apps-social-share.css +5 -0
- package/dist/solutions-components/p-21bc3c8a.entry.js +6 -0
- package/dist/solutions-components/p-8595b4aa.entry.js +17 -0
- package/dist/solutions-components/p-a5fd812c.entry.js +6 -0
- package/dist/solutions-components/p-ce4eed51.entry.js +6 -0
- package/dist/solutions-components/{p-f5b259f3.entry.js → p-de459c0a.entry.js} +1 -1
- package/dist/solutions-components/solutions-components.esm.js +1 -1
- package/dist/types/components/crowdsource-manager/crowdsource-manager.d.ts +2 -45
- package/dist/types/components/layer-table/layer-table.d.ts +16 -5
- package/dist/types/components.d.ts +0 -18
- package/package.json +2 -2
- package/dist/solutions-components/p-704c9ba1.entry.js +0 -17
- package/dist/solutions-components/p-766c0b57.entry.js +0 -6
- package/dist/solutions-components/p-ac2799f6.entry.js +0 -6
- package/dist/solutions-components/p-fec03ab3.entry.js +0 -6
@@ -20,8 +20,9 @@ const CrowdsourceManager = class {
|
|
20
20
|
* MapView.when is not fired when mapView is not currently visible
|
21
21
|
*/
|
22
22
|
this._shouldSetMapView = false;
|
23
|
+
this._defaultCenterHonored = false;
|
24
|
+
this._defaultLevelHonored = false;
|
23
25
|
this.defaultCenter = "";
|
24
|
-
this.defaultFilter = "";
|
25
26
|
this.defaultGlobalId = "";
|
26
27
|
this.defaultLayer = "";
|
27
28
|
this.defaultLevel = "";
|
@@ -66,39 +67,6 @@ const CrowdsourceManager = class {
|
|
66
67
|
// Watch handlers
|
67
68
|
//
|
68
69
|
//--------------------------------------------------------------------------
|
69
|
-
/**
|
70
|
-
* Watch for center url param to be set
|
71
|
-
*/
|
72
|
-
defaultCenterWatchHandler() {
|
73
|
-
this._defaultCenter = !this.defaultCenter ? undefined :
|
74
|
-
this.defaultCenter.split(";").map(v => parseFloat(v));
|
75
|
-
}
|
76
|
-
/**
|
77
|
-
* Watch for filter url param to be set
|
78
|
-
*/
|
79
|
-
defaultFilterWatchHandler() {
|
80
|
-
this._defaultFilter = JSON.parse(this.defaultFilter);
|
81
|
-
}
|
82
|
-
/**
|
83
|
-
* Watch for globalid url param to be set
|
84
|
-
*/
|
85
|
-
defaultGlobalIdWatchHandler() {
|
86
|
-
this._defaultGlobalId = !this.defaultGlobalId ? undefined :
|
87
|
-
this.defaultGlobalId.indexOf(",") > -1 ? this.defaultGlobalId.split(",") : [this.defaultGlobalId];
|
88
|
-
}
|
89
|
-
/**
|
90
|
-
* Watch for oid url param to be set
|
91
|
-
*/
|
92
|
-
defaultOidWatchHandler() {
|
93
|
-
this._defaultOid = !this.defaultOid ? undefined :
|
94
|
-
this.defaultOid.indexOf(",") > -1 ? this.defaultOid.split(",").map(o => parseInt(o, 10)) : [parseInt(this.defaultOid, 10)];
|
95
|
-
}
|
96
|
-
/**
|
97
|
-
* Watch for zoom level param to be set
|
98
|
-
*/
|
99
|
-
defaultLevelWatchHandler() {
|
100
|
-
this._defaultLevel = !this.defaultLevel ? undefined : parseInt(this.defaultLevel, 10);
|
101
|
-
}
|
102
70
|
/**
|
103
71
|
* When true the map zoom tools will be available
|
104
72
|
*/
|
@@ -390,6 +358,7 @@ const CrowdsourceManager = class {
|
|
390
358
|
* @protected
|
391
359
|
*/
|
392
360
|
_getTable(layoutMode, panelOpen, hideTable) {
|
361
|
+
var _a, _b;
|
393
362
|
const tableClass = hideTable && this._isMobile ? "visibility-hidden" : "";
|
394
363
|
const tableSizeClass = this._getTableSizeClass(layoutMode, panelOpen);
|
395
364
|
const icon = this._getDividerIcon(layoutMode, panelOpen);
|
@@ -398,7 +367,11 @@ const CrowdsourceManager = class {
|
|
398
367
|
const toggleLayout = layoutMode === ELayoutMode.HORIZONTAL ? "horizontal" : "vertical";
|
399
368
|
const toggleSlot = layoutMode === ELayoutMode.HORIZONTAL ? "header" : "panel-start";
|
400
369
|
const hasMapAndLayer = this.defaultWebmap && this.defaultLayer;
|
401
|
-
|
370
|
+
const globalId = !this.defaultGlobalId ? undefined :
|
371
|
+
((_a = this.defaultGlobalId) === null || _a === void 0 ? void 0 : _a.indexOf(",")) > -1 ? this.defaultGlobalId.split(",") : [this.defaultGlobalId];
|
372
|
+
const defaultOid = !this.defaultOid ? undefined :
|
373
|
+
((_b = this.defaultOid) === null || _b === void 0 ? void 0 : _b.indexOf(",")) > -1 ? this.defaultOid.split(",").map(o => parseInt(o, 10)) : [parseInt(this.defaultOid, 10)];
|
374
|
+
return (h("calcite-shell", { class: `${tableSizeClass} ${tableClass} border-bottom` }, !this._isMobile ? (h("calcite-action-bar", { class: "border-sides", expandDisabled: true, layout: toggleLayout, slot: toggleSlot }, h("calcite-action", { class: "toggle-node", icon: icon, id: id, onClick: () => this._toggleLayout(), text: "" }), h("calcite-tooltip", { label: tooltip, placement: "bottom", "reference-element": id }, h("span", null, tooltip)))) : undefined, h("div", { class: `width-full height-full position-relative` }, h("layer-table", { defaultGlobalId: hasMapAndLayer ? globalId : undefined, defaultLayerId: hasMapAndLayer ? this.defaultLayer : "", defaultOid: hasMapAndLayer && !globalId ? defaultOid : undefined, enableAutoRefresh: this.enableAutoRefresh, enableCSV: this.enableCSV, enableColumnReorder: this.enableColumnReorder, enableInlineEdit: this.enableInlineEdit, enableShare: this.enableShare, isMobile: this._isMobile, mapInfo: this._mapInfo, mapView: this === null || this === void 0 ? void 0 : this._mapView, onlyShowUpdatableLayers: this.onlyShowUpdatableLayers, ref: (el) => this._layerTable = el, shareIncludeEmbed: this.shareIncludeEmbed, shareIncludeSocial: this.shareIncludeSocial, showNewestFirst: this.showNewestFirst, zoomAndScrollToSelected: this.zoomAndScrollToSelected }))));
|
402
375
|
}
|
403
376
|
/**
|
404
377
|
* Update the component layout when its size changes
|
@@ -451,17 +424,22 @@ const CrowdsourceManager = class {
|
|
451
424
|
* @protected
|
452
425
|
*/
|
453
426
|
async _setMapView() {
|
427
|
+
var _a;
|
454
428
|
this._mapInfo = this._getMapInfo(this._mapChange.id);
|
455
429
|
this._mapView = this._mapChange.mapView;
|
456
430
|
this._initMapZoom();
|
457
431
|
this._mapView.popupEnabled = false;
|
458
|
-
|
432
|
+
const center = !this.defaultCenter || this._defaultCenterHonored ?
|
433
|
+
undefined : (_a = this.defaultCenter) === null || _a === void 0 ? void 0 : _a.split(";").map(v => parseFloat(v));
|
434
|
+
const zoom = !this.defaultLevel || this._defaultLevelHonored ?
|
435
|
+
undefined : parseInt(this.defaultLevel, 10);
|
436
|
+
if (center && zoom) {
|
459
437
|
await this._mapView.goTo({
|
460
|
-
center
|
461
|
-
zoom
|
438
|
+
center,
|
439
|
+
zoom
|
462
440
|
});
|
463
|
-
this.
|
464
|
-
this.
|
441
|
+
this._defaultCenterHonored = true;
|
442
|
+
this._defaultLevelHonored = true;
|
465
443
|
}
|
466
444
|
}
|
467
445
|
/**
|
@@ -493,11 +471,6 @@ const CrowdsourceManager = class {
|
|
493
471
|
}
|
494
472
|
get el() { return getElement(this); }
|
495
473
|
static get watchers() { return {
|
496
|
-
"defaultCenter": ["defaultCenterWatchHandler"],
|
497
|
-
"defaultFilter": ["defaultFilterWatchHandler"],
|
498
|
-
"defaultGlobalId": ["defaultGlobalIdWatchHandler"],
|
499
|
-
"defaultOid": ["defaultOidWatchHandler"],
|
500
|
-
"defaultLevel": ["defaultLevelWatchHandler"],
|
501
474
|
"enableZoom": ["enableZoomWatchHandler"]
|
502
475
|
}; }
|
503
476
|
};
|
@@ -655,13 +655,13 @@ const InstantAppsExport = class {
|
|
655
655
|
});
|
656
656
|
}
|
657
657
|
updateScaleBar() {
|
658
|
-
|
659
|
-
if (this.scaleBarContainerEl) {
|
658
|
+
if (this.scaleBarContainerEl && this.view != null) {
|
660
659
|
this.scaleBarContainerEl.innerHTML = '';
|
661
660
|
if (this.showScaleBar) {
|
662
|
-
const
|
663
|
-
|
664
|
-
|
661
|
+
const widgets = this.view.ui.getComponents();
|
662
|
+
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'); });
|
663
|
+
if ((scaleBar === null || scaleBar === void 0 ? void 0 : scaleBar.container) != null && typeof scaleBar.container !== 'string') {
|
664
|
+
this.scaleBarContainerEl.append(scaleBar.container.cloneNode(true));
|
665
665
|
}
|
666
666
|
}
|
667
667
|
}
|
@@ -1188,11 +1188,26 @@ const InstantAppsInteractiveLegendClassic = class {
|
|
1188
1188
|
var _a, _b, _c, _d;
|
1189
1189
|
try {
|
1190
1190
|
// Initial data setup
|
1191
|
+
// Loads map/basemap
|
1191
1192
|
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());
|
1192
1193
|
await ((_d = map === null || map === void 0 ? void 0 : map.basemap) === null || _d === void 0 ? void 0 : _d.load());
|
1194
|
+
// Loads all layers in webmap and waits until all settled promises
|
1193
1195
|
const allLayers = map === null || map === void 0 ? void 0 : map.allLayers;
|
1194
1196
|
const promises = allLayers === null || allLayers === void 0 ? void 0 : allLayers.map(layer => layer.load());
|
1195
|
-
await Promise.allSettled(promises);
|
1197
|
+
const settled = await Promise.allSettled(promises);
|
1198
|
+
const settledLayerPromises = settled
|
1199
|
+
.map(settledLayer => ((settledLayer === null || settledLayer === void 0 ? void 0 : settledLayer.status) === 'fulfilled' && (settledLayer === null || settledLayer === void 0 ? void 0 : settledLayer.value) ? settledLayer.value : null))
|
1200
|
+
.filter(layer => !!layer);
|
1201
|
+
// Wait until all layer views are settled/available
|
1202
|
+
const lvPromises = [];
|
1203
|
+
settledLayerPromises.forEach(layer => {
|
1204
|
+
var _a;
|
1205
|
+
if ((_a = this.legendvm) === null || _a === void 0 ? void 0 : _a.view) {
|
1206
|
+
lvPromises.push(this.legendvm.view.whenLayerView(layer));
|
1207
|
+
}
|
1208
|
+
});
|
1209
|
+
await Promise.allSettled(lvPromises);
|
1210
|
+
// Generate data once all layers/layer views are complete
|
1196
1211
|
const data = await generateData(this.legendvm, this.reactiveUtils);
|
1197
1212
|
store.set('data', Object.assign(Object.assign({}, interactiveLegendState.data), data));
|
1198
1213
|
this.isLoading = false;
|