@esri/solutions-components 0.6.13 → 0.6.14
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/assets/t9n/layer-table/resources.json +1 -1
- package/dist/assets/t9n/layer-table/resources_en.json +1 -1
- package/dist/assets/t9n/map-layer-picker/resources.json +4 -0
- package/dist/assets/t9n/map-layer-picker/resources_en.json +4 -0
- package/dist/cjs/basemap-gallery_6.cjs.entry.js +20 -5
- package/dist/cjs/buffer-tools_4.cjs.entry.js +1 -1
- package/dist/cjs/calcite-chip_3.cjs.entry.js +803 -0
- package/dist/cjs/calcite-combobox_6.cjs.entry.js +76 -28
- package/dist/cjs/card-manager_3.cjs.entry.js +112 -54
- package/dist/cjs/crowdsource-manager.cjs.entry.js +18 -5
- package/dist/cjs/{downloadUtils-fb4744e0.js → downloadUtils-34a515ad.js} +2 -2
- package/dist/cjs/edit-card_2.cjs.entry.js +5 -0
- package/dist/cjs/{index.es-372e33de.js → index.es-0ba11065.js} +2 -2
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/map-select-tools_3.cjs.entry.js +3 -3
- package/dist/cjs/{mapViewUtils-a4dd36ec.js → mapViewUtils-a2884698.js} +39 -55
- package/dist/cjs/public-notification.cjs.entry.js +3 -3
- package/dist/cjs/{publicNotificationStore-b69862af.js → publicNotificationStore-610bd880.js} +0 -4
- package/dist/cjs/solutions-components.cjs.js +1 -1
- package/dist/collection/components/basemap-gallery/basemap-gallery.js +23 -1
- package/dist/collection/components/card-manager/card-manager.js +2 -2
- package/dist/collection/components/crowdsource-manager/crowdsource-manager.js +171 -5
- package/dist/collection/components/edit-card/edit-card.js +19 -0
- package/dist/collection/components/layer-table/layer-table.js +127 -47
- package/dist/collection/components/map-card/map-card.js +115 -5
- package/dist/collection/components/map-layer-picker/map-layer-picker.css +4 -0
- package/dist/collection/components/map-layer-picker/map-layer-picker.js +107 -27
- package/dist/collection/components/map-picker/map-picker.css +5 -1
- package/dist/collection/components/map-picker/map-picker.js +3 -3
- package/dist/collection/components/map-tools/map-tools.js +104 -1
- package/dist/collection/utils/interfaces.ts +12 -1
- package/dist/collection/utils/mapViewUtils.js +38 -52
- package/dist/collection/utils/mapViewUtils.ts +41 -57
- package/dist/collection/utils/publicNotificationStore.js +0 -4
- package/dist/collection/utils/publicNotificationStore.ts +0 -4
- package/dist/components/basemap-gallery2.js +2 -0
- package/dist/components/card-manager2.js +2 -2
- package/dist/components/crowdsource-manager.js +27 -6
- package/dist/components/edit-card2.js +5 -0
- package/dist/components/layer-table2.js +136 -78
- package/dist/components/map-card2.js +17 -5
- package/dist/components/map-layer-picker2.js +114 -52
- package/dist/components/map-picker2.js +4 -4
- package/dist/components/map-select-tools2.js +55 -43
- package/dist/components/map-tools2.js +20 -1
- package/dist/components/mapViewUtils.js +39 -53
- package/dist/components/public-notification.js +1 -1
- package/dist/components/publicNotificationStore.js +0 -4
- package/dist/components/refine-selection2.js +61 -49
- package/dist/esm/basemap-gallery_6.entry.js +20 -5
- package/dist/esm/buffer-tools_4.entry.js +1 -1
- package/dist/esm/calcite-chip_3.entry.js +797 -0
- package/dist/esm/calcite-combobox_6.entry.js +76 -28
- package/dist/esm/card-manager_3.entry.js +112 -54
- package/dist/esm/crowdsource-manager.entry.js +18 -5
- package/dist/esm/{downloadUtils-67c7a6c8.js → downloadUtils-ac67a786.js} +2 -2
- package/dist/esm/edit-card_2.entry.js +5 -0
- package/dist/esm/{index.es-59a67d3d.js → index.es-f553598f.js} +2 -2
- package/dist/esm/loader.js +1 -1
- package/dist/esm/map-select-tools_3.entry.js +3 -3
- package/dist/esm/{mapViewUtils-00a04d52.js → mapViewUtils-8141d8c1.js} +39 -53
- package/dist/esm/public-notification.entry.js +3 -3
- package/dist/esm/{publicNotificationStore-90a6a274.js → publicNotificationStore-dcf39a55.js} +0 -4
- package/dist/esm/solutions-components.js +1 -1
- package/dist/solutions-components/p-08b52ed8.entry.js +6 -0
- package/dist/solutions-components/p-16362eb4.js +36 -0
- package/dist/solutions-components/{p-3691a072.js → p-1ab414e0.js} +2 -2
- package/dist/solutions-components/{p-73ab9d9a.entry.js → p-3d7aa1b2.entry.js} +1 -1
- package/dist/solutions-components/{p-9a8c51bf.entry.js → p-57cf6784.entry.js} +1 -1
- package/dist/solutions-components/p-64b22d57.entry.js +6 -0
- package/dist/solutions-components/p-654dd5df.entry.js +6 -0
- package/dist/solutions-components/{p-f9166fcb.js → p-a26711e8.js} +1 -1
- package/dist/solutions-components/p-b1c8c6d7.entry.js +6 -0
- package/dist/solutions-components/{p-b892e595.entry.js → p-b9d29f30.entry.js} +1 -1
- package/dist/solutions-components/{p-1b41181b.js → p-c8d0ce92.js} +2 -2
- package/dist/solutions-components/{p-0219a1a9.entry.js → p-e76949eb.entry.js} +6 -6
- package/dist/solutions-components/p-ee7e2f00.entry.js +34 -0
- package/dist/solutions-components/solutions-components.esm.js +1 -1
- package/dist/solutions-components/utils/interfaces.ts +12 -1
- package/dist/solutions-components/utils/mapViewUtils.ts +41 -57
- package/dist/solutions-components/utils/publicNotificationStore.ts +0 -4
- package/dist/types/components/basemap-gallery/basemap-gallery.d.ts +5 -0
- package/dist/types/components/crowdsource-manager/crowdsource-manager.d.ts +37 -1
- package/dist/types/components/edit-card/edit-card.d.ts +8 -0
- package/dist/types/components/layer-table/layer-table.d.ts +40 -0
- package/dist/types/components/map-card/map-card.d.ts +25 -1
- package/dist/types/components/map-layer-picker/map-layer-picker.d.ts +50 -3
- package/dist/types/components/map-picker/map-picker.d.ts +2 -2
- package/dist/types/components/map-tools/map-tools.d.ts +21 -1
- package/dist/types/components.d.ts +182 -2
- package/dist/types/preact.d.ts +6 -3
- package/dist/types/utils/interfaces.d.ts +10 -1
- package/dist/types/utils/mapViewUtils.d.ts +8 -24
- package/dist/types/utils/publicNotificationStore.d.ts +0 -2
- package/package.json +1 -1
- package/dist/cjs/calcite-chip.cjs.entry.js +0 -259
- package/dist/cjs/calcite-notice.cjs.entry.js +0 -139
- package/dist/cjs/calcite-tooltip.cjs.entry.js +0 -439
- package/dist/esm/calcite-chip.entry.js +0 -255
- package/dist/esm/calcite-notice.entry.js +0 -135
- package/dist/esm/calcite-tooltip.entry.js +0 -435
- package/dist/solutions-components/p-2cff8331.entry.js +0 -6
- package/dist/solutions-components/p-3a6c8fc3.entry.js +0 -6
- package/dist/solutions-components/p-3b1fc7a2.entry.js +0 -6
- package/dist/solutions-components/p-767002cd.js +0 -36
- package/dist/solutions-components/p-a776b7e6.entry.js +0 -6
- package/dist/solutions-components/p-be36d5ed.entry.js +0 -22
- package/dist/solutions-components/p-c644edf5.entry.js +0 -11
- package/dist/solutions-components/p-cfd88a2f.entry.js +0 -11
@@ -4,39 +4,46 @@
|
|
4
4
|
* http://www.apache.org/licenses/LICENSE-2.0
|
5
5
|
*/
|
6
6
|
import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
7
|
-
import {
|
7
|
+
import { g as getLocaleComponentStrings } from './locale.js';
|
8
|
+
import { b as getMapLayerHash, c as getMapTableHash } from './mapViewUtils.js';
|
8
9
|
import { s as state } from './publicNotificationStore.js';
|
9
|
-
import { d as defineCustomElement$
|
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$
|
10
|
+
import { d as defineCustomElement$e } from './action.js';
|
11
|
+
import { d as defineCustomElement$d } from './button.js';
|
12
|
+
import { d as defineCustomElement$c } from './chip.js';
|
13
|
+
import { d as defineCustomElement$b } from './combobox.js';
|
14
|
+
import { d as defineCustomElement$a } from './combobox-item.js';
|
15
|
+
import { d as defineCustomElement$9 } from './dropdown.js';
|
16
|
+
import { d as defineCustomElement$8 } from './dropdown-group.js';
|
17
|
+
import { d as defineCustomElement$7 } from './dropdown-item.js';
|
18
|
+
import { d as defineCustomElement$6 } from './icon.js';
|
19
|
+
import { d as defineCustomElement$5 } from './loader.js';
|
20
|
+
import { d as defineCustomElement$4 } from './notice.js';
|
21
|
+
import { d as defineCustomElement$3 } from './option.js';
|
22
|
+
import { d as defineCustomElement$2 } from './select.js';
|
23
|
+
import { d as defineCustomElement$1 } from './tooltip.js';
|
21
24
|
|
22
|
-
const mapLayerPickerCss = ":host{display:block}.map-layer-picker-container{width:100%}.map-layer-picker{position:relative;width:100%;display:inline-block}.padding-bottom-1{padding-bottom:1rem}.layer-picker-dropdown{height:100%;width:100%}.max-width-350{max-width:350px}";
|
25
|
+
const mapLayerPickerCss = ":host{display:block}.map-layer-picker-container{width:100%}.map-layer-picker{position:relative;width:100%;display:inline-block}.padding-bottom-1{padding-bottom:1rem}.layer-picker-dropdown{height:100%;width:100%}.max-width-350{max-width:350px}.height-100{height:100%}";
|
23
26
|
|
24
27
|
const MapLayerPicker = /*@__PURE__*/ proxyCustomElement(class MapLayerPicker extends HTMLElement {
|
25
28
|
constructor() {
|
26
29
|
super();
|
27
30
|
this.__registerHost();
|
31
|
+
this.noLayersFound = createEvent(this, "noLayersFound", 7);
|
28
32
|
this.layerSelectionChange = createEvent(this, "layerSelectionChange", 7);
|
29
33
|
this.appearance = "transparent";
|
30
34
|
this.enabledLayerIds = [];
|
31
35
|
this.enabledTableIds = [];
|
32
36
|
this.mapView = undefined;
|
37
|
+
this.onlyShowUpdatableLayers = undefined;
|
33
38
|
this.placeholderIcon = "";
|
34
39
|
this.selectedIds = [];
|
35
40
|
this.scale = "m";
|
36
41
|
this.showTables = true;
|
37
42
|
this.type = "select";
|
43
|
+
this._hasValidLayers = true;
|
38
44
|
this.ids = [];
|
39
45
|
this.selectedName = "";
|
46
|
+
this._translations = undefined;
|
40
47
|
}
|
41
48
|
//--------------------------------------------------------------------------
|
42
49
|
//
|
@@ -49,10 +56,13 @@ const MapLayerPicker = /*@__PURE__*/ proxyCustomElement(class MapLayerPicker ext
|
|
49
56
|
*/
|
50
57
|
async mapViewWatchHandler() {
|
51
58
|
await this._setLayers();
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
59
|
+
if (this.ids.length > 0) {
|
60
|
+
this._hasValidLayers = true;
|
61
|
+
this._setSelectedLayer(this.ids[0]);
|
62
|
+
}
|
63
|
+
else {
|
64
|
+
this._hasValidLayers = false;
|
65
|
+
this.noLayersFound.emit();
|
56
66
|
}
|
57
67
|
}
|
58
68
|
//--------------------------------------------------------------------------
|
@@ -64,6 +74,7 @@ const MapLayerPicker = /*@__PURE__*/ proxyCustomElement(class MapLayerPicker ext
|
|
64
74
|
* StencilJS: Called once just after the component is first connected to the DOM.
|
65
75
|
*/
|
66
76
|
async componentWillLoad() {
|
77
|
+
await this._getTranslations();
|
67
78
|
await this._setLayers();
|
68
79
|
if (this.ids.length > 0 || this.selectedIds.length === 1) {
|
69
80
|
this.layerSelectionChange.emit(this.selectedIds.length === 1 ? [this.selectedIds[0]] : [this.ids[0]]);
|
@@ -73,7 +84,7 @@ const MapLayerPicker = /*@__PURE__*/ proxyCustomElement(class MapLayerPicker ext
|
|
73
84
|
* Renders the component.
|
74
85
|
*/
|
75
86
|
render() {
|
76
|
-
return (h(Host, null, h("div", { class: "map-layer-picker-container" }, h("div", { class: "map-layer-picker" }, this.type === "combobox" ? this._getCombobox() :
|
87
|
+
return (h(Host, null, h("div", { class: "map-layer-picker-container" }, h("div", { class: "map-layer-picker" }, !this._hasValidLayers ? this._getInvalidPlaceholder() : this.type === "combobox" ? this._getCombobox() :
|
77
88
|
this.type === "select" ? this._getSelect() : this._getDropdown()))));
|
78
89
|
}
|
79
90
|
/**
|
@@ -86,9 +97,9 @@ const MapLayerPicker = /*@__PURE__*/ proxyCustomElement(class MapLayerPicker ext
|
|
86
97
|
this._layerElement.value = id;
|
87
98
|
}
|
88
99
|
else if (this.type === "dropdown") {
|
89
|
-
this.selectedName = Object.keys(
|
90
|
-
|
91
|
-
|
100
|
+
this.selectedName = Object.keys(this._layerNameHash).indexOf(id) > -1 ?
|
101
|
+
this._layerNameHash[id].name : Object.keys(this._tableNameHash).indexOf(id) > -1 ?
|
102
|
+
this._tableNameHash[id].name : "";
|
92
103
|
}
|
93
104
|
}
|
94
105
|
}
|
@@ -97,6 +108,14 @@ const MapLayerPicker = /*@__PURE__*/ proxyCustomElement(class MapLayerPicker ext
|
|
97
108
|
// Functions (protected)
|
98
109
|
//
|
99
110
|
//--------------------------------------------------------------------------
|
111
|
+
/**
|
112
|
+
* Create a notice to inform the user that no layers were found
|
113
|
+
*
|
114
|
+
* @returns Calcite Notice component with the message
|
115
|
+
*/
|
116
|
+
_getInvalidPlaceholder() {
|
117
|
+
return (h("div", null, h("calcite-notice", { class: "height-100", icon: "exclamation-mark-triangle", id: "no-valid-layers", kind: "danger", open: true }, h("div", { slot: "message" }, this._translations.noLayersFound)), h("calcite-tooltip", { label: this._translations.enableEditUpdate, placement: "bottom", "reference-element": "no-valid-layers" }, h("span", null, this._translations.enableEditUpdate))));
|
118
|
+
}
|
100
119
|
/**
|
101
120
|
* Create a list of layers from the map
|
102
121
|
*
|
@@ -147,16 +166,21 @@ const MapLayerPicker = /*@__PURE__*/ proxyCustomElement(class MapLayerPicker ext
|
|
147
166
|
* @returns A dom node with the name of the layer or table
|
148
167
|
*/
|
149
168
|
_getItem(id, itemType) {
|
150
|
-
const
|
151
|
-
|
152
|
-
|
153
|
-
|
169
|
+
const item = itemType === "layer" ? this._layerNameHash[id] : this._tableNameHash[id];
|
170
|
+
const disabled = this.onlyShowUpdatableLayers ? !item.supportsUpdate : false;
|
171
|
+
const name = item.name;
|
172
|
+
return this.type === "combobox" ? (h("calcite-combobox-item", { disabled: disabled, textLabel: name, value: id })) :
|
173
|
+
this.type === "select" ? (h("calcite-option", { disabled: disabled, label: name, value: id })) :
|
174
|
+
(h("calcite-dropdown-item", { disabled: disabled, onClick: disabled ? undefined : () => void this._setSelectedLayer(id) }, name));
|
154
175
|
}
|
155
176
|
/**
|
156
177
|
* Store the layer name based on the user selection
|
157
178
|
*/
|
158
|
-
_setSelectedLayer(id
|
159
|
-
|
179
|
+
_setSelectedLayer(id) {
|
180
|
+
const item = Object.keys(this._layerNameHash).indexOf(id) > -1 ?
|
181
|
+
this._layerNameHash[id] : Object.keys(this._tableNameHash).indexOf(id) > -1 ?
|
182
|
+
this._tableNameHash[id] : undefined;
|
183
|
+
this.selectedName = item === null || item === void 0 ? void 0 : item.name;
|
160
184
|
this.selectedIds = [id];
|
161
185
|
this.layerSelectionChange.emit(this.selectedIds);
|
162
186
|
}
|
@@ -167,25 +191,38 @@ const MapLayerPicker = /*@__PURE__*/ proxyCustomElement(class MapLayerPicker ext
|
|
167
191
|
*/
|
168
192
|
async _setLayers() {
|
169
193
|
if (this.mapView) {
|
170
|
-
|
171
|
-
const
|
194
|
+
await this._initLayerTableHash();
|
195
|
+
const mapLayerIds = this.onlyShowUpdatableLayers ?
|
196
|
+
this._getEditableIds(this._layerNameHash) : Object.keys(this._layerNameHash);
|
197
|
+
const mapTableIds = this.showTables ? this.onlyShowUpdatableLayers ?
|
198
|
+
this._getEditableIds(this._tableNameHash) : Object.keys(this._tableNameHash) : [];
|
172
199
|
this.ids = [
|
173
200
|
...mapLayerIds.filter(n => { var _a; return ((_a = this.enabledLayerIds) === null || _a === void 0 ? void 0 : _a.length) > 0 ? this.enabledLayerIds.indexOf(n) > -1 : true; }),
|
174
201
|
...mapTableIds.filter(n => { var _a; return ((_a = this.enabledTableIds) === null || _a === void 0 ? void 0 : _a.length) > 0 ? this.enabledTableIds.indexOf(n) > -1 : true; }),
|
175
202
|
];
|
176
|
-
await this._initStateHash();
|
177
203
|
}
|
178
204
|
}
|
205
|
+
/**
|
206
|
+
* Fetch the ids of all layers that support edits with the update capability
|
207
|
+
*
|
208
|
+
* @returns array of layer ids
|
209
|
+
*/
|
210
|
+
_getEditableIds(hash) {
|
211
|
+
return Object.keys(hash).reduce((prev, cur) => {
|
212
|
+
if (hash[cur].supportsUpdate) {
|
213
|
+
prev.push(cur);
|
214
|
+
}
|
215
|
+
return prev;
|
216
|
+
}, []);
|
217
|
+
}
|
179
218
|
/**
|
180
219
|
* Create a layer id:title hash for layer name display
|
181
220
|
*
|
182
221
|
* @returns Promise when the operation has completed
|
183
222
|
*/
|
184
|
-
async
|
185
|
-
|
186
|
-
|
187
|
-
state.tableNameHash = this.showTables ? await getMapTableHash(this.mapView) : {};
|
188
|
-
}
|
223
|
+
async _initLayerTableHash() {
|
224
|
+
this._layerNameHash = await getMapLayerHash(this.mapView, this.onlyShowUpdatableLayers);
|
225
|
+
this._tableNameHash = this.showTables ? await getMapTableHash(this.mapView, this.onlyShowUpdatableLayers) : {};
|
189
226
|
}
|
190
227
|
/**
|
191
228
|
* Evaluate if the id exists in the current hash and verify if it should be excluded
|
@@ -193,9 +230,10 @@ const MapLayerPicker = /*@__PURE__*/ proxyCustomElement(class MapLayerPicker ext
|
|
193
230
|
* @returns boolean when true the layer will be used in the current layer picker type
|
194
231
|
*/
|
195
232
|
_validLayer(id) {
|
196
|
-
|
233
|
+
var _a;
|
234
|
+
const name = (_a = this._layerNameHash[id]) === null || _a === void 0 ? void 0 : _a.name;
|
197
235
|
return name && state.managedLayers.indexOf(name) < 0 && (this.enabledLayerIds.length > 0 ?
|
198
|
-
this.enabledLayerIds.indexOf(id) > -1 :
|
236
|
+
this.enabledLayerIds.indexOf(id) > -1 : true);
|
199
237
|
}
|
200
238
|
/**
|
201
239
|
* Evaluate if the id exists in the current hash and verify if it should be excluded
|
@@ -203,7 +241,8 @@ const MapLayerPicker = /*@__PURE__*/ proxyCustomElement(class MapLayerPicker ext
|
|
203
241
|
* @returns boolean when true the table will be used in the current layer picker type
|
204
242
|
*/
|
205
243
|
_validTable(id) {
|
206
|
-
|
244
|
+
var _a;
|
245
|
+
const name = (_a = this._tableNameHash[id]) === null || _a === void 0 ? void 0 : _a.name;
|
207
246
|
const validName = name && this.showTables;
|
208
247
|
return validName ? state.managedTables.indexOf(name) < 0 &&
|
209
248
|
(this.enabledTableIds.length > 0 ? this.enabledTableIds.indexOf(id) > -1 : true) : validName;
|
@@ -220,6 +259,16 @@ const MapLayerPicker = /*@__PURE__*/ proxyCustomElement(class MapLayerPicker ext
|
|
220
259
|
this.layerSelectionChange.emit(this.selectedIds);
|
221
260
|
}
|
222
261
|
}
|
262
|
+
/**
|
263
|
+
* Fetches the component's translations
|
264
|
+
*
|
265
|
+
* @returns Promise when complete
|
266
|
+
* @protected
|
267
|
+
*/
|
268
|
+
async _getTranslations() {
|
269
|
+
const messages = await getLocaleComponentStrings(this.el);
|
270
|
+
this._translations = messages[0];
|
271
|
+
}
|
223
272
|
get el() { return this; }
|
224
273
|
static get watchers() { return {
|
225
274
|
"mapView": ["mapViewWatchHandler"]
|
@@ -230,19 +279,22 @@ const MapLayerPicker = /*@__PURE__*/ proxyCustomElement(class MapLayerPicker ext
|
|
230
279
|
"enabledLayerIds": [16],
|
231
280
|
"enabledTableIds": [16],
|
232
281
|
"mapView": [16],
|
282
|
+
"onlyShowUpdatableLayers": [4, "only-show-updatable-layers"],
|
233
283
|
"placeholderIcon": [1, "placeholder-icon"],
|
234
284
|
"selectedIds": [1040],
|
235
285
|
"scale": [1],
|
236
286
|
"showTables": [4, "show-tables"],
|
237
287
|
"type": [1],
|
288
|
+
"_hasValidLayers": [32],
|
238
289
|
"ids": [32],
|
239
|
-
"selectedName": [32]
|
290
|
+
"selectedName": [32],
|
291
|
+
"_translations": [32]
|
240
292
|
}]);
|
241
293
|
function defineCustomElement() {
|
242
294
|
if (typeof customElements === "undefined") {
|
243
295
|
return;
|
244
296
|
}
|
245
|
-
const components = ["map-layer-picker", "calcite-action", "calcite-button", "calcite-chip", "calcite-combobox", "calcite-combobox-item", "calcite-dropdown", "calcite-dropdown-group", "calcite-dropdown-item", "calcite-icon", "calcite-loader", "calcite-option", "calcite-select"];
|
297
|
+
const components = ["map-layer-picker", "calcite-action", "calcite-button", "calcite-chip", "calcite-combobox", "calcite-combobox-item", "calcite-dropdown", "calcite-dropdown-group", "calcite-dropdown-item", "calcite-icon", "calcite-loader", "calcite-notice", "calcite-option", "calcite-select", "calcite-tooltip"];
|
246
298
|
components.forEach(tagName => { switch (tagName) {
|
247
299
|
case "map-layer-picker":
|
248
300
|
if (!customElements.get(tagName)) {
|
@@ -251,60 +303,70 @@ function defineCustomElement() {
|
|
251
303
|
break;
|
252
304
|
case "calcite-action":
|
253
305
|
if (!customElements.get(tagName)) {
|
254
|
-
defineCustomElement$
|
306
|
+
defineCustomElement$e();
|
255
307
|
}
|
256
308
|
break;
|
257
309
|
case "calcite-button":
|
258
310
|
if (!customElements.get(tagName)) {
|
259
|
-
defineCustomElement$
|
311
|
+
defineCustomElement$d();
|
260
312
|
}
|
261
313
|
break;
|
262
314
|
case "calcite-chip":
|
263
315
|
if (!customElements.get(tagName)) {
|
264
|
-
defineCustomElement$
|
316
|
+
defineCustomElement$c();
|
265
317
|
}
|
266
318
|
break;
|
267
319
|
case "calcite-combobox":
|
268
320
|
if (!customElements.get(tagName)) {
|
269
|
-
defineCustomElement$
|
321
|
+
defineCustomElement$b();
|
270
322
|
}
|
271
323
|
break;
|
272
324
|
case "calcite-combobox-item":
|
273
325
|
if (!customElements.get(tagName)) {
|
274
|
-
defineCustomElement$
|
326
|
+
defineCustomElement$a();
|
275
327
|
}
|
276
328
|
break;
|
277
329
|
case "calcite-dropdown":
|
278
330
|
if (!customElements.get(tagName)) {
|
279
|
-
defineCustomElement$
|
331
|
+
defineCustomElement$9();
|
280
332
|
}
|
281
333
|
break;
|
282
334
|
case "calcite-dropdown-group":
|
283
335
|
if (!customElements.get(tagName)) {
|
284
|
-
defineCustomElement$
|
336
|
+
defineCustomElement$8();
|
285
337
|
}
|
286
338
|
break;
|
287
339
|
case "calcite-dropdown-item":
|
288
340
|
if (!customElements.get(tagName)) {
|
289
|
-
defineCustomElement$
|
341
|
+
defineCustomElement$7();
|
290
342
|
}
|
291
343
|
break;
|
292
344
|
case "calcite-icon":
|
293
345
|
if (!customElements.get(tagName)) {
|
294
|
-
defineCustomElement$
|
346
|
+
defineCustomElement$6();
|
295
347
|
}
|
296
348
|
break;
|
297
349
|
case "calcite-loader":
|
298
350
|
if (!customElements.get(tagName)) {
|
299
|
-
defineCustomElement$
|
351
|
+
defineCustomElement$5();
|
352
|
+
}
|
353
|
+
break;
|
354
|
+
case "calcite-notice":
|
355
|
+
if (!customElements.get(tagName)) {
|
356
|
+
defineCustomElement$4();
|
300
357
|
}
|
301
358
|
break;
|
302
359
|
case "calcite-option":
|
303
360
|
if (!customElements.get(tagName)) {
|
304
|
-
defineCustomElement$
|
361
|
+
defineCustomElement$3();
|
305
362
|
}
|
306
363
|
break;
|
307
364
|
case "calcite-select":
|
365
|
+
if (!customElements.get(tagName)) {
|
366
|
+
defineCustomElement$2();
|
367
|
+
}
|
368
|
+
break;
|
369
|
+
case "calcite-tooltip":
|
308
370
|
if (!customElements.get(tagName)) {
|
309
371
|
defineCustomElement$1();
|
310
372
|
}
|
@@ -21,7 +21,7 @@ import { d as defineCustomElement$3 } from './progress.js';
|
|
21
21
|
import { d as defineCustomElement$2 } from './scrim.js';
|
22
22
|
import { d as defineCustomElement$1 } from './stack.js';
|
23
23
|
|
24
|
-
const mapPickerCss = ":host{display:block}.width-full{width:100%}.height-full{height:100%}.display-flex{display:flex}.border-bottom-1{border-width:0px;border-bottom-width:1px;border-style:solid;border-color:var(--calcite-ui-border-3)}.action-bar-size{height:51px;width:100%}.map-list{position:absolute;display:flex;flex-direction:column;overflow:hidden;animation:calcite-scrim-fade-in var(--calcite-internal-animation-timing-medium) ease-in-out;background-color:var(--calcite-
|
24
|
+
const mapPickerCss = ":host{display:block}.width-full{width:100%}.height-full{height:100%}.display-flex{display:flex}.border-bottom-1{border-width:0px;border-bottom-width:1px;border-style:solid;border-color:var(--calcite-ui-border-3)}.action-bar-size{height:51px;width:100%}.map-list{position:absolute;display:flex;flex-direction:column;overflow:hidden;animation:calcite-scrim-fade-in var(--calcite-internal-animation-timing-medium) ease-in-out;background-color:var(--calcite-ui-background);z-index:1000;width:100%;height:-moz-fit-content;height:fit-content}.display-none{display:none}.action-bar-color{background-color:var(--calcite-ui-border-3) !important}.align-center{align-items:center}";
|
25
25
|
|
26
26
|
const MapPicker = /*@__PURE__*/ proxyCustomElement(class MapPicker extends HTMLElement {
|
27
27
|
constructor() {
|
@@ -54,9 +54,9 @@ const MapPicker = /*@__PURE__*/ proxyCustomElement(class MapPicker extends HTMLE
|
|
54
54
|
/**
|
55
55
|
* Called each time the mapInfos prop is changed.
|
56
56
|
*/
|
57
|
-
mapInfosWatchHandler(v, oldV) {
|
57
|
+
async mapInfosWatchHandler(v, oldV) {
|
58
58
|
if (v && JSON.stringify(v) !== JSON.stringify(oldV)) {
|
59
|
-
this.
|
59
|
+
this._webMapSelected(v[0]);
|
60
60
|
}
|
61
61
|
}
|
62
62
|
//--------------------------------------------------------------------------
|
@@ -81,7 +81,7 @@ const MapPicker = /*@__PURE__*/ proxyCustomElement(class MapPicker extends HTMLE
|
|
81
81
|
/**
|
82
82
|
* Called once after the component has loaded
|
83
83
|
*/
|
84
|
-
componentDidLoad() {
|
84
|
+
async componentDidLoad() {
|
85
85
|
const webMapInfo = this.mapInfos && this.mapInfos.length > 0 ? this.mapInfos[0] : undefined;
|
86
86
|
if (webMapInfo) {
|
87
87
|
this._webMapSelected(webMapInfo);
|
@@ -5,32 +5,34 @@
|
|
5
5
|
*/
|
6
6
|
import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
7
7
|
import { l as loadModules } from './loadModules.js';
|
8
|
-
import {
|
8
|
+
import { a as goToSelection, h as highlightFeatures, d as getFeatureLayerView } from './mapViewUtils.js';
|
9
9
|
import { c as queryObjectIds, g as getQueryGeoms, d as queryFeaturesByGeometry } from './queryUtils.js';
|
10
10
|
import { E as EWorkflowType } from './interfaces.js';
|
11
11
|
import { s as state } from './publicNotificationStore.js';
|
12
12
|
import { a as getComponentClosestLanguage, g as getLocaleComponentStrings } from './locale.js';
|
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$
|
28
|
-
import { d as defineCustomElement$
|
29
|
-
import { d as defineCustomElement$
|
30
|
-
import { d as defineCustomElement$
|
31
|
-
import { d as defineCustomElement$
|
32
|
-
import { d as defineCustomElement$
|
33
|
-
import { d as defineCustomElement$
|
13
|
+
import { d as defineCustomElement$p } from './buffer-tools2.js';
|
14
|
+
import { d as defineCustomElement$o } from './action.js';
|
15
|
+
import { d as defineCustomElement$n } from './button.js';
|
16
|
+
import { d as defineCustomElement$m } from './chip.js';
|
17
|
+
import { d as defineCustomElement$l } from './combobox.js';
|
18
|
+
import { d as defineCustomElement$k } from './combobox-item.js';
|
19
|
+
import { d as defineCustomElement$j } from './dropdown.js';
|
20
|
+
import { d as defineCustomElement$i } from './dropdown-group.js';
|
21
|
+
import { d as defineCustomElement$h } from './dropdown-item.js';
|
22
|
+
import { d as defineCustomElement$g } from './graph.js';
|
23
|
+
import { d as defineCustomElement$f } from './icon.js';
|
24
|
+
import { d as defineCustomElement$e } from './input.js';
|
25
|
+
import { d as defineCustomElement$d } from './input-message.js';
|
26
|
+
import { d as defineCustomElement$c } from './label2.js';
|
27
|
+
import { d as defineCustomElement$b } from './loader.js';
|
28
|
+
import { d as defineCustomElement$a } from './notice.js';
|
29
|
+
import { d as defineCustomElement$9 } from './option.js';
|
30
|
+
import { d as defineCustomElement$8 } from './popover.js';
|
31
|
+
import { d as defineCustomElement$7 } from './progress.js';
|
32
|
+
import { d as defineCustomElement$6 } from './select.js';
|
33
|
+
import { d as defineCustomElement$5 } from './slider.js';
|
34
|
+
import { d as defineCustomElement$4 } from './switch.js';
|
35
|
+
import { d as defineCustomElement$3 } from './tooltip.js';
|
34
36
|
import { d as defineCustomElement$2 } from './map-draw-tools2.js';
|
35
37
|
import { d as defineCustomElement$1 } from './map-layer-picker2.js';
|
36
38
|
|
@@ -830,7 +832,7 @@ function defineCustomElement() {
|
|
830
832
|
if (typeof customElements === "undefined") {
|
831
833
|
return;
|
832
834
|
}
|
833
|
-
const components = ["map-select-tools", "buffer-tools", "calcite-action", "calcite-button", "calcite-chip", "calcite-combobox", "calcite-combobox-item", "calcite-dropdown", "calcite-dropdown-group", "calcite-dropdown-item", "calcite-graph", "calcite-icon", "calcite-input", "calcite-input-message", "calcite-label", "calcite-loader", "calcite-option", "calcite-popover", "calcite-progress", "calcite-select", "calcite-slider", "calcite-switch", "map-draw-tools", "map-layer-picker"];
|
835
|
+
const components = ["map-select-tools", "buffer-tools", "calcite-action", "calcite-button", "calcite-chip", "calcite-combobox", "calcite-combobox-item", "calcite-dropdown", "calcite-dropdown-group", "calcite-dropdown-item", "calcite-graph", "calcite-icon", "calcite-input", "calcite-input-message", "calcite-label", "calcite-loader", "calcite-notice", "calcite-option", "calcite-popover", "calcite-progress", "calcite-select", "calcite-slider", "calcite-switch", "calcite-tooltip", "map-draw-tools", "map-layer-picker"];
|
834
836
|
components.forEach(tagName => { switch (tagName) {
|
835
837
|
case "map-select-tools":
|
836
838
|
if (!customElements.get(tagName)) {
|
@@ -839,105 +841,115 @@ function defineCustomElement() {
|
|
839
841
|
break;
|
840
842
|
case "buffer-tools":
|
841
843
|
if (!customElements.get(tagName)) {
|
842
|
-
defineCustomElement$
|
844
|
+
defineCustomElement$p();
|
843
845
|
}
|
844
846
|
break;
|
845
847
|
case "calcite-action":
|
846
848
|
if (!customElements.get(tagName)) {
|
847
|
-
defineCustomElement$
|
849
|
+
defineCustomElement$o();
|
848
850
|
}
|
849
851
|
break;
|
850
852
|
case "calcite-button":
|
851
853
|
if (!customElements.get(tagName)) {
|
852
|
-
defineCustomElement$
|
854
|
+
defineCustomElement$n();
|
853
855
|
}
|
854
856
|
break;
|
855
857
|
case "calcite-chip":
|
856
858
|
if (!customElements.get(tagName)) {
|
857
|
-
defineCustomElement$
|
859
|
+
defineCustomElement$m();
|
858
860
|
}
|
859
861
|
break;
|
860
862
|
case "calcite-combobox":
|
861
863
|
if (!customElements.get(tagName)) {
|
862
|
-
defineCustomElement$
|
864
|
+
defineCustomElement$l();
|
863
865
|
}
|
864
866
|
break;
|
865
867
|
case "calcite-combobox-item":
|
866
868
|
if (!customElements.get(tagName)) {
|
867
|
-
defineCustomElement$
|
869
|
+
defineCustomElement$k();
|
868
870
|
}
|
869
871
|
break;
|
870
872
|
case "calcite-dropdown":
|
871
873
|
if (!customElements.get(tagName)) {
|
872
|
-
defineCustomElement$
|
874
|
+
defineCustomElement$j();
|
873
875
|
}
|
874
876
|
break;
|
875
877
|
case "calcite-dropdown-group":
|
876
878
|
if (!customElements.get(tagName)) {
|
877
|
-
defineCustomElement$
|
879
|
+
defineCustomElement$i();
|
878
880
|
}
|
879
881
|
break;
|
880
882
|
case "calcite-dropdown-item":
|
881
883
|
if (!customElements.get(tagName)) {
|
882
|
-
defineCustomElement$
|
884
|
+
defineCustomElement$h();
|
883
885
|
}
|
884
886
|
break;
|
885
887
|
case "calcite-graph":
|
886
888
|
if (!customElements.get(tagName)) {
|
887
|
-
defineCustomElement$
|
889
|
+
defineCustomElement$g();
|
888
890
|
}
|
889
891
|
break;
|
890
892
|
case "calcite-icon":
|
891
893
|
if (!customElements.get(tagName)) {
|
892
|
-
defineCustomElement$
|
894
|
+
defineCustomElement$f();
|
893
895
|
}
|
894
896
|
break;
|
895
897
|
case "calcite-input":
|
896
898
|
if (!customElements.get(tagName)) {
|
897
|
-
defineCustomElement$
|
899
|
+
defineCustomElement$e();
|
898
900
|
}
|
899
901
|
break;
|
900
902
|
case "calcite-input-message":
|
901
903
|
if (!customElements.get(tagName)) {
|
902
|
-
defineCustomElement$
|
904
|
+
defineCustomElement$d();
|
903
905
|
}
|
904
906
|
break;
|
905
907
|
case "calcite-label":
|
906
908
|
if (!customElements.get(tagName)) {
|
907
|
-
defineCustomElement$
|
909
|
+
defineCustomElement$c();
|
908
910
|
}
|
909
911
|
break;
|
910
912
|
case "calcite-loader":
|
911
913
|
if (!customElements.get(tagName)) {
|
912
|
-
defineCustomElement$
|
914
|
+
defineCustomElement$b();
|
915
|
+
}
|
916
|
+
break;
|
917
|
+
case "calcite-notice":
|
918
|
+
if (!customElements.get(tagName)) {
|
919
|
+
defineCustomElement$a();
|
913
920
|
}
|
914
921
|
break;
|
915
922
|
case "calcite-option":
|
916
923
|
if (!customElements.get(tagName)) {
|
917
|
-
defineCustomElement$
|
924
|
+
defineCustomElement$9();
|
918
925
|
}
|
919
926
|
break;
|
920
927
|
case "calcite-popover":
|
921
928
|
if (!customElements.get(tagName)) {
|
922
|
-
defineCustomElement$
|
929
|
+
defineCustomElement$8();
|
923
930
|
}
|
924
931
|
break;
|
925
932
|
case "calcite-progress":
|
926
933
|
if (!customElements.get(tagName)) {
|
927
|
-
defineCustomElement$
|
934
|
+
defineCustomElement$7();
|
928
935
|
}
|
929
936
|
break;
|
930
937
|
case "calcite-select":
|
931
938
|
if (!customElements.get(tagName)) {
|
932
|
-
defineCustomElement$
|
939
|
+
defineCustomElement$6();
|
933
940
|
}
|
934
941
|
break;
|
935
942
|
case "calcite-slider":
|
936
943
|
if (!customElements.get(tagName)) {
|
937
|
-
defineCustomElement$
|
944
|
+
defineCustomElement$5();
|
938
945
|
}
|
939
946
|
break;
|
940
947
|
case "calcite-switch":
|
948
|
+
if (!customElements.get(tagName)) {
|
949
|
+
defineCustomElement$4();
|
950
|
+
}
|
951
|
+
break;
|
952
|
+
case "calcite-tooltip":
|
941
953
|
if (!customElements.get(tagName)) {
|
942
954
|
defineCustomElement$3();
|
943
955
|
}
|
@@ -21,6 +21,11 @@ const MapTools = /*@__PURE__*/ proxyCustomElement(class MapTools extends HTMLEle
|
|
21
21
|
super();
|
22
22
|
this.__registerHost();
|
23
23
|
this.__attachShadow();
|
24
|
+
this.enableLegend = undefined;
|
25
|
+
this.enableFullscreen = undefined;
|
26
|
+
this.enableSearch = undefined;
|
27
|
+
this.enableBasemap = undefined;
|
28
|
+
this.basemapConfig = undefined;
|
24
29
|
this.layout = "vertical";
|
25
30
|
this.mapView = undefined;
|
26
31
|
this.searchConfiguration = undefined;
|
@@ -124,7 +129,16 @@ const MapTools = /*@__PURE__*/ proxyCustomElement(class MapTools extends HTMLEle
|
|
124
129
|
const fullscreenIcon = this._showFullscreen ? "full-screen-exit" : "full-screen";
|
125
130
|
const fullscreenTip = this._showFullscreen ? this._translations.exitFullscreen : this._translations.enterFullscreen;
|
126
131
|
const expandTip = this._showTools ? this._translations.collapse : this._translations.expand;
|
127
|
-
|
132
|
+
const containerClass = !this.enableBasemap && !this.enableFullscreen && !this.enableLegend && !this.enableSearch ? "display-none" : "";
|
133
|
+
return (h(Host, null, h("div", { class: containerClass }, h("div", { class: "box-shadow" }, this._getActionGroup(toggleIcon, false, expandTip, () => this._toggleTools())), h("div", { class: `margin-top-1-2 box-shadow ${toolsClass}` }, this.enableLegend ?
|
134
|
+
this._getActionGroup("legend", false, this._translations.legend, () => this._showLegend()) :
|
135
|
+
undefined, this.enableSearch ?
|
136
|
+
this._getActionGroup("magnifying-glass", false, this._translations.search, () => this._search()) :
|
137
|
+
undefined, this.enableFullscreen ?
|
138
|
+
this._getActionGroup(fullscreenIcon, false, fullscreenTip, () => this._expand()) :
|
139
|
+
undefined, this.enableBasemap ?
|
140
|
+
this._getActionGroup("basemap", false, this._translations.basemap, () => this._toggleBasemapPicker()) :
|
141
|
+
undefined)), h("basemap-gallery", { basemapConfig: this.basemapConfig, class: basemapClass, mapView: this.mapView, ref: (el) => { this._basemapElement = el; } }), h("map-search", { class: searchClass, mapView: this.mapView, ref: (el) => { this._searchElement = el; }, searchConfiguration: this.searchConfiguration }), h("map-legend", { class: legendClass, mapView: this.mapView, ref: (el) => { this._legendElement = el; } }), h("map-fullscreen", { class: fullscreenClass, mapView: this.mapView, ref: (el) => { this._fullscreenElement = el; } })));
|
128
142
|
}
|
129
143
|
//--------------------------------------------------------------------------
|
130
144
|
//
|
@@ -211,6 +225,11 @@ const MapTools = /*@__PURE__*/ proxyCustomElement(class MapTools extends HTMLEle
|
|
211
225
|
}; }
|
212
226
|
static get style() { return mapToolsCss; }
|
213
227
|
}, [1, "map-tools", {
|
228
|
+
"enableLegend": [4, "enable-legend"],
|
229
|
+
"enableFullscreen": [4, "enable-fullscreen"],
|
230
|
+
"enableSearch": [4, "enable-search"],
|
231
|
+
"enableBasemap": [4, "enable-basemap"],
|
232
|
+
"basemapConfig": [16],
|
214
233
|
"layout": [1],
|
215
234
|
"mapView": [16],
|
216
235
|
"searchConfiguration": [16],
|