@esri/solutions-components 0.6.31 → 0.6.33
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/cjs/basemap-gallery_7.cjs.entry.js +14 -2
- package/dist/cjs/calcite-alert_3.cjs.entry.js +14 -5
- package/dist/cjs/calcite-combobox_6.cjs.entry.js +1 -1
- package/dist/cjs/card-manager_3.cjs.entry.js +47 -55
- package/dist/cjs/crowdsource-manager.cjs.entry.js +7 -7
- package/dist/cjs/{downloadUtils-84024878.js → downloadUtils-b37689dd.js} +22 -2
- package/dist/cjs/{index.es-eb7cf427.js → index.es-83e253dc.js} +2 -2
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/map-select-tools_3.cjs.entry.js +2 -2
- package/dist/cjs/{mapViewUtils-786a219b.js → mapViewUtils-303bf42d.js} +1 -1
- package/dist/cjs/public-notification.cjs.entry.js +2 -2
- package/dist/cjs/solutions-components.cjs.js +1 -1
- package/dist/collection/components/crowdsource-manager/crowdsource-manager.css +8 -0
- package/dist/collection/components/crowdsource-manager/crowdsource-manager.js +6 -6
- package/dist/collection/components/edit-card/edit-card.js +23 -5
- package/dist/collection/components/floor-filter/floor-filter.js +2 -1
- package/dist/collection/components/layer-table/layer-table.css +4 -2
- package/dist/collection/components/layer-table/layer-table.js +40 -50
- package/dist/collection/components/map-card/map-card.css +5 -1
- package/dist/collection/components/map-card/map-card.js +20 -1
- package/dist/collection/components/map-tools/map-tools.js +15 -1
- package/dist/collection/utils/downloadUtils.js +20 -0
- package/dist/collection/utils/downloadUtils.ts +20 -0
- package/dist/collection/utils/queryUtils.js +1 -1
- package/dist/collection/utils/queryUtils.ts +1 -1
- package/dist/collection/utils/test/downloadUtils.spec.js +79 -5
- package/dist/collection/utils/test/downloadUtils.spec.tsx +84 -5
- package/dist/components/crowdsource-manager.js +7 -7
- package/dist/components/downloadUtils.js +20 -0
- package/dist/components/edit-card2.js +15 -6
- package/dist/components/floor-filter2.js +2 -1
- package/dist/components/layer-table2.js +41 -51
- package/dist/components/map-card2.js +5 -2
- package/dist/components/map-tools2.js +14 -1
- package/dist/components/queryUtils.js +1 -1
- package/dist/esm/basemap-gallery_7.entry.js +14 -2
- package/dist/esm/calcite-alert_3.entry.js +14 -5
- package/dist/esm/calcite-combobox_6.entry.js +1 -1
- package/dist/esm/card-manager_3.entry.js +47 -55
- package/dist/esm/crowdsource-manager.entry.js +7 -7
- package/dist/esm/{downloadUtils-fa2b3718.js → downloadUtils-ddd7eeb7.js} +22 -2
- package/dist/esm/{index.es-cc671fd2.js → index.es-a53707d1.js} +2 -2
- package/dist/esm/loader.js +1 -1
- package/dist/esm/map-select-tools_3.entry.js +2 -2
- package/dist/esm/{mapViewUtils-8bfabd80.js → mapViewUtils-43c930f1.js} +1 -1
- package/dist/esm/public-notification.entry.js +2 -2
- package/dist/esm/solutions-components.js +1 -1
- package/dist/solutions-components/{p-e94c7cf2.js → p-05ba41f9.js} +1 -1
- package/dist/solutions-components/{p-ce3b40ca.entry.js → p-4792005c.entry.js} +1 -1
- package/dist/solutions-components/{p-86893d46.entry.js → p-50a3a887.entry.js} +1 -1
- package/dist/solutions-components/p-65ade5af.entry.js +6 -0
- package/dist/solutions-components/p-7b61f856.entry.js +6 -0
- package/dist/solutions-components/{p-190c83b9.entry.js → p-978a26b3.entry.js} +1 -1
- package/dist/solutions-components/p-a5342c42.entry.js +6 -0
- package/dist/solutions-components/{p-37a58e04.js → p-b745143d.js} +3 -3
- package/dist/solutions-components/{p-33fa9891.entry.js → p-e05cf92d.entry.js} +2 -2
- package/dist/solutions-components/{p-53bc5fc1.js → p-f2194390.js} +1 -1
- package/dist/solutions-components/solutions-components.esm.js +1 -1
- package/dist/solutions-components/utils/downloadUtils.ts +20 -0
- package/dist/solutions-components/utils/queryUtils.ts +1 -1
- package/dist/solutions-components/utils/test/downloadUtils.spec.tsx +84 -5
- package/dist/types/components/edit-card/edit-card.d.ts +2 -1
- package/dist/types/components/map-card/map-card.d.ts +4 -0
- package/dist/types/components/map-tools/map-tools.d.ts +8 -0
- package/dist/types/components.d.ts +8 -0
- package/package.json +1 -1
- package/dist/esm/polyfills/core-js.js +0 -11
- package/dist/esm/polyfills/dom.js +0 -79
- package/dist/esm/polyfills/es5-html-element.js +0 -1
- package/dist/esm/polyfills/index.js +0 -34
- package/dist/esm/polyfills/system.js +0 -6
- package/dist/solutions-components/p-3c702004.entry.js +0 -6
- package/dist/solutions-components/p-d44ad6c4.entry.js +0 -6
- package/dist/solutions-components/p-f2dcb05a.entry.js +0 -6
@@ -50,7 +50,7 @@ import { d as defineCustomElement$4 } from './map-picker2.js';
|
|
50
50
|
import { d as defineCustomElement$3 } from './map-search2.js';
|
51
51
|
import { d as defineCustomElement$2 } from './map-tools2.js';
|
52
52
|
|
53
|
-
const crowdsourceManagerCss = ":host{display:block;--calcite-label-margin-bottom:0px;--solutions-theme-foreground-color:var(--calcite-ui-foreground-1)}.padding-1-2{padding:0.5rem}.display-flex{display:flex}.width-full{width:100%}.width-1-2{position:relative;width:50%}.width-1-3{position:relative;width:33.33%}.width-2-3{position:relative;width:66.66%}.width-0{width:0}.height-full{height:100%}.height-1-2{position:relative;height:50%}.height-0{height:0}.toggle-node{width:51px;height:51px}.overflow-hidden{overflow:hidden}.flex-column{flex-direction:column}.border{border:1px solid var(--calcite-ui-border-3)}.border-bottom{border-bottom:1px solid var(--calcite-ui-border-3)}.border-sides{border-left:1px solid var(--calcite-ui-border-3);border-right:1px solid var(--calcite-ui-border-3)}.position-relative{position:relative}.height-50{height:50%}.adjusted-height-50{height:calc(50% - 25px)}.adjusted-height-100{height:calc(100% - 50px)}.adjusted-height-100-50{height:calc(100% - 50px)}.display-none{display:none}.height-53{height:53px}.position-absolute-53{position:absolute;top:53px}.display-grid{display:grid}.height-50-px{height:50px}.padding-inline-start-75{padding-inline-start:0.75rem}.align-items-center{align-items:center}.esri-floor-filter__close-levels-button{width:40px !important;height:40px !important}.esri-floor-filter__level-button{width:40px !important;height:40px !important}.esri-floor-filter__browse-button{width:40px !important;height:40px !important}";
|
53
|
+
const crowdsourceManagerCss = ":host{display:block;--calcite-label-margin-bottom:0px;--solutions-theme-foreground-color:var(--calcite-ui-foreground-1)}.padding-1-2{padding:0.5rem}.display-flex{display:flex}.width-full{width:100%}.width-1-2{position:relative;width:50%}.width-1-3{position:relative;width:33.33%}.width-2-3{position:relative;width:66.66%}.width-0{width:0}.height-full{height:100%}.height-1-2{position:relative;height:50%}.height-0{height:0}.toggle-node{width:51px;height:51px}.overflow-hidden{overflow:hidden}.flex-column{flex-direction:column}.border{border:1px solid var(--calcite-ui-border-3)}.border-bottom{border-bottom:1px solid var(--calcite-ui-border-3)}.border-sides{border-left:1px solid var(--calcite-ui-border-3);border-right:1px solid var(--calcite-ui-border-3)}.position-relative{position:relative}.height-50{height:50%}.adjusted-height-50{height:calc(50% - 25px)}.adjusted-height-100{height:calc(100% - 50px)}.adjusted-height-100-50{height:calc(100% - 50px)}.display-none{display:none}.height-53{height:53px}.position-absolute-53{position:absolute;top:53px}.display-grid{display:grid}.height-50-px{height:50px}.padding-inline-start-75{padding-inline-start:0.75rem}.align-items-center{align-items:center}.esri-floor-filter__close-levels-button{width:40px !important;height:40px !important}.esri-floor-filter__level-button{width:40px !important;height:40px !important}.esri-floor-filter__browse-button{width:40px !important;height:40px !important}.position-absolute-50{position:absolute;top:50px;bottom:0px;left:0px;right:0px}";
|
54
54
|
|
55
55
|
const CrowdsourceManager$1 = /*@__PURE__*/ proxyCustomElement(class CrowdsourceManager extends HTMLElement {
|
56
56
|
constructor() {
|
@@ -279,11 +279,11 @@ const CrowdsourceManager$1 = /*@__PURE__*/ proxyCustomElement(class CrowdsourceM
|
|
279
279
|
* @protected
|
280
280
|
*/
|
281
281
|
_getMapNode(layoutMode, hideMap) {
|
282
|
-
var _a
|
282
|
+
var _a;
|
283
283
|
const mapDisplayClass = this.classicGrid && layoutMode === ELayoutMode.GRID ? "display-flex height-full width-1-2" :
|
284
284
|
layoutMode === ELayoutMode.GRID && !hideMap ? "" : "display-none";
|
285
|
-
const mapContainerClass = this.classicGrid && layoutMode === ELayoutMode.GRID ? "width-full" :
|
286
|
-
return (h("div", { class: `${mapContainerClass} overflow-hidden ${mapDisplayClass}` }, h("map-card", { basemapConfig: this.basemapConfig, class: "width-full", enableBasemap: this.enableBasemap, enableFloorFilter: this.enableFloorFilter
|
285
|
+
const mapContainerClass = this.classicGrid && layoutMode === ELayoutMode.GRID ? "width-full" : "adjusted-height-50";
|
286
|
+
return (h("div", { class: `${mapContainerClass} overflow-hidden ${mapDisplayClass}` }, h("map-card", { basemapConfig: this.basemapConfig, class: "width-full", enableBasemap: this.enableBasemap, enableFloorFilter: this.enableFloorFilter, enableFullscreen: this.enableFullscreen, enableLegend: this.enableLegend, enableSearch: this.enableSearch, hidden: this._expandPopup, mapInfos: (_a = this.mapInfos) === null || _a === void 0 ? void 0 : _a.filter(mapInfo => mapInfo.visible !== false) })));
|
287
287
|
}
|
288
288
|
/**
|
289
289
|
* Get the expand node for the popup information
|
@@ -296,7 +296,8 @@ const CrowdsourceManager$1 = /*@__PURE__*/ proxyCustomElement(class CrowdsourceM
|
|
296
296
|
const id = "expand-popup";
|
297
297
|
const tooltip = this._expandPopup ? this._translations.collapsePopup : this._translations.expandPopup;
|
298
298
|
const themeClass = this.theme === "dark" ? "calcite-mode-dark" : "calcite-mode-light";
|
299
|
-
|
299
|
+
const popupNodeClass = !this._expandPopup ? "height-full" : "position-absolute-50";
|
300
|
+
return (h("div", { class: "calcite-mode-dark " + popupNodeClass }, h("calcite-panel", null, h("div", { class: "display-flex align-items-center", slot: "header-content" }, h("calcite-icon", { icon: "information", scale: "s" }), h("div", { class: "padding-inline-start-75" }, this._translations.information)), h("calcite-action", { icon: icon, id: id, onClick: () => this._togglePopup(), slot: "header-actions-end" }), h("calcite-tooltip", { class: themeClass, label: "", placement: "bottom", "reference-element": id }, h("span", null, tooltip)), this._getCardNode())));
|
300
301
|
}
|
301
302
|
/**
|
302
303
|
* Toggle the popup information
|
@@ -317,9 +318,8 @@ const CrowdsourceManager$1 = /*@__PURE__*/ proxyCustomElement(class CrowdsourceM
|
|
317
318
|
*/
|
318
319
|
_getCardNode() {
|
319
320
|
const cardManagerHeight = !this._expandPopup ? "height-50" : "height-full";
|
320
|
-
const cardManagerContainer = this._expandPopup ? "width-50 adjusted-height-100-50" : "width-50 height-full";
|
321
321
|
const themeClass = this.theme === "dark" ? "calcite-mode-dark" : "calcite-mode-light";
|
322
|
-
return (h("div", { class:
|
322
|
+
return (h("div", { class: `width-50 height-full ${themeClass}` }, h("card-manager", { class: `${cardManagerHeight} width-full`, mapView: this === null || this === void 0 ? void 0 : this._mapView, zoomAndScrollToSelected: this.zoomAndScrollToSelected })));
|
323
323
|
}
|
324
324
|
/**
|
325
325
|
* Get the table node based for the current layout
|
@@ -2829,6 +2829,26 @@ function _prepareAttributeValue(attributeValue, attributeType, attributeDomain,
|
|
2829
2829
|
// e.g., "12/31/1969, 4:00 PM"
|
2830
2830
|
value = value.replace(/\xe2\x80\xaf/g, "");
|
2831
2831
|
break;
|
2832
|
+
case "date-only":
|
2833
|
+
// Value is a string, e.g., "2020-12-08"
|
2834
|
+
if (attributeFormat === null || attributeFormat === void 0 ? void 0 : attributeFormat.dateFormat) {
|
2835
|
+
const dateFormatIntlOptions = intl.convertDateFormatToIntlOptions(attributeFormat.dateFormat);
|
2836
|
+
value = intl.formatDateOnly(value, dateFormatIntlOptions);
|
2837
|
+
}
|
2838
|
+
else {
|
2839
|
+
value = intl.formatDateOnly(value);
|
2840
|
+
}
|
2841
|
+
break;
|
2842
|
+
case "time-only":
|
2843
|
+
// Value is a string, e.g., "14:51:44.2533333"
|
2844
|
+
if (attributeFormat === null || attributeFormat === void 0 ? void 0 : attributeFormat.dateFormat) {
|
2845
|
+
const dateFormatIntlOptions = intl.convertDateFormatToIntlOptions(attributeFormat.dateFormat);
|
2846
|
+
value = intl.formatTimeOnly(value, dateFormatIntlOptions);
|
2847
|
+
}
|
2848
|
+
else {
|
2849
|
+
value = intl.formatTimeOnly(value);
|
2850
|
+
}
|
2851
|
+
break;
|
2832
2852
|
case "double":
|
2833
2853
|
case "integer":
|
2834
2854
|
case "long":
|
@@ -39,7 +39,7 @@ const EditCard = /*@__PURE__*/ proxyCustomElement(class EditCard extends HTMLEle
|
|
39
39
|
*/
|
40
40
|
async graphicsWatchHandler() {
|
41
41
|
if (this.graphics.length === 0) {
|
42
|
-
this._closeEdit();
|
42
|
+
await this._closeEdit();
|
43
43
|
}
|
44
44
|
}
|
45
45
|
async openWatchHandler(v) {
|
@@ -53,9 +53,12 @@ const EditCard = /*@__PURE__*/ proxyCustomElement(class EditCard extends HTMLEle
|
|
53
53
|
this._editorLoading = false;
|
54
54
|
}
|
55
55
|
if (!v) {
|
56
|
-
this._closeEdit();
|
56
|
+
await this._closeEdit();
|
57
57
|
}
|
58
58
|
}
|
59
|
+
async featureSelectionChange() {
|
60
|
+
await this._closeEdit();
|
61
|
+
}
|
59
62
|
//--------------------------------------------------------------------------
|
60
63
|
//
|
61
64
|
// Functions (lifecycle)
|
@@ -85,7 +88,7 @@ const EditCard = /*@__PURE__*/ proxyCustomElement(class EditCard extends HTMLEle
|
|
85
88
|
}
|
86
89
|
this._layerEditHandle = this._layer.on("edits", () => {
|
87
90
|
this.editsComplete.emit();
|
88
|
-
this._closeEdit();
|
91
|
+
void this._closeEdit();
|
89
92
|
});
|
90
93
|
}
|
91
94
|
}
|
@@ -156,7 +159,7 @@ const EditCard = /*@__PURE__*/ proxyCustomElement(class EditCard extends HTMLEle
|
|
156
159
|
});
|
157
160
|
this._editHandle = this.reactiveUtils.when(() => this._editor.viewModel.state === "ready", () => {
|
158
161
|
if (this._shouldClose) {
|
159
|
-
this._closeEdit();
|
162
|
+
void this._closeEdit();
|
160
163
|
}
|
161
164
|
else if (this.graphicIndex > -1 && this.graphics.length > 0 && this.open && !this._shouldClose) {
|
162
165
|
void this._startUpdate();
|
@@ -176,7 +179,13 @@ const EditCard = /*@__PURE__*/ proxyCustomElement(class EditCard extends HTMLEle
|
|
176
179
|
*
|
177
180
|
* @returns void
|
178
181
|
*/
|
179
|
-
_closeEdit() {
|
182
|
+
async _closeEdit() {
|
183
|
+
var _a, _b, _c;
|
184
|
+
this._shouldClose = true;
|
185
|
+
if ((_a = this._editor) === null || _a === void 0 ? void 0 : _a.activeWorkflow) {
|
186
|
+
await ((_b = this._editor) === null || _b === void 0 ? void 0 : _b.cancelWorkflow());
|
187
|
+
}
|
188
|
+
(_c = this._editor) === null || _c === void 0 ? void 0 : _c.destroy();
|
180
189
|
this._shouldClose = false;
|
181
190
|
this.closeEdit.emit();
|
182
191
|
}
|
@@ -211,7 +220,7 @@ const EditCard = /*@__PURE__*/ proxyCustomElement(class EditCard extends HTMLEle
|
|
211
220
|
"graphicIndex": [2, "graphic-index"],
|
212
221
|
"_editorLoading": [32],
|
213
222
|
"_translations": [32]
|
214
|
-
},
|
223
|
+
}, [[8, "featureSelectionChange", "featureSelectionChange"]], {
|
215
224
|
"graphics": ["graphicsWatchHandler"],
|
216
225
|
"open": ["openWatchHandler"]
|
217
226
|
}]);
|
@@ -77,7 +77,8 @@ const FloorFilter = /*@__PURE__*/ proxyCustomElement(class FloorFilter extends H
|
|
77
77
|
* @protected
|
78
78
|
*/
|
79
79
|
_initFloorFilter(view) {
|
80
|
-
|
80
|
+
var _a;
|
81
|
+
if (view && this.enabled && this.FloorFilter && ((_a = view === null || view === void 0 ? void 0 : view.map) === null || _a === void 0 ? void 0 : _a.floorInfo)) {
|
81
82
|
if (!this.floorFilterWidget) {
|
82
83
|
this.floorFilterWidget = new this.FloorFilter({
|
83
84
|
container: this._floorFilterElement,
|
@@ -33,7 +33,7 @@ import { d as defineCustomElement$3 } from './shell.js';
|
|
33
33
|
import { d as defineCustomElement$2 } from './tooltip.js';
|
34
34
|
import { d as defineCustomElement$1 } from './map-layer-picker2.js';
|
35
35
|
|
36
|
-
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}.bottom-left{position:absolute;left:
|
36
|
+
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}.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}";
|
37
37
|
|
38
38
|
const LayerTable = /*@__PURE__*/ proxyCustomElement(class LayerTable extends HTMLElement {
|
39
39
|
constructor() {
|
@@ -346,26 +346,26 @@ const LayerTable = /*@__PURE__*/ proxyCustomElement(class LayerTable extends HTM
|
|
346
346
|
func: () => this._selectAll(),
|
347
347
|
label: this._translations.selectAll,
|
348
348
|
disabled: false,
|
349
|
-
isOverflow:
|
349
|
+
isOverflow: false
|
350
350
|
}, {
|
351
351
|
icon: "compare",
|
352
352
|
func: () => this._switchSelected(),
|
353
353
|
label: this._translations.switchSelected,
|
354
354
|
disabled: false,
|
355
|
-
isOverflow:
|
355
|
+
isOverflow: false
|
356
356
|
}, {
|
357
357
|
icon: "refresh",
|
358
358
|
func: () => this._refresh(),
|
359
359
|
label: this._translations.refresh,
|
360
360
|
disabled: false,
|
361
|
-
isOverflow:
|
361
|
+
isOverflow: false
|
362
362
|
},
|
363
363
|
this.enableCSV ? {
|
364
364
|
icon: "export",
|
365
365
|
func: () => void this._exportToCSV(),
|
366
366
|
label: this._translations.exportCSV,
|
367
367
|
disabled: false,
|
368
|
-
isOverflow:
|
368
|
+
isOverflow: false
|
369
369
|
} : undefined];
|
370
370
|
this._defaultVisibleToolSizeInfos = undefined;
|
371
371
|
}
|
@@ -409,14 +409,20 @@ const LayerTable = /*@__PURE__*/ proxyCustomElement(class LayerTable extends HTM
|
|
409
409
|
prev.push(cur.id);
|
410
410
|
return prev;
|
411
411
|
}, []);
|
412
|
+
let forceFinish = false;
|
412
413
|
const controlsThatFit = [...this._defaultVisibleToolSizeInfos].reduce((prev, cur) => {
|
413
|
-
if (skipControls.indexOf(cur.id) < 0 &&
|
414
|
+
if (!forceFinish && skipControls.indexOf(cur.id) < 0 &&
|
414
415
|
(currentTools.indexOf(cur.id) > -1 || (controlsWidth + cur.width) <= toolbarWidth)) {
|
415
416
|
if (currentTools.indexOf(cur.id) < 0) {
|
416
417
|
controlsWidth += cur.width;
|
417
418
|
}
|
418
419
|
prev.push(cur);
|
419
420
|
}
|
421
|
+
else if (skipControls.indexOf(cur.id) < 0 && (controlsWidth + cur.width) > toolbarWidth) {
|
422
|
+
// exit the first time we evalute this as true...otherwise it will add the next control that will fit
|
423
|
+
// and not preserve the overall order of controls
|
424
|
+
forceFinish = true;
|
425
|
+
}
|
420
426
|
return prev;
|
421
427
|
}, []);
|
422
428
|
this._setControlsThatFit(controlsThatFit, skipControls);
|
@@ -495,9 +501,9 @@ const LayerTable = /*@__PURE__*/ proxyCustomElement(class LayerTable extends HTM
|
|
495
501
|
*/
|
496
502
|
_getDropdown(id) {
|
497
503
|
const dropdownItems = this._getDropdownItems();
|
498
|
-
return (h("calcite-dropdown", { disabled: this._layer === undefined, id: "solutions-more" }, h("calcite-action", { appearance: "solid", id: id, label: "", slot: "trigger", text: "" }, h("calcite-button", { appearance: "transparent", iconEnd: "chevron-down", kind: "neutral" }, this._translations.more)), h("calcite-dropdown-group", { "selection-mode": "none" }, dropdownItems.map(item => {
|
504
|
+
return dropdownItems.length > 0 ? (h("calcite-dropdown", { disabled: this._layer === undefined, id: "solutions-more" }, h("calcite-action", { appearance: "solid", id: id, label: "", slot: "trigger", text: "" }, h("calcite-button", { appearance: "transparent", iconEnd: "chevron-down", kind: "neutral" }, this._translations.more)), h("calcite-dropdown-group", { "selection-mode": "none" }, dropdownItems.map(item => {
|
499
505
|
return (h("calcite-dropdown-item", { iconStart: item.icon, onClick: item.func }, item.label));
|
500
|
-
}))));
|
506
|
+
})))) : undefined;
|
501
507
|
}
|
502
508
|
/**
|
503
509
|
* Get a list of toolInfos that should display in the dropdown
|
@@ -614,33 +620,30 @@ const LayerTable = /*@__PURE__*/ proxyCustomElement(class LayerTable extends HTM
|
|
614
620
|
* @returns void
|
615
621
|
*/
|
616
622
|
async _resetTable() {
|
617
|
-
|
618
|
-
|
619
|
-
|
620
|
-
|
621
|
-
|
622
|
-
|
623
|
-
|
624
|
-
|
625
|
-
|
626
|
-
|
627
|
-
|
628
|
-
this._checkEditEnabled();
|
629
|
-
this._table.editingEnabled = this._editEnabled && this.enableInlineEdit;
|
630
|
-
this._initToolInfos();
|
631
|
-
});
|
632
|
-
await this._table.when(() => {
|
633
|
-
this._table.clearSelectionFilter();
|
634
|
-
});
|
635
|
-
this._showOnlySelected = false;
|
636
|
-
this._sortActive = false;
|
637
|
-
await this._sortTable();
|
638
|
-
}
|
639
|
-
else {
|
640
|
-
this._table.view = this.mapView;
|
641
|
-
this._table.layer = this._layer;
|
642
|
-
}
|
623
|
+
var _a, _b;
|
624
|
+
this._clearSelection();
|
625
|
+
this._allIds = [];
|
626
|
+
this.featureSelectionChange.emit(this._selectedIndexes);
|
627
|
+
const columnTemplates = this._getColumnTemplates(this._layer.id, (_b = (_a = this._layer) === null || _a === void 0 ? void 0 : _a.popupTemplate) === null || _b === void 0 ? void 0 : _b.fieldInfos);
|
628
|
+
this._allIds = await queryAllIds(this._layer);
|
629
|
+
if (!this._table) {
|
630
|
+
await this._getTable(this._tableNode, columnTemplates);
|
631
|
+
}
|
632
|
+
else if (columnTemplates) {
|
633
|
+
this._table.tableTemplate.columnTemplates = columnTemplates;
|
643
634
|
}
|
635
|
+
this._table.layer = this._layer;
|
636
|
+
this._table.view = this.mapView;
|
637
|
+
this._checkEditEnabled();
|
638
|
+
this._table.editingEnabled = this._editEnabled && this.enableInlineEdit;
|
639
|
+
this._initToolInfos();
|
640
|
+
await this._table.when(() => {
|
641
|
+
this._table.highlightIds.removeAll();
|
642
|
+
this._table.clearSelectionFilter();
|
643
|
+
});
|
644
|
+
this._showOnlySelected = false;
|
645
|
+
this._sortActive = false;
|
646
|
+
await this._sortTable();
|
644
647
|
}
|
645
648
|
/**
|
646
649
|
* Verify edit capabilities of the layer
|
@@ -842,28 +845,15 @@ const LayerTable = /*@__PURE__*/ proxyCustomElement(class LayerTable extends HTM
|
|
842
845
|
* @returns a promise that will resolve when the operation is complete
|
843
846
|
*/
|
844
847
|
async _layerSelectionChanged(evt) {
|
845
|
-
var _a
|
848
|
+
var _a;
|
846
849
|
const id = evt.detail[0];
|
847
850
|
if (id !== ((_a = this._layer) === null || _a === void 0 ? void 0 : _a.id) || this._allIds.length === 0) {
|
848
851
|
this._fetchingData = true;
|
849
|
-
|
850
|
-
|
851
|
-
|
852
|
-
if (!this._table) {
|
853
|
-
await this._getTable(this._tableNode, columnTemplates);
|
854
|
-
}
|
855
|
-
else if (columnTemplates) {
|
856
|
-
this._table.tableTemplate.columnTemplates = columnTemplates;
|
857
|
-
}
|
858
|
-
await this._table.when(() => {
|
859
|
-
this._table.highlightIds.removeAll();
|
852
|
+
const layer = await getLayerOrTable(this.mapView, id);
|
853
|
+
await layer.when(() => {
|
854
|
+
this._layer = layer;
|
860
855
|
});
|
861
|
-
this._selectedIndexes = [];
|
862
|
-
this._table.layer = this._layer;
|
863
|
-
this._table.render();
|
864
856
|
}
|
865
|
-
this._sortActive = false;
|
866
|
-
await this._sortTable();
|
867
857
|
this._fetchingData = false;
|
868
858
|
}
|
869
859
|
/**
|
@@ -30,7 +30,7 @@ import { d as defineCustomElement$3 } from './map-picker2.js';
|
|
30
30
|
import { d as defineCustomElement$2 } from './map-search2.js';
|
31
31
|
import { d as defineCustomElement$1 } from './map-tools2.js';
|
32
32
|
|
33
|
-
const mapCardCss = ":host{display:block;--calcite-label-margin-bottom:0;--calcite-block-padding:0}.map-height{height:calc(100% -
|
33
|
+
const mapCardCss = ":host{display:block;--calcite-label-margin-bottom:0;--calcite-block-padding:0}.map-height{height:calc(100% - 51px)}.box-shadow{box-shadow:none !important}.visibility-hidden{visibility:hidden}";
|
34
34
|
|
35
35
|
const MapCard = /*@__PURE__*/ proxyCustomElement(class MapCard extends HTMLElement {
|
36
36
|
constructor() {
|
@@ -48,6 +48,7 @@ const MapCard = /*@__PURE__*/ proxyCustomElement(class MapCard extends HTMLEleme
|
|
48
48
|
this.enableSearch = undefined;
|
49
49
|
this.enableBasemap = undefined;
|
50
50
|
this.basemapConfig = undefined;
|
51
|
+
this.hidden = undefined;
|
51
52
|
this.mapInfos = [];
|
52
53
|
this.mapView = undefined;
|
53
54
|
this._searchConfiguration = undefined;
|
@@ -74,7 +75,8 @@ const MapCard = /*@__PURE__*/ proxyCustomElement(class MapCard extends HTMLEleme
|
|
74
75
|
* Renders the component.
|
75
76
|
*/
|
76
77
|
render() {
|
77
|
-
|
78
|
+
const mapClass = this.hidden ? "visibility-hidden" : "";
|
79
|
+
return (h(Host, null, h("map-picker", { mapInfos: this.mapInfos }), h("div", { class: `map-height ${mapClass}`, ref: (el) => (this._mapDiv = el) }), h("map-tools", { basemapConfig: this.basemapConfig, class: "box-shadow", enableBasemap: this.enableBasemap, enableFloorFilter: this.enableFloorFilter, enableFullscreen: this.enableFullscreen, enableLegend: this.enableLegend, enableSearch: this.enableSearch, mapView: this.mapView, ref: (el) => this._mapTools = el, searchConfiguration: this._searchConfiguration })));
|
78
80
|
}
|
79
81
|
//--------------------------------------------------------------------------
|
80
82
|
//
|
@@ -147,6 +149,7 @@ const MapCard = /*@__PURE__*/ proxyCustomElement(class MapCard extends HTMLEleme
|
|
147
149
|
"enableSearch": [4, "enable-search"],
|
148
150
|
"enableBasemap": [4, "enable-basemap"],
|
149
151
|
"basemapConfig": [16],
|
152
|
+
"hidden": [4],
|
150
153
|
"mapInfos": [16],
|
151
154
|
"mapView": [16],
|
152
155
|
"_searchConfiguration": [32],
|
@@ -31,6 +31,7 @@ const MapTools = /*@__PURE__*/ proxyCustomElement(class MapTools extends HTMLEle
|
|
31
31
|
this.layout = "vertical";
|
32
32
|
this.mapView = undefined;
|
33
33
|
this.searchConfiguration = undefined;
|
34
|
+
this._hasFloorInfo = false;
|
34
35
|
this._translations = undefined;
|
35
36
|
this._showTools = true;
|
36
37
|
this._showBasemapWidget = false;
|
@@ -44,6 +45,15 @@ const MapTools = /*@__PURE__*/ proxyCustomElement(class MapTools extends HTMLEle
|
|
44
45
|
// Watch handlers
|
45
46
|
//
|
46
47
|
//--------------------------------------------------------------------------
|
48
|
+
/**
|
49
|
+
* When the mapView loads check if it supports floor awareness
|
50
|
+
*/
|
51
|
+
async mapViewWatchHandler() {
|
52
|
+
await this.mapView.when(() => {
|
53
|
+
var _a, _b;
|
54
|
+
this._hasFloorInfo = (_b = (_a = this.mapView) === null || _a === void 0 ? void 0 : _a.map) === null || _b === void 0 ? void 0 : _b.floorInfo;
|
55
|
+
});
|
56
|
+
}
|
47
57
|
/**
|
48
58
|
* When the _showBasemapWidget property is true display the basemap gallery
|
49
59
|
*/
|
@@ -157,7 +167,7 @@ const MapTools = /*@__PURE__*/ proxyCustomElement(class MapTools extends HTMLEle
|
|
157
167
|
this._getActionGroup(fullscreenIcon, false, fullscreenTip, () => this._expand()) :
|
158
168
|
undefined, this.enableBasemap ?
|
159
169
|
this._getActionGroup("basemap", false, this._translations.basemap, () => this._toggleBasemapPicker()) :
|
160
|
-
undefined, this.enableFloorFilter ?
|
170
|
+
undefined, this.enableFloorFilter && this._hasFloorInfo ?
|
161
171
|
this._getActionGroup("urban-model", false, this._translations.floorFilter, () => this._toggleFloorFilter()) :
|
162
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; } })));
|
163
173
|
}
|
@@ -251,6 +261,7 @@ const MapTools = /*@__PURE__*/ proxyCustomElement(class MapTools extends HTMLEle
|
|
251
261
|
}
|
252
262
|
get el() { return this; }
|
253
263
|
static get watchers() { return {
|
264
|
+
"mapView": ["mapViewWatchHandler"],
|
254
265
|
"_showBasemapWidget": ["_showBasemapWidgetWatchHandler"],
|
255
266
|
"_showFloorFilter": ["_showFloorFilterWatchHandler"],
|
256
267
|
"_showFullscreen": ["_showFullscreenWatchHandler"],
|
@@ -268,6 +279,7 @@ const MapTools = /*@__PURE__*/ proxyCustomElement(class MapTools extends HTMLEle
|
|
268
279
|
"layout": [1],
|
269
280
|
"mapView": [16],
|
270
281
|
"searchConfiguration": [16],
|
282
|
+
"_hasFloorInfo": [32],
|
271
283
|
"_translations": [32],
|
272
284
|
"_showTools": [32],
|
273
285
|
"_showBasemapWidget": [32],
|
@@ -276,6 +288,7 @@ const MapTools = /*@__PURE__*/ proxyCustomElement(class MapTools extends HTMLEle
|
|
276
288
|
"_showLegendWidget": [32],
|
277
289
|
"_showSearchWidget": [32]
|
278
290
|
}, undefined, {
|
291
|
+
"mapView": ["mapViewWatchHandler"],
|
279
292
|
"_showBasemapWidget": ["_showBasemapWidgetWatchHandler"],
|
280
293
|
"_showFloorFilter": ["_showFloorFilterWatchHandler"],
|
281
294
|
"_showFullscreen": ["_showFullscreenWatchHandler"],
|
@@ -177,7 +177,8 @@ const FloorFilter = class {
|
|
177
177
|
* @protected
|
178
178
|
*/
|
179
179
|
_initFloorFilter(view) {
|
180
|
-
|
180
|
+
var _a;
|
181
|
+
if (view && this.enabled && this.FloorFilter && ((_a = view === null || view === void 0 ? void 0 : view.map) === null || _a === void 0 ? void 0 : _a.floorInfo)) {
|
181
182
|
if (!this.floorFilterWidget) {
|
182
183
|
this.floorFilterWidget = new this.FloorFilter({
|
183
184
|
container: this._floorFilterElement,
|
@@ -729,6 +730,7 @@ const MapTools = class {
|
|
729
730
|
this.layout = "vertical";
|
730
731
|
this.mapView = undefined;
|
731
732
|
this.searchConfiguration = undefined;
|
733
|
+
this._hasFloorInfo = false;
|
732
734
|
this._translations = undefined;
|
733
735
|
this._showTools = true;
|
734
736
|
this._showBasemapWidget = false;
|
@@ -742,6 +744,15 @@ const MapTools = class {
|
|
742
744
|
// Watch handlers
|
743
745
|
//
|
744
746
|
//--------------------------------------------------------------------------
|
747
|
+
/**
|
748
|
+
* When the mapView loads check if it supports floor awareness
|
749
|
+
*/
|
750
|
+
async mapViewWatchHandler() {
|
751
|
+
await this.mapView.when(() => {
|
752
|
+
var _a, _b;
|
753
|
+
this._hasFloorInfo = (_b = (_a = this.mapView) === null || _a === void 0 ? void 0 : _a.map) === null || _b === void 0 ? void 0 : _b.floorInfo;
|
754
|
+
});
|
755
|
+
}
|
745
756
|
/**
|
746
757
|
* When the _showBasemapWidget property is true display the basemap gallery
|
747
758
|
*/
|
@@ -855,7 +866,7 @@ const MapTools = class {
|
|
855
866
|
this._getActionGroup(fullscreenIcon, false, fullscreenTip, () => this._expand()) :
|
856
867
|
undefined, this.enableBasemap ?
|
857
868
|
this._getActionGroup("basemap", false, this._translations.basemap, () => this._toggleBasemapPicker()) :
|
858
|
-
undefined, this.enableFloorFilter ?
|
869
|
+
undefined, this.enableFloorFilter && this._hasFloorInfo ?
|
859
870
|
this._getActionGroup("urban-model", false, this._translations.floorFilter, () => this._toggleFloorFilter()) :
|
860
871
|
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; } })));
|
861
872
|
}
|
@@ -949,6 +960,7 @@ const MapTools = class {
|
|
949
960
|
}
|
950
961
|
get el() { return getElement(this); }
|
951
962
|
static get watchers() { return {
|
963
|
+
"mapView": ["mapViewWatchHandler"],
|
952
964
|
"_showBasemapWidget": ["_showBasemapWidgetWatchHandler"],
|
953
965
|
"_showFloorFilter": ["_showFloorFilterWatchHandler"],
|
954
966
|
"_showFullscreen": ["_showFullscreenWatchHandler"],
|
@@ -347,7 +347,7 @@ const EditCard = class {
|
|
347
347
|
*/
|
348
348
|
async graphicsWatchHandler() {
|
349
349
|
if (this.graphics.length === 0) {
|
350
|
-
this._closeEdit();
|
350
|
+
await this._closeEdit();
|
351
351
|
}
|
352
352
|
}
|
353
353
|
async openWatchHandler(v) {
|
@@ -361,9 +361,12 @@ const EditCard = class {
|
|
361
361
|
this._editorLoading = false;
|
362
362
|
}
|
363
363
|
if (!v) {
|
364
|
-
this._closeEdit();
|
364
|
+
await this._closeEdit();
|
365
365
|
}
|
366
366
|
}
|
367
|
+
async featureSelectionChange() {
|
368
|
+
await this._closeEdit();
|
369
|
+
}
|
367
370
|
//--------------------------------------------------------------------------
|
368
371
|
//
|
369
372
|
// Functions (lifecycle)
|
@@ -393,7 +396,7 @@ const EditCard = class {
|
|
393
396
|
}
|
394
397
|
this._layerEditHandle = this._layer.on("edits", () => {
|
395
398
|
this.editsComplete.emit();
|
396
|
-
this._closeEdit();
|
399
|
+
void this._closeEdit();
|
397
400
|
});
|
398
401
|
}
|
399
402
|
}
|
@@ -464,7 +467,7 @@ const EditCard = class {
|
|
464
467
|
});
|
465
468
|
this._editHandle = this.reactiveUtils.when(() => this._editor.viewModel.state === "ready", () => {
|
466
469
|
if (this._shouldClose) {
|
467
|
-
this._closeEdit();
|
470
|
+
void this._closeEdit();
|
468
471
|
}
|
469
472
|
else if (this.graphicIndex > -1 && this.graphics.length > 0 && this.open && !this._shouldClose) {
|
470
473
|
void this._startUpdate();
|
@@ -484,7 +487,13 @@ const EditCard = class {
|
|
484
487
|
*
|
485
488
|
* @returns void
|
486
489
|
*/
|
487
|
-
_closeEdit() {
|
490
|
+
async _closeEdit() {
|
491
|
+
var _a, _b, _c;
|
492
|
+
this._shouldClose = true;
|
493
|
+
if ((_a = this._editor) === null || _a === void 0 ? void 0 : _a.activeWorkflow) {
|
494
|
+
await ((_b = this._editor) === null || _b === void 0 ? void 0 : _b.cancelWorkflow());
|
495
|
+
}
|
496
|
+
(_c = this._editor) === null || _c === void 0 ? void 0 : _c.destroy();
|
488
497
|
this._shouldClose = false;
|
489
498
|
this.closeEdit.emit();
|
490
499
|
}
|
@@ -21,7 +21,7 @@ import { d as debounce } from './debounce-229b1a22.js';
|
|
21
21
|
import { c as connectConditionalSlotComponent, d as disconnectConditionalSlotComponent } from './conditionalSlot-94095778.js';
|
22
22
|
import { i as isActivationKey } from './key-5ab69c42.js';
|
23
23
|
import { g as getLocaleComponentStrings } from './locale-6be4e8f0.js';
|
24
|
-
import { k as getMapLayerHash, l as getMapTableHash } from './mapViewUtils-
|
24
|
+
import { k as getMapLayerHash, l as getMapTableHash } from './mapViewUtils-43c930f1.js';
|
25
25
|
import { s as state } from './publicNotificationStore-f25d1e95.js';
|
26
26
|
import './resources-bb8600a6.js';
|
27
27
|
import './browser-b8a2c2d7.js';
|