@yuku123/z-team-component 0.2.101 → 0.2.103

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.
Files changed (58) hide show
  1. package/package.json +1 -1
  2. package/dist/ChangeLogView-C5CT7IdD.js +0 -542
  3. package/dist/ComponentDoc-_6l967G1.js +0 -8035
  4. package/dist/InvitationManagementPage-aVNAFNfh.js +0 -495
  5. package/dist/OnboardingPage-eguTk0Fr.js +0 -393
  6. package/dist/ScheduledTasks-fQkpSLxv.js +0 -12127
  7. package/dist/SystemShell-CcjFqtAl.js +0 -688
  8. package/dist/_commonjsHelpers-B52_cu2H.js +0 -26
  9. package/dist/admin-logs-3ZODCEOd.js +0 -198
  10. package/dist/api-Cxg9p973.js +0 -20
  11. package/dist/browser-jb_PFvU3.js +0 -1538
  12. package/dist/createWorkspaceWsHandler-DGSUlhxe.js +0 -13142
  13. package/dist/ctc-sso-DtJHC-2M.js +0 -117
  14. package/dist/echarts-B1OU1xr4.js +0 -16
  15. package/dist/history-BlrA1eaW.js +0 -41
  16. package/dist/index-9pP8ZkkO.js +0 -913
  17. package/dist/index-BK7D0ag2.js +0 -142
  18. package/dist/index-BQvWAcy_.js +0 -814
  19. package/dist/index-BZCQSW-G.js +0 -1222
  20. package/dist/index-B_LJRFsK.js +0 -339
  21. package/dist/index-BdAkIs1M.js +0 -42049
  22. package/dist/index-Bn-5kryj.js +0 -2217
  23. package/dist/index-BohoJQPr.js +0 -7631
  24. package/dist/index-Bxeg6bYj.js +0 -315
  25. package/dist/index-C6Y3uiLo.js +0 -316
  26. package/dist/index-C815hPWS.js +0 -430
  27. package/dist/index-CJRhmIZt.js +0 -132
  28. package/dist/index-CRuyEQHz.js +0 -242
  29. package/dist/index-CUgTpa_y.js +0 -10132
  30. package/dist/index-Cl8xxWPn.js +0 -93
  31. package/dist/index-CuXeGlOh.js +0 -5892
  32. package/dist/index-Cxecr-Dh.js +0 -8
  33. package/dist/index-CyXYKCpO.js +0 -178
  34. package/dist/index-D1xldtWw.js +0 -479
  35. package/dist/index-DH85SI_i.js +0 -574
  36. package/dist/index-DJ52X07p.js +0 -1640
  37. package/dist/index-DLmDAaE2.js +0 -169
  38. package/dist/index-DTRobC4q.js +0 -956
  39. package/dist/index-DWsfQMp8.js +0 -208
  40. package/dist/index-DdeHvY0_.js +0 -112
  41. package/dist/index-DhDdFRHC.js +0 -279
  42. package/dist/index-DjokMbUK.js +0 -434
  43. package/dist/index-DyKLLFs9.js +0 -2699
  44. package/dist/index-J7unHx4K.js +0 -118
  45. package/dist/index-t0s2Lph_.js +0 -189
  46. package/dist/index.js +0 -10
  47. package/dist/index.module-CAa-2T7m.js +0 -72
  48. package/dist/index.module-UI0iz8K0.js +0 -42
  49. package/dist/instance-120oH-2S.js +0 -216
  50. package/dist/menuPermission-qZTza4Oq.js +0 -60
  51. package/dist/mobile-client-O3yr9h6t.js +0 -24
  52. package/dist/pages.js +0 -21
  53. package/dist/send-default-agent-team-message-DrfWKH9j.js +0 -35
  54. package/dist/spark-md5-Dld54a-T.js +0 -178
  55. package/dist/sso-user-DXwW5eLV.js +0 -43
  56. package/dist/training-D3P1cMiu.js +0 -450
  57. package/dist/webide-D_OZQdjo.js +0 -5233
  58. package/dist/z-team-component.css +0 -1
