@dazzadev/vuetify-datatable 1.1.0 → 1.2.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/README.md +88 -0
- package/dist/components/DataTable.vue.d.ts +12 -1
- package/dist/index.d.ts +1 -1
- package/dist/types.d.ts +23 -0
- package/dist/vuetify-datatable.js +639 -342
- package/dist/vuetify-datatable.umd.cjs +1 -1
- package/package.json +1 -1
|
@@ -1,49 +1,49 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
function
|
|
3
|
-
return
|
|
1
|
+
import { defineComponent as Pe, computed as c, resolveComponent as f, openBlock as m, createBlock as k, withCtx as a, createVNode as r, createTextVNode as V, toDisplayString as g, renderSlot as C, createCommentVNode as N, inject as ot, ref as v, watch as z, nextTick as lt, onMounted as nt, onBeforeUnmount as at, createElementBlock as G, normalizeStyle as st, normalizeClass as $e, withDirectives as rt, createElementVNode as P, Fragment as it, renderList as Ie, withModifiers as le, withKeys as Le, mergeProps as H, vShow as dt, createSlots as ut, resolveDynamicComponent as ye } from "vue";
|
|
2
|
+
function ct(o) {
|
|
3
|
+
return o && o.__esModule && Object.prototype.hasOwnProperty.call(o, "default") ? o.default : o;
|
|
4
4
|
}
|
|
5
|
-
var
|
|
6
|
-
function
|
|
7
|
-
if (
|
|
8
|
-
|
|
9
|
-
function
|
|
10
|
-
if (typeof
|
|
11
|
-
throw new TypeError(`Expected the first parameter to be a function, got \`${typeof
|
|
12
|
-
if (
|
|
5
|
+
var ne = { exports: {} }, Me;
|
|
6
|
+
function vt() {
|
|
7
|
+
if (Me) return ne.exports;
|
|
8
|
+
Me = 1;
|
|
9
|
+
function o(_, $ = 100, I = {}) {
|
|
10
|
+
if (typeof _ != "function")
|
|
11
|
+
throw new TypeError(`Expected the first parameter to be a function, got \`${typeof _}\`.`);
|
|
12
|
+
if ($ < 0)
|
|
13
13
|
throw new RangeError("`wait` must not be negative.");
|
|
14
|
-
const { immediate:
|
|
15
|
-
let
|
|
16
|
-
function
|
|
17
|
-
const
|
|
18
|
-
return
|
|
14
|
+
const { immediate: b } = typeof I == "boolean" ? { immediate: I } : I;
|
|
15
|
+
let d, y, i, L, h;
|
|
16
|
+
function M() {
|
|
17
|
+
const S = d, O = y;
|
|
18
|
+
return d = void 0, y = void 0, h = _.apply(S, O), h;
|
|
19
19
|
}
|
|
20
|
-
function
|
|
21
|
-
const
|
|
22
|
-
|
|
20
|
+
function E() {
|
|
21
|
+
const S = Date.now() - L;
|
|
22
|
+
S < $ && S >= 0 ? i = setTimeout(E, $ - S) : (i = void 0, b || (h = M()));
|
|
23
23
|
}
|
|
24
|
-
const
|
|
25
|
-
if (
|
|
24
|
+
const p = function(...S) {
|
|
25
|
+
if (d && this !== d && Object.getPrototypeOf(this) === Object.getPrototypeOf(d))
|
|
26
26
|
throw new Error("Debounced method called with different contexts of the same prototype.");
|
|
27
|
-
|
|
28
|
-
const
|
|
29
|
-
return
|
|
27
|
+
d = this, y = S, L = Date.now();
|
|
28
|
+
const O = b && !i;
|
|
29
|
+
return i || (i = setTimeout(E, $)), O && (h = M()), h;
|
|
30
30
|
};
|
|
31
|
-
return Object.defineProperty(
|
|
31
|
+
return Object.defineProperty(p, "isPending", {
|
|
32
32
|
get() {
|
|
33
|
-
return
|
|
33
|
+
return i !== void 0;
|
|
34
34
|
}
|
|
35
|
-
}),
|
|
36
|
-
|
|
37
|
-
},
|
|
38
|
-
|
|
39
|
-
},
|
|
40
|
-
|
|
41
|
-
},
|
|
35
|
+
}), p.clear = () => {
|
|
36
|
+
i && (clearTimeout(i), i = void 0);
|
|
37
|
+
}, p.flush = () => {
|
|
38
|
+
i && p.trigger();
|
|
39
|
+
}, p.trigger = () => {
|
|
40
|
+
h = M(), p.clear();
|
|
41
|
+
}, p;
|
|
42
42
|
}
|
|
43
|
-
return
|
|
43
|
+
return ne.exports.debounce = o, ne.exports = o, ne.exports;
|
|
44
44
|
}
|
|
45
|
-
var
|
|
46
|
-
const
|
|
45
|
+
var mt = /* @__PURE__ */ vt();
|
|
46
|
+
const ft = /* @__PURE__ */ ct(mt), pt = /* @__PURE__ */ Pe({
|
|
47
47
|
__name: "ConfirmationModal",
|
|
48
48
|
props: {
|
|
49
49
|
show: Boolean,
|
|
@@ -53,66 +53,66 @@ const me = /* @__PURE__ */ ce(ue), fe = /* @__PURE__ */ G({
|
|
|
53
53
|
cancelButtonText: String
|
|
54
54
|
},
|
|
55
55
|
emits: ["close", "confirm"],
|
|
56
|
-
setup(
|
|
57
|
-
const
|
|
58
|
-
get: () =>
|
|
56
|
+
setup(o) {
|
|
57
|
+
const _ = o, $ = c({
|
|
58
|
+
get: () => _.show,
|
|
59
59
|
set: () => {
|
|
60
60
|
}
|
|
61
61
|
});
|
|
62
|
-
return (
|
|
63
|
-
const
|
|
64
|
-
return
|
|
65
|
-
modelValue:
|
|
66
|
-
"onUpdate:modelValue":
|
|
62
|
+
return (I, b) => {
|
|
63
|
+
const d = f("v-card-title"), y = f("v-card-text"), i = f("v-spacer"), L = f("v-btn"), h = f("v-card-actions"), M = f("v-card"), E = f("v-dialog");
|
|
64
|
+
return m(), k(E, {
|
|
65
|
+
modelValue: $.value,
|
|
66
|
+
"onUpdate:modelValue": b[2] || (b[2] = (p) => $.value = p),
|
|
67
67
|
"max-width": "500px",
|
|
68
68
|
persistent: "",
|
|
69
69
|
"no-click-animation": ""
|
|
70
70
|
}, {
|
|
71
|
-
default:
|
|
72
|
-
r(
|
|
73
|
-
default:
|
|
74
|
-
r(
|
|
75
|
-
default:
|
|
76
|
-
|
|
71
|
+
default: a(() => [
|
|
72
|
+
r(M, null, {
|
|
73
|
+
default: a(() => [
|
|
74
|
+
r(d, { class: "text-h5 text-center py-6" }, {
|
|
75
|
+
default: a(() => [
|
|
76
|
+
V(g(o.title), 1)
|
|
77
77
|
]),
|
|
78
78
|
_: 1
|
|
79
79
|
}),
|
|
80
|
-
|
|
80
|
+
o.description ? (m(), k(y, {
|
|
81
81
|
key: 0,
|
|
82
82
|
class: "text-center px-0 py-0"
|
|
83
83
|
}, {
|
|
84
|
-
default:
|
|
85
|
-
|
|
86
|
-
|
|
84
|
+
default: a(() => [
|
|
85
|
+
V(g(o.description) + " ", 1),
|
|
86
|
+
C(I.$slots, "description")
|
|
87
87
|
]),
|
|
88
88
|
_: 3
|
|
89
89
|
})) : N("", !0),
|
|
90
|
-
r(
|
|
91
|
-
default:
|
|
92
|
-
r(
|
|
93
|
-
r(
|
|
90
|
+
r(h, null, {
|
|
91
|
+
default: a(() => [
|
|
92
|
+
r(i),
|
|
93
|
+
r(L, {
|
|
94
94
|
color: "error",
|
|
95
95
|
variant: "flat",
|
|
96
96
|
dark: "",
|
|
97
|
-
onClick:
|
|
97
|
+
onClick: b[0] || (b[0] = (p) => I.$emit("close"))
|
|
98
98
|
}, {
|
|
99
|
-
default:
|
|
100
|
-
|
|
99
|
+
default: a(() => [
|
|
100
|
+
V(g(o.cancelButtonText), 1)
|
|
101
101
|
]),
|
|
102
102
|
_: 1
|
|
103
103
|
}),
|
|
104
|
-
r(
|
|
104
|
+
r(L, {
|
|
105
105
|
color: "success",
|
|
106
106
|
variant: "flat",
|
|
107
107
|
dark: "",
|
|
108
|
-
onClick:
|
|
108
|
+
onClick: b[1] || (b[1] = (p) => I.$emit("confirm"))
|
|
109
109
|
}, {
|
|
110
|
-
default:
|
|
111
|
-
|
|
110
|
+
default: a(() => [
|
|
111
|
+
V(g(o.confirmButtonText), 1)
|
|
112
112
|
]),
|
|
113
113
|
_: 1
|
|
114
114
|
}),
|
|
115
|
-
r(
|
|
115
|
+
r(i)
|
|
116
116
|
]),
|
|
117
117
|
_: 1
|
|
118
118
|
})
|
|
@@ -124,15 +124,19 @@ const me = /* @__PURE__ */ ce(ue), fe = /* @__PURE__ */ G({
|
|
|
124
124
|
}, 8, ["modelValue"]);
|
|
125
125
|
};
|
|
126
126
|
}
|
|
127
|
-
}),
|
|
128
|
-
function
|
|
127
|
+
}), He = Symbol("DataTableConfig");
|
|
128
|
+
function Mt(o) {
|
|
129
129
|
return {
|
|
130
|
-
install(
|
|
131
|
-
|
|
130
|
+
install(_) {
|
|
131
|
+
_.provide(He, o);
|
|
132
132
|
}
|
|
133
133
|
};
|
|
134
134
|
}
|
|
135
|
-
const
|
|
135
|
+
const gt = '.vdt{position:relative;min-width:0}.vdt-toolbar{display:flex;justify-content:flex-start;padding-bottom:8px}.vdt-body{position:relative}.vdt--pinned .v-table__wrapper>table>thead>tr>th:last-child,.vdt--pinned .v-table__wrapper>table>tbody>tr.v-data-table__tr>td:last-child{position:sticky;right:0;z-index:2;background:rgb(var(--v-theme-surface))}.vdt--pinned.vdt--can-right .v-table__wrapper>table>thead>tr>th:last-child,.vdt--pinned.vdt--can-right .v-table__wrapper>table>tbody>tr.v-data-table__tr>td:last-child{box-shadow:inset 1px 0 rgba(var(--v-border-color),var(--v-border-opacity)),-8px 0 12px -6px #00000026}.vdt-fade{position:absolute;top:var(--vdt-scroll-top, 0px);height:var(--vdt-scroll-h, 100%);width:56px;pointer-events:none;opacity:0;transition:opacity .2s;z-index:3}.vdt-fade--left{left:0;background:linear-gradient(to left,rgba(var(--v-theme-surface),0),rgb(var(--v-theme-surface)))}.vdt-fade--right{right:var(--vdt-pinned-w, 0px);background:linear-gradient(to right,rgba(var(--v-theme-surface),0),rgb(var(--v-theme-surface)))}.vdt--can-left .vdt-fade--left,.vdt--can-right .vdt-fade--right{opacity:1}.vdt-arrow{position:absolute;top:calc(var(--vdt-scroll-top, 0px) + var(--vdt-head-h, 48px) / 2 - 16px);z-index:4;display:flex;align-items:center;justify-content:center;width:32px;height:32px;padding:0;border:thin solid rgba(var(--v-border-color),var(--v-border-opacity));border-radius:50%;background:rgb(var(--v-theme-surface));color:rgb(var(--v-theme-primary));box-shadow:0 4px 12px #00000026;cursor:pointer}.vdt-arrow:focus-visible{outline:2px solid rgb(var(--v-theme-primary));outline-offset:2px}.vdt-arrow--left{left:8px}.vdt-arrow--right{right:calc(var(--vdt-pinned-w, 0px) + 8px)}.vdt-hint{position:absolute;top:calc(var(--vdt-scroll-top, 0px) + var(--vdt-head-h, 48px) / 2 - 24px);right:calc(var(--vdt-pinned-w, 0px) + 8px);z-index:5;transform:translateY(-100%);padding:5px 10px;border-radius:4px;background:rgb(var(--v-theme-surface-variant));color:rgb(var(--v-theme-on-surface-variant));font-size:12px;white-space:nowrap;pointer-events:none}.vdt-hint:after{content:"";position:absolute;top:100%;right:11px;border:5px solid transparent;border-top-color:rgb(var(--v-theme-surface-variant))}.vdt-columns__actions{display:flex;justify-content:space-between;margin:4px 0}.vdt-columns__list{max-height:320px;margin:0;padding:0;overflow-y:auto;list-style:none}.vdt-columns__item{display:flex;align-items:center;gap:4px;border-radius:4px}.vdt-columns__item--over{background:rgba(var(--v-theme-primary),.08)}.vdt-columns__handle{display:flex;padding:4px;border:0;border-radius:4px;background:none;color:rgba(var(--v-theme-on-surface),var(--v-medium-emphasis-opacity));cursor:grab}.vdt-columns__handle:focus-visible{outline:2px solid rgb(var(--v-theme-primary))}', bt = { class: "vdt-toolbar" }, yt = { class: "vdt-columns__actions" }, ht = { class: "vdt-columns__list" }, xt = ["onDragstart", "onDragover", "onDrop"], wt = ["aria-label", "title", "onKeydown"], Ct = ["aria-label"], kt = ["aria-label"], Vt = {
|
|
136
|
+
key: 2,
|
|
137
|
+
class: "vdt-hint"
|
|
138
|
+
}, ae = "actions", St = 300, he = 2, Tt = "vuetify-datatable:columns:", Bt = "svg:M16,5V18H21V5M4,18H9V5H4M10,18H15V5H10V18Z", Dt = "svg:M9,3H11V5H9V3M13,3H15V5H13V3M9,7H11V9H9V7M13,7H15V9H13V7M9,11H11V13H9V11M13,11H15V13H13V11M9,15H11V17H9V15M13,15H15V17H13V15M9,19H11V21H9V19M13,19H15V21H13V19Z", _t = "svg:M15.41,16.58L10.83,12L15.41,7.41L14,6L8,12L14,18L15.41,16.58Z", $t = "svg:M8.59,16.58L13.17,12L8.59,7.41L10,6L16,12L10,18L8.59,16.58Z", It = /* @__PURE__ */ Pe({
|
|
139
|
+
inheritAttrs: !1,
|
|
136
140
|
__name: "DataTable",
|
|
137
141
|
props: {
|
|
138
142
|
tableClass: {},
|
|
@@ -165,304 +169,597 @@ const ve = /* @__PURE__ */ G({
|
|
|
165
169
|
disableDelete: {}
|
|
166
170
|
},
|
|
167
171
|
emits: ["onLoadData", "editItem", "deleteItem", "viewItem", "update:modelValue"],
|
|
168
|
-
setup(
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
172
|
+
setup(o, { emit: _ }) {
|
|
173
|
+
function $() {
|
|
174
|
+
if (typeof document > "u" || document.getElementById("vuetify-datatable-styles")) return;
|
|
175
|
+
const e = document.createElement("style");
|
|
176
|
+
e.id = "vuetify-datatable-styles", e.textContent = gt, document.head.appendChild(e);
|
|
177
|
+
}
|
|
178
|
+
$();
|
|
179
|
+
const I = [ae, "expanded-row", "data-table-expand", "data-table-select"], b = {
|
|
180
|
+
columns: "Columns",
|
|
181
|
+
hiddenColumns: (e) => `Columns · ${e} hidden`,
|
|
182
|
+
searchColumns: "Search columns",
|
|
183
|
+
showAllColumns: "Show all",
|
|
184
|
+
hideAllColumns: "Hide all",
|
|
185
|
+
resetColumns: "Reset",
|
|
186
|
+
moveColumn: "Drag or use the arrow keys to reorder",
|
|
187
|
+
scrollHint: "Scroll to see more columns",
|
|
188
|
+
scrollLeft: "Previous columns",
|
|
189
|
+
scrollRight: "More columns"
|
|
190
|
+
}, d = o, y = _, i = ot(He, { icons: {} }), L = c(() => {
|
|
191
|
+
var e;
|
|
192
|
+
return d.viewIcon ?? ((e = i.icons) == null ? void 0 : e.view) ?? "mdi-eye-outline";
|
|
193
|
+
}), h = c(() => {
|
|
194
|
+
var e;
|
|
195
|
+
return d.editIcon ?? ((e = i.icons) == null ? void 0 : e.edit) ?? "mdi-pencil-outline";
|
|
196
|
+
}), M = c(() => {
|
|
197
|
+
var e;
|
|
198
|
+
return d.deleteIcon ?? ((e = i.icons) == null ? void 0 : e.delete) ?? "mdi-trash-can-outline";
|
|
199
|
+
}), E = c(() => i.iconProps ?? {}), p = c(() => d.tableClass ?? i.tableClass ?? "border rounded-md");
|
|
200
|
+
function S(e) {
|
|
201
|
+
return typeof e != "string";
|
|
181
202
|
}
|
|
182
|
-
const
|
|
183
|
-
get: () =>
|
|
184
|
-
set: (
|
|
203
|
+
const O = c({
|
|
204
|
+
get: () => d.modelValue,
|
|
205
|
+
set: (e) => y("update:modelValue", e)
|
|
185
206
|
});
|
|
186
|
-
function
|
|
187
|
-
|
|
207
|
+
function Ee() {
|
|
208
|
+
y("update:modelValue", []);
|
|
188
209
|
}
|
|
189
|
-
const
|
|
190
|
-
var
|
|
191
|
-
return ((
|
|
192
|
-
(
|
|
210
|
+
const R = v(d.itemsPerPage), Y = v([]), Z = v(1), se = v(null), W = v(!1), Oe = c(() => {
|
|
211
|
+
var e;
|
|
212
|
+
return ((e = d.headers) == null ? void 0 : e.filter(
|
|
213
|
+
(t) => t.key !== "actions" && t.key !== "expanded-row" && t.key !== "data-table-expand"
|
|
193
214
|
)) || [];
|
|
194
215
|
});
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
216
|
+
function T(e) {
|
|
217
|
+
var n;
|
|
218
|
+
const t = ((n = i.texts) == null ? void 0 : n[e]) ?? b[e];
|
|
219
|
+
return typeof t == "function" ? t() : t;
|
|
220
|
+
}
|
|
221
|
+
const re = v(!1), ie = v(""), A = v([]), x = v([]), J = v(null), X = v(null), K = c(() => d.headers.filter((e) => !I.includes(e.key) && !!e.title)), U = c(() => {
|
|
222
|
+
const e = new Map(K.value.map((n) => [n.key, n]));
|
|
223
|
+
return [...A.value.filter((n) => e.has(n)).map((n) => e.get(n)), ...K.value.filter((n) => !A.value.includes(n.key))];
|
|
224
|
+
}), Re = c(() => {
|
|
225
|
+
const e = (ie.value ?? "").trim().toLowerCase();
|
|
226
|
+
return e ? U.value.filter((t) => {
|
|
227
|
+
var n;
|
|
228
|
+
return (n = t.title) == null ? void 0 : n.toLowerCase().includes(e);
|
|
229
|
+
}) : U.value;
|
|
230
|
+
}), j = c(() => K.value.filter((e) => x.value.includes(e.key)).length), Ae = c(
|
|
231
|
+
() => U.value.map((e) => ({ key: e.key, title: e.title ?? "", visible: !x.value.includes(e.key) }))
|
|
232
|
+
), xe = c(() => d.headers.some((e) => e.key === ae)), we = c(() => {
|
|
233
|
+
const e = new Set(K.value.map((s) => s.key)), t = [...U.value], n = d.headers.map((s) => e.has(s.key) ? t.shift() : s);
|
|
234
|
+
return [
|
|
235
|
+
...n.filter((s) => s.key !== ae && !x.value.includes(s.key)),
|
|
236
|
+
...n.filter((s) => s.key === ae)
|
|
237
|
+
];
|
|
238
|
+
}), Ce = c(
|
|
239
|
+
() => {
|
|
240
|
+
var e;
|
|
241
|
+
return j.value > 0 ? (((e = i.texts) == null ? void 0 : e.hiddenColumns) ?? b.hiddenColumns)(j.value) : T("columns");
|
|
242
|
+
}
|
|
243
|
+
);
|
|
244
|
+
function ke(e, t) {
|
|
245
|
+
x.value = t ? x.value.filter((n) => n !== e) : [...x.value, e];
|
|
246
|
+
}
|
|
247
|
+
function Ve() {
|
|
248
|
+
x.value = j.value === 0 ? K.value.map((e) => e.key) : [];
|
|
249
|
+
}
|
|
250
|
+
function Se() {
|
|
251
|
+
A.value = [], x.value = [];
|
|
252
|
+
}
|
|
253
|
+
function de(e, t) {
|
|
254
|
+
const n = U.value.map((w) => w.key), s = n.indexOf(e), B = n.indexOf(t);
|
|
255
|
+
s === -1 || B === -1 || s === B || (n.splice(B, 0, ...n.splice(s, 1)), A.value = n);
|
|
256
|
+
}
|
|
257
|
+
function ue(e, t) {
|
|
258
|
+
const n = U.value.map((B) => B.key), s = n[n.indexOf(e) + t];
|
|
259
|
+
s && de(e, s);
|
|
260
|
+
}
|
|
261
|
+
function ze(e, t) {
|
|
262
|
+
var n;
|
|
263
|
+
J.value = t, (n = e.dataTransfer) == null || n.setData("text/plain", t);
|
|
264
|
+
}
|
|
265
|
+
function Ne(e) {
|
|
266
|
+
J.value && de(J.value, e), Te();
|
|
267
|
+
}
|
|
268
|
+
function Te() {
|
|
269
|
+
J.value = null, X.value = null;
|
|
270
|
+
}
|
|
271
|
+
const ce = c(() => {
|
|
272
|
+
var t;
|
|
273
|
+
const e = Tt + K.value.map((n) => n.key).sort().join(",");
|
|
274
|
+
return ((t = i.storageKey) == null ? void 0 : t.call(i, e)) ?? e;
|
|
200
275
|
});
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
276
|
+
z(
|
|
277
|
+
ce,
|
|
278
|
+
(e) => {
|
|
279
|
+
try {
|
|
280
|
+
const t = JSON.parse(localStorage.getItem(e) ?? "null");
|
|
281
|
+
A.value = Array.isArray(t == null ? void 0 : t.order) ? t.order : [], x.value = Array.isArray(t == null ? void 0 : t.hidden) ? t.hidden : [];
|
|
282
|
+
} catch {
|
|
283
|
+
A.value = [], x.value = [];
|
|
284
|
+
}
|
|
285
|
+
},
|
|
286
|
+
{ immediate: !0 }
|
|
287
|
+
), z([A, x], ([e, t]) => {
|
|
288
|
+
try {
|
|
289
|
+
e.length || t.length ? localStorage.setItem(ce.value, JSON.stringify({ order: e, hidden: t })) : localStorage.removeItem(ce.value);
|
|
290
|
+
} catch {
|
|
291
|
+
}
|
|
292
|
+
});
|
|
293
|
+
const ve = v(null), me = v(null), Q = v(!1), fe = v(!1), ee = v(!1), pe = v(!1), Be = v({});
|
|
294
|
+
let q = null;
|
|
295
|
+
const Ke = c(() => Q.value || j.value > 0 || re.value), De = c(() => ee.value && !pe.value), Ue = c(() => ({
|
|
296
|
+
"vdt--pinned": xe.value,
|
|
297
|
+
"vdt--can-left": fe.value,
|
|
298
|
+
"vdt--can-right": ee.value
|
|
299
|
+
}));
|
|
300
|
+
function ge() {
|
|
301
|
+
var e;
|
|
302
|
+
return ((e = me.value) == null ? void 0 : e.querySelector(".v-table__wrapper")) ?? null;
|
|
303
|
+
}
|
|
304
|
+
function te() {
|
|
305
|
+
const e = me.value, t = ge();
|
|
306
|
+
if (!e || !t) return;
|
|
307
|
+
const n = t.scrollWidth - t.clientWidth;
|
|
308
|
+
Q.value = n > he, fe.value = Q.value && t.scrollLeft > he, ee.value = Q.value && t.scrollLeft < n - he;
|
|
309
|
+
const s = xe.value ? t.querySelector("thead > tr > th:last-child") : null, B = t.querySelector("thead"), w = t.getBoundingClientRect();
|
|
310
|
+
Be.value = {
|
|
311
|
+
"--vdt-pinned-w": `${(s == null ? void 0 : s.offsetWidth) ?? 0}px`,
|
|
312
|
+
"--vdt-scroll-top": `${w.top - e.getBoundingClientRect().top}px`,
|
|
313
|
+
"--vdt-scroll-h": `${w.height}px`,
|
|
314
|
+
"--vdt-head-h": `${(B == null ? void 0 : B.offsetHeight) ?? 48}px`
|
|
315
|
+
};
|
|
316
|
+
}
|
|
317
|
+
function je(e) {
|
|
318
|
+
const t = ge();
|
|
319
|
+
!t || e.target !== t || (t.scrollLeft > 10 && (pe.value = !0), te());
|
|
320
|
+
}
|
|
321
|
+
function _e(e) {
|
|
322
|
+
var t;
|
|
323
|
+
e === 1 && (pe.value = !0), (t = ge()) == null || t.scrollBy({ left: e * St, behavior: "smooth" });
|
|
324
|
+
}
|
|
325
|
+
z([we, () => d.items, () => d.loading], () => lt(te)), nt(() => {
|
|
326
|
+
F({
|
|
327
|
+
page: Z.value,
|
|
328
|
+
itemsPerPage: R.value
|
|
329
|
+
}), typeof ResizeObserver < "u" && ve.value && (q = new ResizeObserver(() => requestAnimationFrame(te)), q.observe(ve.value)), te();
|
|
330
|
+
}), at(() => q == null ? void 0 : q.disconnect());
|
|
331
|
+
const qe = (e) => {
|
|
332
|
+
se.value = e, W.value = !0;
|
|
333
|
+
}, Fe = () => {
|
|
334
|
+
se.value = null, W.value = !1;
|
|
335
|
+
}, Ge = (e) => {
|
|
336
|
+
y("editItem", e);
|
|
337
|
+
}, Ye = (e) => {
|
|
338
|
+
y("viewItem", e);
|
|
339
|
+
}, Ze = () => {
|
|
340
|
+
y("deleteItem", se.value), W.value = !1;
|
|
341
|
+
}, F = ({ page: e, itemsPerPage: t }) => {
|
|
342
|
+
const n = Y.value.map((s) => ({
|
|
343
|
+
column: s.key,
|
|
344
|
+
direction: s.order
|
|
215
345
|
}));
|
|
216
|
-
|
|
217
|
-
page:
|
|
218
|
-
itemsPerPage:
|
|
219
|
-
search:
|
|
220
|
-
sortBy:
|
|
346
|
+
y("onLoadData", {
|
|
347
|
+
page: e,
|
|
348
|
+
itemsPerPage: t,
|
|
349
|
+
search: d.search,
|
|
350
|
+
sortBy: n
|
|
221
351
|
});
|
|
222
352
|
};
|
|
223
|
-
function
|
|
224
|
-
|
|
353
|
+
function We() {
|
|
354
|
+
F({
|
|
225
355
|
page: 1,
|
|
226
|
-
itemsPerPage:
|
|
356
|
+
itemsPerPage: R.value
|
|
227
357
|
});
|
|
228
358
|
}
|
|
229
|
-
const
|
|
230
|
-
return
|
|
231
|
-
() =>
|
|
232
|
-
(
|
|
233
|
-
|
|
359
|
+
const Je = ft(We, 400);
|
|
360
|
+
return z(
|
|
361
|
+
() => d.search,
|
|
362
|
+
(e, t) => {
|
|
363
|
+
e !== t && Je();
|
|
234
364
|
}
|
|
235
|
-
),
|
|
236
|
-
|
|
365
|
+
), z(R, (e, t) => {
|
|
366
|
+
e !== t && F({
|
|
237
367
|
page: 1,
|
|
238
|
-
itemsPerPage:
|
|
368
|
+
itemsPerPage: e
|
|
239
369
|
});
|
|
240
|
-
}),
|
|
241
|
-
|
|
370
|
+
}), z(Y, () => {
|
|
371
|
+
F({
|
|
242
372
|
page: 1,
|
|
243
|
-
itemsPerPage:
|
|
373
|
+
itemsPerPage: R.value
|
|
244
374
|
});
|
|
245
|
-
}),
|
|
246
|
-
|
|
247
|
-
page:
|
|
248
|
-
itemsPerPage:
|
|
375
|
+
}), z(Z, (e) => {
|
|
376
|
+
F({
|
|
377
|
+
page: e,
|
|
378
|
+
itemsPerPage: R.value
|
|
249
379
|
});
|
|
250
|
-
}), (
|
|
251
|
-
const
|
|
252
|
-
return
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
"
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
b(t.$slots, "item.data-table-expand", {
|
|
275
|
-
internalItem: o,
|
|
276
|
-
isExpanded: m,
|
|
277
|
-
toggleExpand: g
|
|
278
|
-
}, () => [
|
|
279
|
-
r($, {
|
|
280
|
-
onClick: (U) => g(o),
|
|
281
|
-
rounded: ""
|
|
282
|
-
}, {
|
|
283
|
-
default: n(() => [
|
|
284
|
-
r(V, null, {
|
|
285
|
-
default: n(() => [
|
|
286
|
-
T(P(m(o) ? "mdi-chevron-up" : "mdi-chevron-down"), 1)
|
|
287
|
-
]),
|
|
288
|
-
_: 2
|
|
289
|
-
}, 1024)
|
|
290
|
-
]),
|
|
291
|
-
_: 2
|
|
292
|
-
}, 1032, ["onClick"])
|
|
293
|
-
])
|
|
294
|
-
]),
|
|
295
|
-
"expanded-row": n(({ columns: o, item: m }) => [
|
|
296
|
-
b(t.$slots, "expanded-row", {
|
|
297
|
-
columns: o,
|
|
298
|
-
item: m
|
|
299
|
-
})
|
|
300
|
-
]),
|
|
301
|
-
"item.actions": n(({ item: o }) => [
|
|
302
|
-
b(t.$slots, "before-actions", { item: o }),
|
|
303
|
-
e.showViewButton ? (v(), y(F, {
|
|
304
|
-
key: 0,
|
|
305
|
-
text: e.viewButtonText
|
|
380
|
+
}), (e, t) => {
|
|
381
|
+
const n = f("v-btn"), s = f("v-text-field"), B = f("v-checkbox-btn"), w = f("v-icon"), Xe = f("v-card-text"), Qe = f("v-card"), et = f("v-menu"), oe = f("v-tooltip"), tt = f("v-data-table-server");
|
|
382
|
+
return m(), G("div", {
|
|
383
|
+
ref_key: "rootRef",
|
|
384
|
+
ref: ve,
|
|
385
|
+
class: $e(["vdt", Ue.value]),
|
|
386
|
+
style: st(Be.value)
|
|
387
|
+
}, [
|
|
388
|
+
rt(P("div", bt, [
|
|
389
|
+
C(e.$slots, "column-chooser", {
|
|
390
|
+
columns: Ae.value,
|
|
391
|
+
hiddenCount: j.value,
|
|
392
|
+
label: Ce.value,
|
|
393
|
+
setVisible: ke,
|
|
394
|
+
toggleAll: Ve,
|
|
395
|
+
reset: Se,
|
|
396
|
+
move: ue,
|
|
397
|
+
place: de
|
|
398
|
+
}, () => [
|
|
399
|
+
r(et, {
|
|
400
|
+
modelValue: re.value,
|
|
401
|
+
"onUpdate:modelValue": t[2] || (t[2] = (l) => re.value = l),
|
|
402
|
+
"close-on-content-click": !1,
|
|
403
|
+
location: "bottom start"
|
|
306
404
|
}, {
|
|
307
|
-
activator:
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
}),
|
|
415
|
-
_: 2
|
|
416
|
-
}, 1032, ["text"])) : N("", !0),
|
|
417
|
-
b(t.$slots, "after-actions", { item: o })
|
|
418
|
-
]),
|
|
419
|
-
tfoot: n(() => [
|
|
420
|
-
ie("tfoot", null, [
|
|
421
|
-
b(t.$slots, "item.tfoot")
|
|
422
|
-
])
|
|
423
|
-
]),
|
|
424
|
-
_: 2
|
|
405
|
+
activator: a(({ props: l }) => [
|
|
406
|
+
r(n, H(l, {
|
|
407
|
+
class: "vdt-columns__button",
|
|
408
|
+
variant: "outlined",
|
|
409
|
+
color: "primary",
|
|
410
|
+
size: "small",
|
|
411
|
+
"prepend-icon": Bt
|
|
412
|
+
}), {
|
|
413
|
+
default: a(() => [
|
|
414
|
+
V(g(Ce.value), 1)
|
|
415
|
+
]),
|
|
416
|
+
_: 1
|
|
417
|
+
}, 16)
|
|
418
|
+
]),
|
|
419
|
+
default: a(() => [
|
|
420
|
+
r(Qe, {
|
|
421
|
+
class: "vdt-columns",
|
|
422
|
+
"min-width": "280"
|
|
423
|
+
}, {
|
|
424
|
+
default: a(() => [
|
|
425
|
+
r(Xe, { class: "pa-3" }, {
|
|
426
|
+
default: a(() => [
|
|
427
|
+
r(s, {
|
|
428
|
+
modelValue: ie.value,
|
|
429
|
+
"onUpdate:modelValue": t[0] || (t[0] = (l) => ie.value = l),
|
|
430
|
+
placeholder: T("searchColumns"),
|
|
431
|
+
density: "compact",
|
|
432
|
+
variant: "outlined",
|
|
433
|
+
"hide-details": "",
|
|
434
|
+
clearable: ""
|
|
435
|
+
}, null, 8, ["modelValue", "placeholder"]),
|
|
436
|
+
P("div", yt, [
|
|
437
|
+
r(n, {
|
|
438
|
+
variant: "text",
|
|
439
|
+
size: "small",
|
|
440
|
+
color: "primary",
|
|
441
|
+
onClick: Ve
|
|
442
|
+
}, {
|
|
443
|
+
default: a(() => [
|
|
444
|
+
V(g(j.value === 0 ? T("hideAllColumns") : T("showAllColumns")), 1)
|
|
445
|
+
]),
|
|
446
|
+
_: 1
|
|
447
|
+
}),
|
|
448
|
+
r(n, {
|
|
449
|
+
variant: "text",
|
|
450
|
+
size: "small",
|
|
451
|
+
onClick: Se
|
|
452
|
+
}, {
|
|
453
|
+
default: a(() => [
|
|
454
|
+
V(g(T("resetColumns")), 1)
|
|
455
|
+
]),
|
|
456
|
+
_: 1
|
|
457
|
+
})
|
|
458
|
+
]),
|
|
459
|
+
P("ul", ht, [
|
|
460
|
+
(m(!0), G(it, null, Ie(Re.value, (l) => (m(), G("li", {
|
|
461
|
+
key: l.key,
|
|
462
|
+
class: $e(["vdt-columns__item", { "vdt-columns__item--over": X.value === l.key }]),
|
|
463
|
+
draggable: "true",
|
|
464
|
+
onDragstart: (u) => ze(u, l.key),
|
|
465
|
+
onDragover: le((u) => X.value = l.key, ["prevent"]),
|
|
466
|
+
onDragleave: t[1] || (t[1] = (u) => X.value = null),
|
|
467
|
+
onDrop: le((u) => Ne(l.key), ["prevent"]),
|
|
468
|
+
onDragend: Te
|
|
469
|
+
}, [
|
|
470
|
+
r(B, {
|
|
471
|
+
"model-value": !x.value.includes(l.key),
|
|
472
|
+
label: l.title,
|
|
473
|
+
density: "compact",
|
|
474
|
+
class: "flex-grow-1",
|
|
475
|
+
"onUpdate:modelValue": (u) => ke(l.key, !!u)
|
|
476
|
+
}, null, 8, ["model-value", "label", "onUpdate:modelValue"]),
|
|
477
|
+
P("button", {
|
|
478
|
+
type: "button",
|
|
479
|
+
class: "vdt-columns__handle",
|
|
480
|
+
"aria-label": `${T("moveColumn")}: ${l.title}`,
|
|
481
|
+
title: T("moveColumn"),
|
|
482
|
+
onKeydown: [
|
|
483
|
+
Le(le((u) => ue(l.key, -1), ["prevent"]), ["up"]),
|
|
484
|
+
Le(le((u) => ue(l.key, 1), ["prevent"]), ["down"])
|
|
485
|
+
]
|
|
486
|
+
}, [
|
|
487
|
+
r(w, {
|
|
488
|
+
icon: Dt,
|
|
489
|
+
size: "18"
|
|
490
|
+
})
|
|
491
|
+
], 40, wt)
|
|
492
|
+
], 42, xt))), 128))
|
|
493
|
+
])
|
|
494
|
+
]),
|
|
495
|
+
_: 1
|
|
496
|
+
})
|
|
497
|
+
]),
|
|
498
|
+
_: 1
|
|
499
|
+
})
|
|
500
|
+
]),
|
|
501
|
+
_: 1
|
|
502
|
+
}, 8, ["modelValue"])
|
|
503
|
+
])
|
|
504
|
+
], 512), [
|
|
505
|
+
[dt, Ke.value]
|
|
506
|
+
]),
|
|
507
|
+
P("div", {
|
|
508
|
+
ref_key: "bodyRef",
|
|
509
|
+
ref: me,
|
|
510
|
+
class: "vdt-body",
|
|
511
|
+
onScrollCapturePassive: je
|
|
425
512
|
}, [
|
|
426
|
-
e
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
513
|
+
r(tt, H(e.$attrs, {
|
|
514
|
+
headers: we.value,
|
|
515
|
+
items: o.items,
|
|
516
|
+
loading: o.loading,
|
|
517
|
+
"items-length": o.totalItems,
|
|
518
|
+
"items-per-page": R.value,
|
|
519
|
+
"onUpdate:itemsPerPage": t[3] || (t[3] = (l) => R.value = l),
|
|
520
|
+
search: o.search,
|
|
521
|
+
"sort-by": Y.value,
|
|
522
|
+
"onUpdate:sortBy": t[4] || (t[4] = (l) => Y.value = l),
|
|
523
|
+
page: Z.value,
|
|
524
|
+
"onUpdate:page": t[5] || (t[5] = (l) => Z.value = l),
|
|
525
|
+
"item-value": o.itemValue,
|
|
526
|
+
"show-expand": o.showExpand,
|
|
527
|
+
"show-select": o.showSelect,
|
|
528
|
+
"select-strategy": o.selectStrategy,
|
|
529
|
+
modelValue: O.value,
|
|
530
|
+
"onUpdate:modelValue": t[6] || (t[6] = (l) => O.value = l),
|
|
531
|
+
class: p.value
|
|
532
|
+
}), ut({
|
|
533
|
+
"item.data-table-expand": a(({ internalItem: l, isExpanded: u, toggleExpand: D }) => [
|
|
534
|
+
C(e.$slots, "item.data-table-expand", {
|
|
535
|
+
internalItem: l,
|
|
536
|
+
isExpanded: u,
|
|
537
|
+
toggleExpand: D
|
|
538
|
+
}, () => [
|
|
539
|
+
r(n, {
|
|
540
|
+
onClick: (be) => D(l),
|
|
541
|
+
rounded: ""
|
|
542
|
+
}, {
|
|
543
|
+
default: a(() => [
|
|
544
|
+
r(w, null, {
|
|
545
|
+
default: a(() => [
|
|
546
|
+
V(g(u(l) ? "mdi-chevron-up" : "mdi-chevron-down"), 1)
|
|
547
|
+
]),
|
|
548
|
+
_: 2
|
|
549
|
+
}, 1024)
|
|
550
|
+
]),
|
|
551
|
+
_: 2
|
|
552
|
+
}, 1032, ["onClick"])
|
|
553
|
+
])
|
|
554
|
+
]),
|
|
555
|
+
"expanded-row": a(({ columns: l, item: u }) => [
|
|
556
|
+
C(e.$slots, "expanded-row", {
|
|
557
|
+
columns: l,
|
|
558
|
+
item: u
|
|
433
559
|
})
|
|
434
560
|
]),
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
561
|
+
"item.actions": a(({ item: l }) => [
|
|
562
|
+
C(e.$slots, "before-actions", { item: l }),
|
|
563
|
+
o.showViewButton ? (m(), k(oe, {
|
|
564
|
+
key: 0,
|
|
565
|
+
text: o.viewButtonText
|
|
566
|
+
}, {
|
|
567
|
+
activator: a(({ props: u }) => {
|
|
568
|
+
var D;
|
|
569
|
+
return [
|
|
570
|
+
r(n, H({
|
|
571
|
+
icon: "",
|
|
572
|
+
flat: "",
|
|
573
|
+
onClick: (be) => Ye(l)
|
|
574
|
+
}, u, {
|
|
575
|
+
disabled: (D = o.disableView) == null ? void 0 : D.call(o, l)
|
|
576
|
+
}), {
|
|
577
|
+
default: a(() => [
|
|
578
|
+
C(e.$slots, "view-icon", {}, () => [
|
|
579
|
+
S(L.value) ? (m(), k(ye(L.value), H({
|
|
580
|
+
key: 0,
|
|
581
|
+
size: 20,
|
|
582
|
+
class: "text-info"
|
|
583
|
+
}, E.value), null, 16)) : (m(), k(w, {
|
|
584
|
+
key: 1,
|
|
585
|
+
size: "20",
|
|
586
|
+
class: "text-info"
|
|
587
|
+
}, {
|
|
588
|
+
default: a(() => [
|
|
589
|
+
V(g(L.value), 1)
|
|
590
|
+
]),
|
|
591
|
+
_: 1
|
|
592
|
+
}))
|
|
593
|
+
])
|
|
594
|
+
]),
|
|
595
|
+
_: 3
|
|
596
|
+
}, 16, ["onClick", "disabled"])
|
|
597
|
+
];
|
|
598
|
+
}),
|
|
599
|
+
_: 2
|
|
600
|
+
}, 1032, ["text"])) : N("", !0),
|
|
601
|
+
o.showEditButton ? (m(), k(oe, {
|
|
602
|
+
key: 1,
|
|
603
|
+
text: o.editButtonText
|
|
604
|
+
}, {
|
|
605
|
+
activator: a(({ props: u }) => {
|
|
606
|
+
var D;
|
|
607
|
+
return [
|
|
608
|
+
r(n, H({
|
|
609
|
+
icon: "",
|
|
610
|
+
flat: "",
|
|
611
|
+
onClick: (be) => Ge(l)
|
|
612
|
+
}, u, {
|
|
613
|
+
disabled: (D = o.disableEdit) == null ? void 0 : D.call(o, l)
|
|
614
|
+
}), {
|
|
615
|
+
default: a(() => [
|
|
616
|
+
C(e.$slots, "edit-icon", {}, () => [
|
|
617
|
+
S(h.value) ? (m(), k(ye(h.value), H({
|
|
618
|
+
key: 0,
|
|
619
|
+
size: 20,
|
|
620
|
+
class: "text-primary"
|
|
621
|
+
}, E.value), null, 16)) : (m(), k(w, {
|
|
622
|
+
key: 1,
|
|
623
|
+
size: "20",
|
|
624
|
+
class: "text-primary"
|
|
625
|
+
}, {
|
|
626
|
+
default: a(() => [
|
|
627
|
+
V(g(h.value), 1)
|
|
628
|
+
]),
|
|
629
|
+
_: 1
|
|
630
|
+
}))
|
|
631
|
+
])
|
|
632
|
+
]),
|
|
633
|
+
_: 3
|
|
634
|
+
}, 16, ["onClick", "disabled"])
|
|
635
|
+
];
|
|
636
|
+
}),
|
|
637
|
+
_: 2
|
|
638
|
+
}, 1032, ["text"])) : N("", !0),
|
|
639
|
+
o.showDeleteButton ? (m(), k(oe, {
|
|
640
|
+
key: 2,
|
|
641
|
+
text: o.deleteButtonText
|
|
642
|
+
}, {
|
|
643
|
+
activator: a(({ props: u }) => {
|
|
644
|
+
var D;
|
|
645
|
+
return [
|
|
646
|
+
r(n, H({
|
|
647
|
+
icon: "",
|
|
648
|
+
flat: "",
|
|
649
|
+
onClick: (be) => qe(l)
|
|
650
|
+
}, u, {
|
|
651
|
+
disabled: (D = o.disableDelete) == null ? void 0 : D.call(o, l)
|
|
652
|
+
}), {
|
|
653
|
+
default: a(() => [
|
|
654
|
+
C(e.$slots, "delete-icon", {}, () => [
|
|
655
|
+
S(M.value) ? (m(), k(ye(M.value), H({
|
|
656
|
+
key: 0,
|
|
657
|
+
size: 20,
|
|
658
|
+
class: "text-error"
|
|
659
|
+
}, E.value), null, 16)) : (m(), k(w, {
|
|
660
|
+
key: 1,
|
|
661
|
+
size: "20",
|
|
662
|
+
class: "text-error"
|
|
663
|
+
}, {
|
|
664
|
+
default: a(() => [
|
|
665
|
+
V(g(M.value), 1)
|
|
666
|
+
]),
|
|
667
|
+
_: 1
|
|
668
|
+
}))
|
|
669
|
+
])
|
|
670
|
+
]),
|
|
671
|
+
_: 3
|
|
672
|
+
}, 16, ["onClick", "disabled"])
|
|
673
|
+
];
|
|
674
|
+
}),
|
|
675
|
+
_: 2
|
|
676
|
+
}, 1032, ["text"])) : N("", !0),
|
|
677
|
+
C(e.$slots, "after-actions", { item: l })
|
|
678
|
+
]),
|
|
679
|
+
tfoot: a(() => [
|
|
680
|
+
P("tfoot", null, [
|
|
681
|
+
C(e.$slots, "item.tfoot")
|
|
682
|
+
])
|
|
683
|
+
]),
|
|
684
|
+
_: 2
|
|
685
|
+
}, [
|
|
686
|
+
o.showSelect ? {
|
|
687
|
+
name: "top",
|
|
688
|
+
fn: a(() => [
|
|
689
|
+
C(e.$slots, "selection-actions", {
|
|
690
|
+
selected: O.value,
|
|
691
|
+
count: O.value.length,
|
|
692
|
+
clear: Ee
|
|
693
|
+
})
|
|
694
|
+
]),
|
|
695
|
+
key: "0"
|
|
696
|
+
} : void 0,
|
|
697
|
+
Ie(Oe.value, (l) => ({
|
|
698
|
+
name: `item.${l.key}`,
|
|
699
|
+
fn: a(({ item: u }) => [
|
|
700
|
+
C(e.$slots, `item.${l.key}`, { item: u }, () => [
|
|
701
|
+
V(g(u[l.key]), 1)
|
|
702
|
+
])
|
|
442
703
|
])
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
704
|
+
}))
|
|
705
|
+
]), 1040, ["headers", "items", "loading", "items-length", "items-per-page", "search", "sort-by", "page", "item-value", "show-expand", "show-select", "select-strategy", "modelValue", "class"]),
|
|
706
|
+
t[9] || (t[9] = P("div", { class: "vdt-fade vdt-fade--left" }, null, -1)),
|
|
707
|
+
t[10] || (t[10] = P("div", { class: "vdt-fade vdt-fade--right" }, null, -1)),
|
|
708
|
+
fe.value ? (m(), G("button", {
|
|
709
|
+
key: 0,
|
|
710
|
+
type: "button",
|
|
711
|
+
class: "vdt-arrow vdt-arrow--left",
|
|
712
|
+
"aria-label": T("scrollLeft"),
|
|
713
|
+
onClick: t[7] || (t[7] = (l) => _e(-1))
|
|
714
|
+
}, [
|
|
715
|
+
r(w, {
|
|
716
|
+
icon: _t,
|
|
717
|
+
size: "20"
|
|
718
|
+
})
|
|
719
|
+
], 8, Ct)) : N("", !0),
|
|
720
|
+
ee.value ? (m(), k(oe, {
|
|
721
|
+
key: 1,
|
|
722
|
+
text: T("scrollRight"),
|
|
723
|
+
disabled: De.value,
|
|
724
|
+
location: "top"
|
|
725
|
+
}, {
|
|
726
|
+
activator: a(({ props: l }) => [
|
|
727
|
+
P("button", H(l, {
|
|
728
|
+
type: "button",
|
|
729
|
+
class: "vdt-arrow vdt-arrow--right",
|
|
730
|
+
"aria-label": T("scrollRight"),
|
|
731
|
+
onClick: t[8] || (t[8] = (u) => _e(1))
|
|
732
|
+
}), [
|
|
733
|
+
r(w, {
|
|
734
|
+
icon: $t,
|
|
735
|
+
size: "20"
|
|
736
|
+
})
|
|
737
|
+
], 16, kt)
|
|
738
|
+
]),
|
|
739
|
+
_: 1
|
|
740
|
+
}, 8, ["text", "disabled"])) : N("", !0),
|
|
741
|
+
De.value ? (m(), G("span", Vt, g(T("scrollHint")), 1)) : N("", !0)
|
|
742
|
+
], 544),
|
|
743
|
+
r(pt, {
|
|
744
|
+
show: W.value,
|
|
745
|
+
title: o.deleteModalTitle,
|
|
746
|
+
description: o.deleteModalMessage,
|
|
747
|
+
confirmButtonText: o.deleteModalConfirmButtonText,
|
|
748
|
+
cancelButtonText: o.deleteModalCancelButtonText,
|
|
749
|
+
onClose: Fe,
|
|
750
|
+
onConfirm: Ze
|
|
454
751
|
}, null, 8, ["show", "title", "description", "confirmButtonText", "cancelButtonText"])
|
|
455
|
-
],
|
|
752
|
+
], 6);
|
|
456
753
|
};
|
|
457
754
|
}
|
|
458
|
-
}),
|
|
459
|
-
install(
|
|
460
|
-
|
|
755
|
+
}), Pt = {
|
|
756
|
+
install(o) {
|
|
757
|
+
o.component("DataTable", It);
|
|
461
758
|
}
|
|
462
759
|
};
|
|
463
760
|
export {
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
761
|
+
He as DATA_TABLE_CONFIG_KEY,
|
|
762
|
+
It as DataTable,
|
|
763
|
+
Mt as createDataTableConfig,
|
|
764
|
+
Pt as default
|
|
468
765
|
};
|