@esri/solutions-components 0.8.16 → 0.8.18
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/cjs/calcite-flow_6.cjs.entry.js +8 -7
- package/dist/cjs/crowdsource-manager.cjs.entry.js +2 -1
- package/dist/cjs/crowdsource-reporter.cjs.entry.js +5 -5
- package/dist/cjs/feature-list.cjs.entry.js +5 -3
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/solutions-components.cjs.js +1 -1
- package/dist/collection/components/create-related-feature/create-related-feature.js +17 -1
- package/dist/collection/components/crowdsource-manager/crowdsource-manager.js +19 -1
- package/dist/collection/components/crowdsource-reporter/crowdsource-reporter.css +4 -3
- package/dist/collection/components/crowdsource-reporter/crowdsource-reporter.js +4 -21
- package/dist/collection/components/feature-details/feature-details.js +22 -7
- package/dist/collection/components/feature-list/feature-list.js +5 -3
- package/dist/components/create-related-feature2.js +2 -1
- package/dist/components/crowdsource-manager.js +3 -1
- package/dist/components/crowdsource-reporter.js +5 -6
- package/dist/components/feature-details2.js +6 -6
- package/dist/components/feature-list2.js +5 -3
- package/dist/esm/calcite-flow_6.entry.js +8 -7
- package/dist/esm/crowdsource-manager.entry.js +2 -1
- package/dist/esm/crowdsource-reporter.entry.js +5 -5
- package/dist/esm/feature-list.entry.js +5 -3
- package/dist/esm/loader.js +1 -1
- package/dist/esm/solutions-components.js +1 -1
- package/dist/solutions-components/p-48c99a48.entry.js +6 -0
- package/dist/solutions-components/p-64779bb2.entry.js +6 -0
- package/dist/solutions-components/p-e6abef31.entry.js +6 -0
- package/dist/solutions-components/{p-b6d47bab.entry.js → p-f6668347.entry.js} +3 -3
- package/dist/solutions-components/solutions-components.esm.js +1 -1
- package/dist/types/components/create-related-feature/create-related-feature.d.ts +16 -0
- package/dist/types/components/crowdsource-manager/crowdsource-manager.d.ts +6 -0
- package/dist/types/components/crowdsource-reporter/crowdsource-reporter.d.ts +1 -6
- package/dist/types/components/feature-details/feature-details.d.ts +16 -1
- package/dist/types/components/feature-list/feature-list.d.ts +4 -0
- package/dist/types/components.d.ts +9 -9
- package/package.json +1 -1
- package/dist/solutions-components/p-22aece81.entry.js +0 -6
- package/dist/solutions-components/p-4830649e.entry.js +0 -6
- package/dist/solutions-components/p-92ed8d5d.entry.js +0 -6
@@ -3,6 +3,21 @@
|
|
3
3
|
* Licensed under the Apache License, Version 2.0
|
4
4
|
* http://www.apache.org/licenses/LICENSE-2.0
|
5
5
|
*/
|
6
|
+
/** @license
|
7
|
+
* Copyright 2022 Esri
|
8
|
+
*
|
9
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
10
|
+
* you may not use this file except in compliance with the License.
|
11
|
+
* You may obtain a copy of the License at
|
12
|
+
*
|
13
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
14
|
+
*
|
15
|
+
* Unless required by applicable law or agreed to in writing, software
|
16
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
17
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
18
|
+
* See the License for the specific language governing permissions and
|
19
|
+
* limitations under the License.
|
20
|
+
*/
|
6
21
|
import { Host, h } from "@stencil/core";
|
7
22
|
import { loadModules } from "../../utils/loadModules";
|
8
23
|
export class CreateRelatedFeature {
|
@@ -80,7 +95,7 @@ export class CreateRelatedFeature {
|
|
80
95
|
this.reactiveUtils = reactiveUtils;
|
81
96
|
}
|
82
97
|
render() {
|
83
|
-
return (h(Host, { key: '
|
98
|
+
return (h(Host, { key: '9807b7dcad1f8305756e6098f1e64ef8caffcbac' }));
|
84
99
|
}
|
85
100
|
/**
|
86
101
|
* StencilJS: Called once just after the component is fully loaded and the first render() occurs.
|
@@ -187,6 +202,7 @@ export class CreateRelatedFeature {
|
|
187
202
|
* @param parentRelationship Parent relationship
|
188
203
|
* @param childRelationship Child relationship
|
189
204
|
* @returns Attributes for related feature
|
205
|
+
* @protected
|
190
206
|
*/
|
191
207
|
makeAttributesForRelatedFeature(parentFeature, parentRelationship, childRelationship) {
|
192
208
|
const parentKeyField = parentRelationship.keyField;
|
@@ -46,6 +46,7 @@ export class CrowdsourceManager {
|
|
46
46
|
this._shouldSetMapView = false;
|
47
47
|
this.appProxies = undefined;
|
48
48
|
this.basemapConfig = undefined;
|
49
|
+
this.coverPageEnabled = undefined;
|
49
50
|
this.defaultCenter = "";
|
50
51
|
this.defaultGlobalId = "";
|
51
52
|
this.defaultLayer = "";
|
@@ -186,7 +187,7 @@ export class CrowdsourceManager {
|
|
186
187
|
* Renders the component.
|
187
188
|
*/
|
188
189
|
render() {
|
189
|
-
return (h(Host, { key: '
|
190
|
+
return (h(Host, { key: '686aeccc0f97c1eb8bc1b673d8816663e80fdf71' }, h("calcite-shell", { key: 'f3451483cdbafa8b68a00b71e9927bbff55781b9', class: "position-relative" }, h("calcite-panel", { key: '8256440e1cefa8f25bf1af1f9a1e87650c34462d', class: `width-full height-full border-width-0` }, this._getBody(this._layoutMode, this._panelOpen, this._hideTable)), this._getFooter())));
|
190
191
|
}
|
191
192
|
/**
|
192
193
|
* Called after each render
|
@@ -556,6 +557,23 @@ export class CrowdsourceManager {
|
|
556
557
|
"text": "IBasemapConfig: List of any basemaps to filter out from the basemap widget"
|
557
558
|
}
|
558
559
|
},
|
560
|
+
"coverPageEnabled": {
|
561
|
+
"type": "boolean",
|
562
|
+
"mutable": false,
|
563
|
+
"complexType": {
|
564
|
+
"original": "boolean",
|
565
|
+
"resolved": "boolean",
|
566
|
+
"references": {}
|
567
|
+
},
|
568
|
+
"required": false,
|
569
|
+
"optional": false,
|
570
|
+
"docs": {
|
571
|
+
"tags": [],
|
572
|
+
"text": "boolean: When true a cover page has been enabled in the consuming application.\r\nAlso when true a floating button will be shown in the lower right of the window that\r\nwill emit an event when clicked that the consuming application can respond to that will open the cover page."
|
573
|
+
},
|
574
|
+
"attribute": "cover-page-enabled",
|
575
|
+
"reflect": false
|
576
|
+
},
|
559
577
|
"defaultCenter": {
|
560
578
|
"type": "string",
|
561
579
|
"mutable": false,
|
@@ -62,13 +62,14 @@
|
|
62
62
|
}
|
63
63
|
|
64
64
|
.feature-pagination {
|
65
|
-
|
66
|
-
|
65
|
+
background-color: var(--calcite-color-foreground-1) !important;
|
66
|
+
border-block-end: 1px solid var(--calcite-color-border-3);
|
67
67
|
display: flex;
|
68
|
+
justify-content: center;
|
69
|
+
padding: 5px 0;
|
68
70
|
}
|
69
71
|
|
70
72
|
.pagination-count {
|
71
|
-
width: 32px;
|
72
73
|
color: var(--calcite-color-brand);
|
73
74
|
border-bottom: 1px solid var(--calcite-color-brand);
|
74
75
|
font-weight: bold;
|
@@ -26,7 +26,6 @@ import { queryFeaturesByID } from "../../utils/queryUtils";
|
|
26
26
|
export class CrowdsourceReporter {
|
27
27
|
constructor() {
|
28
28
|
this.center = undefined;
|
29
|
-
this.coverPageEnabled = undefined;
|
30
29
|
this.defaultWebmap = "";
|
31
30
|
this.description = undefined;
|
32
31
|
this.enableAnonymousAccess = undefined;
|
@@ -131,7 +130,7 @@ export class CrowdsourceReporter {
|
|
131
130
|
*/
|
132
131
|
render() {
|
133
132
|
const themeClass = this.theme === "dark" ? "calcite-mode-dark" : "calcite-mode-light";
|
134
|
-
return (h(Host, { key: '
|
133
|
+
return (h(Host, { key: '530bb7e6dacde9109246733345157c95c1a50dcb' }, this._reportSubmitted && h("calcite-alert", { key: '52abbe347eb4adaf526a3194cb4d389326323d19', "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: '3251fcd334b449292d3597af996eb7eea08dd00e', slot: "message" }, this.reportSubmittedMessage ? this.reportSubmittedMessage : this._translations.submitMsg)), this._featureCreationFailedErrorMsg && h("calcite-alert", { key: '0d0553df8133b8d20cc0f2d66a8462334117b5cf', "auto-close": true, class: themeClass, icon: "x-octagon", kind: "danger", label: "", onCalciteAlertClose: () => { this._featureCreationFailedErrorMsg = ""; }, open: true, placement: "top" }, h("div", { key: '81658d0eab5392cbddbcf42ccb0b79b0cebc22dd', slot: "title" }, this._translations.error), h("div", { key: 'e4a00bef08ca9121425fd4f3b8ac7bfffa70d371', slot: "message" }, this._featureCreationFailedErrorMsg)), this._commentSubmitted && h("calcite-alert", { key: '97a200eebe63b3f6fb7515fa07c617d40f94815f', "auto-close": true, class: 'report-submitted ' + themeClass, icon: "check-circle", kind: "success", label: "", onCalciteAlertClose: () => { this._commentSubmitted = false; }, open: true, placement: "top" }, h("div", { key: 'b9b01d82faded409059563840a4bc0ce3ef1faf7', slot: "message" }, this._translations.commentSubmittedMsg)), this._addingCommentFailed && h("calcite-alert", { key: '3754d8a1d5d91ac3bf3b1bddc16f078170e61a80', "auto-close": true, class: themeClass, icon: "x-octagon", kind: "danger", label: "", onCalciteAlertClose: () => { this._addingCommentFailed = false; }, open: true, placement: "top" }, h("div", { key: '977b632702e8dc176bd9a9c930c1492539689576', slot: "title" }, this._translations.error), h("div", { key: '45fa0ba61f3831a743b0cc7ae4aa10854b1a9ff5', slot: "message" }, this._translations.addingCommentFailedMsg)), h("div", { key: '57be499cc8fb87ca20c6efa65fbbe9cc47269906' }, h("calcite-shell", { key: '2ce48b4cdd0dc0dd52995cd7b32f476b14ddd49d', "content-behind": true }, this._getReporter())), this.filterModal()));
|
135
134
|
}
|
136
135
|
//--------------------------------------------------------------------------
|
137
136
|
//
|
@@ -233,6 +232,7 @@ export class CrowdsourceReporter {
|
|
233
232
|
* On sort option click update the sort field and sort order
|
234
233
|
* @param sortField sort field
|
235
234
|
* @param sortOrder sort order
|
235
|
+
* @param sortOption selected sort option (Newest/Oldest/Highest Voted/Lowest Voted)
|
236
236
|
*/
|
237
237
|
async sortOptionClick(sortField, sortOrder, sortOption) {
|
238
238
|
this._updatedSorting = {
|
@@ -559,7 +559,7 @@ export class CrowdsourceReporter {
|
|
559
559
|
*/
|
560
560
|
getFeatureDetailsFlowItem() {
|
561
561
|
const showCommentBtn = this.reportingOptions[this._currentFeature.layer.id].comment && this._currentFeature.layer.relationships.length > 0;
|
562
|
-
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, scale: "m", shareButtonColor: "neutral", shareButtonType: "action", slot: "header-actions-end", socialMedia: true, view: this.mapView }),
|
562
|
+
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, scale: "m", 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, mapView: this.mapView, onFeatureSelect: this.onCommentSelectFromList.bind(this), onLoadingStatus: (evt) => void this.updatingFeatureDetails(evt.detail), ref: el => this._featureDetails = el, reportingOptions: this.reportingOptions }), showCommentBtn &&
|
563
563
|
h("calcite-button", { appearance: "solid", onClick: () => this._flowItems = [...this._flowItems, "add-comment"], slot: "footer", width: "full" }, this._translations.comment))));
|
564
564
|
}
|
565
565
|
/**
|
@@ -568,7 +568,7 @@ export class CrowdsourceReporter {
|
|
568
568
|
* @returns Node
|
569
569
|
*/
|
570
570
|
getFeaturesPagination() {
|
571
|
-
return (h("div", { class: "feature-pagination"
|
571
|
+
return (h("div", { class: "feature-pagination" }, 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', 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)))));
|
572
572
|
}
|
573
573
|
/**
|
574
574
|
* Returns the calcite-flow item for comment details
|
@@ -895,23 +895,6 @@ export class CrowdsourceReporter {
|
|
895
895
|
"attribute": "center",
|
896
896
|
"reflect": false
|
897
897
|
},
|
898
|
-
"coverPageEnabled": {
|
899
|
-
"type": "boolean",
|
900
|
-
"mutable": false,
|
901
|
-
"complexType": {
|
902
|
-
"original": "boolean",
|
903
|
-
"resolved": "boolean",
|
904
|
-
"references": {}
|
905
|
-
},
|
906
|
-
"required": false,
|
907
|
-
"optional": false,
|
908
|
-
"docs": {
|
909
|
-
"tags": [],
|
910
|
-
"text": "boolean: When true a cover page has been enabled in the consuming application.\r\nAlso when true a floating button will be shown in the lower right of the window that\r\nwill emit an event when clicked that the consuming application can respond to that will open the cover page."
|
911
|
-
},
|
912
|
-
"attribute": "cover-page-enabled",
|
913
|
-
"reflect": false
|
914
|
-
},
|
915
898
|
"defaultWebmap": {
|
916
899
|
"type": "string",
|
917
900
|
"mutable": false,
|
@@ -3,6 +3,21 @@
|
|
3
3
|
* Licensed under the Apache License, Version 2.0
|
4
4
|
* http://www.apache.org/licenses/LICENSE-2.0
|
5
5
|
*/
|
6
|
+
/** @license
|
7
|
+
* Copyright 2022 Esri
|
8
|
+
*
|
9
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
10
|
+
* you may not use this file except in compliance with the License.
|
11
|
+
* You may obtain a copy of the License at
|
12
|
+
*
|
13
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
14
|
+
*
|
15
|
+
* Unless required by applicable law or agreed to in writing, software
|
16
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
17
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
18
|
+
* See the License for the specific language governing permissions and
|
19
|
+
* limitations under the License.
|
20
|
+
*/
|
6
21
|
import { h } from "@stencil/core";
|
7
22
|
import { loadModules } from "../../utils/loadModules";
|
8
23
|
import { getAllTables } from "../../utils/mapViewUtils";
|
@@ -94,12 +109,12 @@ export class FeatureDetails {
|
|
94
109
|
var _a, _b, _c, _d, _e;
|
95
110
|
//When related features found show comments list of only those features else comments list will be empty
|
96
111
|
const commentsListWhereClause = ((_a = this._relatedFeaturesOIDs) === null || _a === void 0 ? void 0 : _a.length) > 0 ? `objectId in(${this._relatedFeaturesOIDs})` : '1=0';
|
97
|
-
return (h("calcite-panel", { key: '
|
98
|
-
h("div", { key: '
|
99
|
-
h("div", { key: '
|
100
|
-
h("calcite-button", { key: '
|
101
|
-
h("calcite-button", { key: '
|
102
|
-
h("feature-list", { key: '
|
112
|
+
return (h("calcite-panel", { key: 'b8d1cc9d4d9040665be3c892f5738a179ab64eaf', "full-height": true }, h("info-card", { key: '0a31a068a4e80e34ba2435a7d8d8faaea271dac8', allowEditing: false, graphics: this.graphics, highlightEnabled: false, isLoading: false, isMobile: false, mapView: this.mapView, paginationEnabled: false, position: "relative", ref: el => this._infoCard = el, zoomAndScrollToSelected: true }), (this._likeFieldAvailable || this._dislikeFieldAvailable || this._commentsAvailable) &&
|
113
|
+
h("div", { key: '8e27d13341a9b4ad37f87778e046a4e8e0b2778e', class: "buttons-container" }, this._commentsAvailable &&
|
114
|
+
h("div", { key: '3dd02fdbc107e7ce04e8aabb96a6748b68eeec6b', class: "comment-btn" }, h("span", { key: '5601fdb24ff385e0b6d2b9e5b86bde06b3c2d1b8' }, this._relatedFeaturesOIDs.length), h("calcite-icon", { key: '97a517d117a4d5a8c6798da9c9c82e46c39c25f8', icon: "speech-bubble", scale: 's' })), this._likeFieldAvailable &&
|
115
|
+
h("calcite-button", { key: '0d1ff14be9396ab3ff634e92208792f5fd3b8d36', appearance: "transparent", iconEnd: "thumbs-up", kind: this._isLikeBtnClicked ? "brand" : "neutral", onClick: this.onLikeButtonClick.bind(this), scale: 's' }, (_c = (_b = this._likeCount) !== null && _b !== void 0 ? _b : this._selectedGraphic.attributes[this._likeField]) !== null && _c !== void 0 ? _c : 0), this._dislikeFieldAvailable &&
|
116
|
+
h("calcite-button", { key: '34e362e083dbc13dffae7ad5544aa33a0421a51a', appearance: "transparent", iconEnd: "thumbs-down", kind: this._isDislikeBtnClicked ? "brand" : "neutral", onClick: this.onDislikeButtonClick.bind(this), scale: 's' }, (_e = (_d = this._disLikeCount) !== null && _d !== void 0 ? _d : this._selectedGraphic.attributes[this._dislikeField]) !== null && _e !== void 0 ? _e : 0)), this.relatedTableId && this._commentsAvailable &&
|
117
|
+
h("feature-list", { key: '4abc53ab7679b07f0dd7413b97f447da736e5002', class: "height-full", mapView: this.mapView, pageSize: 5, ref: el => this._commentsList = el, selectedLayerId: this.relatedTableId, showInitialLoading: false, textSize: "small", whereClause: commentsListWhereClause })));
|
103
118
|
}
|
104
119
|
/**
|
105
120
|
* Load esri javascript api modules
|
@@ -479,7 +494,7 @@ export class FeatureDetails {
|
|
479
494
|
"composed": true,
|
480
495
|
"docs": {
|
481
496
|
"tags": [],
|
482
|
-
"text": "Emitted on demand when
|
497
|
+
"text": "Emitted on demand when comment is selected using the feature-list"
|
483
498
|
},
|
484
499
|
"complexType": {
|
485
500
|
"original": "__esri.Graphic",
|
@@ -102,9 +102,9 @@ export class FeatureList {
|
|
102
102
|
* Renders the component.
|
103
103
|
*/
|
104
104
|
render() {
|
105
|
-
return (h("calcite-panel", { key: '
|
106
|
-
h("calcite-notice", { key: '
|
107
|
-
h("div", { key: '
|
105
|
+
return (h("calcite-panel", { key: '9f702c6d98cc19704e0773e36fd969817ea7262e', "full-height": true, "full-width": true }, this._isLoading && h("calcite-loader", { key: 'e9acf13f3444057b097d6b145c1a6e0118f150ea', label: "", scale: "m" }), this._featureItems.length === 0 && !this._isLoading &&
|
106
|
+
h("calcite-notice", { key: '8c7fa89e2da7490b04456e51f8534c2515a02399', class: "error-msg", icon: "feature-details", kind: "info", open: true }, h("div", { key: '799d419e9c26b7928f15cb1cf9afa9f47cab0e94', slot: "message" }, this.noFeaturesFoundMsg ? this.noFeaturesFoundMsg : this._translations.featureErrorMsg)), h("calcite-list", { key: '82c60b16ab586ad57f8f98bb08814f688102b166', "selection-appearance": "border", "selection-mode": "none" }, !this._isLoading && this._featureItems.length > 0 && this._featureItems), this._featuresCount > this.pageSize &&
|
107
|
+
h("div", { key: 'e5b789ea46c6bedfbe83f1323ffb89271c0b76ce', class: "width-full", slot: "footer" }, h("calcite-pagination", { key: '4d30b5364fc4742f278157c5f2c21e75d4ecb0b8', 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 }))));
|
108
108
|
}
|
109
109
|
//--------------------------------------------------------------------------
|
110
110
|
//
|
@@ -145,7 +145,9 @@ export class FeatureList {
|
|
145
145
|
* @protected
|
146
146
|
*/
|
147
147
|
async initializeFeatureItems() {
|
148
|
+
var _a;
|
148
149
|
if (this._selectedLayer) {
|
150
|
+
void ((_a = this._pagination) === null || _a === void 0 ? void 0 : _a.goTo("start"));
|
149
151
|
this._isLoading = this.showInitialLoading;
|
150
152
|
this._featureItems = await this.queryPage(0);
|
151
153
|
const query = {
|
@@ -89,7 +89,7 @@ const CreateRelatedFeature = /*@__PURE__*/ proxyCustomElement(class CreateRelate
|
|
89
89
|
this.reactiveUtils = reactiveUtils;
|
90
90
|
}
|
91
91
|
render() {
|
92
|
-
return (h(Host, { key: '
|
92
|
+
return (h(Host, { key: '9807b7dcad1f8305756e6098f1e64ef8caffcbac' }));
|
93
93
|
}
|
94
94
|
/**
|
95
95
|
* StencilJS: Called once just after the component is fully loaded and the first render() occurs.
|
@@ -196,6 +196,7 @@ const CreateRelatedFeature = /*@__PURE__*/ proxyCustomElement(class CreateRelate
|
|
196
196
|
* @param parentRelationship Parent relationship
|
197
197
|
* @param childRelationship Child relationship
|
198
198
|
* @returns Attributes for related feature
|
199
|
+
* @protected
|
199
200
|
*/
|
200
201
|
makeAttributesForRelatedFeature(parentFeature, parentRelationship, childRelationship) {
|
201
202
|
const parentKeyField = parentRelationship.keyField;
|
@@ -95,6 +95,7 @@ const CrowdsourceManager$1 = /*@__PURE__*/ proxyCustomElement(class CrowdsourceM
|
|
95
95
|
this._shouldSetMapView = false;
|
96
96
|
this.appProxies = undefined;
|
97
97
|
this.basemapConfig = undefined;
|
98
|
+
this.coverPageEnabled = undefined;
|
98
99
|
this.defaultCenter = "";
|
99
100
|
this.defaultGlobalId = "";
|
100
101
|
this.defaultLayer = "";
|
@@ -235,7 +236,7 @@ const CrowdsourceManager$1 = /*@__PURE__*/ proxyCustomElement(class CrowdsourceM
|
|
235
236
|
* Renders the component.
|
236
237
|
*/
|
237
238
|
render() {
|
238
|
-
return (h(Host, { key: '
|
239
|
+
return (h(Host, { key: '686aeccc0f97c1eb8bc1b673d8816663e80fdf71' }, h("calcite-shell", { key: 'f3451483cdbafa8b68a00b71e9927bbff55781b9', class: "position-relative" }, h("calcite-panel", { key: '8256440e1cefa8f25bf1af1f9a1e87650c34462d', class: `width-full height-full border-width-0` }, this._getBody(this._layoutMode, this._panelOpen, this._hideTable)), this._getFooter())));
|
239
240
|
}
|
240
241
|
/**
|
241
242
|
* Called after each render
|
@@ -562,6 +563,7 @@ const CrowdsourceManager$1 = /*@__PURE__*/ proxyCustomElement(class CrowdsourceM
|
|
562
563
|
}, [0, "crowdsource-manager", {
|
563
564
|
"appProxies": [8, "app-proxies"],
|
564
565
|
"basemapConfig": [16],
|
566
|
+
"coverPageEnabled": [4, "cover-page-enabled"],
|
565
567
|
"defaultCenter": [1, "default-center"],
|
566
568
|
"defaultGlobalId": [1, "default-global-id"],
|
567
569
|
"defaultLayer": [1, "default-layer"],
|
@@ -55,7 +55,7 @@ import { d as defineCustomElement$4 } from './instant-apps-filter-list2.js';
|
|
55
55
|
import { d as defineCustomElement$3 } from './instant-apps-social-share2.js';
|
56
56
|
import { d as defineCustomElement$2 } from './layer-list2.js';
|
57
57
|
|
58
|
-
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{
|
58
|
+
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{background-color:var(--calcite-color-foreground-1) !important;border-block-end:1px solid var(--calcite-color-border-3);display:flex;justify-content:center;padding:5px 0}.pagination-count{color:var(--calcite-color-brand);border-bottom:1px solid var(--calcite-color-brand);font-weight:bold}.report-submitted-msg{position:absolute;z-index:1000}";
|
59
59
|
const CrowdsourceReporterStyle0 = crowdsourceReporterCss;
|
60
60
|
|
61
61
|
const CrowdsourceReporter$1 = /*@__PURE__*/ proxyCustomElement(class CrowdsourceReporter extends HTMLElement {
|
@@ -64,7 +64,6 @@ const CrowdsourceReporter$1 = /*@__PURE__*/ proxyCustomElement(class Crowdsource
|
|
64
64
|
this.__registerHost();
|
65
65
|
this.togglePanel = createEvent(this, "togglePanel", 7);
|
66
66
|
this.center = undefined;
|
67
|
-
this.coverPageEnabled = undefined;
|
68
67
|
this.defaultWebmap = "";
|
69
68
|
this.description = undefined;
|
70
69
|
this.enableAnonymousAccess = undefined;
|
@@ -169,7 +168,7 @@ const CrowdsourceReporter$1 = /*@__PURE__*/ proxyCustomElement(class Crowdsource
|
|
169
168
|
*/
|
170
169
|
render() {
|
171
170
|
const themeClass = this.theme === "dark" ? "calcite-mode-dark" : "calcite-mode-light";
|
172
|
-
return (h(Host, { key: '
|
171
|
+
return (h(Host, { key: '530bb7e6dacde9109246733345157c95c1a50dcb' }, this._reportSubmitted && h("calcite-alert", { key: '52abbe347eb4adaf526a3194cb4d389326323d19', "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: '3251fcd334b449292d3597af996eb7eea08dd00e', slot: "message" }, this.reportSubmittedMessage ? this.reportSubmittedMessage : this._translations.submitMsg)), this._featureCreationFailedErrorMsg && h("calcite-alert", { key: '0d0553df8133b8d20cc0f2d66a8462334117b5cf', "auto-close": true, class: themeClass, icon: "x-octagon", kind: "danger", label: "", onCalciteAlertClose: () => { this._featureCreationFailedErrorMsg = ""; }, open: true, placement: "top" }, h("div", { key: '81658d0eab5392cbddbcf42ccb0b79b0cebc22dd', slot: "title" }, this._translations.error), h("div", { key: 'e4a00bef08ca9121425fd4f3b8ac7bfffa70d371', slot: "message" }, this._featureCreationFailedErrorMsg)), this._commentSubmitted && h("calcite-alert", { key: '97a200eebe63b3f6fb7515fa07c617d40f94815f', "auto-close": true, class: 'report-submitted ' + themeClass, icon: "check-circle", kind: "success", label: "", onCalciteAlertClose: () => { this._commentSubmitted = false; }, open: true, placement: "top" }, h("div", { key: 'b9b01d82faded409059563840a4bc0ce3ef1faf7', slot: "message" }, this._translations.commentSubmittedMsg)), this._addingCommentFailed && h("calcite-alert", { key: '3754d8a1d5d91ac3bf3b1bddc16f078170e61a80', "auto-close": true, class: themeClass, icon: "x-octagon", kind: "danger", label: "", onCalciteAlertClose: () => { this._addingCommentFailed = false; }, open: true, placement: "top" }, h("div", { key: '977b632702e8dc176bd9a9c930c1492539689576', slot: "title" }, this._translations.error), h("div", { key: '45fa0ba61f3831a743b0cc7ae4aa10854b1a9ff5', slot: "message" }, this._translations.addingCommentFailedMsg)), h("div", { key: '57be499cc8fb87ca20c6efa65fbbe9cc47269906' }, h("calcite-shell", { key: '2ce48b4cdd0dc0dd52995cd7b32f476b14ddd49d', "content-behind": true }, this._getReporter())), this.filterModal()));
|
173
172
|
}
|
174
173
|
//--------------------------------------------------------------------------
|
175
174
|
//
|
@@ -271,6 +270,7 @@ const CrowdsourceReporter$1 = /*@__PURE__*/ proxyCustomElement(class Crowdsource
|
|
271
270
|
* On sort option click update the sort field and sort order
|
272
271
|
* @param sortField sort field
|
273
272
|
* @param sortOrder sort order
|
273
|
+
* @param sortOption selected sort option (Newest/Oldest/Highest Voted/Lowest Voted)
|
274
274
|
*/
|
275
275
|
async sortOptionClick(sortField, sortOrder, sortOption) {
|
276
276
|
this._updatedSorting = {
|
@@ -597,7 +597,7 @@ const CrowdsourceReporter$1 = /*@__PURE__*/ proxyCustomElement(class Crowdsource
|
|
597
597
|
*/
|
598
598
|
getFeatureDetailsFlowItem() {
|
599
599
|
const showCommentBtn = this.reportingOptions[this._currentFeature.layer.id].comment && this._currentFeature.layer.relationships.length > 0;
|
600
|
-
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, scale: "m", shareButtonColor: "neutral", shareButtonType: "action", slot: "header-actions-end", socialMedia: true, view: this.mapView }),
|
600
|
+
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, scale: "m", 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, mapView: this.mapView, onFeatureSelect: this.onCommentSelectFromList.bind(this), onLoadingStatus: (evt) => void this.updatingFeatureDetails(evt.detail), ref: el => this._featureDetails = el, reportingOptions: this.reportingOptions }), showCommentBtn &&
|
601
601
|
h("calcite-button", { appearance: "solid", onClick: () => this._flowItems = [...this._flowItems, "add-comment"], slot: "footer", width: "full" }, this._translations.comment))));
|
602
602
|
}
|
603
603
|
/**
|
@@ -606,7 +606,7 @@ const CrowdsourceReporter$1 = /*@__PURE__*/ proxyCustomElement(class Crowdsource
|
|
606
606
|
* @returns Node
|
607
607
|
*/
|
608
608
|
getFeaturesPagination() {
|
609
|
-
return (h("div", { class: "feature-pagination"
|
609
|
+
return (h("div", { class: "feature-pagination" }, 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', 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)))));
|
610
610
|
}
|
611
611
|
/**
|
612
612
|
* Returns the calcite-flow item for comment details
|
@@ -911,7 +911,6 @@ const CrowdsourceReporter$1 = /*@__PURE__*/ proxyCustomElement(class Crowdsource
|
|
911
911
|
static get style() { return CrowdsourceReporterStyle0; }
|
912
912
|
}, [0, "crowdsource-reporter", {
|
913
913
|
"center": [1],
|
914
|
-
"coverPageEnabled": [4, "cover-page-enabled"],
|
915
914
|
"defaultWebmap": [1, "default-webmap"],
|
916
915
|
"description": [1],
|
917
916
|
"enableAnonymousAccess": [4, "enable-anonymous-access"],
|
@@ -128,12 +128,12 @@ const FeatureDetails = /*@__PURE__*/ proxyCustomElement(class FeatureDetails ext
|
|
128
128
|
var _a, _b, _c, _d, _e;
|
129
129
|
//When related features found show comments list of only those features else comments list will be empty
|
130
130
|
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: '
|
131
|
+
return (h("calcite-panel", { key: 'b8d1cc9d4d9040665be3c892f5738a179ab64eaf', "full-height": true }, h("info-card", { key: '0a31a068a4e80e34ba2435a7d8d8faaea271dac8', allowEditing: false, graphics: this.graphics, highlightEnabled: false, isLoading: false, isMobile: false, mapView: this.mapView, paginationEnabled: false, position: "relative", ref: el => this._infoCard = el, zoomAndScrollToSelected: true }), (this._likeFieldAvailable || this._dislikeFieldAvailable || this._commentsAvailable) &&
|
132
|
+
h("div", { key: '8e27d13341a9b4ad37f87778e046a4e8e0b2778e', class: "buttons-container" }, this._commentsAvailable &&
|
133
|
+
h("div", { key: '3dd02fdbc107e7ce04e8aabb96a6748b68eeec6b', class: "comment-btn" }, h("span", { key: '5601fdb24ff385e0b6d2b9e5b86bde06b3c2d1b8' }, this._relatedFeaturesOIDs.length), h("calcite-icon", { key: '97a517d117a4d5a8c6798da9c9c82e46c39c25f8', icon: "speech-bubble", scale: 's' })), this._likeFieldAvailable &&
|
134
|
+
h("calcite-button", { key: '0d1ff14be9396ab3ff634e92208792f5fd3b8d36', appearance: "transparent", iconEnd: "thumbs-up", kind: this._isLikeBtnClicked ? "brand" : "neutral", onClick: this.onLikeButtonClick.bind(this), scale: 's' }, (_c = (_b = this._likeCount) !== null && _b !== void 0 ? _b : this._selectedGraphic.attributes[this._likeField]) !== null && _c !== void 0 ? _c : 0), this._dislikeFieldAvailable &&
|
135
|
+
h("calcite-button", { key: '34e362e083dbc13dffae7ad5544aa33a0421a51a', appearance: "transparent", iconEnd: "thumbs-down", kind: this._isDislikeBtnClicked ? "brand" : "neutral", onClick: this.onDislikeButtonClick.bind(this), scale: 's' }, (_e = (_d = this._disLikeCount) !== null && _d !== void 0 ? _d : this._selectedGraphic.attributes[this._dislikeField]) !== null && _e !== void 0 ? _e : 0)), this.relatedTableId && this._commentsAvailable &&
|
136
|
+
h("feature-list", { key: '4abc53ab7679b07f0dd7413b97f447da736e5002', class: "height-full", mapView: this.mapView, pageSize: 5, ref: el => this._commentsList = el, selectedLayerId: this.relatedTableId, showInitialLoading: false, textSize: "small", whereClause: commentsListWhereClause })));
|
137
137
|
}
|
138
138
|
/**
|
139
139
|
* Load esri javascript api modules
|
@@ -110,9 +110,9 @@ const FeatureList = /*@__PURE__*/ proxyCustomElement(class FeatureList extends H
|
|
110
110
|
* Renders the component.
|
111
111
|
*/
|
112
112
|
render() {
|
113
|
-
return (h("calcite-panel", { key: '
|
114
|
-
h("calcite-notice", { key: '
|
115
|
-
h("div", { key: '
|
113
|
+
return (h("calcite-panel", { key: '9f702c6d98cc19704e0773e36fd969817ea7262e', "full-height": true, "full-width": true }, this._isLoading && h("calcite-loader", { key: 'e9acf13f3444057b097d6b145c1a6e0118f150ea', label: "", scale: "m" }), this._featureItems.length === 0 && !this._isLoading &&
|
114
|
+
h("calcite-notice", { key: '8c7fa89e2da7490b04456e51f8534c2515a02399', class: "error-msg", icon: "feature-details", kind: "info", open: true }, h("div", { key: '799d419e9c26b7928f15cb1cf9afa9f47cab0e94', slot: "message" }, this.noFeaturesFoundMsg ? this.noFeaturesFoundMsg : this._translations.featureErrorMsg)), h("calcite-list", { key: '82c60b16ab586ad57f8f98bb08814f688102b166', "selection-appearance": "border", "selection-mode": "none" }, !this._isLoading && this._featureItems.length > 0 && this._featureItems), this._featuresCount > this.pageSize &&
|
115
|
+
h("div", { key: 'e5b789ea46c6bedfbe83f1323ffb89271c0b76ce', class: "width-full", slot: "footer" }, h("calcite-pagination", { key: '4d30b5364fc4742f278157c5f2c21e75d4ecb0b8', 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
116
|
}
|
117
117
|
//--------------------------------------------------------------------------
|
118
118
|
//
|
@@ -153,7 +153,9 @@ const FeatureList = /*@__PURE__*/ proxyCustomElement(class FeatureList extends H
|
|
153
153
|
* @protected
|
154
154
|
*/
|
155
155
|
async initializeFeatureItems() {
|
156
|
+
var _a;
|
156
157
|
if (this._selectedLayer) {
|
158
|
+
void ((_a = this._pagination) === null || _a === void 0 ? void 0 : _a.goTo("start"));
|
157
159
|
this._isLoading = this.showInitialLoading;
|
158
160
|
this._featureItems = await this.queryPage(0);
|
159
161
|
const query = {
|
@@ -770,7 +770,7 @@ const CreateRelatedFeature = class {
|
|
770
770
|
this.reactiveUtils = reactiveUtils;
|
771
771
|
}
|
772
772
|
render() {
|
773
|
-
return (h(Host, { key: '
|
773
|
+
return (h(Host, { key: '9807b7dcad1f8305756e6098f1e64ef8caffcbac' }));
|
774
774
|
}
|
775
775
|
/**
|
776
776
|
* StencilJS: Called once just after the component is fully loaded and the first render() occurs.
|
@@ -877,6 +877,7 @@ const CreateRelatedFeature = class {
|
|
877
877
|
* @param parentRelationship Parent relationship
|
878
878
|
* @param childRelationship Child relationship
|
879
879
|
* @returns Attributes for related feature
|
880
|
+
* @protected
|
880
881
|
*/
|
881
882
|
makeAttributesForRelatedFeature(parentFeature, parentRelationship, childRelationship) {
|
882
883
|
const parentKeyField = parentRelationship.keyField;
|
@@ -1023,12 +1024,12 @@ const FeatureDetails = class {
|
|
1023
1024
|
var _a, _b, _c, _d, _e;
|
1024
1025
|
//When related features found show comments list of only those features else comments list will be empty
|
1025
1026
|
const commentsListWhereClause = ((_a = this._relatedFeaturesOIDs) === null || _a === void 0 ? void 0 : _a.length) > 0 ? `objectId in(${this._relatedFeaturesOIDs})` : '1=0';
|
1026
|
-
return (h("calcite-panel", { key: '
|
1027
|
-
h("div", { key: '
|
1028
|
-
h("div", { key: '
|
1029
|
-
h("calcite-button", { key: '
|
1030
|
-
h("calcite-button", { key: '
|
1031
|
-
h("feature-list", { key: '
|
1027
|
+
return (h("calcite-panel", { key: 'b8d1cc9d4d9040665be3c892f5738a179ab64eaf', "full-height": true }, h("info-card", { key: '0a31a068a4e80e34ba2435a7d8d8faaea271dac8', allowEditing: false, graphics: this.graphics, highlightEnabled: false, isLoading: false, isMobile: false, mapView: this.mapView, paginationEnabled: false, position: "relative", ref: el => this._infoCard = el, zoomAndScrollToSelected: true }), (this._likeFieldAvailable || this._dislikeFieldAvailable || this._commentsAvailable) &&
|
1028
|
+
h("div", { key: '8e27d13341a9b4ad37f87778e046a4e8e0b2778e', class: "buttons-container" }, this._commentsAvailable &&
|
1029
|
+
h("div", { key: '3dd02fdbc107e7ce04e8aabb96a6748b68eeec6b', class: "comment-btn" }, h("span", { key: '5601fdb24ff385e0b6d2b9e5b86bde06b3c2d1b8' }, this._relatedFeaturesOIDs.length), h("calcite-icon", { key: '97a517d117a4d5a8c6798da9c9c82e46c39c25f8', icon: "speech-bubble", scale: 's' })), this._likeFieldAvailable &&
|
1030
|
+
h("calcite-button", { key: '0d1ff14be9396ab3ff634e92208792f5fd3b8d36', appearance: "transparent", iconEnd: "thumbs-up", kind: this._isLikeBtnClicked ? "brand" : "neutral", onClick: this.onLikeButtonClick.bind(this), scale: 's' }, (_c = (_b = this._likeCount) !== null && _b !== void 0 ? _b : this._selectedGraphic.attributes[this._likeField]) !== null && _c !== void 0 ? _c : 0), this._dislikeFieldAvailable &&
|
1031
|
+
h("calcite-button", { key: '34e362e083dbc13dffae7ad5544aa33a0421a51a', appearance: "transparent", iconEnd: "thumbs-down", kind: this._isDislikeBtnClicked ? "brand" : "neutral", onClick: this.onDislikeButtonClick.bind(this), scale: 's' }, (_e = (_d = this._disLikeCount) !== null && _d !== void 0 ? _d : this._selectedGraphic.attributes[this._dislikeField]) !== null && _e !== void 0 ? _e : 0)), this.relatedTableId && this._commentsAvailable &&
|
1032
|
+
h("feature-list", { key: '4abc53ab7679b07f0dd7413b97f447da736e5002', class: "height-full", mapView: this.mapView, pageSize: 5, ref: el => this._commentsList = el, selectedLayerId: this.relatedTableId, showInitialLoading: false, textSize: "small", whereClause: commentsListWhereClause })));
|
1032
1033
|
}
|
1033
1034
|
/**
|
1034
1035
|
* Load esri javascript api modules
|
@@ -38,6 +38,7 @@ const CrowdsourceManager = class {
|
|
38
38
|
this._shouldSetMapView = false;
|
39
39
|
this.appProxies = undefined;
|
40
40
|
this.basemapConfig = undefined;
|
41
|
+
this.coverPageEnabled = undefined;
|
41
42
|
this.defaultCenter = "";
|
42
43
|
this.defaultGlobalId = "";
|
43
44
|
this.defaultLayer = "";
|
@@ -178,7 +179,7 @@ const CrowdsourceManager = class {
|
|
178
179
|
* Renders the component.
|
179
180
|
*/
|
180
181
|
render() {
|
181
|
-
return (h(Host, { key: '
|
182
|
+
return (h(Host, { key: '686aeccc0f97c1eb8bc1b673d8816663e80fdf71' }, h("calcite-shell", { key: 'f3451483cdbafa8b68a00b71e9927bbff55781b9', class: "position-relative" }, h("calcite-panel", { key: '8256440e1cefa8f25bf1af1f9a1e87650c34462d', class: `width-full height-full border-width-0` }, this._getBody(this._layoutMode, this._panelOpen, this._hideTable)), this._getFooter())));
|
182
183
|
}
|
183
184
|
/**
|
184
185
|
* Called after each render
|
@@ -9,7 +9,7 @@ import { g as getLayerOrTable, a as getAllLayers, b as getAllTables, c as getFea
|
|
9
9
|
import './esri-loader-2bf735ed.js';
|
10
10
|
import './interfaces-586e863c.js';
|
11
11
|
|
12
|
-
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{
|
12
|
+
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{background-color:var(--calcite-color-foreground-1) !important;border-block-end:1px solid var(--calcite-color-border-3);display:flex;justify-content:center;padding:5px 0}.pagination-count{color:var(--calcite-color-brand);border-bottom:1px solid var(--calcite-color-brand);font-weight:bold}.report-submitted-msg{position:absolute;z-index:1000}";
|
13
13
|
const CrowdsourceReporterStyle0 = crowdsourceReporterCss;
|
14
14
|
|
15
15
|
const CrowdsourceReporter = class {
|
@@ -17,7 +17,6 @@ const CrowdsourceReporter = class {
|
|
17
17
|
registerInstance(this, hostRef);
|
18
18
|
this.togglePanel = createEvent(this, "togglePanel", 7);
|
19
19
|
this.center = undefined;
|
20
|
-
this.coverPageEnabled = undefined;
|
21
20
|
this.defaultWebmap = "";
|
22
21
|
this.description = undefined;
|
23
22
|
this.enableAnonymousAccess = undefined;
|
@@ -122,7 +121,7 @@ const CrowdsourceReporter = class {
|
|
122
121
|
*/
|
123
122
|
render() {
|
124
123
|
const themeClass = this.theme === "dark" ? "calcite-mode-dark" : "calcite-mode-light";
|
125
|
-
return (h(Host, { key: '
|
124
|
+
return (h(Host, { key: '530bb7e6dacde9109246733345157c95c1a50dcb' }, this._reportSubmitted && h("calcite-alert", { key: '52abbe347eb4adaf526a3194cb4d389326323d19', "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: '3251fcd334b449292d3597af996eb7eea08dd00e', slot: "message" }, this.reportSubmittedMessage ? this.reportSubmittedMessage : this._translations.submitMsg)), this._featureCreationFailedErrorMsg && h("calcite-alert", { key: '0d0553df8133b8d20cc0f2d66a8462334117b5cf', "auto-close": true, class: themeClass, icon: "x-octagon", kind: "danger", label: "", onCalciteAlertClose: () => { this._featureCreationFailedErrorMsg = ""; }, open: true, placement: "top" }, h("div", { key: '81658d0eab5392cbddbcf42ccb0b79b0cebc22dd', slot: "title" }, this._translations.error), h("div", { key: 'e4a00bef08ca9121425fd4f3b8ac7bfffa70d371', slot: "message" }, this._featureCreationFailedErrorMsg)), this._commentSubmitted && h("calcite-alert", { key: '97a200eebe63b3f6fb7515fa07c617d40f94815f', "auto-close": true, class: 'report-submitted ' + themeClass, icon: "check-circle", kind: "success", label: "", onCalciteAlertClose: () => { this._commentSubmitted = false; }, open: true, placement: "top" }, h("div", { key: 'b9b01d82faded409059563840a4bc0ce3ef1faf7', slot: "message" }, this._translations.commentSubmittedMsg)), this._addingCommentFailed && h("calcite-alert", { key: '3754d8a1d5d91ac3bf3b1bddc16f078170e61a80', "auto-close": true, class: themeClass, icon: "x-octagon", kind: "danger", label: "", onCalciteAlertClose: () => { this._addingCommentFailed = false; }, open: true, placement: "top" }, h("div", { key: '977b632702e8dc176bd9a9c930c1492539689576', slot: "title" }, this._translations.error), h("div", { key: '45fa0ba61f3831a743b0cc7ae4aa10854b1a9ff5', slot: "message" }, this._translations.addingCommentFailedMsg)), h("div", { key: '57be499cc8fb87ca20c6efa65fbbe9cc47269906' }, h("calcite-shell", { key: '2ce48b4cdd0dc0dd52995cd7b32f476b14ddd49d', "content-behind": true }, this._getReporter())), this.filterModal()));
|
126
125
|
}
|
127
126
|
//--------------------------------------------------------------------------
|
128
127
|
//
|
@@ -224,6 +223,7 @@ const CrowdsourceReporter = class {
|
|
224
223
|
* On sort option click update the sort field and sort order
|
225
224
|
* @param sortField sort field
|
226
225
|
* @param sortOrder sort order
|
226
|
+
* @param sortOption selected sort option (Newest/Oldest/Highest Voted/Lowest Voted)
|
227
227
|
*/
|
228
228
|
async sortOptionClick(sortField, sortOrder, sortOption) {
|
229
229
|
this._updatedSorting = {
|
@@ -550,7 +550,7 @@ const CrowdsourceReporter = class {
|
|
550
550
|
*/
|
551
551
|
getFeatureDetailsFlowItem() {
|
552
552
|
const showCommentBtn = this.reportingOptions[this._currentFeature.layer.id].comment && this._currentFeature.layer.relationships.length > 0;
|
553
|
-
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, scale: "m", shareButtonColor: "neutral", shareButtonType: "action", slot: "header-actions-end", socialMedia: true, view: this.mapView }),
|
553
|
+
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, scale: "m", 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, mapView: this.mapView, onFeatureSelect: this.onCommentSelectFromList.bind(this), onLoadingStatus: (evt) => void this.updatingFeatureDetails(evt.detail), ref: el => this._featureDetails = el, reportingOptions: this.reportingOptions }), showCommentBtn &&
|
554
554
|
h("calcite-button", { appearance: "solid", onClick: () => this._flowItems = [...this._flowItems, "add-comment"], slot: "footer", width: "full" }, this._translations.comment))));
|
555
555
|
}
|
556
556
|
/**
|
@@ -559,7 +559,7 @@ const CrowdsourceReporter = class {
|
|
559
559
|
* @returns Node
|
560
560
|
*/
|
561
561
|
getFeaturesPagination() {
|
562
|
-
return (h("div", { class: "feature-pagination"
|
562
|
+
return (h("div", { class: "feature-pagination" }, 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', 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)))));
|
563
563
|
}
|
564
564
|
/**
|
565
565
|
* Returns the calcite-flow item for comment details
|