@esri/solutions-components 0.10.6 → 0.10.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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
@@ -22,7 +22,7 @@ const CrowdsourceManager = class {
|
|
22
22
|
index.registerInstance(this, hostRef);
|
23
23
|
this.showIntroductionWindow = index.createEvent(this, "showIntroductionWindow", 7);
|
24
24
|
this.showCoverPage = index.createEvent(this, "showCoverPage", 7);
|
25
|
-
this.appLayout =
|
25
|
+
this.appLayout = 'splitView';
|
26
26
|
this.appProxies = undefined;
|
27
27
|
this.basemapConfig = undefined;
|
28
28
|
this.coverPageEnabled = undefined;
|
@@ -59,7 +59,6 @@ const CrowdsourceManager = class {
|
|
59
59
|
this.theme = "light";
|
60
60
|
this.zoomAndScrollToSelected = false;
|
61
61
|
this.zoomToScale = undefined;
|
62
|
-
this._expandPopup = false;
|
63
62
|
this._hideFooter = false;
|
64
63
|
this._hideTable = false;
|
65
64
|
this._isMobile = false;
|
@@ -70,7 +69,7 @@ const CrowdsourceManager = class {
|
|
70
69
|
this._mapView = undefined;
|
71
70
|
this._panelOpen = true;
|
72
71
|
this._numSelected = 0;
|
73
|
-
this.
|
72
|
+
this._filterOpen = false;
|
74
73
|
}
|
75
74
|
get el() { return index.getElement(this); }
|
76
75
|
//--------------------------------------------------------------------------
|
@@ -109,6 +108,18 @@ const CrowdsourceManager = class {
|
|
109
108
|
* MapView.when is not fired when mapView is not currently visible
|
110
109
|
*/
|
111
110
|
_shouldSetMapView = false;
|
111
|
+
/**
|
112
|
+
* LayerExpression[]: All layer expressions from the current filter config for the currently selected layer
|
113
|
+
*/
|
114
|
+
_layerExpressions;
|
115
|
+
/**
|
116
|
+
* HTMLInstantAppsFilterListElement: Component from Instant Apps that supports interacting with the current filter config
|
117
|
+
*/
|
118
|
+
_filterList;
|
119
|
+
/**
|
120
|
+
* boolean: True when app is directly rendered to map view layout
|
121
|
+
*/
|
122
|
+
_isMapViewOnLoad = false;
|
112
123
|
//--------------------------------------------------------------------------
|
113
124
|
//
|
114
125
|
// Watch handlers
|
@@ -125,7 +136,6 @@ const CrowdsourceManager = class {
|
|
125
136
|
*/
|
126
137
|
hideMapOnLoadWatchHandler() {
|
127
138
|
this.showHideMapPopupAndTable(this.hideMapOnLoad && !this._isMobile);
|
128
|
-
this._expandPopup = this.hideMapOnLoad && !this._isMobile;
|
129
139
|
}
|
130
140
|
//--------------------------------------------------------------------------
|
131
141
|
//
|
@@ -159,16 +169,6 @@ const CrowdsourceManager = class {
|
|
159
169
|
this.showHideMapPopupAndTable(false);
|
160
170
|
}
|
161
171
|
}
|
162
|
-
/**
|
163
|
-
* Listen for idsFound event to be fired so we can know that all layer ids have been fetched
|
164
|
-
*/
|
165
|
-
async idsFound(evt) {
|
166
|
-
const ids = evt.detail;
|
167
|
-
this._tableOnly = ids.tableIds.length > 0 && ids.layerIds.length === 0;
|
168
|
-
if (this._tableOnly) {
|
169
|
-
this._expandPopup = true;
|
170
|
-
}
|
171
|
-
}
|
172
172
|
/**
|
173
173
|
* Listen for layoutChanged event to be fired so we can adjust the layout
|
174
174
|
*/
|
@@ -184,14 +184,6 @@ const CrowdsourceManager = class {
|
|
184
184
|
await this._setMapView();
|
185
185
|
});
|
186
186
|
}
|
187
|
-
/**
|
188
|
-
* Listen for beforeMapChanged and minimize the popup if it's expanded
|
189
|
-
*/
|
190
|
-
async beforeMapChanged() {
|
191
|
-
if (this._expandPopup) {
|
192
|
-
this._shouldSetMapView = true;
|
193
|
-
}
|
194
|
-
}
|
195
187
|
/**
|
196
188
|
* Get the layer for the provided layer id
|
197
189
|
*/
|
@@ -200,13 +192,13 @@ const CrowdsourceManager = class {
|
|
200
192
|
const layer = await mapViewUtils.getLayerOrTable(this._mapView, id);
|
201
193
|
await layer.when(() => {
|
202
194
|
this._layer = layer;
|
195
|
+
this._initLayerExpressions();
|
203
196
|
});
|
204
197
|
}
|
205
198
|
/**
|
206
199
|
* Update the state expandPopup when mapInfoChange event occurs
|
207
200
|
*/
|
208
201
|
async mapInfoChange() {
|
209
|
-
this._expandPopup = this.hideMapOnLoad && !this._isMobile;
|
210
202
|
this._hideMapOnLoadHonored = false;
|
211
203
|
}
|
212
204
|
//--------------------------------------------------------------------------
|
@@ -229,7 +221,7 @@ const CrowdsourceManager = class {
|
|
229
221
|
render() {
|
230
222
|
// only avoid border when we have a header color that is not white
|
231
223
|
const borderClass = this.popupHeaderColor && this.popupHeaderColor !== "#FFFFFF" ? "border-width-0" : "";
|
232
|
-
return (index.h(index.Host, { key: '
|
224
|
+
return (index.h(index.Host, { key: 'bbe12b471976652c32fc0cb6277fdfc4171b2cd6' }, index.h("calcite-shell", { key: '00b85d8e681f5ab021e6efb63b603e3d2442f63c', class: "position-relative" }, index.h("calcite-panel", { key: 'f1a37f06f3023bb1c63b40eeca739e942c301e63', class: `width-full height-full ${borderClass}` }, this._getBody(this._layoutMode, this._panelOpen, this._hideTable)), this._getFooter()), this._filterModal()));
|
233
225
|
}
|
234
226
|
/**
|
235
227
|
* Called after each render
|
@@ -248,6 +240,12 @@ const CrowdsourceManager = class {
|
|
248
240
|
*/
|
249
241
|
async componentDidLoad() {
|
250
242
|
this._resizeObserver.observe(this.el);
|
243
|
+
// for backward compatibility if hidemaponload is true then render table layout as default
|
244
|
+
if (this.hideMapOnLoad) {
|
245
|
+
this.appLayout = 'tableView';
|
246
|
+
}
|
247
|
+
this._isMapViewOnLoad = this.appLayout === 'mapView';
|
248
|
+
this._setActiveLayout(this.appLayout);
|
251
249
|
}
|
252
250
|
//--------------------------------------------------------------------------
|
253
251
|
//
|
@@ -265,6 +263,27 @@ const CrowdsourceManager = class {
|
|
265
263
|
const deleteEnabled = this._layer?.editingEnabled && this._layer?.capabilities?.operations?.supportsDelete;
|
266
264
|
return this._isMobile && hasSelectedFeatures && !this._hideFooter ? (index.h("div", { class: `width-100`, slot: "footer" }, index.h("div", { class: "display-flex padding-1-2" }, index.h("calcite-button", { appearance: "solid", id: "solutions-show", onClick: () => this.showHideMapPopupAndTable(true), width: "full" }, this._translations.view.replace("{{n}}", this._numSelected.toString())), deleteEnabled ? (index.h("delete-button", { class: "padding-inline-start-1 width-full", id: "solutions-delete", ids: this._layerTable.selectedIds, layer: this._layer })) : undefined))) : undefined;
|
267
265
|
}
|
266
|
+
/**
|
267
|
+
* sets the active layout to render
|
268
|
+
* @param appLayout new app layout
|
269
|
+
*
|
270
|
+
* @protected
|
271
|
+
*/
|
272
|
+
_setActiveLayout(appLayout) {
|
273
|
+
//When going to splitView layout the panel should be open
|
274
|
+
if (appLayout === 'splitView' && !this._panelOpen) {
|
275
|
+
this._toggleLayout();
|
276
|
+
}
|
277
|
+
//Move the map node based on the selected layout
|
278
|
+
//for mapView layout show map in full view and or all other layout show in the card view
|
279
|
+
//for tableView the map will be hidden using css
|
280
|
+
if (appLayout === 'mapView') {
|
281
|
+
this._showMapInFullView();
|
282
|
+
}
|
283
|
+
else {
|
284
|
+
this._showMapInCardView();
|
285
|
+
}
|
286
|
+
}
|
268
287
|
/**
|
269
288
|
* Get the icon name to use for the divider icon based on the current layout
|
270
289
|
*
|
@@ -390,8 +409,11 @@ const CrowdsourceManager = class {
|
|
390
409
|
* @protected
|
391
410
|
*/
|
392
411
|
_getMapNode(panelOpen) {
|
393
|
-
const
|
394
|
-
|
412
|
+
const isMapLayout = this.appLayout === 'mapView';
|
413
|
+
const isTableLayout = this.appLayout === 'tableView';
|
414
|
+
const mapContainerClass = (isMapLayout || isTableLayout) ? "position-absolute-0" : this._layoutMode === interfaces.ELayoutMode.HORIZONTAL && (!this._isMobile || panelOpen) ? "" : "adjusted-height-50";
|
415
|
+
const hasMapAndLayer = this.defaultWebmap && this.defaultLayer;
|
416
|
+
return (index.h("div", { class: `${mapContainerClass} overflow-hidden`, id: "card-mapView" }, index.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 })));
|
395
417
|
}
|
396
418
|
/**
|
397
419
|
* Get the expand node for the popup information
|
@@ -400,11 +422,7 @@ const CrowdsourceManager = class {
|
|
400
422
|
* @protected
|
401
423
|
*/
|
402
424
|
_getPopupExpandNode() {
|
403
|
-
const
|
404
|
-
const id = "expand-popup";
|
405
|
-
const tooltip = this._expandPopup ? this._translations.collapsePopup : this._translations.expandPopup;
|
406
|
-
const themeClass = this.theme === "dark" ? "calcite-mode-dark" : "calcite-mode-light";
|
407
|
-
const popupNodeClass = !this._expandPopup ? "height-full" : this.mapInfos?.length === 1 || this._isMobile ? "position-absolute-0" : "position-absolute-50";
|
425
|
+
const popupNodeClass = "height-full";
|
408
426
|
const headerClass = this._isMobile ? "display-none height-0" : "";
|
409
427
|
const headerTheme = this.popupHeaderColor ? "" : !this._isMobile ? "calcite-mode-dark" : "calcite-mode-light";
|
410
428
|
const containerClass = this._isMobile && this._hideTable ? "position-absolute-0 width-full height-full" : this._isMobile ? "display-none height-0" : "";
|
@@ -413,16 +431,7 @@ const CrowdsourceManager = class {
|
|
413
431
|
'--calcite-color-foreground-2': this.popupHeaderHoverColor, /* background color that will be displayed on button when hovered */
|
414
432
|
'--calcite-color-text-3': this.popupHeaderTextColor, /* font color that will be displayed on button */
|
415
433
|
'--calcite-color-text-2': this.popupHeaderTextColor, /* font color that will be displayed on popup header text*/
|
416
|
-
} }, index.h("calcite-panel", null, !this._isMobile ? (index.h("div", { class: `display-flex align-items-center ${headerClass}`, slot: "header-content" }, index.h("calcite-icon", { icon: "information", scale: "s" }), index.h("div", { class: "padding-inline-start-75" }, this._translations.information))) : undefined,
|
417
|
-
}
|
418
|
-
/**
|
419
|
-
* Toggle the popup information
|
420
|
-
*
|
421
|
-
* @protected
|
422
|
-
*/
|
423
|
-
_togglePopup() {
|
424
|
-
this._expandPopup = !this._expandPopup;
|
425
|
-
this._hideMapOnLoadHonored = true;
|
434
|
+
} }, index.h("calcite-panel", null, !this._isMobile ? (index.h("div", { class: `display-flex align-items-center ${headerClass}`, slot: "header-content" }, index.h("calcite-icon", { icon: "information", scale: "s" }), index.h("div", { class: "padding-inline-start-75" }, this._translations.information))) : undefined, this._getCardNode())));
|
426
435
|
}
|
427
436
|
/**
|
428
437
|
* Get the card node
|
@@ -431,9 +440,11 @@ const CrowdsourceManager = class {
|
|
431
440
|
* @protected
|
432
441
|
*/
|
433
442
|
_getCardNode() {
|
434
|
-
const
|
443
|
+
const isMapLayout = this.appLayout === 'mapView';
|
444
|
+
const isTableLayout = this.appLayout === 'tableView';
|
445
|
+
const cardManagerHeight = (isMapLayout || isTableLayout) ? "height-full" : !this._isMobile ? "height-50" : "height-full";
|
435
446
|
const themeClass = this.theme === "dark" ? "calcite-mode-dark" : "calcite-mode-light";
|
436
|
-
return (index.h("div", { class: `width-50 height-full ${themeClass}` }, index.h("card-manager", { class: `${cardManagerHeight} width-full`, enableEditGeometry: this?._mapInfo?.enableEditGeometry, isMobile: this._isMobile, mapView: this?._mapView, zoomAndScrollToSelected: this.zoomAndScrollToSelected })));
|
447
|
+
return (index.h("div", { class: `width-50 height-full ${themeClass}` }, index.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 })));
|
437
448
|
}
|
438
449
|
/**
|
439
450
|
* Get the table node based for the current layout
|
@@ -445,11 +456,11 @@ const CrowdsourceManager = class {
|
|
445
456
|
* @protected
|
446
457
|
*/
|
447
458
|
_getTable(layoutMode, panelOpen, hideTable) {
|
448
|
-
const
|
459
|
+
const isMapLayout = this.appLayout === 'mapView';
|
460
|
+
const isTableLayout = this.appLayout === 'tableView';
|
461
|
+
const tableClass = hideTable && this._isMobile ? "visibility-hidden" : isMapLayout ? "display-none" : "";
|
462
|
+
const mapClass = isMapLayout ? "height-full width-full" : "display-none";
|
449
463
|
const tableSizeClass = this._getTableSizeClass(layoutMode, panelOpen);
|
450
|
-
const icon = this._getDividerIcon(layoutMode, panelOpen);
|
451
|
-
const tooltip = panelOpen ? this._translations.close : this._translations.open;
|
452
|
-
const id = "toggle-layout";
|
453
464
|
const toggleLayout = layoutMode === interfaces.ELayoutMode.HORIZONTAL ? "horizontal" : "vertical";
|
454
465
|
const toggleSlot = layoutMode === interfaces.ELayoutMode.HORIZONTAL ? "header" : "panel-start";
|
455
466
|
const hasMapAndLayer = this.defaultWebmap && this.defaultLayer;
|
@@ -457,10 +468,74 @@ const CrowdsourceManager = class {
|
|
457
468
|
this.defaultGlobalId?.indexOf(",") > -1 ? this.defaultGlobalId.split(",") : [this.defaultGlobalId];
|
458
469
|
const defaultOid = !this.defaultOid ? undefined :
|
459
470
|
this.defaultOid?.indexOf(",") > -1 ? this.defaultOid.split(",").map(o => parseInt(o, 10)) : [parseInt(this.defaultOid, 10)];
|
460
|
-
return (index.h("calcite-shell", { class: `${tableSizeClass}
|
471
|
+
return (index.h("calcite-shell", { class: `${tableSizeClass} border-bottom` }, !this._isMobile ? (index.h("calcite-action-bar", { class: "border-sides", expandDisabled: true, layout: toggleLayout, slot: toggleSlot }, this.getActions(layoutMode, panelOpen))) : undefined, index.h("div", { class: `width-full height-full position-relative ${tableClass}` }, index.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 })), index.h("div", { class: mapClass, id: "full-map-view" })));
|
472
|
+
}
|
473
|
+
/**
|
474
|
+
* Returns the Actions for table's node
|
475
|
+
*
|
476
|
+
* @returns Node
|
477
|
+
* @protected
|
478
|
+
*/
|
479
|
+
getActions(layoutMode, panelOpen) {
|
480
|
+
const icon = this._getDividerIcon(layoutMode, panelOpen);
|
481
|
+
const tooltip = panelOpen ? this._translations.close : this._translations.open;
|
482
|
+
const id = "toggle-layout";
|
483
|
+
return (index.h(index.Fragment, null, index.h("calcite-action", { active: this.appLayout === 'splitView', class: "toggle-node", icon: "browser", id: "browser-action", onClick: () => { this._changeLayout('splitView'); }, text: "" }), index.h("calcite-tooltip", { placement: "right", "reference-element": "browser-action" }, index.h("span", null, this._translations.splitView)), index.h("calcite-action", { active: this.appLayout === 'tableView', class: "toggle-node", icon: "dock-left", id: "dock-left-action", onClick: () => { this._changeLayout('tableView'); }, text: "" }), index.h("calcite-tooltip", { placement: "right", "reference-element": "dock-left-action" }, index.h("span", null, this._translations.tableView)), index.h("calcite-action", { active: this.appLayout === 'mapView', class: "toggle-node", icon: "browser-map", id: "browser-map-action", onClick: () => { this._changeLayout('mapView'); }, text: "" }), index.h("calcite-tooltip", { placement: "right", "reference-element": "browser-map-action" }, index.h("span", null, this._translations.mapView)), index.h("calcite-action", { class: "toggle-node", icon: icon, id: id, onClick: () => this._toggleLayout(), slot: "actions-end", text: "" }), index.h("calcite-tooltip", { placement: "bottom", "reference-element": id }, index.h("span", null, tooltip))));
|
484
|
+
}
|
485
|
+
/**
|
486
|
+
* Show filter component in modal
|
487
|
+
*
|
488
|
+
* @returns node to interact with any configured filters for the current layer
|
489
|
+
* @protected
|
490
|
+
*/
|
491
|
+
_filterModal() {
|
492
|
+
return (index.h("calcite-modal", { "aria-labelledby": "modal-title", class: "modal", kind: "brand", onCalciteModalClose: () => void this._closeFilter(), open: this._filterOpen, widthScale: "s" }, index.h("div", { class: "display-flex align-center", id: "modal-title", slot: "header" }, this._translations?.filter?.replace("{{title}}", this._layer?.title)), index.h("div", { slot: "content" }, index.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 }))));
|
493
|
+
}
|
494
|
+
/**
|
495
|
+
* Store any filters for the current layer.
|
496
|
+
* Should only occur on layer change
|
497
|
+
*
|
498
|
+
* @protected
|
499
|
+
*/
|
500
|
+
_initLayerExpressions() {
|
501
|
+
const layerExpressions = this._mapInfo?.filterConfig?.layerExpressions;
|
502
|
+
this._layerExpressions = layerExpressions ? layerExpressions.filter((exp) => exp.id === this._layer?.id) : [];
|
503
|
+
this._filterList.layerExpressions = this._layerExpressions;
|
504
|
+
this._layerExpressions.filter(lyrExp => {
|
505
|
+
return lyrExp.expressions.filter(exp => exp.active).length > 0;
|
506
|
+
}).length > 0;
|
507
|
+
}
|
508
|
+
/**
|
509
|
+
* Toggle the filter modal
|
510
|
+
*
|
511
|
+
* @protected
|
512
|
+
*/
|
513
|
+
_toggleFilter() {
|
514
|
+
this._filterOpen = !this._filterOpen;
|
515
|
+
}
|
516
|
+
/**
|
517
|
+
* Reset the filter active prop
|
518
|
+
*
|
519
|
+
* @protected
|
520
|
+
*/
|
521
|
+
_handleFilterListReset() {
|
522
|
+
void this._layerTable.filterReset();
|
523
|
+
}
|
524
|
+
/**
|
525
|
+
* Close the filter modal
|
526
|
+
*
|
527
|
+
* @protected
|
528
|
+
*/
|
529
|
+
async _closeFilter() {
|
530
|
+
if (this._filterOpen) {
|
531
|
+
this._filterOpen = false;
|
532
|
+
void this._layerTable.closeFilter();
|
533
|
+
}
|
461
534
|
}
|
462
535
|
/**
|
463
536
|
* Update the component layout when its size changes
|
537
|
+
*
|
538
|
+
* @protected
|
464
539
|
*/
|
465
540
|
_onResize() {
|
466
541
|
const isMobile = this.el.offsetWidth < 1024;
|
@@ -477,22 +552,67 @@ const CrowdsourceManager = class {
|
|
477
552
|
/**
|
478
553
|
* Open/Close the appropriate panel.
|
479
554
|
* The panel that is toggled is dependent upon the layout mode and if using classic grid or not
|
555
|
+
*
|
556
|
+
* @protected
|
480
557
|
*/
|
481
558
|
_toggleLayout() {
|
482
559
|
this._panelOpen = !this._panelOpen;
|
483
560
|
}
|
561
|
+
/**
|
562
|
+
* Changes the layout mode
|
563
|
+
* @param appLayout selected active app layout
|
564
|
+
*
|
565
|
+
* @protected
|
566
|
+
*/
|
567
|
+
_changeLayout(appLayout) {
|
568
|
+
if (this.appLayout !== appLayout) {
|
569
|
+
this._setActiveLayout(appLayout);
|
570
|
+
this.appLayout = appLayout;
|
571
|
+
if (this._isMapViewOnLoad) {
|
572
|
+
void this._layerTable.refresh();
|
573
|
+
this._isMapViewOnLoad = false;
|
574
|
+
}
|
575
|
+
}
|
576
|
+
}
|
577
|
+
/**
|
578
|
+
* shows the map in card view
|
579
|
+
*
|
580
|
+
* @protected
|
581
|
+
*/
|
582
|
+
_showMapInCardView() {
|
583
|
+
if (this.appLayout === 'mapView') {
|
584
|
+
const fullMapView = document.getElementById('full-map-view').childNodes[0];
|
585
|
+
const splitMapClass = document.getElementById('card-mapView');
|
586
|
+
if (fullMapView) {
|
587
|
+
splitMapClass.appendChild(fullMapView);
|
588
|
+
}
|
589
|
+
}
|
590
|
+
}
|
591
|
+
/**
|
592
|
+
* Shows the map in full view
|
593
|
+
*
|
594
|
+
* @protected
|
595
|
+
*/
|
596
|
+
_showMapInFullView() {
|
597
|
+
const splitMap = document.getElementById('card-mapView').childNodes[0];
|
598
|
+
const fullMapViewClass = document.getElementById('full-map-view');
|
599
|
+
if (splitMap) {
|
600
|
+
fullMapViewClass.appendChild(splitMap);
|
601
|
+
}
|
602
|
+
}
|
484
603
|
/**
|
485
604
|
* Show/Hide the map, popup, and table
|
486
605
|
*
|
487
606
|
* @param show when true the map, popup, and table will be displayed
|
607
|
+
* @protected
|
488
608
|
*/
|
489
609
|
showHideMapPopupAndTable(show) {
|
490
|
-
this._expandPopup = false;
|
491
610
|
this._hideTable = show;
|
492
611
|
this._hideFooter = show;
|
493
612
|
}
|
494
613
|
/**
|
495
614
|
* Get the current map info (configuration details) when maps change
|
615
|
+
* @param id map changed id
|
496
616
|
*
|
497
617
|
* @returns IMapInfo for the provided id
|
498
618
|
* @protected
|
@@ -72,9 +72,10 @@ const InstantAppsControlPanel = class {
|
|
72
72
|
};
|
73
73
|
}
|
74
74
|
_getExpand(component) {
|
75
|
+
var _a;
|
75
76
|
const { view } = this;
|
76
77
|
const { content } = component;
|
77
|
-
const expanded = false;
|
78
|
+
const expanded = (_a = component === null || component === void 0 ? void 0 : component.expanded) !== null && _a !== void 0 ? _a : false;
|
78
79
|
return new this.Expand({ content, view, expanded, mode: MODE, group: GROUP });
|
79
80
|
}
|
80
81
|
_getComponentsNode() {
|
@@ -23,6 +23,8 @@ const { state, onChange } = index.createStore({
|
|
23
23
|
timeInfoItems: [],
|
24
24
|
selectedTimeInfoItem: null,
|
25
25
|
loading: true,
|
26
|
+
timeSliderConfig: {},
|
27
|
+
autoPlay: false,
|
26
28
|
});
|
27
29
|
|
28
30
|
/*
|
@@ -241,8 +243,8 @@ class InstantAppsTimeFilterViewModel {
|
|
241
243
|
'esri/core/Handles',
|
242
244
|
'esri/core/reactiveUtils',
|
243
245
|
'esri/widgets/TimeSlider',
|
244
|
-
'esri/TimeExtent',
|
245
|
-
'esri/TimeInterval',
|
246
|
+
'esri/time/TimeExtent',
|
247
|
+
'esri/time/TimeInterval',
|
246
248
|
'esri/layers/support/FeatureFilter',
|
247
249
|
'esri/layers/support/FeatureEffect',
|
248
250
|
]);
|
@@ -257,8 +259,11 @@ class InstantAppsTimeFilterViewModel {
|
|
257
259
|
catch (_a) { }
|
258
260
|
}
|
259
261
|
async init(timeSliderRef) {
|
262
|
+
var _a, _b;
|
260
263
|
if (timeSliderRef)
|
261
264
|
timeSliderRef.innerHTML = '';
|
265
|
+
if (((_b = (_a = state === null || state === void 0 ? void 0 : state.timeSlider) === null || _a === void 0 ? void 0 : _a.viewModel) === null || _b === void 0 ? void 0 : _b.state) === 'playing')
|
266
|
+
state.timeSlider.stop();
|
262
267
|
const { view, timeInfoConfigItems } = state;
|
263
268
|
if (!view)
|
264
269
|
return;
|
@@ -270,7 +275,7 @@ class InstantAppsTimeFilterViewModel {
|
|
270
275
|
this.setupFilterModeWatcher();
|
271
276
|
return Promise.resolve();
|
272
277
|
}
|
273
|
-
catch (
|
278
|
+
catch (_c) { }
|
274
279
|
}
|
275
280
|
destroy() {
|
276
281
|
var _a, _b;
|
@@ -315,6 +320,8 @@ class InstantAppsTimeFilterViewModel {
|
|
315
320
|
state.selectedTimeInfoItem = initialTimeInfoItem;
|
316
321
|
const config = this.getTimeSliderConfig(timeSliderRef);
|
317
322
|
state.timeSlider = new TimeSlider(config);
|
323
|
+
if (state.autoPlay)
|
324
|
+
state.timeSlider.play();
|
318
325
|
if (((_b = state.view) === null || _b === void 0 ? void 0 : _b.type) === '2d')
|
319
326
|
this.initialize2DView();
|
320
327
|
}
|
@@ -329,23 +336,16 @@ class InstantAppsTimeFilterViewModel {
|
|
329
336
|
var _a;
|
330
337
|
const [{ timeExtent, rangeStart, rangeEnd, unit }] = state.timeInfoItems;
|
331
338
|
const { TimeExtent, TimeInterval } = this;
|
332
|
-
|
333
|
-
container: timeSliderRef,
|
334
|
-
fullTimeExtent: timeExtent,
|
335
|
-
timeExtent: new TimeExtent({
|
339
|
+
const config = Object.assign({ container: timeSliderRef, fullTimeExtent: timeExtent, timeExtent: new TimeExtent({
|
336
340
|
start: rangeStart,
|
337
341
|
end: rangeEnd,
|
338
|
-
}),
|
339
|
-
mode: 'time-window',
|
340
|
-
loop: true,
|
341
|
-
stops: {
|
342
|
+
}), mode: 'time-window', stops: {
|
342
343
|
interval: new TimeInterval({
|
343
344
|
unit,
|
344
345
|
value: 1,
|
345
346
|
}),
|
346
|
-
},
|
347
|
-
|
348
|
-
};
|
347
|
+
}, view: ((_a = state.view) === null || _a === void 0 ? void 0 : _a.type) === '3d' ? state.view : null }, state.timeSliderConfig);
|
348
|
+
return config;
|
349
349
|
}
|
350
350
|
initialize2DView() {
|
351
351
|
state.timeInfoItems.forEach(timeInfoItem => this.applyTimeExtent(timeInfoItem.layerView, new this.TimeExtent({ start: timeInfoItem.rangeStart, end: timeInfoItem.rangeEnd })));
|
@@ -452,6 +452,8 @@ const InstantAppsTimeFilter = class {
|
|
452
452
|
this.timeInfoConfigItems = [];
|
453
453
|
this.filterMode = undefined;
|
454
454
|
this.view = undefined;
|
455
|
+
this.timeSliderConfig = undefined;
|
456
|
+
this.autoPlay = false;
|
455
457
|
}
|
456
458
|
async updateTimeInfoConfigItems() {
|
457
459
|
state.timeInfoConfigItems = this.timeInfoConfigItems;
|
@@ -460,10 +462,28 @@ const InstantAppsTimeFilter = class {
|
|
460
462
|
async updateFilterMode() {
|
461
463
|
state.filterMode = this.filterMode;
|
462
464
|
}
|
465
|
+
async updateTimeSliderConfig() {
|
466
|
+
state.timeSliderConfig = this.timeSliderConfig;
|
467
|
+
await viewModel.init(this.timeSliderRef);
|
468
|
+
}
|
469
|
+
async updateAutoPlay() {
|
470
|
+
state.autoPlay = this.autoPlay;
|
471
|
+
if (state.timeSlider) {
|
472
|
+
if (state.autoPlay) {
|
473
|
+
state.timeSlider.play();
|
474
|
+
}
|
475
|
+
else {
|
476
|
+
state.timeSlider.stop();
|
477
|
+
}
|
478
|
+
}
|
479
|
+
}
|
463
480
|
async componentWillLoad() {
|
464
481
|
try {
|
465
482
|
state.view = this.view;
|
466
483
|
state.timeInfoConfigItems = this.timeInfoConfigItems;
|
484
|
+
state.autoPlay = !!this.autoPlay;
|
485
|
+
if (this.timeSliderConfig)
|
486
|
+
state.timeSliderConfig = this.timeSliderConfig;
|
467
487
|
if (this.filterMode)
|
468
488
|
state.filterMode = this.filterMode;
|
469
489
|
await locale.getMessages(this);
|
@@ -484,17 +504,14 @@ const InstantAppsTimeFilter = class {
|
|
484
504
|
viewModel.destroy();
|
485
505
|
}
|
486
506
|
render() {
|
487
|
-
return index$1.h(index$1.Host, { key: '
|
507
|
+
return index$1.h(index$1.Host, { key: '38a0569dba42d51846760bf75df36ee1c88d71b1' }, this._renderBase());
|
488
508
|
}
|
489
509
|
_renderBase() {
|
490
|
-
return (index$1.h("div", { class: `${CSS.base}${this.view.type !== '2d' ? CSS.threeD : ''}` }, this._renderLoader(), this.
|
491
|
-
}
|
492
|
-
_renderMain() {
|
493
|
-
return (index$1.h(index$1.Fragment, null, this.view.type === '2d' && this._renderTopEl(), index$1.h("div", { ref: (ref) => (this.timeSliderRef = ref) })));
|
510
|
+
return (index$1.h("div", { class: `${CSS.base}${this.view.type !== '2d' ? CSS.threeD : ''}` }, this._renderLoader(), this.view.type === '2d' && this._renderTopEl(), index$1.h("div", { key: "time-slider", ref: (ref) => (this.timeSliderRef = ref) })));
|
494
511
|
}
|
495
512
|
_renderLoader() {
|
496
513
|
var _a, _b;
|
497
|
-
return (state.loading && (index$1.h(
|
514
|
+
return (state.loading && (index$1.h("div", null, index$1.h("div", { class: CSS.background }), index$1.h("div", { class: CSS.loadingContainer }, index$1.h("calcite-loader", { scale: "m", label: (_a = this.messages) === null || _a === void 0 ? void 0 : _a.loading, text: (_b = this.messages) === null || _b === void 0 ? void 0 : _b.loading })))));
|
498
515
|
}
|
499
516
|
_renderTopEl() {
|
500
517
|
const moreThanOneTimeLayer = this.timeInfoConfigItems.length > 1;
|
@@ -524,7 +541,9 @@ const InstantAppsTimeFilter = class {
|
|
524
541
|
get el() { return index$1.getElement(this); }
|
525
542
|
static get watchers() { return {
|
526
543
|
"timeInfoConfigItems": ["updateTimeInfoConfigItems"],
|
527
|
-
"filterMode": ["updateFilterMode"]
|
544
|
+
"filterMode": ["updateFilterMode"],
|
545
|
+
"timeSliderConfig": ["updateTimeSliderConfig"],
|
546
|
+
"autoPlay": ["updateAutoPlay"]
|
528
547
|
}; }
|
529
548
|
};
|
530
549
|
InstantAppsTimeFilter.style = InstantAppsTimeFilterStyle0;
|