@esri/solutions-components 0.8.17 → 0.8.18

Sign up to get free protection for your applications and to get access to all the features.
Files changed (26) hide show
  1. package/dist/cjs/calcite-flow_6.cjs.entry.js +8 -7
  2. package/dist/cjs/crowdsource-reporter.cjs.entry.js +4 -3
  3. package/dist/cjs/feature-list.cjs.entry.js +5 -3
  4. package/dist/collection/components/create-related-feature/create-related-feature.js +17 -1
  5. package/dist/collection/components/crowdsource-reporter/crowdsource-reporter.css +4 -3
  6. package/dist/collection/components/crowdsource-reporter/crowdsource-reporter.js +3 -2
  7. package/dist/collection/components/feature-details/feature-details.js +22 -7
  8. package/dist/collection/components/feature-list/feature-list.js +5 -3
  9. package/dist/components/create-related-feature2.js +2 -1
  10. package/dist/components/crowdsource-reporter.js +4 -3
  11. package/dist/components/feature-details2.js +6 -6
  12. package/dist/components/feature-list2.js +5 -3
  13. package/dist/esm/calcite-flow_6.entry.js +8 -7
  14. package/dist/esm/crowdsource-reporter.entry.js +4 -3
  15. package/dist/esm/feature-list.entry.js +5 -3
  16. package/dist/solutions-components/{p-d4686851.entry.js → p-48c99a48.entry.js} +1 -1
  17. package/dist/solutions-components/p-64779bb2.entry.js +6 -0
  18. package/dist/solutions-components/{p-b6d47bab.entry.js → p-f6668347.entry.js} +3 -3
  19. package/dist/solutions-components/solutions-components.esm.js +1 -1
  20. package/dist/types/components/create-related-feature/create-related-feature.d.ts +16 -0
  21. package/dist/types/components/crowdsource-reporter/crowdsource-reporter.d.ts +1 -0
  22. package/dist/types/components/feature-details/feature-details.d.ts +16 -1
  23. package/dist/types/components/feature-list/feature-list.d.ts +4 -0
  24. package/dist/types/components.d.ts +1 -1
  25. package/package.json +1 -1
  26. package/dist/solutions-components/p-22aece81.entry.js +0 -6
@@ -774,7 +774,7 @@ const CreateRelatedFeature = class {
774
774
  this.reactiveUtils = reactiveUtils;
775
775
  }
776
776
  render() {
777
- return (index.h(index.Host, { key: '383e8fac89d037f77241d856013202d1e04b28ba' }));
777
+ return (index.h(index.Host, { key: '9807b7dcad1f8305756e6098f1e64ef8caffcbac' }));
778
778
  }
779
779
  /**
780
780
  * StencilJS: Called once just after the component is fully loaded and the first render() occurs.
@@ -881,6 +881,7 @@ const CreateRelatedFeature = class {
881
881
  * @param parentRelationship Parent relationship
882
882
  * @param childRelationship Child relationship
883
883
  * @returns Attributes for related feature
884
+ * @protected
884
885
  */
