aibox-custom-component-packages 0.0.6 → 0.0.7

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 (153) hide show
  1. package/es/AddOrEditSupplierDialog.mjs +786 -0
  2. package/es/ApplicationTypeTag.mjs +58 -0
  3. package/es/AuthSection.mjs +199 -0
  4. package/es/AutoShowTooltip.mjs +90 -0
  5. package/es/AvailableRangePreview.mjs +1 -1
  6. package/es/AvailableRangeSetting.mjs +11 -10
  7. package/es/CodeView.mjs +7 -0
  8. package/es/CommonTagsList.mjs +4 -4
  9. package/es/CreateMcpForm.mjs +384 -0
  10. package/es/CustomSidebar.mjs +712 -0
  11. package/es/CustomTitle.mjs +7 -0
  12. package/es/CustomToggle.mjs +170 -0
  13. package/es/DialogContainer.mjs +21 -21
  14. package/es/FileDisplay.mjs +6 -0
  15. package/es/FilePreview.mjs +179 -0
  16. package/es/FileUploader.mjs +266 -9
  17. package/es/McpFormDialog.mjs +8 -0
  18. package/es/McpParamsSet.mjs +630 -0
  19. package/es/MdEditor.mjs +201 -0
  20. package/es/PageContainer.mjs +360 -11
  21. package/es/ParameterTable.mjs +2288 -0
  22. package/es/PublishRecord.mjs +6 -6
  23. package/es/RadioGroup.mjs +119 -0
  24. package/es/SourcePublish.mjs +6 -6
  25. package/es/Table.mjs +2 -2
  26. package/es/assets/AddOrEditSupplierDialog.css +1 -0
  27. package/es/assets/AiboxTable.css +1 -0
  28. package/es/assets/ApplicationTypeTag.css +1 -0
  29. package/es/assets/AuthSection.css +1 -0
  30. package/es/assets/AutoShowTooltip.css +1 -0
  31. package/es/assets/CreateMcpForm.css +1 -0
  32. package/es/assets/CustomSidebar.css +1 -0
  33. package/es/assets/CustomToggle.css +1 -0
  34. package/es/assets/FilePreview.css +1 -0
  35. package/es/assets/FileUploader.css +1 -0
  36. package/es/assets/McpParamsSet.css +1 -0
  37. package/es/assets/MdEditor.css +1 -0
  38. package/es/assets/PageContainer.css +1 -0
  39. package/es/assets/ParameterTable.css +1 -0
  40. package/es/assets/RadioGroup.css +1 -0
  41. package/es/assets/index.css +1 -1
  42. package/es/assets/index2.css +1 -1
  43. package/es/assets/index3.css +1 -0
  44. package/es/assets/index4.css +1 -0
  45. package/es/assets/index5.css +1 -0
  46. package/es/assets/index6.css +1 -0
  47. package/es/assets/layout.css +1 -0
  48. package/es/assets/usePreview.css +1 -0
  49. package/es/chunks/AiboxTable.DUGBBVXh.js +645 -0
  50. package/es/chunks/BackBar.B5Er8ZdJ.js +645 -0
  51. package/es/chunks/config.DPkdwjwD.js +49 -0
  52. package/es/chunks/config.Dklrsn-B.js +49 -0
  53. package/es/chunks/config.DqhQdkz7.js +325 -0
  54. package/es/chunks/config.RrNwuFkQ.js +325 -0
  55. package/es/chunks/config.gNZ_rT87.js +325 -0
  56. package/es/chunks/enums.DuBbLcd-.js +83 -0
  57. package/es/chunks/enums.Dvec-maC.js +62 -0
  58. package/es/chunks/field-types.CPnMOjle.js +13 -0
  59. package/es/chunks/files.cduUqjHX.js +16 -0
  60. package/es/chunks/i18n.DDMVloiU.js +443 -0
  61. package/es/chunks/i18n.k9Q_HVMs.js +443 -0
  62. package/es/chunks/index.BSA3IKSF.js +111 -0
  63. package/es/chunks/index.BT1khSY9.js +111 -0
  64. package/es/chunks/index.CDvh263l.js +257 -0
  65. package/es/chunks/index.CLyfh6p1.js +257 -0
  66. package/es/chunks/index.CSjjAi3w.js +396 -0
  67. package/es/chunks/index.CdEBk4F_.js +134 -0
  68. package/es/chunks/index.CgbxJCEU.js +265 -0
  69. package/es/chunks/index.CuDwuRO7.js +265 -0
  70. package/es/chunks/index.DWR4lc30.js +203 -0
  71. package/es/chunks/index.GuEzdh6b.js +257 -0
  72. package/es/chunks/index.uOZzvHrF.js +135 -0
  73. package/es/chunks/layout.BREUWPEJ.js +26 -0
  74. package/es/chunks/publish.DlD0o09n.js +50 -0
  75. package/es/chunks/request.24c3shPx.js +5 -0
  76. package/es/chunks/usePreview.B5lboHeg.js +153 -0
  77. package/es/chunks/usePreview.C36fNlVd.js +153 -0
  78. package/es/index.mjs +325 -312
  79. package/index.css +1 -1
  80. package/lib/AddOrEditSupplierDialog.js +1 -0
  81. package/lib/ApplicationTypeTag.js +1 -0
  82. package/lib/AuthSection.js +1 -0
  83. package/lib/AutoShowTooltip.js +1 -0
  84. package/lib/AvailableRangePreview.js +1 -1
  85. package/lib/AvailableRangeSetting.js +1 -1
  86. package/lib/CodeView.js +1 -0
  87. package/lib/CommonTagsList.js +1 -1
  88. package/lib/CreateMcpForm.js +1 -0
  89. package/lib/CustomSidebar.js +1 -0
  90. package/lib/CustomTitle.js +1 -0
  91. package/lib/CustomToggle.js +1 -0
  92. package/lib/DialogContainer.js +1 -1
  93. package/lib/FileDisplay.js +1 -0
  94. package/lib/FilePreview.js +1 -0
  95. package/lib/FileUploader.js +1 -1
  96. package/lib/McpFormDialog.js +1 -0
  97. package/lib/McpParamsSet.js +1 -0
  98. package/lib/MdEditor.js +1 -0
  99. package/lib/PageContainer.js +1 -1
  100. package/lib/ParameterTable.js +1 -0
  101. package/lib/PublishRecord.js +4 -4
  102. package/lib/RadioGroup.js +1 -0
  103. package/lib/SourcePublish.js +1 -1
  104. package/lib/Table.js +1 -1
  105. package/lib/assets/AddOrEditSupplierDialog.css +1 -0
  106. package/lib/assets/AiboxTable.css +1 -0
  107. package/lib/assets/ApplicationTypeTag.css +1 -0
  108. package/lib/assets/AuthSection.css +1 -0
  109. package/lib/assets/AutoShowTooltip.css +1 -0
  110. package/lib/assets/CreateMcpForm.css +1 -0
  111. package/lib/assets/CustomSidebar.css +1 -0
  112. package/lib/assets/CustomToggle.css +1 -0
  113. package/lib/assets/FilePreview.css +1 -0
  114. package/lib/assets/FileUploader.css +1 -0
  115. package/lib/assets/McpParamsSet.css +1 -0
  116. package/lib/assets/MdEditor.css +1 -0
  117. package/lib/assets/PageContainer.css +1 -0
  118. package/lib/assets/ParameterTable.css +1 -0
  119. package/lib/assets/RadioGroup.css +1 -0
  120. package/lib/assets/index.css +1 -1
  121. package/lib/assets/index2.css +1 -1
  122. package/lib/assets/index3.css +1 -0
  123. package/lib/assets/index4.css +1 -0
  124. package/lib/assets/index5.css +1 -0
  125. package/lib/assets/index6.css +1 -0
  126. package/lib/assets/layout.css +1 -0
  127. package/lib/assets/usePreview.css +1 -0
  128. package/lib/chunks/AiboxTable.BnoHJ7xL.js +1 -0
  129. package/lib/chunks/BackBar.C8Xrc6qW.js +1 -0
  130. package/lib/chunks/config.1oaIKLGn.js +1 -0
  131. package/lib/chunks/config.BF7MO0O5.js +1 -0
  132. package/lib/chunks/enums.DnuzPZCR.js +1 -0
  133. package/lib/chunks/field-types.Ch_2yDfg.js +1 -0
  134. package/lib/chunks/files.B3-8UC0v.js +1 -0
  135. package/lib/chunks/i18n.DgOp_D7R.js +1 -0
  136. package/lib/chunks/index.BZcSlgOO.js +1 -0
  137. package/lib/chunks/index.Bc71XWQn.js +1 -0
  138. package/lib/chunks/index.CH7XdMru.js +1 -0
  139. package/lib/chunks/index.CaidDlAx.js +1 -0
  140. package/lib/chunks/index.D7wBInWr.js +1 -0
  141. package/lib/chunks/index.DGWHQFdx.js +6 -0
  142. package/lib/chunks/index.DME62Yfo.js +1 -0
  143. package/lib/chunks/index.DWohILMv.js +1 -0
  144. package/lib/chunks/index.LK2ulXTE.js +1 -0
  145. package/lib/chunks/index.qDAoOzk9.js +1 -0
  146. package/lib/chunks/index.s8vGOJKG.js +1 -0
  147. package/lib/chunks/layout.sgE9JoNq.js +1 -0
  148. package/lib/chunks/publish.3TrK3fZf.js +1 -0
  149. package/lib/chunks/request.D8T4MgGX.js +1 -0
  150. package/lib/chunks/usePreview.2PZJSy5w.js +1 -0
  151. package/lib/chunks/usePreview.E5SeS2uw.js +1 -0
  152. package/lib/index.js +1 -4
  153. package/package.json +2 -2
