@esri/solutions-components 0.8.22 → 0.8.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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
|
@@ -3,105 +3,7 @@
|
|
|
3
3
|
* Licensed under the Apache License, Version 2.0
|
|
4
4
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
5
5
|
*/
|
|
6
|
-
import {
|
|
7
|
-
import { c as componentFocusable, s as setUpLoadableComponent, a as setComponentLoaded } from './loadable.js';
|
|
8
|
-
import { d as defineCustomElement$3 } from './avatar.js';
|
|
9
|
-
import { d as defineCustomElement$2 } from './icon.js';
|
|
10
|
-
|
|
11
|
-
/*!
|
|
12
|
-
* All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
13
|
-
* See https://github.com/Esri/calcite-design-system/blob/main/LICENSE.md for details.
|
|
14
|
-
* v2.8.2
|
|
15
|
-
*/
|
|
16
|
-
const CSS = {
|
|
17
|
-
textContainer: "text-container",
|
|
18
|
-
fullName: "full-name",
|
|
19
|
-
username: "username",
|
|
20
|
-
button: "button",
|
|
21
|
-
};
|
|
22
|
-
|
|
23
|
-
const navigationUserCss = ":host{display:inline-flex;outline:2px solid transparent;outline-offset:2px}:host .button{background-color:transparent;border:none;margin:0px;display:flex;cursor:pointer;align-items:center;justify-content:center;font-family:var(--calcite-font-family);font-size:var(--calcite-font-size-0);line-height:1.25rem;outline-color:transparent;transition:background-color, block-size, border-color, box-shadow, color, inset-block-end, inset-block-start, inset-inline-end, inset-inline-start inset-size, opacity, outline-color, transform var(--calcite-animation-timing) ease-in-out 0s, outline 0s, outline-offset 0s;border-block-end:2px solid transparent}:host(:hover) .button,:host(:focus) .button{background-color:var(--calcite-color-foreground-2)}:host(:focus) .button{outline:2px solid var(--calcite-ui-focus-color, var(--calcite-color-brand));outline-offset:calc(\n -2px *\n calc(\n 1 -\n 2 * clamp(\n 0,\n var(--calcite-offset-invert-focus),\n 1\n )\n )\n )}:host(:active) .button{background-color:var(--calcite-color-foreground-3);color:var(--calcite-color-text-1)}:host([active]) .button{border-color:var(--calcite-color-brand);color:var(--calcite-color-text-1);--calcite-ui-icon-color:var(--calcite-color-brand)}.text-container{margin-block-start:0.125rem;display:flex;flex-direction:column;padding-inline:1rem;text-align:start}calcite-avatar{padding-inline:1rem}calcite-avatar~.text-container{padding-inline-start:0px}.full-name{margin-inline-start:0px;font-size:var(--calcite-font-size-0);font-weight:var(--calcite-font-weight-medium);color:var(--calcite-color-text-1)}.username{color:var(--calcite-color-text-2);font-size:var(--calcite-font-size--1)}:host([hidden]){display:none}[hidden]{display:none}";
|
|
24
|
-
const CalciteNavigationUserStyle0 = navigationUserCss;
|
|
25
|
-
|
|
26
|
-
const CalciteNavigationUser$1 = /*@__PURE__*/ proxyCustomElement(class CalciteNavigationUser extends HTMLElement {
|
|
27
|
-
constructor() {
|
|
28
|
-
super();
|
|
29
|
-
this.__registerHost();
|
|
30
|
-
this.__attachShadow();
|
|
31
|
-
this.active = undefined;
|
|
32
|
-
this.fullName = undefined;
|
|
33
|
-
this.label = undefined;
|
|
34
|
-
this.textDisabled = false;
|
|
35
|
-
this.thumbnail = undefined;
|
|
36
|
-
this.userId = undefined;
|
|
37
|
-
this.username = undefined;
|
|
38
|
-
}
|
|
39
|
-
//--------------------------------------------------------------------------
|
|
40
|
-
//
|
|
41
|
-
// Public Methods
|
|
42
|
-
//
|
|
43
|
-
//--------------------------------------------------------------------------
|
|
44
|
-
/** Sets focus on the component. */
|
|
45
|
-
async setFocus() {
|
|
46
|
-
await componentFocusable(this);
|
|
47
|
-
this.el.focus();
|
|
48
|
-
}
|
|
49
|
-
//--------------------------------------------------------------------------
|
|
50
|
-
//
|
|
51
|
-
// Lifecycle
|
|
52
|
-
//
|
|
53
|
-
//--------------------------------------------------------------------------
|
|
54
|
-
componentWillLoad() {
|
|
55
|
-
setUpLoadableComponent(this);
|
|
56
|
-
}
|
|
57
|
-
componentDidLoad() {
|
|
58
|
-
setComponentLoaded(this);
|
|
59
|
-
}
|
|
60
|
-
// --------------------------------------------------------------------------
|
|
61
|
-
//
|
|
62
|
-
// Render Methods
|
|
63
|
-
//
|
|
64
|
-
// --------------------------------------------------------------------------
|
|
65
|
-
render() {
|
|
66
|
-
return (h(Host, { key: '869bc0b518ff407bf3f110ebda48571f456229a8' }, h("button", { key: '0cb5497ebcbf9fad2bfb6ffdd3bfad151594460d', "aria-label": this.label, class: CSS.button }, h("calcite-avatar", { key: '6de54637d077afa83f7520636037b6da33b24334', "full-name": this.fullName, label: this.label, thumbnail: this.thumbnail, "user-id": this.userId, username: this.username }), (this.fullName || this.username) && !this.textDisabled && (h("div", { key: '0d0be3d6ba276d6c3e24a67b7085dd75e56b3e5b', class: CSS.textContainer }, this.fullName && (h("span", { class: CSS.fullName, key: CSS.fullName }, this.fullName)), this.username && (h("span", { class: CSS.username, key: CSS.username }, this.username)))))));
|
|
67
|
-
}
|
|
68
|
-
static get delegatesFocus() { return true; }
|
|
69
|
-
get el() { return this; }
|
|
70
|
-
static get style() { return CalciteNavigationUserStyle0; }
|
|
71
|
-
}, [17, "calcite-navigation-user", {
|
|
72
|
-
"active": [516],
|
|
73
|
-
"fullName": [1, "full-name"],
|
|
74
|
-
"label": [1],
|
|
75
|
-
"textDisabled": [516, "text-disabled"],
|
|
76
|
-
"thumbnail": [1],
|
|
77
|
-
"userId": [1, "user-id"],
|
|
78
|
-
"username": [1],
|
|
79
|
-
"setFocus": [64]
|
|
80
|
-
}]);
|
|
81
|
-
function defineCustomElement$1() {
|
|
82
|
-
if (typeof customElements === "undefined") {
|
|
83
|
-
return;
|
|
84
|
-
}
|
|
85
|
-
const components = ["calcite-navigation-user", "calcite-avatar", "calcite-icon"];
|
|
86
|
-
components.forEach(tagName => { switch (tagName) {
|
|
87
|
-
case "calcite-navigation-user":
|
|
88
|
-
if (!customElements.get(tagName)) {
|
|
89
|
-
customElements.define(tagName, CalciteNavigationUser$1);
|
|
90
|
-
}
|
|
91
|
-
break;
|
|
92
|
-
case "calcite-avatar":
|
|
93
|
-
if (!customElements.get(tagName)) {
|
|
94
|
-
defineCustomElement$3();
|
|
95
|
-
}
|
|
96
|
-
break;
|
|
97
|
-
case "calcite-icon":
|
|
98
|
-
if (!customElements.get(tagName)) {
|
|
99
|
-
defineCustomElement$2();
|
|
100
|
-
}
|
|
101
|
-
break;
|
|
102
|
-
} });
|
|
103
|
-
}
|
|
104
|
-
defineCustomElement$1();
|
|
6
|
+
import { C as CalciteNavigationUser$1, d as defineCustomElement$1 } from './navigation-user.js';
|
|
105
7
|
|
|
106
8
|
const CalciteNavigationUser = CalciteNavigationUser$1;
|
|
107
9
|
const defineCustomElement = defineCustomElement$1;
|
|
@@ -94,7 +94,7 @@ const CardManager = /*@__PURE__*/ proxyCustomElement(class CardManager extends H
|
|
|
94
94
|
var _a, _b;
|
|
95
95
|
const featuresClass = ((_a = this._graphics) === null || _a === void 0 ? void 0 : _a.length) > 0 ? "" : "display-none";
|
|
96
96
|
const messageClass = ((_b = this._graphics) === null || _b === void 0 ? void 0 : _b.length) > 0 ? "display-none" : "";
|
|
97
|
-
return (h(Host, { key: '
|
|
97
|
+
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)))))));
|
|
98
98
|
}
|
|
99
99
|
//--------------------------------------------------------------------------
|
|
100
100
|
//
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
|
7
7
|
import { g as getLocaleComponentStrings } from './locale.js';
|
|
8
|
-
import {
|
|
8
|
+
import { a as commonjsRequire, c as commonjsGlobal } from './esri-loader.js';
|
|
9
9
|
import { d as defineCustomElement$a } from './action.js';
|
|
10
10
|
import { d as defineCustomElement$9 } from './action-menu.js';
|
|
11
11
|
import { d as defineCustomElement$8 } from './button.js';
|
|
@@ -84,7 +84,7 @@ const CreateFeature = /*@__PURE__*/ proxyCustomElement(class CreateFeature exten
|
|
|
84
84
|
*/
|
|
85
85
|
render() {
|
|
86
86
|
const showSearchWidget = this.showSearchWidget ? '' : 'display-none';
|
|
87
|
-
return (h(Fragment, { key: '
|
|
87
|
+
return (h(Fragment, { key: 'e1427c13c0385279fcb0f122b50b891eac419ec4' }, h("div", { key: '039e8d8ff5792765c73cb23df37f37bacc0c9dda', id: "feature-form" }), h("div", { key: '94601056ec69000009f4b71b34a38cea28635d99', class: `search-widget ${showSearchWidget}`, id: "search-widget-ref" })));
|
|
88
88
|
}
|
|
89
89
|
//--------------------------------------------------------------------------
|
|
90
90
|
//
|
|
@@ -89,7 +89,7 @@ const CreateRelatedFeature = /*@__PURE__*/ proxyCustomElement(class CreateRelate
|
|
|
89
89
|
this.reactiveUtils = reactiveUtils;
|
|
90
90
|
}
|
|
91
91
|
render() {
|
|
92
|
-
return (h(Host, { key: '
|
|
92
|
+
return (h(Host, { key: '579af77dcac88043b178e711e0b47d7982c1c87f' }));
|
|
93
93
|
}
|
|
94
94
|
/**
|
|
95
95
|
* StencilJS: Called once just after the component is fully loaded and the first render() occurs.
|
|
@@ -72,7 +72,8 @@ const CrowdsourceManager$1 = /*@__PURE__*/ proxyCustomElement(class CrowdsourceM
|
|
|
72
72
|
constructor() {
|
|
73
73
|
super();
|
|
74
74
|
this.__registerHost();
|
|
75
|
-
this.
|
|
75
|
+
this.showIntroductionWindow = createEvent(this, "showIntroductionWindow", 7);
|
|
76
|
+
this.showCoverPage = createEvent(this, "showCoverPage", 7);
|
|
76
77
|
//--------------------------------------------------------------------------
|
|
77
78
|
//
|
|
78
79
|
// Properties (protected)
|
|
@@ -102,7 +103,7 @@ const CrowdsourceManager$1 = /*@__PURE__*/ proxyCustomElement(class CrowdsourceM
|
|
|
102
103
|
this.defaultLevel = "";
|
|
103
104
|
this.defaultOid = "";
|
|
104
105
|
this.defaultWebmap = "";
|
|
105
|
-
this.
|
|
106
|
+
this.introductionWindowEnabled = false;
|
|
106
107
|
this.enableAutoRefresh = false;
|
|
107
108
|
this.enableBasemap = true;
|
|
108
109
|
this.enableColumnReorder = true;
|
|
@@ -251,7 +252,7 @@ const CrowdsourceManager$1 = /*@__PURE__*/ proxyCustomElement(class CrowdsourceM
|
|
|
251
252
|
render() {
|
|
252
253
|
// only avoid border when we have a header color that is not white
|
|
253
254
|
const borderClass = this.popupHeaderColor && this.popupHeaderColor !== "#FFFFFF" ? "border-width-0" : "";
|
|
254
|
-
return (h(Host, { key: '
|
|
255
|
+
return (h(Host, { key: '0f06df71cc424887b8dc4b4929670d94b6548085' }, h("calcite-shell", { key: 'c81a570fb771650de6193e45ffbebd03544eaf2e', class: "position-relative" }, h("calcite-panel", { key: '5e67c2bf9ed0df0080629989f93e89a145349abc', class: `width-full height-full ${borderClass}` }, this._getBody(this._layoutMode, this._panelOpen, this._hideTable)), this._getFooter())));
|
|
255
256
|
}
|
|
256
257
|
/**
|
|
257
258
|
* Called after each render
|
|
@@ -372,13 +373,20 @@ const CrowdsourceManager$1 = /*@__PURE__*/ proxyCustomElement(class CrowdsourceM
|
|
|
372
373
|
const contentClass = layoutMode === ELayoutMode.HORIZONTAL ? "" : "display-flex";
|
|
373
374
|
const themeClass = this.theme === "dark" ? "calcite-mode-dark" : "calcite-mode-light";
|
|
374
375
|
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 &&
|
|
376
|
+
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 &&
|
|
375
377
|
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" }))));
|
|
376
378
|
}
|
|
377
379
|
/**
|
|
378
380
|
* Emit the event when info button clicked
|
|
379
381
|
*/
|
|
380
382
|
infoButtonClick() {
|
|
381
|
-
this.
|
|
383
|
+
this.showIntroductionWindow.emit();
|
|
384
|
+
}
|
|
385
|
+
/**
|
|
386
|
+
* Emit the event when cover page button clicked
|
|
387
|
+
*/
|
|
388
|
+
coverPageButtonClick() {
|
|
389
|
+
this.showCoverPage.emit();
|
|
382
390
|
}
|
|
383
391
|
/**
|
|
384
392
|
* Get the map and card nodes based for the current layout options
|
|
@@ -588,7 +596,7 @@ const CrowdsourceManager$1 = /*@__PURE__*/ proxyCustomElement(class CrowdsourceM
|
|
|
588
596
|
"defaultLevel": [1, "default-level"],
|
|
589
597
|
"defaultOid": [1, "default-oid"],
|
|
590
598
|
"defaultWebmap": [1, "default-webmap"],
|
|
591
|
-
"
|
|
599
|
+
"introductionWindowEnabled": [4, "introduction-window-enabled"],
|
|
592
600
|
"enableAutoRefresh": [4, "enable-auto-refresh"],
|
|
593
601
|
"enableBasemap": [4, "enable-basemap"],
|
|
594
602
|
"enableColumnReorder": [4, "enable-column-reorder"],
|
|
@@ -128,18 +128,6 @@ const CrowdsourceReporter$1 = /*@__PURE__*/ proxyCustomElement(class Crowdsource
|
|
|
128
128
|
await this.setMapView();
|
|
129
129
|
});
|
|
130
130
|
}
|
|
131
|
-
/**
|
|
132
|
-
* On Feature details change update the Layer title and the current selected layer id
|
|
133
|
-
* @param evt Event hold the details of current feature graphic in the info-card
|
|
134
|
-
*/
|
|
135
|
-
async selectionChanged(evt) {
|
|
136
|
-
void this.updatingFeatureDetails(true);
|
|
137
|
-
await this.setCurrentFeature(evt.detail.selectedFeature[0]);
|
|
138
|
-
void this.highlightOnMap(evt.detail.selectedFeature[0]);
|
|
139
|
-
this._selectedFeatureIndex = evt.detail.selectedFeatureIndex;
|
|
140
|
-
//update the feature details to reflect the like, dislike and comment values
|
|
141
|
-
await this._featureDetails.refresh(evt.detail.selectedFeature[0]);
|
|
142
|
-
}
|
|
143
131
|
//--------------------------------------------------------------------------
|
|
144
132
|
//
|
|
145
133
|
// Functions (lifecycle)
|
|
@@ -156,9 +144,9 @@ const CrowdsourceReporter$1 = /*@__PURE__*/ proxyCustomElement(class Crowdsource
|
|
|
156
144
|
await this._initModules();
|
|
157
145
|
await this._getTranslations();
|
|
158
146
|
await ((_a = this.mapView) === null || _a === void 0 ? void 0 : _a.when(async () => {
|
|
159
|
-
//set configured
|
|
147
|
+
//set configured layers array which are enabled for data collection
|
|
160
148
|
this._layers = this.reportingOptions ? Object.keys(this.reportingOptions).filter((layerId) => {
|
|
161
|
-
return this.reportingOptions[layerId].
|
|
149
|
+
return this.reportingOptions[layerId].visible;
|
|
162
150
|
}) : [];
|
|
163
151
|
await this.setMapView();
|
|
164
152
|
}));
|
|
@@ -168,7 +156,7 @@ const CrowdsourceReporter$1 = /*@__PURE__*/ proxyCustomElement(class Crowdsource
|
|
|
168
156
|
*/
|
|
169
157
|
render() {
|
|
170
158
|
const themeClass = this.theme === "dark" ? "calcite-mode-dark" : "calcite-mode-light";
|
|
171
|
-
return (h(Host, { key: '
|
|
159
|
+
return (h(Host, { key: '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()));
|
|
172
160
|
}
|
|
173
161
|
//--------------------------------------------------------------------------
|
|
174
162
|
//
|
|
@@ -203,6 +191,14 @@ const CrowdsourceReporter$1 = /*@__PURE__*/ proxyCustomElement(class Crowdsource
|
|
|
203
191
|
layer.set('visible', !layerId || (layer.id === layerId));
|
|
204
192
|
});
|
|
205
193
|
}
|
|
194
|
+
/**
|
|
195
|
+
* Returns the layers configuration
|
|
196
|
+
* @param layerId string layerId of the selected layer
|
|
197
|
+
* @returns Configuration for the layerId
|
|
198
|
+
*/
|
|
199
|
+
_getLayersConfig(layerId) {
|
|
200
|
+
return this.reportingOptions && this.reportingOptions[layerId] ? this.reportingOptions[layerId] : null;
|
|
201
|
+
}
|
|
206
202
|
/**
|
|
207
203
|
* Get the reporter app functionality
|
|
208
204
|
* @protected
|
|
@@ -326,7 +322,10 @@ const CrowdsourceReporter$1 = /*@__PURE__*/ proxyCustomElement(class Crowdsource
|
|
|
326
322
|
* @protected
|
|
327
323
|
*/
|
|
328
324
|
getChooseCategoryFlowItem() {
|
|
329
|
-
|
|
325
|
+
const onlyReportingLayers = this.reportingOptions ? Object.keys(this.reportingOptions).filter((layerId) => {
|
|
326
|
+
return this.reportingOptions[layerId].visible && this.reportingOptions[layerId].reporting && this._layerItemsHash[layerId] && this._layerItemsHash[layerId].supportsAdd;
|
|
327
|
+
}) : [];
|
|
328
|
+
return (h("calcite-flow-item", { collapsed: this.isMobile && this._sidePanelCollapsed, heading: this.reportButtonText ? this.reportButtonText : this._translations.createReportButtonText, onCalciteFlowItemBack: this.backFromSelectedPanel.bind(this) }, this.isMobile && this.getActionToExpandCollapsePanel(), h("calcite-panel", { "full-height": true, "full-width": true }, h("div", { class: "progress-bar" }, h("calcite-progress", { type: "determinate", value: this._updatedProgressBarStatus })), h("calcite-notice", { class: "notice-msg", icon: "lightbulb", kind: "success", open: true }, h("div", { slot: "message" }, this._translations.chooseCategoryMsg)), h("layer-list", { class: "height-full", layers: onlyReportingLayers, mapView: this.mapView, onLayerSelect: this.navigateToCreateFeature.bind(this), showFeatureCount: false, showNextIcon: false }))));
|
|
330
329
|
}
|
|
331
330
|
/**
|
|
332
331
|
* Get Feature create form of the selected feature layer
|
|
@@ -485,16 +484,22 @@ const CrowdsourceReporter$1 = /*@__PURE__*/ proxyCustomElement(class Crowdsource
|
|
|
485
484
|
const layersListed = evt.detail;
|
|
486
485
|
//consider only the layers listed in the layer-list component
|
|
487
486
|
const allMapLayers = await getAllLayers(this.mapView);
|
|
487
|
+
const reportingEnabledLayerIds = [];
|
|
488
488
|
this._validLayers = [];
|
|
489
489
|
allMapLayers.forEach((eachLayer) => {
|
|
490
|
+
var _a;
|
|
490
491
|
if (layersListed.includes(eachLayer.id)) {
|
|
491
492
|
this._validLayers.push(eachLayer);
|
|
493
|
+
//create list of reporting enabled layers
|
|
494
|
+
if (((_a = this._getLayersConfig(eachLayer.id)) === null || _a === void 0 ? void 0 : _a.reporting) && this._layerItemsHash[eachLayer.id] && this._layerItemsHash[eachLayer.id].supportsAdd) {
|
|
495
|
+
reportingEnabledLayerIds.push(eachLayer.id);
|
|
496
|
+
}
|
|
492
497
|
}
|
|
493
498
|
});
|
|
494
499
|
//handleMap click on layer list loaded
|
|
495
500
|
this.handleMapClick();
|
|
496
|
-
//
|
|
497
|
-
this._hasValidLayers =
|
|
501
|
+
//When we have any reporting layer then only show the create report button on layerList
|
|
502
|
+
this._hasValidLayers = reportingEnabledLayerIds.length > 0;
|
|
498
503
|
//navigate to the feature details if URL params found
|
|
499
504
|
if (!this._urlParamsLoaded) {
|
|
500
505
|
this._urlParamsLoaded = true;
|
|
@@ -522,8 +527,9 @@ const CrowdsourceReporter$1 = /*@__PURE__*/ proxyCustomElement(class Crowdsource
|
|
|
522
527
|
backFromSelectedPanel() {
|
|
523
528
|
this._updatedProgressBarStatus = 0.25;
|
|
524
529
|
const updatedFlowItems = [...this._flowItems];
|
|
525
|
-
// when
|
|
526
|
-
if (updatedFlowItems[updatedFlowItems.length - 1]
|
|
530
|
+
// when back from comment details or add comment page don't clear the highlighted feature of map
|
|
531
|
+
if (!(updatedFlowItems[updatedFlowItems.length - 1] === 'comment-details' ||
|
|
532
|
+
updatedFlowItems[updatedFlowItems.length - 1] === 'add-comment')) {
|
|
527
533
|
this.clearHighlights();
|
|
528
534
|
}
|
|
529
535
|
updatedFlowItems.pop();
|
|
@@ -568,6 +574,19 @@ const CrowdsourceReporter$1 = /*@__PURE__*/ proxyCustomElement(class Crowdsource
|
|
|
568
574
|
async updatingFeatureDetails(isLoading) {
|
|
569
575
|
this._showLoadingIndicator = isLoading;
|
|
570
576
|
}
|
|
577
|
+
/**
|
|
578
|
+
* On Feature details change update the Layer title and the current selected layer id
|
|
579
|
+
* @param evt Event hold the details of current feature graphic from the feature-details
|
|
580
|
+
* @protected
|
|
581
|
+
*/
|
|
582
|
+
async selectionChanged(evt) {
|
|
583
|
+
void this.updatingFeatureDetails(true);
|
|
584
|
+
await this.setCurrentFeature(evt.detail.selectedFeature[0]);
|
|
585
|
+
void this.highlightOnMap(evt.detail.selectedFeature[0]);
|
|
586
|
+
this._selectedFeatureIndex = evt.detail.selectedFeatureIndex;
|
|
587
|
+
//update the feature details to reflect the like, dislike and comment values
|
|
588
|
+
await this._featureDetails.refresh(evt.detail.selectedFeature[0]);
|
|
589
|
+
}
|
|
571
590
|
/**
|
|
572
591
|
* When comment is selected from list store that and show comment details
|
|
573
592
|
* @param evt Event which has details of selected feature
|
|
@@ -585,10 +604,11 @@ const CrowdsourceReporter$1 = /*@__PURE__*/ proxyCustomElement(class Crowdsource
|
|
|
585
604
|
* @protected
|
|
586
605
|
*/
|
|
587
606
|
getFeatureListFlowItem(layerId, layerName) {
|
|
588
|
-
var _a;
|
|
607
|
+
var _a, _b;
|
|
589
608
|
const layerExpressions = (_a = this.layerExpressions) === null || _a === void 0 ? void 0 : _a.filter((exp) => exp.id === this._selectedLayerId);
|
|
609
|
+
const canCreateReports = ((_b = this._getLayersConfig(this._selectedLayerId)) === null || _b === void 0 ? void 0 : _b.reporting) && this._layerItemsHash[this._selectedLayerId].supportsAdd;
|
|
590
610
|
const showFilterIcon = (layerExpressions === null || layerExpressions === void 0 ? void 0 : layerExpressions.length) > 0;
|
|
591
|
-
return (h("calcite-flow-item", { collapsed: this.isMobile && this._sidePanelCollapsed, heading: layerName, loading: this._showLoadingIndicator, onCalciteFlowItemBack: this.backFromSelectedPanel.bind(this) }, this._toggleSort(), h("calcite-action", { icon: "sort-ascending-arrow", id: "sort-popover", slot: "header-actions-end", text: this._translations.sort, title: this._translations.sort }), showFilterIcon && h("calcite-action", { icon: "filter", indicator: this._filterActive, onClick: this._toggleFilter.bind(this), slot: "header-actions-end", text: this._translations.filter, title: this._translations.filter }), this.isMobile && this.getActionToExpandCollapsePanel(), this.enableNewReports &&
|
|
611
|
+
return (h("calcite-flow-item", { collapsed: this.isMobile && this._sidePanelCollapsed, heading: layerName, loading: this._showLoadingIndicator, onCalciteFlowItemBack: this.backFromSelectedPanel.bind(this) }, this._toggleSort(), h("calcite-action", { icon: "sort-ascending-arrow", id: "sort-popover", slot: "header-actions-end", text: this._translations.sort, title: this._translations.sort }), showFilterIcon && h("calcite-action", { icon: "filter", indicator: this._filterActive, onClick: this._toggleFilter.bind(this), slot: "header-actions-end", text: this._translations.filter, title: this._translations.filter }), this.isMobile && this.getActionToExpandCollapsePanel(), this.enableNewReports && canCreateReports &&
|
|
592
612
|
h("calcite-button", { appearance: "solid", onClick: this.navigateToCreateFeature.bind(this), slot: "footer", width: "full" }, this.reportButtonText ? this.reportButtonText : this._translations.createReportButtonText), h("calcite-panel", { "full-height": true }, h("feature-list", { class: "height-full", highlightOnHover: true, mapView: this.mapView, noFeaturesFoundMsg: this._translations.featureErrorMsg, onFeatureSelect: this.onFeatureSelectFromList.bind(this), pageSize: 30, ref: el => this._featureList = el, selectedLayerId: layerId, sortingInfo: this._updatedSorting }))));
|
|
593
613
|
}
|
|
594
614
|
/**
|
|
@@ -596,8 +616,9 @@ const CrowdsourceReporter$1 = /*@__PURE__*/ proxyCustomElement(class Crowdsource
|
|
|
596
616
|
* @returns Node
|
|
597
617
|
*/
|
|
598
618
|
getFeatureDetailsFlowItem() {
|
|
599
|
-
|
|
600
|
-
|
|
619
|
+
var _a;
|
|
620
|
+
const showCommentBtn = ((_a = this._getLayersConfig(this._selectedLayerId)) === null || _a === void 0 ? void 0 : _a.comment) && this._selectedLayer.relationships.length > 0;
|
|
621
|
+
return (h("calcite-flow-item", { collapsed: this.isMobile && this._sidePanelCollapsed, heading: this._selectedLayerName, loading: this._showLoadingIndicator, onCalciteFlowItemBack: this.backFromSelectedPanel.bind(this) }, this.isMobile && this.getActionToExpandCollapsePanel(), h("instant-apps-social-share", { autoUpdateShareUrl: false, embed: false, popoverButtonIconScale: "s", ref: el => this._shareNode = el, removePopoverOffset: true, scale: "s", shareButtonColor: "neutral", shareButtonType: "action", slot: "header-actions-end", socialMedia: true, view: this.mapView }), this._selectedFeature.length > 1 && this.getFeaturesPagination(), h("calcite-panel", null, h("feature-details", { class: 'full-height', graphics: this._selectedFeature, layerItemsHash: this._layerItemsHash, mapView: this.mapView, onCommentSelect: this.onCommentSelectFromList.bind(this), onFeatureSelectionChange: this.selectionChanged.bind(this), onLoadingStatus: (evt) => void this.updatingFeatureDetails(evt.detail), ref: el => this._featureDetails = el, reportingOptions: this.reportingOptions }), showCommentBtn &&
|
|
601
622
|
h("calcite-button", { appearance: "solid", onClick: () => this._flowItems = [...this._flowItems, "add-comment"], slot: "footer", width: "full" }, this._translations.comment))));
|
|
602
623
|
}
|
|
603
624
|
/**
|
|
@@ -613,7 +634,7 @@ const CrowdsourceReporter$1 = /*@__PURE__*/ proxyCustomElement(class Crowdsource
|
|
|
613
634
|
* @returns Node
|
|
614
635
|
*/
|
|
615
636
|
getCommentDetailsFlowItem() {
|
|
616
|
-
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
|
|
637
|
+
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 }))));
|
|
617
638
|
}
|
|
618
639
|
/**
|
|
619
640
|
* Returns the calcite-flow item for add comment
|
|
@@ -635,13 +656,14 @@ const CrowdsourceReporter$1 = /*@__PURE__*/ proxyCustomElement(class Crowdsource
|
|
|
635
656
|
* @param selectedFeature Graphic currently shown in feature details
|
|
636
657
|
*/
|
|
637
658
|
async setCurrentFeature(selectedFeature) {
|
|
659
|
+
var _a;
|
|
638
660
|
this._currentFeature = selectedFeature;
|
|
639
661
|
if (selectedFeature && selectedFeature.layer) {
|
|
640
662
|
const layer = selectedFeature.layer;
|
|
641
663
|
void this.setSelectedLayer(layer.id, layer.title);
|
|
642
664
|
this._currentFeatureId = selectedFeature.attributes[layer.objectIdField];
|
|
643
665
|
// check if comments are configured and relationship is present then only get the related table
|
|
644
|
-
const isCommentTablePresent = this.
|
|
666
|
+
const isCommentTablePresent = ((_a = this._getLayersConfig(layer.id)) === null || _a === void 0 ? void 0 : _a.comment) && layer.relationships.length > 0;
|
|
645
667
|
if (isCommentTablePresent) {
|
|
646
668
|
await this.getRelatedTable();
|
|
647
669
|
}
|
|
@@ -755,12 +777,12 @@ const CrowdsourceReporter$1 = /*@__PURE__*/ proxyCustomElement(class Crowdsource
|
|
|
755
777
|
await this.setSelectedFeatures(reportingLayerGraphics);
|
|
756
778
|
//if featureDetails not open then add it to the list else just reInit flowItems which will update details with newly selected features
|
|
757
779
|
// eslint-disable-next-line unicorn/prefer-ternary
|
|
758
|
-
if (this._flowItems.length && this._flowItems
|
|
759
|
-
this._flowItems = [...this._flowItems, "feature-details"];
|
|
780
|
+
if (this._flowItems.length && this._flowItems.includes("feature-details")) {
|
|
781
|
+
this._flowItems = [...this._flowItems.slice(0, this._flowItems.indexOf("feature-details") + 1)];
|
|
782
|
+
await this.highlightOnMap(clickedGraphics[0]);
|
|
760
783
|
}
|
|
761
784
|
else {
|
|
762
|
-
this._flowItems = [...this._flowItems];
|
|
763
|
-
void this.highlightOnMap(clickedGraphics[0]);
|
|
785
|
+
this._flowItems = [...this._flowItems, "feature-details"];
|
|
764
786
|
}
|
|
765
787
|
}
|
|
766
788
|
// if clicked graphic's layer is from non reporting layers then show popup on map
|
|
@@ -803,13 +825,10 @@ const CrowdsourceReporter$1 = /*@__PURE__*/ proxyCustomElement(class Crowdsource
|
|
|
803
825
|
* @returns array of editable layer ids
|
|
804
826
|
*/
|
|
805
827
|
reduceToConfiguredLayers(hash) {
|
|
806
|
-
var _a;
|
|
807
|
-
const configuredLayers = ((_a = this._layers) === null || _a === void 0 ? void 0 : _a.length) > 0 ? this._layers : [];
|
|
808
828
|
return Object.keys(hash).reduce((prev, cur) => {
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
}
|
|
829
|
+
// check if reporting options exists consider the visible prop if else just check the supports Add
|
|
830
|
+
const showLayer = this.reportingOptions ? this._getLayersConfig(cur).visible
|
|
831
|
+
: hash[cur].supportsAdd;
|
|
813
832
|
if (showLayer) {
|
|
814
833
|
prev.push(cur);
|
|
815
834
|
}
|
|
@@ -830,18 +849,19 @@ const CrowdsourceReporter$1 = /*@__PURE__*/ proxyCustomElement(class Crowdsource
|
|
|
830
849
|
}
|
|
831
850
|
});
|
|
832
851
|
this._editableLayerIds = this.reduceToConfiguredLayers(layerItemsHash);
|
|
852
|
+
this._layerItemsHash = layerItemsHash;
|
|
833
853
|
}
|
|
834
854
|
/**
|
|
835
855
|
* renders feature list
|
|
836
856
|
* @protected
|
|
837
857
|
*/
|
|
838
858
|
async renderFeaturesList() {
|
|
859
|
+
this._flowItems = ['feature-list'];
|
|
839
860
|
const evt = {
|
|
840
861
|
detail: this._editableLayerIds
|
|
841
862
|
};
|
|
842
863
|
await this.layerListLoaded(evt);
|
|
843
864
|
void this.setSelectedLayer(this._validLayers[0].id, this._validLayers[0].title);
|
|
844
|
-
this._flowItems = ['feature-list'];
|
|
845
865
|
}
|
|
846
866
|
/**
|
|
847
867
|
* Updates the share url for current selected feature
|
|
@@ -955,7 +975,7 @@ const CrowdsourceReporter$1 = /*@__PURE__*/ proxyCustomElement(class Crowdsource
|
|
|
955
975
|
"_updatedSortOption": [32],
|
|
956
976
|
"_commentSubmitted": [32],
|
|
957
977
|
"_addingCommentFailed": [32]
|
|
958
|
-
},
|
|
978
|
+
}, undefined, {
|
|
959
979
|
"isMobile": ["isMobileWatchHandler"],
|
|
960
980
|
"mapView": ["mapViewWatchHandler"]
|
|
961
981
|
}]);
|
|
@@ -3155,4 +3155,4 @@ async function _prepareLabelsUsingExecutor(featureSet, labelFormat) {
|
|
|
3155
3155
|
}
|
|
3156
3156
|
//#endregion
|
|
3157
3157
|
|
|
3158
|
-
export {
|
|
3158
|
+
export { _prepareAttributeValue as _, downloadPDF as a, _typeof as b, consolidateLabels as c, downloadCSV as d, removeDuplicateLabels as r };
|
|
@@ -308,4 +308,4 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
308
308
|
|
|
309
309
|
}(esriLoader, esriLoader.exports));
|
|
310
310
|
|
|
311
|
-
export {
|
|
311
|
+
export { commonjsRequire as a, commonjsGlobal as c, esriLoader as e, getDefaultExportFromCjs as g };
|
|
@@ -33,7 +33,7 @@ import { d as defineCustomElement$3 } from './edit-card2.js';
|
|
|
33
33
|
import { d as defineCustomElement$2 } from './feature-list2.js';
|
|
34
34
|
import { d as defineCustomElement$1 } from './info-card2.js';
|
|
35
35
|
|
|
36
|
-
const featureDetailsCss = ":host{display:block}.buttons-container{align-items:center;display:flex;padding:10px
|
|
36
|
+
const featureDetailsCss = ":host{display:block}.buttons-container{align-items:center;display:flex;padding:10px;color:var(--calcite-color-text-1) !important;background-color:var(--calcite-color-foreground-1) !important;border-block-start:1px solid var(--calcite-color-border-3);border-block-end:1px solid var(--calcite-color-border-3)}.comment-btn{display:flex;gap:5px;font-size:var(--calcite-font-size--2);align-items:center;padding:0 0.5rem}";
|
|
37
37
|
const FeatureDetailsStyle0 = featureDetailsCss;
|
|
38
38
|
|
|
39
39
|
const FeatureDetails = /*@__PURE__*/ proxyCustomElement(class FeatureDetails extends HTMLElement {
|
|
@@ -41,7 +41,8 @@ const FeatureDetails = /*@__PURE__*/ proxyCustomElement(class FeatureDetails ext
|
|
|
41
41
|
super();
|
|
42
42
|
this.__registerHost();
|
|
43
43
|
this.loadingStatus = createEvent(this, "loadingStatus", 7);
|
|
44
|
-
this.
|
|
44
|
+
this.commentSelect = createEvent(this, "commentSelect", 7);
|
|
45
|
+
this.featureSelectionChange = createEvent(this, "featureSelectionChange", 7);
|
|
45
46
|
/**
|
|
46
47
|
* string[]: Valid field types for like and dislike
|
|
47
48
|
*/
|
|
@@ -49,6 +50,7 @@ const FeatureDetails = /*@__PURE__*/ proxyCustomElement(class FeatureDetails ext
|
|
|
49
50
|
this.mapView = undefined;
|
|
50
51
|
this.graphics = undefined;
|
|
51
52
|
this.reportingOptions = undefined;
|
|
53
|
+
this.layerItemsHash = undefined;
|
|
52
54
|
this._likeFieldAvailable = false;
|
|
53
55
|
this._likeCount = 0;
|
|
54
56
|
this._disLikeCount = 0;
|
|
@@ -128,12 +130,12 @@ const FeatureDetails = /*@__PURE__*/ proxyCustomElement(class FeatureDetails ext
|
|
|
128
130
|
var _a, _b, _c, _d, _e;
|
|
129
131
|
//When related features found show comments list of only those features else comments list will be empty
|
|
130
132
|
const commentsListWhereClause = ((_a = this._relatedFeaturesOIDs) === null || _a === void 0 ? void 0 : _a.length) > 0 ? `objectId in(${this._relatedFeaturesOIDs})` : '1=0';
|
|
131
|
-
return (h("calcite-panel", { key: '
|
|
132
|
-
h("div", { key: '
|
|
133
|
-
h("div", { key: '
|
|
134
|
-
h("calcite-button", { key: '
|
|
135
|
-
h("calcite-button", { key: '
|
|
136
|
-
h("feature-list", { key: '
|
|
133
|
+
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) &&
|
|
134
|
+
h("div", { key: 'a3242d417cef788f0f677bf21c65fb9aaa44f8b2', class: "buttons-container" }, this._commentsAvailable &&
|
|
135
|
+
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 &&
|
|
136
|
+
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 &&
|
|
137
|
+
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 &&
|
|
138
|
+
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 })));
|
|
137
139
|
}
|
|
138
140
|
/**
|
|
139
141
|
* Load esri javascript api modules
|
|
@@ -170,7 +172,8 @@ const FeatureDetails = /*@__PURE__*/ proxyCustomElement(class FeatureDetails ext
|
|
|
170
172
|
async processComments() {
|
|
171
173
|
var _a;
|
|
172
174
|
const selectedLayer = this._selectedGraphic.layer;
|
|
173
|
-
const commentsConfigured = this.reportingOptions[selectedLayer.id]
|
|
175
|
+
const commentsConfigured = this.reportingOptions && this.reportingOptions[selectedLayer.id] &&
|
|
176
|
+
this.reportingOptions[selectedLayer.id].comment && ((_a = selectedLayer.relationships) === null || _a === void 0 ? void 0 : _a.length) > 0;
|
|
174
177
|
if (commentsConfigured) {
|
|
175
178
|
//Get comments table id from map
|
|
176
179
|
const relatedTableIdFromRelnship = selectedLayer.relationships[0].relatedTableId;
|
|
@@ -235,7 +238,7 @@ const FeatureDetails = /*@__PURE__*/ proxyCustomElement(class FeatureDetails ext
|
|
|
235
238
|
}
|
|
236
239
|
//Check if selected layer have the configured like and dislike field and it is of integer types
|
|
237
240
|
selectedLayer.fields.forEach((eachField) => {
|
|
238
|
-
if (this._validFieldTypes.indexOf(eachField.type) > -1) {
|
|
241
|
+
if (this._validFieldTypes.indexOf(eachField.type) > -1 && this.layerItemsHash[selectedLayer.id].supportsUpdate) {
|
|
239
242
|
if (eachField.name === likeField && this.reportingOptions[selectedLayer.id].like) {
|
|
240
243
|
likeFieldAvailable = true;
|
|
241
244
|
}
|
|
@@ -270,12 +273,12 @@ const FeatureDetails = /*@__PURE__*/ proxyCustomElement(class FeatureDetails ext
|
|
|
270
273
|
//Check if selected layer have the configured like and dislike fields
|
|
271
274
|
//also, get the current value for like and dislike field from the attributes
|
|
272
275
|
selectedLayer.fields.forEach((eachField) => {
|
|
273
|
-
if (this._validFieldTypes.indexOf(eachField.type) > -1) {
|
|
274
|
-
if (eachField.name === this._likeField && this.reportingOptions[
|
|
276
|
+
if (this._validFieldTypes.indexOf(eachField.type) > -1 && this.layerItemsHash[selectedLayer.id].supportsUpdate) {
|
|
277
|
+
if (eachField.name === this._likeField && this.reportingOptions[selectedLayer.id].like) {
|
|
275
278
|
this._likeFieldAvailable = true;
|
|
276
279
|
this._likeCount = this._selectedGraphic.attributes[eachField.name];
|
|
277
280
|
}
|
|
278
|
-
else if (eachField.name === this._dislikeField && this.reportingOptions[
|
|
281
|
+
else if (eachField.name === this._dislikeField && this.reportingOptions[selectedLayer.id].dislike) {
|
|
279
282
|
this._dislikeFieldAvailable = true;
|
|
280
283
|
this._disLikeCount = this._selectedGraphic.attributes[eachField.name];
|
|
281
284
|
}
|
|
@@ -410,6 +413,7 @@ const FeatureDetails = /*@__PURE__*/ proxyCustomElement(class FeatureDetails ext
|
|
|
410
413
|
"mapView": [16],
|
|
411
414
|
"graphics": [16],
|
|
412
415
|
"reportingOptions": [16],
|
|
416
|
+
"layerItemsHash": [16],
|
|
413
417
|
"_likeFieldAvailable": [32],
|
|
414
418
|
"_likeCount": [32],
|
|
415
419
|
"_disLikeCount": [32],
|