@esri/solutions-components 0.10.7 → 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/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/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/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-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-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 +1 -1
- 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-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
@@ -3,28 +3,41 @@
|
|
3
3
|
* Licensed under the Apache License, Version 2.0
|
4
4
|
* http://www.apache.org/licenses/LICENSE-2.0
|
5
5
|
*/
|
6
|
-
import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
6
|
+
import { proxyCustomElement, HTMLElement, createEvent, h, Host, Fragment } from '@stencil/core/internal/client';
|
7
7
|
import { l as loadModules } from './loadModules.js';
|
8
|
-
import {
|
9
|
-
import {
|
10
|
-
import { d as defineCustomElement$
|
11
|
-
import { d as defineCustomElement$
|
12
|
-
import { d as defineCustomElement$
|
13
|
-
import { d as defineCustomElement$
|
14
|
-
import { d as defineCustomElement$
|
15
|
-
import { d as defineCustomElement$
|
16
|
-
import { d as defineCustomElement$
|
17
|
-
import { d as defineCustomElement$
|
18
|
-
import { d as defineCustomElement$
|
19
|
-
import { d as defineCustomElement$
|
20
|
-
import { d as defineCustomElement$
|
21
|
-
import { d as defineCustomElement$
|
22
|
-
import { d as defineCustomElement$
|
23
|
-
import { d as defineCustomElement$
|
24
|
-
import { d as defineCustomElement$
|
25
|
-
import { d as defineCustomElement$
|
26
|
-
import { d as defineCustomElement$
|
27
|
-
import { d as defineCustomElement$
|
8
|
+
import { g as getLocaleComponentStrings } from './locale.js';
|
9
|
+
import { c as getFeatureLayerView, b as goToSelection } from './mapViewUtils.js';
|
10
|
+
import { d as defineCustomElement$z } from './basemap-gallery2.js';
|
11
|
+
import { d as defineCustomElement$y } from './action.js';
|
12
|
+
import { d as defineCustomElement$x } from './action-bar.js';
|
13
|
+
import { d as defineCustomElement$w } from './action-group.js';
|
14
|
+
import { d as defineCustomElement$v } from './action-menu.js';
|
15
|
+
import { d as defineCustomElement$u } from './button.js';
|
16
|
+
import { d as defineCustomElement$t } from './chip.js';
|
17
|
+
import { d as defineCustomElement$s } from './combobox.js';
|
18
|
+
import { d as defineCustomElement$r } from './combobox-item.js';
|
19
|
+
import { d as defineCustomElement$q } from './dropdown.js';
|
20
|
+
import { d as defineCustomElement$p } from './dropdown-group.js';
|
21
|
+
import { d as defineCustomElement$o } from './dropdown-item.js';
|
22
|
+
import { d as defineCustomElement$n } from './filter2.js';
|
23
|
+
import { d as defineCustomElement$m } from './handle.js';
|
24
|
+
import { d as defineCustomElement$l } from './icon.js';
|
25
|
+
import { d as defineCustomElement$k } from './input.js';
|
26
|
+
import { d as defineCustomElement$j } from './label2.js';
|
27
|
+
import { d as defineCustomElement$i } from './list.js';
|
28
|
+
import { d as defineCustomElement$h } from './list-item.js';
|
29
|
+
import { d as defineCustomElement$g } from './loader.js';
|
30
|
+
import { d as defineCustomElement$f } from './notice.js';
|
31
|
+
import { d as defineCustomElement$e } from './option.js';
|
32
|
+
import { d as defineCustomElement$d } from './popover.js';
|
33
|
+
import { d as defineCustomElement$c } from './progress.js';
|
34
|
+
import { d as defineCustomElement$b } from './scrim.js';
|
35
|
+
import { d as defineCustomElement$a } from './select.js';
|
36
|
+
import { d as defineCustomElement$9 } from './stack.js';
|
37
|
+
import { d as defineCustomElement$8 } from './tooltip.js';
|
38
|
+
import { d as defineCustomElement$7 } from './floor-filter2.js';
|
39
|
+
import { d as defineCustomElement$6 } from './map-fullscreen2.js';
|
40
|
+
import { d as defineCustomElement$5 } from './map-layer-picker2.js';
|
28
41
|
import { d as defineCustomElement$4 } from './map-legend2.js';
|
29
42
|
import { d as defineCustomElement$3 } from './map-picker2.js';
|
30
43
|
import { d as defineCustomElement$2 } from './map-search2.js';
|
@@ -69,7 +82,7 @@ function joinAppProxies(map, config, appProxies) {
|
|
69
82
|
return map;
|
70
83
|
}
|
71
84
|
|
72
|
-
const mapCardCss = ":host{display:block;--calcite-label-margin-bottom:0;--calcite-block-padding:0}.map-height{height:calc(100% - 51px)}.height-full{height:100%}.box-shadow{box-shadow:none !important}.visibility-hidden-1{visibility:hidden;height:1px;}.display-none{display:none}";
|
85
|
+
const mapCardCss = ":host{display:block;--calcite-label-margin-bottom:0;--calcite-block-padding:0}.map-height{height:calc(100% - 51px)}.height-full{height:100%}.height-50-px{height:50px}.box-shadow{box-shadow:none !important}.visibility-hidden-1{visibility:hidden;height:1px;}.display-none{display:none}";
|
73
86
|
const MapCardStyle0 = mapCardCss;
|
74
87
|
|
75
88
|
const MapCard = /*@__PURE__*/ proxyCustomElement(class MapCard extends HTMLElement {
|
@@ -78,8 +91,10 @@ const MapCard = /*@__PURE__*/ proxyCustomElement(class MapCard extends HTMLEleme
|
|
78
91
|
this.__registerHost();
|
79
92
|
this.mapChanged = createEvent(this, "mapChanged", 7);
|
80
93
|
this.beforeMapChanged = createEvent(this, "beforeMapChanged", 7);
|
94
|
+
this.toggleFilter = createEvent(this, "toggleFilter", 7);
|
81
95
|
this.appProxies = undefined;
|
82
96
|
this.defaultWebmapId = "";
|
97
|
+
this.defaultLayerId = undefined;
|
83
98
|
this.enableHome = undefined;
|
84
99
|
this.enableLegend = undefined;
|
85
100
|
this.enableFloorFilter = undefined;
|
@@ -100,8 +115,17 @@ const MapCard = /*@__PURE__*/ proxyCustomElement(class MapCard extends HTMLEleme
|
|
100
115
|
this.stackTools = true;
|
101
116
|
this.theme = undefined;
|
102
117
|
this.toolOrder = undefined;
|
118
|
+
this.isMapLayout = undefined;
|
119
|
+
this.selectedFeaturesIds = undefined;
|
120
|
+
this.selectedLayer = undefined;
|
121
|
+
this.zoomToScale = undefined;
|
122
|
+
this.onlyShowUpdatableLayers = undefined;
|
123
|
+
this.isMobile = undefined;
|
124
|
+
this.mapInfo = undefined;
|
125
|
+
this._translations = undefined;
|
103
126
|
this._searchConfiguration = undefined;
|
104
127
|
this._webMapInfo = undefined;
|
128
|
+
this._showHideOpen = false;
|
105
129
|
}
|
106
130
|
get el() { return this; }
|
107
131
|
//--------------------------------------------------------------------------
|
@@ -149,6 +173,22 @@ const MapCard = /*@__PURE__*/ proxyCustomElement(class MapCard extends HTMLEleme
|
|
149
173
|
* HTMLMapToolsElement: the container div for the map tools
|
150
174
|
*/
|
151
175
|
_mapTools;
|
176
|
+
/**
|
177
|
+
* HTMLCalciteDropdownElement: Dropdown the will support overflow tools that won't fit in the current display
|
178
|
+
*/
|
179
|
+
_moreDropdown;
|
180
|
+
/**
|
181
|
+
* boolean: When true the show/hide fields list is forced open
|
182
|
+
*/
|
183
|
+
_mapListExpanded = false;
|
184
|
+
/**
|
185
|
+
* boolean: When true an indicator will be shown on the action
|
186
|
+
*/
|
187
|
+
_filterActive = false;
|
188
|
+
/**
|
189
|
+
* string: The current layers definition expression
|
190
|
+
*/
|
191
|
+
_definitionExpression;
|
152
192
|
//--------------------------------------------------------------------------
|
153
193
|
//
|
154
194
|
// Watch handlers
|
@@ -160,11 +200,31 @@ const MapCard = /*@__PURE__*/ proxyCustomElement(class MapCard extends HTMLEleme
|
|
160
200
|
enableHomeWatchHandler() {
|
161
201
|
this._initHome();
|
162
202
|
}
|
203
|
+
/**
|
204
|
+
* watch for changes in layer view and verify if it has editing enabled
|
205
|
+
*/
|
206
|
+
async selectedLayerWatchHandler() {
|
207
|
+
await this.selectedLayer?.when(async () => {
|
208
|
+
this._definitionExpression = this.selectedLayer.definitionExpression;
|
209
|
+
});
|
210
|
+
}
|
163
211
|
//--------------------------------------------------------------------------
|
164
212
|
//
|
165
213
|
// Methods (public)
|
166
214
|
//
|
167
215
|
//--------------------------------------------------------------------------
|
216
|
+
/**
|
217
|
+
* Reset the filter
|
218
|
+
*/
|
219
|
+
async filterReset() {
|
220
|
+
this._filterActive = false;
|
221
|
+
}
|
222
|
+
/**
|
223
|
+
* updates the filter
|
224
|
+
*/
|
225
|
+
async updateFilter() {
|
226
|
+
this._filterActive = this._definitionExpression !== this.selectedLayer.definitionExpression;
|
227
|
+
}
|
168
228
|
//--------------------------------------------------------------------------
|
169
229
|
//
|
170
230
|
// Events (public)
|
@@ -178,12 +238,23 @@ const MapCard = /*@__PURE__*/ proxyCustomElement(class MapCard extends HTMLEleme
|
|
178
238
|
* Emitted before a new map is loaded
|
179
239
|
*/
|
180
240
|
beforeMapChanged;
|
241
|
+
/**
|
242
|
+
* Emitted on demand when filter action is clicked
|
243
|
+
*/
|
244
|
+
toggleFilter;
|
181
245
|
/**
|
182
246
|
* Listen for changes to map info and load the appropriate map
|
183
247
|
*/
|
184
248
|
async mapInfoChange(evt) {
|
185
249
|
await this._loadMap(evt.detail);
|
186
250
|
}
|
251
|
+
/**
|
252
|
+
* Listen for change when mapview doesn't contain any layer
|
253
|
+
*/
|
254
|
+
noLayersFound() {
|
255
|
+
this.selectedLayer = undefined;
|
256
|
+
this.selectedFeaturesIds = [];
|
257
|
+
}
|
187
258
|
//--------------------------------------------------------------------------
|
188
259
|
//
|
189
260
|
// Functions (lifecycle)
|
@@ -193,17 +264,28 @@ const MapCard = /*@__PURE__*/ proxyCustomElement(class MapCard extends HTMLEleme
|
|
193
264
|
* StencilJS: Called once just after the component is first connected to the DOM.
|
194
265
|
*/
|
195
266
|
async componentWillLoad() {
|
267
|
+
await this._getTranslations();
|
196
268
|
await this._initModules();
|
197
269
|
}
|
198
270
|
/**
|
199
271
|
* Renders the component.
|
200
272
|
*/
|
201
273
|
render() {
|
274
|
+
const mapContainerClass = this.isMapLayout ? "display-flex height-50-px" : "";
|
202
275
|
const mapClass = this.hidden ? "visibility-hidden-1" : "";
|
203
276
|
const themeClass = this.theme === "dark" ? "calcite-mode-dark" : "calcite-mode-light";
|
204
277
|
const mapPickerClass = this.mapInfos?.length > 1 ? "" : "display-none";
|
205
278
|
const mapHeightClass = this.mapInfos?.length > 1 ? "map-height" : "height-full";
|
206
|
-
|
279
|
+
const containerClass = this.isMobile ? "width-full" : "";
|
280
|
+
const mobileClass = this.isMobile ? "border-top" : "";
|
281
|
+
const headerElements = this.isMapLayout ? "" : "display-none";
|
282
|
+
return (h(Host, { key: '7029e518173a8c1e6e00049b8e68e23bed23d9cb' }, h("div", { key: '2b8d9197dcb68529562728fddeb53d0a7e9cbb86', class: `${mapContainerClass}` }, h("map-picker", { key: '2e50b7c70832f4151fafd06e860846a5efa8f6f1', class: mapPickerClass, isMapLayout: this.isMapLayout, mapInfos: this.mapInfos, ref: (el) => this._mapPicker = el }), h("div", { key: 'bc01ef7fb34400e3ff58151cab6abbabd9fa8a6f', class: `mapView-header display-flex ${headerElements}` }, h("div", { key: '1f1bf6ffb92fbc182be8333b4ae3d70271ea2f1b', class: `border-end ${containerClass} ${mobileClass}`, id: "solutions-map-layer-picker-container" }, this.mapView && h("map-layer-picker", { key: '47320f3794f060262c4ed29ec1400a50d9744a97', appearance: "transparent", defaultLayerId: this.defaultLayerId, display: "inline-flex", height: 50, isMobile: this.isMobile, mapView: this.mapView, onlyShowUpdatableLayers: this.onlyShowUpdatableLayers, placeholderIcon: "layers", scale: "l", selectedIds: this.selectedLayer ? [this.selectedLayer.id] : [], showSingleLayerAsLabel: true, showTables: true, type: "dropdown" })), this._getDropDownItem())), h("div", { key: '7101bfed6c0e0932275b0d28eea0ea5e1603aa8e', class: `${mapHeightClass} ${mapClass}`, ref: (el) => (this._mapDiv = el) }), h("map-tools", { key: '8ca28e50a77a25699cd6c17fe4f31788ca1cb49d', basemapConfig: this.basemapConfig, class: `box-shadow ${themeClass}`, enableBasemap: this.enableBasemap, enableFloorFilter: this.enableFloorFilter, enableFullscreen: this.enableFullscreen, enableHome: this.enableHome, enableLegend: this.enableLegend, enableSearch: this.enableSearch, enableSingleExpand: this.enableSingleExpand, homeZoomToolsSize: this.homeZoomToolsSize, mapView: this.mapView, mapWidgetsSize: this.mapWidgetsSize, position: this.mapWidgetsPosition, ref: (el) => this._mapTools = el, searchConfiguration: this._searchConfiguration, stackTools: this.stackTools, toolOrder: this.toolOrder })));
|
283
|
+
}
|
284
|
+
/**
|
285
|
+
* Called each time after the component is loaded
|
286
|
+
*/
|
287
|
+
async componentDidRender() {
|
288
|
+
document.onclick = (e) => this._handleDocumentClick(e);
|
207
289
|
}
|
208
290
|
//--------------------------------------------------------------------------
|
209
291
|
//
|
@@ -302,13 +384,105 @@ const MapCard = /*@__PURE__*/ proxyCustomElement(class MapCard extends HTMLEleme
|
|
302
384
|
this.mapView.ui.remove(this._homeWidget);
|
303
385
|
}
|
304
386
|
}
|
387
|
+
/**
|
388
|
+
* Toggle show/hide dropdown
|
389
|
+
*/
|
390
|
+
_toggleShowHide() {
|
391
|
+
this._showHideOpen = !this._showHideOpen;
|
392
|
+
}
|
393
|
+
/**
|
394
|
+
* Open show/hide dropdown
|
395
|
+
*/
|
396
|
+
_forceShowHide() {
|
397
|
+
if (this._moreDropdown) {
|
398
|
+
this._moreDropdown.open = this._showHideOpen;
|
399
|
+
}
|
400
|
+
}
|
401
|
+
/**
|
402
|
+
* Close show/hide dropdown when the user clicks outside of it
|
403
|
+
*/
|
404
|
+
_handleDocumentClick(e) {
|
405
|
+
const id = e.target?.id;
|
406
|
+
if (this._showHideOpen && id !== "solutions-subset-list" && id !== "solutions-more" && id !== "chevron-down") {
|
407
|
+
if (this._moreDropdown) {
|
408
|
+
this._showHideOpen = false;
|
409
|
+
this._moreDropdown.open = false;
|
410
|
+
}
|
411
|
+
}
|
412
|
+
// if clicked on map picker then toggle the dropdown
|
413
|
+
if (e.target.tagName === 'MAP-PICKER') {
|
414
|
+
this._mapListExpanded = !this._mapListExpanded;
|
415
|
+
void this._mapPicker.toggle(this._mapListExpanded);
|
416
|
+
}
|
417
|
+
// if clicked on other place then just close the dropdown
|
418
|
+
if (e.target.tagName !== 'MAP-PICKER') {
|
419
|
+
this._mapListExpanded = false;
|
420
|
+
void this._mapPicker.close();
|
421
|
+
}
|
422
|
+
}
|
423
|
+
/**
|
424
|
+
* Zoom to all selected features
|
425
|
+
*
|
426
|
+
* @returns a promise that will resolve when the operation is complete
|
427
|
+
*/
|
428
|
+
async _zoom() {
|
429
|
+
if (this.selectedLayer) {
|
430
|
+
const selectedLayerView = await getFeatureLayerView(this.mapView, this.selectedLayer.id);
|
431
|
+
await goToSelection(this.selectedFeaturesIds, selectedLayerView, this.mapView, true, undefined, this.zoomToScale);
|
432
|
+
}
|
433
|
+
}
|
434
|
+
async _toggleFilter() {
|
435
|
+
this.toggleFilter.emit();
|
436
|
+
}
|
437
|
+
/**
|
438
|
+
* Return true when we have at least 1 layer expression for the current layer
|
439
|
+
*
|
440
|
+
* @returns boolean
|
441
|
+
*/
|
442
|
+
_hasFilterExpressions() {
|
443
|
+
let layerExpressions;
|
444
|
+
if (this.mapInfo?.filterConfig?.layerExpressions && this.selectedLayer?.id) {
|
445
|
+
layerExpressions = this.mapInfo.filterConfig.layerExpressions.filter((exp) => exp.id === this.selectedLayer.id);
|
446
|
+
}
|
447
|
+
return layerExpressions?.length > 0;
|
448
|
+
}
|
449
|
+
/**
|
450
|
+
* Get Dropdown action item
|
451
|
+
* @returns Dropdown item
|
452
|
+
*/
|
453
|
+
_getDropDownItem() {
|
454
|
+
return (h("calcite-dropdown", { closeOnSelectDisabled: true, disabled: this.selectedLayer === undefined, id: "solutions-more", onCalciteDropdownBeforeClose: () => this._forceShowHide(), ref: (el) => this._moreDropdown = el, widthScale: "l" }, h("calcite-action", { appearance: "solid", id: 'solutions-more', label: "", onClick: () => this._toggleShowHide(), slot: "trigger", text: "" }, h("calcite-button", { appearance: "transparent", iconEnd: this._showHideOpen ? "chevron-up" : "chevron-down", kind: "neutral" }, this._translations.more)), h("calcite-dropdown-group", { selectionMode: "none" }, this._getDropDownItems())));
|
455
|
+
}
|
456
|
+
/**
|
457
|
+
* Gets the dropdown items
|
458
|
+
* @returns dropdown items
|
459
|
+
*/
|
460
|
+
_getDropDownItems() {
|
461
|
+
const featureSelected = this.selectedFeaturesIds?.length > 0;
|
462
|
+
const showMultipleEdits = this.selectedFeaturesIds?.length > 1;
|
463
|
+
const hasFilterExpressions = this._hasFilterExpressions();
|
464
|
+
return (h(Fragment, null, h("calcite-dropdown-group", { selectionMode: "none" }, h("calcite-dropdown-item", { disabled: !showMultipleEdits, iconStart: "pencil", id: "solutions-subset-list", onClick: () => alert(this._translations.editMultiple) }, this._translations.editMultiple)), h("calcite-dropdown-group", { selectionMode: "none" }, h("calcite-dropdown-item", { iconStart: "refresh", id: "solutions-subset-list", onClick: () => { this.selectedLayer.refresh(); } }, this._translations.refresh)), h("calcite-dropdown-group", { selectionMode: "none" }, h("calcite-dropdown-item", { disabled: !featureSelected, iconStart: "zoom-to-object", id: "solutions-subset-list", onClick: this._zoom.bind(this) }, this._translations.zoom)), hasFilterExpressions &&
|
465
|
+
h("calcite-dropdown-group", null, h("calcite-dropdown-item", { disabled: false, iconStart: "filter", id: "solutions-subset-list", onClick: this._toggleFilter.bind(this), selected: this._filterActive }, this._translations.filters))));
|
466
|
+
}
|
467
|
+
/**
|
468
|
+
* Fetches the component's translations
|
469
|
+
*
|
470
|
+
* @returns Promise when complete
|
471
|
+
* @protected
|
472
|
+
*/
|
473
|
+
async _getTranslations() {
|
474
|
+
const messages = await getLocaleComponentStrings(this.el);
|
475
|
+
this._translations = messages[0];
|
476
|
+
}
|
305
477
|
static get watchers() { return {
|
306
|
-
"enableHome": ["enableHomeWatchHandler"]
|
478
|
+
"enableHome": ["enableHomeWatchHandler"],
|
479
|
+
"selectedLayer": ["selectedLayerWatchHandler"]
|
307
480
|
}; }
|
308
481
|
static get style() { return MapCardStyle0; }
|
309
482
|
}, [0, "map-card", {
|
310
483
|
"appProxies": [8, "app-proxies"],
|
311
484
|
"defaultWebmapId": [1, "default-webmap-id"],
|
485
|
+
"defaultLayerId": [1, "default-layer-id"],
|
312
486
|
"enableHome": [4, "enable-home"],
|
313
487
|
"enableLegend": [4, "enable-legend"],
|
314
488
|
"enableFloorFilter": [4, "enable-floor-filter"],
|
@@ -329,16 +503,28 @@ const MapCard = /*@__PURE__*/ proxyCustomElement(class MapCard extends HTMLEleme
|
|
329
503
|
"stackTools": [4, "stack-tools"],
|
330
504
|
"theme": [1],
|
331
505
|
"toolOrder": [16],
|
506
|
+
"isMapLayout": [4, "is-map-layout"],
|
507
|
+
"selectedFeaturesIds": [16],
|
508
|
+
"selectedLayer": [16],
|
509
|
+
"zoomToScale": [2, "zoom-to-scale"],
|
510
|
+
"onlyShowUpdatableLayers": [4, "only-show-updatable-layers"],
|
511
|
+
"isMobile": [4, "is-mobile"],
|
512
|
+
"mapInfo": [16],
|
513
|
+
"_translations": [32],
|
332
514
|
"_searchConfiguration": [32],
|
333
|
-
"_webMapInfo": [32]
|
334
|
-
|
335
|
-
"
|
515
|
+
"_webMapInfo": [32],
|
516
|
+
"_showHideOpen": [32],
|
517
|
+
"filterReset": [64],
|
518
|
+
"updateFilter": [64]
|
519
|
+
}, [[8, "mapInfoChange", "mapInfoChange"], [8, "noLayersFound", "noLayersFound"]], {
|
520
|
+
"enableHome": ["enableHomeWatchHandler"],
|
521
|
+
"selectedLayer": ["selectedLayerWatchHandler"]
|
336
522
|
}]);
|
337
523
|
function defineCustomElement() {
|
338
524
|
if (typeof customElements === "undefined") {
|
339
525
|
return;
|
340
526
|
}
|
341
|
-
const components = ["map-card", "basemap-gallery", "calcite-action", "calcite-action-bar", "calcite-action-group", "calcite-action-menu", "calcite-button", "calcite-filter", "calcite-handle", "calcite-icon", "calcite-input", "calcite-list", "calcite-list-item", "calcite-loader", "calcite-popover", "calcite-progress", "calcite-scrim", "calcite-stack", "calcite-tooltip", "floor-filter", "map-fullscreen", "map-legend", "map-picker", "map-search", "map-tools"];
|
527
|
+
const components = ["map-card", "basemap-gallery", "calcite-action", "calcite-action-bar", "calcite-action-group", "calcite-action-menu", "calcite-button", "calcite-chip", "calcite-combobox", "calcite-combobox-item", "calcite-dropdown", "calcite-dropdown-group", "calcite-dropdown-item", "calcite-filter", "calcite-handle", "calcite-icon", "calcite-input", "calcite-label", "calcite-list", "calcite-list-item", "calcite-loader", "calcite-notice", "calcite-option", "calcite-popover", "calcite-progress", "calcite-scrim", "calcite-select", "calcite-stack", "calcite-tooltip", "floor-filter", "map-fullscreen", "map-layer-picker", "map-legend", "map-picker", "map-search", "map-tools"];
|
342
528
|
components.forEach(tagName => { switch (tagName) {
|
343
529
|
case "map-card":
|
344
530
|
if (!customElements.get(tagName)) {
|
@@ -347,100 +533,155 @@ function defineCustomElement() {
|
|
347
533
|
break;
|
348
534
|
case "basemap-gallery":
|
349
535
|
if (!customElements.get(tagName)) {
|
350
|
-
defineCustomElement$
|
536
|
+
defineCustomElement$z();
|
351
537
|
}
|
352
538
|
break;
|
353
539
|
case "calcite-action":
|
354
540
|
if (!customElements.get(tagName)) {
|
355
|
-
defineCustomElement$
|
541
|
+
defineCustomElement$y();
|
356
542
|
}
|
357
543
|
break;
|
358
544
|
case "calcite-action-bar":
|
359
545
|
if (!customElements.get(tagName)) {
|
360
|
-
defineCustomElement$
|
546
|
+
defineCustomElement$x();
|
361
547
|
}
|
362
548
|
break;
|
363
549
|
case "calcite-action-group":
|
364
550
|
if (!customElements.get(tagName)) {
|
365
|
-
defineCustomElement$
|
551
|
+
defineCustomElement$w();
|
366
552
|
}
|
367
553
|
break;
|
368
554
|
case "calcite-action-menu":
|
369
555
|
if (!customElements.get(tagName)) {
|
370
|
-
defineCustomElement$
|
556
|
+
defineCustomElement$v();
|
371
557
|
}
|
372
558
|
break;
|
373
559
|
case "calcite-button":
|
374
560
|
if (!customElements.get(tagName)) {
|
375
|
-
defineCustomElement$
|
561
|
+
defineCustomElement$u();
|
562
|
+
}
|
563
|
+
break;
|
564
|
+
case "calcite-chip":
|
565
|
+
if (!customElements.get(tagName)) {
|
566
|
+
defineCustomElement$t();
|
567
|
+
}
|
568
|
+
break;
|
569
|
+
case "calcite-combobox":
|
570
|
+
if (!customElements.get(tagName)) {
|
571
|
+
defineCustomElement$s();
|
572
|
+
}
|
573
|
+
break;
|
574
|
+
case "calcite-combobox-item":
|
575
|
+
if (!customElements.get(tagName)) {
|
576
|
+
defineCustomElement$r();
|
577
|
+
}
|
578
|
+
break;
|
579
|
+
case "calcite-dropdown":
|
580
|
+
if (!customElements.get(tagName)) {
|
581
|
+
defineCustomElement$q();
|
582
|
+
}
|
583
|
+
break;
|
584
|
+
case "calcite-dropdown-group":
|
585
|
+
if (!customElements.get(tagName)) {
|
586
|
+
defineCustomElement$p();
|
587
|
+
}
|
588
|
+
break;
|
589
|
+
case "calcite-dropdown-item":
|
590
|
+
if (!customElements.get(tagName)) {
|
591
|
+
defineCustomElement$o();
|
376
592
|
}
|
377
593
|
break;
|
378
594
|
case "calcite-filter":
|
379
595
|
if (!customElements.get(tagName)) {
|
380
|
-
defineCustomElement$
|
596
|
+
defineCustomElement$n();
|
381
597
|
}
|
382
598
|
break;
|
383
599
|
case "calcite-handle":
|
384
600
|
if (!customElements.get(tagName)) {
|
385
|
-
defineCustomElement$
|
601
|
+
defineCustomElement$m();
|
386
602
|
}
|
387
603
|
break;
|
388
604
|
case "calcite-icon":
|
389
605
|
if (!customElements.get(tagName)) {
|
390
|
-
defineCustomElement$
|
606
|
+
defineCustomElement$l();
|
391
607
|
}
|
392
608
|
break;
|
393
609
|
case "calcite-input":
|
394
610
|
if (!customElements.get(tagName)) {
|
395
|
-
defineCustomElement$
|
611
|
+
defineCustomElement$k();
|
612
|
+
}
|
613
|
+
break;
|
614
|
+
case "calcite-label":
|
615
|
+
if (!customElements.get(tagName)) {
|
616
|
+
defineCustomElement$j();
|
396
617
|
}
|
397
618
|
break;
|
398
619
|
case "calcite-list":
|
399
620
|
if (!customElements.get(tagName)) {
|
400
|
-
defineCustomElement$
|
621
|
+
defineCustomElement$i();
|
401
622
|
}
|
402
623
|
break;
|
403
624
|
case "calcite-list-item":
|
404
625
|
if (!customElements.get(tagName)) {
|
405
|
-
defineCustomElement$
|
626
|
+
defineCustomElement$h();
|
406
627
|
}
|
407
628
|
break;
|
408
629
|
case "calcite-loader":
|
409
630
|
if (!customElements.get(tagName)) {
|
410
|
-
defineCustomElement$
|
631
|
+
defineCustomElement$g();
|
632
|
+
}
|
633
|
+
break;
|
634
|
+
case "calcite-notice":
|
635
|
+
if (!customElements.get(tagName)) {
|
636
|
+
defineCustomElement$f();
|
637
|
+
}
|
638
|
+
break;
|
639
|
+
case "calcite-option":
|
640
|
+
if (!customElements.get(tagName)) {
|
641
|
+
defineCustomElement$e();
|
411
642
|
}
|
412
643
|
break;
|
413
644
|
case "calcite-popover":
|
414
645
|
if (!customElements.get(tagName)) {
|
415
|
-
defineCustomElement$
|
646
|
+
defineCustomElement$d();
|
416
647
|
}
|
417
648
|
break;
|
418
649
|
case "calcite-progress":
|
419
650
|
if (!customElements.get(tagName)) {
|
420
|
-
defineCustomElement$
|
651
|
+
defineCustomElement$c();
|
421
652
|
}
|
422
653
|
break;
|
423
654
|
case "calcite-scrim":
|
424
655
|
if (!customElements.get(tagName)) {
|
425
|
-
defineCustomElement$
|
656
|
+
defineCustomElement$b();
|
657
|
+
}
|
658
|
+
break;
|
659
|
+
case "calcite-select":
|
660
|
+
if (!customElements.get(tagName)) {
|
661
|
+
defineCustomElement$a();
|
426
662
|
}
|
427
663
|
break;
|
428
664
|
case "calcite-stack":
|
429
665
|
if (!customElements.get(tagName)) {
|
430
|
-
defineCustomElement$
|
666
|
+
defineCustomElement$9();
|
431
667
|
}
|
432
668
|
break;
|
433
669
|
case "calcite-tooltip":
|
434
670
|
if (!customElements.get(tagName)) {
|
435
|
-
defineCustomElement$
|
671
|
+
defineCustomElement$8();
|
436
672
|
}
|
437
673
|
break;
|
438
674
|
case "floor-filter":
|
439
675
|
if (!customElements.get(tagName)) {
|
440
|
-
defineCustomElement$
|
676
|
+
defineCustomElement$7();
|
441
677
|
}
|
442
678
|
break;
|
443
679
|
case "map-fullscreen":
|
680
|
+
if (!customElements.get(tagName)) {
|
681
|
+
defineCustomElement$6();
|
682
|
+
}
|
683
|
+
break;
|
684
|
+
case "map-layer-picker":
|
444
685
|
if (!customElements.get(tagName)) {
|
445
686
|
defineCustomElement$5();
|
446
687
|
}
|
@@ -176,7 +176,7 @@ const MapDrawTools = /*@__PURE__*/ proxyCustomElement(class MapDrawTools extends
|
|
176
176
|
"border" : "border esri-widget esri-sketch__panel";
|
177
177
|
const undoRedoClass = this.drawMode === EDrawMode.SKETCH ?
|
178
178
|
"display-none" : "esri-widget esri-sketch__panel border-left esri-sketch__section";
|
179
|
-
return (h(Host, { key: '
|
179
|
+
return (h(Host, { key: '64c06f74fa05d6debb3a34bbb3d51bc9e2d1e8a6' }, h("div", { key: 'b3ac0f7c2f38da701fcee82580d7d4f55792ffb8', class: containerClass }, h("div", { key: '57625c7617de564ad7f62ed8952dd72108d46bbe', ref: (el) => { this._sketchElement = el; } }), h("div", { key: 'b1c8a28ef1fab0e0cb4a9617e9d366e1002d619d', class: undoRedoClass }, h("calcite-action", { key: 'ae27d672ad615b54bceb37fa56ac8e652f80df61', disabled: !this.undoEnabled, icon: "undo", onClick: () => this._undo(), scale: "s", text: this._translations.undo }), h("calcite-action", { key: '643d1413f98f8059590fb92c702074c9c732f9b1', disabled: !this.redoEnabled, icon: "redo", onClick: () => this._redo(), scale: "s", text: this._translations.redo })))));
|
180
180
|
}
|
181
181
|
//--------------------------------------------------------------------------
|
182
182
|
//
|
@@ -88,7 +88,7 @@ const MapFullscreen = /*@__PURE__*/ proxyCustomElement(class MapFullscreen exten
|
|
88
88
|
* Renders the component.
|
89
89
|
*/
|
90
90
|
render() {
|
91
|
-
return (h(Host, { key: '
|
91
|
+
return (h(Host, { key: '27267ebf4781a3c85addd8339028f7ac8d07bfb2' }, h("div", { key: '0966dae1c7ab9a2cba461d2f19b63bea8e5f28cf', class: "fullscreen-widget", ref: (el) => { this._fullscreenElement = el; } })));
|
92
92
|
}
|
93
93
|
/**
|
94
94
|
* StencilJS: Called just after the component updates.
|
@@ -5,7 +5,7 @@
|
|
5
5
|
*/
|
6
6
|
import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
7
7
|
import { g as getLocaleComponentStrings } from './locale.js';
|
8
|
-
import { d as getMapLayerHash, e as getMapTableHash } from './mapViewUtils.js';
|
8
|
+
import { g as getLayerOrTable, d as getMapLayerHash, e as getMapTableHash } from './mapViewUtils.js';
|
9
9
|
import { s as state } from './publicNotificationStore.js';
|
10
10
|
import { d as defineCustomElement$f } from './action.js';
|
11
11
|
import { d as defineCustomElement$e } from './button.js';
|
@@ -133,8 +133,14 @@ const MapLayerPicker = /*@__PURE__*/ proxyCustomElement(class MapLayerPicker ext
|
|
133
133
|
async componentWillLoad() {
|
134
134
|
await this._getTranslations();
|
135
135
|
await this._setLayers();
|
136
|
+
}
|
137
|
+
/**
|
138
|
+
* StencilJS: Called once just after the component is first connected to the DOM.
|
139
|
+
*/
|
140
|
+
async componentWillRender() {
|
136
141
|
if (this.ids.length > 0 || this.selectedIds.length === 1) {
|
137
|
-
|
142
|
+
const layer = await getLayerOrTable(this.mapView, this.selectedIds[0]);
|
143
|
+
this.selectedName = layer?.title;
|
138
144
|
}
|
139
145
|
}
|
140
146
|
/**
|
@@ -144,7 +150,7 @@ const MapLayerPicker = /*@__PURE__*/ proxyCustomElement(class MapLayerPicker ext
|
|
144
150
|
const id = "map-layer-picker";
|
145
151
|
let style = this.height > 0 ? { "height": `${this.height.toString()}px` } : {};
|
146
152
|
style = { ...style, "display": this.display };
|
147
|
-
return (h(Host, { key: '
|
153
|
+
return (h(Host, { key: '47a42a4855654930ebaf59b1567ab4bd5ccf3133' }, h("div", { key: 'acc05150c663d68ae633a7d293984ae282cfbdfa', class: "map-layer-picker-container", style: style }, h("div", { key: '811bde9a5118862f58b6a9ed99abec0f46fb4a1f', class: "map-layer-picker", style: style }, !this._hasValidLayers ? this._getInvalidPlaceholder() :
|
148
154
|
!this._hasMultipleLayers && this.showSingleLayerAsLabel ? this._getSingleLayerPlaceholder() :
|
149
155
|
this.type === "combobox" ? this._getCombobox(id) :
|
150
156
|
this.type === "select" ? this._getSelect(id) : this._getDropdown(id)))));
|
@@ -73,7 +73,7 @@ const MapLegend = /*@__PURE__*/ proxyCustomElement(class MapLegend extends HTMLE
|
|
73
73
|
* StencilJS: Renders the component.
|
74
74
|
*/
|
75
75
|
render() {
|
76
|
-
return (h(Host, { key: '
|
76
|
+
return (h(Host, { key: 'd9f276c9f13ad09a606bda6e2aaf78707824f6e9' }, h("div", { key: 'f2db7bd093313a19ace2ec4340c5d0049b666bdc', ref: (el) => { this._legendElement = el; } })));
|
77
77
|
}
|
78
78
|
/**
|
79
79
|
* StencilJS: Called once just after the component is fully loaded and the first render() occurs.
|