@esri/solutions-components 0.7.4 → 0.7.5
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/assets/t9n/map-tools/resources.json +2 -2
- package/dist/assets/t9n/map-tools/resources_en.json +2 -2
- package/dist/cjs/basemap-gallery_7.cjs.entry.js +38 -20
- package/dist/cjs/calcite-alert_3.cjs.entry.js +17 -13
- package/dist/cjs/card-manager_3.cjs.entry.js +9 -9
- package/dist/cjs/crowdsource-manager.cjs.entry.js +30 -5
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/solutions-components.cjs.js +1 -1
- package/dist/collection/components/crowdsource-manager/crowdsource-manager.js +70 -5
- package/dist/collection/components/edit-card/edit-card.js +30 -13
- package/dist/collection/components/info-card/info-card.js +12 -0
- package/dist/collection/components/layer-table/layer-table.css +7 -1
- package/dist/collection/components/layer-table/layer-table.js +7 -7
- package/dist/collection/components/map-card/map-card.js +1 -1
- package/dist/collection/components/map-fullscreen/map-fullscreen.js +33 -17
- package/dist/collection/components/map-tools/map-tools.js +22 -3
- package/dist/components/crowdsource-manager.js +34 -5
- package/dist/components/edit-card2.js +11 -13
- package/dist/components/info-card2.js +7 -1
- package/dist/components/layer-table2.js +8 -8
- package/dist/components/map-card2.js +1 -1
- package/dist/components/map-fullscreen2.js +17 -18
- package/dist/components/map-tools2.js +22 -3
- package/dist/esm/basemap-gallery_7.entry.js +38 -20
- package/dist/esm/calcite-alert_3.entry.js +17 -13
- package/dist/esm/card-manager_3.entry.js +9 -9
- package/dist/esm/crowdsource-manager.entry.js +30 -5
- package/dist/esm/loader.js +1 -1
- package/dist/esm/solutions-components.js +1 -1
- package/dist/solutions-components/{p-3272b303.entry.js → p-14236e25.entry.js} +1 -1
- package/dist/solutions-components/p-4b3ebd24.entry.js +6 -0
- package/dist/solutions-components/p-a4a0c7c5.entry.js +6 -0
- package/dist/solutions-components/p-b070bd54.entry.js +6 -0
- package/dist/solutions-components/solutions-components.esm.js +1 -1
- package/dist/types/components/crowdsource-manager/crowdsource-manager.d.ts +27 -2
- package/dist/types/components/edit-card/edit-card.d.ts +5 -0
- package/dist/types/components/info-card/info-card.d.ts +4 -0
- package/dist/types/components/layer-table/layer-table.d.ts +1 -1
- package/dist/types/components/map-fullscreen/map-fullscreen.d.ts +14 -1
- package/dist/types/components/map-tools/map-tools.d.ts +8 -0
- package/dist/types/components.d.ts +40 -0
- package/dist/types/preact.d.ts +5 -2
- package/package.json +1 -1
- package/dist/solutions-components/p-089dc6bf.entry.js +0 -6
- package/dist/solutions-components/p-dfb33c83.entry.js +0 -6
- package/dist/solutions-components/p-ed254530.entry.js +0 -6
@@ -86,6 +86,12 @@ const InfoCard = /*@__PURE__*/ proxyCustomElement(class InfoCard extends HTMLEle
|
|
86
86
|
async closeEdit() {
|
87
87
|
this._editRecordOpen = false;
|
88
88
|
}
|
89
|
+
/**
|
90
|
+
* Refresh the info-card graphics
|
91
|
+
*/
|
92
|
+
async refreshGraphics(evt) {
|
93
|
+
this.graphics = [...evt.detail];
|
94
|
+
}
|
89
95
|
//--------------------------------------------------------------------------
|
90
96
|
//
|
91
97
|
// Functions (lifecycle)
|
@@ -268,7 +274,7 @@ const InfoCard = /*@__PURE__*/ proxyCustomElement(class InfoCard extends HTMLEle
|
|
268
274
|
"_showListView": [32],
|
269
275
|
"_translations": [32],
|
270
276
|
"getSelectedFeature": [64]
|
271
|
-
}, [[8, "closeEdit", "closeEdit"]], {
|
277
|
+
}, [[8, "closeEdit", "closeEdit"], [8, "refreshGraphics", "refreshGraphics"]], {
|
272
278
|
"graphics": ["graphicsWatchHandler"],
|
273
279
|
"mapView": ["mapViewWatchHandler"]
|
274
280
|
}]);
|
@@ -34,7 +34,7 @@ import { d as defineCustomElement$3 } from './tooltip.js';
|
|
34
34
|
import { d as defineCustomElement$2 } from './instant-apps-social-share2.js';
|
35
35
|
import { d as defineCustomElement$1 } from './map-layer-picker2.js';
|
36
36
|
|
37
|
-
const layerTableCss = ":host{display:block}.height-full{height:100%}.height-full-adjusted{height:calc(100% - 20px)}.width-full{width:100%}.display-flex{display:flex}.table-border{border:1px solid var(--calcite-ui-border-2)}.border-end{border-inline-end:1px solid var(--calcite-ui-border-2)}.border-bottom{border-bottom:1px solid var(--calcite-ui-border-2)}.padding-5{padding:5px}.padding-end-1{padding-inline-end:1rem}.height-51{height:51px}.height-50-px{height:50px}.bottom-left{position:absolute;left:0;bottom:0;padding-left:5px}html[dir=\"rtl\"] .bottom-left{position:absolute;right:0;bottom:0;padding-right:5px}.height-19{height:19px}.background{background-color:var(--calcite-ui-background)}.text-color{color:var(--calcite-ui-text-1)}.align-center{align-items:center}.danger-color{color:var(--calcite-ui-danger)}.esri-feature-table vaadin-grid{border:none !important}vaadin-grid-cell-content{padding:var(--lumo-space-xs) var(--lumo-space-m) !important;font-size:14px !important}.share-action{position:absolute;right:0;margin-top:
|
37
|
+
const layerTableCss = ":host{display:block}.height-full{height:100%}.height-full-adjusted{height:calc(100% - 20px)}.width-full{width:100%}.display-flex{display:flex}.table-border{border:1px solid var(--calcite-ui-border-2)}.border-end{border-inline-end:1px solid var(--calcite-ui-border-2)}.border-bottom{border-bottom:1px solid var(--calcite-ui-border-2)}.padding-5{padding:5px}.padding-end-1{padding-inline-end:1rem}.height-51{height:51px}.height-50-px{height:50px}.bottom-left{position:absolute;left:0;bottom:0;padding-left:5px}html[dir=\"rtl\"] .bottom-left{position:absolute;right:0;bottom:0;padding-right:5px}.height-19{height:19px}.background{background-color:var(--calcite-ui-background)}.text-color{color:var(--calcite-ui-text-1)}.align-center{align-items:center}.danger-color{color:var(--calcite-ui-danger)}.esri-feature-table vaadin-grid{border:none !important}vaadin-grid-cell-content{padding:var(--lumo-space-xs) var(--lumo-space-m) !important;font-size:14px !important}.share-action{position:absolute;right:0;margin-top:4px;margin-inline-end:4px;margin-bottom:4px}html[dir=\"rtl\"] .share-action{left:0}.disabled{cursor:default !important;-webkit-user-select:none;-moz-user-select:none;user-select:none;opacity:var(--calcite-ui-opacity-disabled);pointer-events:none}.instant-app-share{height:42px !important;display:inline-flex}";
|
38
38
|
|
39
39
|
const LayerTable = /*@__PURE__*/ proxyCustomElement(class LayerTable extends HTMLElement {
|
40
40
|
constructor() {
|
@@ -628,7 +628,7 @@ const LayerTable = /*@__PURE__*/ proxyCustomElement(class LayerTable extends HTM
|
|
628
628
|
* @returns VNode The node representing the DOM element that will contain the action
|
629
629
|
*/
|
630
630
|
_getShare(icon) {
|
631
|
-
return (h("div", { class: "share-action", id: this._getId(icon) }, h("instant-apps-social-share", { autoUpdateShareUrl: false, popoverButtonIconScale: "s", ref: el => this._shareNode = el, scale: "m", shareButtonColor: "neutral", socialMedia: true, view: this.mapView }), this._getToolTip("bottom", icon, this._translations.share)));
|
631
|
+
return (h("div", { class: "share-action", id: this._getId(icon) }, h("instant-apps-social-share", { autoUpdateShareUrl: false, class: "instant-app-share", popoverButtonIconScale: "s", ref: el => this._shareNode = el, scale: "m", shareButtonColor: "neutral", socialMedia: true, view: this.mapView }), this._getToolTip("bottom", icon, this._translations.share)));
|
632
632
|
}
|
633
633
|
/**
|
634
634
|
* Called each time the values that are used for custom url params change
|
@@ -747,11 +747,11 @@ const LayerTable = /*@__PURE__*/ proxyCustomElement(class LayerTable extends HTM
|
|
747
747
|
* @returns void
|
748
748
|
*/
|
749
749
|
async _resetTable() {
|
750
|
-
var _a
|
750
|
+
var _a;
|
751
751
|
this._clearSelection();
|
752
752
|
this._allIds = [];
|
753
753
|
this.featureSelectionChange.emit(this._selectedIndexes);
|
754
|
-
const columnTemplates = this._getColumnTemplates(this._layer.id, (
|
754
|
+
const columnTemplates = this._getColumnTemplates(this._layer.id, (_a = this._layer) === null || _a === void 0 ? void 0 : _a.fields);
|
755
755
|
this._allIds = await queryAllIds(this._layer);
|
756
756
|
if (!this._table) {
|
757
757
|
await this._getTable(this._tableNode, columnTemplates);
|
@@ -1082,8 +1082,8 @@ const LayerTable = /*@__PURE__*/ proxyCustomElement(class LayerTable extends HTM
|
|
1082
1082
|
if (fieldInfos) {
|
1083
1083
|
columnTemplates = columnTemplates ? columnTemplates.map(columnTemplate => {
|
1084
1084
|
fieldInfos.some(fieldInfo => {
|
1085
|
-
if (fieldInfo.
|
1086
|
-
columnTemplate.label = fieldInfo.
|
1085
|
+
if (fieldInfo.name === columnTemplate.fieldName) {
|
1086
|
+
columnTemplate.label = fieldInfo.alias;
|
1087
1087
|
return true;
|
1088
1088
|
}
|
1089
1089
|
});
|
@@ -1091,8 +1091,8 @@ const LayerTable = /*@__PURE__*/ proxyCustomElement(class LayerTable extends HTM
|
|
1091
1091
|
}) : fieldInfos.map(fieldInfo => {
|
1092
1092
|
return {
|
1093
1093
|
type: "field",
|
1094
|
-
fieldName: fieldInfo.
|
1095
|
-
label: fieldInfo.
|
1094
|
+
fieldName: fieldInfo.name,
|
1095
|
+
label: fieldInfo.alias
|
1096
1096
|
};
|
1097
1097
|
});
|
1098
1098
|
}
|
@@ -144,7 +144,7 @@ const MapCard = /*@__PURE__*/ proxyCustomElement(class MapCard extends HTMLEleme
|
|
144
144
|
this.mapView = new this.MapView({
|
145
145
|
container: this._mapDiv,
|
146
146
|
map: webMap,
|
147
|
-
resizeAlign: "
|
147
|
+
resizeAlign: "center"
|
148
148
|
});
|
149
149
|
this._loadedId = id;
|
150
150
|
this._searchConfiguration = this._webMapInfo.searchConfiguration;
|
@@ -3,7 +3,7 @@
|
|
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, h, Host } from '@stencil/core/internal/client';
|
6
|
+
import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
7
7
|
import { l as loadModules } from './loadModules.js';
|
8
8
|
|
9
9
|
const mapFullscreenCss = ":host{display:block}";
|
@@ -13,6 +13,7 @@ const MapFullscreen = /*@__PURE__*/ proxyCustomElement(class MapFullscreen exten
|
|
13
13
|
super();
|
14
14
|
this.__registerHost();
|
15
15
|
this.__attachShadow();
|
16
|
+
this.fullscreenStateChange = createEvent(this, "fullscreenStateChange", 7);
|
16
17
|
this.mapView = undefined;
|
17
18
|
this.fullscreenWidget = undefined;
|
18
19
|
}
|
@@ -27,22 +28,12 @@ const MapFullscreen = /*@__PURE__*/ proxyCustomElement(class MapFullscreen exten
|
|
27
28
|
* @returns Promise when complete
|
28
29
|
*/
|
29
30
|
async mapViewWatchHandler() {
|
30
|
-
await this.mapView.when(() => {
|
31
|
-
this._initFullscreenWidget();
|
31
|
+
await this.mapView.when(async () => {
|
32
|
+
await this._initFullscreenWidget();
|
32
33
|
});
|
33
34
|
}
|
34
35
|
//--------------------------------------------------------------------------
|
35
36
|
//
|
36
|
-
// Methods (public)
|
37
|
-
//
|
38
|
-
//--------------------------------------------------------------------------
|
39
|
-
//--------------------------------------------------------------------------
|
40
|
-
//
|
41
|
-
// Events (public)
|
42
|
-
//
|
43
|
-
//--------------------------------------------------------------------------
|
44
|
-
//--------------------------------------------------------------------------
|
45
|
-
//
|
46
37
|
// Functions (lifecycle)
|
47
38
|
//
|
48
39
|
//--------------------------------------------------------------------------
|
@@ -63,13 +54,13 @@ const MapFullscreen = /*@__PURE__*/ proxyCustomElement(class MapFullscreen exten
|
|
63
54
|
* It's never called during the first render().
|
64
55
|
*/
|
65
56
|
async componentDidUpdate() {
|
66
|
-
this._initFullscreenWidget();
|
57
|
+
await this._initFullscreenWidget();
|
67
58
|
}
|
68
59
|
/**
|
69
60
|
* StencilJS: Called once just after the component is fully loaded and the first render() occurs.
|
70
61
|
*/
|
71
62
|
async componentDidLoad() {
|
72
|
-
this._initFullscreenWidget();
|
63
|
+
await this._initFullscreenWidget();
|
73
64
|
}
|
74
65
|
//--------------------------------------------------------------------------
|
75
66
|
//
|
@@ -84,21 +75,29 @@ const MapFullscreen = /*@__PURE__*/ proxyCustomElement(class MapFullscreen exten
|
|
84
75
|
* @protected
|
85
76
|
*/
|
86
77
|
async _initModules() {
|
87
|
-
const [Fullscreen] = await loadModules([
|
88
|
-
"esri/widgets/Fullscreen"
|
78
|
+
const [Fullscreen, reactiveUtils] = await loadModules([
|
79
|
+
"esri/widgets/Fullscreen",
|
80
|
+
"esri/core/reactiveUtils"
|
89
81
|
]);
|
90
82
|
this.Fullscreen = Fullscreen;
|
83
|
+
this.reactiveUtils = reactiveUtils;
|
91
84
|
}
|
92
85
|
/**
|
93
86
|
* Initialize the search widget
|
94
87
|
*
|
95
88
|
* @protected
|
96
89
|
*/
|
97
|
-
_initFullscreenWidget() {
|
90
|
+
async _initFullscreenWidget() {
|
98
91
|
if (this.mapView && this._fullscreenElement && !this.fullscreenWidget) {
|
99
92
|
this.fullscreenWidget = new this.Fullscreen({
|
100
93
|
view: this.mapView
|
101
94
|
});
|
95
|
+
await this.fullscreenWidget.when(() => {
|
96
|
+
if (this._fullscreenStateChangeHandle) {
|
97
|
+
this._fullscreenStateChangeHandle.remove();
|
98
|
+
}
|
99
|
+
this._fullscreenStateChangeHandle = this.reactiveUtils.watch(() => this.fullscreenWidget.viewModel.state, (state) => this.fullscreenStateChange.emit(state));
|
100
|
+
});
|
102
101
|
}
|
103
102
|
else if (this.fullscreenWidget) {
|
104
103
|
this.fullscreenWidget.view = this.mapView;
|
@@ -89,10 +89,14 @@ const MapTools = /*@__PURE__*/ proxyCustomElement(class MapTools extends HTMLEle
|
|
89
89
|
async _showFullscreenWatchHandler(v) {
|
90
90
|
const fs = this._fullscreenElement.fullscreenWidget;
|
91
91
|
if (v) {
|
92
|
-
fs.viewModel.
|
92
|
+
if (fs.viewModel.state === "ready") {
|
93
|
+
fs.viewModel.enter();
|
94
|
+
}
|
93
95
|
}
|
94
96
|
else {
|
95
|
-
fs.viewModel.
|
97
|
+
if (fs.viewModel.state === "active") {
|
98
|
+
fs.viewModel.exit();
|
99
|
+
}
|
96
100
|
}
|
97
101
|
}
|
98
102
|
/**
|
@@ -169,7 +173,22 @@ const MapTools = /*@__PURE__*/ proxyCustomElement(class MapTools extends HTMLEle
|
|
169
173
|
this._getActionGroup("basemap", false, this._translations.basemap, () => this._toggleBasemapPicker()) :
|
170
174
|
undefined, this.enableFloorFilter && this._hasFloorInfo ?
|
171
175
|
this._getActionGroup("urban-model", false, this._translations.floorFilter, () => this._toggleFloorFilter()) :
|
172
|
-
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; }, resultGraphicEnabled: true, 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; } }), h("floor-filter", { class: floorFilterClass, enabled: this.enableFloorFilter, mapView: this.mapView, ref: (el) => { this._floorFilterElement = el; } })));
|
176
|
+
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; }, resultGraphicEnabled: true, searchConfiguration: this.searchConfiguration }), h("map-legend", { class: legendClass, mapView: this.mapView, ref: (el) => { this._legendElement = el; } }), h("map-fullscreen", { class: fullscreenClass, mapView: this.mapView, onFullscreenStateChange: (evt) => this._fullscreenStateChange(evt.detail), ref: (el) => { this._fullscreenElement = el; } }), h("floor-filter", { class: floorFilterClass, enabled: this.enableFloorFilter, mapView: this.mapView, ref: (el) => { this._floorFilterElement = el; } })));
|
177
|
+
}
|
178
|
+
/**
|
179
|
+
* Respond to fullscreen state change and ensure our state var is in sync
|
180
|
+
*
|
181
|
+
* @param state The fullscreen view model's state.
|
182
|
+
*
|
183
|
+
* @protected
|
184
|
+
*/
|
185
|
+
_fullscreenStateChange(state) {
|
186
|
+
if (state === "ready" && this._showFullscreen) {
|
187
|
+
this._showFullscreen = false;
|
188
|
+
}
|
189
|
+
else if (state === "active" && !this._showFullscreen) {
|
190
|
+
this._showFullscreen = true;
|
191
|
+
}
|
173
192
|
}
|
174
193
|
//--------------------------------------------------------------------------
|
175
194
|
//
|
@@ -211,6 +211,7 @@ const mapFullscreenCss = ":host{display:block}";
|
|
211
211
|
const MapFullscreen = class {
|
212
212
|
constructor(hostRef) {
|
213
213
|
registerInstance(this, hostRef);
|
214
|
+
this.fullscreenStateChange = createEvent(this, "fullscreenStateChange", 7);
|
214
215
|
this.mapView = undefined;
|
215
216
|
this.fullscreenWidget = undefined;
|
216
217
|
}
|
@@ -225,22 +226,12 @@ const MapFullscreen = class {
|
|
225
226
|
* @returns Promise when complete
|
226
227
|
*/
|
227
228
|
async mapViewWatchHandler() {
|
228
|
-
await this.mapView.when(() => {
|
229
|
-
this._initFullscreenWidget();
|
229
|
+
await this.mapView.when(async () => {
|
230
|
+
await this._initFullscreenWidget();
|
230
231
|
});
|
231
232
|
}
|
232
233
|
//--------------------------------------------------------------------------
|
233
234
|
//
|
234
|
-
// Methods (public)
|
235
|
-
//
|
236
|
-
//--------------------------------------------------------------------------
|
237
|
-
//--------------------------------------------------------------------------
|
238
|
-
//
|
239
|
-
// Events (public)
|
240
|
-
//
|
241
|
-
//--------------------------------------------------------------------------
|
242
|
-
//--------------------------------------------------------------------------
|
243
|
-
//
|
244
235
|
// Functions (lifecycle)
|
245
236
|
//
|
246
237
|
//--------------------------------------------------------------------------
|
@@ -261,13 +252,13 @@ const MapFullscreen = class {
|
|
261
252
|
* It's never called during the first render().
|
262
253
|
*/
|
263
254
|
async componentDidUpdate() {
|
264
|
-
this._initFullscreenWidget();
|
255
|
+
await this._initFullscreenWidget();
|
265
256
|
}
|
266
257
|
/**
|
267
258
|
* StencilJS: Called once just after the component is fully loaded and the first render() occurs.
|
268
259
|
*/
|
269
260
|
async componentDidLoad() {
|
270
|
-
this._initFullscreenWidget();
|
261
|
+
await this._initFullscreenWidget();
|
271
262
|
}
|
272
263
|
//--------------------------------------------------------------------------
|
273
264
|
//
|
@@ -282,21 +273,29 @@ const MapFullscreen = class {
|
|
282
273
|
* @protected
|
283
274
|
*/
|
284
275
|
async _initModules() {
|
285
|
-
const [Fullscreen] = await loadModules([
|
286
|
-
"esri/widgets/Fullscreen"
|
276
|
+
const [Fullscreen, reactiveUtils] = await loadModules([
|
277
|
+
"esri/widgets/Fullscreen",
|
278
|
+
"esri/core/reactiveUtils"
|
287
279
|
]);
|
288
280
|
this.Fullscreen = Fullscreen;
|
281
|
+
this.reactiveUtils = reactiveUtils;
|
289
282
|
}
|
290
283
|
/**
|
291
284
|
* Initialize the search widget
|
292
285
|
*
|
293
286
|
* @protected
|
294
287
|
*/
|
295
|
-
_initFullscreenWidget() {
|
288
|
+
async _initFullscreenWidget() {
|
296
289
|
if (this.mapView && this._fullscreenElement && !this.fullscreenWidget) {
|
297
290
|
this.fullscreenWidget = new this.Fullscreen({
|
298
291
|
view: this.mapView
|
299
292
|
});
|
293
|
+
await this.fullscreenWidget.when(() => {
|
294
|
+
if (this._fullscreenStateChangeHandle) {
|
295
|
+
this._fullscreenStateChangeHandle.remove();
|
296
|
+
}
|
297
|
+
this._fullscreenStateChangeHandle = this.reactiveUtils.watch(() => this.fullscreenWidget.viewModel.state, (state) => this.fullscreenStateChange.emit(state));
|
298
|
+
});
|
300
299
|
}
|
301
300
|
else if (this.fullscreenWidget) {
|
302
301
|
this.fullscreenWidget.view = this.mapView;
|
@@ -809,10 +808,14 @@ const MapTools = class {
|
|
809
808
|
async _showFullscreenWatchHandler(v) {
|
810
809
|
const fs = this._fullscreenElement.fullscreenWidget;
|
811
810
|
if (v) {
|
812
|
-
fs.viewModel.
|
811
|
+
if (fs.viewModel.state === "ready") {
|
812
|
+
fs.viewModel.enter();
|
813
|
+
}
|
813
814
|
}
|
814
815
|
else {
|
815
|
-
fs.viewModel.
|
816
|
+
if (fs.viewModel.state === "active") {
|
817
|
+
fs.viewModel.exit();
|
818
|
+
}
|
816
819
|
}
|
817
820
|
}
|
818
821
|
/**
|
@@ -889,7 +892,22 @@ const MapTools = class {
|
|
889
892
|
this._getActionGroup("basemap", false, this._translations.basemap, () => this._toggleBasemapPicker()) :
|
890
893
|
undefined, this.enableFloorFilter && this._hasFloorInfo ?
|
891
894
|
this._getActionGroup("urban-model", false, this._translations.floorFilter, () => this._toggleFloorFilter()) :
|
892
|
-
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; }, resultGraphicEnabled: true, 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; } }), h("floor-filter", { class: floorFilterClass, enabled: this.enableFloorFilter, mapView: this.mapView, ref: (el) => { this._floorFilterElement = el; } })));
|
895
|
+
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; }, resultGraphicEnabled: true, searchConfiguration: this.searchConfiguration }), h("map-legend", { class: legendClass, mapView: this.mapView, ref: (el) => { this._legendElement = el; } }), h("map-fullscreen", { class: fullscreenClass, mapView: this.mapView, onFullscreenStateChange: (evt) => this._fullscreenStateChange(evt.detail), ref: (el) => { this._fullscreenElement = el; } }), h("floor-filter", { class: floorFilterClass, enabled: this.enableFloorFilter, mapView: this.mapView, ref: (el) => { this._floorFilterElement = el; } })));
|
896
|
+
}
|
897
|
+
/**
|
898
|
+
* Respond to fullscreen state change and ensure our state var is in sync
|
899
|
+
*
|
900
|
+
* @param state The fullscreen view model's state.
|
901
|
+
*
|
902
|
+
* @protected
|
903
|
+
*/
|
904
|
+
_fullscreenStateChange(state) {
|
905
|
+
if (state === "ready" && this._showFullscreen) {
|
906
|
+
this._showFullscreen = false;
|
907
|
+
}
|
908
|
+
else if (state === "active" && !this._showFullscreen) {
|
909
|
+
this._showFullscreen = true;
|
910
|
+
}
|
893
911
|
}
|
894
912
|
//--------------------------------------------------------------------------
|
895
913
|
//
|
@@ -314,6 +314,7 @@ const EditCard = class {
|
|
314
314
|
registerInstance(this, hostRef);
|
315
315
|
this.closeEdit = createEvent(this, "closeEdit", 7);
|
316
316
|
this.editsComplete = createEvent(this, "editsComplete", 7);
|
317
|
+
this.refreshGraphics = createEvent(this, "refreshGraphics", 7);
|
317
318
|
/**
|
318
319
|
* boolean: When true the Editor widget should be closed
|
319
320
|
*/
|
@@ -384,7 +385,7 @@ const EditCard = class {
|
|
384
385
|
}
|
385
386
|
this._layerEditHandle = this._layer.on("edits", () => {
|
386
387
|
this.editsComplete.emit();
|
387
|
-
|
388
|
+
this.open = false;
|
388
389
|
});
|
389
390
|
}
|
390
391
|
}
|
@@ -447,8 +448,7 @@ const EditCard = class {
|
|
447
448
|
},
|
448
449
|
container
|
449
450
|
});
|
450
|
-
if (this.
|
451
|
-
this._editHandle.remove();
|
451
|
+
if (this._attachmentHandle && this._activeWorkflowHandle) {
|
452
452
|
this._attachmentHandle.remove();
|
453
453
|
this._activeWorkflowHandle.remove();
|
454
454
|
}
|
@@ -457,18 +457,13 @@ const EditCard = class {
|
|
457
457
|
this._editor.viewModel.state === "creating-features", () => {
|
458
458
|
this._shouldClose = false;
|
459
459
|
});
|
460
|
-
this._editHandle = this.reactiveUtils.when(() => this._editor.viewModel.state === "ready", () => {
|
461
|
-
if (this._shouldClose) {
|
462
|
-
void this._closeEdit();
|
463
|
-
}
|
464
|
-
else if (this.graphicIndex > -1 && this.graphics.length > 0 && this.open && !this._shouldClose) {
|
465
|
-
void this._startUpdate();
|
466
|
-
}
|
467
|
-
});
|
468
460
|
this._activeWorkflowHandle = this.reactiveUtils.watch(() => { var _a; return (_a = this._editor.viewModel.activeWorkflow) === null || _a === void 0 ? void 0 : _a.activeWorkflow; }, (activeWorkflow) => {
|
469
461
|
if ((activeWorkflow === null || activeWorkflow === void 0 ? void 0 : activeWorkflow.type) === "update-table-record" || (activeWorkflow === null || activeWorkflow === void 0 ? void 0 : activeWorkflow.type) === "create-features") {
|
470
462
|
this._shouldClose = false;
|
471
463
|
}
|
464
|
+
if (!(activeWorkflow === null || activeWorkflow === void 0 ? void 0 : activeWorkflow.type) && !(activeWorkflow === null || activeWorkflow === void 0 ? void 0 : activeWorkflow.hasPendingEdits)) {
|
465
|
+
this.open = false;
|
466
|
+
}
|
472
467
|
});
|
473
468
|
// had issues with destroy before adding like this
|
474
469
|
this._editContainer.appendChild(container);
|
@@ -480,12 +475,15 @@ const EditCard = class {
|
|
480
475
|
* @returns void
|
481
476
|
*/
|
482
477
|
async _closeEdit() {
|
483
|
-
var _a, _b, _c;
|
478
|
+
var _a, _b, _c, _d;
|
484
479
|
this._shouldClose = true;
|
485
480
|
if ((_a = this._editor) === null || _a === void 0 ? void 0 : _a.activeWorkflow) {
|
486
481
|
await ((_b = this._editor) === null || _b === void 0 ? void 0 : _b.cancelWorkflow());
|
487
482
|
}
|
488
|
-
(_c = this.
|
483
|
+
if (this.graphicIndex > -1 && ((_c = this.graphics) === null || _c === void 0 ? void 0 : _c.length) > 0) {
|
484
|
+
this.refreshGraphics.emit(this.graphics);
|
485
|
+
}
|
486
|
+
(_d = this._editor) === null || _d === void 0 ? void 0 : _d.destroy();
|
489
487
|
this._shouldClose = false;
|
490
488
|
this.closeEdit.emit();
|
491
489
|
}
|
@@ -583,6 +581,12 @@ const InfoCard = class {
|
|
583
581
|
async closeEdit() {
|
584
582
|
this._editRecordOpen = false;
|
585
583
|
}
|
584
|
+
/**
|
585
|
+
* Refresh the info-card graphics
|
586
|
+
*/
|
587
|
+
async refreshGraphics(evt) {
|
588
|
+
this.graphics = [...evt.detail];
|
589
|
+
}
|
586
590
|
//--------------------------------------------------------------------------
|
587
591
|
//
|
588
592
|
// Functions (lifecycle)
|
@@ -102,7 +102,7 @@ const CardManager = class {
|
|
102
102
|
};
|
103
103
|
CardManager.style = cardManagerCss;
|
104
104
|
|
105
|
-
const layerTableCss = ":host{display:block}.height-full{height:100%}.height-full-adjusted{height:calc(100% - 20px)}.width-full{width:100%}.display-flex{display:flex}.table-border{border:1px solid var(--calcite-ui-border-2)}.border-end{border-inline-end:1px solid var(--calcite-ui-border-2)}.border-bottom{border-bottom:1px solid var(--calcite-ui-border-2)}.padding-5{padding:5px}.padding-end-1{padding-inline-end:1rem}.height-51{height:51px}.height-50-px{height:50px}.bottom-left{position:absolute;left:0;bottom:0;padding-left:5px}html[dir=\"rtl\"] .bottom-left{position:absolute;right:0;bottom:0;padding-right:5px}.height-19{height:19px}.background{background-color:var(--calcite-ui-background)}.text-color{color:var(--calcite-ui-text-1)}.align-center{align-items:center}.danger-color{color:var(--calcite-ui-danger)}.esri-feature-table vaadin-grid{border:none !important}vaadin-grid-cell-content{padding:var(--lumo-space-xs) var(--lumo-space-m) !important;font-size:14px !important}.share-action{position:absolute;right:0;margin-top:
|
105
|
+
const layerTableCss = ":host{display:block}.height-full{height:100%}.height-full-adjusted{height:calc(100% - 20px)}.width-full{width:100%}.display-flex{display:flex}.table-border{border:1px solid var(--calcite-ui-border-2)}.border-end{border-inline-end:1px solid var(--calcite-ui-border-2)}.border-bottom{border-bottom:1px solid var(--calcite-ui-border-2)}.padding-5{padding:5px}.padding-end-1{padding-inline-end:1rem}.height-51{height:51px}.height-50-px{height:50px}.bottom-left{position:absolute;left:0;bottom:0;padding-left:5px}html[dir=\"rtl\"] .bottom-left{position:absolute;right:0;bottom:0;padding-right:5px}.height-19{height:19px}.background{background-color:var(--calcite-ui-background)}.text-color{color:var(--calcite-ui-text-1)}.align-center{align-items:center}.danger-color{color:var(--calcite-ui-danger)}.esri-feature-table vaadin-grid{border:none !important}vaadin-grid-cell-content{padding:var(--lumo-space-xs) var(--lumo-space-m) !important;font-size:14px !important}.share-action{position:absolute;right:0;margin-top:4px;margin-inline-end:4px;margin-bottom:4px}html[dir=\"rtl\"] .share-action{left:0}.disabled{cursor:default !important;-webkit-user-select:none;-moz-user-select:none;user-select:none;opacity:var(--calcite-ui-opacity-disabled);pointer-events:none}.instant-app-share{height:42px !important;display:inline-flex}";
|
106
106
|
|
107
107
|
const LayerTable = class {
|
108
108
|
constructor(hostRef) {
|
@@ -695,7 +695,7 @@ const LayerTable = class {
|
|
695
695
|
* @returns VNode The node representing the DOM element that will contain the action
|
696
696
|
*/
|
697
697
|
_getShare(icon) {
|
698
|
-
return (h("div", { class: "share-action", id: this._getId(icon) }, h("instant-apps-social-share", { autoUpdateShareUrl: false, popoverButtonIconScale: "s", ref: el => this._shareNode = el, scale: "m", shareButtonColor: "neutral", socialMedia: true, view: this.mapView }), this._getToolTip("bottom", icon, this._translations.share)));
|
698
|
+
return (h("div", { class: "share-action", id: this._getId(icon) }, h("instant-apps-social-share", { autoUpdateShareUrl: false, class: "instant-app-share", popoverButtonIconScale: "s", ref: el => this._shareNode = el, scale: "m", shareButtonColor: "neutral", socialMedia: true, view: this.mapView }), this._getToolTip("bottom", icon, this._translations.share)));
|
699
699
|
}
|
700
700
|
/**
|
701
701
|
* Called each time the values that are used for custom url params change
|
@@ -814,11 +814,11 @@ const LayerTable = class {
|
|
814
814
|
* @returns void
|
815
815
|
*/
|
816
816
|
async _resetTable() {
|
817
|
-
var _a
|
817
|
+
var _a;
|
818
818
|
this._clearSelection();
|
819
819
|
this._allIds = [];
|
820
820
|
this.featureSelectionChange.emit(this._selectedIndexes);
|
821
|
-
const columnTemplates = this._getColumnTemplates(this._layer.id, (
|
821
|
+
const columnTemplates = this._getColumnTemplates(this._layer.id, (_a = this._layer) === null || _a === void 0 ? void 0 : _a.fields);
|
822
822
|
this._allIds = await queryAllIds(this._layer);
|
823
823
|
if (!this._table) {
|
824
824
|
await this._getTable(this._tableNode, columnTemplates);
|
@@ -1149,8 +1149,8 @@ const LayerTable = class {
|
|
1149
1149
|
if (fieldInfos) {
|
1150
1150
|
columnTemplates = columnTemplates ? columnTemplates.map(columnTemplate => {
|
1151
1151
|
fieldInfos.some(fieldInfo => {
|
1152
|
-
if (fieldInfo.
|
1153
|
-
columnTemplate.label = fieldInfo.
|
1152
|
+
if (fieldInfo.name === columnTemplate.fieldName) {
|
1153
|
+
columnTemplate.label = fieldInfo.alias;
|
1154
1154
|
return true;
|
1155
1155
|
}
|
1156
1156
|
});
|
@@ -1158,8 +1158,8 @@ const LayerTable = class {
|
|
1158
1158
|
}) : fieldInfos.map(fieldInfo => {
|
1159
1159
|
return {
|
1160
1160
|
type: "field",
|
1161
|
-
fieldName: fieldInfo.
|
1162
|
-
label: fieldInfo.
|
1161
|
+
fieldName: fieldInfo.name,
|
1162
|
+
label: fieldInfo.alias
|
1163
1163
|
};
|
1164
1164
|
});
|
1165
1165
|
}
|
@@ -1302,7 +1302,7 @@ const MapCard = class {
|
|
1302
1302
|
this.mapView = new this.MapView({
|
1303
1303
|
container: this._mapDiv,
|
1304
1304
|
map: webMap,
|
1305
|
-
resizeAlign: "
|
1305
|
+
resizeAlign: "center"
|
1306
1306
|
});
|
1307
1307
|
this._loadedId = id;
|
1308
1308
|
this._searchConfiguration = this._webMapInfo.searchConfiguration;
|
@@ -20,8 +20,10 @@ const CrowdsourceManager = class {
|
|
20
20
|
*/
|
21
21
|
this._shouldSetMapView = false;
|
22
22
|
this.classicGrid = false;
|
23
|
+
this.defaultCenter = "";
|
23
24
|
this.defaultGlobalId = "";
|
24
25
|
this.defaultLayer = "";
|
26
|
+
this.defaultLevel = "";
|
25
27
|
this.defaultOid = "";
|
26
28
|
this.defaultWebmap = "";
|
27
29
|
this.enableAutoRefresh = false;
|
@@ -55,6 +57,13 @@ const CrowdsourceManager = class {
|
|
55
57
|
// Watch handlers
|
56
58
|
//
|
57
59
|
//--------------------------------------------------------------------------
|
60
|
+
/**
|
61
|
+
* Watch for center url param to be set
|
62
|
+
*/
|
63
|
+
defaultCenterWatchHandler() {
|
64
|
+
this._defaultCenter = !this.defaultCenter ? undefined :
|
65
|
+
this.defaultCenter.split(";").map(v => parseFloat(v));
|
66
|
+
}
|
58
67
|
/**
|
59
68
|
* Watch for globalid url param to be set
|
60
69
|
*/
|
@@ -69,6 +78,12 @@ const CrowdsourceManager = class {
|
|
69
78
|
this._defaultOid = !this.defaultOid ? undefined :
|
70
79
|
this.defaultOid.indexOf(",") > -1 ? this.defaultOid.split(",").map(o => parseInt(o, 10)) : [parseInt(this.defaultOid, 10)];
|
71
80
|
}
|
81
|
+
/**
|
82
|
+
* Watch for zoom level param to be set
|
83
|
+
*/
|
84
|
+
defaultLevelWatchHandler() {
|
85
|
+
this._defaultLevel = !this.defaultLevel ? undefined : parseInt(this.defaultLevel, 10);
|
86
|
+
}
|
72
87
|
/**
|
73
88
|
* When true the map zoom tools will be available
|
74
89
|
*/
|
@@ -96,8 +111,8 @@ const CrowdsourceManager = class {
|
|
96
111
|
*/
|
97
112
|
async mapChanged(evt) {
|
98
113
|
this._mapChange = evt.detail;
|
99
|
-
await this._mapChange.mapView.when(() => {
|
100
|
-
this._setMapView();
|
114
|
+
await this._mapChange.mapView.when(async () => {
|
115
|
+
await this._setMapView();
|
101
116
|
});
|
102
117
|
}
|
103
118
|
/**
|
@@ -132,10 +147,10 @@ const CrowdsourceManager = class {
|
|
132
147
|
* Called after each render
|
133
148
|
* Used to delay the setting of the mapView when the popup is expaneded and obstructs the view
|
134
149
|
*/
|
135
|
-
componentDidRender() {
|
150
|
+
async componentDidRender() {
|
136
151
|
if (this._shouldSetMapView) {
|
137
152
|
this._shouldSetMapView = false;
|
138
|
-
this._setMapView();
|
153
|
+
await this._setMapView();
|
139
154
|
}
|
140
155
|
}
|
141
156
|
//--------------------------------------------------------------------------
|
@@ -357,11 +372,19 @@ const CrowdsourceManager = class {
|
|
357
372
|
*
|
358
373
|
* @protected
|
359
374
|
*/
|
360
|
-
_setMapView() {
|
375
|
+
async _setMapView() {
|
361
376
|
this._mapInfo = this._getMapInfo(this._mapChange.id);
|
362
377
|
this._mapView = this._mapChange.mapView;
|
363
378
|
this._initMapZoom();
|
364
379
|
this._mapView.popupEnabled = false;
|
380
|
+
if (this._defaultCenter && this._defaultLevel) {
|
381
|
+
await this._mapView.goTo({
|
382
|
+
center: this._defaultCenter,
|
383
|
+
zoom: this._defaultLevel
|
384
|
+
});
|
385
|
+
this._defaultCenter = undefined;
|
386
|
+
this._defaultLevel = undefined;
|
387
|
+
}
|
365
388
|
}
|
366
389
|
/**
|
367
390
|
* Add/remove zoom tools based on enableZoom prop
|
@@ -392,8 +415,10 @@ const CrowdsourceManager = class {
|
|
392
415
|
}
|
393
416
|
get el() { return getElement(this); }
|
394
417
|
static get watchers() { return {
|
418
|
+
"defaultCenter": ["defaultCenterWatchHandler"],
|
395
419
|
"defaultGlobalId": ["defaultGlobalIdWatchHandler"],
|
396
420
|
"defaultOid": ["defaultOidWatchHandler"],
|
421
|
+
"defaultLevel": ["defaultLevelWatchHandler"],
|
397
422
|
"enableZoom": ["enableZoomWatchHandler"]
|
398
423
|
}; }
|
399
424
|
};
|