@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
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
+
import { a as o } from "./portal.js";
|
|
3
|
+
import { r as c } from "./request.js";
|
|
4
|
+
const n = /* @__PURE__ */ new Map();
|
|
5
|
+
async function u(e, t) {
|
|
6
|
+
const r = o(e), s = JSON.stringify([r, t]), a = n.get(s);
|
|
7
|
+
if (a)
|
|
8
|
+
return a;
|
|
9
|
+
try {
|
|
10
|
+
const p = (await c({
|
|
11
|
+
url: `${r}portals/helpmap`,
|
|
12
|
+
portal: e,
|
|
13
|
+
params: { culture: t }
|
|
14
|
+
}))?.helpMap?.m ?? {};
|
|
15
|
+
return n.set(s, p), p;
|
|
16
|
+
} catch {
|
|
17
|
+
return {};
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
export {
|
|
21
|
+
u as g
|
|
22
|
+
};
|
package/dist/chunks/item.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
2
|
import a from "@arcgis/core/request.js";
|
|
3
|
-
import {
|
|
3
|
+
import { a as i } from "./portal.js";
|
|
4
4
|
import { g as p } from "./items.js";
|
|
5
|
-
function
|
|
5
|
+
function v(e, r) {
|
|
6
6
|
return `${i(r)}content/items/${e}`;
|
|
7
7
|
}
|
|
8
|
-
function
|
|
8
|
+
function h(e) {
|
|
9
9
|
return e.typeKeywords?.includes("Hosted Service") && e.type !== "Insights Workbook" && e.type !== "Insights Data Engineering Workbook" && e.type !== "Insights Page";
|
|
10
10
|
}
|
|
11
11
|
function S(e) {
|
|
@@ -27,7 +27,7 @@ function K(e, r) {
|
|
|
27
27
|
return e.typeKeywords?.includes("Managed Image Collection") || m(r) && !e.typeKeywords?.includes("Tiled Imagery");
|
|
28
28
|
}
|
|
29
29
|
function j(e, r) {
|
|
30
|
-
const
|
|
30
|
+
const s = "serviceProperties" in e ? e.serviceProperties : void 0, t = s && typeof s == "object" && "tags" in s ? s.tags : void 0, o = p(e).serviceProperties?.tags ?? t;
|
|
31
31
|
return !!(Array.isArray(o) && o.includes("hasMultidimensions") || r && "hasMultidimensions" in r && r.hasMultidimensions);
|
|
32
32
|
}
|
|
33
33
|
function k(e, r) {
|
|
@@ -37,11 +37,11 @@ function c(e, r) {
|
|
|
37
37
|
return e.owner === r.username;
|
|
38
38
|
}
|
|
39
39
|
function y(e, r) {
|
|
40
|
-
const
|
|
41
|
-
return e.portal?.isPortal && !c(e, r) &&
|
|
42
|
-
!o.includes(
|
|
40
|
+
const s = e.owner, t = e.itemControl === "admin", o = ["esri_livingatlas", "esri_demographics", "esri_boundaries"];
|
|
41
|
+
return e.portal?.isPortal && !c(e, r) && t && s?.includes("esri_") && // portal incorrectly returns "itemControl="admin" for esri owned items
|
|
42
|
+
!o.includes(s) ? !1 : t;
|
|
43
43
|
}
|
|
44
|
-
const G = (e, r) => !!r.orgId && e.every((
|
|
44
|
+
const G = (e, r) => !!r.orgId && e.every((s) => s.isOrgItem);
|
|
45
45
|
function V(e) {
|
|
46
46
|
return e.typeKeywords?.includes("Spatiotemporal");
|
|
47
47
|
}
|
|
@@ -61,10 +61,10 @@ async function A(e) {
|
|
|
61
61
|
const r = e?.portalItem;
|
|
62
62
|
if (!r)
|
|
63
63
|
return await Promise.resolve(null);
|
|
64
|
-
const
|
|
65
|
-
if (
|
|
66
|
-
const
|
|
67
|
-
return await a(
|
|
64
|
+
const s = r.portal;
|
|
65
|
+
if (s?.user) {
|
|
66
|
+
const t = `${i(s)}community/users/${s.user.username}`;
|
|
67
|
+
return await a(t, {
|
|
68
68
|
query: {
|
|
69
69
|
f: "json",
|
|
70
70
|
token: r.portal.credential?.token
|
|
@@ -80,12 +80,12 @@ async function A(e) {
|
|
|
80
80
|
}
|
|
81
81
|
return await Promise.resolve(null);
|
|
82
82
|
}
|
|
83
|
-
async function
|
|
83
|
+
async function B(e) {
|
|
84
84
|
const r = e?.portalItem;
|
|
85
85
|
if (!r)
|
|
86
86
|
return await Promise.resolve(null);
|
|
87
|
-
const
|
|
88
|
-
return await a(
|
|
87
|
+
const s = r.portal, t = `${i(s)}content/items/${r.id}/groups`;
|
|
88
|
+
return await a(t, {
|
|
89
89
|
query: {
|
|
90
90
|
f: "json",
|
|
91
91
|
token: r.portal.credential?.token
|
|
@@ -99,32 +99,35 @@ async function C(e) {
|
|
|
99
99
|
async () => await Promise.reject(new Error("Failed to fetch item groups"))
|
|
100
100
|
);
|
|
101
101
|
}
|
|
102
|
-
async function
|
|
102
|
+
async function C(e, r, { relationshipType: s, direction: t }, o = !1) {
|
|
103
103
|
const n = `${i(r)}content/items/${e}/relatedItems`;
|
|
104
104
|
return await a(n, {
|
|
105
|
-
query: { f: "json", relationshipType:
|
|
105
|
+
query: { f: "json", relationshipType: s, direction: t, includeRecycleBin: o },
|
|
106
106
|
responseType: "json"
|
|
107
107
|
});
|
|
108
108
|
}
|
|
109
|
-
function
|
|
109
|
+
function D(e, r) {
|
|
110
110
|
return e?.some(
|
|
111
|
-
(
|
|
112
|
-
(
|
|
111
|
+
(s) => r?.some(
|
|
112
|
+
(t) => s.id === t.id && s.capabilities.includes("updateitemcontrol")
|
|
113
113
|
)
|
|
114
114
|
);
|
|
115
115
|
}
|
|
116
|
+
function q(e) {
|
|
117
|
+
return e.typeKeywords?.includes("DeveloperBasemap") ?? !1;
|
|
118
|
+
}
|
|
116
119
|
export {
|
|
117
120
|
M as a,
|
|
118
121
|
b,
|
|
119
122
|
$ as c,
|
|
120
123
|
V as d,
|
|
121
124
|
A as e,
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
125
|
+
B as f,
|
|
126
|
+
C as g,
|
|
127
|
+
D as h,
|
|
128
|
+
h as i,
|
|
126
129
|
P as j,
|
|
127
|
-
|
|
130
|
+
v as k,
|
|
128
131
|
U as l,
|
|
129
132
|
G as m,
|
|
130
133
|
j as n,
|
|
@@ -132,5 +135,6 @@ export {
|
|
|
132
135
|
S as p,
|
|
133
136
|
I as q,
|
|
134
137
|
T as r,
|
|
138
|
+
q as s,
|
|
135
139
|
k as u
|
|
136
140
|
};
|
package/dist/chunks/item2.js
CHANGED
|
@@ -1,51 +1,51 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import { c as
|
|
3
|
-
import { c as
|
|
4
|
-
import {
|
|
5
|
-
import { r as
|
|
6
|
-
function
|
|
2
|
+
import { c as y } from "./requests.js";
|
|
3
|
+
import { c as d } from "./string.js";
|
|
4
|
+
import { a as i } from "./portal.js";
|
|
5
|
+
import { r as c } from "./request.js";
|
|
6
|
+
function k(r) {
|
|
7
7
|
return r.replace(/[.*+?^${}()|[\]\\]/gu, "\\$&");
|
|
8
8
|
}
|
|
9
|
-
const
|
|
10
|
-
async function
|
|
11
|
-
const t = `${
|
|
9
|
+
const g = (r, e) => [...Array(Math.ceil(r.length / e))].map((t, n) => r.slice(e * n, e + e * n));
|
|
10
|
+
async function v(r, e) {
|
|
11
|
+
const t = `${i(r)}content/items/${e}`;
|
|
12
12
|
try {
|
|
13
|
-
return { result: await
|
|
13
|
+
return { result: await c({ url: t, portal: r }) };
|
|
14
14
|
} catch {
|
|
15
15
|
return { error: { code: "unhandledError" } };
|
|
16
16
|
}
|
|
17
17
|
}
|
|
18
|
-
async function
|
|
19
|
-
const s = Object.fromEntries(t.flatMap(({ id:
|
|
18
|
+
async function q(r, e, t, n) {
|
|
19
|
+
const s = Object.fromEntries(t.flatMap(({ id: a }) => a ? [[a, []]] : []));
|
|
20
20
|
if (!t.length)
|
|
21
21
|
return { result: s };
|
|
22
22
|
if (!e.groups)
|
|
23
23
|
return { error: { code: "unhandledError" } };
|
|
24
24
|
try {
|
|
25
25
|
return (await Promise.all(
|
|
26
|
-
|
|
27
|
-
async (
|
|
28
|
-
url: `${
|
|
26
|
+
g(e.groups, 100).map(
|
|
27
|
+
async (u) => await c({
|
|
28
|
+
url: `${i(r)}content/itemsgroups`,
|
|
29
29
|
portal: r,
|
|
30
30
|
params: {
|
|
31
31
|
items: t.map(({ id: o }) => o).join(","),
|
|
32
|
-
groups:
|
|
32
|
+
groups: u.map(({ id: o }) => o).join(",")
|
|
33
33
|
},
|
|
34
34
|
...n ? { options: n } : {}
|
|
35
35
|
})
|
|
36
36
|
)
|
|
37
|
-
)).reduce((
|
|
38
|
-
for (const { groupId:
|
|
39
|
-
for (const { itemId:
|
|
40
|
-
|
|
41
|
-
return
|
|
37
|
+
)).reduce((u, o) => {
|
|
38
|
+
for (const { groupId: p, items: f } of Object.values(o))
|
|
39
|
+
for (const { itemId: m } of f)
|
|
40
|
+
u[m]?.push(p);
|
|
41
|
+
return u;
|
|
42
42
|
}, s), { result: s };
|
|
43
43
|
} catch {
|
|
44
44
|
return { error: { code: "unhandledError" } };
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
|
-
const
|
|
48
|
-
const n =
|
|
47
|
+
const j = async (r, e, t) => {
|
|
48
|
+
const n = d(e);
|
|
49
49
|
if (!n)
|
|
50
50
|
return {};
|
|
51
51
|
try {
|
|
@@ -54,17 +54,53 @@ const q = async (r, e, t) => {
|
|
|
54
54
|
return console.error(s), { error: { code: "unhandledError" } };
|
|
55
55
|
}
|
|
56
56
|
};
|
|
57
|
-
async function
|
|
57
|
+
async function G(r, e) {
|
|
58
58
|
if (!r || !e)
|
|
59
59
|
return { result: null };
|
|
60
60
|
const t = `${r.restUrl}/content/items/${e}/data`;
|
|
61
|
-
return await
|
|
61
|
+
return await y(t);
|
|
62
62
|
}
|
|
63
|
+
async function U(r, e) {
|
|
64
|
+
return !h(r) || !r.url ? !1 : await l(r.url, e);
|
|
65
|
+
}
|
|
66
|
+
function h(r) {
|
|
67
|
+
return r.typeKeywords?.includes("Hosted Service") && r.type !== "Insights Workbook" && r.type !== "Insights Data Engineering Workbook" && r.type !== "Insights Page";
|
|
68
|
+
}
|
|
69
|
+
function w(r) {
|
|
70
|
+
return `${r.split("?")[0].replace(/\/+$/u, "").replace(/\/\d+$/u, "")}/layers`;
|
|
71
|
+
}
|
|
72
|
+
async function l(r, e, t = !0) {
|
|
73
|
+
const n = w(r);
|
|
74
|
+
try {
|
|
75
|
+
return ((await c({
|
|
76
|
+
portal: e,
|
|
77
|
+
url: n,
|
|
78
|
+
options: { addTokenManually: t }
|
|
79
|
+
})).layers ?? []).some((a) => a.capabilities?.includes("Editing"));
|
|
80
|
+
} catch (s) {
|
|
81
|
+
const a = s instanceof Error ? s.message : String(s);
|
|
82
|
+
if (t && a.toLowerCase().includes("token required"))
|
|
83
|
+
return await l(r, e, !1);
|
|
84
|
+
throw s;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
async function I(r, e) {
|
|
88
|
+
return await c({
|
|
89
|
+
url: `${i(r)}content/items/${e}/groups`,
|
|
90
|
+
portal: r
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
const M = async (r, e) => {
|
|
94
|
+
const t = await I(r, e);
|
|
95
|
+
return [...t.admin, ...t.member, ...t.other];
|
|
96
|
+
};
|
|
63
97
|
export {
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
98
|
+
v as a,
|
|
99
|
+
M as b,
|
|
100
|
+
g as c,
|
|
101
|
+
k as e,
|
|
102
|
+
q as f,
|
|
103
|
+
G as g,
|
|
104
|
+
U as i,
|
|
105
|
+
j as s
|
|
70
106
|
};
|
package/dist/chunks/items.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
const s = (e) => e.sourceJSON ?? {},
|
|
2
|
+
const o = (e) => !("sourceJSON" in e), s = (e) => o(e) ? e : e.sourceJSON ?? {}, n = (e) => e.typeKeywords ?? s(e).typeKeywords ?? [], i = (e) => s(e).contentStatus, c = (e) => {
|
|
3
3
|
const t = s(e).groupDesignations;
|
|
4
|
-
return t ? t.split(",").map((
|
|
5
|
-
},
|
|
4
|
+
return t ? t.split(",").map((a) => a.trim()).filter(Boolean) : [];
|
|
5
|
+
}, r = (e) => e.type === "Data Store" && n(e).includes("bigDataFileShare"), p = (e) => e.type === "Big Data File Share" || r(e), g = (e) => e.type === "CityEngine Web Scene", y = (e) => e.type === "Parquet Feature Layer", u = (e) => n(e).find((t) => t.includes("replacementItemId_"))?.slice(18);
|
|
6
6
|
export {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
c,
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
7
|
+
u as a,
|
|
8
|
+
n as b,
|
|
9
|
+
p as c,
|
|
10
|
+
i as d,
|
|
11
|
+
c as e,
|
|
12
|
+
y as f,
|
|
13
13
|
s as g,
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
r as h,
|
|
15
|
+
g as i
|
|
16
16
|
};
|
package/dist/chunks/layers.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { isAbortError as v } from "@arcgis/core/core/promiseUtils.js";
|
|
3
3
|
import { log as w } from "@arcgis/toolkit/log";
|
|
4
4
|
import { b as k } from "./items.js";
|
|
5
|
-
import { g, b as I } from "./portal.js";
|
|
5
|
+
import { a as g, b as I } from "./portal.js";
|
|
6
6
|
import { r as R } from "./request.js";
|
|
7
7
|
function b(e) {
|
|
8
8
|
const r = typeof e == "object" && e !== null && "details" in e ? e.details : void 0, s = typeof r == "object" && r !== null && "raw" in r ? r.raw : void 0, t = {};
|
|
@@ -12,7 +12,7 @@ import p from "@arcgis/core/layers/support/Field.js";
|
|
|
12
12
|
import { a as I, b as L, f as E, g as x } from "./layers.js";
|
|
13
13
|
import { r as A } from "./request.js";
|
|
14
14
|
import { b as f } from "./items.js";
|
|
15
|
-
import {
|
|
15
|
+
import { a as F } from "./portal.js";
|
|
16
16
|
import "../components/arcgis-portal-item-preview-field/customElement.js";
|
|
17
17
|
function R(i) {
|
|
18
18
|
return ["Feature Service", "Layer Template", "Feature Collection"].includes(i.type ?? "") && !f(i).some(
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
+
import { c as n } from "./runtime.js";
|
|
3
|
+
import { css as o, html as i } from "lit";
|
|
4
|
+
import { LitElement as c, createEvent as l, safeClassMap as d } from "@arcgis/lumina";
|
|
5
|
+
import { createRef as m, ref as p } from "lit/directives/ref.js";
|
|
6
|
+
import "../components/arcgis-portal-item-card/customElement.js";
|
|
7
|
+
import { u } from "./useT9n.js";
|
|
8
|
+
import { g } from "./url.js";
|
|
9
|
+
function h(a) {
|
|
10
|
+
switch (a) {
|
|
11
|
+
case "needEditableLayers":
|
|
12
|
+
return {
|
|
13
|
+
i18nKey: "sharingPDCEnabled",
|
|
14
|
+
kind: "info"
|
|
15
|
+
};
|
|
16
|
+
case "needPubliclyEditableLayers":
|
|
17
|
+
case "needDataCollectionLayers":
|
|
18
|
+
return {
|
|
19
|
+
i18nKey: "pdc",
|
|
20
|
+
kind: "danger"
|
|
21
|
+
};
|
|
22
|
+
case "premiumLayers":
|
|
23
|
+
return {
|
|
24
|
+
i18nKey: "premium",
|
|
25
|
+
kind: "info"
|
|
26
|
+
};
|
|
27
|
+
case "notEditableLayers":
|
|
28
|
+
return {
|
|
29
|
+
i18nKey: "noPermission",
|
|
30
|
+
kind: "danger"
|
|
31
|
+
};
|
|
32
|
+
case "needAuthentication":
|
|
33
|
+
return {
|
|
34
|
+
i18nKey: "needsAuthentication",
|
|
35
|
+
kind: "danger"
|
|
36
|
+
};
|
|
37
|
+
case "needsShareLevelUpdateLayers":
|
|
38
|
+
return null;
|
|
39
|
+
default:
|
|
40
|
+
return null;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
const f = o`.status-banner{display:flex;align-items:center;padding:.25rem 1rem;border-block-end:1px solid var(--calcite-color-border-2);color:var(--calcite-color-text-2);font-size:.75rem}.status-banner>calcite-icon{margin-inline-end:.5rem;color:var(--calcite-color-status-danger)}.status-banner>span{margin-block-start:.125rem}.status-banner--info>calcite-icon{color:var(--calcite-color-status-info)}.open-item{margin-inline-start:.25rem;padding-inline-start:.25rem;border-inline-start:1px solid var(--calcite-color-border-1)}`;
|
|
44
|
+
class b extends c {
|
|
45
|
+
constructor() {
|
|
46
|
+
super(...arguments), this.messages = u({ blocking: !0 }), this.card = m(), this.previewed = !1, this.arcgisItemBrowserCardPreview = l();
|
|
47
|
+
}
|
|
48
|
+
static {
|
|
49
|
+
this.properties = { item: 0, state: 1, portal: 0, previewed: 5 };
|
|
50
|
+
}
|
|
51
|
+
static {
|
|
52
|
+
this.styles = f;
|
|
53
|
+
}
|
|
54
|
+
async restoreFocus() {
|
|
55
|
+
await this.card.value?.restoreFocus();
|
|
56
|
+
}
|
|
57
|
+
openItemDetails(e) {
|
|
58
|
+
e.preventDefault(), e.stopPropagation();
|
|
59
|
+
const t = this.item?.id;
|
|
60
|
+
if (!t)
|
|
61
|
+
return;
|
|
62
|
+
const r = `${g({ portal: this.portal })}/item.html?id=${t}`;
|
|
63
|
+
window.open(r, "_blank", "noopener");
|
|
64
|
+
}
|
|
65
|
+
render() {
|
|
66
|
+
if (!this.item || !this.portal || !this.messages._lang)
|
|
67
|
+
return;
|
|
68
|
+
const e = h(this.state), t = e?.kind === "info", r = e ? this.messages.status?.[e.i18nKey] : void 0;
|
|
69
|
+
return i`<arcgis-portal-item-card .item=${this.item} .portal=${this.portal} preview=top .previewed=${this.previewed} @arcgisItemBrowserCardPreview=${(s) => {
|
|
70
|
+
s.stopPropagation(), this.arcgisItemBrowserCardPreview.emit(s.detail);
|
|
71
|
+
}} show-owner show-date-updated show-item-type show-summary show-badges ${p(this.card)}>${e && r && i`<div slot=content-top class=${d({
|
|
72
|
+
"status-banner": !0,
|
|
73
|
+
"status-banner--info": t
|
|
74
|
+
})}><calcite-icon .icon=${t ? "information" : "exclamationMarkTriangle"} scale=s></calcite-icon><span>${r.notice}</span></div>` || ""}<div slot=actions-end class="open-item"><calcite-button scale=s appearance=transparent kind=neutral @click=${(s) => this.openItemDetails(s)}>${this.messages.goToItem}</calcite-button></div></arcgis-portal-item-card>`;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
n("arcgis-portal-item-status-card", b);
|
|
78
|
+
export {
|
|
79
|
+
b as A,
|
|
80
|
+
h as g
|
|
81
|
+
};
|
package/dist/chunks/portal.js
CHANGED
|
@@ -86,13 +86,13 @@ function k(e) {
|
|
|
86
86
|
return e?.isPortal ? t.supportsHostedNotebooks : !(i(["Trial Developer", "Trial", "Trial Press"], t.subscriptionInfo?.type) || t.subscriptionInfo?.options?.includes("Developer"));
|
|
87
87
|
}
|
|
88
88
|
export {
|
|
89
|
-
|
|
89
|
+
y as a,
|
|
90
90
|
S as b,
|
|
91
91
|
s as c,
|
|
92
92
|
H as d,
|
|
93
93
|
u as e,
|
|
94
94
|
m as f,
|
|
95
|
-
|
|
95
|
+
P as g,
|
|
96
96
|
w as h,
|
|
97
97
|
T as i,
|
|
98
98
|
k as n
|
package/dist/chunks/portal2.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
2
|
import i from "@arcgis/core/request.js";
|
|
3
3
|
import { f as n, r as u } from "./request.js";
|
|
4
|
-
import {
|
|
4
|
+
import { a } from "./portal.js";
|
|
5
5
|
import { c as r } from "./requests.js";
|
|
6
6
|
async function m(e) {
|
|
7
7
|
const s = `${e.restUrl}/portals/${e.id}/approvedApps`;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
+
function u(e) {
|
|
3
|
+
return !e || !(e instanceof HTMLElement) ? null : e;
|
|
4
|
+
}
|
|
5
|
+
async function c(e) {
|
|
6
|
+
if (e) {
|
|
7
|
+
if (e.restoreFocus) {
|
|
8
|
+
await e.restoreFocus();
|
|
9
|
+
return;
|
|
10
|
+
}
|
|
11
|
+
if (e.setFocus) {
|
|
12
|
+
await e.setFocus();
|
|
13
|
+
return;
|
|
14
|
+
}
|
|
15
|
+
e.focus?.();
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
function t(e) {
|
|
19
|
+
let o = null;
|
|
20
|
+
const r = async (n = {}) => {
|
|
21
|
+
e.onClose(), n.restoreFocus && await c(o);
|
|
22
|
+
};
|
|
23
|
+
return { handlePreview: (n, s) => {
|
|
24
|
+
if (!n?.id) {
|
|
25
|
+
r();
|
|
26
|
+
return;
|
|
27
|
+
}
|
|
28
|
+
o = u(s), e.onOpen({ preview: n });
|
|
29
|
+
}, closePreview: r };
|
|
30
|
+
}
|
|
31
|
+
export {
|
|
32
|
+
t as c
|
|
33
|
+
};
|
package/dist/chunks/request.js
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
2
|
import q from "@arcgis/core/identity/IdentityManager.js";
|
|
3
3
|
import w from "@arcgis/core/request.js";
|
|
4
|
-
import { i as R, b, g } from "./portal.js";
|
|
5
|
-
const
|
|
4
|
+
import { i as R, b, a as g } from "./portal.js";
|
|
5
|
+
const a = {}, o = {}, s = {};
|
|
6
6
|
async function A({ requester: t, key: e, id: n, cacheOption: r }) {
|
|
7
7
|
const i = s[e]?.[n]?.expireAt, c = !!i && (/* @__PURE__ */ new Date()).getTime() > i;
|
|
8
|
-
if (
|
|
9
|
-
return
|
|
10
|
-
|
|
11
|
-
const u = await
|
|
12
|
-
if (
|
|
8
|
+
if (a[e]?.[n] && !c)
|
|
9
|
+
return a[e][n];
|
|
10
|
+
o[e] || (o[e] = {}), (!o[e][n] || c) && (o[e][n] = t());
|
|
11
|
+
const u = await o[e][n];
|
|
12
|
+
if (a[e] || (a[e] = {}), s[e] || (s[e] = {}), a[e][n] = u, r) {
|
|
13
13
|
const { expireAfter: d, getExpireAfterFromResult: f } = r, h = f || d ? (/* @__PURE__ */ new Date()).getTime() + (f?.(u) ?? d ?? 0) : null;
|
|
14
14
|
s[e][n] = { ...s[e][n], expireAt: h };
|
|
15
15
|
}
|
|
16
16
|
return u;
|
|
17
17
|
}
|
|
18
18
|
function W(t, e) {
|
|
19
|
-
return
|
|
19
|
+
return a[t]?.[e];
|
|
20
20
|
}
|
|
21
21
|
function X(t, e) {
|
|
22
|
-
e ? (delete
|
|
22
|
+
e ? (delete a[t]?.[e], delete o[t]?.[e], delete s[t]?.[e]) : (Reflect.deleteProperty(a, t), Reflect.deleteProperty(o, t), Reflect.deleteProperty(s, t));
|
|
23
23
|
}
|
|
24
24
|
async function j({
|
|
25
25
|
url: t,
|
package/dist/chunks/services.js
CHANGED
package/dist/chunks/user.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
2
|
import { f as y, r as a } from "./request.js";
|
|
3
|
-
import {
|
|
3
|
+
import { a as c, b as p } from "./portal.js";
|
|
4
4
|
import { f as u, b as l, c as d } from "./requests.js";
|
|
5
5
|
async function U(e, r, s) {
|
|
6
6
|
const n = `${s ? "https://www.arcgis.com/sharing/rest/" : c(r)}community/users/${e}`, o = n?.includes("www.arcgis.com") && r.isPortal, f = n?.includes(".arcgis.com") && !r.isPortal && !r.user, m = o || f ? { disableIdentityLookup: !0, addTokenManually: !1 } : {};
|
|
@@ -50,7 +50,7 @@ async function b(e, r) {
|
|
|
50
50
|
return await d(s);
|
|
51
51
|
}
|
|
52
52
|
async function P(e, r, s) {
|
|
53
|
-
const t = `${i(r, s)}/setProperties`, n =
|
|
53
|
+
const t = `${i(r, s)}/setProperties`, n = p(r), o = new FormData();
|
|
54
54
|
return o.append("properties", JSON.stringify(e)), o.append("token", n), o.append("f", "json"), await d(t, {
|
|
55
55
|
method: "post",
|
|
56
56
|
body: o
|
package/dist/chunks/utils2.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
2
|
import l from "@arcgis/core/request.js";
|
|
3
3
|
import { debounce as v } from "@arcgis/toolkit/function";
|
|
4
|
-
import {
|
|
4
|
+
import { a as h } from "./portal.js";
|
|
5
5
|
let n = [], c = [];
|
|
6
6
|
const m = v(async (t, r) => {
|
|
7
7
|
const e = [...n], s = [...c];
|
|
@@ -31,10 +31,10 @@ async function q(t, r, e) {
|
|
|
31
31
|
});
|
|
32
32
|
return n.includes(t) || n.push(t), m(r, e), await s;
|
|
33
33
|
}
|
|
34
|
-
async function
|
|
34
|
+
async function y(t) {
|
|
35
35
|
return await f(t, !0);
|
|
36
36
|
}
|
|
37
|
-
async function
|
|
37
|
+
async function g(t) {
|
|
38
38
|
return await f(t, !1);
|
|
39
39
|
}
|
|
40
40
|
async function G({
|
|
@@ -43,7 +43,7 @@ async function G({
|
|
|
43
43
|
portal: e,
|
|
44
44
|
user: s
|
|
45
45
|
}) {
|
|
46
|
-
const o = !t, a = o ? await
|
|
46
|
+
const o = !t, a = o ? await y({ item: r, portal: e, user: s }) : await g({ item: r, portal: e, user: s });
|
|
47
47
|
return {
|
|
48
48
|
nextFavorite: o,
|
|
49
49
|
updated: a
|