vlite3 1.4.1 → 1.4.3
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/AppShell/AppShell.vue.d.ts +1 -0
- package/components/AppShell/AppShell.vue.js +33 -26
- package/components/AppShell/AppShellLayoutStorefront.vue.d.ts +54 -0
- package/components/AppShell/AppShellLayoutStorefront.vue.js +222 -0
- package/components/AppShell/AppShellLayoutStorefront.vue2.js +4 -0
- package/components/AsyncSelect/createAsyncSelect.js +3 -2
- package/components/CategoryManager/CategoryManager.vue2.js +3 -2
- package/components/CategoryMenu/CategoryMenu.vue.d.ts +22 -0
- package/components/CategoryMenu/CategoryMenu.vue.js +106 -0
- package/components/CategoryMenu/CategoryMenu.vue2.js +4 -0
- package/components/CategoryMenu/CategoryMenuVariant1.vue.d.ts +17 -0
- package/components/CategoryMenu/CategoryMenuVariant1.vue.js +146 -0
- package/components/CategoryMenu/CategoryMenuVariant1.vue2.js +4 -0
- package/components/CategoryMenu/CategoryMenuVariant2.vue.d.ts +18 -0
- package/components/CategoryMenu/CategoryMenuVariant2.vue.js +162 -0
- package/components/CategoryMenu/CategoryMenuVariant2.vue2.js +4 -0
- package/components/CategoryMenu/index.d.ts +2 -0
- package/components/CategoryMenu/types.d.ts +32 -0
- package/components/CategoryMenu/utils.d.ts +16 -0
- package/components/CategoryMenu/utils.js +45 -0
- package/components/ColorPicker/ColorPicker.vue.d.ts +7 -3
- package/components/ColorPicker/ColorPicker.vue.js +59 -45
- package/components/CommandPalette/CommandPaletteContent.vue2.js +1 -1
- package/components/CommandPalette/{CommandPaletteItem.vue2.js → CommandPaletteItem.vue.js} +1 -1
- package/components/DatePicker.vue.js +5 -4
- package/components/DateRangePicker.vue.js +3 -2
- package/components/Dropdown/Dropdown.vue.d.ts +4 -1
- package/components/Dropdown/Dropdown.vue.js +10 -8
- package/components/Dropdown/DropdownGroupedLayout.vue2.js +5 -2
- package/components/Dropdown/DropdownGroupedLayout.vue3.js +111 -0
- package/components/Dropdown/DropdownItem.vue.d.ts +2 -2
- package/components/Dropdown/DropdownItem.vue.js +66 -49
- package/components/Dropdown/DropdownMenu.vue.d.ts +2 -0
- package/components/Dropdown/DropdownMenu.vue.js +1 -1
- package/components/Dropdown/DropdownMenu.vue2.js +44 -42
- package/components/Dropdown/composables/useDropdownHydration.d.ts +4 -0
- package/components/Dropdown/composables/useDropdownNavigation.js +30 -18
- package/components/Form/FormField.vue.js +14 -11
- package/components/IconPicker.vue.js +3 -2
- package/components/ImportData/ImportStep2.vue.js +3 -2
- package/components/MultiSelect/composables/useMultiSelectHydration.d.ts +4 -0
- package/components/NavbarCommandPalette.vue.js +1 -1
- package/components/PermissionMatrix/PermissionTopBar.vue.js +3 -2
- package/components/Screen/ScreenFilter.vue.js +19 -18
- package/components/SidebarMenu/SidebarMenuItem.vue.js +3 -2
- package/components/Switch.vue.js +8 -8
- package/components/Tooltip.vue.js +1 -0
- package/components/Workbook/Sheet.vue.js +14 -13
- package/components/index.d.ts +1 -0
- package/index.d.ts +1 -0
- package/index.js +153 -151
- package/package.json +2 -2
- package/style.css +1 -1
- package/types/appshell.type.d.ts +2 -1
- package/types/styles.d.ts +2 -0
- package/components/Dropdown/DropdownGroupedLayout.vue.js +0 -75
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { defineComponent as ee, ref as j, computed as g, watch as T, onMounted as te, onBeforeUnmount as le, openBlock as o, createElementBlock as d, createVNode as O, createCommentVNode as f, renderSlot as k, unref as
|
|
1
|
+
import { defineComponent as ee, ref as j, computed as g, watch as T, onMounted as te, onBeforeUnmount as le, openBlock as o, createElementBlock as d, createVNode as O, createCommentVNode as f, renderSlot as k, unref as a, normalizeStyle as se, normalizeClass as E, createElementVNode as w, toDisplayString as N, createBlock as h, Fragment as D, renderList as oe, withCtx as P, createSlots as ne, mergeProps as re, nextTick as ae } from "vue";
|
|
2
2
|
import p from "../Icon.vue.js";
|
|
3
3
|
import ie from "../Input.vue.js";
|
|
4
4
|
/* empty css */
|
|
5
5
|
import de from "./DropdownItem.vue.js";
|
|
6
6
|
import ce from "./DropdownBooleanItem.vue.js";
|
|
7
|
-
import ue from "./DropdownGroupedLayout.
|
|
7
|
+
import ue from "./DropdownGroupedLayout.vue2.js";
|
|
8
8
|
import { useDropdownNavigation as fe } from "./composables/useDropdownNavigation.js";
|
|
9
9
|
import { useDropdownIds as me } from "./composables/useDropdownIds.js";
|
|
10
10
|
import { $t as $ } from "../../utils/i18n.js";
|
|
@@ -27,7 +27,7 @@ const ve = ["dir"], ye = {
|
|
|
27
27
|
}, Oe = {
|
|
28
28
|
key: 3,
|
|
29
29
|
class: "shrink-0 rounded-b-md overflow-hidden"
|
|
30
|
-
},
|
|
30
|
+
}, Ve = /* @__PURE__ */ ee({
|
|
31
31
|
__name: "DropdownMenu",
|
|
32
32
|
props: {
|
|
33
33
|
options: { default: () => [] },
|
|
@@ -49,11 +49,12 @@ const ve = ["dir"], ye = {
|
|
|
49
49
|
debounceTime: { default: 300 },
|
|
50
50
|
direction: { default: "ltr" },
|
|
51
51
|
emptyMessage: { default: "No options found" },
|
|
52
|
-
searchEmptyMessage: {}
|
|
52
|
+
searchEmptyMessage: {},
|
|
53
|
+
trigger: { default: "click" }
|
|
53
54
|
},
|
|
54
55
|
emits: ["select", "close", "load-more", "search"],
|
|
55
|
-
setup(
|
|
56
|
-
const t =
|
|
56
|
+
setup(r, { emit: V }) {
|
|
57
|
+
const t = r, m = V, B = j(null), i = j(""), { getMenuId: z, getAllRecursiveIds: H } = me(), L = g(() => {
|
|
57
58
|
if (i.value && i.value.trim() !== "")
|
|
58
59
|
return t.searchEmptyMessage ? t.searchEmptyMessage : `No results found for
|
|
59
60
|
"${i.value}"`;
|
|
@@ -62,7 +63,7 @@ const ve = ["dir"], ye = {
|
|
|
62
63
|
}), R = g(() => {
|
|
63
64
|
const e = $("vlite.dropdown.search");
|
|
64
65
|
return e !== "vlite.dropdown.search" ? e : "Search...";
|
|
65
|
-
}), u = g(() => t.options ? t.options.map((e) => typeof e == "string" || typeof e == "number" ? { label: String(e), value: String(e) } : e) : []),
|
|
66
|
+
}), u = g(() => t.options ? t.options.map((e) => typeof e == "string" || typeof e == "number" ? { label: String(e), value: String(e) } : e) : []), C = g(() => t.searchable ? i.value && i.value.trim() !== "" ? !0 : t.remote ? t.loading ? !0 : t.hasMore || (u.value.length || 0) > 5 : (u.value.length || 0) > 5 : !1);
|
|
66
67
|
let v = null;
|
|
67
68
|
T(i, (e) => {
|
|
68
69
|
t.remote && (v && clearTimeout(v), v = setTimeout(() => {
|
|
@@ -78,20 +79,20 @@ const ve = ["dir"], ye = {
|
|
|
78
79
|
focusedIndex: b,
|
|
79
80
|
isKeyboardMode: M,
|
|
80
81
|
filteredOptions: F,
|
|
81
|
-
handleKeyDown:
|
|
82
|
-
handleMouseMove:
|
|
82
|
+
handleKeyDown: I,
|
|
83
|
+
handleMouseMove: _,
|
|
83
84
|
onMouseEnterItem: S,
|
|
84
85
|
scrollToIndex: K
|
|
85
86
|
} = fe({
|
|
86
87
|
options: u,
|
|
87
88
|
searchQuery: i,
|
|
88
|
-
containerRef:
|
|
89
|
+
containerRef: B,
|
|
89
90
|
emit: (e, ...s) => m(e, ...s),
|
|
90
91
|
handleSelect: (e, s) => x(e)
|
|
91
92
|
}), y = g(() => t.remote ? i.value ? u.value : t.cachedOptions.length ? t.cachedOptions : u.value : F.value), U = (e) => {
|
|
92
93
|
if (!(!t.selected || typeof t.selected != "object") && e.key && e.key in t.selected)
|
|
93
94
|
return t.selected[e.key];
|
|
94
|
-
},
|
|
95
|
+
}, G = (e) => e.disabled ? !1 : Array.isArray(t.selected) ? t.selected.includes(e.value) : t.selected && typeof t.selected == "object" && e.key ? t.selected[e.key] === e.value : t.selected === e.value, q = (e) => !e.key || !t.selected || typeof t.selected != "object" ? !1 : !!t.selected[e.key], J = (e, s) => {
|
|
95
96
|
if (!s.key) return;
|
|
96
97
|
const l = {
|
|
97
98
|
label: s.label,
|
|
@@ -125,16 +126,16 @@ const ve = ["dir"], ye = {
|
|
|
125
126
|
b.value = -1;
|
|
126
127
|
}
|
|
127
128
|
), te(() => {
|
|
128
|
-
W(), window.addEventListener("keydown",
|
|
129
|
+
W(), window.addEventListener("keydown", I);
|
|
129
130
|
}), le(() => {
|
|
130
|
-
window.removeEventListener("keydown",
|
|
131
|
+
window.removeEventListener("keydown", I), v && clearTimeout(v), i.value && t.remote && m("search", "");
|
|
131
132
|
});
|
|
132
133
|
const X = (e) => e.labelI18n ? $(e.labelI18n) : e.label, Y = (e) => e.showChevron !== !1;
|
|
133
134
|
return (e, s) => (o(), d("div", {
|
|
134
135
|
class: "dropdown-menu w-full flex flex-col",
|
|
135
|
-
dir:
|
|
136
|
+
dir: r.direction
|
|
136
137
|
}, [
|
|
137
|
-
|
|
138
|
+
C.value ? (o(), d("div", ye, [
|
|
138
139
|
O(ie, {
|
|
139
140
|
modelValue: i.value,
|
|
140
141
|
"onUpdate:modelValue": s[0] || (s[0] = (l) => i.value = l),
|
|
@@ -156,8 +157,8 @@ const ve = ["dir"], ye = {
|
|
|
156
157
|
u.value.length > 0 || y.value.length === 0 ? (o(), d("div", {
|
|
157
158
|
key: 2,
|
|
158
159
|
ref_key: "containerRef",
|
|
159
|
-
ref:
|
|
160
|
-
tabindex:
|
|
160
|
+
ref: B,
|
|
161
|
+
tabindex: C.value ? -1 : 0,
|
|
161
162
|
role: "menu",
|
|
162
163
|
class: E([
|
|
163
164
|
"w-full p-1 space-y-0.5 overflow-y-auto overflow-x-hidden focus:outline-none flex-1 scrollbar-thin",
|
|
@@ -165,31 +166,31 @@ const ve = ["dir"], ye = {
|
|
|
165
166
|
]),
|
|
166
167
|
style: se({ maxHeight: t.maxHeight }),
|
|
167
168
|
onMousemove: s[1] || (s[1] = //@ts-ignore
|
|
168
|
-
(...l) =>
|
|
169
|
+
(...l) => a(_) && a(_)(...l)),
|
|
169
170
|
onScroll: A
|
|
170
171
|
}, [
|
|
171
|
-
!
|
|
172
|
+
!r.isCustomSlotMenu && y.value.length === 0 && !r.loading && !(u.value.length === 0 && e.$slots.menu) ? (o(), d("div", ke, [
|
|
172
173
|
O(p, {
|
|
173
174
|
icon: "lucide:inbox",
|
|
174
175
|
class: "w-8 h-8 mb-2 opacity-70"
|
|
175
176
|
}),
|
|
176
177
|
w("span", null, N(L.value), 1)
|
|
177
178
|
])) : f("", !0),
|
|
178
|
-
|
|
179
|
+
r.layout === "grouped" ? (o(), h(ue, {
|
|
179
180
|
key: 1,
|
|
180
181
|
options: y.value,
|
|
181
|
-
selected:
|
|
182
|
-
selectable:
|
|
183
|
-
columns:
|
|
182
|
+
selected: r.selected,
|
|
183
|
+
selectable: r.selectable,
|
|
184
|
+
columns: r.columns,
|
|
184
185
|
onSelect: x
|
|
185
|
-
}, null, 8, ["options", "selected", "selectable", "columns"])) : (o(!0), d(
|
|
186
|
+
}, null, 8, ["options", "selected", "selectable", "columns"])) : (o(!0), d(D, { key: 2 }, oe(y.value, (l, n) => (o(), d(D, { key: n }, [
|
|
186
187
|
l.label === "---" ? (o(), d("div", we)) : l.data?.isBoolean ? (o(), h(ce, {
|
|
187
188
|
key: 1,
|
|
188
189
|
option: l,
|
|
189
|
-
value:
|
|
190
|
-
focused:
|
|
190
|
+
value: q(l),
|
|
191
|
+
focused: a(M) && a(b) === n,
|
|
191
192
|
onChange: J,
|
|
192
|
-
onMouseenter: (c) =>
|
|
193
|
+
onMouseenter: (c) => a(S)(n)
|
|
193
194
|
}, null, 8, ["option", "value", "focused", "onMouseenter"])) : l.children && l.children.length > 0 ? (o(), h(he, {
|
|
194
195
|
key: 2,
|
|
195
196
|
"is-nested": !0,
|
|
@@ -198,24 +199,25 @@ const ve = ["dir"], ye = {
|
|
|
198
199
|
class: "w-full",
|
|
199
200
|
options: l.children,
|
|
200
201
|
selected: U(l),
|
|
201
|
-
menuId:
|
|
202
|
+
menuId: a(z)(l),
|
|
202
203
|
nestedPosition: t.nestedPosition,
|
|
203
204
|
nestedOffset: t.nestedOffset,
|
|
204
205
|
selectable: t.selectable,
|
|
205
|
-
ignoreClickOutside:
|
|
206
|
-
direction:
|
|
206
|
+
ignoreClickOutside: a(H)(l.children),
|
|
207
|
+
direction: r.direction,
|
|
208
|
+
trigger: r.trigger,
|
|
207
209
|
onOnSelect: (c) => Q(l, c)
|
|
208
210
|
}, {
|
|
209
|
-
trigger:
|
|
211
|
+
trigger: P(() => [
|
|
210
212
|
w("div", {
|
|
211
213
|
tabindex: 0,
|
|
212
214
|
"data-dropdown-item": "",
|
|
213
215
|
class: E(["relative flex cursor-pointer select-none items-center rounded-sm px-2 py-1.5 text-sm font-medium outline-none transition-colors justify-between w-full focus-visible:bg-accent focus-visible:text-accent-foreground", [
|
|
214
|
-
|
|
216
|
+
a(M) && a(b) === n ? "bg-accent text-accent-foreground" : "hover:bg-accent hover:text-accent-foreground",
|
|
215
217
|
l.disabled ? "opacity-50 cursor-not-allowed" : "",
|
|
216
218
|
l.triggerClass || l.class || ""
|
|
217
219
|
]]),
|
|
218
|
-
onMouseenter: (c) =>
|
|
220
|
+
onMouseenter: (c) => a(S)(n)
|
|
219
221
|
}, [
|
|
220
222
|
w("div", xe, [
|
|
221
223
|
l.icon || l.emoji ? (o(), h(p, {
|
|
@@ -228,32 +230,32 @@ const ve = ["dir"], ye = {
|
|
|
228
230
|
]),
|
|
229
231
|
Y(l) ? (o(), h(p, {
|
|
230
232
|
key: 0,
|
|
231
|
-
icon:
|
|
233
|
+
icon: r.direction === "rtl" ? "lucide:chevron-left" : "lucide:chevron-right",
|
|
232
234
|
class: "h-4 w-4 text-muted-foreground shrink-0 ml-2"
|
|
233
235
|
}, null, 8, ["icon"])) : f("", !0)
|
|
234
236
|
], 42, pe)
|
|
235
237
|
]),
|
|
236
238
|
_: 2
|
|
237
|
-
}, 1032, ["position", "offset", "options", "selected", "menuId", "nestedPosition", "nestedOffset", "selectable", "ignoreClickOutside", "direction", "onOnSelect"])) : (o(), h(de, {
|
|
239
|
+
}, 1032, ["position", "offset", "options", "selected", "menuId", "nestedPosition", "nestedOffset", "selectable", "ignoreClickOutside", "direction", "trigger", "onOnSelect"])) : (o(), h(de, {
|
|
238
240
|
key: 3,
|
|
239
241
|
option: l,
|
|
240
242
|
index: n,
|
|
241
|
-
selected:
|
|
242
|
-
focused:
|
|
243
|
-
selectable:
|
|
243
|
+
selected: G(l),
|
|
244
|
+
focused: a(M) && a(b) === n,
|
|
245
|
+
selectable: r.selectable,
|
|
244
246
|
onClick: (c) => x(l),
|
|
245
|
-
onMouseenter: (c) =>
|
|
247
|
+
onMouseenter: (c) => a(S)(n)
|
|
246
248
|
}, ne({ _: 2 }, [
|
|
247
249
|
e.$slots.item ? {
|
|
248
250
|
name: "default",
|
|
249
|
-
fn:
|
|
251
|
+
fn: P((c) => [
|
|
250
252
|
k(e.$slots, "item", re({ ref_for: !0 }, c), void 0, !0)
|
|
251
253
|
]),
|
|
252
254
|
key: "0"
|
|
253
255
|
} : void 0
|
|
254
256
|
]), 1032, ["option", "index", "selected", "focused", "selectable", "onClick", "onMouseenter"]))
|
|
255
257
|
], 64))), 128)),
|
|
256
|
-
|
|
258
|
+
r.loading ? (o(), d("div", Se, [
|
|
257
259
|
O(p, {
|
|
258
260
|
icon: "lucide:loader-2",
|
|
259
261
|
class: "w-4 h-4 animate-spin text-muted-foreground"
|
|
@@ -268,5 +270,5 @@ const ve = ["dir"], ye = {
|
|
|
268
270
|
}
|
|
269
271
|
});
|
|
270
272
|
export {
|
|
271
|
-
|
|
273
|
+
Ve as default
|
|
272
274
|
};
|
|
@@ -21,6 +21,8 @@ export declare function useDropdownHydration(opts: UseDropdownHydrationOptions):
|
|
|
21
21
|
selectedBuffer: import('vue').Ref<Map<any, {
|
|
22
22
|
label: string;
|
|
23
23
|
labelI18n?: string;
|
|
24
|
+
to?: string;
|
|
25
|
+
href?: string;
|
|
24
26
|
value?: any;
|
|
25
27
|
subtitle?: string;
|
|
26
28
|
subtitleI18n?: string;
|
|
@@ -62,6 +64,8 @@ export declare function useDropdownHydration(opts: UseDropdownHydrationOptions):
|
|
|
62
64
|
}> & Omit<Map<any, IDropdownOption>, keyof Map<any, any>>, Map<any, IDropdownOption> | (Map<any, {
|
|
63
65
|
label: string;
|
|
64
66
|
labelI18n?: string;
|
|
67
|
+
to?: string;
|
|
68
|
+
href?: string;
|
|
65
69
|
value?: any;
|
|
66
70
|
subtitle?: string;
|
|
67
71
|
subtitleI18n?: string;
|
|
@@ -1,24 +1,36 @@
|
|
|
1
|
-
import { ref as
|
|
2
|
-
import { $t as
|
|
3
|
-
function
|
|
4
|
-
const t =
|
|
5
|
-
const e =
|
|
6
|
-
if (!
|
|
7
|
-
const a =
|
|
8
|
-
return e.filter((
|
|
1
|
+
import { ref as i, computed as d } from "vue";
|
|
2
|
+
import { $t as f } from "../../../utils/i18n.js";
|
|
3
|
+
function g(o) {
|
|
4
|
+
const t = i(-1), l = i(!1), s = d(() => {
|
|
5
|
+
const e = o.options.value;
|
|
6
|
+
if (!o.searchQuery.value) return e;
|
|
7
|
+
const a = o.searchQuery.value.toLowerCase();
|
|
8
|
+
return e.filter((n) => (n.labelI18n ? f(n.labelI18n) : n.label).toLowerCase().includes(a));
|
|
9
9
|
}), r = (e) => {
|
|
10
|
-
if (!
|
|
11
|
-
const
|
|
12
|
-
|
|
10
|
+
if (!o.containerRef.value || e < 0) return;
|
|
11
|
+
const n = o.containerRef.value.querySelectorAll("[data-dropdown-item]")[e];
|
|
12
|
+
n && n.scrollIntoView({ block: "nearest" });
|
|
13
13
|
};
|
|
14
14
|
return {
|
|
15
15
|
focusedIndex: t,
|
|
16
|
-
isKeyboardMode:
|
|
16
|
+
isKeyboardMode: l,
|
|
17
17
|
filteredOptions: s,
|
|
18
18
|
handleKeyDown: (e) => {
|
|
19
|
+
if (e.key.length === 1 && !e.ctrlKey && !e.metaKey && !e.altKey && !e.defaultPrevented) {
|
|
20
|
+
const n = document.activeElement;
|
|
21
|
+
if (!(n?.tagName === "INPUT" || n?.tagName === "TEXTAREA" || n?.isContentEditable)) {
|
|
22
|
+
const c = o.containerRef.value?.closest(".dropdown-menu");
|
|
23
|
+
if (c) {
|
|
24
|
+
const u = c.querySelector(
|
|
25
|
+
'input[data-testid="dropdown-search-input"]'
|
|
26
|
+
);
|
|
27
|
+
u && document.activeElement !== u && u.focus();
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
19
31
|
const a = s.value;
|
|
20
32
|
if (a.length !== 0)
|
|
21
|
-
switch (["ArrowDown", "ArrowUp", "Enter"].includes(e.key) && (
|
|
33
|
+
switch (["ArrowDown", "ArrowUp", "Enter"].includes(e.key) && (l.value = !0), e.key) {
|
|
22
34
|
case "ArrowDown":
|
|
23
35
|
e.preventDefault(), e.stopPropagation(), t.value < a.length - 1 ? t.value++ : t.value = 0, r(t.value);
|
|
24
36
|
break;
|
|
@@ -27,17 +39,17 @@ function b(n) {
|
|
|
27
39
|
break;
|
|
28
40
|
case "Enter":
|
|
29
41
|
if (e.preventDefault(), e.stopPropagation(), t.value >= 0 && t.value < a.length) {
|
|
30
|
-
const
|
|
31
|
-
|
|
42
|
+
const n = a[t.value];
|
|
43
|
+
n.children || o.handleSelect(n, t.value);
|
|
32
44
|
}
|
|
33
45
|
break;
|
|
34
46
|
case "Escape":
|
|
35
|
-
e.preventDefault(), e.stopPropagation(),
|
|
47
|
+
e.preventDefault(), e.stopPropagation(), o.emit("close");
|
|
36
48
|
break;
|
|
37
49
|
}
|
|
38
50
|
},
|
|
39
51
|
handleMouseMove: () => {
|
|
40
|
-
|
|
52
|
+
l.value && (l.value = !1);
|
|
41
53
|
},
|
|
42
54
|
onMouseEnterItem: (e) => {
|
|
43
55
|
t.value = e;
|
|
@@ -46,5 +58,5 @@ function b(n) {
|
|
|
46
58
|
};
|
|
47
59
|
}
|
|
48
60
|
export {
|
|
49
|
-
|
|
61
|
+
g as useDropdownNavigation
|
|
50
62
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { defineComponent as E, computed as s, markRaw as M, openBlock as c, createBlock as m, mergeProps as p, toHandlers as L, createSlots as q, unref as P, withCtx as u, createVNode as N, createTextVNode as b, toDisplayString as y, createCommentVNode as B, resolveDynamicComponent as G } from "vue";
|
|
2
2
|
import { resolveFieldType as J, isComponent as R, isAddonObject as x } from "./utils/form.utils.js";
|
|
3
3
|
import K from "../NumberInput.vue.js";
|
|
4
|
-
import
|
|
4
|
+
import z from "../Button.vue.js";
|
|
5
5
|
import { $t as Q } from "../../utils/i18n.js";
|
|
6
|
-
import
|
|
6
|
+
import V from "../Input.vue.js";
|
|
7
7
|
/* empty css */
|
|
8
8
|
import W from "../Switch.vue.js";
|
|
9
9
|
import X from "../CheckBox.vue.js";
|
|
@@ -63,9 +63,9 @@ const Be = /* @__PURE__ */ E({
|
|
|
63
63
|
case "url":
|
|
64
64
|
case "search":
|
|
65
65
|
case "textarea":
|
|
66
|
-
return
|
|
66
|
+
return V;
|
|
67
67
|
case "number":
|
|
68
|
-
return k.value ?
|
|
68
|
+
return k.value ? V : K;
|
|
69
69
|
case "switch":
|
|
70
70
|
return W;
|
|
71
71
|
case "check":
|
|
@@ -99,7 +99,7 @@ const Be = /* @__PURE__ */ E({
|
|
|
99
99
|
case "richTextEditor":
|
|
100
100
|
return oe;
|
|
101
101
|
default:
|
|
102
|
-
return
|
|
102
|
+
return V;
|
|
103
103
|
}
|
|
104
104
|
}), A = s(() => {
|
|
105
105
|
const a = f.value, { disabled: l, readonly: r, ...g } = e.field, t = {
|
|
@@ -309,7 +309,10 @@ const Be = /* @__PURE__ */ E({
|
|
|
309
309
|
if (a === "color")
|
|
310
310
|
return {
|
|
311
311
|
...t,
|
|
312
|
-
modelValue: e.value || "#000000"
|
|
312
|
+
modelValue: e.value || "#000000",
|
|
313
|
+
variant: e.variant,
|
|
314
|
+
size: e.size,
|
|
315
|
+
rounded: e.rounded
|
|
313
316
|
};
|
|
314
317
|
if (a === "iconPicker")
|
|
315
318
|
return {
|
|
@@ -427,7 +430,7 @@ const Be = /* @__PURE__ */ E({
|
|
|
427
430
|
}, C = (a) => {
|
|
428
431
|
a.action && v("addonAction", a.action);
|
|
429
432
|
};
|
|
430
|
-
return (a, l) => O.value ? (c(), m(
|
|
433
|
+
return (a, l) => O.value ? (c(), m(V, p({ key: 0 }, {
|
|
431
434
|
...A.value,
|
|
432
435
|
...i.field?.props || {}
|
|
433
436
|
}, L($.value)), q({ _: 2 }, [
|
|
@@ -442,7 +445,7 @@ const Be = /* @__PURE__ */ E({
|
|
|
442
445
|
onOnSelect: l[0] || (l[0] = (r) => F(i.field.addonLeft, r))
|
|
443
446
|
}), {
|
|
444
447
|
trigger: u(({ selectedLabel: r }) => [
|
|
445
|
-
N(
|
|
448
|
+
N(z, { variant: "outline" }, {
|
|
446
449
|
default: u(() => [
|
|
447
450
|
b(y(r), 1)
|
|
448
451
|
]),
|
|
@@ -450,7 +453,7 @@ const Be = /* @__PURE__ */ E({
|
|
|
450
453
|
}, 1024)
|
|
451
454
|
]),
|
|
452
455
|
_: 1
|
|
453
|
-
}, 16, ["modelValue", "options"])) : i.field.addonLeft.type === "button" ? (c(), m(
|
|
456
|
+
}, 16, ["modelValue", "options"])) : i.field.addonLeft.type === "button" ? (c(), m(z, p({
|
|
454
457
|
key: 1,
|
|
455
458
|
variant: "outline"
|
|
456
459
|
}, i.field.addonLeft.props || {}, {
|
|
@@ -475,7 +478,7 @@ const Be = /* @__PURE__ */ E({
|
|
|
475
478
|
onOnSelect: l[2] || (l[2] = (r) => F(i.field.addonRight, r))
|
|
476
479
|
}), {
|
|
477
480
|
trigger: u(({ selectedLabel: r }) => [
|
|
478
|
-
N(
|
|
481
|
+
N(z, { variant: "outline" }, {
|
|
479
482
|
default: u(() => [
|
|
480
483
|
b(y(r), 1)
|
|
481
484
|
]),
|
|
@@ -483,7 +486,7 @@ const Be = /* @__PURE__ */ E({
|
|
|
483
486
|
}, 1024)
|
|
484
487
|
]),
|
|
485
488
|
_: 1
|
|
486
|
-
}, 16, ["modelValue", "options"])) : i.field.addonRight.type === "button" ? (c(), m(
|
|
489
|
+
}, 16, ["modelValue", "options"])) : i.field.addonRight.type === "button" ? (c(), m(z, p({
|
|
487
490
|
key: 1,
|
|
488
491
|
variant: "outline"
|
|
489
492
|
}, i.field.addonRight.props || {}, {
|
|
@@ -3,11 +3,12 @@ import $ from "./Dropdown/Dropdown.vue.js";
|
|
|
3
3
|
import "@iconify/vue";
|
|
4
4
|
import { $t as d } from "../utils/i18n.js";
|
|
5
5
|
/* empty css */
|
|
6
|
+
/* empty css */
|
|
6
7
|
/* empty css */
|
|
7
8
|
import C from "./Button.vue.js";
|
|
8
9
|
import I from "iconify-icon-picker";
|
|
9
10
|
import "iconify-icon-picker/style.css";
|
|
10
|
-
const
|
|
11
|
+
const A = /* @__PURE__ */ g({
|
|
11
12
|
__name: "IconPicker",
|
|
12
13
|
props: {
|
|
13
14
|
btnProps: {},
|
|
@@ -130,5 +131,5 @@ const j = /* @__PURE__ */ g({
|
|
|
130
131
|
}
|
|
131
132
|
});
|
|
132
133
|
export {
|
|
133
|
-
|
|
134
|
+
A as default
|
|
134
135
|
};
|
|
@@ -3,6 +3,7 @@ import A from "../Dropdown/Dropdown.vue.js";
|
|
|
3
3
|
import "@iconify/vue";
|
|
4
4
|
import { $t as E } from "../../utils/i18n.js";
|
|
5
5
|
/* empty css */
|
|
6
|
+
/* empty css */
|
|
6
7
|
/* empty css */
|
|
7
8
|
import P from "../CheckBox.vue.js";
|
|
8
9
|
const R = { class: "space-y-5" }, U = { class: "text-sm text-muted-foreground" }, q = { class: "border border-border rounded-xl overflow-hidden" }, L = { class: "overflow-x-auto max-h-[440px] always-scroll scrollbar-thin" }, W = { class: "import-table" }, G = { class: "import-thead" }, J = { class: "import-th" }, K = { class: "import-th" }, Q = { class: "import-th" }, T = { class: "import-tbody" }, X = { class: "import-td-header" }, Y = { class: "import-td-dropdown" }, Z = {
|
|
@@ -14,7 +15,7 @@ const R = { class: "space-y-5" }, U = { class: "text-sm text-muted-foreground" }
|
|
|
14
15
|
}, st = { class: "import-td-action" }, ot = { class: "flex justify-center items-center h-full" }, it = {
|
|
15
16
|
key: 0,
|
|
16
17
|
class: "text-center text-sm text-warning font-medium p-4 bg-warning/10 rounded-lg border border-warning/20"
|
|
17
|
-
},
|
|
18
|
+
}, vt = /* @__PURE__ */ V({
|
|
18
19
|
__name: "ImportStep2",
|
|
19
20
|
props: {
|
|
20
21
|
headers: {},
|
|
@@ -113,5 +114,5 @@ const R = { class: "space-y-5" }, U = { class: "text-sm text-muted-foreground" }
|
|
|
113
114
|
}
|
|
114
115
|
});
|
|
115
116
|
export {
|
|
116
|
-
|
|
117
|
+
vt as default
|
|
117
118
|
};
|
|
@@ -13,6 +13,8 @@ export declare function useMultiSelectHydration(opts: UseMultiSelectHydrationOpt
|
|
|
13
13
|
selectedBuffer: import('vue').Ref<Map<any, {
|
|
14
14
|
label: string;
|
|
15
15
|
labelI18n?: string;
|
|
16
|
+
to?: string;
|
|
17
|
+
href?: string;
|
|
16
18
|
value?: any;
|
|
17
19
|
subtitle?: string;
|
|
18
20
|
subtitleI18n?: string;
|
|
@@ -54,6 +56,8 @@ export declare function useMultiSelectHydration(opts: UseMultiSelectHydrationOpt
|
|
|
54
56
|
}> & Omit<Map<any, IDropdownOption>, keyof Map<any, any>>, Map<any, IDropdownOption> | (Map<any, {
|
|
55
57
|
label: string;
|
|
56
58
|
labelI18n?: string;
|
|
59
|
+
to?: string;
|
|
60
|
+
href?: string;
|
|
57
61
|
value?: any;
|
|
58
62
|
subtitle?: string;
|
|
59
63
|
subtitleI18n?: string;
|
|
@@ -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: {
|
|
@@ -5,6 +5,7 @@ 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
|
+
/* empty css */
|
|
8
9
|
/* empty css */
|
|
9
10
|
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
11
|
key: 0,
|
|
@@ -15,7 +16,7 @@ const S = { class: "flex flex-col sm:flex-row items-start sm:items-center gap-3
|
|
|
15
16
|
}, N = ["onClick"], P = { class: "text-sm" }, E = {
|
|
16
17
|
key: 0,
|
|
17
18
|
class: "border-t px-3 py-1.5"
|
|
18
|
-
}, F = { class: "flex items-center gap-3 ml-auto" },
|
|
19
|
+
}, F = { class: "flex items-center gap-3 ml-auto" }, J = /* @__PURE__ */ w({
|
|
19
20
|
__name: "PermissionTopBar",
|
|
20
21
|
props: {
|
|
21
22
|
searchQuery: {},
|
|
@@ -129,5 +130,5 @@ const S = { class: "flex flex-col sm:flex-row items-start sm:items-center gap-3
|
|
|
129
130
|
}
|
|
130
131
|
});
|
|
131
132
|
export {
|
|
132
|
-
|
|
133
|
+
J as default
|
|
133
134
|
};
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { defineComponent as B, ref as M, computed as d, openBlock as
|
|
1
|
+
import { defineComponent as B, ref as M, computed as d, openBlock as s, createBlock as n, withCtx as o, createElementVNode as l, createVNode as a, unref as w, toDisplayString as v, withModifiers as F, setBlockTracking as C, createElementBlock as S } from "vue";
|
|
2
2
|
import f from "../Button.vue.js";
|
|
3
3
|
import j from "../Modal.vue.js";
|
|
4
4
|
import z from "../Dropdown/Dropdown.vue.js";
|
|
5
5
|
import h from "../Icon.vue.js";
|
|
6
6
|
import { $t as y } from "../../utils/i18n.js";
|
|
7
7
|
/* empty css */
|
|
8
|
+
/* empty css */
|
|
8
9
|
/* empty css */
|
|
9
10
|
import O from "../Form/Form.vue.js";
|
|
10
11
|
/* empty css */
|
|
@@ -27,7 +28,7 @@ import "../../core/config.js";
|
|
|
27
28
|
const N = { class: "text-gray-800! h-4! w-4! flex items-center justify-center" }, A = { style: { "will-change": "transform", contain: "layout style" } }, E = {
|
|
28
29
|
class: "pt-2 px-2 min-w-[295px]",
|
|
29
30
|
style: { "will-change": "transform", contain: "layout style" }
|
|
30
|
-
},
|
|
31
|
+
}, me = /* @__PURE__ */ B({
|
|
31
32
|
__name: "ScreenFilter",
|
|
32
33
|
props: {
|
|
33
34
|
schema: {},
|
|
@@ -36,10 +37,10 @@ const N = { class: "text-gray-800! h-4! w-4! flex items-center justify-center" }
|
|
|
36
37
|
},
|
|
37
38
|
emits: ["update:modelValue", "change"],
|
|
38
39
|
setup(i, { emit: $ }) {
|
|
39
|
-
const m = i, c = $,
|
|
40
|
+
const m = i, c = $, r = M(!1), p = d(() => m.modelValue ? Object.keys(m.modelValue).filter(
|
|
40
41
|
(e) => m.modelValue[e] !== "" && m.modelValue[e] !== null && m.modelValue[e] !== void 0
|
|
41
42
|
).length : 0), x = (e) => {
|
|
42
|
-
c("update:modelValue", e.values), c("change", e.values),
|
|
43
|
+
c("update:modelValue", e.values), c("change", e.values), r.value = !1;
|
|
43
44
|
}, k = () => {
|
|
44
45
|
c("update:modelValue", {}), c("change", {});
|
|
45
46
|
}, g = d(() => {
|
|
@@ -52,19 +53,19 @@ const N = { class: "text-gray-800! h-4! w-4! flex items-center justify-center" }
|
|
|
52
53
|
const e = y("vlite.screen.filter");
|
|
53
54
|
return e !== "vlite.screen.filter" ? e : "Filter";
|
|
54
55
|
});
|
|
55
|
-
return (e, t) => i.type === "modal" ? (
|
|
56
|
+
return (e, t) => i.type === "modal" ? (s(), n(j, {
|
|
56
57
|
key: 0,
|
|
57
58
|
title: g.value,
|
|
58
|
-
show:
|
|
59
|
-
"onUpdate:show": t[3] || (t[3] = (u) =>
|
|
59
|
+
show: r.value,
|
|
60
|
+
"onUpdate:show": t[3] || (t[3] = (u) => r.value = u),
|
|
60
61
|
"max-width": "sm:max-w-md"
|
|
61
62
|
}, {
|
|
62
63
|
trigger: o(() => [
|
|
63
|
-
p.value > 0 ? (
|
|
64
|
+
p.value > 0 ? (s(), n(f, {
|
|
64
65
|
key: 0,
|
|
65
66
|
variant: "secondary",
|
|
66
67
|
class: "flex items-center gap-1.5 pl-3 pr-1.5 shrink-0",
|
|
67
|
-
onClick: t[0] || (t[0] = (u) =>
|
|
68
|
+
onClick: t[0] || (t[0] = (u) => r.value = !0)
|
|
68
69
|
}, {
|
|
69
70
|
default: o(() => [
|
|
70
71
|
a(h, {
|
|
@@ -83,10 +84,10 @@ const N = { class: "text-gray-800! h-4! w-4! flex items-center justify-center" }
|
|
|
83
84
|
])
|
|
84
85
|
]),
|
|
85
86
|
_: 1
|
|
86
|
-
})) : (
|
|
87
|
+
})) : (s(), n(f, {
|
|
87
88
|
key: 1,
|
|
88
89
|
variant: "outline",
|
|
89
|
-
onClick: t[2] || (t[2] = (u) =>
|
|
90
|
+
onClick: t[2] || (t[2] = (u) => r.value = !0),
|
|
90
91
|
title: V.value,
|
|
91
92
|
size: "lg",
|
|
92
93
|
asIcon: "",
|
|
@@ -94,7 +95,7 @@ const N = { class: "text-gray-800! h-4! w-4! flex items-center justify-center" }
|
|
|
94
95
|
}, {
|
|
95
96
|
default: o(() => [
|
|
96
97
|
l("div", N, [
|
|
97
|
-
t[1] || (C(-1, !0), (t[1] = (
|
|
98
|
+
t[1] || (C(-1, !0), (t[1] = (s(), S("svg", {
|
|
98
99
|
xmlns: "http://www.w3.org/2000/svg",
|
|
99
100
|
width: "1.132em",
|
|
100
101
|
height: "1.132em",
|
|
@@ -125,10 +126,10 @@ const N = { class: "text-gray-800! h-4! w-4! flex items-center justify-center" }
|
|
|
125
126
|
])
|
|
126
127
|
]),
|
|
127
128
|
_: 1
|
|
128
|
-
}, 8, ["title", "show"])) : (
|
|
129
|
+
}, 8, ["title", "show"])) : (s(), n(w(z), {
|
|
129
130
|
key: 1,
|
|
130
|
-
isOpen:
|
|
131
|
-
"onUpdate:isOpen": t[4] || (t[4] = (u) =>
|
|
131
|
+
isOpen: r.value,
|
|
132
|
+
"onUpdate:isOpen": t[4] || (t[4] = (u) => r.value = u),
|
|
132
133
|
"close-on-select": !1,
|
|
133
134
|
position: "bottom-end",
|
|
134
135
|
maxHeight: "430px",
|
|
@@ -136,7 +137,7 @@ const N = { class: "text-gray-800! h-4! w-4! flex items-center justify-center" }
|
|
|
136
137
|
class: "w-auto"
|
|
137
138
|
}, {
|
|
138
139
|
trigger: o(() => [
|
|
139
|
-
p.value > 0 ? (
|
|
140
|
+
p.value > 0 ? (s(), n(f, {
|
|
140
141
|
key: 0,
|
|
141
142
|
variant: "secondary",
|
|
142
143
|
class: "flex items-center gap-1.5 pl-3 pr-1.5 shrink-0 bg-gray-150! hover:bg-gray-100!",
|
|
@@ -159,7 +160,7 @@ const N = { class: "text-gray-800! h-4! w-4! flex items-center justify-center" }
|
|
|
159
160
|
])
|
|
160
161
|
]),
|
|
161
162
|
_: 1
|
|
162
|
-
})) : (
|
|
163
|
+
})) : (s(), n(f, {
|
|
163
164
|
key: 1,
|
|
164
165
|
variant: "outline",
|
|
165
166
|
icon: "hugeicons:filter-add",
|
|
@@ -190,5 +191,5 @@ const N = { class: "text-gray-800! h-4! w-4! flex items-center justify-center" }
|
|
|
190
191
|
}
|
|
191
192
|
});
|
|
192
193
|
export {
|
|
193
|
-
|
|
194
|
+
me as default
|
|
194
195
|
};
|
|
@@ -5,6 +5,7 @@ import G from "../Tooltip.vue.js";
|
|
|
5
5
|
import xe from "../Dropdown/Dropdown.vue.js";
|
|
6
6
|
import { $t as J } from "../../utils/i18n.js";
|
|
7
7
|
/* empty css */
|
|
8
|
+
/* empty css */
|
|
8
9
|
/* empty css */
|
|
9
10
|
const we = {
|
|
10
11
|
key: 0,
|
|
@@ -12,7 +13,7 @@ const we = {
|
|
|
12
13
|
}, ke = { class: "w-full" }, Ce = { class: "flex items-center w-full gap-2 text-sm" }, Ie = { class: "truncate flex-1 font-medium" }, Se = ["onKeydown"], ze = {
|
|
13
14
|
key: 0,
|
|
14
15
|
class: "sidebar-children-container overflow-hidden transition-all duration-300 ease-in-out relative"
|
|
15
|
-
}, $e = { class: "pt-1 space-y-0.5" },
|
|
16
|
+
}, $e = { class: "pt-1 space-y-0.5" }, De = /* @__PURE__ */ le({
|
|
16
17
|
__name: "SidebarMenuItem",
|
|
17
18
|
props: {
|
|
18
19
|
item: {},
|
|
@@ -378,5 +379,5 @@ const we = {
|
|
|
378
379
|
}
|
|
379
380
|
});
|
|
380
381
|
export {
|
|
381
|
-
|
|
382
|
+
De as default
|
|
382
383
|
};
|