@choubo/kerthus-web-admin-shell 0.2.0 → 0.3.0
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.
- package/README.md +21 -0
- package/dist/application/AppSearch.vue.d.ts +16 -1
- package/dist/index.d.ts +5 -0
- package/dist/index.js +2001 -1201
- package/dist/layout/ClassicAdminLayout.vue.d.ts +167 -0
- package/dist/layout/classic-navigation.d.ts +26 -0
- package/dist/layout/classic-settings.d.ts +64 -0
- package/dist/menu/BasicMenu.vue.d.ts +4 -0
- package/dist/style.css +1 -1
- package/dist/tabs/AdminTabs.vue.d.ts +24 -0
- package/dist/tabs/types.d.ts +1 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { inject as
|
|
2
|
-
import { Menu as
|
|
3
|
-
import { Icon as
|
|
4
|
-
import { useFrontendRuntime as
|
|
5
|
-
const
|
|
1
|
+
import { inject as Ae, defineComponent as P, h as le, computed as E, reactive as Te, onUnmounted as ne, watch as Z, openBlock as t, createBlock as z, unref as f, normalizeClass as U, withCtx as re, createElementBlock as l, Fragment as F, renderList as K, toDisplayString as m, createCommentVNode as b, ref as M, createElementVNode as r, createVNode as x, onMounted as ie, withKeys as be, createTextVNode as Q, provide as Qe, toRef as Xe, renderSlot as T, Teleport as Pe, withModifiers as ee, withDirectives as Y, vModelText as J, nextTick as Be, normalizeStyle as he, createSlots as Ge, toRaw as Ye, resolveDynamicComponent as Je } from "vue";
|
|
2
|
+
import { Menu as we, Switch as Ze, Select as et, InputNumber as tt, Drawer as at } from "ant-design-vue";
|
|
3
|
+
import { Icon as L, Dropdown as Fe } from "@choubo/kerthus-web-vue-ui";
|
|
4
|
+
import { useFrontendRuntime as te, applyAdminAppearance as nt } from "@choubo/kerthus-web-vue-runtime";
|
|
5
|
+
const Me = {
|
|
6
6
|
"en-US": {
|
|
7
7
|
navigation: "Navigation",
|
|
8
8
|
closeNavigation: "Close navigation",
|
|
@@ -62,10 +62,10 @@ const ne = {
|
|
|
62
62
|
reject: "拒绝"
|
|
63
63
|
}
|
|
64
64
|
};
|
|
65
|
-
function
|
|
66
|
-
return (e === "zh-CN" ?
|
|
65
|
+
function mo(e, d) {
|
|
66
|
+
return (e === "zh-CN" ? Me["zh-CN"] : Me["en-US"])[d];
|
|
67
67
|
}
|
|
68
|
-
const
|
|
68
|
+
const vo = {
|
|
69
69
|
"en-US": {
|
|
70
70
|
layout: {
|
|
71
71
|
footer: {
|
|
@@ -431,65 +431,65 @@ const On = {
|
|
|
431
431
|
}
|
|
432
432
|
}
|
|
433
433
|
}
|
|
434
|
-
},
|
|
435
|
-
function
|
|
434
|
+
}, Ee = Symbol("admin-menu");
|
|
435
|
+
function go(e) {
|
|
436
436
|
return {
|
|
437
|
-
install(
|
|
438
|
-
|
|
437
|
+
install(d) {
|
|
438
|
+
d.provide(Ee, e);
|
|
439
439
|
}
|
|
440
440
|
};
|
|
441
441
|
}
|
|
442
|
-
function
|
|
443
|
-
const e =
|
|
442
|
+
function Se() {
|
|
443
|
+
const e = Ae(Ee);
|
|
444
444
|
if (!e)
|
|
445
445
|
throw new Error("Admin menu port is not installed");
|
|
446
446
|
return e;
|
|
447
447
|
}
|
|
448
|
-
function
|
|
449
|
-
for (const
|
|
450
|
-
if (
|
|
451
|
-
return [
|
|
452
|
-
const
|
|
453
|
-
if (
|
|
454
|
-
return [
|
|
448
|
+
function ue(e, d) {
|
|
449
|
+
for (const a of e) {
|
|
450
|
+
if (a.path === d)
|
|
451
|
+
return [a.path];
|
|
452
|
+
const o = ue(a.children ?? [], d);
|
|
453
|
+
if (o.length)
|
|
454
|
+
return [a.path, ...o];
|
|
455
455
|
}
|
|
456
456
|
return [];
|
|
457
457
|
}
|
|
458
|
-
const
|
|
458
|
+
const Ie = P({
|
|
459
459
|
name: "AdminMenuNode",
|
|
460
460
|
props: {
|
|
461
461
|
item: { type: Object, required: !0 }
|
|
462
462
|
},
|
|
463
463
|
setup(e) {
|
|
464
|
-
const { ports:
|
|
464
|
+
const { ports: d } = te();
|
|
465
465
|
return () => {
|
|
466
|
-
var
|
|
467
|
-
const
|
|
468
|
-
if ((
|
|
466
|
+
var u, i;
|
|
467
|
+
const a = e.item;
|
|
468
|
+
if ((u = a.meta) != null && u.hideMenu)
|
|
469
469
|
return null;
|
|
470
|
-
const
|
|
471
|
-
var
|
|
472
|
-
return
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
(
|
|
476
|
-
class: ["dsea-simple-menu-tag", `dsea-simple-menu-tag--${
|
|
477
|
-
"dsea-simple-menu-tag--dot":
|
|
470
|
+
const o = () => {
|
|
471
|
+
var n, c;
|
|
472
|
+
return le("span", { class: "dsea-basic-menu-item-content" }, [
|
|
473
|
+
a.icon ? le(L, { icon: a.icon, size: 18, class: "dsea-basic-menu-item-content-wrapper__icon" }) : null,
|
|
474
|
+
d.locale.translate(a.name),
|
|
475
|
+
(n = a.tag) != null && n.content || (c = a.tag) != null && c.dot ? le("span", {
|
|
476
|
+
class: ["dsea-simple-menu-tag", `dsea-simple-menu-tag--${a.tag.type ?? "error"}`, {
|
|
477
|
+
"dsea-simple-menu-tag--dot": a.tag.dot
|
|
478
478
|
}]
|
|
479
|
-
},
|
|
479
|
+
}, a.tag.dot ? "" : a.tag.content) : null
|
|
480
480
|
]);
|
|
481
|
-
},
|
|
482
|
-
return
|
|
483
|
-
key:
|
|
481
|
+
}, s = (i = a.meta) != null && i.hideChildrenInMenu ? [] : a.children ?? [];
|
|
482
|
+
return s.length ? le(we.SubMenu, {
|
|
483
|
+
key: a.path,
|
|
484
484
|
popupClassName: "app-top-menu-popup",
|
|
485
|
-
disabled:
|
|
485
|
+
disabled: a.disabled
|
|
486
486
|
}, {
|
|
487
|
-
title:
|
|
488
|
-
default: () =>
|
|
489
|
-
}) :
|
|
487
|
+
title: o,
|
|
488
|
+
default: () => s.map((n) => le(Ie, { key: n.path, item: n }))
|
|
489
|
+
}) : le(we.Item, { key: a.path, disabled: a.disabled }, { default: o });
|
|
490
490
|
};
|
|
491
491
|
}
|
|
492
|
-
}),
|
|
492
|
+
}), oe = /* @__PURE__ */ P({
|
|
493
493
|
__name: "BasicMenu",
|
|
494
494
|
props: {
|
|
495
495
|
items: { default: () => [] },
|
|
@@ -501,96 +501,98 @@ const ue = k({
|
|
|
501
501
|
isHorizontal: { type: Boolean },
|
|
502
502
|
accordion: { type: Boolean, default: !0 },
|
|
503
503
|
collapse: { type: Boolean },
|
|
504
|
+
split: { type: Boolean },
|
|
505
|
+
topMenuAlign: {},
|
|
504
506
|
beforeClickFn: {}
|
|
505
507
|
},
|
|
506
508
|
emits: ["menuClick"],
|
|
507
|
-
setup(e, { emit:
|
|
508
|
-
const
|
|
509
|
+
setup(e, { emit: d }) {
|
|
510
|
+
const a = e, o = d, s = Se(), u = E(() => a.collapse ?? s.settings.collapsed.value), i = E(() => a.split ?? s.settings.split.value), n = Te({
|
|
509
511
|
defaultSelectedKeys: [],
|
|
510
512
|
selectedKeys: [],
|
|
511
513
|
openKeys: [],
|
|
512
514
|
collapsedOpenKeys: []
|
|
513
|
-
}),
|
|
514
|
-
const
|
|
515
|
+
}), c = E(() => u.value && !s.settings.mixSidebar.value ? n.collapsedOpenKeys : n.openKeys), y = E(() => {
|
|
516
|
+
const $ = a.type === "top" && a.mode === "horizontal" || a.isHorizontal && i.value;
|
|
515
517
|
return [
|
|
516
518
|
"dsea-basic-menu",
|
|
517
|
-
`justify-${
|
|
519
|
+
`justify-${a.isHorizontal && i.value ? "start" : a.topMenuAlign ?? s.settings.topMenuAlign.value}`,
|
|
518
520
|
{
|
|
519
|
-
"dsea-basic-menu__second": !
|
|
520
|
-
"dsea-basic-menu__sidebar-hor":
|
|
521
|
+
"dsea-basic-menu__second": !a.isHorizontal && i.value,
|
|
522
|
+
"dsea-basic-menu__sidebar-hor": $
|
|
521
523
|
}
|
|
522
524
|
];
|
|
523
525
|
});
|
|
524
|
-
let
|
|
525
|
-
async function
|
|
526
|
-
var
|
|
527
|
-
if (
|
|
526
|
+
let h = !1, p = 0;
|
|
527
|
+
async function N($) {
|
|
528
|
+
var B, V;
|
|
529
|
+
if (s.redirectRouteName && $.name === s.redirectRouteName)
|
|
528
530
|
return;
|
|
529
|
-
if (
|
|
530
|
-
|
|
531
|
+
if (h) {
|
|
532
|
+
h = !1;
|
|
531
533
|
return;
|
|
532
534
|
}
|
|
533
|
-
const
|
|
534
|
-
if (
|
|
535
|
-
const
|
|
536
|
-
if (
|
|
535
|
+
const v = ((B = $.meta) == null ? void 0 : B.currentActiveMenu) || $.path, k = ++p, C = ue(a.items, v);
|
|
536
|
+
if (a.isHorizontal && i.value) {
|
|
537
|
+
const G = await ((V = s.getCurrentParentPath) == null ? void 0 : V.call(s, v));
|
|
538
|
+
if (k !== p)
|
|
537
539
|
return;
|
|
538
|
-
n.selectedKeys = [
|
|
540
|
+
n.selectedKeys = [G || C[0] || v];
|
|
539
541
|
} else
|
|
540
|
-
n.selectedKeys =
|
|
541
|
-
|
|
542
|
+
n.selectedKeys = C.length ? C : [v];
|
|
543
|
+
A(v);
|
|
542
544
|
}
|
|
543
|
-
function
|
|
544
|
-
if (
|
|
545
|
+
function A($) {
|
|
546
|
+
if (a.mode === "horizontal")
|
|
545
547
|
return;
|
|
546
|
-
const
|
|
547
|
-
n.openKeys =
|
|
548
|
+
const v = ue(a.items, $);
|
|
549
|
+
n.openKeys = a.accordion ? v : [.../* @__PURE__ */ new Set([...n.openKeys, ...v])];
|
|
548
550
|
}
|
|
549
|
-
function
|
|
550
|
-
const
|
|
551
|
-
if (
|
|
552
|
-
n.openKeys =
|
|
551
|
+
function O($) {
|
|
552
|
+
const v = $.map(String);
|
|
553
|
+
if (a.mode === "horizontal" || !a.accordion || s.settings.mixSidebar.value) {
|
|
554
|
+
n.openKeys = v;
|
|
553
555
|
return;
|
|
554
556
|
}
|
|
555
|
-
if (
|
|
556
|
-
n.collapsedOpenKeys =
|
|
557
|
+
if (u.value) {
|
|
558
|
+
n.collapsedOpenKeys = v;
|
|
557
559
|
return;
|
|
558
560
|
}
|
|
559
|
-
const
|
|
560
|
-
var
|
|
561
|
-
return (
|
|
562
|
-
}).map((
|
|
563
|
-
n.openKeys =
|
|
564
|
-
}
|
|
565
|
-
async function D(
|
|
566
|
-
const
|
|
567
|
-
|
|
568
|
-
}
|
|
569
|
-
const
|
|
570
|
-
return
|
|
561
|
+
const k = a.items.filter((B) => {
|
|
562
|
+
var V;
|
|
563
|
+
return (V = B.children) == null ? void 0 : V.length;
|
|
564
|
+
}).map((B) => B.path), C = v.find((B) => !n.openKeys.includes(B));
|
|
565
|
+
n.openKeys = C && k.includes(C) ? [C] : v;
|
|
566
|
+
}
|
|
567
|
+
async function D($) {
|
|
568
|
+
const v = String($.key);
|
|
569
|
+
a.beforeClickFn && !await a.beforeClickFn(v) || (o("menuClick", v), h = !0, n.selectedKeys = [v]);
|
|
570
|
+
}
|
|
571
|
+
const j = s.onRouteChange(N);
|
|
572
|
+
return ne(j), Z(() => a.items, () => N(s.currentRoute.value)), N(s.currentRoute.value), ($, v) => (t(), z(f(we), {
|
|
571
573
|
selectedKeys: n.selectedKeys,
|
|
572
574
|
defaultSelectedKeys: n.defaultSelectedKeys,
|
|
573
575
|
mode: e.mode,
|
|
574
|
-
openKeys:
|
|
576
|
+
openKeys: c.value,
|
|
575
577
|
inlineIndent: e.inlineIndent,
|
|
576
578
|
theme: e.theme,
|
|
577
|
-
inlineCollapsed: e.mode === "inline" && !e.mixSider &&
|
|
578
|
-
class:
|
|
579
|
+
inlineCollapsed: e.mode === "inline" && !e.mixSider && u.value,
|
|
580
|
+
class: U(y.value),
|
|
579
581
|
subMenuOpenDelay: 0.2,
|
|
580
|
-
onOpenChange:
|
|
582
|
+
onOpenChange: O,
|
|
581
583
|
onClick: D
|
|
582
584
|
}, {
|
|
583
|
-
default:
|
|
584
|
-
(
|
|
585
|
-
key:
|
|
586
|
-
item:
|
|
585
|
+
default: re(() => [
|
|
586
|
+
(t(!0), l(F, null, K(e.items, (k) => (t(), z(f(Ie), {
|
|
587
|
+
key: k.path,
|
|
588
|
+
item: k
|
|
587
589
|
}, null, 8, ["item"]))), 128))
|
|
588
590
|
]),
|
|
589
591
|
_: 1
|
|
590
592
|
}, 8, ["selectedKeys", "defaultSelectedKeys", "mode", "openKeys", "inlineIndent", "theme", "inlineCollapsed", "class"]));
|
|
591
593
|
}
|
|
592
594
|
});
|
|
593
|
-
const
|
|
595
|
+
const bo = /* @__PURE__ */ P({
|
|
594
596
|
__name: "SimpleMenu",
|
|
595
597
|
props: {
|
|
596
598
|
items: { default: () => [] },
|
|
@@ -603,12 +605,12 @@ const jn = /* @__PURE__ */ k({
|
|
|
603
605
|
beforeClickFn: {}
|
|
604
606
|
},
|
|
605
607
|
emits: ["menuClick"],
|
|
606
|
-
setup(e, { emit:
|
|
607
|
-
const
|
|
608
|
-
async function
|
|
609
|
-
return /^https?:\/\//i.test(
|
|
608
|
+
setup(e, { emit: d }) {
|
|
609
|
+
const a = e, o = d;
|
|
610
|
+
async function s(u) {
|
|
611
|
+
return /^https?:\/\//i.test(u) ? (window.open(u, "_blank", "noopener,noreferrer"), !1) : a.beforeClickFn ? a.beforeClickFn(u) : !0;
|
|
610
612
|
}
|
|
611
|
-
return (
|
|
613
|
+
return (u, i) => (t(), z(oe, {
|
|
612
614
|
class: "dsea-simple-menu",
|
|
613
615
|
items: e.items,
|
|
614
616
|
mode: "inline",
|
|
@@ -616,11 +618,11 @@ const jn = /* @__PURE__ */ k({
|
|
|
616
618
|
collapse: e.collapse,
|
|
617
619
|
mixSider: e.mixSider,
|
|
618
620
|
accordion: e.accordion,
|
|
619
|
-
beforeClickFn:
|
|
620
|
-
onMenuClick:
|
|
621
|
+
beforeClickFn: s,
|
|
622
|
+
onMenuClick: i[0] || (i[0] = (n) => o("menuClick", n))
|
|
621
623
|
}, null, 8, ["items", "theme", "collapse", "mixSider", "accordion"]));
|
|
622
624
|
}
|
|
623
|
-
}),
|
|
625
|
+
}), ho = /* @__PURE__ */ P({
|
|
624
626
|
__name: "SimpleMenuTag",
|
|
625
627
|
props: {
|
|
626
628
|
item: {},
|
|
@@ -628,18 +630,18 @@ const jn = /* @__PURE__ */ k({
|
|
|
628
630
|
collapseParent: { type: Boolean, default: !1 }
|
|
629
631
|
},
|
|
630
632
|
setup(e) {
|
|
631
|
-
return (
|
|
632
|
-
var
|
|
633
|
-
return (
|
|
633
|
+
return (d, a) => {
|
|
634
|
+
var o, s;
|
|
635
|
+
return (o = e.item.tag) != null && o.content || (s = e.item.tag) != null && s.dot ? (t(), l("span", {
|
|
634
636
|
key: 0,
|
|
635
|
-
class:
|
|
637
|
+
class: U(["dsea-simple-menu-tag", [`dsea-simple-menu-tag--${e.item.tag.type ?? "error"}`, {
|
|
636
638
|
"dsea-simple-menu-tag--dot": e.dot || e.item.tag.dot,
|
|
637
639
|
"dsea-simple-menu-tag--collapse": e.collapseParent
|
|
638
640
|
}]])
|
|
639
|
-
},
|
|
641
|
+
}, m(e.dot || e.item.tag.dot || e.collapseParent ? "" : e.item.tag.content), 3)) : b("", !0);
|
|
640
642
|
};
|
|
641
643
|
}
|
|
642
|
-
}),
|
|
644
|
+
}), lt = ["src", "alt"], ot = /* @__PURE__ */ P({
|
|
643
645
|
__name: "AppLogo",
|
|
644
646
|
props: {
|
|
645
647
|
theme: {},
|
|
@@ -648,35 +650,35 @@ const jn = /* @__PURE__ */ k({
|
|
|
648
650
|
collapsedShowTitle: { type: Boolean }
|
|
649
651
|
},
|
|
650
652
|
setup(e) {
|
|
651
|
-
const { ports:
|
|
652
|
-
var
|
|
653
|
-
return (
|
|
653
|
+
const { ports: d } = te(), a = E(() => d.appConfig.getTitle()), o = E(() => {
|
|
654
|
+
var u, i;
|
|
655
|
+
return (i = (u = d.appConfig).getLogo) == null ? void 0 : i.call(u);
|
|
654
656
|
});
|
|
655
|
-
function
|
|
656
|
-
|
|
657
|
+
function s() {
|
|
658
|
+
d.navigation.go(d.navigation.getHome());
|
|
657
659
|
}
|
|
658
|
-
return (
|
|
659
|
-
class:
|
|
660
|
-
onClick:
|
|
660
|
+
return (u, i) => (t(), l("div", {
|
|
661
|
+
class: U(["dsea-app-logo anticon", [e.theme, { "collapsed-show-title": e.collapsedShowTitle }]]),
|
|
662
|
+
onClick: s
|
|
661
663
|
}, [
|
|
662
|
-
|
|
664
|
+
o.value ? (t(), l("img", {
|
|
663
665
|
key: 0,
|
|
664
|
-
src:
|
|
665
|
-
alt:
|
|
666
|
-
}, null, 8,
|
|
667
|
-
e.showTitle ? (
|
|
666
|
+
src: o.value,
|
|
667
|
+
alt: a.value
|
|
668
|
+
}, null, 8, lt)) : b("", !0),
|
|
669
|
+
e.showTitle ? (t(), l("div", {
|
|
668
670
|
key: 1,
|
|
669
|
-
class:
|
|
670
|
-
},
|
|
671
|
+
class: U(["dsea-app-logo__title ml-2 truncate md:opacity-100", { "xs:opacity-0": !e.alwaysShowTitle }])
|
|
672
|
+
}, m(a.value), 3)) : b("", !0)
|
|
671
673
|
], 2));
|
|
672
674
|
}
|
|
673
675
|
});
|
|
674
|
-
const
|
|
675
|
-
const
|
|
676
|
-
for (const [
|
|
677
|
-
|
|
678
|
-
return
|
|
679
|
-
},
|
|
676
|
+
const W = (e, d) => {
|
|
677
|
+
const a = e.__vccOpts || e;
|
|
678
|
+
for (const [o, s] of d)
|
|
679
|
+
a[o] = s;
|
|
680
|
+
return a;
|
|
681
|
+
}, ve = /* @__PURE__ */ W(ot, [["__scopeId", "data-v-f9695ead"]]), it = { class: "dsea-app-locale-picker" }, st = { key: 0 }, rt = /* @__PURE__ */ P({
|
|
680
682
|
__name: "AppLocalePicker",
|
|
681
683
|
props: {
|
|
682
684
|
locales: {},
|
|
@@ -685,115 +687,115 @@ const A = (e, c) => {
|
|
|
685
687
|
reload: { type: Boolean }
|
|
686
688
|
},
|
|
687
689
|
setup(e) {
|
|
688
|
-
const
|
|
689
|
-
var
|
|
690
|
-
return ((
|
|
690
|
+
const d = e, { ports: a } = te(), o = M(d.locale ?? a.locale.getLocale()), s = E(() => {
|
|
691
|
+
var i;
|
|
692
|
+
return ((i = d.locales.find((n) => n.event === o.value)) == null ? void 0 : i.text) ?? "";
|
|
691
693
|
});
|
|
692
|
-
|
|
693
|
-
|
|
694
|
+
Z(() => d.locale, (i) => {
|
|
695
|
+
i && (o.value = i);
|
|
694
696
|
});
|
|
695
|
-
async function
|
|
696
|
-
|
|
697
|
+
async function u(i) {
|
|
698
|
+
i.event !== o.value && (await a.locale.setLocale(i.event), o.value = i.event, d.reload && location.reload());
|
|
697
699
|
}
|
|
698
|
-
return (
|
|
700
|
+
return (i, n) => (t(), z(f(Fe), {
|
|
699
701
|
placement: "bottom",
|
|
700
702
|
trigger: ["click"],
|
|
701
703
|
dropMenuList: e.locales,
|
|
702
|
-
selectedKeys: [
|
|
704
|
+
selectedKeys: [o.value],
|
|
703
705
|
overlayClassName: "app-locale-picker-overlay",
|
|
704
|
-
onMenuEvent:
|
|
706
|
+
onMenuEvent: u
|
|
705
707
|
}, {
|
|
706
|
-
default:
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
e.showText ? (
|
|
708
|
+
default: re(() => [
|
|
709
|
+
r("span", it, [
|
|
710
|
+
x(f(L), { icon: "ion:language" }),
|
|
711
|
+
e.showText ? (t(), l("span", st, m(s.value), 1)) : b("", !0)
|
|
710
712
|
])
|
|
711
713
|
]),
|
|
712
714
|
_: 1
|
|
713
715
|
}, 8, ["dropMenuList", "selectedKeys"]));
|
|
714
716
|
}
|
|
715
717
|
});
|
|
716
|
-
const
|
|
718
|
+
const ut = ["aria-label"], dt = /* @__PURE__ */ P({
|
|
717
719
|
__name: "AppDarkModeToggle",
|
|
718
720
|
props: {
|
|
719
721
|
darkMode: { type: Boolean },
|
|
720
722
|
visible: { type: Boolean, default: !0 }
|
|
721
723
|
},
|
|
722
724
|
emits: ["update:darkMode"],
|
|
723
|
-
setup(e, { emit:
|
|
724
|
-
const
|
|
725
|
-
return (
|
|
725
|
+
setup(e, { emit: d }) {
|
|
726
|
+
const a = d;
|
|
727
|
+
return (o, s) => e.visible ? (t(), l("button", {
|
|
726
728
|
key: 0,
|
|
727
729
|
type: "button",
|
|
728
|
-
class:
|
|
730
|
+
class: U(["dsea-dark-switch", { "dsea-dark-switch--dark": e.darkMode }]),
|
|
729
731
|
"aria-label": e.darkMode ? "Switch to light mode" : "Switch to dark mode",
|
|
730
|
-
onClick:
|
|
732
|
+
onClick: s[0] || (s[0] = (u) => a("update:darkMode", !e.darkMode))
|
|
731
733
|
}, [
|
|
732
|
-
|
|
733
|
-
|
|
734
|
+
s[1] || (s[1] = r("span", { class: "dsea-dark-switch-inner" }, null, -1)),
|
|
735
|
+
x(f(L), {
|
|
734
736
|
icon: "lucide:sun",
|
|
735
737
|
size: 14
|
|
736
738
|
}),
|
|
737
|
-
|
|
739
|
+
x(f(L), {
|
|
738
740
|
icon: "lucide:moon",
|
|
739
741
|
size: 14
|
|
740
742
|
})
|
|
741
|
-
], 10,
|
|
743
|
+
], 10, ut)) : b("", !0);
|
|
742
744
|
}
|
|
743
745
|
});
|
|
744
|
-
const
|
|
746
|
+
const po = /* @__PURE__ */ W(dt, [["__scopeId", "data-v-bc7f2cad"]]), ct = ["aria-label", "title", "aria-pressed"], mt = /* @__PURE__ */ P({
|
|
745
747
|
__name: "AdminFullscreenButton",
|
|
746
748
|
props: {
|
|
747
749
|
enterLabel: { default: "Enter fullscreen" },
|
|
748
750
|
exitLabel: { default: "Exit fullscreen" }
|
|
749
751
|
},
|
|
750
752
|
setup(e) {
|
|
751
|
-
const
|
|
752
|
-
function
|
|
753
|
-
|
|
753
|
+
const d = M(!1);
|
|
754
|
+
function a() {
|
|
755
|
+
d.value = !!document.fullscreenElement;
|
|
754
756
|
}
|
|
755
|
-
async function
|
|
756
|
-
document.fullscreenElement ? await document.exitFullscreen() : await document.documentElement.requestFullscreen(),
|
|
757
|
+
async function o() {
|
|
758
|
+
document.fullscreenElement ? await document.exitFullscreen() : await document.documentElement.requestFullscreen(), a();
|
|
757
759
|
}
|
|
758
|
-
return
|
|
759
|
-
|
|
760
|
-
}),
|
|
760
|
+
return ie(() => {
|
|
761
|
+
a(), document.addEventListener("fullscreenchange", a);
|
|
762
|
+
}), ne(() => document.removeEventListener("fullscreenchange", a)), (s, u) => (t(), l("button", {
|
|
761
763
|
type: "button",
|
|
762
764
|
class: "dsea-icon-command",
|
|
763
|
-
"aria-label":
|
|
764
|
-
title:
|
|
765
|
-
"aria-pressed":
|
|
766
|
-
onClick:
|
|
765
|
+
"aria-label": d.value ? e.exitLabel : e.enterLabel,
|
|
766
|
+
title: d.value ? e.exitLabel : e.enterLabel,
|
|
767
|
+
"aria-pressed": d.value,
|
|
768
|
+
onClick: o
|
|
767
769
|
}, [
|
|
768
|
-
|
|
769
|
-
icon:
|
|
770
|
+
x(f(L), {
|
|
771
|
+
icon: d.value ? "lucide:minimize" : "lucide:maximize",
|
|
770
772
|
size: 18
|
|
771
773
|
}, null, 8, ["icon"])
|
|
772
|
-
], 8,
|
|
774
|
+
], 8, ct));
|
|
773
775
|
}
|
|
774
776
|
});
|
|
775
|
-
const
|
|
777
|
+
const vt = /* @__PURE__ */ W(mt, [["__scopeId", "data-v-1787f599"]]);
|
|
776
778
|
new TextEncoder().encode("kerthus-web-shared-auth-v2-key!!");
|
|
777
|
-
function
|
|
779
|
+
function ge(e) {
|
|
778
780
|
if (typeof e != "string")
|
|
779
781
|
return "";
|
|
780
|
-
const
|
|
781
|
-
if (!/^https?:\/\/[^/]/i.test(
|
|
782
|
+
const d = e.trim();
|
|
783
|
+
if (!/^https?:\/\/[^/]/i.test(d) || /^https?:\/\/[^/?#]*@/i.test(d) || /[\s\\\u0000-\u001f\u007f]/.test(d))
|
|
782
784
|
return "";
|
|
783
785
|
try {
|
|
784
|
-
const
|
|
785
|
-
return !["http:", "https:"].includes(
|
|
786
|
+
const a = new URL(d);
|
|
787
|
+
return !["http:", "https:"].includes(a.protocol) || !a.hostname || a.username || a.password ? "" : d;
|
|
786
788
|
} catch {
|
|
787
789
|
return "";
|
|
788
790
|
}
|
|
789
791
|
}
|
|
790
|
-
const
|
|
792
|
+
const gt = ["aria-label", "title"], bt = { class: "dsea-app-switcher__panel" }, ht = {
|
|
791
793
|
key: 0,
|
|
792
794
|
role: "status"
|
|
793
|
-
},
|
|
795
|
+
}, pt = {
|
|
794
796
|
key: 1,
|
|
795
797
|
role: "alert"
|
|
796
|
-
},
|
|
798
|
+
}, ft = { key: 2 }, yt = { key: 3 }, kt = ["href"], wt = ["src"], St = { key: 0 }, _t = ["title"], $t = ["disabled", "aria-current", "onClick"], Ct = ["src"], xt = { key: 0 }, Lt = /* @__PURE__ */ P({
|
|
797
799
|
__name: "AdminAppSwitcher",
|
|
798
800
|
props: {
|
|
799
801
|
apps: {},
|
|
@@ -807,120 +809,120 @@ const Pe = ["aria-label", "title"], Ie = { class: "dsea-app-switcher__panel" },
|
|
|
807
809
|
confirmSwitch: {}
|
|
808
810
|
},
|
|
809
811
|
emits: ["open", "switch", "error"],
|
|
810
|
-
setup(e, { emit:
|
|
811
|
-
const
|
|
812
|
-
function
|
|
813
|
-
|
|
814
|
-
}
|
|
815
|
-
function
|
|
816
|
-
|
|
817
|
-
}
|
|
818
|
-
async function
|
|
819
|
-
var
|
|
820
|
-
if (!(
|
|
821
|
-
|
|
812
|
+
setup(e, { emit: d }) {
|
|
813
|
+
const a = e, o = d, s = M(), u = M();
|
|
814
|
+
function i() {
|
|
815
|
+
s.value && (s.value.open = !1);
|
|
816
|
+
}
|
|
817
|
+
function n(y) {
|
|
818
|
+
y.target.open && o("open");
|
|
819
|
+
}
|
|
820
|
+
async function c(y) {
|
|
821
|
+
var h;
|
|
822
|
+
if (!(u.value || y.id === a.currentId)) {
|
|
823
|
+
u.value = y.id;
|
|
822
824
|
try {
|
|
823
|
-
if (await ((
|
|
825
|
+
if (await ((h = a.confirmSwitch) == null ? void 0 : h.call(a, y)) === !1)
|
|
824
826
|
return;
|
|
825
|
-
|
|
826
|
-
} catch (
|
|
827
|
-
|
|
827
|
+
o("switch", y), i();
|
|
828
|
+
} catch (p) {
|
|
829
|
+
o("error", p);
|
|
828
830
|
} finally {
|
|
829
|
-
|
|
831
|
+
u.value = void 0;
|
|
830
832
|
}
|
|
831
833
|
}
|
|
832
834
|
}
|
|
833
|
-
return (
|
|
835
|
+
return (y, h) => (t(), l("details", {
|
|
834
836
|
ref_key: "menu",
|
|
835
|
-
ref:
|
|
837
|
+
ref: s,
|
|
836
838
|
class: "dsea-app-switcher",
|
|
837
|
-
onToggle:
|
|
838
|
-
onKeydown:
|
|
839
|
+
onToggle: n,
|
|
840
|
+
onKeydown: be(i, ["esc"])
|
|
839
841
|
}, [
|
|
840
|
-
|
|
842
|
+
r("summary", {
|
|
841
843
|
"aria-label": e.label,
|
|
842
844
|
title: e.label
|
|
843
845
|
}, [
|
|
844
|
-
|
|
846
|
+
x(f(L), {
|
|
845
847
|
icon: "lucide:layout-grid",
|
|
846
848
|
size: 18
|
|
847
849
|
})
|
|
848
|
-
], 8,
|
|
849
|
-
|
|
850
|
-
e.loading ? (
|
|
851
|
-
(
|
|
852
|
-
key:
|
|
850
|
+
], 8, gt),
|
|
851
|
+
r("div", bt, [
|
|
852
|
+
e.loading ? (t(), l("p", ht, m(e.loadingLabel), 1)) : e.error ? (t(), l("p", pt, m(e.error), 1)) : e.apps.length ? (t(), l("ul", yt, [
|
|
853
|
+
(t(!0), l(F, null, K(e.apps, (p) => (t(), l("li", {
|
|
854
|
+
key: p.id
|
|
853
855
|
}, [
|
|
854
|
-
|
|
856
|
+
p.url && f(ge)(p.url) ? (t(), l("a", {
|
|
855
857
|
key: 0,
|
|
856
|
-
href:
|
|
858
|
+
href: f(ge)(p.url),
|
|
857
859
|
target: "_blank",
|
|
858
860
|
rel: "noopener noreferrer",
|
|
859
861
|
referrerpolicy: "no-referrer",
|
|
860
|
-
onClick:
|
|
862
|
+
onClick: i
|
|
861
863
|
}, [
|
|
862
|
-
|
|
864
|
+
p.icon ? (t(), l("img", {
|
|
863
865
|
key: 0,
|
|
864
|
-
src:
|
|
866
|
+
src: p.icon,
|
|
865
867
|
alt: ""
|
|
866
|
-
}, null, 8,
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
868
|
+
}, null, 8, wt)) : b("", !0),
|
|
869
|
+
r("span", null, [
|
|
870
|
+
Q(m(p.name), 1),
|
|
871
|
+
p.description ? (t(), l("small", St, m(p.description), 1)) : b("", !0)
|
|
870
872
|
]),
|
|
871
|
-
|
|
873
|
+
x(f(L), {
|
|
872
874
|
icon: "lucide:external-link",
|
|
873
875
|
size: 14
|
|
874
876
|
})
|
|
875
|
-
], 8,
|
|
877
|
+
], 8, kt)) : p.url ? (t(), l("button", {
|
|
876
878
|
key: 1,
|
|
877
879
|
type: "button",
|
|
878
880
|
disabled: "",
|
|
879
881
|
title: e.invalidUrlLabel
|
|
880
882
|
}, [
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
883
|
+
r("span", null, [
|
|
884
|
+
Q(m(p.name), 1),
|
|
885
|
+
r("small", null, m(e.invalidUrlLabel), 1)
|
|
884
886
|
])
|
|
885
|
-
], 8,
|
|
887
|
+
], 8, _t)) : (t(), l("button", {
|
|
886
888
|
key: 2,
|
|
887
889
|
type: "button",
|
|
888
|
-
disabled:
|
|
889
|
-
"aria-current":
|
|
890
|
-
onClick: (
|
|
890
|
+
disabled: p.id === e.currentId || u.value === p.id,
|
|
891
|
+
"aria-current": p.id === e.currentId ? "page" : void 0,
|
|
892
|
+
onClick: (N) => c(p)
|
|
891
893
|
}, [
|
|
892
|
-
|
|
894
|
+
p.icon ? (t(), l("img", {
|
|
893
895
|
key: 0,
|
|
894
|
-
src:
|
|
896
|
+
src: p.icon,
|
|
895
897
|
alt: ""
|
|
896
|
-
}, null, 8,
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
898
|
+
}, null, 8, Ct)) : b("", !0),
|
|
899
|
+
r("span", null, [
|
|
900
|
+
Q(m(p.name), 1),
|
|
901
|
+
p.description ? (t(), l("small", xt, m(p.description), 1)) : b("", !0)
|
|
900
902
|
]),
|
|
901
|
-
|
|
903
|
+
p.id === e.currentId ? (t(), z(f(L), {
|
|
902
904
|
key: 1,
|
|
903
905
|
icon: "lucide:check",
|
|
904
906
|
size: 16
|
|
905
|
-
})) :
|
|
906
|
-
], 8,
|
|
907
|
+
})) : b("", !0)
|
|
908
|
+
], 8, $t))
|
|
907
909
|
]))), 128))
|
|
908
|
-
])) : (
|
|
910
|
+
])) : (t(), l("p", ft, m(e.emptyLabel), 1))
|
|
909
911
|
])
|
|
910
912
|
], 544));
|
|
911
913
|
}
|
|
912
914
|
});
|
|
913
|
-
const
|
|
914
|
-
function
|
|
915
|
-
return
|
|
915
|
+
const Mt = /* @__PURE__ */ W(Lt, [["__scopeId", "data-v-29d987c2"]]), Ne = Symbol("app-provider");
|
|
916
|
+
function ze(e) {
|
|
917
|
+
return Qe(Ne, e), e;
|
|
916
918
|
}
|
|
917
|
-
function
|
|
918
|
-
const e =
|
|
919
|
+
function fo() {
|
|
920
|
+
const e = Ae(Ne);
|
|
919
921
|
if (!e)
|
|
920
922
|
throw new Error("AppProvider is missing");
|
|
921
923
|
return e;
|
|
922
924
|
}
|
|
923
|
-
const
|
|
925
|
+
const yo = /* @__PURE__ */ P({
|
|
924
926
|
__name: "AppProvider",
|
|
925
927
|
props: {
|
|
926
928
|
prefixCls: { default: "dsea" },
|
|
@@ -928,163 +930,166 @@ const el = /* @__PURE__ */ k({
|
|
|
928
930
|
onMobileChange: {}
|
|
929
931
|
},
|
|
930
932
|
setup(e) {
|
|
931
|
-
const
|
|
932
|
-
|
|
933
|
-
function
|
|
934
|
-
var
|
|
935
|
-
const
|
|
936
|
-
|
|
933
|
+
const d = e, a = M(!1);
|
|
934
|
+
ze({ prefixCls: Xe(d, "prefixCls"), isMobile: a });
|
|
935
|
+
function o() {
|
|
936
|
+
var u;
|
|
937
|
+
const s = window.innerWidth < d.mobileBreakpoint;
|
|
938
|
+
s !== a.value && (a.value = s, (u = d.onMobileChange) == null || u.call(d, s));
|
|
937
939
|
}
|
|
938
|
-
return
|
|
939
|
-
|
|
940
|
-
}),
|
|
940
|
+
return ie(() => {
|
|
941
|
+
o(), window.addEventListener("resize", o);
|
|
942
|
+
}), ne(() => window.removeEventListener("resize", o)), (s, u) => T(s.$slots, "default");
|
|
941
943
|
}
|
|
942
|
-
}),
|
|
944
|
+
}), At = ["aria-label"], Tt = ["aria-label"], Pt = { class: "dsea-app-search-input-row" }, Bt = ["placeholder", "aria-label"], Ft = ["aria-label"], Et = ["data-index", "aria-selected", "onMouseenter", "onClick"], It = {
|
|
943
945
|
key: 1,
|
|
944
946
|
class: "dsea-app-search-empty"
|
|
945
|
-
},
|
|
947
|
+
}, Nt = /* @__PURE__ */ P({
|
|
946
948
|
__name: "AppSearch",
|
|
949
|
+
props: {
|
|
950
|
+
menuItems: {}
|
|
951
|
+
},
|
|
947
952
|
setup(e) {
|
|
948
|
-
const { ports:
|
|
949
|
-
function v
|
|
950
|
-
return
|
|
951
|
-
var
|
|
952
|
-
if ((
|
|
953
|
+
const d = e, { ports: a } = te(), o = Se(), s = (v) => a.locale.translate(v), u = M(!1), i = M(""), n = M([]), c = M(0), y = M(), h = M();
|
|
954
|
+
function p(v, k = "") {
|
|
955
|
+
return v.flatMap((C) => {
|
|
956
|
+
var de, ce;
|
|
957
|
+
if ((de = C.meta) != null && de.hideMenu)
|
|
953
958
|
return [];
|
|
954
|
-
const
|
|
955
|
-
return
|
|
959
|
+
const B = s(C.name), V = k ? `${k} > ${B}` : B, G = (ce = C.meta) != null && ce.hideChildrenInMenu ? [] : C.children ?? [];
|
|
960
|
+
return G.length ? p(G, V) : [{ label: V, path: C.path, icon: C.icon }];
|
|
956
961
|
});
|
|
957
962
|
}
|
|
958
|
-
function
|
|
959
|
-
const
|
|
960
|
-
let
|
|
961
|
-
for (const
|
|
962
|
-
if (
|
|
963
|
+
function N(v, k) {
|
|
964
|
+
const C = v.toLocaleLowerCase();
|
|
965
|
+
let B = 0;
|
|
966
|
+
for (const V of k.toLocaleLowerCase()) {
|
|
967
|
+
if (B = C.indexOf(V, B), B < 0)
|
|
963
968
|
return !1;
|
|
964
|
-
|
|
969
|
+
B += 1;
|
|
965
970
|
}
|
|
966
971
|
return !0;
|
|
967
972
|
}
|
|
968
|
-
const
|
|
969
|
-
const
|
|
970
|
-
return
|
|
973
|
+
const A = E(() => {
|
|
974
|
+
const v = i.value.trim();
|
|
975
|
+
return v ? p(n.value).filter((k) => N(k.label, v)) : [];
|
|
971
976
|
});
|
|
972
|
-
|
|
973
|
-
|
|
977
|
+
Z(A, () => {
|
|
978
|
+
c.value = 0;
|
|
974
979
|
});
|
|
975
|
-
async function
|
|
976
|
-
var
|
|
977
|
-
|
|
980
|
+
async function O() {
|
|
981
|
+
var v, k;
|
|
982
|
+
u.value = !0, n.value = d.menuItems ?? await ((v = o.getItems) == null ? void 0 : v.call(o)) ?? [], u.value && (await Be(), (k = y.value) == null || k.focus());
|
|
978
983
|
}
|
|
979
984
|
function D() {
|
|
980
|
-
|
|
985
|
+
u.value = !1, i.value = "";
|
|
981
986
|
}
|
|
982
|
-
function
|
|
983
|
-
D(),
|
|
987
|
+
function j(v) {
|
|
988
|
+
D(), a.navigation.go(v.path);
|
|
984
989
|
}
|
|
985
|
-
function
|
|
986
|
-
var
|
|
987
|
-
if (
|
|
988
|
-
if (
|
|
990
|
+
function $(v) {
|
|
991
|
+
var k, C;
|
|
992
|
+
if (u.value)
|
|
993
|
+
if (v.key === "Escape")
|
|
989
994
|
D();
|
|
990
|
-
else if (
|
|
991
|
-
if (
|
|
995
|
+
else if (v.key === "ArrowDown" || v.key === "ArrowUp") {
|
|
996
|
+
if (v.preventDefault(), !A.value.length)
|
|
992
997
|
return;
|
|
993
|
-
const
|
|
994
|
-
|
|
998
|
+
const B = v.key === "ArrowDown" ? 1 : -1;
|
|
999
|
+
c.value = (c.value + B + A.value.length) % A.value.length, (C = (k = h.value) == null ? void 0 : k.querySelector(`[data-index="${c.value}"]`)) == null || C.scrollIntoView({ block: "nearest" });
|
|
995
1000
|
} else
|
|
996
|
-
|
|
1001
|
+
v.key === "Enter" && A.value[c.value] && (v.preventDefault(), j(A.value[c.value]));
|
|
997
1002
|
}
|
|
998
|
-
return
|
|
999
|
-
|
|
1003
|
+
return ie(() => window.addEventListener("keydown", $)), ne(() => window.removeEventListener("keydown", $)), (v, k) => (t(), l(F, null, [
|
|
1004
|
+
r("button", {
|
|
1000
1005
|
type: "button",
|
|
1001
1006
|
class: "dsea-app-search-trigger",
|
|
1002
|
-
"aria-label":
|
|
1003
|
-
onClick:
|
|
1007
|
+
"aria-label": s("common.searchText"),
|
|
1008
|
+
onClick: O
|
|
1004
1009
|
}, [
|
|
1005
|
-
|
|
1010
|
+
x(f(L), {
|
|
1006
1011
|
icon: "ant-design:search-outlined",
|
|
1007
1012
|
size: 18
|
|
1008
1013
|
})
|
|
1009
|
-
], 8,
|
|
1010
|
-
(
|
|
1011
|
-
|
|
1014
|
+
], 8, At),
|
|
1015
|
+
(t(), z(Pe, { to: "body" }, [
|
|
1016
|
+
u.value ? (t(), l("div", {
|
|
1012
1017
|
key: 0,
|
|
1013
1018
|
class: "dsea-app-search-backdrop",
|
|
1014
|
-
onClick:
|
|
1019
|
+
onClick: ee(D, ["self"])
|
|
1015
1020
|
}, [
|
|
1016
|
-
|
|
1021
|
+
r("section", {
|
|
1017
1022
|
class: "dsea-app-search-modal",
|
|
1018
1023
|
role: "dialog",
|
|
1019
1024
|
"aria-modal": "true",
|
|
1020
|
-
"aria-label":
|
|
1025
|
+
"aria-label": s("common.searchText")
|
|
1021
1026
|
}, [
|
|
1022
|
-
|
|
1023
|
-
|
|
1027
|
+
r("div", Pt, [
|
|
1028
|
+
x(f(L), {
|
|
1024
1029
|
icon: "ant-design:search-outlined",
|
|
1025
1030
|
size: 18
|
|
1026
1031
|
}),
|
|
1027
|
-
|
|
1032
|
+
Y(r("input", {
|
|
1028
1033
|
ref_key: "inputEl",
|
|
1029
|
-
ref:
|
|
1030
|
-
"onUpdate:modelValue":
|
|
1034
|
+
ref: y,
|
|
1035
|
+
"onUpdate:modelValue": k[0] || (k[0] = (C) => i.value = C),
|
|
1031
1036
|
type: "search",
|
|
1032
|
-
placeholder:
|
|
1033
|
-
"aria-label":
|
|
1034
|
-
}, null, 8,
|
|
1035
|
-
[
|
|
1037
|
+
placeholder: s("common.searchText"),
|
|
1038
|
+
"aria-label": s("common.searchText")
|
|
1039
|
+
}, null, 8, Bt), [
|
|
1040
|
+
[J, i.value]
|
|
1036
1041
|
]),
|
|
1037
|
-
|
|
1042
|
+
r("button", {
|
|
1038
1043
|
type: "button",
|
|
1039
1044
|
class: "dsea-app-search-close",
|
|
1040
|
-
"aria-label":
|
|
1045
|
+
"aria-label": s("common.cancelText"),
|
|
1041
1046
|
onClick: D
|
|
1042
1047
|
}, [
|
|
1043
|
-
|
|
1048
|
+
x(f(L), {
|
|
1044
1049
|
icon: "lucide:x",
|
|
1045
1050
|
size: 18
|
|
1046
1051
|
})
|
|
1047
|
-
], 8,
|
|
1052
|
+
], 8, Ft)
|
|
1048
1053
|
]),
|
|
1049
|
-
|
|
1054
|
+
A.value.length ? (t(), l("ul", {
|
|
1050
1055
|
key: 0,
|
|
1051
1056
|
ref_key: "resultList",
|
|
1052
|
-
ref:
|
|
1057
|
+
ref: h,
|
|
1053
1058
|
class: "dsea-app-search-results",
|
|
1054
1059
|
role: "listbox"
|
|
1055
1060
|
}, [
|
|
1056
|
-
(
|
|
1057
|
-
key:
|
|
1058
|
-
"data-index":
|
|
1061
|
+
(t(!0), l(F, null, K(A.value, (C, B) => (t(), l("li", {
|
|
1062
|
+
key: C.path,
|
|
1063
|
+
"data-index": B,
|
|
1059
1064
|
role: "option",
|
|
1060
|
-
"aria-selected":
|
|
1061
|
-
class:
|
|
1062
|
-
onMouseenter: (
|
|
1063
|
-
onClick: (
|
|
1065
|
+
"aria-selected": B === c.value,
|
|
1066
|
+
class: U({ active: B === c.value }),
|
|
1067
|
+
onMouseenter: (V) => c.value = B,
|
|
1068
|
+
onClick: (V) => j(C)
|
|
1064
1069
|
}, [
|
|
1065
|
-
|
|
1070
|
+
C.icon ? (t(), z(f(L), {
|
|
1066
1071
|
key: 0,
|
|
1067
|
-
icon:
|
|
1072
|
+
icon: C.icon,
|
|
1068
1073
|
size: 18
|
|
1069
|
-
}, null, 8, ["icon"])) :
|
|
1070
|
-
|
|
1071
|
-
|
|
1074
|
+
}, null, 8, ["icon"])) : b("", !0),
|
|
1075
|
+
r("span", null, m(C.label), 1),
|
|
1076
|
+
B === c.value ? (t(), z(f(L), {
|
|
1072
1077
|
key: 1,
|
|
1073
1078
|
icon: "ant-design:enter-outlined",
|
|
1074
1079
|
size: 16
|
|
1075
|
-
})) :
|
|
1076
|
-
], 42,
|
|
1077
|
-
], 512)) :
|
|
1078
|
-
], 8,
|
|
1079
|
-
])) :
|
|
1080
|
+
})) : b("", !0)
|
|
1081
|
+
], 42, Et))), 128))
|
|
1082
|
+
], 512)) : i.value.trim() ? (t(), l("div", It, m(s("component.app.searchNotData")), 1)) : b("", !0)
|
|
1083
|
+
], 8, Tt)
|
|
1084
|
+
])) : b("", !0)
|
|
1080
1085
|
]))
|
|
1081
1086
|
], 64));
|
|
1082
1087
|
}
|
|
1083
1088
|
});
|
|
1084
|
-
const
|
|
1089
|
+
const zt = /* @__PURE__ */ W(Nt, [["__scopeId", "data-v-9d504bc3"]]), Dt = ["aria-label"], Rt = ["src", "alt"], Kt = {
|
|
1085
1090
|
key: 1,
|
|
1086
1091
|
class: "dsea-user-menu__initial"
|
|
1087
|
-
},
|
|
1092
|
+
}, Wt = { class: "dsea-user-menu__name" }, Ot = { role: "menu" }, Vt = ["onClick"], Ut = /* @__PURE__ */ P({
|
|
1088
1093
|
__name: "AdminUserMenu",
|
|
1089
1094
|
props: {
|
|
1090
1095
|
name: {},
|
|
@@ -1093,64 +1098,64 @@ const tl = /* @__PURE__ */ A(Ze, [["__scopeId", "data-v-2b474f9e"]]), et = ["ari
|
|
|
1093
1098
|
items: {}
|
|
1094
1099
|
},
|
|
1095
1100
|
emits: ["select"],
|
|
1096
|
-
setup(e, { emit:
|
|
1097
|
-
const
|
|
1098
|
-
function
|
|
1099
|
-
|
|
1101
|
+
setup(e, { emit: d }) {
|
|
1102
|
+
const a = d, o = M();
|
|
1103
|
+
function s(i) {
|
|
1104
|
+
i.currentTarget.open = !1;
|
|
1100
1105
|
}
|
|
1101
|
-
function
|
|
1102
|
-
|
|
1106
|
+
function u(i) {
|
|
1107
|
+
a("select", i), o.value && (o.value.open = !1);
|
|
1103
1108
|
}
|
|
1104
|
-
return (
|
|
1109
|
+
return (i, n) => (t(), l("details", {
|
|
1105
1110
|
ref_key: "menu",
|
|
1106
|
-
ref:
|
|
1111
|
+
ref: o,
|
|
1107
1112
|
class: "dsea-user-menu",
|
|
1108
|
-
onKeydown:
|
|
1113
|
+
onKeydown: be(s, ["esc"])
|
|
1109
1114
|
}, [
|
|
1110
|
-
|
|
1111
|
-
e.avatar ? (
|
|
1115
|
+
r("summary", { "aria-label": e.label }, [
|
|
1116
|
+
e.avatar ? (t(), l("img", {
|
|
1112
1117
|
key: 0,
|
|
1113
1118
|
src: e.avatar,
|
|
1114
1119
|
alt: e.name
|
|
1115
|
-
}, null, 8,
|
|
1116
|
-
|
|
1117
|
-
|
|
1120
|
+
}, null, 8, Rt)) : (t(), l("span", Kt, m(e.name.slice(0, 1).toUpperCase()), 1)),
|
|
1121
|
+
r("span", Wt, m(e.name), 1),
|
|
1122
|
+
x(f(L), {
|
|
1118
1123
|
icon: "lucide:chevron-down",
|
|
1119
1124
|
size: 14
|
|
1120
1125
|
})
|
|
1121
|
-
], 8,
|
|
1122
|
-
|
|
1123
|
-
(
|
|
1124
|
-
key:
|
|
1126
|
+
], 8, Dt),
|
|
1127
|
+
r("ul", Ot, [
|
|
1128
|
+
(t(!0), l(F, null, K(e.items, (c) => (t(), l("li", {
|
|
1129
|
+
key: c.key,
|
|
1125
1130
|
role: "none"
|
|
1126
1131
|
}, [
|
|
1127
|
-
|
|
1132
|
+
r("button", {
|
|
1128
1133
|
type: "button",
|
|
1129
1134
|
role: "menuitem",
|
|
1130
|
-
onClick: (
|
|
1135
|
+
onClick: (y) => u(c.key)
|
|
1131
1136
|
}, [
|
|
1132
|
-
|
|
1137
|
+
c.icon ? (t(), z(f(L), {
|
|
1133
1138
|
key: 0,
|
|
1134
|
-
icon:
|
|
1139
|
+
icon: c.icon,
|
|
1135
1140
|
size: 16
|
|
1136
|
-
}, null, 8, ["icon"])) :
|
|
1137
|
-
|
|
1138
|
-
], 8,
|
|
1141
|
+
}, null, 8, ["icon"])) : b("", !0),
|
|
1142
|
+
Q(" " + m(c.label), 1)
|
|
1143
|
+
], 8, Vt)
|
|
1139
1144
|
]))), 128))
|
|
1140
1145
|
])
|
|
1141
1146
|
], 544));
|
|
1142
1147
|
}
|
|
1143
1148
|
});
|
|
1144
|
-
const
|
|
1149
|
+
const qt = /* @__PURE__ */ W(Ut, [["__scopeId", "data-v-d193d9f3"]]), Ht = ["aria-label"], jt = {
|
|
1145
1150
|
key: 0,
|
|
1146
1151
|
class: "dsea-notifications__count"
|
|
1147
|
-
},
|
|
1152
|
+
}, Qt = ["aria-label"], Xt = {
|
|
1148
1153
|
class: "dsea-notifications__tabs",
|
|
1149
1154
|
role: "tablist"
|
|
1150
|
-
},
|
|
1155
|
+
}, Gt = ["aria-selected", "onClick"], Yt = { key: 0 }, Jt = ["onClick"], Zt = { key: 0 }, ea = { key: 1 }, ta = {
|
|
1151
1156
|
key: 1,
|
|
1152
1157
|
class: "dsea-notifications__empty"
|
|
1153
|
-
},
|
|
1158
|
+
}, aa = /* @__PURE__ */ P({
|
|
1154
1159
|
__name: "AdminNotificationCenter",
|
|
1155
1160
|
props: {
|
|
1156
1161
|
items: {},
|
|
@@ -1160,80 +1165,80 @@ const al = /* @__PURE__ */ A(st, [["__scopeId", "data-v-d193d9f3"]]), it = ["ari
|
|
|
1160
1165
|
markAllLabel: { default: "Mark all as read" }
|
|
1161
1166
|
},
|
|
1162
1167
|
emits: ["open", "markAllRead"],
|
|
1163
|
-
setup(e, { emit:
|
|
1164
|
-
var
|
|
1165
|
-
const
|
|
1166
|
-
|
|
1167
|
-
var
|
|
1168
|
-
|
|
1168
|
+
setup(e, { emit: d }) {
|
|
1169
|
+
var c;
|
|
1170
|
+
const a = e, o = d, s = M(((c = a.categories[0]) == null ? void 0 : c.key) ?? "");
|
|
1171
|
+
Z(() => a.categories, (y) => {
|
|
1172
|
+
var h;
|
|
1173
|
+
y.some((p) => p.key === s.value) || (s.value = ((h = y[0]) == null ? void 0 : h.key) ?? "");
|
|
1169
1174
|
});
|
|
1170
|
-
const
|
|
1171
|
-
function
|
|
1172
|
-
|
|
1175
|
+
const u = E(() => a.items.filter((y) => !y.read).length), i = E(() => a.items.filter((y) => y.category === s.value));
|
|
1176
|
+
function n(y) {
|
|
1177
|
+
y.currentTarget.open = !1;
|
|
1173
1178
|
}
|
|
1174
|
-
return (
|
|
1179
|
+
return (y, h) => (t(), l("details", {
|
|
1175
1180
|
class: "dsea-notifications",
|
|
1176
|
-
onKeydown:
|
|
1181
|
+
onKeydown: be(n, ["esc"])
|
|
1177
1182
|
}, [
|
|
1178
|
-
|
|
1179
|
-
|
|
1183
|
+
r("summary", { "aria-label": e.label }, [
|
|
1184
|
+
x(f(L), {
|
|
1180
1185
|
icon: "lucide:bell",
|
|
1181
1186
|
size: 18
|
|
1182
1187
|
}),
|
|
1183
|
-
|
|
1184
|
-
], 8,
|
|
1185
|
-
|
|
1188
|
+
u.value ? (t(), l("span", jt, m(u.value > 99 ? "99+" : u.value), 1)) : b("", !0)
|
|
1189
|
+
], 8, Ht),
|
|
1190
|
+
r("section", {
|
|
1186
1191
|
class: "dsea-notifications__panel",
|
|
1187
1192
|
"aria-label": e.label
|
|
1188
1193
|
}, [
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
(
|
|
1192
|
-
key:
|
|
1194
|
+
r("header", null, m(e.label), 1),
|
|
1195
|
+
r("div", Xt, [
|
|
1196
|
+
(t(!0), l(F, null, K(e.categories, (p) => (t(), l("button", {
|
|
1197
|
+
key: p.key,
|
|
1193
1198
|
type: "button",
|
|
1194
1199
|
role: "tab",
|
|
1195
|
-
"aria-selected":
|
|
1196
|
-
onClick: (
|
|
1197
|
-
},
|
|
1200
|
+
"aria-selected": s.value === p.key,
|
|
1201
|
+
onClick: (N) => s.value = p.key
|
|
1202
|
+
}, m(p.label), 9, Gt))), 128))
|
|
1198
1203
|
]),
|
|
1199
|
-
|
|
1200
|
-
(
|
|
1201
|
-
key:
|
|
1202
|
-
class:
|
|
1204
|
+
i.value.length ? (t(), l("ul", Yt, [
|
|
1205
|
+
(t(!0), l(F, null, K(i.value, (p) => (t(), l("li", {
|
|
1206
|
+
key: p.id,
|
|
1207
|
+
class: U({ "is-read": p.read })
|
|
1203
1208
|
}, [
|
|
1204
|
-
|
|
1209
|
+
r("button", {
|
|
1205
1210
|
type: "button",
|
|
1206
|
-
onClick: (
|
|
1211
|
+
onClick: (N) => o("open", p)
|
|
1207
1212
|
}, [
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
], 8,
|
|
1213
|
+
r("strong", null, m(p.title), 1),
|
|
1214
|
+
p.description ? (t(), l("span", Zt, m(p.description), 1)) : b("", !0),
|
|
1215
|
+
p.time ? (t(), l("small", ea, m(p.time), 1)) : b("", !0)
|
|
1216
|
+
], 8, Jt)
|
|
1212
1217
|
], 2))), 128))
|
|
1213
|
-
])) : (
|
|
1214
|
-
|
|
1218
|
+
])) : (t(), l("p", ta, m(e.emptyLabel), 1)),
|
|
1219
|
+
u.value ? (t(), l("button", {
|
|
1215
1220
|
key: 2,
|
|
1216
1221
|
type: "button",
|
|
1217
1222
|
class: "dsea-notifications__mark",
|
|
1218
|
-
onClick:
|
|
1219
|
-
},
|
|
1220
|
-
], 8,
|
|
1223
|
+
onClick: h[0] || (h[0] = (p) => o("markAllRead"))
|
|
1224
|
+
}, m(e.markAllLabel), 1)) : b("", !0)
|
|
1225
|
+
], 8, Qt)
|
|
1221
1226
|
], 32));
|
|
1222
1227
|
}
|
|
1223
1228
|
});
|
|
1224
|
-
const
|
|
1229
|
+
const na = /* @__PURE__ */ W(aa, [["__scopeId", "data-v-c5c5a82f"]]), la = ["aria-hidden", "inert"], oa = { class: "dsea-admin-layout__brand" }, ia = ["aria-label"], sa = {
|
|
1225
1230
|
key: 0,
|
|
1226
1231
|
class: "dsea-admin-layout__sidebar-footer"
|
|
1227
|
-
},
|
|
1232
|
+
}, ra = ["aria-label", "aria-valuenow", "aria-valuemin", "aria-valuemax"], ua = ["aria-label"], da = { class: "dsea-admin-layout__main" }, ca = {
|
|
1228
1233
|
key: 0,
|
|
1229
1234
|
class: "dsea-admin-layout__header"
|
|
1230
|
-
},
|
|
1235
|
+
}, ma = ["aria-label", "aria-expanded"], va = ["aria-label"], ga = { class: "dsea-admin-layout__header-actions" }, ba = {
|
|
1231
1236
|
key: 1,
|
|
1232
1237
|
class: "dsea-admin-layout__tabs"
|
|
1233
|
-
},
|
|
1238
|
+
}, ha = { class: "dsea-admin-layout__content" }, pa = {
|
|
1234
1239
|
key: 2,
|
|
1235
1240
|
class: "dsea-admin-layout__footer"
|
|
1236
|
-
},
|
|
1241
|
+
}, ko = /* @__PURE__ */ P({
|
|
1237
1242
|
__name: "AdminLayout",
|
|
1238
1243
|
props: {
|
|
1239
1244
|
menus: { default: () => [] },
|
|
@@ -1257,86 +1262,86 @@ const nl = /* @__PURE__ */ A(ht, [["__scopeId", "data-v-c5c5a82f"]]), ft = ["ari
|
|
|
1257
1262
|
resizeLabel: { default: "Resize sidebar" }
|
|
1258
1263
|
},
|
|
1259
1264
|
emits: ["update:collapsed", "menuClick", "update:sidebarWidth"],
|
|
1260
|
-
setup(e, { emit:
|
|
1261
|
-
const
|
|
1262
|
-
let
|
|
1263
|
-
function
|
|
1264
|
-
return Math.min(
|
|
1265
|
-
}
|
|
1266
|
-
function v
|
|
1267
|
-
if (
|
|
1265
|
+
setup(e, { emit: d }) {
|
|
1266
|
+
const a = e, o = d, { ports: s } = te(), u = M(!1), i = M(!1), n = E(() => a.showSidebar && a.mode !== "top" && !a.fullContent);
|
|
1267
|
+
let c;
|
|
1268
|
+
function y(v) {
|
|
1269
|
+
return Math.min(a.maxSidebarWidth, Math.max(a.minSidebarWidth, v));
|
|
1270
|
+
}
|
|
1271
|
+
function h(v) {
|
|
1272
|
+
if (v.button !== 0)
|
|
1268
1273
|
return;
|
|
1269
|
-
|
|
1270
|
-
const
|
|
1271
|
-
window.addEventListener("pointermove",
|
|
1272
|
-
window.removeEventListener("pointermove",
|
|
1274
|
+
c == null || c();
|
|
1275
|
+
const k = v.clientX, C = a.sidebarWidth, B = (G) => o("update:sidebarWidth", y(C + G.clientX - k)), V = () => c == null ? void 0 : c();
|
|
1276
|
+
window.addEventListener("pointermove", B), window.addEventListener("pointerup", V), window.addEventListener("pointercancel", V), c = () => {
|
|
1277
|
+
window.removeEventListener("pointermove", B), window.removeEventListener("pointerup", V), window.removeEventListener("pointercancel", V), c = void 0;
|
|
1273
1278
|
};
|
|
1274
1279
|
}
|
|
1275
|
-
function
|
|
1276
|
-
|
|
1280
|
+
function p(v) {
|
|
1281
|
+
v.key !== "ArrowLeft" && v.key !== "ArrowRight" || (v.preventDefault(), o("update:sidebarWidth", y(a.sidebarWidth + (v.key === "ArrowRight" ? 10 : -10))));
|
|
1277
1282
|
}
|
|
1278
|
-
|
|
1279
|
-
const
|
|
1280
|
-
"--dsea-sidebar-width": `${
|
|
1281
|
-
"--dsea-collapsed-width": `${
|
|
1282
|
-
"--dsea-header-height": `${
|
|
1283
|
+
ze({ prefixCls: M("dsea"), isMobile: u });
|
|
1284
|
+
const N = E(() => ({
|
|
1285
|
+
"--dsea-sidebar-width": `${a.sidebarWidth}px`,
|
|
1286
|
+
"--dsea-collapsed-width": `${a.collapsedWidth}px`,
|
|
1287
|
+
"--dsea-header-height": `${a.headerHeight}px`
|
|
1283
1288
|
}));
|
|
1284
|
-
function
|
|
1285
|
-
const
|
|
1286
|
-
|
|
1289
|
+
function A() {
|
|
1290
|
+
const v = window.innerWidth < a.mobileBreakpoint;
|
|
1291
|
+
v !== u.value && (u.value = v, i.value = !1);
|
|
1292
|
+
}
|
|
1293
|
+
function O() {
|
|
1294
|
+
i.value = !1;
|
|
1287
1295
|
}
|
|
1288
1296
|
function D() {
|
|
1289
|
-
|
|
1290
|
-
}
|
|
1291
|
-
function
|
|
1292
|
-
|
|
1293
|
-
}
|
|
1294
|
-
function
|
|
1295
|
-
|
|
1296
|
-
}
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
}
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
}), (h, _) => (a(), o("div", {
|
|
1307
|
-
class: N(["dsea-admin-layout", { "dsea-admin-layout--mobile": r.value, "dsea-admin-layout--collapsed": e.collapsed, "dsea-admin-layout--no-sidebar": !u.value }]),
|
|
1308
|
-
style: ie(L.value)
|
|
1297
|
+
u.value ? i.value = !i.value : o("update:collapsed", !a.collapsed);
|
|
1298
|
+
}
|
|
1299
|
+
function j(v) {
|
|
1300
|
+
o("menuClick", v), O(), s.navigation.go(v);
|
|
1301
|
+
}
|
|
1302
|
+
function $(v) {
|
|
1303
|
+
v.key === "Escape" && i.value && O();
|
|
1304
|
+
}
|
|
1305
|
+
return Z(() => a.mobileBreakpoint, A), Z(() => a.fullContent, () => {
|
|
1306
|
+
i.value = !1;
|
|
1307
|
+
}), ie(() => {
|
|
1308
|
+
A(), window.addEventListener("resize", A), window.addEventListener("keydown", $);
|
|
1309
|
+
}), ne(() => {
|
|
1310
|
+
c == null || c(), window.removeEventListener("resize", A), window.removeEventListener("keydown", $);
|
|
1311
|
+
}), (v, k) => (t(), l("div", {
|
|
1312
|
+
class: U(["dsea-admin-layout", { "dsea-admin-layout--mobile": u.value, "dsea-admin-layout--collapsed": e.collapsed, "dsea-admin-layout--no-sidebar": !n.value }]),
|
|
1313
|
+
style: he(N.value)
|
|
1309
1314
|
}, [
|
|
1310
|
-
|
|
1315
|
+
n.value ? (t(), l("aside", {
|
|
1311
1316
|
key: 0,
|
|
1312
|
-
class:
|
|
1313
|
-
"aria-hidden":
|
|
1314
|
-
inert:
|
|
1317
|
+
class: U(["dsea-admin-layout__sidebar", { "dsea-admin-layout__sidebar--open": i.value }]),
|
|
1318
|
+
"aria-hidden": u.value && !i.value,
|
|
1319
|
+
inert: u.value && !i.value
|
|
1315
1320
|
}, [
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
"show-title": !e.collapsed ||
|
|
1321
|
+
r("div", oa, [
|
|
1322
|
+
T(v.$slots, "brand", {}, () => [
|
|
1323
|
+
x(ve, {
|
|
1324
|
+
"show-title": !e.collapsed || u.value
|
|
1320
1325
|
}, null, 8, ["show-title"])
|
|
1321
1326
|
])
|
|
1322
1327
|
]),
|
|
1323
|
-
|
|
1328
|
+
r("nav", {
|
|
1324
1329
|
class: "dsea-admin-layout__navigation",
|
|
1325
1330
|
"aria-label": e.navigationLabel
|
|
1326
1331
|
}, [
|
|
1327
|
-
|
|
1328
|
-
|
|
1332
|
+
T(v.$slots, "navigation", {}, () => [
|
|
1333
|
+
x(oe, {
|
|
1329
1334
|
items: e.menus,
|
|
1330
|
-
collapse: e.collapsed && !
|
|
1335
|
+
collapse: e.collapsed && !u.value,
|
|
1331
1336
|
theme: e.menuTheme,
|
|
1332
|
-
onMenuClick:
|
|
1337
|
+
onMenuClick: j
|
|
1333
1338
|
}, null, 8, ["items", "collapse", "theme"])
|
|
1334
1339
|
])
|
|
1335
|
-
], 8,
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
])) :
|
|
1339
|
-
e.resizableSidebar && !
|
|
1340
|
+
], 8, ia),
|
|
1341
|
+
v.$slots.sidebarFooter ? (t(), l("div", sa, [
|
|
1342
|
+
T(v.$slots, "sidebarFooter")
|
|
1343
|
+
])) : b("", !0),
|
|
1344
|
+
e.resizableSidebar && !u.value && !e.collapsed ? (t(), l("div", {
|
|
1340
1345
|
key: 1,
|
|
1341
1346
|
class: "dsea-admin-layout__resize",
|
|
1342
1347
|
role: "separator",
|
|
@@ -1346,104 +1351,1140 @@ const nl = /* @__PURE__ */ A(ht, [["__scopeId", "data-v-c5c5a82f"]]), ft = ["ari
|
|
|
1346
1351
|
"aria-valuenow": e.sidebarWidth,
|
|
1347
1352
|
"aria-valuemin": e.minSidebarWidth,
|
|
1348
1353
|
"aria-valuemax": e.maxSidebarWidth,
|
|
1349
|
-
onPointerdown:
|
|
1350
|
-
onKeydown:
|
|
1351
|
-
}, null, 40,
|
|
1352
|
-
], 10,
|
|
1353
|
-
|
|
1354
|
+
onPointerdown: h,
|
|
1355
|
+
onKeydown: p
|
|
1356
|
+
}, null, 40, ra)) : b("", !0)
|
|
1357
|
+
], 10, la)) : b("", !0),
|
|
1358
|
+
n.value && u.value && i.value ? (t(), l("button", {
|
|
1354
1359
|
key: 1,
|
|
1355
1360
|
type: "button",
|
|
1356
1361
|
class: "dsea-admin-layout__scrim",
|
|
1357
1362
|
"aria-label": e.closeNavigationLabel,
|
|
1358
|
-
onClick:
|
|
1359
|
-
}, null, 8,
|
|
1360
|
-
|
|
1361
|
-
e.fullContent ?
|
|
1362
|
-
|
|
1363
|
+
onClick: O
|
|
1364
|
+
}, null, 8, ua)) : b("", !0),
|
|
1365
|
+
r("div", da, [
|
|
1366
|
+
e.fullContent ? b("", !0) : (t(), l("header", ca, [
|
|
1367
|
+
n.value ? (t(), l("button", {
|
|
1363
1368
|
key: 0,
|
|
1364
1369
|
type: "button",
|
|
1365
1370
|
class: "dsea-admin-layout__toggle",
|
|
1366
1371
|
"aria-label": e.navigationLabel,
|
|
1367
|
-
"aria-expanded":
|
|
1368
|
-
onClick:
|
|
1372
|
+
"aria-expanded": u.value ? i.value : !e.collapsed,
|
|
1373
|
+
onClick: D
|
|
1369
1374
|
}, [
|
|
1370
|
-
|
|
1371
|
-
icon:
|
|
1375
|
+
x(f(L), {
|
|
1376
|
+
icon: u.value && i.value ? "lucide:x" : "lucide:menu",
|
|
1372
1377
|
size: 20
|
|
1373
1378
|
}, null, 8, ["icon"])
|
|
1374
|
-
], 8,
|
|
1375
|
-
|
|
1376
|
-
e.mode !== "sidebar" ? (
|
|
1379
|
+
], 8, ma)) : b("", !0),
|
|
1380
|
+
T(v.$slots, "header"),
|
|
1381
|
+
e.mode !== "sidebar" ? (t(), l("nav", {
|
|
1377
1382
|
key: 1,
|
|
1378
1383
|
class: "dsea-admin-layout__top-navigation",
|
|
1379
1384
|
"aria-label": e.topNavigationLabel
|
|
1380
1385
|
}, [
|
|
1381
|
-
|
|
1382
|
-
|
|
1386
|
+
T(v.$slots, "topNavigation", {}, () => [
|
|
1387
|
+
x(oe, {
|
|
1383
1388
|
items: e.mode === "top" ? e.menus : e.topMenus,
|
|
1384
1389
|
mode: "horizontal",
|
|
1385
1390
|
type: "top",
|
|
1386
1391
|
theme: e.topMenuTheme,
|
|
1387
|
-
onMenuClick:
|
|
1392
|
+
onMenuClick: j
|
|
1388
1393
|
}, null, 8, ["items", "theme"])
|
|
1389
1394
|
])
|
|
1390
|
-
], 8,
|
|
1391
|
-
|
|
1392
|
-
|
|
1395
|
+
], 8, va)) : b("", !0),
|
|
1396
|
+
r("div", ga, [
|
|
1397
|
+
T(v.$slots, "headerActions")
|
|
1393
1398
|
])
|
|
1394
1399
|
])),
|
|
1395
|
-
!e.fullContent &&
|
|
1396
|
-
|
|
1397
|
-
])) :
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
+
!e.fullContent && v.$slots.tabs ? (t(), l("div", ba, [
|
|
1401
|
+
T(v.$slots, "tabs")
|
|
1402
|
+
])) : b("", !0),
|
|
1403
|
+
r("main", ha, [
|
|
1404
|
+
T(v.$slots, "default")
|
|
1400
1405
|
]),
|
|
1401
|
-
!e.fullContent &&
|
|
1402
|
-
|
|
1403
|
-
])) :
|
|
1406
|
+
!e.fullContent && v.$slots.footer ? (t(), l("footer", pa, [
|
|
1407
|
+
T(v.$slots, "footer")
|
|
1408
|
+
])) : b("", !0)
|
|
1404
1409
|
])
|
|
1405
1410
|
], 6));
|
|
1406
1411
|
}
|
|
1407
1412
|
});
|
|
1408
|
-
const
|
|
1413
|
+
const fa = ["aria-label"], ya = {
|
|
1409
1414
|
key: 0,
|
|
1410
1415
|
class: "dsea-breadcrumb__separator",
|
|
1411
1416
|
"aria-hidden": "true"
|
|
1412
|
-
},
|
|
1417
|
+
}, ka = ["onClick"], wa = ["aria-current"], Sa = /* @__PURE__ */ P({
|
|
1413
1418
|
__name: "AdminBreadcrumb",
|
|
1414
1419
|
props: {
|
|
1415
1420
|
items: {},
|
|
1416
1421
|
label: {}
|
|
1417
1422
|
},
|
|
1418
1423
|
setup(e) {
|
|
1419
|
-
const { ports:
|
|
1420
|
-
function
|
|
1421
|
-
|
|
1424
|
+
const { ports: d } = te();
|
|
1425
|
+
function a(o) {
|
|
1426
|
+
d.navigation.go(o);
|
|
1422
1427
|
}
|
|
1423
|
-
return (
|
|
1428
|
+
return (o, s) => e.items.length ? (t(), l("nav", {
|
|
1424
1429
|
key: 0,
|
|
1425
1430
|
class: "dsea-breadcrumb",
|
|
1426
1431
|
"aria-label": e.label
|
|
1427
1432
|
}, [
|
|
1428
|
-
|
|
1429
|
-
(
|
|
1430
|
-
key:
|
|
1433
|
+
r("ol", null, [
|
|
1434
|
+
(t(!0), l(F, null, K(e.items, (u, i) => (t(), l("li", {
|
|
1435
|
+
key: u.path || i
|
|
1431
1436
|
}, [
|
|
1432
|
-
|
|
1433
|
-
|
|
1437
|
+
i ? (t(), l("span", ya, "/")) : b("", !0),
|
|
1438
|
+
u.path && i < e.items.length - 1 ? (t(), l("button", {
|
|
1434
1439
|
key: 1,
|
|
1435
1440
|
type: "button",
|
|
1436
|
-
onClick: (
|
|
1437
|
-
},
|
|
1441
|
+
onClick: (n) => a(u.path)
|
|
1442
|
+
}, m(u.title), 9, ka)) : (t(), l("span", {
|
|
1438
1443
|
key: 2,
|
|
1439
|
-
"aria-current":
|
|
1440
|
-
},
|
|
1444
|
+
"aria-current": i === e.items.length - 1 ? "page" : void 0
|
|
1445
|
+
}, m(u.title), 9, wa))
|
|
1441
1446
|
]))), 128))
|
|
1442
1447
|
])
|
|
1443
|
-
], 8,
|
|
1448
|
+
], 8, fa)) : b("", !0);
|
|
1449
|
+
}
|
|
1450
|
+
});
|
|
1451
|
+
const _a = /* @__PURE__ */ W(Sa, [["__scopeId", "data-v-49bfd66c"]]), $a = { class: "dsea-admin-tabs" }, Ca = {
|
|
1452
|
+
class: "dsea-admin-tabs__list",
|
|
1453
|
+
role: "tablist"
|
|
1454
|
+
}, xa = ["draggable", "onDragstart", "onDrop", "onContextmenu"], La = ["aria-selected", "onClick"], Ma = ["aria-label", "onClick"], Aa = {
|
|
1455
|
+
key: 0,
|
|
1456
|
+
class: "dsea-admin-tabs__tools"
|
|
1457
|
+
}, Ta = ["aria-label"], Pa = ["aria-label"], Ba = ["aria-label"], Fa = ["onClick"], Ea = /* @__PURE__ */ P({
|
|
1458
|
+
__name: "AdminTabs",
|
|
1459
|
+
props: {
|
|
1460
|
+
tabs: {},
|
|
1461
|
+
activeKey: {},
|
|
1462
|
+
labels: {},
|
|
1463
|
+
navigateOnSelect: { type: Boolean, default: !0 },
|
|
1464
|
+
showRedo: { type: Boolean, default: !0 },
|
|
1465
|
+
showQuick: { type: Boolean, default: !0 },
|
|
1466
|
+
showFold: { type: Boolean, default: !1 },
|
|
1467
|
+
canDrag: { type: Boolean, default: !1 }
|
|
1468
|
+
},
|
|
1469
|
+
emits: ["select", "close", "refresh", "closeAction", "fold", "reorder"],
|
|
1470
|
+
setup(e, { emit: d }) {
|
|
1471
|
+
const a = e, o = d, { ports: s } = te(), u = M(""), i = M(null), n = E(() => [
|
|
1472
|
+
{ event: "left", text: a.labels.closeLeft },
|
|
1473
|
+
{ event: "right", text: a.labels.closeRight },
|
|
1474
|
+
{ event: "others", text: a.labels.closeOthers },
|
|
1475
|
+
{ event: "all", text: a.labels.closeAll }
|
|
1476
|
+
]);
|
|
1477
|
+
function c($) {
|
|
1478
|
+
i.value = null, o("select", $), a.navigateOnSelect && s.navigation.go($);
|
|
1479
|
+
}
|
|
1480
|
+
function y($) {
|
|
1481
|
+
o("close", $);
|
|
1482
|
+
}
|
|
1483
|
+
function h($) {
|
|
1484
|
+
$ && o("closeAction", $.event, a.activeKey);
|
|
1485
|
+
}
|
|
1486
|
+
function p($) {
|
|
1487
|
+
a.canDrag && $.dataTransfer && ($.dataTransfer.dropEffect = "move");
|
|
1488
|
+
}
|
|
1489
|
+
function N($) {
|
|
1490
|
+
if (!a.canDrag || !u.value || u.value === $)
|
|
1491
|
+
return;
|
|
1492
|
+
const v = a.tabs.map((B) => B.key), k = v.indexOf(u.value), C = v.indexOf($);
|
|
1493
|
+
k < 0 || C < 0 || (v.splice(C, 0, v.splice(k, 1)[0]), o("reorder", v), u.value = "");
|
|
1494
|
+
}
|
|
1495
|
+
function A($, v) {
|
|
1496
|
+
i.value = {
|
|
1497
|
+
key: $,
|
|
1498
|
+
x: Math.max(0, Math.min(v.clientX, window.innerWidth - 180)),
|
|
1499
|
+
y: Math.max(0, Math.min(v.clientY, window.innerHeight - 180))
|
|
1500
|
+
};
|
|
1501
|
+
}
|
|
1502
|
+
function O($) {
|
|
1503
|
+
i.value && (o("closeAction", $, i.value.key), i.value = null);
|
|
1504
|
+
}
|
|
1505
|
+
function D($) {
|
|
1506
|
+
var v, k;
|
|
1507
|
+
(k = (v = $.target) == null ? void 0 : v.closest) != null && k.call(v, ".dsea-admin-tabs__context") || (i.value = null);
|
|
1508
|
+
}
|
|
1509
|
+
function j($) {
|
|
1510
|
+
$.key === "Escape" && (i.value = null);
|
|
1511
|
+
}
|
|
1512
|
+
return ie(() => {
|
|
1513
|
+
window.addEventListener("pointerdown", D), window.addEventListener("keydown", j), window.addEventListener("resize", D), window.addEventListener("scroll", D, !0);
|
|
1514
|
+
}), ne(() => {
|
|
1515
|
+
window.removeEventListener("pointerdown", D), window.removeEventListener("keydown", j), window.removeEventListener("resize", D), window.removeEventListener("scroll", D, !0);
|
|
1516
|
+
}), ($, v) => (t(), l(F, null, [
|
|
1517
|
+
r("div", $a, [
|
|
1518
|
+
r("div", Ca, [
|
|
1519
|
+
(t(!0), l(F, null, K(e.tabs, (k) => (t(), l("div", {
|
|
1520
|
+
key: k.key,
|
|
1521
|
+
class: U(["dsea-admin-tabs__item", { "dsea-admin-tabs__item--active": k.key === e.activeKey }]),
|
|
1522
|
+
draggable: e.canDrag,
|
|
1523
|
+
onDragstart: (C) => u.value = k.key,
|
|
1524
|
+
onDragend: v[0] || (v[0] = (C) => u.value = ""),
|
|
1525
|
+
onDragover: ee(p, ["prevent"]),
|
|
1526
|
+
onDrop: ee((C) => N(k.key), ["prevent"]),
|
|
1527
|
+
onContextmenu: ee((C) => A(k.key, C), ["prevent"])
|
|
1528
|
+
}, [
|
|
1529
|
+
r("button", {
|
|
1530
|
+
type: "button",
|
|
1531
|
+
role: "tab",
|
|
1532
|
+
"aria-selected": k.key === e.activeKey,
|
|
1533
|
+
class: "dsea-admin-tabs__select",
|
|
1534
|
+
onClick: (C) => c(k.key)
|
|
1535
|
+
}, [
|
|
1536
|
+
k.icon ? (t(), z(f(L), {
|
|
1537
|
+
key: 0,
|
|
1538
|
+
icon: k.icon,
|
|
1539
|
+
size: 14
|
|
1540
|
+
}, null, 8, ["icon"])) : b("", !0),
|
|
1541
|
+
r("span", null, m(k.label), 1)
|
|
1542
|
+
], 8, La),
|
|
1543
|
+
k.affix ? b("", !0) : (t(), l("button", {
|
|
1544
|
+
key: 0,
|
|
1545
|
+
type: "button",
|
|
1546
|
+
class: "dsea-admin-tabs__close",
|
|
1547
|
+
"aria-label": `${e.labels.close}: ${k.label}`,
|
|
1548
|
+
onClick: (C) => y(k.key)
|
|
1549
|
+
}, [
|
|
1550
|
+
x(f(L), {
|
|
1551
|
+
icon: "lucide:x",
|
|
1552
|
+
size: 14
|
|
1553
|
+
})
|
|
1554
|
+
], 8, Ma))
|
|
1555
|
+
], 42, xa))), 128))
|
|
1556
|
+
]),
|
|
1557
|
+
e.tabs.length ? (t(), l("div", Aa, [
|
|
1558
|
+
e.showRedo ? (t(), l("button", {
|
|
1559
|
+
key: 0,
|
|
1560
|
+
type: "button",
|
|
1561
|
+
"aria-label": e.labels.refresh,
|
|
1562
|
+
onClick: v[1] || (v[1] = (k) => o("refresh", e.activeKey))
|
|
1563
|
+
}, [
|
|
1564
|
+
x(f(L), {
|
|
1565
|
+
icon: "lucide:refresh-cw",
|
|
1566
|
+
size: 16
|
|
1567
|
+
})
|
|
1568
|
+
], 8, Ta)) : b("", !0),
|
|
1569
|
+
e.showQuick ? (t(), z(f(Fe), {
|
|
1570
|
+
key: 1,
|
|
1571
|
+
"drop-menu-list": n.value,
|
|
1572
|
+
trigger: ["click"],
|
|
1573
|
+
onMenuEvent: h
|
|
1574
|
+
}, {
|
|
1575
|
+
default: re(() => [
|
|
1576
|
+
r("button", {
|
|
1577
|
+
type: "button",
|
|
1578
|
+
"aria-label": e.labels.actions
|
|
1579
|
+
}, [
|
|
1580
|
+
x(f(L), {
|
|
1581
|
+
icon: "lucide:chevron-down",
|
|
1582
|
+
size: 16
|
|
1583
|
+
})
|
|
1584
|
+
], 8, Pa)
|
|
1585
|
+
]),
|
|
1586
|
+
_: 1
|
|
1587
|
+
}, 8, ["drop-menu-list"])) : b("", !0),
|
|
1588
|
+
e.showFold ? (t(), l("button", {
|
|
1589
|
+
key: 2,
|
|
1590
|
+
type: "button",
|
|
1591
|
+
"aria-label": e.labels.fold || "Toggle full content",
|
|
1592
|
+
onClick: v[2] || (v[2] = (k) => o("fold"))
|
|
1593
|
+
}, [
|
|
1594
|
+
x(f(L), {
|
|
1595
|
+
icon: "lucide:maximize",
|
|
1596
|
+
size: 16
|
|
1597
|
+
})
|
|
1598
|
+
], 8, Ba)) : b("", !0)
|
|
1599
|
+
])) : b("", !0)
|
|
1600
|
+
]),
|
|
1601
|
+
(t(), z(Pe, { to: "body" }, [
|
|
1602
|
+
i.value ? (t(), l("div", {
|
|
1603
|
+
key: 0,
|
|
1604
|
+
class: "dsea-admin-tabs__context",
|
|
1605
|
+
role: "menu",
|
|
1606
|
+
style: he({ left: `${i.value.x}px`, top: `${i.value.y}px` })
|
|
1607
|
+
}, [
|
|
1608
|
+
(t(!0), l(F, null, K(n.value, (k) => (t(), l("button", {
|
|
1609
|
+
key: k.event,
|
|
1610
|
+
type: "button",
|
|
1611
|
+
role: "menuitem",
|
|
1612
|
+
onClick: (C) => O(k.event)
|
|
1613
|
+
}, m(k.text), 9, Fa))), 128))
|
|
1614
|
+
], 4)) : b("", !0)
|
|
1615
|
+
]))
|
|
1616
|
+
], 64));
|
|
1617
|
+
}
|
|
1618
|
+
});
|
|
1619
|
+
const Ia = { class: "dsea-settings-panel" }, Na = ["for"], za = { key: 1 }, Da = ["aria-label"], Ra = ["aria-label", "aria-pressed", "disabled", "onClick"], Ka = ["aria-label"], Wa = ["aria-pressed", "disabled", "onClick"], Oa = /* @__PURE__ */ P({
|
|
1620
|
+
__name: "SettingsPanel",
|
|
1621
|
+
props: {
|
|
1622
|
+
sections: {}
|
|
1623
|
+
},
|
|
1624
|
+
emits: ["change"],
|
|
1625
|
+
setup(e, { emit: d }) {
|
|
1626
|
+
const a = d;
|
|
1627
|
+
function o(n, c) {
|
|
1628
|
+
a("change", n, c);
|
|
1629
|
+
}
|
|
1630
|
+
function s(n, c) {
|
|
1631
|
+
typeof c == "boolean" && o(n, c);
|
|
1632
|
+
}
|
|
1633
|
+
function u(n, c) {
|
|
1634
|
+
(typeof c == "string" || typeof c == "number") && o(n, c);
|
|
1635
|
+
}
|
|
1636
|
+
function i(n, c) {
|
|
1637
|
+
typeof c == "number" && Number.isFinite(c) && o(n, c);
|
|
1638
|
+
}
|
|
1639
|
+
return (n, c) => (t(), l("div", Ia, [
|
|
1640
|
+
(t(!0), l(F, null, K(e.sections, (y) => (t(), l("section", {
|
|
1641
|
+
key: y.title,
|
|
1642
|
+
class: "dsea-settings-panel__section"
|
|
1643
|
+
}, [
|
|
1644
|
+
r("h3", null, m(y.title), 1),
|
|
1645
|
+
(t(!0), l(F, null, K(y.items, (h) => (t(), l("div", {
|
|
1646
|
+
key: h.key,
|
|
1647
|
+
class: U(["dsea-settings-panel__row", { "dsea-settings-panel__row--stacked": h.type === "color" || h.type === "mode" }])
|
|
1648
|
+
}, [
|
|
1649
|
+
h.type === "switch" || h.type === "select" || h.type === "number" ? (t(), l("label", {
|
|
1650
|
+
key: 0,
|
|
1651
|
+
for: h.key
|
|
1652
|
+
}, m(h.label), 9, Na)) : (t(), l("span", za, m(h.label), 1)),
|
|
1653
|
+
h.type === "switch" ? (t(), z(f(Ze), {
|
|
1654
|
+
key: 2,
|
|
1655
|
+
id: h.key,
|
|
1656
|
+
checked: h.value,
|
|
1657
|
+
disabled: h.disabled,
|
|
1658
|
+
onChange: (p) => s(h.key, p)
|
|
1659
|
+
}, null, 8, ["id", "checked", "disabled", "onChange"])) : h.type === "select" ? (t(), z(f(et), {
|
|
1660
|
+
key: 3,
|
|
1661
|
+
id: h.key,
|
|
1662
|
+
value: h.value,
|
|
1663
|
+
options: h.options,
|
|
1664
|
+
disabled: h.disabled,
|
|
1665
|
+
class: "dsea-settings-panel__select",
|
|
1666
|
+
onChange: (p) => u(h.key, p)
|
|
1667
|
+
}, null, 8, ["id", "value", "options", "disabled", "onChange"])) : h.type === "number" ? (t(), z(f(tt), {
|
|
1668
|
+
key: 4,
|
|
1669
|
+
id: h.key,
|
|
1670
|
+
value: h.value,
|
|
1671
|
+
min: h.min,
|
|
1672
|
+
max: h.max,
|
|
1673
|
+
step: h.step,
|
|
1674
|
+
disabled: h.disabled,
|
|
1675
|
+
class: "dsea-settings-panel__number",
|
|
1676
|
+
onChange: (p) => i(h.key, p)
|
|
1677
|
+
}, null, 8, ["id", "value", "min", "max", "step", "disabled", "onChange"])) : h.type === "color" ? (t(), l("div", {
|
|
1678
|
+
key: 5,
|
|
1679
|
+
class: "dsea-settings-panel__colors",
|
|
1680
|
+
role: "group",
|
|
1681
|
+
"aria-label": h.label
|
|
1682
|
+
}, [
|
|
1683
|
+
(t(!0), l(F, null, K(h.colors, (p) => (t(), l("button", {
|
|
1684
|
+
key: p,
|
|
1685
|
+
type: "button",
|
|
1686
|
+
class: U(["dsea-settings-panel__swatch", { "dsea-settings-panel__swatch--active": h.value === p }]),
|
|
1687
|
+
style: he({ backgroundColor: p }),
|
|
1688
|
+
"aria-label": p,
|
|
1689
|
+
"aria-pressed": h.value === p,
|
|
1690
|
+
disabled: h.disabled,
|
|
1691
|
+
onClick: (N) => o(h.key, p)
|
|
1692
|
+
}, [
|
|
1693
|
+
h.value === p ? (t(), z(f(L), {
|
|
1694
|
+
key: 0,
|
|
1695
|
+
icon: "lucide:check",
|
|
1696
|
+
size: 14
|
|
1697
|
+
})) : b("", !0)
|
|
1698
|
+
], 14, Ra))), 128))
|
|
1699
|
+
], 8, Da)) : h.type === "mode" ? (t(), l("div", {
|
|
1700
|
+
key: 6,
|
|
1701
|
+
class: "dsea-settings-panel__modes",
|
|
1702
|
+
role: "group",
|
|
1703
|
+
"aria-label": h.label
|
|
1704
|
+
}, [
|
|
1705
|
+
(t(!0), l(F, null, K(h.options, (p) => (t(), l("button", {
|
|
1706
|
+
key: p.value,
|
|
1707
|
+
type: "button",
|
|
1708
|
+
class: U({ active: h.value === p.value }),
|
|
1709
|
+
"aria-pressed": h.value === p.value,
|
|
1710
|
+
disabled: h.disabled,
|
|
1711
|
+
onClick: (N) => o(h.key, p.value)
|
|
1712
|
+
}, [
|
|
1713
|
+
p.icon ? (t(), z(f(L), {
|
|
1714
|
+
key: 0,
|
|
1715
|
+
icon: p.icon,
|
|
1716
|
+
size: 16
|
|
1717
|
+
}, null, 8, ["icon"])) : b("", !0),
|
|
1718
|
+
Q(" " + m(p.label), 1)
|
|
1719
|
+
], 10, Wa))), 128))
|
|
1720
|
+
], 8, Ka)) : b("", !0)
|
|
1721
|
+
], 2))), 128))
|
|
1722
|
+
]))), 128))
|
|
1723
|
+
]));
|
|
1724
|
+
}
|
|
1725
|
+
});
|
|
1726
|
+
const Va = /* @__PURE__ */ P({
|
|
1727
|
+
__name: "AdminSettingsDrawer",
|
|
1728
|
+
props: {
|
|
1729
|
+
open: { type: Boolean },
|
|
1730
|
+
title: {},
|
|
1731
|
+
sections: {},
|
|
1732
|
+
width: { default: 340 },
|
|
1733
|
+
resetLabel: {}
|
|
1734
|
+
},
|
|
1735
|
+
emits: ["update:open", "change", "reset"],
|
|
1736
|
+
setup(e, { emit: d }) {
|
|
1737
|
+
const a = d;
|
|
1738
|
+
return (o, s) => (t(), z(f(at), {
|
|
1739
|
+
visible: e.open,
|
|
1740
|
+
title: e.title,
|
|
1741
|
+
placement: "right",
|
|
1742
|
+
width: e.width,
|
|
1743
|
+
onClose: s[2] || (s[2] = (u) => a("update:open", !1))
|
|
1744
|
+
}, Ge({
|
|
1745
|
+
default: re(() => [
|
|
1746
|
+
x(Oa, {
|
|
1747
|
+
sections: e.sections,
|
|
1748
|
+
onChange: s[0] || (s[0] = (u, i) => a("change", u, i))
|
|
1749
|
+
}, null, 8, ["sections"])
|
|
1750
|
+
]),
|
|
1751
|
+
_: 2
|
|
1752
|
+
}, [
|
|
1753
|
+
o.$slots.footer || e.resetLabel ? {
|
|
1754
|
+
name: "footer",
|
|
1755
|
+
fn: re(() => [
|
|
1756
|
+
T(o.$slots, "footer", {}, () => [
|
|
1757
|
+
r("button", {
|
|
1758
|
+
type: "button",
|
|
1759
|
+
class: "dsea-settings-drawer__reset",
|
|
1760
|
+
onClick: s[1] || (s[1] = (u) => a("reset"))
|
|
1761
|
+
}, m(e.resetLabel), 1)
|
|
1762
|
+
])
|
|
1763
|
+
]),
|
|
1764
|
+
key: "0"
|
|
1765
|
+
} : void 0
|
|
1766
|
+
]), 1032, ["visible", "title", "width"]));
|
|
1444
1767
|
}
|
|
1445
1768
|
});
|
|
1446
|
-
const
|
|
1769
|
+
const ae = {
|
|
1770
|
+
darkMode: "light",
|
|
1771
|
+
themeColor: "#0960bd",
|
|
1772
|
+
grayMode: !1,
|
|
1773
|
+
colorWeak: !1,
|
|
1774
|
+
fullContent: !1,
|
|
1775
|
+
contentMode: "full",
|
|
1776
|
+
showLogo: !0,
|
|
1777
|
+
showFooter: !1,
|
|
1778
|
+
showBreadCrumb: !0,
|
|
1779
|
+
showBreadCrumbIcon: !0,
|
|
1780
|
+
showSettingButton: !0,
|
|
1781
|
+
headerSetting: {
|
|
1782
|
+
show: !0,
|
|
1783
|
+
fixed: !0,
|
|
1784
|
+
theme: "light",
|
|
1785
|
+
bgColor: "#ffffff",
|
|
1786
|
+
showSearch: !0,
|
|
1787
|
+
showNotice: !0,
|
|
1788
|
+
showFullScreen: !0
|
|
1789
|
+
},
|
|
1790
|
+
menuSetting: {
|
|
1791
|
+
type: "mix",
|
|
1792
|
+
mode: "inline",
|
|
1793
|
+
show: !0,
|
|
1794
|
+
hidden: !1,
|
|
1795
|
+
fixed: !0,
|
|
1796
|
+
collapsed: !1,
|
|
1797
|
+
collapsedShowTitle: !1,
|
|
1798
|
+
menuWidth: 240,
|
|
1799
|
+
bgColor: "#212121",
|
|
1800
|
+
theme: "dark",
|
|
1801
|
+
split: !0,
|
|
1802
|
+
topMenuAlign: "center",
|
|
1803
|
+
trigger: "FOOTER",
|
|
1804
|
+
accordion: !0,
|
|
1805
|
+
canDrag: !1,
|
|
1806
|
+
mixSideTrigger: "click",
|
|
1807
|
+
mixSideFixed: !1,
|
|
1808
|
+
closeMixSidebarOnChange: !1
|
|
1809
|
+
},
|
|
1810
|
+
multiTabsSetting: {
|
|
1811
|
+
show: !0,
|
|
1812
|
+
canDrag: !0,
|
|
1813
|
+
showQuick: !0,
|
|
1814
|
+
showRedo: !0,
|
|
1815
|
+
showFold: !0
|
|
1816
|
+
}
|
|
1817
|
+
}, Ua = ["sidebar", "top-menu", "mix", "mix-sidebar"], ye = /^#[0-9a-f]{3}(?:[0-9a-f]{3})?$/i;
|
|
1818
|
+
function ke(e = {}) {
|
|
1819
|
+
const d = {
|
|
1820
|
+
...ae,
|
|
1821
|
+
...e,
|
|
1822
|
+
headerSetting: { ...ae.headerSetting, ...e.headerSetting },
|
|
1823
|
+
menuSetting: { ...ae.menuSetting, ...e.menuSetting },
|
|
1824
|
+
multiTabsSetting: { ...ae.multiTabsSetting, ...e.multiTabsSetting }
|
|
1825
|
+
};
|
|
1826
|
+
return Ua.includes(d.menuSetting.type) || (d.menuSetting.type = "mix"), d.menuSetting.type === "top-menu" ? d.menuSetting.mode = "horizontal" : d.menuSetting.mode = "inline", Number.isFinite(d.menuSetting.menuWidth) || (d.menuSetting.menuWidth = 240), d.menuSetting.menuWidth = Math.max(160, Math.min(420, d.menuSetting.menuWidth)), ye.test(d.themeColor) || (d.themeColor = ae.themeColor), ye.test(d.headerSetting.bgColor) || (d.headerSetting.bgColor = ae.headerSetting.bgColor), ye.test(d.menuSetting.bgColor) || (d.menuSetting.bgColor = ae.menuSetting.bgColor), d;
|
|
1827
|
+
}
|
|
1828
|
+
function qa(e, d = "admin-shell:classic-layout", a = {}) {
|
|
1829
|
+
const o = e == null ? void 0 : e.read(d), s = M(ke({
|
|
1830
|
+
...a,
|
|
1831
|
+
...o,
|
|
1832
|
+
headerSetting: { ...a.headerSetting, ...o == null ? void 0 : o.headerSetting },
|
|
1833
|
+
menuSetting: { ...a.menuSetting, ...o == null ? void 0 : o.menuSetting },
|
|
1834
|
+
multiTabsSetting: { ...a.multiTabsSetting, ...o == null ? void 0 : o.multiTabsSetting }
|
|
1835
|
+
}));
|
|
1836
|
+
function u(n) {
|
|
1837
|
+
return s.value = ke({
|
|
1838
|
+
...s.value,
|
|
1839
|
+
...n,
|
|
1840
|
+
headerSetting: { ...s.value.headerSetting, ...n.headerSetting },
|
|
1841
|
+
menuSetting: { ...s.value.menuSetting, ...n.menuSetting },
|
|
1842
|
+
multiTabsSetting: { ...s.value.multiTabsSetting, ...n.multiTabsSetting }
|
|
1843
|
+
}), e == null || e.write(d, Ye(s.value)), s.value;
|
|
1844
|
+
}
|
|
1845
|
+
function i() {
|
|
1846
|
+
return s.value = ke(a), e == null || e.remove(d), s.value;
|
|
1847
|
+
}
|
|
1848
|
+
return { settings: s, patch: u, reset: i };
|
|
1849
|
+
}
|
|
1850
|
+
function De(e) {
|
|
1851
|
+
var d;
|
|
1852
|
+
if (!(e.disabled || (d = e.meta) != null && d.hideMenu)) {
|
|
1853
|
+
for (const a of e.children ?? []) {
|
|
1854
|
+
const o = De(a);
|
|
1855
|
+
if (o)
|
|
1856
|
+
return o;
|
|
1857
|
+
}
|
|
1858
|
+
return e.path && !/[:*]/.test(e.path) ? e.path : void 0;
|
|
1859
|
+
}
|
|
1860
|
+
}
|
|
1861
|
+
function Ha(e, d, a) {
|
|
1862
|
+
var y;
|
|
1863
|
+
const o = e.filter((h) => {
|
|
1864
|
+
var p;
|
|
1865
|
+
return !((p = h.meta) != null && p.hideMenu);
|
|
1866
|
+
}), s = ue(o, d)[0] ?? ((y = o[0]) == null ? void 0 : y.path), u = o.find((h) => h.path === s), i = a.type === "mix" && a.split, n = a.type === "top-menu" || i ? o.map((h) => ({ ...h, children: [] })) : [], c = i ? (u == null ? void 0 : u.children) ?? [] : o;
|
|
1867
|
+
return { rootPath: s, root: u, top: n, sidebar: c, split: i };
|
|
1868
|
+
}
|
|
1869
|
+
const ja = {
|
|
1870
|
+
key: 0,
|
|
1871
|
+
class: "dsea-classic-layout__header"
|
|
1872
|
+
}, Qa = { class: "dsea-classic-layout__header-left" }, Xa = {
|
|
1873
|
+
key: 0,
|
|
1874
|
+
class: "dsea-classic-layout__header-brand"
|
|
1875
|
+
}, Ga = ["aria-label", "aria-expanded"], Ya = ["aria-label"], Ja = { class: "dsea-classic-layout__header-actions" }, Za = ["aria-label", "title"], en = { class: "dsea-classic-layout__body" }, tn = ["aria-hidden", "inert"], an = { class: "dsea-classic-layout__rail" }, nn = {
|
|
1876
|
+
key: 0,
|
|
1877
|
+
class: "dsea-classic-layout__sidebar-brand"
|
|
1878
|
+
}, ln = ["title", "onClick", "onMouseenter"], on = { key: 1 }, sn = ["aria-label"], rn = { class: "dsea-classic-layout__mix-panel-header" }, un = ["aria-label", "aria-pressed"], dn = {
|
|
1879
|
+
key: 0,
|
|
1880
|
+
class: "dsea-classic-layout__sidebar-brand"
|
|
1881
|
+
}, cn = ["aria-label"], mn = ["aria-label"], vn = ["aria-label", "aria-valuenow"], gn = ["aria-label"], bn = { class: "dsea-classic-layout__workspace" }, hn = {
|
|
1882
|
+
key: 0,
|
|
1883
|
+
class: "dsea-classic-layout__tabs"
|
|
1884
|
+
}, pn = {
|
|
1885
|
+
key: 1,
|
|
1886
|
+
class: "dsea-classic-layout__footer"
|
|
1887
|
+
}, fn = ["aria-label", "title"], yn = { class: "dsea-classic-layout__content dsea-classic-layout__content--full" }, wo = /* @__PURE__ */ P({
|
|
1888
|
+
__name: "ClassicAdminLayout",
|
|
1889
|
+
props: {
|
|
1890
|
+
menus: {},
|
|
1891
|
+
tabs: { default: () => [] },
|
|
1892
|
+
activeTab: { default: "" },
|
|
1893
|
+
breadcrumbs: { default: () => [] },
|
|
1894
|
+
headerPorts: {},
|
|
1895
|
+
initialSettings: { default: () => ({}) },
|
|
1896
|
+
settingsCache: {},
|
|
1897
|
+
settingsKey: { default: "admin-shell:classic-layout" },
|
|
1898
|
+
mobileBreakpoint: { default: 992 },
|
|
1899
|
+
tabLabels: { default: () => ({
|
|
1900
|
+
refresh: "Refresh",
|
|
1901
|
+
actions: "Tab actions",
|
|
1902
|
+
close: "Close",
|
|
1903
|
+
closeLeft: "Close left",
|
|
1904
|
+
closeRight: "Close right",
|
|
1905
|
+
closeOthers: "Close others",
|
|
1906
|
+
closeAll: "Close all"
|
|
1907
|
+
}) }
|
|
1908
|
+
},
|
|
1909
|
+
emits: ["settingsChange", "menuClick", "tabSelect", "tabClose", "tabRefresh", "tabCloseAction", "tabReorder"],
|
|
1910
|
+
setup(e, { emit: d }) {
|
|
1911
|
+
var xe;
|
|
1912
|
+
const a = e, o = d, { ports: s } = te(), u = Se(), i = qa(a.settingsCache ?? s.cache, a.settingsKey, a.initialSettings), n = i.settings, c = M(!1), y = M(!1), h = M(!1), p = M(((xe = u.currentRoute.value.meta) == null ? void 0 : xe.currentActiveMenu) || u.currentRoute.value.path), N = M(""), A = M(n.value.menuSetting.mixSideFixed), O = E(() => n.value.menuSetting.type), D = E(() => Ha(a.menus, p.value, n.value.menuSetting)), j = E(() => a.menus.find((g) => g.path === N.value)), $ = E(() => {
|
|
1913
|
+
var g;
|
|
1914
|
+
return ((g = j.value) == null ? void 0 : g.children) ?? [];
|
|
1915
|
+
}), v = E(() => c.value ? a.menus : D.value.sidebar), k = E(() => n.value.menuSetting.show && !n.value.menuSetting.hidden && (c.value || O.value !== "top-menu" && (O.value !== "mix" || !D.value.split || D.value.sidebar.length > 0))), C = E(() => n.value.headerSetting.show && !n.value.fullContent), B = E(() => [
|
|
1916
|
+
`dsea-classic-layout--${O.value}`,
|
|
1917
|
+
{
|
|
1918
|
+
"is-mobile": c.value,
|
|
1919
|
+
"is-collapsed": n.value.menuSetting.collapsed,
|
|
1920
|
+
"is-full-content": n.value.fullContent,
|
|
1921
|
+
"has-fixed-header": n.value.headerSetting.fixed,
|
|
1922
|
+
"has-sidebar": k.value,
|
|
1923
|
+
"has-header": C.value,
|
|
1924
|
+
"has-pinned-mix": O.value === "mix-sidebar" && n.value.menuSetting.mixSideFixed && A.value
|
|
1925
|
+
}
|
|
1926
|
+
]), V = E(() => ({
|
|
1927
|
+
"--classic-header-height": C.value ? "48px" : "0px",
|
|
1928
|
+
"--classic-menu-width": `${n.value.menuSetting.menuWidth}px`,
|
|
1929
|
+
"--classic-side-width": `${n.value.menuSetting.collapsed ? n.value.menuSetting.collapsedShowTitle ? 80 : 48 : n.value.menuSetting.menuWidth}px`,
|
|
1930
|
+
"--classic-rail-width": `${n.value.menuSetting.collapsed ? 48 : 80}px`,
|
|
1931
|
+
"--classic-header-bg": n.value.headerSetting.bgColor,
|
|
1932
|
+
"--classic-sider-bg": n.value.menuSetting.bgColor,
|
|
1933
|
+
"--classic-primary": n.value.themeColor
|
|
1934
|
+
}));
|
|
1935
|
+
function G(g) {
|
|
1936
|
+
return s.locale.translate(g);
|
|
1937
|
+
}
|
|
1938
|
+
function de(g, w) {
|
|
1939
|
+
const S = ue(g, w);
|
|
1940
|
+
function _(I, R) {
|
|
1941
|
+
for (const q of I) {
|
|
1942
|
+
if (q.path === R)
|
|
1943
|
+
return q;
|
|
1944
|
+
const Le = _(q.children ?? [], R);
|
|
1945
|
+
if (Le)
|
|
1946
|
+
return Le;
|
|
1947
|
+
}
|
|
1948
|
+
}
|
|
1949
|
+
return S.map((I) => {
|
|
1950
|
+
const R = _(g, I);
|
|
1951
|
+
return { title: G((R == null ? void 0 : R.name) ?? I), path: I };
|
|
1952
|
+
});
|
|
1953
|
+
}
|
|
1954
|
+
const ce = E(() => a.breadcrumbs.length ? a.breadcrumbs : de(a.menus, p.value)), H = E(() => s.locale.getLocale().toLowerCase().startsWith("zh") ? {
|
|
1955
|
+
navigation: "侧边导航",
|
|
1956
|
+
topNavigation: "顶部导航",
|
|
1957
|
+
toggleNavigation: "折叠导航",
|
|
1958
|
+
closeNavigation: "关闭导航",
|
|
1959
|
+
resizeNavigation: "调整导航宽度",
|
|
1960
|
+
pinNavigation: "固定菜单",
|
|
1961
|
+
breadcrumb: "面包屑",
|
|
1962
|
+
settings: "偏好设置",
|
|
1963
|
+
reset: "恢复默认",
|
|
1964
|
+
restoreLayout: "退出全屏内容"
|
|
1965
|
+
} : {
|
|
1966
|
+
navigation: "Navigation",
|
|
1967
|
+
topNavigation: "Top navigation",
|
|
1968
|
+
toggleNavigation: "Toggle navigation",
|
|
1969
|
+
closeNavigation: "Close navigation",
|
|
1970
|
+
resizeNavigation: "Resize navigation",
|
|
1971
|
+
pinNavigation: "Pin menu",
|
|
1972
|
+
breadcrumb: "Breadcrumb",
|
|
1973
|
+
settings: "Settings",
|
|
1974
|
+
reset: "Reset defaults",
|
|
1975
|
+
restoreLayout: "Restore layout"
|
|
1976
|
+
}), Re = E(() => {
|
|
1977
|
+
const g = n.value, w = s.locale.getLocale().toLowerCase().startsWith("zh"), S = (_, I) => w ? _ : I;
|
|
1978
|
+
return [
|
|
1979
|
+
{ title: S("布局", "Layout"), items: [
|
|
1980
|
+
{
|
|
1981
|
+
key: "menuSetting.type",
|
|
1982
|
+
type: "mode",
|
|
1983
|
+
label: S("导航布局", "Navigation layout"),
|
|
1984
|
+
value: g.menuSetting.type,
|
|
1985
|
+
options: [
|
|
1986
|
+
{ value: "sidebar", label: S("左侧", "Sidebar"), icon: "lucide:panel-left" },
|
|
1987
|
+
{ value: "mix", label: S("混合", "Mixed"), icon: "lucide:panels-top-left" },
|
|
1988
|
+
{ value: "mix-sidebar", label: S("双栏", "Rail"), icon: "lucide:panel-left-dashed" },
|
|
1989
|
+
{ value: "top-menu", label: S("顶部", "Top"), icon: "lucide:panel-top" }
|
|
1990
|
+
]
|
|
1991
|
+
},
|
|
1992
|
+
{
|
|
1993
|
+
key: "menuSetting.split",
|
|
1994
|
+
type: "switch",
|
|
1995
|
+
label: S("分割菜单", "Split menu"),
|
|
1996
|
+
value: g.menuSetting.split,
|
|
1997
|
+
disabled: g.menuSetting.type !== "mix"
|
|
1998
|
+
},
|
|
1999
|
+
{ key: "menuSetting.collapsed", type: "switch", label: S("折叠侧栏", "Collapse sidebar"), value: g.menuSetting.collapsed },
|
|
2000
|
+
{ key: "menuSetting.fixed", type: "switch", label: S("固定侧栏", "Fixed sidebar"), value: g.menuSetting.fixed },
|
|
2001
|
+
{
|
|
2002
|
+
key: "menuSetting.menuWidth",
|
|
2003
|
+
type: "number",
|
|
2004
|
+
label: S("侧栏宽度", "Sidebar width"),
|
|
2005
|
+
value: g.menuSetting.menuWidth,
|
|
2006
|
+
min: 160,
|
|
2007
|
+
max: 420,
|
|
2008
|
+
step: 8
|
|
2009
|
+
},
|
|
2010
|
+
{
|
|
2011
|
+
key: "menuSetting.topMenuAlign",
|
|
2012
|
+
type: "select",
|
|
2013
|
+
label: S("顶部菜单对齐", "Top menu alignment"),
|
|
2014
|
+
value: g.menuSetting.topMenuAlign,
|
|
2015
|
+
options: [
|
|
2016
|
+
{ value: "start", label: S("左", "Start") },
|
|
2017
|
+
{ value: "center", label: S("中", "Center") },
|
|
2018
|
+
{ value: "end", label: S("右", "End") }
|
|
2019
|
+
]
|
|
2020
|
+
},
|
|
2021
|
+
{
|
|
2022
|
+
key: "menuSetting.mixSideFixed",
|
|
2023
|
+
type: "switch",
|
|
2024
|
+
label: S("固定双栏菜单", "Pin rail menu"),
|
|
2025
|
+
value: g.menuSetting.mixSideFixed,
|
|
2026
|
+
disabled: g.menuSetting.type !== "mix-sidebar"
|
|
2027
|
+
},
|
|
2028
|
+
{
|
|
2029
|
+
key: "menuSetting.mixSideTrigger",
|
|
2030
|
+
type: "select",
|
|
2031
|
+
label: S("双栏触发", "Rail trigger"),
|
|
2032
|
+
value: g.menuSetting.mixSideTrigger,
|
|
2033
|
+
options: [{ value: "click", label: S("点击", "Click") }, { value: "hover", label: S("悬停", "Hover") }],
|
|
2034
|
+
disabled: g.menuSetting.type !== "mix-sidebar"
|
|
2035
|
+
}
|
|
2036
|
+
] },
|
|
2037
|
+
{ title: S("外观", "Appearance"), items: [
|
|
2038
|
+
{
|
|
2039
|
+
key: "themeColor",
|
|
2040
|
+
type: "color",
|
|
2041
|
+
label: S("主题色", "Primary color"),
|
|
2042
|
+
value: g.themeColor,
|
|
2043
|
+
colors: ["#0960bd", "#0084f4", "#009688", "#536dfe", "#ff5c93", "#ee4f12", "#0096c7", "#9c27b0", "#ff9800"]
|
|
2044
|
+
},
|
|
2045
|
+
{
|
|
2046
|
+
key: "headerSetting.bgColor",
|
|
2047
|
+
type: "color",
|
|
2048
|
+
label: S("顶栏颜色", "Header color"),
|
|
2049
|
+
value: g.headerSetting.bgColor,
|
|
2050
|
+
colors: ["#ffffff", "#151515", "#009688", "#5172dc", "#018ffb", "#409eff", "#e74c3c", "#24292e", "#394664", "#001529"]
|
|
2051
|
+
},
|
|
2052
|
+
{
|
|
2053
|
+
key: "menuSetting.bgColor",
|
|
2054
|
+
type: "color",
|
|
2055
|
+
label: S("侧栏颜色", "Sidebar color"),
|
|
2056
|
+
value: g.menuSetting.bgColor,
|
|
2057
|
+
colors: ["#001529", "#212121", "#273352", "#ffffff", "#191b24", "#304156", "#28333e", "#344058"]
|
|
2058
|
+
},
|
|
2059
|
+
{ key: "darkMode", type: "switch", label: S("深色模式", "Dark mode"), value: g.darkMode === "dark" },
|
|
2060
|
+
{ key: "grayMode", type: "switch", label: S("灰度模式", "Grayscale"), value: g.grayMode },
|
|
2061
|
+
{ key: "colorWeak", type: "switch", label: S("色弱模式", "Color assist"), value: g.colorWeak }
|
|
2062
|
+
] },
|
|
2063
|
+
{ title: S("界面", "Interface"), items: [
|
|
2064
|
+
{ key: "headerSetting.show", type: "switch", label: S("显示顶栏", "Show header"), value: g.headerSetting.show },
|
|
2065
|
+
{ key: "headerSetting.fixed", type: "switch", label: S("固定顶栏", "Fixed header"), value: g.headerSetting.fixed },
|
|
2066
|
+
{ key: "headerSetting.showSearch", type: "switch", label: S("菜单搜索", "Menu search"), value: g.headerSetting.showSearch },
|
|
2067
|
+
{ key: "multiTabsSetting.show", type: "switch", label: S("显示标签页", "Show tabs"), value: g.multiTabsSetting.show },
|
|
2068
|
+
{ key: "multiTabsSetting.showQuick", type: "switch", label: S("标签快捷操作", "Tab actions"), value: g.multiTabsSetting.showQuick },
|
|
2069
|
+
{ key: "multiTabsSetting.showRedo", type: "switch", label: S("标签刷新", "Tab refresh"), value: g.multiTabsSetting.showRedo },
|
|
2070
|
+
{ key: "multiTabsSetting.showFold", type: "switch", label: S("内容全屏", "Content fullscreen"), value: g.multiTabsSetting.showFold },
|
|
2071
|
+
{ key: "showBreadCrumb", type: "switch", label: S("面包屑", "Breadcrumb"), value: g.showBreadCrumb },
|
|
2072
|
+
{ key: "showFooter", type: "switch", label: S("页脚", "Footer"), value: g.showFooter },
|
|
2073
|
+
{
|
|
2074
|
+
key: "contentMode",
|
|
2075
|
+
type: "select",
|
|
2076
|
+
label: S("内容宽度", "Content width"),
|
|
2077
|
+
value: g.contentMode,
|
|
2078
|
+
options: [{ value: "full", label: S("流式", "Fluid") }, { value: "fixed", label: S("固定", "Fixed") }]
|
|
2079
|
+
}
|
|
2080
|
+
] }
|
|
2081
|
+
];
|
|
2082
|
+
});
|
|
2083
|
+
function se(g, w) {
|
|
2084
|
+
if (g === "darkMode") {
|
|
2085
|
+
o("settingsChange", i.patch({ darkMode: w ? "dark" : "light" }));
|
|
2086
|
+
return;
|
|
2087
|
+
}
|
|
2088
|
+
const [S, _] = g.split(".");
|
|
2089
|
+
if (S === "menuSetting" || S === "headerSetting" || S === "multiTabsSetting") {
|
|
2090
|
+
const I = { [S]: { [_]: w } };
|
|
2091
|
+
g === "menuSetting.bgColor" && (I.menuSetting.theme = w === "#ffffff" ? "light" : "dark"), g === "headerSetting.bgColor" && (I.headerSetting.theme = w === "#ffffff" ? "light" : "dark"), o("settingsChange", i.patch(I));
|
|
2092
|
+
} else
|
|
2093
|
+
o("settingsChange", i.patch({ [g]: w }));
|
|
2094
|
+
g === "menuSetting.mixSideFixed" && (A.value = !!w);
|
|
2095
|
+
}
|
|
2096
|
+
function Ke() {
|
|
2097
|
+
o("settingsChange", i.reset());
|
|
2098
|
+
}
|
|
2099
|
+
function pe() {
|
|
2100
|
+
c.value ? y.value = !y.value : se("menuSetting.collapsed", !n.value.menuSetting.collapsed);
|
|
2101
|
+
}
|
|
2102
|
+
function _e() {
|
|
2103
|
+
o("settingsChange", i.patch({ fullContent: !n.value.fullContent }));
|
|
2104
|
+
}
|
|
2105
|
+
function me(g) {
|
|
2106
|
+
o("menuClick", g), y.value = !1, n.value.menuSetting.closeMixSidebarOnChange && !n.value.menuSetting.mixSideFixed && (A.value = !1), s.navigation.go(g);
|
|
2107
|
+
}
|
|
2108
|
+
function We(g) {
|
|
2109
|
+
const w = a.menus.find((_) => _.path === g), S = w ? De(w) : g;
|
|
2110
|
+
S && me(S);
|
|
2111
|
+
}
|
|
2112
|
+
function Oe(g) {
|
|
2113
|
+
var w;
|
|
2114
|
+
if (!((w = g.children) != null && w.length))
|
|
2115
|
+
return me(g.path);
|
|
2116
|
+
N.value === g.path && !n.value.menuSetting.mixSideFixed ? A.value = !A.value : A.value = !0, N.value = g.path;
|
|
2117
|
+
}
|
|
2118
|
+
function Ve(g) {
|
|
2119
|
+
var w;
|
|
2120
|
+
n.value.menuSetting.mixSideTrigger === "hover" && ((w = g.children) != null && w.length) && (N.value = g.path, A.value = !0);
|
|
2121
|
+
}
|
|
2122
|
+
function Ue(g, w) {
|
|
2123
|
+
o("tabCloseAction", g, w);
|
|
2124
|
+
}
|
|
2125
|
+
function fe() {
|
|
2126
|
+
c.value = window.innerWidth < a.mobileBreakpoint, y.value = !1;
|
|
2127
|
+
}
|
|
2128
|
+
function $e(g) {
|
|
2129
|
+
g.key === "Escape" && (y.value = !1, n.value.menuSetting.mixSideFixed || (A.value = !1));
|
|
2130
|
+
}
|
|
2131
|
+
let X;
|
|
2132
|
+
function qe(g) {
|
|
2133
|
+
if (g.button !== 0)
|
|
2134
|
+
return;
|
|
2135
|
+
X == null || X();
|
|
2136
|
+
const w = g.clientX, S = n.value.menuSetting.menuWidth, _ = (R) => se("menuSetting.menuWidth", S + R.clientX - w), I = () => X == null ? void 0 : X();
|
|
2137
|
+
window.addEventListener("pointermove", _), window.addEventListener("pointerup", I), window.addEventListener("pointercancel", I), X = () => {
|
|
2138
|
+
window.removeEventListener("pointermove", _), window.removeEventListener("pointerup", I), window.removeEventListener("pointercancel", I), X = void 0;
|
|
2139
|
+
};
|
|
2140
|
+
}
|
|
2141
|
+
function He(g) {
|
|
2142
|
+
g.key !== "ArrowLeft" && g.key !== "ArrowRight" || (g.preventDefault(), se("menuSetting.menuWidth", n.value.menuSetting.menuWidth + (g.key === "ArrowRight" ? 10 : -10)));
|
|
2143
|
+
}
|
|
2144
|
+
function Ce() {
|
|
2145
|
+
typeof document < "u" && nt({
|
|
2146
|
+
theme: n.value.darkMode,
|
|
2147
|
+
grayMode: n.value.grayMode,
|
|
2148
|
+
colorWeak: n.value.colorWeak,
|
|
2149
|
+
primaryColor: n.value.themeColor
|
|
2150
|
+
}, document.documentElement);
|
|
2151
|
+
}
|
|
2152
|
+
Z(n, Ce, { deep: !0 }), Z(D, (g) => {
|
|
2153
|
+
g.rootPath && (N.value = g.rootPath);
|
|
2154
|
+
}, { immediate: !0 });
|
|
2155
|
+
const je = u.onRouteChange((g) => {
|
|
2156
|
+
var w;
|
|
2157
|
+
p.value = ((w = g.meta) == null ? void 0 : w.currentActiveMenu) || g.path, n.value.menuSetting.closeMixSidebarOnChange && !n.value.menuSetting.mixSideFixed && (A.value = !1);
|
|
2158
|
+
});
|
|
2159
|
+
return ie(() => {
|
|
2160
|
+
fe(), Ce(), window.addEventListener("resize", fe), window.addEventListener("keydown", $e);
|
|
2161
|
+
}), ne(() => {
|
|
2162
|
+
je(), X == null || X(), window.removeEventListener("resize", fe), window.removeEventListener("keydown", $e);
|
|
2163
|
+
}), (g, w) => {
|
|
2164
|
+
var S;
|
|
2165
|
+
return t(), l("div", {
|
|
2166
|
+
class: U(["dsea-classic-layout", B.value]),
|
|
2167
|
+
style: he(V.value)
|
|
2168
|
+
}, [
|
|
2169
|
+
f(n).fullContent ? (t(), l(F, { key: 1 }, [
|
|
2170
|
+
r("button", {
|
|
2171
|
+
type: "button",
|
|
2172
|
+
class: "dsea-classic-layout__restore",
|
|
2173
|
+
"aria-label": H.value.restoreLayout,
|
|
2174
|
+
title: H.value.restoreLayout,
|
|
2175
|
+
onClick: _e
|
|
2176
|
+
}, [
|
|
2177
|
+
x(f(L), {
|
|
2178
|
+
icon: "lucide:minimize",
|
|
2179
|
+
size: 18
|
|
2180
|
+
})
|
|
2181
|
+
], 8, fn),
|
|
2182
|
+
r("main", yn, [
|
|
2183
|
+
T(g.$slots, "default")
|
|
2184
|
+
])
|
|
2185
|
+
], 64)) : (t(), l(F, { key: 0 }, [
|
|
2186
|
+
f(n).headerSetting.show ? (t(), l("header", ja, [
|
|
2187
|
+
r("div", Qa, [
|
|
2188
|
+
f(n).showLogo && (O.value !== "sidebar" || c.value) ? (t(), l("div", Xa, [
|
|
2189
|
+
T(g.$slots, "brand", {}, () => [
|
|
2190
|
+
x(ve)
|
|
2191
|
+
])
|
|
2192
|
+
])) : b("", !0),
|
|
2193
|
+
c.value || f(n).menuSetting.trigger === "HEADER" && k.value ? (t(), l("button", {
|
|
2194
|
+
key: 1,
|
|
2195
|
+
type: "button",
|
|
2196
|
+
class: "dsea-classic-layout__icon-button",
|
|
2197
|
+
"aria-label": H.value.toggleNavigation,
|
|
2198
|
+
"aria-expanded": c.value ? y.value : !f(n).menuSetting.collapsed,
|
|
2199
|
+
onClick: pe
|
|
2200
|
+
}, [
|
|
2201
|
+
x(f(L), {
|
|
2202
|
+
icon: c.value && y.value ? "lucide:x" : "lucide:menu",
|
|
2203
|
+
size: 19
|
|
2204
|
+
}, null, 8, ["icon"])
|
|
2205
|
+
], 8, Ga)) : b("", !0),
|
|
2206
|
+
!c.value && f(n).showBreadCrumb && !D.value.split && O.value !== "top-menu" ? (t(), z(_a, {
|
|
2207
|
+
key: 2,
|
|
2208
|
+
items: ce.value,
|
|
2209
|
+
label: H.value.breadcrumb
|
|
2210
|
+
}, null, 8, ["items", "label"])) : b("", !0)
|
|
2211
|
+
]),
|
|
2212
|
+
!c.value && D.value.top.length ? (t(), l("nav", {
|
|
2213
|
+
key: 0,
|
|
2214
|
+
class: "dsea-classic-layout__top-menu",
|
|
2215
|
+
"aria-label": H.value.topNavigation
|
|
2216
|
+
}, [
|
|
2217
|
+
x(oe, {
|
|
2218
|
+
items: D.value.top,
|
|
2219
|
+
mode: "horizontal",
|
|
2220
|
+
type: "top",
|
|
2221
|
+
"is-horizontal": "",
|
|
2222
|
+
theme: f(n).headerSetting.theme,
|
|
2223
|
+
split: D.value.split,
|
|
2224
|
+
"top-menu-align": f(n).menuSetting.topMenuAlign,
|
|
2225
|
+
onMenuClick: We
|
|
2226
|
+
}, null, 8, ["items", "theme", "split", "top-menu-align"])
|
|
2227
|
+
], 8, Ya)) : b("", !0),
|
|
2228
|
+
r("div", Ja, [
|
|
2229
|
+
T(g.$slots, "search", {}, () => [
|
|
2230
|
+
f(n).headerSetting.showSearch && !c.value ? (t(), z(zt, {
|
|
2231
|
+
key: 0,
|
|
2232
|
+
"menu-items": e.menus
|
|
2233
|
+
}, null, 8, ["menu-items"])) : b("", !0)
|
|
2234
|
+
]),
|
|
2235
|
+
T(g.$slots, "apps", {}, () => {
|
|
2236
|
+
var _;
|
|
2237
|
+
return [
|
|
2238
|
+
(_ = e.headerPorts) != null && _.apps && !c.value ? (t(), z(Mt, {
|
|
2239
|
+
key: 0,
|
|
2240
|
+
apps: e.headerPorts.apps.apps,
|
|
2241
|
+
"current-id": e.headerPorts.apps.currentId,
|
|
2242
|
+
loading: e.headerPorts.apps.loading,
|
|
2243
|
+
"confirm-switch": e.headerPorts.apps.confirmSwitch,
|
|
2244
|
+
onOpen: w[0] || (w[0] = (I) => {
|
|
2245
|
+
var R, q;
|
|
2246
|
+
return (q = (R = e.headerPorts.apps).onOpen) == null ? void 0 : q.call(R);
|
|
2247
|
+
}),
|
|
2248
|
+
onSwitch: w[1] || (w[1] = (I) => {
|
|
2249
|
+
var R, q;
|
|
2250
|
+
return (q = (R = e.headerPorts.apps).onSwitch) == null ? void 0 : q.call(R, I);
|
|
2251
|
+
})
|
|
2252
|
+
}, null, 8, ["apps", "current-id", "loading", "confirm-switch"])) : b("", !0)
|
|
2253
|
+
];
|
|
2254
|
+
}),
|
|
2255
|
+
T(g.$slots, "notifications", {}, () => {
|
|
2256
|
+
var _;
|
|
2257
|
+
return [
|
|
2258
|
+
(_ = e.headerPorts) != null && _.notifications && f(n).headerSetting.showNotice && !c.value ? (t(), z(na, {
|
|
2259
|
+
key: 0,
|
|
2260
|
+
items: e.headerPorts.notifications.items,
|
|
2261
|
+
categories: e.headerPorts.notifications.categories,
|
|
2262
|
+
onOpen: w[2] || (w[2] = (I) => {
|
|
2263
|
+
var R, q;
|
|
2264
|
+
return (q = (R = e.headerPorts.notifications).onOpen) == null ? void 0 : q.call(R, I);
|
|
2265
|
+
}),
|
|
2266
|
+
onMarkAllRead: w[3] || (w[3] = (I) => {
|
|
2267
|
+
var R, q;
|
|
2268
|
+
return (q = (R = e.headerPorts.notifications).onMarkAllRead) == null ? void 0 : q.call(R);
|
|
2269
|
+
})
|
|
2270
|
+
}, null, 8, ["items", "categories"])) : b("", !0)
|
|
2271
|
+
];
|
|
2272
|
+
}),
|
|
2273
|
+
T(g.$slots, "fullscreen", {}, () => [
|
|
2274
|
+
f(n).headerSetting.showFullScreen && !c.value ? (t(), z(vt, { key: 0 })) : b("", !0)
|
|
2275
|
+
]),
|
|
2276
|
+
T(g.$slots, "locale", {}, () => {
|
|
2277
|
+
var _, I;
|
|
2278
|
+
return [
|
|
2279
|
+
(I = (_ = e.headerPorts) == null ? void 0 : _.locales) != null && I.length ? (t(), z(rt, {
|
|
2280
|
+
key: 0,
|
|
2281
|
+
locales: e.headerPorts.locales,
|
|
2282
|
+
"show-text": !1
|
|
2283
|
+
}, null, 8, ["locales"])) : b("", !0)
|
|
2284
|
+
];
|
|
2285
|
+
}),
|
|
2286
|
+
T(g.$slots, "help"),
|
|
2287
|
+
T(g.$slots, "user", {}, () => {
|
|
2288
|
+
var _;
|
|
2289
|
+
return [
|
|
2290
|
+
(_ = e.headerPorts) != null && _.user ? (t(), z(qt, {
|
|
2291
|
+
key: 0,
|
|
2292
|
+
name: e.headerPorts.user.name,
|
|
2293
|
+
avatar: e.headerPorts.user.avatar,
|
|
2294
|
+
items: e.headerPorts.user.items,
|
|
2295
|
+
onSelect: w[4] || (w[4] = (I) => {
|
|
2296
|
+
var R, q;
|
|
2297
|
+
return (q = (R = e.headerPorts.user).onSelect) == null ? void 0 : q.call(R, I);
|
|
2298
|
+
})
|
|
2299
|
+
}, null, 8, ["name", "avatar", "items"])) : b("", !0)
|
|
2300
|
+
];
|
|
2301
|
+
}),
|
|
2302
|
+
T(g.$slots, "headerActions"),
|
|
2303
|
+
f(n).showSettingButton ? (t(), l("button", {
|
|
2304
|
+
key: 0,
|
|
2305
|
+
type: "button",
|
|
2306
|
+
class: "dsea-classic-layout__icon-button",
|
|
2307
|
+
"aria-label": H.value.settings,
|
|
2308
|
+
title: H.value.settings,
|
|
2309
|
+
onClick: w[5] || (w[5] = (_) => h.value = !0)
|
|
2310
|
+
}, [
|
|
2311
|
+
x(f(L), {
|
|
2312
|
+
icon: "lucide:settings",
|
|
2313
|
+
size: 18
|
|
2314
|
+
})
|
|
2315
|
+
], 8, Za)) : b("", !0)
|
|
2316
|
+
])
|
|
2317
|
+
])) : b("", !0),
|
|
2318
|
+
r("div", en, [
|
|
2319
|
+
k.value ? (t(), l("aside", {
|
|
2320
|
+
key: 0,
|
|
2321
|
+
class: U(["dsea-classic-layout__sidebar", { "is-open": y.value, "is-fixed": f(n).menuSetting.fixed }]),
|
|
2322
|
+
"aria-hidden": c.value && !y.value,
|
|
2323
|
+
inert: c.value && !y.value
|
|
2324
|
+
}, [
|
|
2325
|
+
O.value === "mix-sidebar" && !c.value ? (t(), l(F, { key: 0 }, [
|
|
2326
|
+
r("div", an, [
|
|
2327
|
+
f(n).showLogo ? (t(), l("div", nn, [
|
|
2328
|
+
T(g.$slots, "brand", {}, () => [
|
|
2329
|
+
x(ve, { "show-title": !1 })
|
|
2330
|
+
])
|
|
2331
|
+
])) : b("", !0),
|
|
2332
|
+
(t(!0), l(F, null, K(e.menus, (_) => (t(), l("button", {
|
|
2333
|
+
key: _.path,
|
|
2334
|
+
type: "button",
|
|
2335
|
+
class: U(["dsea-classic-layout__module", { "is-active": _.path === N.value }]),
|
|
2336
|
+
title: _.name,
|
|
2337
|
+
onClick: (I) => Oe(_),
|
|
2338
|
+
onMouseenter: (I) => Ve(_)
|
|
2339
|
+
}, [
|
|
2340
|
+
_.icon ? (t(), z(f(L), {
|
|
2341
|
+
key: 0,
|
|
2342
|
+
icon: _.icon,
|
|
2343
|
+
size: f(n).menuSetting.collapsed ? 16 : 20
|
|
2344
|
+
}, null, 8, ["icon", "size"])) : b("", !0),
|
|
2345
|
+
f(n).menuSetting.collapsed ? b("", !0) : (t(), l("span", on, m(G(_.name)), 1))
|
|
2346
|
+
], 42, ln))), 128)),
|
|
2347
|
+
r("button", {
|
|
2348
|
+
type: "button",
|
|
2349
|
+
class: "dsea-classic-layout__rail-trigger",
|
|
2350
|
+
"aria-label": H.value.toggleNavigation,
|
|
2351
|
+
onClick: pe
|
|
2352
|
+
}, [
|
|
2353
|
+
x(f(L), {
|
|
2354
|
+
icon: f(n).menuSetting.collapsed ? "lucide:panel-left-open" : "lucide:panel-left-close",
|
|
2355
|
+
size: 16
|
|
2356
|
+
}, null, 8, ["icon"])
|
|
2357
|
+
], 8, sn)
|
|
2358
|
+
]),
|
|
2359
|
+
A.value && $.value.length ? (t(), l("div", {
|
|
2360
|
+
key: 0,
|
|
2361
|
+
class: U(["dsea-classic-layout__mix-panel", { "is-floating": !f(n).menuSetting.mixSideFixed }])
|
|
2362
|
+
}, [
|
|
2363
|
+
r("div", rn, [
|
|
2364
|
+
r("span", null, m(G(((S = j.value) == null ? void 0 : S.name) || "")), 1),
|
|
2365
|
+
r("button", {
|
|
2366
|
+
type: "button",
|
|
2367
|
+
"aria-label": H.value.pinNavigation,
|
|
2368
|
+
"aria-pressed": f(n).menuSetting.mixSideFixed,
|
|
2369
|
+
onClick: w[6] || (w[6] = (_) => se("menuSetting.mixSideFixed", !f(n).menuSetting.mixSideFixed))
|
|
2370
|
+
}, [
|
|
2371
|
+
x(f(L), {
|
|
2372
|
+
icon: f(n).menuSetting.mixSideFixed ? "lucide:pin-off" : "lucide:pin",
|
|
2373
|
+
size: 16
|
|
2374
|
+
}, null, 8, ["icon"])
|
|
2375
|
+
], 8, un)
|
|
2376
|
+
]),
|
|
2377
|
+
x(oe, {
|
|
2378
|
+
items: $.value,
|
|
2379
|
+
theme: f(n).menuSetting.theme,
|
|
2380
|
+
accordion: f(n).menuSetting.accordion,
|
|
2381
|
+
split: !1,
|
|
2382
|
+
onMenuClick: me
|
|
2383
|
+
}, null, 8, ["items", "theme", "accordion"])
|
|
2384
|
+
], 2)) : b("", !0)
|
|
2385
|
+
], 64)) : (t(), l(F, { key: 1 }, [
|
|
2386
|
+
f(n).showLogo && (O.value === "sidebar" || c.value) ? (t(), l("div", dn, [
|
|
2387
|
+
T(g.$slots, "brand", {}, () => [
|
|
2388
|
+
x(ve, {
|
|
2389
|
+
"show-title": !f(n).menuSetting.collapsed || c.value
|
|
2390
|
+
}, null, 8, ["show-title"])
|
|
2391
|
+
])
|
|
2392
|
+
])) : b("", !0),
|
|
2393
|
+
r("nav", {
|
|
2394
|
+
class: "dsea-classic-layout__side-menu",
|
|
2395
|
+
"aria-label": H.value.navigation
|
|
2396
|
+
}, [
|
|
2397
|
+
T(g.$slots, "navigation", { items: v.value }, () => [
|
|
2398
|
+
x(oe, {
|
|
2399
|
+
items: v.value,
|
|
2400
|
+
collapse: f(n).menuSetting.collapsed && !c.value,
|
|
2401
|
+
theme: f(n).menuSetting.theme,
|
|
2402
|
+
accordion: f(n).menuSetting.accordion,
|
|
2403
|
+
split: D.value.split,
|
|
2404
|
+
onMenuClick: me
|
|
2405
|
+
}, null, 8, ["items", "collapse", "theme", "accordion", "split"])
|
|
2406
|
+
])
|
|
2407
|
+
], 8, cn),
|
|
2408
|
+
f(n).menuSetting.trigger === "FOOTER" && !c.value ? (t(), l("button", {
|
|
2409
|
+
key: 1,
|
|
2410
|
+
type: "button",
|
|
2411
|
+
class: "dsea-classic-layout__sidebar-trigger",
|
|
2412
|
+
"aria-label": H.value.toggleNavigation,
|
|
2413
|
+
onClick: pe
|
|
2414
|
+
}, [
|
|
2415
|
+
x(f(L), {
|
|
2416
|
+
icon: f(n).menuSetting.collapsed ? "lucide:panel-left-open" : "lucide:panel-left-close",
|
|
2417
|
+
size: 16
|
|
2418
|
+
}, null, 8, ["icon"])
|
|
2419
|
+
], 8, mn)) : b("", !0)
|
|
2420
|
+
], 64)),
|
|
2421
|
+
f(n).menuSetting.canDrag && !c.value && !f(n).menuSetting.collapsed && O.value !== "mix-sidebar" ? (t(), l("div", {
|
|
2422
|
+
key: 2,
|
|
2423
|
+
class: "dsea-classic-layout__resize",
|
|
2424
|
+
role: "separator",
|
|
2425
|
+
tabindex: "0",
|
|
2426
|
+
"aria-orientation": "vertical",
|
|
2427
|
+
"aria-label": H.value.resizeNavigation,
|
|
2428
|
+
"aria-valuenow": f(n).menuSetting.menuWidth,
|
|
2429
|
+
"aria-valuemin": "160",
|
|
2430
|
+
"aria-valuemax": "420",
|
|
2431
|
+
onPointerdown: qe,
|
|
2432
|
+
onKeydown: He
|
|
2433
|
+
}, null, 40, vn)) : b("", !0)
|
|
2434
|
+
], 10, tn)) : b("", !0),
|
|
2435
|
+
c.value && y.value && k.value ? (t(), l("button", {
|
|
2436
|
+
key: 1,
|
|
2437
|
+
type: "button",
|
|
2438
|
+
class: "dsea-classic-layout__scrim",
|
|
2439
|
+
"aria-label": H.value.closeNavigation,
|
|
2440
|
+
onClick: w[7] || (w[7] = (_) => y.value = !1)
|
|
2441
|
+
}, null, 8, gn)) : b("", !0),
|
|
2442
|
+
r("div", bn, [
|
|
2443
|
+
f(n).multiTabsSetting.show ? (t(), l("div", hn, [
|
|
2444
|
+
T(g.$slots, "tabs", {}, () => [
|
|
2445
|
+
x(Ea, {
|
|
2446
|
+
tabs: e.tabs,
|
|
2447
|
+
"active-key": e.activeTab,
|
|
2448
|
+
labels: e.tabLabels,
|
|
2449
|
+
"show-quick": f(n).multiTabsSetting.showQuick,
|
|
2450
|
+
"show-redo": f(n).multiTabsSetting.showRedo,
|
|
2451
|
+
"show-fold": f(n).multiTabsSetting.showFold,
|
|
2452
|
+
"can-drag": f(n).multiTabsSetting.canDrag,
|
|
2453
|
+
onSelect: w[8] || (w[8] = (_) => o("tabSelect", _)),
|
|
2454
|
+
onClose: w[9] || (w[9] = (_) => o("tabClose", _)),
|
|
2455
|
+
onRefresh: w[10] || (w[10] = (_) => o("tabRefresh", _)),
|
|
2456
|
+
onCloseAction: Ue,
|
|
2457
|
+
onReorder: w[11] || (w[11] = (_) => o("tabReorder", _)),
|
|
2458
|
+
onFold: _e
|
|
2459
|
+
}, null, 8, ["tabs", "active-key", "labels", "show-quick", "show-redo", "show-fold", "can-drag"])
|
|
2460
|
+
])
|
|
2461
|
+
])) : b("", !0),
|
|
2462
|
+
r("main", {
|
|
2463
|
+
class: U(["dsea-classic-layout__content", { "is-fixed": f(n).contentMode === "fixed" }])
|
|
2464
|
+
}, [
|
|
2465
|
+
T(g.$slots, "default")
|
|
2466
|
+
], 2),
|
|
2467
|
+
f(n).showFooter && g.$slots.footer ? (t(), l("footer", pn, [
|
|
2468
|
+
T(g.$slots, "footer")
|
|
2469
|
+
])) : b("", !0)
|
|
2470
|
+
])
|
|
2471
|
+
])
|
|
2472
|
+
], 64)),
|
|
2473
|
+
f(n).showSettingButton ? (t(), z(Va, {
|
|
2474
|
+
key: 2,
|
|
2475
|
+
open: h.value,
|
|
2476
|
+
"onUpdate:open": w[12] || (w[12] = (_) => h.value = _),
|
|
2477
|
+
title: H.value.settings,
|
|
2478
|
+
sections: Re.value,
|
|
2479
|
+
"reset-label": H.value.reset,
|
|
2480
|
+
onChange: se,
|
|
2481
|
+
onReset: Ke
|
|
2482
|
+
}, null, 8, ["open", "title", "sections", "reset-label"])) : b("", !0)
|
|
2483
|
+
], 6);
|
|
2484
|
+
};
|
|
2485
|
+
}
|
|
2486
|
+
});
|
|
2487
|
+
const kn = { class: "dsea-iframe-view" }, wn = ["src", "title", "loading", "referrerpolicy"], Sn = /* @__PURE__ */ P({
|
|
1447
2488
|
__name: "AdminIframeView",
|
|
1448
2489
|
props: {
|
|
1449
2490
|
src: {},
|
|
@@ -1452,35 +2493,35 @@ const ol = /* @__PURE__ */ A(Nt, [["__scopeId", "data-v-49bfd66c"]]), zt = { cla
|
|
|
1452
2493
|
referrerPolicy: { default: "strict-origin-when-cross-origin" }
|
|
1453
2494
|
},
|
|
1454
2495
|
emits: ["load"],
|
|
1455
|
-
setup(e, { emit:
|
|
1456
|
-
const
|
|
1457
|
-
var
|
|
1458
|
-
const
|
|
1459
|
-
return
|
|
2496
|
+
setup(e, { emit: d }) {
|
|
2497
|
+
const a = e, o = d, s = E(() => {
|
|
2498
|
+
var i;
|
|
2499
|
+
const u = ((i = a.src) == null ? void 0 : i.trim()) ?? "";
|
|
2500
|
+
return ge(u) || (u.startsWith("/") && !u.startsWith("//") && !/[\\\s\u0000-\u001f]/.test(u) ? u : "");
|
|
1460
2501
|
});
|
|
1461
|
-
return (
|
|
1462
|
-
|
|
1463
|
-
key:
|
|
1464
|
-
src:
|
|
2502
|
+
return (u, i) => (t(), l("div", kn, [
|
|
2503
|
+
s.value ? (t(), l("iframe", {
|
|
2504
|
+
key: s.value,
|
|
2505
|
+
src: s.value,
|
|
1465
2506
|
title: e.title,
|
|
1466
2507
|
loading: e.loading,
|
|
1467
2508
|
referrerpolicy: e.referrerPolicy,
|
|
1468
|
-
onLoad:
|
|
1469
|
-
}, null, 40,
|
|
2509
|
+
onLoad: i[0] || (i[0] = (n) => o("load"))
|
|
2510
|
+
}, null, 40, wn)) : T(u.$slots, "invalid", {}, void 0, !0, 1)
|
|
1470
2511
|
]));
|
|
1471
2512
|
}
|
|
1472
2513
|
});
|
|
1473
|
-
const
|
|
2514
|
+
const So = /* @__PURE__ */ W(Sn, [["__scopeId", "data-v-b964cc57"]]), _n = { class: "dsea-login-view" }, $n = { class: "dsea-login-view__identity" }, Cn = {
|
|
1474
2515
|
key: 0,
|
|
1475
2516
|
class: "dsea-login-view__subtitle"
|
|
1476
|
-
},
|
|
2517
|
+
}, xn = ["for"], Ln = ["id", "disabled"], Mn = ["for"], An = ["id", "disabled"], Tn = {
|
|
1477
2518
|
key: 1,
|
|
1478
2519
|
class: "dsea-login-view__error",
|
|
1479
2520
|
role: "alert"
|
|
1480
|
-
},
|
|
2521
|
+
}, Pn = ["disabled"], Bn = {
|
|
1481
2522
|
key: 2,
|
|
1482
2523
|
class: "dsea-login-view__footer"
|
|
1483
|
-
},
|
|
2524
|
+
}, Fn = /* @__PURE__ */ P({
|
|
1484
2525
|
__name: "AdminLoginView",
|
|
1485
2526
|
props: {
|
|
1486
2527
|
title: {},
|
|
@@ -1494,71 +2535,71 @@ const sl = /* @__PURE__ */ A(Kt, [["__scopeId", "data-v-b964cc57"]]), Vt = { cla
|
|
|
1494
2535
|
formId: { default: "admin-login" }
|
|
1495
2536
|
},
|
|
1496
2537
|
emits: ["submit"],
|
|
1497
|
-
setup(e, { emit:
|
|
1498
|
-
const
|
|
1499
|
-
function
|
|
1500
|
-
|
|
2538
|
+
setup(e, { emit: d }) {
|
|
2539
|
+
const a = d, o = M(""), s = M("");
|
|
2540
|
+
function u() {
|
|
2541
|
+
a("submit", { username: o.value, password: s.value });
|
|
1501
2542
|
}
|
|
1502
|
-
return (
|
|
1503
|
-
|
|
2543
|
+
return (i, n) => (t(), l("main", _n, [
|
|
2544
|
+
r("form", {
|
|
1504
2545
|
class: "dsea-login-view__form",
|
|
1505
|
-
onSubmit:
|
|
2546
|
+
onSubmit: ee(u, ["prevent"])
|
|
1506
2547
|
}, [
|
|
1507
|
-
|
|
1508
|
-
|
|
2548
|
+
r("div", $n, [
|
|
2549
|
+
T(i.$slots, "brand", {}, void 0, !0)
|
|
1509
2550
|
]),
|
|
1510
|
-
|
|
1511
|
-
e.subtitle ? (
|
|
1512
|
-
|
|
2551
|
+
r("h1", null, m(e.title), 1),
|
|
2552
|
+
e.subtitle ? (t(), l("p", Cn, m(e.subtitle), 1)) : b("", !0),
|
|
2553
|
+
r("label", {
|
|
1513
2554
|
for: `${e.formId}-username`
|
|
1514
|
-
},
|
|
1515
|
-
|
|
2555
|
+
}, m(e.usernameLabel), 9, xn),
|
|
2556
|
+
Y(r("input", {
|
|
1516
2557
|
id: `${e.formId}-username`,
|
|
1517
|
-
"onUpdate:modelValue":
|
|
2558
|
+
"onUpdate:modelValue": n[0] || (n[0] = (c) => o.value = c),
|
|
1518
2559
|
type: "text",
|
|
1519
2560
|
name: "username",
|
|
1520
2561
|
autocomplete: "username",
|
|
1521
2562
|
required: "",
|
|
1522
2563
|
disabled: e.loading
|
|
1523
|
-
}, null, 8,
|
|
2564
|
+
}, null, 8, Ln), [
|
|
1524
2565
|
[
|
|
1525
|
-
|
|
1526
|
-
|
|
2566
|
+
J,
|
|
2567
|
+
o.value,
|
|
1527
2568
|
void 0,
|
|
1528
2569
|
{ trim: !0 }
|
|
1529
2570
|
]
|
|
1530
2571
|
]),
|
|
1531
|
-
|
|
2572
|
+
r("label", {
|
|
1532
2573
|
for: `${e.formId}-password`
|
|
1533
|
-
},
|
|
1534
|
-
|
|
2574
|
+
}, m(e.passwordLabel), 9, Mn),
|
|
2575
|
+
Y(r("input", {
|
|
1535
2576
|
id: `${e.formId}-password`,
|
|
1536
|
-
"onUpdate:modelValue":
|
|
2577
|
+
"onUpdate:modelValue": n[1] || (n[1] = (c) => s.value = c),
|
|
1537
2578
|
type: "password",
|
|
1538
2579
|
name: "password",
|
|
1539
2580
|
autocomplete: "current-password",
|
|
1540
2581
|
required: "",
|
|
1541
2582
|
disabled: e.loading
|
|
1542
|
-
}, null, 8,
|
|
1543
|
-
[
|
|
2583
|
+
}, null, 8, An), [
|
|
2584
|
+
[J, s.value]
|
|
1544
2585
|
]),
|
|
1545
|
-
e.error ? (
|
|
1546
|
-
|
|
2586
|
+
e.error ? (t(), l("p", Tn, m(e.error), 1)) : b("", !0),
|
|
2587
|
+
r("button", {
|
|
1547
2588
|
type: "submit",
|
|
1548
2589
|
disabled: e.loading
|
|
1549
|
-
},
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
])) :
|
|
2590
|
+
}, m(e.loading ? e.loadingLabel : e.submitLabel), 9, Pn),
|
|
2591
|
+
i.$slots.footer ? (t(), l("div", Bn, [
|
|
2592
|
+
T(i.$slots, "footer", {}, void 0, !0)
|
|
2593
|
+
])) : b("", !0)
|
|
1553
2594
|
], 32)
|
|
1554
2595
|
]));
|
|
1555
2596
|
}
|
|
1556
2597
|
});
|
|
1557
|
-
const
|
|
2598
|
+
const _o = /* @__PURE__ */ W(Fn, [["__scopeId", "data-v-65bdd32a"]]), En = { class: "dsea-lock-view" }, In = { key: 0 }, Nn = ["for"], zn = ["id", "disabled"], Dn = {
|
|
1558
2599
|
key: 1,
|
|
1559
2600
|
class: "dsea-lock-view__error",
|
|
1560
2601
|
role: "alert"
|
|
1561
|
-
},
|
|
2602
|
+
}, Rn = ["disabled"], Kn = /* @__PURE__ */ P({
|
|
1562
2603
|
__name: "AdminLockView",
|
|
1563
2604
|
props: {
|
|
1564
2605
|
title: {},
|
|
@@ -1571,51 +2612,51 @@ const il = /* @__PURE__ */ A(Xt, [["__scopeId", "data-v-65bdd32a"]]), Yt = { cla
|
|
|
1571
2612
|
formId: { default: "admin-lock" }
|
|
1572
2613
|
},
|
|
1573
2614
|
emits: ["unlock", "switchAccount"],
|
|
1574
|
-
setup(e, { emit:
|
|
1575
|
-
const
|
|
1576
|
-
function
|
|
1577
|
-
|
|
2615
|
+
setup(e, { emit: d }) {
|
|
2616
|
+
const a = d, o = M("");
|
|
2617
|
+
function s() {
|
|
2618
|
+
a("unlock", o.value);
|
|
1578
2619
|
}
|
|
1579
|
-
return (
|
|
1580
|
-
|
|
2620
|
+
return (u, i) => (t(), l("main", En, [
|
|
2621
|
+
r("form", {
|
|
1581
2622
|
class: "dsea-lock-view__form",
|
|
1582
|
-
onSubmit:
|
|
2623
|
+
onSubmit: ee(s, ["prevent"])
|
|
1583
2624
|
}, [
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
e.identity ? (
|
|
1587
|
-
|
|
2625
|
+
T(u.$slots, "avatar", {}, void 0, !0),
|
|
2626
|
+
r("h1", null, m(e.title), 1),
|
|
2627
|
+
e.identity ? (t(), l("p", In, m(e.identity), 1)) : b("", !0),
|
|
2628
|
+
r("label", {
|
|
1588
2629
|
for: `${e.formId}-password`
|
|
1589
|
-
},
|
|
1590
|
-
|
|
2630
|
+
}, m(e.passwordLabel), 9, Nn),
|
|
2631
|
+
Y(r("input", {
|
|
1591
2632
|
id: `${e.formId}-password`,
|
|
1592
|
-
"onUpdate:modelValue":
|
|
2633
|
+
"onUpdate:modelValue": i[0] || (i[0] = (n) => o.value = n),
|
|
1593
2634
|
type: "password",
|
|
1594
2635
|
autocomplete: "current-password",
|
|
1595
2636
|
required: "",
|
|
1596
2637
|
disabled: e.loading
|
|
1597
|
-
}, null, 8,
|
|
1598
|
-
[
|
|
2638
|
+
}, null, 8, zn), [
|
|
2639
|
+
[J, o.value]
|
|
1599
2640
|
]),
|
|
1600
|
-
e.error ? (
|
|
1601
|
-
|
|
2641
|
+
e.error ? (t(), l("p", Dn, m(e.error), 1)) : b("", !0),
|
|
2642
|
+
r("button", {
|
|
1602
2643
|
type: "submit",
|
|
1603
2644
|
disabled: e.loading
|
|
1604
|
-
},
|
|
1605
|
-
e.switchLabel ? (
|
|
2645
|
+
}, m(e.unlockLabel), 9, Rn),
|
|
2646
|
+
e.switchLabel ? (t(), l("button", {
|
|
1606
2647
|
key: 2,
|
|
1607
2648
|
type: "button",
|
|
1608
2649
|
class: "dsea-lock-view__switch",
|
|
1609
|
-
onClick:
|
|
1610
|
-
},
|
|
2650
|
+
onClick: i[1] || (i[1] = (n) => a("switchAccount"))
|
|
2651
|
+
}, m(e.switchLabel), 1)) : b("", !0)
|
|
1611
2652
|
], 32)
|
|
1612
2653
|
]));
|
|
1613
2654
|
}
|
|
1614
2655
|
});
|
|
1615
|
-
const
|
|
2656
|
+
const $o = /* @__PURE__ */ W(Kn, [["__scopeId", "data-v-e70aeaca"]]), Wn = { class: "dsea-exception-view" }, On = { class: "dsea-exception-view__content" }, Vn = { class: "dsea-exception-view__status" }, Un = {
|
|
1616
2657
|
key: 0,
|
|
1617
2658
|
class: "dsea-exception-view__description"
|
|
1618
|
-
},
|
|
2659
|
+
}, qn = /* @__PURE__ */ P({
|
|
1619
2660
|
__name: "AdminExceptionView",
|
|
1620
2661
|
props: {
|
|
1621
2662
|
status: {},
|
|
@@ -1624,27 +2665,27 @@ const rl = /* @__PURE__ */ A(na, [["__scopeId", "data-v-e70aeaca"]]), la = { cla
|
|
|
1624
2665
|
actionLabel: {}
|
|
1625
2666
|
},
|
|
1626
2667
|
emits: ["action"],
|
|
1627
|
-
setup(e, { emit:
|
|
1628
|
-
const
|
|
1629
|
-
return (
|
|
1630
|
-
|
|
1631
|
-
|
|
1632
|
-
|
|
1633
|
-
e.description ? (
|
|
1634
|
-
e.actionLabel ? (
|
|
2668
|
+
setup(e, { emit: d }) {
|
|
2669
|
+
const a = d;
|
|
2670
|
+
return (o, s) => (t(), l("main", Wn, [
|
|
2671
|
+
r("div", On, [
|
|
2672
|
+
r("p", Vn, m(e.status), 1),
|
|
2673
|
+
r("h1", null, m(e.title), 1),
|
|
2674
|
+
e.description ? (t(), l("p", Un, m(e.description), 1)) : b("", !0),
|
|
2675
|
+
e.actionLabel ? (t(), l("button", {
|
|
1635
2676
|
key: 1,
|
|
1636
2677
|
type: "button",
|
|
1637
|
-
onClick:
|
|
1638
|
-
},
|
|
2678
|
+
onClick: s[0] || (s[0] = (u) => a("action"))
|
|
2679
|
+
}, m(e.actionLabel), 1)) : b("", !0)
|
|
1639
2680
|
])
|
|
1640
2681
|
]));
|
|
1641
2682
|
}
|
|
1642
2683
|
});
|
|
1643
|
-
const
|
|
2684
|
+
const Co = /* @__PURE__ */ W(qn, [["__scopeId", "data-v-b9e53f59"]]), Hn = { class: "dsea-profile-tabs" }, jn = {
|
|
1644
2685
|
key: 0,
|
|
1645
2686
|
class: "dsea-profile-tabs__notice",
|
|
1646
2687
|
role: "status"
|
|
1647
|
-
},
|
|
2688
|
+
}, Qn = { class: "dsea-profile-tabs__body" }, Xn = ["aria-label"], Gn = ["aria-current", "onClick"], Yn = ["aria-label"], Jn = /* @__PURE__ */ P({
|
|
1648
2689
|
__name: "AdminProfileTabs",
|
|
1649
2690
|
props: {
|
|
1650
2691
|
tabs: {},
|
|
@@ -1653,38 +2694,38 @@ const dl = /* @__PURE__ */ A(ra, [["__scopeId", "data-v-b9e53f59"]]), da = { cla
|
|
|
1653
2694
|
notice: {}
|
|
1654
2695
|
},
|
|
1655
2696
|
emits: ["update:activeKey"],
|
|
1656
|
-
setup(e, { emit:
|
|
1657
|
-
const
|
|
1658
|
-
return (
|
|
1659
|
-
var
|
|
1660
|
-
return
|
|
1661
|
-
e.notice ? (
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
(
|
|
1665
|
-
key:
|
|
2697
|
+
setup(e, { emit: d }) {
|
|
2698
|
+
const a = e, o = d, s = E(() => a.tabs.find((u) => u.key === a.activeKey));
|
|
2699
|
+
return (u, i) => {
|
|
2700
|
+
var n;
|
|
2701
|
+
return t(), l("div", Hn, [
|
|
2702
|
+
e.notice ? (t(), l("p", jn, m(e.notice), 1)) : b("", !0),
|
|
2703
|
+
r("div", Qn, [
|
|
2704
|
+
r("nav", { "aria-label": e.label }, [
|
|
2705
|
+
(t(!0), l(F, null, K(e.tabs, (c) => (t(), l("button", {
|
|
2706
|
+
key: c.key,
|
|
1666
2707
|
type: "button",
|
|
1667
|
-
"aria-current":
|
|
1668
|
-
onClick: (
|
|
1669
|
-
},
|
|
1670
|
-
], 8,
|
|
1671
|
-
|
|
1672
|
-
"aria-label": (
|
|
2708
|
+
"aria-current": c.key === e.activeKey ? "page" : void 0,
|
|
2709
|
+
onClick: (y) => o("update:activeKey", c.key)
|
|
2710
|
+
}, m(c.label), 9, Gn))), 128))
|
|
2711
|
+
], 8, Xn),
|
|
2712
|
+
r("section", {
|
|
2713
|
+
"aria-label": (n = s.value) == null ? void 0 : n.label
|
|
1673
2714
|
}, [
|
|
1674
|
-
|
|
1675
|
-
], 8,
|
|
2715
|
+
s.value ? (t(), z(Je(s.value.component), { key: 0 })) : T(u.$slots, "default", {}, void 0, !0, 1)
|
|
2716
|
+
], 8, Yn)
|
|
1676
2717
|
])
|
|
1677
2718
|
]);
|
|
1678
2719
|
};
|
|
1679
2720
|
}
|
|
1680
2721
|
});
|
|
1681
|
-
const
|
|
2722
|
+
const xo = /* @__PURE__ */ W(Jn, [["__scopeId", "data-v-55c2076e"]]), Zn = { key: 0 }, el = ["value"], tl = { key: 1 }, al = {
|
|
1682
2723
|
key: 2,
|
|
1683
2724
|
class: "dsea-profile-form__avatar"
|
|
1684
|
-
},
|
|
2725
|
+
}, nl = {
|
|
1685
2726
|
key: 3,
|
|
1686
2727
|
role: "alert"
|
|
1687
|
-
},
|
|
2728
|
+
}, ll = ["disabled"], ol = /* @__PURE__ */ P({
|
|
1688
2729
|
__name: "AdminProfileForm",
|
|
1689
2730
|
props: {
|
|
1690
2731
|
name: {},
|
|
@@ -1696,89 +2737,89 @@ const cl = /* @__PURE__ */ A(pa, [["__scopeId", "data-v-55c2076e"]]), ga = { key
|
|
|
1696
2737
|
labels: { default: () => ({ name: "Name", email: "Email", phone: "Phone", currentPassword: "Current password", save: "Save changes", saving: "Saving" }) }
|
|
1697
2738
|
},
|
|
1698
2739
|
emits: ["submit"],
|
|
1699
|
-
setup(e, { emit:
|
|
1700
|
-
const
|
|
1701
|
-
|
|
1702
|
-
|
|
2740
|
+
setup(e, { emit: d }) {
|
|
2741
|
+
const a = e, o = d, s = Te({ name: a.name, email: a.email, currentPassword: "" });
|
|
2742
|
+
Z(() => [a.name, a.email], () => {
|
|
2743
|
+
s.name = a.name, s.email = a.email;
|
|
1703
2744
|
});
|
|
1704
|
-
function
|
|
1705
|
-
|
|
1706
|
-
name:
|
|
1707
|
-
email:
|
|
1708
|
-
...
|
|
1709
|
-
}),
|
|
1710
|
-
}
|
|
1711
|
-
return (
|
|
2745
|
+
function u() {
|
|
2746
|
+
a.saving || (o("submit", {
|
|
2747
|
+
name: s.name.trim(),
|
|
2748
|
+
email: s.email.trim(),
|
|
2749
|
+
...a.requireCurrentPassword ? { currentPassword: s.currentPassword } : {}
|
|
2750
|
+
}), s.currentPassword = "");
|
|
2751
|
+
}
|
|
2752
|
+
return (i, n) => (t(), l("form", {
|
|
1712
2753
|
class: "dsea-profile-form",
|
|
1713
|
-
onSubmit:
|
|
2754
|
+
onSubmit: ee(u, ["prevent"])
|
|
1714
2755
|
}, [
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
"onUpdate:modelValue":
|
|
2756
|
+
r("label", null, [
|
|
2757
|
+
Q(m(e.labels.name), 1),
|
|
2758
|
+
Y(r("input", {
|
|
2759
|
+
"onUpdate:modelValue": n[0] || (n[0] = (c) => s.name = c),
|
|
1719
2760
|
type: "text",
|
|
1720
2761
|
required: "",
|
|
1721
2762
|
maxlength: "100",
|
|
1722
2763
|
autocomplete: "name"
|
|
1723
2764
|
}, null, 512), [
|
|
1724
2765
|
[
|
|
1725
|
-
|
|
1726
|
-
|
|
2766
|
+
J,
|
|
2767
|
+
s.name,
|
|
1727
2768
|
void 0,
|
|
1728
2769
|
{ trim: !0 }
|
|
1729
2770
|
]
|
|
1730
2771
|
])
|
|
1731
2772
|
]),
|
|
1732
|
-
|
|
1733
|
-
|
|
1734
|
-
|
|
1735
|
-
"onUpdate:modelValue":
|
|
2773
|
+
r("label", null, [
|
|
2774
|
+
Q(m(e.labels.email), 1),
|
|
2775
|
+
Y(r("input", {
|
|
2776
|
+
"onUpdate:modelValue": n[1] || (n[1] = (c) => s.email = c),
|
|
1736
2777
|
type: "email",
|
|
1737
2778
|
autocomplete: "email"
|
|
1738
2779
|
}, null, 512), [
|
|
1739
2780
|
[
|
|
1740
|
-
|
|
1741
|
-
|
|
2781
|
+
J,
|
|
2782
|
+
s.email,
|
|
1742
2783
|
void 0,
|
|
1743
2784
|
{ trim: !0 }
|
|
1744
2785
|
]
|
|
1745
2786
|
])
|
|
1746
2787
|
]),
|
|
1747
|
-
e.phone !== void 0 ? (
|
|
1748
|
-
|
|
1749
|
-
|
|
2788
|
+
e.phone !== void 0 ? (t(), l("label", Zn, [
|
|
2789
|
+
Q(m(e.labels.phone), 1),
|
|
2790
|
+
r("input", {
|
|
1750
2791
|
value: e.phone,
|
|
1751
2792
|
type: "tel",
|
|
1752
2793
|
disabled: "",
|
|
1753
2794
|
autocomplete: "tel"
|
|
1754
|
-
}, null, 8,
|
|
1755
|
-
])) :
|
|
1756
|
-
e.requireCurrentPassword ? (
|
|
1757
|
-
|
|
1758
|
-
|
|
1759
|
-
"onUpdate:modelValue":
|
|
2795
|
+
}, null, 8, el)
|
|
2796
|
+
])) : b("", !0),
|
|
2797
|
+
e.requireCurrentPassword ? (t(), l("label", tl, [
|
|
2798
|
+
Q(m(e.labels.currentPassword), 1),
|
|
2799
|
+
Y(r("input", {
|
|
2800
|
+
"onUpdate:modelValue": n[2] || (n[2] = (c) => s.currentPassword = c),
|
|
1760
2801
|
type: "password",
|
|
1761
2802
|
required: "",
|
|
1762
2803
|
autocomplete: "current-password"
|
|
1763
2804
|
}, null, 512), [
|
|
1764
|
-
[
|
|
2805
|
+
[J, s.currentPassword]
|
|
1765
2806
|
])
|
|
1766
|
-
])) :
|
|
1767
|
-
|
|
1768
|
-
|
|
1769
|
-
])) :
|
|
1770
|
-
e.error ? (
|
|
1771
|
-
|
|
2807
|
+
])) : b("", !0),
|
|
2808
|
+
i.$slots.avatar ? (t(), l("div", al, [
|
|
2809
|
+
T(i.$slots, "avatar", {}, void 0, !0)
|
|
2810
|
+
])) : b("", !0),
|
|
2811
|
+
e.error ? (t(), l("p", nl, m(e.error), 1)) : b("", !0),
|
|
2812
|
+
r("button", {
|
|
1772
2813
|
type: "submit",
|
|
1773
2814
|
disabled: e.saving
|
|
1774
|
-
},
|
|
2815
|
+
}, m(e.saving ? e.labels.saving : e.labels.save), 9, ll)
|
|
1775
2816
|
], 32));
|
|
1776
2817
|
}
|
|
1777
2818
|
});
|
|
1778
|
-
const
|
|
2819
|
+
const Lo = /* @__PURE__ */ W(ol, [["__scopeId", "data-v-4dc61808"]]), il = {
|
|
1779
2820
|
key: 0,
|
|
1780
2821
|
role: "alert"
|
|
1781
|
-
},
|
|
2822
|
+
}, sl = ["disabled"], rl = /* @__PURE__ */ P({
|
|
1782
2823
|
__name: "AdminPasswordForm",
|
|
1783
2824
|
props: {
|
|
1784
2825
|
minBytes: { default: 10 },
|
|
@@ -1788,104 +2829,104 @@ const ul = /* @__PURE__ */ A(wa, [["__scopeId", "data-v-4dc61808"]]), $a = {
|
|
|
1788
2829
|
labels: { default: () => ({ current: "Current password", next: "New password", confirm: "Confirm password", save: "Change password", saving: "Saving", mismatch: "Passwords do not match", length: "Password length is invalid" }) }
|
|
1789
2830
|
},
|
|
1790
2831
|
emits: ["submit"],
|
|
1791
|
-
setup(e, { expose:
|
|
1792
|
-
const
|
|
1793
|
-
function
|
|
1794
|
-
if (
|
|
2832
|
+
setup(e, { expose: d, emit: a }) {
|
|
2833
|
+
const o = e, s = a, u = M(""), i = M(""), n = M(""), c = M("");
|
|
2834
|
+
function y() {
|
|
2835
|
+
if (o.saving)
|
|
1795
2836
|
return;
|
|
1796
|
-
const
|
|
1797
|
-
if (
|
|
1798
|
-
|
|
2837
|
+
const p = new TextEncoder().encode(i.value).length;
|
|
2838
|
+
if (p < o.minBytes || p > o.maxBytes) {
|
|
2839
|
+
c.value = o.labels.length;
|
|
1799
2840
|
return;
|
|
1800
2841
|
}
|
|
1801
|
-
if (
|
|
1802
|
-
|
|
2842
|
+
if (i.value !== n.value) {
|
|
2843
|
+
c.value = o.labels.mismatch;
|
|
1803
2844
|
return;
|
|
1804
2845
|
}
|
|
1805
|
-
|
|
2846
|
+
c.value = "", s("submit", { currentPassword: u.value, password: i.value });
|
|
1806
2847
|
}
|
|
1807
|
-
function
|
|
1808
|
-
|
|
2848
|
+
function h() {
|
|
2849
|
+
u.value = "", i.value = "", n.value = "", c.value = "";
|
|
1809
2850
|
}
|
|
1810
|
-
return
|
|
2851
|
+
return d({ reset: h }), (p, N) => (t(), l("form", {
|
|
1811
2852
|
class: "dsea-password-form",
|
|
1812
|
-
onSubmit:
|
|
2853
|
+
onSubmit: ee(y, ["prevent"])
|
|
1813
2854
|
}, [
|
|
1814
|
-
|
|
1815
|
-
|
|
1816
|
-
|
|
1817
|
-
"onUpdate:modelValue":
|
|
2855
|
+
r("label", null, [
|
|
2856
|
+
Q(m(e.labels.current), 1),
|
|
2857
|
+
Y(r("input", {
|
|
2858
|
+
"onUpdate:modelValue": N[0] || (N[0] = (A) => u.value = A),
|
|
1818
2859
|
type: "password",
|
|
1819
2860
|
required: "",
|
|
1820
2861
|
autocomplete: "current-password"
|
|
1821
2862
|
}, null, 512), [
|
|
1822
|
-
[
|
|
2863
|
+
[J, u.value]
|
|
1823
2864
|
])
|
|
1824
2865
|
]),
|
|
1825
|
-
|
|
1826
|
-
|
|
1827
|
-
|
|
1828
|
-
"onUpdate:modelValue":
|
|
2866
|
+
r("label", null, [
|
|
2867
|
+
Q(m(e.labels.next), 1),
|
|
2868
|
+
Y(r("input", {
|
|
2869
|
+
"onUpdate:modelValue": N[1] || (N[1] = (A) => i.value = A),
|
|
1829
2870
|
type: "password",
|
|
1830
2871
|
required: "",
|
|
1831
2872
|
autocomplete: "new-password"
|
|
1832
2873
|
}, null, 512), [
|
|
1833
|
-
[
|
|
2874
|
+
[J, i.value]
|
|
1834
2875
|
])
|
|
1835
2876
|
]),
|
|
1836
|
-
|
|
1837
|
-
|
|
1838
|
-
|
|
1839
|
-
"onUpdate:modelValue":
|
|
2877
|
+
r("label", null, [
|
|
2878
|
+
Q(m(e.labels.confirm), 1),
|
|
2879
|
+
Y(r("input", {
|
|
2880
|
+
"onUpdate:modelValue": N[2] || (N[2] = (A) => n.value = A),
|
|
1840
2881
|
type: "password",
|
|
1841
2882
|
required: "",
|
|
1842
2883
|
autocomplete: "new-password"
|
|
1843
2884
|
}, null, 512), [
|
|
1844
|
-
[
|
|
2885
|
+
[J, n.value]
|
|
1845
2886
|
])
|
|
1846
2887
|
]),
|
|
1847
|
-
|
|
1848
|
-
|
|
2888
|
+
c.value || e.error ? (t(), l("p", il, m(c.value || e.error), 1)) : b("", !0),
|
|
2889
|
+
r("button", {
|
|
1849
2890
|
type: "submit",
|
|
1850
2891
|
disabled: e.saving
|
|
1851
|
-
},
|
|
2892
|
+
}, m(e.saving ? e.labels.saving : e.labels.save), 9, sl)
|
|
1852
2893
|
], 32));
|
|
1853
2894
|
}
|
|
1854
2895
|
});
|
|
1855
|
-
const
|
|
2896
|
+
const Mo = /* @__PURE__ */ W(rl, [["__scopeId", "data-v-3eb63418"]]), ul = ["aria-label"], dl = ["onClick"], cl = /* @__PURE__ */ P({
|
|
1856
2897
|
__name: "AdminSecuritySettings",
|
|
1857
2898
|
props: {
|
|
1858
2899
|
items: {},
|
|
1859
2900
|
label: { default: "Security settings" }
|
|
1860
2901
|
},
|
|
1861
2902
|
emits: ["action"],
|
|
1862
|
-
setup(e, { emit:
|
|
1863
|
-
const
|
|
1864
|
-
return (
|
|
2903
|
+
setup(e, { emit: d }) {
|
|
2904
|
+
const a = d;
|
|
2905
|
+
return (o, s) => (t(), l("section", {
|
|
1865
2906
|
class: "dsea-security-settings",
|
|
1866
2907
|
"aria-label": e.label
|
|
1867
2908
|
}, [
|
|
1868
|
-
(
|
|
1869
|
-
key:
|
|
2909
|
+
(t(!0), l(F, null, K(e.items, (u) => (t(), l("div", {
|
|
2910
|
+
key: u.key,
|
|
1870
2911
|
class: "dsea-security-settings__row"
|
|
1871
2912
|
}, [
|
|
1872
|
-
|
|
1873
|
-
|
|
1874
|
-
|
|
2913
|
+
r("div", null, [
|
|
2914
|
+
r("strong", null, m(u.title), 1),
|
|
2915
|
+
r("p", null, m(u.description), 1)
|
|
1875
2916
|
]),
|
|
1876
|
-
|
|
2917
|
+
u.action ? (t(), l("button", {
|
|
1877
2918
|
key: 0,
|
|
1878
2919
|
type: "button",
|
|
1879
|
-
onClick: (
|
|
1880
|
-
},
|
|
2920
|
+
onClick: (i) => a("action", u.key)
|
|
2921
|
+
}, m(u.action), 9, dl)) : b("", !0)
|
|
1881
2922
|
]))), 128))
|
|
1882
|
-
], 8,
|
|
2923
|
+
], 8, ul));
|
|
1883
2924
|
}
|
|
1884
2925
|
});
|
|
1885
|
-
const
|
|
2926
|
+
const Ao = /* @__PURE__ */ W(cl, [["__scopeId", "data-v-9de763c2"]]), ml = ["aria-label"], vl = ["disabled"], gl = { class: "dsea-error-log__table-wrap" }, bl = { scope: "col" }, hl = { scope: "col" }, pl = { scope: "col" }, fl = ["onClick"], yl = { key: 0 }, kl = {
|
|
1886
2927
|
colspan: "4",
|
|
1887
2928
|
class: "dsea-error-log__empty"
|
|
1888
|
-
},
|
|
2929
|
+
}, wl = ["aria-label"], Sl = ["aria-label"], _l = { key: 0 }, $l = /* @__PURE__ */ P({
|
|
1889
2930
|
__name: "AdminErrorLogView",
|
|
1890
2931
|
props: {
|
|
1891
2932
|
entries: {},
|
|
@@ -1899,97 +2940,97 @@ const bl = /* @__PURE__ */ A(Aa, [["__scopeId", "data-v-9de763c2"]]), Ma = ["ari
|
|
|
1899
2940
|
emptyLabel: { default: "No errors" }
|
|
1900
2941
|
},
|
|
1901
2942
|
emits: ["clear"],
|
|
1902
|
-
setup(e, { emit:
|
|
1903
|
-
const
|
|
1904
|
-
return
|
|
1905
|
-
var
|
|
1906
|
-
|
|
1907
|
-
}), (
|
|
2943
|
+
setup(e, { emit: d }) {
|
|
2944
|
+
const a = d, o = M(null), s = M();
|
|
2945
|
+
return Z(o, async (u) => {
|
|
2946
|
+
var i;
|
|
2947
|
+
u && (await Be(), (i = s.value) == null || i.focus());
|
|
2948
|
+
}), (u, i) => (t(), l("section", {
|
|
1908
2949
|
class: "dsea-error-log",
|
|
1909
2950
|
"aria-label": e.title
|
|
1910
2951
|
}, [
|
|
1911
|
-
|
|
1912
|
-
|
|
1913
|
-
|
|
2952
|
+
r("header", null, [
|
|
2953
|
+
r("h1", null, m(e.title), 1),
|
|
2954
|
+
r("button", {
|
|
1914
2955
|
type: "button",
|
|
1915
2956
|
disabled: !e.entries.length,
|
|
1916
|
-
onClick:
|
|
1917
|
-
},
|
|
2957
|
+
onClick: i[0] || (i[0] = (n) => a("clear"))
|
|
2958
|
+
}, m(e.clearLabel), 9, vl)
|
|
1918
2959
|
]),
|
|
1919
|
-
|
|
1920
|
-
|
|
1921
|
-
|
|
1922
|
-
|
|
1923
|
-
|
|
1924
|
-
|
|
1925
|
-
|
|
1926
|
-
|
|
2960
|
+
r("div", gl, [
|
|
2961
|
+
r("table", null, [
|
|
2962
|
+
r("thead", null, [
|
|
2963
|
+
r("tr", null, [
|
|
2964
|
+
r("th", bl, m(e.timeLabel), 1),
|
|
2965
|
+
r("th", hl, m(e.messageLabel), 1),
|
|
2966
|
+
r("th", pl, m(e.sourceLabel), 1),
|
|
2967
|
+
i[4] || (i[4] = r("th", { scope: "col" }, null, -1))
|
|
1927
2968
|
])
|
|
1928
2969
|
]),
|
|
1929
|
-
|
|
1930
|
-
(
|
|
1931
|
-
key:
|
|
2970
|
+
r("tbody", null, [
|
|
2971
|
+
(t(!0), l(F, null, K(e.entries, (n) => (t(), l("tr", {
|
|
2972
|
+
key: n.id
|
|
1932
2973
|
}, [
|
|
1933
|
-
|
|
1934
|
-
|
|
1935
|
-
|
|
1936
|
-
|
|
1937
|
-
|
|
2974
|
+
r("td", null, m(n.time), 1),
|
|
2975
|
+
r("td", null, m(n.message), 1),
|
|
2976
|
+
r("td", null, m(n.source), 1),
|
|
2977
|
+
r("td", null, [
|
|
2978
|
+
r("button", {
|
|
1938
2979
|
type: "button",
|
|
1939
|
-
onClick: (
|
|
1940
|
-
},
|
|
2980
|
+
onClick: (c) => o.value = n
|
|
2981
|
+
}, m(e.detailsLabel), 9, fl)
|
|
1941
2982
|
])
|
|
1942
2983
|
]))), 128)),
|
|
1943
|
-
e.entries.length ?
|
|
1944
|
-
|
|
2984
|
+
e.entries.length ? b("", !0) : (t(), l("tr", yl, [
|
|
2985
|
+
r("td", kl, m(e.emptyLabel), 1)
|
|
1945
2986
|
]))
|
|
1946
2987
|
])
|
|
1947
2988
|
])
|
|
1948
2989
|
]),
|
|
1949
|
-
|
|
2990
|
+
o.value ? (t(), l("div", {
|
|
1950
2991
|
key: 0,
|
|
1951
2992
|
class: "dsea-error-log__backdrop",
|
|
1952
|
-
onClick:
|
|
2993
|
+
onClick: i[3] || (i[3] = ee((n) => o.value = null, ["self"]))
|
|
1953
2994
|
}, [
|
|
1954
|
-
|
|
2995
|
+
r("section", {
|
|
1955
2996
|
ref_key: "dialog",
|
|
1956
|
-
ref:
|
|
2997
|
+
ref: s,
|
|
1957
2998
|
role: "dialog",
|
|
1958
2999
|
"aria-modal": "true",
|
|
1959
3000
|
"aria-label": e.detailsLabel,
|
|
1960
3001
|
tabindex: "-1",
|
|
1961
3002
|
class: "dsea-error-log__dialog",
|
|
1962
|
-
onKeydown:
|
|
3003
|
+
onKeydown: i[2] || (i[2] = be((n) => o.value = null, ["esc"]))
|
|
1963
3004
|
}, [
|
|
1964
|
-
|
|
1965
|
-
|
|
1966
|
-
|
|
3005
|
+
r("header", null, [
|
|
3006
|
+
r("h2", null, m(o.value.message), 1),
|
|
3007
|
+
r("button", {
|
|
1967
3008
|
type: "button",
|
|
1968
3009
|
"aria-label": e.closeLabel,
|
|
1969
|
-
onClick:
|
|
3010
|
+
onClick: i[1] || (i[1] = (n) => o.value = null)
|
|
1970
3011
|
}, [
|
|
1971
|
-
|
|
3012
|
+
x(f(L), {
|
|
1972
3013
|
icon: "lucide:x",
|
|
1973
3014
|
size: 18
|
|
1974
3015
|
})
|
|
1975
|
-
], 8,
|
|
3016
|
+
], 8, Sl)
|
|
1976
3017
|
]),
|
|
1977
|
-
|
|
1978
|
-
|
|
1979
|
-
|
|
1980
|
-
|
|
1981
|
-
|
|
3018
|
+
r("dl", null, [
|
|
3019
|
+
r("dt", null, m(e.timeLabel), 1),
|
|
3020
|
+
r("dd", null, m(o.value.time), 1),
|
|
3021
|
+
r("dt", null, m(e.sourceLabel), 1),
|
|
3022
|
+
r("dd", null, m(o.value.source), 1)
|
|
1982
3023
|
]),
|
|
1983
|
-
|
|
1984
|
-
], 40,
|
|
1985
|
-
])) :
|
|
1986
|
-
], 8,
|
|
3024
|
+
o.value.details ? (t(), l("pre", _l, m(o.value.details), 1)) : b("", !0)
|
|
3025
|
+
], 40, wl)
|
|
3026
|
+
])) : b("", !0)
|
|
3027
|
+
], 8, ml));
|
|
1987
3028
|
}
|
|
1988
3029
|
});
|
|
1989
|
-
const
|
|
3030
|
+
const To = /* @__PURE__ */ W($l, [["__scopeId", "data-v-c1b52346"]]), Cl = { class: "dsea-about-view" }, xl = { key: 0 }, Ll = { class: "dsea-about-view__info" }, Ml = ["href"], Al = {
|
|
1990
3031
|
key: 0,
|
|
1991
3032
|
class: "dsea-about-view__dependencies"
|
|
1992
|
-
},
|
|
3033
|
+
}, Tl = /* @__PURE__ */ P({
|
|
1993
3034
|
__name: "AdminAboutView",
|
|
1994
3035
|
props: {
|
|
1995
3036
|
title: {},
|
|
@@ -2003,47 +3044,47 @@ const vl = /* @__PURE__ */ A(Ra, [["__scopeId", "data-v-c1b52346"]]), Ua = { cla
|
|
|
2003
3044
|
dependenciesLabel: { default: "Dependencies" }
|
|
2004
3045
|
},
|
|
2005
3046
|
setup(e) {
|
|
2006
|
-
const
|
|
2007
|
-
return (
|
|
2008
|
-
|
|
2009
|
-
|
|
2010
|
-
e.description ? (
|
|
3047
|
+
const d = e, a = E(() => d.links.filter((s) => ge(s.href))), o = E(() => Object.entries(d.dependencies).sort(([s], [u]) => s.localeCompare(u)));
|
|
3048
|
+
return (s, u) => (t(), l("section", Cl, [
|
|
3049
|
+
r("header", null, [
|
|
3050
|
+
r("h1", null, m(e.title), 1),
|
|
3051
|
+
e.description ? (t(), l("p", xl, m(e.description), 1)) : b("", !0)
|
|
2011
3052
|
]),
|
|
2012
|
-
|
|
2013
|
-
|
|
2014
|
-
|
|
2015
|
-
e.builtAt ? (
|
|
2016
|
-
|
|
2017
|
-
|
|
2018
|
-
], 64)) :
|
|
2019
|
-
(
|
|
2020
|
-
key:
|
|
3053
|
+
r("dl", Ll, [
|
|
3054
|
+
r("dt", null, m(e.versionLabel), 1),
|
|
3055
|
+
r("dd", null, m(e.version), 1),
|
|
3056
|
+
e.builtAt ? (t(), l(F, { key: 0 }, [
|
|
3057
|
+
r("dt", null, m(e.builtAtLabel), 1),
|
|
3058
|
+
r("dd", null, m(e.builtAt), 1)
|
|
3059
|
+
], 64)) : b("", !0),
|
|
3060
|
+
(t(!0), l(F, null, K(a.value, (i) => (t(), l(F, {
|
|
3061
|
+
key: i.label
|
|
2021
3062
|
}, [
|
|
2022
|
-
|
|
2023
|
-
|
|
2024
|
-
|
|
2025
|
-
href:
|
|
3063
|
+
r("dt", null, m(i.label), 1),
|
|
3064
|
+
r("dd", null, [
|
|
3065
|
+
r("a", {
|
|
3066
|
+
href: i.href,
|
|
2026
3067
|
target: "_blank",
|
|
2027
3068
|
rel: "noopener noreferrer"
|
|
2028
|
-
},
|
|
3069
|
+
}, m(i.label), 9, Ml)
|
|
2029
3070
|
])
|
|
2030
3071
|
], 64))), 128))
|
|
2031
3072
|
]),
|
|
2032
|
-
|
|
2033
|
-
|
|
2034
|
-
|
|
2035
|
-
(
|
|
2036
|
-
key:
|
|
3073
|
+
o.value.length ? (t(), l("section", Al, [
|
|
3074
|
+
r("h2", null, m(e.dependenciesLabel), 1),
|
|
3075
|
+
r("dl", null, [
|
|
3076
|
+
(t(!0), l(F, null, K(o.value, (i) => (t(), l(F, {
|
|
3077
|
+
key: i[0]
|
|
2037
3078
|
}, [
|
|
2038
|
-
|
|
2039
|
-
|
|
3079
|
+
r("dt", null, m(i[0]), 1),
|
|
3080
|
+
r("dd", null, m(i[1]), 1)
|
|
2040
3081
|
], 64))), 128))
|
|
2041
3082
|
])
|
|
2042
|
-
])) :
|
|
3083
|
+
])) : b("", !0)
|
|
2043
3084
|
]));
|
|
2044
3085
|
}
|
|
2045
3086
|
});
|
|
2046
|
-
const
|
|
3087
|
+
const Po = /* @__PURE__ */ W(Tl, [["__scopeId", "data-v-c800d903"]]), Pl = ["aria-label"], Bl = ["title"], Fl = ["aria-label", "onClick"], El = /* @__PURE__ */ P({
|
|
2047
3088
|
__name: "AgentAttachmentList",
|
|
2048
3089
|
props: {
|
|
2049
3090
|
attachments: {},
|
|
@@ -2051,47 +3092,47 @@ const pl = /* @__PURE__ */ A(ja, [["__scopeId", "data-v-c800d903"]]), Qa = ["ari
|
|
|
2051
3092
|
removeLabel: { default: "Remove" }
|
|
2052
3093
|
},
|
|
2053
3094
|
emits: ["remove"],
|
|
2054
|
-
setup(e, { emit:
|
|
2055
|
-
const
|
|
2056
|
-
function
|
|
2057
|
-
return
|
|
3095
|
+
setup(e, { emit: d }) {
|
|
3096
|
+
const a = d;
|
|
3097
|
+
function o(s) {
|
|
3098
|
+
return s < 1024 ? `${s} B` : s < 1048576 ? `${(s / 1024).toFixed(1)} KB` : `${(s / 1048576).toFixed(1)} MB`;
|
|
2058
3099
|
}
|
|
2059
|
-
return (
|
|
3100
|
+
return (s, u) => e.attachments.length ? (t(), l("ul", {
|
|
2060
3101
|
key: 0,
|
|
2061
3102
|
class: "dsea-agent-attachments",
|
|
2062
3103
|
"aria-label": e.label
|
|
2063
3104
|
}, [
|
|
2064
|
-
(
|
|
2065
|
-
key:
|
|
3105
|
+
(t(!0), l(F, null, K(e.attachments, (i) => (t(), l("li", {
|
|
3106
|
+
key: i.id
|
|
2066
3107
|
}, [
|
|
2067
|
-
|
|
2068
|
-
icon:
|
|
3108
|
+
x(f(L), {
|
|
3109
|
+
icon: i.status === "uploading" ? "lucide:loader-circle" : "lucide:paperclip",
|
|
2069
3110
|
size: 14
|
|
2070
3111
|
}, null, 8, ["icon"]),
|
|
2071
|
-
|
|
3112
|
+
r("span", {
|
|
2072
3113
|
class: "dsea-agent-attachments__name",
|
|
2073
|
-
title:
|
|
2074
|
-
},
|
|
2075
|
-
|
|
2076
|
-
|
|
3114
|
+
title: i.name
|
|
3115
|
+
}, m(i.name), 9, Bl),
|
|
3116
|
+
r("small", null, m(o(i.size)), 1),
|
|
3117
|
+
i.status !== "uploading" ? (t(), l("button", {
|
|
2077
3118
|
key: 0,
|
|
2078
3119
|
type: "button",
|
|
2079
|
-
"aria-label": `${e.removeLabel}: ${
|
|
2080
|
-
onClick: (
|
|
3120
|
+
"aria-label": `${e.removeLabel}: ${i.name}`,
|
|
3121
|
+
onClick: (n) => a("remove", i.id)
|
|
2081
3122
|
}, [
|
|
2082
|
-
|
|
3123
|
+
x(f(L), {
|
|
2083
3124
|
icon: "lucide:x",
|
|
2084
3125
|
size: 14
|
|
2085
3126
|
})
|
|
2086
|
-
], 8,
|
|
3127
|
+
], 8, Fl)) : b("", !0)
|
|
2087
3128
|
]))), 128))
|
|
2088
|
-
], 8,
|
|
3129
|
+
], 8, Pl)) : b("", !0);
|
|
2089
3130
|
}
|
|
2090
3131
|
});
|
|
2091
|
-
const
|
|
3132
|
+
const Il = /* @__PURE__ */ W(El, [["__scopeId", "data-v-23c5547e"]]), Nl = { class: "dsea-agent-model-select" }, zl = { class: "dsea-agent-model-select__label" }, Dl = ["value", "disabled"], Rl = {
|
|
2092
3133
|
value: "",
|
|
2093
3134
|
disabled: ""
|
|
2094
|
-
},
|
|
3135
|
+
}, Kl = ["value"], Wl = /* @__PURE__ */ P({
|
|
2095
3136
|
__name: "AgentModelSelect",
|
|
2096
3137
|
props: {
|
|
2097
3138
|
model: {},
|
|
@@ -2103,28 +3144,28 @@ const Ja = /* @__PURE__ */ A(Ya, [["__scopeId", "data-v-23c5547e"]]), Za = { cla
|
|
|
2103
3144
|
loadingLabel: { default: "Loading models" }
|
|
2104
3145
|
},
|
|
2105
3146
|
emits: ["update:model"],
|
|
2106
|
-
setup(e, { emit:
|
|
2107
|
-
const
|
|
2108
|
-
function
|
|
2109
|
-
|
|
2110
|
-
}
|
|
2111
|
-
return (
|
|
2112
|
-
|
|
2113
|
-
|
|
3147
|
+
setup(e, { emit: d }) {
|
|
3148
|
+
const a = d;
|
|
3149
|
+
function o(s) {
|
|
3150
|
+
a("update:model", s.target.value);
|
|
3151
|
+
}
|
|
3152
|
+
return (s, u) => (t(), l("label", Nl, [
|
|
3153
|
+
r("span", zl, m(e.label), 1),
|
|
3154
|
+
r("select", {
|
|
2114
3155
|
value: e.model,
|
|
2115
3156
|
disabled: e.disabled || e.loading,
|
|
2116
|
-
onChange:
|
|
3157
|
+
onChange: o
|
|
2117
3158
|
}, [
|
|
2118
|
-
|
|
2119
|
-
(
|
|
2120
|
-
key:
|
|
2121
|
-
value:
|
|
2122
|
-
},
|
|
2123
|
-
], 40,
|
|
3159
|
+
r("option", Rl, m(e.loading ? e.loadingLabel : e.placeholder), 1),
|
|
3160
|
+
(t(!0), l(F, null, K(e.models, (i) => (t(), l("option", {
|
|
3161
|
+
key: i.id,
|
|
3162
|
+
value: i.id
|
|
3163
|
+
}, m(i.name) + m(i.provider ? ` · ${i.provider}` : ""), 9, Kl))), 128))
|
|
3164
|
+
], 40, Dl)
|
|
2124
3165
|
]));
|
|
2125
3166
|
}
|
|
2126
3167
|
});
|
|
2127
|
-
const
|
|
3168
|
+
const Ol = /* @__PURE__ */ W(Wl, [["__scopeId", "data-v-bd9414ff"]]), Vl = { class: "dsea-agent-composer" }, Ul = ["value", "placeholder", "disabled"], ql = { class: "dsea-agent-composer__toolbar" }, Hl = ["disabled", "aria-label", "title"], jl = ["value", "aria-label", "disabled"], Ql = ["value"], Xl = ["disabled", "aria-label", "title"], Gl = /* @__PURE__ */ P({
|
|
2128
3169
|
__name: "AgentComposer",
|
|
2129
3170
|
props: {
|
|
2130
3171
|
draft: {},
|
|
@@ -2147,103 +3188,103 @@ const on = /* @__PURE__ */ A(ln, [["__scopeId", "data-v-bd9414ff"]]), sn = { cla
|
|
|
2147
3188
|
stopLabel: { default: "Stop" }
|
|
2148
3189
|
},
|
|
2149
3190
|
emits: ["update:draft", "update:model", "update:approvalMode", "files", "removeAttachment", "send", "stop"],
|
|
2150
|
-
setup(e, { emit:
|
|
2151
|
-
const
|
|
2152
|
-
function
|
|
2153
|
-
|
|
3191
|
+
setup(e, { emit: d }) {
|
|
3192
|
+
const a = e, o = d, s = M();
|
|
3193
|
+
function u(c) {
|
|
3194
|
+
o("update:draft", c.target.value);
|
|
2154
3195
|
}
|
|
2155
|
-
function
|
|
2156
|
-
|
|
3196
|
+
function i(c) {
|
|
3197
|
+
c.key !== "Enter" || c.shiftKey || c.isComposing || (c.preventDefault(), !a.loading && a.draft.trim() && !a.disabled && !a.waitingApproval && o("send"));
|
|
2157
3198
|
}
|
|
2158
|
-
function
|
|
2159
|
-
const
|
|
2160
|
-
|
|
3199
|
+
function n(c) {
|
|
3200
|
+
const y = c.target, h = Array.from(y.files ?? []);
|
|
3201
|
+
h.length && o("files", h), y.value = "";
|
|
2161
3202
|
}
|
|
2162
|
-
return (
|
|
2163
|
-
|
|
3203
|
+
return (c, y) => (t(), l("div", Vl, [
|
|
3204
|
+
x(Il, {
|
|
2164
3205
|
attachments: e.attachments,
|
|
2165
3206
|
label: e.attachmentsLabel,
|
|
2166
|
-
onRemove:
|
|
3207
|
+
onRemove: y[0] || (y[0] = (h) => o("removeAttachment", h))
|
|
2167
3208
|
}, null, 8, ["attachments", "label"]),
|
|
2168
|
-
|
|
3209
|
+
r("textarea", {
|
|
2169
3210
|
value: e.draft,
|
|
2170
3211
|
placeholder: e.waitingApproval ? e.waitingLabel : e.placeholder,
|
|
2171
3212
|
disabled: e.disabled || e.waitingApproval,
|
|
2172
3213
|
rows: "2",
|
|
2173
|
-
onInput:
|
|
2174
|
-
onKeydown:
|
|
2175
|
-
}, null, 40,
|
|
2176
|
-
|
|
2177
|
-
|
|
3214
|
+
onInput: u,
|
|
3215
|
+
onKeydown: i
|
|
3216
|
+
}, null, 40, Ul),
|
|
3217
|
+
r("div", ql, [
|
|
3218
|
+
r("input", {
|
|
2178
3219
|
ref_key: "fileInput",
|
|
2179
|
-
ref:
|
|
3220
|
+
ref: s,
|
|
2180
3221
|
type: "file",
|
|
2181
3222
|
multiple: "",
|
|
2182
3223
|
class: "dsea-agent-composer__file-input",
|
|
2183
|
-
onChange:
|
|
3224
|
+
onChange: n
|
|
2184
3225
|
}, null, 544),
|
|
2185
|
-
|
|
3226
|
+
r("button", {
|
|
2186
3227
|
type: "button",
|
|
2187
3228
|
class: "dsea-agent-composer__icon",
|
|
2188
3229
|
disabled: e.disabled || e.waitingApproval,
|
|
2189
3230
|
"aria-label": e.attachLabel,
|
|
2190
3231
|
title: e.attachLabel,
|
|
2191
|
-
onClick:
|
|
2192
|
-
var
|
|
2193
|
-
return (
|
|
3232
|
+
onClick: y[1] || (y[1] = (h) => {
|
|
3233
|
+
var p;
|
|
3234
|
+
return (p = s.value) == null ? void 0 : p.click();
|
|
2194
3235
|
})
|
|
2195
3236
|
}, [
|
|
2196
|
-
|
|
3237
|
+
x(f(L), {
|
|
2197
3238
|
icon: "lucide:paperclip",
|
|
2198
3239
|
size: 18
|
|
2199
3240
|
})
|
|
2200
|
-
], 8,
|
|
2201
|
-
|
|
3241
|
+
], 8, Hl),
|
|
3242
|
+
r("select", {
|
|
2202
3243
|
value: e.approvalMode,
|
|
2203
3244
|
"aria-label": e.approvalLabel,
|
|
2204
3245
|
disabled: e.disabled || e.waitingApproval,
|
|
2205
|
-
onChange:
|
|
3246
|
+
onChange: y[2] || (y[2] = (h) => o("update:approvalMode", h.target.value))
|
|
2206
3247
|
}, [
|
|
2207
|
-
(
|
|
2208
|
-
key:
|
|
2209
|
-
value:
|
|
2210
|
-
},
|
|
2211
|
-
], 40,
|
|
2212
|
-
|
|
3248
|
+
(t(!0), l(F, null, K(e.approvalModes, (h) => (t(), l("option", {
|
|
3249
|
+
key: h.value,
|
|
3250
|
+
value: h.value
|
|
3251
|
+
}, m(h.label), 9, Ql))), 128))
|
|
3252
|
+
], 40, jl),
|
|
3253
|
+
x(Ol, {
|
|
2213
3254
|
model: e.model,
|
|
2214
3255
|
models: e.models,
|
|
2215
3256
|
loading: e.modelsLoading,
|
|
2216
3257
|
disabled: e.disabled || e.loading || e.waitingApproval,
|
|
2217
3258
|
label: e.modelLabel,
|
|
2218
|
-
"onUpdate:model":
|
|
3259
|
+
"onUpdate:model": y[3] || (y[3] = (h) => o("update:model", h))
|
|
2219
3260
|
}, null, 8, ["model", "models", "loading", "disabled", "label"]),
|
|
2220
|
-
|
|
3261
|
+
r("button", {
|
|
2221
3262
|
type: "button",
|
|
2222
3263
|
class: "dsea-agent-composer__send",
|
|
2223
3264
|
disabled: !e.loading && (!e.draft.trim() || e.disabled || e.waitingApproval),
|
|
2224
3265
|
"aria-label": e.loading ? e.stopLabel : e.sendLabel,
|
|
2225
3266
|
title: e.loading ? e.stopLabel : e.sendLabel,
|
|
2226
|
-
onClick:
|
|
3267
|
+
onClick: y[4] || (y[4] = (h) => o(e.loading ? "stop" : "send"))
|
|
2227
3268
|
}, [
|
|
2228
|
-
|
|
3269
|
+
x(f(L), {
|
|
2229
3270
|
icon: e.loading ? "lucide:square" : "lucide:send",
|
|
2230
3271
|
size: 18
|
|
2231
3272
|
}, null, 8, ["icon"])
|
|
2232
|
-
], 8,
|
|
3273
|
+
], 8, Xl)
|
|
2233
3274
|
])
|
|
2234
3275
|
]));
|
|
2235
3276
|
}
|
|
2236
3277
|
});
|
|
2237
|
-
const
|
|
3278
|
+
const Bo = /* @__PURE__ */ W(Gl, [["__scopeId", "data-v-f5f922c2"]]), Yl = { key: 0 }, Jl = { class: "dsea-agent-approval__status" }, Zl = {
|
|
2238
3279
|
key: 0,
|
|
2239
3280
|
class: "dsea-agent-approval__tool"
|
|
2240
|
-
},
|
|
3281
|
+
}, eo = { key: 1 }, to = {
|
|
2241
3282
|
key: 2,
|
|
2242
3283
|
class: "dsea-agent-approval__meta"
|
|
2243
|
-
},
|
|
3284
|
+
}, ao = {
|
|
2244
3285
|
key: 3,
|
|
2245
3286
|
class: "dsea-agent-approval__reason"
|
|
2246
|
-
},
|
|
3287
|
+
}, no = { key: 4 }, lo = ["disabled"], oo = ["disabled"], io = /* @__PURE__ */ P({
|
|
2247
3288
|
__name: "AgentApprovalCard",
|
|
2248
3289
|
props: {
|
|
2249
3290
|
approval: {},
|
|
@@ -2251,8 +3292,8 @@ const gl = /* @__PURE__ */ A(vn, [["__scopeId", "data-v-f5f922c2"]]), pn = { key
|
|
|
2251
3292
|
labels: {}
|
|
2252
3293
|
},
|
|
2253
3294
|
emits: ["resolve"],
|
|
2254
|
-
setup(e, { emit:
|
|
2255
|
-
const
|
|
3295
|
+
setup(e, { emit: d }) {
|
|
3296
|
+
const a = e, o = d, s = {
|
|
2256
3297
|
status: {
|
|
2257
3298
|
pending: "Approval needed",
|
|
2258
3299
|
approved: "Approved",
|
|
@@ -2269,364 +3310,123 @@ const gl = /* @__PURE__ */ A(vn, [["__scopeId", "data-v-f5f922c2"]]), pn = { key
|
|
|
2269
3310
|
expires: "Expires",
|
|
2270
3311
|
reject: "Reject",
|
|
2271
3312
|
approve: "Approve"
|
|
2272
|
-
},
|
|
2273
|
-
var
|
|
3313
|
+
}, u = E(() => {
|
|
3314
|
+
var i, n;
|
|
2274
3315
|
return {
|
|
2275
|
-
...
|
|
2276
|
-
...
|
|
2277
|
-
status: { ...
|
|
2278
|
-
risk: { ...
|
|
3316
|
+
...s,
|
|
3317
|
+
...a.labels,
|
|
3318
|
+
status: { ...s.status, ...(i = a.labels) == null ? void 0 : i.status },
|
|
3319
|
+
risk: { ...s.risk, ...(n = a.labels) == null ? void 0 : n.risk }
|
|
2279
3320
|
};
|
|
2280
3321
|
});
|
|
2281
|
-
return (
|
|
2282
|
-
class:
|
|
3322
|
+
return (i, n) => (t(), l("article", {
|
|
3323
|
+
class: U(["dsea-agent-approval", `dsea-agent-approval--${e.approval.status}`])
|
|
2283
3324
|
}, [
|
|
2284
|
-
|
|
2285
|
-
|
|
2286
|
-
|
|
2287
|
-
e.approval.summary ? (
|
|
3325
|
+
r("header", null, [
|
|
3326
|
+
r("div", null, [
|
|
3327
|
+
r("h2", null, m(u.value.status[e.approval.status] || e.approval.status), 1),
|
|
3328
|
+
e.approval.summary ? (t(), l("p", Yl, m(e.approval.summary), 1)) : b("", !0)
|
|
2288
3329
|
]),
|
|
2289
|
-
|
|
3330
|
+
r("span", Jl, m(u.value.risk[e.approval.riskLevel || "read"] || e.approval.riskLevel), 1)
|
|
2290
3331
|
]),
|
|
2291
|
-
e.approval.toolName ? (
|
|
2292
|
-
|
|
2293
|
-
|
|
2294
|
-
])) :
|
|
2295
|
-
e.approval.details ? (
|
|
2296
|
-
|
|
2297
|
-
|
|
2298
|
-
])) :
|
|
2299
|
-
e.approval.expiresAt ? (
|
|
2300
|
-
e.approval.reason ? (
|
|
2301
|
-
e.approval.status === "pending" ? (
|
|
2302
|
-
|
|
3332
|
+
e.approval.toolName ? (t(), l("p", Zl, [
|
|
3333
|
+
Q(m(u.value.tool) + ": ", 1),
|
|
3334
|
+
r("code", null, m(e.approval.toolName), 1)
|
|
3335
|
+
])) : b("", !0),
|
|
3336
|
+
e.approval.details ? (t(), l("details", eo, [
|
|
3337
|
+
r("summary", null, m(u.value.details), 1),
|
|
3338
|
+
r("pre", null, m(e.approval.details), 1)
|
|
3339
|
+
])) : b("", !0),
|
|
3340
|
+
e.approval.expiresAt ? (t(), l("p", to, m(u.value.expires) + ": " + m(e.approval.expiresAt), 1)) : b("", !0),
|
|
3341
|
+
e.approval.reason ? (t(), l("p", ao, m(e.approval.reason), 1)) : b("", !0),
|
|
3342
|
+
e.approval.status === "pending" ? (t(), l("footer", no, [
|
|
3343
|
+
r("button", {
|
|
2303
3344
|
type: "button",
|
|
2304
3345
|
disabled: e.busy,
|
|
2305
|
-
onClick:
|
|
2306
|
-
},
|
|
2307
|
-
|
|
3346
|
+
onClick: n[0] || (n[0] = (c) => o("resolve", "reject"))
|
|
3347
|
+
}, m(u.value.reject), 9, lo),
|
|
3348
|
+
r("button", {
|
|
2308
3349
|
type: "button",
|
|
2309
3350
|
class: "dsea-agent-approval__approve",
|
|
2310
3351
|
disabled: e.busy,
|
|
2311
|
-
onClick:
|
|
2312
|
-
},
|
|
2313
|
-
])) :
|
|
3352
|
+
onClick: n[1] || (n[1] = (c) => o("resolve", "approve"))
|
|
3353
|
+
}, m(u.value.approve), 9, oo)
|
|
3354
|
+
])) : b("", !0)
|
|
2314
3355
|
], 2));
|
|
2315
3356
|
}
|
|
2316
3357
|
});
|
|
2317
|
-
const
|
|
2318
|
-
|
|
2319
|
-
|
|
2320
|
-
|
|
2321
|
-
|
|
2322
|
-
class: "dsea-admin-tabs__tools"
|
|
2323
|
-
}, Tn = ["aria-label"], Bn = ["aria-label"], fl = /* @__PURE__ */ k({
|
|
2324
|
-
__name: "AdminTabs",
|
|
2325
|
-
props: {
|
|
2326
|
-
tabs: {},
|
|
2327
|
-
activeKey: {},
|
|
2328
|
-
labels: {},
|
|
2329
|
-
navigateOnSelect: { type: Boolean, default: !0 }
|
|
2330
|
-
},
|
|
2331
|
-
emits: ["select", "close", "refresh", "closeAction"],
|
|
2332
|
-
setup(e, { emit: c }) {
|
|
2333
|
-
const t = e, i = c, { ports: l } = q(), r = I(() => [
|
|
2334
|
-
{ event: "left", text: t.labels.closeLeft },
|
|
2335
|
-
{ event: "right", text: t.labels.closeRight },
|
|
2336
|
-
{ event: "others", text: t.labels.closeOthers },
|
|
2337
|
-
{ event: "all", text: t.labels.closeAll }
|
|
2338
|
-
]);
|
|
2339
|
-
function n(g) {
|
|
2340
|
-
i("select", g), t.navigateOnSelect && l.navigation.go(g);
|
|
2341
|
-
}
|
|
2342
|
-
function u(g) {
|
|
2343
|
-
i("close", g);
|
|
2344
|
-
}
|
|
2345
|
-
function b(g) {
|
|
2346
|
-
g && i("closeAction", g.event, t.activeKey);
|
|
2347
|
-
}
|
|
2348
|
-
return (g, v) => (a(), o("div", Cn, [
|
|
2349
|
-
s("div", Sn, [
|
|
2350
|
-
(a(!0), o(x, null, M(e.tabs, (m) => (a(), o("div", {
|
|
2351
|
-
key: m.key,
|
|
2352
|
-
class: N(["dsea-admin-tabs__item", { "dsea-admin-tabs__item--active": m.key === e.activeKey }])
|
|
2353
|
-
}, [
|
|
2354
|
-
s("button", {
|
|
2355
|
-
type: "button",
|
|
2356
|
-
role: "tab",
|
|
2357
|
-
"aria-selected": m.key === e.activeKey,
|
|
2358
|
-
class: "dsea-admin-tabs__select",
|
|
2359
|
-
onClick: (L) => n(m.key)
|
|
2360
|
-
}, [
|
|
2361
|
-
m.icon ? (a(), P(y(w), {
|
|
2362
|
-
key: 0,
|
|
2363
|
-
icon: m.icon,
|
|
2364
|
-
size: 14
|
|
2365
|
-
}, null, 8, ["icon"])) : p("", !0),
|
|
2366
|
-
s("span", null, d(m.label), 1)
|
|
2367
|
-
], 8, xn),
|
|
2368
|
-
m.affix ? p("", !0) : (a(), o("button", {
|
|
2369
|
-
key: 0,
|
|
2370
|
-
type: "button",
|
|
2371
|
-
class: "dsea-admin-tabs__close",
|
|
2372
|
-
"aria-label": `${e.labels.close}: ${m.label}`,
|
|
2373
|
-
onClick: (L) => u(m.key)
|
|
2374
|
-
}, [
|
|
2375
|
-
$(y(w), {
|
|
2376
|
-
icon: "lucide:x",
|
|
2377
|
-
size: 14
|
|
2378
|
-
})
|
|
2379
|
-
], 8, An))
|
|
2380
|
-
], 2))), 128))
|
|
2381
|
-
]),
|
|
2382
|
-
e.tabs.length ? (a(), o("div", Mn, [
|
|
2383
|
-
s("button", {
|
|
2384
|
-
type: "button",
|
|
2385
|
-
"aria-label": e.labels.refresh,
|
|
2386
|
-
onClick: v[0] || (v[0] = (m) => i("refresh", e.activeKey))
|
|
2387
|
-
}, [
|
|
2388
|
-
$(y(w), {
|
|
2389
|
-
icon: "lucide:refresh-cw",
|
|
2390
|
-
size: 16
|
|
2391
|
-
})
|
|
2392
|
-
], 8, Tn),
|
|
2393
|
-
$(y(re), {
|
|
2394
|
-
"drop-menu-list": r.value,
|
|
2395
|
-
trigger: ["click"],
|
|
2396
|
-
onMenuEvent: b
|
|
2397
|
-
}, {
|
|
2398
|
-
default: j(() => [
|
|
2399
|
-
s("button", {
|
|
2400
|
-
type: "button",
|
|
2401
|
-
"aria-label": e.labels.actions
|
|
2402
|
-
}, [
|
|
2403
|
-
$(y(w), {
|
|
2404
|
-
icon: "lucide:chevron-down",
|
|
2405
|
-
size: 16
|
|
2406
|
-
})
|
|
2407
|
-
], 8, Bn)
|
|
2408
|
-
]),
|
|
2409
|
-
_: 1
|
|
2410
|
-
}, 8, ["drop-menu-list"])
|
|
2411
|
-
])) : p("", !0)
|
|
2412
|
-
]));
|
|
2413
|
-
}
|
|
2414
|
-
});
|
|
2415
|
-
function yl(e, c, t) {
|
|
2416
|
-
const i = e.findIndex((l) => l.key === c);
|
|
2417
|
-
return i < 0 && t !== "all" ? [...e] : e.filter((l, r) => {
|
|
2418
|
-
if (l.affix)
|
|
3358
|
+
const Fo = /* @__PURE__ */ W(io, [["__scopeId", "data-v-88695aee"]]);
|
|
3359
|
+
function Eo(e, d, a) {
|
|
3360
|
+
const o = e.findIndex((s) => s.key === d);
|
|
3361
|
+
return o < 0 && a !== "all" ? [...e] : e.filter((s, u) => {
|
|
3362
|
+
if (s.affix)
|
|
2419
3363
|
return !0;
|
|
2420
|
-
switch (
|
|
3364
|
+
switch (a) {
|
|
2421
3365
|
case "current":
|
|
2422
|
-
return
|
|
3366
|
+
return s.key !== d;
|
|
2423
3367
|
case "left":
|
|
2424
|
-
return
|
|
3368
|
+
return u >= o;
|
|
2425
3369
|
case "right":
|
|
2426
|
-
return
|
|
3370
|
+
return u <= o;
|
|
2427
3371
|
case "others":
|
|
2428
|
-
return
|
|
3372
|
+
return s.key === d;
|
|
2429
3373
|
case "all":
|
|
2430
3374
|
return !1;
|
|
2431
3375
|
}
|
|
2432
3376
|
});
|
|
2433
3377
|
}
|
|
2434
|
-
function
|
|
2435
|
-
var
|
|
2436
|
-
return e.some((
|
|
3378
|
+
function Io(e, d) {
|
|
3379
|
+
var a;
|
|
3380
|
+
return e.some((o) => o.key === d) ? d : (a = e[e.length - 1]) == null ? void 0 : a.key;
|
|
2437
3381
|
}
|
|
2438
|
-
const Pn = { class: "dsea-settings-panel" }, In = ["for"], En = { key: 1 }, Fn = ["aria-label"], Nn = ["aria-label", "aria-pressed", "disabled", "onClick"], zn = ["aria-label"], Dn = ["aria-pressed", "disabled", "onClick"], Kn = /* @__PURE__ */ k({
|
|
2439
|
-
__name: "SettingsPanel",
|
|
2440
|
-
props: {
|
|
2441
|
-
sections: {}
|
|
2442
|
-
},
|
|
2443
|
-
emits: ["change"],
|
|
2444
|
-
setup(e, { emit: c }) {
|
|
2445
|
-
const t = c;
|
|
2446
|
-
function i(u, b) {
|
|
2447
|
-
t("change", u, b);
|
|
2448
|
-
}
|
|
2449
|
-
function l(u, b) {
|
|
2450
|
-
typeof b == "boolean" && i(u, b);
|
|
2451
|
-
}
|
|
2452
|
-
function r(u, b) {
|
|
2453
|
-
(typeof b == "string" || typeof b == "number") && i(u, b);
|
|
2454
|
-
}
|
|
2455
|
-
function n(u, b) {
|
|
2456
|
-
typeof b == "number" && Number.isFinite(b) && i(u, b);
|
|
2457
|
-
}
|
|
2458
|
-
return (u, b) => (a(), o("div", Pn, [
|
|
2459
|
-
(a(!0), o(x, null, M(e.sections, (g) => (a(), o("section", {
|
|
2460
|
-
key: g.title,
|
|
2461
|
-
class: "dsea-settings-panel__section"
|
|
2462
|
-
}, [
|
|
2463
|
-
s("h3", null, d(g.title), 1),
|
|
2464
|
-
(a(!0), o(x, null, M(g.items, (v) => (a(), o("div", {
|
|
2465
|
-
key: v.key,
|
|
2466
|
-
class: N(["dsea-settings-panel__row", { "dsea-settings-panel__row--stacked": v.type === "color" || v.type === "mode" }])
|
|
2467
|
-
}, [
|
|
2468
|
-
v.type === "switch" || v.type === "select" || v.type === "number" ? (a(), o("label", {
|
|
2469
|
-
key: 0,
|
|
2470
|
-
for: v.key
|
|
2471
|
-
}, d(v.label), 9, In)) : (a(), o("span", En, d(v.label), 1)),
|
|
2472
|
-
v.type === "switch" ? (a(), P(y(ye), {
|
|
2473
|
-
key: 2,
|
|
2474
|
-
id: v.key,
|
|
2475
|
-
checked: v.value,
|
|
2476
|
-
disabled: v.disabled,
|
|
2477
|
-
onChange: (m) => l(v.key, m)
|
|
2478
|
-
}, null, 8, ["id", "checked", "disabled", "onChange"])) : v.type === "select" ? (a(), P(y(ke), {
|
|
2479
|
-
key: 3,
|
|
2480
|
-
id: v.key,
|
|
2481
|
-
value: v.value,
|
|
2482
|
-
options: v.options,
|
|
2483
|
-
disabled: v.disabled,
|
|
2484
|
-
class: "dsea-settings-panel__select",
|
|
2485
|
-
onChange: (m) => r(v.key, m)
|
|
2486
|
-
}, null, 8, ["id", "value", "options", "disabled", "onChange"])) : v.type === "number" ? (a(), P(y(_e), {
|
|
2487
|
-
key: 4,
|
|
2488
|
-
id: v.key,
|
|
2489
|
-
value: v.value,
|
|
2490
|
-
min: v.min,
|
|
2491
|
-
max: v.max,
|
|
2492
|
-
step: v.step,
|
|
2493
|
-
disabled: v.disabled,
|
|
2494
|
-
class: "dsea-settings-panel__number",
|
|
2495
|
-
onChange: (m) => n(v.key, m)
|
|
2496
|
-
}, null, 8, ["id", "value", "min", "max", "step", "disabled", "onChange"])) : v.type === "color" ? (a(), o("div", {
|
|
2497
|
-
key: 5,
|
|
2498
|
-
class: "dsea-settings-panel__colors",
|
|
2499
|
-
role: "group",
|
|
2500
|
-
"aria-label": v.label
|
|
2501
|
-
}, [
|
|
2502
|
-
(a(!0), o(x, null, M(v.colors, (m) => (a(), o("button", {
|
|
2503
|
-
key: m,
|
|
2504
|
-
type: "button",
|
|
2505
|
-
class: N(["dsea-settings-panel__swatch", { "dsea-settings-panel__swatch--active": v.value === m }]),
|
|
2506
|
-
style: ie({ backgroundColor: m }),
|
|
2507
|
-
"aria-label": m,
|
|
2508
|
-
"aria-pressed": v.value === m,
|
|
2509
|
-
disabled: v.disabled,
|
|
2510
|
-
onClick: (L) => i(v.key, m)
|
|
2511
|
-
}, [
|
|
2512
|
-
v.value === m ? (a(), P(y(w), {
|
|
2513
|
-
key: 0,
|
|
2514
|
-
icon: "lucide:check",
|
|
2515
|
-
size: 14
|
|
2516
|
-
})) : p("", !0)
|
|
2517
|
-
], 14, Nn))), 128))
|
|
2518
|
-
], 8, Fn)) : v.type === "mode" ? (a(), o("div", {
|
|
2519
|
-
key: 6,
|
|
2520
|
-
class: "dsea-settings-panel__modes",
|
|
2521
|
-
role: "group",
|
|
2522
|
-
"aria-label": v.label
|
|
2523
|
-
}, [
|
|
2524
|
-
(a(!0), o(x, null, M(v.options, (m) => (a(), o("button", {
|
|
2525
|
-
key: m.value,
|
|
2526
|
-
type: "button",
|
|
2527
|
-
class: N({ active: v.value === m.value }),
|
|
2528
|
-
"aria-pressed": v.value === m.value,
|
|
2529
|
-
disabled: v.disabled,
|
|
2530
|
-
onClick: (L) => i(v.key, m.value)
|
|
2531
|
-
}, [
|
|
2532
|
-
m.icon ? (a(), P(y(w), {
|
|
2533
|
-
key: 0,
|
|
2534
|
-
icon: m.icon,
|
|
2535
|
-
size: 16
|
|
2536
|
-
}, null, 8, ["icon"])) : p("", !0),
|
|
2537
|
-
z(" " + d(m.label), 1)
|
|
2538
|
-
], 10, Dn))), 128))
|
|
2539
|
-
], 8, zn)) : p("", !0)
|
|
2540
|
-
], 2))), 128))
|
|
2541
|
-
]))), 128))
|
|
2542
|
-
]));
|
|
2543
|
-
}
|
|
2544
|
-
});
|
|
2545
|
-
const _l = /* @__PURE__ */ k({
|
|
2546
|
-
__name: "AdminSettingsDrawer",
|
|
2547
|
-
props: {
|
|
2548
|
-
open: { type: Boolean },
|
|
2549
|
-
title: {},
|
|
2550
|
-
sections: {},
|
|
2551
|
-
width: { default: 340 },
|
|
2552
|
-
resetLabel: {}
|
|
2553
|
-
},
|
|
2554
|
-
emits: ["update:open", "change", "reset"],
|
|
2555
|
-
setup(e, { emit: c }) {
|
|
2556
|
-
const t = c;
|
|
2557
|
-
return (i, l) => (a(), P(y(we), {
|
|
2558
|
-
visible: e.open,
|
|
2559
|
-
title: e.title,
|
|
2560
|
-
placement: "right",
|
|
2561
|
-
width: e.width,
|
|
2562
|
-
onClose: l[2] || (l[2] = (r) => t("update:open", !1))
|
|
2563
|
-
}, fe({
|
|
2564
|
-
default: j(() => [
|
|
2565
|
-
$(Kn, {
|
|
2566
|
-
sections: e.sections,
|
|
2567
|
-
onChange: l[0] || (l[0] = (r, n) => t("change", r, n))
|
|
2568
|
-
}, null, 8, ["sections"])
|
|
2569
|
-
]),
|
|
2570
|
-
_: 2
|
|
2571
|
-
}, [
|
|
2572
|
-
i.$slots.footer || e.resetLabel ? {
|
|
2573
|
-
name: "footer",
|
|
2574
|
-
fn: j(() => [
|
|
2575
|
-
B(i.$slots, "footer", {}, () => [
|
|
2576
|
-
s("button", {
|
|
2577
|
-
type: "button",
|
|
2578
|
-
class: "dsea-settings-drawer__reset",
|
|
2579
|
-
onClick: l[1] || (l[1] = (r) => t("reset"))
|
|
2580
|
-
}, d(e.resetLabel), 1)
|
|
2581
|
-
])
|
|
2582
|
-
]),
|
|
2583
|
-
key: "0"
|
|
2584
|
-
} : void 0
|
|
2585
|
-
]), 1032, ["visible", "title", "width"]));
|
|
2586
|
-
}
|
|
2587
|
-
});
|
|
2588
3382
|
export {
|
|
2589
|
-
|
|
2590
|
-
|
|
2591
|
-
|
|
2592
|
-
|
|
2593
|
-
|
|
2594
|
-
|
|
2595
|
-
|
|
2596
|
-
|
|
2597
|
-
|
|
2598
|
-
|
|
2599
|
-
|
|
2600
|
-
|
|
2601
|
-
|
|
2602
|
-
|
|
2603
|
-
|
|
2604
|
-
|
|
2605
|
-
|
|
2606
|
-
|
|
2607
|
-
|
|
2608
|
-
|
|
2609
|
-
|
|
2610
|
-
|
|
2611
|
-
|
|
2612
|
-
|
|
2613
|
-
|
|
2614
|
-
|
|
2615
|
-
|
|
2616
|
-
|
|
2617
|
-
|
|
2618
|
-
|
|
2619
|
-
|
|
2620
|
-
|
|
2621
|
-
|
|
2622
|
-
|
|
2623
|
-
|
|
2624
|
-
|
|
2625
|
-
|
|
2626
|
-
|
|
2627
|
-
|
|
2628
|
-
|
|
2629
|
-
|
|
2630
|
-
|
|
2631
|
-
|
|
3383
|
+
Po as AdminAboutView,
|
|
3384
|
+
Mt as AdminAppSwitcher,
|
|
3385
|
+
_a as AdminBreadcrumb,
|
|
3386
|
+
To as AdminErrorLogView,
|
|
3387
|
+
Co as AdminExceptionView,
|
|
3388
|
+
vt as AdminFullscreenButton,
|
|
3389
|
+
So as AdminIframeView,
|
|
3390
|
+
ko as AdminLayout,
|
|
3391
|
+
$o as AdminLockView,
|
|
3392
|
+
_o as AdminLoginView,
|
|
3393
|
+
na as AdminNotificationCenter,
|
|
3394
|
+
Mo as AdminPasswordForm,
|
|
3395
|
+
Lo as AdminProfileForm,
|
|
3396
|
+
xo as AdminProfileTabs,
|
|
3397
|
+
Ao as AdminSecuritySettings,
|
|
3398
|
+
Va as AdminSettingsDrawer,
|
|
3399
|
+
Ea as AdminTabs,
|
|
3400
|
+
qt as AdminUserMenu,
|
|
3401
|
+
Fo as AgentApprovalCard,
|
|
3402
|
+
Il as AgentAttachmentList,
|
|
3403
|
+
Bo as AgentComposer,
|
|
3404
|
+
Ol as AgentModelSelect,
|
|
3405
|
+
po as AppDarkModeToggle,
|
|
3406
|
+
rt as AppLocalePicker,
|
|
3407
|
+
ve as AppLogo,
|
|
3408
|
+
yo as AppProvider,
|
|
3409
|
+
zt as AppSearch,
|
|
3410
|
+
oe as BasicMenu,
|
|
3411
|
+
wo as ClassicAdminLayout,
|
|
3412
|
+
Oa as SettingsPanel,
|
|
3413
|
+
bo as SimpleMenu,
|
|
3414
|
+
ho as SimpleMenuTag,
|
|
3415
|
+
Ee as adminMenuKey,
|
|
3416
|
+
Me as adminShellMessages,
|
|
3417
|
+
Ne as appProviderKey,
|
|
3418
|
+
ae as classicLayoutDefaults,
|
|
3419
|
+
Eo as closeTabs,
|
|
3420
|
+
go as createAdminMenuPlugin,
|
|
3421
|
+
ze as createAppProviderContext,
|
|
3422
|
+
qa as createClassicLayoutSettingsController,
|
|
3423
|
+
De as firstClassicPage,
|
|
3424
|
+
mo as getAdminShellMessage,
|
|
3425
|
+
ue as getAllParentPath,
|
|
3426
|
+
vo as legacyAdminMessages,
|
|
3427
|
+
Io as nextActiveTab,
|
|
3428
|
+
ke as normalizeClassicLayoutSettings,
|
|
3429
|
+
Ha as resolveClassicNavigation,
|
|
3430
|
+
Se as useAdminMenuPort,
|
|
3431
|
+
fo as useAppProviderContext
|
|
2632
3432
|
};
|