@@ -1,117 +0,0 @@
1
- function d() {
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 n = JSON.parse(a), r = {
9
- name: String(n.nickname || n.name || ""),
10
- jobNumber: String(n.userId || n.jobNumber || ""),
11
- username: String(n.username || n.account || n.name || ""),
12
- staffId: typeof n.userId == "number" ? n.userId : Number(n.userId) || 0
13
- };
14
- return localStorage.setItem("USER_INFO", JSON.stringify(r)), window.USER_INFO = r, r;
15
- } catch {
16
- return null;
17
- }
18
- }
19
- async function m() {
20
- const t = () => {
21
- localStorage.removeItem("USER_INFO"), window.USER_INFO = void 0;
22
- };
23
- try {
24
- const a = new AbortController(), n = setTimeout(() => a.abort(), 1500), r = 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(n), r.status === 401) {
31
- const s = await u();
32
- return s ? { kind: "authenticated", user: s } : (t(), { kind: "unauthenticated" });
33
- }
34
- if (!r.ok) {
35
- const s = await u();
36
- return s ? { kind: "authenticated", user: s } : { kind: "unavailable" };
37
- }
38
- const e = await r.json();
39
- if (!e.success || !e.data)
40
- return t(), { kind: "unauthenticated" };
41
- const o = e.data.user_id ?? e.data.userId, i = {
42
- name: e.data.nickname || e.data.username,
43
- jobNumber: o != null ? String(o) : "",
44
- username: e.data.username
45
- };
46
- localStorage.setItem("USER_INFO", JSON.stringify(i)), localStorage.setItem(
47
- "ctcUrl",
48
- encodeURIComponent(window.location.origin)
49
- ), window.USER_INFO = i;
50
- const c = localStorage.getItem("token") || localStorage.getItem("z_team_token");
51
- c && localStorage.setItem("token", c);
52
- const l = {
53
- userId: o,
54
- id: o,
55
- userName: e.data.username,
56
- username: e.data.username,
57
- nickname: e.data.nickname
58
- };
59
- return localStorage.setItem("userInfo", JSON.stringify(l)), { kind: "authenticated", user: i };
60
- } catch {
61
- const a = await u();
62
- return a ? { kind: "authenticated", user: a } : (t(), { kind: "unavailable" });
63
- }
64
- }
65
- async function u() {
66
- if (typeof window > "u") return null;
67
- let t = null;
68
- try {
69
- t = localStorage.getItem("token") || localStorage.getItem("z_team_token");
70
- } catch {
71
- return null;
72
- }
73
- if (!t || !t.trim()) return null;
74
- try {
75
- const a = new AbortController(), n = setTimeout(() => a.abort(), 2e3), r = await fetch("/kapi/z-ctc/api/ctc/authn/whoami", {
76
- method: "GET",
77
- headers: {
78
- Accept: "application/json",
79
- Authorization: `Bearer ${t.trim()}`
80
- },
81
- signal: a.signal
82
- });
83
- if (clearTimeout(n), !r.ok) return null;
84
- const e = await r.json();
85
- if (!e.success || !e.data) return null;
86
- const o = e.data.user_id ?? e.data.userId, i = {
87
- name: e.data.nickname || e.data.username,
88
- jobNumber: o != null ? String(o) : "",
89
- username: e.data.username
90
- };
91
- localStorage.setItem("USER_INFO", JSON.stringify(i)), localStorage.setItem(
92
- "ctcUrl",
93
- encodeURIComponent(window.location.origin)
94
- ), window.USER_INFO = i;
95
- const c = {
96
- userId: o,
97
- id: o,
98
- userName: e.data.username,
99
- username: e.data.username,
100
- nickname: e.data.nickname
101
- };
102
- return localStorage.setItem("userInfo", JSON.stringify(c)), i;
103
- } catch {
104
- return null;
105
- }
106
- }
107
- function f() {
108
- const t = new URL(window.location.href);
109
- t.searchParams.has("_from_login") || t.searchParams.set("_from_login", "1");
110
- const a = `/login?redirect=${encodeURIComponent(t.toString())}`;
111
- window.location.href = a;
112
- }
113
- export {
114
- m as f,
115
- f as r,
116
- d as s
117
- };
@@ -1,16 +0,0 @@
1
- import * as o from "echarts/core";
2
- import { BarChart as r, LineChart as e, PieChart as n } from "echarts/charts";
3
- import { GridComponent as t, LegendComponent as m, MarkLineComponent as p, TitleComponent as i, TooltipComponent as a, GraphicComponent as C } from "echarts/components";
4
- import { CanvasRenderer as h } from "echarts/renderers";
5
- o.use([
6
- r,
7
- e,
8
- n,
9
- t,
10
- m,
11
- p,
12
- i,
13
- a,
14
- C,
15
- h
16
- ]);
@@ -1,41 +0,0 @@
1
- function i(t) {
2
- if (typeof t == "string")
3
- return t;
4
- const { pathname: o = "", search: n = "", hash: r = "" } = t, e = n && !n.startsWith("?") ? `?${n}` : n, a = r && !r.startsWith("#") ? `#${r}` : r;
5
- return `${o}${e}${a}`;
6
- }
7
- function s() {
8
- try {
9
- window.dispatchEvent(new PopStateEvent("popstate"));
10
- } catch {
11
- }
12
- }
13
- const w = {
14
- /** 当前 location(与 umi/history 形状保持一致) */
15
- get location() {
16
- return window.location;
17
- },
18
- /** 跳转到新地址(pushState + 通知 Router) */
19
- push(t, o) {
20
- window.history.pushState(o ?? {}, "", i(t)), s();
21
- },
22
- /** 替换当前地址(replaceState + 通知 Router) */
23
- replace(t, o) {
24
- window.history.replaceState(o ?? {}, "", i(t)), s();
25
- },
26
- /** 历史栈移动 */
27
- go(t) {
28
- window.history.go(t);
29
- },
30
- /** 后退 */
31
- back() {
32
- window.history.back();
33
- },
34
- /** 前进 */
35
- forward() {
36
- window.history.forward();
37
- }
38
- };
39
- export {
40
- w as h
41
- };