@arcgis/portal-components 5.2.0-next.87 → 5.2.0-next.89
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/cdn/5RYUVYNA.js +2 -0
- package/dist/cdn/{Y56BS6IQ.js → 6WGPYUA4.js} +76 -76
- package/dist/cdn/DC37QXXI.js +2 -0
- package/dist/cdn/{BBVFGC6Y.js → OFAEJ3GS.js} +1 -1
- package/dist/cdn/{2Q3FIPE2.js → RJPGQVI2.js} +1 -1
- package/dist/cdn/{LDIZD36E.js → S47JWYSF.js} +1 -1
- package/dist/cdn/index.js +1 -1
- package/dist/chunks/portal-browser-filter-date.js +63 -0
- package/dist/components/arcgis-portal-ai-assistant/customElement.d.ts +6 -0
- package/dist/components/arcgis-portal-ai-assistant/customElement.js +501 -498
- package/dist/components/arcgis-portal-group-browser/customElement.d.ts +3 -1
- package/dist/components/arcgis-portal-group-browser/customElement.js +385 -142
- package/dist/components/arcgis-portal-group-browser/types.d.ts +5 -0
- package/dist/components/arcgis-portal-navigation/customElement.js +74 -74
- package/dist/components/portal-browser/components/portal-browser-filter-date/customElement.js +6 -56
- package/dist/components/portal-group-browser-filters/customElement.js +1 -1
- package/dist/docs/api.json +1 -1
- package/dist/docs/docs.json +1 -1
- package/dist/docs/vscode.html-custom-data.json +1 -1
- package/dist/docs/web-types.json +1 -1
- package/dist/loader.js +2 -2
- package/dist/types/lumina.d.ts +2 -2
- package/dist/types/preact.d.ts +2 -2
- package/dist/types/react.d.ts +2 -2
- package/dist/types/stencil.d.ts +2 -2
- package/package.json +5 -5
- package/dist/cdn/25KISBCS.js +0 -2
- package/dist/cdn/C7XKSVMU.js +0 -2
|
@@ -1,80 +1,193 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import { c as
|
|
3
|
-
import { css as
|
|
4
|
-
import { keyed as
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
2
|
+
import { c as T } from "../../chunks/runtime.js";
|
|
3
|
+
import { css as W, html as p } from "lit";
|
|
4
|
+
import { keyed as A } from "lit/directives/keyed.js";
|
|
5
|
+
import { substitute as w } from "@arcgis/core/intl.js";
|
|
6
|
+
import { LitElement as M, createEvent as m, nothing as B, safeClassMap as q } from "@arcgis/lumina";
|
|
7
|
+
import { u as _ } from "../../chunks/useT9n.js";
|
|
8
|
+
import { a as $, i as g } from "../../chunks/functionalities.js";
|
|
9
|
+
import { c as E, a as P } from "../../chunks/string.js";
|
|
10
|
+
import { i as L } from "../../chunks/users.js";
|
|
9
11
|
import "../arcgis-portal-browser-search/customElement.js";
|
|
10
12
|
import "../arcgis-portal-browser-top-bar/customElement.js";
|
|
11
|
-
import { c as
|
|
13
|
+
import { c as I, a as D } from "../../chunks/portal-browser.js";
|
|
12
14
|
import "../arcgis-portal-group-card/customElement.js";
|
|
13
15
|
import "../arcgis-portal-group-browser-preview/customElement.js";
|
|
14
|
-
import { c as
|
|
15
|
-
import { i as
|
|
16
|
-
import
|
|
17
|
-
import { r as
|
|
18
|
-
import { a as
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
16
|
+
import { c as Q } from "../../chunks/store.js";
|
|
17
|
+
import { i as z, g as V, a as H, b as N, c as j, d as J } from "../../chunks/query.js";
|
|
18
|
+
import K from "@arcgis/core/portal/PortalGroup.js";
|
|
19
|
+
import { r as X } from "../../chunks/request.js";
|
|
20
|
+
import { a as Y } from "../../chunks/portal.js";
|
|
21
|
+
import { g as f, a as v, d as U, w as Z } from "../../chunks/portal-browser-filter-date.js";
|
|
22
|
+
import { b as O } from "../../chunks/ui.js";
|
|
23
|
+
import { watch as ee } from "@arcgis/core/core/reactiveUtils.js";
|
|
24
|
+
import { PortalGroupBrowserSort as te } from "../portal-group-browser-sort/customElement.js";
|
|
25
|
+
import { PortalGroupBrowserPagination as re } from "../portal-group-browser-pagination/customElement.js";
|
|
26
|
+
import { PortalGroupBrowserFilters as se } from "../portal-group-browser-filters/customElement.js";
|
|
27
|
+
const ie = W`:host{position:relative;background-color:var(--calcite-color-background);display:flex;flex-direction:column;height:100%;min-height:0;overflow-y:auto;overflow-x:hidden;--portal-group-browser-max-width: var(--group-browser-max-width, 100%);--portal-group-browser-pane-width: 18.75rem;--portal-group-browser-pane-z-index: 11;container-type:inline-size;container-name:portal-group-browser}arcgis-portal-browser{--arcgis-browser-max-width: var(--portal-group-browser-max-width);--arcgis-browser-pane-width: var(--portal-group-browser-pane-width);--arcgis-browser-pane-z-index: var(--portal-group-browser-pane-z-index)}.filters-title__heading{color:var(--calcite-color-text-1);font-size:var(--calcite-font-size-0);font-weight:var(--calcite-font-weight-medium);line-height:1.2;margin:0;padding:1rem .5rem}.filters-shell{display:block}.filters-shell__top{padding:0}.filters-shell__top--padded{padding:0 1rem 1rem}.filter__accordion-item{--calcite-accordion-item-content-space: .75rem .25rem;--calcite-accordion-icon-margin: .5rem;border-top:1px solid var(--calcite-color-border-1)}.filter__actions-slot{display:flex;align-self:center;align-items:center;line-height:0}.filter__content{margin:0}.filter__content--padded{margin:-.75rem .5rem 0}.filter__content>calcite-tree>calcite-tree-item>a{padding-block:.25rem}.clear-button{line-height:1;margin-inline:.25rem}.custom-date-picker{margin-block:.5rem;margin-inline-start:1.75rem;width:12.75rem}.groups-by-user__label{display:inline-block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:100%}.special-groups-settings-option{display:inline-flex;align-items:center;gap:.25rem}.special-groups-settings-icon{display:inline-flex;align-items:center}.group-browser__results{display:grid;gap:.5rem}.group-browser__results--compact{gap:0}.group-browser__result-card{margin:0}@container portal-group-browser (max-width: 640px){:host{--portal-group-browser-pane-width: 100%}}.empty-text-slot{width:100%;height:100%;display:flex;justify-content:center}.empty-text-slot__default{@apply max-w-lg mx-auto px-6 pb-16;max-width:32rem;margin-inline:auto;padding-inline:1.5rem;padding-bottom:4rem;margin-top:min(8rem,30vh)}`;
|
|
28
|
+
async function oe(r, e) {
|
|
29
|
+
const t = `${Y(r)}community/groups`, s = le(e), i = ce(e), o = !!e.searchUser?.trim();
|
|
30
|
+
if (!s.trim() && !o)
|
|
28
31
|
return {
|
|
29
32
|
nextStart: -1,
|
|
30
33
|
num: 0,
|
|
31
|
-
q:
|
|
32
|
-
queryParams: { ...i, q:
|
|
34
|
+
q: s,
|
|
35
|
+
queryParams: { ...i, q: s },
|
|
33
36
|
results: [],
|
|
34
37
|
start: 0,
|
|
35
38
|
total: 0
|
|
36
39
|
};
|
|
37
|
-
const
|
|
40
|
+
const a = { ...i, q: s }, n = await X({
|
|
38
41
|
url: t,
|
|
39
|
-
portal:
|
|
40
|
-
params:
|
|
41
|
-
}),
|
|
42
|
-
const
|
|
43
|
-
return
|
|
42
|
+
portal: r,
|
|
43
|
+
params: a
|
|
44
|
+
}), d = n.results.map((l) => {
|
|
45
|
+
const c = K.fromJSON(l);
|
|
46
|
+
return c.portal = r, c;
|
|
44
47
|
});
|
|
45
48
|
return {
|
|
46
|
-
...
|
|
47
|
-
q:
|
|
48
|
-
queryParams:
|
|
49
|
-
results:
|
|
49
|
+
...n,
|
|
50
|
+
q: s,
|
|
51
|
+
queryParams: a,
|
|
52
|
+
results: d
|
|
50
53
|
};
|
|
51
54
|
}
|
|
52
|
-
const
|
|
53
|
-
function
|
|
54
|
-
return !!
|
|
55
|
+
const ae = ["created", "modified", "owner", "title"];
|
|
56
|
+
function ne(r) {
|
|
57
|
+
return !!r && ae.includes(r);
|
|
55
58
|
}
|
|
56
|
-
function
|
|
57
|
-
const e = [], t =
|
|
59
|
+
function le(r) {
|
|
60
|
+
const e = [], t = r.baseQuery?.trim();
|
|
58
61
|
t && e.push(`(${t})`);
|
|
59
|
-
const
|
|
60
|
-
|
|
61
|
-
for (const i of Object.values(
|
|
62
|
+
const s = r.searchTerm?.trim();
|
|
63
|
+
s && e.push(`(${E(s)})`);
|
|
64
|
+
for (const i of Object.values(r.filters ?? {}))
|
|
62
65
|
typeof i.value == "string" && i.value.trim() && e.push(`(${i.value.trim()})`), typeof i.additionalParams == "string" && i.additionalParams.trim() && e.push(`(${i.additionalParams.trim()})`);
|
|
63
66
|
return e.join(" AND ");
|
|
64
67
|
}
|
|
65
|
-
function
|
|
68
|
+
function ce(r) {
|
|
66
69
|
return {
|
|
67
|
-
num:
|
|
68
|
-
start:
|
|
69
|
-
...
|
|
70
|
-
...
|
|
71
|
-
sortField:
|
|
72
|
-
sortOrder:
|
|
70
|
+
num: r.num,
|
|
71
|
+
start: r.start,
|
|
72
|
+
...r.searchUser ? { searchUserAccess: "groupMember", searchUserName: r.searchUser } : {},
|
|
73
|
+
...r.sortField === "relevance" || !ne(r.sortField) ? {} : {
|
|
74
|
+
sortField: r.sortField,
|
|
75
|
+
sortOrder: r.sortOrder
|
|
73
76
|
}
|
|
74
77
|
};
|
|
75
78
|
}
|
|
76
|
-
function
|
|
77
|
-
switch (
|
|
79
|
+
function he(r, e, t) {
|
|
80
|
+
switch (r) {
|
|
81
|
+
case "yesterday": {
|
|
82
|
+
const s = f();
|
|
83
|
+
return [s - U, s - 1];
|
|
84
|
+
}
|
|
85
|
+
case "today":
|
|
86
|
+
return [f(), v()];
|
|
87
|
+
case "last7":
|
|
88
|
+
return [f() - Z, v()];
|
|
89
|
+
case "last30":
|
|
90
|
+
return [f() - U * 30, v()];
|
|
91
|
+
case "never":
|
|
92
|
+
return [-1, -1];
|
|
93
|
+
case "custom":
|
|
94
|
+
return e && t ? [f(e), v(t)] : null;
|
|
95
|
+
default:
|
|
96
|
+
return $(r);
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
const de = ["created", "modified", "owner", "relevance", "title"], pe = ["asc", "desc"], ue = ["custom", "last7", "last30", "never", "today", "yesterday"], me = ["inOrg", "outsideOrg", "owner"], ge = ["anyOrg", "collaboration", "org"], we = ["anotherOrg", "myOrg"], fe = ["admin", "distributed", "openData", "settings", "sharedUpdate"], be = ["org", "private", "public"], ve = [
|
|
100
|
+
"access",
|
|
101
|
+
"created",
|
|
102
|
+
"created_from",
|
|
103
|
+
"created_to",
|
|
104
|
+
"memberorgids",
|
|
105
|
+
"membershipaccess",
|
|
106
|
+
"modified",
|
|
107
|
+
"modified_from",
|
|
108
|
+
"modified_to",
|
|
109
|
+
"owner",
|
|
110
|
+
"q",
|
|
111
|
+
"searchTerm",
|
|
112
|
+
"sortField",
|
|
113
|
+
"sortOrder",
|
|
114
|
+
"specialGroups",
|
|
115
|
+
"start",
|
|
116
|
+
"num"
|
|
117
|
+
];
|
|
118
|
+
function F(r) {
|
|
119
|
+
if (!r)
|
|
120
|
+
return;
|
|
121
|
+
const e = Number.parseInt(r, 10);
|
|
122
|
+
return Number.isFinite(e) && e > 0 ? e : void 0;
|
|
123
|
+
}
|
|
124
|
+
function C(r, e) {
|
|
125
|
+
const t = r.get(e);
|
|
126
|
+
if (!g(ue, t))
|
|
127
|
+
return;
|
|
128
|
+
if (t !== "custom")
|
|
129
|
+
return { range: t };
|
|
130
|
+
const s = F(r.get(`${e}_from`)), i = F(r.get(`${e}_to`));
|
|
131
|
+
if (!(!s || !i))
|
|
132
|
+
return { range: t, start: new Date(s), end: new Date(i) };
|
|
133
|
+
}
|
|
134
|
+
function R(r, e, t) {
|
|
135
|
+
t?.range && (r.set(e, t.range), t.range === "custom" && (t.start && r.set(`${e}_from`, `${f(t.start)}`), t.end && r.set(`${e}_to`, `${v(t.end)}`)));
|
|
136
|
+
}
|
|
137
|
+
function ye(r) {
|
|
138
|
+
const e = r.get("searchTerm")?.trim() || r.get("q")?.trim() || void 0, t = r.get("sortField"), s = r.get("sortOrder"), i = F(r.get("start")), o = F(r.get("num")), a = r.get("access"), n = r.get("memberorgids"), d = r.get("membershipaccess"), l = r.get("owner"), c = r.get("specialGroups"), h = C(r, "created"), u = C(r, "modified");
|
|
139
|
+
return {
|
|
140
|
+
...e ? { searchTerm: e } : {},
|
|
141
|
+
...g(de, t) ? { sortField: t } : {},
|
|
142
|
+
...g(pe, s) ? { sortOrder: s } : {},
|
|
143
|
+
...i ? { start: i } : {},
|
|
144
|
+
...o ? { num: o } : {},
|
|
145
|
+
filters: {
|
|
146
|
+
...g(be, a) ? { access: a } : {},
|
|
147
|
+
...h ? { created: h } : {},
|
|
148
|
+
...g(we, n) ? { memberOrg: n } : {},
|
|
149
|
+
...g(ge, d) ? { membership: d } : {},
|
|
150
|
+
...u ? { modified: u } : {},
|
|
151
|
+
...g(me, l) ? { owner: l } : {},
|
|
152
|
+
...g(fe, c) ? { specialGroups: c } : {}
|
|
153
|
+
}
|
|
154
|
+
};
|
|
155
|
+
}
|
|
156
|
+
function Fe(r) {
|
|
157
|
+
const e = new URLSearchParams(r.currentSearchParams);
|
|
158
|
+
return ve.forEach((t) => {
|
|
159
|
+
e.delete(t);
|
|
160
|
+
}), r.searchTerm?.trim() && e.set("searchTerm", r.searchTerm.trim()), r.sortField && e.set("sortField", r.sortField), r.sortOrder && e.set("sortOrder", r.sortOrder), Object.values(r.filters ?? {}).forEach((t) => {
|
|
161
|
+
if (t)
|
|
162
|
+
switch (t.id) {
|
|
163
|
+
case "owner":
|
|
164
|
+
t.owner && e.set("owner", t.owner);
|
|
165
|
+
break;
|
|
166
|
+
case "access":
|
|
167
|
+
t.access && e.set("access", t.access);
|
|
168
|
+
break;
|
|
169
|
+
case "specialGroups":
|
|
170
|
+
t.specialGroup && e.set("specialGroups", t.specialGroup);
|
|
171
|
+
break;
|
|
172
|
+
case "memberOrg":
|
|
173
|
+
t.memberOrg && e.set("memberorgids", t.memberOrg);
|
|
174
|
+
break;
|
|
175
|
+
case "membership":
|
|
176
|
+
t.membership && e.set("membershipaccess", t.membership);
|
|
177
|
+
break;
|
|
178
|
+
case "created":
|
|
179
|
+
R(e, "created", t);
|
|
180
|
+
break;
|
|
181
|
+
case "modified":
|
|
182
|
+
R(e, "modified", t);
|
|
183
|
+
break;
|
|
184
|
+
default:
|
|
185
|
+
$(t);
|
|
186
|
+
}
|
|
187
|
+
}), e;
|
|
188
|
+
}
|
|
189
|
+
function G(r, e = "desc") {
|
|
190
|
+
switch (r) {
|
|
78
191
|
case "owner":
|
|
79
192
|
case "title":
|
|
80
193
|
return "asc";
|
|
@@ -86,49 +199,49 @@ function F(s, e = "desc") {
|
|
|
86
199
|
return e;
|
|
87
200
|
}
|
|
88
201
|
}
|
|
89
|
-
function
|
|
90
|
-
let e, t,
|
|
202
|
+
function Ge(r) {
|
|
203
|
+
let e, t, s;
|
|
91
204
|
const i = () => {
|
|
92
205
|
e?.();
|
|
93
|
-
const
|
|
94
|
-
() =>
|
|
206
|
+
const l = ee(
|
|
207
|
+
() => r.getStore().width,
|
|
95
208
|
() => {
|
|
96
209
|
o();
|
|
97
210
|
}
|
|
98
211
|
);
|
|
99
212
|
e = () => {
|
|
100
|
-
|
|
213
|
+
l.remove();
|
|
101
214
|
};
|
|
102
215
|
}, o = () => {
|
|
103
|
-
const
|
|
104
|
-
|
|
105
|
-
const
|
|
106
|
-
|
|
216
|
+
const l = r.getStore(), c = l.width || r.getHostWidth() || r.getViewportWidth(), h = Math.min(c, r.getViewportWidth());
|
|
217
|
+
l.width !== h && (l.width = h);
|
|
218
|
+
const u = h > O.md ? "large" : "small";
|
|
219
|
+
r.getResponsiveFormFactor() === "large" && u === "small" && (l.panel = !1, l.filtersExpanded = !1), r.getResponsiveFormFactor() === "small" && u === "large" && (l.panel = !1, l.filtersExpanded = !0), r.setResponsiveFormFactor(u);
|
|
107
220
|
};
|
|
108
221
|
return {
|
|
109
222
|
connect: () => {
|
|
110
|
-
typeof ResizeObserver < "u" && (t = new ResizeObserver((
|
|
111
|
-
const
|
|
112
|
-
if (
|
|
113
|
-
const
|
|
114
|
-
|
|
223
|
+
typeof ResizeObserver < "u" && (t = new ResizeObserver((l) => {
|
|
224
|
+
const c = l[0]?.contentRect?.width ?? 0;
|
|
225
|
+
if (c > 0) {
|
|
226
|
+
const h = Math.round(c);
|
|
227
|
+
r.setHostWidth(h), r.getStore().width = h, o();
|
|
115
228
|
}
|
|
116
|
-
}), t.observe(
|
|
229
|
+
}), t.observe(r.el)), i(), o();
|
|
117
230
|
},
|
|
118
231
|
disconnect: () => {
|
|
119
|
-
|
|
232
|
+
s !== void 0 && (cancelAnimationFrame(s), s = void 0), e?.(), t?.disconnect(), t = void 0;
|
|
120
233
|
},
|
|
121
234
|
refreshStoreWatcher: i,
|
|
122
235
|
handleWindowResize: () => {
|
|
123
|
-
if (
|
|
124
|
-
if (
|
|
236
|
+
if (r.setViewportWidth(window.innerWidth), !t) {
|
|
237
|
+
if (s !== void 0)
|
|
125
238
|
return;
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
const
|
|
129
|
-
|
|
130
|
-
),
|
|
131
|
-
|
|
239
|
+
s = requestAnimationFrame(() => {
|
|
240
|
+
s = void 0;
|
|
241
|
+
const l = Math.round(
|
|
242
|
+
r.el.getBoundingClientRect().width || r.getHostWidth() || r.getViewportWidth()
|
|
243
|
+
), c = Math.min(l, r.getViewportWidth()), h = r.getStore();
|
|
244
|
+
h.width !== c && (h.width = c), o();
|
|
132
245
|
});
|
|
133
246
|
return;
|
|
134
247
|
}
|
|
@@ -137,23 +250,42 @@ function J(s) {
|
|
|
137
250
|
updateResponsiveLayout: o
|
|
138
251
|
};
|
|
139
252
|
}
|
|
140
|
-
|
|
253
|
+
function Se(r) {
|
|
254
|
+
let e = !1;
|
|
255
|
+
const t = () => !!r.getSearchParamInteraction()?.read, s = () => !!r.getSearchParamInteraction()?.write;
|
|
256
|
+
return { hydrateFromLocation: async () => {
|
|
257
|
+
!t() || typeof window > "u" || (await r.applySearchParams(new URLSearchParams(window.location.search)), e = !0);
|
|
258
|
+
}, writeToLocation: (a) => {
|
|
259
|
+
if (!s() || typeof window > "u")
|
|
260
|
+
return;
|
|
261
|
+
if (e) {
|
|
262
|
+
e = !1;
|
|
263
|
+
return;
|
|
264
|
+
}
|
|
265
|
+
const n = a.toString(), d = window.location.search.startsWith("?") ? window.location.search.slice(1) : window.location.search;
|
|
266
|
+
if (n === d)
|
|
267
|
+
return;
|
|
268
|
+
const l = `${window.location.pathname}${n ? `?${n}` : ""}${window.location.hash}`;
|
|
269
|
+
window.history.replaceState(window.history.state, "", l);
|
|
270
|
+
} };
|
|
271
|
+
}
|
|
272
|
+
const S = ["title", "relevance", "modified"], x = {
|
|
141
273
|
queryParams: void 0,
|
|
142
274
|
nextStart: -1,
|
|
143
275
|
results: [],
|
|
144
276
|
start: -1,
|
|
145
277
|
num: 0,
|
|
146
278
|
total: 0
|
|
147
|
-
},
|
|
279
|
+
}, k = [
|
|
148
280
|
"openData",
|
|
149
281
|
"sharedUpdate",
|
|
150
282
|
"distributed",
|
|
151
283
|
"admin",
|
|
152
284
|
"settings"
|
|
153
285
|
];
|
|
154
|
-
class
|
|
286
|
+
class Oe extends M {
|
|
155
287
|
constructor() {
|
|
156
|
-
super(...arguments), this._messages =
|
|
288
|
+
super(...arguments), this._messages = _({ name: "portal-group-browser", blocking: !0 }), this._browserMessages = _({ name: "portal-browser", blocking: !0 }), this.responsiveLayoutController = Ge({
|
|
157
289
|
el: this.el,
|
|
158
290
|
getStore: () => this.store,
|
|
159
291
|
getViewportWidth: () => this.viewportWidth,
|
|
@@ -168,14 +300,19 @@ class K extends U {
|
|
|
168
300
|
setResponsiveFormFactor: (e) => {
|
|
169
301
|
this.responsiveFormFactor = e;
|
|
170
302
|
}
|
|
171
|
-
}), this.restoreFocusTarget = null, this.
|
|
303
|
+
}), this.restoreFocusTarget = null, this.searchParamController = Se({
|
|
304
|
+
applySearchParams: async (e) => {
|
|
305
|
+
await this.applySearchParams(e);
|
|
306
|
+
},
|
|
307
|
+
getSearchParamInteraction: () => this.searchParamInteraction
|
|
308
|
+
}), this.handleBrowserFilterClear = () => {
|
|
172
309
|
this.clearFilters();
|
|
173
310
|
}, this.handleBrowserFilterRemove = (e) => {
|
|
174
311
|
const t = e.detail;
|
|
175
312
|
t && this.removeFilter(t);
|
|
176
|
-
}, this.selectedOwner = null, this.selectedMembership = null, this.selectedMemberOrg = null, this.selectedSpecialGroup = null, this.selectedAccess = null, this.selectedGroups = [], this.previewGroup = null, this.queryResponse =
|
|
313
|
+
}, this.selectedOwner = null, this.selectedMembership = null, this.selectedMemberOrg = null, this.selectedSpecialGroup = null, this.selectedAccess = null, this.selectedGroups = [], this.previewGroup = null, this.queryResponse = x, this.specialGroupOptions = k, this.responsiveFormFactor = "large", this.viewportWidth = typeof window > "u" ? O.lg : window.innerWidth, this.hostWidth = 0, this.store = Q({
|
|
177
314
|
type: "group-browser",
|
|
178
|
-
width: window?.innerWidth ??
|
|
315
|
+
width: window?.innerWidth ?? O.lg,
|
|
179
316
|
hiddenFilters: [],
|
|
180
317
|
filtersEmpty: !1,
|
|
181
318
|
topbarEmpty: !1,
|
|
@@ -186,15 +323,18 @@ class K extends U {
|
|
|
186
323
|
}), this.filters = {}, this.loading = !1, this.formFactor = "large", this.height = "full", this.searchTerm = "", this.cards = {}, this.preview = "top", this.q = "", this.num = 60, this.sort = {
|
|
187
324
|
enabled: !0,
|
|
188
325
|
props: {
|
|
189
|
-
options:
|
|
326
|
+
options: S
|
|
190
327
|
}
|
|
191
|
-
}, this.
|
|
328
|
+
}, this.searchParamInteraction = {
|
|
329
|
+
read: !1,
|
|
330
|
+
write: !1
|
|
331
|
+
}, this.selection = "none", this.alwaysShowSelection = !1, this.hidePreviewFooter = !1, this.hidePreviewBadges = !1, this.hasIndoorsSpaces = !1, this.arcgisGroupBrowserLoading = m(), this.arcgisGroupBrowserPreview = m(), this.arcgisGroupBrowserSelect = m(), this.arcgisGroupBrowserSublayerPreview = m(), this.arcgisGroupBrowserUpdate = m(), this.arcgisGroupBrowserInternalUIAction = m(), this.arcgisGroupBrowserUserFilterChange = m(), this.arcgisAriaUpdate = m();
|
|
192
332
|
}
|
|
193
333
|
static {
|
|
194
|
-
this.properties = { selectedGroupsByUser: 16, selectedOwner: 16, selectedMembership: 16, selectedMemberOrg: 16, selectedSpecialGroup: 16, selectedAccess: 16, selectedGroups: 16, previewGroup: 16, queryResponse: 16, specialGroupOptions: 16, sortField: 16, sortOrder: 16, responsiveFormFactor: 16, viewportWidth: 16, hostWidth: 16, store: 0, filters: 0, loading: 5, formFactor: 1, height: 3, searchTerm: 1, selected: 0, cards: 0, preview: 1, q: 1, portal: 0, num: 9, sort: 0, fetch: 0, preflight: 0, searchUser: 1, selection: 1, alwaysShowSelection: 5, hidePreviewFooter: 5, hidePreviewBadges: 5, hasIndoorsSpaces: 5 };
|
|
334
|
+
this.properties = { selectedGroupsByUser: 16, selectedOwner: 16, selectedMembership: 16, selectedMemberOrg: 16, selectedSpecialGroup: 16, selectedAccess: 16, selectedGroups: 16, previewGroup: 16, queryResponse: 16, specialGroupOptions: 16, sortField: 16, sortOrder: 16, responsiveFormFactor: 16, viewportWidth: 16, hostWidth: 16, store: 0, filters: 0, loading: 5, formFactor: 1, height: 3, searchTerm: 1, selected: 0, cards: 0, preview: 1, q: 1, portal: 0, num: 9, sort: 0, fetch: 0, preflight: 0, searchUser: 1, searchParamInteraction: 0, selection: 1, alwaysShowSelection: 5, hidePreviewFooter: 5, hidePreviewBadges: 5, hasIndoorsSpaces: 5 };
|
|
195
335
|
}
|
|
196
336
|
static {
|
|
197
|
-
this.styles =
|
|
337
|
+
this.styles = ie;
|
|
198
338
|
}
|
|
199
339
|
get currentUsername() {
|
|
200
340
|
return this.portal.user?.username ?? "";
|
|
@@ -203,7 +343,10 @@ class K extends U {
|
|
|
203
343
|
await this.fetchGroups();
|
|
204
344
|
}
|
|
205
345
|
connectedCallback() {
|
|
206
|
-
super.connectedCallback(), window.addEventListener("resize", this.responsiveLayoutController.handleWindowResize), this.responsiveLayoutController.connect()
|
|
346
|
+
super.connectedCallback(), window.addEventListener("resize", this.responsiveLayoutController.handleWindowResize), this.responsiveLayoutController.connect();
|
|
347
|
+
}
|
|
348
|
+
firstUpdated() {
|
|
349
|
+
this.initializeBrowserState();
|
|
207
350
|
}
|
|
208
351
|
updated(e) {
|
|
209
352
|
e.has("store") && (this.responsiveLayoutController.refreshStoreWatcher(), this.responsiveLayoutController.updateResponsiveLayout()), e.has("selected") && (this.selectedGroups = this.selected || []);
|
|
@@ -216,6 +359,9 @@ class K extends U {
|
|
|
216
359
|
syncSelectionsFromConfig() {
|
|
217
360
|
this.selectedGroupsByUser = this.filters.groupsByUser?.props?.selectedUsername ?? this.currentUsername, this.selectedOwner = this.filters.owner?.props?.owner || null, this.selectedMembership = this.filters.membership?.props?.membership || null, this.selectedMemberOrg = this.filters.memberOrg?.props?.memberOrg || null, this.selectedSpecialGroup = this.filters.specialGroups?.props?.specialGroup || null, this.selectedAccess = this.filters.access?.props?.access || null;
|
|
218
361
|
}
|
|
362
|
+
async initializeBrowserState() {
|
|
363
|
+
this.syncSortFromConfig(), this.selectedGroups = this.selected || [], this.syncSelectionsFromConfig(), await this.searchParamController.hydrateFromLocation(), await this.updateSpecialGroupOptions(!1), await this.fetchGroups();
|
|
364
|
+
}
|
|
219
365
|
resetSelectionByFilterId(e) {
|
|
220
366
|
switch (e) {
|
|
221
367
|
case "groupsByUser":
|
|
@@ -245,7 +391,7 @@ class K extends U {
|
|
|
245
391
|
this.requestUpdate();
|
|
246
392
|
}
|
|
247
393
|
syncSortFromConfig() {
|
|
248
|
-
const e = this.sort, t = e.props?.options ??
|
|
394
|
+
const e = this.sort, t = e.props?.options ?? S;
|
|
249
395
|
if (!e.enabled) {
|
|
250
396
|
this.sortField = void 0, this.sortOrder = void 0;
|
|
251
397
|
return;
|
|
@@ -254,23 +400,120 @@ class K extends U {
|
|
|
254
400
|
this.sortField = void 0, this.sortOrder = void 0;
|
|
255
401
|
return;
|
|
256
402
|
}
|
|
257
|
-
const
|
|
258
|
-
this.sortField = i, this.sortOrder = e.props?.order ??
|
|
403
|
+
const s = e.props?.field, i = s && t.includes(s) ? s : t[0];
|
|
404
|
+
this.sortField = i, this.sortOrder = e.props?.order ?? G(i, this.sortOrder);
|
|
259
405
|
}
|
|
260
|
-
async updateSpecialGroupOptions() {
|
|
406
|
+
async updateSpecialGroupOptions(e = !0) {
|
|
261
407
|
if (!this.portal) {
|
|
262
408
|
this.specialGroupOptions = [];
|
|
263
409
|
return;
|
|
264
410
|
}
|
|
265
|
-
let
|
|
411
|
+
let t = "";
|
|
266
412
|
try {
|
|
267
|
-
|
|
413
|
+
t = await z(this.portal);
|
|
268
414
|
} catch {
|
|
269
|
-
|
|
415
|
+
t = "";
|
|
416
|
+
}
|
|
417
|
+
if (this.specialGroupOptions = k.filter((s) => !(s === "openData" && this.portal.isPortal || // https://devtopia.esri.com/webgis/arcgis-portal-app/issues/37831
|
|
418
|
+
s === "distributed" && this.hasIndoorsSpaces || // https://devtopia.esri.com/WebGIS/arcgis-portal-app/issues/45449 orgs with no settings
|
|
419
|
+
s === "settings" && !t)), this.selectedSpecialGroup && !this.specialGroupOptions.includes(this.selectedSpecialGroup))
|
|
420
|
+
if (e)
|
|
421
|
+
this.removeFilter("specialGroups");
|
|
422
|
+
else {
|
|
423
|
+
const { specialGroups: s, ...i } = this.store.filters;
|
|
424
|
+
this.store.filters = {
|
|
425
|
+
...i
|
|
426
|
+
}, this.selectedSpecialGroup = null;
|
|
427
|
+
}
|
|
428
|
+
}
|
|
429
|
+
async applySearchParams(e) {
|
|
430
|
+
const t = ye(e);
|
|
431
|
+
if (!this.searchTerm && t.searchTerm && (this.searchTerm = t.searchTerm), this.sort.enabled) {
|
|
432
|
+
const s = this.sort.props?.options ?? S;
|
|
433
|
+
t.sortField && this.sort.props?.field === void 0 && s.includes(t.sortField) && (this.sortField = t.sortField), t.sortOrder && this.sort.props?.order === void 0 ? this.sortOrder = t.sortOrder : t.sortField && this.sort.props?.order === void 0 && (this.sortOrder = G(t.sortField, this.sortOrder));
|
|
434
|
+
}
|
|
435
|
+
await this.applyFilterSearchParams(t.filters);
|
|
436
|
+
}
|
|
437
|
+
async applyFilterSearchParams(e) {
|
|
438
|
+
const t = { ...this.store.filters };
|
|
439
|
+
let s = !1;
|
|
440
|
+
const i = L(this.portal.user);
|
|
441
|
+
if (e.owner && this.filters.owner?.enabled && !this.filters.owner.props?.owner) {
|
|
442
|
+
const n = this.filters.owner.props?.username ?? this.currentUsername;
|
|
443
|
+
t.owner = {
|
|
444
|
+
id: "owner",
|
|
445
|
+
label: w(this._messages.owner.label, {
|
|
446
|
+
label: this.getOwnerOptionLabel(e.owner, n, i)
|
|
447
|
+
}),
|
|
448
|
+
param: "q",
|
|
449
|
+
value: V(e.owner, n, { isPublicUser: i, orgId: this.portal.id ?? "" }),
|
|
450
|
+
owner: e.owner,
|
|
451
|
+
username: n
|
|
452
|
+
}, this.selectedOwner = e.owner, s = !0;
|
|
270
453
|
}
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
454
|
+
e.membership && this.filters.membership?.enabled && !this.filters.membership.props?.membership && (t.membership = {
|
|
455
|
+
id: "membership",
|
|
456
|
+
label: w(this._messages.membership.label, { label: this._messages.membership[e.membership] }),
|
|
457
|
+
param: "q",
|
|
458
|
+
value: H(e.membership, this.hasIndoorsSpaces),
|
|
459
|
+
membership: e.membership
|
|
460
|
+
}, this.selectedMembership = e.membership, s = !0), e.memberOrg && this.filters.memberOrg?.enabled && !this.filters.memberOrg.props?.memberOrg && (t.memberOrg = {
|
|
461
|
+
id: "memberOrg",
|
|
462
|
+
label: w(this._messages.memberOrg.label, { label: this._messages.memberOrg[e.memberOrg] }),
|
|
463
|
+
param: "q",
|
|
464
|
+
value: N(e.memberOrg, this.filters.memberOrg.props?.orgId ?? this.portal.id ?? ""),
|
|
465
|
+
memberOrg: e.memberOrg,
|
|
466
|
+
orgId: this.filters.memberOrg.props?.orgId ?? this.portal.id ?? ""
|
|
467
|
+
}, this.selectedMemberOrg = e.memberOrg, s = !0), e.specialGroups && this.filters.specialGroups?.enabled && !this.filters.specialGroups.props?.specialGroup && (t.specialGroups = {
|
|
468
|
+
id: "specialGroups",
|
|
469
|
+
label: w(this._messages.specialGroups.label, {
|
|
470
|
+
label: this._messages.specialGroups[e.specialGroups]
|
|
471
|
+
}),
|
|
472
|
+
param: "q",
|
|
473
|
+
value: await j(e.specialGroups, this.portal),
|
|
474
|
+
specialGroup: e.specialGroups
|
|
475
|
+
}, this.selectedSpecialGroup = e.specialGroups, s = !0), e.access && this.filters.access?.enabled && !this.filters.access.props?.access && (t.access = {
|
|
476
|
+
id: "access",
|
|
477
|
+
label: w(this._messages.access.label, { label: this._messages.access[e.access] }),
|
|
478
|
+
param: "q",
|
|
479
|
+
value: J(e.access),
|
|
480
|
+
access: e.access
|
|
481
|
+
}, this.selectedAccess = e.access, s = !0);
|
|
482
|
+
const o = this.getDateFilterDetailFromSearchParams("created", e.created);
|
|
483
|
+
o && (t.created = o, s = !0);
|
|
484
|
+
const a = this.getDateFilterDetailFromSearchParams("modified", e.modified);
|
|
485
|
+
a && (t.modified = a, s = !0), s && (this.store.filters = t, this.publishFilterStateChange());
|
|
486
|
+
}
|
|
487
|
+
getDateFilterDetailFromSearchParams(e, t) {
|
|
488
|
+
const s = this.filters[e];
|
|
489
|
+
if (!s?.enabled || s.props?.range || s.props?.start || s.props?.end || !t?.range)
|
|
490
|
+
return;
|
|
491
|
+
const i = he(t.range, t.start, t.end);
|
|
492
|
+
if (!i)
|
|
493
|
+
return;
|
|
494
|
+
const o = this._browserMessages.filterDate[t.range], [a, n] = i;
|
|
495
|
+
return {
|
|
496
|
+
id: e,
|
|
497
|
+
label: w(this._browserMessages.filterDate[e], { date: o }),
|
|
498
|
+
param: "q",
|
|
499
|
+
value: `(${s.props?.serverProperty ?? (e === "modified" ? "modified" : "uploaded")}:[${a} TO ${n}])`,
|
|
500
|
+
range: t.range,
|
|
501
|
+
start: new Date(a),
|
|
502
|
+
end: new Date(n)
|
|
503
|
+
};
|
|
504
|
+
}
|
|
505
|
+
getOwnerOptionLabel(e, t, s) {
|
|
506
|
+
return e === "owner" ? t : e === "outsideOrg" && s ? this._messages.owner.someoneElse : e === "inOrg" ? this._messages.owner.inOrg : this._messages.owner.outsideOrg;
|
|
507
|
+
}
|
|
508
|
+
writeSearchParams(e, t) {
|
|
509
|
+
const s = Fe({
|
|
510
|
+
currentSearchParams: typeof window > "u" ? void 0 : new URLSearchParams(window.location.search),
|
|
511
|
+
filters: this.store.filters,
|
|
512
|
+
searchTerm: t,
|
|
513
|
+
sortField: e.queryParams?.sortField,
|
|
514
|
+
sortOrder: e.queryParams?.sortOrder
|
|
515
|
+
});
|
|
516
|
+
this.searchParamController.writeToLocation(s);
|
|
274
517
|
}
|
|
275
518
|
async fetchGroups() {
|
|
276
519
|
this.loading = !0, this.arcgisGroupBrowserLoading.emit();
|
|
@@ -281,11 +524,11 @@ class K extends U {
|
|
|
281
524
|
const t = this.store.filters[e];
|
|
282
525
|
t && (this.store.filters = {
|
|
283
526
|
...this.store.filters,
|
|
284
|
-
[e]:
|
|
527
|
+
[e]: I(t)
|
|
285
528
|
}, this.resetSelectionByFilterId(e), this.publishFilterStateChange(), this.fetchGroups());
|
|
286
529
|
}
|
|
287
530
|
clearFilters() {
|
|
288
|
-
this.store.filters =
|
|
531
|
+
this.store.filters = D(this.store.filters, {
|
|
289
532
|
hiddenFilterIds: this.store.hiddenFilters
|
|
290
533
|
}), this.resetAllFilterSelections(), this.publishFilterStateChange(), this.fetchGroups();
|
|
291
534
|
}
|
|
@@ -314,7 +557,7 @@ class K extends U {
|
|
|
314
557
|
this.selectedSpecialGroup = e.value;
|
|
315
558
|
break;
|
|
316
559
|
default:
|
|
317
|
-
|
|
560
|
+
$(e);
|
|
318
561
|
}
|
|
319
562
|
}
|
|
320
563
|
selectGroup(e) {
|
|
@@ -327,13 +570,13 @@ class K extends U {
|
|
|
327
570
|
return this.selectedGroups.some(({ id: t }) => e.id === t);
|
|
328
571
|
}
|
|
329
572
|
handleGroupCardSelect(e) {
|
|
330
|
-
const { selected: t, group:
|
|
573
|
+
const { selected: t, group: s } = e.detail;
|
|
331
574
|
switch (this.selection) {
|
|
332
575
|
case "single":
|
|
333
|
-
this.selectedGroups = [
|
|
576
|
+
this.selectedGroups = [s];
|
|
334
577
|
break;
|
|
335
578
|
case "multiple":
|
|
336
|
-
t ? this.selectGroup(
|
|
579
|
+
t ? this.selectGroup(s) : this.deselectGroup(s);
|
|
337
580
|
break;
|
|
338
581
|
default:
|
|
339
582
|
return;
|
|
@@ -358,7 +601,7 @@ class K extends U {
|
|
|
358
601
|
}
|
|
359
602
|
}
|
|
360
603
|
async handleSortFieldChange(e) {
|
|
361
|
-
this.sortField = e, this.sortOrder =
|
|
604
|
+
this.sortField = e, this.sortOrder = G(e, this.sortOrder), this.loading = !0, this.arcgisGroupBrowserLoading.emit();
|
|
362
605
|
const t = this.createQuery({ start: 1, total: 0 });
|
|
363
606
|
await this.fetchAndEmit(t, this.searchTerm);
|
|
364
607
|
}
|
|
@@ -368,23 +611,23 @@ class K extends U {
|
|
|
368
611
|
await this.fetchAndEmit(t, this.searchTerm);
|
|
369
612
|
}
|
|
370
613
|
emitUpdate(e, t) {
|
|
371
|
-
const
|
|
614
|
+
const s = e.queryParams;
|
|
372
615
|
this.arcgisGroupBrowserUpdate.emit({
|
|
373
616
|
queryResponse: e,
|
|
374
|
-
sortField:
|
|
375
|
-
sortOrder:
|
|
617
|
+
sortField: s?.sortField,
|
|
618
|
+
sortOrder: s?.sortOrder,
|
|
376
619
|
selectedGroups: this.selectedGroups,
|
|
377
620
|
filters: { ...this.store.filters },
|
|
378
621
|
searchTerm: t
|
|
379
|
-
});
|
|
622
|
+
}), this.writeSearchParams(e, t);
|
|
380
623
|
}
|
|
381
624
|
async queryGroups(e) {
|
|
382
|
-
return await (this.fetch?.(e) ??
|
|
625
|
+
return await (this.fetch?.(e) ?? oe(this.portal, e));
|
|
383
626
|
}
|
|
384
627
|
async fetchAndEmit(e, t) {
|
|
385
628
|
this.preflight && (e = await this.preflight(e));
|
|
386
|
-
const
|
|
387
|
-
this.queryResponse =
|
|
629
|
+
const s = await this.queryGroups(e);
|
|
630
|
+
this.queryResponse = s, this.loading = !1, this.emitUpdate(s, t);
|
|
388
631
|
}
|
|
389
632
|
createQuery(e = {}) {
|
|
390
633
|
return {
|
|
@@ -404,79 +647,79 @@ class K extends U {
|
|
|
404
647
|
const t = this.createQuery({ searchTerm: e });
|
|
405
648
|
await this.fetchAndEmit(t, e);
|
|
406
649
|
}
|
|
407
|
-
async handlePage({ num: e, start: t, total:
|
|
650
|
+
async handlePage({ num: e, start: t, total: s }) {
|
|
408
651
|
this.loading = !0, this.arcgisGroupBrowserLoading.emit();
|
|
409
|
-
const i = this.createQuery({ start: t, num: e, total:
|
|
652
|
+
const i = this.createQuery({ start: t, num: e, total: s });
|
|
410
653
|
await this.fetchAndEmit(i, this.searchTerm);
|
|
411
654
|
}
|
|
412
655
|
getBrowserResponseFromQueryResponse(e) {
|
|
413
|
-
const { nextStart: t, num:
|
|
656
|
+
const { nextStart: t, num: s, queryParams: i, results: o, start: a, total: n } = e ?? x;
|
|
414
657
|
return {
|
|
415
658
|
nextStart: t ?? -1,
|
|
416
|
-
num:
|
|
659
|
+
num: s ?? i?.num ?? 0,
|
|
417
660
|
results: o,
|
|
418
|
-
start:
|
|
419
|
-
total:
|
|
661
|
+
start: a ?? i?.start ?? 1,
|
|
662
|
+
total: n
|
|
420
663
|
};
|
|
421
664
|
}
|
|
422
|
-
async formatRange({ start: e, end: t, total:
|
|
665
|
+
async formatRange({ start: e, end: t, total: s }) {
|
|
423
666
|
if (this._messages._lang === "en")
|
|
424
|
-
return [`${e}-${t} of ${
|
|
425
|
-
const o = this._messages.browser,
|
|
426
|
-
return [
|
|
667
|
+
return [`${e}-${t} of ${s}`, `${e}-${t} of ${s} group${s === "1" ? "" : "s"}`];
|
|
668
|
+
const o = this._messages.browser, a = { start: e, end: t, total: s }, n = P(o.pageRange, a), d = P(o.pageRangeAria, a);
|
|
669
|
+
return [n, d];
|
|
427
670
|
}
|
|
428
671
|
getPreviewFooterActionsEmpty() {
|
|
429
672
|
return !this.el?.querySelector('[slot="preview-footer-action"]');
|
|
430
673
|
}
|
|
431
674
|
renderTopBar() {
|
|
432
|
-
return
|
|
675
|
+
return p`<arcgis-portal-browser-top-bar slot=top-bar .store=${this.store}><arcgis-portal-browser-search slot=search .store=${this.store} .term=${this.searchTerm} @arcgisBrowserSearch=${(e) => {
|
|
433
676
|
this.handleSearch(e.detail);
|
|
434
677
|
}}></arcgis-portal-browser-search></arcgis-portal-browser-top-bar>`;
|
|
435
678
|
}
|
|
436
679
|
renderEmptyTextSlot(e, t) {
|
|
437
|
-
return
|
|
680
|
+
return p`<div slot=${e ?? B} class="empty-text-slot"><slot name=${e ?? B}><p class="empty-text-slot__default">${t}</p></slot></div>`;
|
|
438
681
|
}
|
|
439
682
|
renderContent() {
|
|
440
683
|
const e = new Set(this.selectedGroups.map((i) => i.id)), t = this.queryResponse.results.map((i) => {
|
|
441
|
-
const o = this.cards.group?.(i) ?? {},
|
|
684
|
+
const o = this.cards.group?.(i) ?? {}, a = o.view ?? this.store.view ?? "list";
|
|
442
685
|
return {
|
|
443
686
|
group: i,
|
|
444
687
|
cardProps: o,
|
|
445
688
|
slots: o.slots,
|
|
446
|
-
view:
|
|
689
|
+
view: a
|
|
447
690
|
};
|
|
448
|
-
}),
|
|
449
|
-
return
|
|
450
|
-
const
|
|
451
|
-
return
|
|
452
|
-
this.handleGroupCardSelect(
|
|
453
|
-
}} @arcgisGroupBrowserCardPreview=${(
|
|
454
|
-
const
|
|
455
|
-
if (this.store.filtersExpanded = !1, !
|
|
691
|
+
}), s = t.length > 0 && t.every(({ view: i }) => i === "compact");
|
|
692
|
+
return p`<div class=${q({ "group-browser__results": !0, "group-browser__results--compact": s })} .part=${"results"}>${t.map(({ group: i, cardProps: o, slots: a, view: n }) => {
|
|
693
|
+
const d = i.id, l = a?.contentTop?.(i), c = a?.contentEnd?.(i), h = a?.actionsStart?.(i), u = a?.actionsEnd?.(i);
|
|
694
|
+
return A(d, p`<arcgis-portal-group-card class="group-browser__result-card" .portal=${this.portal} .group=${i} .user=${o.user} .indeterminate=${o.indeterminate} .view=${n} .selection=${this.selection} .selected=${e.has(d)} .preview=${o.preview ?? this.preview} .previewed=${o.previewed ?? this.store.preview === d} .name=${o.name} .showSummary=${o.showSummary ?? !0} .hideBadges=${o.hideBadges ?? !1} .hideDateUpdated=${o.hideDateUpdated ?? !1} .showDateCreated=${o.showDateCreated ?? !1} .hideViewableBy=${o.hideViewableBy ?? !1} .hideOwner=${o.hideOwner ?? !1} .link=${o.link} .linkHandler=${o.linkHandler} .newTab=${o.newTab ?? !1} .disabled=${o.disabled ?? !1} @arcgisGroupCardSelect=${(y) => {
|
|
695
|
+
this.handleGroupCardSelect(y);
|
|
696
|
+
}} @arcgisGroupBrowserCardPreview=${(y) => {
|
|
697
|
+
const b = y.detail;
|
|
698
|
+
if (this.store.filtersExpanded = !1, !b || this.store.preview === b.id) {
|
|
456
699
|
this.closePreview();
|
|
457
700
|
return;
|
|
458
701
|
}
|
|
459
|
-
this.restoreFocusTarget =
|
|
460
|
-
}}>${
|
|
702
|
+
this.restoreFocusTarget = y.currentTarget, this.store.preview = b.id, this.previewGroup = b, this.arcgisGroupBrowserPreview.emit(b);
|
|
703
|
+
}}>${l && p`<div slot=content-top>${l}</div>` || ""}${c && p`<div slot=content-end>${c}</div>` || ""}${h && p`<div slot=actions-start>${h}</div>` || ""}${u && p`<div slot=actions-end>${u}</div>` || ""}</arcgis-portal-group-card>`);
|
|
461
704
|
})}</div>`;
|
|
462
705
|
}
|
|
463
706
|
render() {
|
|
464
707
|
const e = this.responsiveFormFactor === "small" ? "small" : this.formFactor;
|
|
465
|
-
return
|
|
708
|
+
return p`<arcgis-portal-browser .store=${this.store} .response=${this.getBrowserResponseFromQueryResponse(this.queryResponse)} .loading=${this.loading} .formFactor=${e} .height=${this.height} .searchTerm=${this.searchTerm} .rangeFormatter=${this.formatRange} .selected=${this.selectedGroups} .alwaysShowSelection=${this.alwaysShowSelection} @arcgisBrowserFilterClear=${this.handleBrowserFilterClear} @arcgisBrowserFilterRemove=${this.handleBrowserFilterRemove} @arcgisAriaUpdate=${(t) => {
|
|
466
709
|
this.arcgisAriaUpdate.emit(t.detail);
|
|
467
|
-
}}><slot name=top-bar slot=top-bar>${this.renderTopBar()}</slot><slot name=content-start slot=content-start></slot><slot name=selection slot=selection></slot><slot name=actions slot=actions></slot><slot name=view slot=view></slot>${
|
|
710
|
+
}}><slot name=top-bar slot=top-bar>${this.renderTopBar()}</slot><slot name=content-start slot=content-start></slot><slot name=selection slot=selection></slot><slot name=actions slot=actions></slot><slot name=view slot=view></slot>${te({ slot: "sort", sort: this.sort, formFactor: e, sortField: this.sortField, sortOrder: this.sortOrder, onSortFieldChange: (t) => {
|
|
468
711
|
this.handleSortFieldChange(t);
|
|
469
712
|
}, onSortOrderChange: (t) => {
|
|
470
713
|
this.handleSortOrderChange(t);
|
|
471
|
-
} })}<slot name=content slot=content>${this.renderContent()}</slot>${
|
|
714
|
+
} })}<slot name=content slot=content>${this.renderContent()}</slot>${re({ slot: "pagination", store: this.store, total: this.queryResponse.total, start: this.queryResponse?.queryParams?.start ?? 1, num: this.queryResponse?.queryParams?.num ?? this.num, onPage: (t) => {
|
|
472
715
|
this.handlePage(t);
|
|
473
|
-
} })}<slot name=content-end slot=content-end></slot><slot name=preview slot=preview>${this.previewGroup &&
|
|
716
|
+
} })}<slot name=content-end slot=content-end></slot><slot name=preview slot=preview>${this.previewGroup && p`<arcgis-portal-group-browser-preview .group=${this.previewGroup} .portal=${this.portal} .user=${this.portal.user ?? void 0} .hideBadges=${this.hidePreviewBadges} .hidePreviewFooter=${this.hidePreviewFooter} .currentResponse=${this.queryResponse} .previewFooterActionsSpaced=${!this.getPreviewFooterActionsEmpty()} @arcgisGroupBrowserInternalUIAction=${(t) => {
|
|
474
717
|
this.arcgisGroupBrowserInternalUIAction.emit(t.detail);
|
|
475
718
|
}} @arcgisGroupBrowserPreviewClose=${() => {
|
|
476
719
|
this.closePreview({ restoreFocus: !0 });
|
|
477
720
|
}} @arcgisPreviewClose=${() => {
|
|
478
721
|
this.closePreview({ restoreFocus: !0 });
|
|
479
|
-
}}><slot name=preview-footer-action slot=footer-action></slot></arcgis-portal-group-browser-preview>` || ""}</slot>${this.renderEmptyTextSlot("no-results", this._messages.content.noResults)}${this.renderEmptyTextSlot("no-content", this._messages.content.noContent)}<slot name=scroll-end slot=scroll-end></slot>${
|
|
722
|
+
}}><slot name=preview-footer-action slot=footer-action></slot></arcgis-portal-group-browser-preview>` || ""}</slot>${this.renderEmptyTextSlot("no-results", this._messages.content.noResults)}${this.renderEmptyTextSlot("no-content", this._messages.content.noContent)}<slot name=scroll-end slot=scroll-end></slot>${se({ slot: "filters", filters: this.filters, messages: this._messages, browserMessages: this._browserMessages, store: this.store, portal: this.portal, hasIndoorsSpaces: this.hasIndoorsSpaces, selectedGroupsByUser: this.selectedGroupsByUser, selectedOwner: this.selectedOwner, selectedMembership: this.selectedMembership, selectedMemberOrg: this.selectedMemberOrg, selectedSpecialGroup: this.selectedSpecialGroup, specialGroupOptions: this.specialGroupOptions, selectedAccess: this.selectedAccess, isFilterActive: (t) => this.isFilterActive(t), handleSelect: (t) => {
|
|
480
723
|
this.setFilterSelection(t);
|
|
481
724
|
}, handleUserFilterChange: (t) => {
|
|
482
725
|
this.arcgisGroupBrowserUserFilterChange.emit(t);
|
|
@@ -487,7 +730,7 @@ class K extends U {
|
|
|
487
730
|
} })}</arcgis-portal-browser>`;
|
|
488
731
|
}
|
|
489
732
|
}
|
|
490
|
-
|
|
733
|
+
T("arcgis-portal-group-browser", Oe);
|
|
491
734
|
export {
|
|
492
|
-
|
|
735
|
+
Oe as ArcgisPortalGroupBrowser
|
|
493
736
|
};
|