@yuku123/z-team-component 0.2.76 → 0.2.77
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-BJxIhIPc.js → ChangeLogView-DwuIBDL5.js} +1 -1
- package/dist/{ComponentDoc-B-3eyp4p.js → ComponentDoc-B83ray2w.js} +5 -5
- package/dist/{InvitationManagementPage-i3wrq0OA.js → InvitationManagementPage-CIzCRWPq.js} +1 -1
- package/dist/{OnboardingPage-iq9O9Epu.js → OnboardingPage-BpjNlxUb.js} +2 -2
- package/dist/{ScheduledTasks-MpIpBSW4.js → ScheduledTasks-B87VNnoB.js} +4 -4
- package/dist/{SystemShell-CWZiZk5U.js → SystemShell-B0kCPBz3.js} +4 -4
- package/dist/{api-BGGElt7Q.js → api-CpE2blgj.js} +1 -1
- package/dist/{createWorkspaceWsHandler-C-FS738i.js → createWorkspaceWsHandler-CzfcRs0V.js} +3 -3
- package/dist/index-B2rRYGQK.js +9567 -0
- package/dist/{index-BIIBDEQK.js → index-BBu4pWAN.js} +2 -2
- package/dist/{index-C5QmTUp2.js → index-BHDrnEnt.js} +1 -1
- package/dist/{index-Cc6aOQLa.js → index-BO5y0Gwn.js} +3 -3
- package/dist/{index-WIsi8fln.js → index-B_LJRFsK.js} +73 -73
- package/dist/{index-C5VkXrgj.js → index-BoJxTQwX.js} +67 -67
- package/dist/{index-BADGOdUu.js → index-BydWNuk5.js} +392 -392
- package/dist/{index-BbQ8wWN4.js → index-CW-JDoj9.js} +3 -3
- package/dist/{index-B1jqrWPW.js → index-CpAUbzCH.js} +5 -5
- package/dist/{index-CCsPMzzt.js → index-D1KPGWN9.js} +1 -1
- package/dist/{index-CPvy4SM_.js → index-D6yh1Kok.js} +11 -11
- package/dist/{index-C9YhDxMT.js → index-DCwvhwes.js} +1 -1
- package/dist/{index-BA3lZUmW.js → index-DF2jRLkS.js} +1 -1
- package/dist/{index-rPNKkWaw.js → index-DK6-iytM.js} +1 -1
- package/dist/{index-CfCSq_SC.js → index-DTBIyd4I.js} +2 -2
- package/dist/{index-OGpLvdxS.js → index-DahQUH9c.js} +1 -1
- package/dist/{index-C6S3MIu4.js → index-DhDdFRHC.js} +2 -2
- package/dist/index-LA0c93lD.js +2908 -0
- package/dist/{index-DJ6I-pUk.js → index-Sk6xoy0n.js} +1 -1
- package/dist/{index-CjS3Zp-B.js → index-cDBJpBAd.js} +2 -2
- package/dist/index.js +1 -1
- package/dist/{instance-B9aQMplq.js → instance-CDGmSyID.js} +13 -13
- package/dist/{menuPermission-BR4aIUbf.js → menuPermission-Cn3TADR1.js} +1 -1
- package/dist/pages.js +3 -3
- package/dist/{webide-CkUCEvo0.js → webide-BM1A4eJr.js} +2629 -2626
- package/dist/z-team-component.css +1 -1
- package/package.json +1 -1
- package/dist/index-BDJCIA4p.js +0 -2882
- package/dist/index-BazxRXcl.js +0 -9419
|
@@ -2,20 +2,20 @@ import { jsxs as d, jsx as t } from "react/jsx-runtime";
|
|
|
2
2
|
import { r as q, f as le } from "./ctc-sso-DtJHC-2M.js";
|
|
3
3
|
import { r as de, h as K, s as X } from "./sso-user-CFgbZoZ1.js";
|
|
4
4
|
import { ArrowLeftOutlined as ue, PlusOutlined as pe, LogoutOutlined as me, SearchOutlined as he } from "@ant-design/icons";
|
|
5
|
-
import { Spin as
|
|
5
|
+
import { Spin as O, Button as D, Input as fe, Empty as J, Tag as ge, message as be } from "antd";
|
|
6
6
|
import Q from "query-string";
|
|
7
7
|
import { useState as y, useRef as E, useEffect as w, useMemo as Y, useCallback as B } from "react";
|
|
8
8
|
import { useLocation as ke } from "react-router-dom";
|
|
9
9
|
import { h as A } from "./history-BlrA1eaW.js";
|
|
10
|
-
import { c as we, C as Se } from "./createWorkspaceWsHandler-
|
|
10
|
+
import { c as we, C as Se } from "./createWorkspaceWsHandler-CzfcRs0V.js";
|
|
11
11
|
import { u as i, f as ye, T as ve } from "./useAppStore-DQP0l22d.js";
|
|
12
12
|
import { o as Te, q as Ne, v as je, w as Ce, e as ee } from "./api-DPkUB1DA.js";
|
|
13
|
-
import { l as
|
|
13
|
+
import { l as Pe, j as xe } from "./instance-CDGmSyID.js";
|
|
14
14
|
import { i as _e, s as Ee } from "./mobile-client-O3yr9h6t.js";
|
|
15
15
|
/* empty css */
|
|
16
16
|
import { s as Ae } from "./personal-VG7XVvW-.js";
|
|
17
|
-
const
|
|
18
|
-
function Ie(o, s =
|
|
17
|
+
const re = 2e4;
|
|
18
|
+
function Ie(o, s = re, n = globalThis) {
|
|
19
19
|
let c = null;
|
|
20
20
|
return {
|
|
21
21
|
start() {
|
|
@@ -50,12 +50,12 @@ function Le({ text: o, onRetry: s }) {
|
|
|
50
50
|
] });
|
|
51
51
|
}
|
|
52
52
|
const Me = "统一登录接入超时(可能是网络抖动或服务正在重启),请重新登录。";
|
|
53
|
-
function
|
|
53
|
+
function Oe({
|
|
54
54
|
loadingText: o,
|
|
55
55
|
timeoutText: s = Me,
|
|
56
56
|
onRetry: n,
|
|
57
|
-
timeoutMs: c =
|
|
58
|
-
className:
|
|
57
|
+
timeoutMs: c = re,
|
|
58
|
+
className: a
|
|
59
59
|
}) {
|
|
60
60
|
const [N, h] = y(!1), g = E(n);
|
|
61
61
|
return g.current = n, w(() => {
|
|
@@ -64,8 +64,8 @@ function Re({
|
|
|
64
64
|
c
|
|
65
65
|
);
|
|
66
66
|
return m.start(), () => m.stop();
|
|
67
|
-
}, [c]), N ? /* @__PURE__ */ d("div", { className:
|
|
68
|
-
/* @__PURE__ */ t(
|
|
67
|
+
}, [c]), N ? /* @__PURE__ */ d("div", { className: a, children: [
|
|
68
|
+
/* @__PURE__ */ t(O, { description: "" }),
|
|
69
69
|
/* @__PURE__ */ t(
|
|
70
70
|
Le,
|
|
71
71
|
{
|
|
@@ -73,9 +73,9 @@ function Re({
|
|
|
73
73
|
onRetry: () => g.current()
|
|
74
74
|
}
|
|
75
75
|
)
|
|
76
|
-
] }) : /* @__PURE__ */ t("div", { className:
|
|
76
|
+
] }) : /* @__PURE__ */ t("div", { className: a, children: /* @__PURE__ */ t(O, { description: o }) });
|
|
77
77
|
}
|
|
78
|
-
function
|
|
78
|
+
function Re(o, s) {
|
|
79
79
|
w(() => {
|
|
80
80
|
if (o == null)
|
|
81
81
|
return;
|
|
@@ -94,18 +94,18 @@ function Oe(o, s) {
|
|
|
94
94
|
});
|
|
95
95
|
Ne(o, s, n), i.getState().loadRunningExecutions().catch(() => {
|
|
96
96
|
});
|
|
97
|
-
const
|
|
97
|
+
const a = i.getState(), { handler: N, dispose: h } = we({
|
|
98
98
|
projectId: o,
|
|
99
99
|
token: s,
|
|
100
|
-
updateExecution:
|
|
101
|
-
registerExecutionStart:
|
|
102
|
-
clearExecution:
|
|
103
|
-
applyExecutionCancelled:
|
|
104
|
-
addMessage:
|
|
105
|
-
addTaskMessage:
|
|
106
|
-
deleteMessage:
|
|
107
|
-
updateMessageReadStatus:
|
|
108
|
-
loadFileTree:
|
|
100
|
+
updateExecution: a.updateExecution,
|
|
101
|
+
registerExecutionStart: a.registerExecutionStart,
|
|
102
|
+
clearExecution: a.clearExecution,
|
|
103
|
+
applyExecutionCancelled: a.applyExecutionCancelled,
|
|
104
|
+
addMessage: a.addMessage,
|
|
105
|
+
addTaskMessage: a.addTaskMessage,
|
|
106
|
+
deleteMessage: a.deleteMessage,
|
|
107
|
+
updateMessageReadStatus: a.updateMessageReadStatus,
|
|
108
|
+
loadFileTree: a.loadFileTree
|
|
109
109
|
}), g = je(N);
|
|
110
110
|
return () => {
|
|
111
111
|
g(), h(), Ce(), c(), i.getState().setObserverStatus(null);
|
|
@@ -125,9 +125,9 @@ function te() {
|
|
|
125
125
|
});
|
|
126
126
|
}
|
|
127
127
|
function et() {
|
|
128
|
-
const o = ke(), [s, n] = y("list"), [c,
|
|
128
|
+
const o = ke(), [s, n] = y("list"), [c, a] = y("chat"), [N, h] = y("team"), [g, m] = y(""), [f, V] = y(!1), [ae, I] = y(!1), {
|
|
129
129
|
currentProject: v,
|
|
130
|
-
currentUser:
|
|
130
|
+
currentUser: R,
|
|
131
131
|
projects: L,
|
|
132
132
|
loading: ne,
|
|
133
133
|
members: W,
|
|
@@ -137,13 +137,13 @@ function et() {
|
|
|
137
137
|
updateCurrentUser: j,
|
|
138
138
|
requestChatScrollBottom: S
|
|
139
139
|
} = i(), k = Y(() => {
|
|
140
|
-
const e = Q.parse(o.search),
|
|
141
|
-
if (!
|
|
140
|
+
const e = Q.parse(o.search), r = String(e.projectId ?? e.project_id ?? "").trim();
|
|
141
|
+
if (!r)
|
|
142
142
|
return null;
|
|
143
|
-
const l = Number(
|
|
143
|
+
const l = Number(r);
|
|
144
144
|
return Number.isFinite(l) && l > 0 ? l : null;
|
|
145
|
-
}, [o.search]), F = E(!1), C = E(!1),
|
|
146
|
-
Z.current = k,
|
|
145
|
+
}, [o.search]), F = E(!1), C = E(!1), P = E(!1), Z = E(k);
|
|
146
|
+
Z.current = k, Re(v == null ? void 0 : v.id, oe), w(() => (document.body.classList.add("team-phone-workspace-route"), () => {
|
|
147
147
|
document.body.classList.remove("team-phone-workspace-route");
|
|
148
148
|
}), []), w(() => {
|
|
149
149
|
!_e(o.search) && Ee() || A.replace({
|
|
@@ -153,14 +153,14 @@ function et() {
|
|
|
153
153
|
}, [o.search]);
|
|
154
154
|
const se = B(
|
|
155
155
|
(e) => {
|
|
156
|
-
|
|
156
|
+
a("chat"), h(e), S(e, !0);
|
|
157
157
|
},
|
|
158
158
|
[S]
|
|
159
159
|
);
|
|
160
160
|
w(() => {
|
|
161
|
-
let e = !1,
|
|
161
|
+
let e = !1, r = 0;
|
|
162
162
|
const l = 100;
|
|
163
|
-
let
|
|
163
|
+
let x = !1, U = 0;
|
|
164
164
|
const M = 3, T = (b) => {
|
|
165
165
|
const u = i.getState().token;
|
|
166
166
|
if (Z.current != null) {
|
|
@@ -186,14 +186,14 @@ function et() {
|
|
|
186
186
|
if (e)
|
|
187
187
|
return;
|
|
188
188
|
let u = de();
|
|
189
|
-
if ((!u || !K(u)) && !
|
|
190
|
-
|
|
189
|
+
if ((!u || !K(u)) && !x) {
|
|
190
|
+
x = !0;
|
|
191
191
|
try {
|
|
192
192
|
const p = await le();
|
|
193
193
|
p.kind === "authenticated" ? u = p.user : p.kind === "unauthenticated" && (U += 1);
|
|
194
194
|
} catch {
|
|
195
195
|
} finally {
|
|
196
|
-
|
|
196
|
+
x = !1;
|
|
197
197
|
}
|
|
198
198
|
}
|
|
199
199
|
if (u && K(u)) {
|
|
@@ -204,7 +204,7 @@ function et() {
|
|
|
204
204
|
q();
|
|
205
205
|
return;
|
|
206
206
|
}
|
|
207
|
-
if (
|
|
207
|
+
if (r += 1, r >= l) {
|
|
208
208
|
q();
|
|
209
209
|
return;
|
|
210
210
|
}
|
|
@@ -217,23 +217,23 @@ function et() {
|
|
|
217
217
|
e = !0;
|
|
218
218
|
};
|
|
219
219
|
}, [j]), w(() => {
|
|
220
|
-
|
|
221
|
-
}, [
|
|
220
|
+
R && z();
|
|
221
|
+
}, [R, z]), w(() => {
|
|
222
222
|
var l;
|
|
223
|
-
if (!f || k != null || s === "project" ||
|
|
223
|
+
if (!f || k != null || s === "project" || P.current)
|
|
224
224
|
return;
|
|
225
|
-
const e = i.getState(),
|
|
226
|
-
|
|
225
|
+
const e = i.getState(), r = (l = e.currentProject) == null ? void 0 : l.id;
|
|
226
|
+
r == null || !e.expandedProjectIds.includes(String(r)) || (n("project"), a("chat"), h("team"), S("team", !0));
|
|
227
227
|
}, [f, k, s, S]);
|
|
228
228
|
const ce = B(
|
|
229
229
|
async (e) => {
|
|
230
|
-
|
|
230
|
+
P.current = !1, I(!0);
|
|
231
231
|
try {
|
|
232
|
-
await H(e), n("project"),
|
|
233
|
-
const
|
|
234
|
-
|
|
235
|
-
String(
|
|
236
|
-
|
|
232
|
+
await H(e), n("project"), a("chat"), h("team");
|
|
233
|
+
const r = i.getState();
|
|
234
|
+
r.currentProject && await r.refreshProjectPanels(
|
|
235
|
+
String(r.currentProject.id),
|
|
236
|
+
r.projectSwitchSeq,
|
|
237
237
|
!1
|
|
238
238
|
), S("team", !0);
|
|
239
239
|
} finally {
|
|
@@ -246,15 +246,15 @@ function et() {
|
|
|
246
246
|
var M;
|
|
247
247
|
if (!f || k == null || F.current || C.current)
|
|
248
248
|
return;
|
|
249
|
-
const e = k == null ? "" : String(k),
|
|
250
|
-
if (String(((M =
|
|
251
|
-
F.current = !0, te(),
|
|
249
|
+
const e = k == null ? "" : String(k), r = i.getState();
|
|
250
|
+
if (String(((M = r.currentProject) == null ? void 0 : M.id) ?? "") === e && r.expandedProjectIds.includes(e)) {
|
|
251
|
+
F.current = !0, te(), P.current = !1, n("project"), a("chat"), h("team"), i.getState().loadMessages().catch(() => {
|
|
252
252
|
});
|
|
253
253
|
return;
|
|
254
254
|
}
|
|
255
255
|
let l = !1;
|
|
256
256
|
C.current = !0, I(!0);
|
|
257
|
-
const
|
|
257
|
+
const x = async () => {
|
|
258
258
|
const T = Date.now() + 4e3;
|
|
259
259
|
for (; Date.now() < T; ) {
|
|
260
260
|
if (l)
|
|
@@ -267,7 +267,7 @@ function et() {
|
|
|
267
267
|
};
|
|
268
268
|
return (async () => {
|
|
269
269
|
try {
|
|
270
|
-
if (await
|
|
270
|
+
if (await x(), l)
|
|
271
271
|
return;
|
|
272
272
|
let {
|
|
273
273
|
token: T,
|
|
@@ -275,20 +275,20 @@ function et() {
|
|
|
275
275
|
expandProject: b
|
|
276
276
|
} = i.getState(), u = _.find((p) => p.id === e);
|
|
277
277
|
if (!u) {
|
|
278
|
-
const p = await
|
|
278
|
+
const p = await Pe(e, T);
|
|
279
279
|
if (l)
|
|
280
280
|
return;
|
|
281
281
|
if (p.status === "NOT_FOUND" || !p.scenarioInstance) {
|
|
282
282
|
be.info("无此工程");
|
|
283
283
|
return;
|
|
284
284
|
}
|
|
285
|
-
if (u = await
|
|
285
|
+
if (u = await xe(e, T), l)
|
|
286
286
|
return;
|
|
287
287
|
}
|
|
288
288
|
if (l || !u)
|
|
289
289
|
return;
|
|
290
290
|
if (F.current = !0, await b(u), !l) {
|
|
291
|
-
|
|
291
|
+
P.current = !1, n("project"), a("chat"), h("team"), te();
|
|
292
292
|
const p = i.getState();
|
|
293
293
|
p.currentProject && await p.refreshProjectPanels(
|
|
294
294
|
String(p.currentProject.id),
|
|
@@ -307,13 +307,13 @@ function et() {
|
|
|
307
307
|
const $ = Y(() => {
|
|
308
308
|
const e = g.trim().toLowerCase();
|
|
309
309
|
return e ? L.filter(
|
|
310
|
-
(
|
|
310
|
+
(r) => r.name.toLowerCase().includes(e) || (r.scenario_name ?? "").toLowerCase().includes(e)
|
|
311
311
|
) : L;
|
|
312
312
|
}, [g, L]), ie = B(() => {
|
|
313
|
-
|
|
313
|
+
P.current = !0, n("list"), a("chat");
|
|
314
314
|
}, []);
|
|
315
|
-
return !f || !
|
|
316
|
-
|
|
315
|
+
return !f || !R ? /* @__PURE__ */ t(
|
|
316
|
+
Oe,
|
|
317
317
|
{
|
|
318
318
|
className: "phone-workspace phone-workspace-loading",
|
|
319
319
|
loadingText: "正在接入 4A 统一登录…",
|
|
@@ -335,7 +335,7 @@ function et() {
|
|
|
335
335
|
"img",
|
|
336
336
|
{
|
|
337
337
|
src: We,
|
|
338
|
-
alt: "Z-
|
|
338
|
+
alt: "Z-OPC",
|
|
339
339
|
className: "phone-workspace-logo",
|
|
340
340
|
onClick: () => A.push("/welcome"),
|
|
341
341
|
style: { cursor: "pointer" }
|
|
@@ -347,7 +347,7 @@ function et() {
|
|
|
347
347
|
className: "phone-workspace-brand",
|
|
348
348
|
onClick: () => A.push("/welcome"),
|
|
349
349
|
style: { cursor: "pointer" },
|
|
350
|
-
children: "Z-
|
|
350
|
+
children: "Z-OPC"
|
|
351
351
|
}
|
|
352
352
|
) : /* @__PURE__ */ t("span", { className: "phone-workspace-project-name", children: (v == null ? void 0 : v.name) ?? "工程" }) }),
|
|
353
353
|
/* @__PURE__ */ d("div", { className: "phone-workspace-header-actions", children: [
|
|
@@ -385,14 +385,14 @@ function et() {
|
|
|
385
385
|
onChange: (e) => m(e.target.value)
|
|
386
386
|
}
|
|
387
387
|
) }),
|
|
388
|
-
ne && L.length === 0 ? /* @__PURE__ */ t("div", { className: "phone-workspace-list-loading", children: /* @__PURE__ */ t(
|
|
388
|
+
ne && L.length === 0 ? /* @__PURE__ */ t("div", { className: "phone-workspace-list-loading", children: /* @__PURE__ */ t(O, { description: "加载项目…" }) }) : $.length === 0 ? /* @__PURE__ */ t(
|
|
389
389
|
J,
|
|
390
390
|
{
|
|
391
391
|
description: g ? "无匹配项目" : "暂无项目",
|
|
392
392
|
className: "phone-workspace-empty"
|
|
393
393
|
}
|
|
394
394
|
) : /* @__PURE__ */ t("ul", { className: "phone-project-list", children: $.map((e) => {
|
|
395
|
-
const
|
|
395
|
+
const r = ye(
|
|
396
396
|
e.created_at
|
|
397
397
|
);
|
|
398
398
|
return /* @__PURE__ */ t("li", { children: /* @__PURE__ */ d(
|
|
@@ -406,9 +406,9 @@ function et() {
|
|
|
406
406
|
children: [
|
|
407
407
|
/* @__PURE__ */ d("div", { className: "phone-project-item-main", children: [
|
|
408
408
|
/* @__PURE__ */ t("span", { className: "phone-project-item-name", children: e.name }),
|
|
409
|
-
e.scenario_name ||
|
|
409
|
+
e.scenario_name || r ? /* @__PURE__ */ d("div", { className: "phone-project-item-meta", children: [
|
|
410
410
|
e.scenario_name ? /* @__PURE__ */ t("span", { className: "phone-project-item-scenario", children: e.scenario_name }) : null,
|
|
411
|
-
|
|
411
|
+
r ? /* @__PURE__ */ t("span", { className: "phone-project-item-time", children: r }) : null
|
|
412
412
|
] }) : null
|
|
413
413
|
] }),
|
|
414
414
|
/* @__PURE__ */ t(
|
|
@@ -439,7 +439,7 @@ function et() {
|
|
|
439
439
|
{
|
|
440
440
|
type: "button",
|
|
441
441
|
className: c === "members" ? "phone-toolbar-tab phone-toolbar-members phone-toolbar-active" : "phone-toolbar-tab phone-toolbar-members",
|
|
442
|
-
onClick: () =>
|
|
442
|
+
onClick: () => a("members"),
|
|
443
443
|
children: [
|
|
444
444
|
"成员 (",
|
|
445
445
|
W.length,
|
|
@@ -471,7 +471,7 @@ function et() {
|
|
|
471
471
|
}
|
|
472
472
|
) }) })
|
|
473
473
|
] }) }),
|
|
474
|
-
|
|
474
|
+
ae ? /* @__PURE__ */ t("div", { className: "phone-workspace-overlay", children: /* @__PURE__ */ t(O, { description: "正在打开工程…" }) }) : null,
|
|
475
475
|
/* @__PURE__ */ t(ve, {})
|
|
476
476
|
] });
|
|
477
477
|
}
|