@yuku123/z-team-component 0.2.108 → 0.2.110

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 (46) hide show
  1. package/dist/{ChangeLogView-BmdZsm3p.js → ChangeLogView-DYUQMSRK.js} +1 -1
  2. package/dist/{ComponentDoc-dNbf9aR8.js → ComponentDoc-BdwqbeiV.js} +3 -3
  3. package/dist/{InvitationManagementPage-5IF8XVY8.js → InvitationManagementPage-H9agC_7o.js} +1 -1
  4. package/dist/{OnboardingPage-BrF8018U.js → OnboardingPage-Cc1DkXdk.js} +2 -2
  5. package/dist/{ScheduledTasks-tPX0WAlF.js → ScheduledTasks-DtxCDcAj.js} +6 -6
  6. package/dist/{SystemShell-DJFGVjYE.js → SystemShell-8zNgIaoO.js} +4 -4
  7. package/dist/{admin-logs-_zRvUkam.js → admin-logs-Clj00W8X.js} +1 -1
  8. package/dist/{api-DZEArNcd.js → api-BQ-EsZSo.js} +1 -1
  9. package/dist/{api-DdXl8HTL.js → api-CLp7qzFw.js} +1 -1
  10. package/dist/{createWorkspaceWsHandler-BtSbZj62.js → createWorkspaceWsHandler-BqgSzhgh.js} +3 -3
  11. package/dist/{index-D9OGPcQk.js → index-B0BBJZnT.js} +1 -1
  12. package/dist/{index-mYGdo3Nt.js → index-B0_V-ygC.js} +3 -3
  13. package/dist/{index-BxXssPe9.js → index-B5wFsBBU.js} +1 -1
  14. package/dist/{index-Bor2ZmiN.js → index-BLS50ApR.js} +2 -2
  15. package/dist/{index-DGb03m6z.js → index-Bi29hVGF.js} +2 -2
  16. package/dist/{index-CE6y4yIb.js → index-Bj-bOvKH.js} +3 -3
  17. package/dist/{index-U3Bb_Kvg.js → index-Bkk_4rgS.js} +3 -3
  18. package/dist/{index-DC6lW35z.js → index-BuWe2_8O.js} +2 -2
  19. package/dist/{index-L6-bHje2.js → index-Bw5pTwfA.js} +3 -3
  20. package/dist/{index-CQuuSIdC.js → index-CCD3Zm59.js} +1 -1
  21. package/dist/{index-ofMXSELs.js → index-CEDrTmOk.js} +3 -3
  22. package/dist/{index-DDT4TACA.js → index-CYIYNuop.js} +6 -6
  23. package/dist/{index-9UQGJcuO.js → index-Cq8T0eVj.js} +3 -3
  24. package/dist/{index-DvUBHPbz.js → index-D7MoRgtD.js} +5 -5
  25. package/dist/{index-Co2PzaD_.js → index-DONAjwZn.js} +2 -2
  26. package/dist/{index-lFEE8r-n.js → index-DScDBVMH.js} +2 -2
  27. package/dist/{index-BEgq2g59.js → index-DbMCteOy.js} +8 -8
  28. package/dist/{index-nyE2dDrG.js → index-DmA2Q-nA.js} +6 -6
  29. package/dist/{index-W2zbQ6iD.js → index-DsWW7ar_.js} +1 -1
  30. package/dist/{index-D10wKA0G.js → index-H3Ig5RLa.js} +2 -2
  31. package/dist/{index-Dqi0OzBv.js → index-NS2B4Fop.js} +2 -2
  32. package/dist/{index-BJ-3H9n_.js → index-PwaRrnE0.js} +1 -1
  33. package/dist/index-Y_tJ86qQ.js +1248 -0
  34. package/dist/{index-Bk3TIjDH.js → index-hM9UCpFo.js} +4 -4
  35. package/dist/{index-C-4992WQ.js → index-tcNqz4d_.js} +2 -2
  36. package/dist/index.js +1 -1
  37. package/dist/{instance-CTQb537U.js → instance-DfuknTNN.js} +1 -1
  38. package/dist/{menuPermission-DVyC-rM0.js → menuPermission-BwAoo_5P.js} +3 -3
  39. package/dist/pages.js +1 -1
  40. package/dist/{send-default-agent-team-message-BGkQf0s1.js → send-default-agent-team-message-CPy5Dwm7.js} +1 -1
  41. package/dist/{sso-user-ZNl3v3q5.js → sso-user-NwQpg9Vu.js} +1 -1
  42. package/dist/{training-B_Z1DKa6.js → training-4fdFf3PQ.js} +1 -1
  43. package/dist/{webide-SBDpaD6A.js → webide-B9W1K1Jx.js} +3 -3
  44. package/dist/z-team-component.css +1 -1
  45. package/package.json +1 -1
  46. package/dist/index-C5o3Uo-7.js +0 -724
