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