vlite3 1.3.6 → 1.3.7
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/components/CategoryManager/CategoryManager.vue2.js +1 -1
- package/components/ColorPicker/ColorIro.vue3.js +2 -2
- package/components/ColorPicker/ColorPicker.vue.js +2 -2
- package/components/CommandPalette/CommandPaletteContent.vue2.js +1 -1
- package/components/CommandPalette/{CommandPaletteItem.vue2.js → CommandPaletteItem.vue.js} +1 -1
- package/components/Dropdown/DropdownMenu.vue.js +1 -1
- package/components/Form/CustomFields.vue.js +1 -1
- package/components/Form/CustomFields.vue2.js +1 -1
- package/components/ImportData/ImportStep1.vue.d.ts +2 -2
- package/components/ImportData/ImportStep2.vue.d.ts +2 -2
- package/components/Navbar/NavbarTabs.vue.js +82 -82
- package/components/NavbarCommandPalette.vue.js +1 -1
- package/components/PermissionMatrix/PermissionTopBar.vue.js +36 -36
- package/components/Screen/ScreenFilter.vue.js +1 -1
- package/components/SidebarMenu/SidebarMenuItem.vue.js +193 -187
- package/package.json +1 -1
- package/style.css +56 -45
- /package/components/ColorPicker/{ColorIro.vue2.js → ColorIro.vue.js} +0 -0
- /package/components/Dropdown/{DropdownMenu.vue2.js → DropdownMenu.vue3.js} +0 -0
|
@@ -6,8 +6,8 @@ import O from "../Input.vue.js";
|
|
|
6
6
|
import "../../core/config.js";
|
|
7
7
|
/* empty css */
|
|
8
8
|
import y from "../Button.vue.js";
|
|
9
|
-
import E from "./ColorIro.
|
|
10
|
-
/* empty css
|
|
9
|
+
import E from "./ColorIro.vue.js";
|
|
10
|
+
/* empty css */
|
|
11
11
|
import { useEyeDropper as P } from "@vueuse/core";
|
|
12
12
|
const I = {
|
|
13
13
|
key: 0,
|
|
@@ -4,7 +4,7 @@ import k from "../Icon.vue.js";
|
|
|
4
4
|
import { $t as E } from "../../utils/i18n.js";
|
|
5
5
|
import { useCommandPaletteItems as Y } from "./useCommandPaletteItems.js";
|
|
6
6
|
import { useCommandPaletteNav as Z } from "./useCommandPaletteNav.js";
|
|
7
|
-
import ee from "./CommandPaletteItem.
|
|
7
|
+
import ee from "./CommandPaletteItem.vue.js";
|
|
8
8
|
const te = { class: "command-palette-content flex flex-col w-full h-full max-h-[70vh]" }, oe = { class: "flex items-center gap-3 px-4 py-3 border-b border-border/80 shrink-0" }, se = ["placeholder"], ne = ["aria-label"], re = {
|
|
9
9
|
key: 0,
|
|
10
10
|
class: "flex flex-col items-center justify-center py-14 px-6 text-center select-none",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./CustomFields.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import t from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const s = /* @__PURE__ */ t(o, [["__scopeId", "data-v-
|
|
4
|
+
const s = /* @__PURE__ */ t(o, [["__scopeId", "data-v-58c4250f"]]);
|
|
5
5
|
export {
|
|
6
6
|
s as default
|
|
7
7
|
};
|
|
@@ -155,7 +155,7 @@ const ie = { class: "custom-fields-wrapper" }, ce = { class: "flex justify-betwe
|
|
|
155
155
|
}, null, 8, ["disabled"]))
|
|
156
156
|
]),
|
|
157
157
|
p("div", me, [
|
|
158
|
-
R.value.length >
|
|
158
|
+
R.value.length > 1 ? (n(), d("div", be, [
|
|
159
159
|
r.draggable && !r.disabled && !r.readonly ? (n(), d("div", fe)) : i("", !0),
|
|
160
160
|
r.showRowNumbers ? (n(), d("div", ve, " # ")) : i("", !0),
|
|
161
161
|
(n(!0), d(V, null, C(R.value, (o, l) => (n(), d("div", {
|
|
@@ -8,21 +8,21 @@ type __VLS_Props = {
|
|
|
8
8
|
importData: any[];
|
|
9
9
|
};
|
|
10
10
|
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
11
|
-
next: (...args: any[]) => void;
|
|
12
11
|
"update:importMethod": (...args: any[]) => void;
|
|
13
12
|
"update:csvFile": (...args: any[]) => void;
|
|
14
13
|
"update:mappings": (...args: any[]) => void;
|
|
15
14
|
"update:headers": (...args: any[]) => void;
|
|
16
15
|
"update:preview": (...args: any[]) => void;
|
|
17
16
|
"update:importData": (...args: any[]) => void;
|
|
17
|
+
next: (...args: any[]) => void;
|
|
18
18
|
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
19
|
-
onNext?: (...args: any[]) => any;
|
|
20
19
|
"onUpdate:importMethod"?: (...args: any[]) => any;
|
|
21
20
|
"onUpdate:csvFile"?: (...args: any[]) => any;
|
|
22
21
|
"onUpdate:mappings"?: (...args: any[]) => any;
|
|
23
22
|
"onUpdate:headers"?: (...args: any[]) => any;
|
|
24
23
|
"onUpdate:preview"?: (...args: any[]) => any;
|
|
25
24
|
"onUpdate:importData"?: (...args: any[]) => any;
|
|
25
|
+
onNext?: (...args: any[]) => any;
|
|
26
26
|
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
27
27
|
fileInput: HTMLInputElement;
|
|
28
28
|
}, HTMLDivElement>;
|
|
@@ -9,12 +9,12 @@ type __VLS_Props = {
|
|
|
9
9
|
}[];
|
|
10
10
|
};
|
|
11
11
|
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
12
|
-
next: (...args: any[]) => void;
|
|
13
12
|
"update:mappings": (...args: any[]) => void;
|
|
13
|
+
next: (...args: any[]) => void;
|
|
14
14
|
prev: (...args: any[]) => void;
|
|
15
15
|
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
16
|
-
onNext?: (...args: any[]) => any;
|
|
17
16
|
"onUpdate:mappings"?: (...args: any[]) => any;
|
|
17
|
+
onNext?: (...args: any[]) => any;
|
|
18
18
|
onPrev?: (...args: any[]) => any;
|
|
19
19
|
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
20
20
|
export default _default;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { defineComponent as A, ref as
|
|
2
|
-
import { useRoute as
|
|
1
|
+
import { defineComponent as A, ref as d, onMounted as F, nextTick as k, onUnmounted as H, watch as T, openBlock as s, createElementBlock as b, normalizeClass as v, createVNode as g, Transition as _, withCtx as w, createElementVNode as l, createCommentVNode as p, Fragment as U, renderList as q, isMemoSame as G, createBlock as C, resolveDynamicComponent as J, mergeProps as K, toDisplayString as O, unref as Q } from "vue";
|
|
2
|
+
import { useRoute as X } from "vue-router";
|
|
3
3
|
import m from "../Icon.vue.js";
|
|
4
|
-
import { $t as
|
|
5
|
-
const
|
|
4
|
+
import { $t as Y } from "../../utils/i18n.js";
|
|
5
|
+
const Z = {
|
|
6
6
|
key: 0,
|
|
7
7
|
class: "absolute left-0 top-0 bottom-0 z-10 flex items-center pointer-events-none"
|
|
8
|
-
},
|
|
8
|
+
}, ee = { class: "truncate" }, te = {
|
|
9
9
|
key: 0,
|
|
10
10
|
class: "absolute right-0 top-0 bottom-0 z-10 flex items-center justify-end pointer-events-none"
|
|
11
|
-
},
|
|
11
|
+
}, le = /* @__PURE__ */ A({
|
|
12
12
|
__name: "NavbarTabs",
|
|
13
13
|
props: {
|
|
14
14
|
items: {},
|
|
@@ -19,91 +19,93 @@ const Q = {
|
|
|
19
19
|
class: { default: "" }
|
|
20
20
|
},
|
|
21
21
|
setup(a) {
|
|
22
|
-
const n = a, i =
|
|
23
|
-
const o = i.value;
|
|
24
|
-
o && (C.value = o.scrollLeft > 2, I.value = o.scrollLeft + o.clientWidth < o.scrollWidth - 2);
|
|
25
|
-
}, R = (o) => {
|
|
22
|
+
const n = a, i = d(null), I = d(!1), z = d(!1), c = () => {
|
|
26
23
|
const t = i.value;
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
24
|
+
t && (I.value = t.scrollLeft > 2, z.value = t.scrollLeft + t.clientWidth < t.scrollWidth - 2);
|
|
25
|
+
}, R = (t) => {
|
|
26
|
+
const r = i.value;
|
|
27
|
+
if (!r) return;
|
|
28
|
+
const e = r.clientWidth * 0.6;
|
|
29
|
+
r.scrollBy({ left: t === "right" ? e : -e, behavior: "smooth" });
|
|
30
30
|
};
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
31
|
+
F(() => {
|
|
32
|
+
k(() => {
|
|
33
|
+
c(), i.value?.addEventListener("scroll", c, { passive: !0 });
|
|
34
34
|
});
|
|
35
|
-
}),
|
|
36
|
-
i.value?.removeEventListener("scroll",
|
|
35
|
+
}), H(() => {
|
|
36
|
+
i.value?.removeEventListener("scroll", c);
|
|
37
37
|
});
|
|
38
|
-
const h =
|
|
39
|
-
|
|
38
|
+
const h = X();
|
|
39
|
+
T(
|
|
40
40
|
() => h.path,
|
|
41
|
-
() =>
|
|
41
|
+
() => k(c)
|
|
42
42
|
);
|
|
43
|
-
const x =
|
|
44
|
-
const e =
|
|
45
|
-
e instanceof HTMLElement ? x.value.set(
|
|
43
|
+
const x = d(/* @__PURE__ */ new Map()), E = (t, r) => {
|
|
44
|
+
const e = t?.$el ?? t;
|
|
45
|
+
e instanceof HTMLElement ? x.value.set(r, e) : x.value.delete(r);
|
|
46
46
|
};
|
|
47
|
-
|
|
47
|
+
T(
|
|
48
48
|
() => h.path,
|
|
49
|
-
(
|
|
50
|
-
|
|
51
|
-
const
|
|
52
|
-
if (
|
|
53
|
-
x.value.get(
|
|
49
|
+
(t) => {
|
|
50
|
+
k(() => {
|
|
51
|
+
const r = n.items.findIndex((o) => u(o));
|
|
52
|
+
if (r === -1) return;
|
|
53
|
+
x.value.get(r)?.scrollIntoView({ block: "nearest", inline: "center", behavior: "smooth" });
|
|
54
54
|
});
|
|
55
55
|
},
|
|
56
56
|
{ immediate: !0 }
|
|
57
57
|
);
|
|
58
|
-
const
|
|
58
|
+
const V = {
|
|
59
59
|
line: "flex border-b border-border gap-0",
|
|
60
60
|
pill: "flex gap-1 p-1 bg-secondary/80 rounded-lg",
|
|
61
61
|
solid: "flex gap-0",
|
|
62
62
|
ghost: "flex gap-1"
|
|
63
|
-
},
|
|
63
|
+
}, $ = {
|
|
64
64
|
sm: "px-2.5 py-1.5 text-xs",
|
|
65
65
|
md: "px-3.5 py-2 text-sm",
|
|
66
66
|
lg: "px-5 py-2.5 text-base"
|
|
67
|
-
},
|
|
67
|
+
}, M = {
|
|
68
68
|
line: "text-primary border-b-2 border-primary -mb-px",
|
|
69
69
|
pill: "bg-background text-foreground shadow-sm",
|
|
70
70
|
solid: "bg-primary-light text-primary-dark",
|
|
71
71
|
ghost: "bg-accent text-accent-foreground"
|
|
72
|
-
},
|
|
72
|
+
}, N = {
|
|
73
73
|
line: "text-muted-foreground border-b-2 border-transparent hover:text-foreground hover:border-border",
|
|
74
74
|
pill: "text-muted-foreground hover:text-foreground hover:bg-accent/50",
|
|
75
75
|
solid: "text-muted-foreground hover:text-foreground hover:bg-accent/50",
|
|
76
76
|
ghost: "text-muted-foreground hover:text-foreground hover:bg-accent/50"
|
|
77
|
-
},
|
|
78
|
-
const
|
|
79
|
-
if (!
|
|
80
|
-
const e = typeof
|
|
77
|
+
}, u = (t) => {
|
|
78
|
+
const r = h.path;
|
|
79
|
+
if (!t.to) return !1;
|
|
80
|
+
const e = typeof t.to == "string" ? t.to : t.to.path;
|
|
81
81
|
if (!e) return !1;
|
|
82
|
-
if (
|
|
83
|
-
return
|
|
84
|
-
if (
|
|
85
|
-
if (
|
|
86
|
-
const
|
|
87
|
-
return
|
|
82
|
+
if (t.exact || e === "/")
|
|
83
|
+
return r === e;
|
|
84
|
+
if (r === e) return !0;
|
|
85
|
+
if (r.startsWith(e)) {
|
|
86
|
+
const o = r[e.length];
|
|
87
|
+
return o === "/" || o === "?" || o === "#" || o === void 0;
|
|
88
88
|
}
|
|
89
89
|
return !1;
|
|
90
|
-
},
|
|
91
|
-
const
|
|
92
|
-
return [
|
|
90
|
+
}, W = (t) => {
|
|
91
|
+
const r = "group relative inline-flex items-center justify-center gap-2 font-medium whitespace-nowrap shrink-0 select-none cursor-pointer outline-none focus-visible:ring-2 focus-visible:ring-primary/50 focus-visible:ring-offset-1", e = t.disabled ? "opacity-50 pointer-events-none cursor-not-allowed" : "", S = u(t) ? n.activeClass || M[n.variant] : n.inactiveClass || N[n.variant];
|
|
92
|
+
return [r, $[n.size], S, e].filter(Boolean).join(" ");
|
|
93
|
+
}, j = (t) => t.to ? "router-link" : t.href ? "a" : "button", D = (t) => t.to ? { to: t.to } : t.href ? { href: t.href, target: "_blank", rel: "noopener noreferrer" } : { type: "button" }, P = (t, r) => {
|
|
94
|
+
r.disabled && t.preventDefault();
|
|
93
95
|
};
|
|
94
|
-
return (
|
|
95
|
-
class:
|
|
96
|
+
return (t, r) => (s(), b("div", {
|
|
97
|
+
class: v(["relative flex items-center w-full min-w-0 border-b", n.class])
|
|
96
98
|
}, [
|
|
97
|
-
g(
|
|
98
|
-
default:
|
|
99
|
-
|
|
100
|
-
|
|
99
|
+
g(_, { name: "fade-x" }, {
|
|
100
|
+
default: w(() => [
|
|
101
|
+
I.value ? (s(), b("div", Z, [
|
|
102
|
+
r[4] || (r[4] = l("div", { class: "w-8 h-full bg-gradient-to-r from-background to-transparent" }, null, -1)),
|
|
101
103
|
l("button", {
|
|
102
104
|
type: "button",
|
|
103
105
|
class: "pointer-events-auto absolute left-0 bg-body h-full px-1 flex items-center text-muted-foreground hover:text-foreground transition-colors",
|
|
104
106
|
"aria-label": "Scroll tabs left",
|
|
105
107
|
tabindex: "-1",
|
|
106
|
-
onClick:
|
|
108
|
+
onClick: r[0] || (r[0] = (e) => R("left"))
|
|
107
109
|
}, [
|
|
108
110
|
g(m, {
|
|
109
111
|
icon: "lucide:chevron-left",
|
|
@@ -118,56 +120,54 @@ const Q = {
|
|
|
118
120
|
ref_key: "scrollRef",
|
|
119
121
|
ref: i,
|
|
120
122
|
role: "tablist",
|
|
121
|
-
class:
|
|
123
|
+
class: v([
|
|
122
124
|
"flex-1 overflow-x-auto scroll-smooth navbar-tabs-no-scrollbar",
|
|
123
|
-
|
|
125
|
+
V[a.variant]
|
|
124
126
|
]),
|
|
125
127
|
style: { "will-change": "transform", contain: "layout style" },
|
|
126
128
|
"aria-label": "Page tabs"
|
|
127
129
|
}, [
|
|
128
|
-
(s(!0),
|
|
129
|
-
const L = [e,
|
|
130
|
-
if (f && f.key ===
|
|
131
|
-
const
|
|
132
|
-
key: r,
|
|
130
|
+
(s(!0), b(U, null, q(a.items, (e, o, S, f) => {
|
|
131
|
+
const L = [e, u(e), e.disabled];
|
|
132
|
+
if (f && f.key === o && G(f, L)) return f;
|
|
133
|
+
const B = (s(), C(J(j(e)), K({ key: o }, { ref_for: !0 }, D(e), {
|
|
133
134
|
ref_for: !0,
|
|
134
|
-
ref: (
|
|
135
|
-
to: e.to || "",
|
|
135
|
+
ref: (y) => E(y, o),
|
|
136
136
|
role: "tab",
|
|
137
|
-
"aria-selected":
|
|
137
|
+
"aria-selected": u(e),
|
|
138
138
|
"aria-disabled": e.disabled || void 0,
|
|
139
139
|
tabindex: e.disabled ? -1 : 0,
|
|
140
|
-
class:
|
|
141
|
-
onClick:
|
|
142
|
-
}, {
|
|
143
|
-
default:
|
|
144
|
-
e.icon ? (s(),
|
|
140
|
+
class: W(e),
|
|
141
|
+
onClick: (y) => P(y, e)
|
|
142
|
+
}), {
|
|
143
|
+
default: w(() => [
|
|
144
|
+
e.icon ? (s(), C(m, {
|
|
145
145
|
key: 0,
|
|
146
146
|
icon: e.icon,
|
|
147
|
-
class:
|
|
147
|
+
class: v(["shrink-0", a.size === "sm" ? "w-3.5 h-3.5" : "w-4 h-4"])
|
|
148
148
|
}, null, 8, ["icon", "class"])) : p("", !0),
|
|
149
|
-
l("span",
|
|
150
|
-
e.iconRight ? (s(),
|
|
149
|
+
l("span", ee, O(e.labelI18n ? Q(Y)(e.labelI18n) : e.label), 1),
|
|
150
|
+
e.iconRight ? (s(), C(m, {
|
|
151
151
|
key: 1,
|
|
152
152
|
icon: e.iconRight,
|
|
153
|
-
class:
|
|
153
|
+
class: v(["shrink-0 opacity-70", a.size === "sm" ? "w-3.5 h-3.5" : "w-4 h-4"])
|
|
154
154
|
}, null, 8, ["icon", "class"])) : p("", !0)
|
|
155
155
|
]),
|
|
156
156
|
_: 2
|
|
157
|
-
},
|
|
158
|
-
return
|
|
159
|
-
},
|
|
157
|
+
}, 1040, ["aria-selected", "aria-disabled", "tabindex", "class", "onClick"]));
|
|
158
|
+
return B.memo = L, B;
|
|
159
|
+
}, r, 1), 128))
|
|
160
160
|
], 2),
|
|
161
|
-
g(
|
|
162
|
-
default:
|
|
163
|
-
|
|
164
|
-
|
|
161
|
+
g(_, { name: "fade-x" }, {
|
|
162
|
+
default: w(() => [
|
|
163
|
+
z.value ? (s(), b("div", te, [
|
|
164
|
+
r[5] || (r[5] = l("div", { class: "w-8 h-full bg-gradient-to-l from-background to-transparent" }, null, -1)),
|
|
165
165
|
l("button", {
|
|
166
166
|
type: "button",
|
|
167
167
|
class: "pointer-events-auto absolute right-0 h-full px-1 flex items-center text-muted-foreground hover:text-foreground transition-colors bg-body",
|
|
168
168
|
"aria-label": "Scroll tabs right",
|
|
169
169
|
tabindex: "-1",
|
|
170
|
-
onClick:
|
|
170
|
+
onClick: r[3] || (r[3] = (e) => R("right"))
|
|
171
171
|
}, [
|
|
172
172
|
g(m, {
|
|
173
173
|
icon: "lucide:chevron-right",
|
|
@@ -182,5 +182,5 @@ const Q = {
|
|
|
182
182
|
}
|
|
183
183
|
});
|
|
184
184
|
export {
|
|
185
|
-
|
|
185
|
+
le as default
|
|
186
186
|
};
|
|
@@ -3,7 +3,7 @@ import L from "./Icon.vue.js";
|
|
|
3
3
|
import v from "./Modal.vue.js";
|
|
4
4
|
import N from "./CommandPalette/CommandPaletteContent.vue.js";
|
|
5
5
|
import { $t as U } from "../utils/i18n.js";
|
|
6
|
-
/* empty css
|
|
6
|
+
/* empty css */
|
|
7
7
|
const V = { class: "block truncate -text-fs-1.5" }, S = { class: "ml-auto inline-flex items-center gap-0.5 px-1.5 py-0.5 rounded text-[10px] font-mono font-medium border border-border/80 bg-background text-muted-foreground ml-1" }, A = /* @__PURE__ */ x({
|
|
8
8
|
__name: "NavbarCommandPalette",
|
|
9
9
|
props: {
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { defineComponent as w, computed as k, openBlock as l, createElementBlock as n, createElementVNode as
|
|
2
|
-
import
|
|
1
|
+
import { defineComponent as w, computed as k, openBlock as l, createElementBlock as n, createElementVNode as r, createVNode as c, createCommentVNode as i, unref as C, withCtx as p, withModifiers as G, createBlock as z, toDisplayString as a, normalizeClass as u } from "vue";
|
|
2
|
+
import $ from "../Input.vue.js";
|
|
3
3
|
/* empty css */
|
|
4
|
-
import
|
|
4
|
+
import y from "../Icon.vue.js";
|
|
5
5
|
import K from "../CheckBox.vue.js";
|
|
6
6
|
import B from "../Dropdown/Dropdown.vue.js";
|
|
7
7
|
import "../../core/config.js";
|
|
8
8
|
/* empty css */
|
|
9
|
-
const S = { class: "flex flex-col sm:flex-row items-start sm:items-center gap-3 mb-4" },
|
|
9
|
+
const S = { class: "flex flex-col sm:flex-row items-start sm:items-center gap-3 mb-4" }, A = { class: "flex items-center gap-2 flex-1 w-full sm:max-w-lg" }, Q = {
|
|
10
10
|
key: 0,
|
|
11
11
|
class: "flex-1"
|
|
12
|
-
},
|
|
12
|
+
}, V = {
|
|
13
13
|
key: 0,
|
|
14
14
|
class: "inline-flex items-center justify-center rounded-full bg-primary text-primary-foreground text-[10px] font-bold min-w-[18px] h-[18px] px-1"
|
|
15
|
-
}, N = ["onClick"], P = { class: "text-sm" },
|
|
15
|
+
}, N = ["onClick"], P = { class: "text-sm" }, E = {
|
|
16
16
|
key: 0,
|
|
17
17
|
class: "border-t px-3 py-1.5"
|
|
18
|
-
},
|
|
18
|
+
}, F = { class: "flex items-center gap-3 ml-auto" }, I = /* @__PURE__ */ w({
|
|
19
19
|
__name: "PermissionTopBar",
|
|
20
20
|
props: {
|
|
21
21
|
searchQuery: {},
|
|
@@ -28,22 +28,22 @@ const S = { class: "flex flex-col sm:flex-row items-start sm:items-center gap-3
|
|
|
28
28
|
groupOptions: {}
|
|
29
29
|
},
|
|
30
30
|
emits: ["update:searchQuery", "update:selectedGroupKeys", "selectAll", "clearAll"],
|
|
31
|
-
setup(e, { emit:
|
|
32
|
-
const
|
|
33
|
-
function
|
|
34
|
-
const t =
|
|
31
|
+
setup(e, { emit: h }) {
|
|
32
|
+
const f = e, d = h, m = k(() => f.size === "sm" ? "text-xs" : "text-sm");
|
|
33
|
+
function g(s) {
|
|
34
|
+
const t = f.selectedGroupKeys, o = t.includes(s) ? t.filter((x) => x !== s) : [...t, s];
|
|
35
35
|
d("update:selectedGroupKeys", o);
|
|
36
36
|
}
|
|
37
37
|
function v() {
|
|
38
38
|
d("update:selectedGroupKeys", []);
|
|
39
39
|
}
|
|
40
|
-
function b(
|
|
41
|
-
d("update:searchQuery", String(
|
|
40
|
+
function b(s) {
|
|
41
|
+
d("update:searchQuery", String(s));
|
|
42
42
|
}
|
|
43
|
-
return (
|
|
44
|
-
|
|
45
|
-
e.searchable ? (l(), n("div",
|
|
46
|
-
c(
|
|
43
|
+
return (s, t) => (l(), n("div", S, [
|
|
44
|
+
r("div", A, [
|
|
45
|
+
e.searchable ? (l(), n("div", Q, [
|
|
46
|
+
c($, {
|
|
47
47
|
"model-value": e.searchQuery,
|
|
48
48
|
"onUpdate:modelValue": b,
|
|
49
49
|
placeholder: "Search permissions...",
|
|
@@ -58,8 +58,8 @@ const S = { class: "flex flex-col sm:flex-row items-start sm:items-center gap-3
|
|
|
58
58
|
selectable: !1,
|
|
59
59
|
position: "bottom-end"
|
|
60
60
|
}, {
|
|
61
|
-
trigger:
|
|
62
|
-
|
|
61
|
+
trigger: p(() => [
|
|
62
|
+
r("button", {
|
|
63
63
|
type: "button",
|
|
64
64
|
class: u([
|
|
65
65
|
"inline-flex items-center gap-1.5 border rounded-md cursor-pointer transition-colors",
|
|
@@ -67,35 +67,35 @@ const S = { class: "flex flex-col sm:flex-row items-start sm:items-center gap-3
|
|
|
67
67
|
e.selectedGroupKeys.length > 0 ? "border-primary bg-primary/5 text-primary" : "border-border text-muted-foreground hover:text-foreground hover:bg-accent"
|
|
68
68
|
])
|
|
69
69
|
}, [
|
|
70
|
-
c(
|
|
70
|
+
c(y, {
|
|
71
71
|
icon: "lucide:filter",
|
|
72
72
|
class: "w-3.5 h-3.5"
|
|
73
73
|
}),
|
|
74
|
-
t[2] || (t[2] =
|
|
75
|
-
e.selectedGroupKeys.length > 0 ? (l(), n("span",
|
|
74
|
+
t[2] || (t[2] = r("span", { class: "hidden sm:inline" }, "Modules", -1)),
|
|
75
|
+
e.selectedGroupKeys.length > 0 ? (l(), n("span", V, a(e.selectedGroupKeys.length), 1)) : i("", !0)
|
|
76
76
|
], 2)
|
|
77
77
|
]),
|
|
78
|
-
item:
|
|
79
|
-
|
|
78
|
+
item: p(({ option: o }) => [
|
|
79
|
+
r("div", {
|
|
80
80
|
class: "flex items-center gap-2 w-full cursor-pointer hover:bg-accent rounded-md",
|
|
81
|
-
onClick: G((
|
|
81
|
+
onClick: G((x) => g(o.value), ["stop"])
|
|
82
82
|
}, [
|
|
83
83
|
c(K, {
|
|
84
84
|
"model-value": e.selectedGroupKeys.includes(o.value),
|
|
85
85
|
size: "xs",
|
|
86
|
-
|
|
87
|
-
}, null, 8, ["model-value"
|
|
88
|
-
o?.icon ? (l(),
|
|
86
|
+
class: "pointer-events-none"
|
|
87
|
+
}, null, 8, ["model-value"]),
|
|
88
|
+
o?.icon ? (l(), z(y, {
|
|
89
89
|
key: 0,
|
|
90
90
|
icon: o.icon,
|
|
91
91
|
class: "w-3.5 h-3.5 text-muted-foreground"
|
|
92
92
|
}, null, 8, ["icon"])) : i("", !0),
|
|
93
|
-
|
|
93
|
+
r("span", P, a(o.label), 1)
|
|
94
94
|
], 8, N)
|
|
95
95
|
]),
|
|
96
|
-
footer:
|
|
97
|
-
e.selectedGroupKeys.length > 0 ? (l(), n("div",
|
|
98
|
-
|
|
96
|
+
footer: p(() => [
|
|
97
|
+
e.selectedGroupKeys.length > 0 ? (l(), n("div", E, [
|
|
98
|
+
r("button", {
|
|
99
99
|
type: "button",
|
|
100
100
|
class: "text-xs text-muted-foreground hover:text-foreground cursor-pointer",
|
|
101
101
|
onClick: v
|
|
@@ -105,15 +105,15 @@ const S = { class: "flex flex-col sm:flex-row items-start sm:items-center gap-3
|
|
|
105
105
|
_: 1
|
|
106
106
|
}, 8, ["options"])
|
|
107
107
|
]),
|
|
108
|
-
|
|
109
|
-
|
|
108
|
+
r("div", F, [
|
|
109
|
+
r("span", {
|
|
110
110
|
class: u([m.value, "text-muted-foreground whitespace-nowrap"])
|
|
111
111
|
}, a(e.selectedCount) + " / " + a(e.totalPerms) + " selected ", 3),
|
|
112
112
|
e.readonly ? i("", !0) : (l(), n("button", {
|
|
113
113
|
key: 0,
|
|
114
114
|
type: "button",
|
|
115
115
|
class: u([m.value, "text-primary hover:underline whitespace-nowrap cursor-pointer"]),
|
|
116
|
-
onClick: t[0] || (t[0] = (o) =>
|
|
116
|
+
onClick: t[0] || (t[0] = (o) => s.$emit("selectAll"))
|
|
117
117
|
}, " Select All ", 2)),
|
|
118
118
|
!e.readonly && e.selectedCount > 0 ? (l(), n("button", {
|
|
119
119
|
key: 1,
|
|
@@ -122,7 +122,7 @@ const S = { class: "flex flex-col sm:flex-row items-start sm:items-center gap-3
|
|
|
122
122
|
m.value,
|
|
123
123
|
"text-muted-foreground hover:text-foreground hover:underline whitespace-nowrap cursor-pointer"
|
|
124
124
|
]),
|
|
125
|
-
onClick: t[1] || (t[1] = (o) =>
|
|
125
|
+
onClick: t[1] || (t[1] = (o) => s.$emit("clearAll"))
|
|
126
126
|
}, " Clear ", 2)) : i("", !0)
|
|
127
127
|
])
|
|
128
128
|
]));
|