@@ -0,0 +1,1248 @@
1
+ import { jsxs as i, jsx as a, Fragment as st } from "react/jsx-runtime";
2
+ import { ReloadOutlined as ot, SearchOutlined as lt, RightOutlined as dt, TeamOutlined as pt, MessageOutlined as ut } from "@ant-design/icons";
3
+ import { Button as W, Select as be, Spin as pe, Empty as y, Tag as R, Input as O } from "antd";
4
+ import { useState as p, useCallback as v, useEffect as Se, useMemo as ue, useRef as mt } from "react";
5
+ import { u as B } from "./ComponentDoc-BdwqbeiV.js";
6
+ import { h as Ce } from "./history-BlrA1eaW.js";
7
+ import { C as ht } from "./createWorkspaceWsHandler-BqgSzhgh.js";
8
+ import { l as _t, c as vt } from "./api-BQ-EsZSo.js";
9
+ const ft = "product-workspace", Fe = "productCode";
10
+ function w(n) {
11
+ if (!n.ok) throw new Error(`产品接口失败 (${n.status})`);
12
+ return n.json();
13
+ }
14
+ async function gt() {
15
+ const n = B.getState().token, r = await fetch(`/api/product/list${n ? `?token=${encodeURIComponent(n)}` : ""}`, {
16
+ credentials: "include",
17
+ headers: { Accept: "application/json" }
18
+ }), c = await w(r), o = Array.isArray(c) ? c : c == null ? void 0 : c.data;
19
+ return Array.isArray(o) ? o.map((f) => ({
20
+ ...f,
21
+ productCode: String(f.productCode ?? f.code ?? ""),
22
+ name: String(f.name ?? f.productCode ?? f.code ?? "未命名")
23
+ })) : [];
24
+ }
25
+ async function Nt(n) {
26
+ try {
27
+ const r = await fetch(`/api/product/${encodeURIComponent(n)}`, {
28
+ credentials: "include",
29
+ headers: { Accept: "application/json" }
30
+ }), c = await w(r), o = (c == null ? void 0 : c.data) ?? c;
31
+ return o && typeof o == "object" ? { ...o, productCode: n } : null;
32
+ } catch {
33
+ return null;
34
+ }
35
+ }
36
+ async function yt(n) {
37
+ try {
38
+ const r = await fetch(`/api/product/${encodeURIComponent(n)}/atelier/workspace`, {
39
+ credentials: "include",
40
+ headers: { Accept: "application/json" }
41
+ }), c = await w(r), o = (c == null ? void 0 : c.data) ?? c;
42
+ return o && typeof o == "object" && Array.isArray(o.files) ? o.files : Array.isArray(o) ? o : [];
43
+ } catch {
44
+ return [];
45
+ }
46
+ }
47
+ async function wt(n, r) {
48
+ try {
49
+ const c = await fetch(
50
+ `/api/product/${encodeURIComponent(n)}/atelier/files/raw?path=${encodeURIComponent(r)}`,
51
+ { credentials: "include", headers: { Accept: "text/html, application/json" } }
52
+ );
53
+ return c.ok ? await c.text() : null;
54
+ } catch {
55
+ return null;
56
+ }
57
+ }
58
+ function Tt(n) {
59
+ var o;
60
+ const r = (o = n.ext) == null ? void 0 : o.params;
61
+ if (!r || typeof r != "object") return null;
62
+ const c = r[Fe];
63
+ return c == null ? null : String(c);
64
+ }
65
+ async function bt(n, r) {
66
+ try {
67
+ return (await _t(r)).filter((o) => Tt(o) === n);
68
+ } catch {
69
+ return [];
70
+ }
71
+ }
72
+ async function Ct(n, r, c) {
73
+ return vt(
74
+ { scenario_code: ft, name: r || `产品 ${n} 讨论组` },
75
+ c,
76
+ { [Fe]: n }
77
+ );
78
+ }
79
+ function T(n) {
80
+ return n && typeof n == "object" && "data" in n ? n.data : n;
81
+ }
82
+ async function St() {
83
+ try {
84
+ const n = await fetch("/api/product/group/list", {
85
+ credentials: "include",
86
+ headers: { Accept: "application/json" }
87
+ }), r = await w(n), c = T(r);
88
+ return Array.isArray(c) ? c : [];
89
+ } catch {
90
+ return [];
91
+ }
92
+ }
93
+ async function At(n) {
94
+ try {
95
+ const r = await fetch("/api/product/group", {
96
+ method: "POST",
97
+ credentials: "include",
98
+ headers: { Accept: "application/json", "Content-Type": "application/json" },
99
+ body: JSON.stringify(n)
100
+ }), c = await w(r);
101
+ return T(c);
102
+ } catch {
103
+ return null;
104
+ }
105
+ }
106
+ async function Pt(n) {
107
+ try {
108
+ const r = await fetch(`/api/product/${encodeURIComponent(n)}/app-binding/list`, {
109
+ credentials: "include",
110
+ headers: { Accept: "application/json" }
111
+ }), c = await w(r), o = T(c);
112
+ return Array.isArray(o) ? o : [];
113
+ } catch {
114
+ return [];
115
+ }
116
+ }
117
+ async function Rt(n, r) {
118
+ try {
119
+ const c = await fetch(`/api/product/${encodeURIComponent(n)}/app-binding`, {
120
+ method: "POST",
121
+ credentials: "include",
122
+ headers: { Accept: "application/json", "Content-Type": "application/json" },
123
+ body: JSON.stringify(r)
124
+ }), o = await w(c);
125
+ return T(o);
126
+ } catch {
127
+ return null;
128
+ }
129
+ }
130
+ async function kt(n) {
131
+ try {
132
+ const r = await fetch(`/api/product/${encodeURIComponent(n)}/requirement/list`, {
133
+ credentials: "include",
134
+ headers: { Accept: "application/json" }
135
+ }), c = await w(r), o = T(c);
136
+ return Array.isArray(o) ? o : [];
137
+ } catch {
138
+ return [];
139
+ }
140
+ }
141
+ async function Et(n, r) {
142
+ try {
143
+ const c = await fetch(`/api/product/${encodeURIComponent(n)}/requirement`, {
144
+ method: "POST",
145
+ credentials: "include",
146
+ headers: { Accept: "application/json", "Content-Type": "application/json" },
147
+ body: JSON.stringify(r)
148
+ }), o = await w(c);
149
+ return T(o);
150
+ } catch {
151
+ return null;
152
+ }
153
+ }
154
+ async function H(n, r) {
155
+ try {
156
+ const c = await fetch(
157
+ `/api/product/${encodeURIComponent(n)}/${r}`,
158
+ { credentials: "include", headers: { Accept: "application/json" } }
159
+ ), o = await w(c), f = T(o);
160
+ return Array.isArray(f) ? f : [];
161
+ } catch {
162
+ return [];
163
+ }
164
+ }
165
+ async function It(n) {
166
+ return H(n, "glossary/list");
167
+ }
168
+ async function Lt(n) {
169
+ return H(n, "concept/list");
170
+ }
171
+ async function $t(n) {
172
+ return H(n, "scenario/list");
173
+ }
174
+ async function Bt(n) {
175
+ return H(n, "design/list");
176
+ }
177
+ async function Gt(n) {
178
+ return H(n, "chat/sessions");
179
+ }
180
+ async function Ft(n) {
181
+ return H(n, "chat/proposals");
182
+ }
183
+ async function jt() {
184
+ try {
185
+ const n = await fetch("/api/product/relation/types", {
186
+ credentials: "include",
187
+ headers: { Accept: "application/json" }
188
+ }), r = await w(n), c = T(r);
189
+ return c && typeof c == "object" ? c : {};
190
+ } catch {
191
+ return {};
192
+ }
193
+ }
194
+ async function qt() {
195
+ try {
196
+ const n = await fetch("/api/product/architecture", {
197
+ credentials: "include",
198
+ headers: { Accept: "application/json" }
199
+ }), r = await w(n), c = T(r);
200
+ return c && typeof c == "object" ? {
201
+ products: Array.isArray(c.products) ? c.products : [],
202
+ groups: Array.isArray(c.groups) ? c.groups : [],
203
+ relations: Array.isArray(c.relations) ? c.relations : [],
204
+ appBindings: Array.isArray(c.appBindings) ? c.appBindings : []
205
+ } : { products: [], groups: [], relations: [], appBindings: [] };
206
+ } catch {
207
+ return { products: [], groups: [], relations: [], appBindings: [] };
208
+ }
209
+ }
210
+ async function Ot(n) {
211
+ try {
212
+ const r = await fetch("/api/product/relation", {
213
+ method: "POST",
214
+ credentials: "include",
215
+ headers: { Accept: "application/json", "Content-Type": "application/json" },
216
+ body: JSON.stringify(n)
217
+ }), c = await w(r);
218
+ return T(c);
219
+ } catch {
220
+ return null;
221
+ }
222
+ }
223
+ async function Ht(n) {
224
+ try {
225
+ return await fetch(`/api/product/relation/${n}`, {
226
+ method: "DELETE",
227
+ credentials: "include",
228
+ headers: { Accept: "application/json" }
229
+ }), !0;
230
+ } catch {
231
+ return !1;
232
+ }
233
+ }
234
+ async function Dt(n, r) {
235
+ try {
236
+ const c = await fetch(`/api/product/${encodeURIComponent(n)}/requirement/${r.id}`, {
237
+ method: "PUT",
238
+ credentials: "include",
239
+ headers: { Accept: "application/json", "Content-Type": "application/json" },
240
+ body: JSON.stringify(r)
241
+ }), o = await w(c);
242
+ return T(o);
243
+ } catch {
244
+ return null;
245
+ }
246
+ }
247
+ const Ut = "_container_v1vhg_3", Mt = "_header_v1vhg_11", xt = "_title_v1vhg_23", zt = "_subtitle_v1vhg_30", Kt = "_actions_v1vhg_36", Jt = "_stats_v1vhg_42", Vt = "_relForm_v1vhg_55", Wt = "_relFormLabel_v1vhg_66", Qt = "_centerFill_v1vhg_72", Yt = "_groups_v1vhg_79", Xt = "_groupBlock_v1vhg_89", Zt = "_groupHeader_v1vhg_95", ea = "_groupName_v1vhg_101", ta = "_groupCount_v1vhg_107", aa = "_productGrid_v1vhg_112", na = "_productCard_v1vhg_118", ia = "_cardHead_v1vhg_134", ca = "_cardName_v1vhg_141", ra = "_cardTag_v1vhg_150", sa = "_cardCode_v1vhg_156", oa = "_cardDesc_v1vhg_161", la = "_cardSection_v1vhg_171", da = "_sectionLabel_v1vhg_180", pa = "_bindList_v1vhg_185", ua = "_bindTag_v1vhg_191", ma = "_relList_v1vhg_196", ha = "_relRow_v1vhg_202", _a = "_relTag_v1vhg_209", va = "_relTarget_v1vhg_215", fa = "_relDel_v1vhg_225", m = {
248
+ container: Ut,
249
+ header: Mt,
250
+ title: xt,
251
+ subtitle: zt,
252
+ actions: Kt,
253
+ stats: Jt,
254
+ relForm: Vt,
255
+ relFormLabel: Wt,
256
+ centerFill: Qt,
257
+ groups: Yt,
258
+ groupBlock: Xt,
259
+ groupHeader: Zt,
260
+ groupName: ea,
261
+ groupCount: ta,
262
+ productGrid: aa,
263
+ productCard: na,
264
+ cardHead: ia,
265
+ cardName: ca,
266
+ cardTag: ra,
267
+ cardCode: sa,
268
+ cardDesc: oa,
269
+ cardSection: la,
270
+ sectionLabel: da,
271
+ bindList: pa,
272
+ bindTag: ua,
273
+ relList: ma,
274
+ relRow: ha,
275
+ relTag: _a,
276
+ relTarget: va,
277
+ relDel: fa
278
+ };
279
+ function ga() {
280
+ const [n, r] = p({ products: [], groups: [], relations: [], appBindings: [] }), [c, o] = p({}), [f, I] = p(!0), [d, D] = p(null), [l, U] = p(null), [L, Q] = p("DEPENDS_ON"), G = v(async () => {
281
+ I(!0);
282
+ try {
283
+ const [u, _] = await Promise.all([qt(), jt()]);
284
+ r(u), o(_);
285
+ } finally {
286
+ I(!1);
287
+ }
288
+ }, []);
289
+ Se(() => {
290
+ G();
291
+ }, [G]);
292
+ const k = v(
293
+ (u) => {
294
+ if (!u) return null;
295
+ const _ = n.groups.find((h) => h.groupCode === u);
296
+ return _ ? _.name : u;
297
+ },
298
+ [n.groups]
299
+ ), me = ue(() => {
300
+ const u = /* @__PURE__ */ new Map();
301
+ for (const _ of n.products) {
302
+ const h = _.groupCode ?? null;
303
+ u.has(h) || u.set(h, []), u.get(h).push(_);
304
+ }
305
+ return [...u.entries()].sort((_, h) => _[0] === null ? 1 : h[0] === null ? -1 : String(k(_[0])).localeCompare(String(k(h[0])), "zh"));
306
+ }, [n.products, k]), Y = v(
307
+ (u) => n.appBindings.filter((_) => _.productCode === u),
308
+ [n.appBindings]
309
+ ), M = v(
310
+ (u) => n.relations.filter((_) => _.productCode === u),
311
+ [n.relations]
312
+ ), b = v(
313
+ (u) => {
314
+ const _ = n.products.find((h) => h.productCode === u);
315
+ return _ ? _.name : u;
316
+ },
317
+ [n.products]
318
+ ), x = v(async () => {
319
+ if (!d || !l || d === l) return;
320
+ const u = await Ot({
321
+ productCode: d,
322
+ relatedCode: l,
323
+ relationType: L,
324
+ description: `${b(d)} ${c[L] ?? L} ${b(l)}`
325
+ });
326
+ u && (r((_) => ({ ..._, relations: [..._.relations, u] })), D(null), U(null));
327
+ }, [d, l, L, c, b]), E = ue(
328
+ () => n.products.map((u) => ({
329
+ value: u.productCode,
330
+ label: `${u.name}(${u.productCode})`
331
+ })),
332
+ [n.products]
333
+ );
334
+ return /* @__PURE__ */ i("div", { className: m.container, children: [
335
+ /* @__PURE__ */ i("div", { className: m.header, children: [
336
+ /* @__PURE__ */ i("div", { children: [
337
+ /* @__PURE__ */ a("h2", { className: m.title, children: "架构全景" }),
338
+ /* @__PURE__ */ a("p", { className: m.subtitle, children: "租户下所有产品整顿成一张架构图:产品群 · 产品↔产品关系 · 挂接的中间件/应用" })
339
+ ] }),
340
+ /* @__PURE__ */ i("div", { className: m.actions, children: [
341
+ /* @__PURE__ */ i("span", { className: m.stats, children: [
342
+ /* @__PURE__ */ a("b", { children: n.products.length }),
343
+ " 产品",
344
+ /* @__PURE__ */ a("b", { children: n.groups.length }),
345
+ " 群",
346
+ /* @__PURE__ */ a("b", { children: n.relations.length }),
347
+ " 关系",
348
+ /* @__PURE__ */ a("b", { children: n.appBindings.filter((u) => u.appType === "INFRA").length }),
349
+ " 基建"
350
+ ] }),
351
+ /* @__PURE__ */ a(W, { size: "small", icon: /* @__PURE__ */ a(ot, {}), onClick: () => void G(), children: "刷新" })
352
+ ] })
353
+ ] }),
354
+ /* @__PURE__ */ i("div", { className: m.relForm, children: [
355
+ /* @__PURE__ */ a("span", { className: m.relFormLabel, children: "新建产品关系:" }),
356
+ /* @__PURE__ */ a(
357
+ be,
358
+ {
359
+ size: "small",
360
+ placeholder: "起点产品",
361
+ value: d,
362
+ onChange: D,
363
+ options: E,
364
+ style: { width: 200 },
365
+ showSearch: !0,
366
+ optionFilterProp: "label"
367
+ }
368
+ ),
369
+ /* @__PURE__ */ a(
370
+ be,
371
+ {
372
+ size: "small",
373
+ placeholder: "关系类型",
374
+ value: L,
375
+ onChange: (u) => Q(u),
376
+ style: { width: 130 },
377
+ options: Object.entries(c).map(([u, _]) => ({ value: u, label: _ }))
378
+ }
379
+ ),
380
+ /* @__PURE__ */ a(
381
+ be,
382
+ {
383
+ size: "small",
384
+ placeholder: "终点产品",
385
+ value: l,
386
+ onChange: U,
387
+ options: E,
388
+ style: { width: 200 },
389
+ showSearch: !0,
390
+ optionFilterProp: "label"
391
+ }
392
+ ),
393
+ /* @__PURE__ */ a(
394
+ W,
395
+ {
396
+ size: "small",
397
+ type: "primary",
398
+ onClick: () => void x(),
399
+ disabled: !d || !l || d === l,
400
+ children: "建立关系"
401
+ }
402
+ )
403
+ ] }),
404
+ f ? /* @__PURE__ */ a("div", { className: m.centerFill, children: /* @__PURE__ */ a(pe, {}) }) : n.products.length === 0 ? /* @__PURE__ */ a("div", { className: m.centerFill, children: /* @__PURE__ */ a(y, { image: y.PRESENTED_IMAGE_SIMPLE, description: "暂无产品,先在产品库创建" }) }) : /* @__PURE__ */ a("div", { className: m.groups, children: me.map(([u, _]) => /* @__PURE__ */ i("div", { className: m.groupBlock, children: [
405
+ /* @__PURE__ */ i("div", { className: m.groupHeader, children: [
406
+ /* @__PURE__ */ a("span", { className: m.groupName, children: k(u) ? `📦 ${k(u)}` : "🗂 未分组" }),
407
+ /* @__PURE__ */ i("span", { className: m.groupCount, children: [
408
+ _.length,
409
+ " 个产品"
410
+ ] })
411
+ ] }),
412
+ /* @__PURE__ */ a("div", { className: m.productGrid, children: _.map((h) => {
413
+ const X = Y(h.productCode ?? ""), F = M(h.productCode ?? "");
414
+ return /* @__PURE__ */ i("div", { className: m.productCard, children: [
415
+ /* @__PURE__ */ i("div", { className: m.cardHead, children: [
416
+ /* @__PURE__ */ a("span", { className: m.cardName, title: h.name, children: h.name }),
417
+ h.status && /* @__PURE__ */ a(R, { className: m.cardTag, children: h.status })
418
+ ] }),
419
+ /* @__PURE__ */ a("div", { className: m.cardCode, children: h.productCode }),
420
+ h.description && /* @__PURE__ */ a("div", { className: m.cardDesc, title: h.description, children: h.description }),
421
+ X.length > 0 && /* @__PURE__ */ i("div", { className: m.cardSection, children: [
422
+ /* @__PURE__ */ a("div", { className: m.sectionLabel, children: "挂接" }),
423
+ /* @__PURE__ */ a("div", { className: m.bindList, children: X.map((g) => /* @__PURE__ */ i(
424
+ R,
425
+ {
426
+ className: m.bindTag,
427
+ color: g.appType === "INFRA" ? "purple" : "geekblue",
428
+ children: [
429
+ g.appType === "INFRA" ? "🏗" : "🧩",
430
+ " ",
431
+ g.appName
432
+ ]
433
+ },
434
+ g.id
435
+ )) })
436
+ ] }),
437
+ F.length > 0 && /* @__PURE__ */ i("div", { className: m.cardSection, children: [
438
+ /* @__PURE__ */ a("div", { className: m.sectionLabel, children: "关系" }),
439
+ /* @__PURE__ */ a("div", { className: m.relList, children: F.map((g) => /* @__PURE__ */ i("div", { className: m.relRow, children: [
440
+ /* @__PURE__ */ a(
441
+ R,
442
+ {
443
+ className: m.relTag,
444
+ color: g.relationType === "DEPENDS_ON" ? "orange" : g.relationType === "BUILT_ON" ? "cyan" : "blue",
445
+ children: c[g.relationType] ?? g.relationType
446
+ }
447
+ ),
448
+ /* @__PURE__ */ a("span", { className: m.relTarget, title: b(g.relatedCode), children: b(g.relatedCode) }),
449
+ /* @__PURE__ */ a(
450
+ "button",
451
+ {
452
+ type: "button",
453
+ className: m.relDel,
454
+ onClick: async () => {
455
+ await Ht(g.id), r(($) => ({
456
+ ...$,
457
+ relations: $.relations.filter((z) => z.id !== g.id)
458
+ }));
459
+ },
460
+ title: "删除关系",
461
+ children: "✕"
462
+ }
463
+ )
464
+ ] }, g.id)) })
465
+ ] })
466
+ ] }, h.productCode);
467
+ }) })
468
+ ] }, u ?? "__none__")) })
469
+ ] });
470
+ }
471
+ const Na = "_container_fe711_5", ya = "_libraryView_fe711_14", wa = "_libraryHeader_fe711_22", Ta = "_libraryTitle_fe711_34", ba = "_librarySubtitle_fe711_41", Ca = "_librarySearch_fe711_47", Sa = "_libraryBody_fe711_52", Aa = "_productGrid_fe711_59", Pa = "_productCard_fe711_65", Ra = "_cardCode_fe711_85", ka = "_cardName_fe711_98", Ea = "_cardDesc_fe711_107", Ia = "_cardFoot_fe711_118", La = "_cardEnter_fe711_126", $a = "_cardTag_fe711_134", Ba = "_left_fe711_140", Ga = "_leftHeader_fe711_150", Fa = "_leftTitleRow_fe711_156", ja = "_leftTitle_fe711_156", qa = "_backBtn_fe711_173", Oa = "_sectionBar_fe711_203", Ha = "_sectionTab_fe711_213", Da = "_sectionTabActive_fe711_235", Ua = "_sectionIcon_fe711_242", Ma = "_leftBody_fe711_247", xa = "_fileList_fe711_258", za = "_fileTreeHint_fe711_297", Ka = "_fileRow_fe711_303", Ja = "_fileRowActive_fe711_317", Va = "_fileRowIcon_fe711_321", Wa = "_fileRowName_fe711_326", Qa = "_fileKindTag_fe711_335", Ya = "_center_fe711_343", Xa = "_centerFill_fe711_352", Za = "_renderArea_fe711_407", en = "_renderIframe_fe711_417", tn = "_renderCode_fe711_423", an = "_right_fe711_436", nn = "_chatSide_fe711_447", cn = "_chatSideHeader_fe711_453", rn = "_chatSideTitle_fe711_462", sn = "_chatGroupList_fe711_471", on = "_chatGroupRow_fe711_480", ln = "_chatGroupRowActive_fe711_494", dn = "_chatGroupName_fe711_498", pn = "_chatGroupTime_fe711_507", un = "_chatPane_fe711_514", mn = "_chatPaneHeader_fe711_520", hn = "_chatPaneTitle_fe711_529", _n = "_chatPaneBody_fe711_538", vn = "_viewTabs_fe711_549", fn = "_viewTab_fe711_549", gn = "_viewTabActive_fe711_573", Nn = "_groupChips_fe711_581", yn = "_groupChip_fe711_581", wn = "_groupChipActive_fe711_605", Tn = "_groupNewHint_fe711_611", bn = "_groupAddBtn_fe711_618", Cn = "_cardGroup_fe711_633", Sn = "_overviewArea_fe711_643", An = "_overviewHeader_fe711_648", Pn = "_overviewTitle_fe711_652", Rn = "_overviewSubtitle_fe711_659", kn = "_overviewTabs_fe711_665", En = "_overviewTab_fe711_665", In = "_overviewTabActive_fe711_688", Ln = "_overviewPanel_fe711_694", $n = "_reqForm_fe711_702", Bn = "_reqList_fe711_708", Gn = "_reqRow_fe711_714", Fn = "_reqTitle_fe711_723", jn = "_reqTag_fe711_732", qn = "_reqStatusTag_fe711_738", On = "_reqTime_fe711_751", Hn = "_appForm_fe711_758", Dn = "_appTypeSelect_fe711_765", Un = "_appList_fe711_776", Mn = "_appRow_fe711_782", xn = "_appIcon_fe711_791", zn = "_appName_fe711_796", Kn = "_appCode_fe711_806", Jn = "_appTag_fe711_812", Vn = "_appGo_fe711_818", Wn = "_appInfraNote_fe711_833", Qn = "_appUnbind_fe711_839", Yn = "_statsRow_fe711_856", Xn = "_statItem_fe711_867", Zn = "_domainBlock_fe711_881", ei = "_domainBlockTitle_fe711_889", ti = "_domainEmpty_fe711_896", ai = "_domainList_fe711_904", ni = "_domainRow_fe711_910", ii = "_domainName_fe711_919", ci = "_domainDesc_fe711_933", ri = "_designHint_fe711_944", si = "_designList_fe711_953", oi = "_designRow_fe711_959", li = "_designIcon_fe711_968", di = "_designName_fe711_973", pi = "_designTime_fe711_983", ui = "_overviewEntryBtn_fe711_990", t = {
472
+ container: Na,
473
+ libraryView: ya,
474
+ libraryHeader: wa,
475
+ libraryTitle: Ta,
476
+ librarySubtitle: ba,
477
+ librarySearch: Ca,
478
+ libraryBody: Sa,
479
+ productGrid: Aa,
480
+ productCard: Pa,
481
+ cardCode: Ra,
482
+ cardName: ka,
483
+ cardDesc: Ea,
484
+ cardFoot: Ia,
485
+ cardEnter: La,
486
+ cardTag: $a,
487
+ left: Ba,
488
+ leftHeader: Ga,
489
+ leftTitleRow: Fa,
490
+ leftTitle: ja,
491
+ backBtn: qa,
492
+ sectionBar: Oa,
493
+ sectionTab: Ha,
494
+ sectionTabActive: Da,
495
+ sectionIcon: Ua,
496
+ leftBody: Ma,
497
+ fileList: xa,
498
+ fileTreeHint: za,
499
+ fileRow: Ka,
500
+ fileRowActive: Ja,
501
+ fileRowIcon: Va,
502
+ fileRowName: Wa,
503
+ fileKindTag: Qa,
504
+ center: Ya,
505
+ centerFill: Xa,
506
+ renderArea: Za,
507
+ renderIframe: en,
508
+ renderCode: tn,
509
+ right: an,
510
+ chatSide: nn,
511
+ chatSideHeader: cn,
512
+ chatSideTitle: rn,
513
+ chatGroupList: sn,
514
+ chatGroupRow: on,
515
+ chatGroupRowActive: ln,
516
+ chatGroupName: dn,
517
+ chatGroupTime: pn,
518
+ chatPane: un,
519
+ chatPaneHeader: mn,
520
+ chatPaneTitle: hn,
521
+ chatPaneBody: _n,
522
+ viewTabs: vn,
523
+ viewTab: fn,
524
+ viewTabActive: gn,
525
+ groupChips: Nn,
526
+ groupChip: yn,
527
+ groupChipActive: wn,
528
+ groupNewHint: Tn,
529
+ groupAddBtn: bn,
530
+ cardGroup: Cn,
531
+ overviewArea: Sn,
532
+ overviewHeader: An,
533
+ overviewTitle: Pn,
534
+ overviewSubtitle: Rn,
535
+ overviewTabs: kn,
536
+ overviewTab: En,
537
+ overviewTabActive: In,
538
+ overviewPanel: Ln,
539
+ reqForm: $n,
540
+ reqList: Bn,
541
+ reqRow: Gn,
542
+ reqTitle: Fn,
543
+ reqTag: jn,
544
+ reqStatusTag: qn,
545
+ reqTime: On,
546
+ appForm: Hn,
547
+ appTypeSelect: Dn,
548
+ appList: Un,
549
+ appRow: Mn,
550
+ appIcon: xn,
551
+ appName: zn,
552
+ appCode: Kn,
553
+ appTag: Jn,
554
+ appGo: Vn,
555
+ appInfraNote: Wn,
556
+ appUnbind: Qn,
557
+ statsRow: Yn,
558
+ statItem: Xn,
559
+ domainBlock: Zn,
560
+ domainBlockTitle: ei,
561
+ domainEmpty: ti,
562
+ domainList: ai,
563
+ domainRow: ni,
564
+ domainName: ii,
565
+ domainDesc: ci,
566
+ designHint: ri,
567
+ designList: si,
568
+ designRow: oi,
569
+ designIcon: li,
570
+ designName: di,
571
+ designTime: pi,
572
+ overviewEntryBtn: ui
573
+ };
574
+ function mi(n) {
575
+ return {
576
+ id: String(n.id),
577
+ name: n.name,
578
+ description: n.description ?? "",
579
+ workspace_path: n.workspacePath || n.name,
580
+ status: n.status,
581
+ created_at: n.createTime ?? "",
582
+ scenario_id: String(n.id),
583
+ scenario_code: n.scenarioCode,
584
+ scenario_name: n.scenarioName ?? n.name
585
+ };
586
+ }
587
+ function je(n) {
588
+ const r = n.toLowerCase();
589
+ 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";
590
+ }
591
+ function qe(n, r = "") {
592
+ const c = [];
593
+ for (const o of n ?? []) {
594
+ const f = o.path || `${r}${o.name ?? ""}`, I = o.name || f.split("/").pop() || f, d = o.type === "dir" || Array.isArray(o.children);
595
+ c.push({ path: f, name: I, dir: d, kind: je(f), depth: r.split("/").filter(Boolean).length }), d && Array.isArray(o.children) && c.push(...qe(o.children, `${f}/`));
596
+ }
597
+ return c;
598
+ }
599
+ function Ti() {
600
+ const n = B((e) => e.token), r = B((e) => e.selectProject), [c, o] = p([]), [f, I] = p(!0), [d, D] = p(null), [l, U] = p(null), [L, Q] = p(!1), [G, k] = p([]), [me, Y] = p(!1), [M, b] = p(null), [x, E] = p(null), [u, _] = p("other"), [h, X] = p(""), [F, g] = p("library"), [$, z] = p([]), [Ae, he] = p(null), [Z, Pe] = p(!1), [Oe, ee] = p("list"), S = mt(null), [_e, Re] = p([]), [K, ke] = p(null), [te, ve] = p([]), [ae, fe] = p([]), [A, j] = p("req"), [J, Ee] = p(""), [ne, He] = p([]), [ie, De] = p([]), [ce, Ue] = p([]), [re, Me] = p([]), [se, xe] = p([]), [Ie, ze] = p([]), ge = v(
601
+ async (e) => {
602
+ D(e), Q(!0), b(null), E(null), ee("list"), he(null), j("req");
603
+ const s = await Nt(e);
604
+ U(s);
605
+ const N = await bt(e, n);
606
+ z(N);
607
+ const C = await Pt(e);
608
+ ve(C);
609
+ const de = await kt(e);
610
+ fe(de);
611
+ const [Te, V, at, nt, it, ct] = await Promise.all([
612
+ It(e),
613
+ Lt(e),
614
+ $t(e),
615
+ Bt(e),
616
+ Gt(e),
617
+ Ft(e)
618
+ ]);
619
+ He(Te), De(V), Ue(at), Me(nt), xe(it), ze(ct), Y(!0);
620
+ const rt = await yt(e);
621
+ k(rt), Y(!1);
622
+ },
623
+ [n]
624
+ ), Le = v(async () => {
625
+ I(!0);
626
+ try {
627
+ const e = await gt();
628
+ o(e);
629
+ const s = await St();
630
+ Re(s);
631
+ try {
632
+ const N = new URLSearchParams(window.location.search).get("product");
633
+ if (N) {
634
+ const C = e.find((de) => de.productCode === N);
635
+ if (C) {
636
+ ge(C.productCode);
637
+ return;
638
+ }
639
+ }
640
+ } catch {
641
+ }
642
+ } catch {
643
+ o([]);
644
+ } finally {
645
+ I(!1);
646
+ }
647
+ }, [ge]);
648
+ Se(() => {
649
+ Le();
650
+ }, [Le]);
651
+ const Ke = v(() => {
652
+ if (!d) return;
653
+ const e = new URLSearchParams();
654
+ e.set("product", d), l != null && l.name && e.set("productName", l.name), Ce.push(`/lc/apps?${e.toString()}`);
655
+ }, [d, l == null ? void 0 : l.name]), Je = v(() => {
656
+ if (!d) return;
657
+ const e = new URLSearchParams();
658
+ e.set("product", d), l != null && l.name && e.set("productName", l.name), Ce.push(`/test/qa/dashboard?${e.toString()}`);
659
+ }, [d, l == null ? void 0 : l.name]), Ve = v(() => {
660
+ D(null), Q(!1), U(null), k([]), z([]), b(null), E(null), he(null), ee("list"), S.current !== void 0 && B.setState({ currentProject: S.current }), S.current = void 0;
661
+ }, []), $e = v(async () => {
662
+ if (!d || !J.trim()) return;
663
+ const e = await Et(d, {
664
+ title: J.trim(),
665
+ priority: "P2"
666
+ });
667
+ e && (fe((s) => [...s, e]), Ee(""));
668
+ }, [d, J]), We = ["OPEN", "IN_PROGRESS", "DONE", "CLOSED"], [oe] = p(We), Qe = v(
669
+ async (e) => {
670
+ if (!d || e.id == null) return;
671
+ const s = String(e.status ?? "OPEN"), N = oe.indexOf(s), C = oe[(N + 1) % oe.length];
672
+ await Dt(d, { id: e.id, status: C }) && fe((Te) => Te.map((V) => V.id === e.id ? { ...V, status: C } : V));
673
+ },
674
+ [d, oe]
675
+ ), [P, le] = p({
676
+ appCode: "",
677
+ appName: "",
678
+ appType: "APP"
679
+ }), Ye = v(async () => {
680
+ if (!d || !P.appCode.trim() || !P.appName.trim()) return;
681
+ const e = await Rt(d, P);
682
+ e && (ve((s) => [...s, e]), le({ appCode: "", appName: "", appType: "APP" }));
683
+ }, [d, P]), Xe = v(
684
+ async (e) => {
685
+ d && (await unbindProductApp(d, e), ve((s) => s.filter((N) => N.id !== e)));
686
+ },
687
+ [d]
688
+ ), [q, Ne] = p({ groupCode: "", name: "" }), Ze = v(async () => {
689
+ if (!q.groupCode.trim() || !q.name.trim()) return;
690
+ const e = await At(q);
691
+ e && (Re((s) => [...s, e]), Ne({ groupCode: "", name: "" }));
692
+ }, [q]), et = v(
693
+ async (e) => {
694
+ if (!d) return;
695
+ b(e), E(null);
696
+ const s = je(e);
697
+ _(s);
698
+ const N = await wt(d, e);
699
+ E(N ?? "");
700
+ },
701
+ [d]
702
+ ), ye = v(
703
+ async (e) => {
704
+ if (!e) return;
705
+ const s = mi(e);
706
+ S.current = B.getState().currentProject, he(e.id), ee("chat"), r(s);
707
+ },
708
+ [r]
709
+ ), tt = v(async () => {
710
+ if (!(!d || Z)) {
711
+ Pe(!0);
712
+ try {
713
+ const e = await Ct(
714
+ d,
715
+ `${(l == null ? void 0 : l.name) || d} · 讨论组 ${$.length + 1}`,
716
+ n
717
+ );
718
+ z((s) => [...s, e]), await ye(e);
719
+ } finally {
720
+ Pe(!1);
721
+ }
722
+ }
723
+ }, [d, Z, $.length, l == null ? void 0 : l.name, n, ye]);
724
+ Se(() => () => {
725
+ S.current !== void 0 && B.setState({ currentProject: S.current });
726
+ }, [Ae]);
727
+ const we = ue(() => qe(G), [G]), Be = ue(
728
+ () => c.filter((e) => !(h && !e.name.includes(h) && !e.productCode.includes(h) || K && e.groupCode !== K)),
729
+ [c, h, K]
730
+ ), Ge = v(
731
+ (e) => {
732
+ if (!e) return null;
733
+ const s = _e.find((N) => N.groupCode === e);
734
+ return s ? s.name : e;
735
+ },
736
+ [_e]
737
+ );
738
+ return /* @__PURE__ */ a("div", { className: t.container, children: L ? /* @__PURE__ */ i(st, { children: [
739
+ /* @__PURE__ */ i("aside", { className: t.left, children: [
740
+ /* @__PURE__ */ i("div", { className: t.leftHeader, children: [
741
+ /* @__PURE__ */ i("div", { className: t.leftTitleRow, children: [
742
+ /* @__PURE__ */ a("button", { type: "button", className: t.backBtn, onClick: Ve, title: "返回产品库", children: "←" }),
743
+ /* @__PURE__ */ a("span", { className: t.leftTitle, title: (l == null ? void 0 : l.name) || d || "", children: (l == null ? void 0 : l.name) || d })
744
+ ] }),
745
+ /* @__PURE__ */ i("div", { className: t.sectionBar, children: [
746
+ /* @__PURE__ */ i("span", { className: `${t.sectionTab} ${t.sectionTabActive}`, children: [
747
+ /* @__PURE__ */ a("span", { className: t.sectionIcon, children: "📦" }),
748
+ " 产品"
749
+ ] }),
750
+ /* @__PURE__ */ i("button", { type: "button", className: t.sectionTab, onClick: Ke, title: "进入研发工作台(z-lc)", children: [
751
+ /* @__PURE__ */ a("span", { className: t.sectionIcon, children: "💻" }),
752
+ " 研发"
753
+ ] }),
754
+ /* @__PURE__ */ i("button", { type: "button", className: t.sectionTab, onClick: Je, title: "进入测试工作台(QA)", children: [
755
+ /* @__PURE__ */ a("span", { className: t.sectionIcon, children: "🧪" }),
756
+ " 测试"
757
+ ] })
758
+ ] })
759
+ ] }),
760
+ /* @__PURE__ */ i("div", { className: t.leftBody, children: [
761
+ /* @__PURE__ */ a(
762
+ "button",
763
+ {
764
+ type: "button",
765
+ className: t.overviewEntryBtn,
766
+ onClick: () => {
767
+ b(null), E(null);
768
+ },
769
+ title: "回到产品总览(沉淀台)",
770
+ children: "📋 产品总览 · 返回沉淀台"
771
+ }
772
+ ),
773
+ /* @__PURE__ */ a("div", { className: t.fileTreeHint, children: "文件(设计稿 · 文档 · 产物)" }),
774
+ me ? /* @__PURE__ */ a("div", { className: t.centerFill, children: /* @__PURE__ */ a(pe, { size: "small" }) }) : we.length === 0 ? /* @__PURE__ */ a(y, { image: y.PRESENTED_IMAGE_SIMPLE, description: "产品下暂无文件" }) : /* @__PURE__ */ a("div", { className: t.fileList, children: we.map((e) => /* @__PURE__ */ i(
775
+ "div",
776
+ {
777
+ className: `${t.fileRow} ${M === e.path ? t.fileRowActive : ""}`,
778
+ style: { paddingLeft: 12 + e.depth * 16 },
779
+ onClick: () => !e.dir && et(e.path),
780
+ children: [
781
+ /* @__PURE__ */ a("span", { className: t.fileRowIcon, children: e.dir ? "📁" : e.kind === "design" ? "🖼" : e.kind === "doc" ? "📄" : e.kind === "code" ? "{" : "◦" }),
782
+ /* @__PURE__ */ a("span", { className: t.fileRowName, children: e.name }),
783
+ e.kind === "design" && /* @__PURE__ */ a(R, { className: t.fileKindTag, color: "blue", children: "设计稿" })
784
+ ]
785
+ },
786
+ e.path
787
+ )) })
788
+ ] })
789
+ ] }),
790
+ /* @__PURE__ */ a("main", { className: t.center, children: M == null ? /* @__PURE__ */ i("div", { className: t.overviewArea, children: [
791
+ /* @__PURE__ */ i("div", { className: t.overviewHeader, children: [
792
+ /* @__PURE__ */ a("h2", { className: t.overviewTitle, children: "产品总览" }),
793
+ /* @__PURE__ */ a("p", { className: t.overviewSubtitle, children: "「关于这个产品的一切」沉淀在这里:需求 · 应用群 · 领域资产 · 设计稿 · 聊天蒸馏" })
794
+ ] }),
795
+ /* @__PURE__ */ i("div", { className: t.statsRow, children: [
796
+ /* @__PURE__ */ i("span", { className: t.statItem, children: [
797
+ /* @__PURE__ */ a("b", { children: ae.length }),
798
+ " 需求"
799
+ ] }),
800
+ /* @__PURE__ */ i("span", { className: t.statItem, children: [
801
+ /* @__PURE__ */ a("b", { children: te.length }),
802
+ " 应用"
803
+ ] }),
804
+ /* @__PURE__ */ i("span", { className: t.statItem, children: [
805
+ /* @__PURE__ */ a("b", { children: ne.length }),
806
+ " 术语"
807
+ ] }),
808
+ /* @__PURE__ */ i("span", { className: t.statItem, children: [
809
+ /* @__PURE__ */ a("b", { children: ie.length }),
810
+ " 概念"
811
+ ] }),
812
+ /* @__PURE__ */ i("span", { className: t.statItem, children: [
813
+ /* @__PURE__ */ a("b", { children: ce.length }),
814
+ " 场景"
815
+ ] }),
816
+ /* @__PURE__ */ i("span", { className: t.statItem, children: [
817
+ /* @__PURE__ */ a("b", { children: re.length }),
818
+ " 设计稿"
819
+ ] }),
820
+ /* @__PURE__ */ i("span", { className: t.statItem, children: [
821
+ /* @__PURE__ */ a("b", { children: se.length }),
822
+ " 会话"
823
+ ] }),
824
+ /* @__PURE__ */ i("span", { className: t.statItem, children: [
825
+ /* @__PURE__ */ a("b", { children: we.filter((e) => !e.dir).length }),
826
+ " 文件"
827
+ ] })
828
+ ] }),
829
+ /* @__PURE__ */ i("div", { className: t.overviewTabs, children: [
830
+ /* @__PURE__ */ i(
831
+ "button",
832
+ {
833
+ type: "button",
834
+ className: `${t.overviewTab} ${A === "req" ? t.overviewTabActive : ""}`,
835
+ onClick: () => j("req"),
836
+ children: [
837
+ "需求(",
838
+ ae.length,
839
+ ")"
840
+ ]
841
+ }
842
+ ),
843
+ /* @__PURE__ */ i(
844
+ "button",
845
+ {
846
+ type: "button",
847
+ className: `${t.overviewTab} ${A === "apps" ? t.overviewTabActive : ""}`,
848
+ onClick: () => j("apps"),
849
+ children: [
850
+ "应用群(",
851
+ te.length,
852
+ ")"
853
+ ]
854
+ }
855
+ ),
856
+ /* @__PURE__ */ i(
857
+ "button",
858
+ {
859
+ type: "button",
860
+ className: `${t.overviewTab} ${A === "domain" ? t.overviewTabActive : ""}`,
861
+ onClick: () => j("domain"),
862
+ children: [
863
+ "领域资产(",
864
+ ne.length + ie.length + ce.length,
865
+ ")"
866
+ ]
867
+ }
868
+ ),
869
+ /* @__PURE__ */ i(
870
+ "button",
871
+ {
872
+ type: "button",
873
+ className: `${t.overviewTab} ${A === "design" ? t.overviewTabActive : ""}`,
874
+ onClick: () => j("design"),
875
+ children: [
876
+ "设计稿(",
877
+ re.length,
878
+ ")"
879
+ ]
880
+ }
881
+ ),
882
+ /* @__PURE__ */ i(
883
+ "button",
884
+ {
885
+ type: "button",
886
+ className: `${t.overviewTab} ${A === "chat" ? t.overviewTabActive : ""}`,
887
+ onClick: () => j("chat"),
888
+ children: [
889
+ "聊天蒸馏(",
890
+ se.length,
891
+ ")"
892
+ ]
893
+ }
894
+ )
895
+ ] }),
896
+ A === "req" ? /* @__PURE__ */ i("div", { className: t.overviewPanel, children: [
897
+ /* @__PURE__ */ i("div", { className: t.reqForm, children: [
898
+ /* @__PURE__ */ a(
899
+ O,
900
+ {
901
+ placeholder: "新增需求标题(针对本产品)",
902
+ value: J,
903
+ onChange: (e) => Ee(e.target.value),
904
+ onPressEnter: () => void $e(),
905
+ style: { flex: 1 }
906
+ }
907
+ ),
908
+ /* @__PURE__ */ a(W, { type: "primary", onClick: () => void $e(), disabled: !J.trim(), children: "添加需求" })
909
+ ] }),
910
+ ae.length === 0 ? /* @__PURE__ */ a(y, { image: y.PRESENTED_IMAGE_SIMPLE, description: "还没有需求,先落一条" }) : /* @__PURE__ */ a("div", { className: t.reqList, children: ae.map((e) => /* @__PURE__ */ i("div", { className: t.reqRow, children: [
911
+ /* @__PURE__ */ a("span", { className: t.reqTitle, title: e.title, children: e.title }),
912
+ /* @__PURE__ */ a(R, { className: t.reqTag, color: e.priority === "P0" ? "red" : e.priority === "P1" ? "orange" : "blue", children: e.priority || "P2" }),
913
+ /* @__PURE__ */ a(
914
+ R,
915
+ {
916
+ className: t.reqStatusTag,
917
+ onClick: () => void Qe(e),
918
+ title: "点击流转状态(OPEN → IN_PROGRESS → DONE → CLOSED)",
919
+ children: e.status || "OPEN"
920
+ }
921
+ ),
922
+ /* @__PURE__ */ a("span", { className: t.reqTime, children: String(e.createdAt ?? "").slice(0, 10) })
923
+ ] }, e.id)) })
924
+ ] }) : A === "apps" ? /* @__PURE__ */ i("div", { className: t.overviewPanel, children: [
925
+ /* @__PURE__ */ i("div", { className: t.appForm, children: [
926
+ /* @__PURE__ */ a(
927
+ O,
928
+ {
929
+ placeholder: "应用编码(如 z-lc 应用 code)",
930
+ value: P.appCode,
931
+ onChange: (e) => le((s) => ({ ...s, appCode: e.target.value })),
932
+ style: { flex: 1 }
933
+ }
934
+ ),
935
+ /* @__PURE__ */ a(
936
+ O,
937
+ {
938
+ placeholder: "应用名称",
939
+ value: P.appName,
940
+ onChange: (e) => le((s) => ({ ...s, appName: e.target.value })),
941
+ style: { width: 150 }
942
+ }
943
+ ),
944
+ /* @__PURE__ */ i(
945
+ "select",
946
+ {
947
+ className: t.appTypeSelect,
948
+ value: P.appType,
949
+ onChange: (e) => le((s) => ({ ...s, appType: e.target.value })),
950
+ children: [
951
+ /* @__PURE__ */ a("option", { value: "APP", children: "应用" }),
952
+ /* @__PURE__ */ a("option", { value: "INFRA", children: "基建" })
953
+ ]
954
+ }
955
+ ),
956
+ /* @__PURE__ */ a(
957
+ W,
958
+ {
959
+ type: "primary",
960
+ onClick: () => void Ye(),
961
+ disabled: !P.appCode.trim() || !P.appName.trim(),
962
+ children: "绑定"
963
+ }
964
+ )
965
+ ] }),
966
+ te.length === 0 ? /* @__PURE__ */ a(y, { image: y.PRESENTED_IMAGE_SIMPLE, description: "还没有应用群,绑定支撑这个产品的应用/基建" }) : /* @__PURE__ */ a("div", { className: t.appList, children: te.map((e) => /* @__PURE__ */ i("div", { className: t.appRow, children: [
967
+ /* @__PURE__ */ a("span", { className: t.appIcon, children: e.appType === "INFRA" ? "🏗" : "🧩" }),
968
+ /* @__PURE__ */ a("span", { className: t.appName, title: e.appName, children: e.appName }),
969
+ /* @__PURE__ */ a("span", { className: t.appCode, children: e.appCode }),
970
+ /* @__PURE__ */ a(
971
+ R,
972
+ {
973
+ className: t.appTag,
974
+ color: e.appType === "INFRA" ? "purple" : "geekblue",
975
+ children: e.appType === "INFRA" ? "基建" : "应用"
976
+ }
977
+ ),
978
+ e.appType === "APP" ? /* @__PURE__ */ a(
979
+ "button",
980
+ {
981
+ type: "button",
982
+ className: t.appGo,
983
+ onClick: () => {
984
+ const s = new URLSearchParams();
985
+ s.set("product", d || ""), l != null && l.name && s.set("productName", l.name), s.set("app", e.appCode), Ce.push(`/lc/apps?${s.toString()}`);
986
+ },
987
+ children: "去研发"
988
+ }
989
+ ) : /* @__PURE__ */ a("span", { className: t.appInfraNote, children: "横切多产品" }),
990
+ /* @__PURE__ */ a(
991
+ "button",
992
+ {
993
+ type: "button",
994
+ className: t.appUnbind,
995
+ onClick: () => void Xe(e.id),
996
+ title: "解绑",
997
+ children: "✕"
998
+ }
999
+ )
1000
+ ] }, e.id)) })
1001
+ ] }) : A === "domain" ? /* @__PURE__ */ i("div", { className: t.overviewPanel, children: [
1002
+ /* @__PURE__ */ i("div", { className: t.domainBlock, children: [
1003
+ /* @__PURE__ */ a("div", { className: t.domainBlockTitle, children: "📖 统一语言 · 术语" }),
1004
+ ne.length === 0 ? /* @__PURE__ */ a("div", { className: t.domainEmpty, children: "还没有术语,先在对话里对齐统一语言" }) : /* @__PURE__ */ a("div", { className: t.domainList, children: ne.map((e, s) => /* @__PURE__ */ i("div", { className: t.domainRow, children: [
1005
+ /* @__PURE__ */ a("span", { className: t.domainName, children: String(e.term ?? e.term_code ?? "") }),
1006
+ /* @__PURE__ */ a("span", { className: t.domainDesc, children: String(e.definition ?? "") })
1007
+ ] }, String(e.id ?? s))) })
1008
+ ] }),
1009
+ /* @__PURE__ */ i("div", { className: t.domainBlock, children: [
1010
+ /* @__PURE__ */ a("div", { className: t.domainBlockTitle, children: "🧬 领域概念" }),
1011
+ ie.length === 0 ? /* @__PURE__ */ a("div", { className: t.domainEmpty, children: "还没有概念模型" }) : /* @__PURE__ */ a("div", { className: t.domainList, children: ie.map((e, s) => /* @__PURE__ */ i("div", { className: t.domainRow, children: [
1012
+ /* @__PURE__ */ a("span", { className: t.domainName, children: String(e.name ?? e.code ?? "") }),
1013
+ /* @__PURE__ */ a("span", { className: t.domainDesc, children: String(e.description ?? "") })
1014
+ ] }, String(e.id ?? s))) })
1015
+ ] }),
1016
+ /* @__PURE__ */ i("div", { className: t.domainBlock, children: [
1017
+ /* @__PURE__ */ a("div", { className: t.domainBlockTitle, children: "🎬 用户场景" }),
1018
+ ce.length === 0 ? /* @__PURE__ */ a("div", { className: t.domainEmpty, children: "还没有场景,描述目标用户的典型操作链路" }) : /* @__PURE__ */ a("div", { className: t.domainList, children: ce.map((e, s) => /* @__PURE__ */ i("div", { className: t.domainRow, children: [
1019
+ /* @__PURE__ */ a("span", { className: t.domainName, children: String(e.title ?? e.name ?? "") }),
1020
+ /* @__PURE__ */ a("span", { className: t.domainDesc, children: String(e.description ?? "") })
1021
+ ] }, String(e.id ?? s))) })
1022
+ ] })
1023
+ ] }) : A === "design" ? /* @__PURE__ */ i("div", { className: t.overviewPanel, children: [
1024
+ /* @__PURE__ */ a("div", { className: t.designHint, children: "设计稿在左侧文件树(标注「设计稿」标签);点选后在中间渲染区直渲 raw HTML" }),
1025
+ re.length === 0 ? /* @__PURE__ */ a(y, { image: y.PRESENTED_IMAGE_SIMPLE, description: "还没有设计稿记录" }) : /* @__PURE__ */ a("div", { className: t.designList, children: re.map((e, s) => /* @__PURE__ */ i("div", { className: t.designRow, children: [
1026
+ /* @__PURE__ */ a("span", { className: t.designIcon, children: "🖼" }),
1027
+ /* @__PURE__ */ a("span", { className: t.designName, children: String(e.title ?? e.name ?? "") }),
1028
+ /* @__PURE__ */ a("span", { className: t.designTime, children: String(e.updated_at ?? e.created_at ?? "").slice(0, 10) })
1029
+ ] }, String(e.id ?? s))) })
1030
+ ] }) : /* @__PURE__ */ i("div", { className: t.overviewPanel, children: [
1031
+ /* @__PURE__ */ i("div", { className: t.domainBlock, children: [
1032
+ /* @__PURE__ */ a("div", { className: t.domainBlockTitle, children: "💬 群聊会话" }),
1033
+ se.length === 0 ? /* @__PURE__ */ a("div", { className: t.domainEmpty, children: "还没有群聊会话,右侧「发起聊天」开始" }) : /* @__PURE__ */ a("div", { className: t.domainList, children: se.map((e, s) => /* @__PURE__ */ i("div", { className: t.domainRow, children: [
1034
+ /* @__PURE__ */ a("span", { className: t.domainName, children: String(e.title ?? e.session_code ?? "") }),
1035
+ /* @__PURE__ */ a("span", { className: t.domainDesc, children: String(e.updated_at ?? e.created_at ?? "").slice(0, 16).replace("T", " ") })
1036
+ ] }, String(e.id ?? s))) })
1037
+ ] }),
1038
+ /* @__PURE__ */ i("div", { className: t.domainBlock, children: [
1039
+ /* @__PURE__ */ a("div", { className: t.domainBlockTitle, children: "📌 蒸馏提案" }),
1040
+ Ie.length === 0 ? /* @__PURE__ */ a("div", { className: t.domainEmpty, children: "还没有提案(聊天中沉淀的需求/设计提案会出现在这里)" }) : /* @__PURE__ */ a("div", { className: t.domainList, children: Ie.map((e, s) => {
1041
+ let N = {};
1042
+ try {
1043
+ N = JSON.parse(String(e.payload ?? "{}"));
1044
+ } catch {
1045
+ }
1046
+ const C = String(e.proposal_type ?? "requirement");
1047
+ return /* @__PURE__ */ i("div", { className: t.domainRow, children: [
1048
+ /* @__PURE__ */ i("span", { className: t.domainName, children: [
1049
+ /* @__PURE__ */ a(R, { className: t.reqTag, color: C === "design" ? "geekblue" : "blue", children: C }),
1050
+ String(N.title ?? "")
1051
+ ] }),
1052
+ /* @__PURE__ */ a("span", { className: t.domainDesc, children: String(N.description ?? "") })
1053
+ ] }, String(e.id ?? s));
1054
+ }) })
1055
+ ] })
1056
+ ] })
1057
+ ] }) : x == null ? /* @__PURE__ */ a("div", { className: t.centerFill, children: /* @__PURE__ */ a(pe, {}) }) : /* @__PURE__ */ a("div", { className: t.renderArea, children: u === "design" ? (
1058
+ /* 设计稿:raw 通常为 HTML → iframe srcdoc 渲染 */
1059
+ /* @__PURE__ */ a(
1060
+ "iframe",
1061
+ {
1062
+ className: t.renderIframe,
1063
+ srcDoc: x,
1064
+ title: M,
1065
+ sandbox: "allow-scripts allow-same-origin"
1066
+ }
1067
+ )
1068
+ ) : /* @__PURE__ */ a("pre", { className: t.renderCode, children: x || "(空文件)" }) }) }),
1069
+ /* @__PURE__ */ a("aside", { className: t.right, children: Oe === "list" ? /* @__PURE__ */ i("div", { className: t.chatSide, children: [
1070
+ /* @__PURE__ */ i("div", { className: t.chatSideHeader, children: [
1071
+ /* @__PURE__ */ i("span", { className: t.chatSideTitle, children: [
1072
+ /* @__PURE__ */ a(pt, {}),
1073
+ " 聊天组"
1074
+ ] }),
1075
+ /* @__PURE__ */ i(
1076
+ W,
1077
+ {
1078
+ size: "small",
1079
+ type: "primary",
1080
+ ghost: !0,
1081
+ loading: Z,
1082
+ onClick: tt,
1083
+ children: [
1084
+ /* @__PURE__ */ a(ut, {}),
1085
+ " 发起聊天"
1086
+ ]
1087
+ }
1088
+ )
1089
+ ] }),
1090
+ /* @__PURE__ */ a("div", { className: t.chatGroupList, children: $.length === 0 ? /* @__PURE__ */ a(y, { image: y.PRESENTED_IMAGE_SIMPLE, description: "还没有聊天组,点「发起聊天」开始" }) : $.map((e) => /* @__PURE__ */ i(
1091
+ "div",
1092
+ {
1093
+ className: `${t.chatGroupRow} ${Ae === e.id ? t.chatGroupRowActive : ""}`,
1094
+ onClick: () => !Z && ye(e),
1095
+ children: [
1096
+ /* @__PURE__ */ a("span", { className: t.chatGroupName, title: e.name, children: e.name }),
1097
+ /* @__PURE__ */ a("span", { className: t.chatGroupTime, children: String(e.createTime ?? "").slice(5, 16).replace("T", " ") })
1098
+ ]
1099
+ },
1100
+ e.id
1101
+ )) })
1102
+ ] }) : /* @__PURE__ */ i("div", { className: t.chatPane, children: [
1103
+ /* @__PURE__ */ i("div", { className: t.chatPaneHeader, children: [
1104
+ /* @__PURE__ */ a(
1105
+ "button",
1106
+ {
1107
+ type: "button",
1108
+ className: t.backBtn,
1109
+ onClick: () => {
1110
+ ee("list"), S.current !== void 0 && B.setState({ currentProject: S.current }), S.current = void 0;
1111
+ },
1112
+ title: "返回聊天组列表",
1113
+ children: "←"
1114
+ }
1115
+ ),
1116
+ /* @__PURE__ */ i("span", { className: t.chatPaneTitle, children: [
1117
+ "群聊 · ",
1118
+ (l == null ? void 0 : l.name) || d
1119
+ ] })
1120
+ ] }),
1121
+ /* @__PURE__ */ a("div", { className: t.chatPaneBody, children: /* @__PURE__ */ a(ht, { hideTabs: !0 }) })
1122
+ ] }) })
1123
+ ] }) : F === "architecture" ? (
1124
+ /* ═══ 架构全景:架构语言的表达面 ═══ */
1125
+ /* @__PURE__ */ a(ga, {})
1126
+ ) : (
1127
+ /* ═══ 产品库视图:全宽产品卡片网格,点卡片直接进入 ═══ */
1128
+ /* @__PURE__ */ i("div", { className: t.libraryView, children: [
1129
+ /* @__PURE__ */ i("div", { className: t.libraryHeader, children: [
1130
+ /* @__PURE__ */ i("div", { children: [
1131
+ /* @__PURE__ */ i("div", { className: t.viewTabs, children: [
1132
+ /* @__PURE__ */ a(
1133
+ "button",
1134
+ {
1135
+ type: "button",
1136
+ className: `${t.viewTab} ${F === "library" ? t.viewTabActive : ""}`,
1137
+ onClick: () => g("library"),
1138
+ children: "🗂 产品库"
1139
+ }
1140
+ ),
1141
+ /* @__PURE__ */ a(
1142
+ "button",
1143
+ {
1144
+ type: "button",
1145
+ className: `${t.viewTab} ${F === "architecture" ? t.viewTabActive : ""}`,
1146
+ onClick: () => g("architecture"),
1147
+ title: "租户下所有产品的架构关系(产品↔产品、产品↔中间件)",
1148
+ children: "🕸 架构全景"
1149
+ }
1150
+ )
1151
+ ] }),
1152
+ /* @__PURE__ */ a("h2", { className: t.libraryTitle, children: "产品库" }),
1153
+ /* @__PURE__ */ a("p", { className: t.librarySubtitle, children: "选择产品进入工作区:文件 · 设计稿 · 群聊 · 应用群" }),
1154
+ /* @__PURE__ */ i("div", { className: t.groupChips, children: [
1155
+ /* @__PURE__ */ a(
1156
+ "button",
1157
+ {
1158
+ type: "button",
1159
+ className: `${t.groupChip} ${K === null ? t.groupChipActive : ""}`,
1160
+ onClick: () => ke(null),
1161
+ children: "全部"
1162
+ }
1163
+ ),
1164
+ _e.map((e) => /* @__PURE__ */ a(
1165
+ "button",
1166
+ {
1167
+ type: "button",
1168
+ className: `${t.groupChip} ${K === e.groupCode ? t.groupChipActive : ""}`,
1169
+ onClick: () => ke(e.groupCode),
1170
+ title: e.description || e.name,
1171
+ children: e.name
1172
+ },
1173
+ e.groupCode
1174
+ )),
1175
+ /* @__PURE__ */ i("span", { className: t.groupNewHint, children: [
1176
+ /* @__PURE__ */ a(
1177
+ O,
1178
+ {
1179
+ size: "small",
1180
+ placeholder: "新群码",
1181
+ value: q.groupCode,
1182
+ onChange: (e) => Ne((s) => ({ ...s, groupCode: e.target.value })),
1183
+ style: { width: 96 }
1184
+ }
1185
+ ),
1186
+ /* @__PURE__ */ a(
1187
+ O,
1188
+ {
1189
+ size: "small",
1190
+ placeholder: "群名",
1191
+ value: q.name,
1192
+ onChange: (e) => Ne((s) => ({ ...s, name: e.target.value })),
1193
+ style: { width: 110 }
1194
+ }
1195
+ ),
1196
+ /* @__PURE__ */ a(
1197
+ "button",
1198
+ {
1199
+ type: "button",
1200
+ className: t.groupAddBtn,
1201
+ onClick: () => void Ze(),
1202
+ title: "新建产品群",
1203
+ children: "+"
1204
+ }
1205
+ )
1206
+ ] })
1207
+ ] })
1208
+ ] }),
1209
+ /* @__PURE__ */ a(
1210
+ O,
1211
+ {
1212
+ prefix: /* @__PURE__ */ a(lt, {}),
1213
+ placeholder: "搜索产品",
1214
+ value: h,
1215
+ onChange: (e) => X(e.target.value),
1216
+ allowClear: !0,
1217
+ className: t.librarySearch
1218
+ }
1219
+ )
1220
+ ] }),
1221
+ /* @__PURE__ */ a("div", { className: t.libraryBody, children: f ? /* @__PURE__ */ a("div", { className: t.centerFill, children: /* @__PURE__ */ a(pe, {}) }) : Be.length === 0 ? /* @__PURE__ */ a(y, { image: y.PRESENTED_IMAGE_SIMPLE, description: "暂无产品" }) : /* @__PURE__ */ a("div", { className: t.productGrid, children: Be.map((e) => /* @__PURE__ */ i(
1222
+ "button",
1223
+ {
1224
+ type: "button",
1225
+ className: t.productCard,
1226
+ onClick: () => void ge(e.productCode),
1227
+ children: [
1228
+ /* @__PURE__ */ a("span", { className: t.cardCode, children: e.productCode }),
1229
+ /* @__PURE__ */ a("span", { className: t.cardName, title: e.name, children: e.name }),
1230
+ /* @__PURE__ */ a("span", { className: t.cardDesc, children: e.description || "暂无产品描述" }),
1231
+ /* @__PURE__ */ i("span", { className: t.cardFoot, children: [
1232
+ /* @__PURE__ */ i("span", { className: t.cardEnter, children: [
1233
+ "进入产品 ",
1234
+ /* @__PURE__ */ a(dt, {})
1235
+ ] }),
1236
+ Ge(e.groupCode) && /* @__PURE__ */ a("span", { className: t.cardGroup, children: Ge(e.groupCode) }),
1237
+ e.status && /* @__PURE__ */ a(R, { className: t.cardTag, children: e.status })
1238
+ ] })
1239
+ ]
1240
+ },
1241
+ e.productCode
1242
+ )) }) })
1243
+ ] })
1244
+ ) });
1245
+ }
1246
+ export {
1247
+ Ti as default
1248
+ };