@arcgis/portal-components 5.2.0-next.61 → 5.2.0-next.63
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/{25BWGJFT.js → 332KSPIN.js} +1 -1
- package/dist/cdn/5KADGOPQ.js +2 -0
- package/dist/cdn/6RLJVPF6.js +2 -0
- package/dist/cdn/7PPA7V23.js +2 -0
- package/dist/cdn/{KZVNGOD4.js → 7YQTBSDS.js} +56 -56
- package/dist/cdn/CG4WYBHN.js +2 -0
- package/dist/cdn/{NMAP3FYP.js → DML7662F.js} +1 -1
- package/dist/cdn/{UL2NWFFH.js → EEELQMTE.js} +1 -1
- package/dist/cdn/{IXATTQKO.js → G2KWSRCG.js} +1 -1
- package/dist/cdn/JZTBGLFH.js +2 -0
- package/dist/cdn/{UDTQ7U6L.js → LUT4IGPP.js} +1 -1
- package/dist/cdn/RKWOBE3M.js +2 -0
- package/dist/cdn/SOJU4OFZ.js +2 -0
- package/dist/cdn/{6LMJGR6F.js → WEJQVIN4.js} +1 -1
- package/dist/cdn/XW42SAEJ.js +2 -0
- package/dist/cdn/{THRK2DGY.js → ZK2VXTNX.js} +1 -1
- package/dist/cdn/{5VMPZXL3.js → ZXIRKL4X.js} +1 -1
- package/dist/cdn/assets/portal-navigation/apps/notebook.avif +0 -0
- package/dist/cdn/assets/portal-navigation/t9n/messages.en.json +1 -1
- package/dist/cdn/index.js +1 -1
- package/dist/cdn/main.css +1 -1
- package/dist/chunks/portal-browser.js +0 -3
- package/dist/components/arcgis-portal-account-switcher/customElement.js +124 -115
- package/dist/components/arcgis-portal-ai-assistant/agents/types.d.ts +3 -1
- package/dist/components/arcgis-portal-ai-assistant/customElement.d.ts +2 -0
- package/dist/components/arcgis-portal-ai-assistant/customElement.js +144 -149
- package/dist/components/arcgis-portal-ai-assistant/data/capability-registries/types.d.ts +34 -0
- package/dist/components/arcgis-portal-browser/customElement.js +2 -5
- package/dist/components/arcgis-portal-browser/utils/store.d.ts +7 -3
- package/dist/components/arcgis-portal-classification-config/customElement.js +6 -6
- package/dist/components/arcgis-portal-group-browser/customElement.d.ts +174 -0
- package/dist/components/arcgis-portal-group-browser/customElement.js +66 -68
- package/dist/components/arcgis-portal-group-browser/types.d.ts +3 -3
- package/dist/components/arcgis-portal-navigation/customElement.d.ts +7 -0
- package/dist/components/arcgis-portal-navigation/customElement.js +398 -395
- package/dist/components/arcgis-portal-navigation/index.js +4 -6
- package/dist/components/portal-browser/components/portal-browser-filter/customElement.js +14 -0
- package/dist/components/{arcgis-portal-browser-filter → portal-browser/components/portal-browser-filter}/index.js +0 -1
- package/dist/components/portal-browser/components/portal-browser-filter-date/customElement.js +59 -0
- package/dist/components/{arcgis-portal-browser-filter-date → portal-browser/components/portal-browser-filter-date}/index.js +1 -2
- package/dist/components/portal-browser/components/portal-browser-filter-date/portal-browser-filter-date.d.ts +122 -0
- package/dist/components/portal-browser/components/portal-browser-filters/customElement.js +11 -0
- package/dist/components/portal-group-browser-filters/customElement.js +113 -86
- package/dist/components/portal-group-browser-filters/index.js +0 -3
- package/dist/docs/api.json +1 -1
- package/dist/docs/docs.json +1 -1
- package/dist/docs/vscode.css-custom-data.json +1 -1
- package/dist/docs/vscode.html-custom-data.json +1 -1
- package/dist/docs/web-types.json +1 -1
- package/dist/index.d.ts +0 -24
- package/dist/loader.js +2 -5
- package/dist/types/lumina.d.ts +1 -18
- package/dist/types/preact.d.ts +1 -21
- package/dist/types/react.d.ts +1 -24
- package/dist/types/stencil.d.ts +1 -18
- package/package.json +4 -4
- package/dist/cdn/3527GI5O.js +0 -2
- package/dist/cdn/3Y33UPZ6.js +0 -2
- package/dist/cdn/744FUP4K.js +0 -2
- package/dist/cdn/DUBJA7PZ.js +0 -2
- package/dist/cdn/FGJNEKPQ.js +0 -2
- package/dist/cdn/HEA66RTI.js +0 -2
- package/dist/cdn/JPHGWARN.js +0 -2
- package/dist/cdn/JUNNQTQU.js +0 -2
- package/dist/cdn/MNU537SB.js +0 -2
- package/dist/cdn/SE5YJGIJ.js +0 -2
- package/dist/cdn/XMUR4HRH.js +0 -2
- package/dist/cdn/XX4U6IRN.js +0 -2
- package/dist/cdn/Y3RUZTB3.js +0 -2
- package/dist/cdn/YIU7GBUN.js +0 -2
- package/dist/cdn/ZOEF7HBV.js +0 -2
- package/dist/components/arcgis-portal-browser-filter/customElement.d.ts +0 -226
- package/dist/components/arcgis-portal-browser-filter/customElement.js +0 -32
- package/dist/components/arcgis-portal-browser-filter/index.d.ts +0 -1
- package/dist/components/arcgis-portal-browser-filter-date/customElement.d.ts +0 -233
- package/dist/components/arcgis-portal-browser-filter-date/customElement.js +0 -118
- package/dist/components/arcgis-portal-browser-filter-date/index.d.ts +0 -1
- package/dist/components/arcgis-portal-browser-filters/customElement.d.ts +0 -7
- package/dist/components/arcgis-portal-browser-filters/customElement.js +0 -29
- package/dist/components/arcgis-portal-browser-filters/index.d.ts +0 -1
- /package/dist/cdn/{F3PB42AG.js → 4E65YWCP.js} +0 -0
- /package/dist/components/{arcgis-portal-browser-filters → portal-browser/components/portal-browser-filters}/index.js +0 -0
|
@@ -2,16 +2,15 @@ import "@esri/calcite-components/components/calcite-chip";
|
|
|
2
2
|
import "@esri/calcite-components/components/calcite-tooltip";
|
|
3
3
|
import "@esri/calcite-components/components/calcite-list-item";
|
|
4
4
|
import "@esri/calcite-components/components/calcite-action";
|
|
5
|
-
import "../arcgis-portal-item-type/index.js";
|
|
6
|
-
import "@esri/calcite-components/components/calcite-button";
|
|
7
|
-
import "@esri/calcite-components/components/calcite-list";
|
|
8
|
-
import "@esri/calcite-components/components/calcite-input";
|
|
9
5
|
import "@esri/calcite-components/components/calcite-icon";
|
|
10
6
|
import "@esri/calcite-components/components/calcite-popover";
|
|
7
|
+
import "@esri/calcite-components/components/calcite-list";
|
|
8
|
+
import "../arcgis-portal-item-type/index.js";
|
|
11
9
|
import "@esri/calcite-components/components/calcite-loader";
|
|
10
|
+
import "@esri/calcite-components/components/calcite-button";
|
|
12
11
|
import "@esri/calcite-components/components/calcite-dropdown-item";
|
|
12
|
+
import "@esri/calcite-components/components/calcite-input";
|
|
13
13
|
import "@esri/calcite-components/components/calcite-dropdown";
|
|
14
|
-
import "@esri/calcite-components/components/calcite-navigation-user";
|
|
15
14
|
import "../arcgis-portal-user-avatar/index.js";
|
|
16
15
|
import "@esri/calcite-components/components/calcite-dropdown-group";
|
|
17
16
|
import "@esri/calcite-components/components/calcite-menu";
|
|
@@ -25,7 +24,6 @@ import "@esri/calcite-components/components/calcite-tab-nav";
|
|
|
25
24
|
import "@esri/calcite-components/components/calcite-tab-title";
|
|
26
25
|
import "@esri/calcite-components/components/calcite-tab";
|
|
27
26
|
import "@esri/calcite-components/components/calcite-scrim";
|
|
28
|
-
import "@esri/calcite-components/components/calcite-navigation-logo";
|
|
29
27
|
import "../arcgis-portal-info-banner/index.js";
|
|
30
28
|
import "../arcgis-portal-classification-banner/index.js";
|
|
31
29
|
import "../arcgis-portal-account-switcher/index.js";
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
+
import { html as e } from "lit";
|
|
3
|
+
import { safeClassMap as p } from "@arcgis/lumina";
|
|
4
|
+
function v(l) {
|
|
5
|
+
const { action: a, active: c = !1, clearDisabled: s = !1, clearLabel: n = "Clear", children: t, expanded: o = !1, heading: i, noPadding: d = !1, onRemove: f, primary: m = !1, setExpanded: r } = l;
|
|
6
|
+
return m ? e`<div class="filter--primary"><div class="filter__header filter__header--primary"><h3 class="filter__title">${i}</h3>${a}</div>${t}</div>` : e`<calcite-accordion-item class="filter__accordion-item" .heading=${i} .expanded=${o} @calciteAccordionItemExpand=${() => {
|
|
7
|
+
r?.(!0);
|
|
8
|
+
}} @calciteAccordionItemCollapse=${() => {
|
|
9
|
+
r?.(!1);
|
|
10
|
+
}}><div slot=actions-end class="filter__actions-slot arcgis-item-browser-filter__actions-slot">${a}${c && !s && e`<calcite-button class="clear-button" scale=s kind=neutral appearance=transparent @click=${() => f?.()}>${n}</calcite-button>` || ""}</div><div class=${p({ filter__content: !0, "filter__content--padded": !d })}>${t}</div></calcite-accordion-item>`;
|
|
11
|
+
}
|
|
12
|
+
export {
|
|
13
|
+
v as PortalBrowserFilterItem
|
|
14
|
+
};
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
+
import { html as f } from "lit";
|
|
3
|
+
import { substitute as P } from "@arcgis/core/intl.js";
|
|
4
|
+
import { nothing as B } from "@arcgis/lumina";
|
|
5
|
+
import { PortalBrowserFilterItem as F } from "../portal-browser-filter/customElement.js";
|
|
6
|
+
const y = 1440 * 60 * 1e3;
|
|
7
|
+
function u(t) {
|
|
8
|
+
const i = typeof t == "string" ? Number.parseInt(t, 10) : typeof t == "number" ? t : (t ?? /* @__PURE__ */ new Date()).valueOf(), r = new Date(i);
|
|
9
|
+
return r.setHours(0, 0, 0, 0), r.valueOf();
|
|
10
|
+
}
|
|
11
|
+
function g(t) {
|
|
12
|
+
return u(t) + y - 1;
|
|
13
|
+
}
|
|
14
|
+
const E = 7 * y, w = ["today", "yesterday", "last7", "last30", "never", "custom"], M = (t, i, r) => {
|
|
15
|
+
const s = u(), a = g();
|
|
16
|
+
switch (t) {
|
|
17
|
+
case "yesterday":
|
|
18
|
+
return [s - y, s - 1];
|
|
19
|
+
case "today":
|
|
20
|
+
return [s, a];
|
|
21
|
+
case "last7":
|
|
22
|
+
return [s - E, a];
|
|
23
|
+
case "last30":
|
|
24
|
+
return [s - y * 30, a];
|
|
25
|
+
case "never":
|
|
26
|
+
return [-1, -1];
|
|
27
|
+
case "custom":
|
|
28
|
+
return i && r ? [u(i), g(r)] : null;
|
|
29
|
+
default:
|
|
30
|
+
return null;
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
function H(t) {
|
|
34
|
+
const { clearLabel: i, end: r, expanded: s, filterDateMessages: a, includeNever: $, onFilter: b, onRemove: v, property: d, range: l, serverProperty: h, setExpanded: O, start: m } = t, I = a.title[d], S = $ ? w : w.filter((e) => e !== "never"), k = (/* @__PURE__ */ new Date()).toISOString().slice(0, 10), x = !!(l && (l !== "custom" || m && r)), D = (e, n, c) => {
|
|
35
|
+
const p = h ?? (d === "modified" ? "modified" : "uploaded"), o = M(e, n, c), A = e ? a[e] : "";
|
|
36
|
+
b?.({
|
|
37
|
+
id: d,
|
|
38
|
+
label: e ? P(a[d], { date: A }) : "",
|
|
39
|
+
value: o ? `(${p}:[${o[0]} TO ${o[1]}])` : "",
|
|
40
|
+
range: e,
|
|
41
|
+
start: o ? new Date(o[0]) : void 0,
|
|
42
|
+
end: o ? new Date(o[1]) : void 0
|
|
43
|
+
});
|
|
44
|
+
};
|
|
45
|
+
return F({ heading: I, expanded: s, setExpanded: O, active: x, clearLabel: i, onRemove: v, children: f`<div><calcite-tree selection-mode=children scale=m @calciteTreeSelect=${(e) => {
|
|
46
|
+
const n = e.target.selectedItems?.[0]?.dataset.range, c = l === n ? null : n;
|
|
47
|
+
if (!c) {
|
|
48
|
+
v?.();
|
|
49
|
+
return;
|
|
50
|
+
}
|
|
51
|
+
D(c, m, r);
|
|
52
|
+
}}>${S.map((e) => f`<calcite-tree-item data-range=${e ?? B} .selected=${e === l}>${a[e]}</calcite-tree-item>`)}</calcite-tree>${l === "custom" && f`<calcite-input-date-picker class="custom-date-picker" @calciteInputDatePickerChange=${(e) => {
|
|
53
|
+
const n = e.target.valueAsDate, [c, p] = Array.isArray(n) ? n : [];
|
|
54
|
+
c && p && D("custom", c, p);
|
|
55
|
+
}} scale=s .max=${k} calendars=1 layout=vertical month-style=abbreviated proximity-selection-disabled range .valueAsDate=${m && r ? [new Date(u(m)), new Date(u(r))] : []}></calcite-input-date-picker>` || ""}</div>` });
|
|
56
|
+
}
|
|
57
|
+
export {
|
|
58
|
+
H as PortalBrowserFilterDate
|
|
59
|
+
};
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import "@esri/calcite-components/components/calcite-tree-item";
|
|
2
|
-
import "../arcgis-portal-browser-filter/index.js";
|
|
3
1
|
import "@esri/calcite-components/components/calcite-tree";
|
|
2
|
+
import "@esri/calcite-components/components/calcite-tree-item";
|
|
4
3
|
import "@esri/calcite-components/components/calcite-input-date-picker";
|
|
5
4
|
export * from "./customElement.js";
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
import type { PortalBrowserFilterDetail } from "../../../arcgis-portal-browser/utils/store.js";
|
|
2
|
+
|
|
3
|
+
export interface PortalBrowserFilterDateProps {
|
|
4
|
+
property: PortalBrowserDateProperty;
|
|
5
|
+
filterDateMessages: ({
|
|
6
|
+
browser: {
|
|
7
|
+
refineContent: string;
|
|
8
|
+
filters: string;
|
|
9
|
+
pageRange: string;
|
|
10
|
+
pageRangeAria: string;
|
|
11
|
+
pageRangeWithRecycleBin: string;
|
|
12
|
+
pageRangeAriaWithRecycleBin: string;
|
|
13
|
+
totalSize: string;
|
|
14
|
+
loading: string;
|
|
15
|
+
close: string;
|
|
16
|
+
};
|
|
17
|
+
actions: { more: string; };
|
|
18
|
+
filter: { clear: string; };
|
|
19
|
+
filterDate: {
|
|
20
|
+
today: string;
|
|
21
|
+
yesterday: string;
|
|
22
|
+
last7: string;
|
|
23
|
+
last30: string;
|
|
24
|
+
never: string;
|
|
25
|
+
custom: string;
|
|
26
|
+
title: {
|
|
27
|
+
created: string;
|
|
28
|
+
modified: string;
|
|
29
|
+
joined: string;
|
|
30
|
+
lastLogin: string;
|
|
31
|
+
};
|
|
32
|
+
created: string;
|
|
33
|
+
modified: string;
|
|
34
|
+
joined: string;
|
|
35
|
+
lastLogin: string;
|
|
36
|
+
};
|
|
37
|
+
pagination: {
|
|
38
|
+
next: string;
|
|
39
|
+
prev: string;
|
|
40
|
+
};
|
|
41
|
+
search: {
|
|
42
|
+
label: string;
|
|
43
|
+
search: string;
|
|
44
|
+
clear: string;
|
|
45
|
+
wildcard: string;
|
|
46
|
+
};
|
|
47
|
+
sort: {
|
|
48
|
+
sortDirection: string;
|
|
49
|
+
title: string;
|
|
50
|
+
relevance: string;
|
|
51
|
+
modified: string;
|
|
52
|
+
deleted: string;
|
|
53
|
+
created: string;
|
|
54
|
+
added: string;
|
|
55
|
+
size: string;
|
|
56
|
+
owner: string;
|
|
57
|
+
sizeAsc: string;
|
|
58
|
+
sizeDesc: string;
|
|
59
|
+
numviews: string;
|
|
60
|
+
numAsc: string;
|
|
61
|
+
numDesc: string;
|
|
62
|
+
alphabeticalAsc: string;
|
|
63
|
+
alphabeticalDesc: string;
|
|
64
|
+
recentAsc: string;
|
|
65
|
+
recentDesc: string;
|
|
66
|
+
sort: string;
|
|
67
|
+
sortBy: string;
|
|
68
|
+
sortByColon: string;
|
|
69
|
+
fullname: string;
|
|
70
|
+
username: string;
|
|
71
|
+
name: string;
|
|
72
|
+
membertype: string;
|
|
73
|
+
joined: string;
|
|
74
|
+
lastlogin: string;
|
|
75
|
+
dataset: string;
|
|
76
|
+
mfaenabled: string;
|
|
77
|
+
description: string;
|
|
78
|
+
lastSyncFailureCount: string;
|
|
79
|
+
invitationsPendingCount: string;
|
|
80
|
+
participantGroupLinksCount: string;
|
|
81
|
+
defaultAsc: string;
|
|
82
|
+
defaultDesc: string;
|
|
83
|
+
};
|
|
84
|
+
topBar: { filter: string; };
|
|
85
|
+
filterStatus: {
|
|
86
|
+
clear: string;
|
|
87
|
+
filters: string;
|
|
88
|
+
additional: string;
|
|
89
|
+
clearAllFilters: string;
|
|
90
|
+
};
|
|
91
|
+
})["filterDate"];
|
|
92
|
+
clearLabel: string;
|
|
93
|
+
expanded?: boolean;
|
|
94
|
+
includeNever?: boolean;
|
|
95
|
+
range?: PortalBrowserDateRange;
|
|
96
|
+
start?: Date | number | string | null;
|
|
97
|
+
end?: Date | number | string | null;
|
|
98
|
+
serverProperty?: string;
|
|
99
|
+
setExpanded?: (expanded: boolean) => void;
|
|
100
|
+
onRemove?: () => void;
|
|
101
|
+
onFilter?: (detail: PortalBrowserDateFilterDetail) => void;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
export type PortalBrowserDateProperty = "created" | "modified";
|
|
105
|
+
|
|
106
|
+
export type PortalBrowserDateRange = (typeof portalBrowserDateRanges)[number] | null;
|
|
107
|
+
|
|
108
|
+
export type PortalBrowserDateFilterDetail = PortalBrowserFilterDetail<string>
|
|
109
|
+
& {
|
|
110
|
+
range?: PortalBrowserDateRange;
|
|
111
|
+
start?: Date | number | string | null;
|
|
112
|
+
end?: Date | number | string | null;
|
|
113
|
+
};
|
|
114
|
+
|
|
115
|
+
export const portalBrowserDateRanges: readonly [
|
|
116
|
+
"today",
|
|
117
|
+
"yesterday",
|
|
118
|
+
"last7",
|
|
119
|
+
"last30",
|
|
120
|
+
"never",
|
|
121
|
+
"custom"
|
|
122
|
+
];
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
+
import { html as c } from "lit";
|
|
3
|
+
import { nothing as p, safeClassMap as d } from "@arcgis/lumina";
|
|
4
|
+
import { b as m } from "../../../../chunks/ui.js";
|
|
5
|
+
function v(o) {
|
|
6
|
+
const { bottom: r, children: e, primary: i, slot: s, store: t, title: a, top: l } = o, n = !!t?.panel || (t?.width ?? 0) < m.sm;
|
|
7
|
+
return c`<div slot=${s ?? p} class="filters-shell" .inert=${!!t?.preview}><div class=${d({ "filters-shell__top": !0, "filters-shell__top--padded": n })}>${l}</div>${i}${a}<calcite-accordion appearance=transparent icon-type=chevron icon-position=start scale=m>${e}</calcite-accordion>${r}</div>`;
|
|
8
|
+
}
|
|
9
|
+
export {
|
|
10
|
+
v as PortalBrowserFilters
|
|
11
|
+
};
|
|
@@ -1,104 +1,131 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import { html as
|
|
3
|
-
import { substitute as
|
|
4
|
-
import { nothing as
|
|
5
|
-
import {
|
|
6
|
-
import "../
|
|
7
|
-
import "../
|
|
8
|
-
import "
|
|
9
|
-
function
|
|
10
|
-
return !!(
|
|
2
|
+
import { html as a } from "lit";
|
|
3
|
+
import { substitute as u } from "@arcgis/core/intl.js";
|
|
4
|
+
import { nothing as g } from "@arcgis/lumina";
|
|
5
|
+
import { PortalBrowserFilterDate as ie } from "../portal-browser/components/portal-browser-filter-date/customElement.js";
|
|
6
|
+
import { PortalBrowserFilterItem as b } from "../portal-browser/components/portal-browser-filter/customElement.js";
|
|
7
|
+
import { PortalBrowserFilters as pe } from "../portal-browser/components/portal-browser-filters/customElement.js";
|
|
8
|
+
import { g as de, a as me, b as ue, c as ge, d as be } from "../../chunks/query.js";
|
|
9
|
+
function fe(m) {
|
|
10
|
+
return !!(m && !m.orgId);
|
|
11
11
|
}
|
|
12
|
-
function
|
|
13
|
-
const { slot:
|
|
14
|
-
|
|
15
|
-
|
|
12
|
+
function Ge(m) {
|
|
13
|
+
const { browserMessages: v, slot: y, filters: l, hasIndoorsSpaces: w, isFilterActive: f, messages: t, portal: h, selectedAccess: L, selectedGroupsByUser: z, selectedMemberOrg: N, selectedMembership: j, selectedOwner: H, selectedSpecialGroup: J, specialGroupOptions: K, store: q, handleRemove: c, handleSelect: n, handleUpsert: o, handleUserFilterChange: W } = m, I = h.isPortal, C = h.user, S = fe(C), B = C?.username ?? "", X = (e) => e === B ? u(t.groupsByUser.me, { username: e }) : e, F = (e, r) => e === "owner" ? r : e === "outsideOrg" && S ? t.owner.someoneElse : e === "inOrg" ? t.owner.inOrg : e === "outsideOrg" ? t.owner.outsideOrg : r, x = l.owner, M = H ?? x?.props?.owner ?? null, G = x?.props?.username ?? B, Y = h.id ?? "", Z = S ? ["owner", "outsideOrg"] : ["owner", "inOrg", "outsideOrg"], P = l.membership, T = j ?? P?.props?.membership ?? null, V = ["org", "collaboration", "anyOrg"], U = l.memberOrg, Q = N ?? U?.props?.memberOrg ?? null, ee = U?.props?.orgId ?? h.id ?? "", re = ["myOrg", "anotherOrg"], E = l.specialGroups, _ = J ?? E?.props?.specialGroup ?? null, R = l.access, A = L ?? R?.props?.access ?? null, se = ["public", "org", "private"], O = l.groupsByUser, D = O?.props?.usernames ?? [], te = O?.props?.selectedUsername ?? z ?? D[0] ?? B, i = v.filter.clear, p = (e, r) => {
|
|
14
|
+
const s = l[e];
|
|
15
|
+
s && (s.props = {
|
|
16
|
+
...s.props,
|
|
17
|
+
expanded: r
|
|
18
|
+
});
|
|
19
|
+
};
|
|
20
|
+
return pe({ slot: y, store: q, title: a`<div class="filters-title"><h2 class="filters-title__heading">${t.filters.title}</h2><slot name=before-filters></slot></div>`, children: a`${!!O?.enabled && b({ heading: t.groupsByUser.title, expanded: !!O?.props?.expanded, setExpanded: (e) => p("groupsByUser", e), clearLabel: i, onRemove: () => {
|
|
21
|
+
n({
|
|
16
22
|
kind: "groupsByUser",
|
|
17
|
-
value:
|
|
23
|
+
value: O?.props?.selectedUsername ?? B
|
|
18
24
|
});
|
|
19
|
-
}
|
|
20
|
-
const
|
|
21
|
-
|
|
22
|
-
}}>${
|
|
23
|
-
const
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
25
|
+
}, children: a`<calcite-tree selection-mode=single scale=m @calciteTreeSelect=${(e) => {
|
|
26
|
+
const r = e.target.selectedItems?.[0]?.dataset.username ?? "";
|
|
27
|
+
n({ kind: "groupsByUser", value: r }), W(r);
|
|
28
|
+
}}>${D.map((e) => a`<calcite-tree-item data-username=${e ?? g} .selected=${e === te}><a class="groups-by-user__label">${X(e)}</a></calcite-tree-item>`)}</calcite-tree>` }) || ""}${!!x?.enabled && b({ heading: t.owner.title, expanded: !!x?.props?.expanded, setExpanded: (e) => p("owner", e), active: f("owner"), clearLabel: i, onRemove: () => c("owner"), children: a`<calcite-tree selection-mode=single scale=m @calciteTreeSelect=${(e) => {
|
|
29
|
+
const r = "owner", s = $(M, e, r);
|
|
30
|
+
if (!s) {
|
|
31
|
+
c(r);
|
|
32
|
+
return;
|
|
33
|
+
}
|
|
34
|
+
o({
|
|
35
|
+
id: r,
|
|
36
|
+
label: u(t.owner.label, { label: F(s, G) }),
|
|
27
37
|
param: "q",
|
|
28
|
-
value:
|
|
29
|
-
isPublicUser:
|
|
30
|
-
orgId:
|
|
38
|
+
value: de(s, G, {
|
|
39
|
+
isPublicUser: S,
|
|
40
|
+
orgId: Y
|
|
31
41
|
}),
|
|
32
|
-
owner:
|
|
33
|
-
username:
|
|
34
|
-
}),
|
|
35
|
-
}}>${
|
|
36
|
-
!
|
|
37
|
-
!
|
|
38
|
-
const
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
label: m(s.membership.label, { label: s.membership[r] }),
|
|
42
|
-
param: "q",
|
|
43
|
-
value: ee(r, p),
|
|
44
|
-
membership: r
|
|
45
|
-
}), i({ kind: a, value: r }));
|
|
46
|
-
}}>${J.map((e) => l`<calcite-tree-item data-membership=${e ?? c} .selected=${k === e}>${s.membership[e]}</calcite-tree-item>`)}</calcite-tree></arcgis-portal-browser-filter>` || ""}${O?.enabled && !y && l`<arcgis-portal-browser-filter .heading=${s.memberOrg.title} .expanded=${!!O.props?.expanded} .active=${d("memberOrg")} filter-id=memberOrg @arcgisBrowserFilterRemove=${() => u("memberOrg")}><calcite-tree selection-mode=single scale=m @calciteTreeSelect=${(e) => {
|
|
47
|
-
const a = "memberOrg", r = $(q, e, a);
|
|
48
|
-
r && (o({
|
|
49
|
-
id: a,
|
|
50
|
-
label: m(s.memberOrg.label, { label: s.memberOrg[r] }),
|
|
51
|
-
param: "q",
|
|
52
|
-
value: re(r, K),
|
|
53
|
-
memberOrg: r
|
|
54
|
-
}), i({ kind: a, value: r }));
|
|
55
|
-
}}>${W.map((e) => l`<calcite-tree-item data-member-org=${e ?? c} .selected=${q === e}>${s.memberOrg[e]}</calcite-tree-item>`)}</calcite-tree></arcgis-portal-browser-filter>` || ""}${x?.enabled && l`<arcgis-portal-browser-filter .heading=${s.specialGroups.title} .expanded=${!!x.props?.expanded} .active=${d("specialGroups")} filter-id=specialGroups @arcgisBrowserFilterRemove=${() => u("specialGroups")}><calcite-tree selection-mode=single scale=m @calciteTreeSelect=${async (e) => {
|
|
56
|
-
const r = $(C, e, "specialGroups");
|
|
57
|
-
if (!r)
|
|
42
|
+
owner: s,
|
|
43
|
+
username: G
|
|
44
|
+
}), n({ kind: r, value: s });
|
|
45
|
+
}}>${Z.filter((e) => !(I || w) || e !== "outsideOrg").map((e) => a`<calcite-tree-item data-owner=${e ?? g} .selected=${M === e}>${F(e, G)}</calcite-tree-item>`)}</calcite-tree>` }) || ""}${!!(P?.enabled && // https://devtopia.esri.com/WebGIS/arcgis-portal-app/issues/44198
|
|
46
|
+
!I && // https://devtopia.esri.com/webgis/arcgis-portal-app/issues/37831
|
|
47
|
+
!w) && b({ heading: t.membership.title, expanded: !!P?.props?.expanded, setExpanded: (e) => p("membership", e), active: f("membership"), clearLabel: i, onRemove: () => c("membership"), children: a`<calcite-tree selection-mode=single scale=m @calciteTreeSelect=${(e) => {
|
|
48
|
+
const r = "membership", s = $(T, e, r);
|
|
49
|
+
if (!s) {
|
|
50
|
+
c(r);
|
|
58
51
|
return;
|
|
59
|
-
|
|
52
|
+
}
|
|
60
53
|
o({
|
|
61
|
-
id:
|
|
62
|
-
label:
|
|
54
|
+
id: r,
|
|
55
|
+
label: u(t.membership.label, { label: t.membership[s] }),
|
|
63
56
|
param: "q",
|
|
64
|
-
value:
|
|
65
|
-
|
|
66
|
-
}),
|
|
67
|
-
}}>${
|
|
57
|
+
value: me(s, w),
|
|
58
|
+
membership: s
|
|
59
|
+
}), n({ kind: r, value: s });
|
|
60
|
+
}}>${V.map((e) => a`<calcite-tree-item data-membership=${e ?? g} .selected=${T === e}>${t.membership[e]}</calcite-tree-item>`)}</calcite-tree>` }) || ""}${!!(U?.enabled && !I) && b({ heading: t.memberOrg.title, expanded: !!U?.props?.expanded, setExpanded: (e) => p("memberOrg", e), active: f("memberOrg"), clearLabel: i, onRemove: () => c("memberOrg"), children: a`<calcite-tree selection-mode=single scale=m @calciteTreeSelect=${(e) => {
|
|
61
|
+
const r = "memberOrg", s = $(Q, e, r);
|
|
62
|
+
if (!s) {
|
|
63
|
+
c(r);
|
|
64
|
+
return;
|
|
65
|
+
}
|
|
68
66
|
o({
|
|
69
|
-
id:
|
|
70
|
-
label:
|
|
67
|
+
id: r,
|
|
68
|
+
label: u(t.memberOrg.label, { label: t.memberOrg[s] }),
|
|
71
69
|
param: "q",
|
|
72
|
-
value:
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
70
|
+
value: ue(s, ee),
|
|
71
|
+
memberOrg: s
|
|
72
|
+
}), n({ kind: r, value: s });
|
|
73
|
+
}}>${re.map((e) => a`<calcite-tree-item data-member-org=${e ?? g} .selected=${Q === e}>${t.memberOrg[e]}</calcite-tree-item>`)}</calcite-tree>` }) || ""}${E?.enabled && b({ heading: t.specialGroups.title, expanded: !!E.props?.expanded, setExpanded: (e) => p("specialGroups", e), active: f("specialGroups"), clearLabel: i, onRemove: () => c("specialGroups"), children: a`<calcite-tree selection-mode=single scale=m @calciteTreeSelect=${async (e) => {
|
|
74
|
+
const r = "specialGroups", s = $(_, e, r);
|
|
75
|
+
if (!s) {
|
|
76
|
+
c(r);
|
|
77
|
+
return;
|
|
78
|
+
}
|
|
79
|
+
const k = await ge(s, h);
|
|
78
80
|
o({
|
|
79
|
-
id: "
|
|
80
|
-
label:
|
|
81
|
+
id: "specialGroups",
|
|
82
|
+
label: u(t.specialGroups.label, { label: t.specialGroups[s] }),
|
|
81
83
|
param: "q",
|
|
82
|
-
value:
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
84
|
+
value: k,
|
|
85
|
+
specialGroup: s
|
|
86
|
+
}), n({ kind: "specialGroups", value: s });
|
|
87
|
+
}}>${K.map((e) => a`<calcite-tree-item data-special-groups=${e ?? g} .selected=${_ === e}><span class="special-groups-settings-option">${t.specialGroups[e]}${e === "settings" && a`<span class="special-groups-settings-icon"><calcite-icon id=portal-group-browser-special-groups-settings-info icon=information scale=s text-label=Information></calcite-icon><calcite-tooltip placement=bottom-end reference-element=portal-group-browser-special-groups-settings-info>Groups used in organization settings.</calcite-tooltip></span>` || ""}</span></calcite-tree-item>`)}</calcite-tree>` }) || ""}${["modified", "created"].filter((e) => l[e]?.enabled).map((e) => {
|
|
88
|
+
const r = l[e]?.props, s = q.filters[e], k = !!r?.includeNever, ae = s?.range ?? r?.range ?? null, le = s?.start ?? r?.start, ce = s?.end ?? r?.end, ne = r?.serverProperty, oe = r?.expanded;
|
|
89
|
+
return ie({ property: e, filterDateMessages: v.filterDate, clearLabel: i, expanded: oe, setExpanded: (d) => p(e, d), includeNever: k, range: ae, start: le, end: ce, serverProperty: ne, onRemove: () => {
|
|
90
|
+
o({
|
|
91
|
+
id: e,
|
|
92
|
+
label: "",
|
|
93
|
+
param: "q",
|
|
94
|
+
value: "",
|
|
95
|
+
range: null,
|
|
96
|
+
start: null,
|
|
97
|
+
end: null
|
|
98
|
+
});
|
|
99
|
+
}, onFilter: (d) => {
|
|
100
|
+
o({
|
|
101
|
+
id: e,
|
|
102
|
+
label: d.label,
|
|
103
|
+
param: "q",
|
|
104
|
+
value: d.value,
|
|
105
|
+
range: d.range,
|
|
106
|
+
start: d.start,
|
|
107
|
+
end: d.end
|
|
108
|
+
});
|
|
109
|
+
} });
|
|
110
|
+
})}${!!R?.enabled && b({ heading: t.access.title, expanded: !!R?.props?.expanded, setExpanded: (e) => p("access", e), active: f("access"), clearLabel: i, onRemove: () => c("access"), children: a`<calcite-tree selection-mode=single scale=m @calciteTreeSelect=${(e) => {
|
|
111
|
+
const r = "access", s = $(A, e, r);
|
|
112
|
+
if (!s) {
|
|
113
|
+
c(r);
|
|
114
|
+
return;
|
|
115
|
+
}
|
|
116
|
+
o({
|
|
117
|
+
id: r,
|
|
118
|
+
label: u(t.access.label, { label: t.access[s] }),
|
|
92
119
|
param: "q",
|
|
93
|
-
value:
|
|
94
|
-
access:
|
|
95
|
-
}),
|
|
96
|
-
}}>${
|
|
120
|
+
value: be(s),
|
|
121
|
+
access: s
|
|
122
|
+
}), n({ kind: r, value: s });
|
|
123
|
+
}}>${se.map((e) => a`<calcite-tree-item data-access=${e ?? g} .selected=${A === e}>${t.access[e]}</calcite-tree-item>`)}</calcite-tree>` }) || ""}` });
|
|
97
124
|
}
|
|
98
|
-
const $ = (
|
|
99
|
-
const
|
|
100
|
-
return
|
|
125
|
+
const $ = (m, v, y) => {
|
|
126
|
+
const l = v.target.selectedItems?.[0]?.dataset[y];
|
|
127
|
+
return m === l ? null : l ?? null;
|
|
101
128
|
};
|
|
102
129
|
export {
|
|
103
|
-
|
|
130
|
+
Ge as PortalGroupBrowserFilters
|
|
104
131
|
};
|
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
import "../arcgis-portal-browser-filters/index.js";
|
|
2
|
-
import "../arcgis-portal-browser-filter/index.js";
|
|
3
1
|
import "@esri/calcite-components/components/calcite-tree";
|
|
4
2
|
import "@esri/calcite-components/components/calcite-tree-item";
|
|
5
3
|
import "@esri/calcite-components/components/calcite-icon";
|
|
6
4
|
import "@esri/calcite-components/components/calcite-tooltip";
|
|
7
|
-
import "../arcgis-portal-browser-filter-date/index.js";
|
|
8
5
|
export * from "./customElement.js";
|