@yuku123/z-team-component 0.2.105 → 0.2.107

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 (48) hide show
  1. package/dist/{ChangeLogView-B0ML82u0.js → ChangeLogView-BhvD1usg.js} +1 -1
  2. package/dist/{ComponentDoc-C_289lsE.js → ComponentDoc-Dbog-ROg.js} +3 -3
  3. package/dist/{InvitationManagementPage-D2ezz4ZQ.js → InvitationManagementPage-FpWSld69.js} +1 -1
  4. package/dist/{OnboardingPage-BXsJ-kcJ.js → OnboardingPage-CEB7EZD8.js} +2 -2
  5. package/dist/{ScheduledTasks-Cn8BsDkN.js → ScheduledTasks-DMx7-HAn.js} +6 -6
  6. package/dist/SystemShell-Dlpy5DZH.js +712 -0
  7. package/dist/{admin-logs-B6K1DwRL.js → admin-logs-HL0SNlQ5.js} +1 -1
  8. package/dist/{api-DxSgE7qw.js → api-C-Y_mxLq.js} +1 -1
  9. package/dist/{api-BdP8mK8v.js → api-Cgf9Zvk8.js} +1 -1
  10. package/dist/{createWorkspaceWsHandler-DcNA1pfi.js → createWorkspaceWsHandler-C4AE3shS.js} +3 -3
  11. package/dist/{index-BN-o5nZM.js → index-1-xc0Fmq.js} +1 -1
  12. package/dist/{index-DgN13A-E.js → index-BBaPF4oF.js} +8 -8
  13. package/dist/{index-C8m8s-SU.js → index-BSyFSAmv.js} +5 -5
  14. package/dist/{index-Bf1K9zpk.js → index-BYyuwkoJ.js} +3 -3
  15. package/dist/{index-54iTaRVW.js → index-BZpOPuCa.js} +1 -1
  16. package/dist/{index-CeCsncoT.js → index-BbMM1410.js} +2 -2
  17. package/dist/{index-DLHcoHS9.js → index-BrfH3igf.js} +3 -3
  18. package/dist/{index-DszzQwsc.js → index-BuUjKN5w.js} +1 -1
  19. package/dist/{index-CgCB0-yK.js → index-CAvY86GA.js} +1 -1
  20. package/dist/{index-Cjddvrij.js → index-CV2D2UQv.js} +4 -4
  21. package/dist/{index-C-8n6xxK.js → index-CnHOeSAo.js} +2 -2
  22. package/dist/{index-etyS3HY2.js → index-Ct89In-K.js} +2 -2
  23. package/dist/{index-DpLamT1r.js → index-CtX68AZj.js} +2 -2
  24. package/dist/{index-DK71mfJn.js → index-CwRr3k-Y.js} +1 -1
  25. package/dist/{index-DUiFk01c.js → index-DK4iCG0v.js} +2 -2
  26. package/dist/{index-BfMFQ6RD.js → index-DKbZVSzh.js} +3 -3
  27. package/dist/{index-BCw3Oxp1.js → index-DalMaLkT.js} +6 -6
  28. package/dist/{index-Nj-dlFKY.js → index-Dd40mcAz.js} +3 -3
  29. package/dist/index-Dn29Q5QZ.js +143 -0
  30. package/dist/index-N2IBdYQH.js +394 -0
  31. package/dist/{index-CXJXSmhB.js → index-d2s8WYki.js} +6 -6
  32. package/dist/{index-CdugR2_4.js → index-j1byhHWV.js} +3 -3
  33. package/dist/{index-BDq0ofl2.js → index-kdesqA-H.js} +2 -2
  34. package/dist/{index-D487Inba.js → index-n6e49cm3.js} +3 -3
  35. package/dist/{index-jIh52A4c.js → index-nnLPmHli.js} +2 -2
  36. package/dist/index.js +1 -1
  37. package/dist/{instance-p-ezisoS.js → instance-DmL5Z2wc.js} +1 -1
  38. package/dist/{menuPermission-u3Gd_c8S.js → menuPermission-Bu40OObn.js} +3 -3
  39. package/dist/pages.js +1 -1
  40. package/dist/{send-default-agent-team-message-BhIV6T6O.js → send-default-agent-team-message-DPRCcmZq.js} +1 -1
  41. package/dist/{sso-user-Ib1jhF7t.js → sso-user-DyqailS7.js} +1 -1
  42. package/dist/{training-D3Uy5K_M.js → training-C5Fs8r2U.js} +1 -1
  43. package/dist/{webide-BGQnArzY.js → webide-DwbwUqaR.js} +3 -3
  44. package/dist/z-team-component.css +1 -1
  45. package/package.json +1 -1
  46. package/dist/SystemShell-gcfNlt2L.js +0 -688
  47. package/dist/index-HJ3Kt-NT.js +0 -358
  48. package/dist/index-ZuYJoo9E.js +0 -118
