@yuku123/z-team-component 0.2.140 → 0.2.141
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{AdminModuleContent-DDB35gOh.js → AdminModuleContent-FFU5MUjw.js} +10526 -10697
- package/dist/{ChangeLogView-AKOZ6Ski.js → ChangeLogView-C5v5uT8L.js} +1 -1
- package/dist/{ComponentDoc-SiXXhka1.js → ComponentDoc-DnZq0_Rk.js} +1318 -1313
- package/dist/{InvitationManagementPage-CRbABOKe.js → InvitationManagementPage-dEBNe9_s.js} +1 -1
- package/dist/{OnboardingPage-BNJopRYO.js → OnboardingPage-BW8WhBg5.js} +2 -2
- package/dist/ScheduledTasks-BaZ0_klE.js +12024 -0
- package/dist/SystemShell-I7vWo1XG.js +858 -0
- package/dist/{admin-logs-B3IxooG2.js → admin-logs-BDPC3Q_Y.js} +5 -5
- package/dist/{api-DmBlT5MH.js → api-BJ5jPWNm.js} +1 -1
- package/dist/{api-DW8nsucC.js → api-U9U4zzq_.js} +1 -1
- package/dist/createWorkspaceWsHandler-B6TdD0Oz.js +11757 -0
- package/dist/{index-DCAO83Wb.js → index-BGZV4U3S.js} +1325 -1187
- package/dist/{index-Hv2KDG7i.js → index-BPEfgkzE.js} +3 -3
- package/dist/{index-VmRWH4U5.js → index-BXaJSMd0.js} +9 -9
- package/dist/{index-C1nr0UeB.js → index-Bfw6OE5L.js} +19 -20
- package/dist/index-BlDMnzJF.js +18 -0
- package/dist/{index-BBLRGBWu.js → index-BmlFIrWx.js} +1 -1
- package/dist/{index-C7DSDopw.js → index-BwhK44Dc.js} +26 -27
- package/dist/{index-l9KH8r7F.js → index-CP5raaOW.js} +780 -792
- package/dist/{index-CvHMXrAD.js → index-CPpqideA.js} +1 -1
- package/dist/{index-C24QsGsG.js → index-CToJEufJ.js} +1 -1
- package/dist/{index-CJ7dJejJ.js → index-CVgvlDAT.js} +17 -17
- package/dist/{index-BSqUODiN.js → index-CmzTSdmD.js} +30 -31
- package/dist/{index-BV64kKse.js → index-CsNtBWH-.js} +2 -2
- package/dist/index-DIv1OJ_2.js +1840 -0
- package/dist/{index-Du95tdVf.js → index-DKUg7Evq.js} +28 -29
- package/dist/{index-DULYXalY.js → index-DSXVCDf7.js} +9 -9
- package/dist/{index-CXjen4Gx.js → index-Dd5RE_0a.js} +342 -389
- package/dist/index-DuZrrpXt.js +1298 -0
- package/dist/{index-D-G4mbxH.js → index-Gn0zdd5m.js} +2 -2
- package/dist/index-WWGxF0UX.js +136 -0
- package/dist/{index-DHrMSEVJ.js → index-XTNGZnrF.js} +1 -1
- package/dist/{index-D7thpI99.js → index-XgaiU13i.js} +1 -1
- package/dist/{index-DjbLq5lI.js → index-d6RIzlsj.js} +2 -2
- package/dist/{index-DDOfdrn4.js → index-kjli87DO.js} +3895 -3964
- package/dist/{index-D440bEgm.js → index-mDjl3m2W.js} +198 -192
- package/dist/{index-CEoS_jEa.js → index-skl-gjj4.js} +6 -6
- package/dist/index.js +1 -1
- package/dist/instance-D_EP8AQm.js +116 -0
- package/dist/{menuPermission-DxknHmt8.js → menuPermission-Bhnols4v.js} +3 -3
- package/dist/pages.js +1 -1
- package/dist/{send-default-agent-team-message-DYytBtLc.js → send-default-agent-team-message-0RB1pYex.js} +1 -1
- package/dist/{training-CKYPSkUP.js → training-B1eRX8g1.js} +1 -1
- package/dist/{webide-JAalC_Wr.js → webide-C4ThGZzY.js} +1161 -1317
- package/dist/z-team-component.css +1 -1
- package/package.json +4 -4
- package/dist/ScheduledTasks-Cn_CEZ-B.js +0 -12006
- package/dist/SystemShell-B8Tyluzu.js +0 -893
- package/dist/SystemWorkbench.module-DpLM0zgA.js +0 -36
- package/dist/createWorkspaceWsHandler-5MHgQGfJ.js +0 -12902
- package/dist/index-BT4oQJby.js +0 -228
- package/dist/index-DrDFy5jN.js +0 -139
- package/dist/index-DvslXAjT.js +0 -1323
- package/dist/index-NIu3OKHi.js +0 -1868
- package/dist/instance-B4SrJ-BY.js +0 -186
- package/dist/sso-user-DN6kSAc0.js +0 -43
package/dist/index-BT4oQJby.js
DELETED
|
@@ -1,228 +0,0 @@
|
|
|
1
|
-
import { jsxs as l, jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import { useState as L, useMemo as I, useCallback as W, useEffect as O } from "react";
|
|
3
|
-
import { useNavigate as U, useLocation as q } from "react-router-dom";
|
|
4
|
-
import { CodeOutlined as T, DownOutlined as w, RightOutlined as B, AppstoreOutlined as y, HomeOutlined as C, DashboardOutlined as D, TableOutlined as j, DatabaseOutlined as K, RobotOutlined as F, FunctionOutlined as z, ApartmentOutlined as J, EyeOutlined as Q, BranchesOutlined as V, DeploymentUnitOutlined as X, SafetyCertificateOutlined as Y, RocketOutlined as Z } from "@ant-design/icons";
|
|
5
|
-
import ee from "@yuku123/z-lc-component";
|
|
6
|
-
import { f as ne, M as te } from "./menuPermission-DxknHmt8.js";
|
|
7
|
-
import { u as P } from "./ComponentDoc-SiXXhka1.js";
|
|
8
|
-
const re = "_shellWrap_kxkvd_7", ae = "_shell_kxkvd_7", ue = "_productBanner_kxkvd_25", se = "_productBannerLabel_kxkvd_37", ce = "_productBannerName_kxkvd_43", oe = "_productBannerCode_kxkvd_51", ie = "_productBannerBack_kxkvd_56", le = "_sidebar_kxkvd_78", de = "_sidebarHeader_kxkvd_89", me = "_menuList_kxkvd_101", pe = "_menuGroup_kxkvd_108", he = "_menuGroupHeader_kxkvd_113", be = "_menuGroupHeaderOpen_kxkvd_132", ke = "_menuGroupHeaderActive_kxkvd_143", _e = "_menuGroupIcon_kxkvd_147", Se = "_menuGroupLabel_kxkvd_156", Ge = "_menuGroupArrow_kxkvd_161", fe = "_menuSubList_kxkvd_168", ve = "_menuSubItem_kxkvd_175", Ie = "_menuItemOnPath_kxkvd_209", xe = "_menuSubItemPill_kxkvd_230", $e = "_menuSubItemActive_kxkvd_246", Ne = "_menuSubItemIcon_kxkvd_256", Oe = "_menuSubGroup_kxkvd_272", ye = "_menuSubGroupHeader_kxkvd_277", Ae = "_menuSubGroupHeaderOpen_kxkvd_304", He = "_menuSubGroupHeaderActive_kxkvd_314", Le = "_menuSubGroupLabel_kxkvd_331", we = "_main_kxkvd_351", r = {
|
|
9
|
-
shellWrap: re,
|
|
10
|
-
shell: ae,
|
|
11
|
-
productBanner: ue,
|
|
12
|
-
productBannerLabel: se,
|
|
13
|
-
productBannerName: ce,
|
|
14
|
-
productBannerCode: oe,
|
|
15
|
-
productBannerBack: ie,
|
|
16
|
-
sidebar: le,
|
|
17
|
-
sidebarHeader: de,
|
|
18
|
-
menuList: me,
|
|
19
|
-
menuGroup: pe,
|
|
20
|
-
menuGroupHeader: he,
|
|
21
|
-
menuGroupHeaderOpen: be,
|
|
22
|
-
menuGroupHeaderActive: ke,
|
|
23
|
-
menuGroupIcon: _e,
|
|
24
|
-
menuGroupLabel: Se,
|
|
25
|
-
menuGroupArrow: Ge,
|
|
26
|
-
menuSubList: fe,
|
|
27
|
-
menuSubItem: ve,
|
|
28
|
-
menuItemOnPath: Ie,
|
|
29
|
-
menuSubItemPill: xe,
|
|
30
|
-
menuSubItemActive: $e,
|
|
31
|
-
menuSubItemIcon: Ne,
|
|
32
|
-
menuSubGroup: Oe,
|
|
33
|
-
menuSubGroupHeader: ye,
|
|
34
|
-
menuSubGroupHeaderOpen: Ae,
|
|
35
|
-
menuSubGroupHeaderActive: He,
|
|
36
|
-
menuSubGroupLabel: Le,
|
|
37
|
-
main: we
|
|
38
|
-
}, f = "/lc", Be = /* @__PURE__ */ new Set(["apps", "designer", "db-import", "admin", "docs"]);
|
|
39
|
-
function Pe(n, a) {
|
|
40
|
-
if (!n.startsWith(f)) return null;
|
|
41
|
-
const c = n.slice(f.length).replace(/^\//, "").split("/").filter(Boolean);
|
|
42
|
-
return c[0] === "designer" && c[1] ? c[1] : c[0] && !Be.has(c[0]) ? c[0] : new URLSearchParams(a.startsWith("?") ? a.slice(1) : a).get("appCode") || null;
|
|
43
|
-
}
|
|
44
|
-
function ge(n) {
|
|
45
|
-
const a = `?appCode=${encodeURIComponent(n)}`;
|
|
46
|
-
return [
|
|
47
|
-
{ key: `${n}:overview`, label: "应用概览", icon: /* @__PURE__ */ e(C, {}), path: n },
|
|
48
|
-
{ key: `${n}:dashboard`, label: "仪表盘", icon: /* @__PURE__ */ e(D, {}), path: `${n}/dashboard` },
|
|
49
|
-
{ key: `${n}:designer`, label: "Schema 设计器", icon: /* @__PURE__ */ e(j, {}), path: `designer/${n}` },
|
|
50
|
-
{ key: `${n}:db-import`, label: "从数据库导入", icon: /* @__PURE__ */ e(K, {}), path: `db-import${a}` },
|
|
51
|
-
{ key: `${n}:ai`, label: "AI 建模", icon: /* @__PURE__ */ e(F, {}), path: `admin/ai${a}` },
|
|
52
|
-
{ key: `${n}:dicts`, label: "数据字典", icon: /* @__PURE__ */ e(z, {}), path: `admin/dicts${a}` },
|
|
53
|
-
{ key: `${n}:relations`, label: "实体关系", icon: /* @__PURE__ */ e(J, {}), path: `admin/relations${a}` },
|
|
54
|
-
{ key: `${n}:views`, label: "视图配置", icon: /* @__PURE__ */ e(Q, {}), path: `admin/views${a}` },
|
|
55
|
-
{ key: `${n}:pipelines`, label: "Pipeline", icon: /* @__PURE__ */ e(V, {}), path: `admin/pipelines${a}` },
|
|
56
|
-
{ key: `${n}:workflows`, label: "流程绑定", icon: /* @__PURE__ */ e(X, {}), path: `admin/workflows${a}` },
|
|
57
|
-
{ key: `${n}:permissions`, label: "权限矩阵", icon: /* @__PURE__ */ e(Y, {}), path: `admin/permissions${a}`, permission: "PERMISSION_MANAGE" },
|
|
58
|
-
{ key: `${n}:deployments`, label: "部署记录", icon: /* @__PURE__ */ e(Z, {}), path: `admin/deployments${a}` }
|
|
59
|
-
];
|
|
60
|
-
}
|
|
61
|
-
function Ee(n) {
|
|
62
|
-
const a = [
|
|
63
|
-
{ key: "apps", label: "应用列表", icon: /* @__PURE__ */ e(y, {}), path: "apps" }
|
|
64
|
-
];
|
|
65
|
-
return n && a.push({
|
|
66
|
-
key: n,
|
|
67
|
-
label: n,
|
|
68
|
-
icon: /* @__PURE__ */ e(y, {}),
|
|
69
|
-
children: ge(n)
|
|
70
|
-
}), [{ title: "应用", icon: /* @__PURE__ */ e(y, {}), items: a }];
|
|
71
|
-
}
|
|
72
|
-
function Me(n, a, o, c) {
|
|
73
|
-
if (!n.path) return !1;
|
|
74
|
-
const d = n.path.indexOf("?"), G = d >= 0 ? n.path.slice(0, d) : n.path;
|
|
75
|
-
return (c ? a === G : a === G || a.startsWith(`${G}/`)) ? d >= 0 ? new URLSearchParams(n.path.slice(d + 1)).get("appCode") === o : !0 : !1;
|
|
76
|
-
}
|
|
77
|
-
function Re(n, a, o, c) {
|
|
78
|
-
if (!a.startsWith(f)) return null;
|
|
79
|
-
const d = a.slice(f.length).replace(/^\//, ""), G = n.flatMap(
|
|
80
|
-
(b) => b.items.flatMap((m) => m.children ? [m, ...m.children] : [m])
|
|
81
|
-
);
|
|
82
|
-
for (const b of [!0, !1])
|
|
83
|
-
for (const m of G)
|
|
84
|
-
if (Me(m, d, c, b)) return m.key;
|
|
85
|
-
return null;
|
|
86
|
-
}
|
|
87
|
-
function Ke() {
|
|
88
|
-
const n = U(), { pathname: a, search: o } = q(), c = P((t) => t.currentUser), d = P((t) => t.permissionState), [G, b] = L(/* @__PURE__ */ new Set()), [m, A] = L(/* @__PURE__ */ new Set()), h = I(() => {
|
|
89
|
-
try {
|
|
90
|
-
const t = new URLSearchParams(o), i = t.get("product");
|
|
91
|
-
return i ? { code: i, name: t.get("productName") || i } : null;
|
|
92
|
-
} catch {
|
|
93
|
-
return null;
|
|
94
|
-
}
|
|
95
|
-
}, [o]), g = W(() => {
|
|
96
|
-
if (!h) return;
|
|
97
|
-
const t = new URLSearchParams();
|
|
98
|
-
t.set("product", h.code), h.name && t.set("productName", h.name), n(`/workspace?mode=product&${t.toString()}`);
|
|
99
|
-
}, [h, n]);
|
|
100
|
-
O(() => {
|
|
101
|
-
a.startsWith("/lc") || n(`/lc/apps${o || ""}`, { replace: !0 });
|
|
102
|
-
}, [a, o, n]);
|
|
103
|
-
const k = I(() => Pe(a, o), [a, o]), $ = I(() => Ee(k), [k]), v = I(
|
|
104
|
-
() => d === "failed" ? $ : ne($, c),
|
|
105
|
-
[$, c, d]
|
|
106
|
-
), p = I(
|
|
107
|
-
() => Re(v, a, o, k),
|
|
108
|
-
[v, a, o, k]
|
|
109
|
-
);
|
|
110
|
-
O(() => {
|
|
111
|
-
k && (b((t) => t.has("应用") ? t : new Set(t).add("应用")), A((t) => t.has(k) ? t : new Set(t).add(k)));
|
|
112
|
-
}, [k]), O(() => {
|
|
113
|
-
p && v.forEach((t) => {
|
|
114
|
-
t.items.some(
|
|
115
|
-
(u) => {
|
|
116
|
-
var s;
|
|
117
|
-
return u.key === p || ((s = u.children) == null ? void 0 : s.some((_) => _.key === p));
|
|
118
|
-
}
|
|
119
|
-
) && b(
|
|
120
|
-
(u) => u.has(t.title) ? u : new Set(u).add(t.title)
|
|
121
|
-
);
|
|
122
|
-
});
|
|
123
|
-
}, [p, v]);
|
|
124
|
-
const E = (t) => {
|
|
125
|
-
b((i) => {
|
|
126
|
-
const u = new Set(i);
|
|
127
|
-
return u.has(t) ? u.delete(t) : u.add(t), u;
|
|
128
|
-
});
|
|
129
|
-
}, M = (t) => {
|
|
130
|
-
A((i) => {
|
|
131
|
-
const u = new Set(i);
|
|
132
|
-
return u.has(t) ? u.delete(t) : u.add(t), u;
|
|
133
|
-
});
|
|
134
|
-
};
|
|
135
|
-
return /* @__PURE__ */ l("div", { className: r.shellWrap, children: [
|
|
136
|
-
h && /* @__PURE__ */ l("div", { className: r.productBanner, children: [
|
|
137
|
-
/* @__PURE__ */ e("span", { className: r.productBannerLabel, children: "📦 当前产品" }),
|
|
138
|
-
/* @__PURE__ */ e("span", { className: r.productBannerName, title: h.name, children: h.name }),
|
|
139
|
-
/* @__PURE__ */ e("span", { className: r.productBannerCode, children: h.code }),
|
|
140
|
-
/* @__PURE__ */ e("button", { type: "button", className: r.productBannerBack, onClick: g, children: "← 返回产品工作台" })
|
|
141
|
-
] }),
|
|
142
|
-
/* @__PURE__ */ l("div", { className: r.shell, children: [
|
|
143
|
-
/* @__PURE__ */ l("aside", { className: r.sidebar, children: [
|
|
144
|
-
/* @__PURE__ */ l("div", { className: r.sidebarHeader, children: [
|
|
145
|
-
/* @__PURE__ */ e(T, {}),
|
|
146
|
-
/* @__PURE__ */ e("span", { children: "研发工作台" })
|
|
147
|
-
] }),
|
|
148
|
-
/* @__PURE__ */ e(te, {}),
|
|
149
|
-
/* @__PURE__ */ e("nav", { className: r.menuList, children: v.map((t) => {
|
|
150
|
-
const i = G.has(t.title), u = p ? t.items.findIndex(
|
|
151
|
-
(s) => {
|
|
152
|
-
var _;
|
|
153
|
-
return s.key === p || ((_ = s.children) == null ? void 0 : _.some((x) => x.key === p));
|
|
154
|
-
}
|
|
155
|
-
) : -1;
|
|
156
|
-
return /* @__PURE__ */ l("div", { className: r.menuGroup, children: [
|
|
157
|
-
/* @__PURE__ */ l(
|
|
158
|
-
"div",
|
|
159
|
-
{
|
|
160
|
-
className: `${r.menuGroupHeader} ${i ? r.menuGroupHeaderOpen : ""} ${u >= 0 ? r.menuGroupHeaderActive : ""}`,
|
|
161
|
-
onClick: () => E(t.title),
|
|
162
|
-
children: [
|
|
163
|
-
/* @__PURE__ */ e("span", { className: r.menuGroupIcon, children: t.icon }),
|
|
164
|
-
/* @__PURE__ */ e("span", { className: r.menuGroupLabel, children: t.title }),
|
|
165
|
-
/* @__PURE__ */ e("span", { className: r.menuGroupArrow, children: i ? /* @__PURE__ */ e(w, {}) : /* @__PURE__ */ e(B, {}) })
|
|
166
|
-
]
|
|
167
|
-
}
|
|
168
|
-
),
|
|
169
|
-
i && /* @__PURE__ */ e("ul", { className: r.menuSubList, children: t.items.map((s, _) => {
|
|
170
|
-
const x = u >= 0 && _ <= u;
|
|
171
|
-
if (!s.children)
|
|
172
|
-
return /* @__PURE__ */ e(
|
|
173
|
-
"li",
|
|
174
|
-
{
|
|
175
|
-
className: `${r.menuSubItem} ${x ? r.menuItemOnPath : ""} ${p === s.key ? r.menuSubItemActive : ""}`,
|
|
176
|
-
onClick: () => s.path && n(`${f}/${s.path}`),
|
|
177
|
-
children: /* @__PURE__ */ l("div", { className: r.menuSubItemPill, children: [
|
|
178
|
-
/* @__PURE__ */ e("span", { className: r.menuSubItemIcon, children: s.icon }),
|
|
179
|
-
/* @__PURE__ */ e("span", { children: s.label })
|
|
180
|
-
] })
|
|
181
|
-
},
|
|
182
|
-
s.key
|
|
183
|
-
);
|
|
184
|
-
const N = m.has(s.key), H = u === _ ? s.children.findIndex((S) => S.key === p) : -1;
|
|
185
|
-
return /* @__PURE__ */ l(
|
|
186
|
-
"li",
|
|
187
|
-
{
|
|
188
|
-
className: `${r.menuSubGroup} ${x ? r.menuItemOnPath : ""}`,
|
|
189
|
-
children: [
|
|
190
|
-
/* @__PURE__ */ l(
|
|
191
|
-
"div",
|
|
192
|
-
{
|
|
193
|
-
className: `${r.menuSubGroupHeader} ${N ? r.menuSubGroupHeaderOpen : ""} ${u === _ ? r.menuSubGroupHeaderActive : ""}`,
|
|
194
|
-
onClick: () => M(s.key),
|
|
195
|
-
children: [
|
|
196
|
-
/* @__PURE__ */ e("span", { className: r.menuGroupIcon, children: s.icon }),
|
|
197
|
-
/* @__PURE__ */ e("span", { className: r.menuSubGroupLabel, children: s.label }),
|
|
198
|
-
/* @__PURE__ */ e("span", { className: r.menuGroupArrow, children: N ? /* @__PURE__ */ e(w, {}) : /* @__PURE__ */ e(B, {}) })
|
|
199
|
-
]
|
|
200
|
-
}
|
|
201
|
-
),
|
|
202
|
-
N && /* @__PURE__ */ e("ul", { className: r.menuSubList, children: s.children.map((S, R) => /* @__PURE__ */ e(
|
|
203
|
-
"li",
|
|
204
|
-
{
|
|
205
|
-
className: `${r.menuSubItem} ${H >= 0 && R <= H ? r.menuItemOnPath : ""} ${p === S.key ? r.menuSubItemActive : ""}`,
|
|
206
|
-
onClick: () => S.path && n(`${f}/${S.path}`),
|
|
207
|
-
children: /* @__PURE__ */ l("div", { className: r.menuSubItemPill, children: [
|
|
208
|
-
/* @__PURE__ */ e("span", { className: r.menuSubItemIcon, children: S.icon }),
|
|
209
|
-
/* @__PURE__ */ e("span", { children: S.label })
|
|
210
|
-
] })
|
|
211
|
-
},
|
|
212
|
-
S.key
|
|
213
|
-
)) })
|
|
214
|
-
]
|
|
215
|
-
},
|
|
216
|
-
s.key
|
|
217
|
-
);
|
|
218
|
-
}) })
|
|
219
|
-
] }, t.title);
|
|
220
|
-
}) })
|
|
221
|
-
] }),
|
|
222
|
-
/* @__PURE__ */ e("main", { className: r.main, children: /* @__PURE__ */ e(ee, {}) })
|
|
223
|
-
] })
|
|
224
|
-
] });
|
|
225
|
-
}
|
|
226
|
-
export {
|
|
227
|
-
Ke as default
|
|
228
|
-
};
|
package/dist/index-DrDFy5jN.js
DELETED
|
@@ -1,139 +0,0 @@
|
|
|
1
|
-
import { jsxs as c, jsx as n } from "react/jsx-runtime";
|
|
2
|
-
import N, { useMemo as h, useState as v, useEffect as I } from "react";
|
|
3
|
-
import { BulbOutlined as x, DownOutlined as H, RightOutlined as A, AppstoreOutlined as $, BookOutlined as L, CodeOutlined as O } from "@ant-design/icons";
|
|
4
|
-
import { useNavigate as g, useLocation as w } from "react-router-dom";
|
|
5
|
-
import { menuSections as C, menuItems as P, appMeta as T, routes as E } from "@yuku123/z-cognition-component/pages";
|
|
6
|
-
import { menuItems as M, appMeta as R, routes as z } from "@yuku123/z-cognition-kb-component/pages";
|
|
7
|
-
import { menuItems as U, routes as W } from "@yuku123/z-cognition-indexer-component/pages";
|
|
8
|
-
const j = "_shell_k84qx_6", B = "_sidebar_k84qx_15", D = "_sidebarHeader_k84qx_26", K = "_sidebarHeaderIcon_k84qx_37", Z = "_menuList_k84qx_41", F = "_menuGroup_k84qx_48", J = "_menuGroupHeader_k84qx_53", Q = "_menuGroupHeaderOpen_k84qx_72", V = "_menuGroupHeaderActive_k84qx_83", X = "_menuGroupIcon_k84qx_87", Y = "_menuGroupLabel_k84qx_96", ee = "_menuGroupArrow_k84qx_101", ne = "_menuSubList_k84qx_107", te = "_menuSubItem_k84qx_114", se = "_menuItemOnPath_k84qx_147", oe = "_menuSubItemPill_k84qx_168", ue = "_menuSubItemActive_k84qx_184", me = "_menuSubItemIcon_k84qx_194", re = "_main_k84qx_210", ae = "_empty_k84qx_219", ce = "_emptyIcon_k84qx_229", ie = "_emptyText_k84qx_233", e = {
|
|
9
|
-
shell: j,
|
|
10
|
-
sidebar: B,
|
|
11
|
-
sidebarHeader: D,
|
|
12
|
-
sidebarHeaderIcon: K,
|
|
13
|
-
menuList: Z,
|
|
14
|
-
menuGroup: F,
|
|
15
|
-
menuGroupHeader: J,
|
|
16
|
-
menuGroupHeaderOpen: Q,
|
|
17
|
-
menuGroupHeaderActive: V,
|
|
18
|
-
menuGroupIcon: X,
|
|
19
|
-
menuGroupLabel: Y,
|
|
20
|
-
menuGroupArrow: ee,
|
|
21
|
-
menuSubList: ne,
|
|
22
|
-
menuSubItem: te,
|
|
23
|
-
menuItemOnPath: se,
|
|
24
|
-
menuSubItemPill: oe,
|
|
25
|
-
menuSubItemActive: ue,
|
|
26
|
-
menuSubItemIcon: me,
|
|
27
|
-
main: re,
|
|
28
|
-
empty: ae,
|
|
29
|
-
emptyIcon: ce,
|
|
30
|
-
emptyText: ie
|
|
31
|
-
}, i = [
|
|
32
|
-
{ title: "知识管理", icon: /* @__PURE__ */ n(L, {}), items: M },
|
|
33
|
-
...C || [
|
|
34
|
-
{ title: "业务认知", icon: /* @__PURE__ */ n(x, {}), items: P }
|
|
35
|
-
],
|
|
36
|
-
// 代码索引(2026-11-10 归纳):z-cognition 代码索引板块(原独立仓 z-indexer,收购后
|
|
37
|
-
// npm 包随之改名 @yuku123/z-cognition-indexer-component)前台四页,
|
|
38
|
-
// 与 admin「知识沉淀 → 知识认知 → 代码认知」同口径:前台查、后台管。
|
|
39
|
-
{ title: "代码索引", icon: /* @__PURE__ */ n(O, {}), items: U }
|
|
40
|
-
], b = [
|
|
41
|
-
...z,
|
|
42
|
-
...E,
|
|
43
|
-
...W
|
|
44
|
-
], le = "/z-kb/dashboard";
|
|
45
|
-
function de(u) {
|
|
46
|
-
const o = u.replace(/[.+^${}()|[\]\\]/g, "\\$&");
|
|
47
|
-
return new RegExp(
|
|
48
|
-
`^${o.replace(/:[A-Za-z0-9_]+\*/g, "(?:/.*)?").replace(/:[A-Za-z0-9_]+/g, "[^/]+")}$`
|
|
49
|
-
);
|
|
50
|
-
}
|
|
51
|
-
function pe(u) {
|
|
52
|
-
const o = b.find((t) => t.path === u);
|
|
53
|
-
if (o != null && o.Component) return o.Component;
|
|
54
|
-
for (const t of b)
|
|
55
|
-
if (t.Component) {
|
|
56
|
-
if (t.path.includes(":")) {
|
|
57
|
-
if (de(t.path).test(u)) return t.Component;
|
|
58
|
-
} else if (u.startsWith(t.path + "/"))
|
|
59
|
-
return t.Component;
|
|
60
|
-
}
|
|
61
|
-
return null;
|
|
62
|
-
}
|
|
63
|
-
function k(u) {
|
|
64
|
-
for (const o of i)
|
|
65
|
-
for (const t of o.items)
|
|
66
|
-
if (u === t.key || u.startsWith(t.key + "/")) return t.key;
|
|
67
|
-
return null;
|
|
68
|
-
}
|
|
69
|
-
function Se() {
|
|
70
|
-
var p, _;
|
|
71
|
-
const u = g(), { pathname: o } = w(), t = h(() => k(o), [o]), [f, l] = v(/* @__PURE__ */ new Set());
|
|
72
|
-
I(() => {
|
|
73
|
-
t && i.forEach((s) => {
|
|
74
|
-
s.items.some((m) => m.key === t) && l(
|
|
75
|
-
(m) => m.has(s.title) ? m : new Set(m).add(s.title)
|
|
76
|
-
);
|
|
77
|
-
});
|
|
78
|
-
}, [t]);
|
|
79
|
-
const S = (s) => {
|
|
80
|
-
l((m) => {
|
|
81
|
-
const r = new Set(m);
|
|
82
|
-
return r.has(s) ? r.delete(s) : r.add(s), r;
|
|
83
|
-
});
|
|
84
|
-
};
|
|
85
|
-
I(() => {
|
|
86
|
-
if (!k(o)) {
|
|
87
|
-
const { search: s } = window.location;
|
|
88
|
-
u(`${le}${s || ""}`, { replace: !0 });
|
|
89
|
-
}
|
|
90
|
-
}, [o, u]);
|
|
91
|
-
const d = h(() => pe(o), [o]);
|
|
92
|
-
return /* @__PURE__ */ c("div", { className: e.shell, children: [
|
|
93
|
-
/* @__PURE__ */ c("aside", { className: e.sidebar, children: [
|
|
94
|
-
/* @__PURE__ */ c("div", { className: e.sidebarHeader, children: [
|
|
95
|
-
/* @__PURE__ */ n("span", { className: e.sidebarHeaderIcon, children: /* @__PURE__ */ n(x, {}) }),
|
|
96
|
-
/* @__PURE__ */ n("span", { children: ((p = R) == null ? void 0 : p.title) ?? ((_ = T) == null ? void 0 : _.title) ?? "知识工作台" })
|
|
97
|
-
] }),
|
|
98
|
-
/* @__PURE__ */ n("nav", { className: e.menuList, children: i.map((s) => {
|
|
99
|
-
const m = f.has(s.title), r = t ? s.items.findIndex((a) => a.key === t) : -1;
|
|
100
|
-
return /* @__PURE__ */ c("div", { className: e.menuGroup, children: [
|
|
101
|
-
/* @__PURE__ */ c(
|
|
102
|
-
"div",
|
|
103
|
-
{
|
|
104
|
-
className: `${e.menuGroupHeader} ${m ? e.menuGroupHeaderOpen : ""} ${r >= 0 ? e.menuGroupHeaderActive : ""}`,
|
|
105
|
-
onClick: () => S(s.title),
|
|
106
|
-
children: [
|
|
107
|
-
/* @__PURE__ */ n("span", { className: e.menuGroupIcon, children: s.icon }),
|
|
108
|
-
/* @__PURE__ */ n("span", { className: e.menuGroupLabel, children: s.title }),
|
|
109
|
-
/* @__PURE__ */ n("span", { className: e.menuGroupArrow, children: m ? /* @__PURE__ */ n(H, {}) : /* @__PURE__ */ n(A, {}) })
|
|
110
|
-
]
|
|
111
|
-
}
|
|
112
|
-
),
|
|
113
|
-
m && /* @__PURE__ */ n("ul", { className: e.menuSubList, children: s.items.map((a, G) => {
|
|
114
|
-
const y = r >= 0 && G <= r, q = t === a.key;
|
|
115
|
-
return /* @__PURE__ */ n(
|
|
116
|
-
"li",
|
|
117
|
-
{
|
|
118
|
-
className: `${e.menuSubItem} ${y ? e.menuItemOnPath : ""} ${q ? e.menuSubItemActive : ""}`,
|
|
119
|
-
onClick: () => u(a.key),
|
|
120
|
-
children: /* @__PURE__ */ c("div", { className: e.menuSubItemPill, children: [
|
|
121
|
-
a.icon ? /* @__PURE__ */ n("span", { className: e.menuSubItemIcon, children: a.icon }) : null,
|
|
122
|
-
/* @__PURE__ */ n("span", { children: a.label })
|
|
123
|
-
] })
|
|
124
|
-
},
|
|
125
|
-
a.key
|
|
126
|
-
);
|
|
127
|
-
}) })
|
|
128
|
-
] }, s.title);
|
|
129
|
-
}) })
|
|
130
|
-
] }),
|
|
131
|
-
/* @__PURE__ */ n("main", { className: e.main, children: d ? /* @__PURE__ */ n(N.Suspense, { fallback: /* @__PURE__ */ n("div", { className: e.emptyText, children: "加载中…" }), children: /* @__PURE__ */ n(d, {}) }) : /* @__PURE__ */ c("div", { className: e.empty, children: [
|
|
132
|
-
/* @__PURE__ */ n("div", { className: e.emptyIcon, children: /* @__PURE__ */ n($, {}) }),
|
|
133
|
-
/* @__PURE__ */ n("div", { className: e.emptyText, children: "请从左侧选择认知模块" })
|
|
134
|
-
] }) })
|
|
135
|
-
] });
|
|
136
|
-
}
|
|
137
|
-
export {
|
|
138
|
-
Se as default
|
|
139
|
-
};
|