@esri/solutions-components 0.8.7 → 0.8.9
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-reporter/resources.json +3 -1
- package/dist/assets/t9n/crowdsource-reporter/resources_en.json +3 -1
- package/dist/cjs/{calcite-action-menu_2.cjs.entry.js → calcite-action-menu_3.cjs.entry.js} +114 -7
- package/dist/cjs/calcite-alert_4.cjs.entry.js +46 -5
- package/dist/cjs/{calcite-input-date-picker_3.cjs.entry.js → calcite-block_5.cjs.entry.js} +691 -13
- package/dist/cjs/{calcite-combobox_5.cjs.entry.js → calcite-combobox_3.cjs.entry.js} +876 -844
- package/dist/cjs/calcite-dropdown_4.cjs.entry.js +1023 -0
- package/dist/cjs/{calcite-flow_5.cjs.entry.js → calcite-flow_6.cjs.entry.js} +327 -2
- package/dist/cjs/card-manager_3.cjs.entry.js +5 -5
- package/dist/cjs/crowdsource-manager.cjs.entry.js +5 -1
- package/dist/cjs/crowdsource-reporter.cjs.entry.js +122 -23
- package/dist/cjs/{downloadUtils-8b05d7cc.js → downloadUtils-dc349b1a.js} +2 -2
- package/dist/cjs/{index.es-e7587227.js → index.es-1830a1e6.js} +2 -2
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/map-select-tools_3.cjs.entry.js +8 -8
- package/dist/cjs/{mapViewUtils-3e0fa457.js → mapViewUtils-9dc05308.js} +11 -5
- package/dist/cjs/public-notification.cjs.entry.js +2 -2
- package/dist/cjs/solutions-components.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/create-feature/create-feature.js +18 -0
- package/dist/collection/components/crowdsource-manager/crowdsource-manager.js +72 -0
- package/dist/collection/components/crowdsource-reporter/crowdsource-reporter.css +16 -0
- package/dist/collection/components/crowdsource-reporter/crowdsource-reporter.js +155 -71
- package/dist/collection/components/feature-details/feature-details.css +18 -0
- package/dist/collection/components/feature-details/feature-details.js +500 -0
- package/dist/collection/components/feature-details/test/feature-details.e2e.js +14 -0
- package/dist/collection/components/feature-details/test/feature-details.spec.js +22 -0
- package/dist/collection/components/feature-list/feature-list.js +14 -1
- package/dist/collection/components/info-card/info-card.css +15 -5
- package/dist/collection/components/info-card/info-card.js +178 -5
- package/dist/collection/components/layer-table/layer-table.js +2 -2
- package/dist/collection/components/map-card/map-card.js +1 -1
- package/dist/collection/components/map-select-tools/map-select-tools.js +5 -5
- package/dist/collection/components/refine-selection/refine-selection.js +1 -1
- package/dist/collection/demos/crowdsource-reporter.html +115 -1
- package/dist/collection/utils/interfaces.ts +4 -4
- package/dist/collection/utils/mapViewUtils.js +11 -5
- package/dist/collection/utils/mapViewUtils.ts +13 -5
- package/dist/components/create-feature2.js +4 -0
- package/dist/components/crowdsource-manager.js +8 -0
- package/dist/components/crowdsource-reporter.js +270 -85
- package/dist/components/feature-details.d.ts +11 -0
- package/dist/components/feature-details.js +11 -0
- package/dist/components/feature-details2.js +449 -0
- package/dist/components/feature-list2.js +14 -1
- package/dist/components/info-card2.js +53 -5
- package/dist/components/layer-table2.js +2 -2
- package/dist/components/map-card2.js +1 -1
- package/dist/components/map-select-tools2.js +5 -5
- package/dist/components/mapViewUtils.js +11 -5
- package/dist/components/refine-selection2.js +1 -1
- package/dist/esm/{calcite-action-menu_2.entry.js → calcite-action-menu_3.entry.js} +118 -12
- package/dist/esm/calcite-alert_4.entry.js +46 -5
- package/dist/esm/{calcite-input-date-picker_3.entry.js → calcite-block_5.entry.js} +688 -12
- package/dist/esm/{calcite-combobox_5.entry.js → calcite-combobox_3.entry.js} +878 -844
- package/dist/esm/calcite-date-picker-day_3.entry.js +1 -1
- package/dist/esm/calcite-dropdown_4.entry.js +1016 -0
- package/dist/esm/{calcite-flow_5.entry.js → calcite-flow_6.entry.js} +327 -3
- package/dist/esm/card-manager_3.entry.js +5 -5
- package/dist/esm/crowdsource-manager.entry.js +5 -1
- package/dist/esm/crowdsource-reporter.entry.js +122 -23
- package/dist/esm/{date-5630530d.js → date-0c026a8b.js} +1 -1
- package/dist/esm/{downloadUtils-0c1e4d7b.js → downloadUtils-df4f21f6.js} +2 -2
- package/dist/esm/{index.es-286e3cfa.js → index.es-904fb846.js} +2 -2
- package/dist/esm/loader.js +1 -1
- package/dist/esm/map-select-tools_3.entry.js +8 -8
- package/dist/esm/{mapViewUtils-253178f1.js → mapViewUtils-2ec19fb0.js} +11 -5
- package/dist/esm/public-notification.entry.js +2 -2
- package/dist/esm/solutions-components.js +1 -1
- package/dist/solutions-components/demos/crowdsource-reporter.html +115 -1
- package/dist/solutions-components/{p-813fd8a4.entry.js → p-29f518fd.entry.js} +2 -2
- package/dist/solutions-components/p-452fd697.entry.js +6 -0
- package/dist/solutions-components/p-511b1c91.entry.js +23 -0
- package/dist/solutions-components/p-577efb16.js +36 -0
- package/dist/solutions-components/{p-94de9279.js → p-5817d78c.js} +1 -1
- package/dist/solutions-components/p-602cd811.entry.js +17 -0
- package/dist/solutions-components/{p-15f9624a.entry.js → p-6557b703.entry.js} +1 -1
- package/dist/solutions-components/p-7269c49b.entry.js +6 -0
- package/dist/solutions-components/p-760bd17e.entry.js +6 -0
- package/dist/solutions-components/p-95fea07a.entry.js +17 -0
- package/dist/solutions-components/{p-212b02e7.js → p-ae4d86e8.js} +1 -1
- package/dist/solutions-components/{p-038fcd93.entry.js → p-c273ab7a.entry.js} +1 -1
- package/dist/solutions-components/p-d742b915.entry.js +29 -0
- package/dist/solutions-components/p-dfad61a8.entry.js +24 -0
- package/dist/solutions-components/{p-331b5d1e.js → p-fca434c8.js} +2 -2
- package/dist/solutions-components/p-fd82a00f.entry.js +6 -0
- package/dist/solutions-components/solutions-components.esm.js +1 -1
- package/dist/solutions-components/utils/interfaces.ts +4 -4
- package/dist/solutions-components/utils/mapViewUtils.ts +13 -5
- package/dist/types/components/create-feature/create-feature.d.ts +4 -4
- package/dist/types/components/crowdsource-manager/crowdsource-manager.d.ts +16 -0
- package/dist/types/components/crowdsource-reporter/crowdsource-reporter.d.ts +91 -18
- package/dist/types/components/feature-details/feature-details.d.ts +151 -0
- package/dist/types/components/feature-list/feature-list.d.ts +6 -0
- package/dist/types/components/info-card/info-card.d.ts +33 -1
- package/dist/types/components.d.ts +161 -28
- package/dist/types/preact.d.ts +6 -1
- package/dist/types/utils/interfaces.d.ts +4 -4
- package/dist/types/utils/mapViewUtils.d.ts +5 -3
- package/package.json +1 -1
- package/dist/cjs/calcite-block_2.cjs.entry.js +0 -652
- package/dist/cjs/calcite-graph_2.cjs.entry.js +0 -1055
- package/dist/cjs/calcite-scrim.cjs.entry.js +0 -125
- package/dist/cjs/utils-7bc7f595.js +0 -64
- package/dist/esm/calcite-block_2.entry.js +0 -647
- package/dist/esm/calcite-graph_2.entry.js +0 -1050
- package/dist/esm/calcite-scrim.entry.js +0 -121
- package/dist/esm/utils-9fb4104a.js +0 -61
- package/dist/solutions-components/p-04c37d69.entry.js +0 -17
- package/dist/solutions-components/p-0b92e4b1.entry.js +0 -11
- package/dist/solutions-components/p-238d3b5f.entry.js +0 -6
- package/dist/solutions-components/p-3af79063.js +0 -36
- package/dist/solutions-components/p-6db185bf.entry.js +0 -6
- package/dist/solutions-components/p-80b11ec1.entry.js +0 -17
- package/dist/solutions-components/p-aec06ce4.entry.js +0 -18
- package/dist/solutions-components/p-bfdf89c2.js +0 -11
- package/dist/solutions-components/p-c4ff3b52.entry.js +0 -17
- package/dist/solutions-components/p-ced067bd.entry.js +0 -17
- package/dist/solutions-components/p-d136eab0.entry.js +0 -23
- package/dist/solutions-components/p-e0446d5b.entry.js +0 -6
- package/dist/solutions-components/p-e8f13354.entry.js +0 -6
|
@@ -9,12 +9,12 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
9
9
|
|
|
10
10
|
const index = require('./index-105cf2b9.js');
|
|
11
11
|
const locale = require('./locale-3d0a4bc2.js');
|
|
12
|
-
const mapViewUtils = require('./mapViewUtils-
|
|
12
|
+
const mapViewUtils = require('./mapViewUtils-9dc05308.js');
|
|
13
13
|
require('./esri-loader-ce6c3d3d.js');
|
|
14
14
|
require('./_commonjsHelpers-480c2e77.js');
|
|
15
15
|
require('./interfaces-7cd0a48a.js');
|
|
16
16
|
|
|
17
|
-
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)}.notice-msg{padding:10px;width:calc(100% - 20px)}.footer-top-button{padding-bottom:7px}.footer-button{height:35px}.report-submitted-msg{position:absolute;z-index:1000}";
|
|
17
|
+
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)}.notice-msg{padding:10px;width:calc(100% - 20px)}.progress-bar{padding:12px}.footer-top-button{padding-bottom:7px}.footer-button{height:35px}.feature-pagination{align-items:center;margin:5% 124%;display:flex}.pagination-count{width:32px;color:var(--calcite-color-brand);border-bottom:1px solid var(--calcite-color-brand)}.report-submitted-msg{position:absolute;z-index:1000}";
|
|
18
18
|
|
|
19
19
|
const CrowdsourceReporter = class {
|
|
20
20
|
constructor(hostRef) {
|
|
@@ -29,15 +29,12 @@ const CrowdsourceReporter = class {
|
|
|
29
29
|
this.enableComments = undefined;
|
|
30
30
|
this.enableLogin = undefined;
|
|
31
31
|
this.enableNewReports = undefined;
|
|
32
|
-
this.layers = undefined;
|
|
33
32
|
this.loginTitle = undefined;
|
|
34
33
|
this.mapView = undefined;
|
|
35
34
|
this.layerId = undefined;
|
|
36
35
|
this.objectId = undefined;
|
|
37
36
|
this.center = undefined;
|
|
38
37
|
this.level = undefined;
|
|
39
|
-
this.popupHeaderHoverColor = undefined;
|
|
40
|
-
this.popupHeaderColor = undefined;
|
|
41
38
|
this.reportButtonText = undefined;
|
|
42
39
|
this.reportsHeader = undefined;
|
|
43
40
|
this.reportingOptions = undefined;
|
|
@@ -51,6 +48,7 @@ const CrowdsourceReporter = class {
|
|
|
51
48
|
this.theme = "light";
|
|
52
49
|
this.enableZoom = true;
|
|
53
50
|
this.zoomToScale = undefined;
|
|
51
|
+
this.layerExpressions = undefined;
|
|
54
52
|
this._mapInfo = undefined;
|
|
55
53
|
this._flowItems = [];
|
|
56
54
|
this._sidePanelCollapsed = false;
|
|
@@ -59,7 +57,11 @@ const CrowdsourceReporter = class {
|
|
|
59
57
|
this._selectedLayerName = undefined;
|
|
60
58
|
this._reportSubmitted = false;
|
|
61
59
|
this._showSubmitCancelButton = false;
|
|
60
|
+
this._loadingFeatureDetails = undefined;
|
|
62
61
|
this._featureCreationFailedErrorMsg = undefined;
|
|
62
|
+
this._updatedProgressBarStatus = 0.25;
|
|
63
|
+
this._filterOpen = false;
|
|
64
|
+
this._filterActive = false;
|
|
63
65
|
}
|
|
64
66
|
//--------------------------------------------------------------------------
|
|
65
67
|
//
|
|
@@ -80,6 +82,18 @@ const CrowdsourceReporter = class {
|
|
|
80
82
|
await this.setMapView();
|
|
81
83
|
});
|
|
82
84
|
}
|
|
85
|
+
/**
|
|
86
|
+
* On Feature details change update the Layer title and the current selected layer id
|
|
87
|
+
* @param evt Event hold the details of current feature graphic in the info-card
|
|
88
|
+
*/
|
|
89
|
+
async selectionChanged(evt) {
|
|
90
|
+
void this.updatingFeatureDetails(true);
|
|
91
|
+
this.setCurrentFeature(evt.detail.selectedFeature[0]);
|
|
92
|
+
void this.highlightOnMap(evt.detail.selectedFeature[0]);
|
|
93
|
+
this.selectedFeatureIndex = evt.detail.selectedFeatureIndex;
|
|
94
|
+
//update the feature details to reflect the like dislike values
|
|
95
|
+
await this._featureDetails.refresh(evt.detail.selectedFeature[0]);
|
|
96
|
+
}
|
|
83
97
|
//--------------------------------------------------------------------------
|
|
84
98
|
//
|
|
85
99
|
// Functions (lifecycle)
|
|
@@ -96,6 +110,10 @@ const CrowdsourceReporter = class {
|
|
|
96
110
|
await this._initModules();
|
|
97
111
|
await this._getTranslations();
|
|
98
112
|
await ((_a = this.mapView) === null || _a === void 0 ? void 0 : _a.when(async () => {
|
|
113
|
+
//set configured reporting layers array
|
|
114
|
+
this.layers = this.reportingOptions ? Object.keys(this.reportingOptions).filter((layerId) => {
|
|
115
|
+
return this.reportingOptions[layerId].reporting;
|
|
116
|
+
}) : [];
|
|
99
117
|
await this.setMapView();
|
|
100
118
|
}));
|
|
101
119
|
}
|
|
@@ -104,7 +122,7 @@ const CrowdsourceReporter = class {
|
|
|
104
122
|
*/
|
|
105
123
|
render() {
|
|
106
124
|
const themeClass = this.theme === "dark" ? "calcite-mode-dark" : "calcite-mode-light";
|
|
107
|
-
return (index.h(index.Host, null, this._reportSubmitted && index.h("calcite-alert", { "auto-close": true, class: themeClass + " report-submitted-msg", icon: "check-circle", kind: "success", label: "", onCalciteAlertClose: () => { this._reportSubmitted = false; }, open: true, placement: "top" }, index.h("div", { slot: "message" }, this.reportSubmittedMessage ? this.reportSubmittedMessage : this._translations.submitMsg)), this._featureCreationFailedErrorMsg && index.h("calcite-alert", { "auto-close": true, class: themeClass, icon: "x-octagon", kind: "danger", label: "", onCalciteAlertClose: () => { this._featureCreationFailedErrorMsg = ""; }, open: true, placement: "top" }, index.h("div", { slot: "title" }, this._translations.error), index.h("div", { slot: "message" }, this._featureCreationFailedErrorMsg)), index.h("div", null, index.h("calcite-shell", { "content-behind": true }, this._getReporter()))));
|
|
125
|
+
return (index.h(index.Host, null, this._reportSubmitted && index.h("calcite-alert", { "auto-close": true, class: themeClass + " report-submitted-msg", icon: "check-circle", kind: "success", label: "", onCalciteAlertClose: () => { this._reportSubmitted = false; }, open: true, placement: "top" }, index.h("div", { slot: "message" }, this.reportSubmittedMessage ? this.reportSubmittedMessage : this._translations.submitMsg)), this._featureCreationFailedErrorMsg && index.h("calcite-alert", { "auto-close": true, class: themeClass, icon: "x-octagon", kind: "danger", label: "", onCalciteAlertClose: () => { this._featureCreationFailedErrorMsg = ""; }, open: true, placement: "top" }, index.h("div", { slot: "title" }, this._translations.error), index.h("div", { slot: "message" }, this._featureCreationFailedErrorMsg)), index.h("div", null, index.h("calcite-shell", { "content-behind": true }, this._getReporter())), this.filterModal()));
|
|
108
126
|
}
|
|
109
127
|
//--------------------------------------------------------------------------
|
|
110
128
|
//
|
|
@@ -168,6 +186,54 @@ const CrowdsourceReporter = class {
|
|
|
168
186
|
? index.h("calcite-flow", null, (renderLists === null || renderLists === void 0 ? void 0 : renderLists.length) > 0 && renderLists)
|
|
169
187
|
: index.h("calcite-loader", { label: "", scale: "m" })));
|
|
170
188
|
}
|
|
189
|
+
/**
|
|
190
|
+
* Show filter component in modal
|
|
191
|
+
* @returns node to interact with any configured filters for the current layer
|
|
192
|
+
*/
|
|
193
|
+
filterModal() {
|
|
194
|
+
var _a, _b;
|
|
195
|
+
//get layer expression for current selected layer
|
|
196
|
+
const currentLayersExpressions = this.layerExpressions ? this.layerExpressions.filter((exp) => exp.id === this._selectedLayerId) : [];
|
|
197
|
+
return (currentLayersExpressions.length > 0 &&
|
|
198
|
+
index.h("calcite-modal", { "aria-labelledby": "modal-title", class: "modal", kind: "brand", onCalciteModalClose: () => void this._closeFilter(), open: this._filterOpen, widthScale: "s" }, index.h("div", { class: "display-flex align-center", id: "modal-title", slot: "header" }, (_b = (_a = this._translations) === null || _a === void 0 ? void 0 : _a.filterLayerTitle) === null || _b === void 0 ? void 0 : _b.replace("{{title}}", this._selectedLayerName)), index.h("div", { slot: "content" }, index.h("instant-apps-filter-list", { autoUpdateUrl: false, closeBtn: true, closeBtnOnClick: async () => this._closeFilter(), comboboxOverlayPositioning: "fixed", layerExpressions: currentLayersExpressions, onFilterListReset: () => this._handleFilterListReset(), onFilterUpdate: () => this._handleFilterUpdate(), ref: (el) => this._filterList = el, view: this.mapView, zoomBtn: false }))));
|
|
199
|
+
}
|
|
200
|
+
/**
|
|
201
|
+
* Close the filter modal
|
|
202
|
+
* @protected
|
|
203
|
+
*/
|
|
204
|
+
_closeFilter() {
|
|
205
|
+
if (this._filterOpen) {
|
|
206
|
+
this._filterOpen = false;
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
/**
|
|
210
|
+
* When true the filter modal will be displayed
|
|
211
|
+
* @protected
|
|
212
|
+
*/
|
|
213
|
+
_toggleFilter() {
|
|
214
|
+
this._filterOpen = !this._filterOpen;
|
|
215
|
+
}
|
|
216
|
+
/**
|
|
217
|
+
* Reset the filter active prop
|
|
218
|
+
* @protected
|
|
219
|
+
*/
|
|
220
|
+
_handleFilterListReset() {
|
|
221
|
+
//on reset filter list reset the filter active state
|
|
222
|
+
this._filterActive = false;
|
|
223
|
+
//reset the features list to reflect the applied filters
|
|
224
|
+
void this._featureList.refresh();
|
|
225
|
+
}
|
|
226
|
+
/**
|
|
227
|
+
* Check if the layers definitionExpression has been modified
|
|
228
|
+
* @protected
|
|
229
|
+
*/
|
|
230
|
+
_handleFilterUpdate() {
|
|
231
|
+
//if filter are applied the url params will be generated
|
|
232
|
+
//set the filter active state based on the length of applied filters
|
|
233
|
+
this._filterActive = this._filterList.urlParams.getAll('filter').length > 0;
|
|
234
|
+
//reset the features list to reflect the applied filters
|
|
235
|
+
void this._featureList.refresh();
|
|
236
|
+
}
|
|
171
237
|
/**
|
|
172
238
|
* Get the feature layer list
|
|
173
239
|
* @returns the layer list items
|
|
@@ -184,7 +250,7 @@ const CrowdsourceReporter = class {
|
|
|
184
250
|
* @protected
|
|
185
251
|
*/
|
|
186
252
|
getChooseCategoryFlowItem() {
|
|
187
|
-
return (index.h("calcite-flow-item", { collapsed: this.isMobile && this._sidePanelCollapsed, heading: this.reportButtonText ? this.reportButtonText : this._translations.createReportButtonText, onCalciteFlowItemBack: this.backFromSelectedPanel.bind(this) }, this.isMobile && this.getActionToExpandCollapsePanel(), index.h("calcite-panel", { "full-height": true, "full-width": true }, index.h("calcite-notice", { class: "notice-msg", icon: "lightbulb", kind: "success", open: true }, index.h("div", { slot: "message" }, this._translations.chooseCategoryMsg)), index.h("layer-list", { class: "height-full", layers: this.layers, mapView: this.mapView, noLayerErrorMsg: this._noLayerToDisplayErrorMsg, onLayerSelect: this.navigateToCreateFeature.bind(this), showFeatureCount: false, showNextIcon: false }))));
|
|
253
|
+
return (index.h("calcite-flow-item", { collapsed: this.isMobile && this._sidePanelCollapsed, heading: this.reportButtonText ? this.reportButtonText : this._translations.createReportButtonText, onCalciteFlowItemBack: this.backFromSelectedPanel.bind(this) }, this.isMobile && this.getActionToExpandCollapsePanel(), index.h("calcite-panel", { "full-height": true, "full-width": true }, index.h("div", { class: "progress-bar" }, index.h("calcite-progress", { type: "determinate", value: this._updatedProgressBarStatus })), index.h("calcite-notice", { class: "notice-msg", icon: "lightbulb", kind: "success", open: true }, index.h("div", { slot: "message" }, this._translations.chooseCategoryMsg)), index.h("layer-list", { class: "height-full", layers: this.layers, mapView: this.mapView, noLayerErrorMsg: this._noLayerToDisplayErrorMsg, onLayerSelect: this.navigateToCreateFeature.bind(this), showFeatureCount: false, showNextIcon: false }))));
|
|
188
254
|
}
|
|
189
255
|
/**
|
|
190
256
|
* Get Feature create form of the selected feature layer
|
|
@@ -192,7 +258,15 @@ const CrowdsourceReporter = class {
|
|
|
192
258
|
* @protected
|
|
193
259
|
*/
|
|
194
260
|
getFeatureCreateFlowItem() {
|
|
195
|
-
return (index.h("calcite-flow-item", { collapsed: this.isMobile && this._sidePanelCollapsed, heading: this._selectedLayerName, onCalciteFlowItemBack: this.backFromCreateFeaturePanel.bind(this) }, this.isMobile && this.getActionToExpandCollapsePanel(), this._showSubmitCancelButton && index.h("div", { class: "width-full", slot: "footer" }, index.h("calcite-button", { appearance: "solid", class: "footer-top-button footer-button", onClick: this.onSubmitButtonClick.bind(this), width: "full" }, this._translations.submit), index.h("calcite-button", { appearance: "outline", class: "footer-button", onClick: this.backFromCreateFeaturePanel.bind(this), width: "full" }, this._translations.cancel)), index.h("calcite-panel", { "full-height": true, "full-width": true }, index.h("calcite-notice", { class: "notice-msg", icon: "lightbulb", kind: "success", open: true }, index.h("div", { slot: "message" }, this._translations.featureEditFormInfoMsg)), index.h("create-feature", { customizeSubmit: true, mapView: this.mapView, onDrawComplete: this.onDrawComplete.bind(this), onEditingAttachment: this.showSubmitCancelButton.bind(this), onFail: this.createFeatureFailed.bind(this), onSuccess: this.onReportSubmitted.bind(this), ref: el => this._createFeature = el, searchConfiguration: this.searchConfiguration, selectedLayerId: this._selectedLayerId }))));
|
|
261
|
+
return (index.h("calcite-flow-item", { collapsed: this.isMobile && this._sidePanelCollapsed, heading: this._selectedLayerName, onCalciteFlowItemBack: this.backFromCreateFeaturePanel.bind(this) }, this.isMobile && this.getActionToExpandCollapsePanel(), this._showSubmitCancelButton && index.h("div", { class: "width-full", slot: "footer" }, index.h("calcite-button", { appearance: "solid", class: "footer-top-button footer-button", onClick: this.onSubmitButtonClick.bind(this), width: "full" }, this._translations.submit), index.h("calcite-button", { appearance: "outline", class: "footer-button", onClick: this.backFromCreateFeaturePanel.bind(this), width: "full" }, this._translations.cancel)), index.h("calcite-panel", { "full-height": true, "full-width": true }, index.h("div", { class: "progress-bar" }, index.h("calcite-progress", { type: "determinate", value: this._updatedProgressBarStatus })), index.h("calcite-notice", { class: "notice-msg", icon: "lightbulb", kind: "success", open: true }, index.h("div", { slot: "message" }, this._translations.featureEditFormInfoMsg)), index.h("create-feature", { customizeSubmit: true, mapView: this.mapView, onDrawComplete: this.onDrawComplete.bind(this), onEditingAttachment: this.showSubmitCancelButton.bind(this), onFail: this.createFeatureFailed.bind(this), onProgressStatus: this.updatedProgressStatus.bind(this), onSuccess: this.onReportSubmitted.bind(this), ref: el => this._createFeature = el, searchConfiguration: this.searchConfiguration, selectedLayerId: this._selectedLayerId }))));
|
|
262
|
+
}
|
|
263
|
+
/**
|
|
264
|
+
* Update the progress bar status when editor panel changes
|
|
265
|
+
* @param evt Event which has progress bar status
|
|
266
|
+
* @protected
|
|
267
|
+
*/
|
|
268
|
+
updatedProgressStatus(evt) {
|
|
269
|
+
this._updatedProgressBarStatus = evt.detail;
|
|
196
270
|
}
|
|
197
271
|
/**
|
|
198
272
|
* When drawing of incident location completed on map show the submit and cancel button
|
|
@@ -214,7 +288,7 @@ const CrowdsourceReporter = class {
|
|
|
214
288
|
*/
|
|
215
289
|
onSubmitButtonClick() {
|
|
216
290
|
if (this._createFeature) {
|
|
217
|
-
this._createFeature.submit();
|
|
291
|
+
void this._createFeature.submit();
|
|
218
292
|
}
|
|
219
293
|
}
|
|
220
294
|
/**
|
|
@@ -223,7 +297,7 @@ const CrowdsourceReporter = class {
|
|
|
223
297
|
*/
|
|
224
298
|
backFromCreateFeaturePanel() {
|
|
225
299
|
if (this._createFeature) {
|
|
226
|
-
this._createFeature.close();
|
|
300
|
+
void this._createFeature.close();
|
|
227
301
|
}
|
|
228
302
|
this.backFromSelectedPanel();
|
|
229
303
|
}
|
|
@@ -250,10 +324,10 @@ const CrowdsourceReporter = class {
|
|
|
250
324
|
*/
|
|
251
325
|
async navigateToHomePage() {
|
|
252
326
|
if (this._createFeature) {
|
|
253
|
-
this._createFeature.close();
|
|
327
|
+
void this._createFeature.close();
|
|
254
328
|
}
|
|
255
329
|
if (this._layerList) {
|
|
256
|
-
this._layerList.refresh();
|
|
330
|
+
void this._layerList.refresh();
|
|
257
331
|
}
|
|
258
332
|
this.setSelectedFeatures([]);
|
|
259
333
|
if (this._editableLayerIds.length === 1) {
|
|
@@ -321,6 +395,7 @@ const CrowdsourceReporter = class {
|
|
|
321
395
|
* @protected
|
|
322
396
|
*/
|
|
323
397
|
backFromSelectedPanel() {
|
|
398
|
+
this._updatedProgressBarStatus = 0.25;
|
|
324
399
|
const updatedFlowItems = [...this._flowItems];
|
|
325
400
|
updatedFlowItems.pop();
|
|
326
401
|
this.clearHighlights();
|
|
@@ -347,6 +422,13 @@ const CrowdsourceReporter = class {
|
|
|
347
422
|
this.setSelectedFeatures([evt.detail]);
|
|
348
423
|
this._flowItems = [...this._flowItems, "feature-details"];
|
|
349
424
|
}
|
|
425
|
+
/**
|
|
426
|
+
* Show loading indicator while updating the feature details component
|
|
427
|
+
* @param isLoading is feature detail component loading
|
|
428
|
+
*/
|
|
429
|
+
async updatingFeatureDetails(isLoading) {
|
|
430
|
+
this._loadingFeatureDetails = isLoading;
|
|
431
|
+
}
|
|
350
432
|
/**
|
|
351
433
|
* Get feature list of the selected feature layer
|
|
352
434
|
* @param layerId Layer id
|
|
@@ -355,7 +437,10 @@ const CrowdsourceReporter = class {
|
|
|
355
437
|
* @protected
|
|
356
438
|
*/
|
|
357
439
|
getFeatureListFlowItem(layerId, layerName) {
|
|
358
|
-
|
|
440
|
+
var _a;
|
|
441
|
+
const layerExpressions = (_a = this.layerExpressions) === null || _a === void 0 ? void 0 : _a.filter((exp) => exp.id === this._selectedLayerId);
|
|
442
|
+
const showFilterIcon = layerExpressions.length > 0;
|
|
443
|
+
return (index.h("calcite-flow-item", { collapsed: this.isMobile && this._sidePanelCollapsed, heading: layerName, onCalciteFlowItemBack: this.backFromSelectedPanel.bind(this) }, showFilterIcon && index.h("calcite-action", { icon: "filter", indicator: this._filterActive, onClick: this._toggleFilter.bind(this), slot: this.isMobile ? "header-menu-actions" : "header-actions-end", text: this._translations.filter, "text-enabled": this.isMobile }), this.isMobile && this.getActionToExpandCollapsePanel(), this.enableNewReports &&
|
|
359
444
|
index.h("calcite-button", { appearance: "solid", onClick: this.navigateToCreateFeature.bind(this), slot: "footer", width: "full" }, this.reportButtonText ? this.reportButtonText : this._translations.createReportButtonText), index.h("calcite-panel", { "full-height": true }, index.h("feature-list", { class: "height-full", highlightOnHover: true, mapView: this.mapView, noFeaturesFoundMsg: this._translations.featureErrorMsg, onFeatureSelect: this.onFeatureSelectFromList.bind(this), pageSize: 30, ref: el => this._featureList = el, selectedLayerId: layerId }))));
|
|
360
445
|
}
|
|
361
446
|
/**
|
|
@@ -363,7 +448,15 @@ const CrowdsourceReporter = class {
|
|
|
363
448
|
* @returns Node
|
|
364
449
|
*/
|
|
365
450
|
getFeatureDetailsFlowItem() {
|
|
366
|
-
return (index.h("calcite-flow-item", { collapsed: this.isMobile && this._sidePanelCollapsed, heading: this._selectedLayerName, onCalciteFlowItemBack: this.backFromSelectedPanel.bind(this) }, this.isMobile && this.getActionToExpandCollapsePanel(), index.h("instant-apps-social-share", { autoUpdateShareUrl: false, embed: false, popoverButtonIconScale: "s", ref: el => this._shareNode = el, scale: "m", shareButtonColor: "neutral", shareButtonType: "action", slot: "header-actions-end", socialMedia: true, view: this.mapView }), index.h("calcite-panel",
|
|
451
|
+
return (index.h("calcite-flow-item", { collapsed: this.isMobile && this._sidePanelCollapsed, heading: this._selectedLayerName, loading: this._loadingFeatureDetails, onCalciteFlowItemBack: this.backFromSelectedPanel.bind(this) }, this.isMobile && this.getActionToExpandCollapsePanel(), index.h("instant-apps-social-share", { autoUpdateShareUrl: false, embed: false, popoverButtonIconScale: "s", ref: el => this._shareNode = el, scale: "m", shareButtonColor: "neutral", shareButtonType: "action", slot: "header-actions-end", socialMedia: true, view: this.mapView }), index.h("calcite-panel", null, this._selectedFeature.length > 1 && this.getFeaturesPagination(), index.h("feature-details", { class: 'full-height', graphics: this._selectedFeature, mapView: this.mapView, onLoadingStatus: (evt) => { void this.updatingFeatureDetails(evt.detail); }, ref: el => this._featureDetails = el, reportingOptions: this.reportingOptions }))));
|
|
452
|
+
}
|
|
453
|
+
/**
|
|
454
|
+
* Returns the pagination for the multiple features
|
|
455
|
+
* Create pagination to avoid the overlap of like, dislike and comment section
|
|
456
|
+
* @returns Node
|
|
457
|
+
*/
|
|
458
|
+
getFeaturesPagination() {
|
|
459
|
+
return (index.h("div", { class: "feature-pagination", slot: "header-actions-start" }, index.h("div", null, index.h("calcite-button", { appearance: 'transparent', disabled: false, iconStart: "chevron-left", id: "solutions-back", onClick: () => void this._featureDetails.back(), scale: "s", width: "full" }), index.h("calcite-tooltip", { label: "", placement: "top", "reference-element": "solutions-back" }, index.h("span", null, this._translations.back))), index.h("calcite-button", { appearance: 'transparent', class: 'pagination-action', onClick: () => void this._featureDetails.toggleListView(), scale: "s" }, index.h("span", { class: "pagination-count" }, this._getCount())), index.h("div", null, index.h("calcite-button", { appearance: "transparent", disabled: false, iconStart: "chevron-right", id: "solutions-next", onClick: () => void this._featureDetails.next(), scale: "s", width: "full" }), index.h("calcite-tooltip", { placement: "top", "reference-element": "solutions-next" }, index.h("span", null, this._translations.next)))));
|
|
367
460
|
}
|
|
368
461
|
/**
|
|
369
462
|
* Sets the selected features and updates the first feature as the current selected feature
|
|
@@ -391,14 +484,6 @@ const CrowdsourceReporter = class {
|
|
|
391
484
|
}
|
|
392
485
|
this._updateShareURL();
|
|
393
486
|
}
|
|
394
|
-
/**
|
|
395
|
-
* On Feature details change update the Layer title and the current selected layer id
|
|
396
|
-
* @param evt Event hold the details of current feature graphic in the info-card
|
|
397
|
-
*/
|
|
398
|
-
featureDetailsChanged(evt) {
|
|
399
|
-
this.setCurrentFeature(evt.detail[0]);
|
|
400
|
-
void this.highlightOnMap(evt.detail[0]);
|
|
401
|
-
}
|
|
402
487
|
/**
|
|
403
488
|
* Highlights the feature on map
|
|
404
489
|
* @param selectedFeature Graphic currently shown in feature details
|
|
@@ -411,8 +496,9 @@ const CrowdsourceReporter = class {
|
|
|
411
496
|
const selectedLayerView = await mapViewUtils.getFeatureLayerView(this.mapView, selectedFeature.layer.id);
|
|
412
497
|
// remove previous highlight options (if any) to highlight the feature by default color
|
|
413
498
|
selectedLayerView.highlightOptions = null;
|
|
414
|
-
this._highlightHandle = await mapViewUtils.highlightFeatures([selectedFeature.getObjectId()], selectedLayerView, this.mapView, true);
|
|
499
|
+
this._highlightHandle = await mapViewUtils.highlightFeatures([selectedFeature.getObjectId()], selectedLayerView, this.mapView, true, this.zoomToScale);
|
|
415
500
|
}
|
|
501
|
+
void this.updatingFeatureDetails(false);
|
|
416
502
|
}
|
|
417
503
|
/**
|
|
418
504
|
* Clears the highlight
|
|
@@ -518,6 +604,19 @@ const CrowdsourceReporter = class {
|
|
|
518
604
|
}
|
|
519
605
|
}
|
|
520
606
|
}
|
|
607
|
+
/**
|
|
608
|
+
* Get the current index of total string
|
|
609
|
+
*
|
|
610
|
+
* @returns the index of total string
|
|
611
|
+
* @protected
|
|
612
|
+
*/
|
|
613
|
+
_getCount() {
|
|
614
|
+
const index = (this.selectedFeatureIndex + 1).toString();
|
|
615
|
+
const total = this._selectedFeature.length.toString();
|
|
616
|
+
return this._translations.indexOfTotal
|
|
617
|
+
.replace("{{index}}", index)
|
|
618
|
+
.replace("{{total}}", total);
|
|
619
|
+
}
|
|
521
620
|
/**
|
|
522
621
|
* Fetches the component's translations
|
|
523
622
|
* @returns Promise when complete
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
const _commonjsHelpers = require('./_commonjsHelpers-480c2e77.js');
|
|
9
9
|
const index = require('./index-105cf2b9.js');
|
|
10
10
|
const locale = require('./locale-3d0a4bc2.js');
|
|
11
|
-
const mapViewUtils = require('./mapViewUtils-
|
|
11
|
+
const mapViewUtils = require('./mapViewUtils-9dc05308.js');
|
|
12
12
|
require('./solution-resource-97186521.js');
|
|
13
13
|
require('./index-f64944ad.js');
|
|
14
14
|
const restHelpersGet = require('./restHelpersGet-2ed729ab.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-1830a1e6.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
|
|
@@ -6,11 +6,11 @@
|
|
|
6
6
|
'use strict';
|
|
7
7
|
|
|
8
8
|
const _commonjsHelpers = require('./_commonjsHelpers-480c2e77.js');
|
|
9
|
-
const downloadUtils = require('./downloadUtils-
|
|
9
|
+
const downloadUtils = require('./downloadUtils-dc349b1a.js');
|
|
10
10
|
require('./index-105cf2b9.js');
|
|
11
11
|
require('./locale-3d0a4bc2.js');
|
|
12
12
|
require('./esri-loader-ce6c3d3d.js');
|
|
13
|
-
require('./mapViewUtils-
|
|
13
|
+
require('./mapViewUtils-9dc05308.js');
|
|
14
14
|
require('./interfaces-7cd0a48a.js');
|
|
15
15
|
require('./solution-resource-97186521.js');
|
|
16
16
|
require('./index-f64944ad.js');
|