@esri/solutions-components 0.8.22 → 0.8.24
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/cjs/arcgis-login.cjs.entry.js +1 -1
- package/dist/cjs/basemap-gallery_7.cjs.entry.js +1 -1
- package/dist/cjs/buffer-tools_3.cjs.entry.js +1 -1
- package/dist/cjs/calcite-alert_4.cjs.entry.js +12 -11
- package/dist/cjs/{calcite-avatar.cjs.entry.js → calcite-avatar_2.cjs.entry.js} +62 -0
- package/dist/cjs/calcite-block_5.cjs.entry.js +12 -3
- package/dist/cjs/calcite-dropdown-group_2.cjs.entry.js +419 -0
- package/dist/cjs/{calcite-dropdown_4.cjs.entry.js → calcite-dropdown_2.cjs.entry.js} +12 -435
- package/dist/cjs/calcite-flow_6.cjs.entry.js +25 -29
- package/dist/cjs/card-manager_3.cjs.entry.js +9 -3
- package/dist/cjs/crowdsource-manager.cjs.entry.js +12 -4
- package/dist/cjs/crowdsource-reporter.cjs.entry.js +57 -37
- package/dist/cjs/{downloadUtils-2e36a300.js → downloadUtils-5349717a.js} +2 -1
- package/dist/cjs/feature-list.cjs.entry.js +11 -6
- package/dist/cjs/{helpers-9347ad83.js → helpers-618a3f7d.js} +2 -1
- package/dist/cjs/{index.es-56415e48.js → index.es-aa69b58b.js} +1 -1
- package/dist/cjs/instant-apps-create.cjs.entry.js +266 -0
- package/dist/cjs/instant-apps-export.cjs.entry.js +31 -16
- package/dist/cjs/instant-apps-header.cjs.entry.js +3 -2
- package/dist/cjs/instant-apps-interactive-legend-classic.cjs.entry.js +11 -4
- package/dist/cjs/instant-apps-interactive-legend-count_2.cjs.entry.js +1 -1
- package/dist/cjs/instant-apps-interactive-legend-group-legend-element-caption.cjs.entry.js +1 -1
- package/dist/cjs/instant-apps-interactive-legend-group-legend-element_5.cjs.entry.js +2 -2
- package/dist/cjs/instant-apps-interactive-legend.cjs.entry.js +1 -1
- package/dist/cjs/instant-apps-landing-page.cjs.entry.js +45 -9
- package/dist/cjs/instant-apps-language-switcher.cjs.entry.js +1 -1
- package/dist/cjs/instant-apps-language-translator.cjs.entry.js +1 -1
- package/dist/cjs/instant-apps-sign-in.cjs.entry.js +168 -0
- package/dist/cjs/{languageSwitcher-395021d6.js → languageSwitcher-b9a1485c.js} +3 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/map-select-tools_3.cjs.entry.js +1 -1
- package/dist/cjs/{popupUtils-500c1544.js → popupUtils-3e65296c.js} +17 -2
- package/dist/cjs/public-notification.cjs.entry.js +4 -4
- package/dist/cjs/resources-fa37e40f.js +26 -0
- package/dist/cjs/solutions-components.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +3 -1
- package/dist/collection/components/arcgis-login/arcgis-login.js +1 -1
- package/dist/collection/components/basemap-gallery/basemap-gallery.js +1 -1
- package/dist/collection/components/buffer-tools/buffer-tools.js +1 -1
- package/dist/collection/components/card-manager/card-manager.js +1 -1
- package/dist/collection/components/create-feature/create-feature.js +1 -1
- package/dist/collection/components/create-related-feature/create-related-feature.js +1 -1
- package/dist/collection/components/crowdsource-manager/crowdsource-manager.js +30 -8
- package/dist/collection/components/crowdsource-reporter/crowdsource-reporter.js +57 -46
- package/dist/collection/components/feature-details/feature-details.css +2 -2
- package/dist/collection/components/feature-details/feature-details.js +56 -13
- package/dist/collection/components/feature-list/feature-list.css +1 -1
- package/dist/collection/components/feature-list/feature-list.js +23 -4
- package/dist/collection/components/info-card/info-card.js +7 -27
- package/dist/collection/components/layer-list/layer-list.js +7 -14
- package/dist/collection/components/layer-table/layer-table.js +7 -1
- package/dist/collection/components/public-notification/public-notification.js +3 -3
- package/dist/collection/demos/crowdsource-manager.html +10 -2
- package/dist/collection/demos/crowdsource-reporter.html +22 -15
- package/dist/collection/utils/interfaces.ts +1 -0
- package/dist/collection/utils/popupUtils.js +17 -2
- package/dist/collection/utils/popupUtils.ts +23 -3
- package/dist/components/arcgis-login.js +1 -1
- package/dist/components/basemap-gallery2.js +1 -1
- package/dist/components/buffer-tools2.js +1 -1
- package/dist/components/calcite-navigation-user.js +1 -99
- package/dist/components/card-manager2.js +1 -1
- package/dist/components/consent-manager.js +1 -1
- package/dist/components/create-feature2.js +1 -1
- package/dist/components/create-related-feature2.js +1 -1
- package/dist/components/crowdsource-manager.js +13 -5
- package/dist/components/crowdsource-reporter.js +58 -38
- package/dist/components/downloadUtils.js +1 -1
- package/dist/components/esri-loader.js +1 -1
- package/dist/components/feature-details2.js +17 -13
- package/dist/components/feature-list2.js +7 -5
- package/dist/components/helpers.js +3 -2
- package/dist/components/html2canvas.js +1 -1
- package/dist/components/index.es.js +2 -2
- package/dist/components/info-card2.js +7 -11
- package/dist/components/instant-apps-ckeditor-wrapper2.js +1 -1
- package/dist/components/instant-apps-create.js +317 -0
- package/dist/components/instant-apps-export.js +32 -16
- package/dist/components/instant-apps-filter-list2.js +6 -1
- package/dist/components/instant-apps-header2.js +3 -2
- package/dist/components/instant-apps-interactive-legend-classic2.js +13 -6
- package/dist/components/instant-apps-interactive-legend-legend-element-caption2.js +2 -2
- package/dist/components/instant-apps-landing-page.js +91 -16
- package/dist/components/instant-apps-language-translator2.js +3 -1
- package/dist/components/instant-apps-sign-in.js +11 -0
- package/dist/components/instant-apps-sign-in2.js +243 -0
- package/dist/components/instant-apps-social-share2.js +8 -2
- package/dist/components/layer-list2.js +7 -14
- package/dist/components/layer-table2.js +7 -1
- package/dist/{esm/calcite-navigation-user.entry.js → components/navigation-user.js} +46 -9
- package/dist/components/popupUtils.js +17 -2
- package/dist/components/public-notification.js +3 -3
- package/dist/components/purify.js +1 -1
- package/dist/components/solution-resource.js +1 -1
- package/dist/esm/arcgis-login.entry.js +1 -1
- package/dist/esm/basemap-gallery_7.entry.js +1 -1
- package/dist/esm/buffer-tools_3.entry.js +1 -1
- package/dist/esm/calcite-alert_4.entry.js +12 -11
- package/dist/esm/{calcite-avatar.entry.js → calcite-avatar_2.entry.js} +64 -3
- package/dist/esm/calcite-block_5.entry.js +12 -3
- package/dist/esm/calcite-color-picker-hex-input_2.entry.js +1 -1
- package/dist/esm/calcite-color-picker.entry.js +1 -1
- package/dist/esm/calcite-dropdown-group_2.entry.js +414 -0
- package/dist/esm/{calcite-dropdown_4.entry.js → calcite-dropdown_2.entry.js} +2 -423
- package/dist/esm/calcite-flow_6.entry.js +25 -29
- package/dist/esm/card-manager_3.entry.js +9 -3
- package/dist/esm/crowdsource-manager.entry.js +12 -4
- package/dist/esm/crowdsource-reporter.entry.js +57 -37
- package/dist/esm/{downloadUtils-aab31bfe.js → downloadUtils-5fa0d437.js} +2 -2
- package/dist/esm/feature-list.entry.js +11 -6
- package/dist/esm/{helpers-a5a81b9d.js → helpers-61b05164.js} +3 -2
- package/dist/esm/{index.es-43ba3006.js → index.es-57c15c9b.js} +1 -1
- package/dist/esm/instant-apps-create.entry.js +262 -0
- package/dist/esm/instant-apps-export.entry.js +31 -16
- package/dist/esm/instant-apps-header.entry.js +3 -2
- package/dist/esm/instant-apps-interactive-legend-classic.entry.js +11 -4
- package/dist/esm/instant-apps-interactive-legend-count_2.entry.js +1 -1
- package/dist/esm/instant-apps-interactive-legend-group-legend-element-caption.entry.js +1 -1
- package/dist/esm/instant-apps-interactive-legend-group-legend-element_5.entry.js +2 -2
- package/dist/esm/instant-apps-interactive-legend.entry.js +1 -1
- package/dist/esm/instant-apps-landing-page.entry.js +46 -10
- package/dist/esm/instant-apps-language-switcher.entry.js +1 -1
- package/dist/esm/instant-apps-language-translator.entry.js +1 -1
- package/dist/esm/instant-apps-sign-in.entry.js +164 -0
- package/dist/esm/{languageSwitcher-a4a615e4.js → languageSwitcher-d60f03b2.js} +3 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/map-select-tools_3.entry.js +1 -1
- package/dist/esm/{popupUtils-2cc3c366.js → popupUtils-650b6bba.js} +17 -2
- package/dist/esm/public-notification.entry.js +4 -4
- package/dist/esm/resources-16800cce.js +24 -0
- package/dist/esm/solutions-components.js +1 -1
- package/dist/esm/{utils-6419e941.js → utils-251cb6de.js} +1 -1
- package/dist/node_modules/@esri/instant-apps-components/dist/collection/components/instant-apps-create/instant-apps-create.css +150 -0
- package/dist/node_modules/@esri/instant-apps-components/dist/collection/components/instant-apps-header/instant-apps-header.css +16 -9
- package/dist/node_modules/@esri/instant-apps-components/dist/collection/components/instant-apps-landing-page/instant-apps-landing-page.css +19 -0
- package/dist/node_modules/@esri/instant-apps-components/dist/collection/components/instant-apps-sign-in/instant-apps-sign-in.css +98 -0
- package/dist/solutions-components/demos/crowdsource-manager.html +10 -2
- package/dist/solutions-components/demos/crowdsource-reporter.html +22 -15
- package/dist/solutions-components/p-1251dcc6.entry.js +6 -0
- package/dist/solutions-components/p-16730f05.entry.js +6 -0
- package/dist/solutions-components/p-1ae3b886.entry.js +17 -0
- package/dist/solutions-components/p-1ff9eb95.entry.js +6 -0
- package/dist/solutions-components/{p-667caa6b.js → p-24bf45b7.js} +1 -1
- package/dist/solutions-components/{p-8f6e0ae5.entry.js → p-26eb1225.entry.js} +1 -1
- package/dist/solutions-components/{p-3a2e0188.entry.js → p-2c044250.entry.js} +2 -2
- package/dist/solutions-components/p-314dc933.entry.js +6 -0
- package/dist/solutions-components/p-50741707.entry.js +6 -0
- package/dist/solutions-components/p-614ebce7.js +6 -0
- package/dist/solutions-components/{p-37fc92db.js → p-6f69de4d.js} +2 -2
- package/dist/solutions-components/{p-8cff32bd.entry.js → p-72317f8e.entry.js} +2 -2
- package/dist/solutions-components/{p-df73649e.entry.js → p-77cd573b.entry.js} +1 -1
- package/dist/solutions-components/{p-c95dcdf7.entry.js → p-7883b885.entry.js} +3 -3
- package/dist/solutions-components/p-79e2e203.entry.js +6 -0
- package/dist/solutions-components/{p-968a6fd8.entry.js → p-7b17e929.entry.js} +1 -1
- package/dist/solutions-components/p-80b3eb6b.entry.js +6 -0
- package/dist/solutions-components/p-84913712.js +6 -0
- package/dist/solutions-components/p-8c500fd7.entry.js +6 -0
- package/dist/solutions-components/{p-54324eaa.entry.js → p-97e343df.entry.js} +1 -1
- package/dist/solutions-components/{p-fe9d6d06.js → p-9f56c02c.js} +1 -1
- package/dist/solutions-components/p-a1037b19.js +21 -0
- package/dist/solutions-components/{p-667c022f.entry.js → p-af4be4ce.entry.js} +1 -1
- package/dist/solutions-components/p-bb2e669d.entry.js +6 -0
- package/dist/solutions-components/p-c41997d5.js +11 -0
- package/dist/solutions-components/p-c512fcfb.entry.js +6 -0
- package/dist/solutions-components/{p-21d6360a.entry.js → p-c7f0e7a8.entry.js} +1 -1
- package/dist/solutions-components/{p-f6668347.entry.js → p-cbf0dada.entry.js} +3 -3
- package/dist/solutions-components/{p-9c7d4343.entry.js → p-cd91c3e7.entry.js} +1 -1
- package/dist/solutions-components/p-ceba37d3.entry.js +11 -0
- package/dist/solutions-components/{p-09b769b7.entry.js → p-d8a15e32.entry.js} +1 -1
- package/dist/solutions-components/p-d8da6406.entry.js +6 -0
- package/dist/solutions-components/p-da6b3c8a.entry.js +6 -0
- package/dist/solutions-components/{p-60f1055e.entry.js → p-e2400b0d.entry.js} +1 -1
- package/dist/solutions-components/p-e78be59a.entry.js +6 -0
- package/dist/solutions-components/p-f35cc7ae.entry.js +6 -0
- package/dist/solutions-components/solutions-components.esm.js +1 -1
- package/dist/solutions-components/utils/interfaces.ts +1 -0
- package/dist/solutions-components/utils/popupUtils.ts +23 -3
- package/dist/types/components/crowdsource-manager/crowdsource-manager.d.ts +14 -6
- package/dist/types/components/crowdsource-reporter/crowdsource-reporter.d.ts +18 -7
- package/dist/types/components/feature-details/feature-details.d.ts +13 -1
- package/dist/types/components/feature-list/feature-list.d.ts +4 -0
- package/dist/types/components/info-card/info-card.d.ts +0 -4
- package/dist/types/components/layer-list/layer-list.d.ts +1 -1
- package/dist/types/components.d.ts +36 -16
- package/dist/types/preact.d.ts +10 -4
- package/dist/types/utils/interfaces.d.ts +1 -0
- package/dist/types/utils/popupUtils.d.ts +4 -0
- package/package.json +2 -2
- package/dist/cjs/calcite-navigation-user.cjs.entry.js +0 -73
- package/dist/solutions-components/p-08a1e120.js +0 -6
- package/dist/solutions-components/p-3283660c.entry.js +0 -6
- package/dist/solutions-components/p-33647277.entry.js +0 -6
- package/dist/solutions-components/p-3af0764f.entry.js +0 -6
- package/dist/solutions-components/p-48c99a48.entry.js +0 -6
- package/dist/solutions-components/p-599dcc29.js +0 -6
- package/dist/solutions-components/p-5a740f6c.entry.js +0 -6
- package/dist/solutions-components/p-64779bb2.entry.js +0 -6
- package/dist/solutions-components/p-64b4b579.entry.js +0 -11
- package/dist/solutions-components/p-88f73319.entry.js +0 -6
- package/dist/solutions-components/p-ab96dd27.entry.js +0 -6
- package/dist/solutions-components/p-bb0c7be3.entry.js +0 -17
- package/dist/solutions-components/p-bb8e3add.entry.js +0 -11
- package/dist/solutions-components/p-cbe166fc.entry.js +0 -6
- package/dist/solutions-components/p-eab95aa4.entry.js +0 -6
- package/dist/solutions-components/p-ebf82ce0.js +0 -21
- package/dist/solutions-components/p-f43d6a86.entry.js +0 -6
@@ -1,5 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"entries": [
|
3
|
+
"components/layer-list/layer-list.js",
|
3
4
|
"components/arcgis-login/arcgis-login.js",
|
4
5
|
"components/basemap-gallery/basemap-gallery.js",
|
5
6
|
"components/buffer-tools/buffer-tools.js",
|
@@ -8,7 +9,6 @@
|
|
8
9
|
"components/create-feature/create-feature.js",
|
9
10
|
"components/create-related-feature/create-related-feature.js",
|
10
11
|
"components/crowdsource-manager/crowdsource-manager.js",
|
11
|
-
"components/layer-list/layer-list.js",
|
12
12
|
"components/crowdsource-reporter/crowdsource-reporter.js",
|
13
13
|
"components/deduct-calculator/deduct-calculator.js",
|
14
14
|
"components/delete-button/delete-button.js",
|
@@ -180,6 +180,7 @@
|
|
180
180
|
"tags": [
|
181
181
|
"instant-apps-ckeditor-wrapper",
|
182
182
|
"instant-apps-control-panel",
|
183
|
+
"instant-apps-create",
|
183
184
|
"instant-apps-export",
|
184
185
|
"instant-apps-filter-list",
|
185
186
|
"instant-apps-header",
|
@@ -204,6 +205,7 @@
|
|
204
205
|
"instant-apps-popover",
|
205
206
|
"instant-apps-popovers",
|
206
207
|
"instant-apps-scoreboard",
|
208
|
+
"instant-apps-sign-in",
|
207
209
|
"instant-apps-social-share",
|
208
210
|
"instant-apps-splash"
|
209
211
|
]
|
@@ -56,7 +56,7 @@ export class ArcgisLogin {
|
|
56
56
|
//
|
57
57
|
//--------------------------------------------------------------------------
|
58
58
|
render() {
|
59
|
-
return (h(Host, { key: '
|
59
|
+
return (h(Host, { key: 'b71ecf635ef91c3604665890c3eec5c5bc51651c' }, h("slot", { key: '77c4af2284404bc351b1eb93a81b2151f8e8cce1' })));
|
60
60
|
}
|
61
61
|
static get is() { return "arcgis-login"; }
|
62
62
|
static get encapsulation() { return "shadow"; }
|
@@ -61,7 +61,7 @@ export class BasemapGallery {
|
|
61
61
|
* StencilJS: Renders the component.
|
62
62
|
*/
|
63
63
|
render() {
|
64
|
-
return (h(Host, { key: '
|
64
|
+
return (h(Host, { key: '7fe5ef48d77de087f17498e2e1f3370a069e8629' }, h("div", { key: 'aca555c687352046a138343cab6f656234069644', ref: (el) => { this._basemapElement = el; } })));
|
65
65
|
}
|
66
66
|
/**
|
67
67
|
* StencilJS: Called once just after the component is fully loaded and the first render() occurs.
|
@@ -84,7 +84,7 @@ export class BufferTools {
|
|
84
84
|
* Renders the component.
|
85
85
|
*/
|
86
86
|
render() {
|
87
|
-
return (h(Host, { key: '
|
87
|
+
return (h(Host, { key: '63b775eca8dd10785df7b58be3a79eaa6cf4c049' }, this.appearance === "text" ? this._getTextBoxDisplay() : this._getSliderDisplay()));
|
88
88
|
}
|
89
89
|
//--------------------------------------------------------------------------
|
90
90
|
//
|
@@ -86,7 +86,7 @@ export class CardManager {
|
|
86
86
|
var _a, _b;
|
87
87
|
const featuresClass = ((_a = this._graphics) === null || _a === void 0 ? void 0 : _a.length) > 0 ? "" : "display-none";
|
88
88
|
const messageClass = ((_b = this._graphics) === null || _b === void 0 ? void 0 : _b.length) > 0 ? "display-none" : "";
|
89
|
-
return (h(Host, { key: '
|
89
|
+
return (h(Host, { key: '343554e5408de156f1973f6d1e3daa8f1ba90675' }, h("div", { key: '1852562a795002314236052351cab7c29d36854e', class: "overflow-auto height-full" }, h("calcite-shell", { key: '684f013e4397bc50743526357384f782a88a5cd3', class: "position-relative " + featuresClass }, h("div", { key: 'db6d9f4be5448b5596b22f2a4f49c6baefa88466' }, h("info-card", { key: 'be5cec81cae7ca00a5b57c8d9590541f78b67fbd', graphics: this._graphics, isLoading: this._cardLoading, isMobile: this.isMobile, mapView: this.mapView }))), h("calcite-shell", { key: 'df34e0ae6978298130970c60d21203f52fa32e4b', class: "position-relative " + messageClass }, h("div", { key: '9525a95dd21745e211ebf888da44eca6a6c17721', class: "padding-1" }, h("calcite-notice", { key: 'ade0e0a2f09bbe7b7bda6fdb2ce65ba81121e633', icon: "table", open: true }, h("div", { key: 'd6fce2d657e23738720e004177c510c3273017f4', slot: "message" }, this._translations.selectFeaturesToStart)))))));
|
90
90
|
}
|
91
91
|
//--------------------------------------------------------------------------
|
92
92
|
//
|
@@ -88,7 +88,7 @@ export class CreateFeature {
|
|
88
88
|
*/
|
89
89
|
render() {
|
90
90
|
const showSearchWidget = this.showSearchWidget ? '' : 'display-none';
|
91
|
-
return (h(Fragment, { key: '
|
91
|
+
return (h(Fragment, { key: 'e1427c13c0385279fcb0f122b50b891eac419ec4' }, h("div", { key: '039e8d8ff5792765c73cb23df37f37bacc0c9dda', id: "feature-form" }), h("div", { key: '94601056ec69000009f4b71b34a38cea28635d99', class: `search-widget ${showSearchWidget}`, id: "search-widget-ref" })));
|
92
92
|
}
|
93
93
|
//--------------------------------------------------------------------------
|
94
94
|
//
|
@@ -95,7 +95,7 @@ export class CreateRelatedFeature {
|
|
95
95
|
this.reactiveUtils = reactiveUtils;
|
96
96
|
}
|
97
97
|
render() {
|
98
|
-
return (h(Host, { key: '
|
98
|
+
return (h(Host, { key: '579af77dcac88043b178e711e0b47d7982c1c87f' }));
|
99
99
|
}
|
100
100
|
/**
|
101
101
|
* StencilJS: Called once just after the component is fully loaded and the first render() occurs.
|
@@ -53,7 +53,7 @@ export class CrowdsourceManager {
|
|
53
53
|
this.defaultLevel = "";
|
54
54
|
this.defaultOid = "";
|
55
55
|
this.defaultWebmap = "";
|
56
|
-
this.
|
56
|
+
this.introductionWindowEnabled = false;
|
57
57
|
this.enableAutoRefresh = false;
|
58
58
|
this.enableBasemap = true;
|
59
59
|
this.enableColumnReorder = true;
|
@@ -202,7 +202,7 @@ export class CrowdsourceManager {
|
|
202
202
|
render() {
|
203
203
|
// only avoid border when we have a header color that is not white
|
204
204
|
const borderClass = this.popupHeaderColor && this.popupHeaderColor !== "#FFFFFF" ? "border-width-0" : "";
|
205
|
-
return (h(Host, { key: '
|
205
|
+
return (h(Host, { key: '0f06df71cc424887b8dc4b4929670d94b6548085' }, h("calcite-shell", { key: 'c81a570fb771650de6193e45ffbebd03544eaf2e', class: "position-relative" }, h("calcite-panel", { key: '5e67c2bf9ed0df0080629989f93e89a145349abc', class: `width-full height-full ${borderClass}` }, this._getBody(this._layoutMode, this._panelOpen, this._hideTable)), this._getFooter())));
|
206
206
|
}
|
207
207
|
/**
|
208
208
|
* Called after each render
|
@@ -323,13 +323,20 @@ export class CrowdsourceManager {
|
|
323
323
|
const contentClass = layoutMode === ELayoutMode.HORIZONTAL ? "" : "display-flex";
|
324
324
|
const themeClass = this.theme === "dark" ? "calcite-mode-dark" : "calcite-mode-light";
|
325
325
|
return (h("calcite-panel", { class: "width-full height-full" }, h("div", { class: `width-full height-full overflow-hidden ${contentClass}` }, this._getMapAndCard(layoutMode, panelOpen, hideTable), this._getTable(layoutMode, panelOpen, hideTable)), this.coverPageEnabled &&
|
326
|
+
h("div", { class: "floating-container", onClick: this.coverPageButtonClick.bind(this) }, h("calcite-button", { appearance: "solid", class: `floating-button ${themeClass}`, "icon-start": "content-minimal", kind: "neutral", label: "", round: true, scale: "l", "split-child": "primary", width: "auto" })), this.introductionWindowEnabled &&
|
326
327
|
h("div", { class: "floating-container", onClick: this.infoButtonClick.bind(this) }, h("calcite-button", { appearance: "solid", class: `floating-button ${themeClass}`, "icon-start": "information-letter", kind: "neutral", label: "", round: true, scale: "l", "split-child": "primary", width: "auto" }))));
|
327
328
|
}
|
328
329
|
/**
|
329
330
|
* Emit the event when info button clicked
|
330
331
|
*/
|
331
332
|
infoButtonClick() {
|
332
|
-
this.
|
333
|
+
this.showIntroductionWindow.emit();
|
334
|
+
}
|
335
|
+
/**
|
336
|
+
* Emit the event when cover page button clicked
|
337
|
+
*/
|
338
|
+
coverPageButtonClick() {
|
339
|
+
this.showCoverPage.emit();
|
333
340
|
}
|
334
341
|
/**
|
335
342
|
* Get the map and card nodes based for the current layout options
|
@@ -698,7 +705,7 @@ export class CrowdsourceManager {
|
|
698
705
|
"reflect": false,
|
699
706
|
"defaultValue": "\"\""
|
700
707
|
},
|
701
|
-
"
|
708
|
+
"introductionWindowEnabled": {
|
702
709
|
"type": "boolean",
|
703
710
|
"mutable": false,
|
704
711
|
"complexType": {
|
@@ -710,9 +717,9 @@ export class CrowdsourceManager {
|
|
710
717
|
"optional": false,
|
711
718
|
"docs": {
|
712
719
|
"tags": [],
|
713
|
-
"text": "boolean: When true a introduction
|
720
|
+
"text": "boolean: When true a introduction window 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 introduction window."
|
714
721
|
},
|
715
|
-
"attribute": "introduction-
|
722
|
+
"attribute": "introduction-window-enabled",
|
716
723
|
"reflect": false,
|
717
724
|
"defaultValue": "false"
|
718
725
|
},
|
@@ -1210,8 +1217,8 @@ export class CrowdsourceManager {
|
|
1210
1217
|
}
|
1211
1218
|
static get events() {
|
1212
1219
|
return [{
|
1213
|
-
"method": "
|
1214
|
-
"name": "
|
1220
|
+
"method": "showIntroductionWindow",
|
1221
|
+
"name": "showIntroductionWindow",
|
1215
1222
|
"bubbles": true,
|
1216
1223
|
"cancelable": true,
|
1217
1224
|
"composed": true,
|
@@ -1224,6 +1231,21 @@ export class CrowdsourceManager {
|
|
1224
1231
|
"resolved": "void",
|
1225
1232
|
"references": {}
|
1226
1233
|
}
|
1234
|
+
}, {
|
1235
|
+
"method": "showCoverPage",
|
1236
|
+
"name": "showCoverPage",
|
1237
|
+
"bubbles": true,
|
1238
|
+
"cancelable": true,
|
1239
|
+
"composed": true,
|
1240
|
+
"docs": {
|
1241
|
+
"tags": [],
|
1242
|
+
"text": "Emitted on demand when a cover page button is clicked"
|
1243
|
+
},
|
1244
|
+
"complexType": {
|
1245
|
+
"original": "void",
|
1246
|
+
"resolved": "void",
|
1247
|
+
"references": {}
|
1248
|
+
}
|
1227
1249
|
}];
|
1228
1250
|
}
|
1229
1251
|
static get elementRef() { return "el"; }
|
@@ -90,18 +90,6 @@ export class CrowdsourceReporter {
|
|
90
90
|
await this.setMapView();
|
91
91
|
});
|
92
92
|
}
|
93
|
-
/**
|
94
|
-
* On Feature details change update the Layer title and the current selected layer id
|
95
|
-
* @param evt Event hold the details of current feature graphic in the info-card
|
96
|
-
*/
|
97
|
-
async selectionChanged(evt) {
|
98
|
-
void this.updatingFeatureDetails(true);
|
99
|
-
await this.setCurrentFeature(evt.detail.selectedFeature[0]);
|
100
|
-
void this.highlightOnMap(evt.detail.selectedFeature[0]);
|
101
|
-
this._selectedFeatureIndex = evt.detail.selectedFeatureIndex;
|
102
|
-
//update the feature details to reflect the like, dislike and comment values
|
103
|
-
await this._featureDetails.refresh(evt.detail.selectedFeature[0]);
|
104
|
-
}
|
105
93
|
//--------------------------------------------------------------------------
|
106
94
|
//
|
107
95
|
// Functions (lifecycle)
|
@@ -118,9 +106,9 @@ export class CrowdsourceReporter {
|
|
118
106
|
await this._initModules();
|
119
107
|
await this._getTranslations();
|
120
108
|
await ((_a = this.mapView) === null || _a === void 0 ? void 0 : _a.when(async () => {
|
121
|
-
//set configured
|
109
|
+
//set configured layers array which are enabled for data collection
|
122
110
|
this._layers = this.reportingOptions ? Object.keys(this.reportingOptions).filter((layerId) => {
|
123
|
-
return this.reportingOptions[layerId].
|
111
|
+
return this.reportingOptions[layerId].visible;
|
124
112
|
}) : [];
|
125
113
|
await this.setMapView();
|
126
114
|
}));
|
@@ -130,7 +118,7 @@ export class CrowdsourceReporter {
|
|
130
118
|
*/
|
131
119
|
render() {
|
132
120
|
const themeClass = this.theme === "dark" ? "calcite-mode-dark" : "calcite-mode-light";
|
133
|
-
return (h(Host, { key: '
|
121
|
+
return (h(Host, { key: '25711a088216a3fcf2aa5d39b81ebd124f004306' }, this._reportSubmitted && h("calcite-alert", { key: 'b8cf62929599eb873a52c7e7a9b056e25fd86c2a', "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: '6411e0e7b57fd58f8ba7987331271f0494ba113b', slot: "message" }, this.reportSubmittedMessage ? this.reportSubmittedMessage : this._translations.submitMsg)), this._featureCreationFailedErrorMsg && h("calcite-alert", { key: '67b28ad1e3493427227d2d59548a5eac80041dea', "auto-close": true, class: themeClass, icon: "x-octagon", kind: "danger", label: "", onCalciteAlertClose: () => { this._featureCreationFailedErrorMsg = ""; }, open: true, placement: "top" }, h("div", { key: '3ad206c32a217e6a9a5bb1e638ef3160fbff5db2', slot: "title" }, this._translations.error), h("div", { key: '7580dd6b3f81a9b0c4263fb9e71e2031e199b41d', slot: "message" }, this._featureCreationFailedErrorMsg)), this._commentSubmitted && h("calcite-alert", { key: '7be4c3b5d07e9f30551d19990462bb3d1152b2a3', "auto-close": true, class: 'report-submitted ' + themeClass, icon: "check-circle", kind: "success", label: "", onCalciteAlertClose: () => { this._commentSubmitted = false; }, open: true, placement: "top" }, h("div", { key: '41c01a889ed6732cf7dabf0945fbfb261a0f3a3b', slot: "message" }, this._translations.commentSubmittedMsg)), this._addingCommentFailed && h("calcite-alert", { key: '29bca2310f6877ec976fbe49ac39413593202a4d', "auto-close": true, class: themeClass, icon: "x-octagon", kind: "danger", label: "", onCalciteAlertClose: () => { this._addingCommentFailed = false; }, open: true, placement: "top" }, h("div", { key: '8a7860934cebec53462c46e0d979268c75fb9705', slot: "title" }, this._translations.error), h("div", { key: 'd675ee393e81f5104d87391075a9ae89b4077a45', slot: "message" }, this._translations.addingCommentFailedMsg)), h("div", { key: '1fce11b73759bc751de763e040d15d85a3fb347d' }, h("calcite-shell", { key: '71634d0d1b0fcbe92813ff9b514ec4e752bd3fd1', "content-behind": true }, this._getReporter())), this.filterModal()));
|
134
122
|
}
|
135
123
|
//--------------------------------------------------------------------------
|
136
124
|
//
|
@@ -165,6 +153,14 @@ export class CrowdsourceReporter {
|
|
165
153
|
layer.set('visible', !layerId || (layer.id === layerId));
|
166
154
|
});
|
167
155
|
}
|
156
|
+
/**
|
157
|
+
* Returns the layers configuration
|
158
|
+
* @param layerId string layerId of the selected layer
|
159
|
+
* @returns Configuration for the layerId
|
160
|
+
*/
|
161
|
+
_getLayersConfig(layerId) {
|
162
|
+
return this.reportingOptions && this.reportingOptions[layerId] ? this.reportingOptions[layerId] : null;
|
163
|
+
}
|
168
164
|
/**
|
169
165
|
* Get the reporter app functionality
|
170
166
|
* @protected
|
@@ -288,7 +284,10 @@ export class CrowdsourceReporter {
|
|
288
284
|
* @protected
|
289
285
|
*/
|
290
286
|
getChooseCategoryFlowItem() {
|
291
|
-
|
287
|
+
const onlyReportingLayers = this.reportingOptions ? Object.keys(this.reportingOptions).filter((layerId) => {
|
288
|
+
return this.reportingOptions[layerId].visible && this.reportingOptions[layerId].reporting && this._layerItemsHash[layerId] && this._layerItemsHash[layerId].supportsAdd;
|
289
|
+
}) : [];
|
290
|
+
return (h("calcite-flow-item", { collapsed: this.isMobile && this._sidePanelCollapsed, heading: this.reportButtonText ? this.reportButtonText : this._translations.createReportButtonText, onCalciteFlowItemBack: this.backFromSelectedPanel.bind(this) }, this.isMobile && this.getActionToExpandCollapsePanel(), h("calcite-panel", { "full-height": true, "full-width": true }, h("div", { class: "progress-bar" }, h("calcite-progress", { type: "determinate", value: this._updatedProgressBarStatus })), h("calcite-notice", { class: "notice-msg", icon: "lightbulb", kind: "success", open: true }, h("div", { slot: "message" }, this._translations.chooseCategoryMsg)), h("layer-list", { class: "height-full", layers: onlyReportingLayers, mapView: this.mapView, onLayerSelect: this.navigateToCreateFeature.bind(this), showFeatureCount: false, showNextIcon: false }))));
|
292
291
|
}
|
293
292
|
/**
|
294
293
|
* Get Feature create form of the selected feature layer
|
@@ -447,16 +446,22 @@ export class CrowdsourceReporter {
|
|
447
446
|
const layersListed = evt.detail;
|
448
447
|
//consider only the layers listed in the layer-list component
|
449
448
|
const allMapLayers = await getAllLayers(this.mapView);
|
449
|
+
const reportingEnabledLayerIds = [];
|
450
450
|
this._validLayers = [];
|
451
451
|
allMapLayers.forEach((eachLayer) => {
|
452
|
+
var _a;
|
452
453
|
if (layersListed.includes(eachLayer.id)) {
|
453
454
|
this._validLayers.push(eachLayer);
|
455
|
+
//create list of reporting enabled layers
|
456
|
+
if (((_a = this._getLayersConfig(eachLayer.id)) === null || _a === void 0 ? void 0 : _a.reporting) && this._layerItemsHash[eachLayer.id] && this._layerItemsHash[eachLayer.id].supportsAdd) {
|
457
|
+
reportingEnabledLayerIds.push(eachLayer.id);
|
458
|
+
}
|
454
459
|
}
|
455
460
|
});
|
456
461
|
//handleMap click on layer list loaded
|
457
462
|
this.handleMapClick();
|
458
|
-
//
|
459
|
-
this._hasValidLayers =
|
463
|
+
//When we have any reporting layer then only show the create report button on layerList
|
464
|
+
this._hasValidLayers = reportingEnabledLayerIds.length > 0;
|
460
465
|
//navigate to the feature details if URL params found
|
461
466
|
if (!this._urlParamsLoaded) {
|
462
467
|
this._urlParamsLoaded = true;
|
@@ -484,8 +489,9 @@ export class CrowdsourceReporter {
|
|
484
489
|
backFromSelectedPanel() {
|
485
490
|
this._updatedProgressBarStatus = 0.25;
|
486
491
|
const updatedFlowItems = [...this._flowItems];
|
487
|
-
// when
|
488
|
-
if (updatedFlowItems[updatedFlowItems.length - 1]
|
492
|
+
// when back from comment details or add comment page don't clear the highlighted feature of map
|
493
|
+
if (!(updatedFlowItems[updatedFlowItems.length - 1] === 'comment-details' ||
|
494
|
+
updatedFlowItems[updatedFlowItems.length - 1] === 'add-comment')) {
|
489
495
|
this.clearHighlights();
|
490
496
|
}
|
491
497
|
updatedFlowItems.pop();
|
@@ -530,6 +536,19 @@ export class CrowdsourceReporter {
|
|
530
536
|
async updatingFeatureDetails(isLoading) {
|
531
537
|
this._showLoadingIndicator = isLoading;
|
532
538
|
}
|
539
|
+
/**
|
540
|
+
* On Feature details change update the Layer title and the current selected layer id
|
541
|
+
* @param evt Event hold the details of current feature graphic from the feature-details
|
542
|
+
* @protected
|
543
|
+
*/
|
544
|
+
async selectionChanged(evt) {
|
545
|
+
void this.updatingFeatureDetails(true);
|
546
|
+
await this.setCurrentFeature(evt.detail.selectedFeature[0]);
|
547
|
+
void this.highlightOnMap(evt.detail.selectedFeature[0]);
|
548
|
+
this._selectedFeatureIndex = evt.detail.selectedFeatureIndex;
|
549
|
+
//update the feature details to reflect the like, dislike and comment values
|
550
|
+
await this._featureDetails.refresh(evt.detail.selectedFeature[0]);
|
551
|
+
}
|
533
552
|
/**
|
534
553
|
* When comment is selected from list store that and show comment details
|
535
554
|
* @param evt Event which has details of selected feature
|
@@ -547,10 +566,11 @@ export class CrowdsourceReporter {
|
|
547
566
|
* @protected
|
548
567
|
*/
|
549
568
|
getFeatureListFlowItem(layerId, layerName) {
|
550
|
-
var _a;
|
569
|
+
var _a, _b;
|
551
570
|
const layerExpressions = (_a = this.layerExpressions) === null || _a === void 0 ? void 0 : _a.filter((exp) => exp.id === this._selectedLayerId);
|
571
|
+
const canCreateReports = ((_b = this._getLayersConfig(this._selectedLayerId)) === null || _b === void 0 ? void 0 : _b.reporting) && this._layerItemsHash[this._selectedLayerId].supportsAdd;
|
552
572
|
const showFilterIcon = (layerExpressions === null || layerExpressions === void 0 ? void 0 : layerExpressions.length) > 0;
|
553
|
-
return (h("calcite-flow-item", { collapsed: this.isMobile && this._sidePanelCollapsed, heading: layerName, loading: this._showLoadingIndicator, onCalciteFlowItemBack: this.backFromSelectedPanel.bind(this) }, this._toggleSort(), h("calcite-action", { icon: "sort-ascending-arrow", id: "sort-popover", slot: "header-actions-end", text: this._translations.sort, title: this._translations.sort }), showFilterIcon && h("calcite-action", { icon: "filter", indicator: this._filterActive, onClick: this._toggleFilter.bind(this), slot: "header-actions-end", text: this._translations.filter, title: this._translations.filter }), this.isMobile && this.getActionToExpandCollapsePanel(), this.enableNewReports &&
|
573
|
+
return (h("calcite-flow-item", { collapsed: this.isMobile && this._sidePanelCollapsed, heading: layerName, loading: this._showLoadingIndicator, onCalciteFlowItemBack: this.backFromSelectedPanel.bind(this) }, this._toggleSort(), h("calcite-action", { icon: "sort-ascending-arrow", id: "sort-popover", slot: "header-actions-end", text: this._translations.sort, title: this._translations.sort }), showFilterIcon && h("calcite-action", { icon: "filter", indicator: this._filterActive, onClick: this._toggleFilter.bind(this), slot: "header-actions-end", text: this._translations.filter, title: this._translations.filter }), this.isMobile && this.getActionToExpandCollapsePanel(), this.enableNewReports && canCreateReports &&
|
554
574
|
h("calcite-button", { appearance: "solid", onClick: this.navigateToCreateFeature.bind(this), slot: "footer", width: "full" }, this.reportButtonText ? this.reportButtonText : this._translations.createReportButtonText), h("calcite-panel", { "full-height": true }, h("feature-list", { class: "height-full", highlightOnHover: true, mapView: this.mapView, noFeaturesFoundMsg: this._translations.featureErrorMsg, onFeatureSelect: this.onFeatureSelectFromList.bind(this), pageSize: 30, ref: el => this._featureList = el, selectedLayerId: layerId, sortingInfo: this._updatedSorting }))));
|
555
575
|
}
|
556
576
|
/**
|
@@ -558,8 +578,9 @@ export class CrowdsourceReporter {
|
|
558
578
|
* @returns Node
|
559
579
|
*/
|
560
580
|
getFeatureDetailsFlowItem() {
|
561
|
-
|
562
|
-
|
581
|
+
var _a;
|
582
|
+
const showCommentBtn = ((_a = this._getLayersConfig(this._selectedLayerId)) === null || _a === void 0 ? void 0 : _a.comment) && this._selectedLayer.relationships.length > 0;
|
583
|
+
return (h("calcite-flow-item", { collapsed: this.isMobile && this._sidePanelCollapsed, heading: this._selectedLayerName, loading: this._showLoadingIndicator, onCalciteFlowItemBack: this.backFromSelectedPanel.bind(this) }, this.isMobile && this.getActionToExpandCollapsePanel(), h("instant-apps-social-share", { autoUpdateShareUrl: false, embed: false, popoverButtonIconScale: "s", ref: el => this._shareNode = el, removePopoverOffset: true, scale: "s", shareButtonColor: "neutral", shareButtonType: "action", slot: "header-actions-end", socialMedia: true, view: this.mapView }), this._selectedFeature.length > 1 && this.getFeaturesPagination(), h("calcite-panel", null, h("feature-details", { class: 'full-height', graphics: this._selectedFeature, layerItemsHash: this._layerItemsHash, mapView: this.mapView, onCommentSelect: this.onCommentSelectFromList.bind(this), onFeatureSelectionChange: this.selectionChanged.bind(this), onLoadingStatus: (evt) => void this.updatingFeatureDetails(evt.detail), ref: el => this._featureDetails = el, reportingOptions: this.reportingOptions }), showCommentBtn &&
|
563
584
|
h("calcite-button", { appearance: "solid", onClick: () => this._flowItems = [...this._flowItems, "add-comment"], slot: "footer", width: "full" }, this._translations.comment))));
|
564
585
|
}
|
565
586
|
/**
|
@@ -575,7 +596,7 @@ export class CrowdsourceReporter {
|
|
575
596
|
* @returns Node
|
576
597
|
*/
|
577
598
|
getCommentDetailsFlowItem() {
|
578
|
-
return (h("calcite-flow-item", { collapsed: this.isMobile && this._sidePanelCollapsed, heading: this._relatedTable.title, onCalciteFlowItemBack: this.backFromSelectedPanel.bind(this) }, this.isMobile && this.getActionToExpandCollapsePanel(), h("calcite-panel", { "full-height": true }, h("info-card", { allowEditing: false, graphics: this._selectedRelatedFeature, highlightEnabled: false, isLoading: false, isMobile: false, mapView: this.mapView, paginationEnabled: false
|
599
|
+
return (h("calcite-flow-item", { collapsed: this.isMobile && this._sidePanelCollapsed, heading: this._relatedTable.title, onCalciteFlowItemBack: this.backFromSelectedPanel.bind(this) }, this.isMobile && this.getActionToExpandCollapsePanel(), h("calcite-panel", { "full-height": true }, h("info-card", { allowEditing: false, graphics: this._selectedRelatedFeature, highlightEnabled: false, isLoading: false, isMobile: false, mapView: this.mapView, paginationEnabled: false }))));
|
579
600
|
}
|
580
601
|
/**
|
581
602
|
* Returns the calcite-flow item for add comment
|
@@ -597,13 +618,14 @@ export class CrowdsourceReporter {
|
|
597
618
|
* @param selectedFeature Graphic currently shown in feature details
|
598
619
|
*/
|
599
620
|
async setCurrentFeature(selectedFeature) {
|
621
|
+
var _a;
|
600
622
|
this._currentFeature = selectedFeature;
|
601
623
|
if (selectedFeature && selectedFeature.layer) {
|
602
624
|
const layer = selectedFeature.layer;
|
603
625
|
void this.setSelectedLayer(layer.id, layer.title);
|
604
626
|
this._currentFeatureId = selectedFeature.attributes[layer.objectIdField];
|
605
627
|
// check if comments are configured and relationship is present then only get the related table
|
606
|
-
const isCommentTablePresent = this.
|
628
|
+
const isCommentTablePresent = ((_a = this._getLayersConfig(layer.id)) === null || _a === void 0 ? void 0 : _a.comment) && layer.relationships.length > 0;
|
607
629
|
if (isCommentTablePresent) {
|
608
630
|
await this.getRelatedTable();
|
609
631
|
}
|
@@ -717,12 +739,12 @@ export class CrowdsourceReporter {
|
|
717
739
|
await this.setSelectedFeatures(reportingLayerGraphics);
|
718
740
|
//if featureDetails not open then add it to the list else just reInit flowItems which will update details with newly selected features
|
719
741
|
// eslint-disable-next-line unicorn/prefer-ternary
|
720
|
-
if (this._flowItems.length && this._flowItems
|
721
|
-
this._flowItems = [...this._flowItems, "feature-details"];
|
742
|
+
if (this._flowItems.length && this._flowItems.includes("feature-details")) {
|
743
|
+
this._flowItems = [...this._flowItems.slice(0, this._flowItems.indexOf("feature-details") + 1)];
|
744
|
+
await this.highlightOnMap(clickedGraphics[0]);
|
722
745
|
}
|
723
746
|
else {
|
724
|
-
this._flowItems = [...this._flowItems];
|
725
|
-
void this.highlightOnMap(clickedGraphics[0]);
|
747
|
+
this._flowItems = [...this._flowItems, "feature-details"];
|
726
748
|
}
|
727
749
|
}
|
728
750
|
// if clicked graphic's layer is from non reporting layers then show popup on map
|
@@ -765,13 +787,10 @@ export class CrowdsourceReporter {
|
|
765
787
|
* @returns array of editable layer ids
|
766
788
|
*/
|
767
789
|
reduceToConfiguredLayers(hash) {
|
768
|
-
var _a;
|
769
|
-
const configuredLayers = ((_a = this._layers) === null || _a === void 0 ? void 0 : _a.length) > 0 ? this._layers : [];
|
770
790
|
return Object.keys(hash).reduce((prev, cur) => {
|
771
|
-
|
772
|
-
|
773
|
-
|
774
|
-
}
|
791
|
+
// check if reporting options exists consider the visible prop if else just check the supports Add
|
792
|
+
const showLayer = this.reportingOptions ? this._getLayersConfig(cur).visible
|
793
|
+
: hash[cur].supportsAdd;
|
775
794
|
if (showLayer) {
|
776
795
|
prev.push(cur);
|
777
796
|
}
|
@@ -792,18 +811,19 @@ export class CrowdsourceReporter {
|
|
792
811
|
}
|
793
812
|
});
|
794
813
|
this._editableLayerIds = this.reduceToConfiguredLayers(layerItemsHash);
|
814
|
+
this._layerItemsHash = layerItemsHash;
|
795
815
|
}
|
796
816
|
/**
|
797
817
|
* renders feature list
|
798
818
|
* @protected
|
799
819
|
*/
|
800
820
|
async renderFeaturesList() {
|
821
|
+
this._flowItems = ['feature-list'];
|
801
822
|
const evt = {
|
802
823
|
detail: this._editableLayerIds
|
803
824
|
};
|
804
825
|
await this.layerListLoaded(evt);
|
805
826
|
void this.setSelectedLayer(this._validLayers[0].id, this._validLayers[0].title);
|
806
|
-
this._flowItems = ['feature-list'];
|
807
827
|
}
|
808
828
|
/**
|
809
829
|
* Updates the share url for current selected feature
|
@@ -1421,13 +1441,4 @@ export class CrowdsourceReporter {
|
|
1421
1441
|
"methodName": "mapViewWatchHandler"
|
1422
1442
|
}];
|
1423
1443
|
}
|
1424
|
-
static get listeners() {
|
1425
|
-
return [{
|
1426
|
-
"name": "selectionChanged",
|
1427
|
-
"method": "selectionChanged",
|
1428
|
-
"target": "window",
|
1429
|
-
"capture": false,
|
1430
|
-
"passive": false
|
1431
|
-
}];
|
1432
|
-
}
|
1433
1444
|
}
|
@@ -5,7 +5,7 @@
|
|
5
5
|
.buttons-container{
|
6
6
|
align-items: center;
|
7
7
|
display: flex;
|
8
|
-
padding: 10px
|
8
|
+
padding: 10px;
|
9
9
|
color: var(--calcite-color-text-1) !important;
|
10
10
|
background-color: var(--calcite-color-foreground-1) !important;
|
11
11
|
border-block-start: 1px solid var(--calcite-color-border-3);
|
@@ -15,7 +15,7 @@
|
|
15
15
|
.comment-btn{
|
16
16
|
display: flex;
|
17
17
|
gap: 5px;
|
18
|
-
width: 37px;
|
19
18
|
font-size: var(--calcite-font-size--2);
|
20
19
|
align-items: center;
|
20
|
+
padding: 0 0.5rem;
|
21
21
|
}
|
@@ -30,6 +30,7 @@ export class FeatureDetails {
|
|
30
30
|
this.mapView = undefined;
|
31
31
|
this.graphics = undefined;
|
32
32
|
this.reportingOptions = undefined;
|
33
|
+
this.layerItemsHash = undefined;
|
33
34
|
this._likeFieldAvailable = false;
|
34
35
|
this._likeCount = 0;
|
35
36
|
this._disLikeCount = 0;
|
@@ -109,12 +110,12 @@ export class FeatureDetails {
|
|
109
110
|
var _a, _b, _c, _d, _e;
|
110
111
|
//When related features found show comments list of only those features else comments list will be empty
|
111
112
|
const commentsListWhereClause = ((_a = this._relatedFeaturesOIDs) === null || _a === void 0 ? void 0 : _a.length) > 0 ? `objectId in(${this._relatedFeaturesOIDs})` : '1=0';
|
112
|
-
return (h("calcite-panel", { key: '
|
113
|
-
h("div", { key: '
|
114
|
-
h("div", { key: '
|
115
|
-
h("calcite-button", { key: '
|
116
|
-
h("calcite-button", { key: '
|
117
|
-
h("feature-list", { key: '
|
113
|
+
return (h("calcite-panel", { key: 'f8d1d282a6ebdb4d5a64efd96d88329d375b7fe1', "full-height": true }, h("info-card", { key: '3cfca85af149ab445973510ff1a9f94e22c5c833', allowEditing: false, graphics: this.graphics, highlightEnabled: false, isLoading: false, isMobile: false, mapView: this.mapView, onSelectionChanged: (e) => { this.featureSelectionChange.emit(e.detail); }, paginationEnabled: false, position: "relative", ref: el => this._infoCard = el }), (this._likeFieldAvailable || this._dislikeFieldAvailable || this._commentsAvailable) &&
|
114
|
+
h("div", { key: 'a3242d417cef788f0f677bf21c65fb9aaa44f8b2', class: "buttons-container" }, this._commentsAvailable &&
|
115
|
+
h("div", { key: '9dcfccc0a48b719d14cb08737d654000a27e21cc', class: "comment-btn" }, h("span", { key: 'b68cafd0cebfa91c12f32f648ec2f71a51e3b9da' }, this._relatedFeaturesOIDs.length), h("calcite-icon", { key: 'f2b9c34ac64a5cb7692f80cd73658f077525eee4', icon: "speech-bubble", scale: 's' })), this._likeFieldAvailable &&
|
116
|
+
h("calcite-button", { key: '7a4ec79205b3eccceb7d43de2c227d8407c24a26', 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 &&
|
117
|
+
h("calcite-button", { key: '4634f8aeb114f97c9ceaae8eac5da86afa89f217', 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 &&
|
118
|
+
h("feature-list", { key: '30559c6f28a741264972677cef1f182f1012f73f', class: "height-full", mapView: this.mapView, onFeatureSelect: (e) => { this.commentSelect.emit(e.detail); }, pageSize: 5, ref: el => this._commentsList = el, selectedLayerId: this.relatedTableId, showErrorWhenNoFeatures: false, showInitialLoading: false, textSize: "small", whereClause: commentsListWhereClause })));
|
118
119
|
}
|
119
120
|
/**
|
120
121
|
* Load esri javascript api modules
|
@@ -151,7 +152,8 @@ export class FeatureDetails {
|
|
151
152
|
async processComments() {
|
152
153
|
var _a;
|
153
154
|
const selectedLayer = this._selectedGraphic.layer;
|
154
|
-
const commentsConfigured = this.reportingOptions[selectedLayer.id]
|
155
|
+
const commentsConfigured = this.reportingOptions && this.reportingOptions[selectedLayer.id] &&
|
156
|
+
this.reportingOptions[selectedLayer.id].comment && ((_a = selectedLayer.relationships) === null || _a === void 0 ? void 0 : _a.length) > 0;
|
155
157
|
if (commentsConfigured) {
|
156
158
|
//Get comments table id from map
|
157
159
|
const relatedTableIdFromRelnship = selectedLayer.relationships[0].relatedTableId;
|
@@ -216,7 +218,7 @@ export class FeatureDetails {
|
|
216
218
|
}
|
217
219
|
//Check if selected layer have the configured like and dislike field and it is of integer types
|
218
220
|
selectedLayer.fields.forEach((eachField) => {
|
219
|
-
if (this._validFieldTypes.indexOf(eachField.type) > -1) {
|
221
|
+
if (this._validFieldTypes.indexOf(eachField.type) > -1 && this.layerItemsHash[selectedLayer.id].supportsUpdate) {
|
220
222
|
if (eachField.name === likeField && this.reportingOptions[selectedLayer.id].like) {
|
221
223
|
likeFieldAvailable = true;
|
222
224
|
}
|
@@ -251,12 +253,12 @@ export class FeatureDetails {
|
|
251
253
|
//Check if selected layer have the configured like and dislike fields
|
252
254
|
//also, get the current value for like and dislike field from the attributes
|
253
255
|
selectedLayer.fields.forEach((eachField) => {
|
254
|
-
if (this._validFieldTypes.indexOf(eachField.type) > -1) {
|
255
|
-
if (eachField.name === this._likeField && this.reportingOptions[
|
256
|
+
if (this._validFieldTypes.indexOf(eachField.type) > -1 && this.layerItemsHash[selectedLayer.id].supportsUpdate) {
|
257
|
+
if (eachField.name === this._likeField && this.reportingOptions[selectedLayer.id].like) {
|
256
258
|
this._likeFieldAvailable = true;
|
257
259
|
this._likeCount = this._selectedGraphic.attributes[eachField.name];
|
258
260
|
}
|
259
|
-
else if (eachField.name === this._dislikeField && this.reportingOptions[
|
261
|
+
else if (eachField.name === this._dislikeField && this.reportingOptions[selectedLayer.id].dislike) {
|
260
262
|
this._dislikeFieldAvailable = true;
|
261
263
|
this._disLikeCount = this._selectedGraphic.attributes[eachField.name];
|
262
264
|
}
|
@@ -455,6 +457,27 @@ export class FeatureDetails {
|
|
455
457
|
"tags": [],
|
456
458
|
"text": "IReportingOptions: Key options for reporting"
|
457
459
|
}
|
460
|
+
},
|
461
|
+
"layerItemsHash": {
|
462
|
+
"type": "unknown",
|
463
|
+
"mutable": false,
|
464
|
+
"complexType": {
|
465
|
+
"original": "ILayerItemsHash",
|
466
|
+
"resolved": "ILayerItemsHash",
|
467
|
+
"references": {
|
468
|
+
"ILayerItemsHash": {
|
469
|
+
"location": "import",
|
470
|
+
"path": "../layer-list/layer-list",
|
471
|
+
"id": "src/components/layer-list/layer-list.tsx::ILayerItemsHash"
|
472
|
+
}
|
473
|
+
}
|
474
|
+
},
|
475
|
+
"required": false,
|
476
|
+
"optional": false,
|
477
|
+
"docs": {
|
478
|
+
"tags": [],
|
479
|
+
"text": "ILayerItemsHash: LayerDetailsHash for each layer in the map"
|
480
|
+
}
|
458
481
|
}
|
459
482
|
};
|
460
483
|
}
|
@@ -487,8 +510,8 @@ export class FeatureDetails {
|
|
487
510
|
"references": {}
|
488
511
|
}
|
489
512
|
}, {
|
490
|
-
"method": "
|
491
|
-
"name": "
|
513
|
+
"method": "commentSelect",
|
514
|
+
"name": "commentSelect",
|
492
515
|
"bubbles": true,
|
493
516
|
"cancelable": true,
|
494
517
|
"composed": true,
|
@@ -506,6 +529,26 @@ export class FeatureDetails {
|
|
506
529
|
}
|
507
530
|
}
|
508
531
|
}
|
532
|
+
}, {
|
533
|
+
"method": "featureSelectionChange",
|
534
|
+
"name": "featureSelectionChange",
|
535
|
+
"bubbles": true,
|
536
|
+
"cancelable": true,
|
537
|
+
"composed": true,
|
538
|
+
"docs": {
|
539
|
+
"tags": [],
|
540
|
+
"text": "Emitted on demand when the selected index changes"
|
541
|
+
},
|
542
|
+
"complexType": {
|
543
|
+
"original": "{ selectedFeature: __esri.Graphic[], selectedFeatureIndex: number }",
|
544
|
+
"resolved": "{ selectedFeature: Graphic[]; selectedFeatureIndex: number; }",
|
545
|
+
"references": {
|
546
|
+
"___esri": {
|
547
|
+
"location": "global",
|
548
|
+
"id": "global::___esri"
|
549
|
+
}
|
550
|
+
}
|
551
|
+
}
|
509
552
|
}];
|
510
553
|
}
|
511
554
|
static get methods() {
|