@esri/solutions-components 0.8.23 → 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-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 +23 -27
- package/dist/cjs/card-manager_3.cjs.entry.js +1 -1
- package/dist/cjs/crowdsource-manager.cjs.entry.js +1 -1
- package/dist/cjs/crowdsource-reporter.cjs.entry.js +56 -36
- package/dist/cjs/feature-list.cjs.entry.js +4 -3
- package/dist/cjs/{helpers-9347ad83.js → helpers-618a3f7d.js} +2 -1
- package/dist/cjs/instant-apps-create.cjs.entry.js +266 -0
- package/dist/cjs/instant-apps-export.cjs.entry.js +31 -16
- package/dist/cjs/instant-apps-header.cjs.entry.js +3 -2
- package/dist/cjs/instant-apps-interactive-legend-classic.cjs.entry.js +11 -4
- package/dist/cjs/instant-apps-interactive-legend-count_2.cjs.entry.js +1 -1
- package/dist/cjs/instant-apps-interactive-legend-group-legend-element-caption.cjs.entry.js +1 -1
- package/dist/cjs/instant-apps-interactive-legend-group-legend-element_5.cjs.entry.js +2 -2
- package/dist/cjs/instant-apps-interactive-legend.cjs.entry.js +1 -1
- package/dist/cjs/instant-apps-landing-page.cjs.entry.js +45 -9
- package/dist/cjs/instant-apps-language-switcher.cjs.entry.js +1 -1
- package/dist/cjs/instant-apps-language-translator.cjs.entry.js +1 -1
- package/dist/cjs/instant-apps-sign-in.cjs.entry.js +168 -0
- package/dist/cjs/{languageSwitcher-395021d6.js → languageSwitcher-b9a1485c.js} +3 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/public-notification.cjs.entry.js +3 -3
- package/dist/cjs/resources-fa37e40f.js +26 -0
- package/dist/cjs/solutions-components.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +3 -1
- package/dist/collection/components/arcgis-login/arcgis-login.js +1 -1
- package/dist/collection/components/basemap-gallery/basemap-gallery.js +1 -1
- package/dist/collection/components/buffer-tools/buffer-tools.js +1 -1
- package/dist/collection/components/card-manager/card-manager.js +1 -1
- package/dist/collection/components/create-feature/create-feature.js +1 -1
- package/dist/collection/components/create-related-feature/create-related-feature.js +1 -1
- package/dist/collection/components/crowdsource-manager/crowdsource-manager.js +1 -1
- package/dist/collection/components/crowdsource-reporter/crowdsource-reporter.js +56 -45
- package/dist/collection/components/feature-details/feature-details.js +56 -13
- package/dist/collection/components/feature-list/feature-list.js +22 -3
- package/dist/collection/components/layer-list/layer-list.js +6 -13
- package/dist/collection/components/public-notification/public-notification.js +3 -3
- package/dist/collection/demos/crowdsource-reporter.html +22 -15
- package/dist/collection/utils/interfaces.ts +1 -0
- package/dist/components/arcgis-login.js +1 -1
- package/dist/components/basemap-gallery2.js +1 -1
- package/dist/components/buffer-tools2.js +1 -1
- package/dist/components/calcite-navigation-user.js +1 -99
- package/dist/components/card-manager2.js +1 -1
- package/dist/components/create-feature2.js +1 -1
- package/dist/components/create-related-feature2.js +1 -1
- package/dist/components/crowdsource-manager.js +1 -1
- package/dist/components/crowdsource-reporter.js +57 -37
- package/dist/components/feature-details2.js +16 -12
- package/dist/components/feature-list2.js +5 -3
- package/dist/components/helpers.js +3 -2
- package/dist/components/instant-apps-ckeditor-wrapper2.js +1 -1
- package/dist/components/instant-apps-create.js +317 -0
- package/dist/components/instant-apps-export.js +32 -16
- package/dist/components/instant-apps-filter-list2.js +6 -1
- package/dist/components/instant-apps-header2.js +3 -2
- package/dist/components/instant-apps-interactive-legend-classic2.js +12 -5
- package/dist/components/instant-apps-interactive-legend-legend-element-caption2.js +2 -2
- package/dist/components/instant-apps-landing-page.js +91 -16
- package/dist/components/instant-apps-language-translator2.js +3 -1
- package/dist/components/instant-apps-sign-in.js +11 -0
- package/dist/components/instant-apps-sign-in2.js +243 -0
- package/dist/components/instant-apps-social-share2.js +8 -2
- package/dist/components/layer-list2.js +6 -13
- package/dist/{esm/calcite-navigation-user.entry.js → components/navigation-user.js} +46 -9
- package/dist/components/public-notification.js +3 -3
- package/dist/esm/arcgis-login.entry.js +1 -1
- package/dist/esm/basemap-gallery_7.entry.js +1 -1
- package/dist/esm/buffer-tools_3.entry.js +1 -1
- package/dist/esm/{calcite-avatar.entry.js → calcite-avatar_2.entry.js} +64 -3
- package/dist/esm/calcite-block_5.entry.js +12 -3
- package/dist/esm/calcite-color-picker-hex-input_2.entry.js +1 -1
- package/dist/esm/calcite-color-picker.entry.js +1 -1
- package/dist/esm/calcite-dropdown-group_2.entry.js +414 -0
- package/dist/esm/{calcite-dropdown_4.entry.js → calcite-dropdown_2.entry.js} +2 -423
- package/dist/esm/calcite-flow_6.entry.js +23 -27
- package/dist/esm/card-manager_3.entry.js +1 -1
- package/dist/esm/crowdsource-manager.entry.js +1 -1
- package/dist/esm/crowdsource-reporter.entry.js +56 -36
- package/dist/esm/feature-list.entry.js +4 -3
- package/dist/esm/{helpers-a5a81b9d.js → helpers-61b05164.js} +3 -2
- package/dist/esm/instant-apps-create.entry.js +262 -0
- package/dist/esm/instant-apps-export.entry.js +31 -16
- package/dist/esm/instant-apps-header.entry.js +3 -2
- package/dist/esm/instant-apps-interactive-legend-classic.entry.js +11 -4
- package/dist/esm/instant-apps-interactive-legend-count_2.entry.js +1 -1
- package/dist/esm/instant-apps-interactive-legend-group-legend-element-caption.entry.js +1 -1
- package/dist/esm/instant-apps-interactive-legend-group-legend-element_5.entry.js +2 -2
- package/dist/esm/instant-apps-interactive-legend.entry.js +1 -1
- package/dist/esm/instant-apps-landing-page.entry.js +46 -10
- package/dist/esm/instant-apps-language-switcher.entry.js +1 -1
- package/dist/esm/instant-apps-language-translator.entry.js +1 -1
- package/dist/esm/instant-apps-sign-in.entry.js +164 -0
- package/dist/esm/{languageSwitcher-a4a615e4.js → languageSwitcher-d60f03b2.js} +3 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/public-notification.entry.js +3 -3
- package/dist/esm/resources-16800cce.js +24 -0
- package/dist/esm/solutions-components.js +1 -1
- package/dist/esm/{utils-6419e941.js → utils-251cb6de.js} +1 -1
- package/dist/node_modules/@esri/instant-apps-components/dist/collection/components/instant-apps-create/instant-apps-create.css +150 -0
- package/dist/node_modules/@esri/instant-apps-components/dist/collection/components/instant-apps-header/instant-apps-header.css +16 -9
- package/dist/node_modules/@esri/instant-apps-components/dist/collection/components/instant-apps-landing-page/instant-apps-landing-page.css +19 -0
- package/dist/node_modules/@esri/instant-apps-components/dist/collection/components/instant-apps-sign-in/instant-apps-sign-in.css +98 -0
- package/dist/solutions-components/demos/crowdsource-reporter.html +22 -15
- package/dist/solutions-components/p-1251dcc6.entry.js +6 -0
- package/dist/solutions-components/{p-88495699.entry.js → p-16730f05.entry.js} +1 -1
- package/dist/solutions-components/p-1ae3b886.entry.js +17 -0
- package/dist/solutions-components/{p-63460d51.entry.js → p-1ff9eb95.entry.js} +1 -1
- package/dist/solutions-components/{p-8f6e0ae5.entry.js → p-26eb1225.entry.js} +1 -1
- package/dist/solutions-components/{p-3a2e0188.entry.js → p-2c044250.entry.js} +2 -2
- package/dist/solutions-components/p-314dc933.entry.js +6 -0
- package/dist/solutions-components/p-50741707.entry.js +6 -0
- package/dist/solutions-components/p-614ebce7.js +6 -0
- package/dist/solutions-components/{p-df73649e.entry.js → p-77cd573b.entry.js} +1 -1
- package/dist/solutions-components/{p-c95dcdf7.entry.js → p-7883b885.entry.js} +3 -3
- package/dist/solutions-components/p-79e2e203.entry.js +6 -0
- package/dist/solutions-components/{p-968a6fd8.entry.js → p-7b17e929.entry.js} +1 -1
- package/dist/solutions-components/p-80b3eb6b.entry.js +6 -0
- package/dist/solutions-components/p-84913712.js +6 -0
- package/dist/solutions-components/p-8c500fd7.entry.js +6 -0
- package/dist/solutions-components/{p-fe9d6d06.js → p-9f56c02c.js} +1 -1
- package/dist/solutions-components/{p-667c022f.entry.js → p-af4be4ce.entry.js} +1 -1
- package/dist/solutions-components/p-bb2e669d.entry.js +6 -0
- package/dist/solutions-components/p-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-64da5bb8.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/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/layer-list/layer-list.d.ts +1 -1
- package/dist/types/components.d.ts +25 -2
- package/dist/types/preact.d.ts +7 -2
- package/dist/types/utils/interfaces.d.ts +1 -0
- package/package.json +2 -2
- package/dist/cjs/calcite-navigation-user.cjs.entry.js +0 -73
- package/dist/solutions-components/p-08a1e120.js +0 -6
- package/dist/solutions-components/p-3283660c.entry.js +0 -6
- package/dist/solutions-components/p-33647277.entry.js +0 -6
- package/dist/solutions-components/p-3af0764f.entry.js +0 -6
- package/dist/solutions-components/p-41d288c0.entry.js +0 -6
- package/dist/solutions-components/p-599dcc29.js +0 -6
- package/dist/solutions-components/p-64b4b579.entry.js +0 -11
- package/dist/solutions-components/p-ab96dd27.entry.js +0 -6
- package/dist/solutions-components/p-bb0c7be3.entry.js +0 -17
- package/dist/solutions-components/p-bb8e3add.entry.js +0 -11
- package/dist/solutions-components/p-c36bb8ca.entry.js +0 -6
- package/dist/solutions-components/p-cbe166fc.entry.js +0 -6
- package/dist/solutions-components/p-eab95aa4.entry.js +0 -6
- package/dist/solutions-components/p-f6a1673c.entry.js +0 -6
@@ -200,4 +200,4 @@ function toNonAlphaMode(mode) {
|
|
200
200
|
return nonAlphaMode;
|
201
201
|
}
|
202
202
|
|
203
|
-
export { CSSColorMode as C, alphaToOpacity as a, alphaCompatible as b, normalizeColor as c, colorEqual as d, normalizeAlpha as e, toAlphaMode as f,
|
203
|
+
export { CSSColorMode as C, alphaToOpacity as a, alphaCompatible as b, normalizeColor as c, colorEqual as d, normalizeAlpha as e, toAlphaMode as f, isValidHex as g, hexify as h, isLonghandHex as i, hexChar as j, hexToRGB as k, normalizeHex as n, opacityToAlpha as o, parseMode as p, rgbToHex as r, toNonAlphaMode as t };
|
@@ -0,0 +1,150 @@
|
|
1
|
+
/**
|
2
|
+
* @prop --instant-apps-create-action-background: Popup's trigger button's background color.
|
3
|
+
* @prop --instant-apps-create-action-background-hover: Popup's trigger button's background color on hover.
|
4
|
+
* @prop --instant-apps-create-action-background-press: Popup's trigger button's background color on press.
|
5
|
+
* @prop --instant-apps-create-action-width: Popup's trigger button's width.
|
6
|
+
* @prop --instant-apps-create-action-height: Popup's trigger button's height.
|
7
|
+
* @prop --instant-apps-create-action-icon-color: Popup's trigger button's icon color.
|
8
|
+
* @prop --instant-apps-create-action-icon-hover-color: Popup's trigger button's icon color when hovered over.
|
9
|
+
* @prop --instant-apps-create-background: Create's container background color.
|
10
|
+
* @prop --instant-apps-create-text-color: Create's container text color.
|
11
|
+
* @prop --instant-apps-create-popover-width: Create's popover container width.
|
12
|
+
*/
|
13
|
+
:host {
|
14
|
+
display: block;
|
15
|
+
--instant-apps-create-action-background: var(--calcite-color-foreground-1);
|
16
|
+
--instant-apps-create-action-background-hover: var(--calcite-color-foreground-2);
|
17
|
+
--instant-apps-create-action-background-press: var(--calcite-color-foreground-3);
|
18
|
+
--instant-apps-create-action-height: 100%;
|
19
|
+
--instant-apps-create-action-width: fit-content;
|
20
|
+
--instant-apps-create-action-icon-color: var(--calcite-color-text-3);
|
21
|
+
--instant-apps-create-action-icon-hover-color: var(--calcite-color-text-1);
|
22
|
+
--instant-apps-create-background: var(--calcite-color-foreground-1);
|
23
|
+
--instant-apps-create-text-color: var(--calcite-color-text-1);
|
24
|
+
--instant-apps-create-popover-width: 450px;
|
25
|
+
}
|
26
|
+
|
27
|
+
.instant-apps-create {
|
28
|
+
height: 100%;
|
29
|
+
}
|
30
|
+
.instant-apps-create * {
|
31
|
+
box-sizing: border-box;
|
32
|
+
}
|
33
|
+
.instant-apps-create__popover-container, .instant-apps-create__inline-container {
|
34
|
+
padding: 1rem 1.5rem;
|
35
|
+
background: var(--instant-apps-create-background);
|
36
|
+
--calcite-color-text-1: var(--instant-apps-create-text-color);
|
37
|
+
}
|
38
|
+
.instant-apps-create__popover-container {
|
39
|
+
width: var(--instant-apps-create-popover-width);
|
40
|
+
}
|
41
|
+
.instant-apps-create calcite-popover {
|
42
|
+
--calcite-color-foreground-1: var(--instant-apps-create-background);
|
43
|
+
}
|
44
|
+
.instant-apps-create calcite-button:last-of-type {
|
45
|
+
margin-top: 0.5rem;
|
46
|
+
}
|
47
|
+
.instant-apps-create__header h3 {
|
48
|
+
margin: 0;
|
49
|
+
font-weight: var(--calcite-font-weight-medium);
|
50
|
+
}
|
51
|
+
.instant-apps-create__header p {
|
52
|
+
margin: 0;
|
53
|
+
padding: 0 0 0.5rem 0;
|
54
|
+
font-weight: var(--calcite-font-weight-normal);
|
55
|
+
}
|
56
|
+
.instant-apps-create__options {
|
57
|
+
display: flex;
|
58
|
+
justify-content: space-between;
|
59
|
+
align-items: center;
|
60
|
+
flex-direction: column;
|
61
|
+
}
|
62
|
+
.instant-apps-create__option {
|
63
|
+
display: flex;
|
64
|
+
color: inherit;
|
65
|
+
text-decoration: inherit;
|
66
|
+
height: -moz-fit-content;
|
67
|
+
height: fit-content;
|
68
|
+
margin-bottom: 0.5rem;
|
69
|
+
cursor: pointer;
|
70
|
+
--calcite-color-text-link: var(--calcite-color-text-1);
|
71
|
+
align-items: stretch;
|
72
|
+
--tw-shadow: 0 0 #0000;
|
73
|
+
--tw-shadow-colored: 0 0 #0000;
|
74
|
+
box-shadow: var(--tw-ring-offset-shadow, 0 0 rgba(0, 0, 0, 0)), var(--tw-ring-shadow, 0 0 rgba(0, 0, 0, 0)), var(--tw-shadow);
|
75
|
+
outline-offset: 0;
|
76
|
+
outline-color: transparent;
|
77
|
+
transition: outline-offset 100ms ease-in-out, outline-color 100ms ease-in-out;
|
78
|
+
}
|
79
|
+
.instant-apps-create__option:first-of-type {
|
80
|
+
margin-top: 0.5rem;
|
81
|
+
}
|
82
|
+
.instant-apps-create__option:last-of-type {
|
83
|
+
margin-bottom: 0;
|
84
|
+
}
|
85
|
+
.instant-apps-create__option:hover {
|
86
|
+
outline: 1px solid var(--calcite-color-border-1);
|
87
|
+
outline-offset: 2px;
|
88
|
+
}
|
89
|
+
.instant-apps-create__option-icon {
|
90
|
+
display: flex;
|
91
|
+
background: var(--calcite-color-foreground-2);
|
92
|
+
color: var(--calcite-color-text-1);
|
93
|
+
font-size: 1.25rem;
|
94
|
+
background-color: var(--calcite-color-background);
|
95
|
+
justify-content: center;
|
96
|
+
align-items: center;
|
97
|
+
flex: 1 1 auto;
|
98
|
+
max-width: 5rem;
|
99
|
+
min-width: 5rem;
|
100
|
+
height: auto;
|
101
|
+
}
|
102
|
+
.instant-apps-create__option-icon svg {
|
103
|
+
display: block;
|
104
|
+
overflow-clip-margin: content-box;
|
105
|
+
overflow: hidden;
|
106
|
+
}
|
107
|
+
.instant-apps-create__option-text {
|
108
|
+
min-height: 2rem;
|
109
|
+
font-size: 0.75rem;
|
110
|
+
color: var(--calcite-color-text-2);
|
111
|
+
padding: 0.75rem 0 0 0.75rem;
|
112
|
+
}
|
113
|
+
.instant-apps-create__option-text-wrapper {
|
114
|
+
display: flex;
|
115
|
+
align-items: center;
|
116
|
+
}
|
117
|
+
.instant-apps-create__option-text h3 {
|
118
|
+
margin: 0;
|
119
|
+
font-size: var(--calcite-font-size-0);
|
120
|
+
font-weight: var(--calcite-font-weight-medium);
|
121
|
+
}
|
122
|
+
.instant-apps-create__option-text calcite-icon {
|
123
|
+
margin-left: 0.25rem;
|
124
|
+
color: rgb(126, 126, 126);
|
125
|
+
--tw-translate-x: 0px;
|
126
|
+
--tw-translate-y: 0;
|
127
|
+
--tw-rotate: 0;
|
128
|
+
--tw-skew-x: 0;
|
129
|
+
--tw-skew-y: 0;
|
130
|
+
--tw-scale-x: 1;
|
131
|
+
--tw-scale-y: 1;
|
132
|
+
transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
|
133
|
+
opacity: 0;
|
134
|
+
transition-property: all;
|
135
|
+
transition-duration: 150ms;
|
136
|
+
transition-timing-function: ease-in-out;
|
137
|
+
transition-delay: 0s;
|
138
|
+
}
|
139
|
+
a:hover .instant-apps-create__option-text calcite-icon {
|
140
|
+
opacity: 1;
|
141
|
+
--tw-translate-x: 0.5rem;
|
142
|
+
transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
|
143
|
+
}
|
144
|
+
.instant-apps-create__option-text p {
|
145
|
+
margin: 0;
|
146
|
+
font-size: var(--calcite-font-size--1);
|
147
|
+
color: var(--calcite-color-text-3);
|
148
|
+
line-height: 1.35;
|
149
|
+
min-height: 3rem;
|
150
|
+
}
|
@@ -155,14 +155,21 @@
|
|
155
155
|
width: var(--instant-apps-header-logo-width--logo-scale--l);
|
156
156
|
height: var(--instant-apps-header-logo-height--logo-scale--l);
|
157
157
|
}
|
158
|
-
:host .instant-apps-
|
159
|
-
:
|
160
|
-
:host .instant-apps-header__logo-height--l {
|
161
|
-
padding-right: 10px;
|
158
|
+
:host .instant-apps-header__actions-end-container {
|
159
|
+
display: flex;
|
162
160
|
}
|
163
|
-
:host .instant-apps-
|
164
|
-
:
|
165
|
-
:
|
166
|
-
|
167
|
-
|
161
|
+
:host .instant-apps-header__sign-in-container {
|
162
|
+
height: inherit;
|
163
|
+
display: flex;
|
164
|
+
align-items: center;
|
165
|
+
}
|
166
|
+
:host .instant-apps-header__sign-in-container calcite-dropdown,
|
167
|
+
:host .instant-apps-header__sign-in-container calcite-navigation-user {
|
168
|
+
height: 100%;
|
169
|
+
}
|
170
|
+
:host .instant-apps-header__sign-in-container calcite-button {
|
171
|
+
margin: 0 10px;
|
172
|
+
}
|
173
|
+
:host .instant-apps-header__sign-in-container calcite-dropdown-group {
|
174
|
+
min-width: 140px;
|
168
175
|
}
|
@@ -79,9 +79,19 @@
|
|
79
79
|
--calcite-color-brand-hover: var(--instant-apps-landing-page-entry-button-color);
|
80
80
|
--calcite-color-brand-press: var(--instant-apps-landing-page-entry-button-color);
|
81
81
|
}
|
82
|
+
:host .instant-apps-landing-page instant-apps-sign-in {
|
83
|
+
height: 100%;
|
84
|
+
width: 100%;
|
85
|
+
display: flex;
|
86
|
+
align-items: center;
|
87
|
+
justify-content: center;
|
88
|
+
}
|
82
89
|
:host .instant-apps-landing-page__remove-transition {
|
83
90
|
transition: none;
|
84
91
|
}
|
92
|
+
:host .instant-apps-landing-page__remove-padding {
|
93
|
+
padding: 0;
|
94
|
+
}
|
85
95
|
:host .instant-apps-landing-page--closed-no-transition {
|
86
96
|
display: none;
|
87
97
|
}
|
@@ -183,6 +193,15 @@
|
|
183
193
|
text-align: right;
|
184
194
|
}
|
185
195
|
|
196
|
+
.instant-apps-landing-page__sign-in {
|
197
|
+
width: 100%;
|
198
|
+
height: 100%;
|
199
|
+
}
|
200
|
+
|
201
|
+
.instant-apps-landing-page__sign-in--overlay {
|
202
|
+
background: rgba(0, 0, 0, 0.6);
|
203
|
+
}
|
204
|
+
|
186
205
|
@media only screen and (max-width: 768px) {
|
187
206
|
:host .instant-apps-landing-page__icon-image {
|
188
207
|
max-width: 70%;
|
@@ -0,0 +1,98 @@
|
|
1
|
+
:host {
|
2
|
+
display: block;
|
3
|
+
box-shadow: none !important;
|
4
|
+
}
|
5
|
+
:host .instant-apps-sign-in__container {
|
6
|
+
height: inherit;
|
7
|
+
display: flex;
|
8
|
+
align-items: center;
|
9
|
+
}
|
10
|
+
:host .instant-apps-sign-in__container calcite-dropdown,
|
11
|
+
:host .instant-apps-sign-in__container calcite-navigation-user {
|
12
|
+
height: 100%;
|
13
|
+
}
|
14
|
+
:host .instant-apps-sign-in__container .instant-apps-sign-in__sign-in-btn {
|
15
|
+
margin: 10px;
|
16
|
+
}
|
17
|
+
:host .instant-apps-sign-in__container calcite-dropdown[scale=m] calcite-dropdown-group {
|
18
|
+
min-width: 140px;
|
19
|
+
}
|
20
|
+
:host .instant-apps-sign-in__container calcite-dropdown[scale=s] calcite-dropdown-group {
|
21
|
+
min-width: 100px;
|
22
|
+
}
|
23
|
+
:host .instant-apps-sign-in__container calcite-dropdown-item {
|
24
|
+
--calcite-color-text-1: #d83020;
|
25
|
+
--calcite-color-text-3: #d83020;
|
26
|
+
}
|
27
|
+
:host .instant-apps-sign-in__container button {
|
28
|
+
height: 32px;
|
29
|
+
width: 32px;
|
30
|
+
padding: 0;
|
31
|
+
box-sizing: border-box;
|
32
|
+
display: flex;
|
33
|
+
cursor: pointer;
|
34
|
+
-webkit-user-select: none;
|
35
|
+
-moz-user-select: none;
|
36
|
+
user-select: none;
|
37
|
+
appearance: none;
|
38
|
+
-moz-appearance: none;
|
39
|
+
-webkit-appearance: none;
|
40
|
+
-webkit-text-decoration-line: none;
|
41
|
+
text-decoration-line: none;
|
42
|
+
transition: color var(--calcite-animation-timing) ease-in-out, background-color var(--calcite-animation-timing) ease-in-out, box-shadow var(--calcite-animation-timing) ease-in-out, outline-color var(--calcite-internal-animation-timing-fast) ease-in-out;
|
43
|
+
border: none;
|
44
|
+
border-radius: 50%;
|
45
|
+
background: #000;
|
46
|
+
}
|
47
|
+
:host .instant-apps-sign-in__container button:hover calcite-avatar {
|
48
|
+
opacity: 0.7;
|
49
|
+
transition: 0.3s;
|
50
|
+
}
|
51
|
+
:host .instant-apps-sign-in__landing-page {
|
52
|
+
display: flex;
|
53
|
+
flex-direction: column;
|
54
|
+
justify-content: center;
|
55
|
+
padding: 40px;
|
56
|
+
width: 50%;
|
57
|
+
min-height: 30%;
|
58
|
+
background: rgba(255, 255, 255, 0.8);
|
59
|
+
color: #151515;
|
60
|
+
text-align: center;
|
61
|
+
}
|
62
|
+
:host .instant-apps-sign-in__landing-page h1 {
|
63
|
+
font-size: 22px;
|
64
|
+
margin: 10px 0;
|
65
|
+
}
|
66
|
+
:host .instant-apps-sign-in__landing-page h2 {
|
67
|
+
font-size: 16px;
|
68
|
+
margin: 0 0 10px;
|
69
|
+
}
|
70
|
+
:host .instant-apps-sign-in__landing-page p {
|
71
|
+
font-size: 16px;
|
72
|
+
margin: 0;
|
73
|
+
}
|
74
|
+
:host .instant-apps-sign-in__landing-page-btns {
|
75
|
+
display: flex;
|
76
|
+
justify-content: space-between;
|
77
|
+
margin-top: 40px;
|
78
|
+
}
|
79
|
+
:host .instant-apps-sign-in__landing-page-btns calcite-button {
|
80
|
+
width: calc(50% - 5px);
|
81
|
+
--calcite-color-brand: var(--instant-apps-landing-page-entry-button-color);
|
82
|
+
--calcite-color-brand-hover: var(--instant-apps-landing-page-entry-button-color);
|
83
|
+
--calcite-color-brand-press: var(--instant-apps-landing-page-entry-button-color);
|
84
|
+
}
|
85
|
+
:host .instant-apps-sign-in__landing-page-btns calcite-button:hover {
|
86
|
+
filter: contrast(0.8);
|
87
|
+
}
|
88
|
+
@media screen and (max-width: 767px) {
|
89
|
+
:host .instant-apps-sign-in__landing-page-btns {
|
90
|
+
flex-direction: column;
|
91
|
+
width: 100%;
|
92
|
+
align-items: center;
|
93
|
+
height: 76px;
|
94
|
+
}
|
95
|
+
:host .instant-apps-sign-in__landing-page-btns calcite-button {
|
96
|
+
width: 100%;
|
97
|
+
}
|
98
|
+
}
|
@@ -140,10 +140,10 @@
|
|
140
140
|
//id: "c720e337ff814fe4a83bc244c46f8e43" //15 Layers
|
141
141
|
//id: "f5186c798b9e40dab1078658ddbc28cf" // 30K features
|
142
142
|
//id: "dda88d905a6748a5ab46bea5be795f33" // screening layers
|
143
|
-
id: "b5bdcb1e5d684dd3b21a2d44b8e4f928" //Popup content + like dislike
|
143
|
+
//id: "b5bdcb1e5d684dd3b21a2d44b8e4f928" //Popup content + like dislike
|
144
144
|
//id: "d399ec39959a4aac8617ae4f05dd6785" //Arcade
|
145
145
|
//id: "024e8a5e73a34c5aade9632d651c5750" //Attachments
|
146
|
-
|
146
|
+
id: "ae6d5d1936e84ce7adde44c7a7908846" //like dislike
|
147
147
|
// id: "ce3dec81bf714d3bb71da9691ab686d1" //Filter
|
148
148
|
}
|
149
149
|
const webMap = new WebMap({
|
@@ -219,7 +219,8 @@
|
|
219
219
|
like: false,
|
220
220
|
likeField: "Like_field",
|
221
221
|
dislike: false,
|
222
|
-
dislikeField: "Dislike_field"
|
222
|
+
dislikeField: "Dislike_field",
|
223
|
+
visible: false
|
223
224
|
},
|
224
225
|
"18cdb191817-layer-5": {
|
225
226
|
reporting: true,
|
@@ -227,7 +228,8 @@
|
|
227
228
|
like: true,
|
228
229
|
likeField: "Like_field",
|
229
230
|
dislike: true,
|
230
|
-
dislikeField: "Dislike_field"
|
231
|
+
dislikeField: "Dislike_field",
|
232
|
+
visible: false
|
231
233
|
},
|
232
234
|
"18f056682a4-layer-12":{
|
233
235
|
reporting: true,
|
@@ -235,41 +237,46 @@
|
|
235
237
|
like: true,
|
236
238
|
likeField: "shrt",
|
237
239
|
dislike: false,
|
238
|
-
dislikeField: "dislike_field"
|
240
|
+
dislikeField: "dislike_field",
|
241
|
+
visible: true
|
239
242
|
},
|
240
|
-
"
|
243
|
+
"18f2a1562a5-layer-3": {
|
241
244
|
reporting: true,
|
242
245
|
comment: true,
|
243
246
|
like: true,
|
244
247
|
likeField: "like_field",
|
245
248
|
dislike: true,
|
246
|
-
dislikeField: "dislike_field"
|
249
|
+
dislikeField: "dislike_field",
|
250
|
+
visible: true
|
247
251
|
},
|
248
|
-
"
|
252
|
+
"18f2a1562a7-layer-4": {
|
249
253
|
reporting: true,
|
250
254
|
comment: true,
|
251
255
|
like: true,
|
252
256
|
likeField: "like_field",
|
253
257
|
dislike: true,
|
254
|
-
dislikeField: "dislike_field"
|
258
|
+
dislikeField: "dislike_field",
|
259
|
+
visible: true
|
255
260
|
},
|
256
|
-
"18f2a1562a7-layer-
|
257
|
-
reporting:
|
261
|
+
"18f2a1562a7-layer-5": {
|
262
|
+
reporting: false,
|
258
263
|
comment: true,
|
259
264
|
like: true,
|
260
265
|
likeField: "like_field",
|
261
266
|
dislike: true,
|
262
|
-
dislikeField: "dislike_field"
|
267
|
+
dislikeField: "dislike_field",
|
268
|
+
visible: true
|
263
269
|
},
|
264
|
-
"
|
270
|
+
"18f2a1562a8-layer-6": {
|
265
271
|
reporting: true,
|
266
272
|
comment: true,
|
267
273
|
like: true,
|
268
274
|
likeField: "like_field",
|
269
275
|
dislike: true,
|
270
|
-
dislikeField: "dislike_field"
|
276
|
+
dislikeField: "dislike_field",
|
277
|
+
visible: true
|
271
278
|
},
|
272
|
-
"18f2a1562a8-layer-
|
279
|
+
"18f2a1562a8-layer-7": {
|
273
280
|
reporting: true,
|
274
281
|
comment: true,
|
275
282
|
like: true,
|
@@ -0,0 +1,6 @@
|
|
1
|
+
/*!
|
2
|
+
* Copyright 2022 Esri
|
3
|
+
* Licensed under the Apache License, Version 2.0
|
4
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
5
|
+
*/
|
6
|
+
import{r as t,c as i,h as s,H as e,F as a,g as h}from"./p-6d753a3d.js";import{l as o,g as l}from"./p-896c9644.js";import{g as c,a as n,b as r,c as d,h as u,d as p,q as f}from"./p-583e5dd0.js";import"./p-82e085d0.js";import"./p-c1cf3ebc.js";const m=class{constructor(s){t(this,s),this.togglePanel=i(this,"togglePanel",7),this.center=void 0,this.defaultWebmap="",this.description=void 0,this.enableAnonymousAccess=void 0,this.enableAnonymousComments=void 0,this.enableComments=void 0,this.enableHome=!0,this.enableLogin=void 0,this.enableNewReports=void 0,this.enableSearch=!0,this.enableZoom=!0,this.isMobile=void 0,this.layerExpressions=[],this.layerId=void 0,this.level=void 0,this.loginTitle=void 0,this.mapInfos=[],this.mapView=void 0,this.objectId=void 0,this.reportButtonText=void 0,this.reportingOptions=void 0,this.reportsHeader=void 0,this.reportSubmittedMessage=void 0,this.searchConfiguration=void 0,this.showComments=void 0,this.theme="light",this.zoomToScale=void 0,this._featureCreationFailedErrorMsg=void 0,this._filterActive=!1,this._filterOpen=!1,this._flowItems=[],this._hasValidLayers=!1,this._loadingFeatureDetails=void 0,this._mapInfo=void 0,this._reportSubmitted=!1,this._selectedLayerName=void 0,this._showSubmitCancelButton=!1,this._showLoadingIndicator=!1,this._sidePanelCollapsed=!1,this._translations=void 0,this._updatedProgressBarStatus=.25,this._updatedSorting=void 0,this._updatedSortOption="sortNewest",this._commentSubmitted=!1,this._addingCommentFailed=!1}async isMobileWatchHandler(){this._sidePanelCollapsed=!1}async mapViewWatchHandler(){await this.mapView.when((async()=>{await this.setMapView()}))}async componentWillLoad(){var t;this._urlParamsLoaded=!1,await this._initModules(),await this._getTranslations(),await(null===(t=this.mapView)||void 0===t?void 0:t.when((async()=>{this._layers=this.reportingOptions?Object.keys(this.reportingOptions).filter((t=>this.reportingOptions[t].visible)):[],await this.setMapView()})))}render(){const t="dark"===this.theme?"calcite-mode-dark":"calcite-mode-light";return s(e,{key:"25711a088216a3fcf2aa5d39b81ebd124f004306"},this._reportSubmitted&&s("calcite-alert",{key:"b8cf62929599eb873a52c7e7a9b056e25fd86c2a","auto-close":!0,class:t+" report-submitted-msg",icon:"check-circle",kind:"success",label:"",onCalciteAlertClose:()=>{this._reportSubmitted=!1},open:!0,placement:"top"},s("div",{key:"6411e0e7b57fd58f8ba7987331271f0494ba113b",slot:"message"},this.reportSubmittedMessage?this.reportSubmittedMessage:this._translations.submitMsg)),this._featureCreationFailedErrorMsg&&s("calcite-alert",{key:"67b28ad1e3493427227d2d59548a5eac80041dea","auto-close":!0,class:t,icon:"x-octagon",kind:"danger",label:"",onCalciteAlertClose:()=>{this._featureCreationFailedErrorMsg=""},open:!0,placement:"top"},s("div",{key:"3ad206c32a217e6a9a5bb1e638ef3160fbff5db2",slot:"title"},this._translations.error),s("div",{key:"7580dd6b3f81a9b0c4263fb9e71e2031e199b41d",slot:"message"},this._featureCreationFailedErrorMsg)),this._commentSubmitted&&s("calcite-alert",{key:"7be4c3b5d07e9f30551d19990462bb3d1152b2a3","auto-close":!0,class:"report-submitted "+t,icon:"check-circle",kind:"success",label:"",onCalciteAlertClose:()=>{this._commentSubmitted=!1},open:!0,placement:"top"},s("div",{key:"41c01a889ed6732cf7dabf0945fbfb261a0f3a3b",slot:"message"},this._translations.commentSubmittedMsg)),this._addingCommentFailed&&s("calcite-alert",{key:"29bca2310f6877ec976fbe49ac39413593202a4d","auto-close":!0,class:t,icon:"x-octagon",kind:"danger",label:"",onCalciteAlertClose:()=>{this._addingCommentFailed=!1},open:!0,placement:"top"},s("div",{key:"8a7860934cebec53462c46e0d979268c75fb9705",slot:"title"},this._translations.error),s("div",{key:"d675ee393e81f5104d87391075a9ae89b4077a45",slot:"message"},this._translations.addingCommentFailedMsg)),s("div",{key:"1fce11b73759bc751de763e040d15d85a3fb347d"},s("calcite-shell",{key:"71634d0d1b0fcbe92813ff9b514ec4e752bd3fd1","content-behind":!0},this._getReporter())),this.filterModal())}async _initModules(){const[t]=await o(["esri/core/reactiveUtils"]);this.reactiveUtils=t}async setSelectedLayer(t,i){this._selectedLayerId=t,this._selectedLayer=await c(this.mapView,t),this._selectedLayerName=i,this._validLayers.forEach((i=>{i.set("visible",!t||i.id===t)}))}_getLayersConfig(t){return this.reportingOptions&&this.reportingOptions[t]?this.reportingOptions[t]:null}_getReporter(){const t=[];return this._flowItems.forEach((i=>{switch(i){case"layer-list":t.push(this.getLayerListFlowItem());break;case"feature-list":t.push(this.getFeatureListFlowItem(this._selectedLayerId,this._selectedLayerName));break;case"feature-details":t.push(this.getFeatureDetailsFlowItem());break;case"reporting-layer-list":t.push(this.getChooseCategoryFlowItem());break;case"feature-create":t.push(this.getFeatureCreateFlowItem());break;case"comment-details":t.push(this.getCommentDetailsFlowItem());break;case"add-comment":t.push(this.getAddCommentFlowItem())}})),s("calcite-panel",{class:"width-full "+("dark"===this.theme?"calcite-mode-dark":"calcite-mode-light")},this.mapView?s("calcite-flow",null,(null==t?void 0:t.length)>0&&t):s("calcite-loader",{label:"",scale:"m"}))}filterModal(){var t,i;const e=this.layerExpressions?this.layerExpressions.filter((t=>t.id===this._selectedLayerId)):[];return e.length>0&&s("calcite-modal",{"aria-labelledby":"modal-title",class:"modal",kind:"brand",onCalciteModalClose:()=>{this._closeFilter()},open:this._filterOpen,widthScale:"s"},s("div",{class:"display-flex align-center",id:"modal-title",slot:"header"},null===(i=null===(t=this._translations)||void 0===t?void 0:t.filterLayerTitle)||void 0===i?void 0:i.replace("{{title}}",this._selectedLayerName)),s("div",{slot:"content"},s("instant-apps-filter-list",{autoUpdateUrl:!1,closeBtn:!0,closeBtnOnClick:()=>{this._closeFilter()},comboboxOverlayPositioning:"fixed",layerExpressions:e,onFilterListReset:()=>this._handleFilterListReset(),onFilterUpdate:()=>this._handleFilterUpdate(),ref:t=>this._filterList=t,view:this.mapView,zoomBtn:!1})))}_closeFilter(){this._filterOpen&&(this._filterOpen=!1)}_toggleFilter(){this._filterOpen=!this._filterOpen}async sortOptionClick(t,i,s){this._updatedSorting={field:t,order:i},this._updatedSortOption=s}_toggleSort(){const t=this.reportingOptions&&this.reportingOptions[this._selectedLayerId]&&this.reportingOptions[this._selectedLayerId].like&&this.reportingOptions[this._selectedLayerId].likeField;return s("calcite-popover",{autoClose:!0,label:"",offsetDistance:0,placement:this.isMobile?"leading-start":"auto",pointerDisabled:!0,referenceElement:"sort-popover"},s("calcite-list",{"selection-mode":"single"},s("calcite-list-item",{label:this._translations.sortNewest,onCalciteListItemSelect:()=>{this.sortOptionClick(this._selectedLayer.objectIdField,"desc","sortNewest")},selected:"sortNewest"===this._updatedSortOption,value:"sortNewest"}),s("calcite-list-item",{label:this._translations.sortOldest,onCalciteListItemSelect:()=>{this.sortOptionClick(this._selectedLayer.objectIdField,"asc","sortOldest")},selected:"sortOldest"===this._updatedSortOption,value:"sortOldest"}),t&&s(a,null,s("calcite-list-item",{label:this._translations.sortHighestVoted,onCalciteListItemSelect:()=>{this.sortOptionClick(this.reportingOptions[this._selectedLayerId].likeField,"desc","sortHighestVoted")},selected:"sortHighestVoted"===this._updatedSortOption,value:"sortHighestVoted"}),s("calcite-list-item",{label:this._translations.sortLowestVoted,onCalciteListItemSelect:()=>{this.sortOptionClick(this.reportingOptions[this._selectedLayerId].likeField,"asc","sortLowestVoted")},selected:"sortLowestVoted"===this._updatedSortOption,value:"sortLowestVoted"}))))}_handleFilterListReset(){this._filterActive=!1,this._featureList.refresh()}_handleFilterUpdate(){this._filterActive=this._filterList.urlParams.getAll("filter").length>0,this._featureList.refresh()}getLayerListFlowItem(){var t;return s("calcite-flow-item",{collapsed:this.isMobile&&this._sidePanelCollapsed,heading:this.reportsHeader},this.isMobile&&this.getActionToExpandCollapsePanel(),this._hasValidLayers&&this.enableNewReports&&s("calcite-button",{appearance:"solid",onClick:this.navigateToChooseCategory.bind(this),slot:"footer",width:"full"},this.reportButtonText?this.reportButtonText:this._translations.createReportButtonText),s("calcite-panel",{"full-height":!0,"full-width":!0},s("layer-list",{class:"height-full",layers:(null===(t=this._editableLayerIds)||void 0===t?void 0:t.length)>0?this._editableLayerIds:this._layers,mapView:this.mapView,onLayerSelect:this.displayFeaturesList.bind(this),onLayersListLoaded:this.layerListLoaded.bind(this),ref:t=>this._layerList=t,showFeatureCount:!0,showNextIcon:!0})))}getChooseCategoryFlowItem(){const t=this.reportingOptions?Object.keys(this.reportingOptions).filter((t=>this.reportingOptions[t].visible&&this.reportingOptions[t].reporting&&this._layerItemsHash[t]&&this._layerItemsHash[t].supportsAdd)):[];return s("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(),s("calcite-panel",{"full-height":!0,"full-width":!0},s("div",{class:"progress-bar"},s("calcite-progress",{type:"determinate",value:this._updatedProgressBarStatus})),s("calcite-notice",{class:"notice-msg",icon:"lightbulb",kind:"success",open:!0},s("div",{slot:"message"},this._translations.chooseCategoryMsg)),s("layer-list",{class:"height-full",layers:t,mapView:this.mapView,onLayerSelect:this.navigateToCreateFeature.bind(this),showFeatureCount:!1,showNextIcon:!1})))}getFeatureCreateFlowItem(){return s("calcite-flow-item",{collapsed:this.isMobile&&this._sidePanelCollapsed,heading:this._selectedLayerName,onCalciteFlowItemBack:this.backFromCreateFeaturePanel.bind(this)},this.isMobile&&this.getActionToExpandCollapsePanel(),this._showSubmitCancelButton&&s("div",{class:"width-full",slot:"footer"},s("calcite-button",{appearance:"solid",class:"footer-top-button footer-button",onClick:this.onCreateFeatureSubmitButtonClick.bind(this),width:"full"},this._translations.submit),s("calcite-button",{appearance:"outline",class:"footer-button",onClick:this.backFromCreateFeaturePanel.bind(this),width:"full"},this._translations.cancel)),s("calcite-panel",{"full-height":!0,"full-width":!0},s("div",{class:"progress-bar"},s("calcite-progress",{type:"determinate",value:this._updatedProgressBarStatus})),s("calcite-notice",{class:"notice-msg",icon:"lightbulb",kind:"success",open:!0},s("div",{slot:"message"},this._translations.featureEditFormInfoMsg)),s("create-feature",{customizeSubmit:!0,mapView:this.mapView,onDrawComplete:this.onDrawComplete.bind(this),onEditingAttachment:this.showSubmitCancelButton.bind(this),onFail:this.createFeatureFailed.bind(this),onProgressStatus:this.updatedProgressStatus.bind(this),onSuccess:this.onReportSubmitted.bind(this),ref:t=>this._createFeature=t,searchConfiguration:this.searchConfiguration,selectedLayerId:this._selectedLayerId})))}updatedProgressStatus(t){this._updatedProgressBarStatus=t.detail}onDrawComplete(){this._showSubmitCancelButton=!0}showSubmitCancelButton(t){this._showSubmitCancelButton=!t.detail}onCreateFeatureSubmitButtonClick(){this._createFeature&&this._createFeature.submit()}backFromCreateFeaturePanel(){this._createFeature&&this._createFeature.close(),this.backFromSelectedPanel()}onCreateRelatedFeatureSubmitButtonClick(){this._createRelatedFeature&&this._createRelatedFeature.submit()}backFromCreateRelatedFeaturePanel(){this._createRelatedFeature&&(this._createRelatedFeature.close(),this._showSubmitCancelButton=!1),this.backFromSelectedPanel()}createFeatureFailed(t){console.error(t.detail),this._featureCreationFailedErrorMsg=t.detail.message}onReportSubmitted(){this._reportSubmitted=!0,this.navigateToHomePage()}addCommentFailed(t){console.error(t.detail),this._addingCommentFailed=!0}async onCommentSubmitted(){this._commentSubmitted=!0,this.backFromSelectedPanel(),this._showLoadingIndicator=!0,await this._featureDetails.refresh(this._currentFeature),setTimeout((()=>{this._showLoadingIndicator=!1}),300)}async navigateToHomePage(){this._createFeature&&this._createFeature.close(),this._layerList&&this._layerList.refresh(),await this.setSelectedFeatures([]),1===this._editableLayerIds.length?(await this._featureList.refresh(),this._flowItems=["feature-list"]):this._flowItems=["layer-list"]}async navigateToCreateFeature(t){t.detail.layerId&&t.detail.layerName&&this.setSelectedLayer(t.detail.layerId,t.detail.layerName),this._showSubmitCancelButton=!1,this._flowItems=[...this._flowItems,"feature-create"]}navigateToChooseCategory(){this._flowItems=[...this._flowItems,"reporting-layer-list"]}async layerListLoaded(t){const i=t.detail,s=await n(this.mapView),e=[];this._validLayers=[],s.forEach((t=>{var s;i.includes(t.id)&&(this._validLayers.push(t),(null===(s=this._getLayersConfig(t.id))||void 0===s?void 0:s.reporting)&&this._layerItemsHash[t.id]&&this._layerItemsHash[t.id].supportsAdd&&e.push(t.id))})),this.handleMapClick(),this._hasValidLayers=e.length>0,this._urlParamsLoaded||(this._urlParamsLoaded=!0,await this.loadFeatureFromURLParams())}displayFeaturesList(t){this._updatedSorting={field:"",order:"desc"},this._filterActive=!1,this._updatedSortOption="sortNewest",this.setSelectedLayer(t.detail.layerId,t.detail.layerName),this._flowItems=[...this._flowItems,"feature-list"]}backFromSelectedPanel(){this._updatedProgressBarStatus=.25;const t=[...this._flowItems];"comment-details"!==t[t.length-1]&&"add-comment"!==t[t.length-1]&&this.clearHighlights(),t.pop(),1!==t.length||"layer-list"!==t[0]?this._flowItems=[...t]:this.navigateToHomePage()}toggleSidePanel(){this._sidePanelCollapsed=!this._sidePanelCollapsed,this.togglePanel.emit(this._sidePanelCollapsed)}async onFeatureSelectFromList(t){this._showLoadingIndicator=!0,await this.setSelectedFeatures([t.detail]),this._flowItems=[...this._flowItems,"feature-details"]}async getRelatedTable(){const t=this._currentFeature.layer.relationships[0].relatedTableId,i=(await r(this.mapView)).filter((i=>t===i.layerId));this._relatedTable=i[0]}async updatingFeatureDetails(t){this._showLoadingIndicator=t}async selectionChanged(t){this.updatingFeatureDetails(!0),await this.setCurrentFeature(t.detail.selectedFeature[0]),this.highlightOnMap(t.detail.selectedFeature[0]),this._selectedFeatureIndex=t.detail.selectedFeatureIndex,await this._featureDetails.refresh(t.detail.selectedFeature[0])}async onCommentSelectFromList(t){this._selectedRelatedFeature=[t.detail],this._flowItems=[...this._flowItems,"comment-details"]}getFeatureListFlowItem(t,i){var e,a;const h=null===(e=this.layerExpressions)||void 0===e?void 0:e.filter((t=>t.id===this._selectedLayerId)),o=(null===(a=this._getLayersConfig(this._selectedLayerId))||void 0===a?void 0:a.reporting)&&this._layerItemsHash[this._selectedLayerId].supportsAdd,l=(null==h?void 0:h.length)>0;return s("calcite-flow-item",{collapsed:this.isMobile&&this._sidePanelCollapsed,heading:i,loading:this._showLoadingIndicator,onCalciteFlowItemBack:this.backFromSelectedPanel.bind(this)},this._toggleSort(),s("calcite-action",{icon:"sort-ascending-arrow",id:"sort-popover",slot:"header-actions-end",text:this._translations.sort,title:this._translations.sort}),l&&s("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&&o&&s("calcite-button",{appearance:"solid",onClick:this.navigateToCreateFeature.bind(this),slot:"footer",width:"full"},this.reportButtonText?this.reportButtonText:this._translations.createReportButtonText),s("calcite-panel",{"full-height":!0},s("feature-list",{class:"height-full",highlightOnHover:!0,mapView:this.mapView,noFeaturesFoundMsg:this._translations.featureErrorMsg,onFeatureSelect:this.onFeatureSelectFromList.bind(this),pageSize:30,ref:t=>this._featureList=t,selectedLayerId:t,sortingInfo:this._updatedSorting})))}getFeatureDetailsFlowItem(){var t;const i=(null===(t=this._getLayersConfig(this._selectedLayerId))||void 0===t?void 0:t.comment)&&this._selectedLayer.relationships.length>0;return s("calcite-flow-item",{collapsed:this.isMobile&&this._sidePanelCollapsed,heading:this._selectedLayerName,loading:this._showLoadingIndicator,onCalciteFlowItemBack:this.backFromSelectedPanel.bind(this)},this.isMobile&&this.getActionToExpandCollapsePanel(),s("instant-apps-social-share",{autoUpdateShareUrl:!1,embed:!1,popoverButtonIconScale:"s",ref:t=>this._shareNode=t,removePopoverOffset:!0,scale:"s",shareButtonColor:"neutral",shareButtonType:"action",slot:"header-actions-end",socialMedia:!0,view:this.mapView}),this._selectedFeature.length>1&&this.getFeaturesPagination(),s("calcite-panel",null,s("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:t=>{this.updatingFeatureDetails(t.detail)},ref:t=>this._featureDetails=t,reportingOptions:this.reportingOptions}),i&&s("calcite-button",{appearance:"solid",onClick:()=>this._flowItems=[...this._flowItems,"add-comment"],slot:"footer",width:"full"},this._translations.comment)))}getFeaturesPagination(){return s("div",{class:"feature-pagination"},s("div",null,s("calcite-button",{appearance:"transparent",disabled:!1,iconStart:"chevron-left",id:"solutions-back",onClick:()=>{this._featureDetails.back()},scale:"s",width:"full"}),s("calcite-tooltip",{label:"",placement:"top","reference-element":"solutions-back"},s("span",null,this._translations.back))),s("calcite-button",{appearance:"transparent",onClick:()=>{this._featureDetails.toggleListView()},scale:"s"},s("span",{class:"pagination-count"},this._getCount())),s("div",null,s("calcite-button",{appearance:"transparent",disabled:!1,iconStart:"chevron-right",id:"solutions-next",onClick:()=>{this._featureDetails.next()},scale:"s",width:"full"}),s("calcite-tooltip",{placement:"top","reference-element":"solutions-next"},s("span",null,this._translations.next))))}getCommentDetailsFlowItem(){return s("calcite-flow-item",{collapsed:this.isMobile&&this._sidePanelCollapsed,heading:this._relatedTable.title,onCalciteFlowItemBack:this.backFromSelectedPanel.bind(this)},this.isMobile&&this.getActionToExpandCollapsePanel(),s("calcite-panel",{"full-height":!0},s("info-card",{allowEditing:!1,graphics:this._selectedRelatedFeature,highlightEnabled:!1,isLoading:!1,isMobile:!1,mapView:this.mapView,paginationEnabled:!1})))}getAddCommentFlowItem(){return s("calcite-flow-item",{collapsed:this.isMobile&&this._sidePanelCollapsed,heading:this._relatedTable.title,onCalciteFlowItemBack:this.backFromCreateRelatedFeaturePanel.bind(this)},this.isMobile&&this.getActionToExpandCollapsePanel(),s("div",{class:"width-full",slot:"footer"},this._showSubmitCancelButton&&s("div",{class:"width-full",slot:"footer"},s("calcite-button",{appearance:"solid",class:"footer-top-button footer-button",onClick:this.onCreateRelatedFeatureSubmitButtonClick.bind(this),width:"full"},this._translations.submit),s("calcite-button",{appearance:"outline",class:"footer-button",onClick:this.backFromCreateRelatedFeaturePanel.bind(this),width:"full"},this._translations.cancel))),s("calcite-panel",null,s("create-related-feature",{customizeSubmit:!0,mapView:this.mapView,onFail:this.addCommentFailed.bind(this),onIsActionPending:this.showSubmitCancelButton.bind(this),onSuccess:this.onCommentSubmitted.bind(this),ref:t=>this._createRelatedFeature=t,selectedFeature:this._currentFeature,table:this._relatedTable})))}async setSelectedFeatures(t){this._selectedFeature=t,await this.setCurrentFeature(this._selectedFeature.length?this._selectedFeature[0]:null)}async setCurrentFeature(t){var i;if(this._currentFeature=t,t&&t.layer){const s=t.layer;this.setSelectedLayer(s.id,s.title),this._currentFeatureId=t.attributes[s.objectIdField],(null===(i=this._getLayersConfig(s.id))||void 0===i?void 0:i.comment)&&s.relationships.length>0&&await this.getRelatedTable()}else this._editableLayerIds.length>1&&this.setSelectedLayer("",""),this._currentFeatureId="";this._updateShareURL()}async highlightOnMap(t){if(this.clearHighlights(),t&&t.geometry&&t.layer){const i=await d(this.mapView,t.layer.id);i.highlightOptions=null,this._highlightHandle=await u([t.getObjectId()],i,this.mapView,!0,this.zoomToScale)}this.updatingFeatureDetails(!1)}clearHighlights(){this._highlightHandle&&this._highlightHandle.remove()}getActionToExpandCollapsePanel(){return s("calcite-action",{icon:this._sidePanelCollapsed?"chevrons-up":"chevrons-down",onClick:this.toggleSidePanel.bind(this),slot:"header-actions-end",text:this._sidePanelCollapsed?this._translations.expand:this._translations.collapse})}async setMapView(){var t;await this.getLayersToShowInList(),1===(null===(t=this._editableLayerIds)||void 0===t?void 0:t.length)?await this.renderFeaturesList():this._flowItems=["layer-list"],this.mapView.popupEnabled=!1,this._defaultCenter&&this._defaultLevel&&(await this.mapView.goTo({center:this._defaultCenter,zoom:this._defaultLevel}),this._defaultCenter=void 0,this._defaultLevel=void 0)}handleMapClick(){this._mapClickHandle&&this._mapClickHandle.remove(),this._mapClickHandle=this.reactiveUtils.on((()=>this.mapView),"click",this.onMapClick.bind(this))}async onMapClick(t){this.mapView.popupEnabled=!1;const i=await this.mapView.hitTest(t);if(i.results.length>0){const t=[];i.results.forEach((function(i){"graphic"===i.type&&t.push(i.graphic)}));const s=t.filter((t=>this._validLayers.includes(t.layer))),e=t.filter((t=>{var i;return!this._validLayers.includes(t.layer)&&(null===(i=null==t?void 0:t.layer)||void 0===i?void 0:i.id)}));if(s.length>0&&(await this.setSelectedFeatures(s),this._flowItems.length&&this._flowItems.includes("feature-details")?(this._flowItems=[...this._flowItems.slice(0,this._flowItems.indexOf("feature-details")+1)],await this.highlightOnMap(t[0])):this._flowItems=[...this._flowItems,"feature-details"]),e.length>0){this.mapView.popupEnabled=!0;const t={features:e,updateLocationEnabled:!0};await this.mapView.openPopup(t)}}}_getCount(){const t=(this._selectedFeatureIndex+1).toString(),i=this._selectedFeature.length.toString();return this._translations.indexOfTotal.replace("{{index}}",t).replace("{{total}}",i)}async _getTranslations(){const t=await l(this.el);this._translations=t[0]}reduceToConfiguredLayers(t){return Object.keys(t).reduce(((i,s)=>((this.reportingOptions?this._getLayersConfig(s).visible:t[s].supportsAdd)&&i.push(s),i)),[])}async getLayersToShowInList(){const t=await p(this.mapView,!0);(await n(this.mapView)).forEach((i=>{var s,e;"feature"===(null==i?void 0:i.type)&&(null==i?void 0:i.editingEnabled)&&(null===(e=null===(s=null==i?void 0:i.capabilities)||void 0===s?void 0:s.operations)||void 0===e?void 0:e.supportsAdd)&&(t[i.id].supportsAdd=!0)})),this._editableLayerIds=this.reduceToConfiguredLayers(t),this._layerItemsHash=t}async renderFeaturesList(){this._flowItems=["feature-list"];const t={detail:this._editableLayerIds};await this.layerListLoaded(t),this.setSelectedLayer(this._validLayers[0].id,this._validLayers[0].title)}_updateShareURL(){var t,i;const s=null===(t=this._shareNode)||void 0===t?void 0:t.shareUrl;if(!s)return;const e=new URL(s);this._selectedLayerId?e.searchParams.set("layerid",this._selectedLayerId):e.searchParams.delete("layerid"),(null===(i=this._selectedFeature)||void 0===i?void 0:i.length)?e.searchParams.set("oid",this._currentFeatureId):e.searchParams.delete("oid"),this._shareNode.shareUrl=e.href}async loadFeatureFromURLParams(){if(this.center&&this.level&&await this.mapView.goTo({center:this.center.split(";").map(Number),zoom:this.level}),this.layerId&&this.objectId){const t=await c(this.mapView,this.layerId);if(t){const i=await f([Number(this.objectId)],t,[],!0,this.mapView.spatialReference);i.length&&(this._selectedFeature=i,this._flowItems=this._flowItems.length&&"feature-details"!==this._flowItems[this._flowItems.length-1]?[...this._flowItems,"feature-details"]:[...this._flowItems],await this.highlightOnMap(i[0]))}}}get el(){return h(this)}static get watchers(){return{isMobile:["isMobileWatchHandler"],mapView:["mapViewWatchHandler"]}}};m.style=":host{display:block;--calcite-label-margin-bottom:0px;--solutions-theme-foreground-color:var(--calcite-color-foreground-1)}.width-full{width:100% !important}.width-0{width:0}.height-full{height:100% !important}.height-0{height:0}.overflow-hidden{overflow:hidden}.border{border:1px solid var(--calcite-color-border-3)}.notice-msg{padding:10px;width:calc(100% - 20px)}.progress-bar{padding:12px}.footer-top-button{padding-bottom:7px}.footer-button{height:35px}.feature-pagination{background-color:var(--calcite-color-foreground-1) !important;border-block-end:1px solid var(--calcite-color-border-3);display:flex;justify-content:center;padding:5px 0}.pagination-count{color:var(--calcite-color-brand);border-bottom:1px solid var(--calcite-color-brand);font-weight:bold}.report-submitted-msg{position:absolute;z-index:1000}";export{m as crowdsource_reporter}
|