@yuku123/z-team-component 0.2.79 → 0.2.80
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/{menuPermission-BxQjHIDw.js → menuPermission-D9NGpBZP.js} +1 -1
- package/dist/pages.js +1 -1
- package/dist/z-team-component.css +1 -1
- package/package.json +1 -1
- package/dist/ChangeLogView-_bRZ55Yi.js +0 -542
- package/dist/ComponentDoc-DHEiUymG.js +0 -3998
- package/dist/InvitationManagementPage-DGCuTTur.js +0 -495
- package/dist/OnboardingPage-PAr43cEy.js +0 -393
- package/dist/ScheduledTasks-CcCa60Uk.js +0 -9407
- package/dist/SystemShell-Bj5MAgG4.js +0 -689
- package/dist/_commonjsHelpers-B52_cu2H.js +0 -26
- package/dist/api-BWPNJBhU.js +0 -20
- package/dist/api-CIhVblfa.js +0 -2155
- package/dist/browser-jb_PFvU3.js +0 -1538
- package/dist/createWorkspaceWsHandler-BWP5S5X3.js +0 -12951
- package/dist/ctc-sso-DtJHC-2M.js +0 -117
- package/dist/echarts-B1OU1xr4.js +0 -16
- package/dist/history-BlrA1eaW.js +0 -41
- package/dist/index-A65wkmws.js +0 -93
- package/dist/index-B8owg7PF.js +0 -137
- package/dist/index-B_LJRFsK.js +0 -339
- package/dist/index-BgIheStI.js +0 -133
- package/dist/index-BohoJQPr.js +0 -7631
- package/dist/index-BydWNuk5.js +0 -1229
- package/dist/index-C2hWv17T.js +0 -2700
- package/dist/index-C5Nw82Bf.js +0 -574
- package/dist/index-C815hPWS.js +0 -430
- package/dist/index-CUVdeb8y.js +0 -638
- package/dist/index-CbMBEWCm.js +0 -9567
- package/dist/index-CijskN6t.js +0 -316
- package/dist/index-CjgVCc9p.js +0 -2916
- package/dist/index-Cug0PuCW.js +0 -914
- package/dist/index-Cvx6rrxD.js +0 -956
- package/dist/index-Cwr5Slv1.js +0 -480
- package/dist/index-CxFAICql.js +0 -42050
- package/dist/index-DBPoQ7Ii.js +0 -178
- package/dist/index-DDEXNsNv.js +0 -118
- package/dist/index-DK70mOTz.js +0 -143
- package/dist/index-DT80Pwa_.js +0 -5893
- package/dist/index-DWsfQMp8.js +0 -208
- package/dist/index-DhDdFRHC.js +0 -279
- package/dist/index-DhrqKHcn.js +0 -1143
- package/dist/index-Dm3wmB0K.js +0 -435
- package/dist/index-DzS6-D3M.js +0 -1640
- package/dist/index-F4Apy30c.js +0 -242
- package/dist/index-FvoWeGEy.js +0 -112
- package/dist/index-cdB5K3gx.js +0 -814
- package/dist/index-nU-V276i.js +0 -170
- package/dist/index-uF04Ucsi.js +0 -8
- package/dist/index.js +0 -10
- package/dist/index.module-CAa-2T7m.js +0 -72
- package/dist/index.module-UI0iz8K0.js +0 -42
package/dist/index-CijskN6t.js
DELETED
|
@@ -1,316 +0,0 @@
|
|
|
1
|
-
import { jsx as t, jsxs as l } from "react/jsx-runtime";
|
|
2
|
-
import { f as ie, r as z } from "./ctc-sso-DtJHC-2M.js";
|
|
3
|
-
import { r as ne, h as X, s as oe } from "./sso-user-ZUKv4XMX.js";
|
|
4
|
-
import { CheckCircleFilled as le, QuestionCircleOutlined as ce, CloseOutlined as me } from "@ant-design/icons";
|
|
5
|
-
import { message as k, Result as de, Button as D, Spin as G, Input as ue, Image as fe } from "antd";
|
|
6
|
-
import pe from "query-string";
|
|
7
|
-
import { useState as f, useRef as Y, useMemo as K, useCallback as w, useEffect as V } from "react";
|
|
8
|
-
import { useLocation as ge } from "react-router-dom";
|
|
9
|
-
import { h as W } from "./history-BlrA1eaW.js";
|
|
10
|
-
import { l as he, d as be, e as _e } from "./api-CIhVblfa.js";
|
|
11
|
-
import { u as c } from "./useAppStore-BBr_Fwsz.js";
|
|
12
|
-
/* empty css */
|
|
13
|
-
import { b as ye } from "./mobile-client-O3yr9h6t.js";
|
|
14
|
-
import { a as ve, s as we } from "./send-default-agent-team-message-CfVaEN2y.js";
|
|
15
|
-
const Ne = 5e3, E = 9, Ce = 10 * 1024 * 1024, Se = /^image\//i, Ie = /\.(png|jpe?g|gif|bmp|webp)$/i;
|
|
16
|
-
function Pe(a) {
|
|
17
|
-
return a.type && Se.test(a.type) ? !0 : Ie.test(a.name || "");
|
|
18
|
-
}
|
|
19
|
-
function ke(a) {
|
|
20
|
-
var o;
|
|
21
|
-
if (!((o = a == null ? void 0 : a.items) != null && o.length))
|
|
22
|
-
return [];
|
|
23
|
-
const m = [];
|
|
24
|
-
for (let p = 0; p < a.items.length; p += 1) {
|
|
25
|
-
const d = a.items[p];
|
|
26
|
-
if (d.kind === "file" && d.type.startsWith("image/")) {
|
|
27
|
-
const N = d.getAsFile();
|
|
28
|
-
N && m.push(N);
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
return m;
|
|
32
|
-
}
|
|
33
|
-
function Ee(a) {
|
|
34
|
-
return {
|
|
35
|
-
id: `${Date.now()}-${Math.random().toString(36).slice(2, 9)}`,
|
|
36
|
-
file: a,
|
|
37
|
-
previewUrl: URL.createObjectURL(a)
|
|
38
|
-
};
|
|
39
|
-
}
|
|
40
|
-
function Q(a) {
|
|
41
|
-
URL.revokeObjectURL(a.previewUrl);
|
|
42
|
-
}
|
|
43
|
-
function Ue(a) {
|
|
44
|
-
return a.map((m) => m.file);
|
|
45
|
-
}
|
|
46
|
-
const J = 30;
|
|
47
|
-
function De() {
|
|
48
|
-
const a = ge(), m = pe.parse(a.search), o = String(
|
|
49
|
-
m.scenarioCode ?? m.scenario_code ?? ""
|
|
50
|
-
).trim(), p = c((e) => e.expandProject), d = c((e) => e.updateCurrentUser), [N, H] = f(!1), [_, Z] = f(""), [y, U] = f([]), [M, R] = f("form"), [T, j] = f(""), [A, g] = f("正在登录…"), [B, F] = f([]), P = Y(!1), x = Y(y);
|
|
51
|
-
x.current = y;
|
|
52
|
-
const C = K(() => o ? "" : "缺少参数 scenarioCode", [o]), S = w((e, r) => {
|
|
53
|
-
F((n) => [...n, e]), g(r);
|
|
54
|
-
}, []), ee = (e) => new Promise((r) => {
|
|
55
|
-
window.setTimeout(r, e);
|
|
56
|
-
});
|
|
57
|
-
V(() => {
|
|
58
|
-
if (C)
|
|
59
|
-
return;
|
|
60
|
-
let e = !1, r = 0;
|
|
61
|
-
const n = 100;
|
|
62
|
-
let i = !1, s = 0;
|
|
63
|
-
const v = 3;
|
|
64
|
-
return (() => {
|
|
65
|
-
if (e)
|
|
66
|
-
return;
|
|
67
|
-
const u = async () => {
|
|
68
|
-
if (e)
|
|
69
|
-
return;
|
|
70
|
-
let h = ne();
|
|
71
|
-
if ((!h || !X(h)) && !i) {
|
|
72
|
-
i = !0;
|
|
73
|
-
try {
|
|
74
|
-
const b = await ie();
|
|
75
|
-
b.kind === "authenticated" ? h = b.user : b.kind === "unauthenticated" && (s += 1);
|
|
76
|
-
} catch {
|
|
77
|
-
} finally {
|
|
78
|
-
i = !1;
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
if (h && X(h)) {
|
|
82
|
-
d(oe(h));
|
|
83
|
-
const b = c.getState().token;
|
|
84
|
-
try {
|
|
85
|
-
const se = await _e(b);
|
|
86
|
-
e || d(se);
|
|
87
|
-
} catch {
|
|
88
|
-
!e && b && (localStorage.removeItem("z_team_token"), c.setState({ token: "" }));
|
|
89
|
-
} finally {
|
|
90
|
-
e || (H(!0), g(""));
|
|
91
|
-
}
|
|
92
|
-
return;
|
|
93
|
-
}
|
|
94
|
-
if (s >= v) {
|
|
95
|
-
z();
|
|
96
|
-
return;
|
|
97
|
-
}
|
|
98
|
-
if (r += 1, r >= n) {
|
|
99
|
-
z();
|
|
100
|
-
return;
|
|
101
|
-
}
|
|
102
|
-
window.setTimeout(() => void u(), 150);
|
|
103
|
-
};
|
|
104
|
-
u();
|
|
105
|
-
})(), () => {
|
|
106
|
-
e = !0;
|
|
107
|
-
};
|
|
108
|
-
}, [C, d]);
|
|
109
|
-
const te = w(
|
|
110
|
-
async (e, r) => {
|
|
111
|
-
if (P.current)
|
|
112
|
-
return;
|
|
113
|
-
P.current = !0, R("loading"), F([]), g("正在按场景创建工程…");
|
|
114
|
-
const n = e.slice(0, J), i = c.getState().token;
|
|
115
|
-
try {
|
|
116
|
-
let s = [];
|
|
117
|
-
r.length > 0 && (g("正在上传图片…"), s = await he(r));
|
|
118
|
-
const v = ve(e, s), I = await be(
|
|
119
|
-
{
|
|
120
|
-
name: n,
|
|
121
|
-
description: v,
|
|
122
|
-
workspace_path: n,
|
|
123
|
-
scenario_code: o
|
|
124
|
-
},
|
|
125
|
-
i
|
|
126
|
-
);
|
|
127
|
-
S("工程已创建", "正在打开协作区…"), g("正在同步工程列表…"), await p(I);
|
|
128
|
-
const u = c.getState();
|
|
129
|
-
u.currentProject && await u.refreshProjectPanels(
|
|
130
|
-
String(u.currentProject.id),
|
|
131
|
-
u.projectSwitchSeq,
|
|
132
|
-
!1
|
|
133
|
-
), S("协作区已就绪", "正在发送协作消息…"), await we(
|
|
134
|
-
I.id,
|
|
135
|
-
e,
|
|
136
|
-
i,
|
|
137
|
-
c.getState().members,
|
|
138
|
-
s
|
|
139
|
-
), await c.getState().loadMessages(), S("协作消息已发送", "即将进入工作台…"), g("即将进入工作台…"), await ee(2e3), W.replace(
|
|
140
|
-
ye({
|
|
141
|
-
projectId: I.id,
|
|
142
|
-
search: a.search
|
|
143
|
-
})
|
|
144
|
-
);
|
|
145
|
-
} catch (s) {
|
|
146
|
-
P.current = !1, R("form");
|
|
147
|
-
const v = s instanceof Error ? s.message : String(s);
|
|
148
|
-
j(v || "创建工程失败");
|
|
149
|
-
}
|
|
150
|
-
},
|
|
151
|
-
[S, p, a.search, o]
|
|
152
|
-
), L = w((e) => {
|
|
153
|
-
e.length && U((r) => {
|
|
154
|
-
const n = E - r.length;
|
|
155
|
-
if (n <= 0)
|
|
156
|
-
return k.warning(`最多粘贴 ${E} 张图片`), r;
|
|
157
|
-
const i = [...r];
|
|
158
|
-
for (const s of e.slice(0, n)) {
|
|
159
|
-
if (!Pe(s)) {
|
|
160
|
-
k.warning("仅支持粘贴图片");
|
|
161
|
-
continue;
|
|
162
|
-
}
|
|
163
|
-
if (s.size > Ce) {
|
|
164
|
-
k.warning("单张图片不能超过 10MB");
|
|
165
|
-
continue;
|
|
166
|
-
}
|
|
167
|
-
i.push(Ee(s));
|
|
168
|
-
}
|
|
169
|
-
return i;
|
|
170
|
-
});
|
|
171
|
-
}, []), re = w((e) => {
|
|
172
|
-
U((r) => {
|
|
173
|
-
const n = r.find((i) => i.id === e);
|
|
174
|
-
return n && Q(n), r.filter((i) => i.id !== e);
|
|
175
|
-
});
|
|
176
|
-
}, []);
|
|
177
|
-
V(() => () => {
|
|
178
|
-
x.current.forEach(Q);
|
|
179
|
-
}, []);
|
|
180
|
-
const ae = w(
|
|
181
|
-
(e) => {
|
|
182
|
-
const r = ke(e.clipboardData);
|
|
183
|
-
r.length > 0 && (e.preventDefault(), L(r));
|
|
184
|
-
},
|
|
185
|
-
[L]
|
|
186
|
-
), $ = () => {
|
|
187
|
-
const e = _.trim();
|
|
188
|
-
e && (j(""), te(e, Ue(y)));
|
|
189
|
-
}, O = K(() => {
|
|
190
|
-
const e = _.trim().slice(0, J);
|
|
191
|
-
return `场景 ${o}${e ? ` · ${e}` : ""}`;
|
|
192
|
-
}, [_, o]);
|
|
193
|
-
if (C || T && M === "form")
|
|
194
|
-
return /* @__PURE__ */ t("div", { className: "build-by-form-page", children: /* @__PURE__ */ t(
|
|
195
|
-
de,
|
|
196
|
-
{
|
|
197
|
-
status: "error",
|
|
198
|
-
title: "无法继续",
|
|
199
|
-
subTitle: C || T,
|
|
200
|
-
extra: /* @__PURE__ */ t(
|
|
201
|
-
D,
|
|
202
|
-
{
|
|
203
|
-
type: "primary",
|
|
204
|
-
onClick: () => W.replace("/workspace"),
|
|
205
|
-
children: "返回工作台"
|
|
206
|
-
}
|
|
207
|
-
)
|
|
208
|
-
}
|
|
209
|
-
) });
|
|
210
|
-
if (!N)
|
|
211
|
-
return /* @__PURE__ */ t("div", { className: "build-by-form-page", children: /* @__PURE__ */ t("div", { className: "build-by-form-page__shell", children: /* @__PURE__ */ t("div", { className: "build-by-form-page__panel", children: /* @__PURE__ */ l("div", { className: "build-by-form-page__loading", children: [
|
|
212
|
-
/* @__PURE__ */ t(G, { size: "large" }),
|
|
213
|
-
/* @__PURE__ */ t("p", { className: "build-by-form-page__step", children: A || "正在登录…" })
|
|
214
|
-
] }) }) }) });
|
|
215
|
-
if (M === "loading")
|
|
216
|
-
return /* @__PURE__ */ t("div", { className: "build-by-form-page", children: /* @__PURE__ */ t("div", { className: "build-by-form-page__shell", children: /* @__PURE__ */ t("div", { className: "build-by-form-page__panel", children: /* @__PURE__ */ l("div", { className: "build-by-form-page__loading", children: [
|
|
217
|
-
/* @__PURE__ */ t(G, { size: "large" }),
|
|
218
|
-
/* @__PURE__ */ t("p", { className: "build-by-form-page__step", children: A }),
|
|
219
|
-
O ? /* @__PURE__ */ t("p", { className: "build-by-form-page__meta", children: O }) : null,
|
|
220
|
-
B.length > 0 ? /* @__PURE__ */ t("ul", { className: "build-by-form-page__done-list", children: B.map((e, r) => /* @__PURE__ */ l(
|
|
221
|
-
"li",
|
|
222
|
-
{
|
|
223
|
-
className: "build-by-form-page__done-item",
|
|
224
|
-
children: [
|
|
225
|
-
/* @__PURE__ */ t(le, { className: "build-by-form-page__done-icon" }),
|
|
226
|
-
/* @__PURE__ */ t("span", { children: e })
|
|
227
|
-
]
|
|
228
|
-
},
|
|
229
|
-
`${r}-${e}`
|
|
230
|
-
)) }) : null
|
|
231
|
-
] }) }) }) });
|
|
232
|
-
const q = !!_.trim();
|
|
233
|
-
return /* @__PURE__ */ t("div", { className: "build-by-form-page", children: /* @__PURE__ */ t("div", { className: "build-by-form-page__shell", children: /* @__PURE__ */ l("div", { className: "build-by-form-page__panel", children: [
|
|
234
|
-
/* @__PURE__ */ l("div", { className: "build-by-form-page__header", children: [
|
|
235
|
-
/* @__PURE__ */ t("div", { className: "build-by-form-page__icon", "aria-hidden": !0, children: /* @__PURE__ */ t(ce, {}) }),
|
|
236
|
-
/* @__PURE__ */ l("div", { children: [
|
|
237
|
-
/* @__PURE__ */ t("h1", { className: "build-by-form-page__title", children: "描述你的问题" }),
|
|
238
|
-
/* @__PURE__ */ t("p", { className: "build-by-form-page__subtitle", children: "提交后将创建协作空间,并把问题发送给智能体" })
|
|
239
|
-
] })
|
|
240
|
-
] }),
|
|
241
|
-
/* @__PURE__ */ l("div", { className: "build-by-form-page__field", onPaste: ae, children: [
|
|
242
|
-
/* @__PURE__ */ t(
|
|
243
|
-
"label",
|
|
244
|
-
{
|
|
245
|
-
className: "build-by-form-page__label",
|
|
246
|
-
htmlFor: "build-by-form-question",
|
|
247
|
-
children: "请描述问题"
|
|
248
|
-
}
|
|
249
|
-
),
|
|
250
|
-
/* @__PURE__ */ t(
|
|
251
|
-
ue.TextArea,
|
|
252
|
-
{
|
|
253
|
-
id: "build-by-form-question",
|
|
254
|
-
className: "build-by-form-page__textarea",
|
|
255
|
-
value: _,
|
|
256
|
-
onChange: (e) => Z(e.target.value),
|
|
257
|
-
onKeyDown: (e) => {
|
|
258
|
-
(e.metaKey || e.ctrlKey) && e.key === "Enter" && q && (e.preventDefault(), $());
|
|
259
|
-
},
|
|
260
|
-
placeholder: "请尽量描述清楚现象、期望结果或相关背景…(可在输入框内 Ctrl+V 粘贴图片)",
|
|
261
|
-
autoSize: { minRows: 6, maxRows: 14 },
|
|
262
|
-
maxLength: Ne,
|
|
263
|
-
showCount: !0,
|
|
264
|
-
autoFocus: !0
|
|
265
|
-
}
|
|
266
|
-
),
|
|
267
|
-
y.length > 0 ? /* @__PURE__ */ t("ul", { className: "build-by-form-page__preview-list", children: y.map((e) => /* @__PURE__ */ l(
|
|
268
|
-
"li",
|
|
269
|
-
{
|
|
270
|
-
className: "build-by-form-page__preview-item",
|
|
271
|
-
children: [
|
|
272
|
-
/* @__PURE__ */ t(
|
|
273
|
-
fe,
|
|
274
|
-
{
|
|
275
|
-
src: e.previewUrl,
|
|
276
|
-
alt: "粘贴的图片",
|
|
277
|
-
className: "build-by-form-page__preview-img",
|
|
278
|
-
preview: { mask: "预览" }
|
|
279
|
-
}
|
|
280
|
-
),
|
|
281
|
-
/* @__PURE__ */ t(
|
|
282
|
-
"button",
|
|
283
|
-
{
|
|
284
|
-
type: "button",
|
|
285
|
-
className: "build-by-form-page__preview-remove",
|
|
286
|
-
"aria-label": "移除图片",
|
|
287
|
-
onClick: () => re(e.id),
|
|
288
|
-
children: /* @__PURE__ */ t(me, {})
|
|
289
|
-
}
|
|
290
|
-
)
|
|
291
|
-
]
|
|
292
|
-
},
|
|
293
|
-
e.id
|
|
294
|
-
)) }) : /* @__PURE__ */ l("p", { className: "build-by-form-page__paste-hint", children: [
|
|
295
|
-
"支持 Ctrl+V / ⌘+V 粘贴图片,最多 ",
|
|
296
|
-
E,
|
|
297
|
-
" 张"
|
|
298
|
-
] })
|
|
299
|
-
] }),
|
|
300
|
-
/* @__PURE__ */ t(
|
|
301
|
-
D,
|
|
302
|
-
{
|
|
303
|
-
type: "primary",
|
|
304
|
-
block: !0,
|
|
305
|
-
size: "large",
|
|
306
|
-
className: "build-by-form-page__submit",
|
|
307
|
-
disabled: !q,
|
|
308
|
-
onClick: $,
|
|
309
|
-
children: "确认并开始"
|
|
310
|
-
}
|
|
311
|
-
)
|
|
312
|
-
] }) }) });
|
|
313
|
-
}
|
|
314
|
-
export {
|
|
315
|
-
De as default
|
|
316
|
-
};
|