@yuku123/z-team-component 0.2.24 → 0.2.28
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/ChangeLogView-CG-o5YP1.js +502 -0
- package/dist/{InvitationManagementPage-BnvfjueJ.js → InvitationManagementPage-DpA3Xlq1.js} +2 -2
- package/dist/{OnboardingPage-B1uHZfRm.js → OnboardingPage-DFRAwruv.js} +2 -2
- package/dist/{ProjectApp-C6GUGbAD.js → ProjectApp-BquB_X7K.js} +2 -2
- package/dist/{SystemShell-DSbSJWXv.js → SystemShell-BLXTOqFb.js} +1 -1
- package/dist/{api-BwXzkm3f.js → api-CX7MUpws.js} +1 -1
- package/dist/ctc-sso-DtJHC-2M.js +117 -0
- package/dist/index-BYEx4vlI.js +6652 -0
- package/dist/{index-C1C2qyDr.js → index-BafC42Cl.js} +96 -66
- package/dist/{index-mv7nvapp.js → index-BylksTyk.js} +1 -1
- package/dist/{index-BMRIUhOL.js → index-C2aPiQSz.js} +1 -1
- package/dist/{index-Jrz1Ho0h.js → index-C9BOtjtQ.js} +1 -3
- package/dist/index-CPF3LS0x.js +914 -0
- package/dist/{index-8V37FP9c.js → index-CTD7k9dP.js} +1 -1
- package/dist/{index-3AXvDKQz.js → index-CcTdM5kT.js} +2 -2
- package/dist/index-CiMxCTOS.js +8 -0
- package/dist/{index-DkcpD37-.js → index-DIxwe_pk.js} +1 -1
- package/dist/{index-CGDpGIZC.js → index-Da7ls5q6.js} +1 -1
- package/dist/{index-B3ikipDf.js → index-Dao4uqQd.js} +1 -1
- package/dist/{index-BmK_rWsV.js → index-UsGqMo11.js} +17 -9
- package/dist/{index-CkH1OY5_.js → index-dSnK7qcL.js} +815 -767
- package/dist/index.js +1 -1
- package/dist/pages.js +1 -1
- package/dist/z-team-component.css +2 -2
- package/package.json +1 -1
- package/dist/ctc-sso-B62FfkZg.js +0 -70
- package/dist/index-Bsh58cwF.js +0 -975
- package/dist/index-DK_aR-Vu.js +0 -499
- package/dist/index-DPnfP7Cb.js +0 -6879
package/package.json
CHANGED
package/dist/ctc-sso-B62FfkZg.js
DELETED
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
function u() {
|
|
2
|
-
if (typeof window > "u") return null;
|
|
3
|
-
try {
|
|
4
|
-
const t = localStorage.getItem("USER_INFO");
|
|
5
|
-
if (t) return JSON.parse(t);
|
|
6
|
-
const a = localStorage.getItem("userInfo") || localStorage.getItem("user_info");
|
|
7
|
-
if (!a) return null;
|
|
8
|
-
const e = JSON.parse(a), o = {
|
|
9
|
-
name: String(e.nickname || e.name || ""),
|
|
10
|
-
jobNumber: String(e.userId || e.jobNumber || ""),
|
|
11
|
-
username: String(e.username || e.account || e.name || ""),
|
|
12
|
-
staffId: typeof e.userId == "number" ? e.userId : Number(e.userId) || 0
|
|
13
|
-
};
|
|
14
|
-
return localStorage.setItem("USER_INFO", JSON.stringify(o)), window.USER_INFO = o, o;
|
|
15
|
-
} catch {
|
|
16
|
-
return null;
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
async function l() {
|
|
20
|
-
const t = () => {
|
|
21
|
-
localStorage.removeItem("USER_INFO"), window.USER_INFO = void 0;
|
|
22
|
-
};
|
|
23
|
-
try {
|
|
24
|
-
const a = new AbortController(), e = setTimeout(() => a.abort(), 1500), o = await fetch("/kapi/z-ctc/api/ctc/authn/whoami", {
|
|
25
|
-
method: "GET",
|
|
26
|
-
credentials: "include",
|
|
27
|
-
headers: { Accept: "application/json" },
|
|
28
|
-
signal: a.signal
|
|
29
|
-
});
|
|
30
|
-
if (clearTimeout(e), o.status === 401)
|
|
31
|
-
return t(), { kind: "unauthenticated" };
|
|
32
|
-
if (!o.ok)
|
|
33
|
-
return { kind: "unavailable" };
|
|
34
|
-
const n = await o.json();
|
|
35
|
-
if (!n.success || !n.data)
|
|
36
|
-
return t(), { kind: "unauthenticated" };
|
|
37
|
-
const r = n.data.user_id ?? n.data.userId, s = {
|
|
38
|
-
name: n.data.nickname || n.data.username,
|
|
39
|
-
jobNumber: r != null ? String(r) : "",
|
|
40
|
-
username: n.data.username
|
|
41
|
-
};
|
|
42
|
-
localStorage.setItem("USER_INFO", JSON.stringify(s)), localStorage.setItem(
|
|
43
|
-
"ctcUrl",
|
|
44
|
-
encodeURIComponent(window.location.origin)
|
|
45
|
-
), window.USER_INFO = s;
|
|
46
|
-
const i = localStorage.getItem("token") || localStorage.getItem("z_team_token");
|
|
47
|
-
i && localStorage.setItem("token", i);
|
|
48
|
-
const c = {
|
|
49
|
-
userId: r,
|
|
50
|
-
id: r,
|
|
51
|
-
userName: n.data.username,
|
|
52
|
-
username: n.data.username,
|
|
53
|
-
nickname: n.data.nickname
|
|
54
|
-
};
|
|
55
|
-
return localStorage.setItem("userInfo", JSON.stringify(c)), { kind: "authenticated", user: s };
|
|
56
|
-
} catch {
|
|
57
|
-
return t(), { kind: "unavailable" };
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
function m() {
|
|
61
|
-
const t = new URL(window.location.href);
|
|
62
|
-
t.searchParams.has("_from_login") || t.searchParams.set("_from_login", "1");
|
|
63
|
-
const a = `/login?redirect=${encodeURIComponent(t.toString())}`;
|
|
64
|
-
window.location.href = a;
|
|
65
|
-
}
|
|
66
|
-
export {
|
|
67
|
-
l as f,
|
|
68
|
-
m as r,
|
|
69
|
-
u as s
|
|
70
|
-
};
|