aibox-custom-component-packages 0.0.10 → 0.0.12

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.
@@ -1,2 +1,2 @@
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";
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.BF2dzN8s.js";
2
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 };
@@ -3,5 +3,5 @@ import { r as e } from "./chunks/config.BEZNFeRN.js";
3
3
  import "./chunks/AvailableRangePreview.WFzbRasx.js";
4
4
  import { _ as t, a 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, y } from "./chunks/config.LzgBLhTz.js";
5
5
  import "./chunks/AiboxTable.CDqNvRfJ.js";
6
- import { a as b, c as x, i as S, n as C, o as w, r as T, s as E, t as D } from "./chunks/SourcePublish.DkyY1KEk.js";
6
+ import { a as b, c as x, i as S, n as C, o as w, r as T, s as E, t as D } from "./chunks/SourcePublish.C97G36H2.js";
7
7
  export { g as API_CHANNEL_TYPES, d as AUTHORIZED_CHANNEL_TYPES, b as ApiTooltip, m as CHANNEL_ICON_CONFIG, w as FeishuTooltip, c as INACTIVE_ENUM, n as INACTIVE_LIST, f as LIBRARY_PAGE, h as OFFICIAL_LABEL, r as OPEN_STATUS_VALUE, e as PUBLISH_STATUS, l as PUBLISH_STATUS_COLORS, _ as PUBLISH_STATUS_ICONS, i as PUBLISH_STATUS_TEXT, a as PUBLISH_STATUS_TYPE, p as PUBLISH_TYPE_ICON_MAPPING, E as PermissionSetting, x as PublishIcon, S as PublishSettings, u as RELEASE_CHANNEL_CONFIG, s as RELEASE_CHANNEL_TYPE, o as STORE_CHANNEL_TYPES, t as STORE_DETAIL_TYPE, D as SourcePublish, D as default, v as getChannelsByType, y as serviceTypeMap, T as useServiceConfig, C as useStoreDetailType };
