@yuku123/z-team-component 0.2.133 → 0.2.135
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/{index-BkzBYfhO.js → AdminModuleContent-DHCn4OpR.js} +13552 -14053
- package/dist/{ChangeLogView-SwacGpsw.js → ChangeLogView-Cc5cYmcz.js} +1 -1
- package/dist/{ComponentDoc-Dh5YhLCI.js → ComponentDoc-BAUII4UZ.js} +707 -713
- package/dist/{InvitationManagementPage-CjEcLOGB.js → InvitationManagementPage-BgY1jxQB.js} +1 -1
- package/dist/{OnboardingPage-DvNt71kX.js → OnboardingPage-CckzpaI0.js} +2 -2
- package/dist/{ScheduledTasks-COgb4MZJ.js → ScheduledTasks-DZSEnuIF.js} +6 -6
- package/dist/SystemShell-DCRIL4Rh.js +978 -0
- package/dist/{admin-logs-CExsxQ5h.js → admin-logs-DEawvNOd.js} +1 -1
- package/dist/{api-DXw93E7c.js → api--xHkMnrY.js} +1 -1
- package/dist/{api-C9kTgVc2.js → api-B-nnjGsa.js} +1 -1
- package/dist/{createWorkspaceWsHandler-BwDUTYXH.js → createWorkspaceWsHandler-y6pRWLoa.js} +3 -3
- package/dist/{index-CntZHojY.js → index-4R_QcR8P.js} +2 -2
- package/dist/{index-CXEYA7rt.js → index-B2ztJXV3.js} +2 -2
- package/dist/{index-CF3xDZ7q.js → index-BDUHHaoY.js} +4 -4
- package/dist/{index-BTJ83JLl.js → index-BIffImVM.js} +473 -358
- package/dist/{index-DZ0fYNO9.js → index-C09THX8u.js} +11 -11
- package/dist/{index-B2Dfbi8J.js → index-C4cx5Qxu.js} +2 -2
- package/dist/{index-COobH4Vi.js → index-C7ng_cdZ.js} +1 -1
- package/dist/{index-D2DFKRUf.js → index-C9LqX4Lg.js} +1 -1
- package/dist/{index-DM6XeWFk.js → index-CMLlvrEW.js} +2384 -2417
- package/dist/{index-DLK7DuCr.js → index-COn912sj.js} +3 -3
- package/dist/{index-9rfSVSTh.js → index-CcHrWE4P.js} +2 -2
- package/dist/index-Cxoup7V8.js +139 -0
- package/dist/{index-B3uLo8-F.js → index-CzS_q6Tn.js} +3 -3
- package/dist/{index-Ci6_CBwE.js → index-DWrEAa8-.js} +3 -3
- package/dist/{index-DmV6xR7C.js → index-DePIQVt9.js} +3 -3
- package/dist/index-DlBN-ou4.js +311 -0
- package/dist/{index-ftuPuj0s.js → index-Do3pyigD.js} +1 -1
- package/dist/{index-D_J1ZCy8.js → index-DtgTLML8.js} +3 -3
- package/dist/{index-t2nMJUPu.js → index-DxXcTAH4.js} +1 -1
- package/dist/index-H7hP7Fmj.js +228 -0
- package/dist/{index-Bs9odXxd.js → index-LnUf9Vil.js} +6 -6
- package/dist/{index-DMfYPIkB.js → index-XWWknPNw.js} +2 -2
- package/dist/{index-Ceu-yckM.js → index-frmk-zNf.js} +12 -12
- package/dist/{index-mEgmHNRO.js → index-ztXjGIJk.js} +1 -1
- package/dist/index.js +1 -1
- package/dist/{instance-DD3kbAUh.js → instance-DL4u5k9c.js} +1 -1
- package/dist/{menuPermission-v0881tid.js → menuPermission-CA_atlfk.js} +3 -3
- package/dist/menuTree-Ctcz41N8.js +303 -0
- package/dist/pages.js +1 -1
- package/dist/{send-default-agent-team-message-Cug0T_7J.js → send-default-agent-team-message-BfBVm9AO.js} +1 -1
- package/dist/{sso-user-CnVXqYR7.js → sso-user-Dr8_-Sxd.js} +1 -1
- package/dist/{training-BS23m-yy.js → training-CcGUA5KC.js} +1 -1
- package/dist/{webide-BPJ1IpZq.js → webide-C2JfQ-Je.js} +3 -3
- package/dist/z-team-component.css +1 -1
- package/package.json +2 -1
- package/dist/SystemShell-CSXcsiNp.js +0 -752
- package/dist/index-BNPq7yBg.js +0 -147
- package/dist/index-BoY7L8C4.js +0 -111
- package/dist/index-CU6jFFl5.js +0 -112
- package/dist/index-CZCKpsry.js +0 -607
- package/dist/useSidebarResize--Avuabb1.js +0 -46
package/dist/index-BNPq7yBg.js
DELETED
|
@@ -1,147 +0,0 @@
|
|
|
1
|
-
import { jsxs as o, jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import { useState as I, useMemo as p, useCallback as B, useEffect as L } from "react";
|
|
3
|
-
import { useNavigate as y, useLocation as G } from "react-router-dom";
|
|
4
|
-
import { CodeOutlined as v, DownOutlined as O, RightOutlined as A, AppstoreOutlined as C, TableOutlined as W, DatabaseOutlined as H, RobotOutlined as M, FunctionOutlined as $, ApartmentOutlined as P, EyeOutlined as R, BranchesOutlined as U, DeploymentUnitOutlined as _, SafetyCertificateOutlined as x } from "@ant-design/icons";
|
|
5
|
-
import E from "@yuku123/z-lc-component";
|
|
6
|
-
import { f as D, M as T } from "./menuPermission-v0881tid.js";
|
|
7
|
-
import { u as h } from "./ComponentDoc-Dh5YhLCI.js";
|
|
8
|
-
const j = "_shellWrap_1gpbw_7", K = "_shell_1gpbw_7", q = "_productBanner_1gpbw_25", F = "_productBannerLabel_1gpbw_37", z = "_productBannerName_1gpbw_43", J = "_productBannerCode_1gpbw_51", Q = "_productBannerBack_1gpbw_56", V = "_sidebar_1gpbw_73", X = "_sidebarHeader_1gpbw_84", Y = "_menuList_1gpbw_95", Z = "_menuGroup_1gpbw_101", ee = "_menuGroupHeader_1gpbw_105", ne = "_menuGroupLabel_1gpbw_123", te = "_menuGroupArrow_1gpbw_127", ae = "_menuSubList_1gpbw_132", se = "_menuSubItemWrap_1gpbw_138", re = "_menuSubItem_1gpbw_138", ie = "_menuSubItemActive_1gpbw_159", oe = "_menuSubItemIcon_1gpbw_166", ce = "_menuSubItemLabel_1gpbw_171", ue = "_main_1gpbw_176", t = {
|
|
9
|
-
shellWrap: j,
|
|
10
|
-
shell: K,
|
|
11
|
-
productBanner: q,
|
|
12
|
-
productBannerLabel: F,
|
|
13
|
-
productBannerName: z,
|
|
14
|
-
productBannerCode: J,
|
|
15
|
-
productBannerBack: Q,
|
|
16
|
-
sidebar: V,
|
|
17
|
-
sidebarHeader: X,
|
|
18
|
-
menuList: Y,
|
|
19
|
-
menuGroup: Z,
|
|
20
|
-
menuGroupHeader: ee,
|
|
21
|
-
menuGroupLabel: ne,
|
|
22
|
-
menuGroupArrow: te,
|
|
23
|
-
menuSubList: ae,
|
|
24
|
-
menuSubItemWrap: se,
|
|
25
|
-
menuSubItem: re,
|
|
26
|
-
menuSubItemActive: ie,
|
|
27
|
-
menuSubItemIcon: oe,
|
|
28
|
-
menuSubItemLabel: ce,
|
|
29
|
-
main: ue
|
|
30
|
-
}, m = [
|
|
31
|
-
{
|
|
32
|
-
title: "应用",
|
|
33
|
-
items: [
|
|
34
|
-
{ key: "apps", label: "应用列表", icon: /* @__PURE__ */ e(C, {}), path: "apps" }
|
|
35
|
-
]
|
|
36
|
-
},
|
|
37
|
-
{
|
|
38
|
-
title: "建模",
|
|
39
|
-
items: [
|
|
40
|
-
{ key: "designer", label: "Schema 设计器", icon: /* @__PURE__ */ e(W, {}), path: "designer" },
|
|
41
|
-
{ key: "db-import", label: "从数据库导入", icon: /* @__PURE__ */ e(H, {}), path: "db-import" },
|
|
42
|
-
{ key: "admin-ai", label: "AI 建模", icon: /* @__PURE__ */ e(M, {}), path: "admin/ai" }
|
|
43
|
-
]
|
|
44
|
-
},
|
|
45
|
-
{
|
|
46
|
-
title: "配置",
|
|
47
|
-
items: [
|
|
48
|
-
{ key: "admin-dicts", label: "数据字典", icon: /* @__PURE__ */ e($, {}), path: "admin/dicts" },
|
|
49
|
-
{ key: "admin-relations", label: "实体关系", icon: /* @__PURE__ */ e(P, {}), path: "admin/relations" },
|
|
50
|
-
{ key: "admin-views", label: "视图配置", icon: /* @__PURE__ */ e(R, {}), path: "admin/views" },
|
|
51
|
-
{ key: "admin-pipelines", label: "Pipeline", icon: /* @__PURE__ */ e(U, {}), path: "admin/pipelines" },
|
|
52
|
-
{ key: "admin-workflows", label: "流程绑定", icon: /* @__PURE__ */ e(_, {}), path: "admin/workflows" }
|
|
53
|
-
]
|
|
54
|
-
},
|
|
55
|
-
{
|
|
56
|
-
title: "运行",
|
|
57
|
-
items: [
|
|
58
|
-
{ key: "admin-permissions", label: "权限矩阵", icon: /* @__PURE__ */ e(x, {}), path: "admin/permissions", permission: "PERMISSION_MANAGE" },
|
|
59
|
-
{ key: "admin-deployments", label: "部署记录", icon: /* @__PURE__ */ e(_, {}), path: "admin/deployments" }
|
|
60
|
-
]
|
|
61
|
-
}
|
|
62
|
-
], d = "/lc";
|
|
63
|
-
function le(r) {
|
|
64
|
-
if (!r.startsWith(d)) return null;
|
|
65
|
-
const c = r.slice(d.length).replace(/^\//, "");
|
|
66
|
-
for (const u of m)
|
|
67
|
-
for (const l of u.items)
|
|
68
|
-
if (c === l.path || c.startsWith(`${l.path}/`)) return l.key;
|
|
69
|
-
return null;
|
|
70
|
-
}
|
|
71
|
-
function we() {
|
|
72
|
-
const r = y(), { pathname: c, search: u } = G(), l = h((n) => n.currentUser), b = h((n) => n.permissionState), [S, w] = I(
|
|
73
|
-
new Set(m.map((n) => n.title))
|
|
74
|
-
), s = p(() => {
|
|
75
|
-
try {
|
|
76
|
-
const n = new URLSearchParams(u), i = n.get("product");
|
|
77
|
-
return i ? { code: i, name: n.get("productName") || i } : null;
|
|
78
|
-
} catch {
|
|
79
|
-
return null;
|
|
80
|
-
}
|
|
81
|
-
}, [u]), f = B(() => {
|
|
82
|
-
if (!s) return;
|
|
83
|
-
const n = new URLSearchParams();
|
|
84
|
-
n.set("product", s.code), s.name && n.set("productName", s.name), r(`/workspace?mode=product&${n.toString()}`);
|
|
85
|
-
}, [s, r]);
|
|
86
|
-
L(() => {
|
|
87
|
-
c.startsWith("/lc") || r(`/lc/apps${u || ""}`, { replace: !0 });
|
|
88
|
-
}, [c, u, r]);
|
|
89
|
-
const N = p(
|
|
90
|
-
() => b === "failed" ? m : D(m, l),
|
|
91
|
-
[l, b]
|
|
92
|
-
), g = p(() => le(c), [c]), k = (n) => {
|
|
93
|
-
w((i) => {
|
|
94
|
-
const a = new Set(i);
|
|
95
|
-
return a.has(n) ? a.delete(n) : a.add(n), a;
|
|
96
|
-
});
|
|
97
|
-
};
|
|
98
|
-
return /* @__PURE__ */ o("div", { className: t.shellWrap, children: [
|
|
99
|
-
s && /* @__PURE__ */ o("div", { className: t.productBanner, children: [
|
|
100
|
-
/* @__PURE__ */ e("span", { className: t.productBannerLabel, children: "📦 当前产品" }),
|
|
101
|
-
/* @__PURE__ */ e("span", { className: t.productBannerName, title: s.name, children: s.name }),
|
|
102
|
-
/* @__PURE__ */ e("span", { className: t.productBannerCode, children: s.code }),
|
|
103
|
-
/* @__PURE__ */ e("button", { type: "button", className: t.productBannerBack, onClick: f, children: "← 返回产品工作台" })
|
|
104
|
-
] }),
|
|
105
|
-
/* @__PURE__ */ o("div", { className: t.shell, children: [
|
|
106
|
-
/* @__PURE__ */ o("aside", { className: t.sidebar, children: [
|
|
107
|
-
/* @__PURE__ */ o("div", { className: t.sidebarHeader, children: [
|
|
108
|
-
/* @__PURE__ */ e(v, {}),
|
|
109
|
-
/* @__PURE__ */ e("span", { children: "研发工作台" })
|
|
110
|
-
] }),
|
|
111
|
-
/* @__PURE__ */ e(T, {}),
|
|
112
|
-
/* @__PURE__ */ e("nav", { className: t.menuList, children: N.map((n) => {
|
|
113
|
-
const i = !S.has(n.title);
|
|
114
|
-
return /* @__PURE__ */ o("div", { className: t.menuGroup, children: [
|
|
115
|
-
/* @__PURE__ */ o(
|
|
116
|
-
"div",
|
|
117
|
-
{
|
|
118
|
-
className: t.menuGroupHeader,
|
|
119
|
-
onClick: () => k(n.title),
|
|
120
|
-
children: [
|
|
121
|
-
/* @__PURE__ */ e("span", { className: t.menuGroupLabel, children: n.title }),
|
|
122
|
-
/* @__PURE__ */ e("span", { className: t.menuGroupArrow, children: i ? /* @__PURE__ */ e(O, {}) : /* @__PURE__ */ e(A, {}) })
|
|
123
|
-
]
|
|
124
|
-
}
|
|
125
|
-
),
|
|
126
|
-
i && /* @__PURE__ */ e("ul", { className: t.menuSubList, children: n.items.map((a) => /* @__PURE__ */ o(
|
|
127
|
-
"li",
|
|
128
|
-
{
|
|
129
|
-
className: `${t.menuSubItemWrap} ${t.menuSubItem} ${g === a.key ? t.menuSubItemActive : ""}`,
|
|
130
|
-
onClick: () => r(`${d}/${a.path}`),
|
|
131
|
-
children: [
|
|
132
|
-
/* @__PURE__ */ e("span", { className: t.menuSubItemIcon, children: a.icon }),
|
|
133
|
-
/* @__PURE__ */ e("span", { className: t.menuSubItemLabel, children: a.label })
|
|
134
|
-
]
|
|
135
|
-
},
|
|
136
|
-
a.key
|
|
137
|
-
)) })
|
|
138
|
-
] }, n.title);
|
|
139
|
-
}) })
|
|
140
|
-
] }),
|
|
141
|
-
/* @__PURE__ */ e("main", { className: t.main, children: /* @__PURE__ */ e(E, {}) })
|
|
142
|
-
] })
|
|
143
|
-
] });
|
|
144
|
-
}
|
|
145
|
-
export {
|
|
146
|
-
we as default
|
|
147
|
-
};
|
package/dist/index-BoY7L8C4.js
DELETED
|
@@ -1,111 +0,0 @@
|
|
|
1
|
-
import { jsxs as o, jsx as c } from "react/jsx-runtime";
|
|
2
|
-
import h, { useMemo as u, useEffect as f } from "react";
|
|
3
|
-
import { useNavigate as y, useLocation as b } from "react-router-dom";
|
|
4
|
-
import { appMeta as v, menuSections as N, menuItems as T, routes as $ } from "@yuku123/z-cognition-component/pages";
|
|
5
|
-
import { appMeta as L, menuItems as k, routes as A } from "@yuku123/z-cognition-kb-component/pages";
|
|
6
|
-
import { menuItems as C, routes as H } from "@yuku123/z-indexer-component/pages";
|
|
7
|
-
const g = "_shell_9m078_6", x = "_sidebar_9m078_15", M = "_sidebarHeader_9m078_26", E = "_sidebarHeaderIcon_9m078_37", D = "_menuList_9m078_41", S = "_section_9m078_48", w = "_sectionTitle_9m078_52", z = "_sectionIcon_9m078_64", R = "_menuItemIcon_9m078_68", U = "_menuItem_9m078_68", W = "_menuItemActive_9m078_85", j = "_menuItemLabel_9m078_90", K = "_menuItemDesc_9m078_101", O = "_main_9m078_113", P = "_empty_9m078_122", Z = "_emptyIcon_9m078_132", F = "_emptyText_9m078_136", e = {
|
|
8
|
-
shell: g,
|
|
9
|
-
sidebar: x,
|
|
10
|
-
sidebarHeader: M,
|
|
11
|
-
sidebarHeaderIcon: E,
|
|
12
|
-
menuList: D,
|
|
13
|
-
section: S,
|
|
14
|
-
sectionTitle: w,
|
|
15
|
-
sectionIcon: z,
|
|
16
|
-
menuItemIcon: R,
|
|
17
|
-
menuItem: U,
|
|
18
|
-
menuItemActive: W,
|
|
19
|
-
menuItemLabel: j,
|
|
20
|
-
menuItemDesc: K,
|
|
21
|
-
main: O,
|
|
22
|
-
empty: P,
|
|
23
|
-
emptyIcon: Z,
|
|
24
|
-
emptyText: F
|
|
25
|
-
}, p = [
|
|
26
|
-
{ title: "知识管理", icon: "📚", items: k },
|
|
27
|
-
...N || [
|
|
28
|
-
{ title: "业务认知", icon: "🧠", items: T }
|
|
29
|
-
],
|
|
30
|
-
// 代码索引(2026-11-10 归纳):独立仓 z-indexer 代码索引中心前台四页,
|
|
31
|
-
// 与 admin「知识沉淀 → 知识认知 → 代码认知」同口径:前台查、后台管。
|
|
32
|
-
{ title: "代码索引", icon: "🔍", items: C }
|
|
33
|
-
], d = [
|
|
34
|
-
...A,
|
|
35
|
-
...$,
|
|
36
|
-
...H
|
|
37
|
-
], q = "/z-kb/dashboard";
|
|
38
|
-
function B(s) {
|
|
39
|
-
const n = s.replace(/[.+^${}()|[\]\\]/g, "\\$&");
|
|
40
|
-
return new RegExp(
|
|
41
|
-
`^${n.replace(/:[A-Za-z0-9_]+\*/g, "(?:/.*)?").replace(/:[A-Za-z0-9_]+/g, "[^/]+")}$`
|
|
42
|
-
);
|
|
43
|
-
}
|
|
44
|
-
function G(s) {
|
|
45
|
-
const n = d.find((t) => t.path === s);
|
|
46
|
-
if (n != null && n.Component) return n.Component;
|
|
47
|
-
for (const t of d)
|
|
48
|
-
if (t.Component) {
|
|
49
|
-
if (t.path.includes(":")) {
|
|
50
|
-
if (B(t.path).test(s)) return t.Component;
|
|
51
|
-
} else if (s.startsWith(t.path + "/"))
|
|
52
|
-
return t.Component;
|
|
53
|
-
}
|
|
54
|
-
return null;
|
|
55
|
-
}
|
|
56
|
-
function _(s) {
|
|
57
|
-
for (const n of p)
|
|
58
|
-
for (const t of n.items)
|
|
59
|
-
if (s === t.key || s.startsWith(t.key + "/")) return t.key;
|
|
60
|
-
return null;
|
|
61
|
-
}
|
|
62
|
-
function ne() {
|
|
63
|
-
var r, l;
|
|
64
|
-
const s = y(), { pathname: n } = b(), t = u(() => _(n), [n]);
|
|
65
|
-
f(() => {
|
|
66
|
-
if (!_(n)) {
|
|
67
|
-
const { search: i } = window.location;
|
|
68
|
-
s(`${q}${i || ""}`, { replace: !0 });
|
|
69
|
-
}
|
|
70
|
-
}, [n, s]);
|
|
71
|
-
const a = u(() => G(n), [n]);
|
|
72
|
-
return /* @__PURE__ */ o("div", { className: e.shell, children: [
|
|
73
|
-
/* @__PURE__ */ o("aside", { className: e.sidebar, children: [
|
|
74
|
-
/* @__PURE__ */ o("div", { className: e.sidebarHeader, children: [
|
|
75
|
-
/* @__PURE__ */ c("span", { className: e.sidebarHeaderIcon, children: "🧠" }),
|
|
76
|
-
/* @__PURE__ */ c("span", { children: ((r = L) == null ? void 0 : r.title) ?? ((l = v) == null ? void 0 : l.title) ?? "知识工作台" })
|
|
77
|
-
] }),
|
|
78
|
-
/* @__PURE__ */ c("nav", { className: e.menuList, children: p.map((i) => /* @__PURE__ */ o("div", { className: e.section, children: [
|
|
79
|
-
/* @__PURE__ */ o("div", { className: e.sectionTitle, children: [
|
|
80
|
-
/* @__PURE__ */ c("span", { className: e.sectionIcon, children: i.icon }),
|
|
81
|
-
i.title
|
|
82
|
-
] }),
|
|
83
|
-
i.items.map((m) => {
|
|
84
|
-
const I = t === m.key;
|
|
85
|
-
return /* @__PURE__ */ o(
|
|
86
|
-
"div",
|
|
87
|
-
{
|
|
88
|
-
className: `${e.menuItem} ${I ? e.menuItemActive : ""}`,
|
|
89
|
-
onClick: () => s(m.key),
|
|
90
|
-
children: [
|
|
91
|
-
/* @__PURE__ */ o("div", { className: e.menuItemLabel, children: [
|
|
92
|
-
m.icon ? /* @__PURE__ */ c("span", { className: e.menuItemIcon, children: m.icon }) : null,
|
|
93
|
-
m.label
|
|
94
|
-
] }),
|
|
95
|
-
m.desc ? /* @__PURE__ */ c("div", { className: e.menuItemDesc, children: m.desc }) : null
|
|
96
|
-
]
|
|
97
|
-
},
|
|
98
|
-
m.key
|
|
99
|
-
);
|
|
100
|
-
})
|
|
101
|
-
] }, i.title)) })
|
|
102
|
-
] }),
|
|
103
|
-
/* @__PURE__ */ c("main", { className: e.main, children: a ? /* @__PURE__ */ c(h.Suspense, { fallback: /* @__PURE__ */ c("div", { className: e.emptyText, children: "加载中…" }), children: /* @__PURE__ */ c(a, {}) }) : /* @__PURE__ */ o("div", { className: e.empty, children: [
|
|
104
|
-
/* @__PURE__ */ c("div", { className: e.emptyIcon, children: "🧠" }),
|
|
105
|
-
/* @__PURE__ */ c("div", { className: e.emptyText, children: "请从左侧选择知识模块" })
|
|
106
|
-
] }) })
|
|
107
|
-
] });
|
|
108
|
-
}
|
|
109
|
-
export {
|
|
110
|
-
ne as default
|
|
111
|
-
};
|
package/dist/index-CU6jFFl5.js
DELETED
|
@@ -1,112 +0,0 @@
|
|
|
1
|
-
import { jsxs as u, jsx as t } from "react/jsx-runtime";
|
|
2
|
-
import { useState as L, useMemo as p } from "react";
|
|
3
|
-
import { useNavigate as v, useLocation as A } from "react-router-dom";
|
|
4
|
-
import { DownOutlined as k, RightOutlined as w } from "@ant-design/icons";
|
|
5
|
-
import { P as W, R as $ } from "./index-9rfSVSTh.js";
|
|
6
|
-
import { f as E, M as g } from "./menuPermission-v0881tid.js";
|
|
7
|
-
import { u as j } from "./ComponentDoc-Dh5YhLCI.js";
|
|
8
|
-
const H = "_shell_1jjcx_7", M = "_sidebar_1jjcx_15", R = "_menuList_1jjcx_37", T = "_menuGroup_1jjcx_43", C = "_menuGroupHeader_1jjcx_47", P = "_menuGroupIcon_1jjcx_65", z = "_menuGroupLabel_1jjcx_70", K = "_menuGroupArrow_1jjcx_74", U = "_menuSubList_1jjcx_80", Z = "_menuSubItem_1jjcx_86", B = "_menuSubItemActive_1jjcx_103", D = "_menuSubItemIcon_1jjcx_110", O = "_menuSubItemLabel_1jjcx_115", q = "_menuSubItemWrap_1jjcx_119", F = "_main_1jjcx_123", J = "_empty_1jjcx_134", Q = "_emptyIcon_1jjcx_144", V = "_emptyText_1jjcx_149", n = {
|
|
9
|
-
shell: H,
|
|
10
|
-
sidebar: M,
|
|
11
|
-
menuList: R,
|
|
12
|
-
menuGroup: T,
|
|
13
|
-
menuGroupHeader: C,
|
|
14
|
-
menuGroupIcon: P,
|
|
15
|
-
menuGroupLabel: z,
|
|
16
|
-
menuGroupArrow: K,
|
|
17
|
-
menuSubList: U,
|
|
18
|
-
menuSubItem: Z,
|
|
19
|
-
menuSubItemActive: B,
|
|
20
|
-
menuSubItemIcon: D,
|
|
21
|
-
menuSubItemLabel: O,
|
|
22
|
-
menuSubItemWrap: q,
|
|
23
|
-
main: F,
|
|
24
|
-
empty: J,
|
|
25
|
-
emptyIcon: Q,
|
|
26
|
-
emptyText: V
|
|
27
|
-
};
|
|
28
|
-
function X(m, r) {
|
|
29
|
-
for (const s of m)
|
|
30
|
-
if (s.path === r) return s.element;
|
|
31
|
-
for (const s of m)
|
|
32
|
-
if (s.path.includes("*") || s.path.includes(":")) {
|
|
33
|
-
const i = "^" + s.path.replace(/[.+?^${}()|[\]\\]/g, "\\$&").replace(/\*/g, ".*").replace(/:([a-zA-Z_][a-zA-Z0-9_]*)/g, "[^/]+") + "$";
|
|
34
|
-
if (new RegExp(i).test(r)) return s.element;
|
|
35
|
-
}
|
|
36
|
-
return null;
|
|
37
|
-
}
|
|
38
|
-
function Y({ text: m }) {
|
|
39
|
-
return /* @__PURE__ */ u("div", { className: n.empty, children: [
|
|
40
|
-
/* @__PURE__ */ t("div", { className: n.emptyIcon, children: "⚙️" }),
|
|
41
|
-
/* @__PURE__ */ t("div", { className: n.emptyText, children: m })
|
|
42
|
-
] });
|
|
43
|
-
}
|
|
44
|
-
function oe({
|
|
45
|
-
groups: m,
|
|
46
|
-
routes: r,
|
|
47
|
-
mode: s,
|
|
48
|
-
emptyText: i,
|
|
49
|
-
activePathOverride: _,
|
|
50
|
-
menuOnly: h = !1
|
|
51
|
-
}) {
|
|
52
|
-
const I = v(), { pathname: a } = A(), d = j((e) => e.currentUser), b = j((e) => e.permissionState), [x, S] = L(
|
|
53
|
-
new Set(m.map((e) => e.title))
|
|
54
|
-
), l = p(
|
|
55
|
-
() => b === "failed" ? m : E(m, d),
|
|
56
|
-
[m, d, b]
|
|
57
|
-
), f = p(() => {
|
|
58
|
-
const e = _ ?? a;
|
|
59
|
-
for (const o of l)
|
|
60
|
-
for (const c of o.items)
|
|
61
|
-
if (c.path === e) return c.key;
|
|
62
|
-
return null;
|
|
63
|
-
}, [l, _, a]), G = (e) => {
|
|
64
|
-
S((o) => {
|
|
65
|
-
const c = new Set(o);
|
|
66
|
-
return c.has(e) ? c.delete(e) : c.add(e), c;
|
|
67
|
-
});
|
|
68
|
-
}, y = (e) => {
|
|
69
|
-
I(`${e.path}?mode=${s}`);
|
|
70
|
-
}, N = p(() => X(r, a), [r, a]);
|
|
71
|
-
return /* @__PURE__ */ u("div", { className: n.shell, children: [
|
|
72
|
-
/* @__PURE__ */ u("aside", { className: n.sidebar, children: [
|
|
73
|
-
/* @__PURE__ */ t(g, {}),
|
|
74
|
-
/* @__PURE__ */ t("nav", { className: n.menuList, children: l.map((e) => {
|
|
75
|
-
const o = x.has(e.title);
|
|
76
|
-
return /* @__PURE__ */ u("div", { className: n.menuGroup, children: [
|
|
77
|
-
/* @__PURE__ */ u(
|
|
78
|
-
"div",
|
|
79
|
-
{
|
|
80
|
-
className: n.menuGroupHeader,
|
|
81
|
-
onClick: () => G(e.title),
|
|
82
|
-
children: [
|
|
83
|
-
/* @__PURE__ */ t("span", { className: n.menuGroupIcon, children: e.icon }),
|
|
84
|
-
/* @__PURE__ */ t("span", { className: n.menuGroupLabel, children: e.title }),
|
|
85
|
-
/* @__PURE__ */ t("span", { className: n.menuGroupArrow, children: o ? /* @__PURE__ */ t(k, {}) : /* @__PURE__ */ t(w, {}) })
|
|
86
|
-
]
|
|
87
|
-
}
|
|
88
|
-
),
|
|
89
|
-
o && /* @__PURE__ */ t("ul", { className: n.menuSubList, children: e.items.map((c) => /* @__PURE__ */ u(
|
|
90
|
-
"li",
|
|
91
|
-
{
|
|
92
|
-
className: `${n.menuSubItemWrap} ${n.menuSubItem} ${f === c.key ? n.menuSubItemActive : ""}`,
|
|
93
|
-
onClick: () => y(c),
|
|
94
|
-
children: [
|
|
95
|
-
/* @__PURE__ */ t("span", { className: n.menuSubItemIcon, children: c.icon }),
|
|
96
|
-
/* @__PURE__ */ t("span", { className: n.menuSubItemLabel, children: c.label })
|
|
97
|
-
]
|
|
98
|
-
},
|
|
99
|
-
c.key
|
|
100
|
-
)) })
|
|
101
|
-
] }, e.title);
|
|
102
|
-
}) })
|
|
103
|
-
] }),
|
|
104
|
-
h ? null : /* @__PURE__ */ u("main", { className: n.main, children: [
|
|
105
|
-
/* @__PURE__ */ t(W, {}),
|
|
106
|
-
/* @__PURE__ */ t($, { resetKey: a, children: N ?? /* @__PURE__ */ t(Y, { text: i }) })
|
|
107
|
-
] })
|
|
108
|
-
] });
|
|
109
|
-
}
|
|
110
|
-
export {
|
|
111
|
-
oe as W
|
|
112
|
-
};
|