aibox-custom-component-packages 0.0.6 → 0.0.8

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