@yuku123/z-team-component 0.2.140 → 0.2.142

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 (57) hide show
  1. package/dist/{AdminModuleContent-DDB35gOh.js → AdminModuleContent-DIntalEE.js} +10526 -10697
  2. package/dist/{ChangeLogView-AKOZ6Ski.js → ChangeLogView-BG0idpcI.js} +1 -1
  3. package/dist/{ComponentDoc-SiXXhka1.js → ComponentDoc-DmA8kQED.js} +1318 -1313
  4. package/dist/{InvitationManagementPage-CRbABOKe.js → InvitationManagementPage-BmvQrlzu.js} +1 -1
  5. package/dist/{OnboardingPage-BNJopRYO.js → OnboardingPage-BNqu7ED-.js} +2 -2
  6. package/dist/ScheduledTasks-BpLYITou.js +12005 -0
  7. package/dist/SystemShell-CHJGJAor.js +859 -0
  8. package/dist/{admin-logs-B3IxooG2.js → admin-logs-CGbHioxz.js} +5 -5
  9. package/dist/{api-DmBlT5MH.js → api-CVAq8S_3.js} +1 -1
  10. package/dist/{api-DW8nsucC.js → api-DTQ6gite.js} +1 -1
  11. package/dist/createWorkspaceWsHandler-eEZssgTR.js +11757 -0
  12. package/dist/{ctc-sso-DtJHC-2M.js → ctc-sso-Hj8fdMY0.js} +8 -6
  13. package/dist/{index-VmRWH4U5.js → index-1hUJPdXC.js} +9 -9
  14. package/dist/{index-C24QsGsG.js → index-B02tvvRk.js} +1 -1
  15. package/dist/{index-BSqUODiN.js → index-BLDm7Ltq.js} +30 -31
  16. package/dist/index-BXas8GPY.js +1840 -0
  17. package/dist/{index-CvHMXrAD.js → index-BiKw2Cl_.js} +1 -1
  18. package/dist/index-BlDMnzJF.js +18 -0
  19. package/dist/{index-BBLRGBWu.js → index-BmlFIrWx.js} +1 -1
  20. package/dist/{index-Du95tdVf.js → index-BruNw5wQ.js} +29 -30
  21. package/dist/{index-BV64kKse.js → index-ByWmrjar.js} +2 -2
  22. package/dist/{index-DCAO83Wb.js → index-C6TJo_6f.js} +1325 -1187
  23. package/dist/{index-DDOfdrn4.js → index-CSuF7xTK.js} +3954 -3985
  24. package/dist/index-CkFZb89W.js +1298 -0
  25. package/dist/{index-C1nr0UeB.js → index-ClaU3cVV.js} +20 -21
  26. package/dist/{index-C7DSDopw.js → index-CnHG8LvQ.js} +26 -27
  27. package/dist/{index-CXjen4Gx.js → index-CwohTaZ3.js} +342 -389
  28. package/dist/{index-CJ7dJejJ.js → index-D2qy0vH-.js} +17 -17
  29. package/dist/{index-DHrMSEVJ.js → index-D6jssKSM.js} +1 -1
  30. package/dist/{index-l9KH8r7F.js → index-DCbdksxa.js} +780 -792
  31. package/dist/{index-D-G4mbxH.js → index-DNofgrle.js} +2 -2
  32. package/dist/{index-D7thpI99.js → index-DUEGauT8.js} +1 -1
  33. package/dist/index-DnA9mLM4.js +136 -0
  34. package/dist/{index-CEoS_jEa.js → index-DoQpFpjM.js} +6 -6
  35. package/dist/{index-DjbLq5lI.js → index-G4_ZNL1t.js} +2 -2
  36. package/dist/{index-DULYXalY.js → index-WYKbD2Kc.js} +9 -9
  37. package/dist/{index-D440bEgm.js → index-ZTJ7n_J_.js} +199 -193
  38. package/dist/{index-Hv2KDG7i.js → index-iFIFnLjk.js} +3 -3
  39. package/dist/index.js +1 -1
  40. package/dist/instance-Ce0ksjOY.js +116 -0
  41. package/dist/{menuPermission-DxknHmt8.js → menuPermission-CXN-JDku.js} +3 -3
  42. package/dist/pages.js +1 -1
  43. package/dist/{send-default-agent-team-message-DYytBtLc.js → send-default-agent-team-message-Caz3lGg6.js} +1 -1
  44. package/dist/{training-CKYPSkUP.js → training-ry7fCVV4.js} +1 -1
  45. package/dist/{webide-JAalC_Wr.js → webide-DyvaibPK.js} +1161 -1317
  46. package/dist/z-team-component.css +1 -1
  47. package/package.json +5 -5
  48. package/dist/ScheduledTasks-Cn_CEZ-B.js +0 -12006
  49. package/dist/SystemShell-B8Tyluzu.js +0 -893
  50. package/dist/SystemWorkbench.module-DpLM0zgA.js +0 -36
  51. package/dist/createWorkspaceWsHandler-5MHgQGfJ.js +0 -12902
  52. package/dist/index-BT4oQJby.js +0 -228
  53. package/dist/index-DrDFy5jN.js +0 -139
  54. package/dist/index-DvslXAjT.js +0 -1323
  55. package/dist/index-NIu3OKHi.js +0 -1868
  56. package/dist/instance-B4SrJ-BY.js +0 -186
  57. package/dist/sso-user-DN6kSAc0.js +0 -43
