@esri/solutions-components 0.7.35 → 0.7.37
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/cjs/calcite-alert_4.cjs.entry.js +3 -1
- package/dist/cjs/calcite-combobox_5.cjs.entry.js +1 -1
- package/dist/cjs/calcite-flow_5.cjs.entry.js +7 -9
- package/dist/cjs/card-manager_3.cjs.entry.js +38 -7
- package/dist/cjs/crowdsource-manager.cjs.entry.js +7 -3
- package/dist/cjs/crowdsource-reporter.cjs.entry.js +32 -8
- package/dist/cjs/{downloadUtils-8ca56dfa.js → downloadUtils-c22a71da.js} +2 -2
- package/dist/cjs/{index.es-3c36cde7.js → index.es-8d317f5e.js} +2 -2
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/map-select-tools_3.cjs.entry.js +2 -2
- package/dist/cjs/{mapViewUtils-8aa325de.js → mapViewUtils-cd29b129.js} +2 -0
- package/dist/cjs/public-notification.cjs.entry.js +2 -2
- package/dist/cjs/solutions-components.cjs.js +1 -1
- package/dist/collection/components/crowdsource-manager/crowdsource-manager.js +6 -2
- package/dist/collection/components/crowdsource-reporter/crowdsource-reporter.js +32 -8
- package/dist/collection/components/feature-list/feature-list.js +6 -8
- package/dist/collection/components/info-card/info-card.js +20 -0
- package/dist/collection/components/layer-table/layer-table.js +36 -5
- package/dist/collection/utils/mapViewUtils.js +2 -0
- package/dist/collection/utils/mapViewUtils.ts +2 -0
- package/dist/components/crowdsource-manager.js +6 -2
- package/dist/components/crowdsource-reporter.js +32 -8
- package/dist/components/feature-list2.js +6 -8
- package/dist/components/info-card2.js +3 -0
- package/dist/components/layer-table2.js +36 -5
- package/dist/components/mapViewUtils.js +2 -0
- package/dist/esm/calcite-alert_4.entry.js +3 -1
- package/dist/esm/calcite-combobox_5.entry.js +1 -1
- package/dist/esm/calcite-flow_5.entry.js +7 -9
- package/dist/esm/card-manager_3.entry.js +38 -7
- package/dist/esm/crowdsource-manager.entry.js +7 -3
- package/dist/esm/crowdsource-reporter.entry.js +32 -8
- package/dist/esm/{downloadUtils-8b83a40c.js → downloadUtils-985dcd1c.js} +2 -2
- package/dist/esm/{index.es-33e2ee2d.js → index.es-03d8386e.js} +2 -2
- package/dist/esm/loader.js +1 -1
- package/dist/esm/map-select-tools_3.entry.js +2 -2
- package/dist/esm/{mapViewUtils-cf05e880.js → mapViewUtils-257bc9b3.js} +3 -1
- package/dist/esm/public-notification.entry.js +2 -2
- package/dist/esm/solutions-components.js +1 -1
- package/dist/solutions-components/{p-e4e59f16.js → p-00ba5a2a.js} +2 -2
- package/dist/solutions-components/{p-d3da7497.entry.js → p-12492469.entry.js} +1 -1
- package/dist/solutions-components/{p-cf24dd35.entry.js → p-20b206f3.entry.js} +1 -1
- package/dist/solutions-components/{p-23d88af7.entry.js → p-23e58d7c.entry.js} +2 -2
- package/dist/solutions-components/{p-25894d7a.entry.js → p-34eaca46.entry.js} +1 -1
- package/dist/solutions-components/{p-c85ce035.entry.js → p-6419f8d7.entry.js} +2 -2
- package/dist/solutions-components/{p-5f814990.entry.js → p-7fec7066.entry.js} +1 -1
- package/dist/solutions-components/p-9161dca9.entry.js +6 -0
- package/dist/solutions-components/p-96f5be25.js +36 -0
- package/dist/solutions-components/p-d503e883.entry.js +6 -0
- package/dist/solutions-components/{p-ee1e4df3.js → p-df048b47.js} +1 -1
- package/dist/solutions-components/solutions-components.esm.js +1 -1
- package/dist/solutions-components/utils/mapViewUtils.ts +2 -0
- package/dist/types/components/crowdsource-reporter/crowdsource-reporter.d.ts +14 -0
- package/dist/types/components/info-card/info-card.d.ts +4 -0
- package/dist/types/components/layer-table/layer-table.d.ts +10 -1
- package/dist/types/components.d.ts +8 -0
- package/package.json +1 -1
- package/dist/solutions-components/p-2c382841.js +0 -36
- package/dist/solutions-components/p-6d0203ed.entry.js +0 -6
- package/dist/solutions-components/p-9dfe1301.entry.js +0 -6
@@ -414,9 +414,13 @@ export class CrowdsourceManager {
|
|
414
414
|
* Update the component layout when its size changes
|
415
415
|
*/
|
416
416
|
_onResize() {
|
417
|
-
|
417
|
+
const isMobile = this.el.offsetWidth < 1024;
|
418
|
+
const forceOpen = !this._isMobile && isMobile;
|
419
|
+
this._isMobile = isMobile;
|
418
420
|
this._layoutMode = this._isMobile ? ELayoutMode.HORIZONTAL : ELayoutMode.GRID;
|
419
|
-
|
421
|
+
if (forceOpen) {
|
422
|
+
this._panelOpen = true;
|
423
|
+
}
|
420
424
|
}
|
421
425
|
/**
|
422
426
|
* Open/Close the appropriate panel.
|
@@ -21,7 +21,7 @@
|
|
21
21
|
import { Host, h } from "@stencil/core";
|
22
22
|
import { getLocaleComponentStrings } from "../../utils/locale";
|
23
23
|
import { loadModules } from "../../utils/loadModules";
|
24
|
-
import { getAllLayers, getLayerOrTable } from "../../utils/mapViewUtils";
|
24
|
+
import { getAllLayers, getFeatureLayerView, getLayerOrTable, highlightFeatures } from "../../utils/mapViewUtils";
|
25
25
|
import { queryFeaturesByID } from "../../utils/queryUtils";
|
26
26
|
export class CrowdsourceReporter {
|
27
27
|
constructor() {
|
@@ -97,7 +97,7 @@ export class CrowdsourceReporter {
|
|
97
97
|
*/
|
98
98
|
render() {
|
99
99
|
const themeClass = this.theme === "dark" ? "calcite-mode-dark" : "calcite-mode-light";
|
100
|
-
return (h(Host, null, this._reportSubmitted && h("calcite-alert", { "auto-close": true, class: themeClass, icon: "check-circle", kind: "success", label: "", onCalciteAlertClose: () => { this._reportSubmitted = false; }, open: true, placement: "top" }, h("div", { slot: "title" }, this._translations.reportSubmit), h("div", { slot: "message" }, this._translations.submitMsg)), this._featureCreationFailedErrorMsg && h("calcite-alert", { "auto-close": true, class: themeClass, icon: "x-octagon", kind: "danger", label: "", onCalciteAlertClose: () => { this._featureCreationFailedErrorMsg = ""; }, open: true, placement: "top" }, h("div", { slot: "title" }, this._translations.error), h("div", { slot: "message" }, this._featureCreationFailedErrorMsg)), h("div", null, h("calcite-shell", { "content-behind": true }, this._getReporter()))));
|
100
|
+
return (h(Host, null, this._reportSubmitted && h("calcite-alert", { "auto-close": true, class: themeClass, icon: "check-circle", kind: "success", label: "", onCalciteAlertClose: () => { this._reportSubmitted = false; }, open: true, placement: "top" }, h("div", { slot: "title" }, this._translations.reportSubmit), h("div", { slot: "message" }, this.reportSubmittedMessage ? this.reportSubmittedMessage : this._translations.submitMsg)), this._featureCreationFailedErrorMsg && h("calcite-alert", { "auto-close": true, class: themeClass, icon: "x-octagon", kind: "danger", label: "", onCalciteAlertClose: () => { this._featureCreationFailedErrorMsg = ""; }, open: true, placement: "top" }, h("div", { slot: "title" }, this._translations.error), h("div", { slot: "message" }, this._featureCreationFailedErrorMsg)), h("div", null, h("calcite-shell", { "content-behind": true }, this._getReporter()))));
|
101
101
|
}
|
102
102
|
//--------------------------------------------------------------------------
|
103
103
|
//
|
@@ -167,9 +167,7 @@ export class CrowdsourceReporter {
|
|
167
167
|
* @protected
|
168
168
|
*/
|
169
169
|
getLayerListFlowItem() {
|
170
|
-
return (h("calcite-flow-item", { collapsed: this.isMobile && this._sidePanelCollapsed, heading: this.reportsHeader }, this._hasValidLayers &&
|
171
|
-
h("calcite-action", { icon: "sort-ascending-arrow", slot: this.isMobile ? "header-menu-actions" : "header-actions-end", text: this._translations.sort, "text-enabled": this.isMobile }), this._hasValidLayers &&
|
172
|
-
h("calcite-action", { icon: "filter", slot: this.isMobile ? "header-menu-actions" : "header-actions-end", text: this._translations.filter, "text-enabled": this.isMobile }), this.isMobile && this.getActionToExpandCollapsePanel(), this._hasValidLayers && this.enableNewReports &&
|
170
|
+
return (h("calcite-flow-item", { collapsed: this.isMobile && this._sidePanelCollapsed, heading: this.reportsHeader }, this.isMobile && this.getActionToExpandCollapsePanel(), this._hasValidLayers && this.enableNewReports &&
|
173
171
|
h("calcite-button", { appearance: "solid", onClick: this.navigateToChooseCategory.bind(this), slot: "footer", width: "full" }, this.reportButtonText), h("calcite-panel", { "full-height": true, "full-width": true }, h("layer-list", { class: "height-full", layers: this.layers, mapView: this.mapView, noLayerErrorMsg: this._translations.noLayerToDisplayErrorMsg, onLayerSelect: this.displayFeaturesList.bind(this), onLayersListLoaded: this.layerListLoaded.bind(this), ref: el => this._layerList = el, showFeatureCount: true, showNextIcon: true }))));
|
174
172
|
}
|
175
173
|
/**
|
@@ -315,6 +313,7 @@ export class CrowdsourceReporter {
|
|
315
313
|
backFromSelectedPanel() {
|
316
314
|
const updatedFlowItems = [...this._flowItems];
|
317
315
|
updatedFlowItems.pop();
|
316
|
+
this.clearHighlights();
|
318
317
|
//Back to layer list, and return as the flowItems will be reset in navigateToHomePage
|
319
318
|
if (updatedFlowItems.length === 1) {
|
320
319
|
this.navigateToHomePage();
|
@@ -346,15 +345,15 @@ export class CrowdsourceReporter {
|
|
346
345
|
* @protected
|
347
346
|
*/
|
348
347
|
getFeatureListFlowItem(layerId, layerName) {
|
349
|
-
return (h("calcite-flow-item", { collapsed: this.isMobile && this._sidePanelCollapsed, heading: layerName, onCalciteFlowItemBack: this.backFromSelectedPanel.bind(this) },
|
350
|
-
h("calcite-button", { appearance: "solid", onClick: this.navigateToCreateFeature.bind(this), slot: "footer", width: "full" }, this.reportButtonText), h("calcite-panel", { "full-height": true }, h("feature-list", { class: "height-full",
|
348
|
+
return (h("calcite-flow-item", { collapsed: this.isMobile && this._sidePanelCollapsed, heading: layerName, onCalciteFlowItemBack: this.backFromSelectedPanel.bind(this) }, this.isMobile && this.getActionToExpandCollapsePanel(), this.enableNewReports &&
|
349
|
+
h("calcite-button", { appearance: "solid", onClick: this.navigateToCreateFeature.bind(this), slot: "footer", width: "full" }, this.reportButtonText), h("calcite-panel", { "full-height": true }, h("feature-list", { class: "height-full", mapView: this.mapView, noFeaturesFoundMsg: this._translations.featureErrorMsg, onFeatureSelect: this.onFeatureSelectFromList.bind(this), pageSize: 30, selectedLayerId: layerId }))));
|
351
350
|
}
|
352
351
|
/**
|
353
352
|
* Returns the calcite-flow item for feature details
|
354
353
|
* @returns Node
|
355
354
|
*/
|
356
355
|
getFeatureDetailsFlowItem() {
|
357
|
-
return (h("calcite-flow-item", { collapsed: this.isMobile && this._sidePanelCollapsed, heading: this._selectedLayerName, onCalciteFlowItemBack: this.backFromSelectedPanel.bind(this) }, this.isMobile && this.getActionToExpandCollapsePanel(), h("instant-apps-social-share", { autoUpdateShareUrl: false, embed: false, popoverButtonIconScale: "s", ref: el => this._shareNode = el, scale: "m", shareButtonColor: "neutral", shareButtonType: "action", slot: "header-actions-end", socialMedia: true, view: this.mapView }), h("calcite-panel", { "full-height": true }, h("info-card", { allowEditing: false, graphics: this._selectedFeature, isLoading: false, isMobile: false, mapView: this.mapView, onSelectionChanged: this.featureDetailsChanged.bind(this), zoomAndScrollToSelected: true }))));
|
356
|
+
return (h("calcite-flow-item", { collapsed: this.isMobile && this._sidePanelCollapsed, heading: this._selectedLayerName, onCalciteFlowItemBack: this.backFromSelectedPanel.bind(this) }, this.isMobile && this.getActionToExpandCollapsePanel(), h("instant-apps-social-share", { autoUpdateShareUrl: false, embed: false, popoverButtonIconScale: "s", ref: el => this._shareNode = el, scale: "m", shareButtonColor: "neutral", shareButtonType: "action", slot: "header-actions-end", socialMedia: true, view: this.mapView }), h("calcite-panel", { "full-height": true }, h("info-card", { allowEditing: false, graphics: this._selectedFeature, highlightEnabled: false, isLoading: false, isMobile: false, mapView: this.mapView, onSelectionChanged: this.featureDetailsChanged.bind(this), zoomAndScrollToSelected: true }))));
|
358
357
|
}
|
359
358
|
/**
|
360
359
|
* Sets the selected features and updates the first feature as the current selected feature
|
@@ -386,6 +385,30 @@ export class CrowdsourceReporter {
|
|
386
385
|
*/
|
387
386
|
featureDetailsChanged(evt) {
|
388
387
|
this.setCurrentFeature(evt.detail[0]);
|
388
|
+
void this.highlightOnMap(evt.detail[0]);
|
389
|
+
}
|
390
|
+
/**
|
391
|
+
* Highlights the feature on map
|
392
|
+
* @param selectedFeature Graphic currently shown in feature details
|
393
|
+
*/
|
394
|
+
async highlightOnMap(selectedFeature) {
|
395
|
+
// if a feature is already highlighted, remove the previous highlight
|
396
|
+
this.clearHighlights();
|
397
|
+
// highlight the newly selected feature only when it has valid geometry
|
398
|
+
if (selectedFeature && selectedFeature.geometry && selectedFeature.layer) {
|
399
|
+
const selectedLayerView = await getFeatureLayerView(this.mapView, selectedFeature.layer.id);
|
400
|
+
this._highlightHandle = await highlightFeatures([selectedFeature.getObjectId()], selectedLayerView, this.mapView, true);
|
401
|
+
}
|
402
|
+
}
|
403
|
+
/**
|
404
|
+
* Clears the highlight
|
405
|
+
* @protected
|
406
|
+
*/
|
407
|
+
clearHighlights() {
|
408
|
+
//if a feature is already highlighted, then remove the highlight
|
409
|
+
if (this._highlightHandle) {
|
410
|
+
this._highlightHandle.remove();
|
411
|
+
}
|
389
412
|
}
|
390
413
|
/**
|
391
414
|
* Returns the action button to Expand/Collapse side panel in mobile mode
|
@@ -453,6 +476,7 @@ export class CrowdsourceReporter {
|
|
453
476
|
}
|
454
477
|
else {
|
455
478
|
this._flowItems = [...this._flowItems];
|
479
|
+
void this.highlightOnMap(clickedGraphics[0]);
|
456
480
|
}
|
457
481
|
}
|
458
482
|
}
|
@@ -74,7 +74,7 @@ export class FeatureList {
|
|
74
74
|
*/
|
75
75
|
render() {
|
76
76
|
return (h("calcite-panel", { "full-height": true, "full-width": true }, this._isLoading && h("calcite-loader", { label: "", scale: "m" }), this._featureItems.length === 0 && !this._isLoading &&
|
77
|
-
h("calcite-notice", { class: "error-msg", icon: "feature-details", kind: "info", open: true }, h("div", { slot: "message" }, this.noFeaturesFoundMsg ? this.noFeaturesFoundMsg : this._translations.featureErrorMsg)), h("calcite-list", { "selection-appearance": "border", "selection-mode": "
|
77
|
+
h("calcite-notice", { class: "error-msg", icon: "feature-details", kind: "info", open: true }, h("div", { slot: "message" }, this.noFeaturesFoundMsg ? this.noFeaturesFoundMsg : this._translations.featureErrorMsg)), h("calcite-list", { "selection-appearance": "border", "selection-mode": "none" }, !this._isLoading && this._featureItems.length > 0 && this._featureItems), this._featuresCount > this.pageSize &&
|
78
78
|
h("div", { class: "width-full", slot: "footer" }, h("calcite-pagination", { class: "pagination", "full-width": true, onCalcitePaginationChange: this.pageChanged.bind(this), "page-size": this.pageSize, "start-item": "1", "total-items": this._featuresCount }))));
|
79
79
|
}
|
80
80
|
//--------------------------------------------------------------------------
|
@@ -122,14 +122,12 @@ export class FeatureList {
|
|
122
122
|
this._highlightHandle = null;
|
123
123
|
}
|
124
124
|
//highlight on map only if it is selected item
|
125
|
-
if (
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
this._highlightHandle = await highlightFeatures([selectedFeatureObjectId], selectedLayerView, this.mapView, true);
|
130
|
-
}
|
131
|
-
this.featureSelect.emit(selectedFeature);
|
125
|
+
if (this.highlightOnMap) {
|
126
|
+
const selectedFeatureObjectId = Number(event.target.value);
|
127
|
+
const selectedLayerView = await getFeatureLayerView(this.mapView, this.selectedLayerId);
|
128
|
+
this._highlightHandle = await highlightFeatures([selectedFeatureObjectId], selectedLayerView, this.mapView, true);
|
132
129
|
}
|
130
|
+
this.featureSelect.emit(selectedFeature);
|
133
131
|
}
|
134
132
|
/**
|
135
133
|
* Query the selected feature layer, in descending order of object id's
|
@@ -30,6 +30,7 @@ export class InfoCard {
|
|
30
30
|
this.mapView = undefined;
|
31
31
|
this.zoomAndScrollToSelected = undefined;
|
32
32
|
this.allowEditing = true;
|
33
|
+
this.highlightEnabled = true;
|
33
34
|
this._alertOpen = false;
|
34
35
|
this._count = "";
|
35
36
|
this._editRecordOpen = false;
|
@@ -206,6 +207,7 @@ export class InfoCard {
|
|
206
207
|
heading: !this.isMobile
|
207
208
|
}
|
208
209
|
});
|
210
|
+
this._features.viewModel.highlightEnabled = this.highlightEnabled;
|
209
211
|
this.reactiveUtils.watch(() => this._features.viewModel.featureMenuOpen, (isOpen) => {
|
210
212
|
if (!isOpen) {
|
211
213
|
this._showListView = isOpen;
|
@@ -431,6 +433,24 @@ export class InfoCard {
|
|
431
433
|
"attribute": "allow-editing",
|
432
434
|
"reflect": false,
|
433
435
|
"defaultValue": "true"
|
436
|
+
},
|
437
|
+
"highlightEnabled": {
|
438
|
+
"type": "boolean",
|
439
|
+
"mutable": false,
|
440
|
+
"complexType": {
|
441
|
+
"original": "boolean",
|
442
|
+
"resolved": "boolean",
|
443
|
+
"references": {}
|
444
|
+
},
|
445
|
+
"required": false,
|
446
|
+
"optional": true,
|
447
|
+
"docs": {
|
448
|
+
"tags": [],
|
449
|
+
"text": "boolean: If true will highlights the features on map using Features Widget"
|
450
|
+
},
|
451
|
+
"attribute": "highlight-enabled",
|
452
|
+
"reflect": false,
|
453
|
+
"defaultValue": "true"
|
434
454
|
}
|
435
455
|
};
|
436
456
|
}
|
@@ -157,6 +157,7 @@ export class LayerTable {
|
|
157
157
|
this._initToolInfos();
|
158
158
|
}
|
159
159
|
this._initLayerExpressions();
|
160
|
+
this._resetColumnTemplates();
|
160
161
|
}
|
161
162
|
/**
|
162
163
|
* watch for changes in map view and get the first layer
|
@@ -317,12 +318,14 @@ export class LayerTable {
|
|
317
318
|
* @protected
|
318
319
|
*/
|
319
320
|
async _initModules() {
|
320
|
-
const [FeatureTable, reactiveUtils] = await loadModules([
|
321
|
+
const [FeatureTable, reactiveUtils, TableTemplate] = await loadModules([
|
321
322
|
"esri/widgets/FeatureTable",
|
322
|
-
"esri/core/reactiveUtils"
|
323
|
+
"esri/core/reactiveUtils",
|
324
|
+
"esri/widgets/FeatureTable/support/TableTemplate"
|
323
325
|
]);
|
324
326
|
this.FeatureTable = FeatureTable;
|
325
327
|
this.reactiveUtils = reactiveUtils;
|
328
|
+
this.TableTemplate = TableTemplate;
|
326
329
|
}
|
327
330
|
/**
|
328
331
|
* Update the toolbar when its size changes
|
@@ -959,6 +962,18 @@ export class LayerTable {
|
|
959
962
|
}
|
960
963
|
this.featureSelectionChange.emit(this.selectedIds);
|
961
964
|
}
|
965
|
+
/**
|
966
|
+
* Reset the tables column templates when we get new column config
|
967
|
+
*/
|
968
|
+
_resetColumnTemplates() {
|
969
|
+
var _a, _b;
|
970
|
+
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
|
+
this._table.tableTemplate = new this.TableTemplate({
|
972
|
+
columnTemplates
|
973
|
+
});
|
974
|
+
const fieldNames = columnTemplates.map(f => f.fieldName);
|
975
|
+
this._initColumnsInfo(fieldNames);
|
976
|
+
}
|
962
977
|
/**
|
963
978
|
* Reset basic table props
|
964
979
|
*/
|
@@ -1009,12 +1024,28 @@ export class LayerTable {
|
|
1009
1024
|
}
|
1010
1025
|
/**
|
1011
1026
|
* Store the column names and current hidden status to support show/hide of columns
|
1027
|
+
* @param fieldNames optional list of names from new config options
|
1012
1028
|
*/
|
1013
|
-
_initColumnsInfo() {
|
1014
|
-
|
1015
|
-
|
1029
|
+
_initColumnsInfo(fieldNames) {
|
1030
|
+
var _a, _b;
|
1031
|
+
// this._table.columns is not reflecting correct list when new
|
1032
|
+
// tableTemplate.columnTemplates have been defined on an existing FeatureTable
|
1033
|
+
// TODO review for better solution post 2024 R01 release
|
1034
|
+
const columnsInfo = (_a = this._table) === null || _a === void 0 ? void 0 : _a.columns.reduce((prev, cur) => {
|
1035
|
+
if (!fieldNames || ((fieldNames === null || fieldNames === void 0 ? void 0 : fieldNames.indexOf(cur.name)) > -1)) {
|
1036
|
+
prev[cur.name] = !cur.hidden;
|
1037
|
+
}
|
1016
1038
|
return prev;
|
1017
1039
|
}, {});
|
1040
|
+
const oldColumnNames = (_b = this._table) === null || _b === void 0 ? void 0 : _b.columns.map((c) => c.name);
|
1041
|
+
const newColumnNames = fieldNames ? fieldNames.filter(n => oldColumnNames.indexOf(n) < 0) : [];
|
1042
|
+
newColumnNames.forEach(c => {
|
1043
|
+
columnsInfo[c] = true;
|
1044
|
+
});
|
1045
|
+
this._columnsInfo = fieldNames ? fieldNames.reduce((prev, cur) => {
|
1046
|
+
prev[cur] = columnsInfo[cur];
|
1047
|
+
return prev;
|
1048
|
+
}, {}) : columnsInfo;
|
1018
1049
|
}
|
1019
1050
|
/**
|
1020
1051
|
* Select the feature that was specified via url params
|
@@ -160,6 +160,8 @@ export async function getAllLayers(mapView) {
|
|
160
160
|
export async function highlightFeatures(ids, layerView, mapView, updateExtent = false) {
|
161
161
|
if (updateExtent) {
|
162
162
|
await goToSelection(ids, layerView, mapView, false);
|
163
|
+
//wait for sometime to load the feature in layerView then only the highlight will work
|
164
|
+
await new Promise(resolve => setTimeout(resolve, 1000));
|
163
165
|
}
|
164
166
|
return layerView.highlight(ids);
|
165
167
|
}
|
@@ -193,6 +193,8 @@ export async function highlightFeatures(
|
|
193
193
|
): Promise<__esri.Handle> {
|
194
194
|
if (updateExtent) {
|
195
195
|
await goToSelection(ids, layerView, mapView, false);
|
196
|
+
//wait for sometime to load the feature in layerView then only the highlight will work
|
197
|
+
await new Promise(resolve => setTimeout(resolve, 1000));
|
196
198
|
}
|
197
199
|
return layerView.highlight(ids);
|
198
200
|
}
|
@@ -461,9 +461,13 @@ const CrowdsourceManager$1 = /*@__PURE__*/ proxyCustomElement(class CrowdsourceM
|
|
461
461
|
* Update the component layout when its size changes
|
462
462
|
*/
|
463
463
|
_onResize() {
|
464
|
-
|
464
|
+
const isMobile = this.el.offsetWidth < 1024;
|
465
|
+
const forceOpen = !this._isMobile && isMobile;
|
466
|
+
this._isMobile = isMobile;
|
465
467
|
this._layoutMode = this._isMobile ? ELayoutMode.HORIZONTAL : ELayoutMode.GRID;
|
466
|
-
|
468
|
+
if (forceOpen) {
|
469
|
+
this._panelOpen = true;
|
470
|
+
}
|
467
471
|
}
|
468
472
|
/**
|
469
473
|
* Open/Close the appropriate panel.
|
@@ -6,7 +6,7 @@
|
|
6
6
|
import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
7
7
|
import { g as getLocaleComponentStrings } from './locale.js';
|
8
8
|
import { l as loadModules } from './loadModules.js';
|
9
|
-
import { a as getAllLayers, g as getLayerOrTable } from './mapViewUtils.js';
|
9
|
+
import { a as getAllLayers, e as getFeatureLayerView, h as highlightFeatures, g as getLayerOrTable } from './mapViewUtils.js';
|
10
10
|
import { q as queryFeaturesByID } from './queryUtils.js';
|
11
11
|
import { d as defineCustomElement$w } from './action.js';
|
12
12
|
import { d as defineCustomElement$v } from './action-menu.js';
|
@@ -119,7 +119,7 @@ const CrowdsourceReporter$1 = /*@__PURE__*/ proxyCustomElement(class Crowdsource
|
|
119
119
|
*/
|
120
120
|
render() {
|
121
121
|
const themeClass = this.theme === "dark" ? "calcite-mode-dark" : "calcite-mode-light";
|
122
|
-
return (h(Host, null, this._reportSubmitted && h("calcite-alert", { "auto-close": true, class: themeClass, icon: "check-circle", kind: "success", label: "", onCalciteAlertClose: () => { this._reportSubmitted = false; }, open: true, placement: "top" }, h("div", { slot: "title" }, this._translations.reportSubmit), h("div", { slot: "message" }, this._translations.submitMsg)), this._featureCreationFailedErrorMsg && h("calcite-alert", { "auto-close": true, class: themeClass, icon: "x-octagon", kind: "danger", label: "", onCalciteAlertClose: () => { this._featureCreationFailedErrorMsg = ""; }, open: true, placement: "top" }, h("div", { slot: "title" }, this._translations.error), h("div", { slot: "message" }, this._featureCreationFailedErrorMsg)), h("div", null, h("calcite-shell", { "content-behind": true }, this._getReporter()))));
|
122
|
+
return (h(Host, null, this._reportSubmitted && h("calcite-alert", { "auto-close": true, class: themeClass, icon: "check-circle", kind: "success", label: "", onCalciteAlertClose: () => { this._reportSubmitted = false; }, open: true, placement: "top" }, h("div", { slot: "title" }, this._translations.reportSubmit), h("div", { slot: "message" }, this.reportSubmittedMessage ? this.reportSubmittedMessage : this._translations.submitMsg)), this._featureCreationFailedErrorMsg && h("calcite-alert", { "auto-close": true, class: themeClass, icon: "x-octagon", kind: "danger", label: "", onCalciteAlertClose: () => { this._featureCreationFailedErrorMsg = ""; }, open: true, placement: "top" }, h("div", { slot: "title" }, this._translations.error), h("div", { slot: "message" }, this._featureCreationFailedErrorMsg)), h("div", null, h("calcite-shell", { "content-behind": true }, this._getReporter()))));
|
123
123
|
}
|
124
124
|
//--------------------------------------------------------------------------
|
125
125
|
//
|
@@ -189,9 +189,7 @@ const CrowdsourceReporter$1 = /*@__PURE__*/ proxyCustomElement(class Crowdsource
|
|
189
189
|
* @protected
|
190
190
|
*/
|
191
191
|
getLayerListFlowItem() {
|
192
|
-
return (h("calcite-flow-item", { collapsed: this.isMobile && this._sidePanelCollapsed, heading: this.reportsHeader }, this._hasValidLayers &&
|
193
|
-
h("calcite-action", { icon: "sort-ascending-arrow", slot: this.isMobile ? "header-menu-actions" : "header-actions-end", text: this._translations.sort, "text-enabled": this.isMobile }), this._hasValidLayers &&
|
194
|
-
h("calcite-action", { icon: "filter", slot: this.isMobile ? "header-menu-actions" : "header-actions-end", text: this._translations.filter, "text-enabled": this.isMobile }), this.isMobile && this.getActionToExpandCollapsePanel(), this._hasValidLayers && this.enableNewReports &&
|
192
|
+
return (h("calcite-flow-item", { collapsed: this.isMobile && this._sidePanelCollapsed, heading: this.reportsHeader }, this.isMobile && this.getActionToExpandCollapsePanel(), this._hasValidLayers && this.enableNewReports &&
|
195
193
|
h("calcite-button", { appearance: "solid", onClick: this.navigateToChooseCategory.bind(this), slot: "footer", width: "full" }, this.reportButtonText), h("calcite-panel", { "full-height": true, "full-width": true }, h("layer-list", { class: "height-full", layers: this.layers, mapView: this.mapView, noLayerErrorMsg: this._translations.noLayerToDisplayErrorMsg, onLayerSelect: this.displayFeaturesList.bind(this), onLayersListLoaded: this.layerListLoaded.bind(this), ref: el => this._layerList = el, showFeatureCount: true, showNextIcon: true }))));
|
196
194
|
}
|
197
195
|
/**
|
@@ -337,6 +335,7 @@ const CrowdsourceReporter$1 = /*@__PURE__*/ proxyCustomElement(class Crowdsource
|
|
337
335
|
backFromSelectedPanel() {
|
338
336
|
const updatedFlowItems = [...this._flowItems];
|
339
337
|
updatedFlowItems.pop();
|
338
|
+
this.clearHighlights();
|
340
339
|
//Back to layer list, and return as the flowItems will be reset in navigateToHomePage
|
341
340
|
if (updatedFlowItems.length === 1) {
|
342
341
|
this.navigateToHomePage();
|
@@ -368,15 +367,15 @@ const CrowdsourceReporter$1 = /*@__PURE__*/ proxyCustomElement(class Crowdsource
|
|
368
367
|
* @protected
|
369
368
|
*/
|
370
369
|
getFeatureListFlowItem(layerId, layerName) {
|
371
|
-
return (h("calcite-flow-item", { collapsed: this.isMobile && this._sidePanelCollapsed, heading: layerName, onCalciteFlowItemBack: this.backFromSelectedPanel.bind(this) },
|
372
|
-
h("calcite-button", { appearance: "solid", onClick: this.navigateToCreateFeature.bind(this), slot: "footer", width: "full" }, this.reportButtonText), h("calcite-panel", { "full-height": true }, h("feature-list", { class: "height-full",
|
370
|
+
return (h("calcite-flow-item", { collapsed: this.isMobile && this._sidePanelCollapsed, heading: layerName, onCalciteFlowItemBack: this.backFromSelectedPanel.bind(this) }, this.isMobile && this.getActionToExpandCollapsePanel(), this.enableNewReports &&
|
371
|
+
h("calcite-button", { appearance: "solid", onClick: this.navigateToCreateFeature.bind(this), slot: "footer", width: "full" }, this.reportButtonText), h("calcite-panel", { "full-height": true }, h("feature-list", { class: "height-full", mapView: this.mapView, noFeaturesFoundMsg: this._translations.featureErrorMsg, onFeatureSelect: this.onFeatureSelectFromList.bind(this), pageSize: 30, selectedLayerId: layerId }))));
|
373
372
|
}
|
374
373
|
/**
|
375
374
|
* Returns the calcite-flow item for feature details
|
376
375
|
* @returns Node
|
377
376
|
*/
|
378
377
|
getFeatureDetailsFlowItem() {
|
379
|
-
return (h("calcite-flow-item", { collapsed: this.isMobile && this._sidePanelCollapsed, heading: this._selectedLayerName, onCalciteFlowItemBack: this.backFromSelectedPanel.bind(this) }, this.isMobile && this.getActionToExpandCollapsePanel(), h("instant-apps-social-share", { autoUpdateShareUrl: false, embed: false, popoverButtonIconScale: "s", ref: el => this._shareNode = el, scale: "m", shareButtonColor: "neutral", shareButtonType: "action", slot: "header-actions-end", socialMedia: true, view: this.mapView }), h("calcite-panel", { "full-height": true }, h("info-card", { allowEditing: false, graphics: this._selectedFeature, isLoading: false, isMobile: false, mapView: this.mapView, onSelectionChanged: this.featureDetailsChanged.bind(this), zoomAndScrollToSelected: true }))));
|
378
|
+
return (h("calcite-flow-item", { collapsed: this.isMobile && this._sidePanelCollapsed, heading: this._selectedLayerName, onCalciteFlowItemBack: this.backFromSelectedPanel.bind(this) }, this.isMobile && this.getActionToExpandCollapsePanel(), h("instant-apps-social-share", { autoUpdateShareUrl: false, embed: false, popoverButtonIconScale: "s", ref: el => this._shareNode = el, scale: "m", shareButtonColor: "neutral", shareButtonType: "action", slot: "header-actions-end", socialMedia: true, view: this.mapView }), h("calcite-panel", { "full-height": true }, h("info-card", { allowEditing: false, graphics: this._selectedFeature, highlightEnabled: false, isLoading: false, isMobile: false, mapView: this.mapView, onSelectionChanged: this.featureDetailsChanged.bind(this), zoomAndScrollToSelected: true }))));
|
380
379
|
}
|
381
380
|
/**
|
382
381
|
* Sets the selected features and updates the first feature as the current selected feature
|
@@ -408,6 +407,30 @@ const CrowdsourceReporter$1 = /*@__PURE__*/ proxyCustomElement(class Crowdsource
|
|
408
407
|
*/
|
409
408
|
featureDetailsChanged(evt) {
|
410
409
|
this.setCurrentFeature(evt.detail[0]);
|
410
|
+
void this.highlightOnMap(evt.detail[0]);
|
411
|
+
}
|
412
|
+
/**
|
413
|
+
* Highlights the feature on map
|
414
|
+
* @param selectedFeature Graphic currently shown in feature details
|
415
|
+
*/
|
416
|
+
async highlightOnMap(selectedFeature) {
|
417
|
+
// if a feature is already highlighted, remove the previous highlight
|
418
|
+
this.clearHighlights();
|
419
|
+
// highlight the newly selected feature only when it has valid geometry
|
420
|
+
if (selectedFeature && selectedFeature.geometry && selectedFeature.layer) {
|
421
|
+
const selectedLayerView = await getFeatureLayerView(this.mapView, selectedFeature.layer.id);
|
422
|
+
this._highlightHandle = await highlightFeatures([selectedFeature.getObjectId()], selectedLayerView, this.mapView, true);
|
423
|
+
}
|
424
|
+
}
|
425
|
+
/**
|
426
|
+
* Clears the highlight
|
427
|
+
* @protected
|
428
|
+
*/
|
429
|
+
clearHighlights() {
|
430
|
+
//if a feature is already highlighted, then remove the highlight
|
431
|
+
if (this._highlightHandle) {
|
432
|
+
this._highlightHandle.remove();
|
433
|
+
}
|
411
434
|
}
|
412
435
|
/**
|
413
436
|
* Returns the action button to Expand/Collapse side panel in mobile mode
|
@@ -475,6 +498,7 @@ const CrowdsourceReporter$1 = /*@__PURE__*/ proxyCustomElement(class Crowdsource
|
|
475
498
|
}
|
476
499
|
else {
|
477
500
|
this._flowItems = [...this._flowItems];
|
501
|
+
void this.highlightOnMap(clickedGraphics[0]);
|
478
502
|
}
|
479
503
|
}
|
480
504
|
}
|
@@ -81,7 +81,7 @@ const FeatureList = /*@__PURE__*/ proxyCustomElement(class FeatureList extends H
|
|
81
81
|
*/
|
82
82
|
render() {
|
83
83
|
return (h("calcite-panel", { "full-height": true, "full-width": true }, this._isLoading && h("calcite-loader", { label: "", scale: "m" }), this._featureItems.length === 0 && !this._isLoading &&
|
84
|
-
h("calcite-notice", { class: "error-msg", icon: "feature-details", kind: "info", open: true }, h("div", { slot: "message" }, this.noFeaturesFoundMsg ? this.noFeaturesFoundMsg : this._translations.featureErrorMsg)), h("calcite-list", { "selection-appearance": "border", "selection-mode": "
|
84
|
+
h("calcite-notice", { class: "error-msg", icon: "feature-details", kind: "info", open: true }, h("div", { slot: "message" }, this.noFeaturesFoundMsg ? this.noFeaturesFoundMsg : this._translations.featureErrorMsg)), h("calcite-list", { "selection-appearance": "border", "selection-mode": "none" }, !this._isLoading && this._featureItems.length > 0 && this._featureItems), this._featuresCount > this.pageSize &&
|
85
85
|
h("div", { class: "width-full", slot: "footer" }, h("calcite-pagination", { class: "pagination", "full-width": true, onCalcitePaginationChange: this.pageChanged.bind(this), "page-size": this.pageSize, "start-item": "1", "total-items": this._featuresCount }))));
|
86
86
|
}
|
87
87
|
//--------------------------------------------------------------------------
|
@@ -129,14 +129,12 @@ const FeatureList = /*@__PURE__*/ proxyCustomElement(class FeatureList extends H
|
|
129
129
|
this._highlightHandle = null;
|
130
130
|
}
|
131
131
|
//highlight on map only if it is selected item
|
132
|
-
if (
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
this._highlightHandle = await highlightFeatures([selectedFeatureObjectId], selectedLayerView, this.mapView, true);
|
137
|
-
}
|
138
|
-
this.featureSelect.emit(selectedFeature);
|
132
|
+
if (this.highlightOnMap) {
|
133
|
+
const selectedFeatureObjectId = Number(event.target.value);
|
134
|
+
const selectedLayerView = await getFeatureLayerView(this.mapView, this.selectedLayerId);
|
135
|
+
this._highlightHandle = await highlightFeatures([selectedFeatureObjectId], selectedLayerView, this.mapView, true);
|
139
136
|
}
|
137
|
+
this.featureSelect.emit(selectedFeature);
|
140
138
|
}
|
141
139
|
/**
|
142
140
|
* Query the selected feature layer, in descending order of object id's
|
@@ -38,6 +38,7 @@ const InfoCard = /*@__PURE__*/ proxyCustomElement(class InfoCard extends HTMLEle
|
|
38
38
|
this.mapView = undefined;
|
39
39
|
this.zoomAndScrollToSelected = undefined;
|
40
40
|
this.allowEditing = true;
|
41
|
+
this.highlightEnabled = true;
|
41
42
|
this._alertOpen = false;
|
42
43
|
this._count = "";
|
43
44
|
this._editRecordOpen = false;
|
@@ -214,6 +215,7 @@ const InfoCard = /*@__PURE__*/ proxyCustomElement(class InfoCard extends HTMLEle
|
|
214
215
|
heading: !this.isMobile
|
215
216
|
}
|
216
217
|
});
|
218
|
+
this._features.viewModel.highlightEnabled = this.highlightEnabled;
|
217
219
|
this.reactiveUtils.watch(() => this._features.viewModel.featureMenuOpen, (isOpen) => {
|
218
220
|
if (!isOpen) {
|
219
221
|
this._showListView = isOpen;
|
@@ -331,6 +333,7 @@ const InfoCard = /*@__PURE__*/ proxyCustomElement(class InfoCard extends HTMLEle
|
|
331
333
|
"mapView": [16],
|
332
334
|
"zoomAndScrollToSelected": [4, "zoom-and-scroll-to-selected"],
|
333
335
|
"allowEditing": [4, "allow-editing"],
|
336
|
+
"highlightEnabled": [4, "highlight-enabled"],
|
334
337
|
"_alertOpen": [32],
|
335
338
|
"_count": [32],
|
336
339
|
"_editRecordOpen": [32],
|
@@ -186,6 +186,7 @@ const LayerTable = /*@__PURE__*/ proxyCustomElement(class LayerTable extends HTM
|
|
186
186
|
this._initToolInfos();
|
187
187
|
}
|
188
188
|
this._initLayerExpressions();
|
189
|
+
this._resetColumnTemplates();
|
189
190
|
}
|
190
191
|
/**
|
191
192
|
* watch for changes in map view and get the first layer
|
@@ -346,12 +347,14 @@ const LayerTable = /*@__PURE__*/ proxyCustomElement(class LayerTable extends HTM
|
|
346
347
|
* @protected
|
347
348
|
*/
|
348
349
|
async _initModules() {
|
349
|
-
const [FeatureTable, reactiveUtils] = await loadModules([
|
350
|
+
const [FeatureTable, reactiveUtils, TableTemplate] = await loadModules([
|
350
351
|
"esri/widgets/FeatureTable",
|
351
|
-
"esri/core/reactiveUtils"
|
352
|
+
"esri/core/reactiveUtils",
|
353
|
+
"esri/widgets/FeatureTable/support/TableTemplate"
|
352
354
|
]);
|
353
355
|
this.FeatureTable = FeatureTable;
|
354
356
|
this.reactiveUtils = reactiveUtils;
|
357
|
+
this.TableTemplate = TableTemplate;
|
355
358
|
}
|
356
359
|
/**
|
357
360
|
* Update the toolbar when its size changes
|
@@ -988,6 +991,18 @@ const LayerTable = /*@__PURE__*/ proxyCustomElement(class LayerTable extends HTM
|
|
988
991
|
}
|
989
992
|
this.featureSelectionChange.emit(this.selectedIds);
|
990
993
|
}
|
994
|
+
/**
|
995
|
+
* Reset the tables column templates when we get new column config
|
996
|
+
*/
|
997
|
+
_resetColumnTemplates() {
|
998
|
+
var _a, _b;
|
999
|
+
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
|
+
this._table.tableTemplate = new this.TableTemplate({
|
1001
|
+
columnTemplates
|
1002
|
+
});
|
1003
|
+
const fieldNames = columnTemplates.map(f => f.fieldName);
|
1004
|
+
this._initColumnsInfo(fieldNames);
|
1005
|
+
}
|
991
1006
|
/**
|
992
1007
|
* Reset basic table props
|
993
1008
|
*/
|
@@ -1038,12 +1053,28 @@ const LayerTable = /*@__PURE__*/ proxyCustomElement(class LayerTable extends HTM
|
|
1038
1053
|
}
|
1039
1054
|
/**
|
1040
1055
|
* Store the column names and current hidden status to support show/hide of columns
|
1056
|
+
* @param fieldNames optional list of names from new config options
|
1041
1057
|
*/
|
1042
|
-
_initColumnsInfo() {
|
1043
|
-
|
1044
|
-
|
1058
|
+
_initColumnsInfo(fieldNames) {
|
1059
|
+
var _a, _b;
|
1060
|
+
// this._table.columns is not reflecting correct list when new
|
1061
|
+
// tableTemplate.columnTemplates have been defined on an existing FeatureTable
|
1062
|
+
// TODO review for better solution post 2024 R01 release
|
1063
|
+
const columnsInfo = (_a = this._table) === null || _a === void 0 ? void 0 : _a.columns.reduce((prev, cur) => {
|
1064
|
+
if (!fieldNames || ((fieldNames === null || fieldNames === void 0 ? void 0 : fieldNames.indexOf(cur.name)) > -1)) {
|
1065
|
+
prev[cur.name] = !cur.hidden;
|
1066
|
+
}
|
1045
1067
|
return prev;
|
1046
1068
|
}, {});
|
1069
|
+
const oldColumnNames = (_b = this._table) === null || _b === void 0 ? void 0 : _b.columns.map((c) => c.name);
|
1070
|
+
const newColumnNames = fieldNames ? fieldNames.filter(n => oldColumnNames.indexOf(n) < 0) : [];
|
1071
|
+
newColumnNames.forEach(c => {
|
1072
|
+
columnsInfo[c] = true;
|
1073
|
+
});
|
1074
|
+
this._columnsInfo = fieldNames ? fieldNames.reduce((prev, cur) => {
|
1075
|
+
prev[cur] = columnsInfo[cur];
|
1076
|
+
return prev;
|
1077
|
+
}, {}) : columnsInfo;
|
1047
1078
|
}
|
1048
1079
|
/**
|
1049
1080
|
* Select the feature that was specified via url params
|
@@ -161,6 +161,8 @@ async function getAllLayers(mapView) {
|
|
161
161
|
async function highlightFeatures(ids, layerView, mapView, updateExtent = false) {
|
162
162
|
if (updateExtent) {
|
163
163
|
await goToSelection(ids, layerView, mapView, false);
|
164
|
+
//wait for sometime to load the feature in layerView then only the highlight will work
|
165
|
+
await new Promise(resolve => setTimeout(resolve, 1000));
|
164
166
|
}
|
165
167
|
return layerView.highlight(ids);
|
166
168
|
}
|
@@ -12,7 +12,7 @@ import { o as onToggleOpenCloseComponent } from './openCloseComponent-9f90f493.j
|
|
12
12
|
import { c as connectMessages, s as setUpMessages, d as disconnectMessages, u as updateMessages } from './t9n-436fb2b1.js';
|
13
13
|
import { K as KindIcons } from './resources-88a48c5c.js';
|
14
14
|
import { g as getLocaleComponentStrings, l as loadModules } from './locale-25a5ae3e.js';
|
15
|
-
import { a as getAllLayers } from './mapViewUtils-
|
15
|
+
import { a as getAllLayers } from './mapViewUtils-257bc9b3.js';
|
16
16
|
import { P as PopupUtils } from './popupUtils-23fe3c9f.js';
|
17
17
|
import './guid-b75a5f7b.js';
|
18
18
|
import './resources-8834f920.js';
|
@@ -677,6 +677,7 @@ const InfoCard = class {
|
|
677
677
|
this.mapView = undefined;
|
678
678
|
this.zoomAndScrollToSelected = undefined;
|
679
679
|
this.allowEditing = true;
|
680
|
+
this.highlightEnabled = true;
|
680
681
|
this._alertOpen = false;
|
681
682
|
this._count = "";
|
682
683
|
this._editRecordOpen = false;
|
@@ -853,6 +854,7 @@ const InfoCard = class {
|
|
853
854
|
heading: !this.isMobile
|
854
855
|
}
|
855
856
|
});
|
857
|
+
this._features.viewModel.highlightEnabled = this.highlightEnabled;
|
856
858
|
this.reactiveUtils.watch(() => this._features.viewModel.featureMenuOpen, (isOpen) => {
|
857
859
|
if (!isOpen) {
|
858
860
|
this._showListView = isOpen;
|
@@ -22,7 +22,7 @@ import { V as Validation } from './Validation-ea480265.js';
|
|
22
22
|
import { d as debounce } from './debounce-229b1a22.js';
|
23
23
|
import { i as isActivationKey } from './key-c83d835f.js';
|
24
24
|
import { g as getLocaleComponentStrings } from './locale-25a5ae3e.js';
|
25
|
-
import { d as getMapLayerHash, o as getMapTableHash } from './mapViewUtils-
|
25
|
+
import { d as getMapLayerHash, o as getMapTableHash } from './mapViewUtils-257bc9b3.js';
|
26
26
|
import { s as state } from './publicNotificationStore-3bf4de75.js';
|
27
27
|
import './resources-8834f920.js';
|
28
28
|
import './browser-d60104bd.js';
|
@@ -12,7 +12,7 @@ import { c as connectLocalized, d as disconnectLocalized } from './locale-904407
|
|
12
12
|
import { c as connectMessages, s as setUpMessages, d as disconnectMessages, u as updateMessages } from './t9n-436fb2b1.js';
|
13
13
|
import { S as SLOTS$1 } from './resources-00983bd3.js';
|
14
14
|
import { l as loadModules, g as getLocaleComponentStrings, f as formatNumber } from './locale-25a5ae3e.js';
|
15
|
-
import { a as getAllLayers, g as getLayerOrTable,
|
15
|
+
import { a as getAllLayers, g as getLayerOrTable, b as getFeatureLayerView, h as highlightFeatures, d as getMapLayerHash } from './mapViewUtils-257bc9b3.js';
|
16
16
|
import { P as PopupUtils } from './popupUtils-23fe3c9f.js';
|
17
17
|
import './guid-b75a5f7b.js';
|
18
18
|
import './resources-8834f920.js';
|
@@ -637,7 +637,7 @@ const FeatureList = class {
|
|
637
637
|
*/
|
638
638
|
render() {
|
639
639
|
return (h("calcite-panel", { "full-height": true, "full-width": true }, this._isLoading && h("calcite-loader", { label: "", scale: "m" }), this._featureItems.length === 0 && !this._isLoading &&
|
640
|
-
h("calcite-notice", { class: "error-msg", icon: "feature-details", kind: "info", open: true }, h("div", { slot: "message" }, this.noFeaturesFoundMsg ? this.noFeaturesFoundMsg : this._translations.featureErrorMsg)), h("calcite-list", { "selection-appearance": "border", "selection-mode": "
|
640
|
+
h("calcite-notice", { class: "error-msg", icon: "feature-details", kind: "info", open: true }, h("div", { slot: "message" }, this.noFeaturesFoundMsg ? this.noFeaturesFoundMsg : this._translations.featureErrorMsg)), h("calcite-list", { "selection-appearance": "border", "selection-mode": "none" }, !this._isLoading && this._featureItems.length > 0 && this._featureItems), this._featuresCount > this.pageSize &&
|
641
641
|
h("div", { class: "width-full", slot: "footer" }, h("calcite-pagination", { class: "pagination", "full-width": true, onCalcitePaginationChange: this.pageChanged.bind(this), "page-size": this.pageSize, "start-item": "1", "total-items": this._featuresCount }))));
|
642
642
|
}
|
643
643
|
//--------------------------------------------------------------------------
|
@@ -685,14 +685,12 @@ const FeatureList = class {
|
|
685
685
|
this._highlightHandle = null;
|
686
686
|
}
|
687
687
|
//highlight on map only if it is selected item
|
688
|
-
if (
|
689
|
-
|
690
|
-
|
691
|
-
|
692
|
-
this._highlightHandle = await highlightFeatures([selectedFeatureObjectId], selectedLayerView, this.mapView, true);
|
693
|
-
}
|
694
|
-
this.featureSelect.emit(selectedFeature);
|
688
|
+
if (this.highlightOnMap) {
|
689
|
+
const selectedFeatureObjectId = Number(event.target.value);
|
690
|
+
const selectedLayerView = await getFeatureLayerView(this.mapView, this.selectedLayerId);
|
691
|
+
this._highlightHandle = await highlightFeatures([selectedFeatureObjectId], selectedLayerView, this.mapView, true);
|
695
692
|
}
|
693
|
+
this.featureSelect.emit(selectedFeature);
|
696
694
|
}
|
697
695
|
/**
|
698
696
|
* Query the selected feature layer, in descending order of object id's
|