@yuku123/z-team-component 0.2.7 → 0.2.8
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/{InvitationManagementPage-BPxjj0Dg.js → InvitationManagementPage-DEBZvFZU.js} +2 -2
- package/dist/{LowCodePage-CtC4Ca6N.js → LowCodePage-yemTBcZ4.js} +1 -1
- package/dist/{OnboardingPage-Vvj77L6H.js → OnboardingPage-Bi3S5eug.js} +2 -2
- package/dist/{ProjectApp-Dp_yHlHK.js → ProjectApp-9qtrgr7d.js} +154 -168
- package/dist/admin-logs-BIRWnOwM.js +254 -0
- package/dist/api-3Ur1kq2A.js +2049 -0
- package/dist/{api-DLBRWSFh.js → api-B2d2enyL.js} +1 -1
- package/dist/{createWorkspaceWsHandler-DrV9AaO7.js → createWorkspaceWsHandler-CSAGqlPX.js} +3568 -3269
- package/dist/{index-l8P_AuvD.js → index-BIVN--Bi.js} +1 -1
- package/dist/index-B_YVSwmJ.js +11710 -0
- package/dist/{index-DM_AMiPz.js → index-C6SfK489.js} +36 -35
- package/dist/{index-BK9rSfN3.js → index-C8uSn9eX.js} +10 -10
- package/dist/{index-CuuZlPvb.js → index-CPUeMpa8.js} +4 -4
- package/dist/{index-bRlb91E0.js → index-Cml0C09P.js} +12239 -23662
- package/dist/{index-Bw02b5qJ.js → index-CsCPAoPb.js} +14819 -13930
- package/dist/{index-DYXWNyaR.js → index-D3DF6vFc.js} +17 -17
- package/dist/{index-D-oG0ReT.js → index-DMEjkEMq.js} +3 -3
- package/dist/{index-BaBdw0pt.js → index-DNyYOedu.js} +4 -4
- package/dist/{index-Bh5PFiY9.js → index-wXqXyXmm.js} +33 -32
- package/dist/index.js +1 -1
- package/dist/instance-ClduEMxs.js +215 -0
- package/dist/pages.js +1 -1
- package/dist/{send-default-agent-team-message-DxD_vD7Z.js → send-default-agent-team-message-B3Qon0X2.js} +1 -1
- package/dist/{sso-user-D1eNVXkY.js → sso-user-BOEGMUJA.js} +1 -1
- package/dist/{useAppStore-C12Ala1u.js → useAppStore-D8PnbXea.js} +1 -1
- package/dist/z-team-component.css +2 -2
- package/package.json +4 -1
- package/dist/api-W2_U7Nxd.js +0 -3866
- package/dist/ctc-signout-C_dAvsu5.js +0 -9
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
import { jsx as t, jsxs as l } from "react/jsx-runtime";
|
|
2
2
|
import { f as ie, r as $ } from "./ctc-sso-C-QWy9F8.js";
|
|
3
|
-
import { r as le, h as K, s as J } from "./sso-user-
|
|
3
|
+
import { r as le, h as K, s as J } from "./sso-user-BOEGMUJA.js";
|
|
4
4
|
import { ArrowLeftOutlined as de, PlusOutlined as ue, LogoutOutlined as pe, SearchOutlined as me } from "@ant-design/icons";
|
|
5
5
|
import { Spin as q, Button as D, Input as he, Empty as X, Tag as fe, message as ge } from "antd";
|
|
6
6
|
import B from "query-string";
|
|
7
7
|
import { useEffect as N, useState as y, useMemo as Y, useRef as M, useCallback as G } from "react";
|
|
8
8
|
import { useLocation as be } from "react-router-dom";
|
|
9
9
|
import { h as A } from "./history-BlrA1eaW.js";
|
|
10
|
-
import { c as ke, C as we } from "./createWorkspaceWsHandler-
|
|
11
|
-
import { u as r, f as Se, T as ve } from "./useAppStore-
|
|
12
|
-
import { o as ye,
|
|
10
|
+
import { c as ke, C as we } from "./createWorkspaceWsHandler-CSAGqlPX.js";
|
|
11
|
+
import { u as r, f as Se, T as ve } from "./useAppStore-D8PnbXea.js";
|
|
12
|
+
import { o as ye, n as Ne, q as je, r as Ce, h as ee } from "./api-3Ur1kq2A.js";
|
|
13
|
+
import { l as Pe, j as Te } from "./instance-ClduEMxs.js";
|
|
13
14
|
/* empty css */
|
|
14
|
-
import { s as xe } from "./
|
|
15
|
+
import { s as xe } from "./admin-logs-BIRWnOwM.js";
|
|
15
16
|
function Ie(p, d) {
|
|
16
17
|
N(() => {
|
|
17
18
|
if (p == null)
|
|
@@ -61,7 +62,7 @@ function te() {
|
|
|
61
62
|
search: f ? `?${f}` : ""
|
|
62
63
|
});
|
|
63
64
|
}
|
|
64
|
-
function
|
|
65
|
+
function He() {
|
|
65
66
|
const p = be(), [d, i] = y("list"), [f, n] = y("chat"), [E, g] = y("team"), [w, m] = y(""), [u, Q] = y(!1), [ae, I] = y(!1), {
|
|
66
67
|
currentProject: S,
|
|
67
68
|
currentUser: W,
|
|
@@ -77,13 +78,13 @@ function ze() {
|
|
|
77
78
|
const e = B.parse(p.search), a = String(e.projectId ?? e.project_id ?? "").trim();
|
|
78
79
|
if (!a)
|
|
79
80
|
return null;
|
|
80
|
-
const
|
|
81
|
-
return Number.isFinite(
|
|
81
|
+
const o = Number(a);
|
|
82
|
+
return Number.isFinite(o) && o > 0 ? o : null;
|
|
82
83
|
}, [p.search]), O = M(!1), C = M(!1), P = M(!1), V = M(b);
|
|
83
84
|
V.current = b, Ie(S == null ? void 0 : S.id, ne), N(() => (document.body.classList.add("team-phone-workspace-route"), () => {
|
|
84
85
|
document.body.classList.remove("team-phone-workspace-route");
|
|
85
86
|
}), []);
|
|
86
|
-
const
|
|
87
|
+
const oe = G(
|
|
87
88
|
(e) => {
|
|
88
89
|
n("chat"), g(e), k(e, !0);
|
|
89
90
|
},
|
|
@@ -91,22 +92,22 @@ function ze() {
|
|
|
91
92
|
);
|
|
92
93
|
N(() => {
|
|
93
94
|
let e = !1, a = 0;
|
|
94
|
-
const
|
|
95
|
+
const o = 100;
|
|
95
96
|
let T = !1, F = 0;
|
|
96
97
|
const _ = 3, v = (h) => {
|
|
97
|
-
const
|
|
98
|
+
const s = r.getState().token;
|
|
98
99
|
if (V.current != null) {
|
|
99
100
|
e || (j(J(h)), Q(!0)), ee().then((U) => {
|
|
100
101
|
e || j(U);
|
|
101
102
|
}).catch(() => {
|
|
102
|
-
!e &&
|
|
103
|
+
!e && s && (localStorage.removeItem("z_team_token"), r.setState({ token: "" }));
|
|
103
104
|
});
|
|
104
105
|
return;
|
|
105
106
|
}
|
|
106
107
|
ee().then((U) => {
|
|
107
108
|
e || j(U);
|
|
108
109
|
}).catch(() => {
|
|
109
|
-
e || (
|
|
110
|
+
e || (s && (localStorage.removeItem("z_team_token"), r.setState({ token: "" })), j(J(h)));
|
|
110
111
|
}).finally(() => {
|
|
111
112
|
e || Q(!0);
|
|
112
113
|
});
|
|
@@ -117,26 +118,26 @@ function ze() {
|
|
|
117
118
|
const h = async () => {
|
|
118
119
|
if (e)
|
|
119
120
|
return;
|
|
120
|
-
let
|
|
121
|
-
if ((!
|
|
121
|
+
let s = le();
|
|
122
|
+
if ((!s || !K(s)) && !T) {
|
|
122
123
|
T = !0;
|
|
123
124
|
try {
|
|
124
125
|
const c = await ie();
|
|
125
|
-
c.kind === "authenticated" ?
|
|
126
|
+
c.kind === "authenticated" ? s = c.user : c.kind === "unauthenticated" && (F += 1);
|
|
126
127
|
} catch {
|
|
127
128
|
} finally {
|
|
128
129
|
T = !1;
|
|
129
130
|
}
|
|
130
131
|
}
|
|
131
|
-
if (
|
|
132
|
-
v(
|
|
132
|
+
if (s && K(s)) {
|
|
133
|
+
v(s);
|
|
133
134
|
return;
|
|
134
135
|
}
|
|
135
136
|
if (F >= _) {
|
|
136
137
|
$();
|
|
137
138
|
return;
|
|
138
139
|
}
|
|
139
|
-
if (a += 1, a >=
|
|
140
|
+
if (a += 1, a >= o) {
|
|
140
141
|
$();
|
|
141
142
|
return;
|
|
142
143
|
}
|
|
@@ -151,13 +152,13 @@ function ze() {
|
|
|
151
152
|
}, [j]), N(() => {
|
|
152
153
|
W && z();
|
|
153
154
|
}, [W, z]), N(() => {
|
|
154
|
-
var
|
|
155
|
+
var o;
|
|
155
156
|
if (!u || b != null || d === "project" || P.current)
|
|
156
157
|
return;
|
|
157
|
-
const e = r.getState(), a = (
|
|
158
|
+
const e = r.getState(), a = (o = e.currentProject) == null ? void 0 : o.id;
|
|
158
159
|
a == null || !e.expandedProjectIds.includes(String(a)) || (i("project"), n("chat"), g("team"), k("team", !0));
|
|
159
160
|
}, [u, b, d, k]);
|
|
160
|
-
const
|
|
161
|
+
const se = G(
|
|
161
162
|
async (e) => {
|
|
162
163
|
P.current = !1, I(!0);
|
|
163
164
|
try {
|
|
@@ -184,12 +185,12 @@ function ze() {
|
|
|
184
185
|
});
|
|
185
186
|
return;
|
|
186
187
|
}
|
|
187
|
-
let
|
|
188
|
+
let o = !1;
|
|
188
189
|
C.current = !0, I(!0);
|
|
189
190
|
const T = async () => {
|
|
190
191
|
const v = Date.now() + 4e3;
|
|
191
192
|
for (; Date.now() < v; ) {
|
|
192
|
-
if (
|
|
193
|
+
if (o)
|
|
193
194
|
return;
|
|
194
195
|
const x = r.getState();
|
|
195
196
|
if (!x.loading || x.projects.length > 0)
|
|
@@ -199,27 +200,27 @@ function ze() {
|
|
|
199
200
|
};
|
|
200
201
|
return (async () => {
|
|
201
202
|
try {
|
|
202
|
-
if (await T(),
|
|
203
|
+
if (await T(), o)
|
|
203
204
|
return;
|
|
204
205
|
let {
|
|
205
206
|
token: v,
|
|
206
207
|
projects: x,
|
|
207
208
|
expandProject: h
|
|
208
|
-
} = r.getState(),
|
|
209
|
-
if (!
|
|
209
|
+
} = r.getState(), s = x.find((c) => c.id === e);
|
|
210
|
+
if (!s) {
|
|
210
211
|
const c = await Pe(e, v);
|
|
211
|
-
if (
|
|
212
|
+
if (o)
|
|
212
213
|
return;
|
|
213
214
|
if (c.status === "NOT_FOUND" || !c.scenarioInstance) {
|
|
214
215
|
ge.info("无此工程");
|
|
215
216
|
return;
|
|
216
217
|
}
|
|
217
|
-
if (
|
|
218
|
+
if (s = await Te(e, v), o)
|
|
218
219
|
return;
|
|
219
220
|
}
|
|
220
|
-
if (
|
|
221
|
+
if (o || !s)
|
|
221
222
|
return;
|
|
222
|
-
if (O.current = !0, await h(
|
|
223
|
+
if (O.current = !0, await h(s), !o) {
|
|
223
224
|
P.current = !1, i("project"), n("chat"), g("team"), te();
|
|
224
225
|
const c = r.getState();
|
|
225
226
|
c.currentProject && await c.refreshProjectPanels(
|
|
@@ -233,7 +234,7 @@ function ze() {
|
|
|
233
234
|
I(!1), C.current = !1, r.getState().loadProjects();
|
|
234
235
|
}
|
|
235
236
|
})(), () => {
|
|
236
|
-
|
|
237
|
+
o = !0, C.current && (C.current = !1);
|
|
237
238
|
};
|
|
238
239
|
}, [u, b]);
|
|
239
240
|
const Z = Y(() => {
|
|
@@ -325,7 +326,7 @@ function ze() {
|
|
|
325
326
|
type: "button",
|
|
326
327
|
className: "phone-project-item",
|
|
327
328
|
onClick: () => {
|
|
328
|
-
|
|
329
|
+
se(e);
|
|
329
330
|
},
|
|
330
331
|
children: [
|
|
331
332
|
/* @__PURE__ */ l("div", { className: "phone-project-item-main", children: [
|
|
@@ -354,7 +355,7 @@ function ze() {
|
|
|
354
355
|
{
|
|
355
356
|
type: "button",
|
|
356
357
|
className: f === "chat" ? "phone-toolbar-tab phone-toolbar-active" : "phone-toolbar-tab",
|
|
357
|
-
onClick: () =>
|
|
358
|
+
onClick: () => oe("team"),
|
|
358
359
|
children: "协作"
|
|
359
360
|
}
|
|
360
361
|
) }),
|
|
@@ -400,5 +401,5 @@ function ze() {
|
|
|
400
401
|
] });
|
|
401
402
|
}
|
|
402
403
|
export {
|
|
403
|
-
|
|
404
|
+
He as default
|
|
404
405
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsxs as a, jsx as i, Fragment as B } from "react/jsx-runtime";
|
|
2
2
|
import { useState as d, useRef as F, useCallback as D, useEffect as R } from "react";
|
|
3
|
-
import { u as O } from "./useAppStore-
|
|
3
|
+
import { u as O } from "./useAppStore-D8PnbXea.js";
|
|
4
4
|
/* empty css */
|
|
5
|
-
import { T as P,
|
|
5
|
+
import { T as P, j as U } from "./api-3Ur1kq2A.js";
|
|
6
6
|
async function y(o, s) {
|
|
7
7
|
const n = await o.text().catch(() => "");
|
|
8
8
|
let t = {};
|
|
@@ -92,7 +92,7 @@ async function J(o, s) {
|
|
|
92
92
|
}
|
|
93
93
|
const L = "dev_brain_scenario";
|
|
94
94
|
function ee() {
|
|
95
|
-
var
|
|
95
|
+
var E;
|
|
96
96
|
const [o, s] = d([]), [n, t] = d(
|
|
97
97
|
null
|
|
98
98
|
), [r, h] = d([]), [u, z] = d([]), [v, b] = d(""), [W, w] = d(!1), [g, S] = d(!1), [A, T] = d(""), C = F(null), { token: f } = O(), I = D(() => {
|
|
@@ -140,14 +140,14 @@ function ee() {
|
|
|
140
140
|
} finally {
|
|
141
141
|
w(!1);
|
|
142
142
|
}
|
|
143
|
-
},
|
|
143
|
+
}, j = async () => {
|
|
144
144
|
const e = v.trim();
|
|
145
145
|
if (!e || !n) return;
|
|
146
146
|
const c = u.filter((l) => l.memberType === "AGENT");
|
|
147
|
-
let p,
|
|
147
|
+
let p, M = "TEXT";
|
|
148
148
|
for (const l of c)
|
|
149
149
|
if (e.includes(`@${l.displayName}`)) {
|
|
150
|
-
p = String(l.id),
|
|
150
|
+
p = String(l.id), M = "AT_AGENT";
|
|
151
151
|
break;
|
|
152
152
|
}
|
|
153
153
|
b("");
|
|
@@ -156,7 +156,7 @@ function ee() {
|
|
|
156
156
|
n.id,
|
|
157
157
|
{
|
|
158
158
|
content: e,
|
|
159
|
-
message_type:
|
|
159
|
+
message_type: M,
|
|
160
160
|
...p ? { at_agent_ref_id: p } : {}
|
|
161
161
|
},
|
|
162
162
|
f || void 0
|
|
@@ -388,11 +388,11 @@ function ee() {
|
|
|
388
388
|
maxHeight: 120,
|
|
389
389
|
fontSize: 13
|
|
390
390
|
},
|
|
391
|
-
placeholder: x.length > 0 ? `Type message. @${(
|
|
391
|
+
placeholder: x.length > 0 ? `Type message. @${(E = x[0]) == null ? void 0 : E.displayName} to mention agent.` : "Type message...",
|
|
392
392
|
value: v,
|
|
393
393
|
onChange: (e) => b(e.target.value),
|
|
394
394
|
onKeyDown: (e) => {
|
|
395
|
-
e.key === "Enter" && !e.shiftKey && (e.preventDefault(),
|
|
395
|
+
e.key === "Enter" && !e.shiftKey && (e.preventDefault(), j());
|
|
396
396
|
}
|
|
397
397
|
}
|
|
398
398
|
),
|
|
@@ -408,7 +408,7 @@ function ee() {
|
|
|
408
408
|
cursor: "pointer",
|
|
409
409
|
fontSize: 13
|
|
410
410
|
},
|
|
411
|
-
onClick:
|
|
411
|
+
onClick: j,
|
|
412
412
|
children: "Send"
|
|
413
413
|
}
|
|
414
414
|
)
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { jsx as r, jsxs as x } from "react/jsx-runtime";
|
|
2
2
|
import { f as z, r as T } from "./ctc-sso-C-QWy9F8.js";
|
|
3
|
-
import { r as D, h as U, s as F } from "./sso-user-
|
|
3
|
+
import { r as D, h as U, s as F } from "./sso-user-BOEGMUJA.js";
|
|
4
4
|
import { CheckCircleFilled as W } from "@ant-design/icons";
|
|
5
5
|
import { Result as B, Button as H, Spin as G } from "antd";
|
|
6
6
|
import J from "query-string";
|
|
7
7
|
import { useState as d, useRef as K, useCallback as O, useMemo as R, useEffect as E } from "react";
|
|
8
8
|
import { useLocation as Q } from "react-router-dom";
|
|
9
9
|
import { h as b } from "./history-BlrA1eaW.js";
|
|
10
|
-
import {
|
|
11
|
-
import { u as s } from "./useAppStore-
|
|
10
|
+
import { g as V, h as X } from "./api-3Ur1kq2A.js";
|
|
11
|
+
import { u as s } from "./useAppStore-D8PnbXea.js";
|
|
12
12
|
import { b as Y } from "./mobile-client-O3yr9h6t.js";
|
|
13
|
-
import { s as Z } from "./send-default-agent-team-message-
|
|
13
|
+
import { s as Z } from "./send-default-agent-team-message-B3Qon0X2.js";
|
|
14
14
|
function de() {
|
|
15
15
|
const h = Q(), f = J.parse(h.search), c = String(
|
|
16
16
|
f.scenarioCode ?? f.scenario_code ?? ""
|