885
886
  makeAttributesForRelatedFeature(parentFeature, parentRelationship, childRelationship) {
886
887
  const parentKeyField = parentRelationship.keyField;
@@ -1027,12 +1028,12 @@ const FeatureDetails = class {
1027
1028
  var _a, _b, _c, _d, _e;
1028
1029
  //When related features found show comments list of only those features else comments list will be empty
1029
1030
  const commentsListWhereClause = ((_a = this._relatedFeaturesOIDs) === null || _a === void 0 ? void 0 : _a.length) > 0 ? `objectId in(${this._relatedFeaturesOIDs})` : '1=0';
1030
- return (index.h("calcite-panel", { key: 'c39c0eec021627b920972f7d4bce0d45bfe0a9c2', "full-height": true }, index.h("info-card", { key: 'e90cb427a1f874216afcfdf0a33804bf14fb6a2c', 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) &&
1031
- index.h("div", { key: 'ecfdf111612c92eacfd97dae7bb3080b7ad50e96', class: "buttons-container" }, this._commentsAvailable &&
1032
- index.h("div", { key: '07a8213e11585041fb1c5f56254447a720033f04', class: "comment-btn" }, index.h("span", { key: 'f4071fbd03372a0e88857962e9c31530e2dc693a' }, this._relatedFeaturesOIDs.length), index.h("calcite-icon", { key: '30258e1daae5f1e00d18dd4ec052861de46b45bf', icon: "speech-bubble", scale: 's' })), this._likeFieldAvailable &&
1033
- index.h("calcite-button", { key: 'fa76245789a29e49be06482fd8cd0244f44d19ab', 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 &&
1034
- index.h("calcite-button", { key: 'ac9adc799a93f08319b2f0b797cd5d4773b1a6cb', 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 &&
1035
- index.h("feature-list", { key: '165b2ac0af65cbbab945a0dfd4ac878cc41af56c', class: "height-full", mapView: this.mapView, pageSize: 5, ref: el => this._commentsList = el, selectedLayerId: this.relatedTableId, showInitialLoading: false, textSize: "small", whereClause: commentsListWhereClause })));
1031
+ return (index.h("calcite-panel", { key: 'b8d1cc9d4d9040665be3c892f5738a179ab64eaf', "full-height": true }, index.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) &&
1032
+ index.h("div", { key: '8e27d13341a9b4ad37f87778e046a4e8e0b2778e', class: "buttons-container" }, this._commentsAvailable &&
1033
+ index.h("div", { key: '3dd02fdbc107e7ce04e8aabb96a6748b68eeec6b', class: "comment-btn" }, index.h("span", { key: '5601fdb24ff385e0b6d2b9e5b86bde06b3c2d1b8' }, this._relatedFeaturesOIDs.length), index.h("calcite-icon", { key: '97a517d117a4d5a8c6798da9c9c82e46c39c25f8', icon: "speech-bubble", scale: 's' })), this._likeFieldAvailable &&
1034
+ index.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 &&
1035
+ index.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 &&
1036
+ index.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 })));
1036
1037
  }
1037
1038
  /**
1038
1039
  * Load esri javascript api modules
@@ -13,7 +13,7 @@ const mapViewUtils = require('./mapViewUtils-6e46ba33.js');
13
13
  require('./esri-loader-fce6a9cb.js');
14
14
  require('./interfaces-7cd0a48a.js');
15
15
 
16
- const crowdsourceReporterCss = ":host{display:block;--calcite-label-margin-bottom:0px;--solutions-theme-foreground-color:var(--calcite-color-foreground-1)}.width-full{width:100% !important}.width-0{width:0}.height-full{height:100% !important}.height-0{height:0}.overflow-hidden{overflow:hidden}.border{border:1px solid var(--calcite-color-border-3)}.notice-msg{padding:10px;width:calc(100% - 20px)}.progress-bar{padding:12px}.footer-top-button{padding-bottom:7px}.footer-button{height:35px}.feature-pagination{align-items:center;margin:5% 124%;display:flex}.pagination-count{width:32px;color:var(--calcite-color-brand);border-bottom:1px solid var(--calcite-color-brand);font-weight:bold}.report-submitted-msg{position:absolute;z-index:1000}";
16
+ 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}";
17
17
  const CrowdsourceReporterStyle0 = crowdsourceReporterCss;
18
18
 
19
19
  const CrowdsourceReporter = class {
@@ -227,6 +227,7 @@ const CrowdsourceReporter = class {
227
227
  * On sort option click update the sort field and sort order
228
228
  * @param sortField sort field
229
229
  * @param sortOrder sort order
230
+ * @param sortOption selected sort option (Newest/Oldest/Highest Voted/Lowest Voted)
230
231
  */
231
232
  async sortOptionClick(sortField, sortOrder, sortOption) {
232
233
  this._updatedSorting = {
@@ -553,7 +554,7 @@ const CrowdsourceReporter = class {
553
554
  */
554
555
  getFeatureDetailsFlowItem() {
555
556
  const showCommentBtn = this.reportingOptions[this._currentFeature.layer.id].comment && this._currentFeature.layer.relationships.length > 0;
556
- return (index.h("calcite-flow-item", { collapsed: this.isMobile && this._sidePanelCollapsed, heading: this._selectedLayerName, loading: this._showLoadingIndicator, onCalciteFlowItemBack: this.backFromSelectedPanel.bind(this) }, this.isMobile && this.getActionToExpandCollapsePanel(), index.h("instant-apps-social-share", { autoUpdateShareUrl: false, embed: false, popoverButtonIconScale: "s", ref: el => this._shareNode = el, scale: "m", shareButtonColor: "neutral", shareButtonType: "action", slot: "header-actions-end", socialMedia: true, view: this.mapView }), index.h("calcite-panel", null, this._selectedFeature.length > 1 && this.getFeaturesPagination(), index.h("feature-details", { class: 'full-height', graphics: this._selectedFeature, mapView: this.mapView, onFeatureSelect: this.onCommentSelectFromList.bind(this), onLoadingStatus: (evt) => void this.updatingFeatureDetails(evt.detail), ref: el => this._featureDetails = el, reportingOptions: this.reportingOptions }), showCommentBtn &&
557
+ return (index.h("calcite-flow-item", { collapsed: this.isMobile && this._sidePanelCollapsed, heading: this._selectedLayerName, loading: this._showLoadingIndicator, onCalciteFlowItemBack: this.backFromSelectedPanel.bind(this) }, this.isMobile && this.getActionToExpandCollapsePanel(), index.h("instant-apps-social-share", { autoUpdateShareUrl: false, embed: false, popoverButtonIconScale: "s", ref: el => this._shareNode = el, scale: "m", shareButtonColor: "neutral", shareButtonType: "action", slot: "header-actions-end", socialMedia: true, view: this.mapView }), this._selectedFeature.length > 1 && this.getFeaturesPagination(), index.h("calcite-panel", null, index.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 &&
557
558
  index.h("calcite-button", { appearance: "solid", onClick: () => this._flowItems = [...this._flowItems, "add-comment"], slot: "footer", width: "full" }, this._translations.comment))));
558
559
  }
559
560
  /**
@@ -562,7 +563,7 @@ const CrowdsourceReporter = class {
562
563
  * @returns Node
563
564
  */
564
565
  getFeaturesPagination() {
565
- return (index.h("div", { class: "feature-pagination", slot: "header-actions-start" }, index.h("div", null, index.h("calcite-button", { appearance: 'transparent', disabled: false, iconStart: "chevron-left", id: "solutions-back", onClick: () => void this._featureDetails.back(), scale: "s", width: "full" }), index.h("calcite-tooltip", { label: "", placement: "top", "reference-element": "solutions-back" }, index.h("span", null, this._translations.back))), index.h("calcite-button", { appearance: 'transparent', class: 'pagination-action', onClick: () => void this._featureDetails.toggleListView(), scale: "s" }, index.h("span", { class: "pagination-count" }, this._getCount())), index.h("div", null, index.h("calcite-button", { appearance: "transparent", disabled: false, iconStart: "chevron-right", id: "solutions-next", onClick: () => void this._featureDetails.next(), scale: "s", width: "full" }), index.h("calcite-tooltip", { placement: "top", "reference-element": "solutions-next" }, index.h("span", null, this._translations.next)))));
566
+ return (index.h("div", { class: "feature-pagination" }, index.h("div", null, index.h("calcite-button", { appearance: 'transparent', disabled: false, iconStart: "chevron-left", id: "solutions-back", onClick: () => void this._featureDetails.back(), scale: "s", width: "full" }), index.h("calcite-tooltip", { label: "", placement: "top", "reference-element": "solutions-back" }, index.h("span", null, this._translations.back))), index.h("calcite-button", { appearance: 'transparent', onClick: () => void this._featureDetails.toggleListView(), scale: "s" }, index.h("span", { class: "pagination-count" }, this._getCount())), index.h("div", null, index.h("calcite-button", { appearance: "transparent", disabled: false, iconStart: "chevron-right", id: "solutions-next", onClick: () => void this._featureDetails.next(), scale: "s", width: "full" }), index.h("calcite-tooltip", { placement: "top", "reference-element": "solutions-next" }, index.h("span", null, this._translations.next)))));
566
567
  }
567
568
  /**
568
569
  * Returns the calcite-flow item for comment details
@@ -98,9 +98,9 @@ const FeatureList = class {
98
98
  * Renders the component.
99
99
  */
100
100
  render() {
101
- return (index.h("calcite-panel", { key: '37f83a9c019e68213493f5e890324470389cd36f', "full-height": true, "full-width": true }, this._isLoading && index.h("calcite-loader", { key: '671559375bb5fcdc8a01f9f10a82ab71edc0d836', label: "", scale: "m" }), this._featureItems.length === 0 && !this._isLoading &&
102
- index.h("calcite-notice", { key: 'f6101de52464f2316bfbb83919036b4cf035f8b9', class: "error-msg", icon: "feature-details", kind: "info", open: true }, index.h("div", { key: 'e49017399909f1d0b93ec4e24341b9042267977f', slot: "message" }, this.noFeaturesFoundMsg ? this.noFeaturesFoundMsg : this._translations.featureErrorMsg)), index.h("calcite-list", { key: '2e90c0aec739fcce422ff730a39adc85b71a84cb', "selection-appearance": "border", "selection-mode": "none" }, !this._isLoading && this._featureItems.length > 0 && this._featureItems), this._featuresCount > this.pageSize &&
103
- index.h("div", { key: '4b59248846c5b433bb88171c322070a13002f23d', class: "width-full", slot: "footer" }, index.h("calcite-pagination", { key: '1ca5dbccdc59379999a94198d7ac6111e1ef547b', class: "pagination", "full-width": true, onCalcitePaginationChange: this.pageChanged.bind(this), "page-size": this.pageSize, "start-item": "1", "total-items": this._featuresCount }))));
101
+ return (index.h("calcite-panel", { key: '9f702c6d98cc19704e0773e36fd969817ea7262e', "full-height": true, "full-width": true }, this._isLoading && index.h("calcite-loader", { key: 'e9acf13f3444057b097d6b145c1a6e0118f150ea', label: "", scale: "m" }), this._featureItems.length === 0 && !this._isLoading &&
102
+ index.h("calcite-notice", { key: '8c7fa89e2da7490b04456e51f8534c2515a02399', class: "error-msg", icon: "feature-details", kind: "info", open: true }, index.h("div", { key: '799d419e9c26b7928f15cb1cf9afa9f47cab0e94', slot: "message" }, this.noFeaturesFoundMsg ? this.noFeaturesFoundMsg : this._translations.featureErrorMsg)), index.h("calcite-list", { key: '82c60b16ab586ad57f8f98bb08814f688102b166', "selection-appearance": "border", "selection-mode": "none" }, !this._isLoading && this._featureItems.length > 0 && this._featureItems), this._featuresCount > this.pageSize &&
103
+ index.h("div", { key: 'e5b789ea46c6bedfbe83f1323ffb89271c0b76ce', class: "width-full", slot: "footer" }, index.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 }))));
104
104
  }
105
105
  //--------------------------------------------------------------------------
106
106
  //
@@ -141,7 +141,9 @@ const FeatureList = class {
141
141
  * @protected
142
142
  */
143
143
  async initializeFeatureItems() {
144
+ var _a;
144
145
  if (this._selectedLayer) {
146
+ void ((_a = this._pagination) === null || _a === void 0 ? void 0 : _a.goTo("start"));
145
147
  this._isLoading = this.showInitialLoading;
146
148
  this._featureItems = await this.queryPage(0);
147
149
  const query = {
@@ -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: '383e8fac89d037f77241d856013202d1e04b28ba' }));
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;
@@ -62,13 +62,14 @@
62
62
  }
63
63
 
64
64
  .feature-pagination {
65
- align-items: center;
66
- margin: 5% 124%;
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;
@@ -232,6 +232,7 @@ export class CrowdsourceReporter {
232
232
  * On sort option click update the sort field and sort order
233
233
  * @param sortField sort field
234
234
  * @param sortOrder sort order
235
+ * @param sortOption selected sort option (Newest/Oldest/Highest Voted/Lowest Voted)
235
236
  */
236
237
  async sortOptionClick(sortField, sortOrder, sortOption) {
237
238
  this._updatedSorting = {
@@ -558,7 +559,7 @@ export class CrowdsourceReporter {
558
559
  */
559
560
  getFeatureDetailsFlowItem() {
560
561
  const showCommentBtn = this.reportingOptions[this._currentFeature.layer.id].comment && this._currentFeature.layer.relationships.length > 0;
561
- 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 }), h("calcite-panel", null, this._selectedFeature.length > 1 && this.getFeaturesPagination(), 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 &&
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 &&
562
563
  h("calcite-button", { appearance: "solid", onClick: () => this._flowItems = [...this._flowItems, "add-comment"], slot: "footer", width: "full" }, this._translations.comment))));
563
564
  }
564
565
  /**
@@ -567,7 +568,7 @@ export class CrowdsourceReporter {
567
568
  * @returns Node
568
569
  */
569
570
  getFeaturesPagination() {
570
- return (h("div", { class: "feature-pagination", slot: "header-actions-start" }, h("div", null, h("calcite-button", { appearance: 'transparent', disabled: false, iconStart: "chevron-left", id: "solutions-back", onClick: () => void this._featureDetails.back(), scale: "s", width: "full" }), h("calcite-tooltip", { label: "", placement: "top", "reference-element": "solutions-back" }, h("span", null, this._translations.back))), h("calcite-button", { appearance: 'transparent', class: 'pagination-action', onClick: () => void this._featureDetails.toggleListView(), scale: "s" }, h("span", { class: "pagination-count" }, this._getCount())), h("div", null, h("calcite-button", { appearance: "transparent", disabled: false, iconStart: "chevron-right", id: "solutions-next", onClick: () => void this._featureDetails.next(), scale: "s", width: "full" }), h("calcite-tooltip", { placement: "top", "reference-element": "solutions-next" }, h("span", null, this._translations.next)))));
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)))));
571
572
  }
572
573
  /**
573
574
  * Returns the calcite-flow item for comment details
@@ -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: 'c39c0eec021627b920972f7d4bce0d45bfe0a9c2', "full-height": true }, h("info-card", { key: 'e90cb427a1f874216afcfdf0a33804bf14fb6a2c', 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) &&
98
- h("div", { key: 'ecfdf111612c92eacfd97dae7bb3080b7ad50e96', class: "buttons-container" }, this._commentsAvailable &&
99
- h("div", { key: '07a8213e11585041fb1c5f56254447a720033f04', class: "comment-btn" }, h("span", { key: 'f4071fbd03372a0e88857962e9c31530e2dc693a' }, this._relatedFeaturesOIDs.length), h("calcite-icon", { key: '30258e1daae5f1e00d18dd4ec052861de46b45bf', icon: "speech-bubble", scale: 's' })), this._likeFieldAvailable &&
100
- h("calcite-button", { key: 'fa76245789a29e49be06482fd8cd0244f44d19ab', 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 &&
101
- h("calcite-button", { key: 'ac9adc799a93f08319b2f0b797cd5d4773b1a6cb', 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 &&
102
- h("feature-list", { key: '165b2ac0af65cbbab945a0dfd4ac878cc41af56c', class: "height-full", mapView: this.mapView, pageSize: 5, ref: el => this._commentsList = el, selectedLayerId: this.relatedTableId, showInitialLoading: false, textSize: "small", whereClause: commentsListWhereClause })));
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 feature is selected using the list"
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: '37f83a9c019e68213493f5e890324470389cd36f', "full-height": true, "full-width": true }, this._isLoading && h("calcite-loader", { key: '671559375bb5fcdc8a01f9f10a82ab71edc0d836', label: "", scale: "m" }), this._featureItems.length === 0 && !this._isLoading &&
106
- h("calcite-notice", { key: 'f6101de52464f2316bfbb83919036b4cf035f8b9', class: "error-msg", icon: "feature-details", kind: "info", open: true }, h("div", { key: 'e49017399909f1d0b93ec4e24341b9042267977f', slot: "message" }, this.noFeaturesFoundMsg ? this.noFeaturesFoundMsg : this._translations.featureErrorMsg)), h("calcite-list", { key: '2e90c0aec739fcce422ff730a39adc85b71a84cb', "selection-appearance": "border", "selection-mode": "none" }, !this._isLoading && this._featureItems.length > 0 && this._featureItems), this._featuresCount > this.pageSize &&
107
- h("div", { key: '4b59248846c5b433bb88171c322070a13002f23d', class: "width-full", slot: "footer" }, h("calcite-pagination", { key: '1ca5dbccdc59379999a94198d7ac6111e1ef547b', class: "pagination", "full-width": true, onCalcitePaginationChange: this.pageChanged.bind(this), "page-size": this.pageSize, "start-item": "1", "total-items": this._featuresCount }))));
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: '383e8fac89d037f77241d856013202d1e04b28ba' }));
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;
@@ -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{align-items:center;margin:5% 124%;display:flex}.pagination-count{width:32px;color:var(--calcite-color-brand);border-bottom:1px solid var(--calcite-color-brand);font-weight:bold}.report-submitted-msg{position:absolute;z-index:1000}";
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 {
@@ -270,6 +270,7 @@ const CrowdsourceReporter$1 = /*@__PURE__*/ proxyCustomElement(class Crowdsource
270
270
  * On sort option click update the sort field and sort order
271
271
  * @param sortField sort field
272
272
  * @param sortOrder sort order
273
+ * @param sortOption selected sort option (Newest/Oldest/Highest Voted/Lowest Voted)
273
274
  */
274
275
  async sortOptionClick(sortField, sortOrder, sortOption) {
275
276
  this._updatedSorting = {
@@ -596,7 +597,7 @@ const CrowdsourceReporter$1 = /*@__PURE__*/ proxyCustomElement(class Crowdsource
596
597
  */
597
598
  getFeatureDetailsFlowItem() {
598
599
  const showCommentBtn = this.reportingOptions[this._currentFeature.layer.id].comment && this._currentFeature.layer.relationships.length > 0;
599
- 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 }), h("calcite-panel", null, this._selectedFeature.length > 1 && this.getFeaturesPagination(), 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 &&
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 &&
600
601
  h("calcite-button", { appearance: "solid", onClick: () => this._flowItems = [...this._flowItems, "add-comment"], slot: "footer", width: "full" }, this._translations.comment))));
601
602
  }
602
603
  /**
@@ -605,7 +606,7 @@ const CrowdsourceReporter$1 = /*@__PURE__*/ proxyCustomElement(class Crowdsource
605
606
  * @returns Node
606
607
  */
607
608
  getFeaturesPagination() {
608
- return (h("div", { class: "feature-pagination", slot: "header-actions-start" }, h("div", null, h("calcite-button", { appearance: 'transparent', disabled: false, iconStart: "chevron-left", id: "solutions-back", onClick: () => void this._featureDetails.back(), scale: "s", width: "full" }), h("calcite-tooltip", { label: "", placement: "top", "reference-element": "solutions-back" }, h("span", null, this._translations.back))), h("calcite-button", { appearance: 'transparent', class: 'pagination-action', onClick: () => void this._featureDetails.toggleListView(), scale: "s" }, h("span", { class: "pagination-count" }, this._getCount())), h("div", null, h("calcite-button", { appearance: "transparent", disabled: false, iconStart: "chevron-right", id: "solutions-next", onClick: () => void this._featureDetails.next(), scale: "s", width: "full" }), h("calcite-tooltip", { placement: "top", "reference-element": "solutions-next" }, h("span", null, this._translations.next)))));
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)))));
609
610
  }
610
611
  /**
611
612
  * Returns the calcite-flow item for comment details
@@ -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: 'c39c0eec021627b920972f7d4bce0d45bfe0a9c2', "full-height": true }, h("info-card", { key: 'e90cb427a1f874216afcfdf0a33804bf14fb6a2c', 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: 'ecfdf111612c92eacfd97dae7bb3080b7ad50e96', class: "buttons-container" }, this._commentsAvailable &&
133
- h("div", { key: '07a8213e11585041fb1c5f56254447a720033f04', class: "comment-btn" }, h("span", { key: 'f4071fbd03372a0e88857962e9c31530e2dc693a' }, this._relatedFeaturesOIDs.length), h("calcite-icon", { key: '30258e1daae5f1e00d18dd4ec052861de46b45bf', icon: "speech-bubble", scale: 's' })), this._likeFieldAvailable &&
134
- h("calcite-button", { key: 'fa76245789a29e49be06482fd8cd0244f44d19ab', 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: 'ac9adc799a93f08319b2f0b797cd5d4773b1a6cb', 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: '165b2ac0af65cbbab945a0dfd4ac878cc41af56c', class: "height-full", mapView: this.mapView, pageSize: 5, ref: el => this._commentsList = el, selectedLayerId: this.relatedTableId, showInitialLoading: false, textSize: "small", whereClause: commentsListWhereClause })));
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: '37f83a9c019e68213493f5e890324470389cd36f', "full-height": true, "full-width": true }, this._isLoading && h("calcite-loader", { key: '671559375bb5fcdc8a01f9f10a82ab71edc0d836', label: "", scale: "m" }), this._featureItems.length === 0 && !this._isLoading &&
114
- h("calcite-notice", { key: 'f6101de52464f2316bfbb83919036b4cf035f8b9', class: "error-msg", icon: "feature-details", kind: "info", open: true }, h("div", { key: 'e49017399909f1d0b93ec4e24341b9042267977f', slot: "message" }, this.noFeaturesFoundMsg ? this.noFeaturesFoundMsg : this._translations.featureErrorMsg)), h("calcite-list", { key: '2e90c0aec739fcce422ff730a39adc85b71a84cb', "selection-appearance": "border", "selection-mode": "none" }, !this._isLoading && this._featureItems.length > 0 && this._featureItems), this._featuresCount > this.pageSize &&
115
- h("div", { key: '4b59248846c5b433bb88171c322070a13002f23d', class: "width-full", slot: "footer" }, h("calcite-pagination", { key: '1ca5dbccdc59379999a94198d7ac6111e1ef547b', class: "pagination", "full-width": true, onCalcitePaginationChange: this.pageChanged.bind(this), "page-size": this.pageSize, "start-item": "1", "total-items": this._featuresCount }))));
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: '383e8fac89d037f77241d856013202d1e04b28ba' }));
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: 'c39c0eec021627b920972f7d4bce0d45bfe0a9c2', "full-height": true }, h("info-card", { key: 'e90cb427a1f874216afcfdf0a33804bf14fb6a2c', 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) &&
1027
- h("div", { key: 'ecfdf111612c92eacfd97dae7bb3080b7ad50e96', class: "buttons-container" }, this._commentsAvailable &&
1028
- h("div", { key: '07a8213e11585041fb1c5f56254447a720033f04', class: "comment-btn" }, h("span", { key: 'f4071fbd03372a0e88857962e9c31530e2dc693a' }, this._relatedFeaturesOIDs.length), h("calcite-icon", { key: '30258e1daae5f1e00d18dd4ec052861de46b45bf', icon: "speech-bubble", scale: 's' })), this._likeFieldAvailable &&
1029
- h("calcite-button", { key: 'fa76245789a29e49be06482fd8cd0244f44d19ab', 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 &&
1030
- h("calcite-button", { key: 'ac9adc799a93f08319b2f0b797cd5d4773b1a6cb', 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 &&
1031
- h("feature-list", { key: '165b2ac0af65cbbab945a0dfd4ac878cc41af56c', class: "height-full", mapView: this.mapView, pageSize: 5, ref: el => this._commentsList = el, selectedLayerId: this.relatedTableId, showInitialLoading: false, textSize: "small", whereClause: commentsListWhereClause })));
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
@@ -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{align-items:center;margin:5% 124%;display:flex}.pagination-count{width:32px;color:var(--calcite-color-brand);border-bottom:1px solid var(--calcite-color-brand);font-weight:bold}.report-submitted-msg{position:absolute;z-index:1000}";
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 {
@@ -223,6 +223,7 @@ const CrowdsourceReporter = class {
223
223
  * On sort option click update the sort field and sort order
224
224
  * @param sortField sort field
225
225
  * @param sortOrder sort order
226
+ * @param sortOption selected sort option (Newest/Oldest/Highest Voted/Lowest Voted)
226
227
  */
227
228
  async sortOptionClick(sortField, sortOrder, sortOption) {
228
229
  this._updatedSorting = {
@@ -549,7 +550,7 @@ const CrowdsourceReporter = class {
549
550
  */
550
551
  getFeatureDetailsFlowItem() {
551
552
  const showCommentBtn = this.reportingOptions[this._currentFeature.layer.id].comment && this._currentFeature.layer.relationships.length > 0;
552
- 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 }), h("calcite-panel", null, this._selectedFeature.length > 1 && this.getFeaturesPagination(), 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 &&
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 &&
553
554
  h("calcite-button", { appearance: "solid", onClick: () => this._flowItems = [...this._flowItems, "add-comment"], slot: "footer", width: "full" }, this._translations.comment))));
554
555
  }
