@pubinfo-pr/core 0.203.1 → 0.203.2

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 (83) hide show
  1. package/dist/{AppSetting-Dl8pVkN4.js → AppSetting-B7mE7iHt.js} +42 -42
  2. package/dist/{HButton-CzYSwI6a.js → HButton-Dt6qGhhR.js} +7 -7
  3. package/dist/{HCheckList-CHR-lWIq.js → HCheckList-DAkb0SBD.js} +15 -15
  4. package/dist/{HDivider-CXS9rl4C.js → HDivider-Ds5MMqtm.js} +3 -3
  5. package/dist/{HInput-CSVwTg1Q.js → HInput-BrsX9848.js} +10 -10
  6. package/dist/{HSlideover-Bc6OHPHe.js → HSlideover-CXBJxuQo.js} +120 -120
  7. package/dist/{HToggle-C_iVIpxv.js → HToggle-DEwBoDsw.js} +8 -8
  8. package/dist/{HTooltip-BHBHfrCD.js → HTooltip-DjAU-Evn.js} +6 -6
  9. package/dist/{HeaderFullMenu-DCF-gTCZ.js → HeaderFullMenu-l2890Bzo.js} +95 -94
  10. package/dist/HeaderThinMenu-5K6HXiQk.js +438 -0
  11. package/dist/PreferencesContent-CWHTBvHQ.js +701 -0
  12. package/dist/SettingBreadcrumb-p3hD9w-9.js +45 -0
  13. package/dist/SettingCopyright-BgWvocrJ.js +45 -0
  14. package/dist/{SettingEnableTransition-BBH52KKl.js → SettingEnableTransition-Cf57pLUk.js} +19 -19
  15. package/dist/SettingHome-tNMtRHoT.js +31 -0
  16. package/dist/SettingMenu-Du4Xhle1.js +111 -0
  17. package/dist/{SettingMode-BwhhUYlz.js → SettingMode-DGWqKJHt.js} +14 -14
  18. package/dist/SettingNavSearch-C_8VmQmD.js +31 -0
  19. package/dist/SettingOther-B9iOz69R.js +48 -0
  20. package/dist/SettingPage-C0TfmEKp.js +22 -0
  21. package/dist/{SettingTabbar-DuqQVRnz.js → SettingTabbar-C7ZQrcN4.js} +58 -58
  22. package/dist/{SettingThemes-Doo6Ax3u.js → SettingThemes-022eXO9f.js} +44 -44
  23. package/dist/SettingToolbar-Bh9aXNpl.js +50 -0
  24. package/dist/SettingTopbar-DjB1Izhm.js +49 -0
  25. package/dist/{SettingWidthMode-VaN0CrBa.js → SettingWidthMode-D7sRlBUK.js} +14 -14
  26. package/dist/auth-B65CJEOe.js +4242 -0
  27. package/dist/{change-organization-OjxZhWST.js → change-organization-sU8aNfhI.js} +38 -38
  28. package/dist/{change-password-B6kO54-d.js → change-password-Dxzhg43p.js} +73 -73
  29. package/dist/{chunk-EsrJ1IKw.js → chunk-CD4vhpVs.js} +3 -3
  30. package/dist/{components-DVIyiEVI.js → components-emseuaQx.js} +1584 -1584
  31. package/dist/core/request.d.ts +1 -1
  32. package/dist/core-4H5JBsa5.js +4885 -0
  33. package/dist/dist-7OjQvlya.js +468 -0
  34. package/dist/engine-oniguruma-uxNZ2DGJ.js +243 -0
  35. package/dist/features/settings/index.d.ts +90 -1
  36. package/dist/{form-EQ9eL9hv.js → form-C3VHofnN.js} +923 -443
  37. package/dist/index.js +3724 -3690
  38. package/dist/{modal-CSWipFvB.js → modal-Bl5xHbxa.js} +15510 -15790
  39. package/dist/{not-found-DBe-djEg.js → not-found-DbHOY5cU.js} +19 -19
  40. package/dist/{not-permission-DQzWCpOK.js → not-permission-DwERxb_u.js} +19 -19
  41. package/dist/overlayscrollbars-vue-mGyICRMi.js +1460 -0
  42. package/dist/{profile-DJ3gpjsS.js → profile-Dq66-Gsl.js} +3340 -3277
  43. package/dist/{question-line-BKVlJGUb.js → question-line-D7ecIumZ.js} +2 -2
  44. package/dist/{reload-DAR8dVYw.js → reload-CbuQgTlC.js} +4 -4
  45. package/dist/{right-VKgVtqD5.js → right-DYiPS7dU.js} +6 -6
  46. package/dist/style.css +1 -1
  47. package/dist/{tree-select-CTjWj5WT.js → tree-select-B8cTcGLa.js} +2575 -2256
  48. package/dist/watchDiff-CPZFtaOC.js +655 -0
  49. package/package.json +41 -41
  50. package/src/built-in/layout-component/composables/useLayoutVisible.ts +1 -1
  51. package/src/built-in/system-info/components/SystemInfo.vue +68 -66
  52. package/src/built-in/system-info/index.ts +4 -4
  53. package/src/core/ctx.ts +2 -2
  54. package/src/core/request.ts +1 -1
  55. package/src/features/components/PubinfoApp/index.vue +1 -0
  56. package/types/auto-imports.d.ts +63 -63
  57. package/types/components.d.ts +45 -1
  58. package/dist/HeaderFullMenu-BRhGliRJ.js +0 -6
  59. package/dist/HeaderThinMenu-B_7vLcQX.js +0 -6
  60. package/dist/HeaderThinMenu-PA12XAvb.js +0 -437
  61. package/dist/PreferencesContent-cll4nwwl.js +0 -695
  62. package/dist/SettingBreadcrumb-BvSc7VUo.js +0 -45
  63. package/dist/SettingCopyright-DcWLKM5d.js +0 -45
  64. package/dist/SettingHome-Cd43oJmB.js +0 -31
  65. package/dist/SettingMenu-CJsN4F1l.js +0 -111
  66. package/dist/SettingNavSearch-BhHUWem3.js +0 -31
  67. package/dist/SettingOther-CDY0jSVT.js +0 -48
  68. package/dist/SettingPage-B0WNvUlj.js +0 -22
  69. package/dist/SettingToolbar-CHV_dVJ9.js +0 -50
  70. package/dist/SettingTopbar-CF1K_XIt.js +0 -49
  71. package/dist/auth-CPSkJwBz.js +0 -3968
  72. package/dist/core-Bg2PEcZK.js +0 -4884
  73. package/dist/dist-DAb-7mqe.js +0 -468
  74. package/dist/engine-oniguruma-CUfGsBrF.js +0 -243
  75. package/dist/overlayscrollbars-vue-BOGU2FK-.js +0 -1436
  76. package/dist/pick-C42gkI1h.js +0 -10
  77. package/dist/watchDiff-C4eGkl9e.js +0 -397
  78. /package/dist/{_plugin-vue_export-helper-DaPiLSxE.js → _plugin-vue_export-helper-sUTDUeGO.js} +0 -0
  79. /package/dist/{json-S7wVLDnW.js → json-CC4oV-bd.js} +0 -0
  80. /package/dist/{useContext-D6pJCZez.js → useContext-DLtu9F7E.js} +0 -0
  81. /package/dist/{vitesse-dark-BsnBIHGG.js → vitesse-dark-CxkWMfh6.js} +0 -0
  82. /package/dist/{vitesse-light-Cs_6DF7j.js → vitesse-light-DY25e6F3.js} +0 -0
  83. /package/dist/{wasm-EvDQvzqp.js → wasm-DAU6f5s5.js} +0 -0
