@yuku123/z-team-component 0.2.104 → 0.2.106

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.
Files changed (45) hide show
  1. package/dist/{ChangeLogView-DG-ogBff.js → ChangeLogView-Mn5LSUvJ.js} +1 -1
  2. package/dist/{ComponentDoc-BW1SyDxk.js → ComponentDoc-BKGd6D6u.js} +12 -12
  3. package/dist/{InvitationManagementPage-hYvoPEcm.js → InvitationManagementPage-DHORbfXF.js} +1 -1
  4. package/dist/{OnboardingPage-KDp-DrzY.js → OnboardingPage-ChIsu-TY.js} +2 -2
  5. package/dist/{ScheduledTasks-CErSDgyW.js → ScheduledTasks-CorjHXG-.js} +6 -6
  6. package/dist/{SystemShell-DvrY4Bl7.js → SystemShell-iAK8aCSW.js} +4 -4
  7. package/dist/{admin-logs-uPnnclwN.js → admin-logs-Ckzi7TeC.js} +5 -5
  8. package/dist/{api-B__qdRIf.js → api-BIwuQUnn.js} +1 -1
  9. package/dist/api-DWN5lt_h.js +101 -0
  10. package/dist/{createWorkspaceWsHandler-BXbn5-Ft.js → createWorkspaceWsHandler-CZ6H2AZV.js} +3 -3
  11. package/dist/{index-C9fGup9t.js → index--JKduFbf.js} +3 -3
  12. package/dist/{index-ByhCWenF.js → index-2iqK5Tkw.js} +102 -188
  13. package/dist/{index-2isWwv1X.js → index-715e6ItU.js} +9 -9
  14. package/dist/{index-0smeCTnr.js → index-BPSoaoFx.js} +1255 -1255
  15. package/dist/{index-aI2EXKED.js → index-BVhOg_hh.js} +26 -26
  16. package/dist/{index-DBnH-lRh.js → index-BWpXdOkG.js} +1 -1
  17. package/dist/{index-C2_tfpEj.js → index-BoL8kFkC.js} +2 -2
  18. package/dist/{index-CkWKJORv.js → index-C8ylej1n.js} +1 -1
  19. package/dist/{index-DAGa9v8r.js → index-CH56FdB5.js} +2 -2
  20. package/dist/{index-q_TPea69.js → index-CSagljyv.js} +15 -15
  21. package/dist/{index-BwJPAN8f.js → index-CxDonxJ5.js} +19 -19
  22. package/dist/{index-CsaGecGX.js → index-D1s4BGKe.js} +6 -6
  23. package/dist/{index-BOJm25by.js → index-D9uZ2Jjj.js} +1 -1
  24. package/dist/{index-BC8f-JP9.js → index-DBBmrczh.js} +3 -3
  25. package/dist/{index-YVtm1SRy.js → index-DFVMc2Wx.js} +28 -28
  26. package/dist/{index-BK3YDeXH.js → index-DG9KRcB7.js} +6 -6
  27. package/dist/{index-DtHoMz1H.js → index-DJl3h5Bg.js} +1 -1
  28. package/dist/{index-DcurzowX.js → index-DPzDdcFg.js} +4 -4
  29. package/dist/{index-DOgCfVB2.js → index-DTx26k4L.js} +2 -2
  30. package/dist/{index-D-xPVrY3.js → index-T_vi7gwn.js} +1 -1
  31. package/dist/{index-Cih0yoxc.js → index-VEeHoEbx.js} +5 -5
  32. package/dist/{index-DIFIvVWE.js → index-ioMD3Wyv.js} +2 -2
  33. package/dist/{index-BnJ8UEeZ.js → index-kAxFJq-Q.js} +3 -3
  34. package/dist/index-l4NMXF0T.js +354 -0
  35. package/dist/{index-Cb88Xdh4.js → index-vdWWTTZg.js} +3 -3
  36. package/dist/index.js +1 -1
  37. package/dist/{instance-pdQ_wAhB.js → instance-CUl18UjH.js} +5 -5
  38. package/dist/{menuPermission-CCQjJVXg.js → menuPermission-rZ0KSqFi.js} +11 -11
  39. package/dist/pages.js +1 -1
  40. package/dist/{send-default-agent-team-message-BzeR4ahf.js → send-default-agent-team-message-BEsgdoRU.js} +1 -1
  41. package/dist/{sso-user-DI7oiDdc.js → sso-user-BW1vguVf.js} +1 -1
  42. package/dist/{training-Bz7Sr5yC.js → training-Csa_y6lO.js} +1 -1
  43. package/dist/{webide-NcHLDiSn.js → webide-DBov-2vp.js} +3 -3
  44. package/dist/z-team-component.css +1 -1
  45. package/package.json +1 -1
