@arcgis/portal-components 5.2.0-next.147 → 5.2.0-next.148
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/{ZAIRH5DL.js → 24PB4CMZ.js} +1 -1
- package/dist/cdn/{R3QN5WF2.js → 2QH66WX5.js} +1 -1
- package/dist/cdn/{4ZTWQN6Q.js → 33J7647P.js} +1 -1
- package/dist/cdn/{AE574B3G.js → 3D3X4POQ.js} +1 -1
- package/dist/cdn/{C5VUNN4M.js → 3SRD2O7D.js} +1 -1
- package/dist/cdn/{Y3YIMI2Z.js → 3WHDCXCM.js} +2 -2
- package/dist/cdn/{3R4PPD5N.js → 4NM7IXBT.js} +1 -1
- package/dist/cdn/{QSAZVVVL.js → 5GTO7PTH.js} +1 -1
- package/dist/cdn/{5FOWUL6I.js → 7EOHRU5A.js} +1 -1
- package/dist/cdn/{QUOPWSRC.js → 7G7MPSXD.js} +1 -1
- package/dist/cdn/7GHMHFBI.js +2 -0
- package/dist/cdn/{D6QHNXEH.js → A3MNR4AI.js} +1 -1
- package/dist/cdn/{LRHPL6B5.js → AOZUSTFQ.js} +1 -1
- package/dist/cdn/{DKIYHE4A.js → APVJI5AQ.js} +1 -1
- package/dist/cdn/{MCX22B23.js → AQBDDI5G.js} +1 -1
- package/dist/cdn/AYO4VV3K.js +2 -0
- package/dist/cdn/{LP4IB3PV.js → BLCHSMT7.js} +1 -1
- package/dist/cdn/{UQKT5JQZ.js → BQZ34JPU.js} +1 -1
- package/dist/cdn/{UKHCSMA4.js → BYWI4K4N.js} +1 -1
- package/dist/cdn/{WDMNL6PJ.js → D6SIWTME.js} +1 -1
- package/dist/cdn/EEGDBRHR.js +2 -0
- package/dist/cdn/{NXFE6R2N.js → EL6F7I65.js} +1 -1
- package/dist/cdn/{ZSILF72K.js → F575CWKZ.js} +1 -1
- package/dist/cdn/{6EY5GHKE.js → FAOIT32R.js} +1 -1
- package/dist/cdn/{M6BRGNH3.js → FORXD2BX.js} +1 -1
- package/dist/cdn/{2A4BYZOS.js → GQ72VSNC.js} +1 -1
- package/dist/cdn/{DF5GVVDW.js → HJE457T5.js} +1 -1
- package/dist/cdn/{MY7AYBBR.js → IFN5ZRZD.js} +1 -1
- package/dist/cdn/{G6WPLOLV.js → JDIMTYM2.js} +1 -1
- package/dist/cdn/JDUO5LCR.js +2 -0
- package/dist/cdn/JITIK4H7.js +2 -0
- package/dist/cdn/{AXNTYD46.js → JME5I4VO.js} +1 -1
- package/dist/cdn/{QKK6N2AN.js → K6PWSEML.js} +1 -1
- package/dist/cdn/LCQW3IG6.js +2 -0
- package/dist/cdn/MC3LJZSI.js +2 -0
- package/dist/cdn/{5FDUO7J4.js → MFJVE4UZ.js} +1 -1
- package/dist/cdn/{E3FQ4QWE.js → MSO7PIO4.js} +1 -1
- package/dist/cdn/{R57DISOR.js → NUEXG7VJ.js} +1 -1
- package/dist/cdn/NUQ72OYU.js +2 -0
- package/dist/cdn/{B4YHTYJB.js → OV4DNSQV.js} +1 -1
- package/dist/cdn/{47PU5HDG.js → PJGJZYBY.js} +1 -1
- package/dist/cdn/PRIG3TBV.js +2 -0
- package/dist/cdn/{ADSPENPN.js → Q6BRXAQD.js} +1 -1
- package/dist/cdn/QQ53FYON.js +2 -0
- package/dist/cdn/{XUPYBBRI.js → QU2JYXVL.js} +1 -1
- package/dist/cdn/{NDRCB2K3.js → QVMZCD3A.js} +1 -1
- package/dist/cdn/{GEZH4D32.js → R54T4WBW.js} +1 -1
- package/dist/cdn/{FFLIAQOL.js → REJN2DGR.js} +1 -1
- package/dist/cdn/{C5U7YKVI.js → RT6SXACX.js} +1 -1
- package/dist/cdn/{6MWSS5YF.js → RUTSKSEA.js} +1 -1
- package/dist/cdn/{2I5SLQC5.js → S5HIKMGQ.js} +1 -1
- package/dist/cdn/{BRJE3G3H.js → TAREB43U.js} +1 -1
- package/dist/cdn/{JUDF3TYJ.js → TMG43PBB.js} +1 -1
- package/dist/cdn/UBABQKPV.js +2 -0
- package/dist/cdn/{GTZ4LKEQ.js → V2OG75CK.js} +1 -1
- package/dist/cdn/{XNEYNX5G.js → V7GVZLEG.js} +1 -1
- package/dist/cdn/{MHNYLHFR.js → WDMKBY5P.js} +1 -1
- package/dist/cdn/WDUH4TEH.js +2 -0
- package/dist/cdn/{IXSEMBHA.js → WPZ5FJSC.js} +1 -1
- package/dist/cdn/{KOLH76KG.js → WXD774JG.js} +1 -1
- package/dist/cdn/{FSACXOM3.js → X4LJOMMF.js} +1 -1
- package/dist/cdn/{GH4VBEMN.js → XDSQPXSO.js} +1 -1
- package/dist/cdn/{ZHADFIZO.js → YEMT55I6.js} +1 -1
- package/dist/cdn/{KC4FTTKP.js → YGF6ENPU.js} +1 -1
- package/dist/cdn/{T2HQNZ36.js → YJS5PGLO.js} +1 -1
- package/dist/cdn/index.js +1 -1
- package/dist/chunks/fieldAddDelete.js +1 -1
- package/dist/chunks/item.js +127 -33
- package/dist/chunks/item2.js +69 -126
- package/dist/chunks/portal-related-items-list-item.js +1 -1
- package/dist/chunks/query.js +10 -10
- package/dist/chunks/utils3.js +1 -1
- package/dist/components/arcgis-portal-add-gps-metadata/customElement.d.ts +6 -0
- package/dist/components/arcgis-portal-add-gps-metadata/customElement.js +10 -10
- package/dist/components/arcgis-portal-ai-assistant/customElement.js +1 -1
- package/dist/components/arcgis-portal-delete-items/customElement.js +344 -313
- package/dist/components/arcgis-portal-group-browser/customElement.js +8 -8
- package/dist/components/arcgis-portal-item-thumbnail/customElement.js +1 -1
- package/dist/components/arcgis-portal-mentionable-text-area/customElement.js +1 -1
- package/dist/components/arcgis-portal-navigation/customElement.js +1 -2
- package/dist/components/arcgis-portal-navigation/index.js +4 -4
- package/dist/components/arcgis-portal-replacement-item-redirect/customElement.js +1 -1
- package/dist/components/arcgis-portal-review-related-items/customElement.js +35 -20
- package/dist/components/portal-related-items-list-item/customElement.js +14 -14
- 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/dist/types/lumina.d.ts +1 -1
- package/dist/types/preact.d.ts +1 -1
- package/dist/types/react.d.ts +1 -1
- package/dist/types/stencil.d.ts +1 -1
- package/package.json +7 -7
- package/dist/cdn/3SO52LKS.js +0 -2
- package/dist/cdn/5EFYJYWM.js +0 -2
- package/dist/cdn/6CF3XEXH.js +0 -2
- package/dist/cdn/6EE4B3MI.js +0 -2
- package/dist/cdn/7NK6UF47.js +0 -2
- package/dist/cdn/7NTJF34Z.js +0 -2
- package/dist/cdn/EJN2JQOX.js +0 -2
- package/dist/cdn/P5SDWQYI.js +0 -2
- package/dist/cdn/QCOJMMT3.js +0 -2
- package/dist/cdn/QH7GBLDC.js +0 -2
- package/dist/cdn/QKBGX2OY.js +0 -2
- package/dist/cdn/RCCCE5IV.js +0 -2
- package/dist/cdn/T3RJKB2A.js +0 -2
- package/dist/chunks/functional.js +0 -9
- /package/dist/cdn/{TJYPEMON.js → VDOEP33G.js} +0 -0
|
@@ -158,8 +158,8 @@ function I(t) {
|
|
|
158
158
|
};
|
|
159
159
|
}
|
|
160
160
|
function B(t) {
|
|
161
|
-
const e = I(t), { filters: r, num: s, sortField: i, sortOrder: n, start: a } = e, { access: o, created: c, memberOrg: l, membership: p, modified: h, owner: m, specialGroups:
|
|
162
|
-
return
|
|
161
|
+
const e = I(t), { filters: r, num: s, sortField: i, sortOrder: n, start: a } = e, { access: o, created: c, memberOrg: l, membership: p, modified: h, owner: m, specialGroups: C } = r, d = {}, P = t.get("searchTerm")?.trim() || void 0, _ = t.get("q")?.trim() || void 0;
|
|
162
|
+
return P && (d.searchTerm = P), _ && (d.q = _), i && (d.sortField = i), n && (d.sortOrder = n), a && (d.start = a), s && (d.num = s), o && (d.access = o), m && (d.owner = m), p && (d.membershipAccess = p), l && (d.memberOrgIds = l), C && (d.specialGroups = C), c?.range && (d.created = c.range), c?.start && (d.createdFrom = c.start.getTime()), c?.end && (d.createdTo = c.end.getTime()), h?.range && (d.modified = h.range), h?.start && (d.modifiedFrom = h.start.getTime()), h?.end && (d.modifiedTo = h.end.getTime()), d;
|
|
163
163
|
}
|
|
164
164
|
function Be(t) {
|
|
165
165
|
const e = new URLSearchParams(t.currentSearchParams);
|
|
@@ -210,7 +210,7 @@ function F(t, e = "desc") {
|
|
|
210
210
|
function $e(t) {
|
|
211
211
|
return !t || !(t instanceof HTMLElement) ? null : t;
|
|
212
212
|
}
|
|
213
|
-
async function
|
|
213
|
+
async function Ce(t) {
|
|
214
214
|
if (t) {
|
|
215
215
|
if (t.restoreFocus) {
|
|
216
216
|
await t.restoreFocus();
|
|
@@ -223,10 +223,10 @@ async function Pe(t) {
|
|
|
223
223
|
t.focus?.();
|
|
224
224
|
}
|
|
225
225
|
}
|
|
226
|
-
function
|
|
226
|
+
function Pe(t) {
|
|
227
227
|
let e = null;
|
|
228
228
|
const r = async (i = {}) => {
|
|
229
|
-
t.onClose(), i.restoreFocus && await
|
|
229
|
+
t.onClose(), i.restoreFocus && await Ce(e);
|
|
230
230
|
};
|
|
231
231
|
return { handlePreview: (i, n) => {
|
|
232
232
|
if (!i?.id) {
|
|
@@ -350,7 +350,7 @@ class Re extends L {
|
|
|
350
350
|
setResponsiveFormFactor: (e) => {
|
|
351
351
|
this.responsiveFormFactor = e;
|
|
352
352
|
}
|
|
353
|
-
}), this.previewSessionController =
|
|
353
|
+
}), this.previewSessionController = Pe({
|
|
354
354
|
onOpen: ({ preview: e }) => {
|
|
355
355
|
this.store.preview = e.id, this.arcgisGroupBrowserPreview.emit(e);
|
|
356
356
|
},
|
|
@@ -424,7 +424,7 @@ class Re extends L {
|
|
|
424
424
|
updated(e) {
|
|
425
425
|
e.has("view") && (this.store.view = this.view), e.has("store") && (this.view !== void 0 && (this.store.view = this.view), this.responsiveLayoutController.refreshStoreWatcher(), this.responsiveLayoutController.updateResponsiveLayout(), this.syncFiltersEmptyFromConfig()), e.has("filters") && this.syncFiltersEmptyFromConfig(), e.has("selected") && (this.selectedGroups = this.selected || []);
|
|
426
426
|
const r = e.get("num");
|
|
427
|
-
r !== void 0 && r !== this.num && this.fetchGroups(), (e.has("portal") || e.has("hasIndoorsSpaces")) && this.updateSpecialGroupOptions(), e.has("sort") && this.syncSortFromConfig();
|
|
427
|
+
r !== void 0 && r !== this.num && this.fetchGroups(), (e.has("portal") || e.has("hasIndoorsSpaces") || e.has("filters")) && this.updateSpecialGroupOptions(), e.has("sort") && this.syncSortFromConfig();
|
|
428
428
|
}
|
|
429
429
|
disconnectedCallback() {
|
|
430
430
|
this.responsiveLayoutController.disconnect(), window.removeEventListener("resize", this.responsiveLayoutController.handleWindowResize), super.disconnectedCallback();
|
|
@@ -499,7 +499,7 @@ class Re extends L {
|
|
|
499
499
|
this.sortField = i, this.sortOrder = e.props?.order ?? F(i, this.sortOrder);
|
|
500
500
|
}
|
|
501
501
|
async updateSpecialGroupOptions(e = !0) {
|
|
502
|
-
if (!this.portal) {
|
|
502
|
+
if (!this.portal || !this.filters.specialGroups?.enabled) {
|
|
503
503
|
this.specialGroupOptions = [];
|
|
504
504
|
return;
|
|
505
505
|
}
|
|
@@ -4,7 +4,7 @@ import { LitElement as E, createEvent as F, safeClassMap as v, nothing as D } fr
|
|
|
4
4
|
import { css as V, html as w } from "lit";
|
|
5
5
|
import { i as O } from "../../chunks/functionalities.js";
|
|
6
6
|
import { a as g, b as S, g as R } from "../../chunks/itemThumbnail.js";
|
|
7
|
-
import { q as x, u as U } from "../../chunks/
|
|
7
|
+
import { q as x, u as U } from "../../chunks/item.js";
|
|
8
8
|
import { g as A } from "../../chunks/portal.js";
|
|
9
9
|
import { execute as B } from "@arcgis/core/rest/geoprocessor.js";
|
|
10
10
|
function G(e) {
|
|
@@ -7,7 +7,7 @@ import { makeGenericController as E } from "@arcgis/lumina/controllers";
|
|
|
7
7
|
import { debounce as U } from "@arcgis/toolkit/function";
|
|
8
8
|
import { S as D, M as g, g as L } from "../../chunks/utils.js";
|
|
9
9
|
import { q as O } from "../../chunks/groups.js";
|
|
10
|
-
import { s as R } from "../../chunks/
|
|
10
|
+
import { s as R } from "../../chunks/item2.js";
|
|
11
11
|
import { b as F } from "../../chunks/user.js";
|
|
12
12
|
import { f as $ } from "../../chunks/request.js";
|
|
13
13
|
import { keyed as _ } from "lit/directives/keyed.js";
|
|
@@ -12,9 +12,8 @@ import { i as T, c as ge, a as Tt } from "../../chunks/user2.js";
|
|
|
12
12
|
import { c as Ct, d as Mt, e as Ot, f as Lt, h as Et } from "../../chunks/portal2.js";
|
|
13
13
|
import { c as jt, d as Dt, e as zt } from "../../chunks/user.js";
|
|
14
14
|
import { i as Ne, a as Gt } from "../../chunks/utils3.js";
|
|
15
|
-
import { e as Ut } from "../../chunks/
|
|
15
|
+
import { e as Ut, g as Te } from "../../chunks/item2.js";
|
|
16
16
|
import { g as Bt } from "../../chunks/request.js";
|
|
17
|
-
import { g as Te } from "../../chunks/item.js";
|
|
18
17
|
import { keyed as le } from "lit/directives/keyed.js";
|
|
19
18
|
import { e as ue, n as Rt, a as de, f as J, g as Ft } from "../../chunks/portal.js";
|
|
20
19
|
import { ref as W, createRef as F } from "lit/directives/ref.js";
|
|
@@ -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-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
14
|
import "../arcgis-portal-user-avatar/index.js";
|
|
15
15
|
import "@esri/calcite-components/components/calcite-dropdown-group";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
2
|
import { c as d } from "../../chunks/runtime.js";
|
|
3
3
|
import { LitElement as u, createEvent as I, nothing as R } from "@arcgis/lumina";
|
|
4
|
-
import { g } from "../../chunks/
|
|
4
|
+
import { g } from "../../chunks/item.js";
|
|
5
5
|
import { u as f } from "../../chunks/useT9n.js";
|
|
6
6
|
import { createRef as b, ref as $ } from "lit/directives/ref.js";
|
|
7
7
|
import { unsafeHTML as v } from "lit/directives/unsafe-html.js";
|
|
@@ -1,33 +1,48 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import { c as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
|
|
10
|
-
|
|
2
|
+
import { c as d } from "../../chunks/runtime.js";
|
|
3
|
+
import { LitElement as p } from "@arcgis/lumina";
|
|
4
|
+
import { css as u, html as o } from "lit";
|
|
5
|
+
import { f as h } from "../../chunks/user.js";
|
|
6
|
+
import { f as g } from "../../chunks/item2.js";
|
|
7
|
+
import { s as I } from "../../chunks/portal-related-items-list-item.js";
|
|
8
|
+
import { u as c } from "../../chunks/useT9n.js";
|
|
9
|
+
import { RelatedItemsListItem as f } from "../portal-related-items-list-item/customElement.js";
|
|
10
|
+
import { b } from "../../chunks/url.js";
|
|
11
|
+
const w = u`: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}calcite-block{--calcite-block-icon-start-color: var(--calcite-color-status-warning)}calcite-list{max-block-size:250px;overflow-y:auto}`, m = 20;
|
|
12
|
+
class v extends p {
|
|
11
13
|
constructor() {
|
|
12
|
-
super(...arguments), this.messages =
|
|
14
|
+
super(...arguments), this.messages = c({ blocking: !0 }), this.browserMessages = c({ name: "portal-browser", blocking: !0 }), this.deleteMessages = c({ name: "portal-delete-items", blocking: !0 }), this.userRequestId = 0, this.itemGroups = {}, this.sourceItem = null, this.relatedItems = [], this.showDependentItems = !1;
|
|
13
15
|
}
|
|
14
16
|
static {
|
|
15
|
-
this.properties = { sourceItem: 0, relatedItems: 0, relatedItemsCount: 9, showDependentItems: 5, portal: 0, user: 0 };
|
|
17
|
+
this.properties = { itemGroups: 16, sourceItem: 0, relatedItems: 0, relatedItemsCount: 9, showDependentItems: 5, portal: 0, user: 0 };
|
|
16
18
|
}
|
|
17
19
|
static {
|
|
18
|
-
this.styles = [
|
|
20
|
+
this.styles = [w, I];
|
|
21
|
+
}
|
|
22
|
+
willUpdate(e) {
|
|
23
|
+
(e.has("relatedItems") || e.has("portal") || e.has("user")) && (this.itemGroups = {}, this.loadGroupSharing(++this.userRequestId));
|
|
24
|
+
}
|
|
25
|
+
async loadGroupSharing(e) {
|
|
26
|
+
const { portal: t, relatedItems: i } = this, s = this.user ?? t?.user;
|
|
27
|
+
if (!t || !s?.username || !i.length)
|
|
28
|
+
return;
|
|
29
|
+
const r = await h(s.username, t);
|
|
30
|
+
if (e !== this.userRequestId)
|
|
31
|
+
return;
|
|
32
|
+
const { result: a } = await g(t, r, i);
|
|
33
|
+
e === this.userRequestId && (this.itemGroups = a ?? {});
|
|
19
34
|
}
|
|
20
35
|
render() {
|
|
21
|
-
const
|
|
22
|
-
if (!
|
|
36
|
+
const e = this.relatedItemsCount ?? this.relatedItems.length;
|
|
37
|
+
if (!e && !this.relatedItems.length)
|
|
23
38
|
return null;
|
|
24
|
-
const
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
}}>${this.deleteMessages.impactedItems["View usage"]}</calcite-button></div><calcite-list .label=${
|
|
39
|
+
const t = new Intl.NumberFormat(this.deleteMessages._t9nLocale), i = t.format(e), s = this.showDependentItems ? this.deleteMessages.dependentItems : this.deleteMessages.impactedItems.title, r = this.showDependentItems ? this.deleteMessages.itemsDependingOnThisItem : this.deleteMessages.deletingWillImpactOtherItems, a = this.portal && this.sourceItem ? `${b({ portal: this.portal })}/item.html?id=${this.sourceItem.id}#usage` : void 0, n = () => {
|
|
40
|
+
a && window.open(a, "_blank");
|
|
41
|
+
};
|
|
42
|
+
return o`<calcite-block .heading=${r.replace("{count}", i)} collapsible .label=${s} icon-start=exclamation-mark-triangle><div class="items-directly-using"><div class="impacted-items-labels"><span class="impacted-items-title">${s}</span>${!this.showDependentItems && o`<span class="impacted-items-access-count">${this.deleteMessages.impactedItems.itemsYouHaveAccessTo.replace("{accessCount}", t.format(this.relatedItems.length)).replace("{totalCount}", i)}</span>` || ""}</div><calcite-button appearance=transparent icon-end=launch @click=${n}>${this.deleteMessages.impactedItems["View usage"]}</calcite-button></div><calcite-list .label=${s}>${this.relatedItems.slice(0, m).map((l) => f({ item: l, 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 > m && o`<calcite-button class="view-full-list" appearance=transparent icon-end=launch @click=${n}>${this.deleteMessages.impactedItems["View full list"]}</calcite-button>` || ""}</calcite-block>`;
|
|
28
43
|
}
|
|
29
44
|
}
|
|
30
|
-
|
|
45
|
+
d("arcgis-portal-review-related-items", v);
|
|
31
46
|
export {
|
|
32
|
-
|
|
47
|
+
v as ArcgisPortalReviewRelatedItems
|
|
33
48
|
};
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
2
|
import { html as i } from "lit";
|
|
3
|
-
import { formatDate as
|
|
4
|
-
import { nothing as
|
|
5
|
-
import { g as
|
|
6
|
-
import { b as
|
|
7
|
-
function
|
|
8
|
-
const
|
|
3
|
+
import { formatDate as u } from "@arcgis/core/intl.js";
|
|
4
|
+
import { nothing as y } from "@arcgis/lumina";
|
|
5
|
+
import { g as b } from "../../chunks/user2.js";
|
|
6
|
+
import { b as I } from "../../chunks/url.js";
|
|
7
|
+
function D({ item: e, portal: c, user: t, lang: m, modifiedLabel: o, showAccessInfo: d = !0, access: s = { level: e.access }, relatedItemsCount: _ = 0, relatedItemsCountTitle: a, onRelatedItemsClick: $ }) {
|
|
8
|
+
const n = "inRecycleBin" in e && e.inRecycleBin === !0, l = c && !n ? `${I({ portal: c })}/item.html?id=${e.id}` : void 0, r = e.title ?? "", p = u(e.modified ?? void 0, { dateStyle: "medium" }), v = o ? o.replace("${date}", p ?? "") : p ?? "", g = {
|
|
9
9
|
public: "globe",
|
|
10
10
|
private: "user",
|
|
11
11
|
org: "organization",
|
|
12
|
-
shared: "
|
|
13
|
-
}[
|
|
14
|
-
return i`<calcite-list-item .label=${
|
|
15
|
-
|
|
16
|
-
}}><span slot=content-start><arcgis-portal-item-type .item=${e} .portal=${
|
|
17
|
-
|
|
18
|
-
}}>${
|
|
12
|
+
shared: "user"
|
|
13
|
+
}[s.level], h = !!s.groupIds?.length || s.level === "shared";
|
|
14
|
+
return i`<calcite-list-item .label=${r} @calciteListItemSelect=${() => {
|
|
15
|
+
l && window.open(l, "_blank", "noopener,noreferrer");
|
|
16
|
+
}}><span slot=content-start><arcgis-portal-item-type .item=${e} .portal=${c} .user=${t} hide-text></arcgis-portal-item-type></span><div slot=content class="item"><div class="item__content"><span class="item__title">${r}</span><div class="item__details"><span class="item__type"><arcgis-portal-item-type .item=${e} .user=${t} .portal=${c} scale=s hide-icon></arcgis-portal-item-type></span>|<span class="item__details-owner">${b(t, m) ?? e.owner}</span>|<span class="item__details-modified">${v}</span></div></div></div><div slot=content-end class="item__content-end">${n && i`<calcite-icon class="item__status-icon" icon=recycle-bin scale=s></calcite-icon>` || ""}${_ > 0 && i`<calcite-chip .label=${a} title=${a ?? y} icon=launch @click=${(f) => {
|
|
17
|
+
f.stopPropagation(), $?.();
|
|
18
|
+
}}>${a}</calcite-chip>` || ""}${d && !n && i`<span class="item__access"><calcite-icon .icon=${g} scale=s class="item__access-icon"></calcite-icon>${h && 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
|
+
D as RelatedItemsListItem
|
|
22
22
|
};
|