@@ -0,0 +1,438 @@
1
+ import { n as __exportAll } from "./chunk-CD4vhpVs.js";
2
+ import { n as api } from "./modal-Bl5xHbxa.js";
3
+ import { d as useTimeoutFn } from "./dist-7OjQvlya.js";
4
+ import { a as PubinfoIcon_default } from "./components-emseuaQx.js";
5
+ import { t as _plugin_vue_export_helper_default } from "./_plugin-vue_export-helper-sUTDUeGO.js";
6
+ import { n as useContext } from "./useContext-DLtu9F7E.js";
7
+ import { t as P } from "./overlayscrollbars-vue-mGyICRMi.js";
8
+ import { usePartyLogin } from "./index.js";
9
+ import { Fragment, Teleport, Transition, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createVNode, defineComponent, guardReactiveProps, inject, mergeProps, nextTick, normalizeClass, normalizeProps, normalizeStyle, openBlock, provide, reactive, ref, renderList, renderSlot, resolveComponent, shallowRef, toDisplayString, toHandlers, unref, watch, withCtx, withModifiers } from "vue";
10
+ import { useRoute, useRouter } from "vue-router";
11
+ var _hoisted_1$1 = { class: "relative inline-flex" }, _hoisted_2 = {
12
+ key: 0,
13
+ class: "absolute left-[50%] top-0 z-20 whitespace-nowrap rounded-full bg-ui-primary px-1.5 text-xs text-ui-text ring-1 ring-light -translate-y-[50%] dark:ring-dark"
14
+ }, HBadge_default = /* @__PURE__ */ defineComponent({
15
+ __name: "HBadge",
16
+ props: { value: { type: [
17
+ String,
18
+ Number,
19
+ Boolean
20
+ ] } },
21
+ setup(e) {
22
+ let t = e, n = computed(() => {
23
+ switch (typeof t.value) {
24
+ case "string": return t.value.length > 0;
25
+ case "number": return t.value > 0;
26
+ case "boolean": return t.value;
27
+ default: return t.value !== void 0 && t.value !== null;
28
+ }
29
+ }), r = ref({
30
+ enterActiveClass: "ease-in-out duration-500",
31
+ enterFromClass: "opacity-0",
32
+ enterToClass: "opacity-100",
33
+ leaveActiveClass: "ease-in-out duration-500",
34
+ leaveFromClass: "opacity-100",
35
+ leaveToClass: "opacity-0"
36
+ });
37
+ return (t, i) => (openBlock(), createElementBlock("div", _hoisted_1$1, [renderSlot(t.$slots, "default"), createVNode(Transition, normalizeProps(guardReactiveProps(unref(r))), {
38
+ default: withCtx(() => [unref(n) ? (openBlock(), createElementBlock("span", _hoisted_2, toDisplayString(e.value), 1)) : createCommentVNode("", !0)]),
39
+ _: 1
40
+ }, 16)]));
41
+ }
42
+ });
43
+ function createInjectionKey(e) {
44
+ return e;
45
+ }
46
+ const rootMenuInjectionKey = createInjectionKey("rootMenu");
47
+ var _hoisted_1 = ["title"], item_default = /* @__PURE__ */ _plugin_vue_export_helper_default(/* @__PURE__ */ defineComponent({
48
+ name: "MenuItem",
49
+ __name: "item",
50
+ props: {
51
+ uniqueKey: {},
52
+ item: {},
53
+ level: { default: 0 },
54
+ subMenu: {
55
+ type: Boolean,
56
+ default: !1
57
+ },
58
+ expand: {
59
+ type: Boolean,
60
+ default: !1
61
+ }
62
+ },
63
+ setup(e, { expose: t }) {
64
+ let n = e, i = inject(rootMenuInjectionKey), { generateTitle: o } = useContext(), s = ref(), c = computed(() => n.subMenu ? i.subMenus[n.uniqueKey[n.uniqueKey.length - 1]]?.active : i.activeIndex === n.uniqueKey[n.uniqueKey.length - 1]), l = computed(() => c.value && (!n.subMenu || i.isMenuPopup)), d = computed(() => {
65
+ let e;
66
+ return n.item.meta?.icon && (e = n.item.meta.icon), c.value && (n.item.meta?.activeIcon === "system-point" ? e = "system-point" : n.item.meta?.activeIcon && (e = n.item.meta.activeIcon)), e;
67
+ }), f = computed(() => n.item.meta?.iconOptions), p = computed(() => {
68
+ let e = f.value?.boxType;
69
+ return e && e !== "null" ? e : void 0;
70
+ }), h = computed(() => f.value?.iconColor || void 0), g = computed(() => i.isMenuPopup ? "" : `padding-left: ${32 * (n.level ?? 0)}px`);
71
+ return t({ ref: s }), (t, n) => {
72
+ let a = HBadge_default;
73
+ return openBlock(), createElementBlock("div", {
74
+ ref_key: "itemRef",
75
+ ref: s,
76
+ class: normalizeClass(["menu-item relative transition-all", {
77
+ active: unref(l),
78
+ "px-2 py-1": unref(i).props.rounded,
79
+ "px-1! py-2!": unref(i).props.rounded && unref(i).isMenuPopup && e.level === 0 && unref(i).props.mode === "horizontal"
80
+ }])
81
+ }, [createElementVNode("div", {
82
+ class: normalizeClass(["group menu-item-container h-full w-full flex cursor-pointer items-center justify-between gap-1 px-5 py-14px text-[var(--g-sub-sidebar-menu-color)] transition-all hover:(bg-[var(--g-sub-sidebar-menu-hover-bg)] text-[var(--g-sub-sidebar-menu-hover-color)])", {
83
+ "text-[var(--g-sub-sidebar-menu-active-color)]! bg-[var(--g-sub-sidebar-menu-active-bg)]!": unref(l),
84
+ "rounded-2": unref(i).props.rounded,
85
+ "px-2!": unref(i).isMenuPopup && e.level === 0,
86
+ "py-3!": unref(i).props.rounded && unref(i).isMenuPopup && e.level !== 0
87
+ }]),
88
+ title: unref(o)(e.item.meta?.title)
89
+ }, [createElementVNode("div", {
90
+ class: normalizeClass(["menu-item-container-layout inline-flex flex-1 items-center justify-center gap-[12px]", {
91
+ "flex-col gap-none": unref(i).isMenuPopup && e.level === 0,
92
+ "flex-col gap-[2px]!": unref(i).isMenuPopup && e.level === 0 && unref(i).props.showCollapseName,
93
+ "w-full": unref(i).isMenuPopup && e.level === 0 && unref(i).props.showCollapseName && unref(i).props.mode === "vertical",
94
+ "w-[50px]": unref(i).isMenuPopup && e.level === 0 && unref(i).props.showCollapseName && unref(i).props.mode === "horizontal"
95
+ }]),
96
+ style: normalizeStyle(unref(g))
97
+ }, [
98
+ unref(d) && unref(d) !== "system-point" ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [unref(f) && unref(p) ? (openBlock(), createBlock(unref(PubinfoIcon_default), {
99
+ key: 0,
100
+ small: "",
101
+ name: unref(d),
102
+ box: unref(p),
103
+ size: 20,
104
+ "icon-size": unref(f)?.iconSize,
105
+ angle: unref(f)?.angle,
106
+ background: unref(f)?.background,
107
+ radius: unref(f)?.radius,
108
+ color: (unref(d) || "").startsWith("antd:") ? unref(h) || "#ffffff" : void 0,
109
+ class: "menu-item-container-icon transition-transform group-hover:scale-115"
110
+ }, null, 8, [
111
+ "name",
112
+ "box",
113
+ "icon-size",
114
+ "angle",
115
+ "background",
116
+ "radius",
117
+ "color"
118
+ ])) : (openBlock(), createBlock(unref(PubinfoIcon_default), {
119
+ key: 1,
120
+ name: unref(d),
121
+ size: 20,
122
+ color: (unref(d) || "").startsWith("antd:") ? unref(h) : void 0,
123
+ class: "menu-item-container-icon transition-transform group-hover:scale-115"
124
+ }, null, 8, ["name", "color"]))], 64)) : createCommentVNode("", !0),
125
+ unref(i).isMenuPopup && e.level === 0 && !unref(i).props.showCollapseName ? createCommentVNode("", !0) : (openBlock(), createElementBlock("span", {
126
+ key: 1,
127
+ class: normalizeClass(["title w-0 flex-1 truncate text-sm transition-height transition-opacity transition-width", {
128
+ "opacity-0 w-0 h-0": unref(i).isMenuPopup && e.level === 0 && !unref(i).props.showCollapseName,
129
+ "w-full text-center": unref(i).isMenuPopup && e.level === 0 && unref(i).props.showCollapseName,
130
+ "system-point": unref(d) === "system-point" && unref(l)
131
+ }])
132
+ }, toDisplayString(unref(o)(e.item.meta?.title)), 3)),
133
+ e.item.meta?.badge ? (openBlock(), createBlock(a, {
134
+ key: 2,
135
+ value: typeof e.item.meta.badge == "function" ? e.item.meta.badge() : e.item.meta.badge,
136
+ class: normalizeClass(["badge", { "opacity-0": unref(i).isMenuPopup && e.level === 0 }])
137
+ }, null, 8, ["value", "class"])) : createCommentVNode("", !0)
138
+ ], 6), e.subMenu && !(unref(i).isMenuPopup && e.level === 0) ? (openBlock(), createElementBlock("i", {
139
+ key: 0,
140
+ class: normalizeClass(["sharp-corner", [
141
+ e.expand ? "before:-rotate-45 before:-translate-x-[2px] after:rotate-45 after:translate-x-[2px]" : "before:rotate-45 before:-translate-x-[2px] after:-rotate-45 after:translate-x-[2px] ",
142
+ unref(i).isMenuPopup && e.level === 0 && "opacity-0",
143
+ unref(i).isMenuPopup && e.level !== 0 && "-rotate-90 -top-[1.5px]"
144
+ ]])
145
+ }, null, 2)) : createCommentVNode("", !0)], 10, _hoisted_1)], 2);
146
+ };
147
+ }
148
+ }), [["__scopeId", "data-v-dd5786b9"]]), sub_default = /* @__PURE__ */ defineComponent({
149
+ name: "SubMenu",
150
+ __name: "sub",
151
+ props: {
152
+ uniqueKey: {},
153
+ menu: {},
154
+ level: { default: 0 }
155
+ },
156
+ setup(e) {
157
+ let t = e, r = t.menu.path ?? JSON.stringify(t.menu), i = shallowRef(), a = shallowRef(), s = inject(rootMenuInjectionKey), u = computed(() => s.openedMenus.includes(t.uniqueKey[t.uniqueKey.length - 1])), f = computed(() => s.isMenuPopup ? {
158
+ enter(e) {
159
+ e.offsetHeight > window.innerHeight && (e.style.height = `${window.innerHeight}px`);
160
+ },
161
+ afterEnter: () => {},
162
+ beforeLeave: (e) => {
163
+ e.style.overflow = "hidden", e.style.maxHeight = `${e.offsetHeight}px`;
164
+ },
165
+ leave: (e) => {
166
+ e.style.maxHeight = "0";
167
+ },
168
+ afterLeave(e) {
169
+ e.style.overflow = "", e.style.maxHeight = "";
170
+ }
171
+ } : {
172
+ enter(e) {
173
+ let t = e.offsetHeight;
174
+ e.style.maxHeight = "0", e.style.overflow = "hidden", e.offsetHeight, e.style.maxHeight = `${t}px`;
175
+ },
176
+ afterEnter(e) {
177
+ e.style.overflow = "", e.style.maxHeight = "";
178
+ },
179
+ beforeLeave(e) {
180
+ e.style.overflow = "hidden", e.style.maxHeight = `${e.offsetHeight}px`;
181
+ },
182
+ leave(e) {
183
+ e.style.maxHeight = "0";
184
+ },
185
+ afterLeave(e) {
186
+ e.style.overflow = "", e.style.maxHeight = "";
187
+ }
188
+ }), p = computed(() => s.isMenuPopup ? {
189
+ enterActiveClass: "ease-in-out duration-300",
190
+ enterFromClass: "opacity-0 translate-x-4",
191
+ enterToClass: "opacity-100",
192
+ leaveActiveClass: "ease-in-out duration-300",
193
+ leaveFromClass: "opacity-100",
194
+ leaveToClass: "opacity-0"
195
+ } : {
196
+ enterActiveClass: "ease-in-out duration-300",
197
+ enterFromClass: "opacity-0",
198
+ enterToClass: "opacity-100",
199
+ leaveActiveClass: "ease-in-out duration-300",
200
+ leaveFromClass: "opacity-100",
201
+ leaveToClass: "opacity-0"
202
+ }), _ = computed(() => {
203
+ let e = !0;
204
+ return t.menu.children ? t.menu.children.every((e) => e.meta?.sidebar === !1) && (e = !1) : e = !1, e;
205
+ });
206
+ function v() {
207
+ s.isMenuPopup && _.value || (_.value ? s.handleSubMenuClick(r, t.uniqueKey) : s.handleMenuItemClick(r, t.menu.meta));
208
+ }
209
+ let y;
210
+ function b() {
211
+ s.isMenuPopup && (s.mouseInMenu = t.uniqueKey, y?.(), {stop: y} = useTimeoutFn(() => {
212
+ if (_.value) s.openMenu(r, t.uniqueKey), nextTick(() => {
213
+ let e = i.value.ref, n = 0, r = 0;
214
+ s.props.mode === "vertical" || t.level !== 0 ? (n = e.getBoundingClientRect().top + e.scrollTop, r = e.getBoundingClientRect().left + e.getBoundingClientRect().width, n + a.value.getElement().offsetHeight > window.innerHeight && (n = window.innerHeight - a.value.getElement().offsetHeight)) : (n = e.getBoundingClientRect().top + e.getBoundingClientRect().height, r = e.getBoundingClientRect().left, n + a.value.getElement().offsetHeight > window.innerHeight && (a.value.getElement().style.height = `${window.innerHeight - n}px`)), a.value.getElement().style.top = `${n}px`, a.value.getElement().style.left = `${r}px`;
215
+ });
216
+ else {
217
+ let e = t.menu.children ? s.subMenus[r].indexPath.at(-1) : s.items[r].indexPath.at(-1);
218
+ s.openMenu(e, s.subMenus[e].indexPath);
219
+ }
220
+ }, 300));
221
+ }
222
+ function x() {
223
+ s.isMenuPopup && (s.mouseInMenu = [], y?.(), {stop: y} = useTimeoutFn(() => {
224
+ s.mouseInMenu.length === 0 ? s.closeMenu(t.uniqueKey) : _.value && (s.mouseInMenu.includes(t.uniqueKey.at(-1)) || s.closeMenu(t.uniqueKey.at(-1)));
225
+ }, 300));
226
+ }
227
+ return (t, n) => {
228
+ let r = resolveComponent("SubMenu");
229
+ return openBlock(), createElementBlock(Fragment, null, [createVNode(item_default, {
230
+ ref_key: "itemRef",
231
+ ref: i,
232
+ "unique-key": e.uniqueKey,
233
+ item: e.menu,
234
+ level: e.level,
235
+ "sub-menu": unref(_),
236
+ expand: unref(u),
237
+ onClick: v,
238
+ onMouseenter: b,
239
+ onMouseleave: x
240
+ }, null, 8, [
241
+ "unique-key",
242
+ "item",
243
+ "level",
244
+ "sub-menu",
245
+ "expand"
246
+ ]), unref(_) ? (openBlock(), createBlock(Teleport, {
247
+ key: 0,
248
+ to: "body",
249
+ disabled: !unref(s).isMenuPopup
250
+ }, [createVNode(Transition, mergeProps(unref(p), toHandlers(unref(f))), {
251
+ default: withCtx(() => [unref(u) ? (openBlock(), createBlock(unref(P), {
252
+ key: 0,
253
+ ref_key: "subMenuRef",
254
+ ref: a,
255
+ options: { scrollbars: { visibility: "hidden" } },
256
+ defer: "",
257
+ class: normalizeClass(["sub-menu", {
258
+ "bg-[var(--g-sub-sidebar-bg)]": unref(s).isMenuPopup,
259
+ "ring-1 ring-stone-2 dark:ring-stone-8 shadow-xl fixed z-3000 w-[200px]": unref(s).isMenuPopup,
260
+ "mx-2": unref(s).isMenuPopup && (unref(s).props.mode === "vertical" || e.level !== 0),
261
+ "rounded-2 py-1": unref(s).props.rounded && unref(s).isMenuPopup
262
+ }])
263
+ }, {
264
+ default: withCtx(() => [(openBlock(!0), createElementBlock(Fragment, null, renderList(e.menu.children, (t) => (openBlock(), createElementBlock(Fragment, { key: t.path ?? JSON.stringify(t) }, [t.meta?.sidebar === !1 ? createCommentVNode("", !0) : (openBlock(), createBlock(r, {
265
+ key: 0,
266
+ "unique-key": [...e.uniqueKey, t.path ?? JSON.stringify(t)],
267
+ menu: t,
268
+ level: e.level + 1
269
+ }, null, 8, [
270
+ "unique-key",
271
+ "menu",
272
+ "level"
273
+ ]))], 64))), 128))]),
274
+ _: 1
275
+ }, 8, ["class"])) : createCommentVNode("", !0)]),
276
+ _: 1
277
+ }, 16)], 8, ["disabled"])) : createCommentVNode("", !0)], 64);
278
+ };
279
+ }
280
+ }), Menu_default = /* @__PURE__ */ defineComponent({
281
+ name: "MainMenu",
282
+ __name: "index",
283
+ props: {
284
+ menu: {},
285
+ value: {},
286
+ accordion: {
287
+ type: Boolean,
288
+ default: !0
289
+ },
290
+ defaultOpeneds: { default: () => [] },
291
+ mode: { default: "vertical" },
292
+ collapse: {
293
+ type: Boolean,
294
+ default: !1
295
+ },
296
+ showCollapseName: {
297
+ type: Boolean,
298
+ default: !1
299
+ },
300
+ rounded: {
301
+ type: Boolean,
302
+ default: !1
303
+ }
304
+ },
305
+ setup(e) {
306
+ let n = e, r = useRouter(), i = ref(n.value), a = ref({}), o = ref({}), c = ref(n.defaultOpeneds.slice(0)), l = ref([]), u = computed(() => n.mode === "horizontal" || n.mode === "vertical" && n.collapse);
307
+ function d(e = [], t = []) {
308
+ e.forEach((e) => {
309
+ let n = e.path ?? JSON.stringify(e);
310
+ if (e.children && e.children.length > 0) {
311
+ let r = [...t, n];
312
+ o.value[n] = {
313
+ index: n,
314
+ indexPath: r,
315
+ active: !1
316
+ }, d(e.children, r);
317
+ } else a.value[n] = {
318
+ index: n,
319
+ indexPath: t
320
+ };
321
+ });
322
+ }
323
+ let f = (e, t) => {
324
+ c.value.includes(e) || (n.accordion && (c.value = c.value.filter((e) => t.includes(e))), c.value.push(e));
325
+ }, p = (e) => {
326
+ if (Array.isArray(e)) {
327
+ nextTick(() => {
328
+ p(e.at(-1)), e.length > 1 && p(e.slice(0, -1));
329
+ });
330
+ return;
331
+ }
332
+ Object.keys(o.value).forEach((t) => {
333
+ o.value[t].indexPath.includes(e) && (c.value = c.value.filter((t) => t !== e));
334
+ });
335
+ };
336
+ function m(e) {
337
+ Object.keys(o.value).forEach((e) => {
338
+ o.value[e].active = !1;
339
+ }), a.value[e]?.indexPath.forEach((e) => {
340
+ o.value[e].active = !0;
341
+ });
342
+ }
343
+ let h = async (e, i) => {
344
+ if (i?.isDev) {
345
+ api.info("暂未上线,敬请期待!");
346
+ return;
347
+ }
348
+ if ((n.mode === "horizontal" || n.collapse) && (c.value = []), m(e), i?.link) {
349
+ let e = i?.partyLogin;
350
+ if (e && Array.isArray(e) && e.length > 0) {
351
+ let { url: t } = await usePartyLogin(e, i.link);
352
+ window.open(t.value);
353
+ } else window.open(i.link);
354
+ return;
355
+ }
356
+ r.push(e);
357
+ }, _ = (e, t) => {
358
+ c.value.includes(e) ? p(e) : f(e, t);
359
+ };
360
+ function v() {
361
+ let e = i.value && a.value[i.value];
362
+ m(i.value), !(!e || n.collapse) && e.indexPath.forEach((e) => {
363
+ let t = o.value[e];
364
+ t && f(e, t.indexPath);
365
+ });
366
+ }
367
+ return watch(() => n.menu, (e) => {
368
+ d(e), v();
369
+ }, {
370
+ deep: !0,
371
+ immediate: !0
372
+ }), watch(() => n.value, (e) => {
373
+ a.value[e] || (i.value = "");
374
+ let t = a.value[e] || i.value && a.value[i.value] || a.value[n.value];
375
+ t ? i.value = t.index : i.value = e, v();
376
+ }), watch(() => n.collapse, (e) => {
377
+ e && (c.value = []), v();
378
+ }), provide(rootMenuInjectionKey, reactive({
379
+ props: n,
380
+ items: a,
381
+ subMenus: o,
382
+ activeIndex: i,
383
+ openedMenus: c,
384
+ mouseInMenu: l,
385
+ isMenuPopup: u,
386
+ openMenu: f,
387
+ closeMenu: p,
388
+ handleMenuItemClick: h,
389
+ handleSubMenuClick: _
390
+ })), (t, r) => (openBlock(), createElementBlock("div", { class: normalizeClass(["flex flex-col of-hidden transition-all", {
391
+ "w-[200px]": !unref(u) && n.mode === "vertical",
392
+ "w-[64px]": unref(u) && n.mode === "vertical",
393
+ "h-[80px]": n.mode === "horizontal",
394
+ "flex-row! w-auto": unref(u) && n.mode === "horizontal"
395
+ }]) }, [(openBlock(!0), createElementBlock(Fragment, null, renderList(e.menu, (e, t) => (openBlock(), createElementBlock(Fragment, { key: t }, [e.children?.length && e.meta?.sidebar !== !1 ? (openBlock(), createBlock(sub_default, {
396
+ key: 0,
397
+ menu: e,
398
+ "unique-key": [e.path ?? JSON.stringify(e)]
399
+ }, null, 8, ["menu", "unique-key"])) : e.meta?.sidebar === !1 ? createCommentVNode("", !0) : (openBlock(), createBlock(item_default, {
400
+ key: 1,
401
+ item: e,
402
+ "unique-key": [e.path ?? JSON.stringify(e)],
403
+ onClick: (t) => h(e.path ?? JSON.stringify(e), e.meta)
404
+ }, null, 8, [
405
+ "item",
406
+ "unique-key",
407
+ "onClick"
408
+ ]))], 64))), 128))], 2));
409
+ }
410
+ }), HeaderThinMenu_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
411
+ name: "LayoutHeaderThinMenu",
412
+ __name: "HeaderThinMenu",
413
+ setup(e) {
414
+ let t = useRoute(), { settingsStore: n, menuStore: r } = useContext(), i = ref();
415
+ function o(e) {
416
+ i.value.scrollBy({ left: (e.deltaY || e.detail) > 0 ? 50 : -50 });
417
+ }
418
+ return (e, a) => (openBlock(), createElementBlock("div", {
419
+ ref_key: "menuRef",
420
+ ref: i,
421
+ class: "menu-container",
422
+ onWheel: withModifiers(o, ["prevent"])
423
+ }, [createVNode(Menu_default, {
424
+ menu: unref(r).allMenus,
425
+ value: unref(t).meta.activeMenu || unref(t).path,
426
+ mode: "horizontal",
427
+ "show-collapse-name": "",
428
+ rounded: unref(n).settings.menu.isRounded,
429
+ class: normalizeClass(["menu", { [`menu-active-${unref(n).settings.menu.menuActiveStyle}`]: unref(n).settings.menu.menuActiveStyle !== "" }])
430
+ }, null, 8, [
431
+ "menu",
432
+ "value",
433
+ "rounded",
434
+ "class"
435
+ ])], 544));
436
+ }
437
+ }), HeaderThinMenu_exports = /* @__PURE__ */ __exportAll({ default: () => HeaderThinMenu_default }), HeaderThinMenu_default = HeaderThinMenu_vue_vue_type_script_setup_true_lang_default;
438
+ export { HeaderThinMenu_exports as n, Menu_default as r, HeaderThinMenu_default as t };