@esri/solutions-components 0.7.4 → 0.7.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/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 +11 -9
- package/dist/cjs/crowdsource-manager.cjs.entry.js +33 -6
- 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 +107 -6
- 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 +43 -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 +39 -6
- package/dist/components/edit-card2.js +11 -13
- package/dist/components/info-card2.js +7 -1
- package/dist/components/layer-table2.js +12 -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 +11 -9
- package/dist/esm/crowdsource-manager.entry.js +33 -6
- 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-3c3b48c7.entry.js +6 -0
- package/dist/solutions-components/p-4b3ebd24.entry.js +6 -0
- package/dist/solutions-components/p-7e9449c5.entry.js +6 -0
- package/dist/solutions-components/solutions-components.esm.js +1 -1
- package/dist/types/components/crowdsource-manager/crowdsource-manager.d.ts +35 -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 +9 -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 +72 -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
@@ -63,8 +63,10 @@ const CrowdsourceManager$1 = /*@__PURE__*/ proxyCustomElement(class CrowdsourceM
|
|
63
63
|
*/
|
64
64
|
this._shouldSetMapView = false;
|
65
65
|
this.classicGrid = false;
|
66
|
+
this.defaultCenter = "";
|
66
67
|
this.defaultGlobalId = "";
|
67
68
|
this.defaultLayer = "";
|
69
|
+
this.defaultLevel = "";
|
68
70
|
this.defaultOid = "";
|
69
71
|
this.defaultWebmap = "";
|
70
72
|
this.enableAutoRefresh = false;
|
@@ -85,6 +87,8 @@ const CrowdsourceManager$1 = /*@__PURE__*/ proxyCustomElement(class CrowdsourceM
|
|
85
87
|
this.mapInfos = [];
|
86
88
|
this.onlyShowUpdatableLayers = true;
|
87
89
|
this.searchConfiguration = undefined;
|
90
|
+
this.shareIncludeEmbed = undefined;
|
91
|
+
this.shareIncludeSocial = undefined;
|
88
92
|
this.theme = "light";
|
89
93
|
this.zoomAndScrollToSelected = false;
|
90
94
|
this._expandPopup = false;
|
@@ -98,6 +102,13 @@ const CrowdsourceManager$1 = /*@__PURE__*/ proxyCustomElement(class CrowdsourceM
|
|
98
102
|
// Watch handlers
|
99
103
|
//
|
100
104
|
//--------------------------------------------------------------------------
|
105
|
+
/**
|
106
|
+
* Watch for center url param to be set
|
107
|
+
*/
|
108
|
+
defaultCenterWatchHandler() {
|
109
|
+
this._defaultCenter = !this.defaultCenter ? undefined :
|
110
|
+
this.defaultCenter.split(";").map(v => parseFloat(v));
|
111
|
+
}
|
101
112
|
/**
|
102
113
|
* Watch for globalid url param to be set
|
103
114
|
*/
|
@@ -112,6 +123,12 @@ const CrowdsourceManager$1 = /*@__PURE__*/ proxyCustomElement(class CrowdsourceM
|
|
112
123
|
this._defaultOid = !this.defaultOid ? undefined :
|
113
124
|
this.defaultOid.indexOf(",") > -1 ? this.defaultOid.split(",").map(o => parseInt(o, 10)) : [parseInt(this.defaultOid, 10)];
|
114
125
|
}
|
126
|
+
/**
|
127
|
+
* Watch for zoom level param to be set
|
128
|
+
*/
|
129
|
+
defaultLevelWatchHandler() {
|
130
|
+
this._defaultLevel = !this.defaultLevel ? undefined : parseInt(this.defaultLevel, 10);
|
131
|
+
}
|
115
132
|
/**
|
116
133
|
* When true the map zoom tools will be available
|
117
134
|
*/
|
@@ -139,8 +156,8 @@ const CrowdsourceManager$1 = /*@__PURE__*/ proxyCustomElement(class CrowdsourceM
|
|
139
156
|
*/
|
140
157
|
async mapChanged(evt) {
|
141
158
|
this._mapChange = evt.detail;
|
142
|
-
await this._mapChange.mapView.when(() => {
|
143
|
-
this._setMapView();
|
159
|
+
await this._mapChange.mapView.when(async () => {
|
160
|
+
await this._setMapView();
|
144
161
|
});
|
145
162
|
}
|
146
163
|
/**
|
@@ -175,10 +192,10 @@ const CrowdsourceManager$1 = /*@__PURE__*/ proxyCustomElement(class CrowdsourceM
|
|
175
192
|
* Called after each render
|
176
193
|
* Used to delay the setting of the mapView when the popup is expaneded and obstructs the view
|
177
194
|
*/
|
178
|
-
componentDidRender() {
|
195
|
+
async componentDidRender() {
|
179
196
|
if (this._shouldSetMapView) {
|
180
197
|
this._shouldSetMapView = false;
|
181
|
-
this._setMapView();
|
198
|
+
await this._setMapView();
|
182
199
|
}
|
183
200
|
}
|
184
201
|
//--------------------------------------------------------------------------
|
@@ -367,7 +384,7 @@ const CrowdsourceManager$1 = /*@__PURE__*/ proxyCustomElement(class CrowdsourceM
|
|
367
384
|
this.classicGrid && layoutMode === ELayoutMode.VERTICAL ? "panel-end" :
|
368
385
|
layoutMode === ELayoutMode.HORIZONTAL ? "header" : "panel-start";
|
369
386
|
const hasMapAndLayer = this.defaultWebmap && this.defaultLayer;
|
370
|
-
return (h("calcite-shell", { class: tableSizeClass + " border-bottom" }, h("calcite-action-bar", { class: "border-sides", expandDisabled: true, layout: toggleLayout, slot: toggleSlot }, h("calcite-action", { class: "toggle-node", icon: icon, id: id, onClick: () => this._toggleLayout(), text: "" }), h("calcite-tooltip", { label: tooltip, placement: "bottom", "reference-element": id }, h("span", null, tooltip))), h("div", { class: "width-full height-full position-relative" }, h("layer-table", { defaultGlobalId: hasMapAndLayer ? this._defaultGlobalId : undefined, defaultLayerId: hasMapAndLayer ? this.defaultLayer : "", defaultOid: hasMapAndLayer && !this.defaultGlobalId ? this._defaultOid : undefined, enableAutoRefresh: this.enableAutoRefresh, enableCSV: this.enableCSV, enableColumnReorder: this.enableColumnReorder, enableInlineEdit: this.enableInlineEdit, enableShare: this.enableShare, enableZoom: this.enableZoom, mapInfo: this._mapInfo, mapView: this === null || this === void 0 ? void 0 : this._mapView, onlyShowUpdatableLayers: this.onlyShowUpdatableLayers, showNewestFirst: this.showNewestFirst, zoomAndScrollToSelected: this.zoomAndScrollToSelected }))));
|
387
|
+
return (h("calcite-shell", { class: tableSizeClass + " border-bottom" }, h("calcite-action-bar", { class: "border-sides", expandDisabled: true, layout: toggleLayout, slot: toggleSlot }, h("calcite-action", { class: "toggle-node", icon: icon, id: id, onClick: () => this._toggleLayout(), text: "" }), h("calcite-tooltip", { label: tooltip, placement: "bottom", "reference-element": id }, h("span", null, tooltip))), h("div", { class: "width-full height-full position-relative" }, h("layer-table", { defaultGlobalId: hasMapAndLayer ? this._defaultGlobalId : undefined, defaultLayerId: hasMapAndLayer ? this.defaultLayer : "", defaultOid: hasMapAndLayer && !this.defaultGlobalId ? this._defaultOid : undefined, enableAutoRefresh: this.enableAutoRefresh, enableCSV: this.enableCSV, enableColumnReorder: this.enableColumnReorder, enableInlineEdit: this.enableInlineEdit, enableShare: this.enableShare, enableZoom: this.enableZoom, mapInfo: this._mapInfo, mapView: this === null || this === void 0 ? void 0 : this._mapView, onlyShowUpdatableLayers: this.onlyShowUpdatableLayers, shareIncludeEmbed: this.shareIncludeEmbed, shareIncludeSocial: this.shareIncludeSocial, showNewestFirst: this.showNewestFirst, zoomAndScrollToSelected: this.zoomAndScrollToSelected }))));
|
371
388
|
}
|
372
389
|
/**
|
373
390
|
* Open/Close the appropriate panel.
|
@@ -400,11 +417,19 @@ const CrowdsourceManager$1 = /*@__PURE__*/ proxyCustomElement(class CrowdsourceM
|
|
400
417
|
*
|
401
418
|
* @protected
|
402
419
|
*/
|
403
|
-
_setMapView() {
|
420
|
+
async _setMapView() {
|
404
421
|
this._mapInfo = this._getMapInfo(this._mapChange.id);
|
405
422
|
this._mapView = this._mapChange.mapView;
|
406
423
|
this._initMapZoom();
|
407
424
|
this._mapView.popupEnabled = false;
|
425
|
+
if (this._defaultCenter && this._defaultLevel) {
|
426
|
+
await this._mapView.goTo({
|
427
|
+
center: this._defaultCenter,
|
428
|
+
zoom: this._defaultLevel
|
429
|
+
});
|
430
|
+
this._defaultCenter = undefined;
|
431
|
+
this._defaultLevel = undefined;
|
432
|
+
}
|
408
433
|
}
|
409
434
|
/**
|
410
435
|
* Add/remove zoom tools based on enableZoom prop
|
@@ -435,15 +460,19 @@ const CrowdsourceManager$1 = /*@__PURE__*/ proxyCustomElement(class CrowdsourceM
|
|
435
460
|
}
|
436
461
|
get el() { return this; }
|
437
462
|
static get watchers() { return {
|
463
|
+
"defaultCenter": ["defaultCenterWatchHandler"],
|
438
464
|
"defaultGlobalId": ["defaultGlobalIdWatchHandler"],
|
439
465
|
"defaultOid": ["defaultOidWatchHandler"],
|
466
|
+
"defaultLevel": ["defaultLevelWatchHandler"],
|
440
467
|
"enableZoom": ["enableZoomWatchHandler"]
|
441
468
|
}; }
|
442
469
|
static get style() { return crowdsourceManagerCss; }
|
443
470
|
}, [0, "crowdsource-manager", {
|
444
471
|
"classicGrid": [4, "classic-grid"],
|
472
|
+
"defaultCenter": [1, "default-center"],
|
445
473
|
"defaultGlobalId": [1, "default-global-id"],
|
446
474
|
"defaultLayer": [1, "default-layer"],
|
475
|
+
"defaultLevel": [1, "default-level"],
|
447
476
|
"defaultOid": [1, "default-oid"],
|
448
477
|
"defaultWebmap": [1, "default-webmap"],
|
449
478
|
"enableAutoRefresh": [4, "enable-auto-refresh"],
|
@@ -464,6 +493,8 @@ const CrowdsourceManager$1 = /*@__PURE__*/ proxyCustomElement(class CrowdsourceM
|
|
464
493
|
"mapInfos": [16],
|
465
494
|
"onlyShowUpdatableLayers": [4, "only-show-updatable-layers"],
|
466
495
|
"searchConfiguration": [16],
|
496
|
+
"shareIncludeEmbed": [4, "share-include-embed"],
|
497
|
+
"shareIncludeSocial": [4, "share-include-social"],
|
467
498
|
"theme": [1],
|
468
499
|
"zoomAndScrollToSelected": [4, "zoom-and-scroll-to-selected"],
|
469
500
|
"_expandPopup": [32],
|
@@ -472,8 +503,10 @@ const CrowdsourceManager$1 = /*@__PURE__*/ proxyCustomElement(class CrowdsourceM
|
|
472
503
|
"_mapView": [32],
|
473
504
|
"_panelOpen": [32]
|
474
505
|
}, [[8, "layoutChanged", "layoutChanged"], [8, "mapChanged", "mapChanged"], [8, "beforeMapChanged", "beforeMapChanged"]], {
|
506
|
+
"defaultCenter": ["defaultCenterWatchHandler"],
|
475
507
|
"defaultGlobalId": ["defaultGlobalIdWatchHandler"],
|
476
508
|
"defaultOid": ["defaultOidWatchHandler"],
|
509
|
+
"defaultLevel": ["defaultLevelWatchHandler"],
|
477
510
|
"enableZoom": ["enableZoomWatchHandler"]
|
478
511
|
}]);
|
479
512
|
function defineCustomElement$1() {
|
@@ -19,6 +19,7 @@ const EditCard = /*@__PURE__*/ proxyCustomElement(class EditCard extends HTMLEle
|
|
19
19
|
this.__registerHost();
|
20
20
|
this.closeEdit = createEvent(this, "closeEdit", 7);
|
21
21
|
this.editsComplete = createEvent(this, "editsComplete", 7);
|
22
|
+
this.refreshGraphics = createEvent(this, "refreshGraphics", 7);
|
22
23
|
/**
|
23
24
|
* boolean: When true the Editor widget should be closed
|
24
25
|
*/
|
@@ -89,7 +90,7 @@ const EditCard = /*@__PURE__*/ proxyCustomElement(class EditCard extends HTMLEle
|
|
89
90
|
}
|
90
91
|
this._layerEditHandle = this._layer.on("edits", () => {
|
91
92
|
this.editsComplete.emit();
|
92
|
-
|
93
|
+
this.open = false;
|
93
94
|
});
|
94
95
|
}
|
95
96
|
}
|
@@ -152,8 +153,7 @@ const EditCard = /*@__PURE__*/ proxyCustomElement(class EditCard extends HTMLEle
|
|
152
153
|
},
|
153
154
|
container
|
154
155
|
});
|
155
|
-
if (this.
|
156
|
-
this._editHandle.remove();
|
156
|
+
if (this._attachmentHandle && this._activeWorkflowHandle) {
|
157
157
|
this._attachmentHandle.remove();
|
158
158
|
this._activeWorkflowHandle.remove();
|
159
159
|
}
|
@@ -162,18 +162,13 @@ const EditCard = /*@__PURE__*/ proxyCustomElement(class EditCard extends HTMLEle
|
|
162
162
|
this._editor.viewModel.state === "creating-features", () => {
|
163
163
|
this._shouldClose = false;
|
164
164
|
});
|
165
|
-
this._editHandle = this.reactiveUtils.when(() => this._editor.viewModel.state === "ready", () => {
|
166
|
-
if (this._shouldClose) {
|
167
|
-
void this._closeEdit();
|
168
|
-
}
|
169
|
-
else if (this.graphicIndex > -1 && this.graphics.length > 0 && this.open && !this._shouldClose) {
|
170
|
-
void this._startUpdate();
|
171
|
-
}
|
172
|
-
});
|
173
165
|
this._activeWorkflowHandle = this.reactiveUtils.watch(() => { var _a; return (_a = this._editor.viewModel.activeWorkflow) === null || _a === void 0 ? void 0 : _a.activeWorkflow; }, (activeWorkflow) => {
|
174
166
|
if ((activeWorkflow === null || activeWorkflow === void 0 ? void 0 : activeWorkflow.type) === "update-table-record" || (activeWorkflow === null || activeWorkflow === void 0 ? void 0 : activeWorkflow.type) === "create-features") {
|
175
167
|
this._shouldClose = false;
|
176
168
|
}
|
169
|
+
if (!(activeWorkflow === null || activeWorkflow === void 0 ? void 0 : activeWorkflow.type) && !(activeWorkflow === null || activeWorkflow === void 0 ? void 0 : activeWorkflow.hasPendingEdits)) {
|
170
|
+
this.open = false;
|
171
|
+
}
|
177
172
|
});
|
178
173
|
// had issues with destroy before adding like this
|
179
174
|
this._editContainer.appendChild(container);
|
@@ -185,12 +180,15 @@ const EditCard = /*@__PURE__*/ proxyCustomElement(class EditCard extends HTMLEle
|
|
185
180
|
* @returns void
|
186
181
|
*/
|
187
182
|
async _closeEdit() {
|
188
|
-
var _a, _b, _c;
|
183
|
+
var _a, _b, _c, _d;
|
189
184
|
this._shouldClose = true;
|
190
185
|
if ((_a = this._editor) === null || _a === void 0 ? void 0 : _a.activeWorkflow) {
|
191
186
|
await ((_b = this._editor) === null || _b === void 0 ? void 0 : _b.cancelWorkflow());
|
192
187
|
}
|
193
|
-
(_c = this.
|
188
|
+
if (this.graphicIndex > -1 && ((_c = this.graphics) === null || _c === void 0 ? void 0 : _c.length) > 0) {
|
189
|
+
this.refreshGraphics.emit(this.graphics);
|
190
|
+
}
|
191
|
+
(_d = this._editor) === null || _d === void 0 ? void 0 : _d.destroy();
|
194
192
|
this._shouldClose = false;
|
195
193
|
this.closeEdit.emit();
|
196
194
|
}
|
@@ -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() {
|
@@ -81,6 +81,8 @@ const LayerTable = /*@__PURE__*/ proxyCustomElement(class LayerTable extends HTM
|
|
81
81
|
this.mapInfo = undefined;
|
82
82
|
this.mapView = undefined;
|
83
83
|
this.onlyShowUpdatableLayers = undefined;
|
84
|
+
this.shareIncludeEmbed = undefined;
|
85
|
+
this.shareIncludeSocial = undefined;
|
84
86
|
this.showNewestFirst = undefined;
|
85
87
|
this.zoomAndScrollToSelected = undefined;
|
86
88
|
this._confirmDelete = false;
|
@@ -628,7 +630,7 @@ const LayerTable = /*@__PURE__*/ proxyCustomElement(class LayerTable extends HTM
|
|
628
630
|
* @returns VNode The node representing the DOM element that will contain the action
|
629
631
|
*/
|
630
632
|
_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:
|
633
|
+
return (h("div", { class: "share-action", id: this._getId(icon) }, h("instant-apps-social-share", { autoUpdateShareUrl: false, class: "instant-app-share", embed: this.shareIncludeEmbed, popoverButtonIconScale: "s", ref: el => this._shareNode = el, scale: "m", shareButtonColor: "neutral", socialMedia: this.shareIncludeSocial, view: this.mapView }), this._getToolTip("bottom", icon, this._translations.share)));
|
632
634
|
}
|
633
635
|
/**
|
634
636
|
* Called each time the values that are used for custom url params change
|
@@ -747,11 +749,11 @@ const LayerTable = /*@__PURE__*/ proxyCustomElement(class LayerTable extends HTM
|
|
747
749
|
* @returns void
|
748
750
|
*/
|
749
751
|
async _resetTable() {
|
750
|
-
var _a
|
752
|
+
var _a;
|
751
753
|
this._clearSelection();
|
752
754
|
this._allIds = [];
|
753
755
|
this.featureSelectionChange.emit(this._selectedIndexes);
|
754
|
-
const columnTemplates = this._getColumnTemplates(this._layer.id, (
|
756
|
+
const columnTemplates = this._getColumnTemplates(this._layer.id, (_a = this._layer) === null || _a === void 0 ? void 0 : _a.fields);
|
755
757
|
this._allIds = await queryAllIds(this._layer);
|
756
758
|
if (!this._table) {
|
757
759
|
await this._getTable(this._tableNode, columnTemplates);
|
@@ -1082,8 +1084,8 @@ const LayerTable = /*@__PURE__*/ proxyCustomElement(class LayerTable extends HTM
|
|
1082
1084
|
if (fieldInfos) {
|
1083
1085
|
columnTemplates = columnTemplates ? columnTemplates.map(columnTemplate => {
|
1084
1086
|
fieldInfos.some(fieldInfo => {
|
1085
|
-
if (fieldInfo.
|
1086
|
-
columnTemplate.label = fieldInfo.
|
1087
|
+
if (fieldInfo.name === columnTemplate.fieldName) {
|
1088
|
+
columnTemplate.label = fieldInfo.alias;
|
1087
1089
|
return true;
|
1088
1090
|
}
|
1089
1091
|
});
|
@@ -1091,8 +1093,8 @@ const LayerTable = /*@__PURE__*/ proxyCustomElement(class LayerTable extends HTM
|
|
1091
1093
|
}) : fieldInfos.map(fieldInfo => {
|
1092
1094
|
return {
|
1093
1095
|
type: "field",
|
1094
|
-
fieldName: fieldInfo.
|
1095
|
-
label: fieldInfo.
|
1096
|
+
fieldName: fieldInfo.name,
|
1097
|
+
label: fieldInfo.alias
|
1096
1098
|
};
|
1097
1099
|
});
|
1098
1100
|
}
|
@@ -1133,6 +1135,8 @@ const LayerTable = /*@__PURE__*/ proxyCustomElement(class LayerTable extends HTM
|
|
1133
1135
|
"mapInfo": [16],
|
1134
1136
|
"mapView": [16],
|
1135
1137
|
"onlyShowUpdatableLayers": [4, "only-show-updatable-layers"],
|
1138
|
+
"shareIncludeEmbed": [4, "share-include-embed"],
|
1139
|
+
"shareIncludeSocial": [4, "share-include-social"],
|
1136
1140
|
"showNewestFirst": [4, "show-newest-first"],
|
1137
1141
|
"zoomAndScrollToSelected": [4, "zoom-and-scroll-to-selected"],
|
1138
1142
|
"_confirmDelete": [32],
|
@@ -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)
|