@arcgis/portal-components 6.0.0-next.11 → 6.0.0-next.13
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/{D4RAOVZB.js → 6K4H4EN2.js} +1 -1
- package/dist/cdn/6U626CTA.js +2 -0
- package/dist/cdn/{XPB7BBSF.js → 7XBAKSHJ.js} +1 -1
- package/dist/cdn/ATQT25TR.js +2 -0
- package/dist/cdn/{677WIYZF.js → E3NOMS5M.js} +1 -1
- package/dist/cdn/MFLYO7PJ.js +2 -0
- package/dist/cdn/XQFUL7N2.js +2 -0
- package/dist/cdn/index.js +1 -1
- package/dist/components/arcgis-portal-delete-items/customElement.d.ts +62 -0
- package/dist/components/arcgis-portal-delete-items/customElement.js +167 -151
- package/dist/components/arcgis-portal-group-browser/customElement.js +14 -10
- package/dist/components/arcgis-portal-group-browser/types.d.ts +1 -0
- package/dist/components/arcgis-portal-navigation/index.js +4 -4
- package/dist/components/arcgis-portal-review-related-items/customElement.js +30 -21
- package/dist/components/portal-group-browser-filters/customElement.js +15 -15
- package/dist/components/portal-related-items-list-item/customElement.js +13 -13
- package/dist/docs/api.json +1 -1
- package/dist/docs/docs.json +1 -1
- package/dist/docs/web-types.json +1 -1
- package/dist/loader.js +1 -1
- package/package.json +7 -7
- package/dist/cdn/5JQ2EPJM.js +0 -2
- package/dist/cdn/6WBWK65Y.js +0 -2
- package/dist/cdn/CLRT422H.js +0 -2
- package/dist/cdn/HYFTOUH3.js +0 -2
|
@@ -178,7 +178,7 @@ function Be(t) {
|
|
|
178
178
|
r.specialGroup && e.set("specialGroups", r.specialGroup);
|
|
179
179
|
break;
|
|
180
180
|
case "memberOrg":
|
|
181
|
-
r.memberOrg && e.set("memberorgids", r.memberOrg);
|
|
181
|
+
r.memberOrg && r.value && e.set("memberorgids", r.memberOrg);
|
|
182
182
|
break;
|
|
183
183
|
case "membership":
|
|
184
184
|
r.membership && e.set("membershipaccess", r.membership);
|
|
@@ -546,20 +546,24 @@ class Re extends L {
|
|
|
546
546
|
username: o
|
|
547
547
|
}, this.selectedOwner = e.owner, s = !0;
|
|
548
548
|
}
|
|
549
|
-
e.membership && this.filters.membership?.enabled && !this.filters.membership.props?.membership && (r.membership = {
|
|
549
|
+
if (e.membership && this.filters.membership?.enabled && !this.filters.membership.props?.membership && (r.membership = {
|
|
550
550
|
id: "membership",
|
|
551
551
|
label: f(this._messages.membership.label, { label: this._messages.membership[e.membership] }),
|
|
552
552
|
param: "q",
|
|
553
553
|
value: X(e.membership, this.hasIndoorsSpaces),
|
|
554
554
|
membership: e.membership
|
|
555
|
-
}, this.selectedMembership = e.membership, s = !0), e.memberOrg && this.filters.memberOrg?.enabled && !this.filters.memberOrg.props?.memberOrg
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
555
|
+
}, this.selectedMembership = e.membership, s = !0), e.memberOrg && this.filters.memberOrg?.enabled && !this.filters.memberOrg.props?.memberOrg) {
|
|
556
|
+
const o = this.filters.memberOrg.props?.orgId ?? "";
|
|
557
|
+
r.memberOrg = {
|
|
558
|
+
id: "memberOrg",
|
|
559
|
+
label: f(this._messages.memberOrg.label, { label: this._messages.memberOrg[e.memberOrg] }),
|
|
560
|
+
param: "q",
|
|
561
|
+
value: Y(e.memberOrg, o),
|
|
562
|
+
memberOrg: e.memberOrg,
|
|
563
|
+
orgId: o
|
|
564
|
+
}, this.selectedMemberOrg = e.memberOrg, s = !0;
|
|
565
|
+
}
|
|
566
|
+
e.specialGroups && this.filters.specialGroups?.enabled && !this.filters.specialGroups.props?.specialGroup && (r.specialGroups = {
|
|
563
567
|
id: "specialGroups",
|
|
564
568
|
label: f(this._messages.specialGroups.label, {
|
|
565
569
|
label: this._messages.specialGroups[e.specialGroups]
|
|
@@ -174,6 +174,7 @@ export interface PortalGroupBrowserMembershipSelection {
|
|
|
174
174
|
|
|
175
175
|
export interface PortalGroupBrowserMemberOrgSelection {
|
|
176
176
|
memberOrg: PortalGroupBrowserMemberOrg | null;
|
|
177
|
+
/** Scopes "anotherOrg" to a specific organization. Omit to match groups with any external members. */
|
|
177
178
|
orgId: string;
|
|
178
179
|
}
|
|
179
180
|
|
|
@@ -2,14 +2,14 @@ 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-dropdown-item";
|
|
10
6
|
import "@esri/calcite-components/components/calcite-icon";
|
|
11
7
|
import "@esri/calcite-components/components/calcite-popover";
|
|
8
|
+
import "@esri/calcite-components/components/calcite-list";
|
|
9
|
+
import "../arcgis-portal-item-type/index.js";
|
|
12
10
|
import "@esri/calcite-components/components/calcite-loader";
|
|
11
|
+
import "@esri/calcite-components/components/calcite-button";
|
|
12
|
+
import "@esri/calcite-components/components/calcite-input";
|
|
13
13
|
import "@esri/calcite-components/components/calcite-dropdown";
|
|
14
14
|
import "../arcgis-portal-user-avatar/index.js";
|
|
15
15
|
import "@esri/calcite-components/components/calcite-dropdown-group";
|
|
@@ -1,48 +1,57 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import { c as
|
|
3
|
-
import { LitElement as
|
|
4
|
-
import { css as
|
|
5
|
-
import { f as
|
|
2
|
+
import { c as p } from "../../chunks/runtime.js";
|
|
3
|
+
import { LitElement as u } from "@arcgis/lumina";
|
|
4
|
+
import { css as h, html as o } from "lit";
|
|
5
|
+
import { f as d } from "../../chunks/user.js";
|
|
6
6
|
import { f as g } from "../../chunks/item.js";
|
|
7
7
|
import { s as I } from "../../chunks/portal-related-items-list-item.js";
|
|
8
|
-
import { u as
|
|
8
|
+
import { u as n } from "../../chunks/useT9n.js";
|
|
9
9
|
import { RelatedItemsListItem as f } from "../portal-related-items-list-item/customElement.js";
|
|
10
|
-
import { g as
|
|
11
|
-
const
|
|
12
|
-
class v extends
|
|
10
|
+
import { g as w } from "../../chunks/url.js";
|
|
11
|
+
const b = h`:host{display:block}.items-directly-using{display:flex;justify-content:space-between;align-items:center;padding-block-end:.75rem}.impacted-items-labels{display:flex;flex-direction:column}.impacted-items-title{font-weight:500}.impacted-items-access-count{font-size:var(--calcite-font-size--2)}.view-full-list{margin:.5rem 0}.items-list{max-block-size:250px;overflow-y:auto}calcite-block{--calcite-block-icon-start-color: var(--calcite-color-status-warning)}`, c = 20;
|
|
12
|
+
class v extends u {
|
|
13
13
|
constructor() {
|
|
14
|
-
super(...arguments), this.messages =
|
|
14
|
+
super(...arguments), this.messages = n({ blocking: !0 }), this.browserMessages = n({ name: "portal-browser", blocking: !0 }), this.deleteMessages = n({ name: "portal-delete-items", blocking: !0 }), this.userRequestId = 0, this.itemGroups = {}, this.itemOwners = {}, this.sourceItem = null, this.relatedItems = [], this.showDependentItems = !1;
|
|
15
15
|
}
|
|
16
16
|
static {
|
|
17
|
-
this.properties = { itemGroups: 16, sourceItem: 0, relatedItems: 0, relatedItemsCount: 9, showDependentItems: 5, portal: 0, user: 0 };
|
|
17
|
+
this.properties = { itemGroups: 16, itemOwners: 16, sourceItem: 0, relatedItems: 0, relatedItemsCount: 9, showDependentItems: 5, portal: 0, user: 0 };
|
|
18
18
|
}
|
|
19
19
|
static {
|
|
20
|
-
this.styles = [
|
|
20
|
+
this.styles = [b, I];
|
|
21
21
|
}
|
|
22
22
|
willUpdate(e) {
|
|
23
|
-
(e.has("relatedItems") || e.has("portal") || e.has("user")) && (this.itemGroups = {}, this.loadGroupSharing(++this.userRequestId));
|
|
23
|
+
(e.has("relatedItems") || e.has("portal") || e.has("user")) && (this.itemGroups = {}, this.itemOwners = {}, this.loadGroupSharing(++this.userRequestId), this.loadItemOwners());
|
|
24
|
+
}
|
|
25
|
+
async loadItemOwners() {
|
|
26
|
+
const { portal: e, relatedItems: s } = this;
|
|
27
|
+
if (!e)
|
|
28
|
+
return;
|
|
29
|
+
const a = [
|
|
30
|
+
...new Set(s.slice(0, c).map((t) => t.owner).filter((t) => !!t))
|
|
31
|
+
], i = await Promise.all(a.map(async (t) => [t, await d(t, e)]));
|
|
32
|
+
this.itemOwners = Object.fromEntries(i);
|
|
24
33
|
}
|
|
25
34
|
async loadGroupSharing(e) {
|
|
26
|
-
const { portal:
|
|
27
|
-
if (!
|
|
35
|
+
const { portal: s, relatedItems: a } = this, i = this.user ?? s?.user;
|
|
36
|
+
if (!s || !i?.username || !a.length)
|
|
28
37
|
return;
|
|
29
|
-
const
|
|
38
|
+
const t = await d(i.username, s);
|
|
30
39
|
if (e !== this.userRequestId)
|
|
31
40
|
return;
|
|
32
|
-
const { result:
|
|
33
|
-
e === this.userRequestId && (this.itemGroups =
|
|
41
|
+
const { result: r } = await g(s, t, a);
|
|
42
|
+
e === this.userRequestId && (this.itemGroups = r ?? {});
|
|
34
43
|
}
|
|
35
44
|
render() {
|
|
36
45
|
const e = this.relatedItemsCount ?? this.relatedItems.length;
|
|
37
46
|
if (!e && !this.relatedItems.length)
|
|
38
47
|
return null;
|
|
39
|
-
const
|
|
40
|
-
|
|
48
|
+
const s = new Intl.NumberFormat(this.deleteMessages._t9nLocale), a = s.format(e), i = this.showDependentItems ? this.deleteMessages.dependentItems : this.deleteMessages.impactedItems.title, t = this.showDependentItems ? this.deleteMessages.itemsDependingOnThisItem : this.deleteMessages.deletingWillImpactOtherItems, r = this.portal && this.sourceItem ? `${w({ portal: this.portal })}/item.html?id=${this.sourceItem.id}#usage` : void 0, m = () => {
|
|
49
|
+
r && window.open(r, "_blank");
|
|
41
50
|
};
|
|
42
|
-
return o`<calcite-block .heading=${
|
|
51
|
+
return o`<calcite-block .heading=${t.replace("{count}", a)} collapsible .label=${i} icon-start=exclamation-mark-triangle><div class="items-directly-using"><div class="impacted-items-labels"><span class="impacted-items-title">${i}</span>${!this.showDependentItems && o`<span class="impacted-items-access-count">${this.deleteMessages.impactedItems.itemsYouHaveAccessTo.replace("{accessCount}", s.format(this.relatedItems.length)).replace("{totalCount}", a)}</span>` || ""}</div><calcite-button appearance=transparent icon-end=launch @click=${m}>${this.deleteMessages.impactedItems["View usage"]}</calcite-button></div><div class="items-list"><calcite-list .label=${i}>${this.relatedItems.slice(0, c).map((l) => f({ item: l, owner: this.itemOwners[l.owner], portal: this.portal, user: this.user, lang: this.messages._lang, modifiedLabel: this.browserMessages.filterDate.modified, access: { level: l.access, groupIds: l.id ? this.itemGroups[l.id] : void 0 } }))}</calcite-list>${this.relatedItems.length > c && o`<calcite-button class="view-full-list" appearance=transparent icon-end=launch @click=${m}>${this.deleteMessages.impactedItems["View full list"]}</calcite-button>` || ""}</div></calcite-block>`;
|
|
43
52
|
}
|
|
44
53
|
}
|
|
45
|
-
|
|
54
|
+
p("arcgis-portal-review-related-items", v);
|
|
46
55
|
export {
|
|
47
56
|
v as ArcgisPortalReviewRelatedItems
|
|
48
57
|
};
|
|
@@ -8,7 +8,7 @@ import { PortalBrowserFilterItem as g } from "../portal-browser/components/porta
|
|
|
8
8
|
import { PortalBrowserFilters as me } from "../portal-browser/components/portal-browser-filters/customElement.js";
|
|
9
9
|
import { g as ue, a as ge, b as be, c as fe, d as he } from "../../chunks/query.js";
|
|
10
10
|
function ye(U) {
|
|
11
|
-
const { browserMessages:
|
|
11
|
+
const { browserMessages: $, slot: y, filters: l, hasIndoorsSpaces: O, isFilterActive: b, messages: t, portal: v, selectedAccess: D, selectedGroupsByUser: N, selectedMemberOrg: j, selectedMembership: z, selectedOwner: H, selectedSpecialGroup: J, specialGroupOptions: K, store: k, handleRemove: c, handleSelect: n, handleUpsert: o, handleUserFilterChange: W } = U, I = v.isPortal, q = v.user, S = pe(q), B = q?.username ?? "", X = (e) => e === B ? u(t.groupsByUser.me, { username: e }) : e, C = (e, r) => e === "owner" ? r : e === "outsideOrg" && S ? t.owner.someoneElse : e === "inOrg" ? t.owner.inOrg : e === "outsideOrg" ? t.owner.outsideOrg : r, w = l.owner, T = H ?? w?.props?.owner ?? null, x = w?.props?.username ?? B, Y = v.id ?? "", Z = S ? ["owner", "outsideOrg"] : ["owner", "inOrg", "outsideOrg"], P = l.membership, M = z ?? P?.props?.membership ?? null, V = ["org", "collaboration", "anyOrg"], G = l.memberOrg, A = j ?? G?.props?.memberOrg ?? null, ee = G?.props?.orgId ?? "", re = ["myOrg", "anotherOrg"], F = l.specialGroups, Q = J ?? F?.props?.specialGroup ?? null, E = l.access, L = D ?? E?.props?.access ?? null, se = ["public", "org", "private"], f = l.groupsByUser, _ = f?.props?.usernames ?? [], te = f?.props?.selectedUsername ?? N ?? _[0] ?? B, i = $.filter.clear, p = (e, r) => {
|
|
12
12
|
const s = l[e];
|
|
13
13
|
s && (s.props = { ...s.props, expanded: r });
|
|
14
14
|
}, ae = (e) => {
|
|
@@ -18,16 +18,16 @@ function ye(U) {
|
|
|
18
18
|
}
|
|
19
19
|
e.removeAttribute("data-has-before-filters");
|
|
20
20
|
};
|
|
21
|
-
return me({ slot: y, store: k, title: a`<div class="filters-title"><h2 class="filters-title__heading">${t.filters.title}</h2><slot name=before-filters @slotchange=${(e) => ae(e.currentTarget)}></slot></div>`, children: a`${!!
|
|
21
|
+
return me({ slot: y, store: k, title: a`<div class="filters-title"><h2 class="filters-title__heading">${t.filters.title}</h2><slot name=before-filters @slotchange=${(e) => ae(e.currentTarget)}></slot></div>`, children: a`${!!f?.enabled && g({ heading: t.groupsByUser.title, expanded: !!f?.props?.expanded, setExpanded: (e) => p("groupsByUser", e), clearLabel: i, onRemove: () => {
|
|
22
22
|
n({
|
|
23
23
|
kind: "groupsByUser",
|
|
24
|
-
value:
|
|
24
|
+
value: f?.props?.selectedUsername ?? B
|
|
25
25
|
});
|
|
26
26
|
}, children: a`<calcite-tree selection-mode=single scale=m @calciteTreeSelect=${(e) => {
|
|
27
27
|
const r = e.target.selectedItems?.[0]?.dataset.username ?? "";
|
|
28
28
|
n({ kind: "groupsByUser", value: r }), W(r);
|
|
29
29
|
}}>${_.map((e) => a`<calcite-tree-item data-username=${e ?? m} .selected=${e === te}><a class="groups-by-user__label">${X(e)}</a></calcite-tree-item>`)}</calcite-tree>` }) || ""}${!!w?.enabled && g({ heading: t.owner.title, expanded: !!w?.props?.expanded, setExpanded: (e) => p("owner", e), active: b("owner"), clearLabel: i, onRemove: () => c("owner"), children: a`<calcite-tree selection-mode=single scale=m @calciteTreeSelect=${(e) => {
|
|
30
|
-
const r = "owner", s =
|
|
30
|
+
const r = "owner", s = h(T, e, r);
|
|
31
31
|
if (!s) {
|
|
32
32
|
c(r);
|
|
33
33
|
return;
|
|
@@ -43,8 +43,8 @@ function ye(U) {
|
|
|
43
43
|
owner: s,
|
|
44
44
|
username: x
|
|
45
45
|
}), n({ kind: r, value: s });
|
|
46
|
-
}}>${Z.filter((e) => !(I ||
|
|
47
|
-
const r = "memberOrg", s =
|
|
46
|
+
}}>${Z.filter((e) => !(I || O) || e !== "outsideOrg").map((e) => a`<calcite-tree-item data-owner=${e ?? m} .selected=${T === e}>${C(e, x)}</calcite-tree-item>`)}</calcite-tree>` }) || ""}${!!(G?.enabled && !I) && g({ heading: t.memberOrg.title, expanded: !!G?.props?.expanded, setExpanded: (e) => p("memberOrg", e), active: b("memberOrg"), clearLabel: i, onRemove: () => c("memberOrg"), children: a`<calcite-tree selection-mode=single scale=m @calciteTreeSelect=${(e) => {
|
|
47
|
+
const r = "memberOrg", s = h(A, e, r);
|
|
48
48
|
if (!s) {
|
|
49
49
|
c(r);
|
|
50
50
|
return;
|
|
@@ -58,8 +58,8 @@ function ye(U) {
|
|
|
58
58
|
}), n({ kind: r, value: s });
|
|
59
59
|
}}>${re.map((e) => a`<calcite-tree-item data-member-org=${e ?? m} .selected=${A === e}>${t.memberOrg[e]}</calcite-tree-item>`)}</calcite-tree>` }) || ""}${!!(P?.enabled && // https://devtopia.esri.com/WebGIS/arcgis-portal-app/issues/44198
|
|
60
60
|
!I && // https://devtopia.esri.com/webgis/arcgis-portal-app/issues/37831
|
|
61
|
-
!
|
|
62
|
-
const r = "membership", s =
|
|
61
|
+
!O) && g({ heading: t.membership.title, expanded: !!P?.props?.expanded, setExpanded: (e) => p("membership", e), active: b("membership"), clearLabel: i, onRemove: () => c("membership"), children: a`<calcite-tree selection-mode=single scale=m @calciteTreeSelect=${(e) => {
|
|
62
|
+
const r = "membership", s = h(M, e, r);
|
|
63
63
|
if (!s) {
|
|
64
64
|
c(r);
|
|
65
65
|
return;
|
|
@@ -68,16 +68,16 @@ function ye(U) {
|
|
|
68
68
|
id: r,
|
|
69
69
|
label: u(t.membership.label, { label: t.membership[s] }),
|
|
70
70
|
param: "q",
|
|
71
|
-
value: be(s,
|
|
71
|
+
value: be(s, O),
|
|
72
72
|
membership: s
|
|
73
73
|
}), n({ kind: r, value: s });
|
|
74
74
|
}}>${V.map((e) => a`<calcite-tree-item data-membership=${e ?? m} .selected=${M === e}>${t.membership[e]}</calcite-tree-item>`)}</calcite-tree>` }) || ""}${F?.enabled && g({ heading: t.specialGroups.title, expanded: !!F.props?.expanded, setExpanded: (e) => p("specialGroups", e), active: b("specialGroups"), clearLabel: i, onRemove: () => c("specialGroups"), children: a`<calcite-tree selection-mode=single scale=m @calciteTreeSelect=${async (e) => {
|
|
75
|
-
const r = "specialGroups", s =
|
|
75
|
+
const r = "specialGroups", s = h(Q, e, r);
|
|
76
76
|
if (!s) {
|
|
77
77
|
c(r);
|
|
78
78
|
return;
|
|
79
79
|
}
|
|
80
|
-
const R = await fe(s,
|
|
80
|
+
const R = await fe(s, v);
|
|
81
81
|
o({
|
|
82
82
|
id: "specialGroups",
|
|
83
83
|
label: u(t.specialGroups.label, { label: t.specialGroups[s] }),
|
|
@@ -87,7 +87,7 @@ function ye(U) {
|
|
|
87
87
|
}), n({ kind: "specialGroups", value: s });
|
|
88
88
|
}}>${K.map((e) => a`<calcite-tree-item data-special-groups=${e ?? m} .selected=${Q === 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=${t.specialGroups.tooltipLabel ?? m}></calcite-icon><calcite-tooltip placement=bottom-end reference-element=portal-group-browser-special-groups-settings-info>${t.specialGroups.tooltip}</calcite-tooltip></span>` || ""}</span></calcite-tree-item>`)}</calcite-tree>` }) || ""}${["modified", "created"].filter((e) => l[e]?.enabled).map((e) => {
|
|
89
89
|
const r = l[e]?.props, s = k.filters[e], R = !!r?.includeNever, le = s?.range ?? r?.range ?? null, ce = s?.start ?? r?.start, ne = s?.end ?? r?.end, oe = r?.serverProperty, ie = r?.expanded;
|
|
90
|
-
return de({ property: e, filterDateMessages:
|
|
90
|
+
return de({ property: e, filterDateMessages: $.filterDate, clearLabel: i, expanded: ie, setExpanded: (d) => p(e, d), includeNever: R, range: le, start: ce, end: ne, serverProperty: oe, onRemove: () => {
|
|
91
91
|
o({
|
|
92
92
|
id: e,
|
|
93
93
|
label: "",
|
|
@@ -109,7 +109,7 @@ function ye(U) {
|
|
|
109
109
|
});
|
|
110
110
|
} });
|
|
111
111
|
})}${!!E?.enabled && g({ heading: t.access.title, expanded: !!E?.props?.expanded, setExpanded: (e) => p("access", e), active: b("access"), clearLabel: i, onRemove: () => c("access"), children: a`<calcite-tree selection-mode=single scale=m @calciteTreeSelect=${(e) => {
|
|
112
|
-
const r = "access", s =
|
|
112
|
+
const r = "access", s = h(L, e, r);
|
|
113
113
|
if (!s) {
|
|
114
114
|
c(r);
|
|
115
115
|
return;
|
|
@@ -123,8 +123,8 @@ function ye(U) {
|
|
|
123
123
|
}), n({ kind: r, value: s });
|
|
124
124
|
}}>${se.map((e) => a`<calcite-tree-item data-access=${e ?? m} .selected=${L === e}>${t.access[e]}</calcite-tree-item>`)}</calcite-tree>` }) || ""}` });
|
|
125
125
|
}
|
|
126
|
-
const
|
|
127
|
-
const l =
|
|
126
|
+
const h = (U, $, y) => {
|
|
127
|
+
const l = $.target.selectedItems?.[0]?.dataset[y];
|
|
128
128
|
return U === l ? null : l ?? null;
|
|
129
129
|
};
|
|
130
130
|
export {
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
2
|
import { html as i } from "lit";
|
|
3
|
-
import { formatDate as
|
|
4
|
-
import { nothing as
|
|
5
|
-
import { g as
|
|
6
|
-
import { g as
|
|
7
|
-
function
|
|
8
|
-
const
|
|
3
|
+
import { formatDate as y } from "@arcgis/core/intl.js";
|
|
4
|
+
import { nothing as b } from "@arcgis/lumina";
|
|
5
|
+
import { g as I } from "../../chunks/user2.js";
|
|
6
|
+
import { g as B } from "../../chunks/url.js";
|
|
7
|
+
function S({ item: e, owner: n, portal: c, user: o, lang: d, modifiedLabel: l, showAccessInfo: _ = !0, access: t = { level: e.access }, relatedItemsCount: $ = 0, relatedItemsCountTitle: s, onRelatedItemsClick: g }) {
|
|
8
|
+
const a = "inRecycleBin" in e && e.inRecycleBin === !0, r = c && !a ? `${B({ portal: c })}/item.html?id=${e.id}` : void 0, p = e.title ?? "", m = y(e.modified ?? void 0, { dateStyle: "medium" }), v = l ? l.replace("${date}", m ?? "") : m ?? "", h = {
|
|
9
9
|
public: "globe",
|
|
10
10
|
private: "user",
|
|
11
11
|
org: "organization",
|
|
12
12
|
shared: "user"
|
|
13
|
-
}[
|
|
14
|
-
return i`<calcite-list-item .label=${
|
|
15
|
-
|
|
16
|
-
}}><span slot=content-start><arcgis-portal-item-type .item=${e} .portal=${c} .user=${
|
|
17
|
-
|
|
18
|
-
}}>${
|
|
13
|
+
}[t.level], f = !!t.groupIds?.length || t.level === "shared";
|
|
14
|
+
return i`<calcite-list-item .label=${p} @calciteListItemSelect=${() => {
|
|
15
|
+
r && window.open(r, "_blank", "noopener,noreferrer");
|
|
16
|
+
}}><span slot=content-start><arcgis-portal-item-type .item=${e} .portal=${c} .user=${o} hide-text></arcgis-portal-item-type></span><div slot=content class="item"><div class="item__content"><span class="item__title">${p}</span><div class="item__details"><span class="item__type"><arcgis-portal-item-type .item=${e} .user=${o} .portal=${c} scale=s hide-icon></arcgis-portal-item-type></span>|<span class="item__details-owner">${n ? I(n, d) : e.owner}</span>|<span class="item__details-modified">${v}</span></div></div></div><div slot=content-end class="item__content-end">${a && i`<calcite-icon class="item__status-icon" icon=recycle-bin scale=s></calcite-icon>` || ""}${$ > 0 && i`<calcite-chip .label=${s} title=${s ?? b} icon=launch @click=${(u) => {
|
|
17
|
+
u.stopPropagation(), g?.();
|
|
18
|
+
}}>${s}</calcite-chip>` || ""}${_ && !a && i`<span class="item__access"><calcite-icon .icon=${h} scale=s class="item__access-icon"></calcite-icon>${f && i`<calcite-icon icon=plus scale=s></calcite-icon><calcite-icon icon=group scale=s class="item__access-icon"></calcite-icon>` || ""}</span>` || ""}</div></calcite-list-item>`;
|
|
19
19
|
}
|
|
20
20
|
export {
|
|
21
|
-
|
|
21
|
+
S as RelatedItemsListItem
|
|
22
22
|
};
|