@esri/solutions-components 0.7.24 → 0.7.25
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/{info-card_4.cjs.entry.js → basemap-gallery_7.cjs.entry.js} +410 -324
- package/dist/cjs/buffer-tools_3.cjs.entry.js +3 -4
- package/dist/cjs/{calcite-alert_3.cjs.entry.js → calcite-alert_4.cjs.entry.js} +296 -3
- package/dist/cjs/calcite-combobox_6.cjs.entry.js +1 -2
- package/dist/cjs/calcite-flow_4.cjs.entry.js +3 -4
- package/dist/cjs/calcite-shell-panel_14.cjs.entry.js +1 -2
- package/dist/cjs/{card-manager_2.cjs.entry.js → card-manager_3.cjs.entry.js} +182 -5
- package/dist/cjs/crowdsource-manager.cjs.entry.js +1 -2
- package/dist/cjs/crowdsource-reporter.cjs.entry.js +32 -90
- package/dist/cjs/{downloadUtils-401356b5.js → downloadUtils-83c6d3c3.js} +6 -6
- package/dist/cjs/{index.es-a9a4ff08.js → index.es-bd1a93b2.js} +2 -2
- package/dist/cjs/layout-manager.cjs.entry.js +1 -2
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{locale-1ff119f5.js → locale-a476e15d.js} +24 -3
- package/dist/cjs/map-select-tools_3.cjs.entry.js +4 -5
- package/dist/cjs/{popupUtils-8d5b6e94.js → popupUtils-a73902a6.js} +2 -2
- package/dist/cjs/public-notification.cjs.entry.js +3 -4
- package/dist/cjs/solution-configuration.cjs.entry.js +1 -2
- package/dist/cjs/solution-contents_3.cjs.entry.js +1 -2
- package/dist/cjs/solutions-components.cjs.js +1 -1
- package/dist/cjs/spatial-ref.cjs.entry.js +1 -2
- package/dist/collection/components/crowdsource-reporter/crowdsource-reporter.css +5 -27
- package/dist/collection/components/crowdsource-reporter/crowdsource-reporter.js +69 -95
- package/dist/collection/demos/crowdsource-reporter.html +96 -45
- package/dist/components/crowdsource-reporter.js +95 -209
- package/dist/esm/{info-card_4.entry.js → basemap-gallery_7.entry.js} +406 -323
- package/dist/esm/buffer-tools_3.entry.js +1 -2
- package/dist/esm/{calcite-alert_3.entry.js → calcite-alert_4.entry.js} +295 -3
- package/dist/esm/calcite-combobox_6.entry.js +1 -2
- package/dist/esm/calcite-flow_4.entry.js +3 -4
- package/dist/esm/calcite-shell-panel_14.entry.js +1 -2
- package/dist/esm/{card-manager_2.entry.js → card-manager_3.entry.js} +181 -5
- package/dist/esm/crowdsource-manager.entry.js +1 -2
- package/dist/esm/crowdsource-reporter.entry.js +32 -90
- package/dist/esm/{downloadUtils-067dc2ff.js → downloadUtils-a301c193.js} +2 -2
- package/dist/esm/{index.es-92e46d8b.js → index.es-37a9907e.js} +2 -2
- package/dist/esm/layout-manager.entry.js +1 -2
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{locale-13e3c96c.js → locale-731e75a8.js} +22 -2
- package/dist/esm/map-select-tools_3.entry.js +2 -3
- package/dist/esm/{popupUtils-b71f30fc.js → popupUtils-a593bd78.js} +1 -1
- package/dist/esm/public-notification.entry.js +2 -3
- package/dist/esm/solution-configuration.entry.js +1 -2
- package/dist/esm/solution-contents_3.entry.js +1 -2
- package/dist/esm/solutions-components.js +1 -1
- package/dist/esm/spatial-ref.entry.js +1 -2
- package/dist/solutions-components/demos/crowdsource-reporter.html +96 -45
- package/dist/solutions-components/{p-36cbf14f.js → p-0587972d.js} +1 -1
- package/dist/solutions-components/p-0b4f4b0e.entry.js +6 -0
- package/dist/solutions-components/{p-f54f3719.entry.js → p-0b619197.entry.js} +1 -1
- package/dist/solutions-components/{p-d50f34c4.entry.js → p-2656c6e4.entry.js} +1 -1
- package/dist/solutions-components/p-284cc5cd.entry.js +6 -0
- package/dist/solutions-components/{p-01032eec.entry.js → p-29f661f5.entry.js} +2 -2
- package/dist/solutions-components/p-5af99fd8.entry.js +6 -0
- package/dist/solutions-components/{p-d9061e5d.entry.js → p-7116f96d.entry.js} +1 -1
- package/dist/solutions-components/p-7c13406e.entry.js +6 -0
- package/dist/solutions-components/{p-685257d1.entry.js → p-7dbccc10.entry.js} +1 -1
- package/dist/solutions-components/p-8308f64c.entry.js +6 -0
- package/dist/solutions-components/{p-ca4023f4.entry.js → p-891682da.entry.js} +1 -1
- package/dist/solutions-components/{p-14ff1465.js → p-a603e673.js} +2 -2
- package/dist/solutions-components/p-b37ec1f3.entry.js +6 -0
- package/dist/solutions-components/{p-fec77450.js → p-db868283.js} +1 -1
- package/dist/solutions-components/{p-fb1c6811.entry.js → p-dded59a7.entry.js} +1 -1
- package/dist/solutions-components/p-e88a64be.entry.js +6 -0
- package/dist/solutions-components/p-e902ba19.js +36 -0
- package/dist/solutions-components/p-fe295e9d.entry.js +6 -0
- package/dist/solutions-components/solutions-components.esm.js +1 -1
- package/dist/types/components/crowdsource-reporter/crowdsource-reporter.d.ts +14 -28
- package/dist/types/components.d.ts +16 -0
- package/package.json +1 -1
- package/dist/cjs/basemap-gallery_5.cjs.entry.js +0 -573
- package/dist/cjs/loadModules-46d14e81.js +0 -30
- package/dist/esm/basemap-gallery_5.entry.js +0 -565
- package/dist/esm/loadModules-cea493da.js +0 -28
- package/dist/solutions-components/p-3606c4b8.entry.js +0 -6
- package/dist/solutions-components/p-48ff9cea.js +0 -21
- package/dist/solutions-components/p-5e832d65.entry.js +0 -6
- package/dist/solutions-components/p-8fc072ca.entry.js +0 -6
- package/dist/solutions-components/p-a2d3df14.entry.js +0 -6
- package/dist/solutions-components/p-ab006ace.js +0 -21
- package/dist/solutions-components/p-ba56035f.entry.js +0 -6
- package/dist/solutions-components/p-c0ed2b83.entry.js +0 -6
- package/dist/solutions-components/p-cc88bb42.entry.js +0 -6
- package/dist/solutions-components/p-db69f4ba.entry.js +0 -6
- package/dist/solutions-components/p-e3061220.entry.js +0 -6
|
@@ -5,53 +5,44 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
7
7
|
import { g as getLocaleComponentStrings } from './locale.js';
|
|
8
|
-
import { d as defineCustomElement$
|
|
9
|
-
import { d as defineCustomElement$
|
|
10
|
-
import { d as defineCustomElement$
|
|
11
|
-
import { d as defineCustomElement$
|
|
12
|
-
import { d as defineCustomElement$
|
|
13
|
-
import { d as defineCustomElement$
|
|
14
|
-
import { d as defineCustomElement$
|
|
15
|
-
import { d as defineCustomElement$
|
|
16
|
-
import { d as defineCustomElement$
|
|
17
|
-
import { d as defineCustomElement$
|
|
18
|
-
import { d as defineCustomElement$
|
|
19
|
-
import { d as defineCustomElement$
|
|
20
|
-
import { d as defineCustomElement$
|
|
21
|
-
import { d as defineCustomElement$
|
|
22
|
-
import { d as defineCustomElement$
|
|
23
|
-
import { d as defineCustomElement$
|
|
24
|
-
import { d as defineCustomElement$
|
|
25
|
-
import { d as defineCustomElement$
|
|
26
|
-
import { d as defineCustomElement$
|
|
27
|
-
import { d as defineCustomElement$
|
|
28
|
-
import { d as defineCustomElement$
|
|
29
|
-
import { d as defineCustomElement$
|
|
30
|
-
import { d as defineCustomElement$
|
|
31
|
-
import { d as defineCustomElement$
|
|
32
|
-
import { d as defineCustomElement$
|
|
33
|
-
import { d as defineCustomElement$
|
|
34
|
-
import { d as defineCustomElement$
|
|
35
|
-
import { d as defineCustomElement$
|
|
36
|
-
import { d as defineCustomElement$
|
|
37
|
-
import { d as defineCustomElement$b } from './feature-list2.js';
|
|
38
|
-
import { d as defineCustomElement$a } from './floor-filter2.js';
|
|
39
|
-
import { d as defineCustomElement$9 } from './info-card2.js';
|
|
40
|
-
import { d as defineCustomElement$8 } from './layer-list2.js';
|
|
41
|
-
import { d as defineCustomElement$7 } from './map-card2.js';
|
|
42
|
-
import { d as defineCustomElement$6 } from './map-fullscreen2.js';
|
|
43
|
-
import { d as defineCustomElement$5 } from './map-legend2.js';
|
|
44
|
-
import { d as defineCustomElement$4 } from './map-picker2.js';
|
|
45
|
-
import { d as defineCustomElement$3 } from './map-search2.js';
|
|
46
|
-
import { d as defineCustomElement$2 } from './map-tools2.js';
|
|
8
|
+
import { d as defineCustomElement$u } from './action.js';
|
|
9
|
+
import { d as defineCustomElement$t } from './action-menu.js';
|
|
10
|
+
import { d as defineCustomElement$s } from './alert.js';
|
|
11
|
+
import { d as defineCustomElement$r } from './button.js';
|
|
12
|
+
import { d as defineCustomElement$q } from './chip.js';
|
|
13
|
+
import { d as defineCustomElement$p } from './filter2.js';
|
|
14
|
+
import { d as defineCustomElement$o } from './flow.js';
|
|
15
|
+
import { d as defineCustomElement$n } from './flow-item.js';
|
|
16
|
+
import { d as defineCustomElement$m } from './handle.js';
|
|
17
|
+
import { d as defineCustomElement$l } from './icon.js';
|
|
18
|
+
import { d as defineCustomElement$k } from './input.js';
|
|
19
|
+
import { d as defineCustomElement$j } from './list.js';
|
|
20
|
+
import { d as defineCustomElement$i } from './list-item.js';
|
|
21
|
+
import { d as defineCustomElement$h } from './loader.js';
|
|
22
|
+
import { d as defineCustomElement$g } from './modal.js';
|
|
23
|
+
import { d as defineCustomElement$f } from './notice.js';
|
|
24
|
+
import { d as defineCustomElement$e } from './pagination.js';
|
|
25
|
+
import { d as defineCustomElement$d } from './panel.js';
|
|
26
|
+
import { d as defineCustomElement$c } from './popover.js';
|
|
27
|
+
import { d as defineCustomElement$b } from './progress.js';
|
|
28
|
+
import { d as defineCustomElement$a } from './scrim.js';
|
|
29
|
+
import { d as defineCustomElement$9 } from './shell.js';
|
|
30
|
+
import { d as defineCustomElement$8 } from './stack.js';
|
|
31
|
+
import { d as defineCustomElement$7 } from './tooltip.js';
|
|
32
|
+
import { d as defineCustomElement$6 } from './delete-button2.js';
|
|
33
|
+
import { d as defineCustomElement$5 } from './edit-card2.js';
|
|
34
|
+
import { d as defineCustomElement$4 } from './feature-list2.js';
|
|
35
|
+
import { d as defineCustomElement$3 } from './info-card2.js';
|
|
36
|
+
import { d as defineCustomElement$2 } from './layer-list2.js';
|
|
47
37
|
|
|
48
|
-
const crowdsourceReporterCss = ":host{display:block;--calcite-label-margin-bottom:0px;--solutions-theme-foreground-color:var(--calcite-color-foreground-1)}.width-full{width:100%}.width-0{width:0}.height-full{height:100%}.height-0{height:0}.overflow-hidden{overflow:hidden}.border{border:1px solid var(--calcite-color-border-3)}.map-container{position:absolute;width:calc(100% - 390px);left:390px}.side-panel{padding:2px;width:390px;height:100%;position:absolute;top:0;left:0;z-index:60}.error-msg{padding:10px}
|
|
38
|
+
const crowdsourceReporterCss = ":host{display:block;--calcite-label-margin-bottom:0px;--solutions-theme-foreground-color:var(--calcite-color-foreground-1)}.width-full{width:100% !important}.width-0{width:0}.height-full{height:100% !important}.height-0{height:0}.overflow-hidden{overflow:hidden}.border{border:1px solid var(--calcite-color-border-3)}.map-container{position:absolute;width:calc(100% - 390px);left:390px}.side-panel{padding:2px;width:390px;height:100%;position:absolute;top:0;left:0;z-index:60}.error-msg{padding:10px}.collapsed-side-panel{top:calc(100% - 55px);height:54px}";
|
|
49
39
|
|
|
50
40
|
const CrowdsourceReporter$1 = /*@__PURE__*/ proxyCustomElement(class CrowdsourceReporter extends HTMLElement {
|
|
51
41
|
constructor() {
|
|
52
42
|
super();
|
|
53
43
|
this.__registerHost();
|
|
54
44
|
this.description = undefined;
|
|
45
|
+
this.isMobile = undefined;
|
|
55
46
|
this.enableAnonymousAccess = undefined;
|
|
56
47
|
this.enableAnonymousComments = undefined;
|
|
57
48
|
this.enableComments = undefined;
|
|
@@ -59,6 +50,7 @@ const CrowdsourceReporter$1 = /*@__PURE__*/ proxyCustomElement(class Crowdsource
|
|
|
59
50
|
this.enableNewReports = undefined;
|
|
60
51
|
this.layers = undefined;
|
|
61
52
|
this.loginTitle = undefined;
|
|
53
|
+
this.mapView = undefined;
|
|
62
54
|
this.reportButtonText = undefined;
|
|
63
55
|
this.reportsHeader = undefined;
|
|
64
56
|
this.reportSubmittedMessage = undefined;
|
|
@@ -71,8 +63,6 @@ const CrowdsourceReporter$1 = /*@__PURE__*/ proxyCustomElement(class Crowdsource
|
|
|
71
63
|
this.theme = "light";
|
|
72
64
|
this.enableZoom = true;
|
|
73
65
|
this._mapInfo = undefined;
|
|
74
|
-
this._mapView = undefined;
|
|
75
|
-
this._isMobile = false;
|
|
76
66
|
this._flowItems = ["layer-list"];
|
|
77
67
|
this._sidePanelCollapsed = false;
|
|
78
68
|
this._translations = undefined;
|
|
@@ -83,6 +73,22 @@ const CrowdsourceReporter$1 = /*@__PURE__*/ proxyCustomElement(class Crowdsource
|
|
|
83
73
|
// Watch handlers
|
|
84
74
|
//
|
|
85
75
|
//--------------------------------------------------------------------------
|
|
76
|
+
/**
|
|
77
|
+
* Called each time the mapView prop is changed.
|
|
78
|
+
*/
|
|
79
|
+
async isMobileWatchHandler() {
|
|
80
|
+
if (this.isMobile) {
|
|
81
|
+
this._sidePanelCollapsed = false;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* Called each time the mapView prop is changed.
|
|
86
|
+
*/
|
|
87
|
+
async mapViewWatchHandler() {
|
|
88
|
+
await this.mapView.when(async () => {
|
|
89
|
+
await this.setMapView();
|
|
90
|
+
});
|
|
91
|
+
}
|
|
86
92
|
//--------------------------------------------------------------------------
|
|
87
93
|
//
|
|
88
94
|
// Methods (public)
|
|
@@ -93,15 +99,6 @@ const CrowdsourceReporter$1 = /*@__PURE__*/ proxyCustomElement(class Crowdsource
|
|
|
93
99
|
// Events (public)
|
|
94
100
|
//
|
|
95
101
|
//--------------------------------------------------------------------------
|
|
96
|
-
/**
|
|
97
|
-
* Listen for mapChanged event to be fired then store the new mapView so components will be updated
|
|
98
|
-
*/
|
|
99
|
-
async mapChanged(evt) {
|
|
100
|
-
this._mapChange = evt.detail;
|
|
101
|
-
await this._mapChange.mapView.when(async () => {
|
|
102
|
-
await this.setMapView();
|
|
103
|
-
});
|
|
104
|
-
}
|
|
105
102
|
//--------------------------------------------------------------------------
|
|
106
103
|
//
|
|
107
104
|
// Functions (lifecycle)
|
|
@@ -114,27 +111,12 @@ const CrowdsourceReporter$1 = /*@__PURE__*/ proxyCustomElement(class Crowdsource
|
|
|
114
111
|
*/
|
|
115
112
|
async componentWillLoad() {
|
|
116
113
|
await this._getTranslations();
|
|
117
|
-
const mediaQueryList = window.matchMedia("screen and (max-width: 600px)");
|
|
118
|
-
this._isMobile = mediaQueryList.matches;
|
|
119
|
-
//on change update the state for is mobile and the sidePanelCollapsed
|
|
120
|
-
mediaQueryList.onchange = (e) => {
|
|
121
|
-
this._isMobile = e.matches;
|
|
122
|
-
this._sidePanelCollapsed = false;
|
|
123
|
-
};
|
|
124
114
|
}
|
|
125
115
|
/**
|
|
126
116
|
* Renders the component.
|
|
127
117
|
*/
|
|
128
118
|
render() {
|
|
129
|
-
|
|
130
|
-
let validConfiguration = true;
|
|
131
|
-
//Check if webMap id is configured
|
|
132
|
-
if (!this.mapInfos || this.mapInfos.length <= 0 || (((_a = this.mapInfos) === null || _a === void 0 ? void 0 : _a.length) > 0 && !((_b = this.mapInfos[0]) === null || _b === void 0 ? void 0 : _b.id))) {
|
|
133
|
-
validConfiguration = false;
|
|
134
|
-
}
|
|
135
|
-
return (h(Host, null, h("div", null, validConfiguration &&
|
|
136
|
-
h("calcite-shell", { "content-behind": true }, this._getReporter(), this._getMapNode()), !validConfiguration &&
|
|
137
|
-
h("calcite-notice", { class: "error-msg", icon: "configure", kind: "danger", open: true }, h("div", { slot: "title" }, this._translations.error), h("div", { slot: "message" }, this._translations.invalidConfigurationErrorMsg)))));
|
|
119
|
+
return (h(Host, null, h("div", null, h("calcite-shell", { "content-behind": true }, this._getReporter()))));
|
|
138
120
|
}
|
|
139
121
|
//--------------------------------------------------------------------------
|
|
140
122
|
//
|
|
@@ -162,11 +144,11 @@ const CrowdsourceReporter$1 = /*@__PURE__*/ proxyCustomElement(class Crowdsource
|
|
|
162
144
|
});
|
|
163
145
|
let sidePanelClass = "side-panel";
|
|
164
146
|
//in case of mobile handle for collapsed styles of the panel
|
|
165
|
-
if (this.
|
|
147
|
+
if (this.isMobile && this._sidePanelCollapsed) {
|
|
166
148
|
sidePanelClass += " collapsed-side-panel";
|
|
167
149
|
}
|
|
168
150
|
const themeClass = this.theme === "dark" ? "calcite-mode-dark" : "calcite-mode-light";
|
|
169
|
-
return (h("calcite-panel", { class: sidePanelClass + " " + themeClass }, this.
|
|
151
|
+
return (h("calcite-panel", { class: sidePanelClass + " width-full " + themeClass }, this.mapView
|
|
170
152
|
? h("calcite-flow", null, (renderLists === null || renderLists === void 0 ? void 0 : renderLists.length) > 0 && renderLists)
|
|
171
153
|
: h("calcite-loader", { scale: "m" })));
|
|
172
154
|
}
|
|
@@ -176,7 +158,7 @@ const CrowdsourceReporter$1 = /*@__PURE__*/ proxyCustomElement(class Crowdsource
|
|
|
176
158
|
* @protected
|
|
177
159
|
*/
|
|
178
160
|
getLayerListFlowItem() {
|
|
179
|
-
return (h("calcite-flow-item", { collapsed: this.
|
|
161
|
+
return (h("calcite-flow-item", { collapsed: this.isMobile && this._sidePanelCollapsed, heading: this.reportsHeader }, this._hasValidLayers && h("calcite-action", { icon: "sort-ascending-arrow", slot: this.isMobile ? "header-menu-actions" : "header-actions-end", text: this._translations.sort, "text-enabled": this.isMobile }), this._hasValidLayers && h("calcite-action", { icon: "filter", slot: this.isMobile ? "header-menu-actions" : "header-actions-end", text: this._translations.filter, "text-enabled": this.isMobile }), this.isMobile && this.getActionToExpandCollapsePanel(), this._hasValidLayers && this.enableNewReports && h("calcite-button", { appearance: "secondary", slot: "footer", width: "full" }, this.reportButtonText), h("calcite-panel", { "full-height": true, "full-width": true }, h("layer-list", { class: "height-full", layers: this.layers, mapView: this.mapView, noLayerErrorMsg: this._translations.noLayerToDisplayErrorMsg, onLayerSelect: this.displayFeaturesList.bind(this), onLayersListLoaded: this.layerListLoaded.bind(this) }))));
|
|
180
162
|
}
|
|
181
163
|
/**
|
|
182
164
|
* When layer list is loaded, we will receive the list of layers, if its means we don't have any valid layer to be listed
|
|
@@ -227,14 +209,14 @@ const CrowdsourceReporter$1 = /*@__PURE__*/ proxyCustomElement(class Crowdsource
|
|
|
227
209
|
* @protected
|
|
228
210
|
*/
|
|
229
211
|
getFeatureListFlowItem(layerId, layerName) {
|
|
230
|
-
return (h("calcite-flow-item", { collapsed: this.
|
|
212
|
+
return (h("calcite-flow-item", { collapsed: this.isMobile && this._sidePanelCollapsed, heading: layerName, onCalciteFlowItemBack: this.backFromFeatureList.bind(this) }, h("calcite-action", { icon: "sort-ascending-arrow", slot: this.isMobile ? "header-menu-actions" : "header-actions-end", text: this._translations.sort, "text-enabled": this.isMobile }), h("calcite-action", { icon: "filter", slot: this.isMobile ? "header-menu-actions" : "header-actions-end", text: this._translations.filter, "text-enabled": this.isMobile }), this.isMobile && this.getActionToExpandCollapsePanel(), this.enableNewReports && h("calcite-button", { appearance: "secondary", slot: "footer", width: "full" }, this.reportButtonText), h("calcite-panel", { "full-height": true }, h("feature-list", { class: "height-full", highlightOnMap: true, mapView: this.mapView, noFeaturesFoundMsg: this._translations.featureErrorMsg, onFeatureSelect: this.onFeatureSelectFromList.bind(this), pageSize: 100, selectedLayerId: layerId }))));
|
|
231
213
|
}
|
|
232
214
|
/**
|
|
233
215
|
* Returns the calcite-flow item for feature details
|
|
234
216
|
* @returns Node
|
|
235
217
|
*/
|
|
236
218
|
getFeatureDetailsFlowItem() {
|
|
237
|
-
return (h("calcite-flow-item", { collapsed: this.
|
|
219
|
+
return (h("calcite-flow-item", { collapsed: this.isMobile && this._sidePanelCollapsed, heading: this._selectedLayerName, onCalciteFlowItemBack: this.backFromFeatureList.bind(this) }, this.isMobile && this.getActionToExpandCollapsePanel(), h("calcite-action", { icon: "share", slot: "header-actions-end", text: this._translations.share }), h("calcite-panel", { "full-height": true }, h("info-card", { allowEditing: false, graphics: this._selectedFeature, isLoading: false, isMobile: false, mapView: this.mapView, zoomAndScrollToSelected: true }))));
|
|
238
220
|
}
|
|
239
221
|
/**
|
|
240
222
|
* Returns the action button to Expand/Collapse side panel in mobile mode
|
|
@@ -242,51 +224,14 @@ const CrowdsourceReporter$1 = /*@__PURE__*/ proxyCustomElement(class Crowdsource
|
|
|
242
224
|
getActionToExpandCollapsePanel() {
|
|
243
225
|
return (h("calcite-action", { icon: this._sidePanelCollapsed ? "chevrons-up" : "chevrons-down", onClick: this.toggleSidePanel.bind(this), slot: "header-actions-end", text: this._sidePanelCollapsed ? this._translations.expand : this._translations.collapse }));
|
|
244
226
|
}
|
|
245
|
-
/**
|
|
246
|
-
* Get the map node based for the current layout options
|
|
247
|
-
* @returns the map node
|
|
248
|
-
* @protected
|
|
249
|
-
*/
|
|
250
|
-
_getMapNode() {
|
|
251
|
-
var _a;
|
|
252
|
-
let mapContainerClass = "overflow-hidden map-container";
|
|
253
|
-
if (this._isMobile) {
|
|
254
|
-
if (this._sidePanelCollapsed) {
|
|
255
|
-
mapContainerClass += " map-container-mobile";
|
|
256
|
-
}
|
|
257
|
-
}
|
|
258
|
-
else {
|
|
259
|
-
mapContainerClass += " height-full";
|
|
260
|
-
}
|
|
261
|
-
return (h("div", { class: mapContainerClass }, h("map-card", { class: "width-full", defaultWebmapId: this.defaultWebmap, enableBasemap: false, enableFloorFilter: false, enableFullscreen: false, enableHome: this.enableHome, enableLegend: true, enableSearch: this.enableSearch, enableSingleExpand: false, hidden: false, homeZoomIndex: 0, homeZoomPosition: "top-left", homeZoomToolsSize: "s", mapInfos: (_a = this.mapInfos) === null || _a === void 0 ? void 0 : _a.filter(mapInfo => mapInfo.visible !== false), mapWidgetsIndex: this.enableHome ? 4 : 3, mapWidgetsPosition: "top-left", mapWidgetsSize: "s", stackTools: false, theme: this.theme, toolOrder: ["search", "legend", "fullscreen", "basemap", "floorfilter"] })));
|
|
262
|
-
}
|
|
263
|
-
/**
|
|
264
|
-
* Get the current map info (configuration details) when maps change
|
|
265
|
-
* @param id Id of the map to be returned
|
|
266
|
-
* @returns IMapInfo for the provided id
|
|
267
|
-
* @protected
|
|
268
|
-
*/
|
|
269
|
-
getMapInfo(id) {
|
|
270
|
-
let mapInfo;
|
|
271
|
-
this.mapInfos.some(mi => {
|
|
272
|
-
if (mi.id === id) {
|
|
273
|
-
mapInfo = mi;
|
|
274
|
-
return true;
|
|
275
|
-
}
|
|
276
|
-
});
|
|
277
|
-
return Object.assign({}, mapInfo);
|
|
278
|
-
}
|
|
279
227
|
/**
|
|
280
228
|
* Set the current map info when maps change
|
|
281
229
|
* @protected
|
|
282
230
|
*/
|
|
283
231
|
async setMapView() {
|
|
284
|
-
this.
|
|
285
|
-
this._mapView = this._mapChange.mapView;
|
|
286
|
-
this.initMapZoom();
|
|
287
|
-
this._mapView.popupEnabled = false;
|
|
232
|
+
this.mapView.popupEnabled = false;
|
|
288
233
|
if (this._defaultCenter && this._defaultLevel) {
|
|
289
|
-
await this.
|
|
234
|
+
await this.mapView.goTo({
|
|
290
235
|
center: this._defaultCenter,
|
|
291
236
|
zoom: this._defaultLevel
|
|
292
237
|
});
|
|
@@ -294,22 +239,6 @@ const CrowdsourceReporter$1 = /*@__PURE__*/ proxyCustomElement(class Crowdsource
|
|
|
294
239
|
this._defaultLevel = undefined;
|
|
295
240
|
}
|
|
296
241
|
}
|
|
297
|
-
/**
|
|
298
|
-
* Add/remove zoom tools based on enableZoom prop
|
|
299
|
-
* @protected
|
|
300
|
-
*/
|
|
301
|
-
initMapZoom() {
|
|
302
|
-
if (!this.enableZoom) {
|
|
303
|
-
this._mapView.ui.remove("zoom");
|
|
304
|
-
}
|
|
305
|
-
else if (this.enableZoom) {
|
|
306
|
-
this._mapView.ui.add({
|
|
307
|
-
component: "zoom",
|
|
308
|
-
position: "top-left",
|
|
309
|
-
index: 0
|
|
310
|
-
});
|
|
311
|
-
}
|
|
312
|
-
}
|
|
313
242
|
/**
|
|
314
243
|
* Fetches the component's translations
|
|
315
244
|
* @returns Promise when complete
|
|
@@ -320,9 +249,14 @@ const CrowdsourceReporter$1 = /*@__PURE__*/ proxyCustomElement(class Crowdsource
|
|
|
320
249
|
this._translations = messages[0];
|
|
321
250
|
}
|
|
322
251
|
get el() { return this; }
|
|
252
|
+
static get watchers() { return {
|
|
253
|
+
"isMobile": ["isMobileWatchHandler"],
|
|
254
|
+
"mapView": ["mapViewWatchHandler"]
|
|
255
|
+
}; }
|
|
323
256
|
static get style() { return crowdsourceReporterCss; }
|
|
324
257
|
}, [0, "crowdsource-reporter", {
|
|
325
258
|
"description": [1],
|
|
259
|
+
"isMobile": [4, "is-mobile"],
|
|
326
260
|
"enableAnonymousAccess": [4, "enable-anonymous-access"],
|
|
327
261
|
"enableAnonymousComments": [4, "enable-anonymous-comments"],
|
|
328
262
|
"enableComments": [4, "enable-comments"],
|
|
@@ -330,6 +264,7 @@ const CrowdsourceReporter$1 = /*@__PURE__*/ proxyCustomElement(class Crowdsource
|
|
|
330
264
|
"enableNewReports": [4, "enable-new-reports"],
|
|
331
265
|
"layers": [16],
|
|
332
266
|
"loginTitle": [1, "login-title"],
|
|
267
|
+
"mapView": [16],
|
|
333
268
|
"reportButtonText": [1, "report-button-text"],
|
|
334
269
|
"reportsHeader": [1, "reports-header"],
|
|
335
270
|
"reportSubmittedMessage": [1, "report-submitted-message"],
|
|
@@ -342,215 +277,166 @@ const CrowdsourceReporter$1 = /*@__PURE__*/ proxyCustomElement(class Crowdsource
|
|
|
342
277
|
"theme": [1],
|
|
343
278
|
"enableZoom": [4, "enable-zoom"],
|
|
344
279
|
"_mapInfo": [32],
|
|
345
|
-
"_mapView": [32],
|
|
346
|
-
"_isMobile": [32],
|
|
347
280
|
"_flowItems": [32],
|
|
348
281
|
"_sidePanelCollapsed": [32],
|
|
349
282
|
"_translations": [32],
|
|
350
283
|
"_hasValidLayers": [32]
|
|
351
|
-
},
|
|
284
|
+
}, undefined, {
|
|
285
|
+
"isMobile": ["isMobileWatchHandler"],
|
|
286
|
+
"mapView": ["mapViewWatchHandler"]
|
|
287
|
+
}]);
|
|
352
288
|
function defineCustomElement$1() {
|
|
353
289
|
if (typeof customElements === "undefined") {
|
|
354
290
|
return;
|
|
355
291
|
}
|
|
356
|
-
const components = ["crowdsource-reporter", "
|
|
292
|
+
const components = ["crowdsource-reporter", "calcite-action", "calcite-action-menu", "calcite-alert", "calcite-button", "calcite-chip", "calcite-filter", "calcite-flow", "calcite-flow-item", "calcite-handle", "calcite-icon", "calcite-input", "calcite-list", "calcite-list-item", "calcite-loader", "calcite-modal", "calcite-notice", "calcite-pagination", "calcite-panel", "calcite-popover", "calcite-progress", "calcite-scrim", "calcite-shell", "calcite-stack", "calcite-tooltip", "delete-button", "edit-card", "feature-list", "info-card", "layer-list"];
|
|
357
293
|
components.forEach(tagName => { switch (tagName) {
|
|
358
294
|
case "crowdsource-reporter":
|
|
359
295
|
if (!customElements.get(tagName)) {
|
|
360
296
|
customElements.define(tagName, CrowdsourceReporter$1);
|
|
361
297
|
}
|
|
362
298
|
break;
|
|
363
|
-
case "basemap-gallery":
|
|
364
|
-
if (!customElements.get(tagName)) {
|
|
365
|
-
defineCustomElement$E();
|
|
366
|
-
}
|
|
367
|
-
break;
|
|
368
299
|
case "calcite-action":
|
|
369
|
-
if (!customElements.get(tagName)) {
|
|
370
|
-
defineCustomElement$D();
|
|
371
|
-
}
|
|
372
|
-
break;
|
|
373
|
-
case "calcite-action-bar":
|
|
374
|
-
if (!customElements.get(tagName)) {
|
|
375
|
-
defineCustomElement$C();
|
|
376
|
-
}
|
|
377
|
-
break;
|
|
378
|
-
case "calcite-action-group":
|
|
379
|
-
if (!customElements.get(tagName)) {
|
|
380
|
-
defineCustomElement$B();
|
|
381
|
-
}
|
|
382
|
-
break;
|
|
383
|
-
case "calcite-action-menu":
|
|
384
|
-
if (!customElements.get(tagName)) {
|
|
385
|
-
defineCustomElement$A();
|
|
386
|
-
}
|
|
387
|
-
break;
|
|
388
|
-
case "calcite-alert":
|
|
389
|
-
if (!customElements.get(tagName)) {
|
|
390
|
-
defineCustomElement$z();
|
|
391
|
-
}
|
|
392
|
-
break;
|
|
393
|
-
case "calcite-button":
|
|
394
|
-
if (!customElements.get(tagName)) {
|
|
395
|
-
defineCustomElement$y();
|
|
396
|
-
}
|
|
397
|
-
break;
|
|
398
|
-
case "calcite-chip":
|
|
399
|
-
if (!customElements.get(tagName)) {
|
|
400
|
-
defineCustomElement$x();
|
|
401
|
-
}
|
|
402
|
-
break;
|
|
403
|
-
case "calcite-filter":
|
|
404
|
-
if (!customElements.get(tagName)) {
|
|
405
|
-
defineCustomElement$w();
|
|
406
|
-
}
|
|
407
|
-
break;
|
|
408
|
-
case "calcite-flow":
|
|
409
|
-
if (!customElements.get(tagName)) {
|
|
410
|
-
defineCustomElement$v();
|
|
411
|
-
}
|
|
412
|
-
break;
|
|
413
|
-
case "calcite-flow-item":
|
|
414
300
|
if (!customElements.get(tagName)) {
|
|
415
301
|
defineCustomElement$u();
|
|
416
302
|
}
|
|
417
303
|
break;
|
|
418
|
-
case "calcite-
|
|
304
|
+
case "calcite-action-menu":
|
|
419
305
|
if (!customElements.get(tagName)) {
|
|
420
306
|
defineCustomElement$t();
|
|
421
307
|
}
|
|
422
308
|
break;
|
|
423
|
-
case "calcite-
|
|
309
|
+
case "calcite-alert":
|
|
424
310
|
if (!customElements.get(tagName)) {
|
|
425
311
|
defineCustomElement$s();
|
|
426
312
|
}
|
|
427
313
|
break;
|
|
428
|
-
case "calcite-
|
|
314
|
+
case "calcite-button":
|
|
429
315
|
if (!customElements.get(tagName)) {
|
|
430
316
|
defineCustomElement$r();
|
|
431
317
|
}
|
|
432
318
|
break;
|
|
433
|
-
case "calcite-
|
|
319
|
+
case "calcite-chip":
|
|
434
320
|
if (!customElements.get(tagName)) {
|
|
435
321
|
defineCustomElement$q();
|
|
436
322
|
}
|
|
437
323
|
break;
|
|
438
|
-
case "calcite-
|
|
324
|
+
case "calcite-filter":
|
|
439
325
|
if (!customElements.get(tagName)) {
|
|
440
326
|
defineCustomElement$p();
|
|
441
327
|
}
|
|
442
328
|
break;
|
|
443
|
-
case "calcite-
|
|
329
|
+
case "calcite-flow":
|
|
444
330
|
if (!customElements.get(tagName)) {
|
|
445
331
|
defineCustomElement$o();
|
|
446
332
|
}
|
|
447
333
|
break;
|
|
448
|
-
case "calcite-
|
|
334
|
+
case "calcite-flow-item":
|
|
449
335
|
if (!customElements.get(tagName)) {
|
|
450
336
|
defineCustomElement$n();
|
|
451
337
|
}
|
|
452
338
|
break;
|
|
453
|
-
case "calcite-
|
|
339
|
+
case "calcite-handle":
|
|
454
340
|
if (!customElements.get(tagName)) {
|
|
455
341
|
defineCustomElement$m();
|
|
456
342
|
}
|
|
457
343
|
break;
|
|
458
|
-
case "calcite-
|
|
344
|
+
case "calcite-icon":
|
|
459
345
|
if (!customElements.get(tagName)) {
|
|
460
346
|
defineCustomElement$l();
|
|
461
347
|
}
|
|
462
348
|
break;
|
|
463
|
-
case "calcite-
|
|
349
|
+
case "calcite-input":
|
|
464
350
|
if (!customElements.get(tagName)) {
|
|
465
351
|
defineCustomElement$k();
|
|
466
352
|
}
|
|
467
353
|
break;
|
|
468
|
-
case "calcite-
|
|
354
|
+
case "calcite-list":
|
|
469
355
|
if (!customElements.get(tagName)) {
|
|
470
356
|
defineCustomElement$j();
|
|
471
357
|
}
|
|
472
358
|
break;
|
|
473
|
-
case "calcite-
|
|
359
|
+
case "calcite-list-item":
|
|
474
360
|
if (!customElements.get(tagName)) {
|
|
475
361
|
defineCustomElement$i();
|
|
476
362
|
}
|
|
477
363
|
break;
|
|
478
|
-
case "calcite-
|
|
364
|
+
case "calcite-loader":
|
|
479
365
|
if (!customElements.get(tagName)) {
|
|
480
366
|
defineCustomElement$h();
|
|
481
367
|
}
|
|
482
368
|
break;
|
|
483
|
-
case "calcite-
|
|
369
|
+
case "calcite-modal":
|
|
484
370
|
if (!customElements.get(tagName)) {
|
|
485
371
|
defineCustomElement$g();
|
|
486
372
|
}
|
|
487
373
|
break;
|
|
488
|
-
case "calcite-
|
|
374
|
+
case "calcite-notice":
|
|
489
375
|
if (!customElements.get(tagName)) {
|
|
490
376
|
defineCustomElement$f();
|
|
491
377
|
}
|
|
492
378
|
break;
|
|
493
|
-
case "calcite-
|
|
379
|
+
case "calcite-pagination":
|
|
494
380
|
if (!customElements.get(tagName)) {
|
|
495
381
|
defineCustomElement$e();
|
|
496
382
|
}
|
|
497
383
|
break;
|
|
498
|
-
case "
|
|
384
|
+
case "calcite-panel":
|
|
499
385
|
if (!customElements.get(tagName)) {
|
|
500
386
|
defineCustomElement$d();
|
|
501
387
|
}
|
|
502
388
|
break;
|
|
503
|
-
case "
|
|
389
|
+
case "calcite-popover":
|
|
504
390
|
if (!customElements.get(tagName)) {
|
|
505
391
|
defineCustomElement$c();
|
|
506
392
|
}
|
|
507
393
|
break;
|
|
508
|
-
case "
|
|
394
|
+
case "calcite-progress":
|
|
509
395
|
if (!customElements.get(tagName)) {
|
|
510
396
|
defineCustomElement$b();
|
|
511
397
|
}
|
|
512
398
|
break;
|
|
513
|
-
case "
|
|
399
|
+
case "calcite-scrim":
|
|
514
400
|
if (!customElements.get(tagName)) {
|
|
515
401
|
defineCustomElement$a();
|
|
516
402
|
}
|
|
517
403
|
break;
|
|
518
|
-
case "
|
|
404
|
+
case "calcite-shell":
|
|
519
405
|
if (!customElements.get(tagName)) {
|
|
520
406
|
defineCustomElement$9();
|
|
521
407
|
}
|
|
522
408
|
break;
|
|
523
|
-
case "
|
|
409
|
+
case "calcite-stack":
|
|
524
410
|
if (!customElements.get(tagName)) {
|
|
525
411
|
defineCustomElement$8();
|
|
526
412
|
}
|
|
527
413
|
break;
|
|
528
|
-
case "
|
|
414
|
+
case "calcite-tooltip":
|
|
529
415
|
if (!customElements.get(tagName)) {
|
|
530
416
|
defineCustomElement$7();
|
|
531
417
|
}
|
|
532
418
|
break;
|
|
533
|
-
case "
|
|
419
|
+
case "delete-button":
|
|
534
420
|
if (!customElements.get(tagName)) {
|
|
535
421
|
defineCustomElement$6();
|
|
536
422
|
}
|
|
537
423
|
break;
|
|
538
|
-
case "
|
|
424
|
+
case "edit-card":
|
|
539
425
|
if (!customElements.get(tagName)) {
|
|
540
426
|
defineCustomElement$5();
|
|
541
427
|
}
|
|
542
428
|
break;
|
|
543
|
-
case "
|
|
429
|
+
case "feature-list":
|
|
544
430
|
if (!customElements.get(tagName)) {
|
|
545
431
|
defineCustomElement$4();
|
|
546
432
|
}
|
|
547
433
|
break;
|
|
548
|
-
case "
|
|
434
|
+
case "info-card":
|
|
549
435
|
if (!customElements.get(tagName)) {
|
|
550
436
|
defineCustomElement$3();
|
|
551
437
|
}
|
|
552
438
|
break;
|
|
553
|
-
case "
|
|
439
|
+
case "layer-list":
|
|
554
440
|
if (!customElements.get(tagName)) {
|
|
555
441
|
defineCustomElement$2();
|
|
556
442
|
}
|