@yuku123/z-team-component 0.2.80 → 0.2.83
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-_bRZ55Yi.js +542 -0
- package/dist/ComponentDoc-BFoF51we.js +3998 -0
- package/dist/InvitationManagementPage-CTPCZXHu.js +495 -0
- package/dist/OnboardingPage-DwtuTL61.js +393 -0
- package/dist/ScheduledTasks-yeTm2bOY.js +9407 -0
- package/dist/SystemShell-D9OzKxL-.js +689 -0
- package/dist/_commonjsHelpers-B52_cu2H.js +26 -0
- package/dist/api-CIhVblfa.js +2155 -0
- package/dist/api-DXLNhtCX.js +20 -0
- package/dist/browser-jb_PFvU3.js +1538 -0
- package/dist/createWorkspaceWsHandler-BWP5S5X3.js +12951 -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-BCp5EtqR.js +914 -0
- package/dist/index-BHrMl3Jq.js +9585 -0
- package/dist/index-BP7WTzVH.js +137 -0
- package/dist/index-B_LJRFsK.js +339 -0
- package/dist/index-BgIheStI.js +133 -0
- package/dist/index-BohoJQPr.js +7631 -0
- package/dist/index-BydWNuk5.js +1229 -0
- package/dist/index-C815hPWS.js +430 -0
- package/dist/index-CBQMS6rx.js +178 -0
- package/dist/index-CESmMALI.js +242 -0
- package/dist/index-CUVdeb8y.js +638 -0
- package/dist/index-CijskN6t.js +316 -0
- package/dist/index-CoBZZQBy.js +112 -0
- package/dist/index-Co_0idJY.js +2936 -0
- package/dist/index-Cvx6rrxD.js +956 -0
- package/dist/index-Cwr5Slv1.js +480 -0
- package/dist/index-CxFAICql.js +42050 -0
- package/dist/index-DK70mOTz.js +143 -0
- package/dist/index-DT80Pwa_.js +5893 -0
- package/dist/index-DWsfQMp8.js +208 -0
- package/dist/index-DhDdFRHC.js +279 -0
- package/dist/index-Dm3wmB0K.js +435 -0
- package/dist/index-DzS6-D3M.js +1640 -0
- package/dist/index-PKkV63Sw.js +1143 -0
- package/dist/index-SbMjh8t4.js +574 -0
- package/dist/index-cdB5K3gx.js +814 -0
- package/dist/index-mnWs_wA3.js +93 -0
- package/dist/index-nU-V276i.js +170 -0
- package/dist/index-nW0ikV2R.js +2700 -0
- package/dist/index-uF04Ucsi.js +8 -0
- package/dist/index-x_7Rmav9.js +118 -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/{menuPermission-D9NGpBZP.js → menuPermission-DHUqvHfu.js} +1 -1
- package/dist/pages.js +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { jsxs as c, jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import v, { useState as d, useEffect as _, useMemo as h } from "react";
|
|
3
|
+
import { useLocation as N } from "react-router-dom";
|
|
4
|
+
import { g as b, s as g } from "./ComponentDoc-BFoF51we.js";
|
|
5
|
+
import { i as K, P as x } from "./schedule-CETzN_0H.js";
|
|
6
|
+
const E = "_banner_2v7mc_1", S = "_dot_2v7mc_18", f = "_text_2v7mc_26", A = "_retry_2v7mc_31", F = "_dismiss_2v7mc_44", P = "_details_2v7mc_57", k = "_method_2v7mc_85", C = "_status_2v7mc_86", D = "_statusNet_2v7mc_87", $ = "_url_2v7mc_88", e = {
|
|
7
|
+
banner: E,
|
|
8
|
+
dot: S,
|
|
9
|
+
text: f,
|
|
10
|
+
retry: A,
|
|
11
|
+
dismiss: F,
|
|
12
|
+
details: P,
|
|
13
|
+
method: k,
|
|
14
|
+
status: C,
|
|
15
|
+
statusNet: D,
|
|
16
|
+
url: $
|
|
17
|
+
}, B = () => {
|
|
18
|
+
const { pathname: i } = N(), [s, n] = d(b()), [l, m] = d(0);
|
|
19
|
+
_(() => g(n), []), _(() => {
|
|
20
|
+
m(0);
|
|
21
|
+
}, [i]);
|
|
22
|
+
const u = h(
|
|
23
|
+
() => s.filter((t) => t.route === i && t.at >= l),
|
|
24
|
+
[s, i, l]
|
|
25
|
+
), p = h(() => {
|
|
26
|
+
const t = /* @__PURE__ */ new Map();
|
|
27
|
+
return u.forEach((r) => {
|
|
28
|
+
const o = t.get(r.status) ?? { status: r.status, count: 0, urls: [] };
|
|
29
|
+
o.count += 1, o.urls.includes(r.url) || o.urls.push(r.url), t.set(r.status, o);
|
|
30
|
+
}), [...t.values()].sort((r, o) => r.status - o.status);
|
|
31
|
+
}, [u]);
|
|
32
|
+
if (u.length === 0) return null;
|
|
33
|
+
const y = p.map((t) => `${t.status === 0 ? "网络错误" : t.status} ×${t.count}`).join(" · ");
|
|
34
|
+
return /* @__PURE__ */ c("div", { className: e.banner, role: "alert", "data-testid": "page-api-error-notice", children: [
|
|
35
|
+
/* @__PURE__ */ a("span", { className: e.dot }),
|
|
36
|
+
/* @__PURE__ */ c("span", { className: e.text, children: [
|
|
37
|
+
"本页有 ",
|
|
38
|
+
u.length,
|
|
39
|
+
" 个接口失败(",
|
|
40
|
+
y,
|
|
41
|
+
"),页面可能不完整。"
|
|
42
|
+
] }),
|
|
43
|
+
/* @__PURE__ */ a("button", { type: "button", className: e.retry, onClick: () => location.reload(), children: "重试" }),
|
|
44
|
+
/* @__PURE__ */ c("details", { className: e.details, children: [
|
|
45
|
+
/* @__PURE__ */ a("summary", { children: "失败明细" }),
|
|
46
|
+
/* @__PURE__ */ a("ul", { children: u.map((t, r) => /* @__PURE__ */ c("li", { children: [
|
|
47
|
+
/* @__PURE__ */ a("span", { className: e.method, children: t.method }),
|
|
48
|
+
/* @__PURE__ */ a("span", { className: t.status === 0 ? e.statusNet : e.status, children: t.status === 0 ? "网络" : t.status }),
|
|
49
|
+
/* @__PURE__ */ a("span", { className: e.url, children: t.url })
|
|
50
|
+
] }, `${t.at}-${r}`)) })
|
|
51
|
+
] }),
|
|
52
|
+
/* @__PURE__ */ a(
|
|
53
|
+
"button",
|
|
54
|
+
{
|
|
55
|
+
type: "button",
|
|
56
|
+
className: e.dismiss,
|
|
57
|
+
title: "本页浏览期间不再显示",
|
|
58
|
+
onClick: () => m(Date.now() + 1),
|
|
59
|
+
children: "忽略"
|
|
60
|
+
}
|
|
61
|
+
)
|
|
62
|
+
] });
|
|
63
|
+
};
|
|
64
|
+
class T extends v.Component {
|
|
65
|
+
constructor() {
|
|
66
|
+
super(...arguments), this.state = { error: null, resetKey: this.props.resetKey };
|
|
67
|
+
}
|
|
68
|
+
static getDerivedStateFromError(s) {
|
|
69
|
+
return { error: s };
|
|
70
|
+
}
|
|
71
|
+
static getDerivedStateFromProps(s, n) {
|
|
72
|
+
return n.error && s.resetKey !== n.resetKey ? { error: null, resetKey: s.resetKey } : s.resetKey !== n.resetKey ? { resetKey: s.resetKey } : null;
|
|
73
|
+
}
|
|
74
|
+
render() {
|
|
75
|
+
const { error: s } = this.state;
|
|
76
|
+
if (s) {
|
|
77
|
+
const n = K(s);
|
|
78
|
+
return /* @__PURE__ */ a(
|
|
79
|
+
x,
|
|
80
|
+
{
|
|
81
|
+
error: s,
|
|
82
|
+
retry: () => this.setState({ error: null }),
|
|
83
|
+
retryText: n ? "重试加载" : "重试渲染"
|
|
84
|
+
}
|
|
85
|
+
);
|
|
86
|
+
}
|
|
87
|
+
return this.props.children;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
export {
|
|
91
|
+
B as P,
|
|
92
|
+
T as R
|
|
93
|
+
};
|
|
@@ -0,0 +1,170 @@
|
|
|
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-ZUKv4XMX.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 { d as V, e as X } from "./api-CIhVblfa.js";
|
|
11
|
+
import { u as s } from "./useAppStore-BBr_Fwsz.js";
|
|
12
|
+
import { b as Y } from "./mobile-client-O3yr9h6t.js";
|
|
13
|
+
import { s as Z } from "./send-default-agent-team-message-CfVaEN2y.js";
|
|
14
|
+
function de() {
|
|
15
|
+
const h = Q(), f = J.parse(h.search), c = String(
|
|
16
|
+
f.scenarioCode ?? f.scenario_code ?? ""
|
|
17
|
+
).trim(), a = String(
|
|
18
|
+
f.projectName ?? f.project_name ?? ""
|
|
19
|
+
).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) => {
|
|
20
|
+
$((o) => [...o, e]), p(t);
|
|
21
|
+
}, []), n = R(() => c ? a ? "" : "缺少参数 projectName" : "缺少参数 scenarioCode", [a, c]);
|
|
22
|
+
E(() => {
|
|
23
|
+
if (n)
|
|
24
|
+
return;
|
|
25
|
+
let e = !1, t = 0;
|
|
26
|
+
const o = 100;
|
|
27
|
+
let S = !1, P = 0;
|
|
28
|
+
const A = 3;
|
|
29
|
+
return (() => {
|
|
30
|
+
if (e)
|
|
31
|
+
return;
|
|
32
|
+
const v = async () => {
|
|
33
|
+
if (e)
|
|
34
|
+
return;
|
|
35
|
+
let l = D();
|
|
36
|
+
if ((!l || !U(l)) && !S) {
|
|
37
|
+
S = !0;
|
|
38
|
+
try {
|
|
39
|
+
const m = await z();
|
|
40
|
+
m.kind === "authenticated" ? l = m.user : m.kind === "unauthenticated" && (P += 1);
|
|
41
|
+
} catch {
|
|
42
|
+
} finally {
|
|
43
|
+
S = !1;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
if (l && U(l)) {
|
|
47
|
+
g(F(l));
|
|
48
|
+
const m = s.getState().token;
|
|
49
|
+
try {
|
|
50
|
+
const L = await X(m);
|
|
51
|
+
e || g(L);
|
|
52
|
+
} catch {
|
|
53
|
+
!e && m && (localStorage.removeItem("z_team_token"), s.setState({ token: "" }));
|
|
54
|
+
} finally {
|
|
55
|
+
e || I(!0);
|
|
56
|
+
}
|
|
57
|
+
return;
|
|
58
|
+
}
|
|
59
|
+
if (P >= A) {
|
|
60
|
+
T();
|
|
61
|
+
return;
|
|
62
|
+
}
|
|
63
|
+
if (t += 1, t >= o) {
|
|
64
|
+
T();
|
|
65
|
+
return;
|
|
66
|
+
}
|
|
67
|
+
window.setTimeout(() => void v(), 150);
|
|
68
|
+
};
|
|
69
|
+
v();
|
|
70
|
+
})(), () => {
|
|
71
|
+
e = !0;
|
|
72
|
+
};
|
|
73
|
+
}, [n, g]);
|
|
74
|
+
const q = (e) => new Promise((t) => {
|
|
75
|
+
window.setTimeout(t, e);
|
|
76
|
+
});
|
|
77
|
+
E(() => {
|
|
78
|
+
if (n) {
|
|
79
|
+
y(n);
|
|
80
|
+
return;
|
|
81
|
+
}
|
|
82
|
+
!j || C.current || (C.current = !0, (async () => {
|
|
83
|
+
try {
|
|
84
|
+
const e = s.getState().token;
|
|
85
|
+
p("正在按场景创建工程…");
|
|
86
|
+
const t = await V(
|
|
87
|
+
{
|
|
88
|
+
name: a,
|
|
89
|
+
description: "",
|
|
90
|
+
workspace_path: a,
|
|
91
|
+
scenario_code: c
|
|
92
|
+
},
|
|
93
|
+
e
|
|
94
|
+
);
|
|
95
|
+
u("工程已创建", "正在打开协作区…"), p("正在同步工程列表…"), await _(t);
|
|
96
|
+
const o = s.getState();
|
|
97
|
+
o.currentProject && await o.refreshProjectPanels(
|
|
98
|
+
String(o.currentProject.id),
|
|
99
|
+
o.projectSwitchSeq,
|
|
100
|
+
!1
|
|
101
|
+
), u(
|
|
102
|
+
"协作区已就绪",
|
|
103
|
+
i ? "正在发送协作消息…" : "即将进入工作台…"
|
|
104
|
+
), i && (await Z(
|
|
105
|
+
t.id,
|
|
106
|
+
i,
|
|
107
|
+
e,
|
|
108
|
+
s.getState().members
|
|
109
|
+
), await s.getState().loadMessages(), u("协作消息已发送", "即将进入工作台…")), p("即将进入工作台…"), await q(2e3), b.replace(
|
|
110
|
+
Y({
|
|
111
|
+
projectId: t.id,
|
|
112
|
+
search: h.search
|
|
113
|
+
})
|
|
114
|
+
);
|
|
115
|
+
} catch (e) {
|
|
116
|
+
const t = e instanceof Error ? e.message : String(e);
|
|
117
|
+
y(t || "创建工程失败");
|
|
118
|
+
}
|
|
119
|
+
})());
|
|
120
|
+
}, [
|
|
121
|
+
u,
|
|
122
|
+
j,
|
|
123
|
+
_,
|
|
124
|
+
i,
|
|
125
|
+
h.search,
|
|
126
|
+
n,
|
|
127
|
+
a,
|
|
128
|
+
c
|
|
129
|
+
]);
|
|
130
|
+
const N = R(() => {
|
|
131
|
+
if (n)
|
|
132
|
+
return "";
|
|
133
|
+
const e = [`场景 ${c}`, `工程 ${a}`];
|
|
134
|
+
return i && e.push("含首条协作消息"), e.join(" · ");
|
|
135
|
+
}, [i, n, a, c]);
|
|
136
|
+
return w ? /* @__PURE__ */ r("div", { className: "from-scenario-page", children: /* @__PURE__ */ r(
|
|
137
|
+
B,
|
|
138
|
+
{
|
|
139
|
+
status: "error",
|
|
140
|
+
title: "无法创建工程",
|
|
141
|
+
subTitle: w,
|
|
142
|
+
extra: /* @__PURE__ */ r(
|
|
143
|
+
H,
|
|
144
|
+
{
|
|
145
|
+
type: "primary",
|
|
146
|
+
onClick: () => b.replace("/workspace"),
|
|
147
|
+
children: "返回工作台"
|
|
148
|
+
}
|
|
149
|
+
)
|
|
150
|
+
}
|
|
151
|
+
) }) : /* @__PURE__ */ r("div", { className: "from-scenario-page", children: /* @__PURE__ */ x("div", { className: "from-scenario-page__panel", children: [
|
|
152
|
+
/* @__PURE__ */ r(G, { size: "large" }),
|
|
153
|
+
/* @__PURE__ */ r("p", { className: "from-scenario-page__step", children: M }),
|
|
154
|
+
N ? /* @__PURE__ */ r("p", { className: "from-scenario-page__hint", children: N }) : null,
|
|
155
|
+
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(
|
|
156
|
+
"li",
|
|
157
|
+
{
|
|
158
|
+
className: "from-scenario-page__done-item",
|
|
159
|
+
children: [
|
|
160
|
+
/* @__PURE__ */ r(W, { className: "from-scenario-page__done-icon" }),
|
|
161
|
+
/* @__PURE__ */ r("span", { children: e })
|
|
162
|
+
]
|
|
163
|
+
},
|
|
164
|
+
`${t}-${e}`
|
|
165
|
+
)) }) : null
|
|
166
|
+
] }) });
|
|
167
|
+
}
|
|
168
|
+
export {
|
|
169
|
+
de as default
|
|
170
|
+
};
|