@yuku123/z-team-component 0.2.102 → 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-BIlT58NX.js +0 -542
  3. package/dist/ComponentDoc-bhNM4jiY.js +0 -8035
  4. package/dist/InvitationManagementPage-9AmXUw6E.js +0 -495
  5. package/dist/OnboardingPage-B9oWippy.js +0 -393
  6. package/dist/ScheduledTasks-CkNxtgeb.js +0 -12127
  7. package/dist/SystemShell-Cz3bn2dt.js +0 -688
  8. package/dist/_commonjsHelpers-B52_cu2H.js +0 -26
  9. package/dist/admin-logs-BuwxECUY.js +0 -198
  10. package/dist/api-DL_MM5cW.js +0 -20
  11. package/dist/browser-jb_PFvU3.js +0 -1538
  12. package/dist/createWorkspaceWsHandler-B6LYCL3Q.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-2dGExnjZ.js +0 -2217
  17. package/dist/index-B1AYMWHS.js +0 -10169
  18. package/dist/index-B5F1N9_V.js +0 -42049
  19. package/dist/index-B8O2io7L.js +0 -315
  20. package/dist/index-BIXeUFLa.js +0 -479
  21. package/dist/index-BPqoN-aE.js +0 -242
  22. package/dist/index-BTs7b4SV.js +0 -118
  23. package/dist/index-BYMhgsLe.js +0 -178
  24. package/dist/index-BZBxvwcT.js +0 -169
  25. package/dist/index-BZCQSW-G.js +0 -1222
  26. package/dist/index-B_LJRFsK.js +0 -339
  27. package/dist/index-BdmM-NHL.js +0 -5892
  28. package/dist/index-BmHFHD_e.js +0 -112
  29. package/dist/index-BohoJQPr.js +0 -7631
  30. package/dist/index-C1wsTstT.js +0 -434
  31. package/dist/index-C1wtrBjM.js +0 -8
  32. package/dist/index-C815hPWS.js +0 -430
  33. package/dist/index-CbH8YeqA.js +0 -913
  34. package/dist/index-CsweV-yM.js +0 -142
  35. package/dist/index-D3vyICxK.js +0 -2699
  36. package/dist/index-DKgyKXWm.js +0 -1640
  37. package/dist/index-DQHEr9-I.js +0 -93
  38. package/dist/index-DU-PHfEr.js +0 -189
  39. package/dist/index-DWsfQMp8.js +0 -208
  40. package/dist/index-DhDdFRHC.js +0 -279
  41. package/dist/index-DvTMESfc.js +0 -132
  42. package/dist/index-fl0m6QYf.js +0 -316
  43. package/dist/index-lux3nNJP.js +0 -574
  44. package/dist/index-mwtsohOK.js +0 -951
  45. package/dist/index-qd4awhFI.js +0 -956
  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-4ACm8YFK.js +0 -216
  50. package/dist/menuPermission-C7yt7uNG.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-YRd0CkeT.js +0 -35
  54. package/dist/spark-md5-Dld54a-T.js +0 -178
  55. package/dist/sso-user-GnlYnP83.js +0 -43
  56. package/dist/training-CyK00fwu.js +0 -450
  57. package/dist/webide-SjnHsCZF.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
- };