@esri/solutions-components 0.8.23 → 0.8.25
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/cjs/arcgis-login.cjs.entry.js +1 -1
- package/dist/cjs/basemap-gallery_7.cjs.entry.js +1 -1
- package/dist/cjs/buffer-tools_3.cjs.entry.js +1 -1
- package/dist/cjs/{calcite-avatar.cjs.entry.js → calcite-avatar_2.cjs.entry.js} +62 -0
- package/dist/cjs/calcite-block_5.cjs.entry.js +12 -3
- package/dist/cjs/calcite-dropdown-group_2.cjs.entry.js +419 -0
- package/dist/cjs/{calcite-dropdown_4.cjs.entry.js → calcite-dropdown_2.cjs.entry.js} +12 -435
- package/dist/cjs/calcite-flow_6.cjs.entry.js +44 -34
- package/dist/cjs/card-manager_3.cjs.entry.js +1 -1
- package/dist/cjs/crowdsource-manager.cjs.entry.js +1 -1
- package/dist/cjs/crowdsource-reporter.cjs.entry.js +58 -38
- package/dist/cjs/feature-list.cjs.entry.js +5 -4
- package/dist/cjs/{helpers-9347ad83.js → helpers-618a3f7d.js} +2 -1
- package/dist/cjs/instant-apps-create.cjs.entry.js +266 -0
- package/dist/cjs/instant-apps-export.cjs.entry.js +31 -16
- package/dist/cjs/instant-apps-header.cjs.entry.js +3 -2
- package/dist/cjs/instant-apps-interactive-legend-classic.cjs.entry.js +11 -4
- package/dist/cjs/instant-apps-interactive-legend-count_2.cjs.entry.js +1 -1
- package/dist/cjs/instant-apps-interactive-legend-group-legend-element-caption.cjs.entry.js +1 -1
- package/dist/cjs/instant-apps-interactive-legend-group-legend-element_5.cjs.entry.js +2 -2
- package/dist/cjs/instant-apps-interactive-legend.cjs.entry.js +1 -1
- package/dist/cjs/instant-apps-landing-page.cjs.entry.js +45 -9
- package/dist/cjs/instant-apps-language-switcher.cjs.entry.js +1 -1
- package/dist/cjs/instant-apps-language-translator.cjs.entry.js +1 -1
- package/dist/cjs/instant-apps-sign-in.cjs.entry.js +168 -0
- package/dist/cjs/{languageSwitcher-395021d6.js → languageSwitcher-b9a1485c.js} +3 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/public-notification.cjs.entry.js +3 -3
- package/dist/cjs/resources-fa37e40f.js +26 -0
- package/dist/cjs/solutions-components.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +3 -1
- package/dist/collection/components/arcgis-login/arcgis-login.js +1 -1
- package/dist/collection/components/basemap-gallery/basemap-gallery.js +1 -1
- package/dist/collection/components/buffer-tools/buffer-tools.js +1 -1
- package/dist/collection/components/card-manager/card-manager.js +1 -1
- package/dist/collection/components/create-feature/create-feature.js +9 -2
- package/dist/collection/components/create-related-feature/create-related-feature.js +9 -2
- package/dist/collection/components/crowdsource-manager/crowdsource-manager.js +1 -1
- package/dist/collection/components/crowdsource-reporter/crowdsource-reporter.js +58 -47
- package/dist/collection/components/feature-details/feature-details.css +4 -4
- package/dist/collection/components/feature-details/feature-details.js +62 -18
- package/dist/collection/components/feature-list/feature-list.css +2 -0
- package/dist/collection/components/feature-list/feature-list.js +22 -3
- package/dist/collection/components/layer-list/layer-list.js +6 -13
- package/dist/collection/components/public-notification/public-notification.js +3 -3
- package/dist/collection/demos/crowdsource-reporter.html +22 -15
- package/dist/collection/utils/interfaces.ts +1 -0
- package/dist/components/arcgis-login.js +1 -1
- package/dist/components/basemap-gallery2.js +1 -1
- package/dist/components/buffer-tools2.js +1 -1
- package/dist/components/calcite-navigation-user.js +1 -99
- package/dist/components/card-manager2.js +1 -1
- package/dist/components/create-feature2.js +9 -2
- package/dist/components/create-related-feature2.js +9 -2
- package/dist/components/crowdsource-manager.js +1 -1
- package/dist/components/crowdsource-reporter.js +59 -39
- package/dist/components/feature-details2.js +22 -17
- package/dist/components/feature-list2.js +6 -4
- package/dist/components/helpers.js +3 -2
- package/dist/components/instant-apps-ckeditor-wrapper2.js +1 -1
- package/dist/components/instant-apps-create.js +317 -0
- package/dist/components/instant-apps-export.js +32 -16
- package/dist/components/instant-apps-filter-list2.js +6 -1
- package/dist/components/instant-apps-header2.js +3 -2
- package/dist/components/instant-apps-interactive-legend-classic2.js +12 -5
- package/dist/components/instant-apps-interactive-legend-legend-element-caption2.js +2 -2
- package/dist/components/instant-apps-landing-page.js +91 -16
- package/dist/components/instant-apps-language-translator2.js +3 -1
- package/dist/components/instant-apps-sign-in.js +11 -0
- package/dist/components/instant-apps-sign-in2.js +243 -0
- package/dist/components/instant-apps-social-share2.js +8 -2
- package/dist/components/layer-list2.js +6 -13
- package/dist/{esm/calcite-navigation-user.entry.js → components/navigation-user.js} +46 -9
- package/dist/components/public-notification.js +3 -3
- package/dist/esm/arcgis-login.entry.js +1 -1
- package/dist/esm/basemap-gallery_7.entry.js +1 -1
- package/dist/esm/buffer-tools_3.entry.js +1 -1
- package/dist/esm/{calcite-avatar.entry.js → calcite-avatar_2.entry.js} +64 -3
- package/dist/esm/calcite-block_5.entry.js +12 -3
- package/dist/esm/calcite-color-picker-hex-input_2.entry.js +1 -1
- package/dist/esm/calcite-color-picker.entry.js +1 -1
- package/dist/esm/calcite-dropdown-group_2.entry.js +414 -0
- package/dist/esm/{calcite-dropdown_4.entry.js → calcite-dropdown_2.entry.js} +2 -423
- package/dist/esm/calcite-flow_6.entry.js +44 -34
- package/dist/esm/card-manager_3.entry.js +1 -1
- package/dist/esm/crowdsource-manager.entry.js +1 -1
- package/dist/esm/crowdsource-reporter.entry.js +58 -38
- package/dist/esm/feature-list.entry.js +5 -4
- package/dist/esm/{helpers-a5a81b9d.js → helpers-61b05164.js} +3 -2
- package/dist/esm/instant-apps-create.entry.js +262 -0
- package/dist/esm/instant-apps-export.entry.js +31 -16
- package/dist/esm/instant-apps-header.entry.js +3 -2
- package/dist/esm/instant-apps-interactive-legend-classic.entry.js +11 -4
- package/dist/esm/instant-apps-interactive-legend-count_2.entry.js +1 -1
- package/dist/esm/instant-apps-interactive-legend-group-legend-element-caption.entry.js +1 -1
- package/dist/esm/instant-apps-interactive-legend-group-legend-element_5.entry.js +2 -2
- package/dist/esm/instant-apps-interactive-legend.entry.js +1 -1
- package/dist/esm/instant-apps-landing-page.entry.js +46 -10
- package/dist/esm/instant-apps-language-switcher.entry.js +1 -1
- package/dist/esm/instant-apps-language-translator.entry.js +1 -1
- package/dist/esm/instant-apps-sign-in.entry.js +164 -0
- package/dist/esm/{languageSwitcher-a4a615e4.js → languageSwitcher-d60f03b2.js} +3 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/public-notification.entry.js +3 -3
- package/dist/esm/resources-16800cce.js +24 -0
- package/dist/esm/solutions-components.js +1 -1
- package/dist/esm/{utils-6419e941.js → utils-251cb6de.js} +1 -1
- package/dist/node_modules/@esri/instant-apps-components/dist/collection/components/instant-apps-create/instant-apps-create.css +150 -0
- package/dist/node_modules/@esri/instant-apps-components/dist/collection/components/instant-apps-header/instant-apps-header.css +16 -9
- package/dist/node_modules/@esri/instant-apps-components/dist/collection/components/instant-apps-landing-page/instant-apps-landing-page.css +19 -0
- package/dist/node_modules/@esri/instant-apps-components/dist/collection/components/instant-apps-sign-in/instant-apps-sign-in.css +98 -0
- package/dist/solutions-components/demos/crowdsource-reporter.html +22 -15
- package/dist/solutions-components/{p-88495699.entry.js → p-16730f05.entry.js} +1 -1
- package/dist/solutions-components/p-1ae3b886.entry.js +17 -0
- package/dist/solutions-components/{p-63460d51.entry.js → p-1ff9eb95.entry.js} +1 -1
- package/dist/solutions-components/{p-8f6e0ae5.entry.js → p-26eb1225.entry.js} +1 -1
- package/dist/solutions-components/{p-3a2e0188.entry.js → p-2c044250.entry.js} +2 -2
- package/dist/solutions-components/p-314dc933.entry.js +6 -0
- package/dist/solutions-components/p-50741707.entry.js +6 -0
- package/dist/solutions-components/p-5b817c98.entry.js +6 -0
- package/dist/solutions-components/p-614ebce7.js +6 -0
- package/dist/solutions-components/p-686fa7ce.entry.js +6 -0
- package/dist/solutions-components/{p-df73649e.entry.js → p-77cd573b.entry.js} +1 -1
- package/dist/solutions-components/{p-c95dcdf7.entry.js → p-7883b885.entry.js} +3 -3
- package/dist/solutions-components/p-79e2e203.entry.js +6 -0
- package/dist/solutions-components/{p-968a6fd8.entry.js → p-7b17e929.entry.js} +1 -1
- package/dist/solutions-components/p-80b3eb6b.entry.js +6 -0
- package/dist/solutions-components/p-84913712.js +6 -0
- package/dist/solutions-components/p-8c500fd7.entry.js +6 -0
- package/dist/solutions-components/{p-fe9d6d06.js → p-9f56c02c.js} +1 -1
- package/dist/solutions-components/{p-667c022f.entry.js → p-af4be4ce.entry.js} +1 -1
- package/dist/solutions-components/p-bb2e669d.entry.js +6 -0
- package/dist/solutions-components/p-c2ec0dcc.entry.js +17 -0
- package/dist/solutions-components/p-c41997d5.js +11 -0
- package/dist/solutions-components/p-c512fcfb.entry.js +6 -0
- package/dist/solutions-components/{p-21d6360a.entry.js → p-c7f0e7a8.entry.js} +1 -1
- package/dist/solutions-components/{p-9c7d4343.entry.js → p-cd91c3e7.entry.js} +1 -1
- package/dist/solutions-components/p-ceba37d3.entry.js +11 -0
- package/dist/solutions-components/{p-09b769b7.entry.js → p-d8a15e32.entry.js} +1 -1
- package/dist/solutions-components/p-d8da6406.entry.js +6 -0
- package/dist/solutions-components/p-da6b3c8a.entry.js +6 -0
- package/dist/solutions-components/{p-60f1055e.entry.js → p-e2400b0d.entry.js} +1 -1
- package/dist/solutions-components/p-f35cc7ae.entry.js +6 -0
- package/dist/solutions-components/solutions-components.esm.js +1 -1
- package/dist/solutions-components/utils/interfaces.ts +1 -0
- package/dist/types/components/create-feature/create-feature.d.ts +4 -0
- package/dist/types/components/create-related-feature/create-related-feature.d.ts +4 -0
- package/dist/types/components/crowdsource-reporter/crowdsource-reporter.d.ts +18 -7
- package/dist/types/components/feature-details/feature-details.d.ts +17 -1
- package/dist/types/components/feature-list/feature-list.d.ts +4 -0
- package/dist/types/components/layer-list/layer-list.d.ts +1 -1
- package/dist/types/components.d.ts +25 -2
- package/dist/types/preact.d.ts +7 -2
- package/dist/types/utils/interfaces.d.ts +1 -0
- package/package.json +2 -2
- package/dist/cjs/calcite-navigation-user.cjs.entry.js +0 -73
- package/dist/solutions-components/p-08a1e120.js +0 -6
- package/dist/solutions-components/p-3283660c.entry.js +0 -6
- package/dist/solutions-components/p-33647277.entry.js +0 -6
- package/dist/solutions-components/p-3af0764f.entry.js +0 -6
- package/dist/solutions-components/p-41d288c0.entry.js +0 -6
- package/dist/solutions-components/p-599dcc29.js +0 -6
- package/dist/solutions-components/p-64b4b579.entry.js +0 -11
- package/dist/solutions-components/p-64da5bb8.entry.js +0 -17
- package/dist/solutions-components/p-ab96dd27.entry.js +0 -6
- package/dist/solutions-components/p-bb0c7be3.entry.js +0 -17
- package/dist/solutions-components/p-bb8e3add.entry.js +0 -11
- package/dist/solutions-components/p-c36bb8ca.entry.js +0 -6
- package/dist/solutions-components/p-cbe166fc.entry.js +0 -6
- package/dist/solutions-components/p-eab95aa4.entry.js +0 -6
- package/dist/solutions-components/p-f6a1673c.entry.js +0 -6
@@ -19,6 +19,10 @@ const CreateFeature = /*@__PURE__*/ proxyCustomElement(class CreateFeature exten
|
|
19
19
|
this.drawComplete = createEvent(this, "drawComplete", 7);
|
20
20
|
this.editingAttachment = createEvent(this, "editingAttachment", 7);
|
21
21
|
this.progressStatus = createEvent(this, "progressStatus", 7);
|
22
|
+
/**
|
23
|
+
* boolean: Flag to maintain form submission using submit button
|
24
|
+
*/
|
25
|
+
this._isSubmitBtnClicked = false;
|
22
26
|
this.mapView = undefined;
|
23
27
|
this.selectedLayerId = undefined;
|
24
28
|
this.customizeSubmit = false;
|
@@ -58,6 +62,7 @@ const CreateFeature = /*@__PURE__*/ proxyCustomElement(class CreateFeature exten
|
|
58
62
|
*/
|
59
63
|
async submit() {
|
60
64
|
if (this._editor) {
|
65
|
+
this._isSubmitBtnClicked = true;
|
61
66
|
this._editor.viewModel.featureFormViewModel.submit();
|
62
67
|
}
|
63
68
|
}
|
@@ -84,7 +89,7 @@ const CreateFeature = /*@__PURE__*/ proxyCustomElement(class CreateFeature exten
|
|
84
89
|
*/
|
85
90
|
render() {
|
86
91
|
const showSearchWidget = this.showSearchWidget ? '' : 'display-none';
|
87
|
-
return (h(Fragment, { key: '
|
92
|
+
return (h(Fragment, { key: 'd11a16053bc5eb86a09fd3bc35c9a89cee6dd064' }, h("div", { key: '0320bb0ca9fc069306151078c66fbee11060fcab', id: "feature-form" }), h("div", { key: '8aaa13e87213a880382ca408d324beb79ba7a500', class: `search-widget ${showSearchWidget}`, id: "search-widget-ref" })));
|
88
93
|
}
|
89
94
|
//--------------------------------------------------------------------------
|
90
95
|
//
|
@@ -330,11 +335,13 @@ const CreateFeature = /*@__PURE__*/ proxyCustomElement(class CreateFeature exten
|
|
330
335
|
var _a;
|
331
336
|
//return if any attribute is invalid , focus will be shifted to the invalid attribute in feature form
|
332
337
|
if (evt.invalid.length) {
|
338
|
+
this._isSubmitBtnClicked = false;
|
333
339
|
return;
|
334
340
|
}
|
335
341
|
//Submit only when valid attributes
|
336
342
|
//emit success or fail based on the result
|
337
|
-
if (evt.valid.length) {
|
343
|
+
if (evt.valid.length && this._isSubmitBtnClicked) {
|
344
|
+
this._isSubmitBtnClicked = false;
|
338
345
|
try {
|
339
346
|
await this._editor.activeWorkflow.commit();
|
340
347
|
//throw errors if any failures
|
@@ -16,6 +16,10 @@ const CreateRelatedFeature = /*@__PURE__*/ proxyCustomElement(class CreateRelate
|
|
16
16
|
this.success = createEvent(this, "success", 7);
|
17
17
|
this.fail = createEvent(this, "fail", 7);
|
18
18
|
this.isActionPending = createEvent(this, "isActionPending", 7);
|
19
|
+
/**
|
20
|
+
* boolean: Flag to maintain form submission using submit button
|
21
|
+
*/
|
22
|
+
this._isSubmitBtnClicked = false;
|
19
23
|
this.mapView = undefined;
|
20
24
|
this.table = undefined;
|
21
25
|
this.selectedFeature = undefined;
|
@@ -52,6 +56,7 @@ const CreateRelatedFeature = /*@__PURE__*/ proxyCustomElement(class CreateRelate
|
|
52
56
|
*/
|
53
57
|
async submit() {
|
54
58
|
if (this._editor) {
|
59
|
+
this._isSubmitBtnClicked = true;
|
55
60
|
this._editor.viewModel.featureFormViewModel.submit();
|
56
61
|
}
|
57
62
|
}
|
@@ -89,7 +94,7 @@ const CreateRelatedFeature = /*@__PURE__*/ proxyCustomElement(class CreateRelate
|
|
89
94
|
this.reactiveUtils = reactiveUtils;
|
90
95
|
}
|
91
96
|
render() {
|
92
|
-
return (h(Host, { key: '
|
97
|
+
return (h(Host, { key: '8c32e05707b6e5501759caaef5d89f8da40640e4' }));
|
93
98
|
}
|
94
99
|
/**
|
95
100
|
* StencilJS: Called once just after the component is fully loaded and the first render() occurs.
|
@@ -219,11 +224,13 @@ const CreateRelatedFeature = /*@__PURE__*/ proxyCustomElement(class CreateRelate
|
|
219
224
|
var _a;
|
220
225
|
//return if any attribute is invalid , focus will be shifted to the invalid attribute in feature form
|
221
226
|
if (evt.invalid.length) {
|
227
|
+
this._isSubmitBtnClicked = false;
|
222
228
|
return;
|
223
229
|
}
|
224
230
|
//Submit only when valid attributes
|
225
231
|
//emit success or fail based on the result
|
226
|
-
if (evt.valid.length) {
|
232
|
+
if (evt.valid.length && this._isSubmitBtnClicked) {
|
233
|
+
this._isSubmitBtnClicked = false;
|
227
234
|
try {
|
228
235
|
await this._editor.activeWorkflow.commit();
|
229
236
|
//throw errors if any failures
|
@@ -252,7 +252,7 @@ const CrowdsourceManager$1 = /*@__PURE__*/ proxyCustomElement(class CrowdsourceM
|
|
252
252
|
render() {
|
253
253
|
// only avoid border when we have a header color that is not white
|
254
254
|
const borderClass = this.popupHeaderColor && this.popupHeaderColor !== "#FFFFFF" ? "border-width-0" : "";
|
255
|
-
return (h(Host, { key: '
|
255
|
+
return (h(Host, { key: '0f06df71cc424887b8dc4b4929670d94b6548085' }, h("calcite-shell", { key: 'c81a570fb771650de6193e45ffbebd03544eaf2e', class: "position-relative" }, h("calcite-panel", { key: '5e67c2bf9ed0df0080629989f93e89a145349abc', class: `width-full height-full ${borderClass}` }, this._getBody(this._layoutMode, this._panelOpen, this._hideTable)), this._getFooter())));
|
256
256
|
}
|
257
257
|
/**
|
258
258
|
* Called after each render
|
@@ -128,18 +128,6 @@ const CrowdsourceReporter$1 = /*@__PURE__*/ proxyCustomElement(class Crowdsource
|
|
128
128
|
await this.setMapView();
|
129
129
|
});
|
130
130
|
}
|
131
|
-
/**
|
132
|
-
* On Feature details change update the Layer title and the current selected layer id
|
133
|
-
* @param evt Event hold the details of current feature graphic in the info-card
|
134
|
-
*/
|
135
|
-
async selectionChanged(evt) {
|
136
|
-
void this.updatingFeatureDetails(true);
|
137
|
-
await this.setCurrentFeature(evt.detail.selectedFeature[0]);
|
138
|
-
void this.highlightOnMap(evt.detail.selectedFeature[0]);
|
139
|
-
this._selectedFeatureIndex = evt.detail.selectedFeatureIndex;
|
140
|
-
//update the feature details to reflect the like, dislike and comment values
|
141
|
-
await this._featureDetails.refresh(evt.detail.selectedFeature[0]);
|
142
|
-
}
|
143
131
|
//--------------------------------------------------------------------------
|
144
132
|
//
|
145
133
|
// Functions (lifecycle)
|
@@ -156,9 +144,9 @@ const CrowdsourceReporter$1 = /*@__PURE__*/ proxyCustomElement(class Crowdsource
|
|
156
144
|
await this._initModules();
|
157
145
|
await this._getTranslations();
|
158
146
|
await ((_a = this.mapView) === null || _a === void 0 ? void 0 : _a.when(async () => {
|
159
|
-
//set configured
|
147
|
+
//set configured layers array which are enabled for data collection
|
160
148
|
this._layers = this.reportingOptions ? Object.keys(this.reportingOptions).filter((layerId) => {
|
161
|
-
return this.reportingOptions[layerId].
|
149
|
+
return this.reportingOptions[layerId].visible;
|
162
150
|
}) : [];
|
163
151
|
await this.setMapView();
|
164
152
|
}));
|
@@ -168,7 +156,7 @@ const CrowdsourceReporter$1 = /*@__PURE__*/ proxyCustomElement(class Crowdsource
|
|
168
156
|
*/
|
169
157
|
render() {
|
170
158
|
const themeClass = this.theme === "dark" ? "calcite-mode-dark" : "calcite-mode-light";
|
171
|
-
return (h(Host, { key: '
|
159
|
+
return (h(Host, { key: '497227745f29c2afc434349e86da19b088b1eb78' }, this._reportSubmitted && h("calcite-alert", { key: 'd22cceb7124073ad390cd53d97214a2983e97ea0', "auto-close": true, class: themeClass + " report-submitted-msg", icon: "check-circle", kind: "success", label: "", onCalciteAlertClose: () => { this._reportSubmitted = false; }, open: true, placement: "top" }, h("div", { key: '1f98f71fa79cf64e65fecfbceec3862714702609', slot: "message" }, this.reportSubmittedMessage ? this.reportSubmittedMessage : this._translations.submitMsg)), this._featureCreationFailedErrorMsg && h("calcite-alert", { key: '381d3b5a3f5115782634833ad53b4494e888ea97', "auto-close": true, class: themeClass, icon: "x-octagon", kind: "danger", label: "", onCalciteAlertClose: () => { this._featureCreationFailedErrorMsg = ""; }, open: true, placement: "top" }, h("div", { key: '34371959d1272e4bc465e5f5a432d450a156c20b', slot: "title" }, this._translations.error), h("div", { key: '09a55e3325edde43f660a2db1621a4ffd373e09f', slot: "message" }, this._featureCreationFailedErrorMsg)), this._commentSubmitted && h("calcite-alert", { key: '33d79a67575c9a2b14e602e60b702ca82025e20f', "auto-close": true, class: 'report-submitted ' + themeClass, icon: "check-circle", kind: "success", label: "", onCalciteAlertClose: () => { this._commentSubmitted = false; }, open: true, placement: "top" }, h("div", { key: '91b9dcc26cf1f66a116a287a94e8df5c3d2f37bf', slot: "message" }, this._translations.commentSubmittedMsg)), this._addingCommentFailed && h("calcite-alert", { key: '758f1d465d4301fade8fd93a682bfe4b359be2ca', "auto-close": true, class: themeClass, icon: "x-octagon", kind: "danger", label: "", onCalciteAlertClose: () => { this._addingCommentFailed = false; }, open: true, placement: "top" }, h("div", { key: '982424caf90e309701c62c75065d7e7e15d327b4', slot: "title" }, this._translations.error), h("div", { key: '1c93f9f8e1b958ccf8553560c36a32273f16a3a6', slot: "message" }, this._translations.addingCommentFailedMsg)), h("div", { key: '612254cf38da92cf88b90ace8136a2e0859afcae' }, h("calcite-shell", { key: 'bb56100b4dfc355b93d580deee929aad7cfb3f7f', "content-behind": true }, this._getReporter())), this.filterModal()));
|
172
160
|
}
|
173
161
|
//--------------------------------------------------------------------------
|
174
162
|
//
|
@@ -203,6 +191,14 @@ const CrowdsourceReporter$1 = /*@__PURE__*/ proxyCustomElement(class Crowdsource
|
|
203
191
|
layer.set('visible', !layerId || (layer.id === layerId));
|
204
192
|
});
|
205
193
|
}
|
194
|
+
/**
|
195
|
+
* Returns the layers configuration
|
196
|
+
* @param layerId string layerId of the selected layer
|
197
|
+
* @returns Configuration for the layerId
|
198
|
+
*/
|
199
|
+
_getLayersConfig(layerId) {
|
200
|
+
return this.reportingOptions && this.reportingOptions[layerId] ? this.reportingOptions[layerId] : null;
|
201
|
+
}
|
206
202
|
/**
|
207
203
|
* Get the reporter app functionality
|
208
204
|
* @protected
|
@@ -326,7 +322,10 @@ const CrowdsourceReporter$1 = /*@__PURE__*/ proxyCustomElement(class Crowdsource
|
|
326
322
|
* @protected
|
327
323
|
*/
|
328
324
|
getChooseCategoryFlowItem() {
|
329
|
-
|
325
|
+
const onlyReportingLayers = this.reportingOptions ? Object.keys(this.reportingOptions).filter((layerId) => {
|
326
|
+
return this.reportingOptions[layerId].visible && this.reportingOptions[layerId].reporting && this._layerItemsHash[layerId] && this._layerItemsHash[layerId].supportsAdd;
|
327
|
+
}) : [];
|
328
|
+
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: onlyReportingLayers, mapView: this.mapView, onLayerSelect: this.navigateToCreateFeature.bind(this), showFeatureCount: false, showNextIcon: false }))));
|
330
329
|
}
|
331
330
|
/**
|
332
331
|
* Get Feature create form of the selected feature layer
|
@@ -485,16 +484,22 @@ const CrowdsourceReporter$1 = /*@__PURE__*/ proxyCustomElement(class Crowdsource
|
|
485
484
|
const layersListed = evt.detail;
|
486
485
|
//consider only the layers listed in the layer-list component
|
487
486
|
const allMapLayers = await getAllLayers(this.mapView);
|
487
|
+
const reportingEnabledLayerIds = [];
|
488
488
|
this._validLayers = [];
|
489
489
|
allMapLayers.forEach((eachLayer) => {
|
490
|
+
var _a;
|
490
491
|
if (layersListed.includes(eachLayer.id)) {
|
491
492
|
this._validLayers.push(eachLayer);
|
493
|
+
//create list of reporting enabled layers
|
494
|
+
if (((_a = this._getLayersConfig(eachLayer.id)) === null || _a === void 0 ? void 0 : _a.reporting) && this._layerItemsHash[eachLayer.id] && this._layerItemsHash[eachLayer.id].supportsAdd) {
|
495
|
+
reportingEnabledLayerIds.push(eachLayer.id);
|
496
|
+
}
|
492
497
|
}
|
493
498
|
});
|
494
499
|
//handleMap click on layer list loaded
|
495
500
|
this.handleMapClick();
|
496
|
-
//
|
497
|
-
this._hasValidLayers =
|
501
|
+
//When we have any reporting layer then only show the create report button on layerList
|
502
|
+
this._hasValidLayers = reportingEnabledLayerIds.length > 0;
|
498
503
|
//navigate to the feature details if URL params found
|
499
504
|
if (!this._urlParamsLoaded) {
|
500
505
|
this._urlParamsLoaded = true;
|
@@ -522,8 +527,9 @@ const CrowdsourceReporter$1 = /*@__PURE__*/ proxyCustomElement(class Crowdsource
|
|
522
527
|
backFromSelectedPanel() {
|
523
528
|
this._updatedProgressBarStatus = 0.25;
|
524
529
|
const updatedFlowItems = [...this._flowItems];
|
525
|
-
// when
|
526
|
-
if (updatedFlowItems[updatedFlowItems.length - 1]
|
530
|
+
// when back from comment details or add comment page don't clear the highlighted feature of map
|
531
|
+
if (!(updatedFlowItems[updatedFlowItems.length - 1] === 'comment-details' ||
|
532
|
+
updatedFlowItems[updatedFlowItems.length - 1] === 'add-comment')) {
|
527
533
|
this.clearHighlights();
|
528
534
|
}
|
529
535
|
updatedFlowItems.pop();
|
@@ -568,6 +574,19 @@ const CrowdsourceReporter$1 = /*@__PURE__*/ proxyCustomElement(class Crowdsource
|
|
568
574
|
async updatingFeatureDetails(isLoading) {
|
569
575
|
this._showLoadingIndicator = isLoading;
|
570
576
|
}
|
577
|
+
/**
|
578
|
+
* On Feature details change update the Layer title and the current selected layer id
|
579
|
+
* @param evt Event hold the details of current feature graphic from the feature-details
|
580
|
+
* @protected
|
581
|
+
*/
|
582
|
+
async selectionChanged(evt) {
|
583
|
+
void this.updatingFeatureDetails(true);
|
584
|
+
await this.setCurrentFeature(evt.detail.selectedFeature[0]);
|
585
|
+
void this.highlightOnMap(evt.detail.selectedFeature[0]);
|
586
|
+
this._selectedFeatureIndex = evt.detail.selectedFeatureIndex;
|
587
|
+
//update the feature details to reflect the like, dislike and comment values
|
588
|
+
await this._featureDetails.refresh(evt.detail.selectedFeature[0]);
|
589
|
+
}
|
571
590
|
/**
|
572
591
|
* When comment is selected from list store that and show comment details
|
573
592
|
* @param evt Event which has details of selected feature
|
@@ -585,10 +604,11 @@ const CrowdsourceReporter$1 = /*@__PURE__*/ proxyCustomElement(class Crowdsource
|
|
585
604
|
* @protected
|
586
605
|
*/
|
587
606
|
getFeatureListFlowItem(layerId, layerName) {
|
588
|
-
var _a;
|
607
|
+
var _a, _b;
|
589
608
|
const layerExpressions = (_a = this.layerExpressions) === null || _a === void 0 ? void 0 : _a.filter((exp) => exp.id === this._selectedLayerId);
|
609
|
+
const canCreateReports = ((_b = this._getLayersConfig(this._selectedLayerId)) === null || _b === void 0 ? void 0 : _b.reporting) && this._layerItemsHash[this._selectedLayerId].supportsAdd;
|
590
610
|
const showFilterIcon = (layerExpressions === null || layerExpressions === void 0 ? void 0 : layerExpressions.length) > 0;
|
591
|
-
return (h("calcite-flow-item", { collapsed: this.isMobile && this._sidePanelCollapsed, heading: layerName, loading: this._showLoadingIndicator, onCalciteFlowItemBack: this.backFromSelectedPanel.bind(this) }, this._toggleSort(), h("calcite-action", { icon: "sort-ascending-arrow", id: "sort-popover", slot: "header-actions-end", text: this._translations.sort, title: this._translations.sort }), showFilterIcon && h("calcite-action", { icon: "filter", indicator: this._filterActive, onClick: this._toggleFilter.bind(this), slot: "header-actions-end", text: this._translations.filter, title: this._translations.filter }), this.isMobile && this.getActionToExpandCollapsePanel(), this.enableNewReports &&
|
611
|
+
return (h("calcite-flow-item", { collapsed: this.isMobile && this._sidePanelCollapsed, heading: layerName, loading: this._showLoadingIndicator, onCalciteFlowItemBack: this.backFromSelectedPanel.bind(this) }, this._toggleSort(), h("calcite-action", { icon: "sort-ascending-arrow", id: "sort-popover", slot: "header-actions-end", text: this._translations.sort, title: this._translations.sort }), showFilterIcon && h("calcite-action", { icon: "filter", indicator: this._filterActive, onClick: this._toggleFilter.bind(this), slot: "header-actions-end", text: this._translations.filter, title: this._translations.filter }), this.isMobile && this.getActionToExpandCollapsePanel(), this.enableNewReports && canCreateReports &&
|
592
612
|
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, sortingInfo: this._updatedSorting }))));
|
593
613
|
}
|
594
614
|
/**
|
@@ -596,8 +616,9 @@ const CrowdsourceReporter$1 = /*@__PURE__*/ proxyCustomElement(class Crowdsource
|
|
596
616
|
* @returns Node
|
597
617
|
*/
|
598
618
|
getFeatureDetailsFlowItem() {
|
599
|
-
|
600
|
-
|
619
|
+
var _a;
|
620
|
+
const showCommentBtn = ((_a = this._getLayersConfig(this._selectedLayerId)) === null || _a === void 0 ? void 0 : _a.comment) && this._selectedLayer.relationships.length > 0;
|
621
|
+
return (h("calcite-flow-item", { collapsed: this.isMobile && this._sidePanelCollapsed, heading: this._selectedLayerName, loading: this._showLoadingIndicator, 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, removePopoverOffset: true, scale: "s", shareButtonColor: "neutral", shareButtonType: "action", slot: "header-actions-end", socialMedia: true, view: this.mapView }), this._selectedFeature.length > 1 && this.getFeaturesPagination(), h("calcite-panel", null, h("feature-details", { class: 'full-height', graphics: this._selectedFeature, layerItemsHash: this._layerItemsHash, mapView: this.mapView, onCommentSelect: this.onCommentSelectFromList.bind(this), onFeatureSelectionChange: this.selectionChanged.bind(this), onLoadingStatus: (evt) => void this.updatingFeatureDetails(evt.detail), ref: el => this._featureDetails = el, reportingOptions: this.reportingOptions }), showCommentBtn &&
|
601
622
|
h("calcite-button", { appearance: "solid", onClick: () => this._flowItems = [...this._flowItems, "add-comment"], slot: "footer", width: "full" }, this._translations.comment))));
|
602
623
|
}
|
603
624
|
/**
|
@@ -635,13 +656,14 @@ const CrowdsourceReporter$1 = /*@__PURE__*/ proxyCustomElement(class Crowdsource
|
|
635
656
|
* @param selectedFeature Graphic currently shown in feature details
|
636
657
|
*/
|
637
658
|
async setCurrentFeature(selectedFeature) {
|
659
|
+
var _a;
|
638
660
|
this._currentFeature = selectedFeature;
|
639
661
|
if (selectedFeature && selectedFeature.layer) {
|
640
662
|
const layer = selectedFeature.layer;
|
641
663
|
void this.setSelectedLayer(layer.id, layer.title);
|
642
664
|
this._currentFeatureId = selectedFeature.attributes[layer.objectIdField];
|
643
665
|
// check if comments are configured and relationship is present then only get the related table
|
644
|
-
const isCommentTablePresent = this.
|
666
|
+
const isCommentTablePresent = ((_a = this._getLayersConfig(layer.id)) === null || _a === void 0 ? void 0 : _a.comment) && layer.relationships.length > 0;
|
645
667
|
if (isCommentTablePresent) {
|
646
668
|
await this.getRelatedTable();
|
647
669
|
}
|
@@ -755,12 +777,12 @@ const CrowdsourceReporter$1 = /*@__PURE__*/ proxyCustomElement(class Crowdsource
|
|
755
777
|
await this.setSelectedFeatures(reportingLayerGraphics);
|
756
778
|
//if featureDetails not open then add it to the list else just reInit flowItems which will update details with newly selected features
|
757
779
|
// eslint-disable-next-line unicorn/prefer-ternary
|
758
|
-
if (this._flowItems.length && this._flowItems
|
759
|
-
this._flowItems = [...this._flowItems, "feature-details"];
|
780
|
+
if (this._flowItems.length && this._flowItems.includes("feature-details")) {
|
781
|
+
this._flowItems = [...this._flowItems.slice(0, this._flowItems.indexOf("feature-details") + 1)];
|
782
|
+
await this.highlightOnMap(clickedGraphics[0]);
|
760
783
|
}
|
761
784
|
else {
|
762
|
-
this._flowItems = [...this._flowItems];
|
763
|
-
void this.highlightOnMap(clickedGraphics[0]);
|
785
|
+
this._flowItems = [...this._flowItems, "feature-details"];
|
764
786
|
}
|
765
787
|
}
|
766
788
|
// if clicked graphic's layer is from non reporting layers then show popup on map
|
@@ -803,13 +825,11 @@ const CrowdsourceReporter$1 = /*@__PURE__*/ proxyCustomElement(class Crowdsource
|
|
803
825
|
* @returns array of editable layer ids
|
804
826
|
*/
|
805
827
|
reduceToConfiguredLayers(hash) {
|
806
|
-
var _a;
|
807
|
-
const configuredLayers = ((_a = this._layers) === null || _a === void 0 ? void 0 : _a.length) > 0 ? this._layers : [];
|
808
828
|
return Object.keys(hash).reduce((prev, cur) => {
|
809
|
-
|
810
|
-
|
811
|
-
|
812
|
-
|
829
|
+
var _a;
|
830
|
+
// check if reporting options exists consider the visible prop if else just check the supports Add
|
831
|
+
const showLayer = this.reportingOptions ? (_a = this._getLayersConfig(cur)) === null || _a === void 0 ? void 0 : _a.visible
|
832
|
+
: hash[cur].supportsAdd;
|
813
833
|
if (showLayer) {
|
814
834
|
prev.push(cur);
|
815
835
|
}
|
@@ -830,18 +850,19 @@ const CrowdsourceReporter$1 = /*@__PURE__*/ proxyCustomElement(class Crowdsource
|
|
830
850
|
}
|
831
851
|
});
|
832
852
|
this._editableLayerIds = this.reduceToConfiguredLayers(layerItemsHash);
|
853
|
+
this._layerItemsHash = layerItemsHash;
|
833
854
|
}
|
834
855
|
/**
|
835
856
|
* renders feature list
|
836
857
|
* @protected
|
837
858
|
*/
|
838
859
|
async renderFeaturesList() {
|
860
|
+
this._flowItems = ['feature-list'];
|
839
861
|
const evt = {
|
840
862
|
detail: this._editableLayerIds
|
841
863
|
};
|
842
864
|
await this.layerListLoaded(evt);
|
843
865
|
void this.setSelectedLayer(this._validLayers[0].id, this._validLayers[0].title);
|
844
|
-
this._flowItems = ['feature-list'];
|
845
866
|
}
|
846
867
|
/**
|
847
868
|
* Updates the share url for current selected feature
|
@@ -889,7 +910,7 @@ const CrowdsourceReporter$1 = /*@__PURE__*/ proxyCustomElement(class Crowdsource
|
|
889
910
|
const featureSet = await queryFeaturesByID([Number(this.objectId)], layer, [], true, this.mapView.spatialReference);
|
890
911
|
if (featureSet.length) {
|
891
912
|
//update the selectedFeature
|
892
|
-
this.
|
913
|
+
await this.setSelectedFeatures(featureSet);
|
893
914
|
//if featureDetails not open then add it to the list else just reInit flowItems which will update details with newly selected features
|
894
915
|
// eslint-disable-next-line unicorn/prefer-ternary
|
895
916
|
if (this._flowItems.length && this._flowItems[this._flowItems.length - 1] !== "feature-details") {
|
@@ -898,7 +919,6 @@ const CrowdsourceReporter$1 = /*@__PURE__*/ proxyCustomElement(class Crowdsource
|
|
898
919
|
else {
|
899
920
|
this._flowItems = [...this._flowItems];
|
900
921
|
}
|
901
|
-
await this.highlightOnMap(featureSet[0]);
|
902
922
|
}
|
903
923
|
}
|
904
924
|
}
|
@@ -955,7 +975,7 @@ const CrowdsourceReporter$1 = /*@__PURE__*/ proxyCustomElement(class Crowdsource
|
|
955
975
|
"_updatedSortOption": [32],
|
956
976
|
"_commentSubmitted": [32],
|
957
977
|
"_addingCommentFailed": [32]
|
958
|
-
},
|
978
|
+
}, undefined, {
|
959
979
|
"isMobile": ["isMobileWatchHandler"],
|
960
980
|
"mapView": ["mapViewWatchHandler"]
|
961
981
|
}]);
|
@@ -33,7 +33,7 @@ import { d as defineCustomElement$3 } from './edit-card2.js';
|
|
33
33
|
import { d as defineCustomElement$2 } from './feature-list2.js';
|
34
34
|
import { d as defineCustomElement$1 } from './info-card2.js';
|
35
35
|
|
36
|
-
const featureDetailsCss = ":host{display:block}.buttons-container{align-items:center;display:flex;padding:
|
36
|
+
const featureDetailsCss = ":host{display:block}.buttons-container{align-items:center;display:flex;padding:4px;color:var(--calcite-color-text-1) !important;background-color:var(--calcite-color-foreground-1) !important;border-block-start:1px solid var(--calcite-color-border-3);border-block-end:1px solid var(--calcite-color-border-3)}.comment-btn{display:flex;gap:10px;font-size:var(--calcite-font-size--1);align-items:center;padding:7px 0.75rem}";
|
37
37
|
const FeatureDetailsStyle0 = featureDetailsCss;
|
38
38
|
|
39
39
|
const FeatureDetails = /*@__PURE__*/ proxyCustomElement(class FeatureDetails extends HTMLElement {
|
@@ -41,7 +41,8 @@ const FeatureDetails = /*@__PURE__*/ proxyCustomElement(class FeatureDetails ext
|
|
41
41
|
super();
|
42
42
|
this.__registerHost();
|
43
43
|
this.loadingStatus = createEvent(this, "loadingStatus", 7);
|
44
|
-
this.
|
44
|
+
this.commentSelect = createEvent(this, "commentSelect", 7);
|
45
|
+
this.featureSelectionChange = createEvent(this, "featureSelectionChange", 7);
|
45
46
|
/**
|
46
47
|
* string[]: Valid field types for like and dislike
|
47
48
|
*/
|
@@ -49,6 +50,7 @@ const FeatureDetails = /*@__PURE__*/ proxyCustomElement(class FeatureDetails ext
|
|
49
50
|
this.mapView = undefined;
|
50
51
|
this.graphics = undefined;
|
51
52
|
this.reportingOptions = undefined;
|
53
|
+
this.layerItemsHash = undefined;
|
52
54
|
this._likeFieldAvailable = false;
|
53
55
|
this._likeCount = 0;
|
54
56
|
this._disLikeCount = 0;
|
@@ -57,6 +59,7 @@ const FeatureDetails = /*@__PURE__*/ proxyCustomElement(class FeatureDetails ext
|
|
57
59
|
this._isLikeBtnClicked = false;
|
58
60
|
this._isDislikeBtnClicked = false;
|
59
61
|
this._relatedFeaturesOIDs = undefined;
|
62
|
+
this._updating = false;
|
60
63
|
}
|
61
64
|
//--------------------------------------------------------------------------
|
62
65
|
//
|
@@ -128,12 +131,12 @@ const FeatureDetails = /*@__PURE__*/ proxyCustomElement(class FeatureDetails ext
|
|
128
131
|
var _a, _b, _c, _d, _e;
|
129
132
|
//When related features found show comments list of only those features else comments list will be empty
|
130
133
|
const commentsListWhereClause = ((_a = this._relatedFeaturesOIDs) === null || _a === void 0 ? void 0 : _a.length) > 0 ? `objectId in(${this._relatedFeaturesOIDs})` : '1=0';
|
131
|
-
return (h("calcite-panel", { key: '
|
132
|
-
h("div", { key: '
|
133
|
-
h("div", { key: '
|
134
|
-
h("calcite-button", { key: '
|
135
|
-
h("calcite-button", { key: '
|
136
|
-
h("feature-list", { key: '
|
134
|
+
return (h("calcite-panel", { key: '8d7069fec0df2a6217c175df6171376b4412c548', "full-height": true }, h("info-card", { key: '3713b783371bcb36a9b844196033326941d833f5', allowEditing: false, graphics: this.graphics, highlightEnabled: false, isLoading: false, isMobile: false, mapView: this.mapView, onSelectionChanged: (e) => { this.featureSelectionChange.emit(e.detail); }, paginationEnabled: false, position: "relative", ref: el => this._infoCard = el }), (this._likeFieldAvailable || this._dislikeFieldAvailable || this._commentsAvailable) &&
|
135
|
+
h("div", { key: '8c84e82708fab0d6091050672b26e6fa2de59345', class: "buttons-container" }, this._commentsAvailable &&
|
136
|
+
h("div", { key: '22edb3f17ef6a2bdef67e5e94492966986d452b7', class: "comment-btn" }, h("span", { key: '03b7eb0aff4358aac3020b3d6d52a2d47b308a41' }, this._relatedFeaturesOIDs.length), h("calcite-icon", { key: '5225e156b45a15db0055a28ed21bc3511dedc706', icon: "speech-bubble", scale: 's' })), this._likeFieldAvailable &&
|
137
|
+
h("calcite-button", { key: '1a291524d46c6f826813c87f781e7d6bcf5bc097', appearance: "transparent", iconEnd: "thumbs-up", kind: this._isLikeBtnClicked ? "brand" : "neutral", loading: this._updating, onClick: this.onLikeButtonClick.bind(this), scale: 'm' }, (_c = (_b = this._likeCount) !== null && _b !== void 0 ? _b : this._selectedGraphic.attributes[this._likeField]) !== null && _c !== void 0 ? _c : 0), this._dislikeFieldAvailable &&
|
138
|
+
h("calcite-button", { key: 'da6bee2189565c1eb70564b340e742494bac35c9', appearance: "transparent", iconEnd: "thumbs-down", kind: this._isDislikeBtnClicked ? "brand" : "neutral", loading: this._updating, onClick: this.onDislikeButtonClick.bind(this), scale: 'm' }, (_e = (_d = this._disLikeCount) !== null && _d !== void 0 ? _d : this._selectedGraphic.attributes[this._dislikeField]) !== null && _e !== void 0 ? _e : 0)), this.relatedTableId && this._commentsAvailable &&
|
139
|
+
h("feature-list", { key: 'fd6faa9f3404a2dfadb102ca7c578ffb47207729', class: "height-full", mapView: this.mapView, onFeatureSelect: (e) => { this.commentSelect.emit(e.detail); }, pageSize: 5, ref: el => this._commentsList = el, selectedLayerId: this.relatedTableId, showErrorWhenNoFeatures: false, showInitialLoading: false, textSize: "small", whereClause: commentsListWhereClause })));
|
137
140
|
}
|
138
141
|
/**
|
139
142
|
* Load esri javascript api modules
|
@@ -170,7 +173,8 @@ const FeatureDetails = /*@__PURE__*/ proxyCustomElement(class FeatureDetails ext
|
|
170
173
|
async processComments() {
|
171
174
|
var _a;
|
172
175
|
const selectedLayer = this._selectedGraphic.layer;
|
173
|
-
const commentsConfigured = this.reportingOptions[selectedLayer.id]
|
176
|
+
const commentsConfigured = this.reportingOptions && this.reportingOptions[selectedLayer.id] &&
|
177
|
+
this.reportingOptions[selectedLayer.id].comment && ((_a = selectedLayer.relationships) === null || _a === void 0 ? void 0 : _a.length) > 0;
|
174
178
|
if (commentsConfigured) {
|
175
179
|
//Get comments table id from map
|
176
180
|
const relatedTableIdFromRelnship = selectedLayer.relationships[0].relatedTableId;
|
@@ -235,7 +239,7 @@ const FeatureDetails = /*@__PURE__*/ proxyCustomElement(class FeatureDetails ext
|
|
235
239
|
}
|
236
240
|
//Check if selected layer have the configured like and dislike field and it is of integer types
|
237
241
|
selectedLayer.fields.forEach((eachField) => {
|
238
|
-
if (this._validFieldTypes.indexOf(eachField.type) > -1) {
|
242
|
+
if (this._validFieldTypes.indexOf(eachField.type) > -1 && this.layerItemsHash[selectedLayer.id].supportsUpdate) {
|
239
243
|
if (eachField.name === likeField && this.reportingOptions[selectedLayer.id].like) {
|
240
244
|
likeFieldAvailable = true;
|
241
245
|
}
|
@@ -270,12 +274,12 @@ const FeatureDetails = /*@__PURE__*/ proxyCustomElement(class FeatureDetails ext
|
|
270
274
|
//Check if selected layer have the configured like and dislike fields
|
271
275
|
//also, get the current value for like and dislike field from the attributes
|
272
276
|
selectedLayer.fields.forEach((eachField) => {
|
273
|
-
if (this._validFieldTypes.indexOf(eachField.type) > -1) {
|
274
|
-
if (eachField.name === this._likeField && this.reportingOptions[
|
277
|
+
if (this._validFieldTypes.indexOf(eachField.type) > -1 && this.layerItemsHash[selectedLayer.id].supportsUpdate) {
|
278
|
+
if (eachField.name === this._likeField && this.reportingOptions[selectedLayer.id].like) {
|
275
279
|
this._likeFieldAvailable = true;
|
276
280
|
this._likeCount = this._selectedGraphic.attributes[eachField.name];
|
277
281
|
}
|
278
|
-
else if (eachField.name === this._dislikeField && this.reportingOptions[
|
282
|
+
else if (eachField.name === this._dislikeField && this.reportingOptions[selectedLayer.id].dislike) {
|
279
283
|
this._dislikeFieldAvailable = true;
|
280
284
|
this._disLikeCount = this._selectedGraphic.attributes[eachField.name];
|
281
285
|
}
|
@@ -289,7 +293,6 @@ const FeatureDetails = /*@__PURE__*/ proxyCustomElement(class FeatureDetails ext
|
|
289
293
|
* @protected
|
290
294
|
*/
|
291
295
|
onLikeButtonClick() {
|
292
|
-
this.loadingStatus.emit(true);
|
293
296
|
if (this._isDislikeBtnClicked && this.reportingOptions[this._selectedGraphic.layer.id].dislike) {
|
294
297
|
this.onDislikeButtonClick();
|
295
298
|
}
|
@@ -307,7 +310,6 @@ const FeatureDetails = /*@__PURE__*/ proxyCustomElement(class FeatureDetails ext
|
|
307
310
|
* @protected
|
308
311
|
*/
|
309
312
|
onDislikeButtonClick() {
|
310
|
-
this.loadingStatus.emit(true);
|
311
313
|
if (this._isLikeBtnClicked && this.reportingOptions[this._selectedGraphic.layer.id].like) {
|
312
314
|
this.onLikeButtonClick();
|
313
315
|
}
|
@@ -329,6 +331,7 @@ const FeatureDetails = /*@__PURE__*/ proxyCustomElement(class FeatureDetails ext
|
|
329
331
|
async updateFeaturesLikeDislikeField(fieldName, buttonClicked) {
|
330
332
|
const attributesToUpdate = {};
|
331
333
|
const selectedLayer = this._selectedGraphic.layer;
|
334
|
+
this._updating = true;
|
332
335
|
//Increment the value if button is clicked or else decrement it
|
333
336
|
const selectFeatureAttr = this._selectedGraphic;
|
334
337
|
if (buttonClicked) {
|
@@ -352,9 +355,9 @@ const FeatureDetails = /*@__PURE__*/ proxyCustomElement(class FeatureDetails ext
|
|
352
355
|
}
|
353
356
|
//store the like dislike value for the current selected graphic in local storage
|
354
357
|
this.setInLocalStorage();
|
355
|
-
this.
|
358
|
+
this._updating = false;
|
356
359
|
}, (err) => {
|
357
|
-
this.
|
360
|
+
this._updating = false;
|
358
361
|
console.log(err);
|
359
362
|
});
|
360
363
|
}
|
@@ -410,6 +413,7 @@ const FeatureDetails = /*@__PURE__*/ proxyCustomElement(class FeatureDetails ext
|
|
410
413
|
"mapView": [16],
|
411
414
|
"graphics": [16],
|
412
415
|
"reportingOptions": [16],
|
416
|
+
"layerItemsHash": [16],
|
413
417
|
"_likeFieldAvailable": [32],
|
414
418
|
"_likeCount": [32],
|
415
419
|
"_disLikeCount": [32],
|
@@ -418,6 +422,7 @@ const FeatureDetails = /*@__PURE__*/ proxyCustomElement(class FeatureDetails ext
|
|
418
422
|
"_isLikeBtnClicked": [32],
|
419
423
|
"_isDislikeBtnClicked": [32],
|
420
424
|
"_relatedFeaturesOIDs": [32],
|
425
|
+
"_updating": [32],
|
421
426
|
"refresh": [64],
|
422
427
|
"back": [64],
|
423
428
|
"next": [64],
|
@@ -25,7 +25,7 @@ import { d as defineCustomElement$3 } from './progress.js';
|
|
25
25
|
import { d as defineCustomElement$2 } from './scrim.js';
|
26
26
|
import { d as defineCustomElement$1 } from './stack.js';
|
27
27
|
|
28
|
-
const featureListCss = ":host{display:block}.width-full{width:100%}.pagination{display:flex;justify-content:center}.error-msg{padding:10px;width:calc(100% - 20px)}.feature-list-popup-title{font-weight:500;padding:10px 12px}.feature-list-popup-title-small{font-size:small;padding:10px 12px}";
|
28
|
+
const featureListCss = ":host{display:block}.width-full{width:100%}.pagination{display:flex;justify-content:center}.error-msg{padding:10px;width:calc(100% - 20px)}.feature-list-popup-title{font-weight:500;padding:10px 12px;white-space:pre-line}.feature-list-popup-title-small{font-size:small;padding:10px 12px;white-space:pre-line}";
|
29
29
|
const FeatureListStyle0 = featureListCss;
|
30
30
|
|
31
31
|
const FeatureList = /*@__PURE__*/ proxyCustomElement(class FeatureList extends HTMLElement {
|
@@ -43,6 +43,7 @@ const FeatureList = /*@__PURE__*/ proxyCustomElement(class FeatureList extends H
|
|
43
43
|
this.whereClause = undefined;
|
44
44
|
this.textSize = "large";
|
45
45
|
this.showInitialLoading = true;
|
46
|
+
this.showErrorWhenNoFeatures = true;
|
46
47
|
this._featureItems = [];
|
47
48
|
this._featuresCount = 0;
|
48
49
|
this._isLoading = false;
|
@@ -110,9 +111,9 @@ const FeatureList = /*@__PURE__*/ proxyCustomElement(class FeatureList extends H
|
|
110
111
|
* Renders the component.
|
111
112
|
*/
|
112
113
|
render() {
|
113
|
-
return (h("calcite-panel", { key: '
|
114
|
-
h("calcite-notice", { key: '
|
115
|
-
h("div", { key: '
|
114
|
+
return (h("calcite-panel", { key: '6184d07592669fd8884996475b7eeb26e0604790', "full-height": true, "full-width": true }, this._isLoading && h("calcite-loader", { key: '282127215213a28b9cfdf484aaf5730145b6bb55', label: "", scale: "m" }), this.showErrorWhenNoFeatures && this._featureItems.length === 0 && !this._isLoading &&
|
115
|
+
h("calcite-notice", { key: '25fcfeb1d19a089b092050515c3d69401bc17dc8', class: "error-msg", icon: "feature-details", kind: "info", open: true }, h("div", { key: '2ac81a338df9d0e0f43c659a24be0c9b7b95d027', slot: "message" }, this.noFeaturesFoundMsg ? this.noFeaturesFoundMsg : this._translations.featureErrorMsg)), h("calcite-list", { key: '70453e8ded4f859076a5f00d8f04152cd78278d8', "selection-appearance": "border", "selection-mode": "none" }, !this._isLoading && this._featureItems.length > 0 && this._featureItems), this._featuresCount > this.pageSize &&
|
116
|
+
h("div", { key: 'db1003ace54cd599acefad04e94fe54248327126', class: "width-full", slot: "footer" }, h("calcite-pagination", { key: '67764a051381b0e7ef26dbd16dc9226d7e152c20', class: "pagination", "full-width": true, onCalcitePaginationChange: this.pageChanged.bind(this), "page-size": this.pageSize, ref: el => this._pagination = el, "start-item": "1", "total-items": this._featuresCount }))));
|
116
117
|
}
|
117
118
|
//--------------------------------------------------------------------------
|
118
119
|
//
|
@@ -317,6 +318,7 @@ const FeatureList = /*@__PURE__*/ proxyCustomElement(class FeatureList extends H
|
|
317
318
|
"whereClause": [1, "where-clause"],
|
318
319
|
"textSize": [1, "text-size"],
|
319
320
|
"showInitialLoading": [4, "show-initial-loading"],
|
321
|
+
"showErrorWhenNoFeatures": [4, "show-error-when-no-features"],
|
320
322
|
"_featureItems": [32],
|
321
323
|
"_featuresCount": [32],
|
322
324
|
"_isLoading": [32],
|
@@ -157,7 +157,8 @@ async function handleFilter(data, info, infoIndex, filterMode, parentLegendEleme
|
|
157
157
|
const [FeatureFilter, FeatureEffect] = await loadModules(['esri/layers/support/FeatureFilter', 'esri/layers/support/FeatureEffect']);
|
158
158
|
const { queryExpressions, fLayerView } = data;
|
159
159
|
generateQueryExpressions(data, info, infoIndex, parentLegendElementInfo);
|
160
|
-
const
|
160
|
+
const sep = queryExpressions.every(expression => expression && expression.includes('<>')) ? ' AND ' : ' OR ';
|
161
|
+
const where = queryExpressions.join(sep);
|
161
162
|
const timeExtent = (_b = (_a = fLayerView === null || fLayerView === void 0 ? void 0 : fLayerView.filter) === null || _a === void 0 ? void 0 : _a.timeExtent) !== null && _b !== void 0 ? _b : null;
|
162
163
|
const { type } = filterMode;
|
163
164
|
if (type === 'filter') {
|
@@ -800,4 +801,4 @@ function getExistingFilter(fLayerView) {
|
|
800
801
|
return (fLayerView === null || fLayerView === void 0 ? void 0 : fLayerView.filter) || ((_a = fLayerView === null || fLayerView === void 0 ? void 0 : fLayerView.featureEffect) === null || _a === void 0 ? void 0 : _a.filter);
|
801
802
|
}
|
802
803
|
|
803
|
-
export {
|
804
|
+
export { getParentLegendElementInfoData as a, getCategoryData as b, checkNoneSelected as c, handleFeatureCount as d, generateData as e, createInteractiveLegendDataForLayer as f, getTheme as g, handleFilterChange as h, handleFilter as i, getIntLegendLayerData as j, getCategoriesArray as k, checkNestedUniqueSymbol as l, calculateTotalFeatureCountForNestedSymbols as m, checkRelationshipRamp as n, calculateTotalCount as o, getNestedInfoData as p, checkNestedUniqueSymbolLegendElement as q, showAll as r, showAllNestedUniqueSymbol as s, updateStore as u, validateInteractivity as v, zoomTo as z };
|
@@ -120,7 +120,7 @@ const InstantAppsCkeditorWrapper = /*@__PURE__*/ proxyCustomElement(class Instan
|
|
120
120
|
static get style() { return InstantAppsCkeditorWrapperStyle0; }
|
121
121
|
}, [0, "instant-apps-ckeditor-wrapper", {
|
122
122
|
"value": [1025],
|
123
|
-
"editorInstance": [
|
123
|
+
"editorInstance": [1032, "editor-instance"],
|
124
124
|
"config": [16]
|
125
125
|
}, undefined, {
|
126
126
|
"value": ["updateValue"]
|