@@ -0,0 +1,354 @@
1
+ import { jsx as a, jsxs as s, Fragment as ne } from "react/jsx-runtime";
2
+ import { SearchOutlined as se, RightOutlined as oe, TeamOutlined as le, MessageOutlined as de } from "@ant-design/icons";
3
+ import { Input as ue, Spin as k, Empty as _, Tag as U, Button as he } from "antd";
4
+ import { useState as l, useRef as _e, useCallback as p, useEffect as D, useMemo as V } from "react";
5
+ import { u as f } from "./ComponentDoc-BKGd6D6u.js";
6
+ import { C as me } from "./createWorkspaceWsHandler-CZ6H2AZV.js";
7
+ import { l as fe, c as pe } from "./api-DWN5lt_h.js";
8
+ const ve = "product-workspace", z = "productCode";
9
+ function E(r) {
10
+ if (!r.ok) throw new Error(`产品接口失败 (${r.status})`);
11
+ return r.json();
12
+ }
13
+ async function ye() {
14
+ const r = f.getState().token, n = await fetch(`/api/product/list${r ? `?token=${encodeURIComponent(r)}` : ""}`, {
15
+ credentials: "include",
16
+ headers: { Accept: "application/json" }
17
+ }), c = await E(n), i = Array.isArray(c) ? c : c == null ? void 0 : c.data;
18
+ return Array.isArray(i) ? i.map((d) => ({
19
+ ...d,
20
+ productCode: String(d.productCode ?? d.code ?? ""),
21
+ name: String(d.name ?? d.productCode ?? d.code ?? "未命名")
22
+ })) : [];
23
+ }
24
+ async function Ne(r) {
25
+ try {
26
+ const n = await fetch(`/api/product/${encodeURIComponent(r)}`, {
27
+ credentials: "include",
28
+ headers: { Accept: "application/json" }
29
+ }), c = await E(n), i = (c == null ? void 0 : c.data) ?? c;
30
+ return i && typeof i == "object" ? { ...i, productCode: r } : null;
31
+ } catch {
32
+ return null;
33
+ }
34
+ }
35
+ async function we(r) {
36
+ try {
37
+ const n = await fetch(`/api/product/${encodeURIComponent(r)}/atelier/workspace`, {
38
+ credentials: "include",
39
+ headers: { Accept: "application/json" }
40
+ }), c = await E(n), i = (c == null ? void 0 : c.data) ?? c;
41
+ return i && typeof i == "object" && Array.isArray(i.files) ? i.files : Array.isArray(i) ? i : [];
42
+ } catch {
43
+ return [];
44
+ }
45
+ }
46
+ async function Ce(r, n) {
47
+ try {
48
+ const c = await fetch(
49
+ `/api/product/${encodeURIComponent(r)}/atelier/files/raw?path=${encodeURIComponent(n)}`,
50
+ { credentials: "include", headers: { Accept: "text/html, application/json" } }
51
+ );
52
+ return c.ok ? await c.text() : null;
53
+ } catch {
54
+ return null;
55
+ }
56
+ }
57
+ function Te(r) {
58
+ var i;
59
+ const n = (i = r.ext) == null ? void 0 : i.params;
60
+ if (!n || typeof n != "object") return null;
61
+ const c = n[z];
62
+ return c == null ? null : String(c);
63
+ }
64
+ async function Pe(r, n) {
65
+ try {
66
+ return (await fe(n)).filter((i) => Te(i) === r);
67
+ } catch {
68
+ return [];
69
+ }
70
+ }
71
+ async function ge(r, n, c) {
72
+ return pe(
73
+ { scenario_code: ve, name: n || `产品 ${r} 讨论组` },
74
+ c,
75
+ { [z]: r }
76
+ );
77
+ }
78
+ const Se = "_container_1aidv_5", be = "_libraryView_1aidv_14", Re = "_libraryHeader_1aidv_22", Ae = "_libraryTitle_1aidv_34", Ge = "_librarySubtitle_1aidv_41", ke = "_librarySearch_1aidv_47", Ee = "_libraryBody_1aidv_52", Ie = "_productGrid_1aidv_59", je = "_productCard_1aidv_65", He = "_cardCode_1aidv_85", Fe = "_cardName_1aidv_98", $e = "_cardDesc_1aidv_107", Be = "_cardFoot_1aidv_118", Le = "_cardEnter_1aidv_126", xe = "_cardTag_1aidv_134", Me = "_left_1aidv_140", Oe = "_leftHeader_1aidv_150", Ke = "_leftTitleRow_1aidv_156", Ue = "_leftTitle_1aidv_156", De = "_backBtn_1aidv_173", Ve = "_leftBody_1aidv_202", ze = "_fileList_1aidv_213", We = "_fileTreeHint_1aidv_252", qe = "_fileRow_1aidv_258", Je = "_fileRowActive_1aidv_272", Ye = "_fileRowIcon_1aidv_276", Qe = "_fileRowName_1aidv_281", Xe = "_fileKindTag_1aidv_290", Ze = "_center_1aidv_298", et = "_centerFill_1aidv_307", tt = "_renderArea_1aidv_362", at = "_renderIframe_1aidv_372", rt = "_renderCode_1aidv_378", ct = "_right_1aidv_391", it = "_chatSide_1aidv_402", nt = "_chatSideHeader_1aidv_408", st = "_chatSideTitle_1aidv_417", ot = "_chatGroupList_1aidv_426", lt = "_chatGroupRow_1aidv_435", dt = "_chatGroupRowActive_1aidv_449", ut = "_chatGroupName_1aidv_453", ht = "_chatGroupTime_1aidv_462", _t = "_chatPane_1aidv_469", mt = "_chatPaneHeader_1aidv_475", ft = "_chatPaneTitle_1aidv_484", pt = "_chatPaneBody_1aidv_493", t = {
79
+ container: Se,
80
+ libraryView: be,
81
+ libraryHeader: Re,
82
+ libraryTitle: Ae,
83
+ librarySubtitle: Ge,
84
+ librarySearch: ke,
85
+ libraryBody: Ee,
86
+ productGrid: Ie,
87
+ productCard: je,
88
+ cardCode: He,
89
+ cardName: Fe,
90
+ cardDesc: $e,
91
+ cardFoot: Be,
92
+ cardEnter: Le,
93
+ cardTag: xe,
94
+ left: Me,
95
+ leftHeader: Oe,
96
+ leftTitleRow: Ke,
97
+ leftTitle: Ue,
98
+ backBtn: De,
99
+ leftBody: Ve,
100
+ fileList: ze,
101
+ fileTreeHint: We,
102
+ fileRow: qe,
103
+ fileRowActive: Je,
104
+ fileRowIcon: Ye,
105
+ fileRowName: Qe,
106
+ fileKindTag: Xe,
107
+ center: Ze,
108
+ centerFill: et,
109
+ renderArea: tt,
110
+ renderIframe: at,
111
+ renderCode: rt,
112
+ right: ct,
113
+ chatSide: it,
114
+ chatSideHeader: nt,
115
+ chatSideTitle: st,
116
+ chatGroupList: ot,
117
+ chatGroupRow: lt,
118
+ chatGroupRowActive: dt,
119
+ chatGroupName: ut,
120
+ chatGroupTime: ht,
121
+ chatPane: _t,
122
+ chatPaneHeader: mt,
123
+ chatPaneTitle: ft,
124
+ chatPaneBody: pt
125
+ };
126
+ function vt(r) {
127
+ return {
128
+ id: String(r.id),
129
+ name: r.name,
130
+ description: r.description ?? "",
131
+ workspace_path: r.workspacePath || r.name,
132
+ status: r.status,
133
+ created_at: r.createTime ?? "",
134
+ scenario_id: String(r.id),
135
+ scenario_code: r.scenarioCode,
136
+ scenario_name: r.scenarioName ?? r.name
137
+ };
138
+ }
139
+ function W(r) {
140
+ const n = r.toLowerCase();
141
+ return /\.(html?|png|jpe?g|webp|svg|pdf)$/.test(n) ? "design" : /\.(md|markdown|txt|docx?)$/.test(n) ? "doc" : /\.(js|ts|tsx|jsx|java|py|json|yml|yaml|sql|css|vue|go|rs)$/.test(n) ? "code" : "other";
142
+ }
143
+ function q(r, n = "") {
144
+ const c = [];
145
+ for (const i of r ?? []) {
146
+ const d = i.path || `${n}${i.name ?? ""}`, y = i.name || d.split("/").pop() || d, u = i.type === "dir" || Array.isArray(i.children);
147
+ c.push({ path: d, name: y, dir: u, kind: W(d), depth: n.split("/").filter(Boolean).length }), u && Array.isArray(i.children) && c.push(...q(i.children, `${d}/`));
148
+ }
149
+ return c;
150
+ }
151
+ function St() {
152
+ const r = f((e) => e.token), n = f((e) => e.selectProject), [c, i] = l([]), [d, y] = l(!0), [u, I] = l(null), [o, j] = l(null), [J, H] = l(!1), [F, $] = l([]), [Y, B] = l(!1), [P, g] = l(null), [S, N] = l(null), [Q, X] = l("other"), [v, Z] = l(""), [w, b] = l([]), [L, R] = l(null), [C, x] = l(!1), [ee, T] = l("list"), h = _e(null), M = p(async () => {
153
+ y(!0);
154
+ try {
155
+ const e = await ye();
156
+ i(e);
157
+ } catch {
158
+ i([]);
159
+ } finally {
160
+ y(!1);
161
+ }
162
+ }, []);
163
+ D(() => {
164
+ M();
165
+ }, [M]);
166
+ const te = p(
167
+ async (e) => {
168
+ I(e), H(!0), g(null), N(null), T("list"), R(null);
169
+ const m = await Ne(e);
170
+ j(m);
171
+ const G = await Pe(e, r);
172
+ b(G), B(!0);
173
+ const ie = await we(e);
174
+ $(ie), B(!1);
175
+ },
176
+ [r]
177
+ ), ae = p(() => {
178
+ I(null), H(!1), j(null), $([]), b([]), g(null), N(null), R(null), T("list"), h.current !== void 0 && f.setState({ currentProject: h.current }), h.current = void 0;
179
+ }, []), re = p(
180
+ async (e) => {
181
+ if (!u) return;
182
+ g(e), N(null);
183
+ const m = W(e);
184
+ X(m);
185
+ const G = await Ce(u, e);
186
+ N(G ?? "");
187
+ },
188
+ [u]
189
+ ), A = p(
190
+ async (e) => {
191
+ if (!e) return;
192
+ const m = vt(e);
193
+ h.current = f.getState().currentProject, R(e.id), T("chat"), n(m);
194
+ },
195
+ [n]
196
+ ), ce = p(async () => {
197
+ if (!(!u || C)) {
198
+ x(!0);
199
+ try {
200
+ const e = await ge(
201
+ u,
202
+ `${(o == null ? void 0 : o.name) || u} · 讨论组 ${w.length + 1}`,
203
+ r
204
+ );
205
+ b((m) => [...m, e]), await A(e);
206
+ } finally {
207
+ x(!1);
208
+ }
209
+ }
210
+ }, [u, C, w.length, o == null ? void 0 : o.name, r, A]);
211
+ D(() => () => {
212
+ h.current !== void 0 && f.setState({ currentProject: h.current });
213
+ }, [L]);
214
+ const O = V(() => q(F), [F]), K = V(
215
+ () => c.filter((e) => !v || e.name.includes(v) || e.productCode.includes(v)),
216
+ [c, v]
217
+ );
218
+ return /* @__PURE__ */ a("div", { className: t.container, children: J ? /* @__PURE__ */ s(ne, { children: [
219
+ /* @__PURE__ */ s("aside", { className: t.left, children: [
220
+ /* @__PURE__ */ a("div", { className: t.leftHeader, children: /* @__PURE__ */ s("div", { className: t.leftTitleRow, children: [
221
+ /* @__PURE__ */ a("button", { type: "button", className: t.backBtn, onClick: ae, title: "返回产品库", children: "←" }),
222
+ /* @__PURE__ */ a("span", { className: t.leftTitle, title: (o == null ? void 0 : o.name) || u || "", children: (o == null ? void 0 : o.name) || u })
223
+ ] }) }),
224
+ /* @__PURE__ */ s("div", { className: t.leftBody, children: [
225
+ /* @__PURE__ */ a("div", { className: t.fileTreeHint, children: "文件(设计稿 · 文档 · 产物)" }),
226
+ Y ? /* @__PURE__ */ a("div", { className: t.centerFill, children: /* @__PURE__ */ a(k, { size: "small" }) }) : O.length === 0 ? /* @__PURE__ */ a(_, { image: _.PRESENTED_IMAGE_SIMPLE, description: "产品下暂无文件" }) : /* @__PURE__ */ a("div", { className: t.fileList, children: O.map((e) => /* @__PURE__ */ s(
227
+ "div",
228
+ {
229
+ className: `${t.fileRow} ${P === e.path ? t.fileRowActive : ""}`,
230
+ style: { paddingLeft: 12 + e.depth * 16 },
231
+ onClick: () => !e.dir && re(e.path),
232
+ children: [
233
+ /* @__PURE__ */ a("span", { className: t.fileRowIcon, children: e.dir ? "📁" : e.kind === "design" ? "🖼" : e.kind === "doc" ? "📄" : e.kind === "code" ? "{" : "◦" }),
234
+ /* @__PURE__ */ a("span", { className: t.fileRowName, children: e.name }),
235
+ e.kind === "design" && /* @__PURE__ */ a(U, { className: t.fileKindTag, color: "blue", children: "设计稿" })
236
+ ]
237
+ },
238
+ e.path
239
+ )) })
240
+ ] })
241
+ ] }),
242
+ /* @__PURE__ */ a("main", { className: t.center, children: P == null ? /* @__PURE__ */ a("div", { className: t.centerFill, children: /* @__PURE__ */ a(_, { image: _.PRESENTED_IMAGE_SIMPLE, description: "点击左侧文件查看渲染" }) }) : S == null ? /* @__PURE__ */ a("div", { className: t.centerFill, children: /* @__PURE__ */ a(k, {}) }) : /* @__PURE__ */ a("div", { className: t.renderArea, children: Q === "design" ? (
243
+ /* 设计稿:raw 通常为 HTML → iframe srcdoc 渲染 */
244
+ /* @__PURE__ */ a(
245
+ "iframe",
246
+ {
247
+ className: t.renderIframe,
248
+ srcDoc: S,
249
+ title: P,
250
+ sandbox: "allow-scripts allow-same-origin"
251
+ }
252
+ )
253
+ ) : /* @__PURE__ */ a("pre", { className: t.renderCode, children: S || "(空文件)" }) }) }),
254
+ /* @__PURE__ */ a("aside", { className: t.right, children: ee === "list" ? /* @__PURE__ */ s("div", { className: t.chatSide, children: [
255
+ /* @__PURE__ */ s("div", { className: t.chatSideHeader, children: [
256
+ /* @__PURE__ */ s("span", { className: t.chatSideTitle, children: [
257
+ /* @__PURE__ */ a(le, {}),
258
+ " 聊天组"
259
+ ] }),
260
+ /* @__PURE__ */ s(
261
+ he,
262
+ {
263
+ size: "small",
264
+ type: "primary",
265
+ ghost: !0,
266
+ loading: C,
267
+ onClick: ce,
268
+ children: [
269
+ /* @__PURE__ */ a(de, {}),
270
+ " 发起聊天"
271
+ ]
272
+ }
273
+ )
274
+ ] }),
275
+ /* @__PURE__ */ a("div", { className: t.chatGroupList, children: w.length === 0 ? /* @__PURE__ */ a(_, { image: _.PRESENTED_IMAGE_SIMPLE, description: "还没有聊天组,点「发起聊天」开始" }) : w.map((e) => /* @__PURE__ */ s(
276
+ "div",
277
+ {
278
+ className: `${t.chatGroupRow} ${L === e.id ? t.chatGroupRowActive : ""}`,
279
+ onClick: () => !C && A(e),
280
+ children: [
281
+ /* @__PURE__ */ a("span", { className: t.chatGroupName, title: e.name, children: e.name }),
282
+ /* @__PURE__ */ a("span", { className: t.chatGroupTime, children: String(e.createTime ?? "").slice(5, 16).replace("T", " ") })
283
+ ]
284
+ },
285
+ e.id
286
+ )) })
287
+ ] }) : /* @__PURE__ */ s("div", { className: t.chatPane, children: [
288
+ /* @__PURE__ */ s("div", { className: t.chatPaneHeader, children: [
289
+ /* @__PURE__ */ a(
290
+ "button",
291
+ {
292
+ type: "button",
293
+ className: t.backBtn,
294
+ onClick: () => {
295
+ T("list"), h.current !== void 0 && f.setState({ currentProject: h.current }), h.current = void 0;
296
+ },
297
+ title: "返回聊天组列表",
298
+ children: "←"
299
+ }
300
+ ),
301
+ /* @__PURE__ */ s("span", { className: t.chatPaneTitle, children: [
302
+ "群聊 · ",
303
+ (o == null ? void 0 : o.name) || u
304
+ ] })
305
+ ] }),
306
+ /* @__PURE__ */ a("div", { className: t.chatPaneBody, children: /* @__PURE__ */ a(me, { hideTabs: !0 }) })
307
+ ] }) })
308
+ ] }) : (
309
+ /* ═══ 产品库视图:全宽产品卡片网格,点卡片直接进入 ═══ */
310
+ /* @__PURE__ */ s("div", { className: t.libraryView, children: [
311
+ /* @__PURE__ */ s("div", { className: t.libraryHeader, children: [
312
+ /* @__PURE__ */ s("div", { children: [
313
+ /* @__PURE__ */ a("h2", { className: t.libraryTitle, children: "产品库" }),
314
+ /* @__PURE__ */ a("p", { className: t.librarySubtitle, children: "选择产品进入工作区:文件 · 设计稿 · 群聊" })
315
+ ] }),
316
+ /* @__PURE__ */ a(
317
+ ue,
318
+ {
319
+ prefix: /* @__PURE__ */ a(se, {}),
320
+ placeholder: "搜索产品",
321
+ value: v,
322
+ onChange: (e) => Z(e.target.value),
323
+ allowClear: !0,
324
+ className: t.librarySearch
325
+ }
326
+ )
327
+ ] }),
328
+ /* @__PURE__ */ a("div", { className: t.libraryBody, children: d ? /* @__PURE__ */ a("div", { className: t.centerFill, children: /* @__PURE__ */ a(k, {}) }) : K.length === 0 ? /* @__PURE__ */ a(_, { image: _.PRESENTED_IMAGE_SIMPLE, description: "暂无产品" }) : /* @__PURE__ */ a("div", { className: t.productGrid, children: K.map((e) => /* @__PURE__ */ s(
329
+ "button",
330
+ {
331
+ type: "button",
332
+ className: t.productCard,
333
+ onClick: () => void te(e.productCode),
334
+ children: [
335
+ /* @__PURE__ */ a("span", { className: t.cardCode, children: e.productCode }),
336
+ /* @__PURE__ */ a("span", { className: t.cardName, title: e.name, children: e.name }),
337
+ /* @__PURE__ */ a("span", { className: t.cardDesc, children: e.description || "暂无产品描述" }),
338
+ /* @__PURE__ */ s("span", { className: t.cardFoot, children: [
339
+ /* @__PURE__ */ s("span", { className: t.cardEnter, children: [
340
+ "进入产品 ",
341
+ /* @__PURE__ */ a(oe, {})
342
+ ] }),
343
+ e.status && /* @__PURE__ */ a(U, { className: t.cardTag, children: e.status })
344
+ ] })
345
+ ]
346
+ },
347
+ e.productCode
348
+ )) }) })
349
+ ] })
350
+ ) });
351
+ }
352
+ export {
353
+ St as default
354
+ };
@@ -1,15 +1,15 @@
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-DtJHC-2M.js";
3
- import { r as D, h as U, s as F } from "./sso-user-DI7oiDdc.js";
3
+ import { r as D, h as U, s as F } from "./sso-user-BW1vguVf.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 { d as s, h as V, j as X } from "./ComponentDoc-BW1SyDxk.js";
10
+ import { u as s, j as V, k as X } from "./ComponentDoc-BKGd6D6u.js";
11
11
  import { b as Y } from "./mobile-client-O3yr9h6t.js";
