@esri/solutions-components 0.10.6 → 0.10.8
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 +24 -8
- package/dist/cjs/buffer-tools_3.cjs.entry.js +1 -1
- package/dist/cjs/calcite-combobox_3.cjs.entry.js +354 -967
- package/dist/cjs/calcite-graph_2.cjs.entry.js +1082 -0
- package/dist/cjs/calcite-shell-panel_14.cjs.entry.js +6 -6
- package/dist/cjs/calcite-tree_3.cjs.entry.js +1 -1
- package/dist/cjs/card-manager_3.cjs.entry.js +246 -18
- package/dist/cjs/crowdsource-manager.cjs.entry.js +169 -49
- package/dist/cjs/instant-apps-control-panel.cjs.entry.js +2 -1
- package/dist/cjs/instant-apps-time-filter.cjs.entry.js +40 -21
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/map-select-tools_3.cjs.entry.js +3 -3
- package/dist/cjs/pci-calculator.cjs.entry.js +1 -1
- package/dist/cjs/public-notification.cjs.entry.js +1 -1
- package/dist/cjs/refine-results-flow-item.cjs.entry.js +1 -1
- package/dist/cjs/share-item.cjs.entry.js +1 -1
- package/dist/cjs/solution-configuration.cjs.entry.js +3 -3
- package/dist/cjs/solution-contents_3.cjs.entry.js +3 -3
- package/dist/cjs/solutions-components.cjs.js +1 -1
- package/dist/cjs/spatial-ref.cjs.entry.js +1 -1
- package/dist/collection/assets/t9n/crowdsource-manager/resources.json +5 -1
- package/dist/collection/assets/t9n/crowdsource-manager/resources_en.json +5 -1
- package/dist/collection/assets/t9n/layer-table/resources.json +1 -0
- package/dist/collection/assets/t9n/layer-table/resources_en.json +1 -0
- package/dist/collection/assets/t9n/map-card/resources.json +6 -1
- package/dist/collection/assets/t9n/map-card/resources_en.json +6 -1
- package/dist/collection/components/card-manager/card-manager.js +34 -8
- package/dist/collection/components/crowdsource-manager/crowdsource-manager.js +173 -65
- package/dist/collection/components/layer-table/layer-table.js +175 -8
- package/dist/collection/components/map-card/map-card.css +4 -0
- package/dist/collection/components/map-card/map-card.js +368 -3
- package/dist/collection/components/map-draw-tools/map-draw-tools.js +1 -1
- package/dist/collection/components/map-fullscreen/map-fullscreen.js +1 -1
- package/dist/collection/components/map-layer-picker/map-layer-picker.js +9 -3
- package/dist/collection/components/map-legend/map-legend.js +1 -1
- package/dist/collection/components/map-picker/map-picker.css +8 -0
- package/dist/collection/components/map-picker/map-picker.js +74 -3
- package/dist/collection/components/map-search/map-search.js +1 -1
- package/dist/collection/components/map-select-tools/map-select-tools.js +1 -1
- package/dist/collection/components/map-tools/map-tools.js +1 -1
- package/dist/collection/components/pci-calculator/pci-calculator.js +1 -1
- package/dist/collection/components/pdf-download/pdf-download.js +1 -1
- package/dist/collection/components/public-notification/public-notification.js +1 -1
- package/dist/collection/components/refine-results-flow-item/refine-results-flow-item.js +1 -1
- package/dist/collection/components/refine-selection/refine-selection.js +1 -1
- package/dist/collection/components/share-item/share-item.js +1 -1
- package/dist/collection/components/solution-configuration/solution-configuration.js +3 -3
- package/dist/collection/components/solution-contents/solution-contents.js +1 -1
- package/dist/collection/components/solution-item/solution-item.js +1 -1
- package/dist/collection/components/solution-item-details/solution-item-details.js +1 -1
- package/dist/collection/components/solution-item-icon/solution-item-icon.js +1 -1
- package/dist/collection/components/solution-item-sharing/solution-item-sharing.js +1 -1
- package/dist/collection/components/solution-organization-variables/solution-organization-variables.js +1 -1
- package/dist/collection/components/solution-resource-item/solution-resource-item.js +1 -1
- package/dist/collection/components/solution-spatial-ref/solution-spatial-ref.js +1 -1
- package/dist/collection/components/solution-template-data/solution-template-data.js +1 -1
- package/dist/collection/components/solution-variables/solution-variables.js +1 -1
- package/dist/collection/components/spatial-ref/spatial-ref.js +1 -1
- package/dist/collection/demos/crowdsource-manager.html +1 -0
- package/dist/components/card-manager2.js +20 -8
- package/dist/components/crowdsource-manager.js +172 -53
- package/dist/components/instant-apps-control-panel.js +2 -1
- package/dist/components/instant-apps-time-filter.js +46 -23
- package/dist/components/layer-table2.js +72 -10
- package/dist/components/map-card2.js +288 -47
- package/dist/components/map-draw-tools2.js +1 -1
- package/dist/components/map-fullscreen2.js +1 -1
- package/dist/components/map-layer-picker2.js +9 -3
- package/dist/components/map-legend2.js +1 -1
- package/dist/components/map-picker2.js +24 -5
- package/dist/components/map-search2.js +1 -1
- package/dist/components/map-select-tools2.js +1 -1
- package/dist/components/map-tools2.js +1 -1
- package/dist/components/pci-calculator.js +1 -1
- package/dist/components/pdf-download2.js +1 -1
- package/dist/components/public-notification.js +1 -1
- package/dist/components/refine-results-flow-item.js +1 -1
- package/dist/components/refine-selection2.js +1 -1
- package/dist/components/share-item.js +1 -1
- package/dist/components/solution-configuration.js +3 -3
- package/dist/components/solution-contents2.js +1 -1
- package/dist/components/solution-item-details2.js +1 -1
- package/dist/components/solution-item-icon2.js +1 -1
- package/dist/components/solution-item-sharing2.js +1 -1
- package/dist/components/solution-item2.js +1 -1
- package/dist/components/solution-organization-variables2.js +1 -1
- package/dist/components/solution-resource-item2.js +1 -1
- package/dist/components/solution-spatial-ref2.js +1 -1
- package/dist/components/solution-template-data2.js +1 -1
- package/dist/components/solution-variables2.js +1 -1
- package/dist/components/spatial-ref.js +1 -1
- package/dist/esm/basemap-gallery_7.entry.js +24 -8
- package/dist/esm/buffer-tools_3.entry.js +1 -1
- package/dist/esm/calcite-combobox_3.entry.js +369 -982
- package/dist/esm/calcite-graph_2.entry.js +1077 -0
- package/dist/esm/calcite-shell-panel_14.entry.js +6 -6
- package/dist/esm/calcite-tree_3.entry.js +1 -1
- package/dist/esm/card-manager_3.entry.js +248 -20
- package/dist/esm/crowdsource-manager.entry.js +170 -50
- package/dist/esm/instant-apps-control-panel.entry.js +2 -1
- package/dist/esm/instant-apps-time-filter.entry.js +41 -22
- package/dist/esm/loader.js +1 -1
- package/dist/esm/map-select-tools_3.entry.js +3 -3
- package/dist/esm/pci-calculator.entry.js +1 -1
- package/dist/esm/public-notification.entry.js +1 -1
- package/dist/esm/refine-results-flow-item.entry.js +1 -1
- package/dist/esm/share-item.entry.js +1 -1
- package/dist/esm/solution-configuration.entry.js +3 -3
- package/dist/esm/solution-contents_3.entry.js +3 -3
- package/dist/esm/solutions-components.js +1 -1
- package/dist/esm/spatial-ref.entry.js +1 -1
- package/dist/solutions-components/assets/t9n/crowdsource-manager/resources.json +5 -1
- package/dist/solutions-components/assets/t9n/crowdsource-manager/resources_en.json +5 -1
- package/dist/solutions-components/assets/t9n/layer-table/resources.json +1 -0
- package/dist/solutions-components/assets/t9n/layer-table/resources_en.json +1 -0
- package/dist/solutions-components/assets/t9n/map-card/resources.json +6 -1
- package/dist/solutions-components/assets/t9n/map-card/resources_en.json +6 -1
- package/dist/solutions-components/demos/crowdsource-manager.html +1 -0
- package/dist/solutions-components/p-0abc1354.entry.js +6 -0
- package/dist/solutions-components/p-0f7b5d36.entry.js +6 -0
- package/dist/solutions-components/p-1867168b.entry.js +6 -0
- package/dist/solutions-components/{p-a9818be2.entry.js → p-20c465e9.entry.js} +1 -1
- package/dist/solutions-components/{p-db18bce8.entry.js → p-36b50b5b.entry.js} +1 -1
- package/dist/solutions-components/{p-85512ae3.entry.js → p-445213cf.entry.js} +1 -1
- package/dist/solutions-components/{p-d49f895d.entry.js → p-4a5f0a97.entry.js} +1 -1
- package/dist/solutions-components/{p-002c97df.entry.js → p-5d201016.entry.js} +1 -1
- package/dist/solutions-components/{p-b7cec3bd.entry.js → p-618bafec.entry.js} +1 -1
- package/dist/solutions-components/p-6a66d5a9.entry.js +6 -0
- package/dist/solutions-components/p-71a2d5b8.entry.js +6 -0
- package/dist/solutions-components/p-7a64b026.entry.js +17 -0
- package/dist/solutions-components/p-85c25564.entry.js +6 -0
- package/dist/solutions-components/{p-235bf02e.entry.js → p-913413c3.entry.js} +1 -1
- package/dist/solutions-components/p-9af1cb14.entry.js +6 -0
- package/dist/solutions-components/{p-49aa2929.entry.js → p-bebd4646.entry.js} +1 -1
- package/dist/solutions-components/{p-ab2adcaf.entry.js → p-cc092b22.entry.js} +1 -1
- package/dist/solutions-components/p-ce454f5a.entry.js +11 -0
- package/dist/solutions-components/solutions-components.esm.js +1 -1
- package/dist/types/components/card-manager/card-manager.d.ts +11 -0
- package/dist/types/components/crowdsource-manager/crowdsource-manager.d.ts +86 -20
- package/dist/types/components/layer-table/layer-table.d.ts +30 -0
- package/dist/types/components/map-card/map-card.d.ts +124 -0
- package/dist/types/components/map-layer-picker/map-layer-picker.d.ts +4 -0
- package/dist/types/components/map-picker/map-picker.d.ts +12 -0
- package/dist/types/components.d.ts +130 -0
- package/dist/types/preact.d.ts +4 -2
- package/package.json +2 -2
- package/dist/cjs/calcite-dropdown-group_2.cjs.entry.js +0 -453
- package/dist/esm/calcite-dropdown-group_2.entry.js +0 -448
- package/dist/solutions-components/p-129fd80e.entry.js +0 -6
- package/dist/solutions-components/p-3b426576.entry.js +0 -6
- package/dist/solutions-components/p-72b217f2.entry.js +0 -6
- package/dist/solutions-components/p-72f01088.entry.js +0 -6
- package/dist/solutions-components/p-8b999a2b.entry.js +0 -6
- package/dist/solutions-components/p-973ff7b2.entry.js +0 -23
- package/dist/solutions-components/p-a001f9c9.entry.js +0 -6
- package/dist/solutions-components/p-c683b3fe.entry.js +0 -6
- package/dist/solutions-components/p-e9d049bd.entry.js +0 -6
@@ -21104,7 +21104,7 @@ const SpatialRef = class {
|
|
21104
21104
|
* Renders the component.
|
21105
21105
|
*/
|
21106
21106
|
render() {
|
21107
|
-
return (index.h(index.Host, { key: '
|
21107
|
+
return (index.h(index.Host, { key: '1f9d7ad0fe2043b7e950a59e6b10e1380c218a11' }, index.h("div", { key: 'f9e14494a1d2783c2d80bbe94d355e397674951b' }, index.h("calcite-input", { key: '3c2565f0c1f0bf8d7a4051969ca3bcb68a9107ce', disabled: this.disabled, id: "calcite-sr-search", onKeyUp: (evt) => this._searchInputKeyDown(evt), placeholder: this._translations.spatialReferencePlaceholder }), index.h("calcite-tree", { key: '7657240c433836340bc0767bb7e9206b75d0691d', id: "calcite-sr-tree", slot: "children" }, this._getTreeContent()))));
|
21108
21108
|
}
|
21109
21109
|
_lastHighlightedSref;
|
21110
21110
|
//--------------------------------------------------------------------------
|
@@ -4,5 +4,9 @@
|
|
4
4
|
"information": "Information",
|
5
5
|
"expandPopup": "Expand pop-up",
|
6
6
|
"collapsePopup": "Collapse pop-up",
|
7
|
-
"view": "View ({{n}})"
|
7
|
+
"view": "View ({{n}})",
|
8
|
+
"splitView": "Split view",
|
9
|
+
"tableView": "Table view",
|
10
|
+
"mapView": "Map view",
|
11
|
+
"filter": "Filter: {{title}}"
|
8
12
|
}
|
@@ -4,5 +4,9 @@
|
|
4
4
|
"information": "Information",
|
5
5
|
"expandPopup": "Expand pop-up",
|
6
6
|
"collapsePopup": "Collapse pop-up",
|
7
|
-
"view": "View ({{n}})"
|
7
|
+
"view": "View ({{n}})",
|
8
|
+
"splitView": "Split view",
|
9
|
+
"tableView": "Table view",
|
10
|
+
"mapView": "Map view",
|
11
|
+
"filter": "Filter: {{title}}"
|
8
12
|
}
|
@@ -29,6 +29,7 @@ export class CardManager {
|
|
29
29
|
this.layer = undefined;
|
30
30
|
this.mapView = undefined;
|
31
31
|
this.zoomAndScrollToSelected = undefined;
|
32
|
+
this.selectedFeaturesIds = undefined;
|
32
33
|
this._cardLoading = false;
|
33
34
|
this._graphics = undefined;
|
34
35
|
this._translations = undefined;
|
@@ -59,12 +60,7 @@ export class CardManager {
|
|
59
60
|
*/
|
60
61
|
async featureSelectionChange(evt) {
|
61
62
|
const ids = evt.detail;
|
62
|
-
this.
|
63
|
-
// only query if we have some ids...query with no ids will result in all features being returned
|
64
|
-
const featureSet = ids.length > 0 ? await queryFeaturesByID(ids, this.layer, [], false, this.mapView.spatialReference) : [];
|
65
|
-
// https://github.com/Esri/solutions-components/issues/365
|
66
|
-
this._graphics = featureSet.sort((a, b) => ids.indexOf(a.getObjectId()) - ids.indexOf(b.getObjectId()));
|
67
|
-
this._cardLoading = false;
|
63
|
+
this._graphics = await this._getFeaturesByIds(ids);
|
68
64
|
}
|
69
65
|
/**
|
70
66
|
* Get the layer view for the provided layer id
|
@@ -85,6 +81,9 @@ export class CardManager {
|
|
85
81
|
*/
|
86
82
|
async componentWillLoad() {
|
87
83
|
await this._getTranslations();
|
84
|
+
if (this.selectedFeaturesIds?.length > 0) {
|
85
|
+
this._graphics = await this._getFeaturesByIds(this.selectedFeaturesIds);
|
86
|
+
}
|
88
87
|
}
|
89
88
|
/**
|
90
89
|
* Renders the component.
|
@@ -92,13 +91,25 @@ export class CardManager {
|
|
92
91
|
render() {
|
93
92
|
const featuresClass = this._graphics?.length > 0 ? "" : "display-none";
|
94
93
|
const messageClass = this._graphics?.length > 0 ? "display-none" : "";
|
95
|
-
return (h(Host, { key: '
|
94
|
+
return (h(Host, { key: '0309205d485d9c7a5c558b3619a6c5ac03fcb528' }, h("div", { key: 'a5d291f6073b0e0a918573549c6eb29fe1d892dd', class: "overflow-auto height-full" }, h("calcite-shell", { key: '572b9cdf002e0c8c46e6c4bc5e2f1f8494228e93', class: "position-relative " + featuresClass }, h("div", { key: 'f8ba07deb9786d64f3d25011ff66ead43d809bf1' }, h("info-card", { key: '6eda3ab2cfa2e5fb948f5a7ddaeb6b9022aa5543', enableEditGeometry: this.enableEditGeometry, graphics: this._graphics, isLoading: this._cardLoading, isMobile: this.isMobile, mapView: this.mapView }))), h("calcite-shell", { key: 'f32d9cfe3a41bbd7d58cdc732c8abe99b232beb7', class: "position-relative " + messageClass }, h("div", { key: 'b97eb023c5d57a4a8dda09467d8599166da40f3c', class: "padding-1" }, h("calcite-notice", { key: '23a204782bd254909e3ab803a944d10004e4954a', icon: "table", open: true }, h("div", { key: 'ea25078647612b8fa40e26b4474a91c853dae126', slot: "message" }, this._translations.selectFeaturesToStart)))))));
|
96
95
|
}
|
97
96
|
//--------------------------------------------------------------------------
|
98
97
|
//
|
99
98
|
// Functions (protected)
|
100
99
|
//
|
101
100
|
//--------------------------------------------------------------------------
|
101
|
+
/**
|
102
|
+
* Gets the Feature using its ids
|
103
|
+
*
|
104
|
+
* @returns Promise when complete
|
105
|
+
* @protected
|
106
|
+
*/
|
107
|
+
async _getFeaturesByIds(ids) {
|
108
|
+
// only query if we have some ids...query with no ids will result in all features being returned
|
109
|
+
const featureSet = ids.length > 0 ? await queryFeaturesByID(ids, this.layer, [], false, this.mapView.spatialReference) : [];
|
110
|
+
// https://github.com/Esri/solutions-components/issues/365
|
111
|
+
return featureSet.sort((a, b) => ids.indexOf(a.getObjectId()) - ids.indexOf(b.getObjectId()));
|
112
|
+
}
|
102
113
|
/**
|
103
114
|
* Fetches the component's translations
|
104
115
|
*
|
@@ -159,7 +170,7 @@ export class CardManager {
|
|
159
170
|
},
|
160
171
|
"layer": {
|
161
172
|
"type": "unknown",
|
162
|
-
"mutable":
|
173
|
+
"mutable": true,
|
163
174
|
"complexType": {
|
164
175
|
"original": "__esri.FeatureLayer",
|
165
176
|
"resolved": "FeatureLayer",
|
@@ -213,6 +224,21 @@ export class CardManager {
|
|
213
224
|
},
|
214
225
|
"attribute": "zoom-and-scroll-to-selected",
|
215
226
|
"reflect": false
|
227
|
+
},
|
228
|
+
"selectedFeaturesIds": {
|
229
|
+
"type": "unknown",
|
230
|
+
"mutable": false,
|
231
|
+
"complexType": {
|
232
|
+
"original": "number[]",
|
233
|
+
"resolved": "number[]",
|
234
|
+
"references": {}
|
235
|
+
},
|
236
|
+
"required": false,
|
237
|
+
"optional": false,
|
238
|
+
"docs": {
|
239
|
+
"tags": [],
|
240
|
+
"text": "A list of ids that are currently selected"
|
241
|
+
}
|
216
242
|
}
|
217
243
|
};
|
218
244
|
}
|
@@ -18,13 +18,13 @@
|
|
18
18
|
* See the License for the specific language governing permissions and
|
19
19
|
* limitations under the License.
|
20
20
|
*/
|
21
|
-
import { Host, h } from "@stencil/core";
|
21
|
+
import { Host, h, Fragment } from "@stencil/core";
|
22
22
|
import { getLocaleComponentStrings } from "../../utils/locale";
|
23
23
|
import { ELayoutMode } from "../../utils/interfaces";
|
24
24
|
import { getLayerOrTable } from "../../utils/mapViewUtils";
|
25
25
|
export class CrowdsourceManager {
|
26
26
|
constructor() {
|
27
|
-
this.appLayout =
|
27
|
+
this.appLayout = 'splitView';
|
28
28
|
this.appProxies = undefined;
|
29
29
|
this.basemapConfig = undefined;
|
30
30
|
this.coverPageEnabled = undefined;
|
@@ -61,7 +61,6 @@ export class CrowdsourceManager {
|
|
61
61
|
this.theme = "light";
|
62
62
|
this.zoomAndScrollToSelected = false;
|
63
63
|
this.zoomToScale = undefined;
|
64
|
-
this._expandPopup = false;
|
65
64
|
this._hideFooter = false;
|
66
65
|
this._hideTable = false;
|
67
66
|
this._isMobile = false;
|
@@ -72,7 +71,7 @@ export class CrowdsourceManager {
|
|
72
71
|
this._mapView = undefined;
|
73
72
|
this._panelOpen = true;
|
74
73
|
this._numSelected = 0;
|
75
|
-
this.
|
74
|
+
this._filterOpen = false;
|
76
75
|
}
|
77
76
|
//--------------------------------------------------------------------------
|
78
77
|
//
|
@@ -116,6 +115,18 @@ export class CrowdsourceManager {
|
|
116
115
|
* MapView.when is not fired when mapView is not currently visible
|
117
116
|
*/
|
118
117
|
_shouldSetMapView = false;
|
118
|
+
/**
|
119
|
+
* LayerExpression[]: All layer expressions from the current filter config for the currently selected layer
|
120
|
+
*/
|
121
|
+
_layerExpressions;
|
122
|
+
/**
|
123
|
+
* HTMLInstantAppsFilterListElement: Component from Instant Apps that supports interacting with the current filter config
|
124
|
+
*/
|
125
|
+
_filterList;
|
126
|
+
/**
|
127
|
+
* boolean: True when app is directly rendered to map view layout
|
128
|
+
*/
|
129
|
+
_isMapViewOnLoad = false;
|
119
130
|
//--------------------------------------------------------------------------
|
120
131
|
//
|
121
132
|
// Watch handlers
|
@@ -132,7 +143,6 @@ export class CrowdsourceManager {
|
|
132
143
|
*/
|
133
144
|
hideMapOnLoadWatchHandler() {
|
134
145
|
this.showHideMapPopupAndTable(this.hideMapOnLoad && !this._isMobile);
|
135
|
-
this._expandPopup = this.hideMapOnLoad && !this._isMobile;
|
136
146
|
}
|
137
147
|
//--------------------------------------------------------------------------
|
138
148
|
//
|
@@ -166,16 +176,6 @@ export class CrowdsourceManager {
|
|
166
176
|
this.showHideMapPopupAndTable(false);
|
167
177
|
}
|
168
178
|
}
|
169
|
-
/**
|
170
|
-
* Listen for idsFound event to be fired so we can know that all layer ids have been fetched
|
171
|
-
*/
|
172
|
-
async idsFound(evt) {
|
173
|
-
const ids = evt.detail;
|
174
|
-
this._tableOnly = ids.tableIds.length > 0 && ids.layerIds.length === 0;
|
175
|
-
if (this._tableOnly) {
|
176
|
-
this._expandPopup = true;
|
177
|
-
}
|
178
|
-
}
|
179
179
|
/**
|
180
180
|
* Listen for layoutChanged event to be fired so we can adjust the layout
|
181
181
|
*/
|
@@ -191,14 +191,6 @@ export class CrowdsourceManager {
|
|
191
191
|
await this._setMapView();
|
192
192
|
});
|
193
193
|
}
|
194
|
-
/**
|
195
|
-
* Listen for beforeMapChanged and minimize the popup if it's expanded
|
196
|
-
*/
|
197
|
-
async beforeMapChanged() {
|
198
|
-
if (this._expandPopup) {
|
199
|
-
this._shouldSetMapView = true;
|
200
|
-
}
|
201
|
-
}
|
202
194
|
/**
|
203
195
|
* Get the layer for the provided layer id
|
204
196
|
*/
|
@@ -207,13 +199,13 @@ export class CrowdsourceManager {
|
|
207
199
|
const layer = await getLayerOrTable(this._mapView, id);
|
208
200
|
await layer.when(() => {
|
209
201
|
this._layer = layer;
|
202
|
+
this._initLayerExpressions();
|
210
203
|
});
|
211
204
|
}
|
212
205
|
/**
|
213
206
|
* Update the state expandPopup when mapInfoChange event occurs
|
214
207
|
*/
|
215
208
|
async mapInfoChange() {
|
216
|
-
this._expandPopup = this.hideMapOnLoad && !this._isMobile;
|
217
209
|
this._hideMapOnLoadHonored = false;
|
218
210
|
}
|
219
211
|
//--------------------------------------------------------------------------
|
@@ -236,7 +228,7 @@ export class CrowdsourceManager {
|
|
236
228
|
render() {
|
237
229
|
// only avoid border when we have a header color that is not white
|
238
230
|
const borderClass = this.popupHeaderColor && this.popupHeaderColor !== "#FFFFFF" ? "border-width-0" : "";
|
239
|
-
return (h(Host, { key: '
|
231
|
+
return (h(Host, { key: 'bbe12b471976652c32fc0cb6277fdfc4171b2cd6' }, h("calcite-shell", { key: '00b85d8e681f5ab021e6efb63b603e3d2442f63c', class: "position-relative" }, h("calcite-panel", { key: 'f1a37f06f3023bb1c63b40eeca739e942c301e63', class: `width-full height-full ${borderClass}` }, this._getBody(this._layoutMode, this._panelOpen, this._hideTable)), this._getFooter()), this._filterModal()));
|
240
232
|
}
|
241
233
|
/**
|
242
234
|
* Called after each render
|
@@ -255,6 +247,12 @@ export class CrowdsourceManager {
|
|
255
247
|
*/
|
256
248
|
async componentDidLoad() {
|
257
249
|
this._resizeObserver.observe(this.el);
|
250
|
+
// for backward compatibility if hidemaponload is true then render table layout as default
|
251
|
+
if (this.hideMapOnLoad) {
|
252
|
+
this.appLayout = 'tableView';
|
253
|
+
}
|
254
|
+
this._isMapViewOnLoad = this.appLayout === 'mapView';
|
255
|
+
this._setActiveLayout(this.appLayout);
|
258
256
|
}
|
259
257
|
//--------------------------------------------------------------------------
|
260
258
|
//
|
@@ -272,6 +270,27 @@ export class CrowdsourceManager {
|
|
272
270
|
const deleteEnabled = this._layer?.editingEnabled && this._layer?.capabilities?.operations?.supportsDelete;
|
273
271
|
return this._isMobile && hasSelectedFeatures && !this._hideFooter ? (h("div", { class: `width-100`, slot: "footer" }, h("div", { class: "display-flex padding-1-2" }, h("calcite-button", { appearance: "solid", id: "solutions-show", onClick: () => this.showHideMapPopupAndTable(true), width: "full" }, this._translations.view.replace("{{n}}", this._numSelected.toString())), deleteEnabled ? (h("delete-button", { class: "padding-inline-start-1 width-full", id: "solutions-delete", ids: this._layerTable.selectedIds, layer: this._layer })) : undefined))) : undefined;
|
274
272
|
}
|
273
|
+
/**
|
274
|
+
* sets the active layout to render
|
275
|
+
* @param appLayout new app layout
|
276
|
+
*
|
277
|
+
* @protected
|
278
|
+
*/
|
279
|
+
_setActiveLayout(appLayout) {
|
280
|
+
//When going to splitView layout the panel should be open
|
281
|
+
if (appLayout === 'splitView' && !this._panelOpen) {
|
282
|
+
this._toggleLayout();
|
283
|
+
}
|
284
|
+
//Move the map node based on the selected layout
|
285
|
+
//for mapView layout show map in full view and or all other layout show in the card view
|
286
|
+
//for tableView the map will be hidden using css
|
287
|
+
if (appLayout === 'mapView') {
|
288
|
+
this._showMapInFullView();
|
289
|
+
}
|
290
|
+
else {
|
291
|
+
this._showMapInCardView();
|
292
|
+
}
|
293
|
+
}
|
275
294
|
/**
|
276
295
|
* Get the icon name to use for the divider icon based on the current layout
|
277
296
|
*
|
@@ -397,8 +416,11 @@ export class CrowdsourceManager {
|
|
397
416
|
* @protected
|
398
417
|
*/
|
399
418
|
_getMapNode(panelOpen) {
|
400
|
-
const
|
401
|
-
|
419
|
+
const isMapLayout = this.appLayout === 'mapView';
|
420
|
+
const isTableLayout = this.appLayout === 'tableView';
|
421
|
+
const mapContainerClass = (isMapLayout || isTableLayout) ? "position-absolute-0" : this._layoutMode === ELayoutMode.HORIZONTAL && (!this._isMobile || panelOpen) ? "" : "adjusted-height-50";
|
422
|
+
const hasMapAndLayer = this.defaultWebmap && this.defaultLayer;
|
423
|
+
return (h("div", { class: `${mapContainerClass} overflow-hidden`, id: "card-mapView" }, h("map-card", { appProxies: this.appProxies, basemapConfig: this.basemapConfig, class: "width-full", defaultLayerId: hasMapAndLayer ? this.defaultLayer : "", defaultWebmapId: this.defaultWebmap, enableBasemap: this.enableBasemap, enableFloorFilter: this.enableFloorFilter, enableFullscreen: this.enableFullscreen, enableHome: this.enableHome, enableLegend: this.enableLegend, enableSearch: this.enableSearch, enableSingleExpand: true, hidden: !this._isMobile && isTableLayout, homeZoomIndex: 3, homeZoomPosition: "top-left", homeZoomToolsSize: "s", isMapLayout: isMapLayout, isMobile: this._isMobile, mapInfo: this._mapInfo, mapInfos: this.mapInfos?.filter(mapInfo => mapInfo.visible !== false), mapWidgetsIndex: 0, mapWidgetsPosition: "top-right", mapWidgetsSize: "m", onToggleFilter: this._toggleFilter.bind(this), onlyShowUpdatableLayers: this.onlyShowUpdatableLayers, selectedFeaturesIds: this._layerTable?.selectedIds, selectedLayer: this._layer, stackTools: true, theme: this.theme, toolOrder: ["legend", "search", "fullscreen", "basemap", "floorfilter"], zoomToScale: this.zoomToScale })));
|
402
424
|
}
|
403
425
|
/**
|
404
426
|
* Get the expand node for the popup information
|
@@ -407,11 +429,7 @@ export class CrowdsourceManager {
|
|
407
429
|
* @protected
|
408
430
|
*/
|
409
431
|
_getPopupExpandNode() {
|
410
|
-
const
|
411
|
-
const id = "expand-popup";
|
412
|
-
const tooltip = this._expandPopup ? this._translations.collapsePopup : this._translations.expandPopup;
|
413
|
-
const themeClass = this.theme === "dark" ? "calcite-mode-dark" : "calcite-mode-light";
|
414
|
-
const popupNodeClass = !this._expandPopup ? "height-full" : this.mapInfos?.length === 1 || this._isMobile ? "position-absolute-0" : "position-absolute-50";
|
432
|
+
const popupNodeClass = "height-full";
|
415
433
|
const headerClass = this._isMobile ? "display-none height-0" : "";
|
416
434
|
const headerTheme = this.popupHeaderColor ? "" : !this._isMobile ? "calcite-mode-dark" : "calcite-mode-light";
|
417
435
|
const containerClass = this._isMobile && this._hideTable ? "position-absolute-0 width-full height-full" : this._isMobile ? "display-none height-0" : "";
|
@@ -420,16 +438,7 @@ export class CrowdsourceManager {
|
|
420
438
|
'--calcite-color-foreground-2': this.popupHeaderHoverColor, /* background color that will be displayed on button when hovered */
|
421
439
|
'--calcite-color-text-3': this.popupHeaderTextColor, /* font color that will be displayed on button */
|
422
440
|
'--calcite-color-text-2': this.popupHeaderTextColor, /* font color that will be displayed on popup header text*/
|
423
|
-
} }, h("calcite-panel", null, !this._isMobile ? (h("div", { class: `display-flex align-items-center ${headerClass}`, slot: "header-content" }, h("calcite-icon", { icon: "information", scale: "s" }), h("div", { class: "padding-inline-start-75" }, this._translations.information))) : undefined,
|
424
|
-
}
|
425
|
-
/**
|
426
|
-
* Toggle the popup information
|
427
|
-
*
|
428
|
-
* @protected
|
429
|
-
*/
|
430
|
-
_togglePopup() {
|
431
|
-
this._expandPopup = !this._expandPopup;
|
432
|
-
this._hideMapOnLoadHonored = true;
|
441
|
+
} }, h("calcite-panel", null, !this._isMobile ? (h("div", { class: `display-flex align-items-center ${headerClass}`, slot: "header-content" }, h("calcite-icon", { icon: "information", scale: "s" }), h("div", { class: "padding-inline-start-75" }, this._translations.information))) : undefined, this._getCardNode())));
|
433
442
|
}
|
434
443
|
/**
|
435
444
|
* Get the card node
|
@@ -438,9 +447,11 @@ export class CrowdsourceManager {
|
|
438
447
|
* @protected
|
439
448
|
*/
|
440
449
|
_getCardNode() {
|
441
|
-
const
|
450
|
+
const isMapLayout = this.appLayout === 'mapView';
|
451
|
+
const isTableLayout = this.appLayout === 'tableView';
|
452
|
+
const cardManagerHeight = (isMapLayout || isTableLayout) ? "height-full" : !this._isMobile ? "height-50" : "height-full";
|
442
453
|
const themeClass = this.theme === "dark" ? "calcite-mode-dark" : "calcite-mode-light";
|
443
|
-
return (h("div", { class: `width-50 height-full ${themeClass}` }, h("card-manager", { class: `${cardManagerHeight} width-full`, enableEditGeometry: this?._mapInfo?.enableEditGeometry, isMobile: this._isMobile, mapView: this?._mapView, zoomAndScrollToSelected: this.zoomAndScrollToSelected })));
|
454
|
+
return (h("div", { class: `width-50 height-full ${themeClass}` }, h("card-manager", { class: `${cardManagerHeight} width-full`, enableEditGeometry: this?._mapInfo?.enableEditGeometry, isMobile: this._isMobile, layer: this._layer, mapView: this?._mapView, selectedFeaturesIds: this._layerTable?.selectedIds, zoomAndScrollToSelected: this.zoomAndScrollToSelected })));
|
444
455
|
}
|
445
456
|
/**
|
446
457
|
* Get the table node based for the current layout
|
@@ -452,11 +463,11 @@ export class CrowdsourceManager {
|
|
452
463
|
* @protected
|
453
464
|
*/
|
454
465
|
_getTable(layoutMode, panelOpen, hideTable) {
|
455
|
-
const
|
466
|
+
const isMapLayout = this.appLayout === 'mapView';
|
467
|
+
const isTableLayout = this.appLayout === 'tableView';
|
468
|
+
const tableClass = hideTable && this._isMobile ? "visibility-hidden" : isMapLayout ? "display-none" : "";
|
469
|
+
const mapClass = isMapLayout ? "height-full width-full" : "display-none";
|
456
470
|
const tableSizeClass = this._getTableSizeClass(layoutMode, panelOpen);
|
457
|
-
const icon = this._getDividerIcon(layoutMode, panelOpen);
|
458
|
-
const tooltip = panelOpen ? this._translations.close : this._translations.open;
|
459
|
-
const id = "toggle-layout";
|
460
471
|
const toggleLayout = layoutMode === ELayoutMode.HORIZONTAL ? "horizontal" : "vertical";
|
461
472
|
const toggleSlot = layoutMode === ELayoutMode.HORIZONTAL ? "header" : "panel-start";
|
462
473
|
const hasMapAndLayer = this.defaultWebmap && this.defaultLayer;
|
@@ -464,10 +475,74 @@ export class CrowdsourceManager {
|
|
464
475
|
this.defaultGlobalId?.indexOf(",") > -1 ? this.defaultGlobalId.split(",") : [this.defaultGlobalId];
|
465
476
|
const defaultOid = !this.defaultOid ? undefined :
|
466
477
|
this.defaultOid?.indexOf(",") > -1 ? this.defaultOid.split(",").map(o => parseInt(o, 10)) : [parseInt(this.defaultOid, 10)];
|
467
|
-
return (h("calcite-shell", { class: `${tableSizeClass}
|
478
|
+
return (h("calcite-shell", { class: `${tableSizeClass} border-bottom` }, !this._isMobile ? (h("calcite-action-bar", { class: "border-sides", expandDisabled: true, layout: toggleLayout, slot: toggleSlot }, this.getActions(layoutMode, panelOpen))) : undefined, h("div", { class: `width-full height-full position-relative ${tableClass}` }, h("layer-table", { createFilterModal: false, defaultGlobalId: hasMapAndLayer ? globalId : undefined, defaultLayerId: hasMapAndLayer ? this.defaultLayer : "", defaultOid: hasMapAndLayer && !globalId ? defaultOid : undefined, enableAutoRefresh: this.enableAutoRefresh, enableCSV: this.enableCSV, enableColumnReorder: this.enableColumnReorder, enableInlineEdit: this?._mapInfo?.enableInlineEdit, enableShare: this.enableShare, isMobile: this._isMobile, mapHidden: isTableLayout, mapInfo: this._mapInfo, mapView: this?._mapView, onToggleFilter: this._toggleFilter.bind(this), onlyShowUpdatableLayers: this.onlyShowUpdatableLayers, ref: (el) => this._layerTable = el, shareIncludeEmbed: this.shareIncludeEmbed, shareIncludeSocial: this.shareIncludeSocial, showNewestFirst: this.showNewestFirst, zoomAndScrollToSelected: this.zoomAndScrollToSelected, zoomToScale: this.zoomToScale })), h("div", { class: mapClass, id: "full-map-view" })));
|
479
|
+
}
|
480
|
+
/**
|
481
|
+
* Returns the Actions for table's node
|
482
|
+
*
|
483
|
+
* @returns Node
|
484
|
+
* @protected
|
485
|
+
*/
|
486
|
+
getActions(layoutMode, panelOpen) {
|
487
|
+
const icon = this._getDividerIcon(layoutMode, panelOpen);
|
488
|
+
const tooltip = panelOpen ? this._translations.close : this._translations.open;
|
489
|
+
const id = "toggle-layout";
|
490
|
+
return (h(Fragment, null, h("calcite-action", { active: this.appLayout === 'splitView', class: "toggle-node", icon: "browser", id: "browser-action", onClick: () => { this._changeLayout('splitView'); }, text: "" }), h("calcite-tooltip", { placement: "right", "reference-element": "browser-action" }, h("span", null, this._translations.splitView)), h("calcite-action", { active: this.appLayout === 'tableView', class: "toggle-node", icon: "dock-left", id: "dock-left-action", onClick: () => { this._changeLayout('tableView'); }, text: "" }), h("calcite-tooltip", { placement: "right", "reference-element": "dock-left-action" }, h("span", null, this._translations.tableView)), h("calcite-action", { active: this.appLayout === 'mapView', class: "toggle-node", icon: "browser-map", id: "browser-map-action", onClick: () => { this._changeLayout('mapView'); }, text: "" }), h("calcite-tooltip", { placement: "right", "reference-element": "browser-map-action" }, h("span", null, this._translations.mapView)), h("calcite-action", { class: "toggle-node", icon: icon, id: id, onClick: () => this._toggleLayout(), slot: "actions-end", text: "" }), h("calcite-tooltip", { placement: "bottom", "reference-element": id }, h("span", null, tooltip))));
|
491
|
+
}
|
492
|
+
/**
|
493
|
+
* Show filter component in modal
|
494
|
+
*
|
495
|
+
* @returns node to interact with any configured filters for the current layer
|
496
|
+
* @protected
|
497
|
+
*/
|
498
|
+
_filterModal() {
|
499
|
+
return (h("calcite-modal", { "aria-labelledby": "modal-title", class: "modal", kind: "brand", onCalciteModalClose: () => void this._closeFilter(), open: this._filterOpen, widthScale: "s" }, h("div", { class: "display-flex align-center", id: "modal-title", slot: "header" }, this._translations?.filter?.replace("{{title}}", this._layer?.title)), h("div", { slot: "content" }, h("instant-apps-filter-list", { autoUpdateUrl: false, closeBtn: true, closeBtnOnClick: async () => this._closeFilter(), comboboxOverlayPositioning: "fixed", layerExpressions: this._layerExpressions, onFilterListReset: () => this._handleFilterListReset(), onFilterUpdate: () => void this._layerTable?.filterUpdate(), ref: (el) => this._filterList = el, view: this._mapView, zoomBtn: false }))));
|
500
|
+
}
|
501
|
+
/**
|
502
|
+
* Store any filters for the current layer.
|
503
|
+
* Should only occur on layer change
|
504
|
+
*
|
505
|
+
* @protected
|
506
|
+
*/
|
507
|
+
_initLayerExpressions() {
|
508
|
+
const layerExpressions = this._mapInfo?.filterConfig?.layerExpressions;
|
509
|
+
this._layerExpressions = layerExpressions ? layerExpressions.filter((exp) => exp.id === this._layer?.id) : [];
|
510
|
+
this._filterList.layerExpressions = this._layerExpressions;
|
511
|
+
this._layerExpressions.filter(lyrExp => {
|
512
|
+
return lyrExp.expressions.filter(exp => exp.active).length > 0;
|
513
|
+
}).length > 0;
|
514
|
+
}
|
515
|
+
/**
|
516
|
+
* Toggle the filter modal
|
517
|
+
*
|
518
|
+
* @protected
|
519
|
+
*/
|
520
|
+
_toggleFilter() {
|
521
|
+
this._filterOpen = !this._filterOpen;
|
522
|
+
}
|
523
|
+
/**
|
524
|
+
* Reset the filter active prop
|
525
|
+
*
|
526
|
+
* @protected
|
527
|
+
*/
|
528
|
+
_handleFilterListReset() {
|
529
|
+
void this._layerTable.filterReset();
|
530
|
+
}
|
531
|
+
/**
|
532
|
+
* Close the filter modal
|
533
|
+
*
|
534
|
+
* @protected
|
535
|
+
*/
|
536
|
+
async _closeFilter() {
|
537
|
+
if (this._filterOpen) {
|
538
|
+
this._filterOpen = false;
|
539
|
+
void this._layerTable.closeFilter();
|
540
|
+
}
|
468
541
|
}
|
469
542
|
/**
|
470
543
|
* Update the component layout when its size changes
|
544
|
+
*
|
545
|
+
* @protected
|
471
546
|
*/
|
472
547
|
_onResize() {
|
473
548
|
const isMobile = this.el.offsetWidth < 1024;
|
@@ -484,22 +559,67 @@ export class CrowdsourceManager {
|
|
484
559
|
/**
|
485
560
|
* Open/Close the appropriate panel.
|
486
561
|
* The panel that is toggled is dependent upon the layout mode and if using classic grid or not
|
562
|
+
*
|
563
|
+
* @protected
|
487
564
|
*/
|
488
565
|
_toggleLayout() {
|
489
566
|
this._panelOpen = !this._panelOpen;
|
490
567
|
}
|
568
|
+
/**
|
569
|
+
* Changes the layout mode
|
570
|
+
* @param appLayout selected active app layout
|
571
|
+
*
|
572
|
+
* @protected
|
573
|
+
*/
|
574
|
+
_changeLayout(appLayout) {
|
575
|
+
if (this.appLayout !== appLayout) {
|
576
|
+
this._setActiveLayout(appLayout);
|
577
|
+
this.appLayout = appLayout;
|
578
|
+
if (this._isMapViewOnLoad) {
|
579
|
+
void this._layerTable.refresh();
|
580
|
+
this._isMapViewOnLoad = false;
|
581
|
+
}
|
582
|
+
}
|
583
|
+
}
|
584
|
+
/**
|
585
|
+
* shows the map in card view
|
586
|
+
*
|
587
|
+
* @protected
|
588
|
+
*/
|
589
|
+
_showMapInCardView() {
|
590
|
+
if (this.appLayout === 'mapView') {
|
591
|
+
const fullMapView = document.getElementById('full-map-view').childNodes[0];
|
592
|
+
const splitMapClass = document.getElementById('card-mapView');
|
593
|
+
if (fullMapView) {
|
594
|
+
splitMapClass.appendChild(fullMapView);
|
595
|
+
}
|
596
|
+
}
|
597
|
+
}
|
598
|
+
/**
|
599
|
+
* Shows the map in full view
|
600
|
+
*
|
601
|
+
* @protected
|
602
|
+
*/
|
603
|
+
_showMapInFullView() {
|
604
|
+
const splitMap = document.getElementById('card-mapView').childNodes[0];
|
605
|
+
const fullMapViewClass = document.getElementById('full-map-view');
|
606
|
+
if (splitMap) {
|
607
|
+
fullMapViewClass.appendChild(splitMap);
|
608
|
+
}
|
609
|
+
}
|
491
610
|
/**
|
492
611
|
* Show/Hide the map, popup, and table
|
493
612
|
*
|
494
613
|
* @param show when true the map, popup, and table will be displayed
|
614
|
+
* @protected
|
495
615
|
*/
|
496
616
|
showHideMapPopupAndTable(show) {
|
497
|
-
this._expandPopup = false;
|
498
617
|
this._hideTable = show;
|
499
618
|
this._hideFooter = show;
|
500
619
|
}
|
501
620
|
/**
|
502
621
|
* Get the current map info (configuration details) when maps change
|
622
|
+
* @param id map changed id
|
503
623
|
*
|
504
624
|
* @returns IMapInfo for the provided id
|
505
625
|
* @protected
|
@@ -598,7 +718,8 @@ export class CrowdsourceManager {
|
|
598
718
|
"text": "AppLayout: The type of layout the application should use.\r\nValid values: \"mapView\" or \"tableView\" or \"splitView\""
|
599
719
|
},
|
600
720
|
"attribute": "app-layout",
|
601
|
-
"reflect": false
|
721
|
+
"reflect": false,
|
722
|
+
"defaultValue": "'splitView'"
|
602
723
|
},
|
603
724
|
"appProxies": {
|
604
725
|
"type": "any",
|
@@ -1259,7 +1380,6 @@ export class CrowdsourceManager {
|
|
1259
1380
|
}
|
1260
1381
|
static get states() {
|
1261
1382
|
return {
|
1262
|
-
"_expandPopup": {},
|
1263
1383
|
"_hideFooter": {},
|
1264
1384
|
"_hideTable": {},
|
1265
1385
|
"_isMobile": {},
|
@@ -1270,7 +1390,7 @@ export class CrowdsourceManager {
|
|
1270
1390
|
"_mapView": {},
|
1271
1391
|
"_panelOpen": {},
|
1272
1392
|
"_numSelected": {},
|
1273
|
-
"
|
1393
|
+
"_filterOpen": {}
|
1274
1394
|
};
|
1275
1395
|
}
|
1276
1396
|
static get events() {
|
@@ -1329,12 +1449,6 @@ export class CrowdsourceManager {
|
|
1329
1449
|
"target": "window",
|
1330
1450
|
"capture": false,
|
1331
1451
|
"passive": false
|
1332
|
-
}, {
|
1333
|
-
"name": "idsFound",
|
1334
|
-
"method": "idsFound",
|
1335
|
-
"target": "window",
|
1336
|
-
"capture": false,
|
1337
|
-
"passive": false
|
1338
1452
|
}, {
|
1339
1453
|
"name": "layoutChanged",
|
1340
1454
|
"method": "layoutChanged",
|
@@ -1347,12 +1461,6 @@ export class CrowdsourceManager {
|
|
1347
1461
|
"target": "window",
|
1348
1462
|
"capture": false,
|
1349
1463
|
"passive": false
|
1350
|
-
}, {
|
1351
|
-
"name": "beforeMapChanged",
|
1352
|
-
"method": "beforeMapChanged",
|
1353
|
-
"target": "window",
|
1354
|
-
"capture": false,
|
1355
|
-
"passive": false
|
1356
1464
|
}, {
|
1357
1465
|
"name": "layerSelectionChange",
|
1358
1466
|
"method": "layerSelectionChange",
|