@@ -1 +1 @@
1
- .nav-title[data-v-52011bbe]{justify-content:space-between;align-items:center;height:72px;padding-left:2px;padding-right:8px;display:flex}.nav-title .title-text[data-v-52011bbe]{white-space:nowrap;text-overflow:ellipsis;flex:1;overflow:hidden}.nav-title .collapse-unfold-icon[data-v-52011bbe]{cursor:pointer;flex-shrink:0;justify-content:center;transition:transform .2s;display:flex}.custom-tree[data-v-cf335707]{background-color:#0000}.custom-tree[data-v-cf335707] .el-tree-node__expand-icon{display:none}.custom-tree[data-v-cf335707] .el-tree-node__content{box-sizing:border-box;height:var(--item-height)!important;min-height:calc(var(--item-height,36px) - 8px)!important}.custom-tree[data-v-cf335707] .el-tree-node.is-current .el-tree-node__content{background:var(--select-menu-bg,#eaf0fe);border-radius:8px}.custom-tree .tree-node-content-custom[data-v-cf335707]{color:#262626;box-sizing:border-box;cursor:pointer;border-radius:8px;align-items:center;width:100%;padding:9px 12px;font-size:14px;font-weight:400;transition:all .3s;display:flex;height:calc(var(--item-height) - 8px)!important;min-height:calc(var(--item-height,36px) - 8px)!important}.custom-tree .tree-node-content-custom.is-current[data-v-cf335707]{color:#3271fe}.custom-tree .tree-node-content-custom.is-parent-active[data-v-cf335707]{color:#3271fe;background:0 0;border-radius:8px}.custom-tree .tree-node-content-custom .expand-arrow[data-v-cf335707]{cursor:pointer;flex-shrink:0;justify-content:center;align-items:center;transition:transform .3s;display:flex}.custom-tree .tree-node-content-custom .node-icon[data-v-cf335707]{flex-shrink:0;justify-content:flex-start;width:24px}.custom-tree .tree-node-content-custom .node-label[data-v-cf335707]{text-overflow:ellipsis;white-space:nowrap;flex:1;font-size:14px;overflow:hidden}.user-info-card[data-v-00216c75]{align-items:center;display:flex}.user-info-card__avatar[data-v-00216c75]{background:#3965ff;border-radius:50%;flex-shrink:0;justify-content:center;align-items:center;display:flex}.user-info-card__avatar-text[data-v-00216c75]{color:#fff;font-weight:500}.user-info-card__details[data-v-00216c75]{flex:1;overflow:hidden}.user-info-card__name[data-v-00216c75],.user-info-card__bnid[data-v-00216c75]{white-space:nowrap;text-overflow:ellipsis;width:100%;font-weight:400;overflow:hidden}.user-info-card--popup .user-info-card__avatar[data-v-00216c75]{width:30px;height:30px;margin-right:14px}.user-info-card--popup .user-info-card__avatar-text[data-v-00216c75]{font-size:16px}.user-info-card--popup .user-info-card__name[data-v-00216c75]{color:#262626;font-size:14px;line-height:16px}.user-info-card--popup .user-info-card__bnid[data-v-00216c75]{color:#a8abb2;font-size:12px;line-height:18px}.user-info-card--footer[data-v-00216c75]{gap:6px}.user-info-card--footer .user-info-card__avatar[data-v-00216c75]{width:22px;height:22px}.user-info-card--footer .user-info-card__avatar-text[data-v-00216c75]{font-size:12px}.user-popup-content[data-v-4c9300a2]{padding:8px}.user-popup-content .user-info-card[data-v-4c9300a2]{padding:8px 3px 12px}.user-popup-content .popup-list[data-v-4c9300a2]{border-top:1px solid #eff2f5;padding-top:12px}.user-popup-content .list__item[data-v-4c9300a2]{cursor:pointer;color:#262626;border-radius:8px;align-items:center;gap:6px;height:42px;padding:0 12px;font-size:14px;font-weight:400;transition:background-color .2s;display:flex}.user-popup-content .list__item[data-v-4c9300a2]:hover{background:#f0f0f0}.user-popup-content .list__item-icon[data-v-4c9300a2]{text-align:center;align-items:center;display:flex}.navbar-box__footer[data-v-2b4a0a2b]{cursor:pointer;border-top:1px solid #f0f0f0;justify-content:space-between;align-items:center;width:100%;padding:10px 8px;display:flex;position:relative;bottom:0;overflow:hidden}.navbar-box__footer__left[data-v-2b4a0a2b]{flex:1;align-items:center;display:flex;overflow:hidden}.footer-popup[data-v-2b4a0a2b]{z-index:2001;width:300px;position:fixed;bottom:0}.footer-popup .footer-popup__content[data-v-2b4a0a2b]{width:100%;height:100%}.content-bg[data-v-2b4a0a2b]{-webkit-backdrop-filter:blur(16px);background:#f7f7f7b3;border:1px solid #fffc;border-radius:12px}.fade-enter-from[data-v-2b4a0a2b],.fade-leave-to[data-v-2b4a0a2b]{opacity:0}.fade-enter-active[data-v-2b4a0a2b],.fade-leave-active[data-v-2b4a0a2b]{transition:opacity .3s}.fade-enter-to[data-v-2b4a0a2b],.fade-leave-from[data-v-2b4a0a2b]{opacity:1}.sidebar[data-v-b8991280]{min-width:240px;transition:width .3s;position:relative}.sidebar[data-v-b8991280] .el-tree{--el-tree-node-hover-bg-color:transparent!important}
1
+ .nav-title[data-v-52011bbe]{justify-content:space-between;align-items:center;height:72px;padding-left:2px;padding-right:8px;display:flex}.nav-title .title-text[data-v-52011bbe]{white-space:nowrap;text-overflow:ellipsis;flex:1;overflow:hidden}.nav-title .collapse-unfold-icon[data-v-52011bbe]{cursor:pointer;flex-shrink:0;justify-content:center;transition:transform .2s;display:flex}.custom-tree[data-v-cf335707]{background-color:#0000}.custom-tree[data-v-cf335707] .el-tree-node__expand-icon{display:none}.custom-tree[data-v-cf335707] .el-tree-node__content{box-sizing:border-box;height:var(--item-height)!important;min-height:calc(var(--item-height,36px) - 8px)!important}.custom-tree[data-v-cf335707] .el-tree-node.is-current .el-tree-node__content{background:var(--select-menu-bg,#eaf0fe);border-radius:8px}.custom-tree .tree-node-content-custom[data-v-cf335707]{color:#262626;box-sizing:border-box;cursor:pointer;border-radius:8px;align-items:center;width:100%;padding:9px 12px;font-size:14px;font-weight:400;transition:all .3s;display:flex;height:calc(var(--item-height) - 8px)!important;min-height:calc(var(--item-height,36px) - 8px)!important}.custom-tree .tree-node-content-custom.is-current[data-v-cf335707]{color:#3271fe}.custom-tree .tree-node-content-custom.is-parent-active[data-v-cf335707]{color:#3271fe;background:0 0;border-radius:8px}.custom-tree .tree-node-content-custom .expand-arrow[data-v-cf335707]{cursor:pointer;flex-shrink:0;justify-content:center;align-items:center;transition:transform .3s;display:flex}.custom-tree .tree-node-content-custom .node-icon[data-v-cf335707]{flex-shrink:0;justify-content:flex-start;width:24px}.custom-tree .tree-node-content-custom .node-label[data-v-cf335707]{text-overflow:ellipsis;white-space:nowrap;flex:1;font-size:14px;overflow:hidden}.user-info-card[data-v-00216c75]{align-items:center;display:flex}.user-info-card__avatar[data-v-00216c75]{background:#3965ff;border-radius:50%;flex-shrink:0;justify-content:center;align-items:center;display:flex}.user-info-card__avatar-text[data-v-00216c75]{color:#fff;font-weight:500}.user-info-card__details[data-v-00216c75]{flex:1;overflow:hidden}.user-info-card__name[data-v-00216c75],.user-info-card__bnid[data-v-00216c75]{white-space:nowrap;text-overflow:ellipsis;width:100%;font-weight:400;overflow:hidden}.user-info-card--popup .user-info-card__avatar[data-v-00216c75]{width:30px;height:30px;margin-right:14px}.user-info-card--popup .user-info-card__avatar-text[data-v-00216c75]{font-size:16px}.user-info-card--popup .user-info-card__name[data-v-00216c75]{color:#262626;font-size:14px;line-height:16px}.user-info-card--popup .user-info-card__bnid[data-v-00216c75]{color:#a8abb2;font-size:12px;line-height:18px}.user-info-card--footer[data-v-00216c75]{gap:6px}.user-info-card--footer .user-info-card__avatar[data-v-00216c75]{width:22px;height:22px}.user-info-card--footer .user-info-card__avatar-text[data-v-00216c75]{font-size:12px}.user-popup-content[data-v-4c9300a2]{padding:8px}.user-popup-content .user-info-card[data-v-4c9300a2]{padding:8px 3px 12px}.user-popup-content .popup-list[data-v-4c9300a2]{border-top:1px solid #eff2f5;padding-top:12px}.user-popup-content .list__item[data-v-4c9300a2]{cursor:pointer;color:#262626;border-radius:8px;align-items:center;gap:6px;height:42px;padding:0 12px;font-size:14px;font-weight:400;transition:background-color .2s;display:flex}.user-popup-content .list__item[data-v-4c9300a2]:hover{background:#f0f0f0}.user-popup-content .list__item-icon[data-v-4c9300a2]{text-align:center;align-items:center;display:flex}.navbar-box__footer[data-v-b1713bc6]{cursor:pointer;border-top:1px solid #f0f0f0;justify-content:space-between;align-items:center;width:100%;padding:10px 8px;display:flex;position:relative;bottom:0;overflow:hidden}.navbar-box__footer__left[data-v-b1713bc6]{flex:1;align-items:center;display:flex;overflow:hidden}.footer-popup[data-v-b1713bc6]{z-index:2001;width:300px;position:fixed;bottom:0}.footer-popup .footer-popup__content[data-v-b1713bc6]{width:100%;height:100%}.content-bg[data-v-b1713bc6]{-webkit-backdrop-filter:blur(16px);backdrop-filter:blur(16px);background:#f7f7f7b3;border:1px solid #fffc;border-radius:12px}.fade-enter-from[data-v-b1713bc6],.fade-leave-to[data-v-b1713bc6]{opacity:0}.fade-enter-active[data-v-b1713bc6],.fade-leave-active[data-v-b1713bc6]{transition:opacity .3s}.fade-enter-to[data-v-b1713bc6],.fade-leave-from[data-v-b1713bc6]{opacity:1}.sidebar[data-v-b8991280]{min-width:240px;transition:width .3s;position:relative}.sidebar[data-v-b8991280] .el-tree{--el-tree-node-hover-bg-color:transparent!important}
@@ -1 +1 @@
1
- .style-title[data-v-58195e4c]{margin:24px 0 16px;font-size:18px;font-weight:500}.card-container[data-v-d8a76b28]{background:#fff;border:1px solid #f0f0f0;border-radius:10px;padding:16px}.channel-icon[data-v-197d4379]{width:34px;height:34px}.gap-6[data-v-637dc461]{gap:6px}.gap-12[data-v-637dc461]{gap:12px}.publish-settings[data-v-5cc3cfd2]{width:100%}.publish-settings .channel-name[data-v-5cc3cfd2]{align-items:center;display:flex}.publish-settings .channel-name .channel-title[data-v-5cc3cfd2]{margin-left:10px;line-height:18px}.publish-settings .channel-name .channel-title__name[data-v-5cc3cfd2]{font-size:14px}.publish-settings .channel-name .channel-title__desc[data-v-5cc3cfd2]{color:var(--color-text-light1);font-size:13px}.publish-settings .action-container[data-v-5cc3cfd2]{text-align:right;justify-content:flex-end;align-items:center;gap:10px;width:100%;display:flex}.publish-settings .select-label[data-v-5cc3cfd2]{color:#262626}.publish-settings .divider[data-v-5cc3cfd2]{border-right:1px solid #f0f0f0;height:12px;margin:0 2px}.publish-settings .expand-content[data-v-5cc3cfd2]{background:#fff;flex-direction:column;gap:20px;padding:20px 16px;display:flex}.publish-settings[data-v-5cc3cfd2] .no-expand .el-table__expand-icon{display:none!important}.publish-container[data-v-609bc4d0]{background-color:#f7f8fa;height:100%}.publish-container__back[data-v-609bc4d0]{justify-content:space-between;align-items:center;width:100%;display:flex}.publish-container__form[data-v-609bc4d0]{width:800px;height:calc(100% - 70px);margin:0 auto;overflow:auto}.publish-container__form .channel-name[data-v-609bc4d0]{align-items:center;display:flex}.publish-container__form .channel-name .channel-icon[data-v-609bc4d0]{border-radius:8px;justify-content:center;align-items:center;width:34px;height:34px;display:flex}.publish-container__form .channel-name .channel-title[data-v-609bc4d0]{margin-left:10px;line-height:18px}.publish-container__form .channel-name .channel-title__name[data-v-609bc4d0]{font-size:14px}.publish-container__form .channel-name .channel-title__desc[data-v-609bc4d0]{color:var(--color-text-light1);font-size:13px}.publish-container__config[data-v-609bc4d0]{background:#fafafa;border-radius:4px;justify-content:space-between;align-items:center;width:100%;padding:7px 20px;display:flex}.publish-container__config p[data-v-609bc4d0]{align-items:center;display:flex}.publish-container__config p img[data-v-609bc4d0]{margin-right:10px}.publish-container__required[data-v-609bc4d0]{color:var(--el-color-danger);font-size:14px}.publish-container[data-v-609bc4d0] .el-form .el-form-item:last-child{margin-bottom:0}.publish-container[data-v-609bc4d0] .card-container:last-child{padding:0 16px 16px}.backend-system[data-v-609bc4d0]{background-color:#0000}.backend-system .publish-container__form[data-v-609bc4d0]{height:auto}
1
+ .style-title[data-v-58195e4c]{margin:24px 0 16px;font-size:18px;font-weight:500}.card-container[data-v-d8a76b28]{background:#fff;border:1px solid #f0f0f0;border-radius:10px;padding:16px}.channel-icon[data-v-197d4379]{width:34px;height:34px}.gap-6[data-v-637dc461]{gap:6px}.gap-12[data-v-637dc461]{gap:12px}.publish-settings[data-v-5cc3cfd2]{width:100%}.publish-settings .channel-name[data-v-5cc3cfd2]{align-items:center;display:flex}.publish-settings .channel-name .channel-title[data-v-5cc3cfd2]{margin-left:10px;line-height:18px}.publish-settings .channel-name .channel-title__name[data-v-5cc3cfd2]{font-size:14px}.publish-settings .channel-name .channel-title__desc[data-v-5cc3cfd2]{color:var(--color-text-light1);font-size:13px}.publish-settings .action-container[data-v-5cc3cfd2]{text-align:right;justify-content:flex-end;align-items:center;gap:10px;width:100%;display:flex}.publish-settings .select-label[data-v-5cc3cfd2]{color:#262626}.publish-settings .divider[data-v-5cc3cfd2]{border-right:1px solid #f0f0f0;height:12px;margin:0 2px}.publish-settings .expand-content[data-v-5cc3cfd2]{background:#fff;flex-direction:column;gap:20px;padding:20px 16px;display:flex}.publish-settings[data-v-5cc3cfd2] .no-expand .el-table__expand-icon{display:none!important}.publish-container[data-v-b1dfb898]{background-color:#f7f8fa;height:100%}.publish-container__back[data-v-b1dfb898]{justify-content:space-between;align-items:center;width:100%;display:flex}.publish-container__form[data-v-b1dfb898]{width:800px;height:calc(100% - 70px);margin:0 auto;overflow:auto}.publish-container__form .channel-name[data-v-b1dfb898]{align-items:center;display:flex}.publish-container__form .channel-name .channel-icon[data-v-b1dfb898]{border-radius:8px;justify-content:center;align-items:center;width:34px;height:34px;display:flex}.publish-container__form .channel-name .channel-title[data-v-b1dfb898]{margin-left:10px;line-height:18px}.publish-container__form .channel-name .channel-title__name[data-v-b1dfb898]{font-size:14px}.publish-container__form .channel-name .channel-title__desc[data-v-b1dfb898]{color:var(--color-text-light1);font-size:13px}.publish-container__config[data-v-b1dfb898]{background:#fafafa;border-radius:4px;justify-content:space-between;align-items:center;width:100%;padding:7px 20px;display:flex}.publish-container__config p[data-v-b1dfb898]{align-items:center;display:flex}.publish-container__config p img[data-v-b1dfb898]{margin-right:10px}.publish-container__required[data-v-b1dfb898]{color:var(--el-color-danger);font-size:14px}.publish-container[data-v-b1dfb898] .el-form .el-form-item:last-child{margin-bottom:0}.publish-container[data-v-b1dfb898] .card-container:last-child{padding:0 16px 16px}.backend-system[data-v-b1dfb898]{background-color:#0000}.backend-system .publish-container__form[data-v-b1dfb898]{height:auto}
@@ -0,0 +1,585 @@
1
+ import { t as e } from "./withinstall.dLh4K-0g.js";
2
+ import { t } from "./_plugin-vue_export-helper.Ct3qlEzt.js";
3
+ import { Fragment as n, Transition as r, computed as i, createBlock as a, createCommentVNode as o, createElementBlock as s, createElementVNode as c, createVNode as l, markRaw as u, nextTick as d, normalizeClass as f, normalizeStyle as p, openBlock as m, ref as h, renderList as g, resolveDynamicComponent as _, toDisplayString as v, toRaw as y, unref as b, vShow as x, watch as S, withCtx as C, withDirectives as w, withModifiers as T } from "vue";
4
+ import { ElAutoResizer as E, ElIcon as D, ElTreeV2 as O } from "element-plus";
5
+ import { AiboxIcon as k } from "color-message-aibox-vue";
6
+ import { IconRenderer as A, iconLibraryMap as j } from "color-star-custom-components";
7
+ import '../assets/CustomSidebar.css';//#region components/CustomSidebar/components/NavTitle.vue
8
+ var M = { class: "nav-title overflow-hidden" }, ee = /* @__PURE__ */ t(/* @__PURE__ */ Object.assign({ name: "NavTitle" }, {
9
+ __name: "NavTitle",
10
+ props: {
11
+ title: {
12
+ type: String,
13
+ default: ""
14
+ },
15
+ logoSize: {
16
+ type: Number,
17
+ default: 30
18
+ },
19
+ titleStyle: {
20
+ type: Object,
21
+ default: () => ({ fontSize: "16px" })
22
+ },
23
+ showToggle: {
24
+ type: Boolean,
25
+ default: !0
26
+ },
27
+ toggleIcon: {
28
+ type: [Object, String],
29
+ default: null
30
+ }
31
+ },
32
+ emits: ["toggle"],
33
+ setup(e, { emit: t }) {
34
+ let n = t, r = () => {
35
+ n("toggle");
36
+ };
37
+ return (t, n) => (m(), s("div", M, [
38
+ l(b(D), { size: e.logoSize }, {
39
+ default: C(() => [l(b(k))]),
40
+ _: 1
41
+ }, 8, ["size"]),
42
+ c("span", {
43
+ class: "weight-500 text-1f2329 title-text",
44
+ style: p(e.titleStyle)
45
+ }, v(e.title), 5),
46
+ e.showToggle ? (m(), a(b(D), {
47
+ key: 0,
48
+ size: 18,
49
+ class: "collapse-unfold-icon",
50
+ onClick: r
51
+ }, {
52
+ default: C(() => [(m(), a(_(e.toggleIcon)))]),
53
+ _: 1
54
+ })) : o("", !0)
55
+ ]));
56
+ }
57
+ }), [["__scopeId", "data-v-52011bbe"]]), N = {
58
+ DIR: "DIR",
59
+ MENU: "MENU",
60
+ BUTTON: "BUTTON"
61
+ }, P = new Map([
62
+ ["active", "#3271FE"],
63
+ ["parent_active", "#3271FE"],
64
+ ["normal", "#1F2329"]
65
+ ]), F = (e, t) => !Array.isArray(e) || !t ? !1 : e.some((e) => e.path === t ? !0 : e.children?.length > 0 ? F(e.children, t) : !1), I = (e, t = 1) => e.filter((e) => [N.DIR, N.MENU].includes(e.type)).map((e) => ({
66
+ ...e,
67
+ id: e.bnid,
68
+ name: e.name,
69
+ path: e?.path || "",
70
+ children: e.children?.length > 0 ? I(e.children || [], t + 1) : [],
71
+ level: t
72
+ })), L = (e, t) => e?.children?.length ? e.children.some((e) => e?.path === t || e.children?.length && L(e, t)) : !1, R = (e, t) => e?.children?.length ? e.children.some((e) => e?.id === t || e.children?.length && R(e, t)) : !1, z = (e, t) => {
73
+ let n = e?.id === t, r = R(e, t), i = "normal";
74
+ return n ? i = "active" : r && (i = "parent_active"), P.get(i);
75
+ }, B = (e, t) => e.includes(t) ? e : [...e, t], te = (e, t) => e.filter((e) => e !== t), V = (e, t, n = []) => e.some((e) => {
76
+ if (e?.path === t) return !0;
77
+ if (e.children?.length > 0) {
78
+ n.push(e.id);
79
+ let r = V(e.children, t, n);
80
+ return !r && n.pop(), r;
81
+ }
82
+ return !1;
83
+ }), H = (e, t, n = []) => e.some((e) => {
84
+ if (e?.id === t) return !0;
85
+ if (e.children?.length > 0) {
86
+ n.push(e.id);
87
+ let r = H(e.children, t, n);
88
+ return !r && n.pop(), r;
89
+ }
90
+ return !1;
91
+ }), U = (e, t) => {
92
+ let n = [];
93
+ return H(e, t, n), n;
94
+ }, W = (e, t) => {
95
+ if (!Array.isArray(e) || !t) return null;
96
+ for (let n of e) {
97
+ if (n.path === t) return n;
98
+ if (n.children?.length > 0) {
99
+ let e = W(n.children, t);
100
+ if (e) return e;
101
+ }
102
+ }
103
+ return null;
104
+ }, G = (e) => Array.isArray(e) ? e.map((e) => {
105
+ let t = { ...e };
106
+ return t.children && Array.isArray(t.children) && t.children.length > 0 ? t.children = G(t.children) : t.isLeaf = !0, t;
107
+ }) : [], K = (e) => {
108
+ if (!Array.isArray(e) || e.length === 0) return null;
109
+ for (let t of e) {
110
+ if (t.isLeaf && t.path) return t;
111
+ if (t.children?.length > 0) {
112
+ let e = K(t.children);
113
+ if (e) return e;
114
+ }
115
+ }
116
+ return null;
117
+ }, q = [
118
+ "/404",
119
+ "/login",
120
+ "/unauthorized"
121
+ ], J = {
122
+ label: "name",
123
+ children: "children",
124
+ isLeaf: "isLeaf"
125
+ }, Y = {
126
+ PARENT: "parent",
127
+ LEAF: "leaf"
128
+ }, X = {
129
+ LOADING: "loading",
130
+ LOADED: "loaded",
131
+ ERROR: "error"
132
+ }, Z = {
133
+ POPUP: "popup",
134
+ FOOTER: "footer"
135
+ }, ne = { class: "node-label" }, re = ["onClick"], ie = /* @__PURE__ */ t(/* @__PURE__ */ Object.assign({ name: "MenuList" }, {
136
+ __name: "MenuList",
137
+ props: {
138
+ menuData: {
139
+ type: Array,
140
+ default: () => []
141
+ },
142
+ currentMenuId: {
143
+ type: String,
144
+ default: null
145
+ },
146
+ expandedKeys: {
147
+ type: Array,
148
+ default: () => []
149
+ },
150
+ treeProps: {
151
+ type: Object,
152
+ default: () => J
153
+ },
154
+ itemHeight: {
155
+ type: Number,
156
+ default: 36
157
+ },
158
+ indent: {
159
+ type: Number,
160
+ default: 24
161
+ },
162
+ iconSize: {
163
+ type: Number,
164
+ default: 16
165
+ },
166
+ selectMenuBg: {
167
+ type: String,
168
+ default: "#eaf0fe"
169
+ },
170
+ expandedIcon: {
171
+ type: [Object, String],
172
+ default: null
173
+ },
174
+ collapsedIcon: {
175
+ type: [Object, String],
176
+ default: null
177
+ }
178
+ },
179
+ emits: [
180
+ "node-click",
181
+ "node-expand",
182
+ "node-collapse"
183
+ ],
184
+ setup(e, { emit: t }) {
185
+ let n = e, r = t, i = h(null), u = (e) => e?.icon && e.level === 1 || !e.isLeaf, g = (e) => z(e, n.currentMenuId), y = (e) => {
186
+ r("node-click", e, e.isLeaf ? Y.LEAF : Y.PARENT);
187
+ }, x = (e) => {
188
+ r("node-expand", e.id, e);
189
+ }, w = (e) => {
190
+ r("node-collapse", e.id, e);
191
+ }, k = (e) => {
192
+ i.value && (n.expandedKeys.includes(e.data.id) ? i.value.collapseNode(e) : i.value.expandNode(e));
193
+ };
194
+ return S(() => n.expandedKeys, (e) => {
195
+ d(() => {
196
+ i.value && i.value.setExpandedKeys([...e]);
197
+ });
198
+ }, { deep: !0 }), (t, n) => (m(), a(b(E), { class: "flex-1 overflow-hidden" }, {
199
+ default: C(({ height: t }) => [l(b(O), {
200
+ ref_key: "treeRef",
201
+ ref: i,
202
+ "node-key": "id",
203
+ data: e.menuData,
204
+ props: e.treeProps,
205
+ height: t,
206
+ "current-node-key": e.currentMenuId,
207
+ "highlight-current": !0,
208
+ "expanded-keys": e.expandedKeys,
209
+ "show-checkbox": !1,
210
+ "item-size": e.itemHeight + 8,
211
+ "expand-on-click-node": !1,
212
+ indent: e.indent,
213
+ style: p({ "--select-menu-bg": e.selectMenuBg }),
214
+ onNodeClick: y,
215
+ onNodeExpand: x,
216
+ onNodeCollapse: w,
217
+ class: "custom-tree"
218
+ }, {
219
+ default: C(({ node: t, data: n }) => [c("div", { class: f(["tree-node-content-custom", {
220
+ "has-children": !n.isLeaf,
221
+ "is-current": n.id === e.currentMenuId && n.isLeaf,
222
+ "is-parent-active": b(R)(n, e.currentMenuId) && !n.isLeaf
223
+ }]) }, [
224
+ u(n) ? (m(), a(b(D), {
225
+ key: 0,
226
+ size: e.iconSize,
227
+ class: "node-icon",
228
+ color: g(n)
229
+ }, {
230
+ default: C(() => [l(b(A), {
231
+ "icon-name": n?.icon,
232
+ "icon-library": b(j).aibox
233
+ }, null, 8, ["icon-name", "icon-library"])]),
234
+ _: 2
235
+ }, 1032, ["size", "color"])) : o("", !0),
236
+ c("span", ne, v(t.label), 1),
237
+ n.isLeaf ? o("", !0) : (m(), s("div", {
238
+ key: 1,
239
+ class: "expand-arrow",
240
+ onClick: T((e) => k(t), ["stop"])
241
+ }, [l(b(D), {
242
+ size: e.iconSize,
243
+ color: g(n)
244
+ }, {
245
+ default: C(() => [(m(), a(_(e.expandedKeys.includes(n.id) ? e.expandedIcon : e.collapsedIcon)))]),
246
+ _: 2
247
+ }, 1032, ["size", "color"])], 8, re))
248
+ ], 2)]),
249
+ _: 1
250
+ }, 8, [
251
+ "data",
252
+ "props",
253
+ "height",
254
+ "current-node-key",
255
+ "expanded-keys",
256
+ "item-size",
257
+ "indent",
258
+ "style"
259
+ ])]),
260
+ _: 1
261
+ }));
262
+ }
263
+ }), [["__scopeId", "data-v-cf335707"]]), ae = { class: "user-info-card__avatar" }, oe = { class: "user-info-card__avatar-text" }, se = { class: "user-info-card__details" }, ce = { class: "user-info-card__name" }, le = {
264
+ key: 0,
265
+ class: "user-info-card__bnid"
266
+ }, Q = /* @__PURE__ */ t(/* @__PURE__ */ Object.assign({ name: "UserInfoCard" }, {
267
+ __name: "UserInfoCard",
268
+ props: {
269
+ userInfo: {
270
+ type: Object,
271
+ default: () => ({})
272
+ },
273
+ type: {
274
+ type: String,
275
+ default: Z.POPUP,
276
+ validator: (e) => Object.values(Z).includes(e)
277
+ }
278
+ },
279
+ setup(e) {
280
+ let t = e, n = i(() => t.userInfo?.name?.charAt(0)?.toUpperCase() || "");
281
+ return (t, r) => (m(), s("div", { class: f(["user-info-card", `user-info-card--${e.type}`]) }, [c("div", ae, [c("span", oe, v(n.value), 1)]), c("div", se, [c("div", ce, v(e.userInfo?.name || ""), 1), e.type === b(Z).POPUP ? (m(), s("div", le, v(e.userInfo?.bnid || e.userInfo?.id || ""), 1)) : o("", !0)])], 2));
282
+ }
283
+ }), [["__scopeId", "data-v-00216c75"]]), ue = { class: "user-popup-content" }, $ = ["onClick"], de = /* @__PURE__ */ t(/* @__PURE__ */ Object.assign({ name: "UserPopup" }, {
284
+ __name: "UserPopup",
285
+ props: {
286
+ actions: {
287
+ type: Array,
288
+ default: () => [],
289
+ validator: (e) => e.every((e) => e.key && (e.icon || e.iconName))
290
+ },
291
+ userInfo: {
292
+ type: Object,
293
+ default: () => ({})
294
+ },
295
+ showUserInfo: {
296
+ type: Boolean,
297
+ default: !0
298
+ }
299
+ },
300
+ emits: ["action-click"],
301
+ setup(e, { emit: t }) {
302
+ let r = e, d = t, p = i(() => (r.actions || []).map((e) => ({
303
+ ...e,
304
+ icon: u(y(e?.icon))
305
+ }))), h = (e) => {
306
+ d("action-click", e.key, e);
307
+ };
308
+ return (t, r) => (m(), s("div", ue, [e.showUserInfo ? (m(), a(Q, {
309
+ key: 0,
310
+ userInfo: e.userInfo,
311
+ type: b(Z).POPUP,
312
+ class: "user-info-card"
313
+ }, null, 8, ["userInfo", "type"])) : o("", !0), c("div", { class: f({ "popup-list": e.showUserInfo }) }, [(m(!0), s(n, null, g(p.value, (e, t) => (m(), s(n, { key: t }, [e.hidden ? o("", !0) : (m(), s("div", {
314
+ key: 0,
315
+ class: "list__item",
316
+ onClick: (t) => h(e)
317
+ }, [l(b(D), {
318
+ class: "list__item-icon",
319
+ size: e.iconSize || 20,
320
+ color: "#262626"
321
+ }, {
322
+ default: C(() => [(m(), a(_(e.icon), { size: e.iconSize || 20 }, null, 8, ["size"]))]),
323
+ _: 2
324
+ }, 1032, ["size"]), c("span", null, v(e.label), 1)], 8, $))], 64))), 128))], 2)]));
325
+ }
326
+ }), [["__scopeId", "data-v-4c9300a2"]]), fe = { class: "navbar-box__footer__left" }, pe = /* @__PURE__ */ t(/* @__PURE__ */ Object.assign({ name: "NavFooter" }, {
327
+ __name: "NavFooter",
328
+ props: {
329
+ userInfo: {
330
+ type: Object,
331
+ default: null,
332
+ validator: (e) => e ? e.name !== void 0 : !0
333
+ },
334
+ actions: {
335
+ type: Array,
336
+ default: () => []
337
+ },
338
+ popupDelay: {
339
+ type: Number,
340
+ default: 200
341
+ },
342
+ popupLeft: {
343
+ type: Number,
344
+ default: 240
345
+ },
346
+ navFooterWidth: {
347
+ type: Number,
348
+ default: 240
349
+ },
350
+ userInfoCardType: {
351
+ type: String,
352
+ default: Z.FOOTER,
353
+ validator: (e) => Object.values(Z).includes(e)
354
+ },
355
+ showPopupUserInfo: {
356
+ type: Boolean,
357
+ default: !0
358
+ }
359
+ },
360
+ emits: ["action-click"],
361
+ setup(e, { emit: t }) {
362
+ let i = e, a = t, u = h(null), d = h(!1), f = (e) => {
363
+ e || (u.value = setTimeout(() => {
364
+ d.value = !1;
365
+ }, i.popupDelay)), e && (d.value = e, clearTimeout(u.value));
366
+ }, g = (e, t) => {
367
+ d.value = !1, a("action-click", e, t);
368
+ };
369
+ return (t, i) => (m(), s(n, null, [e.userInfo ? (m(), s("div", {
370
+ key: 0,
371
+ class: "navbar-box__footer flex items-center",
372
+ style: p({ width: e.navFooterWidth + "px" }),
373
+ onMouseenter: i[0] ||= (e) => f(!0),
374
+ onMouseleave: i[1] ||= (e) => f(!1)
375
+ }, [c("div", fe, [l(Q, {
376
+ userInfo: e.userInfo,
377
+ type: e.userInfoCardType
378
+ }, null, 8, ["userInfo", "type"])])], 36)) : o("", !0), l(r, { name: "fade" }, {
379
+ default: C(() => [w(c("div", {
380
+ class: "footer-popup content-bg",
381
+ style: p({ left: e.popupLeft + "px" }),
382
+ onMouseenter: i[2] ||= (e) => f(!0),
383
+ onMouseleave: i[3] ||= (e) => f(!1)
384
+ }, [l(de, {
385
+ actions: e.actions,
386
+ userInfo: e.userInfo,
387
+ showUserInfo: e.showPopupUserInfo,
388
+ onActionClick: g
389
+ }, null, 8, [
390
+ "actions",
391
+ "userInfo",
392
+ "showUserInfo"
393
+ ])], 36), [[x, d.value]])]),
394
+ _: 1
395
+ })], 64));
396
+ }
397
+ }), [["__scopeId", "data-v-b1713bc6"]]), me = { class: "sidebar flex h-full flex-col" }, he = { class: "flex-1 overflow-hidden flex flex-col pd-l-12 pd-r-12" }, ge = e(/* @__PURE__ */ t(/* @__PURE__ */ Object.assign({ name: "CustomSidebar" }, {
398
+ __name: "layout",
399
+ props: {
400
+ menuData: {
401
+ type: Array,
402
+ default: () => []
403
+ },
404
+ currentMenuId: {
405
+ type: String,
406
+ default: null
407
+ },
408
+ expandedKeys: {
409
+ type: Array,
410
+ default: () => []
411
+ },
412
+ title: {
413
+ type: String,
414
+ default: ""
415
+ },
416
+ showToggle: {
417
+ type: Boolean,
418
+ default: !0
419
+ },
420
+ toggleIcon: {
421
+ type: [Object, String],
422
+ default: null
423
+ },
424
+ treeProps: {
425
+ type: Object,
426
+ default: () => J
427
+ },
428
+ itemHeight: {
429
+ type: Number,
430
+ default: 36
431
+ },
432
+ indent: {
433
+ type: Number,
434
+ default: 24
435
+ },
436
+ iconSize: {
437
+ type: Number,
438
+ default: 16
439
+ },
440
+ selectMenuBg: {
441
+ type: String,
442
+ default: "#eaf0fe"
443
+ },
444
+ titleStyle: {
445
+ type: Object,
446
+ default: () => ({ fontSize: "16px" })
447
+ },
448
+ expandedIcon: {
449
+ type: [Object, String],
450
+ default: null
451
+ },
452
+ collapsedIcon: {
453
+ type: [Object, String],
454
+ default: null
455
+ },
456
+ iconRenderer: {
457
+ type: [Object, String],
458
+ default: null
459
+ },
460
+ iconLibrary: {
461
+ type: [String, Object],
462
+ default: null
463
+ },
464
+ showFooter: {
465
+ type: Boolean,
466
+ default: !0
467
+ },
468
+ userInfo: {
469
+ type: Object,
470
+ default: null
471
+ },
472
+ userActions: {
473
+ type: Array,
474
+ default: () => []
475
+ },
476
+ popupDelay: {
477
+ type: Number,
478
+ default: 200
479
+ },
480
+ popupLeft: {
481
+ type: Number,
482
+ default: 240
483
+ },
484
+ navFooterWidth: {
485
+ type: Number,
486
+ default: 240
487
+ },
488
+ userInfoCardType: {
489
+ type: String,
490
+ default: Z.FOOTER,
491
+ validator: (e) => Object.values(Z).includes(e)
492
+ },
493
+ showPopupUserInfo: {
494
+ type: Boolean,
495
+ default: !0
496
+ },
497
+ logoSize: {
498
+ type: Number,
499
+ default: 30
500
+ }
501
+ },
502
+ emits: [
503
+ "toggle",
504
+ "node-click",
505
+ "node-expand",
506
+ "node-collapse",
507
+ "user-action-click"
508
+ ],
509
+ setup(e, { emit: t }) {
510
+ let n = t, r = () => {
511
+ n("toggle");
512
+ }, i = (e, t) => {
513
+ n("node-click", e, t);
514
+ }, u = (e, t) => {
515
+ n("node-expand", e, t);
516
+ }, d = (e, t) => {
517
+ n("node-collapse", e, t);
518
+ }, f = (e, t) => {
519
+ n("user-action-click", e, t);
520
+ };
521
+ return (t, n) => (m(), s("div", me, [c("div", he, [l(ee, {
522
+ "title-style": e.titleStyle,
523
+ title: e.title,
524
+ "logo-size": e.logoSize,
525
+ "show-toggle": e.showToggle,
526
+ "toggle-icon": e.toggleIcon,
527
+ onToggle: r
528
+ }, null, 8, [
529
+ "title-style",
530
+ "title",
531
+ "logo-size",
532
+ "show-toggle",
533
+ "toggle-icon"
534
+ ]), l(ie, {
535
+ "menu-data": e.menuData,
536
+ "current-menu-id": e.currentMenuId,
537
+ "expanded-keys": e.expandedKeys,
538
+ "tree-props": e.treeProps,
539
+ "item-height": e.itemHeight,
540
+ indent: e.indent,
541
+ "icon-size": e.iconSize,
542
+ "select-menu-bg": e.selectMenuBg,
543
+ "expanded-icon": e.expandedIcon,
544
+ "collapsed-icon": e.collapsedIcon,
545
+ "icon-renderer": e.iconRenderer,
546
+ "icon-library": e.iconLibrary,
547
+ onNodeClick: i,
548
+ onNodeExpand: u,
549
+ onNodeCollapse: d
550
+ }, null, 8, [
551
+ "menu-data",
552
+ "current-menu-id",
553
+ "expanded-keys",
554
+ "tree-props",
555
+ "item-height",
556
+ "indent",
557
+ "icon-size",
558
+ "select-menu-bg",
559
+ "expanded-icon",
560
+ "collapsed-icon",
561
+ "icon-renderer",
562
+ "icon-library"
563
+ ])]), e.showFooter ? (m(), a(pe, {
564
+ key: 0,
565
+ "popup-left": e.popupLeft,
566
+ "user-info": e.userInfo,
567
+ actions: e.userActions,
568
+ "popup-delay": e.popupDelay,
569
+ "nav-footer-width": e.navFooterWidth,
570
+ "user-info-card-type": e.userInfoCardType,
571
+ "show-popup-user-info": e.showPopupUserInfo,
572
+ onActionClick: f
573
+ }, null, 8, [
574
+ "popup-left",
575
+ "user-info",
576
+ "actions",
577
+ "popup-delay",
578
+ "nav-footer-width",
579
+ "user-info-card-type",
580
+ "show-popup-user-info"
581
+ ])) : o("", !0)]));
582
+ }
583
+ }), [["__scopeId", "data-v-b8991280"]]));
584
+ //#endregion
585
+ export { R as _, J as a, G as b, N as c, V as d, H as f, U as g, z as h, q as i, te as l, K as m, X as n, Z as o, W as p, Y as r, P as s, ge as t, B as u, L as v, I as x, F as y };