@@ -0,0 +1,712 @@
1
+ import { w as $ } from "./chunks/index.bCzIhWFw.js";
2
+ import { createElementBlock as p, openBlock as s, createVNode as y, createElementVNode as d, createBlock as g, createCommentVNode as I, unref as u, withCtx as m, normalizeStyle as k, toDisplayString as x, resolveDynamicComponent as T, ref as A, watch as B, nextTick as D, normalizeClass as w, withModifiers as K, computed as W, Fragment as C, renderList as H, Transition as V, withDirectives as Y, vShow as G } from "vue";
3
+ import { ElIcon as O, ElAutoResizer as q, ElTreeV2 as J } from "element-plus";
4
+ import { AiboxIcon as Q } from "color-message-aibox-vue";
5
+ import { _ as N } from "./chunks/_plugin-vue_export-helper.CHgC5LLL.js";
6
+ import { IconRenderer as X, iconLibraryMap as Z } from "color-star-custom-components";
7
+ import './assets/CustomSidebar.css';const _ = { class: "nav-title overflow-hidden" }, ee = /* @__PURE__ */ Object.assign({
8
+ name: "NavTitle"
9
+ }, {
10
+ __name: "NavTitle",
11
+ props: {
12
+ // 标题文本
13
+ title: {
14
+ type: String,
15
+ default: ""
16
+ },
17
+ // 头部图标尺寸
18
+ logoSize: {
19
+ type: Number,
20
+ default: 30
21
+ },
22
+ // 标题样式
23
+ titleStyle: {
24
+ type: Object,
25
+ default: () => ({ fontSize: "16px" })
26
+ },
27
+ // 是否显示折叠按钮
28
+ showToggle: {
29
+ type: Boolean,
30
+ default: !0
31
+ },
32
+ // 折叠按钮图标
33
+ toggleIcon: {
34
+ type: [Object, String],
35
+ default: null
36
+ }
37
+ },
38
+ emits: ["toggle"],
39
+ setup(e, { emit: n }) {
40
+ const t = n, o = () => {
41
+ t("toggle");
42
+ };
43
+ return (l, h) => (s(), p("div", _, [
44
+ y(u(O), { size: e.logoSize }, {
45
+ default: m(() => [
46
+ y(u(Q))
47
+ ]),
48
+ _: 1
49
+ }, 8, ["size"]),
50
+ d("span", {
51
+ class: "weight-500 text-1f2329 title-text",
52
+ style: k(e.titleStyle)
53
+ }, x(e.title), 5),
54
+ e.showToggle ? (s(), g(u(O), {
55
+ key: 0,
56
+ size: 18,
57
+ class: "collapse-unfold-icon",
58
+ onClick: o
59
+ }, {
60
+ default: m(() => [
61
+ (s(), g(T(e.toggleIcon)))
62
+ ]),
63
+ _: 1
64
+ })) : I("", !0)
65
+ ]));
66
+ }
67
+ }), te = /* @__PURE__ */ N(ee, [["__scopeId", "data-v-384d20d1"]]), M = {
68
+ DIR: "DIR",
69
+ // 目录
70
+ MENU: "MENU",
71
+ // 菜单
72
+ BUTTON: "BUTTON"
73
+ // 按钮
74
+ }, ne = /* @__PURE__ */ new Map([
75
+ ["active", "#3271FE"],
76
+ ["parent_active", "#3271FE"],
77
+ ["normal", "#1F2329"]
78
+ ]), oe = (e, n) => !Array.isArray(e) || !n ? !1 : e.some((t) => t.path === n ? !0 : t.children?.length > 0 ? oe(t.children, n) : !1), le = (e, n = 1) => e.filter((o) => [M.DIR, M.MENU].includes(o.type)).map((o) => ({
79
+ ...o,
80
+ id: o.bnid,
81
+ name: o.name,
82
+ path: o?.path || "",
83
+ children: o.children?.length > 0 ? le(o.children || [], n + 1) : [],
84
+ level: n
85
+ })), ie = (e, n) => e?.children?.length ? e.children.some(
86
+ (t) => t?.path === n || t.children?.length && ie(t, n)
87
+ ) : !1, z = (e, n) => e?.children?.length ? e.children.some(
88
+ (t) => t?.id === n || t.children?.length && z(t, n)
89
+ ) : !1, re = (e, n) => {
90
+ const t = e?.id === n, o = z(e, n);
91
+ let l = "normal";
92
+ return t ? l = "active" : o && (l = "parent_active"), ne.get(l);
93
+ }, $e = (e, n) => e.includes(n) ? e : [...e, n], Be = (e, n) => e.filter((t) => t !== n), se = (e, n, t = []) => e.some((o) => {
94
+ if (o?.path === n)
95
+ return !0;
96
+ if (o.children?.length > 0) {
97
+ t.push(o.id);
98
+ const l = se(o.children, n, t);
99
+ return l || t.pop(), l;
100
+ }
101
+ return !1;
102
+ }), U = (e, n, t = []) => e.some((o) => {
103
+ if (o?.id === n)
104
+ return !0;
105
+ if (o.children?.length > 0) {
106
+ t.push(o.id);
107
+ const l = U(o.children, n, t);
108
+ return l || t.pop(), l;
109
+ }
110
+ return !1;
111
+ }), De = (e, n) => {
112
+ const t = [];
113
+ return U(e, n, t), t;
114
+ }, ae = (e, n) => {
115
+ if (!Array.isArray(e) || !n) return null;
116
+ for (const t of e) {
117
+ if (t.path === n)
118
+ return t;
119
+ if (t.children?.length > 0) {
120
+ const o = ae(t.children, n);
121
+ if (o) return o;
122
+ }
123
+ }
124
+ return null;
125
+ }, ce = (e) => Array.isArray(e) ? e.map((n) => {
126
+ const t = { ...n };
127
+ return t.children && Array.isArray(t.children) && t.children.length > 0 ? t.children = ce(t.children) : t.isLeaf = !0, t;
128
+ }) : [], ue = (e) => {
129
+ if (!Array.isArray(e) || e.length === 0) return null;
130
+ for (const n of e) {
131
+ if (n.isLeaf && n.path)
132
+ return n;
133
+ if (n.children?.length > 0) {
134
+ const t = ue(n.children);
135
+ if (t) return t;
136
+ }
137
+ }
138
+ return null;
139
+ }, Ke = ["/404", "/login", "/unauthorized"], j = {
140
+ label: "name",
141
+ children: "children",
142
+ isLeaf: "isLeaf"
143
+ }, P = {
144
+ PARENT: "parent",
145
+ LEAF: "leaf"
146
+ }, We = {
147
+ LOADING: "loading",
148
+ LOADED: "loaded",
149
+ ERROR: "error"
150
+ }, v = {
151
+ POPUP: "popup",
152
+ FOOTER: "footer"
153
+ }, de = { class: "node-label" }, fe = ["onClick"], pe = /* @__PURE__ */ Object.assign({
154
+ name: "MenuList"
155
+ }, {
156
+ __name: "MenuList",
157
+ props: {
158
+ // 菜单数据(已处理好的树形结构)
159
+ menuData: {
160
+ type: Array,
161
+ default: () => []
162
+ },
163
+ // 当前选中的菜单ID
164
+ currentMenuId: {
165
+ type: String,
166
+ default: null
167
+ },
168
+ // 展开的节点ID数组
169
+ expandedKeys: {
170
+ type: Array,
171
+ default: () => []
172
+ },
173
+ // 树形组件配置
174
+ treeProps: {
175
+ type: Object,
176
+ default: () => j
177
+ },
178
+ // 菜单项高度
179
+ itemHeight: {
180
+ type: Number,
181
+ default: 36
182
+ },
183
+ // 缩进距离
184
+ indent: {
185
+ type: Number,
186
+ default: 24
187
+ },
188
+ // 图标大小
189
+ iconSize: {
190
+ type: Number,
191
+ default: 16
192
+ },
193
+ // 菜单选中背景色
194
+ selectMenuBg: {
195
+ type: String,
196
+ default: "#eaf0fe"
197
+ },
198
+ // 展开图标组件
199
+ expandedIcon: {
200
+ type: [Object, String],
201
+ default: null
202
+ },
203
+ // 收起图标组件
204
+ collapsedIcon: {
205
+ type: [Object, String],
206
+ default: null
207
+ }
208
+ // 图标渲染器组件(可选)
209
+ // iconRenderer: {
210
+ // type: [Object, String],
211
+ // default: null,
212
+ // },
213
+ // // 图标库配置
214
+ // iconLibrary: {
215
+ // type: [String, Object],
216
+ // default: null,
217
+ // },
218
+ },
219
+ emits: ["node-click", "node-expand", "node-collapse"],
220
+ setup(e, { emit: n }) {
221
+ const t = e, o = n, l = A(null), h = (r) => r?.icon && r.level === 1 || !r.isLeaf, c = (r) => re(r, t.currentMenuId), b = (r) => {
222
+ const E = r.isLeaf ? P.LEAF : P.PARENT;
223
+ o("node-click", r, E);
224
+ }, a = (r) => {
225
+ o("node-expand", r.id, r);
226
+ }, i = (r) => {
227
+ o("node-collapse", r.id, r);
228
+ }, S = (r) => {
229
+ if (!l.value) return;
230
+ t.expandedKeys.includes(r.data.id) ? l.value.collapseNode(r) : l.value.expandNode(r);
231
+ };
232
+ return B(
233
+ () => t.expandedKeys,
234
+ (r) => {
235
+ D(() => {
236
+ l.value && l.value.setExpandedKeys([...r]);
237
+ });
238
+ },
239
+ { deep: !0 }
240
+ ), (r, E) => (s(), g(u(q), { class: "flex-1 overflow-hidden" }, {
241
+ default: m(({ height: F }) => [
242
+ y(u(J), {
243
+ ref_key: "treeRef",
244
+ ref: l,
245
+ "node-key": "id",
246
+ data: e.menuData,
247
+ props: e.treeProps,
248
+ height: F,
249
+ "current-node-key": e.currentMenuId,
250
+ "highlight-current": !0,
251
+ "expanded-keys": e.expandedKeys,
252
+ "show-checkbox": !1,
253
+ "item-size": e.itemHeight + 8,
254
+ "expand-on-click-node": !1,
255
+ indent: e.indent,
256
+ style: k({ "--select-menu-bg": e.selectMenuBg }),
257
+ onNodeClick: b,
258
+ onNodeExpand: a,
259
+ onNodeCollapse: i,
260
+ class: "custom-tree"
261
+ }, {
262
+ default: m(({ node: L, data: f }) => [
263
+ d("div", {
264
+ class: w(["tree-node-content-custom", {
265
+ "has-children": !f.isLeaf,
266
+ "is-current": f.id === e.currentMenuId && f.isLeaf,
267
+ "is-parent-active": u(z)(f, e.currentMenuId) && !f.isLeaf
268
+ }])
269
+ }, [
270
+ h(f) ? (s(), g(u(O), {
271
+ key: 0,
272
+ size: e.iconSize,
273
+ class: "node-icon",
274
+ color: c(f)
275
+ }, {
276
+ default: m(() => [
277
+ y(u(X), {
278
+ "icon-name": f?.icon,
279
+ "icon-library": u(Z).aibox
280
+ }, null, 8, ["icon-name", "icon-library"])
281
+ ]),
282
+ _: 2
283
+ }, 1032, ["size", "color"])) : I("", !0),
284
+ d("span", de, x(L.label), 1),
285
+ f.isLeaf ? I("", !0) : (s(), p("div", {
286
+ key: 1,
287
+ class: "expand-arrow",
288
+ onClick: K((Le) => S(L), ["stop"])
289
+ }, [
290
+ y(u(O), {
291
+ size: e.iconSize,
292
+ color: c(f)
293
+ }, {
294
+ default: m(() => [
295
+ (s(), g(T(e.expandedKeys.includes(f.id) ? e.expandedIcon : e.collapsedIcon)))
296
+ ]),
297
+ _: 2
298
+ }, 1032, ["size", "color"])
299
+ ], 8, fe))
300
+ ], 2)
301
+ ]),
302
+ _: 1
303
+ }, 8, ["data", "props", "height", "current-node-key", "expanded-keys", "item-size", "indent", "style"])
304
+ ]),
305
+ _: 1
306
+ }));
307
+ }
308
+ }), ye = /* @__PURE__ */ N(pe, [["__scopeId", "data-v-c047074f"]]), he = { class: "user-info-card__avatar" }, me = { class: "user-info-card__avatar-text" }, ge = { class: "user-info-card__details" }, ve = { class: "user-info-card__name" }, Ie = {
309
+ key: 0,
310
+ class: "user-info-card__bnid"
311
+ }, be = /* @__PURE__ */ Object.assign({
312
+ name: "UserInfoCard"
313
+ }, {
314
+ __name: "UserInfoCard",
315
+ props: {
316
+ // 用户信息对象
317
+ userInfo: {
318
+ type: Object,
319
+ default: () => ({})
320
+ },
321
+ // 展示类型:USER_INFO_CARD_TYPES.POPUP | USER_INFO_CARD_TYPES.FOOTER
322
+ type: {
323
+ type: String,
324
+ default: v.POPUP,
325
+ validator: (e) => Object.values(v).includes(e)
326
+ }
327
+ },
328
+ setup(e) {
329
+ const n = e, t = W(() => n.userInfo?.name?.charAt(0)?.toUpperCase() || "");
330
+ return (o, l) => (s(), p("div", {
331
+ class: w(["user-info-card", `user-info-card--${e.type}`])
332
+ }, [
333
+ d("div", he, [
334
+ d("span", me, x(t.value), 1)
335
+ ]),
336
+ d("div", ge, [
337
+ d("div", ve, x(e.userInfo?.name || ""), 1),
338
+ e.type === u(v).POPUP ? (s(), p("div", Ie, x(e.userInfo?.bnid || e.userInfo?.id || ""), 1)) : I("", !0)
339
+ ])
340
+ ], 2));
341
+ }
342
+ }), R = /* @__PURE__ */ N(be, [["__scopeId", "data-v-2ddc6d4a"]]), xe = { class: "user-popup-content" }, Ne = ["onClick"], Se = /* @__PURE__ */ Object.assign({
343
+ name: "UserPopup"
344
+ }, {
345
+ __name: "UserPopup",
346
+ props: {
347
+ // 操作列表配置
348
+ actions: {
349
+ type: Array,
350
+ default: () => [],
351
+ validator: (e) => e.every((n) => n.key && (n.icon || n.iconName))
352
+ },
353
+ // 用户信息
354
+ userInfo: {
355
+ type: Object,
356
+ default: () => ({})
357
+ },
358
+ // 是否显示用户信息卡片
359
+ showUserInfo: {
360
+ type: Boolean,
361
+ default: !0
362
+ }
363
+ },
364
+ emits: ["action-click"],
365
+ setup(e, { emit: n }) {
366
+ const t = n, o = (l) => {
367
+ t("action-click", l.key, l);
368
+ };
369
+ return (l, h) => (s(), p("div", xe, [
370
+ e.showUserInfo ? (s(), g(R, {
371
+ key: 0,
372
+ userInfo: e.userInfo,
373
+ type: u(v).POPUP,
374
+ class: "user-info-card"
375
+ }, null, 8, ["userInfo", "type"])) : I("", !0),
376
+ d("div", {
377
+ class: w({
378
+ "popup-list": e.showUserInfo
379
+ })
380
+ }, [
381
+ (s(!0), p(C, null, H(e.actions, (c, b) => (s(), p(C, { key: b }, [
382
+ c.hidden ? I("", !0) : (s(), p("div", {
383
+ key: 0,
384
+ class: "list__item",
385
+ onClick: (a) => o(c)
386
+ }, [
387
+ y(u(O), {
388
+ class: "list__item-icon",
389
+ size: c.iconSize || 20,
390
+ color: "#262626"
391
+ }, {
392
+ default: m(() => [
393
+ (s(), g(T(c.icon), {
394
+ size: c.iconSize || 20
395
+ }, null, 8, ["size"]))
396
+ ]),
397
+ _: 2
398
+ }, 1032, ["size"]),
399
+ d("span", null, x(c.label), 1)
400
+ ], 8, Ne))
401
+ ], 64))), 128))
402
+ ], 2)
403
+ ]));
404
+ }
405
+ }), Oe = /* @__PURE__ */ N(Se, [["__scopeId", "data-v-be7ee388"]]), ke = { class: "navbar-box__footer__left" }, Ee = /* @__PURE__ */ Object.assign({
406
+ name: "NavFooter"
407
+ }, {
408
+ __name: "NavFooter",
409
+ props: {
410
+ // 用户信息
411
+ userInfo: {
412
+ type: Object,
413
+ default: null,
414
+ validator: (e) => e ? e.name !== void 0 : !0
415
+ },
416
+ // 用户操作列表
417
+ actions: {
418
+ type: Array,
419
+ default: () => []
420
+ },
421
+ // 弹窗显示延迟(毫秒)
422
+ popupDelay: {
423
+ type: Number,
424
+ default: 200
425
+ },
426
+ // 弹窗左侧位置(像素)
427
+ popupLeft: {
428
+ type: Number,
429
+ default: 240
430
+ },
431
+ navFooterWidth: {
432
+ type: Number,
433
+ default: 240
434
+ },
435
+ // 底栏用户信息卡片展示类型
436
+ userInfoCardType: {
437
+ type: String,
438
+ default: v.FOOTER,
439
+ validator: (e) => Object.values(v).includes(e)
440
+ },
441
+ // 是否在弹窗中显示用户信息卡片
442
+ showPopupUserInfo: {
443
+ type: Boolean,
444
+ default: !0
445
+ }
446
+ },
447
+ emits: ["action-click"],
448
+ setup(e, { emit: n }) {
449
+ const t = e, o = n, l = A(null), h = A(!1), c = (a) => {
450
+ a || (l.value = setTimeout(() => {
451
+ h.value = !1;
452
+ }, t.popupDelay)), a && (h.value = a, clearTimeout(l.value));
453
+ }, b = (a, i) => {
454
+ h.value = !1, o("action-click", a, i);
455
+ };
456
+ return (a, i) => (s(), p(C, null, [
457
+ e.userInfo ? (s(), p("div", {
458
+ key: 0,
459
+ class: "navbar-box__footer flex items-center",
460
+ style: k({ width: e.navFooterWidth + "px" }),
461
+ onMouseenter: i[0] || (i[0] = (S) => c(!0)),
462
+ onMouseleave: i[1] || (i[1] = (S) => c(!1))
463
+ }, [
464
+ d("div", ke, [
465
+ y(R, {
466
+ userInfo: e.userInfo,
467
+ type: e.userInfoCardType
468
+ }, null, 8, ["userInfo", "type"])
469
+ ])
470
+ ], 36)) : I("", !0),
471
+ y(V, { name: "fade" }, {
472
+ default: m(() => [
473
+ Y(d("div", {
474
+ class: "footer-popup content-bg",
475
+ style: k({ left: e.popupLeft + "px" }),
476
+ onMouseenter: i[2] || (i[2] = (S) => c(!0)),
477
+ onMouseleave: i[3] || (i[3] = (S) => c(!1))
478
+ }, [
479
+ y(Oe, {
480
+ actions: e.actions,
481
+ userInfo: e.userInfo,
482
+ showUserInfo: e.showPopupUserInfo,
483
+ onActionClick: b
484
+ }, null, 8, ["actions", "userInfo", "showUserInfo"])
485
+ ], 36), [
486
+ [G, h.value]
487
+ ])
488
+ ]),
489
+ _: 1
490
+ })
491
+ ], 64));
492
+ }
493
+ }), Ae = /* @__PURE__ */ N(Ee, [["__scopeId", "data-v-2b4a0a2b"]]), Ce = { class: "sidebar flex h-full flex-col" }, Te = { class: "flex-1 overflow-hidden flex flex-col pd-l-12 pd-r-12" }, we = /* @__PURE__ */ Object.assign({
494
+ name: "CustomSidebar"
495
+ }, {
496
+ __name: "layout",
497
+ props: {
498
+ // ========== 菜单数据 ==========
499
+ // 菜单树数据(已处理好的树形结构)
500
+ menuData: {
501
+ type: Array,
502
+ default: () => []
503
+ },
504
+ // 当前选中的菜单ID
505
+ currentMenuId: {
506
+ type: String,
507
+ default: null
508
+ },
509
+ // 展开的节点ID数组
510
+ expandedKeys: {
511
+ type: Array,
512
+ default: () => []
513
+ },
514
+ // ========== 头部配置 ==========
515
+ // 标题文本
516
+ title: {
517
+ type: String,
518
+ default: ""
519
+ },
520
+ // 是否显示折叠按钮
521
+ showToggle: {
522
+ type: Boolean,
523
+ default: !0
524
+ },
525
+ // 折叠按钮图标
526
+ toggleIcon: {
527
+ type: [Object, String],
528
+ default: null
529
+ },
530
+ // ========== 菜单配置 ==========
531
+ // 树形组件配置
532
+ treeProps: {
533
+ type: Object,
534
+ default: () => j
535
+ },
536
+ // 菜单项高度
537
+ itemHeight: {
538
+ type: Number,
539
+ default: 36
540
+ },
541
+ // 缩进距离
542
+ indent: {
543
+ type: Number,
544
+ default: 24
545
+ },
546
+ // 图标大小
547
+ iconSize: {
548
+ type: Number,
549
+ default: 16
550
+ },
551
+ // 菜单选中背景色
552
+ selectMenuBg: {
553
+ type: String,
554
+ default: "#eaf0fe"
555
+ },
556
+ // 标题样式
557
+ titleStyle: {
558
+ type: Object,
559
+ default: () => ({ fontSize: "16px" })
560
+ },
561
+ // 展开图标组件
562
+ expandedIcon: {
563
+ type: [Object, String],
564
+ default: null
565
+ },
566
+ // 收起图标组件
567
+ collapsedIcon: {
568
+ type: [Object, String],
569
+ default: null
570
+ },
571
+ // 图标渲染器组件
572
+ iconRenderer: {
573
+ type: [Object, String],
574
+ default: null
575
+ },
576
+ // 图标库配置
577
+ iconLibrary: {
578
+ type: [String, Object],
579
+ default: null
580
+ },
581
+ // ========== 底部配置 ==========
582
+ // 是否显示底部
583
+ showFooter: {
584
+ type: Boolean,
585
+ default: !0
586
+ },
587
+ // 用户信息
588
+ userInfo: {
589
+ type: Object,
590
+ default: null
591
+ },
592
+ // 用户操作列表
593
+ userActions: {
594
+ type: Array,
595
+ default: () => []
596
+ },
597
+ // 弹窗显示延迟
598
+ popupDelay: {
599
+ type: Number,
600
+ default: 200
601
+ },
602
+ // 弹窗左侧位置(像素)
603
+ popupLeft: {
604
+ type: Number,
605
+ default: 240
606
+ },
607
+ navFooterWidth: {
608
+ type: Number,
609
+ default: 240
610
+ },
611
+ // 底栏用户信息卡片展示类型
612
+ userInfoCardType: {
613
+ type: String,
614
+ default: v.FOOTER,
615
+ validator: (e) => Object.values(v).includes(e)
616
+ },
617
+ // 是否在弹窗中显示用户信息卡片
618
+ showPopupUserInfo: {
619
+ type: Boolean,
620
+ default: !0
621
+ },
622
+ // Logo 尺寸
623
+ logoSize: {
624
+ type: Number,
625
+ default: 30
626
+ }
627
+ },
628
+ emits: [
629
+ "toggle",
630
+ "node-click",
631
+ "node-expand",
632
+ "node-collapse",
633
+ "user-action-click"
634
+ ],
635
+ setup(e, { emit: n }) {
636
+ const t = n, o = () => {
637
+ t("toggle");
638
+ }, l = (a, i) => {
639
+ t("node-click", a, i);
640
+ }, h = (a, i) => {
641
+ t("node-expand", a, i);
642
+ }, c = (a, i) => {
643
+ t("node-collapse", a, i);
644
+ }, b = (a, i) => {
645
+ t("user-action-click", a, i);
646
+ };
647
+ return (a, i) => (s(), p("div", Ce, [
648
+ d("div", Te, [
649
+ y(te, {
650
+ "title-style": e.titleStyle,
651
+ title: e.title,
652
+ "logo-size": e.logoSize,
653
+ "show-toggle": e.showToggle,
654
+ "toggle-icon": e.toggleIcon,
655
+ onToggle: o
656
+ }, null, 8, ["title-style", "title", "logo-size", "show-toggle", "toggle-icon"]),
657
+ y(ye, {
658
+ "menu-data": e.menuData,
659
+ "current-menu-id": e.currentMenuId,
660
+ "expanded-keys": e.expandedKeys,
661
+ "tree-props": e.treeProps,
662
+ "item-height": e.itemHeight,
663
+ indent: e.indent,
664
+ "icon-size": e.iconSize,
665
+ "select-menu-bg": e.selectMenuBg,
666
+ "expanded-icon": e.expandedIcon,
667
+ "collapsed-icon": e.collapsedIcon,
668
+ "icon-renderer": e.iconRenderer,
669
+ "icon-library": e.iconLibrary,
670
+ onNodeClick: l,
671
+ onNodeExpand: h,
672
+ onNodeCollapse: c
673
+ }, null, 8, ["menu-data", "current-menu-id", "expanded-keys", "tree-props", "item-height", "indent", "icon-size", "select-menu-bg", "expanded-icon", "collapsed-icon", "icon-renderer", "icon-library"])
674
+ ]),
675
+ e.showFooter ? (s(), g(Ae, {
676
+ key: 0,
677
+ "popup-left": e.popupLeft,
678
+ "user-info": e.userInfo,
679
+ actions: e.userActions,
680
+ "popup-delay": e.popupDelay,
681
+ "nav-footer-width": e.navFooterWidth,
682
+ "user-info-card-type": e.userInfoCardType,
683
+ "show-popup-user-info": e.showPopupUserInfo,
684
+ onActionClick: b
685
+ }, null, 8, ["popup-left", "user-info", "actions", "popup-delay", "nav-footer-width", "user-info-card-type", "show-popup-user-info"])) : I("", !0)
686
+ ]));
687
+ }
688
+ }), ze = /* @__PURE__ */ N(we, [["__scopeId", "data-v-9caa952a"]]), He = $(ze);
689
+ export {
690
+ He as CustomSidebar,
691
+ ne as MENU_COLOR_STRATEGY,
692
+ We as MENU_LOADING_STATES,
693
+ M as MENU_TYPE,
694
+ P as NODE_CLICK_TYPES,
695
+ Ke as SPECIAL_ROUTES,
696
+ j as TREE_PROPS,
697
+ v as USER_INFO_CARD_TYPES,
698
+ Be as collapseNodeKeys,
699
+ He as default,
700
+ $e as expandNodeKeys,
701
+ se as findExpandPath,
702
+ U as findExpandPathById,
703
+ ae as findMenuByPath,
704
+ ue as getFirstLeafMenu,
705
+ re as getMenuIconColorById,
706
+ De as getParentNodeIdsById,
707
+ z as isParentMenuActive,
708
+ ie as isParentRouteActive,
709
+ oe as isPathInMenu,
710
+ ce as processMenuTreeWithLeaf,
711
+ le as transformMenuData
712
+ };
@@ -0,0 +1,7 @@
1
+ import { w as t } from "./chunks/index.bCzIhWFw.js";
2
+ import { C as o } from "./chunks/layout.BREUWPEJ.js";
3
+ const a = t(o);
4
+ export {
5
+ a as CustomTitle,
6
+ a as default
7
+ };