aibox-custom-component-packages 0.0.8 → 0.0.9

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 (267) hide show
  1. package/es/AddOrEditSupplierDialog.mjs +6 -836
  2. package/es/ApplicationTypeTag.mjs +2 -58
  3. package/es/AuthSection.mjs +3 -199
  4. package/es/AutoShowTooltip.mjs +2 -90
  5. package/es/AvailableRangePreview.mjs +2 -7
  6. package/es/AvailableRangeSetting.mjs +5 -276
  7. package/es/CodeView.mjs +6 -7
  8. package/es/CommonTagsList.mjs +3 -209
  9. package/es/CreateMcpForm.mjs +10 -385
  10. package/es/CustomSidebar.mjs +2 -717
  11. package/es/CustomTitle.mjs +6 -7
  12. package/es/CustomToggle.mjs +2 -224
  13. package/es/DialogContainer.mjs +2 -136
  14. package/es/DocSyncSelect.mjs +2 -2661
  15. package/es/FileDisplay.mjs +4 -4
  16. package/es/FilePreview.mjs +3 -179
  17. package/es/FileUploader.mjs +2 -265
  18. package/es/Logo.mjs +2 -72
  19. package/es/McpFormDialog.mjs +11 -8
  20. package/es/McpParamsSet.mjs +8 -630
  21. package/es/MdEditor.mjs +2 -201
  22. package/es/PageContainer.mjs +4 -584
  23. package/es/ParameterTable.mjs +6 -2290
  24. package/es/PublishRecord.mjs +2 -180
  25. package/es/RadioGroup.mjs +2 -119
  26. package/es/SourcePublish.mjs +7 -1156
  27. package/es/Table.mjs +6 -10
  28. package/es/assets/AddOrEditSupplierDialog.css +1 -1
  29. package/es/assets/AiboxTable.css +1 -1
  30. package/es/assets/ApplicationTypeTag.css +1 -1
  31. package/es/assets/AuthSection.css +1 -1
  32. package/es/assets/AutoShowTooltip.css +1 -1
  33. package/es/assets/{index3.css → AvailableRangePreview.css} +1 -1
  34. package/es/assets/CodeView.css +1 -0
  35. package/es/assets/CreateMcpForm.css +1 -1
  36. package/es/assets/CustomSidebar.css +1 -1
  37. package/es/assets/CustomToggle.css +1 -1
  38. package/es/assets/DialogContainer.css +1 -1
  39. package/es/assets/DocSyncSelect.css +1 -1
  40. package/es/assets/FileDisplay.css +1 -0
  41. package/es/assets/FilePreview.css +1 -1
  42. package/es/assets/FileUploader.css +1 -1
  43. package/es/assets/Logo.css +1 -1
  44. package/es/assets/{index4.css → McpFormDialog.css} +1 -1
  45. package/es/assets/McpParamsSet.css +1 -1
  46. package/es/assets/MdEditor.css +1 -1
  47. package/es/assets/PageContainer.css +1 -1
  48. package/es/assets/ParameterTable.css +1 -1
  49. package/es/assets/PublishRecord.css +1 -1
  50. package/es/assets/RadioGroup.css +1 -1
  51. package/es/assets/SourcePublish.css +1 -1
  52. package/es/assets/legacy.css +1 -1
  53. package/es/assets/usePreview.css +10 -1
  54. package/es/chunks/AddOrEditSupplierDialog.BKR0RsiJ.js +721 -0
  55. package/es/chunks/AddOrEditSupplierDialog.CjNRipPe.js +721 -0
  56. package/es/chunks/AiboxTable.CrWMAX84.js +635 -0
  57. package/es/chunks/ApplicationTypeTag.Cbdi0D65.js +47 -0
  58. package/es/chunks/AuthSection.DWD_FxtJ.js +201 -0
  59. package/es/chunks/AutoShowTooltip.C_DI9t2Z.js +82 -0
  60. package/es/chunks/AvailableRangePreview.Bz9QkkAM.js +194 -0
  61. package/es/chunks/AvailableRangeSetting.Bq_K1zar.js +229 -0
  62. package/es/chunks/CodeView.CWuSIL_F.js +148 -0
  63. package/es/chunks/CommonTagsList.DSPdgjc3.js +156 -0
  64. package/es/chunks/CreateMcpForm.BBVVd2RN.js +308 -0
  65. package/es/chunks/CreateMcpForm.C8YfDSEM.js +308 -0
  66. package/es/chunks/CustomSidebar.BSGAhmVY.js +585 -0
  67. package/es/chunks/CustomToggle.BxxsaD-W.js +181 -0
  68. package/es/chunks/DialogContainer.DL7aTMDS.js +129 -0
  69. package/es/chunks/DocSyncSelect.Kk88o9gO.js +2290 -0
  70. package/es/chunks/FileDisplay.B5laA4uX.js +1649 -0
  71. package/es/chunks/FileDisplay.BCTNdpl9.js +1649 -0
  72. package/es/chunks/FileDisplay.CBNYrdsK.js +1560 -0
  73. package/es/chunks/FileDisplay.CJ7KCID6.js +1650 -0
  74. package/es/chunks/FilePreview.B9u8ODHp.js +123 -0
  75. package/es/chunks/FilePreview.De4zHsfc.js +123 -0
  76. package/es/chunks/FileUploader.DD-lopf-.js +216 -0
  77. package/es/chunks/Logo.0myMjGux.js +62 -0
  78. package/es/chunks/McpFormDialog.4HDExbTn.js +297 -0
  79. package/es/chunks/McpFormDialog.DNzqqhaX.js +297 -0
  80. package/es/chunks/McpParamsSet.Tlo_lPn-.js +501 -0
  81. package/es/chunks/MdEditor.DtL0Se7T.js +163 -0
  82. package/es/chunks/PageContainer.DXddaRs1.js +462 -0
  83. package/es/chunks/ParameterTable.BCdnj1gW.js +2010 -0
  84. package/es/chunks/PublishRecord.DEzC7hmP.js +133 -0
  85. package/es/chunks/RadioGroup.Czc1JtkN.js +107 -0
  86. package/es/chunks/SourcePublish.Dx-ltk9U.js +956 -0
  87. package/es/chunks/_plugin-vue_export-helper.Ct3qlEzt.js +8 -0
  88. package/es/chunks/chunk.EU29TkMc.js +20 -0
  89. package/es/chunks/config.MfNKPMiA.js +35 -0
  90. package/es/chunks/config.l1J_qxeB.js +270 -0
  91. package/es/chunks/enums.DDPWAqdV.js +13 -0
  92. package/es/chunks/field-types.zf28gvKR.js +7 -0
  93. package/es/chunks/files.DvOT1nf3.js +14 -0
  94. package/es/chunks/i18n.CxsxtRq_.js +418 -0
  95. package/es/chunks/layout.C9wKDpv-.js +19 -0
  96. package/es/chunks/publish.Z0XAASut.js +50 -0
  97. package/es/chunks/request.CfOHcfgX.js +5 -0
  98. package/es/chunks/usePreview.CMMjOD_o.js +148 -0
  99. package/es/chunks/usePreview.agdxmOk8.js +126 -0
  100. package/es/chunks/withinstall.dLh4K-0g.js +7 -0
  101. package/es/index.mjs +258 -412
  102. package/index.css +1 -1
  103. package/lib/AddOrEditSupplierDialog.js +1 -1
  104. package/lib/ApplicationTypeTag.js +1 -1
  105. package/lib/AuthSection.js +1 -1
  106. package/lib/AutoShowTooltip.js +1 -1
  107. package/lib/AvailableRangePreview.js +1 -1
  108. package/lib/AvailableRangeSetting.js +1 -1
  109. package/lib/CodeView.js +1 -1
  110. package/lib/CommonTagsList.js +1 -1
  111. package/lib/CreateMcpForm.js +1 -1
  112. package/lib/CustomSidebar.js +1 -1
  113. package/lib/CustomTitle.js +1 -1
  114. package/lib/CustomToggle.js +1 -1
  115. package/lib/DialogContainer.js +1 -1
  116. package/lib/DocSyncSelect.js +1 -2
  117. package/lib/FileDisplay.js +1 -1
  118. package/lib/FilePreview.js +1 -1
  119. package/lib/FileUploader.js +1 -1
  120. package/lib/Logo.js +1 -1
  121. package/lib/McpFormDialog.js +1 -1
  122. package/lib/McpParamsSet.js +1 -1
  123. package/lib/MdEditor.js +1 -1
  124. package/lib/PageContainer.js +1 -1
  125. package/lib/ParameterTable.js +1 -1
  126. package/lib/PublishRecord.js +1 -5
  127. package/lib/RadioGroup.js +1 -1
  128. package/lib/SourcePublish.js +1 -1
  129. package/lib/Table.js +1 -1
  130. package/lib/assets/AddOrEditSupplierDialog.css +1 -1
  131. package/lib/assets/AiboxTable.css +1 -1
  132. package/lib/assets/ApplicationTypeTag.css +1 -1
  133. package/lib/assets/AuthSection.css +1 -1
  134. package/lib/assets/AutoShowTooltip.css +1 -1
  135. package/lib/assets/{index3.css → AvailableRangePreview.css} +1 -1
  136. package/lib/assets/CodeView.css +1 -0
  137. package/lib/assets/CreateMcpForm.css +1 -1
  138. package/lib/assets/CustomSidebar.css +1 -1
  139. package/lib/assets/CustomToggle.css +1 -1
  140. package/lib/assets/DialogContainer.css +1 -1
  141. package/lib/assets/DocSyncSelect.css +1 -1
  142. package/lib/assets/FileDisplay.css +1 -0
  143. package/lib/assets/FilePreview.css +1 -1
  144. package/lib/assets/FileUploader.css +1 -1
  145. package/lib/assets/Logo.css +1 -1
  146. package/lib/assets/{index4.css → McpFormDialog.css} +1 -1
  147. package/lib/assets/McpParamsSet.css +1 -1
  148. package/lib/assets/MdEditor.css +1 -1
  149. package/lib/assets/PageContainer.css +1 -1
  150. package/lib/assets/ParameterTable.css +1 -1
  151. package/lib/assets/PublishRecord.css +1 -1
  152. package/lib/assets/RadioGroup.css +1 -1
  153. package/lib/assets/SourcePublish.css +1 -1
  154. package/lib/assets/legacy.css +1 -1
  155. package/lib/assets/usePreview.css +10 -1
  156. package/lib/chunks/AddOrEditSupplierDialog.D0DSQZiS.js +1 -0
  157. package/lib/chunks/AddOrEditSupplierDialog.XtPxc5yr.js +1 -0
  158. package/lib/chunks/AiboxTable.DFyqwoGc.js +1 -0
  159. package/lib/chunks/ApplicationTypeTag.CZReMt-9.js +1 -0
  160. package/lib/chunks/AuthSection.CP9c-YTW.js +1 -0
  161. package/lib/chunks/AutoShowTooltip.D3QQ36Bm.js +1 -0
  162. package/lib/chunks/AvailableRangePreview.DvREyHNH.js +1 -0
  163. package/lib/chunks/AvailableRangeSetting.DDHTOLJA.js +1 -0
  164. package/lib/chunks/CodeView.DeBxLqyC.js +1 -0
  165. package/lib/chunks/CommonTagsList.DbNcVId5.js +1 -0
  166. package/lib/chunks/CreateMcpForm.Cm9eHXWg.js +1 -0
  167. package/lib/chunks/CreateMcpForm.DNijYbgd.js +1 -0
  168. package/lib/chunks/CustomSidebar.Dojb1xoS.js +1 -0
  169. package/lib/chunks/CustomToggle.Dz7MRyOY.js +1 -0
  170. package/lib/chunks/DialogContainer.C0Hsohgn.js +1 -0
  171. package/lib/chunks/DocSyncSelect.1gaXRzps.js +2 -0
  172. package/lib/chunks/FileDisplay.B4gn0Jhp.js +59 -0
  173. package/lib/chunks/FileDisplay.B7JWIcFg.js +59 -0
  174. package/lib/chunks/FileDisplay.BSNmvK44.js +59 -0
  175. package/lib/chunks/FileDisplay.DjtHza32.js +59 -0
  176. package/lib/chunks/FilePreview.DX9e8_nx.js +1 -0
  177. package/lib/chunks/FilePreview.b1Gine59.js +1 -0
  178. package/lib/chunks/FileUploader.6IW_QL-h.js +1 -0
  179. package/lib/chunks/Logo.Jr7hhaH0.js +1 -0
  180. package/lib/chunks/McpFormDialog.CL2bInts.js +6 -0
  181. package/lib/chunks/McpFormDialog.DbhQIwYW.js +6 -0
  182. package/lib/chunks/McpParamsSet.BYrxVvDL.js +1 -0
  183. package/lib/chunks/MdEditor.rVQbuxCg.js +1 -0
  184. package/lib/chunks/PageContainer.elwvD8VL.js +1 -0
  185. package/lib/chunks/ParameterTable.CeufAEXh.js +1 -0
  186. package/lib/chunks/PublishRecord.B7xYlRKJ.js +5 -0
  187. package/lib/chunks/RadioGroup.cl57IvY3.js +1 -0
  188. package/lib/chunks/SourcePublish.K4tntn9l.js +1 -0
  189. package/lib/chunks/_plugin-vue_export-helper.Bgn9wawX.js +1 -0
  190. package/lib/chunks/chunk.BbA6Ugdl.js +1 -0
  191. package/lib/chunks/config.CDNV0bUm.js +1 -0
  192. package/lib/chunks/config.CZl1kYtI.js +1 -0
  193. package/lib/chunks/enums.DbdzzIzx.js +1 -0
  194. package/lib/chunks/field-types.C6f_z2S_.js +1 -0
  195. package/lib/chunks/files.BEXWmB32.js +1 -0
  196. package/lib/chunks/i18n.BGe5gOau.js +1 -0
  197. package/lib/chunks/layout.CK394aWE.js +1 -0
  198. package/lib/chunks/publish.DsepP8ll.js +1 -0
  199. package/lib/chunks/request.BuoFTs7h.js +1 -0
  200. package/lib/chunks/usePreview.7CCbmgQM.js +1 -0
  201. package/lib/chunks/usePreview.Dmhz8azZ.js +1 -0
  202. package/lib/chunks/withinstall.65aRnaVc.js +1 -0
  203. package/lib/index.js +2 -2
  204. package/package.json +5 -5
  205. package/es/AiboxTabs.mjs +0 -71
  206. package/es/assets/AiboxTabs.css +0 -1
  207. package/es/assets/index.css +0 -1
  208. package/es/assets/index2.css +0 -1
  209. package/es/assets/index5.css +0 -1
  210. package/es/chunks/AiboxTable.CF4T_OCu.js +0 -645
  211. package/es/chunks/AiboxTable.DUGBBVXh.js +0 -645
  212. package/es/chunks/_plugin-vue_export-helper.CHgC5LLL.js +0 -9
  213. package/es/chunks/config.DPkdwjwD.js +0 -49
  214. package/es/chunks/config.Dklrsn-B.js +0 -49
  215. package/es/chunks/config.RrNwuFkQ.js +0 -325
  216. package/es/chunks/config.gNZ_rT87.js +0 -325
  217. package/es/chunks/enums.Dvec-maC.js +0 -62
  218. package/es/chunks/enums.WrpwbF4w.js +0 -14
  219. package/es/chunks/field-types.CPnMOjle.js +0 -13
  220. package/es/chunks/files.cduUqjHX.js +0 -16
  221. package/es/chunks/i18n.DDMVloiU.js +0 -443
  222. package/es/chunks/i18n.k9Q_HVMs.js +0 -443
  223. package/es/chunks/index.BDd6hHiU.js +0 -172
  224. package/es/chunks/index.BT1khSY9.js +0 -111
  225. package/es/chunks/index.CDvh263l.js +0 -257
  226. package/es/chunks/index.CF_YHLP5.js +0 -257
  227. package/es/chunks/index.CSjjAi3w.js +0 -396
  228. package/es/chunks/index.CdEBk4F_.js +0 -134
  229. package/es/chunks/index.DdD1VsH1.js +0 -396
  230. package/es/chunks/index.Dx-mCS4E.js +0 -1298
  231. package/es/chunks/index.bCzIhWFw.js +0 -7
  232. package/es/chunks/layout.BREUWPEJ.js +0 -26
  233. package/es/chunks/layout.CygCXa6s.js +0 -26
  234. package/es/chunks/publish.DlD0o09n.js +0 -50
  235. package/es/chunks/request.24c3shPx.js +0 -5
  236. package/es/chunks/usePreview.B5lboHeg.js +0 -153
  237. package/es/chunks/usePreview.BHvXwaNi.js +0 -157
  238. package/lib/AiboxTabs.js +0 -1
  239. package/lib/assets/AiboxTabs.css +0 -1
  240. package/lib/assets/index.css +0 -1
  241. package/lib/assets/index2.css +0 -1
  242. package/lib/assets/index5.css +0 -1
  243. package/lib/chunks/AiboxTable.BnoHJ7xL.js +0 -1
  244. package/lib/chunks/AiboxTable.CJOPGJtU.js +0 -1
  245. package/lib/chunks/_plugin-vue_export-helper.BHFhmbuH.js +0 -1
  246. package/lib/chunks/config.1oaIKLGn.js +0 -1
  247. package/lib/chunks/config.BF7MO0O5.js +0 -1
  248. package/lib/chunks/enums.DnuzPZCR.js +0 -1
  249. package/lib/chunks/enums.DpU2er5r.js +0 -1
  250. package/lib/chunks/field-types.Ch_2yDfg.js +0 -1
  251. package/lib/chunks/files.B3-8UC0v.js +0 -1
  252. package/lib/chunks/i18n.DgOp_D7R.js +0 -1
  253. package/lib/chunks/index.BNivYbtq.js +0 -1
  254. package/lib/chunks/index.B_keI1Aq.js +0 -1
  255. package/lib/chunks/index.Bc71XWQn.js +0 -1
  256. package/lib/chunks/index.C7aZx6RG.js +0 -6
  257. package/lib/chunks/index.CH7XdMru.js +0 -1
  258. package/lib/chunks/index.CJFk1R2u.js +0 -59
  259. package/lib/chunks/index.CaidDlAx.js +0 -1
  260. package/lib/chunks/index.CkihWzK6.js +0 -1
  261. package/lib/chunks/index.DGWHQFdx.js +0 -6
  262. package/lib/chunks/layout.DbBSbLgm.js +0 -1
  263. package/lib/chunks/layout.sgE9JoNq.js +0 -1
  264. package/lib/chunks/publish.3TrK3fZf.js +0 -1
  265. package/lib/chunks/request.D8T4MgGX.js +0 -1
  266. package/lib/chunks/usePreview.2PZJSy5w.js +0 -1
  267. package/lib/chunks/usePreview.BojIDW7Z.js +0 -1
@@ -1,717 +1,2 @@
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
- };
1
+ import { _ as e, a as t, b as n, c as r, d as i, f as a, g as o, h as s, i as c, l, m as u, n as d, o as f, p, r as m, s as h, t as g, u as _, v, x as y, y as b } from "./chunks/CustomSidebar.BSGAhmVY.js";
2
+ export { g as CustomSidebar, g as default, h as MENU_COLOR_STRATEGY, d as MENU_LOADING_STATES, r as MENU_TYPE, m as NODE_CLICK_TYPES, c as SPECIAL_ROUTES, t as TREE_PROPS, f as USER_INFO_CARD_TYPES, l as collapseNodeKeys, _ as expandNodeKeys, i as findExpandPath, a as findExpandPathById, p as findMenuByPath, u as getFirstLeafMenu, s as getMenuIconColorById, o as getParentNodeIdsById, e as isParentMenuActive, v as isParentRouteActive, b as isPathInMenu, n as processMenuTreeWithLeaf, y as transformMenuData };