@@ -1,358 +0,0 @@
1
- import { jsxs as l, jsx as n, Fragment as O } from "react/jsx-runtime";
2
- import { ReloadOutlined as se, SearchOutlined as oe, RightOutlined as le, TeamOutlined as de, MessageOutlined as ue } from "@ant-design/icons";
3
- import { Tooltip as he, Input as pe, Spin as G, Empty as h, Tag as K, Button as U } from "antd";
4
- import { useState as d, useRef as _e, useCallback as m, useEffect as z, useMemo as D } from "react";
5
- import { u as v } from "./ComponentDoc-C_289lsE.js";
6
- import { C as me } from "./createWorkspaceWsHandler-DcNA1pfi.js";
7
- import { l as ve, c as fe } from "./api-BdP8mK8v.js";
8
- const Ce = "product-workspace", W = "productCode";
9
- function L(c) {
10
- if (!c.ok) throw new Error(`产品接口失败 (${c.status})`);
11
- return c.json();
12
- }
13
- async function Ne() {
14
- const c = v.getState().token, i = await fetch(`/api/product/list${c ? `?token=${encodeURIComponent(c)}` : ""}`, {
15
- credentials: "include",
16
- headers: { Accept: "application/json" }
17
- }), a = await L(i), r = Array.isArray(a) ? a : a == null ? void 0 : a.data;
18
- return Array.isArray(r) ? r.map((u) => ({
19
- ...u,
20
- productCode: String(u.productCode ?? u.code ?? ""),
21
- name: String(u.name ?? u.productCode ?? u.code ?? "未命名")
22
- })) : [];
23
- }
24
- async function we(c) {
25
- try {
26
- const i = await fetch(`/api/product/${encodeURIComponent(c)}`, {
27
- credentials: "include",
28
- headers: { Accept: "application/json" }
29
- }), a = await L(i), r = (a == null ? void 0 : a.data) ?? a;
30
- return r && typeof r == "object" ? { ...r, productCode: c } : null;
31
- } catch {
32
- return null;
33
- }
34
- }
35
- async function Re(c) {
36
- try {
37
- const i = await fetch(`/api/product/${encodeURIComponent(c)}/atelier/workspace`, {
38
- credentials: "include",
39
- headers: { Accept: "application/json" }
40
- }), a = await L(i), r = (a == null ? void 0 : a.data) ?? a;
41
- return r && typeof r == "object" && Array.isArray(r.files) ? r.files : Array.isArray(r) ? r : [];
42
- } catch {
43
- return [];
44
- }
45
- }
46
- async function Pe(c, i) {
47
- try {
48
- const a = await fetch(
49
- `/api/product/${encodeURIComponent(c)}/atelier/files/raw?path=${encodeURIComponent(i)}`,
50
- { credentials: "include", headers: { Accept: "text/html, application/json" } }
51
- );
52
- return a.ok ? await a.text() : null;
53
- } catch {
54
- return null;
55
- }
56
- }
57
- function ye(c) {
58
- var r;
59
- const i = (r = c.ext) == null ? void 0 : r.params;
60
- if (!i || typeof i != "object") return null;
61
- const a = i[W];
62
- return a == null ? null : String(a);
63
- }
64
- async function ge(c, i) {
65
- try {
66
- return (await ve(i)).filter((r) => ye(r) === c);
67
- } catch {
68
- return [];
69
- }
70
- }
71
- async function Te(c, i, a) {
72
- return fe(
73
- { scenario_code: Ce, name: i || `产品 ${c} 讨论组` },
74
- a,
75
- { [W]: c }
76
- );
77
- }
78
- const Se = "_container_nuvv9_5", Ae = "_left_nuvv9_14", Ee = "_leftHeader_nuvv9_24", Ie = "_leftTitleRow_nuvv9_30", ke = "_leftTitle_nuvv9_30", Ge = "_backBtn_nuvv9_47", Le = "_iconBtn_nuvv9_61", je = "_leftBody_nuvv9_76", He = "_searchInput_nuvv9_82", $e = "_productList_nuvv9_86", Be = "_fileList_nuvv9_87", Fe = "_productRow_nuvv9_93", be = "_productRowActive_nuvv9_107", Me = "_productName_nuvv9_111", xe = "_productCode_nuvv9_120", Oe = "_fileTreeHint_nuvv9_126", Ke = "_fileRow_nuvv9_132", Ue = "_fileRowActive_nuvv9_146", ze = "_fileRowIcon_nuvv9_150", De = "_fileRowName_nuvv9_155", We = "_fileKindTag_nuvv9_164", qe = "_center_nuvv9_172", Je = "_centerFill_nuvv9_181", Ye = "_productInfoCard_nuvv9_189", Qe = "_pCardHeader_nuvv9_199", Ve = "_pCardCode_nuvv9_206", Xe = "_pCardName_nuvv9_214", Ze = "_pCardDesc_nuvv9_221", et = "_pCardStats_nuvv9_228", tt = "_renderArea_nuvv9_236", nt = "_renderIframe_nuvv9_246", ct = "_renderCode_nuvv9_252", at = "_right_nuvv9_265", rt = "_chatSide_nuvv9_276", it = "_chatSideHeader_nuvv9_282", st = "_chatSideTitle_nuvv9_291", ot = "_chatGroupList_nuvv9_300", lt = "_chatGroupRow_nuvv9_309", dt = "_chatGroupRowActive_nuvv9_323", ut = "_chatGroupName_nuvv9_327", ht = "_chatGroupTime_nuvv9_336", pt = "_chatPane_nuvv9_343", _t = "_chatPaneHeader_nuvv9_349", mt = "_chatPaneTitle_nuvv9_358", vt = "_chatPaneBody_nuvv9_367", t = {
79
- container: Se,
80
- left: Ae,
81
- leftHeader: Ee,
82
- leftTitleRow: Ie,
83
- leftTitle: ke,
84
- backBtn: Ge,
85
- iconBtn: Le,
86
- leftBody: je,
87
- searchInput: He,
88
- productList: $e,
89
- fileList: Be,
90
- productRow: Fe,
91
- productRowActive: be,
92
- productName: Me,
93
- productCode: xe,
94
- fileTreeHint: Oe,
95
- fileRow: Ke,
96
- fileRowActive: Ue,
97
- fileRowIcon: ze,
98
- fileRowName: De,
99
- fileKindTag: We,
100
- center: qe,
101
- centerFill: Je,
102
- productInfoCard: Ye,
103
- pCardHeader: Qe,
104
- pCardCode: Ve,
105
- pCardName: Xe,
106
- pCardDesc: Ze,
107
- pCardStats: et,
108
- renderArea: tt,
109
- renderIframe: nt,
110
- renderCode: ct,
111
- right: at,
112
- chatSide: rt,
113
- chatSideHeader: it,
114
- chatSideTitle: st,
115
- chatGroupList: ot,
116
- chatGroupRow: lt,
117
- chatGroupRowActive: dt,
118
- chatGroupName: ut,
119
- chatGroupTime: ht,
120
- chatPane: pt,
121
- chatPaneHeader: _t,
122
- chatPaneTitle: mt,
123
- chatPaneBody: vt
124
- };
125
- function ft(c) {
126
- return {
127
- id: String(c.id),
128
- name: c.name,
129
- description: c.description ?? "",
130
- workspace_path: c.workspacePath || c.name,
131
- status: c.status,
132
- created_at: c.createTime ?? "",
133
- scenario_id: String(c.id),
134
- scenario_code: c.scenarioCode,
135
- scenario_name: c.scenarioName ?? c.name
136
- };
137
- }
138
- function q(c) {
139
- const i = c.toLowerCase();
140
- return /\.(html?|png|jpe?g|webp|svg|pdf)$/.test(i) ? "design" : /\.(md|markdown|txt|docx?)$/.test(i) ? "doc" : /\.(js|ts|tsx|jsx|java|py|json|yml|yaml|sql|css|vue|go|rs)$/.test(i) ? "code" : "other";
141
- }
142
- function J(c, i = "") {
143
- const a = [];
144
- for (const r of c ?? []) {
145
- const u = r.path || `${i}${r.name ?? ""}`, N = r.name || u.split("/").pop() || u, o = r.type === "dir" || Array.isArray(r.children);
146
- a.push({ path: u, name: N, dir: o, kind: q(u), depth: i.split("/").filter(Boolean).length }), o && Array.isArray(r.children) && a.push(...J(r.children, `${u}/`));
147
- }
148
- return a;
149
- }
150
- function Tt() {
151
- const c = v((e) => e.token), i = v((e) => e.selectProject), [a, r] = d([]), [u, N] = d(!0), [o, Y] = d(null), [s, Q] = d(null), [P, j] = d(!1), [y, V] = d([]), [X, H] = d(!1), [g, T] = d(null), [S, w] = d(null), [Z, ee] = d("other"), [f, te] = d(""), [C, $] = d([]), [B, ne] = d(null), [R, F] = d(!1), [ce, b] = d("list"), _ = _e(null), A = m(async () => {
152
- N(!0);
153
- try {
154
- const e = await Ne();
155
- r(e);
156
- } catch {
157
- r([]);
158
- } finally {
159
- N(!1);
160
- }
161
- }, []);
162
- z(() => {
163
- A();
164
- }, [A]);
165
- const M = m(
166
- async (e) => {
167
- Y(e), j(!1), T(null), w(null);
168
- const p = await we(e);
169
- Q(p);
170
- const k = await ge(e, c);
171
- $(k);
172
- },
173
- [c]
174
- ), ae = m(async () => {
175
- if (!o) return;
176
- j(!0), T(null), w(null), H(!0);
177
- const e = await Re(o);
178
- V(e), H(!1);
179
- }, [o]), re = m(
180
- async (e) => {
181
- if (!o) return;
182
- T(e), w(null);
183
- const p = q(e);
184
- ee(p);
185
- const k = await Pe(o, e);
186
- w(k ?? "");
187
- },
188
- [o]
189
- ), E = m(
190
- async (e) => {
191
- if (!e) return;
192
- const p = ft(e);
193
- _.current = v.getState().currentProject, ne(e.id), b("chat"), i(p);
194
- },
195
- [i]
196
- ), ie = m(async () => {
197
- if (!(!o || R)) {
198
- F(!0);
199
- try {
200
- const e = await Te(
201
- o,
202
- `${(s == null ? void 0 : s.name) || o} · 讨论组 ${C.length + 1}`,
203
- c
204
- );
205
- $((p) => [...p, e]), await E(e);
206
- } finally {
207
- F(!1);
208
- }
209
- }
210
- }, [o, R, C.length, s == null ? void 0 : s.name, c, E]);
211
- z(() => () => {
212
- _.current !== void 0 && v.setState({ currentProject: _.current });
213
- }, [B]);
214
- const I = D(() => J(y), [y]), x = D(
215
- () => a.filter((e) => !f || e.name.includes(f) || e.productCode.includes(f)),
216
- [a, f]
217
- );
218
- return /* @__PURE__ */ l("div", { className: t.container, children: [
219
- /* @__PURE__ */ l("aside", { className: t.left, children: [
220
- /* @__PURE__ */ n("div", { className: t.leftHeader, children: P && o ? /* @__PURE__ */ l("div", { className: t.leftTitleRow, children: [
221
- /* @__PURE__ */ n("button", { type: "button", className: t.backBtn, onClick: () => M(o), children: "←" }),
222
- /* @__PURE__ */ n("span", { className: t.leftTitle, title: (s == null ? void 0 : s.name) || o, children: (s == null ? void 0 : s.name) || o })
223
- ] }) : /* @__PURE__ */ l("div", { className: t.leftTitleRow, children: [
224
- /* @__PURE__ */ n("span", { className: t.leftTitle, children: "产品" }),
225
- /* @__PURE__ */ n(he, { title: "刷新产品列表", children: /* @__PURE__ */ n("button", { type: "button", className: t.iconBtn, onClick: A, children: /* @__PURE__ */ n(se, {}) }) })
226
- ] }) }),
227
- /* @__PURE__ */ n("div", { className: t.leftBody, children: P ? /* @__PURE__ */ l(O, { children: [
228
- /* @__PURE__ */ n("div", { className: t.fileTreeHint, children: "文件(设计稿 · 文档 · 产物)" }),
229
- X ? /* @__PURE__ */ n("div", { className: t.centerFill, children: /* @__PURE__ */ n(G, { size: "small" }) }) : I.length === 0 ? /* @__PURE__ */ n(h, { image: h.PRESENTED_IMAGE_SIMPLE, description: "产品下暂无文件" }) : /* @__PURE__ */ n("div", { className: t.fileList, children: I.map((e) => /* @__PURE__ */ l(
230
- "div",
231
- {
232
- className: `${t.fileRow} ${g === e.path ? t.fileRowActive : ""}`,
233
- style: { paddingLeft: 12 + e.depth * 16 },
234
- onClick: () => !e.dir && re(e.path),
235
- children: [
236
- /* @__PURE__ */ n("span", { className: t.fileRowIcon, children: e.dir ? "📁" : e.kind === "design" ? "🖼" : e.kind === "doc" ? "📄" : e.kind === "code" ? "{" : "◦" }),
237
- /* @__PURE__ */ n("span", { className: t.fileRowName, children: e.name }),
238
- e.kind === "design" && /* @__PURE__ */ n(K, { className: t.fileKindTag, color: "blue", children: "设计稿" })
239
- ]
240
- },
241
- e.path
242
- )) })
243
- ] }) : /* @__PURE__ */ l(O, { children: [
244
- /* @__PURE__ */ n(
245
- pe,
246
- {
247
- prefix: /* @__PURE__ */ n(oe, {}),
248
- placeholder: "搜索产品",
249
- value: f,
250
- onChange: (e) => te(e.target.value),
251
- allowClear: !0,
252
- size: "small",
253
- className: t.searchInput
254
- }
255
- ),
256
- u ? /* @__PURE__ */ n("div", { className: t.centerFill, children: /* @__PURE__ */ n(G, { size: "small" }) }) : x.length === 0 ? /* @__PURE__ */ n(h, { image: h.PRESENTED_IMAGE_SIMPLE, description: "暂无产品" }) : /* @__PURE__ */ n("div", { className: t.productList, children: x.map((e) => /* @__PURE__ */ l(
257
- "div",
258
- {
259
- className: `${t.productRow} ${o === e.productCode ? t.productRowActive : ""}`,
260
- onClick: () => M(e.productCode),
261
- children: [
262
- /* @__PURE__ */ n("span", { className: t.productName, title: e.name, children: e.name }),
263
- /* @__PURE__ */ n("span", { className: t.productCode, children: e.productCode })
264
- ]
265
- },
266
- e.productCode
267
- )) })
268
- ] }) })
269
- ] }),
270
- /* @__PURE__ */ n("main", { className: t.center, children: o ? P ? g == null ? /* @__PURE__ */ n("div", { className: t.centerFill, children: /* @__PURE__ */ n(h, { image: h.PRESENTED_IMAGE_SIMPLE, description: "点击左侧文件查看渲染" }) }) : S == null ? /* @__PURE__ */ n("div", { className: t.centerFill, children: /* @__PURE__ */ n(G, {}) }) : /* @__PURE__ */ n("div", { className: t.renderArea, children: Z === "design" ? (
271
- /* 设计稿:raw 通常为 HTML → iframe srcdoc 渲染 */
272
- /* @__PURE__ */ n(
273
- "iframe",
274
- {
275
- className: t.renderIframe,
276
- srcDoc: S,
277
- title: g,
278
- sandbox: "allow-scripts allow-same-origin"
279
- }
280
- )
281
- ) : /* @__PURE__ */ n("pre", { className: t.renderCode, children: S || "(空文件)" }) }) : /* @__PURE__ */ l("div", { className: t.productInfoCard, children: [
282
- /* @__PURE__ */ l("div", { className: t.pCardHeader, children: [
283
- /* @__PURE__ */ n("span", { className: t.pCardCode, children: o }),
284
- (s == null ? void 0 : s.status) && /* @__PURE__ */ n(K, { children: s.status })
285
- ] }),
286
- /* @__PURE__ */ n("h2", { className: t.pCardName, children: (s == null ? void 0 : s.name) || o }),
287
- /* @__PURE__ */ n("p", { className: t.pCardDesc, children: (s == null ? void 0 : s.description) || "暂无产品描述" }),
288
- /* @__PURE__ */ l("div", { className: t.pCardStats, children: [
289
- /* @__PURE__ */ l("span", { children: [
290
- "文件: ",
291
- y.length > 0 ? I.filter((e) => !e.dir).length : "未加载"
292
- ] }),
293
- /* @__PURE__ */ l("span", { children: [
294
- "聊天组: ",
295
- C.length
296
- ] })
297
- ] }),
298
- /* @__PURE__ */ n(U, { type: "primary", icon: /* @__PURE__ */ n(le, {}), onClick: ae, children: "进入产品" })
299
- ] }) : /* @__PURE__ */ n("div", { className: t.centerFill, children: /* @__PURE__ */ n(h, { image: h.PRESENTED_IMAGE_SIMPLE, description: "从左侧选择一个产品" }) }) }),
300
- /* @__PURE__ */ n("aside", { className: t.right, children: o ? ce === "list" ? /* @__PURE__ */ l("div", { className: t.chatSide, children: [
301
- /* @__PURE__ */ l("div", { className: t.chatSideHeader, children: [
302
- /* @__PURE__ */ l("span", { className: t.chatSideTitle, children: [
303
- /* @__PURE__ */ n(de, {}),
304
- " 聊天组"
305
- ] }),
306
- /* @__PURE__ */ l(
307
- U,
308
- {
309
- size: "small",
310
- type: "primary",
311
- ghost: !0,
312
- loading: R,
313
- onClick: ie,
314
- children: [
315
- /* @__PURE__ */ n(ue, {}),
316
- " 发起聊天"
317
- ]
318
- }
319
- )
320
- ] }),
321
- /* @__PURE__ */ n("div", { className: t.chatGroupList, children: C.length === 0 ? /* @__PURE__ */ n(h, { image: h.PRESENTED_IMAGE_SIMPLE, description: "还没有聊天组,点「发起聊天」开始" }) : C.map((e) => /* @__PURE__ */ l(
322
- "div",
323
- {
324
- className: `${t.chatGroupRow} ${B === e.id ? t.chatGroupRowActive : ""}`,
325
- onClick: () => !R && E(e),
326
- children: [
327
- /* @__PURE__ */ n("span", { className: t.chatGroupName, title: e.name, children: e.name }),
328
- /* @__PURE__ */ n("span", { className: t.chatGroupTime, children: String(e.createTime ?? "").slice(5, 16).replace("T", " ") })
329
- ]
330
- },
331
- e.id
332
- )) })
333
- ] }) : /* @__PURE__ */ l("div", { className: t.chatPane, children: [
334
- /* @__PURE__ */ l("div", { className: t.chatPaneHeader, children: [
335
- /* @__PURE__ */ n(
336
- "button",
337
- {
338
- type: "button",
339
- className: t.backBtn,
340
- onClick: () => {
341
- b("list"), _.current !== void 0 && v.setState({ currentProject: _.current }), _.current = void 0;
342
- },
343
- title: "返回聊天组列表",
344
- children: "←"
345
- }
346
- ),
347
- /* @__PURE__ */ l("span", { className: t.chatPaneTitle, children: [
348
- "群聊 · ",
349
- (s == null ? void 0 : s.name) || o
350
- ] })
351
- ] }),
352
- /* @__PURE__ */ n("div", { className: t.chatPaneBody, children: /* @__PURE__ */ n(me, { hideTabs: !0 }) })
353
- ] }) : /* @__PURE__ */ n("div", { className: t.centerFill, children: /* @__PURE__ */ n(h, { image: h.PRESENTED_IMAGE_SIMPLE, description: "选择产品后在此发起群聊" }) }) })
354
- ] });
355
- }
356
- export {
357
- Tt as default
358
- };
@@ -1,118 +0,0 @@
1
- import { jsxs as a, jsx as e } from "react/jsx-runtime";
2
- import { useState as y, useMemo as d } from "react";
3
- import { useNavigate as G, useLocation as k } from "react-router-dom";
4
- import { CodeOutlined as L, DownOutlined as N, RightOutlined as O, AppstoreOutlined as v, TableOutlined as A, DatabaseOutlined as w, RobotOutlined as H, FunctionOutlined as M, ApartmentOutlined as W, EyeOutlined as C, BranchesOutlined as $, DeploymentUnitOutlined as p, SafetyCertificateOutlined as g } from "@ant-design/icons";
5
- import R from "@yuku123/z-lc-component";
6
- import { f as U, M as x } from "./menuPermission-u3Gd_c8S.js";
7
- import { u as b } from "./ComponentDoc-C_289lsE.js";
8
- const D = "_shell_1n5c7_7", E = "_sidebar_1n5c7_15", P = "_sidebarHeader_1n5c7_26", j = "_menuList_1n5c7_37", K = "_menuGroup_1n5c7_43", T = "_menuGroupHeader_1n5c7_47", B = "_menuGroupLabel_1n5c7_65", F = "_menuGroupArrow_1n5c7_69", q = "_menuSubList_1n5c7_74", z = "_menuSubItemWrap_1n5c7_80", J = "_menuSubItem_1n5c7_80", Q = "_menuSubItemActive_1n5c7_101", V = "_menuSubItemIcon_1n5c7_108", X = "_menuSubItemLabel_1n5c7_113", Y = "_main_1n5c7_118", t = {
9
- shell: D,
10
- sidebar: E,
11
- sidebarHeader: P,
12
- menuList: j,
13
- menuGroup: K,
14
- menuGroupHeader: T,
15
- menuGroupLabel: B,
16
- menuGroupArrow: F,
17
- menuSubList: q,
18
- menuSubItemWrap: z,
19
- menuSubItem: J,
20
- menuSubItemActive: Q,
21
- menuSubItemIcon: V,
22
- menuSubItemLabel: X,
23
- main: Y
24
- }, r = [
25
- {
26
- title: "应用",
27
- items: [
28
- { key: "apps", label: "应用列表", icon: /* @__PURE__ */ e(v, {}), path: "apps" }
29
- ]
30
- },
31
- {
32
- title: "建模",
33
- items: [
34
- { key: "designer", label: "Schema 设计器", icon: /* @__PURE__ */ e(A, {}), path: "designer" },
35
- { key: "db-import", label: "从数据库导入", icon: /* @__PURE__ */ e(w, {}), path: "db-import" },
36
- { key: "admin-ai", label: "AI 建模", icon: /* @__PURE__ */ e(H, {}), path: "admin/ai" }
37
- ]
38
- },
39
- {
40
- title: "配置",
41
- items: [
42
- { key: "admin-dicts", label: "数据字典", icon: /* @__PURE__ */ e(M, {}), path: "admin/dicts" },
43
- { key: "admin-relations", label: "实体关系", icon: /* @__PURE__ */ e(W, {}), path: "admin/relations" },
44
- { key: "admin-views", label: "视图配置", icon: /* @__PURE__ */ e(C, {}), path: "admin/views" },
45
- { key: "admin-pipelines", label: "Pipeline", icon: /* @__PURE__ */ e($, {}), path: "admin/pipelines" },
46
- { key: "admin-workflows", label: "流程绑定", icon: /* @__PURE__ */ e(p, {}), path: "admin/workflows" }
47
- ]
48
- },
49
- {
50
- title: "运行",
51
- items: [
52
- { key: "admin-permissions", label: "权限矩阵", icon: /* @__PURE__ */ e(g, {}), path: "admin/permissions", permission: "PERMISSION_MANAGE" },
53
- { key: "admin-deployments", label: "部署记录", icon: /* @__PURE__ */ e(p, {}), path: "admin/deployments" }
54
- ]
55
- }
56
- ], c = "/lc";
57
- function Z(l) {
58
- if (!l.startsWith(c)) return null;
59
- const m = l.slice(c.length).replace(/^\//, "");
60
- for (const o of r)
61
- for (const s of o.items)
62
- if (m === s.path || m.startsWith(`${s.path}/`)) return s.key;
63
- return null;
64
- }
65
- function le() {
66
- const l = G(), { pathname: m } = k(), o = b((n) => n.currentUser), s = b((n) => n.permissionState), [_, h] = y(
67
- new Set(r.map((n) => n.title))
68
- ), S = d(
69
- () => s === "failed" ? r : U(r, o),
70
- [o, s]
71
- ), I = d(() => Z(m), [m]), f = (n) => {
72
- h((u) => {
73
- const i = new Set(u);
74
- return i.has(n) ? i.delete(n) : i.add(n), i;
75
- });
76
- };
77
- return /* @__PURE__ */ a("div", { className: t.shell, children: [
78
- /* @__PURE__ */ a("aside", { className: t.sidebar, children: [
79
- /* @__PURE__ */ a("div", { className: t.sidebarHeader, children: [
80
- /* @__PURE__ */ e(L, {}),
81
- /* @__PURE__ */ e("span", { children: "研发工作台" })
82
- ] }),
83
- /* @__PURE__ */ e(x, {}),
84
- /* @__PURE__ */ e("nav", { className: t.menuList, children: S.map((n) => {
85
- const u = !_.has(n.title);
86
- return /* @__PURE__ */ a("div", { className: t.menuGroup, children: [
87
- /* @__PURE__ */ a(
88
- "div",
89
- {
90
- className: t.menuGroupHeader,
91
- onClick: () => f(n.title),
92
- children: [
93
- /* @__PURE__ */ e("span", { className: t.menuGroupLabel, children: n.title }),
94
- /* @__PURE__ */ e("span", { className: t.menuGroupArrow, children: u ? /* @__PURE__ */ e(N, {}) : /* @__PURE__ */ e(O, {}) })
95
- ]
96
- }
97
- ),
98
- u && /* @__PURE__ */ e("ul", { className: t.menuSubList, children: n.items.map((i) => /* @__PURE__ */ a(
99
- "li",
100
- {
101
- className: `${t.menuSubItemWrap} ${t.menuSubItem} ${I === i.key ? t.menuSubItemActive : ""}`,
102
- onClick: () => l(`${c}/${i.path}`),
103
- children: [
104
- /* @__PURE__ */ e("span", { className: t.menuSubItemIcon, children: i.icon }),
105
- /* @__PURE__ */ e("span", { className: t.menuSubItemLabel, children: i.label })
106
- ]
107
- },
108
- i.key
109
- )) })
110
- ] }, n.title);
111
- }) })
112
- ] }),
113
- /* @__PURE__ */ e("main", { className: t.main, children: /* @__PURE__ */ e(R, {}) })
114
- ] });
115
- }
116
- export {
117
- le as default
118
- };