@esri/solutions-components 5.1.0-next.124 → 5.1.0-next.127
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/{EWUZF57U.js → 232XXYVJ.js} +1 -1
- package/dist/cdn/{Y6ZWXE53.js → 23LRX7AS.js} +1 -1
- package/dist/cdn/{Z25OUDBP.js → 23SGJQLW.js} +1 -1
- package/dist/cdn/2KSXH2TC.js +2 -0
- package/dist/cdn/3JZVI5AM.js +7 -0
- package/dist/cdn/{C7SMCM7E.js → 3UJAJDSF.js} +1 -1
- package/dist/cdn/{A4RZESK7.js → 3UKDJZ2D.js} +2 -2
- package/dist/cdn/{JR5GBFT2.js → 4V4CR63B.js} +1 -1
- package/dist/cdn/{ZV6TCDGB.js → 4Z6UJJJR.js} +1 -1
- package/dist/cdn/4ZUE6R22.js +2 -0
- package/dist/cdn/5AAG5ERI.js +2 -0
- package/dist/cdn/{6GSCRFFW.js → 5GHZQ66V.js} +1 -1
- package/dist/cdn/5U2GHXOV.js +2 -0
- package/dist/cdn/5UIJ4Z3C.js +2 -0
- package/dist/cdn/{6RTR35JT.js → 5XDPNTYE.js} +1 -1
- package/dist/cdn/6ID6N5BF.js +2 -0
- package/dist/cdn/6IMLSV3Z.js +2 -0
- package/dist/cdn/{K5MMGZY2.js → 6Q52JBZW.js} +1 -1
- package/dist/cdn/{4MAZNAHZ.js → 6SSQ6MIC.js} +1 -1
- package/dist/cdn/{KZBWKZOC.js → 74XF7DBP.js} +1 -1
- package/dist/cdn/75WQ7UGJ.js +2 -0
- package/dist/cdn/7CGCLEYB.js +2 -0
- package/dist/cdn/{SH72A5PB.js → 7V57GR4X.js} +1 -1
- package/dist/cdn/{D66IBZZA.js → 7ZKKR7QO.js} +1 -1
- package/dist/cdn/AL7O7ZB2.js +3 -0
- package/dist/cdn/{MYPJ63EE.js → ANVT6ANQ.js} +1 -1
- package/dist/cdn/{GWSB6X4X.js → AOJP5RQ6.js} +1 -1
- package/dist/cdn/{XQQ52NKX.js → AYSQIO6L.js} +1 -1
- package/dist/cdn/{WGEHABGS.js → B33EUN4X.js} +1 -1
- package/dist/cdn/BLCW2CZO.js +2 -0
- package/dist/cdn/{3WKKIXVT.js → BOSEAFVW.js} +1 -1
- package/dist/cdn/{CGFMGQ3A.js → BROZWKD5.js} +1 -1
- package/dist/cdn/CB7QDBRG.js +2 -0
- package/dist/cdn/CEWRVOKP.js +2 -0
- package/dist/cdn/{MOK7GNOH.js → CWXZSWUA.js} +1 -1
- package/dist/cdn/D4FRUAT3.js +2 -0
- package/dist/cdn/DQ7NBBUU.js +2 -0
- package/dist/cdn/{D5Y4JMF7.js → E4ZB3BPD.js} +1 -1
- package/dist/cdn/E5X2RW5Y.js +109 -0
- package/dist/cdn/{KGECA3WE.js → EDZIFJZR.js} +1 -1
- package/dist/cdn/{NYWKJJKK.js → EIF4KZBD.js} +1 -1
- package/dist/cdn/{B6Y3RA4F.js → ENG5BCAV.js} +1 -1
- package/dist/cdn/EOSKMSMP.js +2 -0
- package/dist/cdn/{RH47YGDG.js → EVZXWT6K.js} +1 -1
- package/dist/cdn/EXC566PM.js +2 -0
- package/dist/cdn/FOTFZKKU.js +2 -0
- package/dist/cdn/FTY7YPLA.js +88 -0
- package/dist/cdn/FW2HWQC7.js +2 -0
- package/dist/cdn/{MGAKD4WY.js → GDDMG3Q4.js} +1 -1
- package/dist/cdn/{BRBOVJ3Q.js → GPL6FNKN.js} +1 -1
- package/dist/cdn/{DUDZ4BGI.js → GSD6O5J7.js} +1 -1
- package/dist/cdn/{SSF6ST7U.js → H4YPSJ5G.js} +1 -1
- package/dist/cdn/{TTOCCH2K.js → H7J2FXMS.js} +1 -1
- package/dist/cdn/{C5QZMZX7.js → HEI6GMZN.js} +1 -1
- package/dist/cdn/{AZ4JB3M3.js → HJW2JW4G.js} +1 -1
- package/dist/cdn/HO4GBQJG.js +2 -0
- package/dist/cdn/HT2HC33W.js +2 -0
- package/dist/cdn/{IHKF4AMV.js → HYLQNC4V.js} +3 -3
- package/dist/cdn/HZOBBQYW.js +431 -0
- package/dist/cdn/ICSHJV2N.js +2 -0
- package/dist/cdn/IFI66PVI.js +2 -0
- package/dist/cdn/{YFXSWGXE.js → IHG7KTNC.js} +1 -1
- package/dist/cdn/IP3VJ34C.js +4 -0
- package/dist/cdn/IV7RVOFY.js +56 -0
- package/dist/cdn/{3UIIZPJJ.js → IYQGIBWM.js} +1 -1
- package/dist/cdn/{JFJRHOAG.js → KCTWFRCW.js} +1 -1
- package/dist/cdn/{F64NVBUS.js → KEOBSFBN.js} +1 -1
- package/dist/cdn/{N2KSPEVT.js → LP2JYX4X.js} +1 -1
- package/dist/cdn/{C4IFGE7P.js → MDNGEZ2V.js} +1 -1
- package/dist/cdn/{XVMCFCUH.js → MEDCFXMB.js} +1 -1
- package/dist/cdn/{X6JL6SAH.js → MOH6GREK.js} +1 -1
- package/dist/cdn/MURYADCX.js +2 -0
- package/dist/cdn/{JBNWEBAG.js → N22MFQSQ.js} +1 -1
- package/dist/cdn/N5D5ABJ6.js +2 -0
- package/dist/cdn/{5HZMUGQD.js → N7BXCDA3.js} +1 -1
- package/dist/cdn/{SGJY2CP3.js → ODB4CELR.js} +1 -1
- package/dist/cdn/PZW6JMSM.js +2 -0
- package/dist/cdn/{5MVIKBSS.js → QF2IXVAT.js} +1 -1
- package/dist/cdn/{CQRK2NYK.js → QJICQ4W3.js} +1 -1
- package/dist/cdn/QNRKGTZT.js +121 -0
- package/dist/cdn/{GIANH6D4.js → R3C2X4CM.js} +1 -1
- package/dist/cdn/{DKB6JTUF.js → RKZXRHZK.js} +1 -1
- package/dist/cdn/RPEQD2MH.js +2 -0
- package/dist/cdn/{SMNWKCWR.js → RXM4BHPK.js} +1 -1
- package/dist/cdn/S5F6KJQM.js +18 -0
- package/dist/cdn/SFFLZSAY.js +2 -0
- package/dist/cdn/SSH4MSHE.js +2 -0
- package/dist/cdn/{BQVD2BBH.js → SSZBIVTK.js} +1 -1
- package/dist/cdn/{EZ4DX2MW.js → TFTW5B3R.js} +1 -1
- package/dist/cdn/{I74AIIHN.js → TIF36KTA.js} +1 -1
- package/dist/cdn/TV3ZHJ7B.js +2 -0
- package/dist/cdn/{U6JZYJ4D.js → UM3P3Q52.js} +1 -1
- package/dist/cdn/{WH2NFOMH.js → UUHDVB24.js} +5 -5
- package/dist/cdn/UY5JVVRO.js +2 -0
- package/dist/cdn/VEDAG7UO.js +2 -0
- package/dist/cdn/VFBFI3KQ.js +2 -0
- package/dist/cdn/{BXOH6SN4.js → VTI5LEQY.js} +1 -1
- package/dist/cdn/W5FWW67G.js +2 -0
- package/dist/cdn/{RB3YU5TX.js → WA3BLQHA.js} +1 -1
- package/dist/cdn/{JEEUSHAF.js → X73XP424.js} +1 -1
- package/dist/cdn/XC3IZAIH.js +2 -0
- package/dist/cdn/{3FOUGCWY.js → XDZPQACK.js} +1 -1
- package/dist/cdn/XGODSNWZ.js +2 -0
- package/dist/cdn/{UNKHKP5I.js → YJCH2NIS.js} +1 -1
- package/dist/cdn/{A4NILC27.js → YKM2YRZP.js} +1 -1
- package/dist/cdn/{FBRYBN7J.js → YMLQXXAS.js} +1 -1
- package/dist/cdn/{JUUVYK2H.js → YQHYMLC7.js} +1 -1
- package/dist/cdn/{Y3CYPNEY.js → YWXDNRE2.js} +1 -1
- package/dist/cdn/{E4GB5Z4R.js → ZNWZWFMH.js} +1 -1
- package/dist/cdn/{DGUS2OKW.js → ZS3UOY5Q.js} +1 -1
- package/dist/cdn/{5VDDAINK.js → ZX3UHK6P.js} +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.ar.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.bg.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.bs.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.ca.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.cs.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.da.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.de.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.el.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.en.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.es.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.et.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.fi.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.fr.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.he.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.hr.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.hu.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.id.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.it.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.ja.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.ko.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.lt.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.lv.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.nl.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.no.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.pl.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.pt-BR.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.pt-PT.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.ro.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.ru.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.sk.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.sl.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.sr.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.sv.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.th.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.tr.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.uk.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.vi.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.zh-CN.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.zh-HK.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.zh-TW.json +1 -1
- package/dist/cdn/assets/solution-details-panel/t9n/messages.en.json +1 -1
- package/dist/cdn/assets/solution-details-panel/t9n/messages.json +1 -1
- package/dist/cdn/assets/solutions-deploy-app/t9n/messages.en.json +1 -1
- package/dist/cdn/assets/solutions-deploy-app/t9n/messages.json +1 -1
- package/dist/cdn/index.js +1 -1
- package/dist/chunks/Auth.js +163 -71
- package/dist/chunks/CardsFetcher.js +3 -2
- package/dist/chunks/getRelatedInfos.js +1 -1
- package/dist/chunks/helpers.js +24 -20
- package/dist/chunks/interfaces.js +152 -141
- package/dist/chunks/solution-deploy-dialog.js +24 -18
- package/dist/chunks/solutions-deploy-app-nav.js +4 -5
- package/dist/components/arcgis-solutions-assistant/customElement.js +681 -57987
- package/dist/components/consent-manager/customElement.js +23 -3598
- package/dist/components/solution-builder-assistant/customElement.d.ts +8 -2
- package/dist/components/solution-builder-assistant/customElement.js +30 -23
- package/dist/components/solution-builder-assistant/index.js +1 -1
- package/dist/components/solution-configure-titles/customElement.js +63 -61
- package/dist/components/solution-delete-dialog/customElement.js +17 -14
- package/dist/components/solution-deployed-card/customElement.js +2 -3
- package/dist/components/solution-deployed-card-panel/customElement.d.ts +7 -0
- package/dist/components/solution-deployed-card-panel/customElement.js +34 -32
- package/dist/components/solution-deployed-card-panel/index.js +1 -0
- package/dist/components/solution-details-panel/customElement.d.ts +7 -4
- package/dist/components/solution-details-panel/customElement.js +115 -180
- package/dist/components/solution-snapshot-gallery/customElement.js +2 -1
- package/dist/components/solution-social-share/customElement.js +2 -2
- package/dist/components/solution-user-avatar/customElement.js +1 -1
- package/dist/components/solutions-deploy-app/customElement.d.ts +4 -0
- package/dist/components/solutions-deploy-app/customElement.js +14 -11
- package/dist/components/solutions-deploy-app-nav/customElement.js +2 -3
- package/dist/components/solutions-deployed-list/customElement.js +7 -6
- 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/loader.js +3 -3
- package/dist/solutions-components_commit.txt +5 -8
- package/dist/types/lumina.d.ts +3 -3
- package/dist/types/preact.d.ts +3 -3
- package/dist/types/react.d.ts +3 -3
- package/dist/types/stencil.d.ts +3 -3
- package/dist/utils/Auth.d.ts +11 -0
- package/package.json +11 -6
- package/dist/cdn/2V4C3U3A.js +0 -2
- package/dist/cdn/3RUVSQ7E.js +0 -2
- package/dist/cdn/4FZ44STD.js +0 -2
- package/dist/cdn/52KL2BJB.js +0 -2
- package/dist/cdn/5DS6TJ6G.js +0 -2
- package/dist/cdn/5ZIXJCIR.js +0 -18
- package/dist/cdn/62PVXXRD.js +0 -2
- package/dist/cdn/7JUP4GFU.js +0 -2
- package/dist/cdn/7UERL2R2.js +0 -2
- package/dist/cdn/7WKV6M26.js +0 -2
- package/dist/cdn/BKZZ625R.js +0 -2
- package/dist/cdn/BWYFMFIB.js +0 -423
- package/dist/cdn/CQKON2YR.js +0 -2
- package/dist/cdn/F2J3FYTD.js +0 -2
- package/dist/cdn/GVEIFIEZ.js +0 -2
- package/dist/cdn/H5WTVMPJ.js +0 -2
- package/dist/cdn/HNZAE56I.js +0 -2
- package/dist/cdn/HQJ25PBT.js +0 -2
- package/dist/cdn/IF52R2FM.js +0 -2
- package/dist/cdn/IOKTYFKK.js +0 -7
- package/dist/cdn/IRRMUFW7.js +0 -2
- package/dist/cdn/JFKCARWJ.js +0 -2
- package/dist/cdn/K7QUGRWR.js +0 -4
- package/dist/cdn/MN3KMBU6.js +0 -2
- package/dist/cdn/MNZJP3PW.js +0 -2
- package/dist/cdn/MPZE3IV4.js +0 -2
- package/dist/cdn/QKKYYRVF.js +0 -2
- package/dist/cdn/QTV6GN3W.js +0 -2
- package/dist/cdn/QVJAIVT4.js +0 -2
- package/dist/cdn/RPEBBYE4.js +0 -2
- package/dist/cdn/RXFNNWEJ.js +0 -2
- package/dist/cdn/SBLN3F4Y.js +0 -2
- package/dist/cdn/STWIOVJR.js +0 -2
- package/dist/cdn/TUQVCY7T.js +0 -2
- package/dist/cdn/UM4ITZ4R.js +0 -2
- package/dist/cdn/VFEROJ77.js +0 -2
- package/dist/cdn/VL4OP3CF.js +0 -2
- package/dist/cdn/YNOD3Q5G.js +0 -2
- package/dist/cdn/ZPT5ISDK.js +0 -2
- package/dist/chunks/common.js +0 -26
- package/dist/chunks/get.js +0 -387
package/dist/chunks/Auth.js
CHANGED
|
@@ -1,13 +1,82 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import * as
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
2
|
+
import * as l from "@esri/solution-common";
|
|
3
|
+
import { request as p, getWorkflowBaseURL as d, getWorkflowManagerAuthorized as g } from "@esri/solution-common";
|
|
4
|
+
import c from "@arcgis/core/identity/IdentityManager.js";
|
|
5
|
+
import _ from "@arcgis/core/identity/OAuthInfo.js";
|
|
6
|
+
import U from "@arcgis/core/portal/Portal.js";
|
|
7
|
+
import { b as f, i as S, s as m } from "./helpers.js";
|
|
8
|
+
import { E as h, g as u } from "./interfaces.js";
|
|
9
|
+
async function I(i, e, t) {
|
|
10
|
+
let r = t;
|
|
11
|
+
return i && (i?.IsEnterprisePortal && await w(
|
|
12
|
+
"",
|
|
13
|
+
// the portal url
|
|
14
|
+
e
|
|
15
|
+
) && r.push(h.NOTEBOOK), await f(e) ? t.push(h.VELOCITY) : i?.PortalUserPrivileges && [
|
|
16
|
+
u.VELOCITYFEEDS,
|
|
17
|
+
u.VELOCITYBIGDATA,
|
|
18
|
+
u.VELOCITYREALTIME
|
|
19
|
+
].forEach((n) => {
|
|
20
|
+
const a = t.indexOf(n) || -1;
|
|
21
|
+
a !== -1 && t.splice(a, 1);
|
|
22
|
+
}), r = r.concat(
|
|
23
|
+
b(
|
|
24
|
+
A(i),
|
|
25
|
+
O(i)
|
|
26
|
+
)
|
|
27
|
+
), r = r.concat(v(i)), r = r.concat(await P(i))), Promise.resolve(r);
|
|
28
|
+
}
|
|
29
|
+
function b(i, e) {
|
|
30
|
+
let t = [];
|
|
31
|
+
return i && e ? t = [
|
|
32
|
+
h.TRACKINGADMINANDTRACKING,
|
|
33
|
+
h.TRACKINGADMIN,
|
|
34
|
+
h.TRACKING
|
|
35
|
+
] : i && !e ? t = [h.TRACKINGADMIN] : !i && e && (t = [h.TRACKING]), t;
|
|
36
|
+
}
|
|
37
|
+
function v(i) {
|
|
38
|
+
return R(
|
|
39
|
+
i
|
|
40
|
+
) ? [h.HUBPREMIUM] : [];
|
|
41
|
+
}
|
|
42
|
+
async function P(i) {
|
|
43
|
+
const e = i?.RestUserSession;
|
|
44
|
+
if (!e?.username)
|
|
45
|
+
return [];
|
|
46
|
+
const t = await d(e);
|
|
47
|
+
return await g(t, e) ? [h.WORKFLOW] : [];
|
|
48
|
+
}
|
|
49
|
+
async function w(i, e) {
|
|
50
|
+
const t = i + "/sharing/rest", r = {
|
|
51
|
+
authentication: e,
|
|
52
|
+
portal: t,
|
|
53
|
+
params: {
|
|
54
|
+
f: "json"
|
|
55
|
+
}
|
|
56
|
+
};
|
|
57
|
+
return p(`${t}/portals/self/servers`, r).then((s) => s?.servers?.find((o) => o.serverFunction.indexOf("NotebookServer") > -1), (s) => (console.error(s), !1));
|
|
58
|
+
}
|
|
59
|
+
function A(i) {
|
|
60
|
+
const e = i?.PortalUserSubset?.privileges, t = [
|
|
61
|
+
"portal:admin:create",
|
|
62
|
+
"portal:admin:delete",
|
|
63
|
+
"portal:admin:update",
|
|
64
|
+
"portal:admin:reassign"
|
|
65
|
+
];
|
|
66
|
+
return e ? t.every(
|
|
67
|
+
(r) => e.some((s) => s.startsWith(r))
|
|
68
|
+
) : !1;
|
|
69
|
+
}
|
|
70
|
+
function O(i) {
|
|
71
|
+
return i?.PortalSubset?.locationTrackingEnabled || !1;
|
|
72
|
+
}
|
|
73
|
+
function R(i) {
|
|
74
|
+
return i?.PortalSubset?.hubPremiumEnabled || !1;
|
|
75
|
+
}
|
|
76
|
+
class T {
|
|
77
|
+
constructor(e, t, r, s) {
|
|
78
|
+
this._credential = void 0, this._isEnterprise = !1, this._locale = "en", this._portalSubset = void 0, this._portalUserSubset = void 0, this._portalUserEnrichedPrivileges = void 0, this._arcGISOnlineReachable = !0, this._searchArcGISOnlineEnabled = !0, this._signInParam = void 0, this._clientId = e ?? "", this._locale = r ?? "en", this._portalUrl = t ?? "https://www.arcgis.com", this._portalRestUrl = this._portalUrl + "/sharing/rest", this._portalUrl = location.origin.endsWith(".arcgis.com") ? window.location.origin : this._portalUrl, this._signInParam = s;
|
|
79
|
+
const o = new _({
|
|
11
80
|
appId: this._clientId,
|
|
12
81
|
locale: this._locale,
|
|
13
82
|
popup: !1,
|
|
@@ -16,11 +85,11 @@ class f {
|
|
|
16
85
|
preserveUrlHash: !0
|
|
17
86
|
});
|
|
18
87
|
try {
|
|
19
|
-
|
|
20
|
-
} catch (
|
|
21
|
-
console.log(
|
|
88
|
+
c.registerOAuthInfos([o]);
|
|
89
|
+
} catch (n) {
|
|
90
|
+
console.log(n);
|
|
22
91
|
}
|
|
23
|
-
this._portal = new
|
|
92
|
+
this._portal = new U({ url: this._portalUrl });
|
|
24
93
|
}
|
|
25
94
|
get Credential() {
|
|
26
95
|
return this._credential;
|
|
@@ -50,8 +119,21 @@ class f {
|
|
|
50
119
|
return this._portalUserSubset;
|
|
51
120
|
}
|
|
52
121
|
get PortalUserPrivileges() {
|
|
53
|
-
let
|
|
54
|
-
return this._portalUserSubset?.privileges && (
|
|
122
|
+
let e = [];
|
|
123
|
+
return this._portalUserSubset?.privileges && (e = this._portalUserSubset.privileges), e;
|
|
124
|
+
}
|
|
125
|
+
/**
|
|
126
|
+
* Enriched user privileges, pre-computed once at sign-in.
|
|
127
|
+
*
|
|
128
|
+
* Includes the base portal privileges plus custom solution-specific
|
|
129
|
+
* privileges (Velocity, Notebook Server, Hub Premium, Location Tracking,
|
|
130
|
+
* Workflow Manager) that would otherwise require additional network
|
|
131
|
+
* requests each time a solution details page is opened. Falls back to
|
|
132
|
+
* the base portal privileges if enrichment hasn't completed yet (e.g.,
|
|
133
|
+
* during sign-in or for anonymous sessions).
|
|
134
|
+
*/
|
|
135
|
+
get PortalUserEnrichedPrivileges() {
|
|
136
|
+
return this._portalUserEnrichedPrivileges ?? this.PortalUserPrivileges;
|
|
55
137
|
}
|
|
56
138
|
get SignInParam() {
|
|
57
139
|
return this._signInParam;
|
|
@@ -63,8 +145,8 @@ class f {
|
|
|
63
145
|
return this.PortalUserPrivileges.includes("portal:admin:updateItems");
|
|
64
146
|
}
|
|
65
147
|
get CanUseAI() {
|
|
66
|
-
const
|
|
67
|
-
return
|
|
148
|
+
const e = this._portalSubset?.orgSettings, t = this.PortalUserPrivileges.includes("portal:user:useAIAssistants");
|
|
149
|
+
return e?.aiAssistantsEnabled ? e.aiAssistantsEnabled && !e.blockBetaApps && t : !1;
|
|
68
150
|
}
|
|
69
151
|
get CanViewOrg() {
|
|
70
152
|
return this.PortalUserPrivileges.includes("portal:admin:viewItems");
|
|
@@ -73,25 +155,25 @@ class f {
|
|
|
73
155
|
return this._searchArcGISOnlineEnabled && this._arcGISOnlineReachable;
|
|
74
156
|
}
|
|
75
157
|
/** Checks if the ArcGIS Online group is reachable for Enterprise portals. */
|
|
76
|
-
async checkArcGISOnlineReachability(
|
|
77
|
-
if (this._isEnterprise && this._searchArcGISOnlineEnabled &&
|
|
78
|
-
const r = `${
|
|
158
|
+
async checkArcGISOnlineReachability(e) {
|
|
159
|
+
if (this._isEnterprise && this._searchArcGISOnlineEnabled && e) {
|
|
160
|
+
const r = `${S(this._portalUrl)}/sharing/rest`, s = new l.UserSession({});
|
|
79
161
|
try {
|
|
80
|
-
await
|
|
81
|
-
q: `group:${
|
|
162
|
+
await l.searchItems({
|
|
163
|
+
q: `group:${e} type:Solution`,
|
|
82
164
|
num: 1,
|
|
83
165
|
start: 1,
|
|
84
166
|
authentication: s,
|
|
85
167
|
portal: r
|
|
86
168
|
}), this._arcGISOnlineReachable = !0;
|
|
87
|
-
} catch (
|
|
88
|
-
this._arcGISOnlineReachable = !1, console.warn("ArcGIS Online solutions group not reachable:",
|
|
169
|
+
} catch (o) {
|
|
170
|
+
this._arcGISOnlineReachable = !1, console.warn("ArcGIS Online solutions group not reachable:", o);
|
|
89
171
|
}
|
|
90
172
|
}
|
|
91
173
|
}
|
|
92
174
|
get RestUserSession() {
|
|
93
|
-
const
|
|
94
|
-
return
|
|
175
|
+
const e = c.findServerInfo(this._portalRestUrl), t = this._credential ? l.UserSession.fromCredential(this._credential, e) : this._isEnterprise ? new l.UserSession({}) : new l.UserSession({ portal: this._portalRestUrl });
|
|
176
|
+
return t.portal = this.PortalSubset?.restUrl ? this.PortalSubset?.restUrl : t.portal, t.clientId = this._credential?._oAuthCred?.appId, t._refreshToken = this._credential?._oAuthCred?.refreshToken, t;
|
|
95
177
|
}
|
|
96
178
|
/**
|
|
97
179
|
* Initializes the Auth object. This method must be called before any other Auth methods.
|
|
@@ -99,16 +181,16 @@ class f {
|
|
|
99
181
|
*
|
|
100
182
|
* @returns Promise that resolves with the initialized Auth object
|
|
101
183
|
*/
|
|
102
|
-
async initialize(
|
|
184
|
+
async initialize(e = !1, t) {
|
|
103
185
|
try {
|
|
104
|
-
await this._init(
|
|
186
|
+
await this._init(e, t);
|
|
105
187
|
} catch {
|
|
106
188
|
this.destroy();
|
|
107
189
|
}
|
|
108
190
|
return this;
|
|
109
191
|
}
|
|
110
192
|
destroy() {
|
|
111
|
-
this._credential = void 0, this._portalSubset = void 0, this._portalUserSubset = void 0,
|
|
193
|
+
this._credential = void 0, this._portalSubset = void 0, this._portalUserSubset = void 0, c.destroyCredentials();
|
|
112
194
|
}
|
|
113
195
|
/**
|
|
114
196
|
* Signs into app and refreshes the window.location or switches to the supplied URL.
|
|
@@ -116,19 +198,19 @@ class f {
|
|
|
116
198
|
* @param signInParamValue If supplied, the parameter `signInParam` with the supplied value
|
|
117
199
|
* will be added to the redirect uri's search params
|
|
118
200
|
*/
|
|
119
|
-
async signIn(
|
|
120
|
-
|
|
121
|
-
const r =
|
|
122
|
-
if (
|
|
123
|
-
const s = r.split("?"),
|
|
124
|
-
let
|
|
125
|
-
const
|
|
126
|
-
|
|
201
|
+
async signIn(e = "") {
|
|
202
|
+
c.setOAuthRedirectionHandler((t) => {
|
|
203
|
+
const r = t.authorizeParams.redirect_uri;
|
|
204
|
+
if (e.length > 0) {
|
|
205
|
+
const s = r.split("?"), o = s[0];
|
|
206
|
+
let n = "";
|
|
207
|
+
const a = new URLSearchParams(s[1] || "");
|
|
208
|
+
a.append("signInParam", e), n = "?" + a.toString(), t.authorizeParams.redirect_uri = o + n;
|
|
127
209
|
}
|
|
128
|
-
window.location.href =
|
|
129
|
-
}), await
|
|
130
|
-
(
|
|
131
|
-
|
|
210
|
+
window.location.href = t.authorizeUrl + "?" + this._objectToQuery(t.authorizeParams);
|
|
211
|
+
}), await c.getCredential((this._portalSubset?.portalUrl ?? this._portalUrl) + "/sharing").then(
|
|
212
|
+
(t) => {
|
|
213
|
+
t && window.location.reload();
|
|
132
214
|
}
|
|
133
215
|
);
|
|
134
216
|
}
|
|
@@ -142,19 +224,19 @@ class f {
|
|
|
142
224
|
* on the resources page they should stay on that page
|
|
143
225
|
*/
|
|
144
226
|
signOut() {
|
|
145
|
-
const
|
|
146
|
-
let r =
|
|
147
|
-
r =
|
|
148
|
-
const
|
|
149
|
-
this.destroy(), window.location.replace(
|
|
227
|
+
const e = window.location.href, t = /[\/]\b([0-9A-Fa-f]){32}\b/g;
|
|
228
|
+
let r = e.match(t) ? e.replace(t, "") : e;
|
|
229
|
+
r = m(r, "sortField", "suggested");
|
|
230
|
+
const o = `${this._portal?.restUrl ?? this._portalUrl + "/sharing/rest"}/oauth2/signout?client_id=${this._clientId}&redirect_uri=${encodeURIComponent(r)}`;
|
|
231
|
+
this.destroy(), window.location.replace(o);
|
|
150
232
|
}
|
|
151
233
|
/**
|
|
152
234
|
* Refreshes the user session token
|
|
153
235
|
*/
|
|
154
236
|
refreshSession() {
|
|
155
|
-
const
|
|
156
|
-
if (!(!
|
|
157
|
-
return
|
|
237
|
+
const e = this.RestUserSession;
|
|
238
|
+
if (!(!e || !this.IsSignedIn))
|
|
239
|
+
return e.exchangeRefreshToken();
|
|
158
240
|
}
|
|
159
241
|
// ---------------------------------------------------------------------------------------------------------------- //
|
|
160
242
|
/**
|
|
@@ -164,29 +246,29 @@ class f {
|
|
|
164
246
|
* @param portalCustomBaseUrl The custom base URL for the portal.
|
|
165
247
|
* @returns
|
|
166
248
|
*/
|
|
167
|
-
_getOrgUrl(
|
|
168
|
-
return
|
|
249
|
+
_getOrgUrl(e, t, r) {
|
|
250
|
+
return t && r ? window.location.protocol + "//" + t.toLowerCase() + "." + r : e;
|
|
169
251
|
}
|
|
170
252
|
/**
|
|
171
253
|
* Initializes the Auth object. This method must be called before any other Auth methods.
|
|
172
254
|
* If the user is not authorized to use the app, the page will be redirected to an error page.
|
|
173
255
|
* @returns Promise that resolves with the initialized Auth object
|
|
174
256
|
*/
|
|
175
|
-
async _init(
|
|
257
|
+
async _init(e = !1, t) {
|
|
176
258
|
try {
|
|
177
|
-
this._credential = await
|
|
259
|
+
this._credential = await c.checkSignInStatus(this._portalUrl + "/sharing");
|
|
178
260
|
} catch (s) {
|
|
179
261
|
console.log(s);
|
|
180
262
|
}
|
|
181
263
|
try {
|
|
182
|
-
const s = await
|
|
264
|
+
const s = await c.checkAppAccess(this._portalUrl + "/sharing", this._clientId);
|
|
183
265
|
(typeof s.valid < "u" && !s.valid || s.viewOnlyUserTypeApp) && window.location.replace(`error.html?error=blocked&locale=${this._locale}`), this._credential = s.credential;
|
|
184
266
|
} catch (s) {
|
|
185
267
|
s.name;
|
|
186
268
|
}
|
|
187
|
-
this._searchArcGISOnlineEnabled = await this._checkSearchArcGISOnlineEnabled(
|
|
188
|
-
const r = this._credential ? await
|
|
189
|
-
|
|
269
|
+
this._searchArcGISOnlineEnabled = await this._checkSearchArcGISOnlineEnabled(e, this._portal.restUrl), this._portal.authMode = e ? "immediate" : "auto", await this._portal.load();
|
|
270
|
+
const r = this._credential ? await l.getOrganizationSettings(this.RestUserSession) : {};
|
|
271
|
+
if (this._isEnterprise = this._portal.isPortal, await this.checkArcGISOnlineReachability(t), this._portalSubset = {
|
|
190
272
|
name: this._portal.name ?? "",
|
|
191
273
|
id: this._portal.id ?? "",
|
|
192
274
|
restUrl: this._portal.restUrl ?? "",
|
|
@@ -208,15 +290,25 @@ class f {
|
|
|
208
290
|
privileges: this._portal.user.privileges,
|
|
209
291
|
role: this._portal.user?.role ?? "",
|
|
210
292
|
roleId: this._portal.user?.roleId ?? void 0
|
|
211
|
-
}, this._isEnterprise && this._portalSubset && (this._portalSubset.workflowURL = await
|
|
293
|
+
}, this._isEnterprise && this._portalSubset && (this._portalSubset.workflowURL = await l.getWorkflowEnterpriseServerRootURL(
|
|
212
294
|
this._portal.restUrl,
|
|
213
|
-
this.RestUserSession || new
|
|
214
|
-
)), this._portal?.user?.roleId && this._portalUserSubset && (this._portalUserSubset.roleId = this._portal.user.roleId), this
|
|
295
|
+
this.RestUserSession || new l.UserSession({})
|
|
296
|
+
)), this._portal?.user?.roleId && this._portalUserSubset && (this._portalUserSubset.roleId = this._portal.user.roleId), this._credential && this._portalUserSubset)
|
|
297
|
+
try {
|
|
298
|
+
this._portalUserEnrichedPrivileges = await I(
|
|
299
|
+
this,
|
|
300
|
+
this.RestUserSession,
|
|
301
|
+
[...this._portalUserSubset.privileges]
|
|
302
|
+
);
|
|
303
|
+
} catch (s) {
|
|
304
|
+
console.warn("Failed to enrich user privileges during sign-in:", s), this._portalUserEnrichedPrivileges = [...this._portalUserSubset.privileges];
|
|
305
|
+
}
|
|
306
|
+
return this;
|
|
215
307
|
}
|
|
216
|
-
async _checkSearchArcGISOnlineEnabled(
|
|
217
|
-
if (
|
|
308
|
+
async _checkSearchArcGISOnlineEnabled(e, t) {
|
|
309
|
+
if (e)
|
|
218
310
|
try {
|
|
219
|
-
const r = `${
|
|
311
|
+
const r = `${t}/portals/self/settings`, s = await l.request(r, {
|
|
220
312
|
authentication: this._credential ? this.RestUserSession : void 0
|
|
221
313
|
});
|
|
222
314
|
return s?.portalConfigProperties?.searchArcGISOnlineEnabled !== void 0 ? s.portalConfigProperties.searchArcGISOnlineEnabled : !1;
|
|
@@ -232,8 +324,8 @@ class f {
|
|
|
232
324
|
* This function checks if the object has a `toJSON` method, which is a
|
|
233
325
|
* @returns Boolean indicating whether the object is serializable.
|
|
234
326
|
*/
|
|
235
|
-
_isSerializable(
|
|
236
|
-
return
|
|
327
|
+
_isSerializable(e) {
|
|
328
|
+
return e && typeof e == "object" && "toJSON" in e && typeof e.toJSON == "function";
|
|
237
329
|
}
|
|
238
330
|
/**
|
|
239
331
|
* Converts a hashmap of query parameters to a query string. Following formatting rules applies:
|
|
@@ -268,16 +360,16 @@ class f {
|
|
|
268
360
|
*
|
|
269
361
|
* Copied from function exported in arcgis-js-api but not added to JSAPI.
|
|
270
362
|
*/
|
|
271
|
-
_objectToQuery(
|
|
272
|
-
return
|
|
273
|
-
const s =
|
|
363
|
+
_objectToQuery(e, t) {
|
|
364
|
+
return e ? t && typeof t == "function" ? Object.keys(e).map((r) => encodeURIComponent(r) + "=" + encodeURIComponent(t(r, e[r]))).join("&") : Object.keys(e).map((r) => {
|
|
365
|
+
const s = e[r];
|
|
274
366
|
if (s == null)
|
|
275
367
|
return "";
|
|
276
|
-
const
|
|
277
|
-
return
|
|
368
|
+
const o = encodeURIComponent(r) + "=", n = t && t[r];
|
|
369
|
+
return n ? o + encodeURIComponent(n(s)) : Array.isArray(s) ? s.map((a) => this._isSerializable(a) ? o + encodeURIComponent(JSON.stringify(a)) : o + encodeURIComponent(a)).join("&") : this._isSerializable(s) ? o + encodeURIComponent(JSON.stringify(s)) : o + encodeURIComponent(s);
|
|
278
370
|
}).filter((r) => r).join("&") : "";
|
|
279
371
|
}
|
|
280
372
|
}
|
|
281
373
|
export {
|
|
282
|
-
|
|
374
|
+
T as A
|
|
283
375
|
};
|
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
import { s as p, a as A, e as d } from "./cardsHelpers.js";
|
|
3
3
|
import * as c from "@esri/solution-common";
|
|
4
4
|
import { i as D, o as v, d as E, m as b, h as I, e as J } from "./helpers.js";
|
|
5
|
-
|
|
5
|
+
import "@esri/arcgis-rest-portal";
|
|
6
|
+
class j {
|
|
6
7
|
/**
|
|
7
8
|
* Constructor
|
|
8
9
|
*
|
|
@@ -283,5 +284,5 @@ class M {
|
|
|
283
284
|
}
|
|
284
285
|
}
|
|
285
286
|
export {
|
|
286
|
-
|
|
287
|
+
j as C
|
|
287
288
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import {
|
|
2
|
+
import { G as D } from "./interfaces.js";
|
|
3
3
|
import { getItemRelatedItems as g } from "@esri/solution-common";
|
|
4
4
|
async function R(o, r) {
|
|
5
5
|
const s = await h(r, o);
|
package/dist/chunks/helpers.js
CHANGED
|
@@ -40,20 +40,23 @@ function g(e) {
|
|
|
40
40
|
const t = e ? e.replace("https://", "").replace("www.", "") : "";
|
|
41
41
|
return t.endsWith("devext.arcgis.com") || t.endsWith("mapsqa.arcgis.com") || t.endsWith("qaext.arcgis.com") ? e ?? "https://www.arcgis.com" : "https://www.arcgis.com";
|
|
42
42
|
}
|
|
43
|
-
function w(e
|
|
43
|
+
function w(e) {
|
|
44
|
+
return e?.authentication?.PortalSubset?.isReadOnly === !0;
|
|
45
|
+
}
|
|
46
|
+
function h(e, t, r) {
|
|
44
47
|
return t.some((n) => n.wkid === e ? (r = n.defaultExtent, !0) : !1), r;
|
|
45
48
|
}
|
|
46
|
-
function
|
|
49
|
+
function y(e, t) {
|
|
47
50
|
return i(t || e);
|
|
48
51
|
}
|
|
49
|
-
function
|
|
52
|
+
function v(e, t = "en") {
|
|
50
53
|
return new Intl.DateTimeFormat(t, {
|
|
51
54
|
year: "numeric",
|
|
52
55
|
month: "long",
|
|
53
56
|
day: "numeric"
|
|
54
57
|
}).format(e);
|
|
55
58
|
}
|
|
56
|
-
function
|
|
59
|
+
function k(e, t) {
|
|
57
60
|
let r = "";
|
|
58
61
|
return e.some((n) => n.startsWith(t) ? (r = n.substring(t.length), !0) : !1), r;
|
|
59
62
|
}
|
|
@@ -61,7 +64,7 @@ function i(e) {
|
|
|
61
64
|
const t = e.replace("www.", "");
|
|
62
65
|
return t.endsWith("devext.arcgis.com") ? "dev" : t.endsWith("mapsqa.arcgis.com") || t.endsWith("qaext.arcgis.com") ? "qa" : t === "arcgis.com" || t.endsWith(".arcgis.com") ? "prod" : "dev";
|
|
63
66
|
}
|
|
64
|
-
function
|
|
67
|
+
function S(e, t) {
|
|
65
68
|
let r = e?.reduce((n, s) => (n.indexOf(s.id) < 0 && n.push(s.id), n), []) || [];
|
|
66
69
|
return t ? r.sort((n, s) => t.indexOf(n) - t.indexOf(s)) : r;
|
|
67
70
|
}
|
|
@@ -78,7 +81,7 @@ function I(e) {
|
|
|
78
81
|
suggested: "Suggested for you"
|
|
79
82
|
}[e] || e;
|
|
80
83
|
}
|
|
81
|
-
function
|
|
84
|
+
function E(e) {
|
|
82
85
|
if (!e)
|
|
83
86
|
return "Unknown error";
|
|
84
87
|
if (e.message)
|
|
@@ -90,7 +93,7 @@ function S(e) {
|
|
|
90
93
|
return e.toString();
|
|
91
94
|
}
|
|
92
95
|
}
|
|
93
|
-
function
|
|
96
|
+
function b(e) {
|
|
94
97
|
return e ? parseFloat(((Date.now() - e) / 1e3).toFixed(2)) : 0;
|
|
95
98
|
}
|
|
96
99
|
function x(e, t) {
|
|
@@ -101,7 +104,7 @@ function W(e) {
|
|
|
101
104
|
detail: e
|
|
102
105
|
}));
|
|
103
106
|
}
|
|
104
|
-
function
|
|
107
|
+
function q(e, t) {
|
|
105
108
|
const r = new Set(
|
|
106
109
|
e.filter((n) => n.dependencyItemId !== t).map((n) => `${n.controlItemId}|${n.dependencyItemId}`)
|
|
107
110
|
);
|
|
@@ -110,7 +113,7 @@ function b(e, t) {
|
|
|
110
113
|
return { controlItemId: s, dependencyItemId: o };
|
|
111
114
|
});
|
|
112
115
|
}
|
|
113
|
-
function
|
|
116
|
+
function U(e) {
|
|
114
117
|
return e.sort((t, r) => {
|
|
115
118
|
const n = t.typeKeywords?.find((o) => o.startsWith("solutionversion-"))?.split("-")[1] || "unknown", s = r.typeKeywords?.find((o) => o.startsWith("solutionversion-"))?.split("-")[1] || "unknown";
|
|
116
119
|
return n === "unknown" || s === "unknown" ? n === "unknown" ? 1 : -1 : s.localeCompare(n, void 0, { numeric: !0 });
|
|
@@ -119,22 +122,23 @@ function q(e) {
|
|
|
119
122
|
export {
|
|
120
123
|
l as a,
|
|
121
124
|
d as b,
|
|
122
|
-
|
|
125
|
+
b as c,
|
|
123
126
|
f as d,
|
|
124
127
|
c as e,
|
|
125
128
|
W as f,
|
|
126
|
-
|
|
129
|
+
E as g,
|
|
127
130
|
p as h,
|
|
128
131
|
g as i,
|
|
129
|
-
|
|
130
|
-
k,
|
|
131
|
-
|
|
132
|
-
|
|
132
|
+
h as j,
|
|
133
|
+
S as k,
|
|
134
|
+
y as l,
|
|
135
|
+
v as m,
|
|
133
136
|
I as n,
|
|
134
|
-
|
|
135
|
-
|
|
137
|
+
k as o,
|
|
138
|
+
q as p,
|
|
136
139
|
x as q,
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
+
w as r,
|
|
141
|
+
m as s,
|
|
142
|
+
U as t,
|
|
143
|
+
D as u
|
|
140
144
|
};
|