@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
|
@@ -8,17 +8,17 @@
|
|
|
8
8
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
9
9
|
|
|
10
10
|
const index = require('./index-b8a649fc.js');
|
|
11
|
-
const locale = require('./locale-
|
|
12
|
-
require('./loadModules-46d14e81.js');
|
|
11
|
+
const locale = require('./locale-a476e15d.js');
|
|
13
12
|
require('./esri-loader-a91c0ec1.js');
|
|
14
13
|
require('./_commonjsHelpers-384729db.js');
|
|
15
14
|
|
|
16
|
-
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}
|
|
15
|
+
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}";
|
|
17
16
|
|
|
18
17
|
const CrowdsourceReporter = class {
|
|
19
18
|
constructor(hostRef) {
|
|
20
19
|
index.registerInstance(this, hostRef);
|
|
21
20
|
this.description = undefined;
|
|
21
|
+
this.isMobile = undefined;
|
|
22
22
|
this.enableAnonymousAccess = undefined;
|
|
23
23
|
this.enableAnonymousComments = undefined;
|
|
24
24
|
this.enableComments = undefined;
|
|
@@ -26,6 +26,7 @@ const CrowdsourceReporter = class {
|
|
|
26
26
|
this.enableNewReports = undefined;
|
|
27
27
|
this.layers = undefined;
|
|
28
28
|
this.loginTitle = undefined;
|
|
29
|
+
this.mapView = undefined;
|
|
29
30
|
this.reportButtonText = undefined;
|
|
30
31
|
this.reportsHeader = undefined;
|
|
31
32
|
this.reportSubmittedMessage = undefined;
|
|
@@ -38,8 +39,6 @@ const CrowdsourceReporter = class {
|
|
|
38
39
|
this.theme = "light";
|
|
39
40
|
this.enableZoom = true;
|
|
40
41
|
this._mapInfo = undefined;
|
|
41
|
-
this._mapView = undefined;
|
|
42
|
-
this._isMobile = false;
|
|
43
42
|
this._flowItems = ["layer-list"];
|
|
44
43
|
this._sidePanelCollapsed = false;
|
|
45
44
|
this._translations = undefined;
|
|
@@ -50,6 +49,22 @@ const CrowdsourceReporter = class {
|
|
|
50
49
|
// Watch handlers
|
|
51
50
|
//
|
|
52
51
|
//--------------------------------------------------------------------------
|
|
52
|
+
/**
|
|
53
|
+
* Called each time the mapView prop is changed.
|
|
54
|
+
*/
|
|
55
|
+
async isMobileWatchHandler() {
|
|
56
|
+
if (this.isMobile) {
|
|
57
|
+
this._sidePanelCollapsed = false;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Called each time the mapView prop is changed.
|
|
62
|
+
*/
|
|
63
|
+
async mapViewWatchHandler() {
|
|
64
|
+
await this.mapView.when(async () => {
|
|
65
|
+
await this.setMapView();
|
|
66
|
+
});
|
|
67
|
+
}
|
|
53
68
|
//--------------------------------------------------------------------------
|
|
54
69
|
//
|
|
55
70
|
// Methods (public)
|
|
@@ -60,15 +75,6 @@ const CrowdsourceReporter = class {
|
|
|
60
75
|
// Events (public)
|
|
61
76
|
//
|
|
62
77
|
//--------------------------------------------------------------------------
|
|
63
|
-
/**
|
|
64
|
-
* Listen for mapChanged event to be fired then store the new mapView so components will be updated
|
|
65
|
-
*/
|
|
66
|
-
async mapChanged(evt) {
|
|
67
|
-
this._mapChange = evt.detail;
|
|
68
|
-
await this._mapChange.mapView.when(async () => {
|
|
69
|
-
await this.setMapView();
|
|
70
|
-
});
|
|
71
|
-
}
|
|
72
78
|
//--------------------------------------------------------------------------
|
|
73
79
|
//
|
|
74
80
|
// Functions (lifecycle)
|
|
@@ -81,27 +87,12 @@ const CrowdsourceReporter = class {
|
|
|
81
87
|
*/
|
|
82
88
|
async componentWillLoad() {
|
|
83
89
|
await this._getTranslations();
|
|
84
|
-
const mediaQueryList = window.matchMedia("screen and (max-width: 600px)");
|
|
85
|
-
this._isMobile = mediaQueryList.matches;
|
|
86
|
-
//on change update the state for is mobile and the sidePanelCollapsed
|
|
87
|
-
mediaQueryList.onchange = (e) => {
|
|
88
|
-
this._isMobile = e.matches;
|
|
89
|
-
this._sidePanelCollapsed = false;
|
|
90
|
-
};
|
|
91
90
|
}
|
|
92
91
|
/**
|
|
93
92
|
* Renders the component.
|
|
94
93
|
*/
|
|
95
94
|
render() {
|
|
96
|
-
|
|
97
|
-
let validConfiguration = true;
|
|
98
|
-
//Check if webMap id is configured
|
|
99
|
-
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))) {
|
|
100
|
-
validConfiguration = false;
|
|
101
|
-
}
|
|
102
|
-
return (index.h(index.Host, null, index.h("div", null, validConfiguration &&
|
|
103
|
-
index.h("calcite-shell", { "content-behind": true }, this._getReporter(), this._getMapNode()), !validConfiguration &&
|
|
104
|
-
index.h("calcite-notice", { class: "error-msg", icon: "configure", kind: "danger", open: true }, index.h("div", { slot: "title" }, this._translations.error), index.h("div", { slot: "message" }, this._translations.invalidConfigurationErrorMsg)))));
|
|
95
|
+
return (index.h(index.Host, null, index.h("div", null, index.h("calcite-shell", { "content-behind": true }, this._getReporter()))));
|
|
105
96
|
}
|
|
106
97
|
//--------------------------------------------------------------------------
|
|
107
98
|
//
|
|
@@ -129,11 +120,11 @@ const CrowdsourceReporter = class {
|
|
|
129
120
|
});
|
|
130
121
|
let sidePanelClass = "side-panel";
|
|
131
122
|
//in case of mobile handle for collapsed styles of the panel
|
|
132
|
-
if (this.
|
|
123
|
+
if (this.isMobile && this._sidePanelCollapsed) {
|
|
133
124
|
sidePanelClass += " collapsed-side-panel";
|
|
134
125
|
}
|
|
135
126
|
const themeClass = this.theme === "dark" ? "calcite-mode-dark" : "calcite-mode-light";
|
|
136
|
-
return (index.h("calcite-panel", { class: sidePanelClass + " " + themeClass }, this.
|
|
127
|
+
return (index.h("calcite-panel", { class: sidePanelClass + " width-full " + themeClass }, this.mapView
|
|
137
128
|
? index.h("calcite-flow", null, (renderLists === null || renderLists === void 0 ? void 0 : renderLists.length) > 0 && renderLists)
|
|
138
129
|
: index.h("calcite-loader", { scale: "m" })));
|
|
139
130
|
}
|
|
@@ -143,7 +134,7 @@ const CrowdsourceReporter = class {
|
|
|
143
134
|
* @protected
|
|
144
135
|
*/
|
|
145
136
|
getLayerListFlowItem() {
|
|
146
|
-
return (index.h("calcite-flow-item", { collapsed: this.
|
|
137
|
+
return (index.h("calcite-flow-item", { collapsed: this.isMobile && this._sidePanelCollapsed, heading: this.reportsHeader }, this._hasValidLayers && index.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 && index.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 && index.h("calcite-button", { appearance: "secondary", slot: "footer", width: "full" }, this.reportButtonText), index.h("calcite-panel", { "full-height": true, "full-width": true }, index.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) }))));
|
|
147
138
|
}
|
|
148
139
|
/**
|
|
149
140
|
* 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
|
|
@@ -194,14 +185,14 @@ const CrowdsourceReporter = class {
|
|
|
194
185
|
* @protected
|
|
195
186
|
*/
|
|
196
187
|
getFeatureListFlowItem(layerId, layerName) {
|
|
197
|
-
return (index.h("calcite-flow-item", { collapsed: this.
|
|
188
|
+
return (index.h("calcite-flow-item", { collapsed: this.isMobile && this._sidePanelCollapsed, heading: layerName, onCalciteFlowItemBack: this.backFromFeatureList.bind(this) }, index.h("calcite-action", { icon: "sort-ascending-arrow", slot: this.isMobile ? "header-menu-actions" : "header-actions-end", text: this._translations.sort, "text-enabled": this.isMobile }), index.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 && index.h("calcite-button", { appearance: "secondary", slot: "footer", width: "full" }, this.reportButtonText), index.h("calcite-panel", { "full-height": true }, index.h("feature-list", { class: "height-full", highlightOnMap: true, mapView: this.mapView, noFeaturesFoundMsg: this._translations.featureErrorMsg, onFeatureSelect: this.onFeatureSelectFromList.bind(this), pageSize: 100, selectedLayerId: layerId }))));
|
|
198
189
|
}
|
|
199
190
|
/**
|
|
200
191
|
* Returns the calcite-flow item for feature details
|
|
201
192
|
* @returns Node
|
|
202
193
|
*/
|
|
203
194
|
getFeatureDetailsFlowItem() {
|
|
204
|
-
return (index.h("calcite-flow-item", { collapsed: this.
|
|
195
|
+
return (index.h("calcite-flow-item", { collapsed: this.isMobile && this._sidePanelCollapsed, heading: this._selectedLayerName, onCalciteFlowItemBack: this.backFromFeatureList.bind(this) }, this.isMobile && this.getActionToExpandCollapsePanel(), index.h("calcite-action", { icon: "share", slot: "header-actions-end", text: this._translations.share }), index.h("calcite-panel", { "full-height": true }, index.h("info-card", { allowEditing: false, graphics: this._selectedFeature, isLoading: false, isMobile: false, mapView: this.mapView, zoomAndScrollToSelected: true }))));
|
|
205
196
|
}
|
|
206
197
|
/**
|
|
207
198
|
* Returns the action button to Expand/Collapse side panel in mobile mode
|
|
@@ -209,51 +200,14 @@ const CrowdsourceReporter = class {
|
|
|
209
200
|
getActionToExpandCollapsePanel() {
|
|
210
201
|
return (index.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 }));
|
|
211
202
|
}
|
|
212
|
-
/**
|
|
213
|
-
* Get the map node based for the current layout options
|
|
214
|
-
* @returns the map node
|
|
215
|
-
* @protected
|
|
216
|
-
*/
|
|
217
|
-
_getMapNode() {
|
|
218
|
-
var _a;
|
|
219
|
-
let mapContainerClass = "overflow-hidden map-container";
|
|
220
|
-
if (this._isMobile) {
|
|
221
|
-
if (this._sidePanelCollapsed) {
|
|
222
|
-
mapContainerClass += " map-container-mobile";
|
|
223
|
-
}
|
|
224
|
-
}
|
|
225
|
-
else {
|
|
226
|
-
mapContainerClass += " height-full";
|
|
227
|
-
}
|
|
228
|
-
return (index.h("div", { class: mapContainerClass }, index.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"] })));
|
|
229
|
-
}
|
|
230
|
-
/**
|
|
231
|
-
* Get the current map info (configuration details) when maps change
|
|
232
|
-
* @param id Id of the map to be returned
|
|
233
|
-
* @returns IMapInfo for the provided id
|
|
234
|
-
* @protected
|
|
235
|
-
*/
|
|
236
|
-
getMapInfo(id) {
|
|
237
|
-
let mapInfo;
|
|
238
|
-
this.mapInfos.some(mi => {
|
|
239
|
-
if (mi.id === id) {
|
|
240
|
-
mapInfo = mi;
|
|
241
|
-
return true;
|
|
242
|
-
}
|
|
243
|
-
});
|
|
244
|
-
return Object.assign({}, mapInfo);
|
|
245
|
-
}
|
|
246
203
|
/**
|
|
247
204
|
* Set the current map info when maps change
|
|
248
205
|
* @protected
|
|
249
206
|
*/
|
|
250
207
|
async setMapView() {
|
|
251
|
-
this.
|
|
252
|
-
this._mapView = this._mapChange.mapView;
|
|
253
|
-
this.initMapZoom();
|
|
254
|
-
this._mapView.popupEnabled = false;
|
|
208
|
+
this.mapView.popupEnabled = false;
|
|
255
209
|
if (this._defaultCenter && this._defaultLevel) {
|
|
256
|
-
await this.
|
|
210
|
+
await this.mapView.goTo({
|
|
257
211
|
center: this._defaultCenter,
|
|
258
212
|
zoom: this._defaultLevel
|
|
259
213
|
});
|
|
@@ -261,22 +215,6 @@ const CrowdsourceReporter = class {
|
|
|
261
215
|
this._defaultLevel = undefined;
|
|
262
216
|
}
|
|
263
217
|
}
|
|
264
|
-
/**
|
|
265
|
-
* Add/remove zoom tools based on enableZoom prop
|
|
266
|
-
* @protected
|
|
267
|
-
*/
|
|
268
|
-
initMapZoom() {
|
|
269
|
-
if (!this.enableZoom) {
|
|
270
|
-
this._mapView.ui.remove("zoom");
|
|
271
|
-
}
|
|
272
|
-
else if (this.enableZoom) {
|
|
273
|
-
this._mapView.ui.add({
|
|
274
|
-
component: "zoom",
|
|
275
|
-
position: "top-left",
|
|
276
|
-
index: 0
|
|
277
|
-
});
|
|
278
|
-
}
|
|
279
|
-
}
|
|
280
218
|
/**
|
|
281
219
|
* Fetches the component's translations
|
|
282
220
|
* @returns Promise when complete
|
|
@@ -287,6 +225,10 @@ const CrowdsourceReporter = class {
|
|
|
287
225
|
this._translations = messages[0];
|
|
288
226
|
}
|
|
289
227
|
get el() { return index.getElement(this); }
|
|
228
|
+
static get watchers() { return {
|
|
229
|
+
"isMobile": ["isMobileWatchHandler"],
|
|
230
|
+
"mapView": ["mapViewWatchHandler"]
|
|
231
|
+
}; }
|
|
290
232
|
};
|
|
291
233
|
CrowdsourceReporter.style = crowdsourceReporterCss;
|
|
292
234
|
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
const _commonjsHelpers = require('./_commonjsHelpers-384729db.js');
|
|
9
9
|
const index = require('./index-b8a649fc.js');
|
|
10
|
-
const
|
|
10
|
+
const locale = require('./locale-a476e15d.js');
|
|
11
11
|
const mapViewUtils = require('./mapViewUtils-8aa325de.js');
|
|
12
12
|
require('./solution-resource-abec7452.js');
|
|
13
13
|
require('./index-f64944ad.js');
|
|
@@ -1510,7 +1510,7 @@ function(t){var e=function(t){for(var e=t.length,r=new Uint8Array(e),n=0;n<e;n++
|
|
|
1510
1510
|
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
1511
1511
|
* ====================================================================
|
|
1512
1512
|
*/
|
|
1513
|
-
function(t){function e(){return (n.canvg?Promise.resolve(n.canvg):Promise.resolve().then(function () { return require('./index.es-
|
|
1513
|
+
function(t){function e(){return (n.canvg?Promise.resolve(n.canvg):Promise.resolve().then(function () { return require('./index.es-bd1a93b2.js'); })).catch((function(t){return Promise.reject(new Error("Could not load canvg: "+t))})).then((function(t){return t.default?t.default:t}))}E.API.addSvgAsImage=function(t,r,n,i,o,s,c,u){if(isNaN(r)||isNaN(n))throw a.error("jsPDF.addSvgAsImage: Invalid coordinates",arguments),new Error("Invalid coordinates passed to jsPDF.addSvgAsImage");if(isNaN(i)||isNaN(o))throw a.error("jsPDF.addSvgAsImage: Invalid measurements",arguments),new Error("Invalid measurements (width and/or height) passed to jsPDF.addSvgAsImage");var h=document.createElement("canvas");h.width=i,h.height=o;var l=h.getContext("2d");l.fillStyle="#fff",l.fillRect(0,0,h.width,h.height);var f={ignoreMouse:!0,ignoreAnimation:!0,ignoreDimensions:!0},d=this;return e().then((function(e){return e.fromString(l,t,f)}),(function(){return Promise.reject(new Error("Could not load canvg."))})).then((function(t){return t.render(f)})).then((function(){d.addImage(h.toDataURL("image/jpeg",1),r,n,i,o,c,u);}))};}(),E.API.putTotalPages=function(t){var e,r=0;parseInt(this.internal.getFont().id.substr(1),10)<15?(e=new RegExp(t,"g"),r=this.internal.getNumberOfPages()):(e=new RegExp(this.pdfEscape16(t,this.internal.getFont()),"g"),r=this.pdfEscape16(this.internal.getNumberOfPages()+"",this.internal.getFont()));for(var n=1;n<=this.internal.getNumberOfPages();n++)for(var i=0;i<this.internal.pages[n].length;i++)this.internal.pages[n][i]=this.internal.pages[n][i].replace(e,r);return this},E.API.viewerPreferences=function(e,r){var n;e=e||{},r=r||!1;var i,a,o,s={HideToolbar:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},HideMenubar:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},HideWindowUI:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},FitWindow:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},CenterWindow:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},DisplayDocTitle:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.4},NonFullScreenPageMode:{defaultValue:"UseNone",value:"UseNone",type:"name",explicitSet:!1,valueSet:["UseNone","UseOutlines","UseThumbs","UseOC"],pdfVersion:1.3},Direction:{defaultValue:"L2R",value:"L2R",type:"name",explicitSet:!1,valueSet:["L2R","R2L"],pdfVersion:1.3},ViewArea:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},ViewClip:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintArea:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintClip:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintScaling:{defaultValue:"AppDefault",value:"AppDefault",type:"name",explicitSet:!1,valueSet:["AppDefault","None"],pdfVersion:1.6},Duplex:{defaultValue:"",value:"none",type:"name",explicitSet:!1,valueSet:["Simplex","DuplexFlipShortEdge","DuplexFlipLongEdge","none"],pdfVersion:1.7},PickTrayByPDFSize:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.7},PrintPageRange:{defaultValue:"",value:"",type:"array",explicitSet:!1,valueSet:null,pdfVersion:1.7},NumCopies:{defaultValue:1,value:1,type:"integer",explicitSet:!1,valueSet:null,pdfVersion:1.7}},c=Object.keys(s),u=[],h=0,l=0,f=0;function d(t,e){var r,n=!1;for(r=0;r<t.length;r+=1)t[r]===e&&(n=!0);return n}if(void 0===this.internal.viewerpreferences&&(this.internal.viewerpreferences={},this.internal.viewerpreferences.configuration=JSON.parse(JSON.stringify(s)),this.internal.viewerpreferences.isSubscribed=!1),n=this.internal.viewerpreferences.configuration,"reset"===e||!0===r){var p=c.length;for(f=0;f<p;f+=1)n[c[f]].value=n[c[f]].defaultValue,n[c[f]].explicitSet=!1;}if("object"===t(e))for(a in e)if(o=e[a],d(c,a)&&void 0!==o){if("boolean"===n[a].type&&"boolean"==typeof o)n[a].value=o;else if("name"===n[a].type&&d(n[a].valueSet,o))n[a].value=o;else if("integer"===n[a].type&&Number.isInteger(o))n[a].value=o;else if("array"===n[a].type){for(h=0;h<o.length;h+=1)if(i=!0,1===o[h].length&&"number"==typeof o[h][0])u.push(String(o[h]-1));else if(o[h].length>1){for(l=0;l<o[h].length;l+=1)"number"!=typeof o[h][l]&&(i=!1);!0===i&&u.push([o[h][0]-1,o[h][1]-1].join(" "));}n[a].value="["+u.join(" ")+"]";}else n[a].value=n[a].defaultValue;n[a].explicitSet=!0;}return !1===this.internal.viewerpreferences.isSubscribed&&(this.internal.events.subscribe("putCatalog",(function(){var t,e=[];for(t in n)!0===n[t].explicitSet&&("name"===n[t].type?e.push("/"+t+" /"+n[t].value):e.push("/"+t+" "+n[t].value));0!==e.length&&this.internal.write("/ViewerPreferences\n<<\n"+e.join("\n")+"\n>>");})),this.internal.viewerpreferences.isSubscribed=!0),this.internal.viewerpreferences.configuration=n,this},
|
|
1514
1514
|
/** ====================================================================
|
|
1515
1515
|
* @license
|
|
1516
1516
|
* jsPDF XMP metadata plugin
|
|
@@ -2524,7 +2524,7 @@ function _convertPopupTextToLabelSpec(popupInfo) {
|
|
|
2524
2524
|
*/
|
|
2525
2525
|
async function _convertPopupArcadeToLabelSpec(expressionInfo) {
|
|
2526
2526
|
// Generate an Arcade executor
|
|
2527
|
-
const [arcade] = await
|
|
2527
|
+
const [arcade] = await locale.loadModules(["esri/arcade"]);
|
|
2528
2528
|
const labelingProfile = {
|
|
2529
2529
|
variables: [
|
|
2530
2530
|
{
|
|
@@ -2572,7 +2572,7 @@ async function _createArcadeExecutors(labelFormat, layer) {
|
|
|
2572
2572
|
return Promise.resolve(arcadeExecutors);
|
|
2573
2573
|
}
|
|
2574
2574
|
// Generate an Arcade executor for each match
|
|
2575
|
-
const [arcade] = await
|
|
2575
|
+
const [arcade] = await locale.loadModules(["esri/arcade"]);
|
|
2576
2576
|
const labelingProfile = {
|
|
2577
2577
|
variables: [
|
|
2578
2578
|
{
|
|
@@ -3033,7 +3033,7 @@ async function _prepareLabels(webmap, layer, ids, formatUsingLayerPopup = true,
|
|
|
3033
3033
|
* @returns Promise resolving with list of labels, each of which is a list of label lines
|
|
3034
3034
|
*/
|
|
3035
3035
|
async function _prepareLabelsFromAll(featureSet, attributeTypes, attributeDomains, includeHeaderNames = false) {
|
|
3036
|
-
const [intl] = await
|
|
3036
|
+
const [intl] = await locale.loadModules(["esri/intl"]);
|
|
3037
3037
|
// Export all attributes
|
|
3038
3038
|
const labels = featureSet.map(feature => {
|
|
3039
3039
|
return Object.keys(feature.attributes).map((attributeName) => {
|
|
@@ -3066,7 +3066,7 @@ async function _prepareLabelsFromAll(featureSet, attributeTypes, attributeDomain
|
|
|
3066
3066
|
*/
|
|
3067
3067
|
async function _prepareLabelsFromPattern(layer, featureSet, attributeOrigNames, attributeTypes, attributeDomains, attributeFormats, labelFormat, includeHeaderNames = false) {
|
|
3068
3068
|
var _a;
|
|
3069
|
-
const [intl] = await
|
|
3069
|
+
const [intl] = await locale.loadModules(["esri/intl"]);
|
|
3070
3070
|
// Find the label fields that we need to replace with values
|
|
3071
3071
|
const attributeExpressionMatches = _getFieldExpressionsFromLabel(labelFormat);
|
|
3072
3072
|
const attributeNames = _getFieldNamesFromFieldExpressions(attributeExpressionMatches);
|
|
@@ -6,9 +6,9 @@
|
|
|
6
6
|
'use strict';
|
|
7
7
|
|
|
8
8
|
const _commonjsHelpers = require('./_commonjsHelpers-384729db.js');
|
|
9
|
-
const downloadUtils = require('./downloadUtils-
|
|
9
|
+
const downloadUtils = require('./downloadUtils-83c6d3c3.js');
|
|
10
10
|
require('./index-b8a649fc.js');
|
|
11
|
-
require('./
|
|
11
|
+
require('./locale-a476e15d.js');
|
|
12
12
|
require('./esri-loader-a91c0ec1.js');
|
|
13
13
|
require('./mapViewUtils-8aa325de.js');
|
|
14
14
|
require('./interfaces-7cd0a48a.js');
|
|
@@ -8,9 +8,8 @@
|
|
|
8
8
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
9
9
|
|
|
10
10
|
const index = require('./index-b8a649fc.js');
|
|
11
|
-
const locale = require('./locale-
|
|
11
|
+
const locale = require('./locale-a476e15d.js');
|
|
12
12
|
const interfaces = require('./interfaces-7cd0a48a.js');
|
|
13
|
-
require('./loadModules-46d14e81.js');
|
|
14
13
|
require('./esri-loader-a91c0ec1.js');
|
|
15
14
|
require('./_commonjsHelpers-384729db.js');
|
|
16
15
|
|