@yuku123/z-team-component 0.2.125 → 0.2.127
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-BCNmClCn.js → ChangeLogView-BWcf9eFT.js} +1 -1
- package/dist/{ComponentDoc-DUbdB21y.js → ComponentDoc-MAAFSdex.js} +739 -711
- package/dist/{InvitationManagementPage-BSkhuSG7.js → InvitationManagementPage-DB3CeBs-.js} +1 -1
- package/dist/{OnboardingPage-BYflka-A.js → OnboardingPage-KwEQlQ9m.js} +2 -2
- package/dist/{ScheduledTasks-DhNtpf_h.js → ScheduledTasks-BQnjn17C.js} +4193 -4249
- package/dist/{SystemShell-1Nj8U5oA.js → SystemShell-xfKRXTHa.js} +4 -4
- package/dist/{admin-logs-Bz9LbaBv.js → admin-logs-BBniVCWG.js} +1 -1
- package/dist/{api-DMM8bqbG.js → api-CErncfky.js} +1 -1
- package/dist/{api-CzRMcBjB.js → api-CIzOXga5.js} +1 -1
- package/dist/{createWorkspaceWsHandler-oO2oqrCT.js → createWorkspaceWsHandler-DZc2EeOE.js} +4570 -4748
- package/dist/{index-Cl7F79v-.js → index-9cmnvhwH.js} +6 -6
- package/dist/index-BK0TLurx.js +1718 -0
- package/dist/{index-F3EHd_Bp.js → index-BNfRZbfa.js} +2 -2
- package/dist/{index-BO6svfFf.js → index-BPDcCJys.js} +161 -173
- package/dist/{index-BIQrwBjr.js → index-BTnwvvjN.js} +3 -3
- package/dist/index-BWlQEPJO.js +10332 -0
- package/dist/{index-C2g3oKOG.js → index-BZdTJbw5.js} +1 -1
- package/dist/{index-BE8SfZJn.js → index-BbmFLkXG.js} +3 -3
- package/dist/{index-BnU20NG8.js → index-Bchg8LCD.js} +1 -1
- package/dist/index-BkbSCWQ7.js +106 -0
- package/dist/{index-C-oyKUzB.js → index-BmgJG2c3.js} +2 -2
- package/dist/{index-BBYq4ppb.js → index-BsxfUGiv.js} +3 -3
- package/dist/{index-CuTA2Z3L.js → index-C6uTjD16.js} +2 -2
- package/dist/{index-ChcWNrh2.js → index-CcsEH7Y7.js} +3 -3
- package/dist/{index-BZFlyy3v.js → index-CjKs2OyG.js} +2 -2
- package/dist/{index-O9gJU-ob.js → index-Cqzxd3l5.js} +2 -2
- package/dist/{index-BDG94SYZ.js → index-Cxz8YOXI.js} +3 -3
- package/dist/{index-vqwbINqL.js → index-D7PjZbJz.js} +291 -295
- package/dist/{index-B5v1cx22.js → index-DMScwqnC.js} +1 -1
- package/dist/{index-8yhn34ac.js → index-DTRR9SFq.js} +4 -4
- package/dist/{index-sIpnyuVL.js → index-DVdVtFor.js} +2 -2
- package/dist/{index-CVjpwaLE.js → index-DmO4sKus.js} +2 -2
- package/dist/{index-Q_PGzJxp.js → index-DqAba7Rt.js} +1 -1
- package/dist/{index-BxTHdIKE.js → index-HU-dTCwe.js} +3 -3
- package/dist/{index-BRHADkwf.js → index-nu3p6CB7.js} +34 -41
- package/dist/{index-BKcD8ke6.js → index-vn1AwgKA.js} +2 -2
- package/dist/index.js +1 -1
- package/dist/{instance-Di3Okyde.js → instance-C7K_c-Ic.js} +31 -61
- package/dist/{menuPermission-DDDxCQho.js → menuPermission-ClR4xmR1.js} +3 -3
- package/dist/pages.js +1 -1
- package/dist/{send-default-agent-team-message-DRltTeoE.js → send-default-agent-team-message-BkUCZ7h9.js} +1 -1
- package/dist/{sso-user-Bf0ucITy.js → sso-user-B9VemiQi.js} +1 -1
- package/dist/{training-AHO9f08C.js → training-s01hnxH7.js} +1 -1
- package/dist/{webide-xYVV0VjK.js → webide-CJ8I_wyf.js} +3 -3
- package/dist/z-team-component.css +1 -1
- package/package.json +1 -1
- package/dist/index-BC7XYopF.js +0 -1645
- package/dist/index-CX43f-gO.js +0 -66
- package/dist/index-u6RIeHVE.js +0 -10184
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsxs as c, jsx as a } from "react/jsx-runtime";
|
|
2
2
|
import v, { useState as d, useEffect as _, useMemo as h } from "react";
|
|
3
3
|
import { useLocation as N } from "react-router-dom";
|
|
4
|
-
import { w as b, x as g } from "./ComponentDoc-
|
|
5
|
-
import { i as x, P as K } from "./index-
|
|
4
|
+
import { w as b, x as g } from "./ComponentDoc-MAAFSdex.js";
|
|
5
|
+
import { i as x, P as K } from "./index-DMScwqnC.js";
|
|
6
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
7
|
banner: E,
|
|
8
8
|
dot: S,
|
|
@@ -1,40 +1,40 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as p, jsx as t } from "react/jsx-runtime";
|
|
2
2
|
import { r as D, f as le } from "./ctc-sso-DtJHC-2M.js";
|
|
3
|
-
import { r as de, h as
|
|
4
|
-
import { ArrowLeftOutlined as ue,
|
|
5
|
-
import { Spin as O, Button as
|
|
6
|
-
import
|
|
7
|
-
import { useState as y, useRef as E, useEffect as w, useMemo as Y, useCallback as
|
|
8
|
-
import { useLocation as
|
|
3
|
+
import { r as de, h as Z, s as $ } from "./sso-user-B9VemiQi.js";
|
|
4
|
+
import { ArrowLeftOutlined as ue, LogoutOutlined as pe, SearchOutlined as me } from "@ant-design/icons";
|
|
5
|
+
import { Spin as O, Button as K, Input as he, Empty as J, Tag as fe, message as ge } from "antd";
|
|
6
|
+
import B from "query-string";
|
|
7
|
+
import { useState as y, useRef as E, useEffect as w, useMemo as Y, useCallback as q } from "react";
|
|
8
|
+
import { useLocation as be } from "react-router-dom";
|
|
9
9
|
import { h as A } from "./history-BlrA1eaW.js";
|
|
10
|
-
import { c as
|
|
11
|
-
import { u as
|
|
12
|
-
import { l as
|
|
13
|
-
import { i as
|
|
10
|
+
import { c as ke, C as we } from "./createWorkspaceWsHandler-DZc2EeOE.js";
|
|
11
|
+
import { u as c, N as Se, Q as ye, U as ve, V as Ne, W as Te, X as je, k as ee } from "./ComponentDoc-MAAFSdex.js";
|
|
12
|
+
import { l as Ce, j as Pe } from "./instance-C7K_c-Ic.js";
|
|
13
|
+
import { i as xe, s as _e } from "./mobile-client-O3yr9h6t.js";
|
|
14
14
|
/* empty css */
|
|
15
|
-
import { s as
|
|
16
|
-
const
|
|
17
|
-
function
|
|
18
|
-
let
|
|
15
|
+
import { s as Ee } from "./admin-logs-BBniVCWG.js";
|
|
16
|
+
const re = 2e4;
|
|
17
|
+
function Ae(o, i = re, n = globalThis) {
|
|
18
|
+
let s = null;
|
|
19
19
|
return {
|
|
20
20
|
start() {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
},
|
|
21
|
+
s == null && (s = n.setTimeout(() => {
|
|
22
|
+
s = null, o();
|
|
23
|
+
}, i));
|
|
24
24
|
},
|
|
25
25
|
stop() {
|
|
26
|
-
|
|
26
|
+
s != null && (n.clearTimeout(s), s = null);
|
|
27
27
|
}
|
|
28
28
|
};
|
|
29
29
|
}
|
|
30
|
-
function
|
|
31
|
-
return /* @__PURE__ */
|
|
30
|
+
function Ie({ text: o, onRetry: i }) {
|
|
31
|
+
return /* @__PURE__ */ p("div", { style: { marginTop: 12, textAlign: "center" }, children: [
|
|
32
32
|
/* @__PURE__ */ t("div", { style: { marginBottom: 10 }, children: o }),
|
|
33
33
|
/* @__PURE__ */ t(
|
|
34
34
|
"button",
|
|
35
35
|
{
|
|
36
36
|
type: "button",
|
|
37
|
-
onClick:
|
|
37
|
+
onClick: i,
|
|
38
38
|
style: {
|
|
39
39
|
padding: "6px 16px",
|
|
40
40
|
borderRadius: 6,
|
|
@@ -48,39 +48,39 @@ function Le({ text: o, onRetry: s }) {
|
|
|
48
48
|
)
|
|
49
49
|
] });
|
|
50
50
|
}
|
|
51
|
-
const
|
|
52
|
-
function
|
|
51
|
+
const Le = "统一登录接入超时(可能是网络抖动或服务正在重启),请重新登录。";
|
|
52
|
+
function Me({
|
|
53
53
|
loadingText: o,
|
|
54
|
-
timeoutText:
|
|
54
|
+
timeoutText: i = Le,
|
|
55
55
|
onRetry: n,
|
|
56
|
-
timeoutMs:
|
|
57
|
-
className:
|
|
56
|
+
timeoutMs: s = re,
|
|
57
|
+
className: a
|
|
58
58
|
}) {
|
|
59
59
|
const [T, h] = y(!1), g = E(n);
|
|
60
60
|
return g.current = n, w(() => {
|
|
61
|
-
const m =
|
|
61
|
+
const m = Ae(
|
|
62
62
|
() => h(!0),
|
|
63
|
-
|
|
63
|
+
s
|
|
64
64
|
);
|
|
65
65
|
return m.start(), () => m.stop();
|
|
66
|
-
}, [
|
|
66
|
+
}, [s]), T ? /* @__PURE__ */ p("div", { className: a, children: [
|
|
67
67
|
/* @__PURE__ */ t(O, { description: "" }),
|
|
68
68
|
/* @__PURE__ */ t(
|
|
69
|
-
|
|
69
|
+
Ie,
|
|
70
70
|
{
|
|
71
|
-
text:
|
|
71
|
+
text: i,
|
|
72
72
|
onRetry: () => g.current()
|
|
73
73
|
}
|
|
74
74
|
)
|
|
75
|
-
] }) : /* @__PURE__ */ t("div", { className:
|
|
75
|
+
] }) : /* @__PURE__ */ t("div", { className: a, children: /* @__PURE__ */ t(O, { description: o }) });
|
|
76
76
|
}
|
|
77
|
-
function
|
|
77
|
+
function Oe(o, i) {
|
|
78
78
|
w(() => {
|
|
79
79
|
if (o == null)
|
|
80
80
|
return;
|
|
81
|
-
|
|
81
|
+
c.getState().setObserverStatus(null);
|
|
82
82
|
const n = () => {
|
|
83
|
-
const m =
|
|
83
|
+
const m = c.getState();
|
|
84
84
|
m.loadMessages().catch(() => {
|
|
85
85
|
}), m.loadRunningExecutions().catch(() => {
|
|
86
86
|
});
|
|
@@ -88,94 +88,94 @@ function Re(o, s) {
|
|
|
88
88
|
f != null && f.taskId && m.loadTaskMessages(f.taskId).catch(() => {
|
|
89
89
|
}), m.loadFileTree(void 0, !0).catch(() => {
|
|
90
90
|
});
|
|
91
|
-
},
|
|
92
|
-
|
|
91
|
+
}, s = Se((m) => {
|
|
92
|
+
c.getState().setWsState(m);
|
|
93
93
|
});
|
|
94
|
-
|
|
94
|
+
ye(o, i, n), c.getState().loadRunningExecutions().catch(() => {
|
|
95
95
|
});
|
|
96
|
-
const
|
|
96
|
+
const a = c.getState(), { handler: T, dispose: h } = ke({
|
|
97
97
|
projectId: o,
|
|
98
|
-
token:
|
|
99
|
-
updateExecution:
|
|
100
|
-
registerExecutionStart:
|
|
101
|
-
clearExecution:
|
|
102
|
-
applyExecutionCancelled:
|
|
103
|
-
addMessage:
|
|
104
|
-
addTaskMessage:
|
|
105
|
-
deleteMessage:
|
|
106
|
-
updateMessageReadStatus:
|
|
107
|
-
loadFileTree:
|
|
108
|
-
}), g =
|
|
98
|
+
token: i,
|
|
99
|
+
updateExecution: a.updateExecution,
|
|
100
|
+
registerExecutionStart: a.registerExecutionStart,
|
|
101
|
+
clearExecution: a.clearExecution,
|
|
102
|
+
applyExecutionCancelled: a.applyExecutionCancelled,
|
|
103
|
+
addMessage: a.addMessage,
|
|
104
|
+
addTaskMessage: a.addTaskMessage,
|
|
105
|
+
deleteMessage: a.deleteMessage,
|
|
106
|
+
updateMessageReadStatus: a.updateMessageReadStatus,
|
|
107
|
+
loadFileTree: a.loadFileTree
|
|
108
|
+
}), g = ve(T);
|
|
109
109
|
return () => {
|
|
110
|
-
g(), h(),
|
|
110
|
+
g(), h(), Ne(), s(), c.getState().setObserverStatus(null);
|
|
111
111
|
};
|
|
112
|
-
}, [o,
|
|
112
|
+
}, [o, i]);
|
|
113
113
|
}
|
|
114
|
-
const
|
|
114
|
+
const Re = `${window.publicPath ?? "/"}logo.svg`;
|
|
115
115
|
function te() {
|
|
116
|
-
const { pathname: o, search:
|
|
116
|
+
const { pathname: o, search: i } = A.location, n = B.parse(i);
|
|
117
117
|
if (!n.projectId && !n.project_id)
|
|
118
118
|
return;
|
|
119
119
|
delete n.projectId, delete n.project_id;
|
|
120
|
-
const
|
|
120
|
+
const s = B.stringify(n);
|
|
121
121
|
A.replace({
|
|
122
122
|
pathname: o,
|
|
123
|
-
search:
|
|
123
|
+
search: s ? `?${s}` : ""
|
|
124
124
|
});
|
|
125
125
|
}
|
|
126
|
-
function
|
|
127
|
-
const o =
|
|
126
|
+
function Je() {
|
|
127
|
+
const o = be(), [i, n] = y("list"), [s, a] = y("chat"), [T, h] = y("team"), [g, m] = y(""), [f, Q] = y(!1), [ae, I] = y(!1), {
|
|
128
128
|
currentProject: v,
|
|
129
129
|
currentUser: R,
|
|
130
130
|
projects: L,
|
|
131
131
|
loading: ne,
|
|
132
132
|
members: W,
|
|
133
133
|
token: oe,
|
|
134
|
-
loadProjects:
|
|
135
|
-
expandProject:
|
|
134
|
+
loadProjects: V,
|
|
135
|
+
expandProject: z,
|
|
136
136
|
updateCurrentUser: j,
|
|
137
137
|
requestChatScrollBottom: S
|
|
138
|
-
} =
|
|
139
|
-
const e =
|
|
140
|
-
if (!
|
|
138
|
+
} = c(), k = Y(() => {
|
|
139
|
+
const e = B.parse(o.search), r = String(e.projectId ?? e.project_id ?? "").trim();
|
|
140
|
+
if (!r)
|
|
141
141
|
return null;
|
|
142
|
-
const l = Number(
|
|
142
|
+
const l = Number(r);
|
|
143
143
|
return Number.isFinite(l) && l > 0 ? l : null;
|
|
144
|
-
}, [o.search]), U = E(!1), C = E(!1), P = E(!1),
|
|
145
|
-
|
|
144
|
+
}, [o.search]), U = E(!1), C = E(!1), P = E(!1), H = E(k);
|
|
145
|
+
H.current = k, Oe(v == null ? void 0 : v.id, oe), w(() => (document.body.classList.add("team-phone-workspace-route"), () => {
|
|
146
146
|
document.body.classList.remove("team-phone-workspace-route");
|
|
147
147
|
}), []), w(() => {
|
|
148
|
-
!
|
|
148
|
+
!xe(o.search) && _e() || A.replace({
|
|
149
149
|
pathname: "/workspace",
|
|
150
150
|
search: o.search
|
|
151
151
|
});
|
|
152
152
|
}, [o.search]);
|
|
153
|
-
const se =
|
|
153
|
+
const se = q(
|
|
154
154
|
(e) => {
|
|
155
|
-
|
|
155
|
+
a("chat"), h(e), S(e, !0);
|
|
156
156
|
},
|
|
157
157
|
[S]
|
|
158
158
|
);
|
|
159
159
|
w(() => {
|
|
160
|
-
let e = !1,
|
|
160
|
+
let e = !1, r = 0;
|
|
161
161
|
const l = 100;
|
|
162
162
|
let x = !1, F = 0;
|
|
163
163
|
const M = 3, N = (b) => {
|
|
164
|
-
const
|
|
165
|
-
if (
|
|
166
|
-
e || (j(
|
|
164
|
+
const d = c.getState().token;
|
|
165
|
+
if (H.current != null) {
|
|
166
|
+
e || (j($(b)), Q(!0)), ee().then((G) => {
|
|
167
167
|
e || j(G);
|
|
168
168
|
}).catch(() => {
|
|
169
|
-
!e &&
|
|
169
|
+
!e && d && (localStorage.removeItem("z_team_token"), c.setState({ token: "" }));
|
|
170
170
|
});
|
|
171
171
|
return;
|
|
172
172
|
}
|
|
173
173
|
ee().then((G) => {
|
|
174
174
|
e || j(G);
|
|
175
175
|
}).catch(() => {
|
|
176
|
-
e || (
|
|
176
|
+
e || (d && (localStorage.removeItem("z_team_token"), c.setState({ token: "" })), j($(b)));
|
|
177
177
|
}).finally(() => {
|
|
178
|
-
e ||
|
|
178
|
+
e || Q(!0);
|
|
179
179
|
});
|
|
180
180
|
};
|
|
181
181
|
return (() => {
|
|
@@ -184,26 +184,26 @@ function Ye() {
|
|
|
184
184
|
const b = async () => {
|
|
185
185
|
if (e)
|
|
186
186
|
return;
|
|
187
|
-
let
|
|
188
|
-
if ((!
|
|
187
|
+
let d = de();
|
|
188
|
+
if ((!d || !Z(d)) && !x) {
|
|
189
189
|
x = !0;
|
|
190
190
|
try {
|
|
191
|
-
const
|
|
192
|
-
|
|
191
|
+
const u = await le();
|
|
192
|
+
u.kind === "authenticated" ? d = u.user : u.kind === "unauthenticated" && (F += 1);
|
|
193
193
|
} catch {
|
|
194
194
|
} finally {
|
|
195
195
|
x = !1;
|
|
196
196
|
}
|
|
197
197
|
}
|
|
198
|
-
if (
|
|
199
|
-
N(
|
|
198
|
+
if (d && Z(d)) {
|
|
199
|
+
N(d);
|
|
200
200
|
return;
|
|
201
201
|
}
|
|
202
202
|
if (F >= M) {
|
|
203
203
|
D();
|
|
204
204
|
return;
|
|
205
205
|
}
|
|
206
|
-
if (
|
|
206
|
+
if (r += 1, r >= l) {
|
|
207
207
|
D();
|
|
208
208
|
return;
|
|
209
209
|
}
|
|
@@ -216,38 +216,38 @@ function Ye() {
|
|
|
216
216
|
e = !0;
|
|
217
217
|
};
|
|
218
218
|
}, [j]), w(() => {
|
|
219
|
-
R &&
|
|
220
|
-
}, [R,
|
|
219
|
+
R && V();
|
|
220
|
+
}, [R, V]), w(() => {
|
|
221
221
|
var l;
|
|
222
|
-
if (!f || k != null ||
|
|
222
|
+
if (!f || k != null || i === "project" || P.current)
|
|
223
223
|
return;
|
|
224
|
-
const e =
|
|
225
|
-
|
|
226
|
-
}, [f, k,
|
|
227
|
-
const ce =
|
|
224
|
+
const e = c.getState(), r = (l = e.currentProject) == null ? void 0 : l.id;
|
|
225
|
+
r == null || !e.expandedProjectIds.includes(String(r)) || (n("project"), a("chat"), h("team"), S("team", !0));
|
|
226
|
+
}, [f, k, i, S]);
|
|
227
|
+
const ce = q(
|
|
228
228
|
async (e) => {
|
|
229
229
|
P.current = !1, I(!0);
|
|
230
230
|
try {
|
|
231
|
-
await
|
|
232
|
-
const
|
|
233
|
-
|
|
234
|
-
String(
|
|
235
|
-
|
|
231
|
+
await z(e), n("project"), a("chat"), h("team");
|
|
232
|
+
const r = c.getState();
|
|
233
|
+
r.currentProject && await r.refreshProjectPanels(
|
|
234
|
+
String(r.currentProject.id),
|
|
235
|
+
r.projectSwitchSeq,
|
|
236
236
|
!1
|
|
237
237
|
), S("team", !0);
|
|
238
238
|
} finally {
|
|
239
239
|
I(!1);
|
|
240
240
|
}
|
|
241
241
|
},
|
|
242
|
-
[
|
|
242
|
+
[z, S]
|
|
243
243
|
);
|
|
244
244
|
w(() => {
|
|
245
245
|
var M;
|
|
246
246
|
if (!f || k == null || U.current || C.current)
|
|
247
247
|
return;
|
|
248
|
-
const e = k == null ? "" : String(k),
|
|
249
|
-
if (String(((M =
|
|
250
|
-
U.current = !0, te(), P.current = !1, n("project"),
|
|
248
|
+
const e = k == null ? "" : String(k), r = c.getState();
|
|
249
|
+
if (String(((M = r.currentProject) == null ? void 0 : M.id) ?? "") === e && r.expandedProjectIds.includes(e)) {
|
|
250
|
+
U.current = !0, te(), P.current = !1, n("project"), a("chat"), h("team"), c.getState().loadMessages().catch(() => {
|
|
251
251
|
});
|
|
252
252
|
return;
|
|
253
253
|
}
|
|
@@ -258,7 +258,7 @@ function Ye() {
|
|
|
258
258
|
for (; Date.now() < N; ) {
|
|
259
259
|
if (l)
|
|
260
260
|
return;
|
|
261
|
-
const _ =
|
|
261
|
+
const _ = c.getState();
|
|
262
262
|
if (!_.loading || _.projects.length > 0)
|
|
263
263
|
return;
|
|
264
264
|
await new Promise((b) => setTimeout(b, 50));
|
|
@@ -272,57 +272,57 @@ function Ye() {
|
|
|
272
272
|
token: N,
|
|
273
273
|
projects: _,
|
|
274
274
|
expandProject: b
|
|
275
|
-
} =
|
|
276
|
-
if (!
|
|
277
|
-
const
|
|
275
|
+
} = c.getState(), d = _.find((u) => u.id === e);
|
|
276
|
+
if (!d) {
|
|
277
|
+
const u = await Ce(e, N);
|
|
278
278
|
if (l)
|
|
279
279
|
return;
|
|
280
|
-
if (
|
|
281
|
-
|
|
280
|
+
if (u.status === "NOT_FOUND" || !u.scenarioInstance) {
|
|
281
|
+
ge.info("无此工程");
|
|
282
282
|
return;
|
|
283
283
|
}
|
|
284
|
-
if (
|
|
284
|
+
if (d = await Pe(e, N), l)
|
|
285
285
|
return;
|
|
286
286
|
}
|
|
287
|
-
if (l || !
|
|
287
|
+
if (l || !d)
|
|
288
288
|
return;
|
|
289
|
-
if (U.current = !0, await b(
|
|
290
|
-
P.current = !1, n("project"),
|
|
291
|
-
const
|
|
292
|
-
|
|
293
|
-
String(
|
|
294
|
-
|
|
289
|
+
if (U.current = !0, await b(d), !l) {
|
|
290
|
+
P.current = !1, n("project"), a("chat"), h("team"), te();
|
|
291
|
+
const u = c.getState();
|
|
292
|
+
u.currentProject && await u.refreshProjectPanels(
|
|
293
|
+
String(u.currentProject.id),
|
|
294
|
+
u.projectSwitchSeq,
|
|
295
295
|
!1
|
|
296
296
|
), S("team", !0);
|
|
297
297
|
}
|
|
298
298
|
} catch {
|
|
299
299
|
} finally {
|
|
300
|
-
I(!1), C.current = !1,
|
|
300
|
+
I(!1), C.current = !1, c.getState().loadProjects();
|
|
301
301
|
}
|
|
302
302
|
})(), () => {
|
|
303
303
|
l = !0, C.current && (C.current = !1);
|
|
304
304
|
};
|
|
305
305
|
}, [f, k]);
|
|
306
|
-
const
|
|
306
|
+
const X = Y(() => {
|
|
307
307
|
const e = g.trim().toLowerCase();
|
|
308
308
|
return e ? L.filter(
|
|
309
|
-
(
|
|
309
|
+
(r) => r.name.toLowerCase().includes(e) || (r.scenario_name ?? "").toLowerCase().includes(e)
|
|
310
310
|
) : L;
|
|
311
|
-
}, [g, L]), ie =
|
|
312
|
-
P.current = !0, n("list"),
|
|
311
|
+
}, [g, L]), ie = q(() => {
|
|
312
|
+
P.current = !0, n("list"), a("chat");
|
|
313
313
|
}, []);
|
|
314
314
|
return !f || !R ? /* @__PURE__ */ t(
|
|
315
|
-
|
|
315
|
+
Me,
|
|
316
316
|
{
|
|
317
317
|
className: "phone-workspace phone-workspace-loading",
|
|
318
318
|
loadingText: "正在接入 4A 统一登录…",
|
|
319
319
|
timeoutText: "4A 统一登录接入超时(可能是网络抖动或服务正在重启),请重新登录。",
|
|
320
320
|
onRetry: () => D()
|
|
321
321
|
}
|
|
322
|
-
) : /* @__PURE__ */
|
|
323
|
-
/* @__PURE__ */
|
|
324
|
-
|
|
325
|
-
|
|
322
|
+
) : /* @__PURE__ */ p("div", { className: "phone-workspace", children: [
|
|
323
|
+
/* @__PURE__ */ p("header", { className: "phone-workspace-header", children: [
|
|
324
|
+
i === "project" ? /* @__PURE__ */ t(
|
|
325
|
+
K,
|
|
326
326
|
{
|
|
327
327
|
type: "text",
|
|
328
328
|
icon: /* @__PURE__ */ t(ue, {}),
|
|
@@ -333,14 +333,14 @@ function Ye() {
|
|
|
333
333
|
) : /* @__PURE__ */ t(
|
|
334
334
|
"img",
|
|
335
335
|
{
|
|
336
|
-
src:
|
|
336
|
+
src: Re,
|
|
337
337
|
alt: "Z-OPC",
|
|
338
338
|
className: "phone-workspace-logo",
|
|
339
339
|
onClick: () => A.push("/welcome"),
|
|
340
340
|
style: { cursor: "pointer" }
|
|
341
341
|
}
|
|
342
342
|
),
|
|
343
|
-
/* @__PURE__ */ t("div", { className: "phone-workspace-header-title", children:
|
|
343
|
+
/* @__PURE__ */ t("div", { className: "phone-workspace-header-title", children: i === "list" ? /* @__PURE__ */ t(
|
|
344
344
|
"span",
|
|
345
345
|
{
|
|
346
346
|
className: "phone-workspace-brand",
|
|
@@ -349,52 +349,40 @@ function Ye() {
|
|
|
349
349
|
children: "Z-OPC"
|
|
350
350
|
}
|
|
351
351
|
) : /* @__PURE__ */ t("span", { className: "phone-workspace-project-name", children: (v == null ? void 0 : v.name) ?? "工程" }) }),
|
|
352
|
-
/* @__PURE__ */
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
/* @__PURE__ */ t(
|
|
364
|
-
q,
|
|
365
|
-
{
|
|
366
|
-
type: "text",
|
|
367
|
-
icon: /* @__PURE__ */ t(me, {}),
|
|
368
|
-
onClick: () => {
|
|
369
|
-
Ae();
|
|
370
|
-
},
|
|
371
|
-
"aria-label": "退出"
|
|
372
|
-
}
|
|
373
|
-
)
|
|
374
|
-
] })
|
|
352
|
+
/* @__PURE__ */ t("div", { className: "phone-workspace-header-actions", children: /* @__PURE__ */ t(
|
|
353
|
+
K,
|
|
354
|
+
{
|
|
355
|
+
type: "text",
|
|
356
|
+
icon: /* @__PURE__ */ t(pe, {}),
|
|
357
|
+
onClick: () => {
|
|
358
|
+
Ee();
|
|
359
|
+
},
|
|
360
|
+
"aria-label": "退出"
|
|
361
|
+
}
|
|
362
|
+
) })
|
|
375
363
|
] }),
|
|
376
|
-
/* @__PURE__ */ t("main", { className: "phone-workspace-main", children:
|
|
364
|
+
/* @__PURE__ */ t("main", { className: "phone-workspace-main", children: i === "list" ? /* @__PURE__ */ p("div", { className: "phone-workspace-list", children: [
|
|
377
365
|
/* @__PURE__ */ t("div", { className: "phone-workspace-search", children: /* @__PURE__ */ t(
|
|
378
|
-
|
|
366
|
+
he,
|
|
379
367
|
{
|
|
380
368
|
allowClear: !0,
|
|
381
|
-
prefix: /* @__PURE__ */ t(
|
|
369
|
+
prefix: /* @__PURE__ */ t(me, {}),
|
|
382
370
|
placeholder: "搜索项目",
|
|
383
371
|
value: g,
|
|
384
372
|
onChange: (e) => m(e.target.value)
|
|
385
373
|
}
|
|
386
374
|
) }),
|
|
387
|
-
ne && L.length === 0 ? /* @__PURE__ */ t("div", { className: "phone-workspace-list-loading", children: /* @__PURE__ */ t(O, { description: "加载项目…" }) }) :
|
|
375
|
+
ne && L.length === 0 ? /* @__PURE__ */ t("div", { className: "phone-workspace-list-loading", children: /* @__PURE__ */ t(O, { description: "加载项目…" }) }) : X.length === 0 ? /* @__PURE__ */ t(
|
|
388
376
|
J,
|
|
389
377
|
{
|
|
390
378
|
description: g ? "无匹配项目" : "暂无项目",
|
|
391
379
|
className: "phone-workspace-empty"
|
|
392
380
|
}
|
|
393
|
-
) : /* @__PURE__ */ t("ul", { className: "phone-project-list", children:
|
|
394
|
-
const
|
|
381
|
+
) : /* @__PURE__ */ t("ul", { className: "phone-project-list", children: X.map((e) => {
|
|
382
|
+
const r = Te(
|
|
395
383
|
e.created_at
|
|
396
384
|
);
|
|
397
|
-
return /* @__PURE__ */ t("li", { children: /* @__PURE__ */
|
|
385
|
+
return /* @__PURE__ */ t("li", { children: /* @__PURE__ */ p(
|
|
398
386
|
"button",
|
|
399
387
|
{
|
|
400
388
|
type: "button",
|
|
@@ -403,15 +391,15 @@ function Ye() {
|
|
|
403
391
|
ce(e);
|
|
404
392
|
},
|
|
405
393
|
children: [
|
|
406
|
-
/* @__PURE__ */
|
|
394
|
+
/* @__PURE__ */ p("div", { className: "phone-project-item-main", children: [
|
|
407
395
|
/* @__PURE__ */ t("span", { className: "phone-project-item-name", children: e.name }),
|
|
408
|
-
e.scenario_name ||
|
|
396
|
+
e.scenario_name || r ? /* @__PURE__ */ p("div", { className: "phone-project-item-meta", children: [
|
|
409
397
|
e.scenario_name ? /* @__PURE__ */ t("span", { className: "phone-project-item-scenario", children: e.scenario_name }) : null,
|
|
410
|
-
|
|
398
|
+
r ? /* @__PURE__ */ t("span", { className: "phone-project-item-time", children: r }) : null
|
|
411
399
|
] }) : null
|
|
412
400
|
] }),
|
|
413
401
|
/* @__PURE__ */ t(
|
|
414
|
-
|
|
402
|
+
fe,
|
|
415
403
|
{
|
|
416
404
|
color: e.role === "ADMIN" ? "blue" : "default",
|
|
417
405
|
className: "phone-project-item-tag",
|
|
@@ -422,23 +410,23 @@ function Ye() {
|
|
|
422
410
|
}
|
|
423
411
|
) }, e.id);
|
|
424
412
|
}) })
|
|
425
|
-
] }) : /* @__PURE__ */
|
|
426
|
-
/* @__PURE__ */
|
|
413
|
+
] }) : /* @__PURE__ */ p("div", { className: "phone-workspace-detail", children: [
|
|
414
|
+
/* @__PURE__ */ p("div", { className: "phone-project-toolbar", children: [
|
|
427
415
|
/* @__PURE__ */ t("div", { className: "phone-project-toolbar-main", children: /* @__PURE__ */ t(
|
|
428
416
|
"button",
|
|
429
417
|
{
|
|
430
418
|
type: "button",
|
|
431
|
-
className:
|
|
419
|
+
className: s === "chat" ? "phone-toolbar-tab phone-toolbar-active" : "phone-toolbar-tab",
|
|
432
420
|
onClick: () => se("team"),
|
|
433
421
|
children: "协作"
|
|
434
422
|
}
|
|
435
423
|
) }),
|
|
436
|
-
/* @__PURE__ */
|
|
424
|
+
/* @__PURE__ */ p(
|
|
437
425
|
"button",
|
|
438
426
|
{
|
|
439
427
|
type: "button",
|
|
440
|
-
className:
|
|
441
|
-
onClick: () =>
|
|
428
|
+
className: s === "members" ? "phone-toolbar-tab phone-toolbar-members phone-toolbar-active" : "phone-toolbar-tab phone-toolbar-members",
|
|
429
|
+
onClick: () => a("members"),
|
|
442
430
|
children: [
|
|
443
431
|
"成员 (",
|
|
444
432
|
W.length,
|
|
@@ -447,11 +435,11 @@ function Ye() {
|
|
|
447
435
|
}
|
|
448
436
|
)
|
|
449
437
|
] }),
|
|
450
|
-
/* @__PURE__ */ t("div", { className: "phone-workspace-detail-body", children:
|
|
438
|
+
/* @__PURE__ */ t("div", { className: "phone-workspace-detail-body", children: s === "members" ? /* @__PURE__ */ t("ul", { className: "phone-member-list", children: W.length === 0 ? /* @__PURE__ */ t(J, { description: "暂无成员" }) : W.map((e) => /* @__PURE__ */ p("li", { className: "phone-member-item", children: [
|
|
451
439
|
/* @__PURE__ */ t("span", { className: "phone-member-avatar", children: e.member_type === "AGENT" ? "🤖" : "👤" }),
|
|
452
|
-
/* @__PURE__ */
|
|
440
|
+
/* @__PURE__ */ p("div", { className: "phone-member-info", children: [
|
|
453
441
|
/* @__PURE__ */ t("span", { className: "phone-member-name", children: e.display_name }),
|
|
454
|
-
/* @__PURE__ */
|
|
442
|
+
/* @__PURE__ */ p("span", { className: "phone-member-meta", children: [
|
|
455
443
|
e.member_type === "AGENT" ? "Agent" : "成员",
|
|
456
444
|
" ·",
|
|
457
445
|
" ",
|
|
@@ -459,7 +447,7 @@ function Ye() {
|
|
|
459
447
|
] })
|
|
460
448
|
] })
|
|
461
449
|
] }, e.id)) }) : /* @__PURE__ */ t("div", { className: "phone-chat-host", children: /* @__PURE__ */ t(
|
|
462
|
-
|
|
450
|
+
we,
|
|
463
451
|
{
|
|
464
452
|
hideTabs: !0,
|
|
465
453
|
activeTab: T,
|
|
@@ -470,10 +458,10 @@ function Ye() {
|
|
|
470
458
|
}
|
|
471
459
|
) }) })
|
|
472
460
|
] }) }),
|
|
473
|
-
|
|
474
|
-
/* @__PURE__ */ t(
|
|
461
|
+
ae ? /* @__PURE__ */ t("div", { className: "phone-workspace-overlay", children: /* @__PURE__ */ t(O, { description: "正在打开工程…" }) }) : null,
|
|
462
|
+
/* @__PURE__ */ t(je, {})
|
|
475
463
|
] });
|
|
476
464
|
}
|
|
477
465
|
export {
|
|
478
|
-
|
|
466
|
+
Je as default
|
|
479
467
|
};
|
|
@@ -2,10 +2,10 @@ import { jsxs as i, jsx as a, Fragment as st } from "react/jsx-runtime";
|
|
|
2
2
|
import { ReloadOutlined as ot, SearchOutlined as lt, RightOutlined as dt, TeamOutlined as pt, MessageOutlined as ut } from "@ant-design/icons";
|
|
3
3
|
import { Button as W, Select as be, Spin as pe, Empty as y, Tag as R, Input as O } from "antd";
|
|
4
4
|
import { useState as p, useCallback as v, useEffect as Se, useMemo as ue, useRef as mt } from "react";
|
|
5
|
-
import { u as B } from "./ComponentDoc-
|
|
5
|
+
import { u as B } from "./ComponentDoc-MAAFSdex.js";
|
|
6
6
|
import { h as Ce } from "./history-BlrA1eaW.js";
|
|
7
|
-
import { C as ht } from "./createWorkspaceWsHandler-
|
|
8
|
-
import { l as _t, c as vt } from "./api-
|
|
7
|
+
import { C as ht } from "./createWorkspaceWsHandler-DZc2EeOE.js";
|
|
8
|
+
import { l as _t, c as vt } from "./api-CIzOXga5.js";
|
|
9
9
|
const ft = "product-workspace", Fe = "productCode";
|
|
10
10
|
function w(n) {
|
|
11
11
|
if (!n.ok) throw new Error(`产品接口失败 (${n.status})`);
|