@esri/solutions-components 0.6.32 → 0.6.34
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/cjs/basemap-gallery_7.cjs.entry.js +14 -2
- package/dist/cjs/calcite-combobox_6.cjs.entry.js +1 -1
- package/dist/cjs/card-manager_3.cjs.entry.js +34 -20
- package/dist/cjs/crowdsource-manager.cjs.entry.js +13 -9
- 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 +13 -9
- package/dist/collection/components/floor-filter/floor-filter.js +2 -1
- package/dist/collection/components/layer-table/layer-table.js +38 -12
- package/dist/collection/components/map-card/map-card.css +5 -1
- package/dist/collection/components/map-card/map-card.js +44 -5
- package/dist/collection/components/map-tools/map-tools.js +15 -1
- package/dist/collection/demos/crowdsource-manager.html +5 -4
- 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 +13 -9
- package/dist/components/downloadUtils.js +20 -0
- package/dist/components/floor-filter2.js +2 -1
- package/dist/components/layer-table2.js +22 -12
- package/dist/components/map-card2.js +13 -6
- 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-combobox_6.entry.js +1 -1
- package/dist/esm/card-manager_3.entry.js +34 -20
- package/dist/esm/crowdsource-manager.entry.js +13 -9
- 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/polyfills/core-js.js +11 -0
- package/dist/esm/polyfills/dom.js +79 -0
- package/dist/esm/polyfills/es5-html-element.js +1 -0
- package/dist/esm/polyfills/index.js +34 -0
- package/dist/esm/polyfills/system.js +6 -0
- package/dist/esm/public-notification.entry.js +2 -2
- package/dist/esm/solutions-components.js +1 -1
- package/dist/solutions-components/demos/crowdsource-manager.html +5 -4
- 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-506db776.entry.js +6 -0
- package/dist/solutions-components/{p-86893d46.entry.js → p-50a3a887.entry.js} +1 -1
- package/dist/solutions-components/p-7b61f856.entry.js +6 -0
- package/dist/solutions-components/p-80243d29.entry.js +6 -0
- package/dist/solutions-components/{p-190c83b9.entry.js → p-978a26b3.entry.js} +1 -1
- package/dist/solutions-components/{p-37a58e04.js → p-b745143d.js} +3 -3
- 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/layer-table/layer-table.d.ts +4 -0
- package/dist/types/components/map-card/map-card.d.ts +8 -0
- package/dist/types/components/map-tools/map-tools.d.ts +8 -0
- package/dist/types/components.d.ts +24 -0
- package/package.json +1 -1
- package/dist/solutions-components/p-792e171f.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() {
|
|
@@ -62,7 +62,7 @@ const CrowdsourceManager$1 = /*@__PURE__*/ proxyCustomElement(class CrowdsourceM
|
|
|
62
62
|
*/
|
|
63
63
|
this._shouldSetMapView = false;
|
|
64
64
|
this.classicGrid = false;
|
|
65
|
-
this.enableAutoRefresh =
|
|
65
|
+
this.enableAutoRefresh = false;
|
|
66
66
|
this.enableCSV = true;
|
|
67
67
|
this.enableFloorFilter = true;
|
|
68
68
|
this.enableFullscreen = true;
|
|
@@ -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, enableHome: this.enableHome, 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
|
|
@@ -339,7 +339,7 @@ const CrowdsourceManager$1 = /*@__PURE__*/ proxyCustomElement(class CrowdsourceM
|
|
|
339
339
|
const toggleSlot = this.classicGrid && layoutMode !== ELayoutMode.VERTICAL ? "footer" :
|
|
340
340
|
this.classicGrid && layoutMode === ELayoutMode.VERTICAL ? "panel-end" :
|
|
341
341
|
layoutMode === ELayoutMode.HORIZONTAL ? "header" : "panel-start";
|
|
342
|
-
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", { enableAutoRefresh: this.enableAutoRefresh, enableCSV: this.enableCSV, enableInlineEdit: this.enableInlineEdit, mapInfo: this._mapInfo, mapView: this === null || this === void 0 ? void 0 : this._mapView, onlyShowUpdatableLayers: this.onlyShowUpdatableLayers, showNewestFirst: this.showNewestFirst, zoomAndScrollToSelected: this.zoomAndScrollToSelected }))));
|
|
342
|
+
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", { enableAutoRefresh: this.enableAutoRefresh, enableCSV: this.enableCSV, enableInlineEdit: this.enableInlineEdit, 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 }))));
|
|
343
343
|
}
|
|
344
344
|
/**
|
|
345
345
|
* Open/Close the appropriate panel.
|
|
@@ -373,8 +373,12 @@ const CrowdsourceManager$1 = /*@__PURE__*/ proxyCustomElement(class CrowdsourceM
|
|
|
373
373
|
* @protected
|
|
374
374
|
*/
|
|
375
375
|
_setMapView() {
|
|
376
|
+
var _a, _b;
|
|
376
377
|
this._mapInfo = this._getMapInfo(this._mapChange.id);
|
|
377
378
|
this._mapView = this._mapChange.mapView;
|
|
379
|
+
if (!this.enableZoom && ((_b = (_a = this._mapView) === null || _a === void 0 ? void 0 : _a.ui) === null || _b === void 0 ? void 0 : _b.components.indexOf("zoom")) > -1) {
|
|
380
|
+
this._mapView.ui.components = this._mapView.ui.components.filter(c => c !== "zoom");
|
|
381
|
+
}
|
|
378
382
|
this._mapView.popupEnabled = false;
|
|
379
383
|
}
|
|
380
384
|
/**
|
|
@@ -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":
|
|
@@ -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,
|
|
@@ -63,6 +63,7 @@ const LayerTable = /*@__PURE__*/ proxyCustomElement(class LayerTable extends HTM
|
|
|
63
63
|
this.enableAutoRefresh = undefined;
|
|
64
64
|
this.enableCSV = undefined;
|
|
65
65
|
this.enableInlineEdit = undefined;
|
|
66
|
+
this.enableZoom = undefined;
|
|
66
67
|
this.mapInfo = undefined;
|
|
67
68
|
this.mapView = undefined;
|
|
68
69
|
this.onlyShowUpdatableLayers = undefined;
|
|
@@ -309,13 +310,15 @@ const LayerTable = /*@__PURE__*/ proxyCustomElement(class LayerTable extends HTM
|
|
|
309
310
|
_initToolInfos() {
|
|
310
311
|
var _a;
|
|
311
312
|
const featuresSelected = this._selectedIndexes.length > 0;
|
|
312
|
-
this.
|
|
313
|
+
const featuresEmpty = this._allIds.length === 0;
|
|
314
|
+
this._toolInfos = [this.enableZoom ? {
|
|
313
315
|
icon: "zoom-to-object",
|
|
314
316
|
label: this._translations.zoom,
|
|
315
317
|
func: () => this._zoom(),
|
|
316
318
|
disabled: !featuresSelected,
|
|
317
319
|
isOverflow: false
|
|
318
|
-
}
|
|
320
|
+
} : undefined,
|
|
321
|
+
((_a = this.mapInfo) === null || _a === void 0 ? void 0 : _a.filters) ? {
|
|
319
322
|
icon: "filter",
|
|
320
323
|
label: this._translations.filters,
|
|
321
324
|
func: () => this._filter(),
|
|
@@ -345,27 +348,27 @@ const LayerTable = /*@__PURE__*/ proxyCustomElement(class LayerTable extends HTM
|
|
|
345
348
|
icon: "list-check-all",
|
|
346
349
|
func: () => this._selectAll(),
|
|
347
350
|
label: this._translations.selectAll,
|
|
348
|
-
disabled:
|
|
349
|
-
isOverflow:
|
|
351
|
+
disabled: featuresEmpty,
|
|
352
|
+
isOverflow: false
|
|
350
353
|
}, {
|
|
351
354
|
icon: "compare",
|
|
352
355
|
func: () => this._switchSelected(),
|
|
353
356
|
label: this._translations.switchSelected,
|
|
354
|
-
disabled:
|
|
355
|
-
isOverflow:
|
|
357
|
+
disabled: featuresEmpty,
|
|
358
|
+
isOverflow: false
|
|
356
359
|
}, {
|
|
357
360
|
icon: "refresh",
|
|
358
361
|
func: () => this._refresh(),
|
|
359
362
|
label: this._translations.refresh,
|
|
360
363
|
disabled: false,
|
|
361
|
-
isOverflow:
|
|
364
|
+
isOverflow: false
|
|
362
365
|
},
|
|
363
366
|
this.enableCSV ? {
|
|
364
367
|
icon: "export",
|
|
365
368
|
func: () => void this._exportToCSV(),
|
|
366
369
|
label: this._translations.exportCSV,
|
|
367
|
-
disabled:
|
|
368
|
-
isOverflow:
|
|
370
|
+
disabled: featuresEmpty,
|
|
371
|
+
isOverflow: false
|
|
369
372
|
} : undefined];
|
|
370
373
|
this._defaultVisibleToolSizeInfos = undefined;
|
|
371
374
|
}
|
|
@@ -409,14 +412,20 @@ const LayerTable = /*@__PURE__*/ proxyCustomElement(class LayerTable extends HTM
|
|
|
409
412
|
prev.push(cur.id);
|
|
410
413
|
return prev;
|
|
411
414
|
}, []);
|
|
415
|
+
let forceFinish = false;
|
|
412
416
|
const controlsThatFit = [...this._defaultVisibleToolSizeInfos].reduce((prev, cur) => {
|
|
413
|
-
if (skipControls.indexOf(cur.id) < 0 &&
|
|
417
|
+
if (!forceFinish && skipControls.indexOf(cur.id) < 0 &&
|
|
414
418
|
(currentTools.indexOf(cur.id) > -1 || (controlsWidth + cur.width) <= toolbarWidth)) {
|
|
415
419
|
if (currentTools.indexOf(cur.id) < 0) {
|
|
416
420
|
controlsWidth += cur.width;
|
|
417
421
|
}
|
|
418
422
|
prev.push(cur);
|
|
419
423
|
}
|
|
424
|
+
else if (skipControls.indexOf(cur.id) < 0 && (controlsWidth + cur.width) > toolbarWidth) {
|
|
425
|
+
// exit the first time we evalute this as true...otherwise it will add the next control that will fit
|
|
426
|
+
// and not preserve the overall order of controls
|
|
427
|
+
forceFinish = true;
|
|
428
|
+
}
|
|
420
429
|
return prev;
|
|
421
430
|
}, []);
|
|
422
431
|
this._setControlsThatFit(controlsThatFit, skipControls);
|
|
@@ -495,9 +504,9 @@ const LayerTable = /*@__PURE__*/ proxyCustomElement(class LayerTable extends HTM
|
|
|
495
504
|
*/
|
|
496
505
|
_getDropdown(id) {
|
|
497
506
|
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 => {
|
|
507
|
+
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
508
|
return (h("calcite-dropdown-item", { iconStart: item.icon, onClick: item.func }, item.label));
|
|
500
|
-
}))));
|
|
509
|
+
})))) : undefined;
|
|
501
510
|
}
|
|
502
511
|
/**
|
|
503
512
|
* Get a list of toolInfos that should display in the dropdown
|
|
@@ -909,6 +918,7 @@ const LayerTable = /*@__PURE__*/ proxyCustomElement(class LayerTable extends HTM
|
|
|
909
918
|
"enableAutoRefresh": [4, "enable-auto-refresh"],
|
|
910
919
|
"enableCSV": [4, "enable-c-s-v"],
|
|
911
920
|
"enableInlineEdit": [4, "enable-inline-edit"],
|
|
921
|
+
"enableZoom": [4, "enable-zoom"],
|
|
912
922
|
"mapInfo": [16],
|
|
913
923
|
"mapView": [16],
|
|
914
924
|
"onlyShowUpdatableLayers": [4, "only-show-updatable-layers"],
|
|
@@ -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() {
|
|
@@ -42,12 +42,14 @@ const MapCard = /*@__PURE__*/ proxyCustomElement(class MapCard extends HTMLEleme
|
|
|
42
42
|
* string: the id of map currently displayed
|
|
43
43
|
*/
|
|
44
44
|
this._loadedId = "";
|
|
45
|
+
this.enableHome = undefined;
|
|
45
46
|
this.enableLegend = undefined;
|
|
46
47
|
this.enableFloorFilter = undefined;
|
|
47
48
|
this.enableFullscreen = undefined;
|
|
48
49
|
this.enableSearch = undefined;
|
|
49
50
|
this.enableBasemap = undefined;
|
|
50
51
|
this.basemapConfig = undefined;
|
|
52
|
+
this.hidden = undefined;
|
|
51
53
|
this.mapInfos = [];
|
|
52
54
|
this.mapView = undefined;
|
|
53
55
|
this._searchConfiguration = undefined;
|
|
@@ -74,7 +76,8 @@ const MapCard = /*@__PURE__*/ proxyCustomElement(class MapCard extends HTMLEleme
|
|
|
74
76
|
* Renders the component.
|
|
75
77
|
*/
|
|
76
78
|
render() {
|
|
77
|
-
|
|
79
|
+
const mapClass = this.hidden ? "visibility-hidden" : "";
|
|
80
|
+
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
81
|
}
|
|
79
82
|
//--------------------------------------------------------------------------
|
|
80
83
|
//
|
|
@@ -126,10 +129,12 @@ const MapCard = /*@__PURE__*/ proxyCustomElement(class MapCard extends HTMLEleme
|
|
|
126
129
|
this._searchConfiguration = this._webMapInfo.searchConfiguration;
|
|
127
130
|
this.beforeMapChanged.emit();
|
|
128
131
|
await this.mapView.when(() => {
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
132
|
+
if (this.enableHome) {
|
|
133
|
+
const home = new this.Home({
|
|
134
|
+
view: this.mapView
|
|
135
|
+
});
|
|
136
|
+
this.mapView.ui.add(home, { position: "top-left", index: 3 });
|
|
137
|
+
}
|
|
133
138
|
this.mapView.ui.add(this._mapTools, { position: "top-right", index: 0 });
|
|
134
139
|
this.mapChanged.emit({
|
|
135
140
|
id: id,
|
|
@@ -141,12 +146,14 @@ const MapCard = /*@__PURE__*/ proxyCustomElement(class MapCard extends HTMLEleme
|
|
|
141
146
|
get el() { return this; }
|
|
142
147
|
static get style() { return mapCardCss; }
|
|
143
148
|
}, [0, "map-card", {
|
|
149
|
+
"enableHome": [4, "enable-home"],
|
|
144
150
|
"enableLegend": [4, "enable-legend"],
|
|
145
151
|
"enableFloorFilter": [4, "enable-floor-filter"],
|
|
146
152
|
"enableFullscreen": [4, "enable-fullscreen"],
|
|
147
153
|
"enableSearch": [4, "enable-search"],
|
|
148
154
|
"enableBasemap": [4, "enable-basemap"],
|
|
149
155
|
"basemapConfig": [16],
|
|
156
|
+
"hidden": [4],
|
|
150
157
|
"mapInfos": [16],
|
|
151
158
|
"mapView": [16],
|
|
152
159
|
"_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"],
|
|
@@ -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';
|
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import { r as registerInstance, h, H as Host, g as getElement, c as createEvent } from './index-0740c914.js';
|
|
7
7
|
import { g as getLocaleComponentStrings } from './locale-6be4e8f0.js';
|
|
8
|
-
import { q as queryFeaturesByID, a as getLayerOrTable, g as goToSelection, b as queryAllIds } from './mapViewUtils-
|
|
8
|
+
import { q as queryFeaturesByID, a as getLayerOrTable, g as goToSelection, b as queryAllIds } from './mapViewUtils-43c930f1.js';
|
|
9
9
|
import { l as loadModules } from './loadModules-687a30c5.js';
|
|
10
|
-
import { d as downloadCSV } from './downloadUtils-
|
|
10
|
+
import { d as downloadCSV } from './downloadUtils-ddd7eeb7.js';
|
|
11
11
|
import './_commonjsHelpers-d5f9d613.js';
|
|
12
12
|
import './interfaces-7470d906.js';
|
|
13
13
|
import './clean-url-bce022e6.js';
|
|
@@ -128,6 +128,7 @@ const LayerTable = class {
|
|
|
128
128
|
this.enableAutoRefresh = undefined;
|
|
129
129
|
this.enableCSV = undefined;
|
|
130
130
|
this.enableInlineEdit = undefined;
|
|
131
|
+
this.enableZoom = undefined;
|
|
131
132
|
this.mapInfo = undefined;
|
|
132
133
|
this.mapView = undefined;
|
|
133
134
|
this.onlyShowUpdatableLayers = undefined;
|
|
@@ -374,13 +375,15 @@ const LayerTable = class {
|
|
|
374
375
|
_initToolInfos() {
|
|
375
376
|
var _a;
|
|
376
377
|
const featuresSelected = this._selectedIndexes.length > 0;
|
|
377
|
-
this.
|
|
378
|
+
const featuresEmpty = this._allIds.length === 0;
|
|
379
|
+
this._toolInfos = [this.enableZoom ? {
|
|
378
380
|
icon: "zoom-to-object",
|
|
379
381
|
label: this._translations.zoom,
|
|
380
382
|
func: () => this._zoom(),
|
|
381
383
|
disabled: !featuresSelected,
|
|
382
384
|
isOverflow: false
|
|
383
|
-
}
|
|
385
|
+
} : undefined,
|
|
386
|
+
((_a = this.mapInfo) === null || _a === void 0 ? void 0 : _a.filters) ? {
|
|
384
387
|
icon: "filter",
|
|
385
388
|
label: this._translations.filters,
|
|
386
389
|
func: () => this._filter(),
|
|
@@ -410,27 +413,27 @@ const LayerTable = class {
|
|
|
410
413
|
icon: "list-check-all",
|
|
411
414
|
func: () => this._selectAll(),
|
|
412
415
|
label: this._translations.selectAll,
|
|
413
|
-
disabled:
|
|
414
|
-
isOverflow:
|
|
416
|
+
disabled: featuresEmpty,
|
|
417
|
+
isOverflow: false
|
|
415
418
|
}, {
|
|
416
419
|
icon: "compare",
|
|
417
420
|
func: () => this._switchSelected(),
|
|
418
421
|
label: this._translations.switchSelected,
|
|
419
|
-
disabled:
|
|
420
|
-
isOverflow:
|
|
422
|
+
disabled: featuresEmpty,
|
|
423
|
+
isOverflow: false
|
|
421
424
|
}, {
|
|
422
425
|
icon: "refresh",
|
|
423
426
|
func: () => this._refresh(),
|
|
424
427
|
label: this._translations.refresh,
|
|
425
428
|
disabled: false,
|
|
426
|
-
isOverflow:
|
|
429
|
+
isOverflow: false
|
|
427
430
|
},
|
|
428
431
|
this.enableCSV ? {
|
|
429
432
|
icon: "export",
|
|
430
433
|
func: () => void this._exportToCSV(),
|
|
431
434
|
label: this._translations.exportCSV,
|
|
432
|
-
disabled:
|
|
433
|
-
isOverflow:
|
|
435
|
+
disabled: featuresEmpty,
|
|
436
|
+
isOverflow: false
|
|
434
437
|
} : undefined];
|
|
435
438
|
this._defaultVisibleToolSizeInfos = undefined;
|
|
436
439
|
}
|
|
@@ -474,14 +477,20 @@ const LayerTable = class {
|
|
|
474
477
|
prev.push(cur.id);
|
|
475
478
|
return prev;
|
|
476
479
|
}, []);
|
|
480
|
+
let forceFinish = false;
|
|
477
481
|
const controlsThatFit = [...this._defaultVisibleToolSizeInfos].reduce((prev, cur) => {
|
|
478
|
-
if (skipControls.indexOf(cur.id) < 0 &&
|
|
482
|
+
if (!forceFinish && skipControls.indexOf(cur.id) < 0 &&
|
|
479
483
|
(currentTools.indexOf(cur.id) > -1 || (controlsWidth + cur.width) <= toolbarWidth)) {
|
|
480
484
|
if (currentTools.indexOf(cur.id) < 0) {
|
|
481
485
|
controlsWidth += cur.width;
|
|
482
486
|
}
|
|
483
487
|
prev.push(cur);
|
|
484
488
|
}
|
|
489
|
+
else if (skipControls.indexOf(cur.id) < 0 && (controlsWidth + cur.width) > toolbarWidth) {
|
|
490
|
+
// exit the first time we evalute this as true...otherwise it will add the next control that will fit
|
|
491
|
+
// and not preserve the overall order of controls
|
|
492
|
+
forceFinish = true;
|
|
493
|
+
}
|
|
485
494
|
return prev;
|
|
486
495
|
}, []);
|
|
487
496
|
this._setControlsThatFit(controlsThatFit, skipControls);
|
|
@@ -560,9 +569,9 @@ const LayerTable = class {
|
|
|
560
569
|
*/
|
|
561
570
|
_getDropdown(id) {
|
|
562
571
|
const dropdownItems = this._getDropdownItems();
|
|
563
|
-
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 => {
|
|
572
|
+
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 => {
|
|
564
573
|
return (h("calcite-dropdown-item", { iconStart: item.icon, onClick: item.func }, item.label));
|
|
565
|
-
}))));
|
|
574
|
+
})))) : undefined;
|
|
566
575
|
}
|
|
567
576
|
/**
|
|
568
577
|
* Get a list of toolInfos that should display in the dropdown
|
|
@@ -972,7 +981,7 @@ const LayerTable = class {
|
|
|
972
981
|
};
|
|
973
982
|
LayerTable.style = layerTableCss;
|
|
974
983
|
|
|
975
|
-
const mapCardCss = ":host{display:block;--calcite-label-margin-bottom:0;--calcite-block-padding:0}.map-height{height:calc(100% -
|
|
984
|
+
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}";
|
|
976
985
|
|
|
977
986
|
const MapCard = class {
|
|
978
987
|
constructor(hostRef) {
|
|
@@ -983,12 +992,14 @@ const MapCard = class {
|
|
|
983
992
|
* string: the id of map currently displayed
|
|
984
993
|
*/
|
|
985
994
|
this._loadedId = "";
|
|
995
|
+
this.enableHome = undefined;
|
|
986
996
|
this.enableLegend = undefined;
|
|
987
997
|
this.enableFloorFilter = undefined;
|
|
988
998
|
this.enableFullscreen = undefined;
|
|
989
999
|
this.enableSearch = undefined;
|
|
990
1000
|
this.enableBasemap = undefined;
|
|
991
1001
|
this.basemapConfig = undefined;
|
|
1002
|
+
this.hidden = undefined;
|
|
992
1003
|
this.mapInfos = [];
|
|
993
1004
|
this.mapView = undefined;
|
|
994
1005
|
this._searchConfiguration = undefined;
|
|
@@ -1015,7 +1026,8 @@ const MapCard = class {
|
|
|
1015
1026
|
* Renders the component.
|
|
1016
1027
|
*/
|
|
1017
1028
|
render() {
|
|
1018
|
-
|
|
1029
|
+
const mapClass = this.hidden ? "visibility-hidden" : "";
|
|
1030
|
+
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 })));
|
|
1019
1031
|
}
|
|
1020
1032
|
//--------------------------------------------------------------------------
|
|
1021
1033
|
//
|
|
@@ -1067,10 +1079,12 @@ const MapCard = class {
|
|
|
1067
1079
|
this._searchConfiguration = this._webMapInfo.searchConfiguration;
|
|
1068
1080
|
this.beforeMapChanged.emit();
|
|
1069
1081
|
await this.mapView.when(() => {
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1082
|
+
if (this.enableHome) {
|
|
1083
|
+
const home = new this.Home({
|
|
1084
|
+
view: this.mapView
|
|
1085
|
+
});
|
|
1086
|
+
this.mapView.ui.add(home, { position: "top-left", index: 3 });
|
|
1087
|
+
}
|
|
1074
1088
|
this.mapView.ui.add(this._mapTools, { position: "top-right", index: 0 });
|
|
1075
1089
|
this.mapChanged.emit({
|
|
1076
1090
|
id: id,
|