@esri/solutions-components 0.8.8 → 0.8.9
Sign up to get free protection for your applications and to get access to all the features.
- 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 +1 -1
- package/dist/cjs/crowdsource-reporter.cjs.entry.js +122 -21
- 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-reporter/crowdsource-reporter.css +16 -0
- package/dist/collection/components/crowdsource-reporter/crowdsource-reporter.js +155 -35
- 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/mapViewUtils.js +11 -5
- package/dist/collection/utils/mapViewUtils.ts +13 -5
- package/dist/components/create-feature2.js +4 -0
- package/dist/components/crowdsource-reporter.js +270 -81
- 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 +1 -1
- package/dist/esm/crowdsource-reporter.entry.js +122 -21
- 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-13ca3b00.entry.js → p-452fd697.entry.js} +1 -1
- 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/mapViewUtils.ts +13 -5
- package/dist/types/components/create-feature/create-feature.d.ts +4 -4
- package/dist/types/components/crowdsource-reporter/crowdsource-reporter.d.ts +91 -10
- 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 +129 -12
- package/dist/types/preact.d.ts +6 -1
- 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-80b11ec1.entry.js +0 -17
- package/dist/solutions-components/p-a3a11749.entry.js +0 -6
- 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
@@ -5,12 +5,12 @@
|
|
5
5
|
*/
|
6
6
|
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-164d485a.js';
|
7
7
|
import { l as loadModules, g as getLocaleComponentStrings } from './locale-bcbea4ef.js';
|
8
|
-
import { a as getAllLayers, b as getFeatureLayerView, h as highlightFeatures, c as getMapLayerHash, g as getLayerOrTable, q as queryFeaturesByID } from './mapViewUtils-
|
8
|
+
import { a as getAllLayers, b as getFeatureLayerView, h as highlightFeatures, c as getMapLayerHash, g as getLayerOrTable, q as queryFeaturesByID } from './mapViewUtils-2ec19fb0.js';
|
9
9
|
import './esri-loader-1b324844.js';
|
10
10
|
import './_commonjsHelpers-0f74c230.js';
|
11
11
|
import './interfaces-586e863c.js';
|
12
12
|
|
13
|
-
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}";
|
13
|
+
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}";
|
14
14
|
|
15
15
|
const CrowdsourceReporter = class {
|
16
16
|
constructor(hostRef) {
|
@@ -25,7 +25,6 @@ const CrowdsourceReporter = class {
|
|
25
25
|
this.enableComments = undefined;
|
26
26
|
this.enableLogin = undefined;
|
27
27
|
this.enableNewReports = undefined;
|
28
|
-
this.layers = undefined;
|
29
28
|
this.loginTitle = undefined;
|
30
29
|
this.mapView = undefined;
|
31
30
|
this.layerId = undefined;
|
@@ -45,6 +44,7 @@ const CrowdsourceReporter = class {
|
|
45
44
|
this.theme = "light";
|
46
45
|
this.enableZoom = true;
|
47
46
|
this.zoomToScale = undefined;
|
47
|
+
this.layerExpressions = undefined;
|
48
48
|
this._mapInfo = undefined;
|
49
49
|
this._flowItems = [];
|
50
50
|
this._sidePanelCollapsed = false;
|
@@ -53,7 +53,11 @@ const CrowdsourceReporter = class {
|
|
53
53
|
this._selectedLayerName = undefined;
|
54
54
|
this._reportSubmitted = false;
|
55
55
|
this._showSubmitCancelButton = false;
|
56
|
+
this._loadingFeatureDetails = undefined;
|
56
57
|
this._featureCreationFailedErrorMsg = undefined;
|
58
|
+
this._updatedProgressBarStatus = 0.25;
|
59
|
+
this._filterOpen = false;
|
60
|
+
this._filterActive = false;
|
57
61
|
}
|
58
62
|
//--------------------------------------------------------------------------
|
59
63
|
//
|
@@ -74,6 +78,18 @@ const CrowdsourceReporter = class {
|
|
74
78
|
await this.setMapView();
|
75
79
|
});
|
76
80
|
}
|
81
|
+
/**
|
82
|
+
* On Feature details change update the Layer title and the current selected layer id
|
83
|
+
* @param evt Event hold the details of current feature graphic in the info-card
|
84
|
+
*/
|
85
|
+
async selectionChanged(evt) {
|
86
|
+
void this.updatingFeatureDetails(true);
|
87
|
+
this.setCurrentFeature(evt.detail.selectedFeature[0]);
|
88
|
+
void this.highlightOnMap(evt.detail.selectedFeature[0]);
|
89
|
+
this.selectedFeatureIndex = evt.detail.selectedFeatureIndex;
|
90
|
+
//update the feature details to reflect the like dislike values
|
91
|
+
await this._featureDetails.refresh(evt.detail.selectedFeature[0]);
|
92
|
+
}
|
77
93
|
//--------------------------------------------------------------------------
|
78
94
|
//
|
79
95
|
// Functions (lifecycle)
|
@@ -90,6 +106,10 @@ const CrowdsourceReporter = class {
|
|
90
106
|
await this._initModules();
|
91
107
|
await this._getTranslations();
|
92
108
|
await ((_a = this.mapView) === null || _a === void 0 ? void 0 : _a.when(async () => {
|
109
|
+
//set configured reporting layers array
|
110
|
+
this.layers = this.reportingOptions ? Object.keys(this.reportingOptions).filter((layerId) => {
|
111
|
+
return this.reportingOptions[layerId].reporting;
|
112
|
+
}) : [];
|
93
113
|
await this.setMapView();
|
94
114
|
}));
|
95
115
|
}
|
@@ -98,7 +118,7 @@ const CrowdsourceReporter = class {
|
|
98
118
|
*/
|
99
119
|
render() {
|
100
120
|
const themeClass = this.theme === "dark" ? "calcite-mode-dark" : "calcite-mode-light";
|
101
|
-
return (h(Host, null, this._reportSubmitted && 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" }, h("div", { slot: "message" }, this.reportSubmittedMessage ? this.reportSubmittedMessage : this._translations.submitMsg)), this._featureCreationFailedErrorMsg && h("calcite-alert", { "auto-close": true, class: themeClass, icon: "x-octagon", kind: "danger", label: "", onCalciteAlertClose: () => { this._featureCreationFailedErrorMsg = ""; }, open: true, placement: "top" }, h("div", { slot: "title" }, this._translations.error), h("div", { slot: "message" }, this._featureCreationFailedErrorMsg)), h("div", null, h("calcite-shell", { "content-behind": true }, this._getReporter()))));
|
121
|
+
return (h(Host, null, this._reportSubmitted && 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" }, h("div", { slot: "message" }, this.reportSubmittedMessage ? this.reportSubmittedMessage : this._translations.submitMsg)), this._featureCreationFailedErrorMsg && h("calcite-alert", { "auto-close": true, class: themeClass, icon: "x-octagon", kind: "danger", label: "", onCalciteAlertClose: () => { this._featureCreationFailedErrorMsg = ""; }, open: true, placement: "top" }, h("div", { slot: "title" }, this._translations.error), h("div", { slot: "message" }, this._featureCreationFailedErrorMsg)), h("div", null, h("calcite-shell", { "content-behind": true }, this._getReporter())), this.filterModal()));
|
102
122
|
}
|
103
123
|
//--------------------------------------------------------------------------
|
104
124
|
//
|
@@ -162,6 +182,54 @@ const CrowdsourceReporter = class {
|
|
162
182
|
? h("calcite-flow", null, (renderLists === null || renderLists === void 0 ? void 0 : renderLists.length) > 0 && renderLists)
|
163
183
|
: h("calcite-loader", { label: "", scale: "m" })));
|
164
184
|
}
|
185
|
+
/**
|
186
|
+
* Show filter component in modal
|
187
|
+
* @returns node to interact with any configured filters for the current layer
|
188
|
+
*/
|
189
|
+
filterModal() {
|
190
|
+
var _a, _b;
|
191
|
+
//get layer expression for current selected layer
|
192
|
+
const currentLayersExpressions = this.layerExpressions ? this.layerExpressions.filter((exp) => exp.id === this._selectedLayerId) : [];
|
193
|
+
return (currentLayersExpressions.length > 0 &&
|
194
|
+
h("calcite-modal", { "aria-labelledby": "modal-title", class: "modal", kind: "brand", onCalciteModalClose: () => void this._closeFilter(), open: this._filterOpen, widthScale: "s" }, 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)), h("div", { slot: "content" }, 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 }))));
|
195
|
+
}
|
196
|
+
/**
|
197
|
+
* Close the filter modal
|
198
|
+
* @protected
|
199
|
+
*/
|
200
|
+
_closeFilter() {
|
201
|
+
if (this._filterOpen) {
|
202
|
+
this._filterOpen = false;
|
203
|
+
}
|
204
|
+
}
|
205
|
+
/**
|
206
|
+
* When true the filter modal will be displayed
|
207
|
+
* @protected
|
208
|
+
*/
|
209
|
+
_toggleFilter() {
|
210
|
+
this._filterOpen = !this._filterOpen;
|
211
|
+
}
|
212
|
+
/**
|
213
|
+
* Reset the filter active prop
|
214
|
+
* @protected
|
215
|
+
*/
|
216
|
+
_handleFilterListReset() {
|
217
|
+
//on reset filter list reset the filter active state
|
218
|
+
this._filterActive = false;
|
219
|
+
//reset the features list to reflect the applied filters
|
220
|
+
void this._featureList.refresh();
|
221
|
+
}
|
222
|
+
/**
|
223
|
+
* Check if the layers definitionExpression has been modified
|
224
|
+
* @protected
|
225
|
+
*/
|
226
|
+
_handleFilterUpdate() {
|
227
|
+
//if filter are applied the url params will be generated
|
228
|
+
//set the filter active state based on the length of applied filters
|
229
|
+
this._filterActive = this._filterList.urlParams.getAll('filter').length > 0;
|
230
|
+
//reset the features list to reflect the applied filters
|
231
|
+
void this._featureList.refresh();
|
232
|
+
}
|
165
233
|
/**
|
166
234
|
* Get the feature layer list
|
167
235
|
* @returns the layer list items
|
@@ -178,7 +246,7 @@ const CrowdsourceReporter = class {
|
|
178
246
|
* @protected
|
179
247
|
*/
|
180
248
|
getChooseCategoryFlowItem() {
|
181
|
-
return (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(), h("calcite-panel", { "full-height": true, "full-width": true }, h("calcite-notice", { class: "notice-msg", icon: "lightbulb", kind: "success", open: true }, h("div", { slot: "message" }, this._translations.chooseCategoryMsg)), h("layer-list", { class: "height-full", layers: this.layers, mapView: this.mapView, noLayerErrorMsg: this._noLayerToDisplayErrorMsg, onLayerSelect: this.navigateToCreateFeature.bind(this), showFeatureCount: false, showNextIcon: false }))));
|
249
|
+
return (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(), h("calcite-panel", { "full-height": true, "full-width": true }, h("div", { class: "progress-bar" }, h("calcite-progress", { type: "determinate", value: this._updatedProgressBarStatus })), h("calcite-notice", { class: "notice-msg", icon: "lightbulb", kind: "success", open: true }, h("div", { slot: "message" }, this._translations.chooseCategoryMsg)), h("layer-list", { class: "height-full", layers: this.layers, mapView: this.mapView, noLayerErrorMsg: this._noLayerToDisplayErrorMsg, onLayerSelect: this.navigateToCreateFeature.bind(this), showFeatureCount: false, showNextIcon: false }))));
|
182
250
|
}
|
183
251
|
/**
|
184
252
|
* Get Feature create form of the selected feature layer
|
@@ -186,7 +254,15 @@ const CrowdsourceReporter = class {
|
|
186
254
|
* @protected
|
187
255
|
*/
|
188
256
|
getFeatureCreateFlowItem() {
|
189
|
-
return (h("calcite-flow-item", { collapsed: this.isMobile && this._sidePanelCollapsed, heading: this._selectedLayerName, onCalciteFlowItemBack: this.backFromCreateFeaturePanel.bind(this) }, this.isMobile && this.getActionToExpandCollapsePanel(), this._showSubmitCancelButton && h("div", { class: "width-full", slot: "footer" }, h("calcite-button", { appearance: "solid", class: "footer-top-button footer-button", onClick: this.onSubmitButtonClick.bind(this), width: "full" }, this._translations.submit), h("calcite-button", { appearance: "outline", class: "footer-button", onClick: this.backFromCreateFeaturePanel.bind(this), width: "full" }, this._translations.cancel)), h("calcite-panel", { "full-height": true, "full-width": true }, h("calcite-notice", { class: "notice-msg", icon: "lightbulb", kind: "success", open: true }, h("div", { slot: "message" }, this._translations.featureEditFormInfoMsg)), 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 }))));
|
257
|
+
return (h("calcite-flow-item", { collapsed: this.isMobile && this._sidePanelCollapsed, heading: this._selectedLayerName, onCalciteFlowItemBack: this.backFromCreateFeaturePanel.bind(this) }, this.isMobile && this.getActionToExpandCollapsePanel(), this._showSubmitCancelButton && h("div", { class: "width-full", slot: "footer" }, h("calcite-button", { appearance: "solid", class: "footer-top-button footer-button", onClick: this.onSubmitButtonClick.bind(this), width: "full" }, this._translations.submit), h("calcite-button", { appearance: "outline", class: "footer-button", onClick: this.backFromCreateFeaturePanel.bind(this), width: "full" }, this._translations.cancel)), h("calcite-panel", { "full-height": true, "full-width": true }, h("div", { class: "progress-bar" }, h("calcite-progress", { type: "determinate", value: this._updatedProgressBarStatus })), h("calcite-notice", { class: "notice-msg", icon: "lightbulb", kind: "success", open: true }, h("div", { slot: "message" }, this._translations.featureEditFormInfoMsg)), 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 }))));
|
258
|
+
}
|
259
|
+
/**
|
260
|
+
* Update the progress bar status when editor panel changes
|
261
|
+
* @param evt Event which has progress bar status
|
262
|
+
* @protected
|
263
|
+
*/
|
264
|
+
updatedProgressStatus(evt) {
|
265
|
+
this._updatedProgressBarStatus = evt.detail;
|
190
266
|
}
|
191
267
|
/**
|
192
268
|
* When drawing of incident location completed on map show the submit and cancel button
|
@@ -208,7 +284,7 @@ const CrowdsourceReporter = class {
|
|
208
284
|
*/
|
209
285
|
onSubmitButtonClick() {
|
210
286
|
if (this._createFeature) {
|
211
|
-
this._createFeature.submit();
|
287
|
+
void this._createFeature.submit();
|
212
288
|
}
|
213
289
|
}
|
214
290
|
/**
|
@@ -217,7 +293,7 @@ const CrowdsourceReporter = class {
|
|
217
293
|
*/
|
218
294
|
backFromCreateFeaturePanel() {
|
219
295
|
if (this._createFeature) {
|
220
|
-
this._createFeature.close();
|
296
|
+
void this._createFeature.close();
|
221
297
|
}
|
222
298
|
this.backFromSelectedPanel();
|
223
299
|
}
|
@@ -244,10 +320,10 @@ const CrowdsourceReporter = class {
|
|
244
320
|
*/
|
245
321
|
async navigateToHomePage() {
|
246
322
|
if (this._createFeature) {
|
247
|
-
this._createFeature.close();
|
323
|
+
void this._createFeature.close();
|
248
324
|
}
|
249
325
|
if (this._layerList) {
|
250
|
-
this._layerList.refresh();
|
326
|
+
void this._layerList.refresh();
|
251
327
|
}
|
252
328
|
this.setSelectedFeatures([]);
|
253
329
|
if (this._editableLayerIds.length === 1) {
|
@@ -315,6 +391,7 @@ const CrowdsourceReporter = class {
|
|
315
391
|
* @protected
|
316
392
|
*/
|
317
393
|
backFromSelectedPanel() {
|
394
|
+
this._updatedProgressBarStatus = 0.25;
|
318
395
|
const updatedFlowItems = [...this._flowItems];
|
319
396
|
updatedFlowItems.pop();
|
320
397
|
this.clearHighlights();
|
@@ -341,6 +418,13 @@ const CrowdsourceReporter = class {
|
|
341
418
|
this.setSelectedFeatures([evt.detail]);
|
342
419
|
this._flowItems = [...this._flowItems, "feature-details"];
|
343
420
|
}
|
421
|
+
/**
|
422
|
+
* Show loading indicator while updating the feature details component
|
423
|
+
* @param isLoading is feature detail component loading
|
424
|
+
*/
|
425
|
+
async updatingFeatureDetails(isLoading) {
|
426
|
+
this._loadingFeatureDetails = isLoading;
|
427
|
+
}
|
344
428
|
/**
|
345
429
|
* Get feature list of the selected feature layer
|
346
430
|
* @param layerId Layer id
|
@@ -349,7 +433,10 @@ const CrowdsourceReporter = class {
|
|
349
433
|
* @protected
|
350
434
|
*/
|
351
435
|
getFeatureListFlowItem(layerId, layerName) {
|
352
|
-
|
436
|
+
var _a;
|
437
|
+
const layerExpressions = (_a = this.layerExpressions) === null || _a === void 0 ? void 0 : _a.filter((exp) => exp.id === this._selectedLayerId);
|
438
|
+
const showFilterIcon = layerExpressions.length > 0;
|
439
|
+
return (h("calcite-flow-item", { collapsed: this.isMobile && this._sidePanelCollapsed, heading: layerName, onCalciteFlowItemBack: this.backFromSelectedPanel.bind(this) }, showFilterIcon && 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 &&
|
353
440
|
h("calcite-button", { appearance: "solid", onClick: this.navigateToCreateFeature.bind(this), slot: "footer", width: "full" }, this.reportButtonText ? this.reportButtonText : this._translations.createReportButtonText), h("calcite-panel", { "full-height": true }, 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 }))));
|
354
441
|
}
|
355
442
|
/**
|
@@ -357,7 +444,15 @@ const CrowdsourceReporter = class {
|
|
357
444
|
* @returns Node
|
358
445
|
*/
|
359
446
|
getFeatureDetailsFlowItem() {
|
360
|
-
return (h("calcite-flow-item", { collapsed: this.isMobile && this._sidePanelCollapsed, heading: this._selectedLayerName, onCalciteFlowItemBack: this.backFromSelectedPanel.bind(this) }, this.isMobile && this.getActionToExpandCollapsePanel(), 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 }), h("calcite-panel",
|
447
|
+
return (h("calcite-flow-item", { collapsed: this.isMobile && this._sidePanelCollapsed, heading: this._selectedLayerName, loading: this._loadingFeatureDetails, onCalciteFlowItemBack: this.backFromSelectedPanel.bind(this) }, this.isMobile && this.getActionToExpandCollapsePanel(), 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 }), h("calcite-panel", null, this._selectedFeature.length > 1 && this.getFeaturesPagination(), 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 }))));
|
448
|
+
}
|
449
|
+
/**
|
450
|
+
* Returns the pagination for the multiple features
|
451
|
+
* Create pagination to avoid the overlap of like, dislike and comment section
|
452
|
+
* @returns Node
|
453
|
+
*/
|
454
|
+
getFeaturesPagination() {
|
455
|
+
return (h("div", { class: "feature-pagination", slot: "header-actions-start" }, h("div", null, h("calcite-button", { appearance: 'transparent', disabled: false, iconStart: "chevron-left", id: "solutions-back", onClick: () => void this._featureDetails.back(), scale: "s", width: "full" }), h("calcite-tooltip", { label: "", placement: "top", "reference-element": "solutions-back" }, h("span", null, this._translations.back))), h("calcite-button", { appearance: 'transparent', class: 'pagination-action', onClick: () => void this._featureDetails.toggleListView(), scale: "s" }, h("span", { class: "pagination-count" }, this._getCount())), h("div", null, h("calcite-button", { appearance: "transparent", disabled: false, iconStart: "chevron-right", id: "solutions-next", onClick: () => void this._featureDetails.next(), scale: "s", width: "full" }), h("calcite-tooltip", { placement: "top", "reference-element": "solutions-next" }, h("span", null, this._translations.next)))));
|
361
456
|
}
|
362
457
|
/**
|
363
458
|
* Sets the selected features and updates the first feature as the current selected feature
|
@@ -385,14 +480,6 @@ const CrowdsourceReporter = class {
|
|
385
480
|
}
|
386
481
|
this._updateShareURL();
|
387
482
|
}
|
388
|
-
/**
|
389
|
-
* On Feature details change update the Layer title and the current selected layer id
|
390
|
-
* @param evt Event hold the details of current feature graphic in the info-card
|
391
|
-
*/
|
392
|
-
featureDetailsChanged(evt) {
|
393
|
-
this.setCurrentFeature(evt.detail[0]);
|
394
|
-
void this.highlightOnMap(evt.detail[0]);
|
395
|
-
}
|
396
483
|
/**
|
397
484
|
* Highlights the feature on map
|
398
485
|
* @param selectedFeature Graphic currently shown in feature details
|
@@ -405,8 +492,9 @@ const CrowdsourceReporter = class {
|
|
405
492
|
const selectedLayerView = await getFeatureLayerView(this.mapView, selectedFeature.layer.id);
|
406
493
|
// remove previous highlight options (if any) to highlight the feature by default color
|
407
494
|
selectedLayerView.highlightOptions = null;
|
408
|
-
this._highlightHandle = await highlightFeatures([selectedFeature.getObjectId()], selectedLayerView, this.mapView, true);
|
495
|
+
this._highlightHandle = await highlightFeatures([selectedFeature.getObjectId()], selectedLayerView, this.mapView, true, this.zoomToScale);
|
409
496
|
}
|
497
|
+
void this.updatingFeatureDetails(false);
|
410
498
|
}
|
411
499
|
/**
|
412
500
|
* Clears the highlight
|
@@ -512,6 +600,19 @@ const CrowdsourceReporter = class {
|
|
512
600
|
}
|
513
601
|
}
|
514
602
|
}
|
603
|
+
/**
|
604
|
+
* Get the current index of total string
|
605
|
+
*
|
606
|
+
* @returns the index of total string
|
607
|
+
* @protected
|
608
|
+
*/
|
609
|
+
_getCount() {
|
610
|
+
const index = (this.selectedFeatureIndex + 1).toString();
|
611
|
+
const total = this._selectedFeature.length.toString();
|
612
|
+
return this._translations.indexOfTotal
|
613
|
+
.replace("{{index}}", index)
|
614
|
+
.replace("{{total}}", total);
|
615
|
+
}
|
515
616
|
/**
|
516
617
|
* Fetches the component's translations
|
517
618
|
* @returns Promise when complete
|
@@ -242,4 +242,4 @@ function setEndOfDay(date) {
|
|
242
242
|
return date;
|
243
243
|
}
|
244
244
|
|
245
|
-
export {
|
245
|
+
export { dateToISO as a, dateFromRange as b, datePartsFromISO as c, dateFromISO as d, datePartsFromLocalizedString as e, dateFromLocalizedString as f, getDaysDiff as g, sameDate as h, inRange as i, getOrder as j, formatCalendarYear as k, parseCalendarYear as l, nextMonth as n, prevMonth as p, setEndOfDay as s };
|
@@ -6,7 +6,7 @@
|
|
6
6
|
import { c as createCommonjsModule, d as getDefaultExportFromCjs } from './_commonjsHelpers-0f74c230.js';
|
7
7
|
import { a as getAssetPath } from './index-164d485a.js';
|
8
8
|
import { l as loadModules } from './locale-bcbea4ef.js';
|
9
|
-
import { q as queryFeaturesByID } from './mapViewUtils-
|
9
|
+
import { q as queryFeaturesByID } from './mapViewUtils-2ec19fb0.js';
|
10
10
|
import './solution-resource-77aa99c8.js';
|
11
11
|
import './index-a1e91462.js';
|
12
12
|
import { _ as __assign$1, r as request, c as cleanUrl, g as getJson } from './restHelpersGet-2a85d395.js';
|
@@ -1508,7 +1508,7 @@ function(t){var e=function(t){for(var e=t.length,r=new Uint8Array(e),n=0;n<e;n++
|
|
1508
1508
|
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
1509
1509
|
* ====================================================================
|
1510
1510
|
*/
|
1511
|
-
function(t){function e(){return (n.canvg?Promise.resolve(n.canvg):import('./index.es-
|
1511
|
+
function(t){function e(){return (n.canvg?Promise.resolve(n.canvg):import('./index.es-904fb846.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},
|
1512
1512
|
/** ====================================================================
|
1513
1513
|
* @license
|
1514
1514
|
* jsPDF XMP metadata plugin
|
@@ -4,11 +4,11 @@
|
|
4
4
|
* http://www.apache.org/licenses/LICENSE-2.0
|
5
5
|
*/
|
6
6
|
import { a as commonjsGlobal, c as createCommonjsModule, d as getDefaultExportFromCjs } from './_commonjsHelpers-0f74c230.js';
|
7
|
-
import { _ as _typeof_1 } from './downloadUtils-
|
7
|
+
import { _ as _typeof_1 } from './downloadUtils-df4f21f6.js';
|
8
8
|
import './index-164d485a.js';
|
9
9
|
import './locale-bcbea4ef.js';
|
10
10
|
import './esri-loader-1b324844.js';
|
11
|
-
import './mapViewUtils-
|
11
|
+
import './mapViewUtils-2ec19fb0.js';
|
12
12
|
import './interfaces-586e863c.js';
|
13
13
|
import './solution-resource-77aa99c8.js';
|
14
14
|
import './index-a1e91462.js';
|