vlite3 1.1.2 → 1.1.5
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 +5 -0
- package/components/AttachmentsList/AttachmentsList.vue.d.ts +1 -1
- package/components/AttachmentsList/AttachmentsList.vue.js +237 -163
- package/components/Avatar.vue.js +1 -1
- package/components/AvatarUploader/AvatarUploader.vue.js +40 -37
- package/components/Button.vue.js +30 -28
- package/components/Carousel/Carousel.vue.d.ts +2 -2
- package/components/CategoryManager/CategoryManager.vue.d.ts +10 -2
- package/components/CategoryManager/CategoryManager.vue.js +138 -119
- package/components/CategoryManager/CategoryNode.vue.d.ts +2 -0
- package/components/CategoryManager/CategoryNode.vue.js +93 -88
- package/components/Chart/BarChart.vue.d.ts +48 -0
- package/components/Chart/CircleChart.vue.d.ts +47 -0
- package/components/Chart/LineChart.vue.d.ts +55 -0
- package/components/Chart/PieChart.vue.d.ts +49 -0
- package/components/Chart/index.d.ts +5 -0
- package/components/Chart/types.d.ts +135 -0
- package/components/Chart/utils.d.ts +40 -0
- package/components/Chat/ChatBubble.vue.js +22 -22
- package/components/CheckBox.vue.js +29 -28
- package/components/ColorPicker/ColorIro.vue3.js +2 -2
- package/components/ColorPicker/ColorPicker.vue.js +2 -2
- package/components/Comment/CommentEditor.vue.d.ts +41 -0
- package/components/Comment/CommentEditor.vue.js +221 -0
- package/components/Comment/CommentEditor.vue2.js +4 -0
- package/components/Comment/CommentItem.vue.d.ts +70 -0
- package/components/Comment/CommentItem.vue.js +7 -0
- package/components/Comment/CommentItem.vue2.js +322 -0
- package/components/Comment/CommentThread.vue.d.ts +64 -0
- package/components/Comment/CommentThread.vue.js +185 -0
- package/components/Comment/CommentThread.vue2.js +4 -0
- package/components/Comment/index.d.ts +4 -0
- package/components/Comment/types.d.ts +34 -0
- package/components/ConfirmationModal.vue.js +30 -28
- package/components/CopyButton.vue.d.ts +50 -0
- package/components/CopyButton.vue.js +69 -0
- package/components/CopyButton.vue2.js +4 -0
- package/components/DataTable/DataTable.vue.d.ts +2 -4
- package/components/DataTable/DataTable.vue.js +184 -235
- package/components/DataTable/DataTableHeader.vue.d.ts +2 -0
- package/components/DataTable/DataTableHeader.vue.js +24 -23
- package/components/DataTable/DataTableRow.vue.d.ts +2 -0
- package/components/DataTable/DataTableRow.vue.js +32 -31
- package/components/DataTable/types.d.ts +2 -9
- package/components/DatePicker.vue.js +41 -35
- package/components/DateRangePicker.vue.js +18 -17
- package/components/Dropdown/Dropdown.vue.d.ts +5 -0
- package/components/Dropdown/Dropdown.vue.js +141 -137
- package/components/Dropdown/DropdownBooleanItem.vue.js +16 -15
- package/components/Dropdown/DropdownItem.vue.js +21 -20
- package/components/Dropdown/DropdownMenu.vue.js +1 -1
- package/components/Dropdown/DropdownMenu.vue2.js +13 -12
- package/components/Dropdown/DropdownTrigger.vue.d.ts +4 -0
- package/components/Dropdown/DropdownTrigger.vue.js +12 -7
- package/components/Dropdown/composables/useDropdownHydration.d.ts +2 -0
- package/components/Dropdown/composables/useDropdownSelection.d.ts +1 -0
- package/components/Dropdown/composables/useDropdownSelection.js +46 -31
- package/components/Empty/Empty.vue.js +7 -5
- package/components/Empty/index.d.ts +1 -1
- package/components/Empty/variants/Variant12.vue.d.ts +22 -0
- package/components/Empty/variants/Variant12.vue.js +35 -0
- package/components/Empty/variants/Variant12.vue2.js +4 -0
- package/components/FilePicker/FilePicker.vue.js +93 -90
- package/components/Footer/Footer.vue.d.ts +3 -0
- package/components/Footer/Variant1.vue.d.ts +20 -0
- package/components/Footer/Variant2.vue.d.ts +20 -0
- package/components/Footer/Variant3.vue.d.ts +12 -0
- package/components/Footer/index.d.ts +2 -0
- package/components/Footer/types.d.ts +73 -0
- package/components/Form/CustomFields.vue.d.ts +2 -0
- package/components/Form/CustomFields.vue.js +1 -1
- package/components/Form/CustomFields.vue2.js +125 -122
- package/components/Form/Form.vue.js +2 -2
- package/components/Form/Form.vue2.js +68 -64
- package/components/Form/FormField.vue.js +205 -149
- package/components/Form/FormFields.vue.js +2 -2
- package/components/Form/FormFields.vue2.js +28 -27
- package/components/Form/types.d.ts +2 -2
- package/components/Form/utils/form.utils.d.ts +3 -3
- package/components/Form/utils/form.utils.js +37 -37
- package/components/Input.vue.js +64 -62
- package/components/Invoice/Invoice.vue.js +9 -7
- package/components/Invoice/InvoiceTotals.vue.d.ts +14 -0
- package/components/Invoice/InvoiceTotals.vue.js +86 -0
- package/components/Invoice/InvoiceTotals.vue2.js +4 -0
- package/components/Invoice/InvoiceVariant1.vue.d.ts +3 -1
- package/components/Invoice/InvoiceVariant1.vue.js +194 -207
- package/components/Invoice/InvoiceVariant2.vue.d.ts +3 -1
- package/components/Invoice/InvoiceVariant2.vue.js +109 -118
- package/components/Invoice/InvoiceVariant3.vue.d.ts +3 -1
- package/components/Invoice/InvoiceVariant3.vue.js +157 -167
- package/components/Invoice/InvoiceVariant4.vue.d.ts +3 -1
- package/components/Invoice/InvoiceVariant4.vue.js +192 -202
- package/components/Invoice/index.d.ts +1 -0
- package/components/Invoice/types.d.ts +22 -0
- package/components/Masonry/Masonry.vue.d.ts +1 -1
- package/components/Modal.vue.js +1 -1
- package/components/Modal.vue2.js +60 -54
- package/components/MultiSelect/MultiSelect.vue.d.ts +2 -0
- package/components/MultiSelect/MultiSelect.vue.js +92 -90
- package/components/MultiSelect/composables/useMultiSelectHydration.d.ts +2 -0
- package/components/NumberInput.vue.js +2 -2
- package/components/NumberInput.vue2.js +127 -121
- package/components/PricingPlan/PricingPlan.vue.d.ts +1 -1
- package/components/RichTextEditor/RichTextLinkPopover.vue.d.ts +26 -0
- package/components/RichTextEditor/RichTextReader.vue.d.ts +7 -0
- package/components/RichTextEditor/RichTextToolbar.vue.d.ts +24 -0
- package/components/RichTextEditor/composables/useRichTextImageUpload.d.ts +14 -0
- package/components/RichTextEditor/composables/useRichTextLinks.d.ts +32 -0
- package/components/RichTextEditor/index.d.ts +2 -0
- package/components/Screen/Screen.vue.js +45 -46
- package/components/Screen/ScreenFilter.vue.js +1 -1
- package/components/SidePanel.vue.js +2 -2
- package/components/SidePanel.vue2.js +58 -52
- package/components/SidebarMenu/SidebarMenu.vue.d.ts +1 -1
- package/components/SidebarMenu/SidebarMenu.vue.js +192 -91
- package/components/SidebarMenu/SidebarMenu.vue3.js +5 -0
- package/components/SidebarMenu/SidebarMenuItem.vue.js +170 -157
- package/components/SidebarMenu/types.d.ts +12 -3
- package/components/{DataTable/DataTableToolbar.vue.d.ts → Splitter/Splitter.vue.d.ts} +18 -15
- package/components/Splitter/Splitter.vue.js +64 -0
- package/components/Splitter/Splitter.vue2.js +4 -0
- package/components/Splitter/index.d.ts +1 -0
- package/components/Stats/StatItem.vue.js +96 -91
- package/components/Stats/types.d.ts +1 -0
- package/components/StatusChip/status-map.js +34 -2
- package/components/Switch.vue.d.ts +6 -1
- package/components/Switch.vue.js +61 -24
- package/components/TagInput/TagInput.vue.d.ts +187 -0
- package/components/TagInput/TagInput.vue.js +113 -0
- package/components/TagInput/TagInput.vue2.js +4 -0
- package/components/TagInput/index.d.ts +1 -0
- package/components/Textarea.vue.js +19 -18
- package/components/ThumbnailSelector/ThumbnailSelector.vue.js +2 -2
- package/components/ThumbnailSelector/ThumbnailSelector.vue2.js +19 -16
- package/components/index.d.ts +4 -0
- package/core/config.d.ts +54 -0
- package/index.d.ts +4 -0
- package/index.js +300 -285
- package/package.json +1 -1
- package/style.css +657 -6
- package/types/button.d.ts +1 -1
- package/types/config.type.d.ts +2 -0
- package/types/styles.d.ts +1 -0
- package/utils/functions.js +9 -9
- package/components/DataTable/DataTableToolbar.vue.js +0 -60
- package/components/DataTable/DataTableToolbar.vue2.js +0 -4
- package/components/SidebarMenu/SidebarMenu.vue2.js +0 -4
- /package/components/ColorPicker/{ColorIro.vue2.js → ColorIro.vue.js} +0 -0
|
@@ -1,34 +1,26 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
|
|
11
|
-
import { SCREEN_CONTEXT_KEY as $e } from "./types.js";
|
|
12
|
-
const Be = { class: "space-y-6.5" }, Ee = { class: "overflow-x-auto w-full" }, Re = { class: "hover:bg-transparent" }, ze = {
|
|
1
|
+
import { defineComponent as he, inject as pe, computed as i, ref as k, watch as S, openBlock as d, createElementBlock as u, createElementVNode as m, normalizeClass as x, createVNode as D, createCommentVNode as V, Fragment as B, renderList as I, createBlock as M, normalizeStyle as j, isMemoSame as F, createSlots as K, withCtx as U, renderSlot as W, mergeProps as O, unref as L } from "vue";
|
|
2
|
+
import be from "../CheckBox.vue.js";
|
|
3
|
+
import we from "../ConfirmationModal.vue.js";
|
|
4
|
+
import ye from "../Pagination/Pagination.vue.js";
|
|
5
|
+
import Pe from "../Empty/Empty.vue.js";
|
|
6
|
+
import Ce from "./DataTableHeader.vue.js";
|
|
7
|
+
import ke from "./DataTableRow.vue.js";
|
|
8
|
+
import { $t as p } from "../../utils/i18n.js";
|
|
9
|
+
import { SCREEN_CONTEXT_KEY as Se } from "./types.js";
|
|
10
|
+
const xe = { class: "space-y-6.5" }, Ie = { class: "overflow-x-auto w-full" }, Te = { class: "hover:bg-transparent" }, De = {
|
|
13
11
|
key: 0,
|
|
14
12
|
scope: "col",
|
|
15
13
|
class: "w-[40px] px-0 text-center font-medium text-muted-foreground",
|
|
16
14
|
style: { width: "40px" }
|
|
17
|
-
},
|
|
15
|
+
}, Be = { class: "flex items-center justify-center" }, Ee = { class: "[&_tr:last-child]:border-0" }, ze = {
|
|
18
16
|
key: 0,
|
|
19
17
|
class: "w-[48px] px-0 py-4 align-middle text-center",
|
|
20
18
|
style: { width: "48px" }
|
|
21
|
-
},
|
|
19
|
+
}, Re = { key: 2 }, $e = ["colspan"], Ve = { key: 0 }, Le = /* @__PURE__ */ he({
|
|
22
20
|
__name: "DataTable",
|
|
23
21
|
props: {
|
|
24
22
|
rows: { default: () => [] },
|
|
25
23
|
selectedRows: { default: () => [] },
|
|
26
|
-
search: { default: "" },
|
|
27
|
-
showSearch: { type: Boolean, default: !1 },
|
|
28
|
-
searchPlaceholder: {},
|
|
29
|
-
searchPlaceholderI18n: {},
|
|
30
|
-
toolbarClass: {},
|
|
31
|
-
toolbarSearchClass: {},
|
|
32
24
|
headers: { default: () => [] },
|
|
33
25
|
keyField: { default: "auto" },
|
|
34
26
|
loading: { type: Boolean, default: !1 },
|
|
@@ -54,325 +46,282 @@ const Be = { class: "space-y-6.5" }, Ee = { class: "overflow-x-auto w-full" }, R
|
|
|
54
46
|
tableClass: {},
|
|
55
47
|
class: {},
|
|
56
48
|
sortable: { type: Boolean, default: !1 },
|
|
57
|
-
variant: { default: "default" }
|
|
49
|
+
variant: { default: "default" },
|
|
50
|
+
headerVariant: { default: "default" },
|
|
51
|
+
size: { default: "md" }
|
|
58
52
|
},
|
|
59
53
|
emits: ["change", "select", "rowClick", "update:itemsPerPage", "update:selectedRows", "delete"],
|
|
60
|
-
setup(
|
|
61
|
-
const
|
|
54
|
+
setup(n, { emit: Y }) {
|
|
55
|
+
const X = (e, t) => {
|
|
62
56
|
if (!(!e || !t))
|
|
63
|
-
return t.includes(".") ? t.split(".").reduce((l,
|
|
64
|
-
}, c = (e, t) =>
|
|
57
|
+
return t.includes(".") ? t.split(".").reduce((l, o) => l?.[o], e) : e[t];
|
|
58
|
+
}, c = (e, t) => X(e, t), q = (e, t) => {
|
|
65
59
|
const l = ["id", "_id"];
|
|
66
60
|
if (t && t !== "auto") return t;
|
|
67
61
|
if (e && e.length > 0) {
|
|
68
|
-
for (const
|
|
69
|
-
if (
|
|
62
|
+
for (const o of l)
|
|
63
|
+
if (o in e[0]) return o;
|
|
70
64
|
}
|
|
71
65
|
return "_id";
|
|
72
|
-
},
|
|
66
|
+
}, G = (e) => e.sortKey || e.field, a = n, g = Y, E = pe(Se, null), b = i(() => a.hideSelectable ? !1 : E ? E.forceSelectable : !0), r = i(() => q(a.rows, a.keyField)), v = k({ field: "", order: "" }), w = k(
|
|
73
67
|
a.pageInfo?.itemsPerPage || a.paginationProps?.itemsPerPage || 10
|
|
74
|
-
), h =
|
|
75
|
-
|
|
76
|
-
() => a.search,
|
|
77
|
-
(e) => {
|
|
78
|
-
e !== void 0 && e !== p.value && (p.value = e);
|
|
79
|
-
}
|
|
80
|
-
);
|
|
81
|
-
let N = null;
|
|
82
|
-
g(p, () => {
|
|
83
|
-
N && clearTimeout(N), N = setTimeout(() => {
|
|
84
|
-
h.value = 1, z();
|
|
85
|
-
}, 300);
|
|
86
|
-
}), g(
|
|
68
|
+
), h = k(a.pageInfo?.currentPage || 1), T = k(!1), H = i(() => a.loading);
|
|
69
|
+
S(
|
|
87
70
|
() => a.pageInfo?.itemsPerPage,
|
|
88
71
|
(e) => {
|
|
89
|
-
e !== void 0 && (
|
|
72
|
+
e !== void 0 && (w.value = e);
|
|
90
73
|
}
|
|
91
|
-
),
|
|
74
|
+
), S(
|
|
92
75
|
() => a.paginationProps?.itemsPerPage,
|
|
93
76
|
(e) => {
|
|
94
|
-
e !== void 0 && (
|
|
77
|
+
e !== void 0 && (w.value = e);
|
|
95
78
|
}
|
|
96
|
-
),
|
|
79
|
+
), S(
|
|
97
80
|
() => a.pageInfo?.currentPage,
|
|
98
81
|
(e) => {
|
|
99
82
|
e && (h.value = e);
|
|
100
83
|
}
|
|
101
84
|
);
|
|
102
|
-
const s =
|
|
103
|
-
|
|
85
|
+
const s = k(/* @__PURE__ */ new Set());
|
|
86
|
+
S(
|
|
104
87
|
() => a.selectedRows,
|
|
105
88
|
(e) => {
|
|
106
|
-
const t = new Set((e || []).map((l) => c(l,
|
|
89
|
+
const t = new Set((e || []).map((l) => c(l, r.value)));
|
|
107
90
|
(t.size !== s.value.size || [...t].some((l) => !s.value.has(l))) && (s.value = t);
|
|
108
91
|
},
|
|
109
92
|
{ immediate: !0, deep: !0 }
|
|
110
93
|
);
|
|
111
|
-
const
|
|
112
|
-
() => a.rows.length > 0 && a.rows.every((e) => s.value.has(c(e,
|
|
113
|
-
),
|
|
94
|
+
const z = i(
|
|
95
|
+
() => a.rows.length > 0 && a.rows.every((e) => s.value.has(c(e, r.value)))
|
|
96
|
+
), A = i(() => s.value.size > 0 && !z.value), J = i(() => {
|
|
114
97
|
const e = [...a.selectedRows || [], ...a.rows], t = /* @__PURE__ */ new Map();
|
|
115
|
-
return e.forEach((l) => t.set(c(l,
|
|
116
|
-
}),
|
|
98
|
+
return e.forEach((l) => t.set(c(l, r.value), l)), Array.from(s.value).map((l) => t.get(l)).filter(Boolean);
|
|
99
|
+
}), Q = (e) => {
|
|
117
100
|
const t = new Set(s.value);
|
|
118
|
-
e ? a.rows.forEach((l) => t.add(c(l,
|
|
119
|
-
},
|
|
101
|
+
e ? a.rows.forEach((l) => t.add(c(l, r.value))) : a.rows.forEach((l) => t.delete(c(l, r.value))), s.value = t, N();
|
|
102
|
+
}, Z = (e) => {
|
|
120
103
|
const t = new Set(s.value);
|
|
121
|
-
t.has(e) ? t.delete(e) : t.add(e), s.value = t,
|
|
122
|
-
},
|
|
104
|
+
t.has(e) ? t.delete(e) : t.add(e), s.value = t, N();
|
|
105
|
+
}, N = () => {
|
|
123
106
|
const e = /* @__PURE__ */ new Set(), t = [];
|
|
124
107
|
a.rows.forEach((l) => {
|
|
125
|
-
const
|
|
126
|
-
s.value.has(
|
|
108
|
+
const o = c(l, r.value);
|
|
109
|
+
s.value.has(o) && (t.push(l), e.add(o));
|
|
127
110
|
}), (a.selectedRows || []).forEach((l) => {
|
|
128
|
-
const
|
|
129
|
-
!e.has(
|
|
130
|
-
}),
|
|
111
|
+
const o = c(l, r.value);
|
|
112
|
+
!e.has(o) && s.value.has(o) && (t.push(l), e.add(o));
|
|
113
|
+
}), g("select", {
|
|
131
114
|
selected: t,
|
|
132
|
-
all:
|
|
133
|
-
indeterminate:
|
|
134
|
-
}),
|
|
135
|
-
},
|
|
136
|
-
const t = a.headers.find((
|
|
137
|
-
|
|
138
|
-
},
|
|
139
|
-
h.value = e,
|
|
140
|
-
},
|
|
141
|
-
|
|
142
|
-
},
|
|
143
|
-
|
|
115
|
+
all: z.value,
|
|
116
|
+
indeterminate: A.value
|
|
117
|
+
}), g("update:selectedRows", t);
|
|
118
|
+
}, _ = (e) => {
|
|
119
|
+
const t = a.headers.find((o) => o.field === e), l = t ? G(t) : e;
|
|
120
|
+
v.value.field === l ? v.value.order = v.value.order === "asc" ? "desc" : "asc" : (v.value.field = l, v.value.order = "asc"), h.value = 1, $();
|
|
121
|
+
}, ee = (e) => {
|
|
122
|
+
h.value = e, $();
|
|
123
|
+
}, te = (e) => {
|
|
124
|
+
w.value = e, h.value = 1, g("update:itemsPerPage", e), $();
|
|
125
|
+
}, le = (e) => g("rowClick", e), ae = () => {
|
|
126
|
+
g("delete", J.value), T.value = !1;
|
|
144
127
|
};
|
|
145
|
-
let
|
|
146
|
-
const
|
|
147
|
-
|
|
128
|
+
let R = null;
|
|
129
|
+
const $ = () => {
|
|
130
|
+
R && clearTimeout(R), R = setTimeout(() => {
|
|
148
131
|
const e = {
|
|
149
|
-
pagination: { page: h.value, limit:
|
|
150
|
-
sort: { ...
|
|
151
|
-
search: p.value,
|
|
132
|
+
pagination: { page: h.value, limit: w.value },
|
|
133
|
+
sort: { ...v.value },
|
|
152
134
|
filter: {}
|
|
153
135
|
};
|
|
154
|
-
|
|
136
|
+
g("change", e), E?.onTableChange?.(e);
|
|
155
137
|
}, 10);
|
|
156
138
|
};
|
|
157
|
-
|
|
139
|
+
S(
|
|
158
140
|
() => a.rows,
|
|
159
141
|
() => {
|
|
160
|
-
const e = new Set(a.rows.map((t) => c(t,
|
|
142
|
+
const e = new Set(a.rows.map((t) => c(t, r.value)));
|
|
161
143
|
s.value = new Set([...s.value].filter((t) => e.has(t)));
|
|
162
144
|
}
|
|
163
145
|
);
|
|
164
|
-
const
|
|
146
|
+
const ne = i(() => [
|
|
165
147
|
"w-full flex flex-col",
|
|
166
148
|
a.variant === "raised" ? "bg-background shadow-sm p-2 rounded-lg" : "bg-background rounded",
|
|
167
149
|
"overflow-hidden",
|
|
168
150
|
a.bordered ? "border border-border" : "",
|
|
169
151
|
a.class
|
|
170
|
-
].join(" ")),
|
|
152
|
+
].join(" ")), se = i(() => ["w-full caption-bottom -text-fs-1", a.tableClass].join(" ")), oe = (e) => {
|
|
171
153
|
const t = {};
|
|
172
154
|
return e.width && !/(?:^|\s|:)w-/.test(e.width) && (t.width = e.width), e.minWidth && !/(?:^|\s|:)min-w-/.test(e.minWidth) && (t.minWidth = e.minWidth), t;
|
|
173
|
-
},
|
|
155
|
+
}, ie = (e) => {
|
|
174
156
|
const t = [];
|
|
175
157
|
return e.width && /(?:^|\s|:)w-/.test(e.width) && t.push(e.width), e.minWidth && /(?:^|\s|:)min-w-/.test(e.minWidth) && t.push(e.minWidth), t.join(" ");
|
|
176
|
-
},
|
|
177
|
-
() => a.emptyTitleI18n ?
|
|
178
|
-
),
|
|
179
|
-
() => a.emptyDescriptionI18n ?
|
|
180
|
-
),
|
|
181
|
-
const e =
|
|
158
|
+
}, re = i(
|
|
159
|
+
() => a.emptyTitleI18n ? p(a.emptyTitleI18n) : a.emptyTitle
|
|
160
|
+
), de = i(
|
|
161
|
+
() => a.emptyDescriptionI18n ? p(a.emptyDescriptionI18n) : a.emptyDescription
|
|
162
|
+
), ce = i(() => {
|
|
163
|
+
const e = p("vlite.dataTable.confirmDeleteTitle");
|
|
182
164
|
return e !== "vlite.dataTable.confirmDeleteTitle" ? e : "Confirm Deletion";
|
|
183
|
-
}),
|
|
184
|
-
const e =
|
|
165
|
+
}), ue = i(() => {
|
|
166
|
+
const e = p("vlite.dataTable.confirmDeleteDesc");
|
|
185
167
|
return e !== "vlite.dataTable.confirmDeleteDesc" ? e : "Are you sure you want to delete the selected items?";
|
|
186
|
-
}),
|
|
187
|
-
const e =
|
|
168
|
+
}), me = i(() => {
|
|
169
|
+
const e = p("vlite.dataTable.deleteBtn");
|
|
188
170
|
return e !== "vlite.dataTable.deleteBtn" ? e : "Delete";
|
|
189
|
-
}),
|
|
190
|
-
const e =
|
|
171
|
+
}), fe = i(() => {
|
|
172
|
+
const e = p("vlite.dataTable.cancelBtn");
|
|
191
173
|
return e !== "vlite.dataTable.cancelBtn" ? e : "Cancel";
|
|
192
174
|
});
|
|
193
|
-
return (e, t) => (
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
modelValue: p.value,
|
|
197
|
-
"onUpdate:modelValue": t[1] || (t[1] = (l) => p.value = l),
|
|
198
|
-
"show-search": F.value,
|
|
199
|
-
placeholder: o.searchPlaceholder,
|
|
200
|
-
placeholderI18n: o.searchPlaceholderI18n,
|
|
201
|
-
class: w(o.toolbarClass),
|
|
202
|
-
"search-class": o.toolbarSearchClass
|
|
203
|
-
}, j({ _: 2 }, [
|
|
204
|
-
e.$slots?.["toolbar-left"] ? {
|
|
205
|
-
name: "left",
|
|
206
|
-
fn: x(() => [
|
|
207
|
-
$(e.$slots, "toolbar-left")
|
|
208
|
-
]),
|
|
209
|
-
key: "0"
|
|
210
|
-
} : void 0,
|
|
211
|
-
s.value.size > 0 ? {
|
|
212
|
-
name: "delete",
|
|
213
|
-
fn: x(() => [
|
|
214
|
-
B(Ce, {
|
|
215
|
-
rounded: "full",
|
|
216
|
-
variant: "outline",
|
|
217
|
-
size: "lg",
|
|
218
|
-
icon: "lucide:trash-2",
|
|
219
|
-
onClick: t[0] || (t[0] = (l) => k.value = !0)
|
|
220
|
-
})
|
|
221
|
-
]),
|
|
222
|
-
key: "1"
|
|
223
|
-
} : void 0,
|
|
224
|
-
e.$slots?.["toolbar-right"] ? {
|
|
225
|
-
name: "right",
|
|
226
|
-
fn: x(() => [
|
|
227
|
-
$(e.$slots, "toolbar-right")
|
|
228
|
-
]),
|
|
229
|
-
key: "2"
|
|
230
|
-
} : void 0
|
|
231
|
-
]), 1032, ["modelValue", "show-search", "placeholder", "placeholderI18n", "class", "search-class"])) : W("", !0),
|
|
232
|
-
f("div", {
|
|
233
|
-
class: w(ie.value)
|
|
175
|
+
return (e, t) => (d(), u("div", xe, [
|
|
176
|
+
m("div", {
|
|
177
|
+
class: x(ne.value)
|
|
234
178
|
}, [
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
class:
|
|
179
|
+
m("div", Ie, [
|
|
180
|
+
m("table", {
|
|
181
|
+
class: x([se.value, "data-table"])
|
|
238
182
|
}, [
|
|
239
|
-
|
|
240
|
-
class:
|
|
241
|
-
"[&_tr]:border-b [&_tr]:border-border
|
|
242
|
-
|
|
183
|
+
m("thead", {
|
|
184
|
+
class: x([
|
|
185
|
+
"[&_tr]:border-b [&_tr]:border-border",
|
|
186
|
+
n.headerVariant === "minimal" ? "bg-transparent" : "bg-muted",
|
|
187
|
+
n.variant === "raised" ? "[&_th:first-child]:rounded-tl-lg [&_th:last-child]:rounded-tr-lg" : ""
|
|
243
188
|
])
|
|
244
189
|
}, [
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
"model-value":
|
|
250
|
-
indeterminate:
|
|
190
|
+
m("tr", Te, [
|
|
191
|
+
b.value ? (d(), u("th", De, [
|
|
192
|
+
m("div", Be, [
|
|
193
|
+
D(be, {
|
|
194
|
+
"model-value": z.value,
|
|
195
|
+
indeterminate: A.value,
|
|
251
196
|
size: "xs",
|
|
252
|
-
"onUpdate:modelValue":
|
|
197
|
+
"onUpdate:modelValue": Q
|
|
253
198
|
}, null, 8, ["model-value", "indeterminate"])
|
|
254
199
|
])
|
|
255
|
-
])) :
|
|
256
|
-
(
|
|
200
|
+
])) : V("", !0),
|
|
201
|
+
(d(!0), u(B, null, I(n.headers, (l) => (d(), M(Ce, {
|
|
257
202
|
key: l.field,
|
|
258
203
|
header: l,
|
|
259
|
-
"sort-config":
|
|
260
|
-
compact:
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
204
|
+
"sort-config": v.value,
|
|
205
|
+
compact: n.compact,
|
|
206
|
+
size: n.size,
|
|
207
|
+
"table-sortable": n.sortable,
|
|
208
|
+
onSort: _,
|
|
209
|
+
class: x(["last:pr-5!", ie(l)]),
|
|
210
|
+
style: j(oe(l))
|
|
211
|
+
}, null, 8, ["header", "sort-config", "compact", "size", "table-sortable", "class", "style"]))), 128))
|
|
266
212
|
])
|
|
267
213
|
], 2),
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
const
|
|
271
|
-
if (
|
|
272
|
-
const
|
|
214
|
+
m("tbody", Ee, [
|
|
215
|
+
H.value ? (d(!0), u(B, { key: 0 }, I(Math.min(w.value, 15), (l, o, ve, f) => {
|
|
216
|
+
const y = [];
|
|
217
|
+
if (f && f.key === "skeleton-" + l && F(f, y)) return f;
|
|
218
|
+
const P = (d(), u("tr", {
|
|
273
219
|
key: "skeleton-" + l,
|
|
274
220
|
class: "border-b border-border/70 bg-background transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted"
|
|
275
221
|
}, [
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
222
|
+
b.value ? (d(), u("td", ze, [...t[6] || (t[6] = [
|
|
223
|
+
m("div", { class: "flex items-center justify-center" }, [
|
|
224
|
+
m("div", { class: "h-4 w-4 rounded-[4px] bg-muted/50 animate-pulse" })
|
|
279
225
|
], -1)
|
|
280
|
-
])])) :
|
|
281
|
-
(
|
|
282
|
-
key:
|
|
283
|
-
class:
|
|
226
|
+
])])) : V("", !0),
|
|
227
|
+
(d(!0), u(B, null, I(n.headers, (C) => (d(), u("td", {
|
|
228
|
+
key: C.field,
|
|
229
|
+
class: x(["p-5! align-middle last:pr-6!", [C.hideOnMobile ? "hidden md:table-cell" : ""]])
|
|
284
230
|
}, [
|
|
285
|
-
|
|
231
|
+
m("div", {
|
|
286
232
|
class: "rounded-md bg-muted/50 animate-pulse h-4",
|
|
287
|
-
style:
|
|
233
|
+
style: j({ width: `${50 + Math.random() * 40}%` })
|
|
288
234
|
}, null, 4)
|
|
289
235
|
], 2))), 128))
|
|
290
236
|
]));
|
|
291
|
-
return
|
|
292
|
-
}, t,
|
|
293
|
-
const
|
|
237
|
+
return P.memo = y, P;
|
|
238
|
+
}, t, 0), 128)) : n.rows.length > 0 ? (d(!0), u(B, { key: 1 }, I(n.rows, (l, o, ve, f) => {
|
|
239
|
+
const y = [
|
|
294
240
|
l,
|
|
295
|
-
s.value.has(c(l,
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
241
|
+
s.value.has(c(l, r.value)),
|
|
242
|
+
b.value,
|
|
243
|
+
n.compact,
|
|
244
|
+
n.size,
|
|
245
|
+
n.striped,
|
|
246
|
+
n.hoverable
|
|
300
247
|
];
|
|
301
|
-
if (
|
|
302
|
-
const
|
|
303
|
-
key: c(l,
|
|
248
|
+
if (f && f.key === c(l, r.value) && F(f, y)) return f;
|
|
249
|
+
const P = (d(), M(ke, {
|
|
250
|
+
key: c(l, r.value),
|
|
304
251
|
row: l,
|
|
305
|
-
headers:
|
|
306
|
-
index:
|
|
307
|
-
"key-field":
|
|
308
|
-
selectable:
|
|
309
|
-
"is-selected": s.value.has(c(l,
|
|
310
|
-
hoverable:
|
|
311
|
-
striped:
|
|
312
|
-
compact:
|
|
313
|
-
|
|
314
|
-
|
|
252
|
+
headers: n.headers,
|
|
253
|
+
index: o,
|
|
254
|
+
"key-field": r.value,
|
|
255
|
+
selectable: b.value,
|
|
256
|
+
"is-selected": s.value.has(c(l, r.value)),
|
|
257
|
+
hoverable: n.hoverable,
|
|
258
|
+
striped: n.striped,
|
|
259
|
+
compact: n.compact,
|
|
260
|
+
size: n.size,
|
|
261
|
+
onSelect: Z,
|
|
262
|
+
onRowClick: le,
|
|
315
263
|
class: "[&_td:last-child]:pr-3.5!"
|
|
316
|
-
},
|
|
317
|
-
|
|
318
|
-
name:
|
|
319
|
-
fn:
|
|
320
|
-
|
|
264
|
+
}, K({ _: 2 }, [
|
|
265
|
+
I(n.headers, (C) => ({
|
|
266
|
+
name: C.field,
|
|
267
|
+
fn: U((ge) => [
|
|
268
|
+
W(e.$slots, C.field, O({ ref_for: !0 }, ge))
|
|
321
269
|
])
|
|
322
270
|
}))
|
|
323
|
-
]), 1032, ["row", "headers", "index", "key-field", "selectable", "is-selected", "hoverable", "striped", "compact"]));
|
|
324
|
-
return
|
|
325
|
-
}, t,
|
|
326
|
-
|
|
327
|
-
colspan:
|
|
271
|
+
]), 1032, ["row", "headers", "index", "key-field", "selectable", "is-selected", "hoverable", "striped", "compact", "size"]));
|
|
272
|
+
return P.memo = y, P;
|
|
273
|
+
}, t, 2), 128)) : (d(), u("tr", Re, [
|
|
274
|
+
m("td", {
|
|
275
|
+
colspan: b.value ? n.headers.length + 1 : n.headers.length,
|
|
328
276
|
class: "align-middle hover:bg-transparent"
|
|
329
277
|
}, [
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
title:
|
|
333
|
-
description:
|
|
334
|
-
icon:
|
|
335
|
-
|
|
336
|
-
|
|
278
|
+
W(e.$slots, "empty", {}, () => [
|
|
279
|
+
D(L(Pe), {
|
|
280
|
+
title: re.value,
|
|
281
|
+
description: de.value,
|
|
282
|
+
icon: n.emptyIcon,
|
|
283
|
+
variant: "variant12",
|
|
284
|
+
class: "bg-transparent! py-8!"
|
|
285
|
+
}, K({ _: 2 }, [
|
|
337
286
|
e.$slots["empty-action"] ? {
|
|
338
287
|
name: "action",
|
|
339
|
-
fn:
|
|
340
|
-
|
|
288
|
+
fn: U(() => [
|
|
289
|
+
W(e.$slots, "empty-action")
|
|
341
290
|
]),
|
|
342
291
|
key: "0"
|
|
343
292
|
} : void 0
|
|
344
293
|
]), 1032, ["title", "description", "icon"])
|
|
345
294
|
])
|
|
346
|
-
], 8,
|
|
295
|
+
], 8, $e)
|
|
347
296
|
]))
|
|
348
297
|
])
|
|
349
298
|
], 2)
|
|
350
299
|
])
|
|
351
300
|
], 2),
|
|
352
|
-
|
|
353
|
-
|
|
301
|
+
n.showPagination && n.pageInfo && n.pageInfo.totalPages > 1 ? (d(), u("div", Ve, [
|
|
302
|
+
D(L(ye), O({
|
|
354
303
|
"current-page": h.value,
|
|
355
|
-
"total-pages":
|
|
356
|
-
"total-items":
|
|
357
|
-
},
|
|
358
|
-
onChange:
|
|
359
|
-
"onUpdate:itemsPerPage":
|
|
304
|
+
"total-pages": n.pageInfo.totalPages,
|
|
305
|
+
"total-items": n.pageInfo.totalItems
|
|
306
|
+
}, n.paginationProps, {
|
|
307
|
+
onChange: ee,
|
|
308
|
+
"onUpdate:itemsPerPage": te
|
|
360
309
|
}), null, 16, ["current-page", "total-pages", "total-items"])
|
|
361
|
-
])) :
|
|
362
|
-
|
|
363
|
-
show:
|
|
364
|
-
"onUpdate:show": t[
|
|
365
|
-
title:
|
|
366
|
-
description:
|
|
367
|
-
"confirm-text":
|
|
368
|
-
"cancel-text":
|
|
310
|
+
])) : V("", !0),
|
|
311
|
+
D(we, {
|
|
312
|
+
show: T.value,
|
|
313
|
+
"onUpdate:show": t[4] || (t[4] = (l) => T.value = l),
|
|
314
|
+
title: ce.value,
|
|
315
|
+
description: ue.value,
|
|
316
|
+
"confirm-text": me.value,
|
|
317
|
+
"cancel-text": fe.value,
|
|
369
318
|
variant: "danger",
|
|
370
|
-
onConfirm:
|
|
371
|
-
onCancel: t[
|
|
319
|
+
onConfirm: ae,
|
|
320
|
+
onCancel: t[5] || (t[5] = (l) => T.value = !1)
|
|
372
321
|
}, null, 8, ["show", "title", "description", "confirm-text", "cancel-text"])
|
|
373
322
|
]));
|
|
374
323
|
}
|
|
375
324
|
});
|
|
376
325
|
export {
|
|
377
|
-
|
|
326
|
+
Le as default
|
|
378
327
|
};
|
|
@@ -3,6 +3,7 @@ interface Props {
|
|
|
3
3
|
header: TableHeader;
|
|
4
4
|
sortConfig?: SortConfig;
|
|
5
5
|
compact?: boolean;
|
|
6
|
+
size?: 'xs' | 'sm' | 'md' | 'lg';
|
|
6
7
|
tableSortable?: boolean;
|
|
7
8
|
}
|
|
8
9
|
declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
@@ -10,6 +11,7 @@ declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, imp
|
|
|
10
11
|
}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{
|
|
11
12
|
onSort?: (field: string) => any;
|
|
12
13
|
}>, {
|
|
14
|
+
size: "xs" | "sm" | "md" | "lg";
|
|
13
15
|
compact: boolean;
|
|
14
16
|
tableSortable: boolean;
|
|
15
17
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLTableCellElement>;
|