@esri/solutions-components 0.8.10 → 0.8.12
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 +19 -6
- package/dist/cjs/crowdsource-manager.cjs.entry.js +5 -5
- package/dist/cjs/crowdsource-reporter.cjs.entry.js +2 -2
- 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 +39 -5
- package/dist/collection/components/crowdsource-reporter/crowdsource-reporter.js +4 -3
- package/dist/collection/components/layer-table/layer-table.js +71 -7
- package/dist/collection/demos/crowdsource-manager.html +0 -1
- package/dist/components/crowdsource-manager.js +7 -5
- package/dist/components/crowdsource-reporter.js +3 -3
- package/dist/components/feature-list2.js +1 -1
- package/dist/components/layer-list2.js +1 -1
- package/dist/components/layer-table2.js +23 -7
- package/dist/components/map-layer-picker2.js +1 -1
- package/dist/components/map-select-tools2.js +1 -1
- package/dist/components/mapViewUtils.js +1 -1
- package/dist/components/refine-selection2.js +1 -1
- package/dist/esm/card-manager_3.entry.js +20 -7
- package/dist/esm/crowdsource-manager.entry.js +5 -5
- package/dist/esm/crowdsource-reporter.entry.js +2 -2
- package/dist/esm/loader.js +1 -1
- package/dist/esm/solutions-components.js +1 -1
- package/dist/solutions-components/demos/crowdsource-manager.html +0 -1
- package/dist/solutions-components/p-206caa2d.entry.js +6 -0
- package/dist/solutions-components/p-5ce5a6ae.entry.js +6 -0
- package/dist/solutions-components/p-a09daea3.entry.js +6 -0
- package/dist/solutions-components/solutions-components.esm.js +1 -1
- package/dist/types/components/crowdsource-manager/crowdsource-manager.d.ts +8 -0
- package/dist/types/components/layer-table/layer-table.d.ts +14 -2
- package/dist/types/components.d.ts +40 -0
- package/package.json +1 -1
- package/dist/solutions-components/p-40039b84.entry.js +0 -6
- package/dist/solutions-components/p-ae75d7d7.entry.js +0 -6
- package/dist/solutions-components/p-fffc9e08.entry.js +0 -6
@@ -165,7 +165,10 @@ const LayerTable = class {
|
|
165
165
|
this.shareIncludeEmbed = undefined;
|
166
166
|
this.shareIncludeSocial = undefined;
|
167
167
|
this.showNewestFirst = undefined;
|
168
|
+
this.sortField = undefined;
|
169
|
+
this.sortOrder = undefined;
|
168
170
|
this.zoomAndScrollToSelected = undefined;
|
171
|
+
this.zoomToScale = undefined;
|
169
172
|
this._allIds = [];
|
170
173
|
this._controlsThatFit = undefined;
|
171
174
|
this._csvExporting = false;
|
@@ -320,7 +323,7 @@ const LayerTable = class {
|
|
320
323
|
}
|
321
324
|
});
|
322
325
|
if (layerView) {
|
323
|
-
await mapViewUtils.goToSelection([oid], layerView, this.mapView, true);
|
326
|
+
await mapViewUtils.goToSelection([oid], layerView, this.mapView, true, undefined, this.zoomToScale);
|
324
327
|
}
|
325
328
|
}
|
326
329
|
}
|
@@ -1191,13 +1194,20 @@ const LayerTable = class {
|
|
1191
1194
|
this._deleteEnabled = this._layer.editingEnabled && this._layer.capabilities.operations.supportsDelete;
|
1192
1195
|
}
|
1193
1196
|
/**
|
1194
|
-
* Sort the
|
1197
|
+
* Sort the table with the configured field in the configured sort order
|
1195
1198
|
*/
|
1196
1199
|
async _sortTable() {
|
1197
|
-
|
1200
|
+
var _a, _b, _c, _d, _e, _f;
|
1201
|
+
let sortField = this.sortField ? this.sortField : this._layer.objectIdField;
|
1202
|
+
if (((_c = (_b = (_a = this.mapInfo) === null || _a === void 0 ? void 0 : _a.layerOptions) === null || _b === void 0 ? void 0 : _b.layers) === null || _c === void 0 ? void 0 : _c.length) > 0) {
|
1203
|
+
const configuredLayer = (_d = this.mapInfo.layerOptions) === null || _d === void 0 ? void 0 : _d.layers.filter((layer) => layer.id === this._layer.id);
|
1204
|
+
sortField = ((_f = (_e = configuredLayer[0]) === null || _e === void 0 ? void 0 : _e.fields) === null || _f === void 0 ? void 0 : _f.includes(this.sortField)) ? this.sortField : this._layer.objectIdField;
|
1205
|
+
}
|
1206
|
+
const sortOrder = this.sortOrder ? this.sortOrder : 'desc';
|
1207
|
+
if (this._table && this._layer) {
|
1198
1208
|
await this._table.when();
|
1199
1209
|
await this._layer.when(() => {
|
1200
|
-
this._table.sortColumn(
|
1210
|
+
this._table.sortColumn(sortField, sortOrder);
|
1201
1211
|
});
|
1202
1212
|
}
|
1203
1213
|
}
|
@@ -1443,8 +1453,11 @@ const LayerTable = class {
|
|
1443
1453
|
*
|
1444
1454
|
* @returns a promise that will resolve when the operation is complete
|
1445
1455
|
*/
|
1446
|
-
_zoom() {
|
1447
|
-
this.
|
1456
|
+
async _zoom() {
|
1457
|
+
if (this._layer) {
|
1458
|
+
const selectedLayerView = await mapViewUtils.getFeatureLayerView(this.mapView, this._layer.id);
|
1459
|
+
await mapViewUtils.goToSelection(this.selectedIds, selectedLayerView, this.mapView, true, undefined, this.zoomToScale);
|
1460
|
+
}
|
1448
1461
|
}
|
1449
1462
|
/**
|
1450
1463
|
* Handles layer selection change to show new table
|
@@ -74,6 +74,8 @@ const CrowdsourceManager = class {
|
|
74
74
|
this.theme = "light";
|
75
75
|
this.zoomAndScrollToSelected = false;
|
76
76
|
this.zoomToScale = undefined;
|
77
|
+
this.sortField = undefined;
|
78
|
+
this.sortOrder = undefined;
|
77
79
|
this._expandPopup = this.hideMapOnLoad;
|
78
80
|
this._hideFooter = false;
|
79
81
|
this._hideTable = false;
|
@@ -180,9 +182,7 @@ const CrowdsourceManager = class {
|
|
180
182
|
* Renders the component.
|
181
183
|
*/
|
182
184
|
render() {
|
183
|
-
|
184
|
-
this._isMobile ? "border-bottom-width-0" : "";
|
185
|
-
return (index.h(index.Host, null, index.h("calcite-shell", { class: "position-relative" }, index.h("calcite-panel", { class: `width-full height-full ${borderClass}` }, this._getBody(this._layoutMode, this._panelOpen, this._hideTable)), this._getFooter())));
|
185
|
+
return (index.h(index.Host, null, index.h("calcite-shell", { class: "position-relative" }, index.h("calcite-panel", { class: `width-full height-full border-width-0` }, this._getBody(this._layoutMode, this._panelOpen, this._hideTable)), this._getFooter())));
|
186
186
|
}
|
187
187
|
/**
|
188
188
|
* Called after each render
|
@@ -352,7 +352,7 @@ const CrowdsourceManager = class {
|
|
352
352
|
const themeClass = this.theme === "dark" ? "calcite-mode-dark" : "calcite-mode-light";
|
353
353
|
const popupNodeClass = !this._expandPopup ? "height-full" : ((_a = this.mapInfos) === null || _a === void 0 ? void 0 : _a.length) === 1 || this._isMobile ? "position-absolute-0" : "position-absolute-50";
|
354
354
|
const headerClass = this._isMobile ? "display-none height-0" : "";
|
355
|
-
const headerTheme = !this._isMobile ? "calcite-mode-dark" : "calcite-mode-light";
|
355
|
+
const headerTheme = this.popupHeaderColor ? "" : !this._isMobile ? "calcite-mode-dark" : "calcite-mode-light";
|
356
356
|
const containerClass = this._isMobile && this._hideTable ? "position-absolute-0 width-full height-full" : this._isMobile ? "display-none height-0" : "";
|
357
357
|
return (index.h("div", { class: `${headerTheme} ${popupNodeClass} ${containerClass}`, style: {
|
358
358
|
'--calcite-color-foreground-1': this.popupHeaderColor,
|
@@ -403,7 +403,7 @@ const CrowdsourceManager = class {
|
|
403
403
|
((_a = this.defaultGlobalId) === null || _a === void 0 ? void 0 : _a.indexOf(",")) > -1 ? this.defaultGlobalId.split(",") : [this.defaultGlobalId];
|
404
404
|
const defaultOid = !this.defaultOid ? undefined :
|
405
405
|
((_b = this.defaultOid) === null || _b === void 0 ? void 0 : _b.indexOf(",")) > -1 ? this.defaultOid.split(",").map(o => parseInt(o, 10)) : [parseInt(this.defaultOid, 10)];
|
406
|
-
return (index.h("calcite-shell", { class: `${tableSizeClass} ${tableClass} border-bottom` }, !this._isMobile ? (index.h("calcite-action-bar", { class: "border-sides", expandDisabled: true, layout: toggleLayout, slot: toggleSlot }, index.h("calcite-action", { class: "toggle-node", icon: icon, id: id, onClick: () => this._toggleLayout(), text: "" }), index.h("calcite-tooltip", { label: tooltip, placement: "bottom", "reference-element": id }, index.h("span", null, tooltip)))) : undefined, index.h("div", { class: `width-full height-full position-relative` }, index.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 }))));
|
406
|
+
return (index.h("calcite-shell", { class: `${tableSizeClass} ${tableClass} border-bottom` }, !this._isMobile ? (index.h("calcite-action-bar", { class: "border-sides", expandDisabled: true, layout: toggleLayout, slot: toggleSlot }, index.h("calcite-action", { class: "toggle-node", icon: icon, id: id, onClick: () => this._toggleLayout(), text: "" }), index.h("calcite-tooltip", { label: tooltip, placement: "bottom", "reference-element": id }, index.h("span", null, tooltip)))) : undefined, index.h("div", { class: `width-full height-full position-relative` }, index.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, sortField: this.sortField, sortOrder: this.sortOrder, zoomAndScrollToSelected: this.zoomAndScrollToSelected, zoomToScale: this.zoomToScale }))));
|
407
407
|
}
|
408
408
|
/**
|
409
409
|
* Update the component layout when its size changes
|
@@ -48,7 +48,7 @@ const CrowdsourceReporter = class {
|
|
48
48
|
this.theme = "light";
|
49
49
|
this.enableZoom = true;
|
50
50
|
this.zoomToScale = undefined;
|
51
|
-
this.layerExpressions =
|
51
|
+
this.layerExpressions = [];
|
52
52
|
this._mapInfo = undefined;
|
53
53
|
this._flowItems = [];
|
54
54
|
this._sidePanelCollapsed = false;
|
@@ -91,7 +91,7 @@ const CrowdsourceReporter = class {
|
|
91
91
|
this.setCurrentFeature(evt.detail.selectedFeature[0]);
|
92
92
|
void this.highlightOnMap(evt.detail.selectedFeature[0]);
|
93
93
|
this.selectedFeatureIndex = evt.detail.selectedFeatureIndex;
|
94
|
-
//update the feature details to reflect the like dislike values
|
94
|
+
//update the feature details to reflect the like dislike values
|
95
95
|
await this._featureDetails.refresh(evt.detail.selectedFeature[0]);
|
96
96
|
}
|
97
97
|
//--------------------------------------------------------------------------
|