@@ -1,1323 +0,0 @@
1
- import { jsxs as s, jsx as t, Fragment as Nt } from "react/jsx-runtime";
2
- import { ReloadOutlined as yt, AppstoreOutlined as Re, DownOutlined as ft, RightOutlined as xe, SearchOutlined as wt, TeamOutlined as bt, MessageOutlined as Tt, DeploymentUnitOutlined as kt, ThunderboltOutlined as Ct } from "@ant-design/icons";
3
- import { Button as te, Select as Ae, Spin as ve, Empty as b, Tag as I, Input as D } from "antd";
4
- import { useState as p, useCallback as g, useEffect as ee, useMemo as ge, useRef as St } from "react";
5
- import { u as B } from "./ComponentDoc-SiXXhka1.js";
6
- import { h as X } from "./history-BlrA1eaW.js";
7
- import { menuItems as Pt } from "@yuku123/z-product-component";
8
- import { C as At } from "./createWorkspaceWsHandler-5MHgQGfJ.js";
9
- import { s as w } from "./SystemWorkbench.module-DpLM0zgA.js";
10
- import { l as Rt, c as It } from "./api-DW8nsucC.js";
11
- const Et = "product-workspace", ze = "productCode";
12
- function T(n) {
13
- if (!n.ok) throw new Error(`产品接口失败 (${n.status})`);
14
- return n.json();
15
- }
16
- async function Lt() {
17
- const n = B.getState().token, r = await fetch(`/api/product/list${n ? `?token=${encodeURIComponent(n)}` : ""}`, {
18
- credentials: "include",
19
- headers: { Accept: "application/json" }
20
- }), i = await T(r), o = Array.isArray(i) ? i : i == null ? void 0 : i.data;
21
- return Array.isArray(o) ? o.map((N) => ({
22
- ...N,
23
- productCode: String(N.productCode ?? N.code ?? ""),
24
- name: String(N.name ?? N.productCode ?? N.code ?? "未命名")
25
- })) : [];
26
- }
27
- async function Gt(n) {
28
- try {
29
- const r = await fetch(`/api/product/${encodeURIComponent(n)}`, {
30
- credentials: "include",
31
- headers: { Accept: "application/json" }
32
- }), i = await T(r), o = (i == null ? void 0 : i.data) ?? i;
33
- return o && typeof o == "object" ? { ...o, productCode: n } : null;
34
- } catch {
35
- return null;
36
- }
37
- }
38
- async function $t(n) {
39
- try {
40
- const r = await fetch(`/api/product/${encodeURIComponent(n)}/atelier/workspace`, {
41
- credentials: "include",
42
- headers: { Accept: "application/json" }
43
- }), i = await T(r), o = (i == null ? void 0 : i.data) ?? i;
44
- return o && typeof o == "object" && Array.isArray(o.files) ? o.files : Array.isArray(o) ? o : [];
45
- } catch {
46
- return [];
47
- }
48
- }
49
- async function Bt(n, r) {
50
- try {
51
- const i = await fetch(
52
- `/api/product/${encodeURIComponent(n)}/atelier/files/raw?path=${encodeURIComponent(r)}`,
53
- { credentials: "include", headers: { Accept: "text/html, application/json" } }
54
- );
55
- return i.ok ? await i.text() : null;
56
- } catch {
57
- return null;
58
- }
59
- }
60
- function Ft(n) {
61
- var o;
62
- const r = (o = n.ext) == null ? void 0 : o.params;
63
- if (!r || typeof r != "object") return null;
64
- const i = r[ze];
65
- return i == null ? null : String(i);
66
- }
67
- async function Ot(n, r) {
68
- try {
69
- return (await Rt(r)).filter((o) => Ft(o) === n);
70
- } catch {
71
- return [];
72
- }
73
- }
74
- async function Ht(n, r, i) {
75
- return It(
76
- { scenario_code: Et, name: r || `产品 ${n} 讨论组` },
77
- i,
78
- { [ze]: n }
79
- );
80
- }
81
- function k(n) {
82
- return n && typeof n == "object" && "data" in n ? n.data : n;
83
- }
84
- async function jt() {
85
- try {
86
- const n = await fetch("/api/product/group/list", {
87
- credentials: "include",
88
- headers: { Accept: "application/json" }
89
- }), r = await T(n), i = k(r);
90
- return Array.isArray(i) ? i : [];
91
- } catch {
92
- return [];
93
- }
94
- }
95
- async function qt(n) {
96
- try {
97
- const r = await fetch("/api/product/group", {
98
- method: "POST",
99
- credentials: "include",
100
- headers: { Accept: "application/json", "Content-Type": "application/json" },
101
- body: JSON.stringify(n)
102
- }), i = await T(r);
103
- return k(i);
104
- } catch {
105
- return null;
106
- }
107
- }
108
- async function Dt(n) {
109
- try {
110
- const r = await fetch(`/api/product/${encodeURIComponent(n)}/app-binding/list`, {
111
- credentials: "include",
112
- headers: { Accept: "application/json" }
113
- }), i = await T(r), o = k(i);
114
- return Array.isArray(o) ? o : [];
115
- } catch {
116
- return [];
117
- }
118
- }
119
- async function Ut(n, r) {
120
- try {
121
- const i = await fetch(`/api/product/${encodeURIComponent(n)}/app-binding`, {
122
- method: "POST",
123
- credentials: "include",
124
- headers: { Accept: "application/json", "Content-Type": "application/json" },
125
- body: JSON.stringify(r)
126
- }), o = await T(i);
127
- return k(o);
128
- } catch {
129
- return null;
130
- }
131
- }
132
- async function xt(n) {
133
- try {
134
- const r = await fetch(`/api/product/${encodeURIComponent(n)}/requirement/list`, {
135
- credentials: "include",
136
- headers: { Accept: "application/json" }
137
- }), i = await T(r), o = k(i);
138
- return Array.isArray(o) ? o : [];
139
- } catch {
140
- return [];
141
- }
142
- }
143
- async function Mt(n, r) {
144
- try {
145
- const i = await fetch(`/api/product/${encodeURIComponent(n)}/requirement`, {
146
- method: "POST",
147
- credentials: "include",
148
- headers: { Accept: "application/json", "Content-Type": "application/json" },
149
- body: JSON.stringify(r)
150
- }), o = await T(i);
151
- return k(o);
152
- } catch {
153
- return null;
154
- }
155
- }
156
- async function U(n, r) {
157
- try {
158
- const i = await fetch(
159
- `/api/product/${encodeURIComponent(n)}/${r}`,
160
- { credentials: "include", headers: { Accept: "application/json" } }
161
- ), o = await T(i), N = k(o);
162
- return Array.isArray(N) ? N : [];
163
- } catch {
164
- return [];
165
- }
166
- }
167
- async function zt(n) {
168
- return U(n, "glossary/list");
169
- }
170
- async function Kt(n) {
171
- return U(n, "concept/list");
172
- }
173
- async function Vt(n) {
174
- return U(n, "scenario/list");
175
- }
176
- async function Jt(n) {
177
- return U(n, "design/list");
178
- }
179
- async function Wt(n) {
180
- return U(n, "chat/sessions");
181
- }
182
- async function Qt(n) {
183
- return U(n, "chat/proposals");
184
- }
185
- async function Yt() {
186
- try {
187
- const n = await fetch("/api/product/relation/types", {
188
- credentials: "include",
189
- headers: { Accept: "application/json" }
190
- }), r = await T(n), i = k(r);
191
- return i && typeof i == "object" ? i : {};
192
- } catch {
193
- return {};
194
- }
195
- }
196
- async function Zt() {
197
- try {
198
- const n = await fetch("/api/product/architecture", {
199
- credentials: "include",
200
- headers: { Accept: "application/json" }
201
- }), r = await T(n), i = k(r);
202
- return i && typeof i == "object" ? {
203
- products: Array.isArray(i.products) ? i.products : [],
204
- groups: Array.isArray(i.groups) ? i.groups : [],
205
- relations: Array.isArray(i.relations) ? i.relations : [],
206
- appBindings: Array.isArray(i.appBindings) ? i.appBindings : []
207
- } : { products: [], groups: [], relations: [], appBindings: [] };
208
- } catch {
209
- return { products: [], groups: [], relations: [], appBindings: [] };
210
- }
211
- }
212
- async function Xt(n) {
213
- try {
214
- const r = await fetch("/api/product/relation", {
215
- method: "POST",
216
- credentials: "include",
217
- headers: { Accept: "application/json", "Content-Type": "application/json" },
218
- body: JSON.stringify(n)
219
- }), i = await T(r);
220
- return k(i);
221
- } catch {
222
- return null;
223
- }
224
- }
225
- async function ea(n) {
226
- try {
227
- return await fetch(`/api/product/relation/${n}`, {
228
- method: "DELETE",
229
- credentials: "include",
230
- headers: { Accept: "application/json" }
231
- }), !0;
232
- } catch {
233
- return !1;
234
- }
235
- }
236
- async function ta(n, r) {
237
- try {
238
- const i = await fetch(`/api/product/${encodeURIComponent(n)}/requirement/${r.id}`, {
239
- method: "PUT",
240
- credentials: "include",
241
- headers: { Accept: "application/json", "Content-Type": "application/json" },
242
- body: JSON.stringify(r)
243
- }), o = await T(i);
244
- return k(o);
245
- } catch {
246
- return null;
247
- }
248
- }
249
- const aa = "_container_v1vhg_3", na = "_header_v1vhg_11", sa = "_title_v1vhg_23", ia = "_subtitle_v1vhg_30", ca = "_actions_v1vhg_36", ra = "_stats_v1vhg_42", oa = "_relForm_v1vhg_55", la = "_relFormLabel_v1vhg_66", da = "_centerFill_v1vhg_72", pa = "_groups_v1vhg_79", ua = "_groupBlock_v1vhg_89", ma = "_groupHeader_v1vhg_95", ha = "_groupName_v1vhg_101", _a = "_groupCount_v1vhg_107", va = "_productGrid_v1vhg_112", ga = "_productCard_v1vhg_118", Na = "_cardHead_v1vhg_134", ya = "_cardName_v1vhg_141", fa = "_cardTag_v1vhg_150", wa = "_cardCode_v1vhg_156", ba = "_cardDesc_v1vhg_161", Ta = "_cardSection_v1vhg_171", ka = "_sectionLabel_v1vhg_180", Ca = "_bindList_v1vhg_185", Sa = "_bindTag_v1vhg_191", Pa = "_relList_v1vhg_196", Aa = "_relRow_v1vhg_202", Ra = "_relTag_v1vhg_209", Ia = "_relTarget_v1vhg_215", Ea = "_relDel_v1vhg_225", m = {
250
- container: aa,
251
- header: na,
252
- title: sa,
253
- subtitle: ia,
254
- actions: ca,
255
- stats: ra,
256
- relForm: oa,
257
- relFormLabel: la,
258
- centerFill: da,
259
- groups: pa,
260
- groupBlock: ua,
261
- groupHeader: ma,
262
- groupName: ha,
263
- groupCount: _a,
264
- productGrid: va,
265
- productCard: ga,
266
- cardHead: Na,
267
- cardName: ya,
268
- cardTag: fa,
269
- cardCode: wa,
270
- cardDesc: ba,
271
- cardSection: Ta,
272
- sectionLabel: ka,
273
- bindList: Ca,
274
- bindTag: Sa,
275
- relList: Pa,
276
- relRow: Aa,
277
- relTag: Ra,
278
- relTarget: Ia,
279
- relDel: Ea
280
- };
281
- function La() {
282
- const [n, r] = p({ products: [], groups: [], relations: [], appBindings: [] }), [i, o] = p({}), [N, G] = p(!0), [d, x] = p(null), [l, M] = p(null), [C, ae] = p("DEPENDS_ON"), F = g(async () => {
283
- G(!0);
284
- try {
285
- const [u, _] = await Promise.all([Zt(), Yt()]);
286
- r(u), o(_);
287
- } finally {
288
- G(!1);
289
- }
290
- }, []);
291
- ee(() => {
292
- F();
293
- }, [F]);
294
- const E = g(
295
- (u) => {
296
- if (!u) return null;
297
- const _ = n.groups.find((h) => h.groupCode === u);
298
- return _ ? _.name : u;
299
- },
300
- [n.groups]
301
- ), Ne = ge(() => {
302
- const u = /* @__PURE__ */ new Map();
303
- for (const _ of n.products) {
304
- const h = _.groupCode ?? null;
305
- u.has(h) || u.set(h, []), u.get(h).push(_);
306
- }
307
- return [...u.entries()].sort((_, h) => _[0] === null ? 1 : h[0] === null ? -1 : String(E(_[0])).localeCompare(String(E(h[0])), "zh"));
308
- }, [n.products, E]), ne = g(
309
- (u) => n.appBindings.filter((_) => _.productCode === u),
310
- [n.appBindings]
311
- ), z = g(
312
- (u) => n.relations.filter((_) => _.productCode === u),
313
- [n.relations]
314
- ), S = g(
315
- (u) => {
316
- const _ = n.products.find((h) => h.productCode === u);
317
- return _ ? _.name : u;
318
- },
319
- [n.products]
320
- ), K = g(async () => {
321
- if (!d || !l || d === l) return;
322
- const u = await Xt({
323
- productCode: d,
324
- relatedCode: l,
325
- relationType: C,
326
- description: `${S(d)} ${i[C] ?? C} ${S(l)}`
327
- });
328
- u && (r((_) => ({ ..._, relations: [..._.relations, u] })), x(null), M(null));
329
- }, [d, l, C, i, S]), L = ge(
330
- () => n.products.map((u) => ({
331
- value: u.productCode,
332
- label: `${u.name}(${u.productCode})`
333
- })),
334
- [n.products]
335
- );
336
- return /* @__PURE__ */ s("div", { className: m.container, children: [
337
- /* @__PURE__ */ s("div", { className: m.header, children: [
338
- /* @__PURE__ */ s("div", { children: [
339
- /* @__PURE__ */ t("h2", { className: m.title, children: "架构全景" }),
340
- /* @__PURE__ */ t("p", { className: m.subtitle, children: "租户下所有产品整顿成一张架构图:产品群 · 产品↔产品关系 · 挂接的中间件/应用" })
341
- ] }),
342
- /* @__PURE__ */ s("div", { className: m.actions, children: [
343
- /* @__PURE__ */ s("span", { className: m.stats, children: [
344
- /* @__PURE__ */ t("b", { children: n.products.length }),
345
- " 产品",
346
- /* @__PURE__ */ t("b", { children: n.groups.length }),
347
- " 群",
348
- /* @__PURE__ */ t("b", { children: n.relations.length }),
349
- " 关系",
350
- /* @__PURE__ */ t("b", { children: n.appBindings.filter((u) => u.appType === "INFRA").length }),
351
- " 基建"
352
- ] }),
353
- /* @__PURE__ */ t(te, { size: "small", icon: /* @__PURE__ */ t(yt, {}), onClick: () => void F(), children: "刷新" })
354
- ] })
355
- ] }),
356
- /* @__PURE__ */ s("div", { className: m.relForm, children: [
357
- /* @__PURE__ */ t("span", { className: m.relFormLabel, children: "新建产品关系:" }),
358
- /* @__PURE__ */ t(
359
- Ae,
360
- {
361
- size: "small",
362
- placeholder: "起点产品",
363
- value: d,
364
- onChange: x,
365
- options: L,
366
- style: { width: 200 },
367
- showSearch: !0,
368
- optionFilterProp: "label"
369
- }
370
- ),
371
- /* @__PURE__ */ t(
372
- Ae,
373
- {
374
- size: "small",
375
- placeholder: "关系类型",
376
- value: C,
377
- onChange: (u) => ae(u),
378
- style: { width: 130 },
379
- options: Object.entries(i).map(([u, _]) => ({ value: u, label: _ }))
380
- }
381
- ),
382
- /* @__PURE__ */ t(
383
- Ae,
384
- {
385
- size: "small",
386
- placeholder: "终点产品",
387
- value: l,
388
- onChange: M,
389
- options: L,
390
- style: { width: 200 },
391
- showSearch: !0,
392
- optionFilterProp: "label"
393
- }
394
- ),
395
- /* @__PURE__ */ t(
396
- te,
397
- {
398
- size: "small",
399
- type: "primary",
400
- onClick: () => void K(),
401
- disabled: !d || !l || d === l,
402
- children: "建立关系"
403
- }
404
- )
405
- ] }),
406
- N ? /* @__PURE__ */ t("div", { className: m.centerFill, children: /* @__PURE__ */ t(ve, {}) }) : n.products.length === 0 ? /* @__PURE__ */ t("div", { className: m.centerFill, children: /* @__PURE__ */ t(b, { image: b.PRESENTED_IMAGE_SIMPLE, description: "暂无产品,先在产品库创建" }) }) : /* @__PURE__ */ t("div", { className: m.groups, children: Ne.map(([u, _]) => /* @__PURE__ */ s("div", { className: m.groupBlock, children: [
407
- /* @__PURE__ */ s("div", { className: m.groupHeader, children: [
408
- /* @__PURE__ */ t("span", { className: m.groupName, children: E(u) ? `📦 ${E(u)}` : "🗂 未分组" }),
409
- /* @__PURE__ */ s("span", { className: m.groupCount, children: [
410
- _.length,
411
- " 个产品"
412
- ] })
413
- ] }),
414
- /* @__PURE__ */ t("div", { className: m.productGrid, children: _.map((h) => {
415
- const se = ne(h.productCode ?? ""), V = z(h.productCode ?? "");
416
- return /* @__PURE__ */ s("div", { className: m.productCard, children: [
417
- /* @__PURE__ */ s("div", { className: m.cardHead, children: [
418
- /* @__PURE__ */ t("span", { className: m.cardName, title: h.name, children: h.name }),
419
- h.status && /* @__PURE__ */ t(I, { className: m.cardTag, children: h.status })
420
- ] }),
421
- /* @__PURE__ */ t("div", { className: m.cardCode, children: h.productCode }),
422
- h.description && /* @__PURE__ */ t("div", { className: m.cardDesc, title: h.description, children: h.description }),
423
- se.length > 0 && /* @__PURE__ */ s("div", { className: m.cardSection, children: [
424
- /* @__PURE__ */ t("div", { className: m.sectionLabel, children: "挂接" }),
425
- /* @__PURE__ */ t("div", { className: m.bindList, children: se.map((f) => /* @__PURE__ */ s(
426
- I,
427
- {
428
- className: m.bindTag,
429
- color: f.appType === "INFRA" ? "purple" : "geekblue",
430
- children: [
431
- f.appType === "INFRA" ? "🏗" : "🧩",
432
- " ",
433
- f.appName
434
- ]
435
- },
436
- f.id
437
- )) })
438
- ] }),
439
- V.length > 0 && /* @__PURE__ */ s("div", { className: m.cardSection, children: [
440
- /* @__PURE__ */ t("div", { className: m.sectionLabel, children: "关系" }),
441
- /* @__PURE__ */ t("div", { className: m.relList, children: V.map((f) => /* @__PURE__ */ s("div", { className: m.relRow, children: [
442
- /* @__PURE__ */ t(
443
- I,
444
- {
445
- className: m.relTag,
446
- color: f.relationType === "DEPENDS_ON" ? "orange" : f.relationType === "BUILT_ON" ? "cyan" : "blue",
447
- children: i[f.relationType] ?? f.relationType
448
- }
449
- ),
450
- /* @__PURE__ */ t("span", { className: m.relTarget, title: S(f.relatedCode), children: S(f.relatedCode) }),
451
- /* @__PURE__ */ t(
452
- "button",
453
- {
454
- type: "button",
455
- className: m.relDel,
456
- onClick: async () => {
457
- await ea(f.id), r(($) => ({
458
- ...$,
459
- relations: $.relations.filter((J) => J.id !== f.id)
460
- }));
461
- },
462
- title: "删除关系",
463
- children: "✕"
464
- }
465
- )
466
- ] }, f.id)) })
467
- ] })
468
- ] }, h.productCode);
469
- }) })
470
- ] }, u ?? "__none__")) })
471
- ] });
472
- }
473
- const Ga = "_container_13spk_5", $a = "_libraryView_13spk_14", Ba = "_libraryHeader_13spk_22", Fa = "_libraryTitle_13spk_34", Oa = "_librarySubtitle_13spk_41", Ha = "_librarySearch_13spk_47", ja = "_libraryBody_13spk_52", qa = "_productGrid_13spk_59", Da = "_productCard_13spk_65", Ua = "_cardCode_13spk_85", xa = "_cardName_13spk_98", Ma = "_cardDesc_13spk_107", za = "_cardFoot_13spk_118", Ka = "_cardEnter_13spk_126", Va = "_cardTag_13spk_134", Ja = "_left_13spk_140", Wa = "_leftHeader_13spk_150", Qa = "_leftTitleRow_13spk_156", Ya = "_leftTitle_13spk_156", Za = "_backBtn_13spk_173", Xa = "_sectionBar_13spk_203", en = "_sectionTab_13spk_213", tn = "_sectionTabActive_13spk_235", an = "_sectionIcon_13spk_242", nn = "_leftBody_13spk_247", sn = "_fileList_13spk_258", cn = "_fileTreeHint_13spk_297", rn = "_fileRow_13spk_303", on = "_fileRowActive_13spk_317", ln = "_fileRowIcon_13spk_321", dn = "_fileRowName_13spk_326", pn = "_fileKindTag_13spk_335", un = "_center_13spk_343", mn = "_centerFill_13spk_352", hn = "_renderArea_13spk_407", _n = "_renderIframe_13spk_417", vn = "_renderCode_13spk_423", gn = "_right_13spk_436", Nn = "_chatSide_13spk_447", yn = "_chatSideHeader_13spk_453", fn = "_chatSideTitle_13spk_462", wn = "_chatGroupList_13spk_471", bn = "_chatGroupRow_13spk_480", Tn = "_chatGroupRowActive_13spk_494", kn = "_chatGroupName_13spk_498", Cn = "_chatGroupTime_13spk_507", Sn = "_chatPane_13spk_514", Pn = "_chatPaneHeader_13spk_520", An = "_chatPaneTitle_13spk_529", Rn = "_chatPaneBody_13spk_538", In = "_groupChips_13spk_549", En = "_groupChip_13spk_549", Ln = "_groupChipActive_13spk_573", Gn = "_groupNewHint_13spk_579", $n = "_groupAddBtn_13spk_586", Bn = "_cardGroup_13spk_601", Fn = "_overviewArea_13spk_611", On = "_overviewHeader_13spk_616", Hn = "_overviewTitle_13spk_620", jn = "_overviewSubtitle_13spk_627", qn = "_overviewTabs_13spk_633", Dn = "_overviewTab_13spk_633", Un = "_overviewTabActive_13spk_656", xn = "_overviewPanel_13spk_662", Mn = "_reqForm_13spk_670", zn = "_reqList_13spk_676", Kn = "_reqRow_13spk_682", Vn = "_reqTitle_13spk_691", Jn = "_reqTag_13spk_700", Wn = "_reqStatusTag_13spk_706", Qn = "_reqTime_13spk_719", Yn = "_appForm_13spk_726", Zn = "_appTypeSelect_13spk_733", Xn = "_appList_13spk_744", es = "_appRow_13spk_750", ts = "_appIcon_13spk_759", as = "_appName_13spk_764", ns = "_appCode_13spk_774", ss = "_appTag_13spk_780", is = "_appGo_13spk_786", cs = "_appInfraNote_13spk_801", rs = "_appUnbind_13spk_807", os = "_statsRow_13spk_824", ls = "_statItem_13spk_835", ds = "_domainBlock_13spk_849", ps = "_domainBlockTitle_13spk_857", us = "_domainEmpty_13spk_864", ms = "_domainList_13spk_872", hs = "_domainRow_13spk_878", _s = "_domainName_13spk_887", vs = "_domainDesc_13spk_901", gs = "_designHint_13spk_912", Ns = "_designList_13spk_921", ys = "_designRow_13spk_927", fs = "_designIcon_13spk_936", ws = "_designName_13spk_941", bs = "_designTime_13spk_951", Ts = "_overviewEntryBtn_13spk_958", a = {
474
- container: Ga,
475
- libraryView: $a,
476
- libraryHeader: Ba,
477
- libraryTitle: Fa,
478
- librarySubtitle: Oa,
479
- librarySearch: Ha,
480
- libraryBody: ja,
481
- productGrid: qa,
482
- productCard: Da,
483
- cardCode: Ua,
484
- cardName: xa,
485
- cardDesc: Ma,
486
- cardFoot: za,
487
- cardEnter: Ka,
488
- cardTag: Va,
489
- left: Ja,
490
- leftHeader: Wa,
491
- leftTitleRow: Qa,
492
- leftTitle: Ya,
493
- backBtn: Za,
494
- sectionBar: Xa,
495
- sectionTab: en,
496
- sectionTabActive: tn,
497
- sectionIcon: an,
498
- leftBody: nn,
499
- fileList: sn,
500
- fileTreeHint: cn,
501
- fileRow: rn,
502
- fileRowActive: on,
503
- fileRowIcon: ln,
504
- fileRowName: dn,
505
- fileKindTag: pn,
506
- center: un,
507
- centerFill: mn,
508
- renderArea: hn,
509
- renderIframe: _n,
510
- renderCode: vn,
511
- right: gn,
512
- chatSide: Nn,
513
- chatSideHeader: yn,
514
- chatSideTitle: fn,
515
- chatGroupList: wn,
516
- chatGroupRow: bn,
517
- chatGroupRowActive: Tn,
518
- chatGroupName: kn,
519
- chatGroupTime: Cn,
520
- chatPane: Sn,
521
- chatPaneHeader: Pn,
522
- chatPaneTitle: An,
523
- chatPaneBody: Rn,
524
- groupChips: In,
525
- groupChip: En,
526
- groupChipActive: Ln,
527
- groupNewHint: Gn,
528
- groupAddBtn: $n,
529
- cardGroup: Bn,
530
- overviewArea: Fn,
531
- overviewHeader: On,
532
- overviewTitle: Hn,
533
- overviewSubtitle: jn,
534
- overviewTabs: qn,
535
- overviewTab: Dn,
536
- overviewTabActive: Un,
537
- overviewPanel: xn,
538
- reqForm: Mn,
539
- reqList: zn,
540
- reqRow: Kn,
541
- reqTitle: Vn,
542
- reqTag: Jn,
543
- reqStatusTag: Wn,
544
- reqTime: Qn,
545
- appForm: Yn,
546
- appTypeSelect: Zn,
547
- appList: Xn,
548
- appRow: es,
549
- appIcon: ts,
550
- appName: as,
551
- appCode: ns,
552
- appTag: ss,
553
- appGo: is,
554
- appInfraNote: cs,
555
- appUnbind: rs,
556
- statsRow: os,
557
- statItem: ls,
558
- domainBlock: ds,
559
- domainBlockTitle: ps,
560
- domainEmpty: us,
561
- domainList: ms,
562
- domainRow: hs,
563
- domainName: _s,
564
- domainDesc: vs,
565
- designHint: gs,
566
- designList: Ns,
567
- designRow: ys,
568
- designIcon: fs,
569
- designName: ws,
570
- designTime: bs,
571
- overviewEntryBtn: Ts
572
- };
573
- function ks(n) {
574
- return {
575
- id: String(n.id),
576
- name: n.name,
577
- description: n.description ?? "",
578
- workspace_path: n.workspacePath || n.name,
579
- status: n.status,
580
- created_at: n.createTime ?? "",
581
- scenario_id: String(n.id),
582
- scenario_code: n.scenarioCode,
583
- scenario_name: n.scenarioName ?? n.name
584
- };
585
- }
586
- const Me = [
587
- {
588
- title: "产品域",
589
- icon: /* @__PURE__ */ t(Re, {}),
590
- items: [
591
- { key: "prod-library", label: "产品库", icon: /* @__PURE__ */ t(Re, {}) },
592
- {
593
- key: "prod-architecture",
594
- label: "架构全景",
595
- icon: /* @__PURE__ */ t(kt, {}),
596
- title: "租户下所有产品的架构关系(产品↔产品、产品↔中间件)"
597
- }
598
- ]
599
- },
600
- {
601
- title: "产品工作台",
602
- icon: /* @__PURE__ */ t(Ct, {}),
603
- items: Pt.map((n) => ({
604
- key: n.key,
605
- label: n.label,
606
- icon: n.icon,
607
- path: n.key
608
- }))
609
- }
610
- ];
611
- function Ke(n) {
612
- const r = n.toLowerCase();
613
- return /\.(html?|png|jpe?g|webp|svg|pdf)$/.test(r) ? "design" : /\.(md|markdown|txt|docx?)$/.test(r) ? "doc" : /\.(js|ts|tsx|jsx|java|py|json|yml|yaml|sql|css|vue|go|rs)$/.test(r) ? "code" : "other";
614
- }
615
- function Ve(n, r = "") {
616
- const i = [];
617
- for (const o of n ?? []) {
618
- const N = o.path || `${r}${o.name ?? ""}`, G = o.name || N.split("/").pop() || N, d = o.type === "dir" || Array.isArray(o.children);
619
- i.push({ path: N, name: G, dir: d, kind: Ke(N), depth: r.split("/").filter(Boolean).length }), d && Array.isArray(o.children) && i.push(...Ve(o.children, `${N}/`));
620
- }
621
- return i;
622
- }
623
- function Bs() {
624
- const n = B((e) => e.token), r = B((e) => e.selectProject), [i, o] = p([]), [N, G] = p(!0), [d, x] = p(null), [l, M] = p(null), [C, ae] = p(!1), [F, E] = p([]), [Ne, ne] = p(!1), [z, S] = p(null), [K, L] = p(null), [u, _] = p("other"), [h, se] = p(""), [V, f] = p("library"), [$, J] = p([]), [Ie, ye] = p(null), [ie, Ee] = p(!1), [Je, ce] = p("list"), P = St(null), [fe, Le] = p([]), [W, Ge] = p(null), [re, we] = p([]), [oe, be] = p([]), [A, O] = p("req"), [Q, $e] = p(""), [le, We] = p([]), [de, Qe] = p([]), [pe, Ye] = p([]), [ue, Ze] = p([]), [me, Xe] = p([]), [Be, et] = p([]), Te = g(
625
- async (e) => {
626
- x(e), ae(!0), S(null), L(null), ce("list"), ye(null), O("req");
627
- const c = await Gt(e);
628
- M(c);
629
- const v = await Ot(e, n);
630
- J(v);
631
- const y = await Dt(e);
632
- we(y);
633
- const q = await xt(e);
634
- be(q);
635
- const [Y, Z, mt, ht, _t, vt] = await Promise.all([
636
- zt(e),
637
- Kt(e),
638
- Vt(e),
639
- Jt(e),
640
- Wt(e),
641
- Qt(e)
642
- ]);
643
- We(Y), Qe(Z), Ye(mt), Ze(ht), Xe(_t), et(vt), ne(!0);
644
- const gt = await $t(e);
645
- E(gt), ne(!1);
646
- },
647
- [n]
648
- ), Fe = g(async () => {
649
- G(!0);
650
- try {
651
- const e = await Lt();
652
- o(e);
653
- const c = await jt();
654
- Le(c);
655
- try {
656
- const v = new URLSearchParams(window.location.search).get("product");
657
- if (v) {
658
- const y = e.find((q) => q.productCode === v);
659
- if (y) {
660
- Te(y.productCode);
661
- return;
662
- }
663
- }
664
- } catch {
665
- }
666
- } catch {
667
- o([]);
668
- } finally {
669
- G(!1);
670
- }
671
- }, [Te]);
672
- ee(() => {
673
- Fe();
674
- }, [Fe]);
675
- const tt = g(() => {
676
- if (!d) return;
677
- const e = new URLSearchParams();
678
- e.set("product", d), l != null && l.name && e.set("productName", l.name), X.push(`/lc/apps?${e.toString()}`);
679
- }, [d, l == null ? void 0 : l.name]), at = g(() => {
680
- if (!d) return;
681
- const e = new URLSearchParams();
682
- e.set("product", d), l != null && l.name && e.set("productName", l.name), X.push(`/test/qa/dashboard?${e.toString()}`);
683
- }, [d, l == null ? void 0 : l.name]), ke = g(() => {
684
- x(null), ae(!1), M(null), E([]), J([]), S(null), L(null), ye(null), ce("list"), P.current !== void 0 && B.setState({ currentProject: P.current }), P.current = void 0;
685
- }, []);
686
- ee(() => {
687
- new URLSearchParams(window.location.search).get("view") === "architecture" && f("architecture");
688
- }, []);
689
- const Oe = g(
690
- (e) => {
691
- C && ke(), f(e);
692
- const c = new URL(window.location.href);
693
- c.searchParams.set("view", e), X.replace(`${c.pathname}${c.search}${c.hash}`);
694
- },
695
- [C, ke]
696
- ), He = g((e) => {
697
- X.push(e);
698
- }, []), [nt, je] = p(/* @__PURE__ */ new Set()), H = C ? null : V === "architecture" ? "prod-architecture" : "prod-library";
699
- ee(() => {
700
- H && Me.forEach((e) => {
701
- e.items.some((c) => c.key === H) && je(
702
- (c) => c.has(e.title) ? c : new Set(c).add(e.title)
703
- );
704
- });
705
- }, [H]);
706
- const st = g((e) => {
707
- je((c) => {
708
- const v = new Set(c);
709
- return v.has(e) ? v.delete(e) : v.add(e), v;
710
- });
711
- }, []), it = g(
712
- (e, c) => {
713
- e === "产品域" ? Oe(c.key === "prod-architecture" ? "architecture" : "library") : c.path && He(c.path);
714
- },
715
- [Oe, He]
716
- ), qe = g(async () => {
717
- if (!d || !Q.trim()) return;
718
- const e = await Mt(d, {
719
- title: Q.trim(),
720
- priority: "P2"
721
- });
722
- e && (be((c) => [...c, e]), $e(""));
723
- }, [d, Q]), ct = ["OPEN", "IN_PROGRESS", "DONE", "CLOSED"], [he] = p(ct), rt = g(
724
- async (e) => {
725
- if (!d || e.id == null) return;
726
- const c = String(e.status ?? "OPEN"), v = he.indexOf(c), y = he[(v + 1) % he.length];
727
- await ta(d, { id: e.id, status: y }) && be((Y) => Y.map((Z) => Z.id === e.id ? { ...Z, status: y } : Z));
728
- },
729
- [d, he]
730
- ), [R, _e] = p({
731
- appCode: "",
732
- appName: "",
733
- appType: "APP"
734
- }), ot = g(async () => {
735
- if (!d || !R.appCode.trim() || !R.appName.trim()) return;
736
- const e = await Ut(d, R);
737
- e && (we((c) => [...c, e]), _e({ appCode: "", appName: "", appType: "APP" }));
738
- }, [d, R]), lt = g(
739
- async (e) => {
740
- d && (await unbindProductApp(d, e), we((c) => c.filter((v) => v.id !== e)));
741
- },
742
- [d]
743
- ), [j, Ce] = p({ groupCode: "", name: "" }), dt = g(async () => {
744
- if (!j.groupCode.trim() || !j.name.trim()) return;
745
- const e = await qt(j);
746
- e && (Le((c) => [...c, e]), Ce({ groupCode: "", name: "" }));
747
- }, [j]), pt = g(
748
- async (e) => {
749
- if (!d) return;
750
- S(e), L(null);
751
- const c = Ke(e);
752
- _(c);
753
- const v = await Bt(d, e);
754
- L(v ?? "");
755
- },
756
- [d]
757
- ), Se = g(
758
- async (e) => {
759
- if (!e) return;
760
- const c = ks(e);
761
- P.current = B.getState().currentProject, ye(e.id), ce("chat"), r(c);
762
- },
763
- [r]
764
- ), ut = g(async () => {
765
- if (!(!d || ie)) {
766
- Ee(!0);
767
- try {
768
- const e = await Ht(
769
- d,
770
- `${(l == null ? void 0 : l.name) || d} · 讨论组 ${$.length + 1}`,
771
- n
772
- );
773
- J((c) => [...c, e]), await Se(e);
774
- } finally {
775
- Ee(!1);
776
- }
777
- }
778
- }, [d, ie, $.length, l == null ? void 0 : l.name, n, Se]);
779
- ee(() => () => {
780
- P.current !== void 0 && B.setState({ currentProject: P.current });
781
- }, [Ie]);
782
- const Pe = ge(() => Ve(F), [F]), De = ge(
783
- () => i.filter((e) => !(h && !e.name.includes(h) && !e.productCode.includes(h) || W && e.groupCode !== W)),
784
- [i, h, W]
785
- ), Ue = g(
786
- (e) => {
787
- if (!e) return null;
788
- const c = fe.find((v) => v.groupCode === e);
789
- return c ? c.name : e;
790
- },
791
- [fe]
792
- );
793
- return /* @__PURE__ */ s("div", { className: a.container, children: [
794
- /* @__PURE__ */ s("aside", { className: w.sidebar, children: [
795
- /* @__PURE__ */ s("div", { className: w.sidebarHeader, children: [
796
- /* @__PURE__ */ t(Re, {}),
797
- /* @__PURE__ */ t("span", { children: "产品" })
798
- ] }),
799
- /* @__PURE__ */ t("nav", { className: w.menuList, children: Me.map((e) => {
800
- const c = nt.has(e.title), v = H ? e.items.findIndex((y) => y.key === H) : -1;
801
- return /* @__PURE__ */ s("div", { className: w.menuGroup, children: [
802
- /* @__PURE__ */ s(
803
- "div",
804
- {
805
- className: `${w.menuGroupHeader} ${c ? w.menuGroupHeaderOpen : ""} ${v >= 0 ? w.menuGroupHeaderActive : ""}`,
806
- onClick: () => st(e.title),
807
- children: [
808
- /* @__PURE__ */ t("span", { className: w.menuGroupIcon, children: e.icon }),
809
- /* @__PURE__ */ t("span", { className: w.menuGroupLabel, children: e.title }),
810
- /* @__PURE__ */ t("span", { className: w.menuGroupArrow, children: c ? /* @__PURE__ */ t(ft, {}) : /* @__PURE__ */ t(xe, {}) })
811
- ]
812
- }
813
- ),
814
- c && /* @__PURE__ */ t("ul", { className: w.menuSubList, children: e.items.map((y, q) => {
815
- const Y = v >= 0 && q <= v;
816
- return /* @__PURE__ */ t(
817
- "li",
818
- {
819
- className: `${w.menuSubItem} ${Y ? w.menuItemOnPath : ""} ${H === y.key ? w.menuSubItemActive : ""}`,
820
- onClick: () => it(e.title, y),
821
- title: y.title,
822
- children: /* @__PURE__ */ s("div", { className: w.menuSubItemPill, children: [
823
- /* @__PURE__ */ t("span", { className: w.menuSubItemIcon, children: y.icon }),
824
- /* @__PURE__ */ t("span", { children: y.label })
825
- ] })
826
- },
827
- y.key
828
- );
829
- }) })
830
- ] }, e.title);
831
- }) })
832
- ] }),
833
- C ? /* @__PURE__ */ s(Nt, { children: [
834
- /* @__PURE__ */ s("aside", { className: a.left, children: [
835
- /* @__PURE__ */ s("div", { className: a.leftHeader, children: [
836
- /* @__PURE__ */ s("div", { className: a.leftTitleRow, children: [
837
- /* @__PURE__ */ t("button", { type: "button", className: a.backBtn, onClick: ke, title: "返回产品库", children: "←" }),
838
- /* @__PURE__ */ t("span", { className: a.leftTitle, title: (l == null ? void 0 : l.name) || d || "", children: (l == null ? void 0 : l.name) || d })
839
- ] }),
840
- /* @__PURE__ */ s("div", { className: a.sectionBar, children: [
841
- /* @__PURE__ */ s("span", { className: `${a.sectionTab} ${a.sectionTabActive}`, children: [
842
- /* @__PURE__ */ t("span", { className: a.sectionIcon, children: "📦" }),
843
- " 产品"
844
- ] }),
845
- /* @__PURE__ */ s("button", { type: "button", className: a.sectionTab, onClick: tt, title: "进入研发工作台(z-lc)", children: [
846
- /* @__PURE__ */ t("span", { className: a.sectionIcon, children: "💻" }),
847
- " 研发"
848
- ] }),
849
- /* @__PURE__ */ s("button", { type: "button", className: a.sectionTab, onClick: at, title: "进入测试工作台(QA)", children: [
850
- /* @__PURE__ */ t("span", { className: a.sectionIcon, children: "🧪" }),
851
- " 测试"
852
- ] })
853
- ] })
854
- ] }),
855
- /* @__PURE__ */ s("div", { className: a.leftBody, children: [
856
- /* @__PURE__ */ t(
857
- "button",
858
- {
859
- type: "button",
860
- className: a.overviewEntryBtn,
861
- onClick: () => {
862
- S(null), L(null);
863
- },
864
- title: "回到产品总览(沉淀台)",
865
- children: "📋 产品总览 · 返回沉淀台"
866
- }
867
- ),
868
- /* @__PURE__ */ t("div", { className: a.fileTreeHint, children: "文件(设计稿 · 文档 · 产物)" }),
869
- Ne ? /* @__PURE__ */ t("div", { className: a.centerFill, children: /* @__PURE__ */ t(ve, { size: "small" }) }) : Pe.length === 0 ? /* @__PURE__ */ t(b, { image: b.PRESENTED_IMAGE_SIMPLE, description: "产品下暂无文件" }) : /* @__PURE__ */ t("div", { className: a.fileList, children: Pe.map((e) => /* @__PURE__ */ s(
870
- "div",
871
- {
872
- className: `${a.fileRow} ${z === e.path ? a.fileRowActive : ""}`,
873
- style: { paddingLeft: 12 + e.depth * 16 },
874
- onClick: () => !e.dir && pt(e.path),
875
- children: [
876
- /* @__PURE__ */ t("span", { className: a.fileRowIcon, children: e.dir ? "📁" : e.kind === "design" ? "🖼" : e.kind === "doc" ? "📄" : e.kind === "code" ? "{" : "◦" }),
877
- /* @__PURE__ */ t("span", { className: a.fileRowName, children: e.name }),
878
- e.kind === "design" && /* @__PURE__ */ t(I, { className: a.fileKindTag, color: "blue", children: "设计稿" })
879
- ]
880
- },
881
- e.path
882
- )) })
883
- ] })
884
- ] }),
885
- /* @__PURE__ */ t("main", { className: a.center, children: z == null ? /* @__PURE__ */ s("div", { className: a.overviewArea, children: [
886
- /* @__PURE__ */ s("div", { className: a.overviewHeader, children: [
887
- /* @__PURE__ */ t("h2", { className: a.overviewTitle, children: "产品总览" }),
888
- /* @__PURE__ */ t("p", { className: a.overviewSubtitle, children: "「关于这个产品的一切」沉淀在这里:需求 · 应用群 · 领域资产 · 设计稿 · 聊天蒸馏" })
889
- ] }),
890
- /* @__PURE__ */ s("div", { className: a.statsRow, children: [
891
- /* @__PURE__ */ s("span", { className: a.statItem, children: [
892
- /* @__PURE__ */ t("b", { children: oe.length }),
893
- " 需求"
894
- ] }),
895
- /* @__PURE__ */ s("span", { className: a.statItem, children: [
896
- /* @__PURE__ */ t("b", { children: re.length }),
897
- " 应用"
898
- ] }),
899
- /* @__PURE__ */ s("span", { className: a.statItem, children: [
900
- /* @__PURE__ */ t("b", { children: le.length }),
901
- " 术语"
902
- ] }),
903
- /* @__PURE__ */ s("span", { className: a.statItem, children: [
904
- /* @__PURE__ */ t("b", { children: de.length }),
905
- " 概念"
906
- ] }),
907
- /* @__PURE__ */ s("span", { className: a.statItem, children: [
908
- /* @__PURE__ */ t("b", { children: pe.length }),
909
- " 专家团"
910
- ] }),
911
- /* @__PURE__ */ s("span", { className: a.statItem, children: [
912
- /* @__PURE__ */ t("b", { children: ue.length }),
913
- " 设计稿"
914
- ] }),
915
- /* @__PURE__ */ s("span", { className: a.statItem, children: [
916
- /* @__PURE__ */ t("b", { children: me.length }),
917
- " 会话"
918
- ] }),
919
- /* @__PURE__ */ s("span", { className: a.statItem, children: [
920
- /* @__PURE__ */ t("b", { children: Pe.filter((e) => !e.dir).length }),
921
- " 文件"
922
- ] })
923
- ] }),
924
- /* @__PURE__ */ s("div", { className: a.overviewTabs, children: [
925
- /* @__PURE__ */ s(
926
- "button",
927
- {
928
- type: "button",
929
- className: `${a.overviewTab} ${A === "req" ? a.overviewTabActive : ""}`,
930
- onClick: () => O("req"),
931
- children: [
932
- "需求(",
933
- oe.length,
934
- ")"
935
- ]
936
- }
937
- ),
938
- /* @__PURE__ */ s(
939
- "button",
940
- {
941
- type: "button",
942
- className: `${a.overviewTab} ${A === "apps" ? a.overviewTabActive : ""}`,
943
- onClick: () => O("apps"),
944
- children: [
945
- "应用群(",
946
- re.length,
947
- ")"
948
- ]
949
- }
950
- ),
951
- /* @__PURE__ */ s(
952
- "button",
953
- {
954
- type: "button",
955
- className: `${a.overviewTab} ${A === "domain" ? a.overviewTabActive : ""}`,
956
- onClick: () => O("domain"),
957
- children: [
958
- "领域资产(",
959
- le.length + de.length + pe.length,
960
- ")"
961
- ]
962
- }
963
- ),
964
- /* @__PURE__ */ s(
965
- "button",
966
- {
967
- type: "button",
968
- className: `${a.overviewTab} ${A === "design" ? a.overviewTabActive : ""}`,
969
- onClick: () => O("design"),
970
- children: [
971
- "设计稿(",
972
- ue.length,
973
- ")"
974
- ]
975
- }
976
- ),
977
- /* @__PURE__ */ s(
978
- "button",
979
- {
980
- type: "button",
981
- className: `${a.overviewTab} ${A === "chat" ? a.overviewTabActive : ""}`,
982
- onClick: () => O("chat"),
983
- children: [
984
- "聊天蒸馏(",
985
- me.length,
986
- ")"
987
- ]
988
- }
989
- )
990
- ] }),
991
- A === "req" ? /* @__PURE__ */ s("div", { className: a.overviewPanel, children: [
992
- /* @__PURE__ */ s("div", { className: a.reqForm, children: [
993
- /* @__PURE__ */ t(
994
- D,
995
- {
996
- placeholder: "新增需求标题(针对本产品)",
997
- value: Q,
998
- onChange: (e) => $e(e.target.value),
999
- onPressEnter: () => void qe(),
1000
- style: { flex: 1 }
1001
- }
1002
- ),
1003
- /* @__PURE__ */ t(te, { type: "primary", onClick: () => void qe(), disabled: !Q.trim(), children: "添加需求" })
1004
- ] }),
1005
- oe.length === 0 ? /* @__PURE__ */ t(b, { image: b.PRESENTED_IMAGE_SIMPLE, description: "还没有需求,先落一条" }) : /* @__PURE__ */ t("div", { className: a.reqList, children: oe.map((e) => /* @__PURE__ */ s("div", { className: a.reqRow, children: [
1006
- /* @__PURE__ */ t("span", { className: a.reqTitle, title: e.title, children: e.title }),
1007
- /* @__PURE__ */ t(I, { className: a.reqTag, color: e.priority === "P0" ? "red" : e.priority === "P1" ? "orange" : "blue", children: e.priority || "P2" }),
1008
- /* @__PURE__ */ t(
1009
- I,
1010
- {
1011
- className: a.reqStatusTag,
1012
- onClick: () => void rt(e),
1013
- title: "点击流转状态(OPEN → IN_PROGRESS → DONE → CLOSED)",
1014
- children: e.status || "OPEN"
1015
- }
1016
- ),
1017
- /* @__PURE__ */ t("span", { className: a.reqTime, children: String(e.createdAt ?? "").slice(0, 10) })
1018
- ] }, e.id)) })
1019
- ] }) : A === "apps" ? /* @__PURE__ */ s("div", { className: a.overviewPanel, children: [
1020
- /* @__PURE__ */ s("div", { className: a.appForm, children: [
1021
- /* @__PURE__ */ t(
1022
- D,
1023
- {
1024
- placeholder: "应用编码(如 z-lc 应用 code)",
1025
- value: R.appCode,
1026
- onChange: (e) => _e((c) => ({ ...c, appCode: e.target.value })),
1027
- style: { flex: 1 }
1028
- }
1029
- ),
1030
- /* @__PURE__ */ t(
1031
- D,
1032
- {
1033
- placeholder: "应用名称",
1034
- value: R.appName,
1035
- onChange: (e) => _e((c) => ({ ...c, appName: e.target.value })),
1036
- style: { width: 150 }
1037
- }
1038
- ),
1039
- /* @__PURE__ */ s(
1040
- "select",
1041
- {
1042
- className: a.appTypeSelect,
1043
- value: R.appType,
1044
- onChange: (e) => _e((c) => ({ ...c, appType: e.target.value })),
1045
- children: [
1046
- /* @__PURE__ */ t("option", { value: "APP", children: "应用" }),
1047
- /* @__PURE__ */ t("option", { value: "INFRA", children: "基建" })
1048
- ]
1049
- }
1050
- ),
1051
- /* @__PURE__ */ t(
1052
- te,
1053
- {
1054
- type: "primary",
1055
- onClick: () => void ot(),
1056
- disabled: !R.appCode.trim() || !R.appName.trim(),
1057
- children: "绑定"
1058
- }
1059
- )
1060
- ] }),
1061
- re.length === 0 ? /* @__PURE__ */ t(b, { image: b.PRESENTED_IMAGE_SIMPLE, description: "还没有应用群,绑定支撑这个产品的应用/基建" }) : /* @__PURE__ */ t("div", { className: a.appList, children: re.map((e) => /* @__PURE__ */ s("div", { className: a.appRow, children: [
1062
- /* @__PURE__ */ t("span", { className: a.appIcon, children: e.appType === "INFRA" ? "🏗" : "🧩" }),
1063
- /* @__PURE__ */ t("span", { className: a.appName, title: e.appName, children: e.appName }),
1064
- /* @__PURE__ */ t("span", { className: a.appCode, children: e.appCode }),
1065
- /* @__PURE__ */ t(
1066
- I,
1067
- {
1068
- className: a.appTag,
1069
- color: e.appType === "INFRA" ? "purple" : "geekblue",
1070
- children: e.appType === "INFRA" ? "基建" : "应用"
1071
- }
1072
- ),
1073
- e.appType === "APP" ? /* @__PURE__ */ t(
1074
- "button",
1075
- {
1076
- type: "button",
1077
- className: a.appGo,
1078
- onClick: () => {
1079
- const c = new URLSearchParams();
1080
- c.set("product", d || ""), l != null && l.name && c.set("productName", l.name), c.set("app", e.appCode), X.push(`/lc/apps?${c.toString()}`);
1081
- },
1082
- children: "去研发"
1083
- }
1084
- ) : /* @__PURE__ */ t("span", { className: a.appInfraNote, children: "横切多产品" }),
1085
- /* @__PURE__ */ t(
1086
- "button",
1087
- {
1088
- type: "button",
1089
- className: a.appUnbind,
1090
- onClick: () => void lt(e.id),
1091
- title: "解绑",
1092
- children: "✕"
1093
- }
1094
- )
1095
- ] }, e.id)) })
1096
- ] }) : A === "domain" ? /* @__PURE__ */ s("div", { className: a.overviewPanel, children: [
1097
- /* @__PURE__ */ s("div", { className: a.domainBlock, children: [
1098
- /* @__PURE__ */ t("div", { className: a.domainBlockTitle, children: "📖 统一语言 · 术语" }),
1099
- le.length === 0 ? /* @__PURE__ */ t("div", { className: a.domainEmpty, children: "还没有术语,先在对话里对齐统一语言" }) : /* @__PURE__ */ t("div", { className: a.domainList, children: le.map((e, c) => /* @__PURE__ */ s("div", { className: a.domainRow, children: [
1100
- /* @__PURE__ */ t("span", { className: a.domainName, children: String(e.term ?? e.term_code ?? "") }),
1101
- /* @__PURE__ */ t("span", { className: a.domainDesc, children: String(e.definition ?? "") })
1102
- ] }, String(e.id ?? c))) })
1103
- ] }),
1104
- /* @__PURE__ */ s("div", { className: a.domainBlock, children: [
1105
- /* @__PURE__ */ t("div", { className: a.domainBlockTitle, children: "🧬 领域概念" }),
1106
- de.length === 0 ? /* @__PURE__ */ t("div", { className: a.domainEmpty, children: "还没有概念模型" }) : /* @__PURE__ */ t("div", { className: a.domainList, children: de.map((e, c) => /* @__PURE__ */ s("div", { className: a.domainRow, children: [
1107
- /* @__PURE__ */ t("span", { className: a.domainName, children: String(e.name ?? e.code ?? "") }),
1108
- /* @__PURE__ */ t("span", { className: a.domainDesc, children: String(e.description ?? "") })
1109
- ] }, String(e.id ?? c))) })
1110
- ] }),
1111
- /* @__PURE__ */ s("div", { className: a.domainBlock, children: [
1112
- /* @__PURE__ */ t("div", { className: a.domainBlockTitle, children: "🎬 用户专家团" }),
1113
- pe.length === 0 ? /* @__PURE__ */ t("div", { className: a.domainEmpty, children: "还没有专家团,描述目标用户的典型操作链路" }) : /* @__PURE__ */ t("div", { className: a.domainList, children: pe.map((e, c) => /* @__PURE__ */ s("div", { className: a.domainRow, children: [
1114
- /* @__PURE__ */ t("span", { className: a.domainName, children: String(e.title ?? e.name ?? "") }),
1115
- /* @__PURE__ */ t("span", { className: a.domainDesc, children: String(e.description ?? "") })
1116
- ] }, String(e.id ?? c))) })
1117
- ] })
1118
- ] }) : A === "design" ? /* @__PURE__ */ s("div", { className: a.overviewPanel, children: [
1119
- /* @__PURE__ */ t("div", { className: a.designHint, children: "设计稿在左侧文件树(标注「设计稿」标签);点选后在中间渲染区直渲 raw HTML" }),
1120
- ue.length === 0 ? /* @__PURE__ */ t(b, { image: b.PRESENTED_IMAGE_SIMPLE, description: "还没有设计稿记录" }) : /* @__PURE__ */ t("div", { className: a.designList, children: ue.map((e, c) => /* @__PURE__ */ s("div", { className: a.designRow, children: [
1121
- /* @__PURE__ */ t("span", { className: a.designIcon, children: "🖼" }),
1122
- /* @__PURE__ */ t("span", { className: a.designName, children: String(e.title ?? e.name ?? "") }),
1123
- /* @__PURE__ */ t("span", { className: a.designTime, children: String(e.updated_at ?? e.created_at ?? "").slice(0, 10) })
1124
- ] }, String(e.id ?? c))) })
1125
- ] }) : /* @__PURE__ */ s("div", { className: a.overviewPanel, children: [
1126
- /* @__PURE__ */ s("div", { className: a.domainBlock, children: [
1127
- /* @__PURE__ */ t("div", { className: a.domainBlockTitle, children: "💬 群聊会话" }),
1128
- me.length === 0 ? /* @__PURE__ */ t("div", { className: a.domainEmpty, children: "还没有群聊会话,右侧「发起聊天」开始" }) : /* @__PURE__ */ t("div", { className: a.domainList, children: me.map((e, c) => /* @__PURE__ */ s("div", { className: a.domainRow, children: [
1129
- /* @__PURE__ */ t("span", { className: a.domainName, children: String(e.title ?? e.session_code ?? "") }),
1130
- /* @__PURE__ */ t("span", { className: a.domainDesc, children: String(e.updated_at ?? e.created_at ?? "").slice(0, 16).replace("T", " ") })
1131
- ] }, String(e.id ?? c))) })
1132
- ] }),
1133
- /* @__PURE__ */ s("div", { className: a.domainBlock, children: [
1134
- /* @__PURE__ */ t("div", { className: a.domainBlockTitle, children: "📌 蒸馏提案" }),
1135
- Be.length === 0 ? /* @__PURE__ */ t("div", { className: a.domainEmpty, children: "还没有提案(聊天中沉淀的需求/设计提案会出现在这里)" }) : /* @__PURE__ */ t("div", { className: a.domainList, children: Be.map((e, c) => {
1136
- let v = {};
1137
- try {
1138
- v = JSON.parse(String(e.payload ?? "{}"));
1139
- } catch {
1140
- }
1141
- const y = String(e.proposal_type ?? "requirement");
1142
- return /* @__PURE__ */ s("div", { className: a.domainRow, children: [
1143
- /* @__PURE__ */ s("span", { className: a.domainName, children: [
1144
- /* @__PURE__ */ t(I, { className: a.reqTag, color: y === "design" ? "geekblue" : "blue", children: y }),
1145
- String(v.title ?? "")
1146
- ] }),
1147
- /* @__PURE__ */ t("span", { className: a.domainDesc, children: String(v.description ?? "") })
1148
- ] }, String(e.id ?? c));
1149
- }) })
1150
- ] })
1151
- ] })
1152
- ] }) : K == null ? /* @__PURE__ */ t("div", { className: a.centerFill, children: /* @__PURE__ */ t(ve, {}) }) : /* @__PURE__ */ t("div", { className: a.renderArea, children: u === "design" ? (
1153
- /* 设计稿:raw 通常为 HTML → iframe srcdoc 渲染 */
1154
- /* @__PURE__ */ t(
1155
- "iframe",
1156
- {
1157
- className: a.renderIframe,
1158
- srcDoc: K,
1159
- title: z,
1160
- sandbox: "allow-scripts allow-same-origin"
1161
- }
1162
- )
1163
- ) : /* @__PURE__ */ t("pre", { className: a.renderCode, children: K || "(空文件)" }) }) }),
1164
- /* @__PURE__ */ t("aside", { className: a.right, children: Je === "list" ? /* @__PURE__ */ s("div", { className: a.chatSide, children: [
1165
- /* @__PURE__ */ s("div", { className: a.chatSideHeader, children: [
1166
- /* @__PURE__ */ s("span", { className: a.chatSideTitle, children: [
1167
- /* @__PURE__ */ t(bt, {}),
1168
- " 聊天组"
1169
- ] }),
1170
- /* @__PURE__ */ s(
1171
- te,
1172
- {
1173
- size: "small",
1174
- type: "primary",
1175
- ghost: !0,
1176
- loading: ie,
1177
- onClick: ut,
1178
- children: [
1179
- /* @__PURE__ */ t(Tt, {}),
1180
- " 发起聊天"
1181
- ]
1182
- }
1183
- )
1184
- ] }),
1185
- /* @__PURE__ */ t("div", { className: a.chatGroupList, children: $.length === 0 ? /* @__PURE__ */ t(b, { image: b.PRESENTED_IMAGE_SIMPLE, description: "还没有聊天组,点「发起聊天」开始" }) : $.map((e) => /* @__PURE__ */ s(
1186
- "div",
1187
- {
1188
- className: `${a.chatGroupRow} ${Ie === e.id ? a.chatGroupRowActive : ""}`,
1189
- onClick: () => !ie && Se(e),
1190
- children: [
1191
- /* @__PURE__ */ t("span", { className: a.chatGroupName, title: e.name, children: e.name }),
1192
- /* @__PURE__ */ t("span", { className: a.chatGroupTime, children: String(e.createTime ?? "").slice(5, 16).replace("T", " ") })
1193
- ]
1194
- },
1195
- e.id
1196
- )) })
1197
- ] }) : /* @__PURE__ */ s("div", { className: a.chatPane, children: [
1198
- /* @__PURE__ */ s("div", { className: a.chatPaneHeader, children: [
1199
- /* @__PURE__ */ t(
1200
- "button",
1201
- {
1202
- type: "button",
1203
- className: a.backBtn,
1204
- onClick: () => {
1205
- ce("list"), P.current !== void 0 && B.setState({ currentProject: P.current }), P.current = void 0;
1206
- },
1207
- title: "返回聊天组列表",
1208
- children: "←"
1209
- }
1210
- ),
1211
- /* @__PURE__ */ s("span", { className: a.chatPaneTitle, children: [
1212
- "群聊 · ",
1213
- (l == null ? void 0 : l.name) || d
1214
- ] })
1215
- ] }),
1216
- /* @__PURE__ */ t("div", { className: a.chatPaneBody, children: /* @__PURE__ */ t(At, { hideTabs: !0 }) })
1217
- ] }) })
1218
- ] }) : V === "architecture" ? (
1219
- /* ═══ 架构全景:架构语言的表达面 ═══ */
1220
- /* @__PURE__ */ t(La, {})
1221
- ) : (
1222
- /* ═══ 产品库视图:全宽产品卡片网格,点卡片直接进入 ═══ */
1223
- /* @__PURE__ */ s("div", { className: a.libraryView, children: [
1224
- /* @__PURE__ */ s("div", { className: a.libraryHeader, children: [
1225
- /* @__PURE__ */ s("div", { children: [
1226
- /* @__PURE__ */ t("h2", { className: a.libraryTitle, children: "产品库" }),
1227
- /* @__PURE__ */ t("p", { className: a.librarySubtitle, children: "选择产品进入工作区:文件 · 设计稿 · 群聊 · 应用群" }),
1228
- /* @__PURE__ */ s("div", { className: a.groupChips, children: [
1229
- /* @__PURE__ */ t(
1230
- "button",
1231
- {
1232
- type: "button",
1233
- className: `${a.groupChip} ${W === null ? a.groupChipActive : ""}`,
1234
- onClick: () => Ge(null),
1235
- children: "全部"
1236
- }
1237
- ),
1238
- fe.map((e) => /* @__PURE__ */ t(
1239
- "button",
1240
- {
1241
- type: "button",
1242
- className: `${a.groupChip} ${W === e.groupCode ? a.groupChipActive : ""}`,
1243
- onClick: () => Ge(e.groupCode),
1244
- title: e.description || e.name,
1245
- children: e.name
1246
- },
1247
- e.groupCode
1248
- )),
1249
- /* @__PURE__ */ s("span", { className: a.groupNewHint, children: [
1250
- /* @__PURE__ */ t(
1251
- D,
1252
- {
1253
- size: "small",
1254
- placeholder: "新群码",
1255
- value: j.groupCode,
1256
- onChange: (e) => Ce((c) => ({ ...c, groupCode: e.target.value })),
1257
- style: { width: 96 }
1258
- }
1259
- ),
1260
- /* @__PURE__ */ t(
1261
- D,
1262
- {
1263
- size: "small",
1264
- placeholder: "群名",
1265
- value: j.name,
1266
- onChange: (e) => Ce((c) => ({ ...c, name: e.target.value })),
1267
- style: { width: 110 }
1268
- }
1269
- ),
1270
- /* @__PURE__ */ t(
1271
- "button",
1272
- {
1273
- type: "button",
1274
- className: a.groupAddBtn,
1275
- onClick: () => void dt(),
1276
- title: "新建产品群",
1277
- children: "+"
1278
- }
1279
- )
1280
- ] })
1281
- ] })
1282
- ] }),
1283
- /* @__PURE__ */ t(
1284
- D,
1285
- {
1286
- prefix: /* @__PURE__ */ t(wt, {}),
1287
- placeholder: "搜索产品",
1288
- value: h,
1289
- onChange: (e) => se(e.target.value),
1290
- allowClear: !0,
1291
- className: a.librarySearch
1292
- }
1293
- )
1294
- ] }),
1295
- /* @__PURE__ */ t("div", { className: a.libraryBody, children: N ? /* @__PURE__ */ t("div", { className: a.centerFill, children: /* @__PURE__ */ t(ve, {}) }) : De.length === 0 ? /* @__PURE__ */ t(b, { image: b.PRESENTED_IMAGE_SIMPLE, description: "暂无产品" }) : /* @__PURE__ */ t("div", { className: a.productGrid, children: De.map((e) => /* @__PURE__ */ s(
1296
- "button",
1297
- {
1298
- type: "button",
1299
- className: a.productCard,
1300
- onClick: () => void Te(e.productCode),
1301
- children: [
1302
- /* @__PURE__ */ t("span", { className: a.cardCode, children: e.productCode }),
1303
- /* @__PURE__ */ t("span", { className: a.cardName, title: e.name, children: e.name }),
1304
- /* @__PURE__ */ t("span", { className: a.cardDesc, children: e.description || "暂无产品描述" }),
1305
- /* @__PURE__ */ s("span", { className: a.cardFoot, children: [
1306
- /* @__PURE__ */ s("span", { className: a.cardEnter, children: [
1307
- "进入产品 ",
1308
- /* @__PURE__ */ t(xe, {})
1309
- ] }),
1310
- Ue(e.groupCode) && /* @__PURE__ */ t("span", { className: a.cardGroup, children: Ue(e.groupCode) }),
1311
- e.status && /* @__PURE__ */ t(I, { className: a.cardTag, children: e.status })
1312
- ] })
1313
- ]
1314
- },
1315
- e.productCode
1316
- )) }) })
1317
- ] })
1318
- )
1319
- ] });
1320
- }
1321
- export {
1322
- Bs as default
1323
- };