vlite3 1.4.40 → 1.5.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/components/AppShell/AppShellLayoutClassic.vue.js +27 -28
- package/components/AppShell/AppShellLayoutDashboard.vue.js +48 -48
- package/components/AppShell/AppShellLayoutDock.vue.js +51 -51
- package/components/AppShell/AppShellLayoutHeaderShell.vue.js +69 -69
- package/components/AppShell/AppShellLayoutSidebarFirst.vue.d.ts +2 -2
- package/components/AppShell/AppShellLayoutSidebarFirst.vue.js +78 -78
- package/components/AppShell/AppShellLayoutStorefront.vue.js +14 -15
- package/components/AppShell/useAppShell.d.ts +4 -0
- package/components/AppShell/useAppShell.js +45 -40
- package/components/AsyncSelect/createAsyncSelect.js +10 -10
- package/components/AttachmentsList/AttachmentsList.vue.d.ts +50 -2
- package/components/AttachmentsList/AttachmentsList.vue.js +289 -272
- package/components/AttachmentsList/types.d.ts +37 -0
- package/components/BackButton.vue.js +2 -2
- package/components/Button.vue.d.ts +1 -0
- package/components/Button.vue.js +5 -241
- package/components/Button.vue2.js +245 -2
- package/components/ButtonGroup.vue.js +2 -2
- package/components/ButtonGroup.vue2.js +4 -1
- package/components/Calendar/Calendar.vue2.js +16 -16
- package/components/Cart/CartCouponInput.vue.js +24 -24
- package/components/Cart/CartEmptyState.vue.js +4 -4
- package/components/Cart/CartLineItem.vue.js +33 -33
- package/components/Cart/CartVariant1.vue.js +3 -3
- package/components/Cart/CartVariant2.vue.js +5 -5
- package/components/Cart/CartVariant3.vue.js +25 -25
- package/components/Cart/CartVariant4.vue.js +9 -9
- package/components/CategoryManager/CategoryManager.vue.d.ts +2 -2
- package/components/CategoryManager/CategoryManager.vue2.js +18 -18
- package/components/CategoryManager/CategoryNode.vue.js +4 -4
- package/components/CategoryMenu/CategoryMenu.vue.js +3 -2
- package/components/CategoryMenu/CategoryMenuVariant1.vue2.js +3 -2
- package/components/Chat/ChatInterface.vue.js +23 -23
- package/components/Clipboard.vue.d.ts +7 -1
- package/components/Clipboard.vue.js +19 -17
- package/components/ColorPicker/{ColorIro.vue.js → ColorIro.vue2.js} +22 -22
- package/components/ColorPicker/ColorIro.vue3.js +2 -2
- package/components/ColorPicker/ColorPicker.vue.js +8 -8
- package/components/Comment/CommentEditor.vue.js +14 -14
- package/components/Comment/CommentItem.vue2.js +6 -6
- package/components/Comment/CommentThread.vue.js +4 -4
- package/components/DataList/DataList.vue.js +7 -7
- package/components/DataTable/DataTable.vue.d.ts +9 -1
- package/components/DataTable/DataTable.vue.js +374 -263
- package/components/DataTable/DataTableRow.vue.d.ts +23 -2
- package/components/DataTable/DataTableRow.vue.js +5 -198
- package/components/DataTable/DataTableRow.vue2.js +360 -2
- package/components/DataTable/dataTableHeaders.d.ts +18 -0
- package/components/DataTable/dataTableHeaders.js +9 -0
- package/components/DataTable/types.d.ts +6 -0
- package/components/DatePicker.vue.js +8 -9
- package/components/DateRangePicker.vue2.js +34 -34
- package/components/Dropdown/Dropdown.vue.d.ts +7 -2
- package/components/Dropdown/Dropdown.vue.js +146 -139
- package/components/Dropdown/DropdownTrigger.vue.js +6 -6
- package/components/ExportData/ExportData.vue.js +15 -15
- package/components/FilePicker/FilePickerDropzone.vue.js +16 -16
- package/components/FilePicker/FilePickerInput.vue.js +3 -2
- package/components/FilePicker/FilePreview.vue.js +3 -3
- package/components/FileTree/FileTree.vue.js +4 -4
- package/components/FileTree/FileTree.vue2.js +9 -9
- package/components/FileTree/FileTreeNode.vue.js +76 -72
- package/components/Footer/Variant1.vue.js +48 -48
- package/components/Footer/Variant2.vue.js +42 -42
- package/components/Form/AccordionView.vue.d.ts +1 -1
- package/components/Form/AccordionView.vue.js +2 -2
- package/components/Form/AccordionView.vue3.js +61 -57
- package/components/Form/Form.vue2.js +41 -41
- package/components/Form/TableRow.vue.d.ts +7 -0
- package/components/Form/TableRow.vue.js +187 -41
- package/components/Form/TableView.vue.d.ts +11 -1
- package/components/Form/TableView.vue.js +71 -49
- package/components/Form/composables/useForm.js +146 -142
- package/components/Form/index.vue.d.ts +5 -1
- package/components/Form/index.vue.js +2 -2
- package/components/Form/index.vue2.js +44 -37
- package/components/Form/rowHelpers.d.ts +20 -0
- package/components/Form/rowHelpers.js +76 -28
- package/components/Form/types.d.ts +11 -0
- package/components/GoogleLogin.vue.js +4 -4
- package/components/IconPicker.vue.js +9 -9
- package/components/ImportData/ImportData.vue.js +11 -11
- package/components/ImportData/ImportStep1.vue.js +10 -10
- package/components/ImportData/ImportStep2.vue.js +15 -14
- package/components/Input.vue.js +133 -129
- package/components/Kanban/KanbanBoard.vue.js +1 -1
- package/components/Kanban/KanbanBoard.vue2.js +9 -9
- package/components/MultiSelect/MultiSelect.vue.js +3 -2
- package/components/Navbar/Navbar.vue.js +17 -17
- package/components/Navbar/NavbarGroup.vue.js +8 -7
- package/components/Navbar/NavbarItem.vue.js +40 -39
- package/components/Navbar/NavbarTabs.vue.js +6 -184
- package/components/Navbar/NavbarTabs.vue2.js +204 -0
- package/components/Navbar/useNavbar.js +3 -3
- package/components/NavbarCommandPalette.vue.js +1 -1
- package/components/NumberInput.vue.js +2 -2
- package/components/NumberInput.vue2.js +81 -77
- package/components/OTPInput/OTPInput.vue.js +24 -23
- package/components/Pagination/Pagination.vue.d.ts +1 -1
- package/components/Pagination/Pagination.vue.js +5 -274
- package/components/Pagination/Pagination.vue2.js +283 -2
- package/components/PermissionMatrix/PermissionTopBar.vue.js +19 -18
- package/components/PricingPlan/PricingPlanItem.vue.js +7 -7
- package/components/Screen/Screen.vue.d.ts +1 -1
- package/components/Screen/Screen.vue.js +21 -21
- package/components/Screen/ScreenFilter.vue.js +5 -5
- package/components/Screen/components/ScreenAddAction.vue.js +3 -3
- package/components/Screen/components/ScreenEmptyState.vue.js +10 -10
- package/components/Screen/components/ScreenExportModal.vue.js +12 -12
- package/components/Screen/components/ScreenOptionsDropdown.vue.js +5 -5
- package/components/Screen/components/ScreenToolbar.vue.js +15 -15
- package/components/SidePanel.vue.js +2 -2
- package/components/SidePanel.vue2.js +6 -6
- package/components/SidebarMenu/SidebarMenu.vue.js +77 -72
- package/components/SidebarMenu/SidebarMenuItem.vue.js +172 -168
- package/components/Slider.vue.js +123 -108
- package/components/Tabes/Tabes.vue.d.ts +25 -4
- package/components/Tabes/Tabes.vue.js +3 -3
- package/components/Tabes/Tabes.vue2.js +274 -211
- package/components/Tabes/tabes.utils.d.ts +30 -0
- package/components/Tabes/tabes.utils.js +49 -18
- package/components/Tabes/types.d.ts +7 -0
- package/components/Textarea.vue.d.ts +2 -0
- package/components/Textarea.vue.js +19 -16
- package/components/ThemeToggle.vue.js +8 -8
- package/components/ToastNotification.vue2.js +10 -10
- package/components/TreeConnectors/TreeConnectors.vue.d.ts +1 -1
- package/components/TreeConnectors/TreeConnectors.vue.js +13 -8
- package/components/TreeConnectors/geometry.js +77 -69
- package/components/Workbook/WorkbookAddButton.vue.js +2 -2
- package/composables/useRtl.d.ts +14 -0
- package/composables/useRtl.js +33 -0
- package/index.js +470 -471
- package/package.json +5 -4
- package/style.css +86 -1
- package/types/button.d.ts +8 -0
- package/components/Navbar/NavbarTabs.vue3.js +0 -5
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
1
|
+
import { defineComponent as fe, ref as a, computed as r, watch as $, inject as me, onMounted as ve, onUnmounted as ye, provide as U, reactive as he, toRefs as ge, openBlock as D, createElementBlock as be, normalizeStyle as pe, createVNode as q, unref as c, withCtx as m, createBlock as G, normalizeClass as Ce, createSlots as Se, renderSlot as v, normalizeProps as J, guardReactiveProps as K, createCommentVNode as Q, createElementVNode as we } from "vue";
|
|
2
|
+
import Oe from "v-tooltip-lite";
|
|
3
3
|
import "v-tooltip-lite/style.css";
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import { useDropdownIds as
|
|
8
|
-
import { useDropdownSelection as
|
|
9
|
-
import { useDropdownHydration as
|
|
10
|
-
|
|
4
|
+
import $e from "./DropdownMenu.vue.js";
|
|
5
|
+
import Ie from "./DropdownTrigger.vue.js";
|
|
6
|
+
import ke from "../ConfirmationModal.vue.js";
|
|
7
|
+
import { useDropdownIds as Te } from "./composables/useDropdownIds.js";
|
|
8
|
+
import { useDropdownSelection as Be } from "./composables/useDropdownSelection.js";
|
|
9
|
+
import { useDropdownHydration as Me } from "./composables/useDropdownHydration.js";
|
|
10
|
+
import { useRtl as Pe, resolveDirFromAncestors as xe } from "../../composables/useRtl.js";
|
|
11
|
+
const Fe = /* @__PURE__ */ fe({
|
|
11
12
|
__name: "Dropdown",
|
|
12
13
|
props: {
|
|
13
14
|
selected: {},
|
|
@@ -46,7 +47,7 @@ const Ve = /* @__PURE__ */ re({
|
|
|
46
47
|
debounceTime: { default: 300 },
|
|
47
48
|
fetchSelected: {},
|
|
48
49
|
triggerProps: {},
|
|
49
|
-
direction: { default: "
|
|
50
|
+
direction: { default: "auto" },
|
|
50
51
|
isNested: { type: Boolean, default: !1 },
|
|
51
52
|
disabled: { type: Boolean, default: !1 },
|
|
52
53
|
readonly: { type: Boolean, default: !1 },
|
|
@@ -54,160 +55,166 @@ const Ve = /* @__PURE__ */ re({
|
|
|
54
55
|
trigger: { default: "click" }
|
|
55
56
|
},
|
|
56
57
|
emits: ["onSelect", "update:modelValue", "onOpen", "onClose", "update:isOpen", "load-more", "search"],
|
|
57
|
-
setup(t, { emit:
|
|
58
|
-
const
|
|
58
|
+
setup(t, { emit: X }) {
|
|
59
|
+
const l = t, E = Pe(), I = a(null), y = r(() => l.direction === "rtl" ? "rtl" : l.direction === "ltr" ? "ltr" : I.value ? I.value : E.value ? "rtl" : "ltr"), h = X, g = a(!1), b = a(null), Y = r(() => l.doubleConfirmation || g.value ? !0 : (l.options ?? []).some(
|
|
59
60
|
(e) => typeof e == "object" && e !== null && !!e.confirmation
|
|
60
|
-
)),
|
|
61
|
+
)), d = a({
|
|
61
62
|
title: "Confirm Selection",
|
|
62
63
|
description: "Are you sure you want to select this option?",
|
|
63
64
|
confirmText: "Confirm",
|
|
64
65
|
cancelText: "Cancel",
|
|
65
66
|
variant: "primary"
|
|
66
|
-
}),
|
|
67
|
-
|
|
68
|
-
|
|
67
|
+
}), Z = r(() => l.position ? l.position : y.value === "rtl" ? "bottom-end" : "bottom-start"), _ = r(() => l.nestedPosition ? l.nestedPosition : y.value === "rtl" ? "left-start" : "right-start"), C = a(l.isOpen || !1), S = a(0), H = a(null), k = a(null), R = () => {
|
|
68
|
+
I.value = xe(H.value);
|
|
69
|
+
};
|
|
70
|
+
$(E, () => {
|
|
71
|
+
R();
|
|
72
|
+
});
|
|
73
|
+
const T = () => {
|
|
74
|
+
k.value && setTimeout(() => {
|
|
75
|
+
k.value?.focus({ preventScroll: !0 });
|
|
69
76
|
}, 10);
|
|
70
|
-
},
|
|
71
|
-
|
|
72
|
-
},
|
|
73
|
-
|
|
77
|
+
}, ee = `dropdown-${Math.random().toString(36).substring(2, 9)}`, B = r(() => l.menuId || ee), p = a([]), s = me("dropdown-context", null), te = (e) => {
|
|
78
|
+
p.value.includes(e) || p.value.push(e), s?.registerChildId?.(e);
|
|
79
|
+
}, le = (e) => {
|
|
80
|
+
p.value = p.value.filter((o) => o !== e), s?.unregisterChildId?.(e);
|
|
74
81
|
};
|
|
75
|
-
|
|
76
|
-
s?.registerChildId && s.registerChildId(`#${
|
|
77
|
-
}),
|
|
78
|
-
s?.unregisterChildId && s.unregisterChildId(`#${
|
|
79
|
-
}),
|
|
80
|
-
() =>
|
|
82
|
+
ve(() => {
|
|
83
|
+
R(), s?.registerChildId && s.registerChildId(`#${B.value}`);
|
|
84
|
+
}), ye(() => {
|
|
85
|
+
s?.unregisterChildId && s.unregisterChildId(`#${B.value}`);
|
|
86
|
+
}), $(
|
|
87
|
+
() => l.isOpen,
|
|
81
88
|
(e) => {
|
|
82
89
|
if (e !== void 0) {
|
|
83
|
-
if ((
|
|
90
|
+
if ((l.disabled || l.readonly) && e) return;
|
|
84
91
|
C.value = e;
|
|
85
92
|
}
|
|
86
93
|
}
|
|
87
94
|
);
|
|
88
|
-
const
|
|
89
|
-
if (
|
|
90
|
-
C.value = !1,
|
|
95
|
+
const V = (e) => {
|
|
96
|
+
if (l.disabled || l.readonly) {
|
|
97
|
+
C.value = !1, h("update:isOpen", !1);
|
|
91
98
|
return;
|
|
92
99
|
}
|
|
93
|
-
C.value = e,
|
|
94
|
-
},
|
|
95
|
-
|
|
96
|
-
},
|
|
97
|
-
e ?
|
|
100
|
+
C.value = e, h("update:isOpen", e), h(e ? "onOpen" : "onClose"), s?.onChildToggle?.(e);
|
|
101
|
+
}, w = () => {
|
|
102
|
+
V(!1);
|
|
103
|
+
}, ne = (e) => {
|
|
104
|
+
e ? S.value++ : S.value = Math.max(0, S.value - 1);
|
|
98
105
|
};
|
|
99
|
-
|
|
100
|
-
close:
|
|
106
|
+
U("dropdown-context", {
|
|
107
|
+
close: w,
|
|
101
108
|
onChildToggle: (e) => {
|
|
102
|
-
|
|
109
|
+
ne(e), s?.onChildToggle?.(e);
|
|
103
110
|
},
|
|
104
|
-
registerChildId:
|
|
105
|
-
unregisterChildId:
|
|
106
|
-
}),
|
|
107
|
-
const
|
|
108
|
-
|
|
109
|
-
|
|
111
|
+
registerChildId: te,
|
|
112
|
+
unregisterChildId: le
|
|
113
|
+
}), U("modal-context", null);
|
|
114
|
+
const M = r(() => l.options ? l.options.map((e) => typeof e == "string" || typeof e == "number" ? { label: String(e), value: String(e) } : e) : []), O = a([]), W = a(!1), P = a(!1);
|
|
115
|
+
$(
|
|
116
|
+
M,
|
|
110
117
|
(e) => {
|
|
111
118
|
if (e) {
|
|
112
|
-
if (
|
|
113
|
-
const o = [...
|
|
114
|
-
e.forEach((
|
|
115
|
-
o.some((i) => i.value !== void 0 &&
|
|
116
|
-
}),
|
|
119
|
+
if (l.remote) {
|
|
120
|
+
const o = [...O.value];
|
|
121
|
+
e.forEach((n) => {
|
|
122
|
+
o.some((i) => i.value !== void 0 && n.value !== void 0 ? typeof i.value == "object" && i.key && n.key ? i.key === n.key && i.value[i.key] === n.value[n.key] : i.value === n.value : i.label === n.label) || o.push(n);
|
|
123
|
+
}), O.value = o;
|
|
117
124
|
} else
|
|
118
|
-
|
|
119
|
-
!
|
|
120
|
-
|
|
125
|
+
O.value = e;
|
|
126
|
+
!W.value && e.length > 0 && (W.value = !0, setTimeout(() => {
|
|
127
|
+
P.value = !0, L(A.value);
|
|
121
128
|
}, 10));
|
|
122
129
|
}
|
|
123
130
|
},
|
|
124
131
|
{ immediate: !0 }
|
|
125
132
|
);
|
|
126
|
-
const f =
|
|
127
|
-
const e = [...
|
|
128
|
-
return
|
|
129
|
-
o.has(
|
|
133
|
+
const f = r(() => {
|
|
134
|
+
const e = [...O.value], o = new Set(e.map((n) => n.value ?? n.label));
|
|
135
|
+
return x.value.forEach((n, u) => {
|
|
136
|
+
o.has(u) || (e.unshift(n), o.add(u));
|
|
130
137
|
}), e;
|
|
131
|
-
}), { selectedBuffer:
|
|
132
|
-
fetchSelected:
|
|
138
|
+
}), { selectedBuffer: x, isHydrating: oe, hydrateSelected: L } = Me({
|
|
139
|
+
fetchSelected: l.fetchSelected,
|
|
133
140
|
getAvailableOptions: () => f.value,
|
|
134
|
-
isReady: () =>
|
|
135
|
-
}), { getAllRecursiveIds:
|
|
136
|
-
...
|
|
141
|
+
isReady: () => P.value
|
|
142
|
+
}), { getAllRecursiveIds: ae } = Te(), ie = he({
|
|
143
|
+
...ge(l),
|
|
137
144
|
options: f
|
|
138
|
-
}), { currentValue:
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
),
|
|
142
|
-
const e =
|
|
143
|
-
return [.../* @__PURE__ */ new Set([...e, ...o, ...
|
|
145
|
+
}), { currentValue: A, selectedLabel: j, selectedIcon: z, selectOption: se } = Be(
|
|
146
|
+
ie,
|
|
147
|
+
h
|
|
148
|
+
), re = r(() => {
|
|
149
|
+
const e = l.ignoreClickOutside || [], o = ae(f.value);
|
|
150
|
+
return [.../* @__PURE__ */ new Set([...e, ...o, ...p.value])];
|
|
144
151
|
});
|
|
145
|
-
|
|
146
|
-
() =>
|
|
152
|
+
$(
|
|
153
|
+
() => A.value,
|
|
147
154
|
(e) => {
|
|
148
|
-
|
|
155
|
+
P.value && L(e);
|
|
149
156
|
},
|
|
150
157
|
{ deep: !0 }
|
|
151
158
|
);
|
|
152
|
-
const
|
|
153
|
-
if (
|
|
154
|
-
|
|
159
|
+
const de = (e) => {
|
|
160
|
+
if (l.disabled || l.readonly || e.disabled) return;
|
|
161
|
+
l.doubleConfirmation || !!e.confirmation ? (b.value = e, typeof e.confirmation == "object" ? d.value = {
|
|
155
162
|
title: e.confirmation.title || "Confirm Selection",
|
|
156
163
|
description: e.confirmation.description || "Are you sure you want to select this option?",
|
|
157
164
|
confirmText: e.confirmation.confirmText || "Confirm",
|
|
158
165
|
cancelText: e.confirmation.cancelText || "Cancel",
|
|
159
166
|
variant: e.confirmation.variant || "primary"
|
|
160
|
-
} :
|
|
167
|
+
} : d.value = {
|
|
161
168
|
title: "Confirm Selection",
|
|
162
169
|
description: `Are you sure you want to select "${e.label}"?`,
|
|
163
170
|
confirmText: "Confirm",
|
|
164
171
|
cancelText: "Cancel",
|
|
165
172
|
variant: "primary"
|
|
166
|
-
},
|
|
167
|
-
},
|
|
168
|
-
if (
|
|
173
|
+
}, g.value = !0, w()) : (F(e), l.closeOnSelect && (w(), T()));
|
|
174
|
+
}, F = (e) => {
|
|
175
|
+
if (l.disabled || l.readonly || e.disabled) return;
|
|
169
176
|
const o = e.value ?? e.label;
|
|
170
|
-
|
|
171
|
-
const
|
|
172
|
-
if (!
|
|
173
|
-
const
|
|
174
|
-
(e._path || [
|
|
175
|
-
typeof
|
|
177
|
+
x.value.has(o) || x.value.set(o, e);
|
|
178
|
+
const n = se(e);
|
|
179
|
+
if (!l.isNested) {
|
|
180
|
+
const u = e._originalOption || e, i = u.value ?? u.label;
|
|
181
|
+
(e._path || [u]).forEach((N) => {
|
|
182
|
+
typeof N.onSelect == "function" && N.onSelect({
|
|
176
183
|
value: i,
|
|
177
|
-
option:
|
|
184
|
+
option: N,
|
|
178
185
|
data: f.value || [],
|
|
179
|
-
values:
|
|
186
|
+
values: n
|
|
180
187
|
});
|
|
181
188
|
});
|
|
182
189
|
}
|
|
183
|
-
},
|
|
184
|
-
|
|
185
|
-
},
|
|
186
|
-
|
|
190
|
+
}, ue = () => {
|
|
191
|
+
b.value && (F(b.value), b.value = null, g.value = !1, T());
|
|
192
|
+
}, ce = () => {
|
|
193
|
+
b.value = null, g.value = !1, T();
|
|
187
194
|
};
|
|
188
|
-
return (e, o) => (
|
|
189
|
-
class: "relative inline-block text-
|
|
190
|
-
style:
|
|
195
|
+
return (e, o) => (D(), be("div", {
|
|
196
|
+
class: "relative inline-block text-start",
|
|
197
|
+
style: pe({ direction: y.value }),
|
|
191
198
|
ref_key: "dropdownWrapper",
|
|
192
|
-
ref:
|
|
199
|
+
ref: H
|
|
193
200
|
}, [
|
|
194
|
-
|
|
201
|
+
q(c(Oe), {
|
|
195
202
|
content: "",
|
|
196
203
|
trigger: t.trigger,
|
|
197
204
|
arrow: !1,
|
|
198
205
|
disabled: t.disabled || t.readonly,
|
|
199
206
|
teleport: t.teleport,
|
|
200
207
|
offset: t.offset,
|
|
201
|
-
placement:
|
|
208
|
+
placement: Z.value,
|
|
202
209
|
isOpen: C.value,
|
|
203
|
-
keepAlive:
|
|
204
|
-
menuId:
|
|
205
|
-
ignoreClickOutside:
|
|
210
|
+
keepAlive: S.value > 0,
|
|
211
|
+
menuId: B.value,
|
|
212
|
+
ignoreClickOutside: re.value,
|
|
206
213
|
class: "w-full flex!",
|
|
207
214
|
className: "dropdown " + (t.className || "") + (t.variant === "transparent" ? " unstyled-dropdown" : "") + (t.variant === "secondary" ? " dropdown-secondary" : ""),
|
|
208
|
-
onOnShow: o[2] || (o[2] = (
|
|
209
|
-
onOnHide: o[3] || (o[3] = (
|
|
210
|
-
"onUpdate:isOpen":
|
|
215
|
+
onOnShow: o[2] || (o[2] = (n) => e.$emit("onOpen")),
|
|
216
|
+
onOnHide: o[3] || (o[3] = (n) => e.$emit("onClose")),
|
|
217
|
+
"onUpdate:isOpen": V,
|
|
211
218
|
triggerClass: "w-full flex items-center",
|
|
212
219
|
styles: {
|
|
213
220
|
...t.menuStyles || {},
|
|
@@ -217,17 +224,17 @@ const Ve = /* @__PURE__ */ re({
|
|
|
217
224
|
...t.variant === "transparent" ? { background: "transparent", border: "none", boxShadow: "none" } : {}
|
|
218
225
|
}
|
|
219
226
|
}, {
|
|
220
|
-
trigger: m(({ isOpen:
|
|
221
|
-
v(e.$slots, "trigger",
|
|
222
|
-
selectedLabel: c(
|
|
223
|
-
selectedIcon: t.showSelectedIcon ? c(
|
|
224
|
-
isOpen:
|
|
227
|
+
trigger: m(({ isOpen: n }) => [
|
|
228
|
+
v(e.$slots, "trigger", J(K({
|
|
229
|
+
selectedLabel: c(j),
|
|
230
|
+
selectedIcon: t.showSelectedIcon ? c(z) : void 0,
|
|
231
|
+
isOpen: n
|
|
225
232
|
})), () => [
|
|
226
|
-
|
|
227
|
-
"selected-label": c(
|
|
228
|
-
"selected-icon": t.showSelectedIcon ? c(
|
|
229
|
-
"is-open":
|
|
230
|
-
direction:
|
|
233
|
+
q(Ie, {
|
|
234
|
+
"selected-label": c(j),
|
|
235
|
+
"selected-icon": t.showSelectedIcon ? c(z) : void 0,
|
|
236
|
+
"is-open": n,
|
|
237
|
+
direction: y.value,
|
|
231
238
|
disabled: t.disabled,
|
|
232
239
|
readonly: t.readonly,
|
|
233
240
|
triggerProps: t.triggerProps,
|
|
@@ -236,34 +243,34 @@ const Ve = /* @__PURE__ */ re({
|
|
|
236
243
|
])
|
|
237
244
|
]),
|
|
238
245
|
default: m(() => [
|
|
239
|
-
!(t.disabled || t.readonly) && (
|
|
246
|
+
!(t.disabled || t.readonly) && (M.value.length || f.value.length || e.$slots.menu || e.$slots.item || e.$slots.default || t.remote || t.searchable) ? (D(), G($e, {
|
|
240
247
|
key: 0,
|
|
241
|
-
options:
|
|
248
|
+
options: M.value,
|
|
242
249
|
cachedOptions: f.value,
|
|
243
|
-
class:
|
|
250
|
+
class: Ce(t.className),
|
|
244
251
|
emptyMessage: t.emptyMessage,
|
|
245
252
|
searchEmptyMessage: t.searchEmptyMessage,
|
|
246
|
-
selected: c(
|
|
253
|
+
selected: c(A),
|
|
247
254
|
selectedIndex: t.selectedIndex,
|
|
248
255
|
maxHeight: t.maxHeight,
|
|
249
|
-
nestedPosition:
|
|
256
|
+
nestedPosition: _.value,
|
|
250
257
|
nestedOffset: t.nestedOffset,
|
|
251
258
|
selectable: t.selectable,
|
|
252
|
-
direction:
|
|
259
|
+
direction: y.value,
|
|
253
260
|
isCustomSlotMenu: !!e.$slots?.default || !!e.$slots?.menu,
|
|
254
261
|
layout: t.layout,
|
|
255
262
|
columns: t.columns,
|
|
256
|
-
loading: t.loading || c(
|
|
263
|
+
loading: t.loading || c(oe),
|
|
257
264
|
hasMore: t.hasMore,
|
|
258
265
|
searchable: t.searchable,
|
|
259
266
|
remote: t.remote,
|
|
260
267
|
debounceTime: t.debounceTime,
|
|
261
268
|
trigger: t.trigger,
|
|
262
|
-
onSelect:
|
|
263
|
-
onClose:
|
|
264
|
-
onLoadMore: o[0] || (o[0] = (
|
|
265
|
-
onSearch: o[1] || (o[1] = (
|
|
266
|
-
},
|
|
269
|
+
onSelect: de,
|
|
270
|
+
onClose: w,
|
|
271
|
+
onLoadMore: o[0] || (o[0] = (n) => e.$emit("load-more")),
|
|
272
|
+
onSearch: o[1] || (o[1] = (n) => e.$emit("search", n))
|
|
273
|
+
}, Se({ _: 2 }, [
|
|
267
274
|
e.$slots.menu || e.$slots?.default ? {
|
|
268
275
|
name: "menu",
|
|
269
276
|
fn: m(() => [
|
|
@@ -274,8 +281,8 @@ const Ve = /* @__PURE__ */ re({
|
|
|
274
281
|
} : void 0,
|
|
275
282
|
e.$slots.item ? {
|
|
276
283
|
name: "item",
|
|
277
|
-
fn: m((
|
|
278
|
-
v(e.$slots, "item",
|
|
284
|
+
fn: m((n) => [
|
|
285
|
+
v(e.$slots, "item", J(K(n)))
|
|
279
286
|
]),
|
|
280
287
|
key: "1"
|
|
281
288
|
} : void 0,
|
|
@@ -293,24 +300,24 @@ const Ve = /* @__PURE__ */ re({
|
|
|
293
300
|
]),
|
|
294
301
|
key: "3"
|
|
295
302
|
} : void 0
|
|
296
|
-
]), 1032, ["options", "cachedOptions", "class", "emptyMessage", "searchEmptyMessage", "selected", "selectedIndex", "maxHeight", "nestedPosition", "nestedOffset", "selectable", "direction", "isCustomSlotMenu", "layout", "columns", "loading", "hasMore", "searchable", "remote", "debounceTime", "trigger"])) :
|
|
303
|
+
]), 1032, ["options", "cachedOptions", "class", "emptyMessage", "searchEmptyMessage", "selected", "selectedIndex", "maxHeight", "nestedPosition", "nestedOffset", "selectable", "direction", "isCustomSlotMenu", "layout", "columns", "loading", "hasMore", "searchable", "remote", "debounceTime", "trigger"])) : Q("", !0)
|
|
297
304
|
]),
|
|
298
305
|
_: 3
|
|
299
306
|
}, 8, ["trigger", "disabled", "teleport", "offset", "placement", "isOpen", "keepAlive", "menuId", "ignoreClickOutside", "className", "styles"]),
|
|
300
|
-
|
|
307
|
+
Y.value ? (D(), G(ke, {
|
|
301
308
|
key: 0,
|
|
302
|
-
show:
|
|
303
|
-
title:
|
|
304
|
-
description:
|
|
305
|
-
"confirm-text":
|
|
306
|
-
"cancel-text":
|
|
307
|
-
variant:
|
|
308
|
-
onConfirm:
|
|
309
|
-
onCancel:
|
|
310
|
-
}, null, 8, ["show", "title", "description", "confirm-text", "cancel-text", "variant"])) :
|
|
311
|
-
|
|
309
|
+
show: g.value,
|
|
310
|
+
title: d.value.title,
|
|
311
|
+
description: d.value.description,
|
|
312
|
+
"confirm-text": d.value.confirmText,
|
|
313
|
+
"cancel-text": d.value.cancelText,
|
|
314
|
+
variant: d.value.variant,
|
|
315
|
+
onConfirm: ue,
|
|
316
|
+
onCancel: ce
|
|
317
|
+
}, null, 8, ["show", "title", "description", "confirm-text", "cancel-text", "variant"])) : Q("", !0),
|
|
318
|
+
we("span", {
|
|
312
319
|
ref_key: "focusTrapAfter",
|
|
313
|
-
ref:
|
|
320
|
+
ref: k,
|
|
314
321
|
tabindex: "-1",
|
|
315
322
|
class: "outline-none pointer-events-none absolute opacity-0 w-0 h-0",
|
|
316
323
|
"aria-hidden": "true"
|
|
@@ -319,5 +326,5 @@ const Ve = /* @__PURE__ */ re({
|
|
|
319
326
|
}
|
|
320
327
|
});
|
|
321
328
|
export {
|
|
322
|
-
|
|
329
|
+
Fe as default
|
|
323
330
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { defineComponent as a, openBlock as l, createBlock as d, mergeProps as
|
|
2
|
-
import
|
|
3
|
-
const
|
|
1
|
+
import { defineComponent as a, openBlock as l, createBlock as d, mergeProps as n } from "vue";
|
|
2
|
+
import i from "../Button.vue.js";
|
|
3
|
+
const c = /* @__PURE__ */ a({
|
|
4
4
|
__name: "DropdownTrigger",
|
|
5
5
|
props: {
|
|
6
6
|
selectedLabel: { default: "" },
|
|
@@ -14,7 +14,7 @@ const s = /* @__PURE__ */ a({
|
|
|
14
14
|
triggerProps: {}
|
|
15
15
|
},
|
|
16
16
|
setup(e) {
|
|
17
|
-
return (t, o) => (l(), d(
|
|
17
|
+
return (t, o) => (l(), d(i, n({
|
|
18
18
|
text: e.selectedLabel || e.placeholder,
|
|
19
19
|
iconRight: e.disabled || e.readonly ? void 0 : "iconamoon:arrow-down-2",
|
|
20
20
|
variant: "outline",
|
|
@@ -27,11 +27,11 @@ const s = /* @__PURE__ */ a({
|
|
|
27
27
|
e.readonly && !e.disabled ? "pointer-events-none justify-start!" : "",
|
|
28
28
|
e.disabled || e.readonly ? "justify-start!" : "justify-between!"
|
|
29
29
|
]],
|
|
30
|
-
"icon-right-class": "
|
|
30
|
+
"icon-right-class": "ms-auto!",
|
|
31
31
|
"data-testid": t.$attrs["data-testid"] || "dropdown-trigger"
|
|
32
32
|
}), null, 16, ["text", "iconRight", "disabled", "dir", "icon", "class", "data-testid"]));
|
|
33
33
|
}
|
|
34
34
|
});
|
|
35
35
|
export {
|
|
36
|
-
|
|
36
|
+
c as default
|
|
37
37
|
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as V, computed as k, openBlock as c, createElementBlock as E, createBlock as v, withCtx as w, createElementVNode as u, toDisplayString as g, Fragment as _, renderList as A, createVNode as D } from "vue";
|
|
2
2
|
import b from "../Button.vue.js";
|
|
3
3
|
import I from "../Modal.vue.js";
|
|
4
4
|
import O from "../Icon.vue.js";
|
|
5
5
|
import { showToast as p } from "../../composables/useNotifications.js";
|
|
6
|
-
import { $t as
|
|
6
|
+
import { $t as B } from "../../utils/i18n.js";
|
|
7
7
|
import { resolveModuleRuntime as h } from "../../utils/UtilsModuleInterop.js";
|
|
8
|
-
const R = { class: "px-1 py-1 text-sm" }, L = { class: "font-medium mb-3 text-muted-foreground" }, M = { class: "space-y-3" }, H = /* @__PURE__ */
|
|
8
|
+
const R = { class: "px-1 py-1 text-sm" }, L = { class: "font-medium mb-3 text-muted-foreground" }, M = { class: "space-y-3" }, H = /* @__PURE__ */ V({
|
|
9
9
|
__name: "ExportData",
|
|
10
10
|
props: {
|
|
11
11
|
data: {},
|
|
@@ -18,7 +18,7 @@ const R = { class: "px-1 py-1 text-sm" }, L = { class: "font-medium mb-3 text-mu
|
|
|
18
18
|
mode: { default: "frontend" },
|
|
19
19
|
onExport: {}
|
|
20
20
|
},
|
|
21
|
-
setup(s, { expose:
|
|
21
|
+
setup(s, { expose: F }) {
|
|
22
22
|
const S = async () => {
|
|
23
23
|
const o = await import("xlsx"), e = h(
|
|
24
24
|
o,
|
|
@@ -44,19 +44,19 @@ const R = { class: "px-1 py-1 text-sm" }, L = { class: "font-medium mb-3 text-mu
|
|
|
44
44
|
throw new Error("The file download runtime is unavailable.");
|
|
45
45
|
a(o, e);
|
|
46
46
|
}, n = s, i = (o, e, t) => {
|
|
47
|
-
const r = t ?
|
|
47
|
+
const r = t ? B(o, t) : B(o);
|
|
48
48
|
return r !== o ? r : e;
|
|
49
|
-
},
|
|
49
|
+
}, j = (o, e) => {
|
|
50
50
|
if (!(!o || !e))
|
|
51
51
|
return e.includes(".") ? e.split(".").reduce((t, r) => t?.[r], o) : o[e];
|
|
52
52
|
}, y = k(() => [
|
|
53
53
|
{ label: "Excel (.xlsx)", value: "excel", icon: "lucide:file-spreadsheet" },
|
|
54
54
|
{ label: "CSV (.csv)", value: "csv", icon: "lucide:file-text" },
|
|
55
55
|
{ label: "JSON (.json)", value: "json", icon: "lucide:file-json" }
|
|
56
|
-
].filter((e) => n.formats.includes(e.value))),
|
|
56
|
+
].filter((e) => n.formats.includes(e.value))), T = () => n.data.map((o) => {
|
|
57
57
|
const e = {};
|
|
58
58
|
return n.fields.forEach((t) => {
|
|
59
|
-
const r =
|
|
59
|
+
const r = j(o, t.field);
|
|
60
60
|
t.format ? e[t.title] = t.format(r, o) : e[t.title] = r ?? "";
|
|
61
61
|
}), e;
|
|
62
62
|
}), f = async (o, e) => {
|
|
@@ -73,13 +73,13 @@ const R = { class: "px-1 py-1 text-sm" }, L = { class: "font-medium mb-3 text-mu
|
|
|
73
73
|
return;
|
|
74
74
|
}
|
|
75
75
|
try {
|
|
76
|
-
const t = n.filename ? n.filename : `${n.title.toLowerCase().replace(/\s+/g, "-")}-${(/* @__PURE__ */ new Date()).toISOString().split("T")[0]}`, r =
|
|
76
|
+
const t = n.filename ? n.filename : `${n.title.toLowerCase().replace(/\s+/g, "-")}-${(/* @__PURE__ */ new Date()).toISOString().split("T")[0]}`, r = T();
|
|
77
77
|
switch (o) {
|
|
78
78
|
case "excel": {
|
|
79
79
|
const a = await S(), l = a.utils.book_new(), x = a.utils.json_to_sheet(r);
|
|
80
80
|
a.utils.book_append_sheet(l, x, n.title.substring(0, 31));
|
|
81
|
-
const d = a.write(l, { bookType: "xlsx", type: "array" }),
|
|
82
|
-
await m(
|
|
81
|
+
const d = a.write(l, { bookType: "xlsx", type: "array" }), N = new Blob([d], { type: "application/octet-stream" });
|
|
82
|
+
await m(N, `${t}.xlsx`);
|
|
83
83
|
break;
|
|
84
84
|
}
|
|
85
85
|
case "csv": {
|
|
@@ -102,8 +102,8 @@ const R = { class: "px-1 py-1 text-sm" }, L = { class: "font-medium mb-3 text-mu
|
|
|
102
102
|
} catch (t) {
|
|
103
103
|
console.error("Export error:", t), p(i("vlite.exportData.error", "An error occurred while exporting data."), "error");
|
|
104
104
|
}
|
|
105
|
-
},
|
|
106
|
-
return
|
|
105
|
+
}, $ = k(() => i("vlite.exportData.selectFormat", "Select Export Format"));
|
|
106
|
+
return F({
|
|
107
107
|
exportData: f,
|
|
108
108
|
availableFormats: y
|
|
109
109
|
}), (o, e) => (c(), E("div", null, [
|
|
@@ -127,9 +127,9 @@ const R = { class: "px-1 py-1 text-sm" }, L = { class: "font-medium mb-3 text-mu
|
|
|
127
127
|
]),
|
|
128
128
|
default: w(({ close: t }) => [
|
|
129
129
|
u("div", R, [
|
|
130
|
-
u("h6", L, g(
|
|
130
|
+
u("h6", L, g($.value), 1),
|
|
131
131
|
u("div", M, [
|
|
132
|
-
(c(!0), E(
|
|
132
|
+
(c(!0), E(_, null, A(y.value, (r) => (c(), v(b, {
|
|
133
133
|
key: r.value,
|
|
134
134
|
variant: "outline",
|
|
135
135
|
class: "w-full flex items-center justify-start gap-3 h-12",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as F, ref as u, computed as D, openBlock as n, createElementBlock as
|
|
1
|
+
import { defineComponent as F, ref as u, computed as D, openBlock as n, createElementBlock as i, normalizeClass as k, createElementVNode as o, createBlock as s, toDisplayString as d, createTextVNode as T, createCommentVNode as g, Fragment as w, renderList as B, unref as L, createVNode as P } from "vue";
|
|
2
2
|
import f from "../Icon.vue.js";
|
|
3
3
|
import R from "../Button.vue.js";
|
|
4
4
|
import p from "./FilePreview.vue.js";
|
|
@@ -6,10 +6,10 @@ import { isImageFile as C } from "./utils.js";
|
|
|
6
6
|
const N = ["data-testid"], S = { class: "p-3 bg-muted rounded-full text-muted-foreground" }, V = { class: "space-y-1" }, z = { class: "text-sm font-medium text-foreground" }, A = { class: "text-primary hover:underline" }, M = {
|
|
7
7
|
key: 0,
|
|
8
8
|
class: "text-xs text-muted-foreground"
|
|
9
|
-
},
|
|
9
|
+
}, j = {
|
|
10
10
|
key: 1,
|
|
11
11
|
class: "space-y-2"
|
|
12
|
-
},
|
|
12
|
+
}, E = {
|
|
13
13
|
key: 0,
|
|
14
14
|
class: "flex gap-2 mb-4!"
|
|
15
15
|
}, H = /* @__PURE__ */ F({
|
|
@@ -37,14 +37,14 @@ const N = ["data-testid"], S = { class: "p-3 bg-muted rounded-full text-muted-fo
|
|
|
37
37
|
onDrop: { type: Function }
|
|
38
38
|
},
|
|
39
39
|
setup(e) {
|
|
40
|
-
const a = e, l = u(!1), y = u(null), b = (
|
|
41
|
-
|
|
42
|
-
}, v = (
|
|
43
|
-
|
|
44
|
-
}, x = (
|
|
45
|
-
|
|
40
|
+
const a = e, l = u(!1), y = u(null), b = (t) => {
|
|
41
|
+
t.preventDefault(), !(a.disabled || a.loading) && (l.value = !0);
|
|
42
|
+
}, v = (t) => {
|
|
43
|
+
t.preventDefault(), l.value = !1;
|
|
44
|
+
}, x = (t) => {
|
|
45
|
+
t.preventDefault(), l.value = !1, !(a.disabled || a.loading || a.isProcessing) && t.dataTransfer?.files && a.onDrop(t.dataTransfer.files);
|
|
46
46
|
}, h = D(() => a.multiSelect ? a.maxFiles ? a.displayFiles.length < a.maxFiles : !0 : !1);
|
|
47
|
-
return (
|
|
47
|
+
return (t, c) => (n(), i("div", {
|
|
48
48
|
ref_key: "containerRef",
|
|
49
49
|
ref: y,
|
|
50
50
|
class: "relative",
|
|
@@ -53,8 +53,8 @@ const N = ["data-testid"], S = { class: "p-3 bg-muted rounded-full text-muted-fo
|
|
|
53
53
|
onDragleave: v,
|
|
54
54
|
onDrop: x
|
|
55
55
|
}, [
|
|
56
|
-
e.hasValue ? (n(),
|
|
57
|
-
(n(!0),
|
|
56
|
+
e.hasValue ? (n(), i("div", j, [
|
|
57
|
+
(n(!0), i(w, null, B(e.displayFiles, (r, m) => (n(), s(p, {
|
|
58
58
|
key: m,
|
|
59
59
|
file: r,
|
|
60
60
|
index: m,
|
|
@@ -66,12 +66,12 @@ const N = ["data-testid"], S = { class: "p-3 bg-muted rounded-full text-muted-fo
|
|
|
66
66
|
"enter-file-name-label": e.enterFileNameLabel,
|
|
67
67
|
"rename-file-label": e.renameFileLabel,
|
|
68
68
|
"get-preview-src": e.getPreviewSrc,
|
|
69
|
-
"is-image":
|
|
69
|
+
"is-image": L(C),
|
|
70
70
|
"on-remove": e.onRemove,
|
|
71
71
|
"on-rename": e.onRename,
|
|
72
72
|
"on-trigger": e.onTrigger
|
|
73
73
|
}, null, 8, ["file", "index", "allow-rename", "disabled", "loading", "is-processing", "multi-select", "enter-file-name-label", "rename-file-label", "get-preview-src", "is-image", "on-remove", "on-rename", "on-trigger"]))), 128)),
|
|
74
|
-
h.value ? (n(),
|
|
74
|
+
h.value ? (n(), i("div", E, [
|
|
75
75
|
P(R, {
|
|
76
76
|
size: "sm",
|
|
77
77
|
variant: "outline",
|
|
@@ -81,7 +81,7 @@ const N = ["data-testid"], S = { class: "p-3 bg-muted rounded-full text-muted-fo
|
|
|
81
81
|
onClick: e.onTrigger
|
|
82
82
|
}, null, 8, ["text", "disabled", "onClick"])
|
|
83
83
|
])) : g("", !0)
|
|
84
|
-
])) : (n(),
|
|
84
|
+
])) : (n(), i("div", {
|
|
85
85
|
key: 0,
|
|
86
86
|
class: k(["border-2 bg-body border-dashed border-border rounded-lg p-6 transition-all duration-200 ease-in-out cursor-pointer flex flex-col items-center justify-center text-center gap-2", [
|
|
87
87
|
l.value ? "border-primary bg-primary/5" : "hover:border-primary/50",
|
|
@@ -106,7 +106,7 @@ const N = ["data-testid"], S = { class: "p-3 bg-muted rounded-full text-muted-fo
|
|
|
106
106
|
o("span", A, d(e.displayText), 1),
|
|
107
107
|
T(" " + d(e.dragAndDropLabel), 1)
|
|
108
108
|
]),
|
|
109
|
-
e.fileTypes.length ? (n(),
|
|
109
|
+
e.fileTypes.length ? (n(), i("p", M, d(e.fileTypes.join(", ")), 1)) : g("", !0)
|
|
110
110
|
])
|
|
111
111
|
], 2))
|
|
112
112
|
], 40, N));
|