555
556
  /**
@@ -558,7 +559,7 @@ const CrowdsourceReporter = class {
558
559
  * @returns Node
559
560
  */
560
561
  getFeaturesPagination() {
561
- return (h("div", { class: "feature-pagination", slot: "header-actions-start" }, h("div", null, h("calcite-button", { appearance: 'transparent', disabled: false, iconStart: "chevron-left", id: "solutions-back", onClick: () => void this._featureDetails.back(), scale: "s", width: "full" }), h("calcite-tooltip", { label: "", placement: "top", "reference-element": "solutions-back" }, h("span", null, this._translations.back))), h("calcite-button", { appearance: 'transparent', class: 'pagination-action', onClick: () => void this._featureDetails.toggleListView(), scale: "s" }, h("span", { class: "pagination-count" }, this._getCount())), h("div", null, h("calcite-button", { appearance: "transparent", disabled: false, iconStart: "chevron-right", id: "solutions-next", onClick: () => void this._featureDetails.next(), scale: "s", width: "full" }), h("calcite-tooltip", { placement: "top", "reference-element": "solutions-next" }, h("span", null, this._translations.next)))));
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)))));
562
563
  }
563
564
  /**
564
565
  * Returns the calcite-flow item for comment details
@@ -94,9 +94,9 @@ const FeatureList = class {
94
94
  * Renders the component.
95
95
  */
