@yuku123/z-team-component 0.2.103 → 0.2.105
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-B0ML82u0.js +542 -0
- package/dist/ComponentDoc-C_289lsE.js +8035 -0
- package/dist/InvitationManagementPage-D2ezz4ZQ.js +495 -0
- package/dist/OnboardingPage-BXsJ-kcJ.js +393 -0
- package/dist/ScheduledTasks-Cn8BsDkN.js +12127 -0
- package/dist/SystemShell-gcfNlt2L.js +688 -0
- package/dist/_commonjsHelpers-B52_cu2H.js +26 -0
- package/dist/admin-logs-B6K1DwRL.js +198 -0
- package/dist/api-BdP8mK8v.js +101 -0
- package/dist/api-DxSgE7qw.js +20 -0
- package/dist/browser-jb_PFvU3.js +1538 -0
- package/dist/createWorkspaceWsHandler-DcNA1pfi.js +13142 -0
- package/dist/ctc-sso-DtJHC-2M.js +117 -0
- package/dist/echarts-B1OU1xr4.js +16 -0
- package/dist/history-BlrA1eaW.js +41 -0
- package/dist/index-54iTaRVW.js +316 -0
- package/dist/index-BCw3Oxp1.js +42049 -0
- package/dist/index-BDq0ofl2.js +348 -0
- package/dist/index-BN-o5nZM.js +8 -0
- package/dist/index-B_LJRFsK.js +339 -0
- package/dist/index-Bf1K9zpk.js +112 -0
- package/dist/index-BfMFQ6RD.js +169 -0
- package/dist/index-BohoJQPr.js +7631 -0
- package/dist/index-C-8n6xxK.js +93 -0
- package/dist/index-C815hPWS.js +430 -0
- package/dist/index-C8m8s-SU.js +479 -0
- package/dist/index-CXJXSmhB.js +2217 -0
- package/dist/index-CdugR2_4.js +5892 -0
- package/dist/index-CeCsncoT.js +913 -0
- package/dist/index-CgCB0-yK.js +1645 -0
- package/dist/index-Cjddvrij.js +2699 -0
- package/dist/index-D487Inba.js +315 -0
- package/dist/index-DK71mfJn.js +999 -0
- package/dist/index-DLHcoHS9.js +189 -0
- package/dist/index-DUiFk01c.js +178 -0
- package/dist/index-DWsfQMp8.js +208 -0
- package/dist/index-DgN13A-E.js +10169 -0
- package/dist/index-DhDdFRHC.js +279 -0
- package/dist/index-DpLamT1r.js +574 -0
- package/dist/index-Dpii3P5J.js +1302 -0
- package/dist/index-DszzQwsc.js +956 -0
- package/dist/index-HJ3Kt-NT.js +358 -0
- package/dist/index-Nj-dlFKY.js +242 -0
- package/dist/index-ZuYJoo9E.js +118 -0
- package/dist/index-etyS3HY2.js +142 -0
- package/dist/index-jIh52A4c.js +132 -0
- package/dist/index.js +10 -0
- package/dist/index.module-CAa-2T7m.js +72 -0
- package/dist/index.module-UI0iz8K0.js +42 -0
- package/dist/instance-p-ezisoS.js +216 -0
- package/dist/menuPermission-u3Gd_c8S.js +60 -0
- package/dist/mobile-client-O3yr9h6t.js +24 -0
- package/dist/pages.js +21 -0
- package/dist/send-default-agent-team-message-BhIV6T6O.js +35 -0
- package/dist/spark-md5-Dld54a-T.js +178 -0
- package/dist/sso-user-Ib1jhF7t.js +43 -0
- package/dist/training-D3Uy5K_M.js +450 -0
- package/dist/webide-BGQnArzY.js +5233 -0
- package/dist/z-team-component.css +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import { jsxs as u, jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { useState as L, useMemo as p } from "react";
|
|
3
|
+
import { useNavigate as v, useLocation as A } from "react-router-dom";
|
|
4
|
+
import { DownOutlined as k, RightOutlined as w } from "@ant-design/icons";
|
|
5
|
+
import { P as W, R as $ } from "./index-C-8n6xxK.js";
|
|
6
|
+
import { f as E, M as g } from "./menuPermission-u3Gd_c8S.js";
|
|
7
|
+
import { u as j } from "./ComponentDoc-C_289lsE.js";
|
|
8
|
+
const H = "_shell_1jjcx_7", M = "_sidebar_1jjcx_15", R = "_menuList_1jjcx_37", T = "_menuGroup_1jjcx_43", C = "_menuGroupHeader_1jjcx_47", P = "_menuGroupIcon_1jjcx_65", z = "_menuGroupLabel_1jjcx_70", K = "_menuGroupArrow_1jjcx_74", U = "_menuSubList_1jjcx_80", Z = "_menuSubItem_1jjcx_86", B = "_menuSubItemActive_1jjcx_103", D = "_menuSubItemIcon_1jjcx_110", O = "_menuSubItemLabel_1jjcx_115", q = "_menuSubItemWrap_1jjcx_119", F = "_main_1jjcx_123", J = "_empty_1jjcx_134", Q = "_emptyIcon_1jjcx_144", V = "_emptyText_1jjcx_149", n = {
|
|
9
|
+
shell: H,
|
|
10
|
+
sidebar: M,
|
|
11
|
+
menuList: R,
|
|
12
|
+
menuGroup: T,
|
|
13
|
+
menuGroupHeader: C,
|
|
14
|
+
menuGroupIcon: P,
|
|
15
|
+
menuGroupLabel: z,
|
|
16
|
+
menuGroupArrow: K,
|
|
17
|
+
menuSubList: U,
|
|
18
|
+
menuSubItem: Z,
|
|
19
|
+
menuSubItemActive: B,
|
|
20
|
+
menuSubItemIcon: D,
|
|
21
|
+
menuSubItemLabel: O,
|
|
22
|
+
menuSubItemWrap: q,
|
|
23
|
+
main: F,
|
|
24
|
+
empty: J,
|
|
25
|
+
emptyIcon: Q,
|
|
26
|
+
emptyText: V
|
|
27
|
+
};
|
|
28
|
+
function X(m, r) {
|
|
29
|
+
for (const s of m)
|
|
30
|
+
if (s.path === r) return s.element;
|
|
31
|
+
for (const s of m)
|
|
32
|
+
if (s.path.includes("*") || s.path.includes(":")) {
|
|
33
|
+
const i = "^" + s.path.replace(/[.+?^${}()|[\]\\]/g, "\\$&").replace(/\*/g, ".*").replace(/:([a-zA-Z_][a-zA-Z0-9_]*)/g, "[^/]+") + "$";
|
|
34
|
+
if (new RegExp(i).test(r)) return s.element;
|
|
35
|
+
}
|
|
36
|
+
return null;
|
|
37
|
+
}
|
|
38
|
+
function Y({ text: m }) {
|
|
39
|
+
return /* @__PURE__ */ u("div", { className: n.empty, children: [
|
|
40
|
+
/* @__PURE__ */ t("div", { className: n.emptyIcon, children: "⚙️" }),
|
|
41
|
+
/* @__PURE__ */ t("div", { className: n.emptyText, children: m })
|
|
42
|
+
] });
|
|
43
|
+
}
|
|
44
|
+
function oe({
|
|
45
|
+
groups: m,
|
|
46
|
+
routes: r,
|
|
47
|
+
mode: s,
|
|
48
|
+
emptyText: i,
|
|
49
|
+
activePathOverride: _,
|
|
50
|
+
menuOnly: h = !1
|
|
51
|
+
}) {
|
|
52
|
+
const I = v(), { pathname: a } = A(), d = j((e) => e.currentUser), b = j((e) => e.permissionState), [x, S] = L(
|
|
53
|
+
new Set(m.map((e) => e.title))
|
|
54
|
+
), l = p(
|
|
55
|
+
() => b === "failed" ? m : E(m, d),
|
|
56
|
+
[m, d, b]
|
|
57
|
+
), f = p(() => {
|
|
58
|
+
const e = _ ?? a;
|
|
59
|
+
for (const o of l)
|
|
60
|
+
for (const c of o.items)
|
|
61
|
+
if (c.path === e) return c.key;
|
|
62
|
+
return null;
|
|
63
|
+
}, [l, _, a]), G = (e) => {
|
|
64
|
+
S((o) => {
|
|
65
|
+
const c = new Set(o);
|
|
66
|
+
return c.has(e) ? c.delete(e) : c.add(e), c;
|
|
67
|
+
});
|
|
68
|
+
}, y = (e) => {
|
|
69
|
+
I(`${e.path}?mode=${s}`);
|
|
70
|
+
}, N = p(() => X(r, a), [r, a]);
|
|
71
|
+
return /* @__PURE__ */ u("div", { className: n.shell, children: [
|
|
72
|
+
/* @__PURE__ */ u("aside", { className: n.sidebar, children: [
|
|
73
|
+
/* @__PURE__ */ t(g, {}),
|
|
74
|
+
/* @__PURE__ */ t("nav", { className: n.menuList, children: l.map((e) => {
|
|
75
|
+
const o = x.has(e.title);
|
|
76
|
+
return /* @__PURE__ */ u("div", { className: n.menuGroup, children: [
|
|
77
|
+
/* @__PURE__ */ u(
|
|
78
|
+
"div",
|
|
79
|
+
{
|
|
80
|
+
className: n.menuGroupHeader,
|
|
81
|
+
onClick: () => G(e.title),
|
|
82
|
+
children: [
|
|
83
|
+
/* @__PURE__ */ t("span", { className: n.menuGroupIcon, children: e.icon }),
|
|
84
|
+
/* @__PURE__ */ t("span", { className: n.menuGroupLabel, children: e.title }),
|
|
85
|
+
/* @__PURE__ */ t("span", { className: n.menuGroupArrow, children: o ? /* @__PURE__ */ t(k, {}) : /* @__PURE__ */ t(w, {}) })
|
|
86
|
+
]
|
|
87
|
+
}
|
|
88
|
+
),
|
|
89
|
+
o && /* @__PURE__ */ t("ul", { className: n.menuSubList, children: e.items.map((c) => /* @__PURE__ */ u(
|
|
90
|
+
"li",
|
|
91
|
+
{
|
|
92
|
+
className: `${n.menuSubItemWrap} ${n.menuSubItem} ${f === c.key ? n.menuSubItemActive : ""}`,
|
|
93
|
+
onClick: () => y(c),
|
|
94
|
+
children: [
|
|
95
|
+
/* @__PURE__ */ t("span", { className: n.menuSubItemIcon, children: c.icon }),
|
|
96
|
+
/* @__PURE__ */ t("span", { className: n.menuSubItemLabel, children: c.label })
|
|
97
|
+
]
|
|
98
|
+
},
|
|
99
|
+
c.key
|
|
100
|
+
)) })
|
|
101
|
+
] }, e.title);
|
|
102
|
+
}) })
|
|
103
|
+
] }),
|
|
104
|
+
h ? null : /* @__PURE__ */ u("main", { className: n.main, children: [
|
|
105
|
+
/* @__PURE__ */ t(W, {}),
|
|
106
|
+
/* @__PURE__ */ t($, { resetKey: a, children: N ?? /* @__PURE__ */ t(Y, { text: i }) })
|
|
107
|
+
] })
|
|
108
|
+
] });
|
|
109
|
+
}
|
|
110
|
+
export {
|
|
111
|
+
oe as W
|
|
112
|
+
};
|
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
import { jsx as r, jsxs as x } from "react/jsx-runtime";
|
|
2
|
+
import { f as z, r as T } from "./ctc-sso-DtJHC-2M.js";
|
|
3
|
+
import { r as D, h as U, s as F } from "./sso-user-Ib1jhF7t.js";
|
|
4
|
+
import { CheckCircleFilled as W } from "@ant-design/icons";
|
|
5
|
+
import { Result as B, Button as H, Spin as G } from "antd";
|
|
6
|
+
import J from "query-string";
|
|
7
|
+
import { useState as d, useRef as K, useCallback as O, useMemo as R, useEffect as E } from "react";
|
|
8
|
+
import { useLocation as Q } from "react-router-dom";
|
|
9
|
+
import { h as b } from "./history-BlrA1eaW.js";
|
|
10
|
+
import { u as s, j as V, k as X } from "./ComponentDoc-C_289lsE.js";
|
|
11
|
+
import { b as Y } from "./mobile-client-O3yr9h6t.js";
|
|
12
|
+
import { s as Z } from "./send-default-agent-team-message-BhIV6T6O.js";
|
|
13
|
+
function ue() {
|
|
14
|
+
const h = Q(), f = J.parse(h.search), c = String(
|
|
15
|
+
f.scenarioCode ?? f.scenario_code ?? ""
|
|
16
|
+
).trim(), a = String(
|
|
17
|
+
f.projectName ?? f.project_name ?? ""
|
|
18
|
+
).trim(), i = String(f.input ?? "").trim(), _ = s((e) => e.expandProject), g = s((e) => e.updateCurrentUser), [j, I] = d(!1), [w, y] = d(""), [M, p] = d("正在登录…"), [k, $] = d([]), C = K(!1), u = O((e, t) => {
|
|
19
|
+
$((o) => [...o, e]), p(t);
|
|
20
|
+
}, []), n = R(() => c ? a ? "" : "缺少参数 projectName" : "缺少参数 scenarioCode", [a, c]);
|
|
21
|
+
E(() => {
|
|
22
|
+
if (n)
|
|
23
|
+
return;
|
|
24
|
+
let e = !1, t = 0;
|
|
25
|
+
const o = 100;
|
|
26
|
+
let S = !1, P = 0;
|
|
27
|
+
const A = 3;
|
|
28
|
+
return (() => {
|
|
29
|
+
if (e)
|
|
30
|
+
return;
|
|
31
|
+
const v = async () => {
|
|
32
|
+
if (e)
|
|
33
|
+
return;
|
|
34
|
+
let l = D();
|
|
35
|
+
if ((!l || !U(l)) && !S) {
|
|
36
|
+
S = !0;
|
|
37
|
+
try {
|
|
38
|
+
const m = await z();
|
|
39
|
+
m.kind === "authenticated" ? l = m.user : m.kind === "unauthenticated" && (P += 1);
|
|
40
|
+
} catch {
|
|
41
|
+
} finally {
|
|
42
|
+
S = !1;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
if (l && U(l)) {
|
|
46
|
+
g(F(l));
|
|
47
|
+
const m = s.getState().token;
|
|
48
|
+
try {
|
|
49
|
+
const L = await X(m);
|
|
50
|
+
e || g(L);
|
|
51
|
+
} catch {
|
|
52
|
+
!e && m && (localStorage.removeItem("z_team_token"), s.setState({ token: "" }));
|
|
53
|
+
} finally {
|
|
54
|
+
e || I(!0);
|
|
55
|
+
}
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
58
|
+
if (P >= A) {
|
|
59
|
+
T();
|
|
60
|
+
return;
|
|
61
|
+
}
|
|
62
|
+
if (t += 1, t >= o) {
|
|
63
|
+
T();
|
|
64
|
+
return;
|
|
65
|
+
}
|
|
66
|
+
window.setTimeout(() => void v(), 150);
|
|
67
|
+
};
|
|
68
|
+
v();
|
|
69
|
+
})(), () => {
|
|
70
|
+
e = !0;
|
|
71
|
+
};
|
|
72
|
+
}, [n, g]);
|
|
73
|
+
const q = (e) => new Promise((t) => {
|
|
74
|
+
window.setTimeout(t, e);
|
|
75
|
+
});
|
|
76
|
+
E(() => {
|
|
77
|
+
if (n) {
|
|
78
|
+
y(n);
|
|
79
|
+
return;
|
|
80
|
+
}
|
|
81
|
+
!j || C.current || (C.current = !0, (async () => {
|
|
82
|
+
try {
|
|
83
|
+
const e = s.getState().token;
|
|
84
|
+
p("正在按场景创建工程…");
|
|
85
|
+
const t = await V(
|
|
86
|
+
{
|
|
87
|
+
name: a,
|
|
88
|
+
description: "",
|
|
89
|
+
workspace_path: a,
|
|
90
|
+
scenario_code: c
|
|
91
|
+
},
|
|
92
|
+
e
|
|
93
|
+
);
|
|
94
|
+
u("工程已创建", "正在打开协作区…"), p("正在同步工程列表…"), await _(t);
|
|
95
|
+
const o = s.getState();
|
|
96
|
+
o.currentProject && await o.refreshProjectPanels(
|
|
97
|
+
String(o.currentProject.id),
|
|
98
|
+
o.projectSwitchSeq,
|
|
99
|
+
!1
|
|
100
|
+
), u(
|
|
101
|
+
"协作区已就绪",
|
|
102
|
+
i ? "正在发送协作消息…" : "即将进入工作台…"
|
|
103
|
+
), i && (await Z(
|
|
104
|
+
t.id,
|
|
105
|
+
i,
|
|
106
|
+
e,
|
|
107
|
+
s.getState().members
|
|
108
|
+
), await s.getState().loadMessages(), u("协作消息已发送", "即将进入工作台…")), p("即将进入工作台…"), await q(2e3), b.replace(
|
|
109
|
+
Y({
|
|
110
|
+
projectId: t.id,
|
|
111
|
+
search: h.search
|
|
112
|
+
})
|
|
113
|
+
);
|
|
114
|
+
} catch (e) {
|
|
115
|
+
const t = e instanceof Error ? e.message : String(e);
|
|
116
|
+
y(t || "创建工程失败");
|
|
117
|
+
}
|
|
118
|
+
})());
|
|
119
|
+
}, [
|
|
120
|
+
u,
|
|
121
|
+
j,
|
|
122
|
+
_,
|
|
123
|
+
i,
|
|
124
|
+
h.search,
|
|
125
|
+
n,
|
|
126
|
+
a,
|
|
127
|
+
c
|
|
128
|
+
]);
|
|
129
|
+
const N = R(() => {
|
|
130
|
+
if (n)
|
|
131
|
+
return "";
|
|
132
|
+
const e = [`场景 ${c}`, `工程 ${a}`];
|
|
133
|
+
return i && e.push("含首条协作消息"), e.join(" · ");
|
|
134
|
+
}, [i, n, a, c]);
|
|
135
|
+
return w ? /* @__PURE__ */ r("div", { className: "from-scenario-page", children: /* @__PURE__ */ r(
|
|
136
|
+
B,
|
|
137
|
+
{
|
|
138
|
+
status: "error",
|
|
139
|
+
title: "无法创建工程",
|
|
140
|
+
subTitle: w,
|
|
141
|
+
extra: /* @__PURE__ */ r(
|
|
142
|
+
H,
|
|
143
|
+
{
|
|
144
|
+
type: "primary",
|
|
145
|
+
onClick: () => b.replace("/workspace"),
|
|
146
|
+
children: "返回工作台"
|
|
147
|
+
}
|
|
148
|
+
)
|
|
149
|
+
}
|
|
150
|
+
) }) : /* @__PURE__ */ r("div", { className: "from-scenario-page", children: /* @__PURE__ */ x("div", { className: "from-scenario-page__panel", children: [
|
|
151
|
+
/* @__PURE__ */ r(G, { size: "large" }),
|
|
152
|
+
/* @__PURE__ */ r("p", { className: "from-scenario-page__step", children: M }),
|
|
153
|
+
N ? /* @__PURE__ */ r("p", { className: "from-scenario-page__hint", children: N }) : null,
|
|
154
|
+
k.length > 0 ? /* @__PURE__ */ r("ul", { className: "from-scenario-page__done-list", children: k.filter((e) => e.trim().length > 0).map((e, t) => /* @__PURE__ */ x(
|
|
155
|
+
"li",
|
|
156
|
+
{
|
|
157
|
+
className: "from-scenario-page__done-item",
|
|
158
|
+
children: [
|
|
159
|
+
/* @__PURE__ */ r(W, { className: "from-scenario-page__done-icon" }),
|
|
160
|
+
/* @__PURE__ */ r("span", { children: e })
|
|
161
|
+
]
|
|
162
|
+
},
|
|
163
|
+
`${t}-${e}`
|
|
164
|
+
)) }) : null
|
|
165
|
+
] }) });
|
|
166
|
+
}
|
|
167
|
+
export {
|
|
168
|
+
ue as default
|
|
169
|
+
};
|