@yuku123/z-team-component 0.2.78 → 0.2.80
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/{menuPermission-CO2KgDX8.js → menuPermission-D9NGpBZP.js} +1 -1
- package/dist/pages.js +1 -1
- package/dist/z-team-component.css +2 -2
- package/package.json +1 -1
- package/dist/ChangeLogView-_bRZ55Yi.js +0 -542
- package/dist/ComponentDoc-Aw4QY8oI.js +0 -3998
- package/dist/InvitationManagementPage-Bv0ys--k.js +0 -495
- package/dist/OnboardingPage-B7274ITW.js +0 -393
- package/dist/ScheduledTasks-cc8n9giN.js +0 -9406
- package/dist/SystemShell-CPGtmxXl.js +0 -689
- package/dist/_commonjsHelpers-B52_cu2H.js +0 -26
- package/dist/api-B2APc1an.js +0 -20
- package/dist/api-CIhVblfa.js +0 -2155
- package/dist/browser-jb_PFvU3.js +0 -1538
- package/dist/createWorkspaceWsHandler-BWP5S5X3.js +0 -12951
- package/dist/ctc-sso-DtJHC-2M.js +0 -117
- package/dist/echarts-B1OU1xr4.js +0 -16
- package/dist/history-BlrA1eaW.js +0 -41
- package/dist/index-51d5011I.js +0 -178
- package/dist/index-62K6U_D_.js +0 -574
- package/dist/index-ACANAhdd.js +0 -242
- package/dist/index-B_LJRFsK.js +0 -339
- package/dist/index-BgIheStI.js +0 -133
- package/dist/index-BohoJQPr.js +0 -7631
- package/dist/index-Bpi_ysgC.js +0 -914
- package/dist/index-BwyN94l7.js +0 -9567
- package/dist/index-BydWNuk5.js +0 -1229
- package/dist/index-C6FYNbSB.js +0 -118
- package/dist/index-C815hPWS.js +0 -430
- package/dist/index-CNcX0oSU.js +0 -112
- package/dist/index-CUVdeb8y.js +0 -638
- package/dist/index-CijskN6t.js +0 -316
- package/dist/index-Cvx6rrxD.js +0 -956
- package/dist/index-Cwr5Slv1.js +0 -480
- package/dist/index-CxFAICql.js +0 -42050
- package/dist/index-D2cy0jVs.js +0 -1143
- package/dist/index-DGbL_CMP.js +0 -137
- package/dist/index-DK70mOTz.js +0 -143
- package/dist/index-DT80Pwa_.js +0 -5893
- package/dist/index-DWsfQMp8.js +0 -208
- package/dist/index-DhDdFRHC.js +0 -279
- package/dist/index-Dm3wmB0K.js +0 -435
- package/dist/index-DvBDj0ul.js +0 -93
- package/dist/index-DzS6-D3M.js +0 -1640
- package/dist/index-Xn84wLNu.js +0 -2700
- package/dist/index-_9zO-72Q.js +0 -2908
- package/dist/index-cdB5K3gx.js +0 -814
- package/dist/index-nU-V276i.js +0 -170
- package/dist/index-uF04Ucsi.js +0 -8
- package/dist/index.js +0 -10
- package/dist/index.module-CAa-2T7m.js +0 -72
- package/dist/index.module-UI0iz8K0.js +0 -42
package/dist/ctc-sso-DtJHC-2M.js
DELETED
|
@@ -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
|
-
};
|
package/dist/echarts-B1OU1xr4.js
DELETED
|
@@ -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
|
-
]);
|
package/dist/history-BlrA1eaW.js
DELETED
|
@@ -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
|
-
};
|
package/dist/index-51d5011I.js
DELETED
|
@@ -1,178 +0,0 @@
|
|
|
1
|
-
import { AppLayout as v, ErrorBoundary as H, LoginPage as _, StatusTag as z, defaultStatusMap as F } from "@yuku123/z-frontend-common";
|
|
2
|
-
import { a as y } from "./ComponentDoc-Aw4QY8oI.js";
|
|
3
|
-
import { c as J, E as Q, d as X, e as Y, f as Z, O as $, h as ee, R as te, j as re, k as ae, T as oe, l as ne, r as le, r as ie, m as se } from "./ComponentDoc-Aw4QY8oI.js";
|
|
4
|
-
import { jsxs as r, Fragment as h, jsx as e } from "react/jsx-runtime";
|
|
5
|
-
import { useState as n, useEffect as T } from "react";
|
|
6
|
-
import { Alert as I, Space as x, Button as l, Tag as c, Result as R } from "antd";
|
|
7
|
-
import { ReloadOutlined as g, UserAddOutlined as E, TeamOutlined as b, PlusOutlined as w, CodeOutlined as A } from "@ant-design/icons";
|
|
8
|
-
import { ListTable as f } from "@yuku123/z-frontend-common/ui";
|
|
9
|
-
const G = y, O = {
|
|
10
|
-
LEADER: "red",
|
|
11
|
-
WORKER: "blue",
|
|
12
|
-
OBSERVER: "default"
|
|
13
|
-
};
|
|
14
|
-
function K() {
|
|
15
|
-
const [i] = n(!1), [s] = n([]);
|
|
16
|
-
return /* @__PURE__ */ r(h, { children: [
|
|
17
|
-
/* @__PURE__ */ e(
|
|
18
|
-
I,
|
|
19
|
-
{
|
|
20
|
-
type: "info",
|
|
21
|
-
showIcon: !0,
|
|
22
|
-
style: { marginBottom: 16 },
|
|
23
|
-
title: "IM 群组 (含 STOMP 实时消息) 后端服务尚未启动",
|
|
24
|
-
description: "当前展示群组列表占位。等 z-agent-team 后端就绪后切换为完整 IM 客户端。"
|
|
25
|
-
}
|
|
26
|
-
),
|
|
27
|
-
/* @__PURE__ */ e(
|
|
28
|
-
f,
|
|
29
|
-
{
|
|
30
|
-
cardTitle: /* @__PURE__ */ r("span", { children: [
|
|
31
|
-
/* @__PURE__ */ e(b, { style: { marginRight: 8 } }),
|
|
32
|
-
"Agent 群组 IM"
|
|
33
|
-
] }),
|
|
34
|
-
cardExtra: /* @__PURE__ */ r(x, { children: [
|
|
35
|
-
/* @__PURE__ */ e(l, { icon: /* @__PURE__ */ e(g, {}), loading: i, children: "刷新" }),
|
|
36
|
-
/* @__PURE__ */ e(l, { type: "primary", icon: /* @__PURE__ */ e(E, {}), disabled: !0, children: "创建群组" })
|
|
37
|
-
] }),
|
|
38
|
-
rows: s,
|
|
39
|
-
columns: [
|
|
40
|
-
{ title: "群组编码", dataIndex: "teamCode", width: 200, ellipsis: !0 },
|
|
41
|
-
{ title: "群组名称", dataIndex: "teamName", width: 200 },
|
|
42
|
-
{
|
|
43
|
-
title: "我的角色",
|
|
44
|
-
dataIndex: "role",
|
|
45
|
-
width: 120,
|
|
46
|
-
render: (a) => /* @__PURE__ */ e(c, { color: O[a] || "default", children: a || "-" })
|
|
47
|
-
},
|
|
48
|
-
{ title: "成员数", dataIndex: "memberCount", width: 100 },
|
|
49
|
-
{ title: "最近消息", dataIndex: "lastMessage", width: 240, ellipsis: !0 },
|
|
50
|
-
{ title: "更新时间", dataIndex: "updatedAt", width: 180 }
|
|
51
|
-
],
|
|
52
|
-
rowKey: "teamCode",
|
|
53
|
-
loading: i,
|
|
54
|
-
searchKeys: ["teamCode", "teamName"],
|
|
55
|
-
searchPlaceholder: "按群组编码 / 名称过滤",
|
|
56
|
-
emptyTitle: "暂无群组",
|
|
57
|
-
emptyDescription: "当前还没有 IM 群组。"
|
|
58
|
-
}
|
|
59
|
-
)
|
|
60
|
-
] });
|
|
61
|
-
}
|
|
62
|
-
const M = {
|
|
63
|
-
CREATING: { text: "创建中", color: "processing" },
|
|
64
|
-
RUNNING: { text: "运行中", color: "success" },
|
|
65
|
-
STOPPED: { text: "已停止", color: "default" },
|
|
66
|
-
ERROR: { text: "错误", color: "error" }
|
|
67
|
-
}, D = {
|
|
68
|
-
GIT: { text: "GIT 模式", color: "blue" },
|
|
69
|
-
SHARED: { text: "SHARED 模式", color: "purple" }
|
|
70
|
-
};
|
|
71
|
-
function U() {
|
|
72
|
-
const [i, s] = n([]), [d, a] = n(!1), [u, m] = n(null), p = async () => {
|
|
73
|
-
a(!0), m(null);
|
|
74
|
-
try {
|
|
75
|
-
s([]);
|
|
76
|
-
} catch (t) {
|
|
77
|
-
m((t == null ? void 0 : t.message) || "加载失败");
|
|
78
|
-
} finally {
|
|
79
|
-
a(!1);
|
|
80
|
-
}
|
|
81
|
-
};
|
|
82
|
-
return T(() => {
|
|
83
|
-
p();
|
|
84
|
-
}, []), /* @__PURE__ */ r(h, { children: [
|
|
85
|
-
u && /* @__PURE__ */ e(
|
|
86
|
-
I,
|
|
87
|
-
{
|
|
88
|
-
type: "warning",
|
|
89
|
-
showIcon: !0,
|
|
90
|
-
style: { marginBottom: 16 },
|
|
91
|
-
title: "后端 API 暂未连接",
|
|
92
|
-
description: u
|
|
93
|
-
}
|
|
94
|
-
),
|
|
95
|
-
/* @__PURE__ */ e(
|
|
96
|
-
f,
|
|
97
|
-
{
|
|
98
|
-
cardTitle: /* @__PURE__ */ r("span", { children: [
|
|
99
|
-
/* @__PURE__ */ e(A, { style: { marginRight: 8 } }),
|
|
100
|
-
"WebIDE 容器管理"
|
|
101
|
-
] }),
|
|
102
|
-
cardExtra: /* @__PURE__ */ r(x, { children: [
|
|
103
|
-
/* @__PURE__ */ e(l, { icon: /* @__PURE__ */ e(g, {}), onClick: p, loading: d, children: "刷新" }),
|
|
104
|
-
/* @__PURE__ */ e(l, { type: "primary", icon: /* @__PURE__ */ e(w, {}), disabled: !0, children: "新建 WebIDE" })
|
|
105
|
-
] }),
|
|
106
|
-
rows: i,
|
|
107
|
-
columns: [
|
|
108
|
-
{ title: "容器ID", dataIndex: "containerId", width: 220, ellipsis: !0 },
|
|
109
|
-
{
|
|
110
|
-
title: "模式",
|
|
111
|
-
dataIndex: "mode",
|
|
112
|
-
width: 120,
|
|
113
|
-
render: (t) => {
|
|
114
|
-
const o = D[t] || { text: t, color: "default" };
|
|
115
|
-
return /* @__PURE__ */ e(c, { color: o.color, children: o.text });
|
|
116
|
-
}
|
|
117
|
-
},
|
|
118
|
-
{ title: "Git URL", dataIndex: "gitUrl", width: 240, ellipsis: !0 },
|
|
119
|
-
{ title: "分支", dataIndex: "branch", width: 120 },
|
|
120
|
-
{
|
|
121
|
-
title: "状态",
|
|
122
|
-
dataIndex: "status",
|
|
123
|
-
width: 120,
|
|
124
|
-
render: (t) => {
|
|
125
|
-
const o = M[t] || { text: t, color: "default" };
|
|
126
|
-
return /* @__PURE__ */ e(c, { color: o.color, children: o.text });
|
|
127
|
-
}
|
|
128
|
-
},
|
|
129
|
-
{ title: "创建时间", dataIndex: "createdAt", width: 180 }
|
|
130
|
-
],
|
|
131
|
-
rowKey: "containerId",
|
|
132
|
-
loading: d,
|
|
133
|
-
scroll: { x: 1e3 },
|
|
134
|
-
searchKeys: ["containerId", "branch"],
|
|
135
|
-
searchPlaceholder: "按容器 ID / 分支过滤",
|
|
136
|
-
emptyTitle: "暂无容器",
|
|
137
|
-
emptyDescription: "后端 z-webide 服务尚未启动"
|
|
138
|
-
}
|
|
139
|
-
)
|
|
140
|
-
] });
|
|
141
|
-
}
|
|
142
|
-
function k() {
|
|
143
|
-
return /* @__PURE__ */ e(
|
|
144
|
-
R,
|
|
145
|
-
{
|
|
146
|
-
title: "Debug Playground",
|
|
147
|
-
subTitle: "AI 调试沙盒功能开发中...",
|
|
148
|
-
extra: /* @__PURE__ */ e(l, { type: "primary", children: "敬请期待" })
|
|
149
|
-
}
|
|
150
|
-
);
|
|
151
|
-
}
|
|
152
|
-
export {
|
|
153
|
-
K as AgentTeamIM,
|
|
154
|
-
v as AppLayout,
|
|
155
|
-
J as CurlImportModal,
|
|
156
|
-
k as DebugPlayground,
|
|
157
|
-
Q as EndpointsTab,
|
|
158
|
-
X as EnvironmentsTab,
|
|
159
|
-
H as ErrorBoundary,
|
|
160
|
-
_ as LoginPage,
|
|
161
|
-
Y as MockPlatform,
|
|
162
|
-
Z as MockTemplateHelper,
|
|
163
|
-
$ as OpenApiImportModal,
|
|
164
|
-
ee as Overview,
|
|
165
|
-
te as RecordingsTab,
|
|
166
|
-
re as RequestLogsTab,
|
|
167
|
-
ae as ScenariosTab,
|
|
168
|
-
z as StatusTag,
|
|
169
|
-
oe as TestCasesTab,
|
|
170
|
-
U as Webide,
|
|
171
|
-
y as authRequest,
|
|
172
|
-
ne as createRequest,
|
|
173
|
-
G as ctcRequest,
|
|
174
|
-
le as default,
|
|
175
|
-
F as defaultStatusMap,
|
|
176
|
-
ie as request,
|
|
177
|
-
se as setupInterceptors
|
|
178
|
-
};
|