12
- import { s as Z } from "./send-default-agent-team-message-BzeR4ahf.js";
12
+ import { s as Z } from "./send-default-agent-team-message-BEsgdoRU.js";
13
13
  function ue() {
14
14
  const h = Q(), f = J.parse(h.search), c = String(
15
15
  f.scenarioCode ?? f.scenario_code ?? ""
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { C as e, P as s, S as a, Z as r, i } from "./ComponentDoc-BW1SyDxk.js";
1
+ import { C as e, P as s, S as a, Z as r, i } from "./ComponentDoc-BKGd6D6u.js";
2
2
  import { h as m } from "./history-BlrA1eaW.js";
3
3
  export {
4
4
  e as ComponentDocPage,
@@ -1,4 +1,4 @@
1
- import { a as o, f as d, B as r, u as c } from "./ComponentDoc-BW1SyDxk.js";
1
+ import { a as o, f as d, B as r, b as c } from "./ComponentDoc-BKGd6D6u.js";
2
2
  async function h(e, n = "") {
3
3
  const t = new URLSearchParams();
4
4
  n && t.set("token", n), e.scenario_code && t.set("scenario_code", e.scenario_code), e.status && t.set("status", e.status), e.name && t.set("name", e.name), e.role && t.set("role", e.role), e.create_time_start && t.set("create_time_start", e.create_time_start), e.create_time_end && t.set("create_time_end", e.create_time_end), t.set("page", String(e.page ?? 1)), t.set("size", String(e.size ?? 20));
@@ -107,7 +107,7 @@ async function U(e, n = "") {
107
107
  };
108
108
  return t.scenarioInstance;
109
109
  }
110
- async function k(e, n = "") {
110
+ async function b(e, n = "") {
111
111
  const t = n ? `?token=${encodeURIComponent(n)}` : "", s = await o(
112
112
  `${r}/scenario-instances/${e}/join-self${t}`,
113
113
  {
@@ -117,7 +117,7 @@ async function k(e, n = "") {
117
117
  ), a = await c(s, "加入工程失败");
118
118
  return u(a);
119
119
  }
120
- async function b(e = "") {
120
+ async function k(e = "") {
121
121
  const n = e ? `?token=${encodeURIComponent(e)}` : "", t = await o(`${r}/self-support${n}`, d), s = await c(t, "获取自身答疑群组失败"), a = Number(s.scenario_instance_id ?? 0);
122
122
  if (!Number.isFinite(a) || a <= 0)
123
123
  throw {
@@ -202,12 +202,12 @@ export {
202
202
  T as b,
203
203
  F as c,
204
204
  I as d,
205
- b as e,
205
+ k as e,
206
206
  C as f,
207
207
  O as g,
208
208
  A as h,
209
209
  N as i,
210
- k as j,
210
+ b as j,
211
211
  y as k,
212
212
  S as l,
213
213
  U as m,
@@ -1,8 +1,8 @@
1
1
  import { jsx as a } from "react/jsx-runtime";
2
2
  import { Alert as h } from "antd";
3
- import { d } from "./ComponentDoc-BW1SyDxk.js";
4
- import { h as g } from "./index-D-xPVrY3.js";
5
- import { N as A } from "./index-2isWwv1X.js";
3
+ import { u as d } from "./ComponentDoc-BKGd6D6u.js";
4
+ import { h as g } from "./index-T_vi7gwn.js";
5
+ import { N as A } from "./index-715e6ItU.js";
6
6
  function P() {
7
7
  return d((n) => n.permissionState) !== "failed" ? null : /* @__PURE__ */ a(
8
8
  h,
@@ -16,7 +16,7 @@ function P() {
16
16
  }
17
17
  );
18
18
  }
19
- function u(e) {
19
+ function m(e) {
20
20
  const n = e.permission;
21
21
  return n ? Array.isArray(n) ? n : [n] : [];
22
22
  }
@@ -26,30 +26,30 @@ function S(e) {
26
26
  function f(e, n) {
27
27
  return n.length === 0 ? !0 : S(e) ? n.some((i) => A.includes(i)) : n.some((i) => g(e, i));
28
28
  }
29
- function m(e, n, i) {
30
- const t = u(n), s = t.length > 0 ? t : i ? [i] : [];
29
+ function c(e, n, i) {
30
+ const t = m(n), s = t.length > 0 ? t : i ? [i] : [];
31
31
  return f(e, s);
32
32
  }
33
33
  function _(e, n) {
34
34
  const i = [];
35
35
  for (const t of e) {
36
36
  const s = t.permission;
37
- if (!f(n, u(t))) continue;
37
+ if (!f(n, m(t))) continue;
38
38
  const o = t.items;
39
39
  if (!Array.isArray(o)) {
40
40
  i.push(t);
41
41
  continue;
42
42
  }
43
- const c = o.filter((r) => m(n, r, s)).map(
43
+ const u = o.filter((r) => c(n, r, s)).map(
44
44
  (r) => r.children ? {
45
45
  ...r,
46
46
  children: r.children.filter(
47
- (l) => m(n, l, r.permission ?? s)
47
+ (l) => c(n, l, r.permission ?? s)
48
48
  )
49
49
  } : r
50
50
  ).filter((r) => !r.children || r.children.length > 0);
51
- if (c.length === 0) continue;
52
- const p = { ...t, items: c };
51
+ if (u.length === 0) continue;
52
+ const p = { ...t, items: u };
53
53
  i.push(p);
54
54
  }
55
55
  return i;
package/dist/pages.js CHANGED
@@ -1,4 +1,4 @@
1
- import { S as t, P as o, C as r, Z as a } from "./ComponentDoc-BW1SyDxk.js";
1
+ import { S as t, P as o, C as r, Z as a } from "./ComponentDoc-BKGd6D6u.js";
2
2
  import { createElement as e } from "react";
3
3
  import { BellOutlined as m, ProjectOutlined as p, DesktopOutlined as i, ReadOutlined as n } from "@ant-design/icons";
4
4
  import "react/jsx-runtime";
@@ -1,4 +1,4 @@
1
- import { s as l } from "./ComponentDoc-BW1SyDxk.js";
1
+ import { s as l } from "./ComponentDoc-BKGd6D6u.js";
2
2
  function m(o) {
3
3
  const n = o.filter((t) => t.member_type === "AGENT");
4
4
  return n.find((t) => t.is_default === !0) ?? n[0] ?? null;
@@ -1,4 +1,4 @@
1
- import { t as l } from "./ComponentDoc-BW1SyDxk.js";
1
+ import { t as l } from "./ComponentDoc-BKGd6D6u.js";
2
2
  const d = "USER_INFO";
3
3
  function s() {
4
4
  try {
@@ -1,4 +1,4 @@
1
- import { a as g, f, B as y, u as m } from "./ComponentDoc-BW1SyDxk.js";
1
+ import { a as g, f, B as y, b as m } from "./ComponentDoc-BKGd6D6u.js";
2
2
  function t(n, a = "") {
3
3
  const i = new URLSearchParams();
4
4
  Object.entries(n).forEach(([u, o]) => {
@@ -6,9 +6,9 @@ import ur from "react-markdown";
6
6
  import mr from "rehype-highlight";
7
7
  import fr from "remark-gfm";
8
8
  import { h as pr } from "./history-BlrA1eaW.js";
9
- import { a as w, f as _, B as v, u as C, d as ea, n as yt, aa as hr, t as et, c as yr, ac as gr, ad as On, ae as _r, af as ta } from "./ComponentDoc-BW1SyDxk.js";
10
- import { f as br, a as vr, u as En, b as Sr, c as wr, r as Cr, d as Nr, e as Tr, g as kr, h as Ir, m as $r } from "./admin-logs-uPnnclwN.js";
11
- import { a as xr, f as Lr, c as Ar } from "./index-D-xPVrY3.js";
9
+ import { a as w, f as _, B as v, b as C, u as ea, n as yt, aa as hr, t as et, e as yr, ac as gr, ad as On, ae as _r, af as ta } from "./ComponentDoc-BKGd6D6u.js";
10
+ import { f as br, a as vr, u as En, b as Sr, c as wr, r as Cr, d as Nr, e as Tr, g as kr, h as Ir, m as $r } from "./admin-logs-Ckzi7TeC.js";
11
+ import { a as xr, f as Lr, c as Ar } from "./index-T_vi7gwn.js";
12
12
  import { findTodosLinkedToNote as Dr, buildTodoProjectContext as Rr, linkedTodoChipLabel as Or } from "@yuku123/z-task-component";
13
13
  import Ne from "dayjs";
14
14
  import "./echarts-B1OU1xr4.js";