@esri/solutions-components 0.6.9 → 0.6.10
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/crowdsource-manager/resources.json +2 -1
- package/dist/assets/t9n/crowdsource-manager/resources_en.json +2 -1
- package/dist/assets/t9n/info-card/resources.json +4 -1
- package/dist/assets/t9n/info-card/resources_en.json +4 -1
- package/dist/assets/t9n/layer-table/resources.json +2 -1
- package/dist/assets/t9n/layer-table/resources_en.json +2 -1
- package/dist/assets/t9n/map-tools/resources.json +0 -3
- package/dist/assets/t9n/map-tools/resources_en.json +0 -3
- package/dist/cjs/basemap-gallery_5.cjs.entry.js +6 -61
- package/dist/cjs/card-manager_3.cjs.entry.js +22 -12
- package/dist/cjs/crowdsource-manager.cjs.entry.js +27 -5
- package/dist/cjs/{downloadUtils-1f057ec0.js → downloadUtils-471a6a2d.js} +16 -10
- package/dist/cjs/edit-card_2.cjs.entry.js +34 -2
- package/dist/cjs/{index.es-a1507f1c.js → index.es-33154f03.js} +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/map-select-tools_3.cjs.entry.js +1 -1
- package/dist/cjs/public-notification.cjs.entry.js +1 -1
- package/dist/cjs/solutions-components.cjs.js +1 -1
- package/dist/collection/components/card-manager/card-manager.js +1 -1
- package/dist/collection/components/crowdsource-manager/crowdsource-manager.css +23 -2
- package/dist/collection/components/crowdsource-manager/crowdsource-manager.js +27 -4
- package/dist/collection/components/info-card/info-card.css +15 -2
- package/dist/collection/components/info-card/info-card.js +34 -1
- package/dist/collection/components/layer-table/layer-table.css +20 -0
- package/dist/collection/components/layer-table/layer-table.js +5 -1
- package/dist/collection/components/map-card/map-card.css +0 -7
- package/dist/collection/components/map-card/map-card.js +13 -7
- package/dist/collection/components/map-picker/map-picker.css +5 -1
- package/dist/collection/components/map-picker/map-picker.js +2 -2
- package/dist/collection/components/map-tools/map-tools.css +14 -0
- package/dist/collection/components/map-tools/map-tools.js +2 -59
- package/dist/collection/utils/downloadUtils.js +15 -9
- package/dist/collection/utils/downloadUtils.ts +21 -10
- package/dist/components/card-manager2.js +6 -6
- package/dist/components/crowdsource-manager.js +28 -5
- package/dist/components/downloadUtils.js +15 -9
- package/dist/components/info-card2.js +40 -7
- package/dist/components/layer-table2.js +6 -2
- package/dist/components/map-card2.js +14 -8
- package/dist/components/map-picker2.js +3 -3
- package/dist/components/map-tools2.js +3 -58
- package/dist/esm/basemap-gallery_5.entry.js +6 -61
- package/dist/esm/card-manager_3.entry.js +22 -12
- package/dist/esm/crowdsource-manager.entry.js +27 -5
- package/dist/esm/{downloadUtils-64c27514.js → downloadUtils-8d4c13bb.js} +16 -10
- package/dist/esm/edit-card_2.entry.js +34 -2
- package/dist/esm/{index.es-b7bc2db1.js → index.es-065c3035.js} +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/map-select-tools_3.entry.js +1 -1
- package/dist/esm/public-notification.entry.js +1 -1
- package/dist/esm/solutions-components.js +1 -1
- package/dist/solutions-components/{p-12f06497.entry.js → p-0dd8368d.entry.js} +1 -1
- package/dist/solutions-components/p-46352a57.entry.js +6 -0
- package/dist/solutions-components/{p-22d06238.js → p-6eb4ba8f.js} +1 -1
- package/dist/solutions-components/{p-a26dc184.js → p-95c11620.js} +2 -2
- package/dist/solutions-components/p-9eba78eb.entry.js +6 -0
- package/dist/solutions-components/{p-b2a52acb.entry.js → p-c26cd409.entry.js} +1 -1
- package/dist/solutions-components/p-d4cb29ed.entry.js +6 -0
- package/dist/solutions-components/p-fb7ca639.entry.js +6 -0
- package/dist/solutions-components/solutions-components.esm.js +1 -1
- package/dist/solutions-components/utils/downloadUtils.ts +21 -10
- package/dist/types/components/crowdsource-manager/crowdsource-manager.d.ts +17 -0
- package/dist/types/components/info-card/info-card.d.ts +23 -0
- package/dist/types/components/map-card/map-card.d.ts +4 -0
- package/dist/types/components/map-tools/map-tools.d.ts +0 -42
- package/dist/types/utils/downloadUtils.d.ts +7 -3
- package/package.json +1 -1
- package/dist/solutions-components/p-0dce2c3b.entry.js +0 -6
- package/dist/solutions-components/p-476eb52c.entry.js +0 -6
- package/dist/solutions-components/p-8b8a6c1f.entry.js +0 -6
- package/dist/solutions-components/p-97a4001d.entry.js +0 -6
@@ -6,8 +6,8 @@
|
|
6
6
|
import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
7
7
|
import { g as getLocaleComponentStrings } from './locale.js';
|
8
8
|
import { l as loadModules } from './loadModules.js';
|
9
|
-
import { d as defineCustomElement$9 } from './
|
10
|
-
import { d as defineCustomElement$8 } from './
|
9
|
+
import { d as defineCustomElement$9 } from './alert.js';
|
10
|
+
import { d as defineCustomElement$8 } from './button.js';
|
11
11
|
import { d as defineCustomElement$7 } from './chip.js';
|
12
12
|
import { d as defineCustomElement$6 } from './icon.js';
|
13
13
|
import { d as defineCustomElement$5 } from './loader.js';
|
@@ -16,7 +16,7 @@ import { d as defineCustomElement$3 } from './shell.js';
|
|
16
16
|
import { d as defineCustomElement$2 } from './tooltip.js';
|
17
17
|
import { d as defineCustomElement$1 } from './edit-card2.js';
|
18
18
|
|
19
|
-
const infoCardCss = ":host{display:block;--calcite-label-margin-bottom:0}table{border-collapse:collapse;width:100%}th,td{text-align:left;padding:8px}tr:nth-child(odd){background:var(--calcite-ui-foreground-2)}.bottom-border{padding-bottom:0.5rem;border-bottom:1px solid var(--calcite-ui-border-1)}.padding-1-2{padding:0.5rem}.padding-top-1-2{padding-top:0.5rem}.font-color-3{color:var(--calcite-ui-text-3)}.display-none{display:none}.display-flex{display:flex}.position-absolute{position:absolute;top:0;right:0;bottom:0;left:0;overflow:auto}.edit-btn{z-index:999;position:absolute
|
19
|
+
const infoCardCss = ":host{display:block;--calcite-label-margin-bottom:0}table{border-collapse:collapse;width:100%}th,td{text-align:left;padding:8px}tr:nth-child(odd){background:var(--calcite-ui-foreground-2)}.bottom-border{padding-bottom:0.5rem;border-bottom:1px solid var(--calcite-ui-border-1)}.padding-1-2{padding:0.5rem}.padding-top-1-2{padding-top:0.5rem}.font-color-3{color:var(--calcite-ui-text-3)}.display-none{display:none}.display-flex{display:flex}.position-absolute{position:absolute;top:0;right:0;bottom:0;left:0;overflow:auto}.edit-btn{z-index:999;position:absolute}.edit-btn-position{right:0.5rem;top:0.5rem}html[dir=\"rtl\"] .edit-btn-position{left:0}.esri-features__footer{display:none !important}.button-container{justify-content:space-between;align-items:center}.min-width-100{min-width:100px}";
|
20
20
|
|
21
21
|
const InfoCard = /*@__PURE__*/ proxyCustomElement(class InfoCard extends HTMLElement {
|
22
22
|
constructor() {
|
@@ -28,6 +28,7 @@ const InfoCard = /*@__PURE__*/ proxyCustomElement(class InfoCard extends HTMLEle
|
|
28
28
|
this.mapView = undefined;
|
29
29
|
this.zoomAndScrollToSelected = undefined;
|
30
30
|
this._alertOpen = false;
|
31
|
+
this._count = "";
|
31
32
|
this._editRecordOpen = false;
|
32
33
|
this._translations = undefined;
|
33
34
|
}
|
@@ -105,7 +106,7 @@ const InfoCard = /*@__PURE__*/ proxyCustomElement(class InfoCard extends HTMLEle
|
|
105
106
|
const featureNodeClass = this.isLoading || this._editRecordOpen ? "display-none" : "position-absolute";
|
106
107
|
const editClass = !this.isLoading && this._editRecordOpen ? "position-absolute" : "display-none";
|
107
108
|
const editButtonClass = !this.isLoading && this._editRecordOpen ? "display-none" : "";
|
108
|
-
return (h(Host, null, h("calcite-shell", null, h("calcite-loader", { class: loadingClass, label: this._translations.fetchingData }), h("div", { class: "esri-widget " + featureNodeClass, id: "features-node" }), h("div", { class: `${editButtonClass} edit-btn edit-btn-position` }, h("calcite-
|
109
|
+
return (h(Host, null, h("calcite-shell", null, h("calcite-loader", { class: loadingClass, label: this._translations.fetchingData }), h("div", { class: "esri-widget " + featureNodeClass, id: "features-node" }), h("div", { class: `${editButtonClass} display-flex padding-1-2 button-container`, slot: "footer" }, h("div", { class: "min-width-100" }, h("calcite-button", { appearance: "outline", id: "solutions-back", onClick: () => this._back(), width: "full" }, this._translations.back), h("calcite-tooltip", { label: "", placement: "top", "reference-element": "solutions-back" }, h("span", null, this._translations.back))), h("div", null, this._getCount()), h("div", { class: "min-width-100" }, h("calcite-button", { appearance: "outline", id: "solutions-next", onClick: () => this._next(), width: "full" }, this._translations.next), h("calcite-tooltip", { label: "", placement: "top", "reference-element": "solutions-next" }, h("span", null, this._translations.next)))), h("div", { class: `${editButtonClass} edit-btn edit-btn-position` }, h("calcite-button", { appearance: "outline", "icon-start": "pencil", id: "solutions-edit", onClick: () => this._openEditRecord() }, this._translations.edit), h("calcite-tooltip", { label: "", placement: "bottom", "reference-element": "solutions-edit" }, h("span", null, this._translations.edit))), h("edit-card", { class: editClass, graphicIndex: (_a = this._features) === null || _a === void 0 ? void 0 : _a.selectedFeatureIndex, graphics: this.graphics, mapView: this.mapView, open: this._editRecordOpen }), h("calcite-alert", { icon: "layer-broken", kind: "warning", label: "", onCalciteAlertClose: () => this._alertClosed(), open: this._alertOpen, placement: "top" }, h("div", { slot: "title" }, this._translations.editDisabled), h("div", { slot: "message" }, this._translations.enableEditing)))));
|
109
110
|
}
|
110
111
|
//--------------------------------------------------------------------------
|
111
112
|
//
|
@@ -186,6 +187,37 @@ const InfoCard = /*@__PURE__*/ proxyCustomElement(class InfoCard extends HTMLEle
|
|
186
187
|
this._alertOpen = true;
|
187
188
|
}
|
188
189
|
}
|
190
|
+
/**
|
191
|
+
* Go to the previous feature in the features widget
|
192
|
+
*
|
193
|
+
* @returns void
|
194
|
+
*/
|
195
|
+
_back() {
|
196
|
+
this._features.previous();
|
197
|
+
this._count = this._getCount();
|
198
|
+
}
|
199
|
+
/**
|
200
|
+
* Go to the next feature in the features widget
|
201
|
+
*
|
202
|
+
* @returns void
|
203
|
+
*/
|
204
|
+
_next() {
|
205
|
+
this._features.next();
|
206
|
+
this._count = this._getCount();
|
207
|
+
}
|
208
|
+
/**
|
209
|
+
* Get the current index of total string
|
210
|
+
*
|
211
|
+
* @returns the index of total string
|
212
|
+
*/
|
213
|
+
_getCount() {
|
214
|
+
var _a, _b, _c;
|
215
|
+
const index = (((_a = this._features) === null || _a === void 0 ? void 0 : _a.viewModel.selectedFeatureIndex) + 1).toString();
|
216
|
+
const total = (_c = (_b = this._features) === null || _b === void 0 ? void 0 : _b.features) === null || _c === void 0 ? void 0 : _c.length.toString();
|
217
|
+
return this._translations.indexOfTotal
|
218
|
+
.replace("{{index}}", index)
|
219
|
+
.replace("{{total}}", total);
|
220
|
+
}
|
189
221
|
/**
|
190
222
|
* Fetches the component's translations
|
191
223
|
*
|
@@ -208,6 +240,7 @@ const InfoCard = /*@__PURE__*/ proxyCustomElement(class InfoCard extends HTMLEle
|
|
208
240
|
"mapView": [16],
|
209
241
|
"zoomAndScrollToSelected": [4, "zoom-and-scroll-to-selected"],
|
210
242
|
"_alertOpen": [32],
|
243
|
+
"_count": [32],
|
211
244
|
"_editRecordOpen": [32],
|
212
245
|
"_translations": [32],
|
213
246
|
"getSelectedFeature": [64]
|
@@ -216,19 +249,19 @@ function defineCustomElement() {
|
|
216
249
|
if (typeof customElements === "undefined") {
|
217
250
|
return;
|
218
251
|
}
|
219
|
-
const components = ["info-card", "calcite-
|
252
|
+
const components = ["info-card", "calcite-alert", "calcite-button", "calcite-chip", "calcite-icon", "calcite-loader", "calcite-notice", "calcite-shell", "calcite-tooltip", "edit-card"];
|
220
253
|
components.forEach(tagName => { switch (tagName) {
|
221
254
|
case "info-card":
|
222
255
|
if (!customElements.get(tagName)) {
|
223
256
|
customElements.define(tagName, InfoCard);
|
224
257
|
}
|
225
258
|
break;
|
226
|
-
case "calcite-
|
259
|
+
case "calcite-alert":
|
227
260
|
if (!customElements.get(tagName)) {
|
228
261
|
defineCustomElement$9();
|
229
262
|
}
|
230
263
|
break;
|
231
|
-
case "calcite-
|
264
|
+
case "calcite-button":
|
232
265
|
if (!customElements.get(tagName)) {
|
233
266
|
defineCustomElement$8();
|
234
267
|
}
|
@@ -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%}.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)}.padding-5{padding:5px}.height-51{height:51px}";
|
36
|
+
const layerTableCss = ":host{display:block}.height-full{height:100%}.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)}.padding-5{padding:5px}.height-51{height:51px}.bottom-left{position:absolute;left:0;bottom:0}html[dir=\"rtl\"] .bottom-left{position:absolute;right:0;bottom:0}.background{background-color:var(--calcite-ui-background)}.text-color{color:var(--calcite-ui-text-1)}";
|
37
37
|
|
38
38
|
const LayerTable = /*@__PURE__*/ proxyCustomElement(class LayerTable extends HTMLElement {
|
39
39
|
constructor() {
|
@@ -167,7 +167,11 @@ const LayerTable = /*@__PURE__*/ proxyCustomElement(class LayerTable extends HTM
|
|
167
167
|
const tableNodeClass = this._fetchingData ? "display-none" : "";
|
168
168
|
const loadingClass = this._fetchingData ? "" : "display-none";
|
169
169
|
const alertActionClass = this._alertShowAction ? "" : "display-none";
|
170
|
-
|
170
|
+
const total = this._allIds.length.toString();
|
171
|
+
const selected = this._selectedIndexes.length.toString();
|
172
|
+
return (h(Host, null, h("calcite-shell", null, this._getTableControlRow("header"), h("div", { class: "height-full width-full" }, h("calcite-panel", { class: "height-full width-full" }, h("calcite-loader", { class: loadingClass, label: this._translations.fetchingData, scale: "l" }), h("div", { class: tableNodeClass, ref: this.onTableNodeCreate })), h("div", { class: "bottom-left background text-color" }, this._translations.recordsSelected
|
173
|
+
.replace("{{total}}", total)
|
174
|
+
.replace("{{selected}}", selected))), h("calcite-alert", { icon: this._alertIcon, kind: this._alertKind, label: "", onCalciteAlertClose: () => this._alertClosed(), open: this._alertOpen, placement: "top" }, h("div", { slot: "title" }, this._alertTitle), h("div", { slot: "message" }, this._alertMessage), h("calcite-link", { class: alertActionClass, onClick: this._alertActionFunction, slot: "link" }, this._alertActionText)))));
|
171
175
|
}
|
172
176
|
//--------------------------------------------------------------------------
|
173
177
|
//
|
@@ -28,7 +28,7 @@ import { d as defineCustomElement$3 } from './map-picker2.js';
|
|
28
28
|
import { d as defineCustomElement$2 } from './map-search2.js';
|
29
29
|
import { d as defineCustomElement$1 } from './map-tools2.js';
|
30
30
|
|
31
|
-
const mapCardCss = ":host{display:block;--calcite-label-margin-bottom:0;--calcite-block-padding:0}.map-height{height:calc(100% - 58px)}
|
31
|
+
const mapCardCss = ":host{display:block;--calcite-label-margin-bottom:0;--calcite-block-padding:0}.map-height{height:calc(100% - 58px)}";
|
32
32
|
|
33
33
|
const MapCard = /*@__PURE__*/ proxyCustomElement(class MapCard extends HTMLElement {
|
34
34
|
constructor() {
|
@@ -80,12 +80,14 @@ const MapCard = /*@__PURE__*/ proxyCustomElement(class MapCard extends HTMLEleme
|
|
80
80
|
* @protected
|
81
81
|
*/
|
82
82
|
async _initModules() {
|
83
|
-
const [WebMap, MapView] = await loadModules([
|
83
|
+
const [WebMap, MapView, Home] = await loadModules([
|
84
84
|
"esri/WebMap",
|
85
|
-
"esri/views/MapView"
|
85
|
+
"esri/views/MapView",
|
86
|
+
"esri/widgets/Home"
|
86
87
|
]);
|
87
88
|
this.WebMap = WebMap;
|
88
89
|
this.MapView = MapView;
|
90
|
+
this.Home = Home;
|
89
91
|
}
|
90
92
|
/**
|
91
93
|
* Load the webmap for the provided webMapInfo
|
@@ -111,13 +113,17 @@ const MapCard = /*@__PURE__*/ proxyCustomElement(class MapCard extends HTMLEleme
|
|
111
113
|
map: webMap,
|
112
114
|
resizeAlign: "top-left"
|
113
115
|
});
|
116
|
+
this._loadedId = id;
|
117
|
+
this._searchConfiguration = this._webMapInfo.searchConfiguration;
|
118
|
+
this.mapChanged.emit({
|
119
|
+
id: id,
|
120
|
+
mapView: this.mapView
|
121
|
+
});
|
114
122
|
await this.mapView.when(() => {
|
115
|
-
|
116
|
-
|
117
|
-
this.mapChanged.emit({
|
118
|
-
id: id,
|
119
|
-
mapView: this.mapView
|
123
|
+
const home = new this.Home({
|
124
|
+
view: this.mapView
|
120
125
|
});
|
126
|
+
this.mapView.ui.add(home, { position: "top-left", index: 3 });
|
121
127
|
this.mapView.ui.add(this._mapTools, { position: "top-right", index: 0 });
|
122
128
|
});
|
123
129
|
}
|
@@ -21,7 +21,7 @@ import { d as defineCustomElement$3 } from './progress.js';
|
|
21
21
|
import { d as defineCustomElement$2 } from './scrim.js';
|
22
22
|
import { d as defineCustomElement$1 } from './stack.js';
|
23
23
|
|
24
|
-
const mapPickerCss = ":host{display:block}.width-full{width:100%}.height-full{height:100%}.display-flex{display:flex}.border-bottom-1{border-width:0px;border-bottom-width:1px;border-style:solid;border-color:var(--calcite-ui-border-3)}.action-bar-size{height:51px;width:100%}.map-list{position:absolute;display:flex;flex-direction:column;overflow:hidden;animation:calcite-scrim-fade-in var(--calcite-internal-animation-timing-medium) ease-in-out;background-color:var(--calcite-scrim-background);z-index:
|
24
|
+
const mapPickerCss = ":host{display:block}.width-full{width:100%}.height-full{height:100%}.display-flex{display:flex}.border-bottom-1{border-width:0px;border-bottom-width:1px;border-style:solid;border-color:var(--calcite-ui-border-3)}.action-bar-size{height:51px;width:100%}.map-list{position:absolute;display:flex;flex-direction:column;overflow:hidden;animation:calcite-scrim-fade-in var(--calcite-internal-animation-timing-medium) ease-in-out;background-color:var(--calcite-scrim-background);z-index:1000;width:100%;height:-moz-fit-content;height:fit-content}.display-none{display:none}.action-bar-color{background-color:var(--calcite-ui-border-3) !important}";
|
25
25
|
|
26
26
|
const MapPicker = /*@__PURE__*/ proxyCustomElement(class MapPicker extends HTMLElement {
|
27
27
|
constructor() {
|
@@ -103,7 +103,7 @@ const MapPicker = /*@__PURE__*/ proxyCustomElement(class MapPicker extends HTMLE
|
|
103
103
|
_getMapPicker() {
|
104
104
|
var _a;
|
105
105
|
const mapListIcon = this._mapListExpanded ? "chevron-up" : "chevron-down";
|
106
|
-
return (h("calcite-button", { alignment: "icon-end-space-between", appearance: "
|
106
|
+
return (h("calcite-button", { alignment: "icon-end-space-between", appearance: "transparent", class: "width-full height-full", iconEnd: mapListIcon, kind: "neutral", onClick: () => this._chooseMap(), width: "full" }, (_a = this._webMapInfo) === null || _a === void 0 ? void 0 : _a.name));
|
107
107
|
}
|
108
108
|
/**
|
109
109
|
* Create the toolbar (controls used for map and app interactions)
|
@@ -113,7 +113,7 @@ const MapPicker = /*@__PURE__*/ proxyCustomElement(class MapPicker extends HTMLE
|
|
113
113
|
* @protected
|
114
114
|
*/
|
115
115
|
_getToolbar() {
|
116
|
-
return (h("div", { class: "display-flex" }, h("calcite-action-bar", { class: "border-bottom-1 action-bar-size", "expand-disabled": true, layout: "horizontal", slot: "header" }, this._getMapPicker())));
|
116
|
+
return (h("div", { class: "display-flex" }, h("calcite-action-bar", { class: "action-bar-color border-bottom-1 action-bar-size", "expand-disabled": true, layout: "horizontal", slot: "header" }, this._getMapPicker())));
|
117
117
|
}
|
118
118
|
/**
|
119
119
|
* Get a pick list for all maps in mapInfos
|
@@ -18,7 +18,7 @@ import { d as defineCustomElement$3 } from './tooltip.js';
|
|
18
18
|
import { d as defineCustomElement$2 } from './map-legend2.js';
|
19
19
|
import { d as defineCustomElement$1 } from './map-search2.js';
|
20
20
|
|
21
|
-
const mapToolsCss = ":host{display:block}.display-none{display:none}.border{border:1px solid var(--calcite-ui-border-3)}.margin-top-1-2{margin-top:0.5rem}";
|
21
|
+
const mapToolsCss = ":host{display:block}.display-none{display:none}.border{border:1px solid var(--calcite-ui-border-3)}.margin-top-1-2{margin-top:0.5rem}.square-40{width:40px;height:40px}.width-40{width:40px}.square-40-41{width:40px;height:41px}";
|
22
22
|
|
23
23
|
const MapTools = /*@__PURE__*/ proxyCustomElement(class MapTools extends HTMLElement {
|
24
24
|
constructor() {
|
@@ -40,14 +40,6 @@ const MapTools = /*@__PURE__*/ proxyCustomElement(class MapTools extends HTMLEle
|
|
40
40
|
// Watch handlers
|
41
41
|
//
|
42
42
|
//--------------------------------------------------------------------------
|
43
|
-
/**
|
44
|
-
* Store the home extent when the map view changes
|
45
|
-
*/
|
46
|
-
async mapViewWatchHandler() {
|
47
|
-
await this.mapView.when(() => {
|
48
|
-
this._homeExtent = this.mapView.extent;
|
49
|
-
});
|
50
|
-
}
|
51
43
|
/**
|
52
44
|
* When the _showBasemapWidget property is true display the basemap gallery
|
53
45
|
*/
|
@@ -110,7 +102,7 @@ const MapTools = /*@__PURE__*/ proxyCustomElement(class MapTools extends HTMLEle
|
|
110
102
|
const searchClass = this._showSearchWidget ? "" : "display-none";
|
111
103
|
const basemapClass = this._showBasemapWidget ? "" : "display-none";
|
112
104
|
const legendClass = this._showLegendWidget ? "" : "display-none";
|
113
|
-
return (h(Host, null, h("div", null, h("calcite-action", { alignment: "center", class: "border", compact: false, icon: toggleIcon, onClick: () => { this._toggleTools(); }, text: "" }), h("calcite-action-bar", { class: `border margin-top-1-2 ${toolsClass}`, "expand-disabled": true, layout: this.layout }, this._getActionGroup("
|
105
|
+
return (h(Host, null, h("div", null, h("calcite-action", { alignment: "center", class: "border square-40", compact: false, icon: toggleIcon, onClick: () => { this._toggleTools(); }, scale: "s", text: "" }), h("calcite-action-bar", { class: `width-40 border margin-top-1-2 ${toolsClass}`, "expand-disabled": true, layout: this.layout }, this._getActionGroup("legend", false, this._translations.legend, () => this._showLegend()), this._getActionGroup("magnifying-glass", false, this._translations.search, () => this._search()), this._getActionGroup("expand", false, this._translations.expand, () => this._expand()), this._getActionGroup("basemap", false, this._translations.basemap, () => this._toggleBasemapPicker()))), h("basemap-gallery", { class: basemapClass, mapView: this.mapView, ref: (el) => { this._basemapElement = el; } }), h("map-search", { class: searchClass, mapView: this.mapView, ref: (el) => { this._searchElement = el; }, searchConfiguration: this.searchConfiguration }), h("map-legend", { class: legendClass, mapView: this.mapView, ref: (el) => { this._legendElement = el; } })));
|
114
106
|
}
|
115
107
|
//--------------------------------------------------------------------------
|
116
108
|
//
|
@@ -130,17 +122,7 @@ const MapTools = /*@__PURE__*/ proxyCustomElement(class MapTools extends HTMLEle
|
|
130
122
|
* @protected
|
131
123
|
*/
|
132
124
|
_getActionGroup(icon, disabled, tip, func) {
|
133
|
-
return (h("calcite-action-group",
|
134
|
-
}
|
135
|
-
/**
|
136
|
-
* Go to the exent that was first used when loading the map
|
137
|
-
*
|
138
|
-
* @returns void
|
139
|
-
*
|
140
|
-
* @protected
|
141
|
-
*/
|
142
|
-
async _goHome() {
|
143
|
-
await this.mapView.goTo(this._homeExtent);
|
125
|
+
return (h("calcite-action-group", { class: "square-40-41" }, h("calcite-action", { alignment: "center", class: "square-40", compact: false, disabled: disabled, icon: icon, id: icon, onClick: func, scale: "s", text: "" }, h("calcite-icon", { icon: "cheveron-up", scale: "s", slot: "icon" })), h("calcite-tooltip", { label: "", placement: "trailing", "reference-element": icon }, h("span", null, tip))));
|
144
126
|
}
|
145
127
|
// need to discuss this with the team
|
146
128
|
_showLegend() {
|
@@ -152,42 +134,6 @@ const MapTools = /*@__PURE__*/ proxyCustomElement(class MapTools extends HTMLEle
|
|
152
134
|
this._showSearchWidget = !this._showSearchWidget;
|
153
135
|
this._showTools = false;
|
154
136
|
}
|
155
|
-
/**
|
156
|
-
* Fixed zoom in
|
157
|
-
*
|
158
|
-
* @returns void
|
159
|
-
*
|
160
|
-
* @protected
|
161
|
-
*/
|
162
|
-
async _zoomIn() {
|
163
|
-
await this._zoom(this.mapView.zoom + 1);
|
164
|
-
}
|
165
|
-
/**
|
166
|
-
* Fixed zoom out
|
167
|
-
*
|
168
|
-
* @returns void
|
169
|
-
*
|
170
|
-
* @protected
|
171
|
-
*/
|
172
|
-
async _zoomOut() {
|
173
|
-
await this._zoom(this.mapView.zoom - 1);
|
174
|
-
}
|
175
|
-
/**
|
176
|
-
* Zoom in/out at the maps current center point
|
177
|
-
*
|
178
|
-
* @param zoom Number to zoom level to go to
|
179
|
-
*
|
180
|
-
* @returns void
|
181
|
-
*
|
182
|
-
* @protected
|
183
|
-
*/
|
184
|
-
async _zoom(zoom) {
|
185
|
-
var _a;
|
186
|
-
await ((_a = this.mapView) === null || _a === void 0 ? void 0 : _a.goTo({
|
187
|
-
target: this.mapView.center,
|
188
|
-
zoom
|
189
|
-
}));
|
190
|
-
}
|
191
137
|
/**
|
192
138
|
* Show/Hide the basemap picker
|
193
139
|
*
|
@@ -236,7 +182,6 @@ const MapTools = /*@__PURE__*/ proxyCustomElement(class MapTools extends HTMLEle
|
|
236
182
|
}
|
237
183
|
get el() { return this; }
|
238
184
|
static get watchers() { return {
|
239
|
-
"mapView": ["mapViewWatchHandler"],
|
240
185
|
"_showBasemapWidget": ["_showBasemapWidgetWatchHandler"],
|
241
186
|
"_showLegendWidget": ["_showLegendWidgetWatchHandler"],
|
242
187
|
"_showSearchWidget": ["_showSearchWidgetWatchHandler"]
|
@@ -189,7 +189,7 @@ const MapLegend = class {
|
|
189
189
|
};
|
190
190
|
MapLegend.style = mapLegendCss;
|
191
191
|
|
192
|
-
const mapPickerCss = ":host{display:block}.width-full{width:100%}.height-full{height:100%}.display-flex{display:flex}.border-bottom-1{border-width:0px;border-bottom-width:1px;border-style:solid;border-color:var(--calcite-ui-border-3)}.action-bar-size{height:51px;width:100%}.map-list{position:absolute;display:flex;flex-direction:column;overflow:hidden;animation:calcite-scrim-fade-in var(--calcite-internal-animation-timing-medium) ease-in-out;background-color:var(--calcite-scrim-background);z-index:
|
192
|
+
const mapPickerCss = ":host{display:block}.width-full{width:100%}.height-full{height:100%}.display-flex{display:flex}.border-bottom-1{border-width:0px;border-bottom-width:1px;border-style:solid;border-color:var(--calcite-ui-border-3)}.action-bar-size{height:51px;width:100%}.map-list{position:absolute;display:flex;flex-direction:column;overflow:hidden;animation:calcite-scrim-fade-in var(--calcite-internal-animation-timing-medium) ease-in-out;background-color:var(--calcite-scrim-background);z-index:1000;width:100%;height:-moz-fit-content;height:fit-content}.display-none{display:none}.action-bar-color{background-color:var(--calcite-ui-border-3) !important}";
|
193
193
|
|
194
194
|
const MapPicker = class {
|
195
195
|
constructor(hostRef) {
|
@@ -269,7 +269,7 @@ const MapPicker = class {
|
|
269
269
|
_getMapPicker() {
|
270
270
|
var _a;
|
271
271
|
const mapListIcon = this._mapListExpanded ? "chevron-up" : "chevron-down";
|
272
|
-
return (h("calcite-button", { alignment: "icon-end-space-between", appearance: "
|
272
|
+
return (h("calcite-button", { alignment: "icon-end-space-between", appearance: "transparent", class: "width-full height-full", iconEnd: mapListIcon, kind: "neutral", onClick: () => this._chooseMap(), width: "full" }, (_a = this._webMapInfo) === null || _a === void 0 ? void 0 : _a.name));
|
273
273
|
}
|
274
274
|
/**
|
275
275
|
* Create the toolbar (controls used for map and app interactions)
|
@@ -279,7 +279,7 @@ const MapPicker = class {
|
|
279
279
|
* @protected
|
280
280
|
*/
|
281
281
|
_getToolbar() {
|
282
|
-
return (h("div", { class: "display-flex" }, h("calcite-action-bar", { class: "border-bottom-1 action-bar-size", "expand-disabled": true, layout: "horizontal", slot: "header" }, this._getMapPicker())));
|
282
|
+
return (h("div", { class: "display-flex" }, h("calcite-action-bar", { class: "action-bar-color border-bottom-1 action-bar-size", "expand-disabled": true, layout: "horizontal", slot: "header" }, this._getMapPicker())));
|
283
283
|
}
|
284
284
|
/**
|
285
285
|
* Get a pick list for all maps in mapInfos
|
@@ -496,7 +496,7 @@ const MapSearch = class {
|
|
496
496
|
};
|
497
497
|
MapSearch.style = mapSearchCss;
|
498
498
|
|
499
|
-
const mapToolsCss = ":host{display:block}.display-none{display:none}.border{border:1px solid var(--calcite-ui-border-3)}.margin-top-1-2{margin-top:0.5rem}";
|
499
|
+
const mapToolsCss = ":host{display:block}.display-none{display:none}.border{border:1px solid var(--calcite-ui-border-3)}.margin-top-1-2{margin-top:0.5rem}.square-40{width:40px;height:40px}.width-40{width:40px}.square-40-41{width:40px;height:41px}";
|
500
500
|
|
501
501
|
const MapTools = class {
|
502
502
|
constructor(hostRef) {
|
@@ -516,14 +516,6 @@ const MapTools = class {
|
|
516
516
|
// Watch handlers
|
517
517
|
//
|
518
518
|
//--------------------------------------------------------------------------
|
519
|
-
/**
|
520
|
-
* Store the home extent when the map view changes
|
521
|
-
*/
|
522
|
-
async mapViewWatchHandler() {
|
523
|
-
await this.mapView.when(() => {
|
524
|
-
this._homeExtent = this.mapView.extent;
|
525
|
-
});
|
526
|
-
}
|
527
519
|
/**
|
528
520
|
* When the _showBasemapWidget property is true display the basemap gallery
|
529
521
|
*/
|
@@ -586,7 +578,7 @@ const MapTools = class {
|
|
586
578
|
const searchClass = this._showSearchWidget ? "" : "display-none";
|
587
579
|
const basemapClass = this._showBasemapWidget ? "" : "display-none";
|
588
580
|
const legendClass = this._showLegendWidget ? "" : "display-none";
|
589
|
-
return (h(Host, null, h("div", null, h("calcite-action", { alignment: "center", class: "border", compact: false, icon: toggleIcon, onClick: () => { this._toggleTools(); }, text: "" }), h("calcite-action-bar", { class: `border margin-top-1-2 ${toolsClass}`, "expand-disabled": true, layout: this.layout }, this._getActionGroup("
|
581
|
+
return (h(Host, null, h("div", null, h("calcite-action", { alignment: "center", class: "border square-40", compact: false, icon: toggleIcon, onClick: () => { this._toggleTools(); }, scale: "s", text: "" }), h("calcite-action-bar", { class: `width-40 border margin-top-1-2 ${toolsClass}`, "expand-disabled": true, layout: this.layout }, this._getActionGroup("legend", false, this._translations.legend, () => this._showLegend()), this._getActionGroup("magnifying-glass", false, this._translations.search, () => this._search()), this._getActionGroup("expand", false, this._translations.expand, () => this._expand()), this._getActionGroup("basemap", false, this._translations.basemap, () => this._toggleBasemapPicker()))), h("basemap-gallery", { class: basemapClass, mapView: this.mapView, ref: (el) => { this._basemapElement = el; } }), h("map-search", { class: searchClass, mapView: this.mapView, ref: (el) => { this._searchElement = el; }, searchConfiguration: this.searchConfiguration }), h("map-legend", { class: legendClass, mapView: this.mapView, ref: (el) => { this._legendElement = el; } })));
|
590
582
|
}
|
591
583
|
//--------------------------------------------------------------------------
|
592
584
|
//
|
@@ -606,17 +598,7 @@ const MapTools = class {
|
|
606
598
|
* @protected
|
607
599
|
*/
|
608
600
|
_getActionGroup(icon, disabled, tip, func) {
|
609
|
-
return (h("calcite-action-group",
|
610
|
-
}
|
611
|
-
/**
|
612
|
-
* Go to the exent that was first used when loading the map
|
613
|
-
*
|
614
|
-
* @returns void
|
615
|
-
*
|
616
|
-
* @protected
|
617
|
-
*/
|
618
|
-
async _goHome() {
|
619
|
-
await this.mapView.goTo(this._homeExtent);
|
601
|
+
return (h("calcite-action-group", { class: "square-40-41" }, h("calcite-action", { alignment: "center", class: "square-40", compact: false, disabled: disabled, icon: icon, id: icon, onClick: func, scale: "s", text: "" }, h("calcite-icon", { icon: "cheveron-up", scale: "s", slot: "icon" })), h("calcite-tooltip", { label: "", placement: "trailing", "reference-element": icon }, h("span", null, tip))));
|
620
602
|
}
|
621
603
|
// need to discuss this with the team
|
622
604
|
_showLegend() {
|
@@ -628,42 +610,6 @@ const MapTools = class {
|
|
628
610
|
this._showSearchWidget = !this._showSearchWidget;
|
629
611
|
this._showTools = false;
|
630
612
|
}
|
631
|
-
/**
|
632
|
-
* Fixed zoom in
|
633
|
-
*
|
634
|
-
* @returns void
|
635
|
-
*
|
636
|
-
* @protected
|
637
|
-
*/
|
638
|
-
async _zoomIn() {
|
639
|
-
await this._zoom(this.mapView.zoom + 1);
|
640
|
-
}
|
641
|
-
/**
|
642
|
-
* Fixed zoom out
|
643
|
-
*
|
644
|
-
* @returns void
|
645
|
-
*
|
646
|
-
* @protected
|
647
|
-
*/
|
648
|
-
async _zoomOut() {
|
649
|
-
await this._zoom(this.mapView.zoom - 1);
|
650
|
-
}
|
651
|
-
/**
|
652
|
-
* Zoom in/out at the maps current center point
|
653
|
-
*
|
654
|
-
* @param zoom Number to zoom level to go to
|
655
|
-
*
|
656
|
-
* @returns void
|
657
|
-
*
|
658
|
-
* @protected
|
659
|
-
*/
|
660
|
-
async _zoom(zoom) {
|
661
|
-
var _a;
|
662
|
-
await ((_a = this.mapView) === null || _a === void 0 ? void 0 : _a.goTo({
|
663
|
-
target: this.mapView.center,
|
664
|
-
zoom
|
665
|
-
}));
|
666
|
-
}
|
667
613
|
/**
|
668
614
|
* Show/Hide the basemap picker
|
669
615
|
*
|
@@ -712,7 +658,6 @@ const MapTools = class {
|
|
712
658
|
}
|
713
659
|
get el() { return getElement(this); }
|
714
660
|
static get watchers() { return {
|
715
|
-
"mapView": ["mapViewWatchHandler"],
|
716
661
|
"_showBasemapWidget": ["_showBasemapWidgetWatchHandler"],
|
717
662
|
"_showLegendWidget": ["_showLegendWidgetWatchHandler"],
|
718
663
|
"_showSearchWidget": ["_showSearchWidgetWatchHandler"]
|
@@ -7,7 +7,7 @@ import { r as registerInstance, h, H as Host, g as getElement, c as createEvent
|
|
7
7
|
import { g as getLocaleComponentStrings } from './locale-efad8f83.js';
|
8
8
|
import { q as queryFeaturesByID, a as getLayer, b as getMapLayerIds, g as goToSelection, c as queryAllIds } from './mapViewUtils-f0c04325.js';
|
9
9
|
import { l as loadModules } from './loadModules-f5f910b6.js';
|
10
|
-
import { d as downloadCSV } from './downloadUtils-
|
10
|
+
import { d as downloadCSV } from './downloadUtils-8d4c13bb.js';
|
11
11
|
import './_commonjsHelpers-d5f9d613.js';
|
12
12
|
import './interfaces-5a2fe8b4.js';
|
13
13
|
|
@@ -76,7 +76,7 @@ const CardManager = class {
|
|
76
76
|
var _a, _b;
|
77
77
|
const featuresClass = ((_a = this._graphics) === null || _a === void 0 ? void 0 : _a.length) > 0 ? "" : "display-none";
|
78
78
|
const messageClass = ((_b = this._graphics) === null || _b === void 0 ? void 0 : _b.length) > 0 ? "display-none" : "";
|
79
|
-
return (h(Host, null, h("div", { class: "border-rounded overflow-auto height-full" }, h("calcite-shell", { class: "position-relative
|
79
|
+
return (h(Host, null, h("div", { class: "border-rounded overflow-auto height-full" }, h("calcite-shell", { class: "position-relative " + featuresClass }, h("div", null, h("info-card", { graphics: this._graphics, isLoading: this._cardLoading, mapView: this.mapView, zoomAndScrollToSelected: this.zoomAndScrollToSelected }))), h("div", { class: "padding-1 " + messageClass }, h("calcite-notice", { icon: "table", open: true }, h("div", { slot: "message" }, this._translations.selectFeaturesToStart))))));
|
80
80
|
}
|
81
81
|
//--------------------------------------------------------------------------
|
82
82
|
//
|
@@ -97,7 +97,7 @@ const CardManager = class {
|
|
97
97
|
};
|
98
98
|
CardManager.style = cardManagerCss;
|
99
99
|
|
100
|
-
const layerTableCss = ":host{display:block}.height-full{height:100%}.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)}.padding-5{padding:5px}.height-51{height:51px}";
|
100
|
+
const layerTableCss = ":host{display:block}.height-full{height:100%}.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)}.padding-5{padding:5px}.height-51{height:51px}.bottom-left{position:absolute;left:0;bottom:0}html[dir=\"rtl\"] .bottom-left{position:absolute;right:0;bottom:0}.background{background-color:var(--calcite-ui-background)}.text-color{color:var(--calcite-ui-text-1)}";
|
101
101
|
|
102
102
|
const LayerTable = class {
|
103
103
|
constructor(hostRef) {
|
@@ -230,7 +230,11 @@ const LayerTable = class {
|
|
230
230
|
const tableNodeClass = this._fetchingData ? "display-none" : "";
|
231
231
|
const loadingClass = this._fetchingData ? "" : "display-none";
|
232
232
|
const alertActionClass = this._alertShowAction ? "" : "display-none";
|
233
|
-
|
233
|
+
const total = this._allIds.length.toString();
|
234
|
+
const selected = this._selectedIndexes.length.toString();
|
235
|
+
return (h(Host, null, h("calcite-shell", null, this._getTableControlRow("header"), h("div", { class: "height-full width-full" }, h("calcite-panel", { class: "height-full width-full" }, h("calcite-loader", { class: loadingClass, label: this._translations.fetchingData, scale: "l" }), h("div", { class: tableNodeClass, ref: this.onTableNodeCreate })), h("div", { class: "bottom-left background text-color" }, this._translations.recordsSelected
|
236
|
+
.replace("{{total}}", total)
|
237
|
+
.replace("{{selected}}", selected))), h("calcite-alert", { icon: this._alertIcon, kind: this._alertKind, label: "", onCalciteAlertClose: () => this._alertClosed(), open: this._alertOpen, placement: "top" }, h("div", { slot: "title" }, this._alertTitle), h("div", { slot: "message" }, this._alertMessage), h("calcite-link", { class: alertActionClass, onClick: this._alertActionFunction, slot: "link" }, this._alertActionText)))));
|
234
238
|
}
|
235
239
|
//--------------------------------------------------------------------------
|
236
240
|
//
|
@@ -585,7 +589,7 @@ const LayerTable = class {
|
|
585
589
|
};
|
586
590
|
LayerTable.style = layerTableCss;
|
587
591
|
|
588
|
-
const mapCardCss = ":host{display:block;--calcite-label-margin-bottom:0;--calcite-block-padding:0}.map-height{height:calc(100% - 58px)}
|
592
|
+
const mapCardCss = ":host{display:block;--calcite-label-margin-bottom:0;--calcite-block-padding:0}.map-height{height:calc(100% - 58px)}";
|
589
593
|
|
590
594
|
const MapCard = class {
|
591
595
|
constructor(hostRef) {
|
@@ -636,12 +640,14 @@ const MapCard = class {
|
|
636
640
|
* @protected
|
637
641
|
*/
|
638
642
|
async _initModules() {
|
639
|
-
const [WebMap, MapView] = await loadModules([
|
643
|
+
const [WebMap, MapView, Home] = await loadModules([
|
640
644
|
"esri/WebMap",
|
641
|
-
"esri/views/MapView"
|
645
|
+
"esri/views/MapView",
|
646
|
+
"esri/widgets/Home"
|
642
647
|
]);
|
643
648
|
this.WebMap = WebMap;
|
644
649
|
this.MapView = MapView;
|
650
|
+
this.Home = Home;
|
645
651
|
}
|
646
652
|
/**
|
647
653
|
* Load the webmap for the provided webMapInfo
|
@@ -667,13 +673,17 @@ const MapCard = class {
|
|
667
673
|
map: webMap,
|
668
674
|
resizeAlign: "top-left"
|
669
675
|
});
|
676
|
+
this._loadedId = id;
|
677
|
+
this._searchConfiguration = this._webMapInfo.searchConfiguration;
|
678
|
+
this.mapChanged.emit({
|
679
|
+
id: id,
|
680
|
+
mapView: this.mapView
|
681
|
+
});
|
670
682
|
await this.mapView.when(() => {
|
671
|
-
|
672
|
-
|
673
|
-
this.mapChanged.emit({
|
674
|
-
id: id,
|
675
|
-
mapView: this.mapView
|
683
|
+
const home = new this.Home({
|
684
|
+
view: this.mapView
|
676
685
|
});
|
686
|
+
this.mapView.ui.add(home, { position: "top-left", index: 3 });
|
677
687
|
this.mapView.ui.add(this._mapTools, { position: "top-right", index: 0 });
|
678
688
|
});
|
679
689
|
}
|
@@ -8,7 +8,7 @@ import { g as getLocaleComponentStrings } from './locale-efad8f83.js';
|
|
8
8
|
import { E as ELayoutMode } from './interfaces-5a2fe8b4.js';
|
9
9
|
import './_commonjsHelpers-d5f9d613.js';
|
10
10
|
|
11
|
-
const crowdsourceManagerCss = ":host{display:block;--calcite-label-margin-bottom:0px}.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)}.position-relative{position:relative}.height-50{height:50%}.adjusted-height-50{height:calc(50% - 0.5rem)}.adjusted-height-100{height:calc(100% - 1rem)}.display-none{display:none}.height-53{height:53px}.position-absolute-53{position:absolute;top:53px}.display-grid{display:grid}";
|
11
|
+
const crowdsourceManagerCss = ":host{display:block;--calcite-label-margin-bottom:0px}.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)}.position-relative{position:relative}.height-50{height:50%}.adjusted-height-50{height:calc(50% - 0.5rem - 25px)}.adjusted-height-100{height:calc(100% - 1rem - 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-49-px{height:49px}.height-50-px{height:50px}.padding-inline-end-75{padding-inline-end:0.75rem}.align-items-center{align-items:center}";
|
12
12
|
|
13
13
|
const CrowdsourceManager = class {
|
14
14
|
constructor(hostRef) {
|
@@ -19,6 +19,7 @@ const CrowdsourceManager = class {
|
|
19
19
|
this.mapInfos = [];
|
20
20
|
this.searchConfiguration = undefined;
|
21
21
|
this.zoomAndScrollToSelected = false;
|
22
|
+
this._expandPopup = false;
|
22
23
|
this._translations = undefined;
|
23
24
|
this._layoutMode = ELayoutMode.GRID;
|
24
25
|
this._mapView = undefined;
|
@@ -50,6 +51,9 @@ const CrowdsourceManager = class {
|
|
50
51
|
*/
|
51
52
|
async mapChanged(evt) {
|
52
53
|
const mapChange = evt.detail;
|
54
|
+
// close popup by default when the map changes otherwise other components that rely on the view don't work since it
|
55
|
+
// doesn't seem to fully load when it's not visible
|
56
|
+
this._expandPopup = false;
|
53
57
|
this._mapInfo = this._getMapInfo(mapChange.id);
|
54
58
|
this._mapView = mapChange.mapView;
|
55
59
|
this._mapView.popupEnabled = false;
|
@@ -186,7 +190,7 @@ const CrowdsourceManager = class {
|
|
186
190
|
*/
|
187
191
|
_getMapAndCard(layoutMode, panelOpen, hideMap) {
|
188
192
|
const mapSizeClass = this._getMapSizeClass(layoutMode, panelOpen);
|
189
|
-
return this.classicGrid ? (h("div", { class: `${mapSizeClass} overflow-hidden` }, this._getCardNode(layoutMode, hideMap), this._getMapNode(layoutMode, hideMap))) : (h("div", { class: `${mapSizeClass} overflow-hidden` }, this._getMapNode(layoutMode, hideMap), this._getCardNode(layoutMode, hideMap)));
|
193
|
+
return this.classicGrid ? (h("div", { class: `${mapSizeClass} overflow-hidden` }, this._getCardNode(layoutMode, hideMap), this._getMapNode(layoutMode, hideMap))) : (h("div", { class: `${mapSizeClass} overflow-hidden` }, this._getMapNode(layoutMode, hideMap), this._getPopupExpandNode(), this._getCardNode(layoutMode, hideMap)));
|
190
194
|
}
|
191
195
|
/**
|
192
196
|
* Get the map node based for the current layout options
|
@@ -200,9 +204,27 @@ const CrowdsourceManager = class {
|
|
200
204
|
_getMapNode(layoutMode, hideMap) {
|
201
205
|
const mapDisplayClass = this.classicGrid && layoutMode === ELayoutMode.GRID ? "display-flex height-full width-1-2" :
|
202
206
|
layoutMode === ELayoutMode.GRID && !hideMap ? "" : "display-none";
|
203
|
-
const mapContainerClass = this.classicGrid && layoutMode === ELayoutMode.GRID ? "width-full" : "adjusted-height-50";
|
207
|
+
const mapContainerClass = this.classicGrid && layoutMode === ELayoutMode.GRID ? "width-full" : this._expandPopup ? "height-50-px" : "adjusted-height-50";
|
204
208
|
return (h("div", { class: `${mapContainerClass} overflow-hidden ${mapDisplayClass}` }, h("map-card", { class: "width-full", mapInfos: this.mapInfos })));
|
205
209
|
}
|
210
|
+
/**
|
211
|
+
* Get the expand node for the popup information
|
212
|
+
*
|
213
|
+
* @returns the expand node
|
214
|
+
* @protected
|
215
|
+
*/
|
216
|
+
_getPopupExpandNode() {
|
217
|
+
const icon = this._expandPopup ? "chevrons-down" : "chevrons-up";
|
218
|
+
return (h("div", { class: "height-49-px calcite-mode-dark" }, h("calcite-panel", null, h("div", { class: "display-flex align-items-center", slot: "header-content" }, h("calcite-icon", { class: "padding-inline-end-75", icon: "information", scale: "s" }), h("div", null, this._translations.information)), h("calcite-action", { class: "height-49-px", icon: icon, onClick: () => this._togglePopup(), slot: "header-actions-end" }))));
|
219
|
+
}
|
220
|
+
/**
|
221
|
+
* Toggle the popup information
|
222
|
+
*
|
223
|
+
* @protected
|
224
|
+
*/
|
225
|
+
_togglePopup() {
|
226
|
+
this._expandPopup = !this._expandPopup;
|
227
|
+
}
|
206
228
|
/**
|
207
229
|
* Get the card node based for the current layout options
|
208
230
|
*
|
@@ -214,9 +236,9 @@ const CrowdsourceManager = class {
|
|
214
236
|
*/
|
215
237
|
_getCardNode(layoutMode, hideMap) {
|
216
238
|
const cardManagerHeight = this.classicGrid && layoutMode === ELayoutMode.GRID ? "" :
|
217
|
-
layoutMode === ELayoutMode.GRID && !hideMap ? "adjusted-height-50" : "adjusted-height-100";
|
239
|
+
layoutMode === ELayoutMode.GRID && !this._expandPopup && !hideMap ? "adjusted-height-50" : "adjusted-height-100";
|
218
240
|
const cardManagerContainer = this.classicGrid && layoutMode === ELayoutMode.GRID ?
|
219
|
-
"width-full adjusted-height-100" : "width-50 height-full";
|
241
|
+
"width-full adjusted-height-100" : this._expandPopup ? "width-50 adjusted-height-100-50" : "width-50 height-full";
|
220
242
|
return (h("div", { class: `padding-1-2 ${cardManagerContainer}` }, h("card-manager", { class: `${cardManagerHeight} width-full`, mapView: this === null || this === void 0 ? void 0 : this._mapView, zoomAndScrollToSelected: this.zoomAndScrollToSelected })));
|
221
243
|
}
|
222
244
|
/**
|