wize-admin-library 0.1.28 → 0.1.30
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,31 +1,31 @@
|
|
|
1
|
-
import { computed as w, ref as
|
|
2
|
-
function
|
|
3
|
-
var
|
|
4
|
-
e && (
|
|
1
|
+
import { computed as w, ref as f, onMounted as C, onBeforeUnmount as g } from "vue";
|
|
2
|
+
function h(l, e, t, a, s, n, i, u) {
|
|
3
|
+
var o = typeof l == "function" ? l.options : l;
|
|
4
|
+
e && (o.render = e, o.staticRenderFns = t, o._compiled = !0), a && (o.functional = !0), n && (o._scopeId = "data-v-" + n);
|
|
5
5
|
var c;
|
|
6
|
-
if (
|
|
7
|
-
|
|
6
|
+
if (i ? (c = function(v) {
|
|
7
|
+
v = v || // cached call
|
|
8
8
|
this.$vnode && this.$vnode.ssrContext || // stateful
|
|
9
|
-
this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext, !
|
|
10
|
-
},
|
|
9
|
+
this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext, !v && typeof __VUE_SSR_CONTEXT__ < "u" && (v = __VUE_SSR_CONTEXT__), s && s.call(this, v), v && v._registeredComponents && v._registeredComponents.add(i);
|
|
10
|
+
}, o._ssrRegister = c) : s && (c = u ? function() {
|
|
11
11
|
s.call(
|
|
12
12
|
this,
|
|
13
|
-
(
|
|
13
|
+
(o.functional ? this.parent : this).$root.$options.shadowRoot
|
|
14
14
|
);
|
|
15
15
|
} : s), c)
|
|
16
|
-
if (
|
|
17
|
-
|
|
18
|
-
var
|
|
19
|
-
|
|
20
|
-
return c.call(
|
|
16
|
+
if (o.functional) {
|
|
17
|
+
o._injectStyles = c;
|
|
18
|
+
var p = o.render;
|
|
19
|
+
o.render = function(r, _) {
|
|
20
|
+
return c.call(_), p(r, _);
|
|
21
21
|
};
|
|
22
22
|
} else {
|
|
23
|
-
var d =
|
|
24
|
-
|
|
23
|
+
var d = o.beforeCreate;
|
|
24
|
+
o.beforeCreate = d ? [].concat(d, c) : [c];
|
|
25
25
|
}
|
|
26
26
|
return {
|
|
27
27
|
exports: l,
|
|
28
|
-
options:
|
|
28
|
+
options: o
|
|
29
29
|
};
|
|
30
30
|
}
|
|
31
31
|
const y = {
|
|
@@ -80,7 +80,7 @@ const y = {
|
|
|
80
80
|
var m = function() {
|
|
81
81
|
var e = this, t = e._self._c, a = e._self._setupProxy;
|
|
82
82
|
return t("button", { class: a.classes, attrs: { disabled: e.disabled }, on: { click: a.handleClick } }, [e._t("default")], 2);
|
|
83
|
-
}, b = [], k = /* @__PURE__ */
|
|
83
|
+
}, b = [], k = /* @__PURE__ */ h(
|
|
84
84
|
y,
|
|
85
85
|
m,
|
|
86
86
|
b,
|
|
@@ -116,7 +116,7 @@ const S = k.exports, $ = {
|
|
|
116
116
|
}
|
|
117
117
|
},
|
|
118
118
|
setup(l) {
|
|
119
|
-
const e = l, t =
|
|
119
|
+
const e = l, t = f(e.defaultCollapsed), a = () => {
|
|
120
120
|
t.value = !t.value;
|
|
121
121
|
};
|
|
122
122
|
return C(() => {
|
|
@@ -127,7 +127,7 @@ const S = k.exports, $ = {
|
|
|
127
127
|
var x = function() {
|
|
128
128
|
var e = this, t = e._self._c, a = e._self._setupProxy;
|
|
129
129
|
return t("div", { staticClass: "wz-admin-layout", class: "is-" + e.navigationStyle, attrs: { "data-theme": e.theme } }, [t("div", { staticClass: "wz-admin-layout-sidebar-container" }, [a.isCollapsed ? e._e() : t("div", { staticClass: "wz-admin-layout-backdrop", on: { click: a.toggleSidebar } }), e._t("sidebar", null, { collapsed: a.isCollapsed })], 2), t("div", { staticClass: "wz-admin-layout-main" }, [t("div", { staticClass: "wz-admin-layout-header-container" }, [e._t("header", null, { toggleSidebar: a.toggleSidebar, collapsed: a.isCollapsed })], 2), e.navigationStyle === "horizontal" ? t("div", { staticClass: "wz-admin-layout-horizontal-nav-container" }, [e._t("horizontal-nav")], 2) : e._e(), t("main", { staticClass: "wz-admin-layout-content" }, [e._t("default")], 2)])]);
|
|
130
|
-
}, M = [], P = /* @__PURE__ */
|
|
130
|
+
}, M = [], P = /* @__PURE__ */ h(
|
|
131
131
|
$,
|
|
132
132
|
x,
|
|
133
133
|
M,
|
|
@@ -194,20 +194,20 @@ const W = P.exports, H = {
|
|
|
194
194
|
},
|
|
195
195
|
emits: ["item-click"],
|
|
196
196
|
setup(l, { emit: e }) {
|
|
197
|
-
const t = l, a =
|
|
198
|
-
if (!u(
|
|
197
|
+
const t = l, a = f(/* @__PURE__ */ new Set()), s = f(!1), n = w(() => t.collapsed && !s.value), i = (r) => r.key === t.activeKey, u = (r) => r.children && r.children.length > 0, o = (r) => u(r) ? r.children.some((_) => _.key === t.activeKey) : !1, c = (r) => a.value.has(r.key), p = (r) => {
|
|
198
|
+
if (!u(r) || n.value)
|
|
199
199
|
return;
|
|
200
200
|
const _ = new Set(a.value);
|
|
201
|
-
_.has(
|
|
201
|
+
_.has(r.key) ? _.delete(r.key) : _.add(r.key), a.value = _;
|
|
202
202
|
};
|
|
203
|
-
return { __sfc: !0, props: t, emit: e, openKeys: a, isHovered: s, visuallyCollapsed: n, isActive:
|
|
203
|
+
return { __sfc: !0, props: t, emit: e, openKeys: a, isHovered: s, visuallyCollapsed: n, isActive: i, hasChildren: u, hasActiveChild: o, isOpen: c, toggle: p, handleClick: (r) => {
|
|
204
204
|
if (n.value) {
|
|
205
|
-
e("item-click",
|
|
205
|
+
e("item-click", r);
|
|
206
206
|
return;
|
|
207
207
|
}
|
|
208
|
-
u(
|
|
209
|
-
}, handleChildClick: (
|
|
210
|
-
e("item-click",
|
|
208
|
+
u(r) ? p(r) : e("item-click", r);
|
|
209
|
+
}, handleChildClick: (r) => {
|
|
210
|
+
e("item-click", r);
|
|
211
211
|
} };
|
|
212
212
|
}
|
|
213
213
|
};
|
|
@@ -220,17 +220,17 @@ var L = function() {
|
|
|
220
220
|
} } }, [t("div", { staticClass: "wz-sidebar-logo" }, [e._t("logo", function() {
|
|
221
221
|
return [e.logoSrc || e.logoMiniSrc ? [a.visuallyCollapsed && e.logoMiniSrc ? t("img", { staticClass: "wz-sidebar-logo-img-mini", attrs: { src: e.logoMiniSrc, alt: "Mini Logo" } }) : !a.visuallyCollapsed && e.logoSrc ? t("img", { staticClass: "wz-sidebar-logo-img", attrs: { src: e.logoSrc, alt: "Logo" } }) : e._e()] : [e.logoIconHtml ? t("span", { staticClass: "wz-sidebar-logo-icon", domProps: { innerHTML: e._s(e.logoIconHtml) } }) : e._e(), t("span", { directives: [{ name: "show", rawName: "v-show", value: !a.visuallyCollapsed, expression: "!visuallyCollapsed" }], staticClass: "wz-sidebar-logo-text" }, [e._v(e._s(e.logoText))])]];
|
|
222
222
|
})], 2), t("nav", { staticClass: "wz-sidebar-nav" }, [e._l(e.items, function(s, n) {
|
|
223
|
-
return [s.type === "group" ? t("div", { directives: [{ name: "show", rawName: "v-show", value: !a.visuallyCollapsed, expression: "!visuallyCollapsed" }], key: `group-${n}`, staticClass: "wz-sidebar-group" }, [e._v(" " + e._s(s.label) + " ")]) : t("div", { key: s.key || n, staticClass: "wz-sidebar-item-wrapper" }, [t("div", { staticClass: "wz-sidebar-item", class: { "wz-sidebar-item--active": a.isActive(s) }, attrs: { title: a.visuallyCollapsed ? s.label : null }, on: { click: function(
|
|
223
|
+
return [s.type === "group" ? t("div", { directives: [{ name: "show", rawName: "v-show", value: !a.visuallyCollapsed, expression: "!visuallyCollapsed" }], key: `group-${n}`, staticClass: "wz-sidebar-group" }, [e._v(" " + e._s(s.label) + " ")]) : t("div", { key: s.key || n, staticClass: "wz-sidebar-item-wrapper" }, [t("div", { staticClass: "wz-sidebar-item", class: { "wz-sidebar-item--active": a.isActive(s) || a.hasActiveChild(s) }, attrs: { title: a.visuallyCollapsed ? s.label : null }, on: { click: function(i) {
|
|
224
224
|
return a.handleClick(s);
|
|
225
225
|
} } }, [t("span", { staticClass: "wz-sidebar-icon" }, [e._t("icon", function() {
|
|
226
226
|
return [s.icon ? t("i", { class: s.icon, staticStyle: { "font-size": "1.125rem" } }) : s.iconHtml ? t("span", { domProps: { innerHTML: e._s(s.iconHtml) } }) : t("i", { staticClass: "ri-checkbox-blank-circle-line", staticStyle: { "font-size": "10px" } })];
|
|
227
|
-
}, { item: s })], 2), t("span", { directives: [{ name: "show", rawName: "v-show", value: !a.visuallyCollapsed, expression: "!visuallyCollapsed" }], staticClass: "wz-sidebar-label" }, [e._v(e._s(s.label))]), a.hasChildren(s) ? t("span", { directives: [{ name: "show", rawName: "v-show", value: !a.visuallyCollapsed, expression: "!visuallyCollapsed" }], staticClass: "wz-sidebar-arrow", class: { "wz-sidebar-arrow--open": a.isOpen(s) } }, [t("i", { staticClass: "ri-arrow-right-s-line", staticStyle: { "font-size": "1.125rem" } })]) : e._e()]), t("div", { directives: [{ name: "show", rawName: "v-show", value: !a.visuallyCollapsed, expression: "!visuallyCollapsed" }], staticClass: "wz-sidebar-children-wrapper", class: { "is-open": a.hasChildren(s) && a.isOpen(s) } }, [t("div", { staticClass: "wz-sidebar-children-inner" }, [a.hasChildren(s) ? t("div", { staticClass: "wz-sidebar-children" }, e._l(s.children, function(
|
|
228
|
-
return t("div", { key:
|
|
229
|
-
return a.handleChildClick(
|
|
230
|
-
} } }, [t("span", { staticClass: "wz-sidebar-label" }, [e._v(e._s(
|
|
227
|
+
}, { item: s })], 2), t("span", { directives: [{ name: "show", rawName: "v-show", value: !a.visuallyCollapsed, expression: "!visuallyCollapsed" }], staticClass: "wz-sidebar-label" }, [e._v(e._s(s.label))]), a.hasChildren(s) ? t("span", { directives: [{ name: "show", rawName: "v-show", value: !a.visuallyCollapsed, expression: "!visuallyCollapsed" }], staticClass: "wz-sidebar-arrow", class: { "wz-sidebar-arrow--open": a.isOpen(s) } }, [t("i", { staticClass: "ri-arrow-right-s-line", staticStyle: { "font-size": "1.125rem" } })]) : e._e()]), t("div", { directives: [{ name: "show", rawName: "v-show", value: !a.visuallyCollapsed, expression: "!visuallyCollapsed" }], staticClass: "wz-sidebar-children-wrapper", class: { "is-open": a.hasChildren(s) && a.isOpen(s) } }, [t("div", { staticClass: "wz-sidebar-children-inner" }, [a.hasChildren(s) ? t("div", { staticClass: "wz-sidebar-children" }, e._l(s.children, function(i) {
|
|
228
|
+
return t("div", { key: i.key, staticClass: "wz-sidebar-child-item", class: { "wz-sidebar-child-item--active": a.isActive(i) }, on: { click: function(u) {
|
|
229
|
+
return a.handleChildClick(i);
|
|
230
|
+
} } }, [t("span", { staticClass: "wz-sidebar-label" }, [e._v(e._s(i.label))]), a.hasChildren(i) ? t("span", { staticClass: "wz-sidebar-arrow" }, [t("i", { staticClass: "ri-arrow-right-s-line", staticStyle: { "font-size": "1rem" } })]) : e._e()]);
|
|
231
231
|
}), 0) : e._e()])])])];
|
|
232
232
|
})], 2)]);
|
|
233
|
-
}, R = [], N = /* @__PURE__ */
|
|
233
|
+
}, R = [], N = /* @__PURE__ */ h(
|
|
234
234
|
H,
|
|
235
235
|
L,
|
|
236
236
|
R,
|
|
@@ -302,18 +302,18 @@ const O = N.exports, T = {
|
|
|
302
302
|
},
|
|
303
303
|
emits: ["menu-toggle", "search", "notifications", "settings", "user-click", "action-click", "user-menu-click"],
|
|
304
304
|
setup(l, { emit: e }) {
|
|
305
|
-
const t = l, a = (c) => c ? c.split(" ").map((
|
|
305
|
+
const t = l, a = (c) => c ? c.split(" ").map((p) => p[0]).slice(0, 2).join("").toUpperCase() : "?", s = f(!1), n = f(null), i = () => {
|
|
306
306
|
s.value = !s.value, e("user-click");
|
|
307
307
|
}, u = (c) => {
|
|
308
308
|
e("user-menu-click", c), s.value = !1;
|
|
309
|
-
},
|
|
309
|
+
}, o = (c) => {
|
|
310
310
|
n.value && !n.value.contains(c.target) && (s.value = !1);
|
|
311
311
|
};
|
|
312
312
|
return C(() => {
|
|
313
|
-
document.addEventListener("click",
|
|
313
|
+
document.addEventListener("click", o);
|
|
314
314
|
}), g(() => {
|
|
315
|
-
document.removeEventListener("click",
|
|
316
|
-
}), { __sfc: !0, props: t, emit: e, initials: a, isUserMenuOpen: s, userMenuContainer: n, toggleUserMenu:
|
|
315
|
+
document.removeEventListener("click", o);
|
|
316
|
+
}), { __sfc: !0, props: t, emit: e, initials: a, isUserMenuOpen: s, userMenuContainer: n, toggleUserMenu: i, handleUserItemClick: u, handleClickOutside: o };
|
|
317
317
|
}
|
|
318
318
|
};
|
|
319
319
|
var B = function() {
|
|
@@ -339,7 +339,7 @@ var B = function() {
|
|
|
339
339
|
return s.stopPropagation(), a.toggleUserMenu.apply(null, arguments);
|
|
340
340
|
} } }, [e.user.avatar ? t("img", { staticClass: "wz-header-user-avatar", attrs: { src: e.user.avatar, alt: e.user.name } }) : t("div", { staticClass: "wz-header-user-avatar-placeholder" }, [e._v(" " + e._s(a.initials(e.user.name)) + " ")]), t("span", { staticClass: "wz-header-user-name" }, [e._v(e._s(e.user.name))])])];
|
|
341
341
|
}), e.userMenuItems && e.userMenuItems.length > 0 ? t("div", { directives: [{ name: "show", rawName: "v-show", value: a.isUserMenuOpen, expression: "isUserMenuOpen" }], staticClass: "wz-header-dropdown" }, [t("div", { staticClass: "wz-header-dropdown-header" }, [t("div", { staticClass: "wz-header-dropdown-title" }, [e._v(e._s(e.user.name))]), e.userSubtitle ? t("div", { staticClass: "wz-header-dropdown-subtitle" }, [e._v(e._s(e.userSubtitle))]) : e._e()]), t("div", { staticClass: "wz-header-dropdown-body" }, e._l(e.userMenuItems, function(s, n) {
|
|
342
|
-
return t("div", { key: n, staticClass: "wz-header-dropdown-item", class: { "wz-header-dropdown-item--logout": s.isLogout }, on: { click: function(
|
|
342
|
+
return t("div", { key: n, staticClass: "wz-header-dropdown-item", class: { "wz-header-dropdown-item--logout": s.isLogout }, on: { click: function(i) {
|
|
343
343
|
return a.handleUserItemClick(s);
|
|
344
344
|
} } }, [s.icon && !s.isLogout ? t("i", { class: s.icon }) : e._e(), t("span", [e._v(e._s(s.label))])]);
|
|
345
345
|
}), 0)]) : e._e()], 2), t("button", { staticClass: "wz-header-action", attrs: { title: "Settings" }, on: { click: function(s) {
|
|
@@ -357,7 +357,7 @@ var B = function() {
|
|
|
357
357
|
}, function() {
|
|
358
358
|
var l = this, e = l._self._c;
|
|
359
359
|
return l._self._setupProxy, e("button", { staticClass: "wz-header-action", attrs: { title: "Fullscreen" } }, [e("i", { staticClass: "ri-fullscreen-line", staticStyle: { "font-size": "1.125rem" } })]);
|
|
360
|
-
}], U = /* @__PURE__ */
|
|
360
|
+
}], U = /* @__PURE__ */ h(
|
|
361
361
|
T,
|
|
362
362
|
B,
|
|
363
363
|
I,
|
|
@@ -367,7 +367,7 @@ var B = function() {
|
|
|
367
367
|
null,
|
|
368
368
|
null
|
|
369
369
|
);
|
|
370
|
-
const
|
|
370
|
+
const A = U.exports, D = {
|
|
371
371
|
__name: "WzSettingsPanel",
|
|
372
372
|
props: {
|
|
373
373
|
/**
|
|
@@ -419,9 +419,9 @@ const D = U.exports, A = {
|
|
|
419
419
|
]
|
|
420
420
|
}
|
|
421
421
|
], s = w(() => [...a, ...t.extraSettings]);
|
|
422
|
-
return { __sfc: !0, props: t, emit: e, baseSettings: a, allSettings: s, handleSelection: (u,
|
|
423
|
-
const c = { ...t.value, [u]:
|
|
424
|
-
e("input", c), e("setting-change", { id: u, value:
|
|
422
|
+
return { __sfc: !0, props: t, emit: e, baseSettings: a, allSettings: s, handleSelection: (u, o) => {
|
|
423
|
+
const c = { ...t.value, [u]: o };
|
|
424
|
+
e("input", c), e("setting-change", { id: u, value: o });
|
|
425
425
|
}, closePanel: () => {
|
|
426
426
|
e("close");
|
|
427
427
|
} };
|
|
@@ -431,7 +431,7 @@ var F = function() {
|
|
|
431
431
|
var e = this, t = e._self._c, a = e._self._setupProxy;
|
|
432
432
|
return t("div", { staticClass: "wz-settings", class: { "wz-settings--open": e.isOpen } }, [t("div", { staticClass: "wz-settings-overlay", on: { click: a.closePanel } }), t("aside", { staticClass: "wz-settings-panel" }, [t("div", { staticClass: "wz-settings-header" }, [t("h3", { staticClass: "wz-settings-title" }, [e._v(e._s(e.title))]), t("button", { staticClass: "wz-settings-close", attrs: { title: "Close Settings" }, on: { click: a.closePanel } }, [t("i", { staticClass: "ri-close-circle-line" })])]), e._m(0), t("div", { staticClass: "wz-settings-body" }, [e._l(a.allSettings, function(s) {
|
|
433
433
|
return [t("div", { staticClass: "wz-settings-section" }, [t("h4", { staticClass: "wz-settings-section-title" }, [e._v(e._s(s.title))]), t("div", { staticClass: "wz-settings-radio-group" }, e._l(s.options, function(n) {
|
|
434
|
-
return t("label", { key: n.value, staticClass: "wz-settings-radio-label" }, [t("div", { staticClass: "wz-settings-radio-circle", class: { "wz-settings-radio-circle--active": e.value[s.id] === n.value } }, [t("span", { directives: [{ name: "show", rawName: "v-show", value: e.value[s.id] === n.value, expression: "value[setting.id] === opt.value" }], staticClass: "wz-settings-radio-dot" })]), t("input", { staticClass: "wz-settings-radio-native", attrs: { type: "radio", name: s.id }, domProps: { value: n.value, checked: e.value[s.id] === n.value }, on: { change: function(
|
|
434
|
+
return t("label", { key: n.value, staticClass: "wz-settings-radio-label" }, [t("div", { staticClass: "wz-settings-radio-circle", class: { "wz-settings-radio-circle--active": e.value[s.id] === n.value } }, [t("span", { directives: [{ name: "show", rawName: "v-show", value: e.value[s.id] === n.value, expression: "value[setting.id] === opt.value" }], staticClass: "wz-settings-radio-dot" })]), t("input", { staticClass: "wz-settings-radio-native", attrs: { type: "radio", name: s.id }, domProps: { value: n.value, checked: e.value[s.id] === n.value }, on: { change: function(i) {
|
|
435
435
|
return a.handleSelection(s.id, n.value);
|
|
436
436
|
} } }), t("span", { staticClass: "wz-settings-radio-text" }, [e._v(e._s(n.label))])]);
|
|
437
437
|
}), 0)])];
|
|
@@ -439,8 +439,8 @@ var F = function() {
|
|
|
439
439
|
}, K = [function() {
|
|
440
440
|
var l = this, e = l._self._c;
|
|
441
441
|
return l._self._setupProxy, e("div", { staticClass: "wz-settings-tabs" }, [e("div", { staticClass: "wz-settings-tab wz-settings-tab--active" }, [l._v("Theme Style")])]);
|
|
442
|
-
}], E = /* @__PURE__ */
|
|
443
|
-
|
|
442
|
+
}], E = /* @__PURE__ */ h(
|
|
443
|
+
D,
|
|
444
444
|
F,
|
|
445
445
|
K,
|
|
446
446
|
!1,
|
|
@@ -463,30 +463,30 @@ const V = E.exports, j = {
|
|
|
463
463
|
},
|
|
464
464
|
emits: ["item-click"],
|
|
465
465
|
setup(l, { emit: e }) {
|
|
466
|
-
const t = l, a =
|
|
466
|
+
const t = l, a = f(null), s = (d) => {
|
|
467
467
|
a.value && a.value.scrollBy({ left: d * 250, behavior: "smooth" });
|
|
468
|
-
}, n =
|
|
469
|
-
const
|
|
470
|
-
|
|
468
|
+
}, n = f(null), i = f({}), u = (d) => {
|
|
469
|
+
const r = d.closest(".wz-horizontal-nav").getBoundingClientRect(), _ = d.getBoundingClientRect();
|
|
470
|
+
i.value = {
|
|
471
471
|
top: "100%",
|
|
472
|
-
left:
|
|
472
|
+
left: _.left - r.left + "px"
|
|
473
473
|
};
|
|
474
|
-
},
|
|
474
|
+
}, o = (d, v) => {
|
|
475
475
|
if (!d.children || d.children.length === 0) {
|
|
476
476
|
e("item-click", d), n.value = null;
|
|
477
477
|
return;
|
|
478
478
|
}
|
|
479
|
-
n.value === d.key ? n.value = null : (u(
|
|
479
|
+
n.value === d.key ? n.value = null : (u(v.currentTarget), n.value = d.key);
|
|
480
480
|
}, c = (d) => {
|
|
481
481
|
e("item-click", d), n.value = null;
|
|
482
|
-
},
|
|
482
|
+
}, p = (d) => {
|
|
483
483
|
d.target.closest(".wz-horizontal-nav") || (n.value = null);
|
|
484
484
|
};
|
|
485
485
|
return C(() => {
|
|
486
|
-
document.addEventListener("click",
|
|
486
|
+
document.addEventListener("click", p);
|
|
487
487
|
}), g(() => {
|
|
488
|
-
document.removeEventListener("click",
|
|
489
|
-
}), { __sfc: !0, props: t, emit: e, trackWrapper: a, scroll: s, openDropdown: n, dropdownStyle:
|
|
488
|
+
document.removeEventListener("click", p);
|
|
489
|
+
}), { __sfc: !0, props: t, emit: e, trackWrapper: a, scroll: s, openDropdown: n, dropdownStyle: i, positionDropdown: u, toggleDropdown: o, handleChildClick: c, handleDocClick: p };
|
|
490
490
|
}
|
|
491
491
|
};
|
|
492
492
|
var X = function() {
|
|
@@ -495,10 +495,10 @@ var X = function() {
|
|
|
495
495
|
return s.stopPropagation(), a.scroll(-1);
|
|
496
496
|
} } }, [t("i", { staticClass: "ri-arrow-left-s-line" })]), t("div", { ref: "trackWrapper", staticClass: "wz-horizontal-nav-track-wrapper" }, [t("div", { staticClass: "wz-horizontal-nav-track" }, [e._l(e.items, function(s, n) {
|
|
497
497
|
return [s.type !== "group" ? t("div", { key: s.key || n, staticClass: "wz-horizontal-nav-item", class: {
|
|
498
|
-
"wz-horizontal-nav-item--active": s.key === e.activeKey || s.children && s.children.some((
|
|
498
|
+
"wz-horizontal-nav-item--active": s.key === e.activeKey || s.children && s.children.some((i) => i.key === e.activeKey),
|
|
499
499
|
"wz-horizontal-nav-item--open": a.openDropdown === s.key
|
|
500
|
-
}, on: { click: function(
|
|
501
|
-
return
|
|
500
|
+
}, on: { click: function(i) {
|
|
501
|
+
return i.stopPropagation(), a.toggleDropdown(s, i);
|
|
502
502
|
} } }, [s.icon ? t("i", { class: s.icon }) : e._e(), t("span", [e._v(e._s(s.label))]), s.children && s.children.length > 0 ? t("i", { staticClass: "wz-horizontal-nav-chevron", class: a.openDropdown === s.key ? "ri-arrow-down-s-line" : "ri-arrow-right-s-line" }) : e._e()]) : e._e()];
|
|
503
503
|
})], 2)]), t("button", { staticClass: "wz-horizontal-nav-arrow", on: { click: function(s) {
|
|
504
504
|
return s.stopPropagation(), a.scroll(1);
|
|
@@ -506,12 +506,12 @@ var X = function() {
|
|
|
506
506
|
s.stopPropagation();
|
|
507
507
|
} } }, [e._l(e.items, function(s) {
|
|
508
508
|
return [s.key === a.openDropdown && s.children ? e._l(s.children, function(n) {
|
|
509
|
-
return t("div", { key: n.key, staticClass: "wz-horizontal-dropdown-child", class: { "wz-horizontal-dropdown-child--active": n.key === e.activeKey }, on: { click: function(
|
|
510
|
-
return
|
|
509
|
+
return t("div", { key: n.key, staticClass: "wz-horizontal-dropdown-child", class: { "wz-horizontal-dropdown-child--active": n.key === e.activeKey }, on: { click: function(i) {
|
|
510
|
+
return i.stopPropagation(), a.handleChildClick(n);
|
|
511
511
|
} } }, [t("span", [e._v(e._s(n.label))]), n.children && n.children.length > 0 ? t("i", { staticClass: "ri-arrow-right-s-line wz-horizontal-dropdown-child-arrow" }) : e._e()]);
|
|
512
512
|
}) : e._e()];
|
|
513
513
|
})], 2) : e._e()]);
|
|
514
|
-
}, q = [], G = /* @__PURE__ */
|
|
514
|
+
}, q = [], G = /* @__PURE__ */ h(
|
|
515
515
|
j,
|
|
516
516
|
X,
|
|
517
517
|
q,
|
|
@@ -524,7 +524,7 @@ var X = function() {
|
|
|
524
524
|
const J = G.exports, Q = {
|
|
525
525
|
WzButton: S,
|
|
526
526
|
WzSidebar: O,
|
|
527
|
-
WzHeader:
|
|
527
|
+
WzHeader: A,
|
|
528
528
|
WzLayout: W,
|
|
529
529
|
WzSettingsPanel: V,
|
|
530
530
|
WzHorizontalNav: J
|
|
@@ -537,7 +537,7 @@ typeof window < "u" && window.Vue && z(window.Vue);
|
|
|
537
537
|
const Z = { install: z };
|
|
538
538
|
export {
|
|
539
539
|
S as WzButton,
|
|
540
|
-
|
|
540
|
+
A as WzHeader,
|
|
541
541
|
J as WzHorizontalNav,
|
|
542
542
|
W as WzLayout,
|
|
543
543
|
V as WzSettingsPanel,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_,d){typeof exports=="object"&&typeof module<"u"?d(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],d):(_=typeof globalThis<"u"?globalThis:_||self,d(_.WizeAdminLibrary={},_.Vue))})(this,function(_,d){"use strict";const Q="";function h(i,e,t,a,s,n,o,v){var r=typeof i=="function"?i.options:i;e&&(r.render=e,r.staticRenderFns=t,r._compiled=!0),a&&(r.functional=!0),n&&(r._scopeId="data-v-"+n);var c;if(o?(c=function(l){l=l||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,!l&&typeof __VUE_SSR_CONTEXT__<"u"&&(l=__VUE_SSR_CONTEXT__),s&&s.call(this,l),l&&l._registeredComponents&&l._registeredComponents.add(o)},r._ssrRegister=c):s&&(c=v?function(){s.call(this,(r.functional?this.parent:this).$root.$options.shadowRoot)}:s),c)if(r.functional){r._injectStyles=c;var p=r.render;r.render=function(f,w){return c.call(w),p(f,w)}}else{var u=r.beforeCreate;r.beforeCreate=u?[].concat(u,c):[c]}return{exports:i,options:r}}const S={__name:"WzButton",props:{variant:{type:String,default:"primary",validator:i=>["primary","secondary","success","danger","warning","info","light","dark","link","outline"].includes(i)},size:{type:String,default:"md",validator:i=>["sm","md","lg"].includes(i)},disabled:{type:Boolean,default:!1},block:{type:Boolean,default:!1}},emits:["click"],setup(i,{emit:e}){const t=i,a=d.computed(()=>["wz-btn",`wz-btn-${t.variant}`,`wz-btn-${t.size}`,{"wz-btn-block":t.block}]);return{__sfc:!0,props:t,emit:e,classes:a,handleClick:n=>{t.disabled||e("click",n)}}}};var $=function(){var e=this,t=e._self._c,a=e._self._setupProxy;return t("button",{class:a.classes,attrs:{disabled:e.disabled},on:{click:a.handleClick}},[e._t("default")],2)},M=[],P=h(S,$,M,!1,null,null,null,null);const g=P.exports,W={__name:"WzLayout",props:{defaultCollapsed:{type:Boolean,default:!1},navigationStyle:{type:String,default:"vertical"},theme:{type:String,default:"light"}},setup(i){const e=i,t=d.ref(e.defaultCollapsed),a=()=>{t.value=!t.value};return d.onMounted(()=>{typeof window<"u"&&window.innerWidth<=768&&(t.value=!0)}),{__sfc:!0,props:e,isCollapsed:t,toggleSidebar:a}}};var x=function(){var e=this,t=e._self._c,a=e._self._setupProxy;return t("div",{staticClass:"wz-admin-layout",class:"is-"+e.navigationStyle,attrs:{"data-theme":e.theme}},[t("div",{staticClass:"wz-admin-layout-sidebar-container"},[a.isCollapsed?e._e():t("div",{staticClass:"wz-admin-layout-backdrop",on:{click:a.toggleSidebar}}),e._t("sidebar",null,{collapsed:a.isCollapsed})],2),t("div",{staticClass:"wz-admin-layout-main"},[t("div",{staticClass:"wz-admin-layout-header-container"},[e._t("header",null,{toggleSidebar:a.toggleSidebar,collapsed:a.isCollapsed})],2),e.navigationStyle==="horizontal"?t("div",{staticClass:"wz-admin-layout-horizontal-nav-container"},[e._t("horizontal-nav")],2):e._e(),t("main",{staticClass:"wz-admin-layout-content"},[e._t("default")],2)])])},H=[],L=h(W,x,H,!1,null,null,null,null);const C=L.exports,T={__name:"WzSidebar",props:{items:{type:Array,default:()=>[]},activeKey:{type:String,default:null},logoSrc:{type:String,default:null},logoMiniSrc:{type:String,default:null},logoText:{type:String,default:"Admin"},logoIconHtml:{type:String,default:null},collapsed:{type:Boolean,default:!1}},emits:["item-click"],setup(i,{emit:e}){const t=i,a=d.ref(new Set),s=d.ref(!1),n=d.computed(()=>t.collapsed&&!s.value),o=l=>l.key===t.activeKey,v=l=>l.children&&l.children.length>0,r=l=>a.value.has(l.key),c=l=>{if(!v(l)||n.value)return;const f=new Set(a.value);f.has(l.key)?f.delete(l.key):f.add(l.key),a.value=f};return{__sfc:!0,props:t,emit:e,openKeys:a,isHovered:s,visuallyCollapsed:n,isActive:o,hasChildren:v,isOpen:r,toggle:c,handleClick:l=>{if(n.value){e("item-click",l);return}v(l)?c(l):e("item-click",l)},handleChildClick:l=>{e("item-click",l)}}}};var N=function(){var e=this,t=e._self._c,a=e._self._setupProxy;return t("aside",{staticClass:"wz-sidebar",class:{"wz-sidebar--collapsed":a.visuallyCollapsed},on:{mouseenter:function(s){a.isHovered=!0},mouseleave:function(s){a.isHovered=!1}}},[t("div",{staticClass:"wz-sidebar-logo"},[e._t("logo",function(){return[e.logoSrc||e.logoMiniSrc?[a.visuallyCollapsed&&e.logoMiniSrc?t("img",{staticClass:"wz-sidebar-logo-img-mini",attrs:{src:e.logoMiniSrc,alt:"Mini Logo"}}):!a.visuallyCollapsed&&e.logoSrc?t("img",{staticClass:"wz-sidebar-logo-img",attrs:{src:e.logoSrc,alt:"Logo"}}):e._e()]:[e.logoIconHtml?t("span",{staticClass:"wz-sidebar-logo-icon",domProps:{innerHTML:e._s(e.logoIconHtml)}}):e._e(),t("span",{directives:[{name:"show",rawName:"v-show",value:!a.visuallyCollapsed,expression:"!visuallyCollapsed"}],staticClass:"wz-sidebar-logo-text"},[e._v(e._s(e.logoText))])]]})],2),t("nav",{staticClass:"wz-sidebar-nav"},[e._l(e.items,function(s,n){return[s.type==="group"?t("div",{directives:[{name:"show",rawName:"v-show",value:!a.visuallyCollapsed,expression:"!visuallyCollapsed"}],key:`group-${n}`,staticClass:"wz-sidebar-group"},[e._v(" "+e._s(s.label)+" ")]):t("div",{key:s.key||n,staticClass:"wz-sidebar-item-wrapper"},[t("div",{staticClass:"wz-sidebar-item",class:{"wz-sidebar-item--active":a.isActive(s)},attrs:{title:a.visuallyCollapsed?s.label:null},on:{click:function(o){return a.handleClick(s)}}},[t("span",{staticClass:"wz-sidebar-icon"},[e._t("icon",function(){return[s.icon?t("i",{class:s.icon,staticStyle:{"font-size":"1.125rem"}}):s.iconHtml?t("span",{domProps:{innerHTML:e._s(s.iconHtml)}}):t("i",{staticClass:"ri-checkbox-blank-circle-line",staticStyle:{"font-size":"10px"}})]},{item:s})],2),t("span",{directives:[{name:"show",rawName:"v-show",value:!a.visuallyCollapsed,expression:"!visuallyCollapsed"}],staticClass:"wz-sidebar-label"},[e._v(e._s(s.label))]),a.hasChildren(s)?t("span",{directives:[{name:"show",rawName:"v-show",value:!a.visuallyCollapsed,expression:"!visuallyCollapsed"}],staticClass:"wz-sidebar-arrow",class:{"wz-sidebar-arrow--open":a.isOpen(s)}},[t("i",{staticClass:"ri-arrow-right-s-line",staticStyle:{"font-size":"1.125rem"}})]):e._e()]),t("div",{directives:[{name:"show",rawName:"v-show",value:!a.visuallyCollapsed,expression:"!visuallyCollapsed"}],staticClass:"wz-sidebar-children-wrapper",class:{"is-open":a.hasChildren(s)&&a.isOpen(s)}},[t("div",{staticClass:"wz-sidebar-children-inner"},[a.hasChildren(s)?t("div",{staticClass:"wz-sidebar-children"},e._l(s.children,function(o){return t("div",{key:o.key,staticClass:"wz-sidebar-child-item",class:{"wz-sidebar-child-item--active":a.isActive(o)},on:{click:function(v){return a.handleChildClick(o)}}},[t("span",{staticClass:"wz-sidebar-label"},[e._v(e._s(o.label))]),a.hasChildren(o)?t("span",{staticClass:"wz-sidebar-arrow"},[t("i",{staticClass:"ri-arrow-right-s-line",staticStyle:{"font-size":"1rem"}})]):e._e()])}),0):e._e()])])])]})],2)])},O=[],R=h(T,N,O,!1,null,null,null,null);const z=R.exports,B={__name:"WzHeader",props:{user:{type:Object,default:()=>({name:"User",avatar:null})},notificationCount:{type:Number,default:0},collapsed:{type:Boolean,default:!1},actionItems:{type:Array,default:()=>[]},userMenuItems:{type:Array,default:()=>[]},userSubtitle:{type:String,default:""},logoSrc:{type:String,default:""},layoutMode:{type:String,default:"vertical"}},emits:["menu-toggle","search","notifications","settings","user-click","action-click","user-menu-click"],setup(i,{emit:e}){const t=i,a=c=>c?c.split(" ").map(p=>p[0]).slice(0,2).join("").toUpperCase():"?",s=d.ref(!1),n=d.ref(null),o=()=>{s.value=!s.value,e("user-click")},v=c=>{e("user-menu-click",c),s.value=!1},r=c=>{n.value&&!n.value.contains(c.target)&&(s.value=!1)};return d.onMounted(()=>{document.addEventListener("click",r)}),d.onBeforeUnmount(()=>{document.removeEventListener("click",r)}),{__sfc:!0,props:t,emit:e,initials:a,isUserMenuOpen:s,userMenuContainer:n,toggleUserMenu:o,handleUserItemClick:v,handleClickOutside:r}}};var U=function(){var e=this,t=e._self._c,a=e._self._setupProxy;return t("header",{staticClass:"wz-header",class:{"wz-header--horizontal":e.layoutMode==="horizontal"}},[t("div",{staticClass:"wz-header-left"},[e.layoutMode==="vertical"?t("button",{staticClass:"wz-header-action wz-header-icon-desktop",attrs:{title:"Toggle Menu"},on:{click:function(s){return e.$emit("menu-toggle")}}},[t("i",{class:e.collapsed?"ri-menu-unfold-line":"ri-menu-fold-line"})]):e._e(),t("button",{staticClass:"wz-header-action wz-header-icon-mobile",staticStyle:{display:"none"},attrs:{title:"Toggle Menu"},on:{click:function(s){return e.$emit("menu-toggle")}}},[t("i",{staticClass:"ri-menu-2-line"})]),t("div",{staticClass:"wz-header-dynamic-logo",class:e.layoutMode==="horizontal"?"wz-header-logo-always-visible":"wz-header-mobile-logo"},[e.logoSrc?t("img",{staticClass:"wz-header-dynamic-logo-img",attrs:{src:e.logoSrc,alt:"Logo"}}):e._e()]),e._t("left")],2),t("div",{staticClass:"wz-header-right"},[e._t("actions",function(){return[e.actionItems&&e.actionItems.length?[e._l(e.actionItems,function(s){return[s.badge?t("div",{key:"badge-"+s.key,staticClass:"wz-header-badge"},[t("button",{staticClass:"wz-header-action",attrs:{title:s.key},on:{click:function(n){return a.emit("action-click",s)}}},[t("i",{class:s.icon,staticStyle:{"font-size":"1.125rem"}})]),s.badgeCount||e.notificationCount>0?t("span",{staticClass:"wz-header-badge-dot"},[e._v(" "+e._s(s.badgeCount||e.notificationCount>9?"9+":s.badgeCount||e.notificationCount)+" ")]):e._e()]):t("button",{key:s.key,staticClass:"wz-header-action",attrs:{title:s.key},on:{click:function(n){return a.emit("action-click",s)}}},[t("i",{class:s.icon,staticStyle:{"font-size":"1.125rem"}})])]})]:[t("button",{staticClass:"wz-header-action",attrs:{title:"Search"},on:{click:function(s){return a.emit("search")}}},[t("i",{staticClass:"ri-search-line",staticStyle:{"font-size":"1.125rem"}})]),e._m(0),e._m(1),t("div",{staticClass:"wz-header-badge"},[t("button",{staticClass:"wz-header-action",attrs:{title:"Notifications"},on:{click:function(s){return a.emit("notifications")}}},[t("i",{staticClass:"ri-notification-3-line",staticStyle:{"font-size":"1.125rem"}})]),e.notificationCount>0?t("span",{staticClass:"wz-header-badge-dot"},[e._v(" "+e._s(e.notificationCount>9?"9+":e.notificationCount)+" ")]):e._e()]),e._m(2),e._m(3)]]}),t("div",{staticClass:"wz-header-divider"}),t("div",{ref:"userMenuContainer",staticClass:"wz-header-user-wrapper"},[e._t("user",function(){return[t("div",{staticClass:"wz-header-user",on:{click:function(s){return s.stopPropagation(),a.toggleUserMenu.apply(null,arguments)}}},[e.user.avatar?t("img",{staticClass:"wz-header-user-avatar",attrs:{src:e.user.avatar,alt:e.user.name}}):t("div",{staticClass:"wz-header-user-avatar-placeholder"},[e._v(" "+e._s(a.initials(e.user.name))+" ")]),t("span",{staticClass:"wz-header-user-name"},[e._v(e._s(e.user.name))])])]}),e.userMenuItems&&e.userMenuItems.length>0?t("div",{directives:[{name:"show",rawName:"v-show",value:a.isUserMenuOpen,expression:"isUserMenuOpen"}],staticClass:"wz-header-dropdown"},[t("div",{staticClass:"wz-header-dropdown-header"},[t("div",{staticClass:"wz-header-dropdown-title"},[e._v(e._s(e.user.name))]),e.userSubtitle?t("div",{staticClass:"wz-header-dropdown-subtitle"},[e._v(e._s(e.userSubtitle))]):e._e()]),t("div",{staticClass:"wz-header-dropdown-body"},e._l(e.userMenuItems,function(s,n){return t("div",{key:n,staticClass:"wz-header-dropdown-item",class:{"wz-header-dropdown-item--logout":s.isLogout},on:{click:function(o){return a.handleUserItemClick(s)}}},[s.icon&&!s.isLogout?t("i",{class:s.icon}):e._e(),t("span",[e._v(e._s(s.label))])])}),0)]):e._e()],2),t("button",{staticClass:"wz-header-action",attrs:{title:"Settings"},on:{click:function(s){return a.emit("settings")}}},[t("i",{staticClass:"ri-settings-3-line wz-anim-spin",staticStyle:{"font-size":"1.125rem",display:"inline-block"}})])],2)])},I=[function(){var i=this,e=i._self._c;return i._self._setupProxy,e("button",{staticClass:"wz-header-action",attrs:{title:"Language"}},[e("i",{staticClass:"ri-global-line",staticStyle:{"font-size":"1.125rem"}})])},function(){var i=this,e=i._self._c;return i._self._setupProxy,e("button",{staticClass:"wz-header-action",attrs:{title:"Toggle dark mode"}},[e("i",{staticClass:"ri-moon-line",staticStyle:{"font-size":"1.125rem"}})])},function(){var i=this,e=i._self._c;return i._self._setupProxy,e("button",{staticClass:"wz-header-action",attrs:{title:"Calendar"}},[e("i",{staticClass:"ri-calendar-line",staticStyle:{"font-size":"1.125rem"}})])},function(){var i=this,e=i._self._c;return i._self._setupProxy,e("button",{staticClass:"wz-header-action",attrs:{title:"Fullscreen"}},[e("i",{staticClass:"ri-fullscreen-line",staticStyle:{"font-size":"1.125rem"}})])}],A=h(B,U,I,!1,null,null,null,null);const y=A.exports,D={__name:"WzSettingsPanel",props:{isOpen:{type:Boolean,default:!1},title:{type:String,default:"Switcher"},value:{type:Object,default:()=>({})},extraSettings:{type:Array,default:()=>[]}},emits:["close","input","setting-change"],setup(i,{emit:e}){const t=i,a=[{id:"themeMode",title:"Theme Color Mode:",options:[{value:"light",label:"Light"},{value:"dark",label:"Dark"}]},{id:"navigationStyle",title:"Navigation Styles:",options:[{value:"vertical",label:"Vertical"},{value:"horizontal",label:"Horizontal"}]}],s=d.computed(()=>[...a,...t.extraSettings]);return{__sfc:!0,props:t,emit:e,baseSettings:a,allSettings:s,handleSelection:(v,r)=>{const c={...t.value,[v]:r};e("input",c),e("setting-change",{id:v,value:r})},closePanel:()=>{e("close")}}}};var F=function(){var e=this,t=e._self._c,a=e._self._setupProxy;return t("div",{staticClass:"wz-settings",class:{"wz-settings--open":e.isOpen}},[t("div",{staticClass:"wz-settings-overlay",on:{click:a.closePanel}}),t("aside",{staticClass:"wz-settings-panel"},[t("div",{staticClass:"wz-settings-header"},[t("h3",{staticClass:"wz-settings-title"},[e._v(e._s(e.title))]),t("button",{staticClass:"wz-settings-close",attrs:{title:"Close Settings"},on:{click:a.closePanel}},[t("i",{staticClass:"ri-close-circle-line"})])]),e._m(0),t("div",{staticClass:"wz-settings-body"},[e._l(a.allSettings,function(s){return[t("div",{staticClass:"wz-settings-section"},[t("h4",{staticClass:"wz-settings-section-title"},[e._v(e._s(s.title))]),t("div",{staticClass:"wz-settings-radio-group"},e._l(s.options,function(n){return t("label",{key:n.value,staticClass:"wz-settings-radio-label"},[t("div",{staticClass:"wz-settings-radio-circle",class:{"wz-settings-radio-circle--active":e.value[s.id]===n.value}},[t("span",{directives:[{name:"show",rawName:"v-show",value:e.value[s.id]===n.value,expression:"value[setting.id] === opt.value"}],staticClass:"wz-settings-radio-dot"})]),t("input",{staticClass:"wz-settings-radio-native",attrs:{type:"radio",name:s.id},domProps:{value:n.value,checked:e.value[s.id]===n.value},on:{change:function(o){return a.handleSelection(s.id,n.value)}}}),t("span",{staticClass:"wz-settings-radio-text"},[e._v(e._s(n.label))])])}),0)])]})],2)])])},K=[function(){var i=this,e=i._self._c;return i._self._setupProxy,e("div",{staticClass:"wz-settings-tabs"},[e("div",{staticClass:"wz-settings-tab wz-settings-tab--active"},[i._v("Theme Style")])])}],E=h(D,F,K,!1,null,null,null,null);const m=E.exports,V={__name:"WzHorizontalNav",props:{items:{type:Array,default:()=>[]},activeKey:{type:String,default:null}},emits:["item-click"],setup(i,{emit:e}){const t=i,a=d.ref(null),s=u=>{a.value&&a.value.scrollBy({left:u*250,behavior:"smooth"})},n=d.ref(null),o=d.ref({}),v=u=>{const f=u.closest(".wz-horizontal-nav").getBoundingClientRect(),w=u.getBoundingClientRect();o.value={top:"100%",left:w.left-f.left+"px"}},r=(u,l)=>{if(!u.children||u.children.length===0){e("item-click",u),n.value=null;return}n.value===u.key?n.value=null:(v(l.currentTarget),n.value=u.key)},c=u=>{e("item-click",u),n.value=null},p=u=>{u.target.closest(".wz-horizontal-nav")||(n.value=null)};return d.onMounted(()=>{document.addEventListener("click",p)}),d.onBeforeUnmount(()=>{document.removeEventListener("click",p)}),{__sfc:!0,props:t,emit:e,trackWrapper:a,scroll:s,openDropdown:n,dropdownStyle:o,positionDropdown:v,toggleDropdown:r,handleChildClick:c,handleDocClick:p}}};var j=function(){var e=this,t=e._self._c,a=e._self._setupProxy;return t("div",{staticClass:"wz-horizontal-nav"},[t("button",{staticClass:"wz-horizontal-nav-arrow",on:{click:function(s){return s.stopPropagation(),a.scroll(-1)}}},[t("i",{staticClass:"ri-arrow-left-s-line"})]),t("div",{ref:"trackWrapper",staticClass:"wz-horizontal-nav-track-wrapper"},[t("div",{staticClass:"wz-horizontal-nav-track"},[e._l(e.items,function(s,n){return[s.type!=="group"?t("div",{key:s.key||n,staticClass:"wz-horizontal-nav-item",class:{"wz-horizontal-nav-item--active":s.key===e.activeKey||s.children&&s.children.some(o=>o.key===e.activeKey),"wz-horizontal-nav-item--open":a.openDropdown===s.key},on:{click:function(o){return o.stopPropagation(),a.toggleDropdown(s,o)}}},[s.icon?t("i",{class:s.icon}):e._e(),t("span",[e._v(e._s(s.label))]),s.children&&s.children.length>0?t("i",{staticClass:"wz-horizontal-nav-chevron",class:a.openDropdown===s.key?"ri-arrow-down-s-line":"ri-arrow-right-s-line"}):e._e()]):e._e()]})],2)]),t("button",{staticClass:"wz-horizontal-nav-arrow",on:{click:function(s){return s.stopPropagation(),a.scroll(1)}}},[t("i",{staticClass:"ri-arrow-right-s-line"})]),a.openDropdown?t("div",{staticClass:"wz-horizontal-nav-dropdown",style:a.dropdownStyle,on:{click:function(s){s.stopPropagation()}}},[e._l(e.items,function(s){return[s.key===a.openDropdown&&s.children?e._l(s.children,function(n){return t("div",{key:n.key,staticClass:"wz-horizontal-dropdown-child",class:{"wz-horizontal-dropdown-child--active":n.key===e.activeKey},on:{click:function(o){return o.stopPropagation(),a.handleChildClick(n)}}},[t("span",[e._v(e._s(n.label))]),n.children&&n.children.length>0?t("i",{staticClass:"ri-arrow-right-s-line wz-horizontal-dropdown-child-arrow"}):e._e()])}):e._e()]})],2):e._e()])},X=[],q=h(V,j,X,!1,null,null,null,null);const b=q.exports,G={WzButton:g,WzSidebar:z,WzHeader:y,WzLayout:C,WzSettingsPanel:m,WzHorizontalNav:b},k=i=>{Object.entries(G).forEach(([e,t])=>{i.component(e,t)})};typeof window<"u"&&window.Vue&&k(window.Vue);const J={install:k};_.WzButton=g,_.WzHeader=y,_.WzHorizontalNav=b,_.WzLayout=C,_.WzSettingsPanel=m,_.WzSidebar=z,_.default=J,Object.defineProperties(_,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
1
|
+
(function(p,d){typeof exports=="object"&&typeof module<"u"?d(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],d):(p=typeof globalThis<"u"?globalThis:p||self,d(p.WizeAdminLibrary={},p.Vue))})(this,function(p,d){"use strict";const Q="";function w(i,e,t,a,s,n,l,v){var o=typeof i=="function"?i.options:i;e&&(o.render=e,o.staticRenderFns=t,o._compiled=!0),a&&(o.functional=!0),n&&(o._scopeId="data-v-"+n);var c;if(l?(c=function(_){_=_||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,!_&&typeof __VUE_SSR_CONTEXT__<"u"&&(_=__VUE_SSR_CONTEXT__),s&&s.call(this,_),_&&_._registeredComponents&&_._registeredComponents.add(l)},o._ssrRegister=c):s&&(c=v?function(){s.call(this,(o.functional?this.parent:this).$root.$options.shadowRoot)}:s),c)if(o.functional){o._injectStyles=c;var h=o.render;o.render=function(r,f){return c.call(f),h(r,f)}}else{var u=o.beforeCreate;o.beforeCreate=u?[].concat(u,c):[c]}return{exports:i,options:o}}const S={__name:"WzButton",props:{variant:{type:String,default:"primary",validator:i=>["primary","secondary","success","danger","warning","info","light","dark","link","outline"].includes(i)},size:{type:String,default:"md",validator:i=>["sm","md","lg"].includes(i)},disabled:{type:Boolean,default:!1},block:{type:Boolean,default:!1}},emits:["click"],setup(i,{emit:e}){const t=i,a=d.computed(()=>["wz-btn",`wz-btn-${t.variant}`,`wz-btn-${t.size}`,{"wz-btn-block":t.block}]);return{__sfc:!0,props:t,emit:e,classes:a,handleClick:n=>{t.disabled||e("click",n)}}}};var $=function(){var e=this,t=e._self._c,a=e._self._setupProxy;return t("button",{class:a.classes,attrs:{disabled:e.disabled},on:{click:a.handleClick}},[e._t("default")],2)},M=[],P=w(S,$,M,!1,null,null,null,null);const C=P.exports,W={__name:"WzLayout",props:{defaultCollapsed:{type:Boolean,default:!1},navigationStyle:{type:String,default:"vertical"},theme:{type:String,default:"light"}},setup(i){const e=i,t=d.ref(e.defaultCollapsed),a=()=>{t.value=!t.value};return d.onMounted(()=>{typeof window<"u"&&window.innerWidth<=768&&(t.value=!0)}),{__sfc:!0,props:e,isCollapsed:t,toggleSidebar:a}}};var x=function(){var e=this,t=e._self._c,a=e._self._setupProxy;return t("div",{staticClass:"wz-admin-layout",class:"is-"+e.navigationStyle,attrs:{"data-theme":e.theme}},[t("div",{staticClass:"wz-admin-layout-sidebar-container"},[a.isCollapsed?e._e():t("div",{staticClass:"wz-admin-layout-backdrop",on:{click:a.toggleSidebar}}),e._t("sidebar",null,{collapsed:a.isCollapsed})],2),t("div",{staticClass:"wz-admin-layout-main"},[t("div",{staticClass:"wz-admin-layout-header-container"},[e._t("header",null,{toggleSidebar:a.toggleSidebar,collapsed:a.isCollapsed})],2),e.navigationStyle==="horizontal"?t("div",{staticClass:"wz-admin-layout-horizontal-nav-container"},[e._t("horizontal-nav")],2):e._e(),t("main",{staticClass:"wz-admin-layout-content"},[e._t("default")],2)])])},H=[],L=w(W,x,H,!1,null,null,null,null);const g=L.exports,T={__name:"WzSidebar",props:{items:{type:Array,default:()=>[]},activeKey:{type:String,default:null},logoSrc:{type:String,default:null},logoMiniSrc:{type:String,default:null},logoText:{type:String,default:"Admin"},logoIconHtml:{type:String,default:null},collapsed:{type:Boolean,default:!1}},emits:["item-click"],setup(i,{emit:e}){const t=i,a=d.ref(new Set),s=d.ref(!1),n=d.computed(()=>t.collapsed&&!s.value),l=r=>r.key===t.activeKey,v=r=>r.children&&r.children.length>0,o=r=>v(r)?r.children.some(f=>f.key===t.activeKey):!1,c=r=>a.value.has(r.key),h=r=>{if(!v(r)||n.value)return;const f=new Set(a.value);f.has(r.key)?f.delete(r.key):f.add(r.key),a.value=f};return{__sfc:!0,props:t,emit:e,openKeys:a,isHovered:s,visuallyCollapsed:n,isActive:l,hasChildren:v,hasActiveChild:o,isOpen:c,toggle:h,handleClick:r=>{if(n.value){e("item-click",r);return}v(r)?h(r):e("item-click",r)},handleChildClick:r=>{e("item-click",r)}}}};var N=function(){var e=this,t=e._self._c,a=e._self._setupProxy;return t("aside",{staticClass:"wz-sidebar",class:{"wz-sidebar--collapsed":a.visuallyCollapsed},on:{mouseenter:function(s){a.isHovered=!0},mouseleave:function(s){a.isHovered=!1}}},[t("div",{staticClass:"wz-sidebar-logo"},[e._t("logo",function(){return[e.logoSrc||e.logoMiniSrc?[a.visuallyCollapsed&&e.logoMiniSrc?t("img",{staticClass:"wz-sidebar-logo-img-mini",attrs:{src:e.logoMiniSrc,alt:"Mini Logo"}}):!a.visuallyCollapsed&&e.logoSrc?t("img",{staticClass:"wz-sidebar-logo-img",attrs:{src:e.logoSrc,alt:"Logo"}}):e._e()]:[e.logoIconHtml?t("span",{staticClass:"wz-sidebar-logo-icon",domProps:{innerHTML:e._s(e.logoIconHtml)}}):e._e(),t("span",{directives:[{name:"show",rawName:"v-show",value:!a.visuallyCollapsed,expression:"!visuallyCollapsed"}],staticClass:"wz-sidebar-logo-text"},[e._v(e._s(e.logoText))])]]})],2),t("nav",{staticClass:"wz-sidebar-nav"},[e._l(e.items,function(s,n){return[s.type==="group"?t("div",{directives:[{name:"show",rawName:"v-show",value:!a.visuallyCollapsed,expression:"!visuallyCollapsed"}],key:`group-${n}`,staticClass:"wz-sidebar-group"},[e._v(" "+e._s(s.label)+" ")]):t("div",{key:s.key||n,staticClass:"wz-sidebar-item-wrapper"},[t("div",{staticClass:"wz-sidebar-item",class:{"wz-sidebar-item--active":a.isActive(s)||a.hasActiveChild(s)},attrs:{title:a.visuallyCollapsed?s.label:null},on:{click:function(l){return a.handleClick(s)}}},[t("span",{staticClass:"wz-sidebar-icon"},[e._t("icon",function(){return[s.icon?t("i",{class:s.icon,staticStyle:{"font-size":"1.125rem"}}):s.iconHtml?t("span",{domProps:{innerHTML:e._s(s.iconHtml)}}):t("i",{staticClass:"ri-checkbox-blank-circle-line",staticStyle:{"font-size":"10px"}})]},{item:s})],2),t("span",{directives:[{name:"show",rawName:"v-show",value:!a.visuallyCollapsed,expression:"!visuallyCollapsed"}],staticClass:"wz-sidebar-label"},[e._v(e._s(s.label))]),a.hasChildren(s)?t("span",{directives:[{name:"show",rawName:"v-show",value:!a.visuallyCollapsed,expression:"!visuallyCollapsed"}],staticClass:"wz-sidebar-arrow",class:{"wz-sidebar-arrow--open":a.isOpen(s)}},[t("i",{staticClass:"ri-arrow-right-s-line",staticStyle:{"font-size":"1.125rem"}})]):e._e()]),t("div",{directives:[{name:"show",rawName:"v-show",value:!a.visuallyCollapsed,expression:"!visuallyCollapsed"}],staticClass:"wz-sidebar-children-wrapper",class:{"is-open":a.hasChildren(s)&&a.isOpen(s)}},[t("div",{staticClass:"wz-sidebar-children-inner"},[a.hasChildren(s)?t("div",{staticClass:"wz-sidebar-children"},e._l(s.children,function(l){return t("div",{key:l.key,staticClass:"wz-sidebar-child-item",class:{"wz-sidebar-child-item--active":a.isActive(l)},on:{click:function(v){return a.handleChildClick(l)}}},[t("span",{staticClass:"wz-sidebar-label"},[e._v(e._s(l.label))]),a.hasChildren(l)?t("span",{staticClass:"wz-sidebar-arrow"},[t("i",{staticClass:"ri-arrow-right-s-line",staticStyle:{"font-size":"1rem"}})]):e._e()])}),0):e._e()])])])]})],2)])},O=[],R=w(T,N,O,!1,null,null,null,null);const z=R.exports,B={__name:"WzHeader",props:{user:{type:Object,default:()=>({name:"User",avatar:null})},notificationCount:{type:Number,default:0},collapsed:{type:Boolean,default:!1},actionItems:{type:Array,default:()=>[]},userMenuItems:{type:Array,default:()=>[]},userSubtitle:{type:String,default:""},logoSrc:{type:String,default:""},layoutMode:{type:String,default:"vertical"}},emits:["menu-toggle","search","notifications","settings","user-click","action-click","user-menu-click"],setup(i,{emit:e}){const t=i,a=c=>c?c.split(" ").map(h=>h[0]).slice(0,2).join("").toUpperCase():"?",s=d.ref(!1),n=d.ref(null),l=()=>{s.value=!s.value,e("user-click")},v=c=>{e("user-menu-click",c),s.value=!1},o=c=>{n.value&&!n.value.contains(c.target)&&(s.value=!1)};return d.onMounted(()=>{document.addEventListener("click",o)}),d.onBeforeUnmount(()=>{document.removeEventListener("click",o)}),{__sfc:!0,props:t,emit:e,initials:a,isUserMenuOpen:s,userMenuContainer:n,toggleUserMenu:l,handleUserItemClick:v,handleClickOutside:o}}};var U=function(){var e=this,t=e._self._c,a=e._self._setupProxy;return t("header",{staticClass:"wz-header",class:{"wz-header--horizontal":e.layoutMode==="horizontal"}},[t("div",{staticClass:"wz-header-left"},[e.layoutMode==="vertical"?t("button",{staticClass:"wz-header-action wz-header-icon-desktop",attrs:{title:"Toggle Menu"},on:{click:function(s){return e.$emit("menu-toggle")}}},[t("i",{class:e.collapsed?"ri-menu-unfold-line":"ri-menu-fold-line"})]):e._e(),t("button",{staticClass:"wz-header-action wz-header-icon-mobile",staticStyle:{display:"none"},attrs:{title:"Toggle Menu"},on:{click:function(s){return e.$emit("menu-toggle")}}},[t("i",{staticClass:"ri-menu-2-line"})]),t("div",{staticClass:"wz-header-dynamic-logo",class:e.layoutMode==="horizontal"?"wz-header-logo-always-visible":"wz-header-mobile-logo"},[e.logoSrc?t("img",{staticClass:"wz-header-dynamic-logo-img",attrs:{src:e.logoSrc,alt:"Logo"}}):e._e()]),e._t("left")],2),t("div",{staticClass:"wz-header-right"},[e._t("actions",function(){return[e.actionItems&&e.actionItems.length?[e._l(e.actionItems,function(s){return[s.badge?t("div",{key:"badge-"+s.key,staticClass:"wz-header-badge"},[t("button",{staticClass:"wz-header-action",attrs:{title:s.key},on:{click:function(n){return a.emit("action-click",s)}}},[t("i",{class:s.icon,staticStyle:{"font-size":"1.125rem"}})]),s.badgeCount||e.notificationCount>0?t("span",{staticClass:"wz-header-badge-dot"},[e._v(" "+e._s(s.badgeCount||e.notificationCount>9?"9+":s.badgeCount||e.notificationCount)+" ")]):e._e()]):t("button",{key:s.key,staticClass:"wz-header-action",attrs:{title:s.key},on:{click:function(n){return a.emit("action-click",s)}}},[t("i",{class:s.icon,staticStyle:{"font-size":"1.125rem"}})])]})]:[t("button",{staticClass:"wz-header-action",attrs:{title:"Search"},on:{click:function(s){return a.emit("search")}}},[t("i",{staticClass:"ri-search-line",staticStyle:{"font-size":"1.125rem"}})]),e._m(0),e._m(1),t("div",{staticClass:"wz-header-badge"},[t("button",{staticClass:"wz-header-action",attrs:{title:"Notifications"},on:{click:function(s){return a.emit("notifications")}}},[t("i",{staticClass:"ri-notification-3-line",staticStyle:{"font-size":"1.125rem"}})]),e.notificationCount>0?t("span",{staticClass:"wz-header-badge-dot"},[e._v(" "+e._s(e.notificationCount>9?"9+":e.notificationCount)+" ")]):e._e()]),e._m(2),e._m(3)]]}),t("div",{staticClass:"wz-header-divider"}),t("div",{ref:"userMenuContainer",staticClass:"wz-header-user-wrapper"},[e._t("user",function(){return[t("div",{staticClass:"wz-header-user",on:{click:function(s){return s.stopPropagation(),a.toggleUserMenu.apply(null,arguments)}}},[e.user.avatar?t("img",{staticClass:"wz-header-user-avatar",attrs:{src:e.user.avatar,alt:e.user.name}}):t("div",{staticClass:"wz-header-user-avatar-placeholder"},[e._v(" "+e._s(a.initials(e.user.name))+" ")]),t("span",{staticClass:"wz-header-user-name"},[e._v(e._s(e.user.name))])])]}),e.userMenuItems&&e.userMenuItems.length>0?t("div",{directives:[{name:"show",rawName:"v-show",value:a.isUserMenuOpen,expression:"isUserMenuOpen"}],staticClass:"wz-header-dropdown"},[t("div",{staticClass:"wz-header-dropdown-header"},[t("div",{staticClass:"wz-header-dropdown-title"},[e._v(e._s(e.user.name))]),e.userSubtitle?t("div",{staticClass:"wz-header-dropdown-subtitle"},[e._v(e._s(e.userSubtitle))]):e._e()]),t("div",{staticClass:"wz-header-dropdown-body"},e._l(e.userMenuItems,function(s,n){return t("div",{key:n,staticClass:"wz-header-dropdown-item",class:{"wz-header-dropdown-item--logout":s.isLogout},on:{click:function(l){return a.handleUserItemClick(s)}}},[s.icon&&!s.isLogout?t("i",{class:s.icon}):e._e(),t("span",[e._v(e._s(s.label))])])}),0)]):e._e()],2),t("button",{staticClass:"wz-header-action",attrs:{title:"Settings"},on:{click:function(s){return a.emit("settings")}}},[t("i",{staticClass:"ri-settings-3-line wz-anim-spin",staticStyle:{"font-size":"1.125rem",display:"inline-block"}})])],2)])},A=[function(){var i=this,e=i._self._c;return i._self._setupProxy,e("button",{staticClass:"wz-header-action",attrs:{title:"Language"}},[e("i",{staticClass:"ri-global-line",staticStyle:{"font-size":"1.125rem"}})])},function(){var i=this,e=i._self._c;return i._self._setupProxy,e("button",{staticClass:"wz-header-action",attrs:{title:"Toggle dark mode"}},[e("i",{staticClass:"ri-moon-line",staticStyle:{"font-size":"1.125rem"}})])},function(){var i=this,e=i._self._c;return i._self._setupProxy,e("button",{staticClass:"wz-header-action",attrs:{title:"Calendar"}},[e("i",{staticClass:"ri-calendar-line",staticStyle:{"font-size":"1.125rem"}})])},function(){var i=this,e=i._self._c;return i._self._setupProxy,e("button",{staticClass:"wz-header-action",attrs:{title:"Fullscreen"}},[e("i",{staticClass:"ri-fullscreen-line",staticStyle:{"font-size":"1.125rem"}})])}],I=w(B,U,A,!1,null,null,null,null);const y=I.exports,D={__name:"WzSettingsPanel",props:{isOpen:{type:Boolean,default:!1},title:{type:String,default:"Switcher"},value:{type:Object,default:()=>({})},extraSettings:{type:Array,default:()=>[]}},emits:["close","input","setting-change"],setup(i,{emit:e}){const t=i,a=[{id:"themeMode",title:"Theme Color Mode:",options:[{value:"light",label:"Light"},{value:"dark",label:"Dark"}]},{id:"navigationStyle",title:"Navigation Styles:",options:[{value:"vertical",label:"Vertical"},{value:"horizontal",label:"Horizontal"}]}],s=d.computed(()=>[...a,...t.extraSettings]);return{__sfc:!0,props:t,emit:e,baseSettings:a,allSettings:s,handleSelection:(v,o)=>{const c={...t.value,[v]:o};e("input",c),e("setting-change",{id:v,value:o})},closePanel:()=>{e("close")}}}};var F=function(){var e=this,t=e._self._c,a=e._self._setupProxy;return t("div",{staticClass:"wz-settings",class:{"wz-settings--open":e.isOpen}},[t("div",{staticClass:"wz-settings-overlay",on:{click:a.closePanel}}),t("aside",{staticClass:"wz-settings-panel"},[t("div",{staticClass:"wz-settings-header"},[t("h3",{staticClass:"wz-settings-title"},[e._v(e._s(e.title))]),t("button",{staticClass:"wz-settings-close",attrs:{title:"Close Settings"},on:{click:a.closePanel}},[t("i",{staticClass:"ri-close-circle-line"})])]),e._m(0),t("div",{staticClass:"wz-settings-body"},[e._l(a.allSettings,function(s){return[t("div",{staticClass:"wz-settings-section"},[t("h4",{staticClass:"wz-settings-section-title"},[e._v(e._s(s.title))]),t("div",{staticClass:"wz-settings-radio-group"},e._l(s.options,function(n){return t("label",{key:n.value,staticClass:"wz-settings-radio-label"},[t("div",{staticClass:"wz-settings-radio-circle",class:{"wz-settings-radio-circle--active":e.value[s.id]===n.value}},[t("span",{directives:[{name:"show",rawName:"v-show",value:e.value[s.id]===n.value,expression:"value[setting.id] === opt.value"}],staticClass:"wz-settings-radio-dot"})]),t("input",{staticClass:"wz-settings-radio-native",attrs:{type:"radio",name:s.id},domProps:{value:n.value,checked:e.value[s.id]===n.value},on:{change:function(l){return a.handleSelection(s.id,n.value)}}}),t("span",{staticClass:"wz-settings-radio-text"},[e._v(e._s(n.label))])])}),0)])]})],2)])])},K=[function(){var i=this,e=i._self._c;return i._self._setupProxy,e("div",{staticClass:"wz-settings-tabs"},[e("div",{staticClass:"wz-settings-tab wz-settings-tab--active"},[i._v("Theme Style")])])}],E=w(D,F,K,!1,null,null,null,null);const m=E.exports,V={__name:"WzHorizontalNav",props:{items:{type:Array,default:()=>[]},activeKey:{type:String,default:null}},emits:["item-click"],setup(i,{emit:e}){const t=i,a=d.ref(null),s=u=>{a.value&&a.value.scrollBy({left:u*250,behavior:"smooth"})},n=d.ref(null),l=d.ref({}),v=u=>{const r=u.closest(".wz-horizontal-nav").getBoundingClientRect(),f=u.getBoundingClientRect();l.value={top:"100%",left:f.left-r.left+"px"}},o=(u,_)=>{if(!u.children||u.children.length===0){e("item-click",u),n.value=null;return}n.value===u.key?n.value=null:(v(_.currentTarget),n.value=u.key)},c=u=>{e("item-click",u),n.value=null},h=u=>{u.target.closest(".wz-horizontal-nav")||(n.value=null)};return d.onMounted(()=>{document.addEventListener("click",h)}),d.onBeforeUnmount(()=>{document.removeEventListener("click",h)}),{__sfc:!0,props:t,emit:e,trackWrapper:a,scroll:s,openDropdown:n,dropdownStyle:l,positionDropdown:v,toggleDropdown:o,handleChildClick:c,handleDocClick:h}}};var j=function(){var e=this,t=e._self._c,a=e._self._setupProxy;return t("div",{staticClass:"wz-horizontal-nav"},[t("button",{staticClass:"wz-horizontal-nav-arrow",on:{click:function(s){return s.stopPropagation(),a.scroll(-1)}}},[t("i",{staticClass:"ri-arrow-left-s-line"})]),t("div",{ref:"trackWrapper",staticClass:"wz-horizontal-nav-track-wrapper"},[t("div",{staticClass:"wz-horizontal-nav-track"},[e._l(e.items,function(s,n){return[s.type!=="group"?t("div",{key:s.key||n,staticClass:"wz-horizontal-nav-item",class:{"wz-horizontal-nav-item--active":s.key===e.activeKey||s.children&&s.children.some(l=>l.key===e.activeKey),"wz-horizontal-nav-item--open":a.openDropdown===s.key},on:{click:function(l){return l.stopPropagation(),a.toggleDropdown(s,l)}}},[s.icon?t("i",{class:s.icon}):e._e(),t("span",[e._v(e._s(s.label))]),s.children&&s.children.length>0?t("i",{staticClass:"wz-horizontal-nav-chevron",class:a.openDropdown===s.key?"ri-arrow-down-s-line":"ri-arrow-right-s-line"}):e._e()]):e._e()]})],2)]),t("button",{staticClass:"wz-horizontal-nav-arrow",on:{click:function(s){return s.stopPropagation(),a.scroll(1)}}},[t("i",{staticClass:"ri-arrow-right-s-line"})]),a.openDropdown?t("div",{staticClass:"wz-horizontal-nav-dropdown",style:a.dropdownStyle,on:{click:function(s){s.stopPropagation()}}},[e._l(e.items,function(s){return[s.key===a.openDropdown&&s.children?e._l(s.children,function(n){return t("div",{key:n.key,staticClass:"wz-horizontal-dropdown-child",class:{"wz-horizontal-dropdown-child--active":n.key===e.activeKey},on:{click:function(l){return l.stopPropagation(),a.handleChildClick(n)}}},[t("span",[e._v(e._s(n.label))]),n.children&&n.children.length>0?t("i",{staticClass:"ri-arrow-right-s-line wz-horizontal-dropdown-child-arrow"}):e._e()])}):e._e()]})],2):e._e()])},X=[],q=w(V,j,X,!1,null,null,null,null);const b=q.exports,G={WzButton:C,WzSidebar:z,WzHeader:y,WzLayout:g,WzSettingsPanel:m,WzHorizontalNav:b},k=i=>{Object.entries(G).forEach(([e,t])=>{i.component(e,t)})};typeof window<"u"&&window.Vue&&k(window.Vue);const J={install:k};p.WzButton=C,p.WzHeader=y,p.WzHorizontalNav=b,p.WzLayout=g,p.WzSettingsPanel=m,p.WzSidebar=z,p.default=J,Object.defineProperties(p,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "wize-admin-library",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.30",
|
|
4
4
|
"description": "A reusable, lightweight, and highly customizable Vue 2.7 component library for admin panels.",
|
|
5
5
|
"main": "dist/wize-admin-library.umd.js",
|
|
6
6
|
"module": "dist/wize-admin-library.es.js",
|