@arcgis/portal-components 6.0.0-next.37 → 6.0.0-next.39
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/2574FNAZ.js +2 -0
- package/dist/cdn/3DOZPC3W.js +2 -0
- package/dist/cdn/{R5LNWMD4.js → 3HZI6MKD.js} +1 -1
- package/dist/cdn/{ASLKTYLX.js → 3KGSWW6B.js} +1 -1
- package/dist/cdn/{VWV2LCNA.js → 3OL7A2UC.js} +1 -1
- package/dist/cdn/3Q7UJKKN.js +2 -0
- package/dist/cdn/43A74S72.js +2 -0
- package/dist/cdn/46HNNQAD.js +2 -0
- package/dist/cdn/46MYBPSS.js +2 -0
- package/dist/cdn/{H25PBZPU.js → 47DKAGRV.js} +1 -1
- package/dist/cdn/{5VFGR7LA.js → 4CBRO7JP.js} +1 -1
- package/dist/cdn/{NLFBHNSX.js → 5M25PCH2.js} +1 -1
- package/dist/cdn/5MLBK66O.js +2 -0
- package/dist/cdn/5RBH3LGK.js +2 -0
- package/dist/cdn/5ZHNRQOW.js +2 -0
- package/dist/cdn/62TL6V4N.js +2 -0
- package/dist/cdn/{IWQ5I2DD.js → 66VV7NHO.js} +1 -1
- package/dist/cdn/{US37IXWO.js → 6AHPTR2E.js} +1 -1
- package/dist/cdn/{ZQ6SGKLT.js → 6APPSZ7E.js} +1 -1
- package/dist/cdn/{XH6RD5BO.js → 6CUXEL27.js} +1 -1
- package/dist/cdn/{6HNKQNS5.js → 6QI7DAS2.js} +1 -1
- package/dist/cdn/{324F5URQ.js → 6ZJNZZPC.js} +1 -1
- package/dist/cdn/{5CEFJTG4.js → 75CT6IMW.js} +1 -1
- package/dist/cdn/{CJ4S56BE.js → 7J22VLBO.js} +1 -1
- package/dist/cdn/7VPB6Q55.js +63 -0
- package/dist/cdn/7ZU43BL6.js +2 -0
- package/dist/cdn/A5QLPZ57.js +2 -0
- package/dist/cdn/AZTAWZI5.js +2 -0
- package/dist/cdn/{WIUFH5SJ.js → BNWJUQDF.js} +1 -1
- package/dist/cdn/{UBPCKCW2.js → BUYOYUA2.js} +1 -1
- package/dist/cdn/BX7Q3V2Y.js +43 -0
- package/dist/cdn/BXPNB7VJ.js +2 -0
- package/dist/cdn/{4Y73LE7P.js → BZEKNJUA.js} +1 -1
- package/dist/cdn/{WCZJXBW3.js → C6RUWLEJ.js} +1 -1
- package/dist/cdn/C7SNE6YG.js +2 -0
- package/dist/cdn/DENQY4OE.js +2 -0
- package/dist/cdn/DT4HGMLS.js +2 -0
- package/dist/cdn/{NYBLHT3F.js → DTGPLVZF.js} +1 -1
- package/dist/cdn/DU2R3VC4.js +2 -0
- package/dist/cdn/{RJRTGF33.js → E5HCHRAI.js} +1 -1
- package/dist/cdn/{IX4WEZZ2.js → EBL7YSRM.js} +1 -1
- package/dist/cdn/EDGE3T36.js +2 -0
- package/dist/cdn/{HBO7XTIL.js → EFMYI4L2.js} +1 -1
- package/dist/cdn/{XOM3GLYF.js → FFL2L4X5.js} +1 -1
- package/dist/cdn/{PST62OKJ.js → FIAEPK5L.js} +1 -1
- package/dist/cdn/{L25GEXL6.js → FTKSVLDI.js} +1 -1
- package/dist/cdn/{QMIVFHQE.js → G272JPUS.js} +1 -1
- package/dist/cdn/{D52TYBRX.js → GFUKRB6D.js} +1 -1
- package/dist/cdn/{ZGSAH7Z7.js → GG6U75ZA.js} +1 -1
- package/dist/cdn/{O4YFPGD5.js → GZ4ONSFV.js} +1 -1
- package/dist/cdn/{YP7T6NKR.js → HOIZXTOD.js} +1 -1
- package/dist/cdn/{DV57AOBF.js → IAMPUXPT.js} +1 -1
- package/dist/cdn/{AUM2QTBQ.js → IAWL475A.js} +1 -1
- package/dist/cdn/IGLODZPX.js +2 -0
- package/dist/cdn/{KTWSNYYZ.js → IOF72CDU.js} +1 -1
- package/dist/cdn/ITRJGXFV.js +93 -0
- package/dist/cdn/{EDQSL2P3.js → ITWLFQI4.js} +1 -1
- package/dist/cdn/{B343BOVA.js → IYICIRGI.js} +1 -1
- package/dist/cdn/{OVAOMUO3.js → JFGXTJY4.js} +1 -1
- package/dist/cdn/{5E4EL6TF.js → JIU6MBGB.js} +1 -1
- package/dist/cdn/{5Y32T5IJ.js → JTA223NH.js} +1 -1
- package/dist/cdn/KA2MXQTR.js +2 -0
- package/dist/cdn/KAK6CNI7.js +2 -0
- package/dist/cdn/{5S4JV6IY.js → KPZGBBDG.js} +1 -1
- package/dist/cdn/{M664QA6J.js → KRO5XRZ7.js} +1 -1
- package/dist/cdn/KWL2D56D.js +3 -0
- package/dist/cdn/{BRWHEYLW.js → KXVXQYIB.js} +1 -1
- package/dist/cdn/L3YOPSRB.js +135 -0
- package/dist/cdn/{QF626JXP.js → LEESUFWE.js} +1 -1
- package/dist/cdn/{CMNTOT5D.js → LGKI24ZT.js} +1 -1
- package/dist/cdn/LTD5KLLE.js +2 -0
- package/dist/cdn/{VFECPSKA.js → MB32XRI5.js} +1 -1
- package/dist/cdn/{3T3QBPC3.js → MSL36HAR.js} +1 -1
- package/dist/cdn/{ARAHDT2O.js → N3WRMPM6.js} +1 -1
- package/dist/cdn/N47MW5HI.js +9 -0
- package/dist/cdn/{G7DJPREL.js → N7XYFVOI.js} +1 -1
- package/dist/cdn/{WZFGZEQI.js → NU4K2AV3.js} +1 -1
- package/dist/cdn/{ESKKH4DE.js → ONRTCGLU.js} +1 -1
- package/dist/cdn/{WSQLSDQY.js → OPI4P6VO.js} +1 -1
- package/dist/cdn/{YYKKXL62.js → OPMM7QH5.js} +1 -1
- package/dist/cdn/{PRBP4AP6.js → OXF2WDSW.js} +1 -1
- package/dist/cdn/P3FFM322.js +2 -0
- package/dist/cdn/QAXFE5DD.js +2 -0
- package/dist/cdn/{6EMK2BU6.js → QKRLO5CJ.js} +1 -1
- package/dist/cdn/{FVHP6PFG.js → R26RBXQW.js} +1 -1
- package/dist/cdn/R6KJVAX3.js +99 -0
- package/dist/cdn/RA2NMLMP.js +2 -0
- package/dist/cdn/{365ICWHN.js → RJXIU4GH.js} +1 -1
- package/dist/cdn/{6FFYU4NI.js → RKHNP3KL.js} +1 -1
- package/dist/cdn/RR56BOTV.js +2 -0
- package/dist/cdn/RTZ2TKM5.js +2 -0
- package/dist/cdn/RX64JXHI.js +170 -0
- package/dist/cdn/{26KZUWNM.js → RXMM6CFK.js} +1 -1
- package/dist/cdn/{JA3GGSJJ.js → S4N5QMSN.js} +1 -1
- package/dist/cdn/{3CXU5CCM.js → SCLYGIHM.js} +1 -1
- package/dist/cdn/{PJZZIITX.js → SLK7PV62.js} +1 -1
- package/dist/cdn/{SUA7ZZUH.js → SUN4MBT3.js} +1 -1
- package/dist/cdn/SYXCSFIA.js +2 -0
- package/dist/cdn/{3QWNGHAK.js → TBSNDRRE.js} +1 -1
- package/dist/cdn/TP7V25GT.js +2 -0
- package/dist/cdn/{FGDSHTJ5.js → UBMZBXT7.js} +1 -1
- package/dist/cdn/UIK6LPA7.js +2 -0
- package/dist/cdn/{7DAB2CEU.js → VQRMXBPQ.js} +1 -1
- package/dist/cdn/{AM3UTQWH.js → VWOBCSD6.js} +1 -1
- package/dist/cdn/{C3F24ZOM.js → W3JJBZYX.js} +1 -1
- package/dist/cdn/W6WVMRGQ.js +2 -0
- package/dist/cdn/{TO666HVV.js → WNXDXB3M.js} +1 -1
- package/dist/cdn/{XEVOU7SJ.js → WOSWA2VI.js} +1 -1
- package/dist/cdn/{DMS3R2W5.js → WTKLB3R6.js} +1 -1
- package/dist/cdn/{LR33CLTB.js → X7W4VJO7.js} +1 -1
- package/dist/cdn/{CIRCDM5E.js → XCOP6QHA.js} +1 -1
- package/dist/cdn/{C4GK263H.js → XVV75AX3.js} +1 -1
- package/dist/cdn/XYHIVGUK.js +2 -0
- package/dist/cdn/{2GZVUHL5.js → Y4JOEFBJ.js} +1 -1
- package/dist/cdn/{CNEJPW3I.js → Y7ZCEONL.js} +1 -1
- package/dist/cdn/YELHAJB3.js +2 -0
- package/dist/cdn/YH2OFXPU.js +2 -0
- package/dist/cdn/{HVQ7FKJ5.js → YYVLFAFT.js} +1 -1
- package/dist/cdn/{BX2LXI3N.js → ZDH4KVAV.js} +1 -1
- package/dist/cdn/{SO3IBFEU.js → ZECUXVTO.js} +1 -1
- package/dist/cdn/ZG7OW456.js +2 -0
- package/dist/cdn/{7BFTXD5J.js → ZLNBCJE4.js} +1 -1
- package/dist/cdn/{GC4BV7IZ.js → ZNNEU5QW.js} +1 -1
- package/dist/cdn/assets/portal-item-status-card/t9n/messages.en.json +1 -0
- package/dist/cdn/assets/portal-review-layer-sharing/t9n/messages.en.json +1 -0
- package/dist/cdn/index.js +1 -1
- package/dist/cdn/main.css +1 -1
- package/dist/chunks/constants.js +7 -0
- package/dist/chunks/contextUsage.js +208 -0
- package/dist/chunks/createPortalTool.js +8 -8
- package/dist/chunks/fieldAddDelete.js +1 -1
- package/dist/chunks/groups2.js +1 -1
- package/dist/chunks/help.js +22 -0
- package/dist/chunks/item.js +29 -25
- package/dist/chunks/item2.js +66 -30
- package/dist/chunks/itemThumbnail.js +1 -1
- package/dist/chunks/items.js +11 -11
- package/dist/chunks/layers.js +1 -1
- package/dist/chunks/portal-item-preview-sublayer.js +1 -1
- package/dist/chunks/portal-item-status-card.js +81 -0
- package/dist/chunks/portal.js +2 -2
- package/dist/chunks/portal2.js +1 -1
- package/dist/chunks/previewSessionController.js +33 -0
- package/dist/chunks/request.js +9 -9
- package/dist/chunks/services.js +1 -1
- package/dist/chunks/user.js +2 -2
- package/dist/chunks/utils2.js +4 -4
- package/dist/components/arcgis-portal-ai-assistant/customElement.js +241 -219
- package/dist/components/arcgis-portal-ai-assistant/index.js +1 -0
- package/dist/components/arcgis-portal-ai-assistant-diagnostics/contextUsage.d.ts +46 -0
- package/dist/components/arcgis-portal-ai-assistant-diagnostics/customElement.d.ts +26 -0
- package/dist/components/arcgis-portal-ai-assistant-diagnostics/customElement.js +46 -0
- package/dist/components/arcgis-portal-ai-assistant-diagnostics/index.d.ts +1 -0
- package/dist/components/arcgis-portal-ai-assistant-diagnostics/index.js +10 -0
- package/dist/components/arcgis-portal-delete-items/customElement.js +95 -110
- package/dist/components/arcgis-portal-entity-picker/customElement.js +1 -1
- package/dist/components/arcgis-portal-field-delete/customElement.js +1 -1
- package/dist/components/arcgis-portal-group-browser/customElement.js +62 -90
- package/dist/components/arcgis-portal-group-thumbnail/customElement.js +1 -1
- package/dist/components/arcgis-portal-item-share-summary/customElement.js +1 -1
- package/dist/components/arcgis-portal-item-status-card/customElement.d.ts +82 -0
- package/dist/components/arcgis-portal-item-status-card/customElement.js +12 -0
- package/dist/components/arcgis-portal-item-status-card/index.d.ts +1 -0
- package/dist/components/arcgis-portal-item-status-card/index.js +4 -0
- package/dist/components/arcgis-portal-navigation/customElement.js +1 -1
- package/dist/components/arcgis-portal-navigation/index.js +4 -4
- package/dist/components/arcgis-portal-review-layer-sharing/customElement.d.ts +139 -0
- package/dist/components/arcgis-portal-review-layer-sharing/customElement.js +593 -0
- package/dist/components/arcgis-portal-review-layer-sharing/index.d.ts +1 -0
- package/dist/components/arcgis-portal-review-layer-sharing/index.js +10 -0
- package/dist/components/arcgis-portal-review-layer-sharing/types.d.ts +27 -0
- package/dist/components/arcgis-portal-user-popup/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/index.d.ts +24 -0
- package/dist/index.js +1 -1
- package/dist/loader.js +3 -0
- package/dist/types/item.d.ts +2 -0
- package/dist/types/lumina.d.ts +18 -0
- package/dist/types/preact.d.ts +21 -0
- package/dist/types/react.d.ts +24 -0
- package/dist/types/stencil.d.ts +18 -0
- package/package.json +10 -10
- package/dist/cdn/234TH32X.js +0 -106
- package/dist/cdn/25K5D5HL.js +0 -2
- package/dist/cdn/4KTRAA2J.js +0 -2
- package/dist/cdn/4X4EYM3Q.js +0 -2
- package/dist/cdn/4YJGTINX.js +0 -2
- package/dist/cdn/A3OUZJ44.js +0 -2
- package/dist/cdn/ASID6YW7.js +0 -135
- package/dist/cdn/AYESDOK5.js +0 -2
- package/dist/cdn/BOEGDK4D.js +0 -2
- package/dist/cdn/CBFFZMX4.js +0 -2
- package/dist/cdn/FACH2JTF.js +0 -2
- package/dist/cdn/FGRMURKX.js +0 -2
- package/dist/cdn/GBG25IJ2.js +0 -2
- package/dist/cdn/H6MGSC3Y.js +0 -2
- package/dist/cdn/IKRGN33H.js +0 -93
- package/dist/cdn/K3GAZFRI.js +0 -63
- package/dist/cdn/LBW47BJG.js +0 -2
- package/dist/cdn/LRL2RJID.js +0 -2
- package/dist/cdn/MHQ5BATZ.js +0 -2
- package/dist/cdn/NJB24AIV.js +0 -2
- package/dist/cdn/NQ2IAQKL.js +0 -41
- package/dist/cdn/OEG4XCKY.js +0 -2
- package/dist/cdn/OHAQPQAP.js +0 -2
- package/dist/cdn/OYTK2VF2.js +0 -2
- package/dist/cdn/QPBWKASC.js +0 -2
- package/dist/cdn/RJ3SU3EV.js +0 -2
- package/dist/cdn/U2HTYOBB.js +0 -150
- package/dist/cdn/VLD3MVSG.js +0 -2
- package/dist/cdn/WMKG3CBK.js +0 -2
- package/dist/cdn/X4R2NVDQ.js +0 -2
- package/dist/cdn/X7C4PAJY.js +0 -2
- package/dist/cdn/YGZICQBT.js +0 -2
- package/dist/cdn/YNGFN7AY.js +0 -2
|
@@ -1,21 +1,22 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import { c as
|
|
2
|
+
import { c as E } from "../../chunks/runtime.js";
|
|
3
3
|
import b from "@arcgis/core/portal/PortalItem.js";
|
|
4
|
-
import { LitElement as
|
|
5
|
-
import { css as
|
|
6
|
-
import { createRef as
|
|
4
|
+
import { LitElement as H, createEvent as v, safeClassMap as $, nothing as q } from "@arcgis/lumina";
|
|
5
|
+
import { css as N, html as d } from "lit";
|
|
6
|
+
import { createRef as z, ref as S } from "lit/directives/ref.js";
|
|
7
7
|
import w from "@arcgis/core/request.js";
|
|
8
|
-
import { c as
|
|
9
|
-
import { r as
|
|
8
|
+
import { c as W } from "../../chunks/item2.js";
|
|
9
|
+
import { r as P } from "../../chunks/request.js";
|
|
10
10
|
import { i as I } from "../../chunks/item.js";
|
|
11
11
|
import "../arcgis-portal-review-related-items/customElement.js";
|
|
12
|
-
import { f as
|
|
13
|
-
import { u as
|
|
14
|
-
import { makeController as
|
|
15
|
-
import { g as
|
|
16
|
-
import { g as
|
|
17
|
-
import { g as
|
|
18
|
-
|
|
12
|
+
import { f as x } from "../../chunks/portal-delete-items-review.js";
|
|
13
|
+
import { u as B } from "../../chunks/useT9n.js";
|
|
14
|
+
import { makeController as j } from "@arcgis/lumina/controllers";
|
|
15
|
+
import { g as G } from "../../chunks/help.js";
|
|
16
|
+
import { g as K } from "../../chunks/items.js";
|
|
17
|
+
import { g as V } from "../../chunks/url.js";
|
|
18
|
+
import { g as C } from "../../chunks/portal.js";
|
|
19
|
+
async function R(n, t, e = !1) {
|
|
19
20
|
try {
|
|
20
21
|
const s = /* @__PURE__ */ new Map();
|
|
21
22
|
for (const l of n) {
|
|
@@ -25,7 +26,7 @@ async function _(n, t, e = !1) {
|
|
|
25
26
|
const i = [];
|
|
26
27
|
for (const [l, c] of s) {
|
|
27
28
|
const a = `${t.restUrl}/content/users/${encodeURIComponent(l)}/deleteItems`;
|
|
28
|
-
for (const o of
|
|
29
|
+
for (const o of W(c, 100)) {
|
|
29
30
|
const m = w(a, {
|
|
30
31
|
method: "post",
|
|
31
32
|
query: {
|
|
@@ -34,7 +35,7 @@ async function _(n, t, e = !1) {
|
|
|
34
35
|
permanentDelete: e
|
|
35
36
|
}
|
|
36
37
|
});
|
|
37
|
-
i.push(m.then(({ data:
|
|
38
|
+
i.push(m.then(({ data: h }) => h));
|
|
38
39
|
}
|
|
39
40
|
}
|
|
40
41
|
return { result: (await Promise.all(i)).flatMap(({ results: l }) => l) };
|
|
@@ -42,7 +43,7 @@ async function _(n, t, e = !1) {
|
|
|
42
43
|
return { error: { code: "unhandledError" } };
|
|
43
44
|
}
|
|
44
45
|
}
|
|
45
|
-
async function
|
|
46
|
+
async function _(n) {
|
|
46
47
|
const { item: t, portal: e, permanentlyDelete: s } = n, { id: i, owner: r } = t;
|
|
47
48
|
if (!i || !r)
|
|
48
49
|
return { error: { code: "unhandledError" } };
|
|
@@ -65,7 +66,7 @@ async function T(n) {
|
|
|
65
66
|
}
|
|
66
67
|
}
|
|
67
68
|
}
|
|
68
|
-
async function
|
|
69
|
+
async function J(n, t) {
|
|
69
70
|
try {
|
|
70
71
|
const e = `${n.itemUrl}/setContentStatus`;
|
|
71
72
|
return { result: (await w(e, { query: { status: t ?? "", clearEmptyFields: !t, f: "json" }, method: "post" })).data };
|
|
@@ -73,10 +74,10 @@ async function Q(n, t) {
|
|
|
73
74
|
return console.error(e), { error: { code: "unhandledError" } };
|
|
74
75
|
}
|
|
75
76
|
}
|
|
76
|
-
function
|
|
77
|
-
return (n.relatedItems ?? []).map((e) =>
|
|
77
|
+
function M(n, t) {
|
|
78
|
+
return (n.relatedItems ?? []).map((e) => Q(e, t));
|
|
78
79
|
}
|
|
79
|
-
function
|
|
80
|
+
function Q(n, t) {
|
|
80
81
|
return n instanceof b ? n : new b({ ...n, portal: t });
|
|
81
82
|
}
|
|
82
83
|
async function g({
|
|
@@ -88,7 +89,7 @@ async function g({
|
|
|
88
89
|
}) {
|
|
89
90
|
const { relationshipType: r, direction: l } = e, c = `${t.restUrl}/content/items/${n}/relatedItems`;
|
|
90
91
|
try {
|
|
91
|
-
const a = await
|
|
92
|
+
const a = await P({
|
|
92
93
|
url: c,
|
|
93
94
|
portal: t,
|
|
94
95
|
params: {
|
|
@@ -101,13 +102,13 @@ async function g({
|
|
|
101
102
|
});
|
|
102
103
|
return {
|
|
103
104
|
success: !0,
|
|
104
|
-
result: { ...a, relatedItems:
|
|
105
|
+
result: { ...a, relatedItems: M(a, t) }
|
|
105
106
|
};
|
|
106
107
|
} catch (a) {
|
|
107
108
|
return { success: !1, error: a };
|
|
108
109
|
}
|
|
109
110
|
}
|
|
110
|
-
async function
|
|
111
|
+
async function X({
|
|
111
112
|
itemId: n,
|
|
112
113
|
portal: t,
|
|
113
114
|
relationship: e,
|
|
@@ -117,7 +118,7 @@ async function Y({
|
|
|
117
118
|
}) {
|
|
118
119
|
const { relationshipRules: l, direction: c } = e, a = `${t.restUrl}/content/items/${n}/relatedItems`;
|
|
119
120
|
try {
|
|
120
|
-
const o = await
|
|
121
|
+
const o = await P({
|
|
121
122
|
url: a,
|
|
122
123
|
portal: t,
|
|
123
124
|
params: {
|
|
@@ -133,13 +134,13 @@ async function Y({
|
|
|
133
134
|
});
|
|
134
135
|
return {
|
|
135
136
|
success: !0,
|
|
136
|
-
result: { ...o, relatedItems:
|
|
137
|
+
result: { ...o, relatedItems: M(o, t) }
|
|
137
138
|
};
|
|
138
139
|
} catch (o) {
|
|
139
140
|
return { success: !1, error: o };
|
|
140
141
|
}
|
|
141
142
|
}
|
|
142
|
-
async function
|
|
143
|
+
async function Y(n, t) {
|
|
143
144
|
const { id: e, type: s, typeKeywords: i = [] } = n;
|
|
144
145
|
if (!e)
|
|
145
146
|
return null;
|
|
@@ -169,11 +170,11 @@ async function Z(n, t) {
|
|
|
169
170
|
};
|
|
170
171
|
if (r) {
|
|
171
172
|
let m = { relationshipType: ["Service2Service"], direction: "reverse" };
|
|
172
|
-
const
|
|
173
|
+
const h = await g({
|
|
173
174
|
itemId: e,
|
|
174
175
|
portal: t,
|
|
175
176
|
relationship: m
|
|
176
|
-
}), u =
|
|
177
|
+
}), u = h.result?.total ? h.result.relatedItems.shift() ?? null : null;
|
|
177
178
|
if (l && !c(u) || !u) {
|
|
178
179
|
m = { relationshipType: ["Service2Data"], direction: "forward" };
|
|
179
180
|
const y = await g({
|
|
@@ -193,7 +194,7 @@ async function Z(n, t) {
|
|
|
193
194
|
return console.error(o), { sourceData: null, relationship: { direction: "forward" } };
|
|
194
195
|
}
|
|
195
196
|
}
|
|
196
|
-
async function
|
|
197
|
+
async function Z(n, t) {
|
|
197
198
|
const { id: e, type: s, typeKeywords: i = [] } = n;
|
|
198
199
|
try {
|
|
199
200
|
const l = s === "Notebook" ? { relationshipType: ["Notebook2WebTool"], direction: "forward" } : i.includes("Has Related Route Layers") ? { relationshipType: ["Service2Route"], direction: "forward" } : i.includes("Hosted Service") || s === "Feature Service" ? { relationshipType: ["Service2Service"], direction: s === "Feed" ? "reverse" : "forward" } : s === "Data Store" || i.includes("ArcGIS Server") ? { relationshipType: ["DataStore2BPService"], direction: "forward" } : { relationshipType: ["Service2Data"], direction: "reverse" }, c = await g({
|
|
@@ -216,7 +217,7 @@ async function ee(n, t) {
|
|
|
216
217
|
};
|
|
217
218
|
}
|
|
218
219
|
}
|
|
219
|
-
async function
|
|
220
|
+
async function ee(n, t) {
|
|
220
221
|
const { id: e } = n;
|
|
221
222
|
try {
|
|
222
223
|
return (await g({
|
|
@@ -228,14 +229,14 @@ async function te(n, t) {
|
|
|
228
229
|
return console.error(s), [];
|
|
229
230
|
}
|
|
230
231
|
}
|
|
231
|
-
function
|
|
232
|
+
function te({
|
|
232
233
|
recycleItems: n,
|
|
233
234
|
cannotDeleteItems: t,
|
|
234
235
|
permanentlyDeleteItems: e
|
|
235
236
|
}) {
|
|
236
237
|
return [...n, ...t, ...e];
|
|
237
238
|
}
|
|
238
|
-
function
|
|
239
|
+
function se(n) {
|
|
239
240
|
return n.map(({ item: t, sourceData: e, resultData: s, replacementItemFor: i }) => ({
|
|
240
241
|
item: t,
|
|
241
242
|
sourceData: e,
|
|
@@ -243,64 +244,64 @@ function ne(n) {
|
|
|
243
244
|
replacementItemFor: i
|
|
244
245
|
}));
|
|
245
246
|
}
|
|
246
|
-
function
|
|
247
|
+
function U(n, t, e) {
|
|
247
248
|
return !t && !!e?.length && !I(n);
|
|
248
249
|
}
|
|
249
|
-
function
|
|
250
|
-
return !e?.some((s) => !s.inRecycleBin) ||
|
|
250
|
+
function ne({ item: n, sourceData: t, resultData: e }) {
|
|
251
|
+
return !e?.some((s) => !s.inRecycleBin) || U(n, t, e) ? !1 : !L(n, e) && !O(n, e);
|
|
251
252
|
}
|
|
252
|
-
function
|
|
253
|
+
function ie({
|
|
253
254
|
selectedItems: n
|
|
254
255
|
}) {
|
|
255
256
|
const t = [];
|
|
256
257
|
return t.push(
|
|
257
258
|
...n.flatMap(({ item: e, sourceData: s, resultData: i, replacementItemFor: r }) => {
|
|
258
|
-
const l =
|
|
259
|
+
const l = U(e, s, i), c = !!(i?.some((a) => !a.inRecycleBin) && !L(e, i) && !O(e, i));
|
|
259
260
|
return l && c ? [{ item: e, reason: "dependent", offendingItems: i ?? void 0 }] : r && r?.length > 0 ? [{ item: e, reason: "replacement", offendingItems: r }] : [];
|
|
260
261
|
})
|
|
261
262
|
), t;
|
|
262
263
|
}
|
|
263
|
-
function
|
|
264
|
+
function L(n, t) {
|
|
264
265
|
const e = t[0];
|
|
265
266
|
return n.type === "Feed" && I(n) && t.length === 1 && e?.type === "Feature Service" && I(e);
|
|
266
267
|
}
|
|
267
|
-
function
|
|
268
|
+
function O(n, t) {
|
|
268
269
|
const e = t[0];
|
|
269
270
|
return n.type === "Feature Service" && I(n) && t.length === 1 && e?.type === "Feed" && I(e);
|
|
270
271
|
}
|
|
271
|
-
const
|
|
272
|
-
function
|
|
273
|
-
return
|
|
272
|
+
const re = ["Code Attachment", "Map Area", "Indoors Map Configuration"], ae = ["MapAreaPackage"];
|
|
273
|
+
function F(n) {
|
|
274
|
+
return re.includes(n.type ?? "") || ae.some((t) => n.typeKeywords?.includes(t));
|
|
274
275
|
}
|
|
275
276
|
function k(n) {
|
|
276
|
-
return n ? n.filter((t) => !
|
|
277
|
+
return n ? n.filter((t) => !F(t)) : null;
|
|
277
278
|
}
|
|
278
|
-
function
|
|
279
|
+
function T(n) {
|
|
279
280
|
return !!(n && "inRecycleBin" in n && n.inRecycleBin === !0);
|
|
280
281
|
}
|
|
281
|
-
function
|
|
282
|
+
function p(n) {
|
|
282
283
|
return n.updatedStatus ?? n.kind;
|
|
283
284
|
}
|
|
284
285
|
function D(n) {
|
|
285
286
|
return { ...n, originalStatus: n.originalStatus ?? n.kind };
|
|
286
287
|
}
|
|
287
|
-
function
|
|
288
|
+
function le(n, t) {
|
|
288
289
|
return {
|
|
289
290
|
...n,
|
|
290
291
|
kind: t,
|
|
291
292
|
originalStatus: n.originalStatus ?? n.kind
|
|
292
293
|
};
|
|
293
294
|
}
|
|
294
|
-
async function
|
|
295
|
-
const e = await
|
|
295
|
+
async function ce(n, t) {
|
|
296
|
+
const e = await _({ item: n, portal: t, permanentlyDelete: !1 });
|
|
296
297
|
if (e.error && e.error.code !== "itemNotSupportedInRecycleBin")
|
|
297
298
|
return { kind: "cannotDelete", errorCode: e.error.code };
|
|
298
299
|
if (e.result?.success)
|
|
299
300
|
return { kind: "recycle" };
|
|
300
|
-
const s = await
|
|
301
|
+
const s = await _({ item: n, portal: t, permanentlyDelete: !0 });
|
|
301
302
|
return s.result?.success ? { kind: "permanentlyDelete" } : { kind: "cannotDelete", errorCode: s.error?.code ?? "unhandledError" };
|
|
302
303
|
}
|
|
303
|
-
function
|
|
304
|
+
function oe(n) {
|
|
304
305
|
switch (n) {
|
|
305
306
|
case "itemHasDependentItems":
|
|
306
307
|
return "hasDependentItems";
|
|
@@ -310,23 +311,23 @@ function de(n) {
|
|
|
310
311
|
return "uncaught";
|
|
311
312
|
}
|
|
312
313
|
}
|
|
313
|
-
async function
|
|
314
|
-
const e = await
|
|
314
|
+
async function de(n, t) {
|
|
315
|
+
const e = await X({
|
|
315
316
|
itemId: n.id,
|
|
316
317
|
portal: t,
|
|
317
318
|
relationship: { direction: "forward" }
|
|
318
|
-
}), s = await
|
|
319
|
+
}), s = await Y(n, t), i = await Z(n, t), r = await ee(n, t), l = e.result?.relatedItems ?? [], c = k(l) ?? [], a = e.result?.aggregations?.total?.count, o = k(i.resultData.items), m = k(r), h = s?.sourceData, u = {
|
|
319
320
|
usedByItems: c,
|
|
320
321
|
usedByItemsCount: a == null ? c.length : Math.max(0, a - (l.length - c.length)),
|
|
321
|
-
sourceData:
|
|
322
|
+
sourceData: h && !F(h) ? h : null,
|
|
322
323
|
resultData: o,
|
|
323
324
|
replacementItemFor: m?.length ? m : null
|
|
324
|
-
}, y =
|
|
325
|
+
}, y = ne({ item: n, ...u }), f = await ce(n, t);
|
|
325
326
|
return f.kind === "cannotDelete" ? D({
|
|
326
327
|
item: n,
|
|
327
328
|
...u,
|
|
328
329
|
kind: "cannotDelete",
|
|
329
|
-
reason:
|
|
330
|
+
reason: oe(f.errorCode)
|
|
330
331
|
}) : y ? D({
|
|
331
332
|
item: n,
|
|
332
333
|
...u,
|
|
@@ -339,11 +340,11 @@ async function me(n, t) {
|
|
|
339
340
|
reason: "notSupported"
|
|
340
341
|
}) : D({ item: n, ...u, kind: f.kind });
|
|
341
342
|
}
|
|
342
|
-
async function
|
|
343
|
-
const e = await Promise.all(n.map(async (s) => await
|
|
344
|
-
return
|
|
343
|
+
async function me(n, t) {
|
|
344
|
+
const e = await Promise.all(n.map(async (s) => await de(s, t)));
|
|
345
|
+
return ue(e);
|
|
345
346
|
}
|
|
346
|
-
function
|
|
347
|
+
function ue(n) {
|
|
347
348
|
const t = /* @__PURE__ */ new Map();
|
|
348
349
|
for (const e of n)
|
|
349
350
|
e.item.id && t.set(e.item.id, e);
|
|
@@ -354,50 +355,34 @@ function pe(n) {
|
|
|
354
355
|
if (i.length === 0)
|
|
355
356
|
return e;
|
|
356
357
|
const r = i.every((c) => t.has(c)), l = i.every((c) => !t.get(c)?.item.protected);
|
|
357
|
-
return r && l ?
|
|
358
|
+
return r && l ? le(e, "recycle") : e;
|
|
358
359
|
});
|
|
359
360
|
}
|
|
360
361
|
function he(n, t, e = /* @__PURE__ */ new Set()) {
|
|
361
362
|
if (!n?.length)
|
|
362
363
|
return [];
|
|
363
|
-
const s = n.filter((r) => !
|
|
364
|
+
const s = n.filter((r) => !T(r)), i = /* @__PURE__ */ new Set();
|
|
364
365
|
for (; s.length > 0; ) {
|
|
365
366
|
const l = s.shift().id;
|
|
366
367
|
if (!l || e.has(l))
|
|
367
368
|
continue;
|
|
368
369
|
e.add(l), i.add(l);
|
|
369
370
|
const a = t.get(l)?.resultData ?? [];
|
|
370
|
-
s.push(...a.filter((o) => !
|
|
371
|
+
s.push(...a.filter((o) => !T(o)));
|
|
371
372
|
}
|
|
372
373
|
return [...i];
|
|
373
374
|
}
|
|
374
|
-
const
|
|
375
|
-
async function Ie(n, t) {
|
|
376
|
-
const e = K(n), s = JSON.stringify([e, t]), i = P.get(s);
|
|
377
|
-
if (i)
|
|
378
|
-
return i;
|
|
379
|
-
try {
|
|
380
|
-
const l = (await $({
|
|
381
|
-
url: `${e}portals/helpmap`,
|
|
382
|
-
portal: n,
|
|
383
|
-
params: { culture: t }
|
|
384
|
-
}))?.helpMap?.m ?? {};
|
|
385
|
-
return P.set(s, l), l;
|
|
386
|
-
} catch {
|
|
387
|
-
return {};
|
|
388
|
-
}
|
|
389
|
-
}
|
|
390
|
-
const ye = (n) => G((t, e) => {
|
|
375
|
+
const pe = N`:host{display:block}calcite-dialog{--calcite-dialog-content-space: 0;--calcite-dialog-background-color: var(--calcite-color-background)}calcite-panel{display:flex;flex-direction:column;gap:.75rem;>*{margin-inline:.75rem}}.panel__content{width:100%;box-sizing:border-box}.delete-items-button{align-self:stretch;flex:0 0 auto;max-inline-size:155px}.delete-items-button>span{white-space:normal;overflow-wrap:anywhere}.single-item-bucket{--calcite-block-background-color: transparent;--calcite-block-border-color: transparent}.bucket__content{display:flex;align-items:flex-start;gap:.75rem;width:100%}.bucket__icon{flex-shrink:0}.bucket__icon--danger{color:var(--calcite-color-status-danger)}.bucket__details{display:flex;flex:1 1 auto;flex-direction:column;min-width:0}.bucket__header{font-weight:500}.bucket__label{margin-inline-end:.25rem}.bucket__checkbox{align-self:flex-start;margin-top:.5rem}.bucket__description{line-height:1.35;font-size:var(--calcite-font-size--1)}.bucket__link{display:flex;align-items:center;min-height:1.5rem}.item-link-content{position:relative;word-break:break-word;>arcgis-portal-item-type{margin-inline-end:.25rem;vertical-align:middle}}.panel__checkbox-container{width:100%;box-sizing:border-box;background-color:var(--calcite-color-foreground-1)}.panel__checkbox{padding-block:.75rem;padding-inline-start:.75rem}.panel__related-items{margin-top:1rem;border:1px solid var(--calcite-color-border-2)}.panel__related-items-icon{color:var(--calcite-color-status-warning)}.panel__related-items-notice{padding-bottom:.75rem}arcgis-portal-review-related-items{margin-bottom:.75rem}calcite-list{overflow:auto;min-block-size:0;max-height:min(250px,75vh)}.discouraged-items-warning{margin-bottom:.75rem}.header-description{font-size:var(--calcite-font-size--1);font-weight:400}`, ge = (n) => j((t, e) => {
|
|
391
376
|
let s, i;
|
|
392
377
|
return e.onUpdate(() => {
|
|
393
378
|
const r = n.portal(), l = n.language(), c = r?.restUrl;
|
|
394
|
-
c === s && l === i || (s = c, i = l, e.exports = {}, !(!r || !c || !l) &&
|
|
379
|
+
c === s && l === i || (s = c, i = l, e.exports = {}, !(!r || !c || !l) && G(r, l).then((a) => {
|
|
395
380
|
e.exports = a;
|
|
396
381
|
}));
|
|
397
382
|
}), {};
|
|
398
383
|
});
|
|
399
|
-
function
|
|
400
|
-
return d`<calcite-link id=${n ??
|
|
384
|
+
function A({ id: n, linkText: t, label: e, placement: s, items: i, portal: r, user: l }) {
|
|
385
|
+
return d`<calcite-link id=${n ?? q} @keydown=${(c) => {
|
|
401
386
|
if (c.key === " " || c.key === "Enter") {
|
|
402
387
|
const a = c.currentTarget.nextElementSibling;
|
|
403
388
|
a && (a.open = !a.open);
|
|
@@ -416,9 +401,9 @@ function M({ id: n, linkText: t, label: e, placement: s, items: i, portal: r, us
|
|
|
416
401
|
a && window.open(a.replace("sharing/rest/", ""), "_blank", "noopener,noreferrer");
|
|
417
402
|
}}><span slot=content-start><arcgis-portal-item-type .item=${c} .portal=${r} .user=${l} hide-text></arcgis-portal-item-type></span><span slot=content>${c.title}</span></calcite-list-item>`)}</calcite-list></calcite-popover>`;
|
|
418
403
|
}
|
|
419
|
-
class
|
|
404
|
+
class Ie extends H {
|
|
420
405
|
constructor() {
|
|
421
|
-
super(...arguments), this.deleteStatusRequestId = 0, this.updatedCannotDeleteItemIds = /* @__PURE__ */ new Set(), this.permanentlyDeleteCheckboxRef =
|
|
406
|
+
super(...arguments), this.deleteStatusRequestId = 0, this.updatedCannotDeleteItemIds = /* @__PURE__ */ new Set(), this.permanentlyDeleteCheckboxRef = z(), this.messages = B({ blocking: !0 }), this.fieldDeleteMessages = B({ name: "portal-field-delete" }), this.helpMap = ge({
|
|
422
407
|
portal: () => this.portal,
|
|
423
408
|
language: () => this.messages._t9nLocale
|
|
424
409
|
}), this.isLoading = !0, this.submittingAction = null, this.loadedItems = [], this.hasConfirmedReview = !1, this.cannotDeleteItems = [], this.recycleItems = [], this.permanentlyDeleteItems = [], this.deprecateItems = [], this.excludeItems = [], this.reviewingDirectlyUsedByItems = !1, this.reviewDecision = null, this.active = !0, this.items = [], this.itemIds = [], this.user = null, this.disableLinks = !1, this.arcgisClose = v(), this.arcgisConfirm = v(), this.arcgisError = v();
|
|
@@ -427,7 +412,7 @@ class fe extends q {
|
|
|
427
412
|
this.properties = { isLoading: 16, submittingAction: 16, loadedItems: 16, hasConfirmedReview: 16, cannotDeleteItems: 16, recycleItems: 16, permanentlyDeleteItems: 16, deprecateItems: 16, excludeItems: 16, reviewingDirectlyUsedByItems: 16, reviewDecision: 16, active: 5, items: 0, itemIds: 0, portal: 0, user: 0, disableLinks: 5 };
|
|
428
413
|
}
|
|
429
414
|
static {
|
|
430
|
-
this.styles =
|
|
415
|
+
this.styles = pe;
|
|
431
416
|
}
|
|
432
417
|
willUpdate(t) {
|
|
433
418
|
const e = t.has("items") || t.has("itemIds") || t.has("portal") || t.has("user") || t.has("active");
|
|
@@ -443,9 +428,9 @@ class fe extends q {
|
|
|
443
428
|
...this.deprecateItems,
|
|
444
429
|
...this.excludeItems,
|
|
445
430
|
...i
|
|
446
|
-
], c = t === "delete" && l.some((a) =>
|
|
431
|
+
], c = t === "delete" && l.some((a) => p(a) !== "recycle" && e.some(({ id: o }) => o === a.item.id));
|
|
447
432
|
for (const a of l) {
|
|
448
|
-
if (!e.some(({ id:
|
|
433
|
+
if (!e.some(({ id: h }) => h === a.item.id))
|
|
449
434
|
continue;
|
|
450
435
|
const m = a.originalStatus ?? a.kind;
|
|
451
436
|
a.originalStatus = m, a.updatedStatus = s;
|
|
@@ -453,20 +438,20 @@ class fe extends q {
|
|
|
453
438
|
if (this.reviewDecision = {
|
|
454
439
|
action: t,
|
|
455
440
|
items: e
|
|
456
|
-
}, this.hasConfirmedReview = !0, this.reviewingDirectlyUsedByItems = !1, this.recycleItems = l.filter((a) =>
|
|
441
|
+
}, this.hasConfirmedReview = !0, this.reviewingDirectlyUsedByItems = !1, this.recycleItems = l.filter((a) => p(a) === "recycle"), this.deprecateItems = l.filter((a) => p(a) === "deprecate"), this.excludeItems = l.filter((a) => p(a) === "exclude"), this.permanentlyDeleteItems = r, t !== "delete" || c) {
|
|
457
442
|
this.isLoading = !0;
|
|
458
443
|
const a = [...this.cannotDeleteItems, ...this.recycleItems, ...this.permanentlyDeleteItems].map(({ item: o }) => o);
|
|
459
444
|
await this.determineDeleteStatus(++this.deleteStatusRequestId, a);
|
|
460
445
|
}
|
|
461
446
|
}
|
|
462
447
|
async updateAllContentStatus(t, e) {
|
|
463
|
-
return (await Promise.all(t.map(async (i) => await
|
|
448
|
+
return (await Promise.all(t.map(async (i) => await J(i, e)))).flatMap(({ result: i }) => i ? [i] : []);
|
|
464
449
|
}
|
|
465
450
|
async handleDelete() {
|
|
466
451
|
if (!this.active || this.submittingAction)
|
|
467
452
|
return;
|
|
468
453
|
this.submittingAction = "delete";
|
|
469
|
-
const t = { restUrl: this.portal.restUrl }, { result: e = [] } = this.recycleItems.length ? await
|
|
454
|
+
const t = { restUrl: this.portal.restUrl }, { result: e = [] } = this.recycleItems.length ? await R(this.recycleItems.map(({ item: r }) => r), t) : { result: [] }, { result: s = [] } = this.permanentlyDeleteItems.length ? await R(this.permanentlyDeleteItems.map(({ item: r }) => r), t, !0) : { result: [] }, i = this.deprecateItems.length ? await this.updateAllContentStatus(this.deprecateItems.map(({ item: r }) => r), "deprecated") : null;
|
|
470
455
|
this.arcgisConfirm.emit({
|
|
471
456
|
deletedItems: e,
|
|
472
457
|
permanentlyDeletedItems: s,
|
|
@@ -503,12 +488,12 @@ class fe extends q {
|
|
|
503
488
|
this.isLoading = !0, this.submittingAction = null, this.loadedItems = [], this.hasConfirmedReview = !1, this.cannotDeleteItems = [], this.recycleItems = [], this.permanentlyDeleteItems = [], this.deprecateItems = [], this.excludeItems = [], this.reviewingDirectlyUsedByItems = !1, this.reviewDecision = null, this.updatedCannotDeleteItemIds.clear(), ++this.deleteStatusRequestId;
|
|
504
489
|
}
|
|
505
490
|
async determineDeleteStatus(t, e = this.loadedItems) {
|
|
506
|
-
const s = new Set(this.recycleItems.map(({ item: r }) => r.id).filter((r) => !!r)), i = await
|
|
491
|
+
const s = new Set(this.recycleItems.map(({ item: r }) => r.id).filter((r) => !!r)), i = await me(e, this.portal);
|
|
507
492
|
if (t === this.deleteStatusRequestId) {
|
|
508
|
-
this.cannotDeleteItems = i.filter((r) =>
|
|
493
|
+
this.cannotDeleteItems = i.filter((r) => p(r) === "cannotDelete");
|
|
509
494
|
for (const r of this.cannotDeleteItems)
|
|
510
495
|
r.item.id && s.has(r.item.id) && this.updatedCannotDeleteItemIds.add(r.item.id);
|
|
511
|
-
this.recycleItems = i.filter((r) =>
|
|
496
|
+
this.recycleItems = i.filter((r) => p(r) === "recycle"), this.permanentlyDeleteItems = i.filter((r) => p(r) === "permanentlyDelete"), this.isLoading = !1;
|
|
512
497
|
}
|
|
513
498
|
}
|
|
514
499
|
get itemsWithImpactedItems() {
|
|
@@ -578,7 +563,7 @@ class fe extends q {
|
|
|
578
563
|
}
|
|
579
564
|
}
|
|
580
565
|
renderBucket({ icon: t, label: e, description: s, link: i, additionalContent: r, dangerIcon: l = !1, bucket: c }) {
|
|
581
|
-
return d`<calcite-block class=${
|
|
566
|
+
return d`<calcite-block class=${$({ "single-item-bucket": (this.items.length ? this.items : this.itemIds).length === 1 })} scale=l expanded><div class="bucket__content"><calcite-icon class=${$({ bucket__icon: !0, "bucket__icon--danger": l })} scale=l .icon=${t}></calcite-icon><div class="bucket__details"><div class="bucket__header"><span class="bucket__label">${e}</span><span>${this.renderBucketItems(c)}</span></div>${s && d`<span class="bucket__description">${s}</span>` || ""}${i && d`<div class="bucket__link"><calcite-link .href=${i.href} target=_blank icon-end=launch>${i.text ?? this.messages.moreInfo}</calcite-link></div>` || ""}${r}</div></div></calcite-block>`;
|
|
582
567
|
}
|
|
583
568
|
renderBucketItems(t = []) {
|
|
584
569
|
return this.renderItemLinks(t.map(({ item: e }) => e));
|
|
@@ -587,10 +572,10 @@ class fe extends q {
|
|
|
587
572
|
if (t.length === 0)
|
|
588
573
|
return null;
|
|
589
574
|
if (t.length === 1) {
|
|
590
|
-
const s = t[0], i = `${
|
|
575
|
+
const s = t[0], i = `${V({ portal: this.portal })}/item.html?id=${s.id}`;
|
|
591
576
|
return d`<calcite-link .href=${i} target=_blank><span class="item-link-content"><arcgis-portal-item-type .item=${s} .portal=${this.portal} .user=${this.user} hide-text></arcgis-portal-item-type><span>${s.title}</span></span></calcite-link>`;
|
|
592
577
|
}
|
|
593
|
-
return
|
|
578
|
+
return A({
|
|
594
579
|
id: e,
|
|
595
580
|
linkText: t.length,
|
|
596
581
|
label: this.messages.bucketItems.replace("{count}", String(t.length)),
|
|
@@ -602,9 +587,9 @@ class fe extends q {
|
|
|
602
587
|
}
|
|
603
588
|
renderRelatedItemsPopover(t) {
|
|
604
589
|
const e = t.flatMap(({ usedByItems: i }) => i);
|
|
605
|
-
return t.length > 1 || e.length === 0 ? null :
|
|
590
|
+
return t.length > 1 || e.length === 0 ? null : A({
|
|
606
591
|
id: "delete-items-directly-used-by",
|
|
607
|
-
linkText:
|
|
592
|
+
linkText: x(this.messages._t9nLocale, this.messages.usedByOtherItems, e.length),
|
|
608
593
|
label: this.messages.usedByPopover,
|
|
609
594
|
placement: "auto",
|
|
610
595
|
items: e,
|
|
@@ -613,14 +598,14 @@ class fe extends q {
|
|
|
613
598
|
});
|
|
614
599
|
}
|
|
615
600
|
renderDirectlyUsedByItems() {
|
|
616
|
-
const t =
|
|
601
|
+
const t = te({
|
|
617
602
|
recycleItems: this.recycleItems,
|
|
618
603
|
cannotDeleteItems: this.cannotDeleteItems,
|
|
619
604
|
permanentlyDeleteItems: this.permanentlyDeleteItems
|
|
620
|
-
}), e = this.cannotDeleteItems.find(({ reason: o }) => o === "hasDependentItems"), s = e ? e.resultData ?? [] : t.flatMap(({ usedByItems: o }) => o), i = e ? s.length : t[0]?.usedByItemsCount, r =
|
|
621
|
-
selectedItems:
|
|
622
|
-
}), l = r.find(({ reason: o }) => o === "replacement"), c = l?.offendingItems ?? [], a =
|
|
623
|
-
return d`${this.loadedItems.length === 1 && ["delete", "permanentlyDelete"].includes(this.deleteMode) && r.length > 0 ? d`<div class="discouraged-items-warning"><calcite-notice kind=warning open><div slot=message>${l ? a.split("{itemLink}").map((o, m) => d`${m > 0 && this.renderItemLinks(c, "delete-items-replacement-for") || ""}${o}`) : this.messages.deleteDiscouraged}</div>${!l && d`<calcite-link .href=${`${
|
|
605
|
+
}), e = this.cannotDeleteItems.find(({ reason: o }) => o === "hasDependentItems"), s = e ? e.resultData ?? [] : t.flatMap(({ usedByItems: o }) => o), i = e ? s.length : t[0]?.usedByItemsCount, r = ie({
|
|
606
|
+
selectedItems: se(t)
|
|
607
|
+
}), l = r.find(({ reason: o }) => o === "replacement"), c = l?.offendingItems ?? [], a = x(this.messages._t9nLocale, this.messages.replacementItem.isReplacementFor, c.length, { itemLink: "{itemLink}" });
|
|
608
|
+
return d`${this.loadedItems.length === 1 && ["delete", "permanentlyDelete"].includes(this.deleteMode) && r.length > 0 ? d`<div class="discouraged-items-warning"><calcite-notice kind=warning open><div slot=message>${l ? a.split("{itemLink}").map((o, m) => d`${m > 0 && this.renderItemLinks(c, "delete-items-replacement-for") || ""}${o}`) : this.messages.deleteDiscouraged}</div>${!l && d`<calcite-link .href=${`${C(this.portal)}${this.helpMap[120001208] || ""}`} target=_blank icon-end=launch slot=link>${this.messages.learnMoreAboutDeletingSourceItems}</calcite-link>` || ""}</calcite-notice></div>` : null}${!this.cannotDeleteItems.some(({ reason: o }) => o === "deleteProtected") && d`<arcgis-portal-review-related-items .sourceItem=${this.loadedItems[0] ?? null} .relatedItems=${s} .relatedItemsCount=${i} .showDependentItems=${!!e} .portal=${this.portal} .user=${this.user}></arcgis-portal-review-related-items>` || ""}`;
|
|
624
609
|
}
|
|
625
610
|
renderDirectlyUsedByItemsNotice() {
|
|
626
611
|
const t = new Set(this.itemsWithImpactedItems.flatMap(({ usedByItems: s }) => s.map(({ id: i }) => i))), e = this.messages.reviewRelatedItems.multiple.replace("{totalCount}", String(t.size));
|
|
@@ -629,7 +614,7 @@ class fe extends q {
|
|
|
629
614
|
}}>${this.messages.reviewItems}</calcite-button></calcite-notice></div>`;
|
|
630
615
|
}
|
|
631
616
|
renderDeleteSummary() {
|
|
632
|
-
return d`<div class="panel__content">${this.isLoading ? d`<calcite-scrim loading></calcite-scrim>` : d`<calcite-panel>${this.renderRecycleBucket()}${this.renderDeprecateBucket()}${this.renderExcludeBucket()}${this.renderCannotDeleteBucket()}${this.renderPermanentlyDeleteBucket()}${this.loadedItems.length === 1 && this.renderDirectlyUsedByItems() || ""}${this.itemsHaveImpactedItems && d`<div>${this.loadedItems.length > 1 ? this.renderDirectlyUsedByItemsNotice() : null}</div>` || ""}</calcite-panel>`}</div>${!this.isLoading && d`${this.loadedItems.length === 1 &&
|
|
617
|
+
return d`<div class="panel__content">${this.isLoading ? d`<calcite-scrim loading></calcite-scrim>` : d`<calcite-panel>${this.renderRecycleBucket()}${this.renderDeprecateBucket()}${this.renderExcludeBucket()}${this.renderCannotDeleteBucket()}${this.renderPermanentlyDeleteBucket()}${this.loadedItems.length === 1 && this.renderDirectlyUsedByItems() || ""}${this.itemsHaveImpactedItems && d`<div>${this.loadedItems.length > 1 ? this.renderDirectlyUsedByItemsNotice() : null}</div>` || ""}</calcite-panel>`}</div>${!this.isLoading && d`${this.loadedItems.length === 1 && K(this.loadedItems[0]).contentStatus !== "deprecated" && d`<calcite-button class="delete-items-button" slot=footer-start kind=danger appearance=outline-fill .disabled=${!!this.submittingAction} .loading=${this.submittingAction === "deprecate"} @click=${this.handleDeprecate}><span>${this.messages.deprecateInstead}</span></calcite-button>` || ""}<calcite-button class="delete-items-button" slot=footer-end appearance=outline-fill @click=${this.handleDialogClose}><span>${this.messages.cancel}</span></calcite-button>${this.deleteMode !== "none" && d`<calcite-button class="delete-items-button" .disabled=${!!this.submittingAction} .loading=${this.submittingAction === "delete"} kind=danger slot=footer-end @click=${async () => await this.handleDelete()}><span>${this.getConfirmButtonText()}</span></calcite-button>` || ""}` || ""}`;
|
|
633
618
|
}
|
|
634
619
|
renderReviewItems() {
|
|
635
620
|
return d`<div class="panel__content"><calcite-panel><arcgis-portal-delete-items-review .items=${this.itemsWithImpactedItems} .portal=${this.portal} .user=${this.user}></arcgis-portal-delete-items-review></calcite-panel></div><calcite-button slot=footer-start appearance=solid kind=neutral @click=${async () => await this.handleReviewDecision("exclude")}>${this.messages.exclude}</calcite-button><calcite-button slot=footer-end appearance=outline-fill kind=danger @click=${async () => await this.handleReviewDecision("deprecate")}>${this.messages.deprecateInstead}</calcite-button><calcite-button slot=footer-end appearance=solid kind=danger @click=${async () => await this.handleReviewDecision("delete")}>${this.messages.proceedToDelete}</calcite-button>`;
|
|
@@ -644,7 +629,7 @@ class fe extends q {
|
|
|
644
629
|
description: t ? this.messages.summary.permanentDelete.default.single : this.messages.summary.canBeRecovered.single.replace("{days}", "14"),
|
|
645
630
|
updated: this.recycleItems.some(({ kind: e, updatedStatus: s }) => s === "recycle" && s !== e),
|
|
646
631
|
bucket: this.recycleItems,
|
|
647
|
-
additionalContent: t ? void 0 : d`<calcite-checkbox class="bucket__checkbox" .label=${this.messages.permanentlyDeleteInstead} .labelText=${this.messages.permanentlyDeleteInstead} @calciteCheckboxChange=${async (e) => await this.handlePermanentlyDeleteOverrideChange(e.target.checked)} ${
|
|
632
|
+
additionalContent: t ? void 0 : d`<calcite-checkbox class="bucket__checkbox" .label=${this.messages.permanentlyDeleteInstead} .labelText=${this.messages.permanentlyDeleteInstead} @calciteCheckboxChange=${async (e) => await this.handlePermanentlyDeleteOverrideChange(e.target.checked)} ${S(this.permanentlyDeleteCheckboxRef)}></calcite-checkbox>`
|
|
648
633
|
});
|
|
649
634
|
}
|
|
650
635
|
renderDeprecateBucket() {
|
|
@@ -686,12 +671,12 @@ class fe extends q {
|
|
|
686
671
|
label: t ? this.messages.summary.permanentDelete.delete : this.messages.summary.permanentlyDelete,
|
|
687
672
|
description: t ? this.messages.summary.permanentDelete.default.single : e ? null : this.messages.summary.permanentDelete.notSupported.single,
|
|
688
673
|
link: e ? void 0 : {
|
|
689
|
-
href: `${
|
|
674
|
+
href: `${C(this.portal)}${this.helpMap[120004692] || ""}`,
|
|
690
675
|
text: this.fieldDeleteMessages.learnMore ?? this.messages.moreInfo
|
|
691
676
|
},
|
|
692
677
|
bucket: this.permanentlyDeleteItems,
|
|
693
678
|
dangerIcon: !t,
|
|
694
|
-
additionalContent: !t && e ? d`<calcite-checkbox class="bucket__checkbox" checked .label=${this.messages.permanentlyDeleteInstead} .labelText=${this.messages.permanentlyDeleteInstead} @calciteCheckboxChange=${async (s) => await this.handlePermanentlyDeleteOverrideChange(s.target.checked)} ${
|
|
679
|
+
additionalContent: !t && e ? d`<calcite-checkbox class="bucket__checkbox" checked .label=${this.messages.permanentlyDeleteInstead} .labelText=${this.messages.permanentlyDeleteInstead} @calciteCheckboxChange=${async (s) => await this.handlePermanentlyDeleteOverrideChange(s.target.checked)} ${S(this.permanentlyDeleteCheckboxRef)}></calcite-checkbox>` : void 0
|
|
695
680
|
});
|
|
696
681
|
}
|
|
697
682
|
render() {
|
|
@@ -699,7 +684,7 @@ class fe extends q {
|
|
|
699
684
|
return !t || !e ? null : d`<calcite-dialog modal .open=${this.active} width=s .heading=${this.getHeaderText()} heading-level=2 outside-close-disabled escape-disabled kind=danger @calciteDialogClose=${this.handleDialogClose}>${!this.isLoading || this.reviewingDirectlyUsedByItems ? d`<div slot=heading><span>${this.getHeaderText()}</span><br><span class="header-description">${this.getHeaderDescription()}</span></div>` : void 0}${this.reviewingDirectlyUsedByItems ? this.renderReviewItems() : this.renderDeleteSummary()}</calcite-dialog>`;
|
|
700
685
|
}
|
|
701
686
|
}
|
|
702
|
-
|
|
687
|
+
E("arcgis-portal-delete-items", Ie);
|
|
703
688
|
export {
|
|
704
|
-
|
|
689
|
+
Ie as ArcgisPortalDeleteItems
|
|
705
690
|
};
|
|
@@ -10,7 +10,7 @@ import C from "@arcgis/core/portal/PortalQueryResult.js";
|
|
|
10
10
|
import { c as x, q as T, a as I } from "../../chunks/string.js";
|
|
11
11
|
import { s as E } from "../../chunks/groups2.js";
|
|
12
12
|
import { s as G } from "../../chunks/dom.js";
|
|
13
|
-
import {
|
|
13
|
+
import { a as M } from "../../chunks/portal.js";
|
|
14
14
|
import { r as z } from "../../chunks/request.js";
|
|
15
15
|
import "../arcgis-portal-group-card/customElement.js";
|
|
16
16
|
import "../arcgis-portal-item-card/customElement.js";
|
|
@@ -12,7 +12,7 @@ import _ from "@arcgis/core/request.js";
|
|
|
12
12
|
import * as B from "@arcgis/core/applications/PortalApp/layerUtils.js";
|
|
13
13
|
import { i as T, c as j, g as U, a as z, b as q, d as R } from "../../chunks/fieldAddDelete.js";
|
|
14
14
|
import { F as J } from "../../chunks/FieldIcons.js";
|
|
15
|
-
import {
|
|
15
|
+
import { a as N } from "../../chunks/portal.js";
|
|
16
16
|
import { u as W } from "../../chunks/useT9n.js";
|
|
17
17
|
import { log as y, composeMissingPropertyMessage as D, composeEmptyPropertyMessage as V } from "@arcgis/toolkit/log";
|
|
18
18
|
const G = [
|