96
96
  render() {
97
- return (h("calcite-panel", { key: '37f83a9c019e68213493f5e890324470389cd36f', "full-height": true, "full-width": true }, this._isLoading && h("calcite-loader", { key: '671559375bb5fcdc8a01f9f10a82ab71edc0d836', label: "", scale: "m" }), this._featureItems.length === 0 && !this._isLoading &&
98
- h("calcite-notice", { key: 'f6101de52464f2316bfbb83919036b4cf035f8b9', class: "error-msg", icon: "feature-details", kind: "info", open: true }, h("div", { key: 'e49017399909f1d0b93ec4e24341b9042267977f', slot: "message" }, this.noFeaturesFoundMsg ? this.noFeaturesFoundMsg : this._translations.featureErrorMsg)), h("calcite-list", { key: '2e90c0aec739fcce422ff730a39adc85b71a84cb', "selection-appearance": "border", "selection-mode": "none" }, !this._isLoading && this._featureItems.length > 0 && this._featureItems), this._featuresCount > this.pageSize &&
99
- h("div", { key: '4b59248846c5b433bb88171c322070a13002f23d', class: "width-full", slot: "footer" }, h("calcite-pagination", { key: '1ca5dbccdc59379999a94198d7ac6111e1ef547b', class: "pagination", "full-width": true, onCalcitePaginationChange: this.pageChanged.bind(this), "page-size": this.pageSize, "start-item": "1", "total-items": this._featuresCount }))));
97
+ 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 &&
98
+ 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 &&
99
+ 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 }))));
100
100
  }
101
101
  //--------------------------------------------------------------------------
102
102
  //
@@ -137,7 +137,9 @@ const FeatureList = class {
137
137
  * @protected
138
138
  */
139
139
  async initializeFeatureItems() {
140
+ var _a;
140
141
  if (this._selectedLayer) {
142
+ void ((_a = this._pagination) === null || _a === void 0 ? void 0 : _a.goTo("start"));
141
143
  this._isLoading = this.showInitialLoading;
142
144
  this._featureItems = await this.queryPage(0);
143
145
  const query = {