vs-datatable 1.2.6 → 1.2.8
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/dist/vs-datatable.es.js
CHANGED
|
@@ -1,18 +1,19 @@
|
|
|
1
|
-
import { defineComponent as _, computed as F, createElementBlock as
|
|
2
|
-
import './index.css';const
|
|
1
|
+
import { defineComponent as _, computed as F, createElementBlock as x, openBlock as y, createElementVNode as b, createCommentVNode as D, Fragment as z, renderList as Q, normalizeClass as G, toDisplayString as B, unref as $, mergeProps as Ae, renderSlot as j, ref as q, watch as Y, createVNode as ne, withModifiers as pe, withCtx as X, withDirectives as te, vModelText as he, nextTick as oe, onMounted as Re, onUnmounted as mt, createBlock as fe, Teleport as Dt, Transition as Pt, vModelSelect as Qe, normalizeStyle as pt, createSlots as Te, createTextVNode as Ge, onBeforeUnmount as He, isRef as Fe, shallowRef as gt, useAttrs as It, onBeforeMount as qt, normalizeProps as ot, guardReactiveProps as st } from "vue";
|
|
2
|
+
import './index.css';const Mt = (e, n) => n ? n.split(".").reduce((t, o) => t && t[o], e) : "";
|
|
3
3
|
function re(e, n, t = "id") {
|
|
4
4
|
return typeof t == "function" ? t(e, n) : e[t] || n;
|
|
5
5
|
}
|
|
6
|
-
function
|
|
7
|
-
return n.some(
|
|
6
|
+
function yt(e, n, t = "id") {
|
|
7
|
+
return n.some(
|
|
8
|
+
(o) => re(o, -1, t) === re(e, -1, t)
|
|
9
|
+
);
|
|
8
10
|
}
|
|
9
|
-
function
|
|
11
|
+
function Bt(e, n, t) {
|
|
10
12
|
const o = (l) => l.reduce((a, r) => r.children && r.children.length > 0 ? a + o(r.children) : a + 1, 0);
|
|
11
13
|
return o(e) + (n ? 1 : 0) + (t ? 1 : 0);
|
|
12
14
|
}
|
|
13
|
-
function
|
|
14
|
-
if (!n.length)
|
|
15
|
-
return e;
|
|
15
|
+
function Ht(e, n) {
|
|
16
|
+
if (!n.length) return e;
|
|
16
17
|
const t = (o, s) => s.split(".").reduce((l, a) => l?.[a], o) ?? "";
|
|
17
18
|
return [...e].sort((o, s) => {
|
|
18
19
|
for (const { field: l, order: a } of n) {
|
|
@@ -24,25 +25,25 @@ function Wt(e, n) {
|
|
|
24
25
|
});
|
|
25
26
|
}
|
|
26
27
|
function Nt(e, n, t) {
|
|
27
|
-
if (!t)
|
|
28
|
-
return e;
|
|
28
|
+
if (!t) return e;
|
|
29
29
|
const o = (n - 1) * t, s = o + t;
|
|
30
30
|
return e.slice(o, s);
|
|
31
31
|
}
|
|
32
|
-
function
|
|
32
|
+
function Wt(e, n, t) {
|
|
33
33
|
const o = (e - 1) * n + 1, s = Math.min(e * n, t);
|
|
34
34
|
return { start: o, end: s };
|
|
35
35
|
}
|
|
36
|
-
function
|
|
36
|
+
function wt(e, n) {
|
|
37
37
|
return Math.ceil(e / n);
|
|
38
38
|
}
|
|
39
39
|
function lt(e, n, t) {
|
|
40
|
-
if (!n || n.trim() === "")
|
|
41
|
-
return e;
|
|
40
|
+
if (!n || n.trim() === "") return e;
|
|
42
41
|
const o = n.toLowerCase();
|
|
43
|
-
return e.filter((s) => Object.values(s).some(
|
|
42
|
+
return e.filter((s) => Object.values(s).some(
|
|
43
|
+
(l) => String(l ?? "").toLowerCase().includes(o)
|
|
44
|
+
));
|
|
44
45
|
}
|
|
45
|
-
function
|
|
46
|
+
function Kt(e = []) {
|
|
46
47
|
const n = [], t = (o) => {
|
|
47
48
|
o.forEach((s) => {
|
|
48
49
|
Array.isArray(s.children) && s.children.length ? t(s.children) : n.push(s);
|
|
@@ -50,13 +51,13 @@ function zt(e = []) {
|
|
|
50
51
|
};
|
|
51
52
|
return t(e), n;
|
|
52
53
|
}
|
|
53
|
-
const
|
|
54
|
+
const zt = ["id"], jt = ["disabled"], Ut = {
|
|
54
55
|
key: 1,
|
|
55
56
|
class: "vs-pagination-ellipsis"
|
|
56
|
-
},
|
|
57
|
+
}, Zt = ["id", "onClick"], Xt = {
|
|
57
58
|
key: 2,
|
|
58
59
|
class: "vs-pagination-ellipsis"
|
|
59
|
-
},
|
|
60
|
+
}, Qt = ["disabled"], Yt = /* @__PURE__ */ _({
|
|
60
61
|
__name: "VsPagination",
|
|
61
62
|
props: {
|
|
62
63
|
modelValue: {},
|
|
@@ -73,66 +74,66 @@ const jt = ["id"], Ut = ["disabled"], Zt = {
|
|
|
73
74
|
set: (f) => {
|
|
74
75
|
o("update:modelValue", f), o("pageChanged", f);
|
|
75
76
|
}
|
|
76
|
-
}), a = F(() => l.value <= Math.floor(s / 2) ? 1 : l.value >= i.value - Math.floor(s / 2) ? Math.max(i.value - s + 1, 1) : l.value - Math.floor(s / 2)), r = F(() => Math.min(a.value + s - 1, i.value)), i = F(() =>
|
|
77
|
+
}), a = F(() => l.value <= Math.floor(s / 2) ? 1 : l.value >= i.value - Math.floor(s / 2) ? Math.max(i.value - s + 1, 1) : l.value - Math.floor(s / 2)), r = F(() => Math.min(a.value + s - 1, i.value)), i = F(() => wt(t.totalRecords, t.rowsPerPage)), u = F(() => {
|
|
77
78
|
const f = [];
|
|
78
|
-
for (let
|
|
79
|
-
f.push(
|
|
79
|
+
for (let h = a.value; h <= r.value; h++)
|
|
80
|
+
f.push(h);
|
|
80
81
|
return f;
|
|
81
|
-
}),
|
|
82
|
+
}), d = (f) => {
|
|
82
83
|
f >= 1 && f <= i.value && (l.value = f);
|
|
83
84
|
}, v = () => {
|
|
84
85
|
l.value > 1 && l.value--;
|
|
85
86
|
}, m = () => {
|
|
86
87
|
l.value < i.value && l.value++;
|
|
87
88
|
};
|
|
88
|
-
return (f,
|
|
89
|
+
return (f, h) => (y(), x("div", {
|
|
89
90
|
class: "vs-pagination",
|
|
90
91
|
id: e.tablename + "-pagination"
|
|
91
92
|
}, [
|
|
92
|
-
|
|
93
|
+
b("button", {
|
|
93
94
|
onClick: v,
|
|
94
95
|
type: "button",
|
|
95
96
|
class: "vs-pagination-button vs-pagination-nav",
|
|
96
97
|
disabled: l.value === 1
|
|
97
|
-
}, " ‹‹ ", 8,
|
|
98
|
-
a.value > 1 ? (y(),
|
|
98
|
+
}, " ‹‹ ", 8, jt),
|
|
99
|
+
a.value > 1 ? (y(), x("button", {
|
|
99
100
|
key: 0,
|
|
100
101
|
type: "button",
|
|
101
102
|
class: "vs-pagination-button",
|
|
102
|
-
onClick:
|
|
103
|
-
}, " 1 ")) :
|
|
104
|
-
a.value > 2 ? (y(),
|
|
105
|
-
(y(!0),
|
|
106
|
-
key:
|
|
103
|
+
onClick: h[0] || (h[0] = (c) => d(1))
|
|
104
|
+
}, " 1 ")) : D("", !0),
|
|
105
|
+
a.value > 2 ? (y(), x("span", Ut, "...")) : D("", !0),
|
|
106
|
+
(y(!0), x(z, null, Q(u.value, (c) => (y(), x("button", {
|
|
107
|
+
key: c,
|
|
107
108
|
type: "button",
|
|
108
109
|
class: G([
|
|
109
110
|
"vs-pagination-button",
|
|
110
|
-
{ "vs-active": l.value ===
|
|
111
|
+
{ "vs-active": l.value === c }
|
|
111
112
|
]),
|
|
112
|
-
id: e.tablename + "-page-" +
|
|
113
|
-
onClick: (g) =>
|
|
114
|
-
},
|
|
115
|
-
r.value < i.value - 1 ? (y(),
|
|
116
|
-
r.value < i.value ? (y(),
|
|
113
|
+
id: e.tablename + "-page-" + c,
|
|
114
|
+
onClick: (g) => d(c)
|
|
115
|
+
}, B(c), 11, Zt))), 128)),
|
|
116
|
+
r.value < i.value - 1 ? (y(), x("span", Xt, "...")) : D("", !0),
|
|
117
|
+
r.value < i.value ? (y(), x("button", {
|
|
117
118
|
key: 3,
|
|
118
119
|
type: "button",
|
|
119
120
|
class: "vs-pagination-button",
|
|
120
|
-
onClick:
|
|
121
|
-
},
|
|
122
|
-
|
|
121
|
+
onClick: h[1] || (h[1] = (c) => d(i.value))
|
|
122
|
+
}, B(i.value), 1)) : D("", !0),
|
|
123
|
+
b("button", {
|
|
123
124
|
onClick: m,
|
|
124
125
|
type: "button",
|
|
125
126
|
class: "vs-pagination-button vs-pagination-nav",
|
|
126
127
|
disabled: l.value === i.value
|
|
127
|
-
}, " ›› ", 8,
|
|
128
|
-
], 8,
|
|
128
|
+
}, " ›› ", 8, Qt)
|
|
129
|
+
], 8, zt));
|
|
129
130
|
}
|
|
130
131
|
}), ae = (e, n) => {
|
|
131
132
|
const t = e.__vccOpts || e;
|
|
132
133
|
for (const [o, s] of n)
|
|
133
134
|
t[o] = s;
|
|
134
135
|
return t;
|
|
135
|
-
},
|
|
136
|
+
}, Gt = /* @__PURE__ */ ae(Yt, [["__scopeId", "data-v-b327b254"]]), Jt = { class: "vs-rows-per-page" }, _t = ["value"], en = ["value"], tn = /* @__PURE__ */ _({
|
|
136
137
|
__name: "VsRowsPerPage",
|
|
137
138
|
props: {
|
|
138
139
|
modelValue: {},
|
|
@@ -144,92 +145,92 @@ const jt = ["id"], Ut = ["disabled"], Zt = {
|
|
|
144
145
|
const r = Number(a.target.value);
|
|
145
146
|
o("update:modelValue", r), o("rowsPerPageChanged", r);
|
|
146
147
|
};
|
|
147
|
-
return (a, r) => (y(),
|
|
148
|
-
r[0] || (r[0] =
|
|
149
|
-
|
|
148
|
+
return (a, r) => (y(), x("div", Jt, [
|
|
149
|
+
r[0] || (r[0] = b("span", { class: "vs-rows-label" }, "Items Per Page", -1)),
|
|
150
|
+
b("select", {
|
|
150
151
|
class: "vs-items-dropdown",
|
|
151
152
|
value: e.modelValue,
|
|
152
153
|
onChange: l
|
|
153
154
|
}, [
|
|
154
|
-
(y(!0),
|
|
155
|
+
(y(!0), x(z, null, Q($(s), (i) => (y(), x("option", {
|
|
155
156
|
key: i,
|
|
156
157
|
value: i
|
|
157
|
-
},
|
|
158
|
-
], 40,
|
|
158
|
+
}, B(i), 9, en))), 128))
|
|
159
|
+
], 40, _t)
|
|
159
160
|
]));
|
|
160
161
|
}
|
|
161
|
-
}),
|
|
162
|
+
}), nn = /* @__PURE__ */ ae(tn, [["__scopeId", "data-v-0c2bdd9c"]]), Pe = Math.min, be = Math.max, Ie = Math.round, Le = Math.floor, ie = (e) => ({
|
|
162
163
|
x: e,
|
|
163
164
|
y: e
|
|
164
|
-
}),
|
|
165
|
+
}), on = {
|
|
165
166
|
left: "right",
|
|
166
167
|
right: "left",
|
|
167
168
|
bottom: "top",
|
|
168
169
|
top: "bottom"
|
|
169
|
-
},
|
|
170
|
+
}, sn = {
|
|
170
171
|
start: "end",
|
|
171
172
|
end: "start"
|
|
172
173
|
};
|
|
173
174
|
function at(e, n, t) {
|
|
174
|
-
return
|
|
175
|
+
return be(e, Pe(n, t));
|
|
175
176
|
}
|
|
176
|
-
function
|
|
177
|
+
function Ne(e, n) {
|
|
177
178
|
return typeof e == "function" ? e(n) : e;
|
|
178
179
|
}
|
|
179
|
-
function
|
|
180
|
+
function xe(e) {
|
|
180
181
|
return e.split("-")[0];
|
|
181
182
|
}
|
|
182
|
-
function
|
|
183
|
+
function We(e) {
|
|
183
184
|
return e.split("-")[1];
|
|
184
185
|
}
|
|
185
|
-
function
|
|
186
|
+
function bt(e) {
|
|
186
187
|
return e === "x" ? "y" : "x";
|
|
187
188
|
}
|
|
188
|
-
function
|
|
189
|
+
function xt(e) {
|
|
189
190
|
return e === "y" ? "height" : "width";
|
|
190
191
|
}
|
|
191
|
-
const
|
|
192
|
+
const ln = /* @__PURE__ */ new Set(["top", "bottom"]);
|
|
192
193
|
function me(e) {
|
|
193
|
-
return
|
|
194
|
+
return ln.has(xe(e)) ? "y" : "x";
|
|
194
195
|
}
|
|
195
|
-
function
|
|
196
|
-
return
|
|
196
|
+
function kt(e) {
|
|
197
|
+
return bt(me(e));
|
|
197
198
|
}
|
|
198
|
-
function
|
|
199
|
+
function an(e, n, t) {
|
|
199
200
|
t === void 0 && (t = !1);
|
|
200
|
-
const o =
|
|
201
|
+
const o = We(e), s = kt(e), l = xt(s);
|
|
201
202
|
let a = s === "x" ? o === (t ? "end" : "start") ? "right" : "left" : o === "start" ? "bottom" : "top";
|
|
202
203
|
return n.reference[l] > n.floating[l] && (a = qe(a)), [a, qe(a)];
|
|
203
204
|
}
|
|
204
|
-
function
|
|
205
|
+
function rn(e) {
|
|
205
206
|
const n = qe(e);
|
|
206
207
|
return [Je(e), n, Je(n)];
|
|
207
208
|
}
|
|
208
209
|
function Je(e) {
|
|
209
|
-
return e.replace(/start|end/g, (n) =>
|
|
210
|
+
return e.replace(/start|end/g, (n) => sn[n]);
|
|
210
211
|
}
|
|
211
|
-
const rt = ["left", "right"], it = ["right", "left"],
|
|
212
|
-
function
|
|
212
|
+
const rt = ["left", "right"], it = ["right", "left"], cn = ["top", "bottom"], un = ["bottom", "top"];
|
|
213
|
+
function dn(e, n, t) {
|
|
213
214
|
switch (e) {
|
|
214
215
|
case "top":
|
|
215
216
|
case "bottom":
|
|
216
217
|
return t ? n ? it : rt : n ? rt : it;
|
|
217
218
|
case "left":
|
|
218
219
|
case "right":
|
|
219
|
-
return n ?
|
|
220
|
+
return n ? cn : un;
|
|
220
221
|
default:
|
|
221
222
|
return [];
|
|
222
223
|
}
|
|
223
224
|
}
|
|
224
|
-
function
|
|
225
|
-
const s =
|
|
226
|
-
let l =
|
|
225
|
+
function fn(e, n, t, o) {
|
|
226
|
+
const s = We(e);
|
|
227
|
+
let l = dn(xe(e), t === "start", o);
|
|
227
228
|
return s && (l = l.map((a) => a + "-" + s), n && (l = l.concat(l.map(Je)))), l;
|
|
228
229
|
}
|
|
229
230
|
function qe(e) {
|
|
230
|
-
return e.replace(/left|right|bottom|top/g, (n) =>
|
|
231
|
+
return e.replace(/left|right|bottom|top/g, (n) => on[n]);
|
|
231
232
|
}
|
|
232
|
-
function
|
|
233
|
+
function vn(e) {
|
|
233
234
|
return {
|
|
234
235
|
top: 0,
|
|
235
236
|
right: 0,
|
|
@@ -238,8 +239,8 @@ function hn(e) {
|
|
|
238
239
|
...e
|
|
239
240
|
};
|
|
240
241
|
}
|
|
241
|
-
function
|
|
242
|
-
return typeof e != "number" ?
|
|
242
|
+
function hn(e) {
|
|
243
|
+
return typeof e != "number" ? vn(e) : {
|
|
243
244
|
top: e,
|
|
244
245
|
right: e,
|
|
245
246
|
bottom: e,
|
|
@@ -269,18 +270,18 @@ function ct(e, n, t) {
|
|
|
269
270
|
reference: o,
|
|
270
271
|
floating: s
|
|
271
272
|
} = e;
|
|
272
|
-
const l = me(n), a =
|
|
273
|
+
const l = me(n), a = kt(n), r = xt(a), i = xe(n), u = l === "y", d = o.x + o.width / 2 - s.width / 2, v = o.y + o.height / 2 - s.height / 2, m = o[r] / 2 - s[r] / 2;
|
|
273
274
|
let f;
|
|
274
275
|
switch (i) {
|
|
275
276
|
case "top":
|
|
276
277
|
f = {
|
|
277
|
-
x:
|
|
278
|
+
x: d,
|
|
278
279
|
y: o.y - s.height
|
|
279
280
|
};
|
|
280
281
|
break;
|
|
281
282
|
case "bottom":
|
|
282
283
|
f = {
|
|
283
|
-
x:
|
|
284
|
+
x: d,
|
|
284
285
|
y: o.y + o.height
|
|
285
286
|
};
|
|
286
287
|
break;
|
|
@@ -302,78 +303,78 @@ function ct(e, n, t) {
|
|
|
302
303
|
y: o.y
|
|
303
304
|
};
|
|
304
305
|
}
|
|
305
|
-
switch (
|
|
306
|
+
switch (We(n)) {
|
|
306
307
|
case "start":
|
|
307
|
-
f[a] -= m * (t &&
|
|
308
|
+
f[a] -= m * (t && u ? -1 : 1);
|
|
308
309
|
break;
|
|
309
310
|
case "end":
|
|
310
|
-
f[a] += m * (t &&
|
|
311
|
+
f[a] += m * (t && u ? -1 : 1);
|
|
311
312
|
break;
|
|
312
313
|
}
|
|
313
314
|
return f;
|
|
314
315
|
}
|
|
315
|
-
const
|
|
316
|
+
const mn = async (e, n, t) => {
|
|
316
317
|
const {
|
|
317
318
|
placement: o = "bottom",
|
|
318
319
|
strategy: s = "absolute",
|
|
319
320
|
middleware: l = [],
|
|
320
321
|
platform: a
|
|
321
322
|
} = t, r = l.filter(Boolean), i = await (a.isRTL == null ? void 0 : a.isRTL(n));
|
|
322
|
-
let
|
|
323
|
+
let u = await a.getElementRects({
|
|
323
324
|
reference: e,
|
|
324
325
|
floating: n,
|
|
325
326
|
strategy: s
|
|
326
327
|
}), {
|
|
327
|
-
x:
|
|
328
|
+
x: d,
|
|
328
329
|
y: v
|
|
329
|
-
} = ct(
|
|
330
|
-
for (let
|
|
330
|
+
} = ct(u, o, i), m = o, f = {}, h = 0;
|
|
331
|
+
for (let c = 0; c < r.length; c++) {
|
|
331
332
|
const {
|
|
332
333
|
name: g,
|
|
333
334
|
fn: C
|
|
334
|
-
} = r[
|
|
335
|
-
x:
|
|
335
|
+
} = r[c], {
|
|
336
|
+
x: R,
|
|
336
337
|
y: E,
|
|
337
338
|
data: V,
|
|
338
|
-
reset:
|
|
339
|
+
reset: T
|
|
339
340
|
} = await C({
|
|
340
|
-
x:
|
|
341
|
+
x: d,
|
|
341
342
|
y: v,
|
|
342
343
|
initialPlacement: o,
|
|
343
344
|
placement: m,
|
|
344
345
|
strategy: s,
|
|
345
346
|
middlewareData: f,
|
|
346
|
-
rects:
|
|
347
|
+
rects: u,
|
|
347
348
|
platform: a,
|
|
348
349
|
elements: {
|
|
349
350
|
reference: e,
|
|
350
351
|
floating: n
|
|
351
352
|
}
|
|
352
353
|
});
|
|
353
|
-
|
|
354
|
+
d = R ?? d, v = E ?? v, f = {
|
|
354
355
|
...f,
|
|
355
356
|
[g]: {
|
|
356
357
|
...f[g],
|
|
357
358
|
...V
|
|
358
359
|
}
|
|
359
|
-
},
|
|
360
|
+
}, T && h <= 50 && (h++, typeof T == "object" && (T.placement && (m = T.placement), T.rects && (u = T.rects === !0 ? await a.getElementRects({
|
|
360
361
|
reference: e,
|
|
361
362
|
floating: n,
|
|
362
363
|
strategy: s
|
|
363
|
-
}) :
|
|
364
|
-
x:
|
|
364
|
+
}) : T.rects), {
|
|
365
|
+
x: d,
|
|
365
366
|
y: v
|
|
366
|
-
} = ct(
|
|
367
|
+
} = ct(u, m, i)), c = -1);
|
|
367
368
|
}
|
|
368
369
|
return {
|
|
369
|
-
x:
|
|
370
|
+
x: d,
|
|
370
371
|
y: v,
|
|
371
372
|
placement: m,
|
|
372
373
|
strategy: s,
|
|
373
374
|
middlewareData: f
|
|
374
375
|
};
|
|
375
376
|
};
|
|
376
|
-
async function
|
|
377
|
+
async function Ct(e, n) {
|
|
377
378
|
var t;
|
|
378
379
|
n === void 0 && (n = {});
|
|
379
380
|
const {
|
|
@@ -384,17 +385,17 @@ async function St(e, n) {
|
|
|
384
385
|
elements: r,
|
|
385
386
|
strategy: i
|
|
386
387
|
} = e, {
|
|
387
|
-
boundary:
|
|
388
|
-
rootBoundary:
|
|
388
|
+
boundary: u = "clippingAncestors",
|
|
389
|
+
rootBoundary: d = "viewport",
|
|
389
390
|
elementContext: v = "floating",
|
|
390
391
|
altBoundary: m = !1,
|
|
391
392
|
padding: f = 0
|
|
392
|
-
} =
|
|
393
|
+
} = Ne(n, e), h = hn(f), g = r[m ? v === "floating" ? "reference" : "floating" : v], C = Me(await l.getClippingRect({
|
|
393
394
|
element: (t = await (l.isElement == null ? void 0 : l.isElement(g))) == null || t ? g : g.contextElement || await (l.getDocumentElement == null ? void 0 : l.getDocumentElement(r.floating)),
|
|
394
|
-
boundary:
|
|
395
|
-
rootBoundary:
|
|
395
|
+
boundary: u,
|
|
396
|
+
rootBoundary: d,
|
|
396
397
|
strategy: i
|
|
397
|
-
})),
|
|
398
|
+
})), R = v === "floating" ? {
|
|
398
399
|
x: o,
|
|
399
400
|
y: s,
|
|
400
401
|
width: a.floating.width,
|
|
@@ -405,20 +406,20 @@ async function St(e, n) {
|
|
|
405
406
|
} : {
|
|
406
407
|
x: 1,
|
|
407
408
|
y: 1
|
|
408
|
-
},
|
|
409
|
+
}, T = Me(l.convertOffsetParentRelativeRectToViewportRelativeRect ? await l.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
409
410
|
elements: r,
|
|
410
|
-
rect:
|
|
411
|
+
rect: R,
|
|
411
412
|
offsetParent: E,
|
|
412
413
|
strategy: i
|
|
413
|
-
}) :
|
|
414
|
+
}) : R);
|
|
414
415
|
return {
|
|
415
|
-
top: (C.top -
|
|
416
|
-
bottom: (
|
|
417
|
-
left: (C.left -
|
|
418
|
-
right: (
|
|
416
|
+
top: (C.top - T.top + h.top) / V.y,
|
|
417
|
+
bottom: (T.bottom - C.bottom + h.bottom) / V.y,
|
|
418
|
+
left: (C.left - T.left + h.left) / V.x,
|
|
419
|
+
right: (T.right - C.right + h.right) / V.x
|
|
419
420
|
};
|
|
420
421
|
}
|
|
421
|
-
const
|
|
422
|
+
const pn = function(e) {
|
|
422
423
|
return e === void 0 && (e = {}), {
|
|
423
424
|
name: "flip",
|
|
424
425
|
options: e,
|
|
@@ -430,86 +431,86 @@ const gn = function(e) {
|
|
|
430
431
|
rects: a,
|
|
431
432
|
initialPlacement: r,
|
|
432
433
|
platform: i,
|
|
433
|
-
elements:
|
|
434
|
+
elements: u
|
|
434
435
|
} = n, {
|
|
435
|
-
mainAxis:
|
|
436
|
+
mainAxis: d = !0,
|
|
436
437
|
crossAxis: v = !0,
|
|
437
438
|
fallbackPlacements: m,
|
|
438
439
|
fallbackStrategy: f = "bestFit",
|
|
439
|
-
fallbackAxisSideDirection:
|
|
440
|
-
flipAlignment:
|
|
440
|
+
fallbackAxisSideDirection: h = "none",
|
|
441
|
+
flipAlignment: c = !0,
|
|
441
442
|
...g
|
|
442
|
-
} =
|
|
443
|
+
} = Ne(e, n);
|
|
443
444
|
if ((t = l.arrow) != null && t.alignmentOffset)
|
|
444
445
|
return {};
|
|
445
|
-
const C =
|
|
446
|
-
!m &&
|
|
447
|
-
const
|
|
448
|
-
let
|
|
449
|
-
if (
|
|
450
|
-
const O =
|
|
451
|
-
|
|
446
|
+
const C = xe(s), R = me(r), E = xe(r) === r, V = await (i.isRTL == null ? void 0 : i.isRTL(u.floating)), T = m || (E || !c ? [qe(r)] : rn(r)), W = h !== "none";
|
|
447
|
+
!m && W && T.push(...fn(r, c, h, V));
|
|
448
|
+
const S = [r, ...T], k = await Ct(n, g), w = [];
|
|
449
|
+
let p = ((o = l.flip) == null ? void 0 : o.overflows) || [];
|
|
450
|
+
if (d && w.push(k[C]), v) {
|
|
451
|
+
const O = an(s, a, V);
|
|
452
|
+
w.push(k[O[0]], k[O[1]]);
|
|
452
453
|
}
|
|
453
|
-
if (
|
|
454
|
+
if (p = [...p, {
|
|
454
455
|
placement: s,
|
|
455
|
-
overflows:
|
|
456
|
-
}], !
|
|
457
|
-
var
|
|
458
|
-
const O = (((
|
|
459
|
-
if (
|
|
456
|
+
overflows: w
|
|
457
|
+
}], !w.every((O) => O <= 0)) {
|
|
458
|
+
var A, P;
|
|
459
|
+
const O = (((A = l.flip) == null ? void 0 : A.index) || 0) + 1, H = S[O];
|
|
460
|
+
if (H && (!(v === "alignment" ? R !== me(H) : !1) || // We leave the current main axis only if every placement on that axis
|
|
460
461
|
// overflows the main axis.
|
|
461
|
-
|
|
462
|
+
p.every((K) => me(K.placement) === R ? K.overflows[0] > 0 : !0)))
|
|
462
463
|
return {
|
|
463
464
|
data: {
|
|
464
465
|
index: O,
|
|
465
|
-
overflows:
|
|
466
|
+
overflows: p
|
|
466
467
|
},
|
|
467
468
|
reset: {
|
|
468
|
-
placement:
|
|
469
|
+
placement: H
|
|
469
470
|
}
|
|
470
471
|
};
|
|
471
|
-
let
|
|
472
|
-
if (!
|
|
472
|
+
let M = (P = p.filter((N) => N.overflows[0] <= 0).sort((N, K) => N.overflows[1] - K.overflows[1])[0]) == null ? void 0 : P.placement;
|
|
473
|
+
if (!M)
|
|
473
474
|
switch (f) {
|
|
474
475
|
case "bestFit": {
|
|
475
|
-
var
|
|
476
|
-
const
|
|
477
|
-
if (
|
|
478
|
-
const
|
|
479
|
-
return
|
|
476
|
+
var L;
|
|
477
|
+
const N = (L = p.filter((K) => {
|
|
478
|
+
if (W) {
|
|
479
|
+
const I = me(K.placement);
|
|
480
|
+
return I === R || // Create a bias to the `y` side axis due to horizontal
|
|
480
481
|
// reading directions favoring greater width.
|
|
481
|
-
|
|
482
|
+
I === "y";
|
|
482
483
|
}
|
|
483
484
|
return !0;
|
|
484
|
-
}).map((
|
|
485
|
-
|
|
485
|
+
}).map((K) => [K.placement, K.overflows.filter((I) => I > 0).reduce((I, ve) => I + ve, 0)]).sort((K, I) => K[1] - I[1])[0]) == null ? void 0 : L[0];
|
|
486
|
+
N && (M = N);
|
|
486
487
|
break;
|
|
487
488
|
}
|
|
488
489
|
case "initialPlacement":
|
|
489
|
-
|
|
490
|
+
M = r;
|
|
490
491
|
break;
|
|
491
492
|
}
|
|
492
|
-
if (s !==
|
|
493
|
+
if (s !== M)
|
|
493
494
|
return {
|
|
494
495
|
reset: {
|
|
495
|
-
placement:
|
|
496
|
+
placement: M
|
|
496
497
|
}
|
|
497
498
|
};
|
|
498
499
|
}
|
|
499
500
|
return {};
|
|
500
501
|
}
|
|
501
502
|
};
|
|
502
|
-
},
|
|
503
|
-
async function
|
|
503
|
+
}, gn = /* @__PURE__ */ new Set(["left", "top"]);
|
|
504
|
+
async function yn(e, n) {
|
|
504
505
|
const {
|
|
505
506
|
placement: t,
|
|
506
507
|
platform: o,
|
|
507
508
|
elements: s
|
|
508
|
-
} = e, l = await (o.isRTL == null ? void 0 : o.isRTL(s.floating)), a =
|
|
509
|
+
} = e, l = await (o.isRTL == null ? void 0 : o.isRTL(s.floating)), a = xe(t), r = We(t), i = me(t) === "y", u = gn.has(a) ? -1 : 1, d = l && i ? -1 : 1, v = Ne(n, e);
|
|
509
510
|
let {
|
|
510
511
|
mainAxis: m,
|
|
511
512
|
crossAxis: f,
|
|
512
|
-
alignmentAxis:
|
|
513
|
+
alignmentAxis: h
|
|
513
514
|
} = typeof v == "number" ? {
|
|
514
515
|
mainAxis: v,
|
|
515
516
|
crossAxis: 0,
|
|
@@ -519,15 +520,15 @@ async function wn(e, n) {
|
|
|
519
520
|
crossAxis: v.crossAxis || 0,
|
|
520
521
|
alignmentAxis: v.alignmentAxis
|
|
521
522
|
};
|
|
522
|
-
return r && typeof
|
|
523
|
-
x: f *
|
|
524
|
-
y: m *
|
|
523
|
+
return r && typeof h == "number" && (f = r === "end" ? h * -1 : h), i ? {
|
|
524
|
+
x: f * d,
|
|
525
|
+
y: m * u
|
|
525
526
|
} : {
|
|
526
|
-
x: m *
|
|
527
|
-
y: f *
|
|
527
|
+
x: m * u,
|
|
528
|
+
y: f * d
|
|
528
529
|
};
|
|
529
530
|
}
|
|
530
|
-
const
|
|
531
|
+
const wn = function(e) {
|
|
531
532
|
return e === void 0 && (e = 0), {
|
|
532
533
|
name: "offset",
|
|
533
534
|
options: e,
|
|
@@ -538,7 +539,7 @@ const bn = function(e) {
|
|
|
538
539
|
y: l,
|
|
539
540
|
placement: a,
|
|
540
541
|
middlewareData: r
|
|
541
|
-
} = n, i = await
|
|
542
|
+
} = n, i = await yn(n, e);
|
|
542
543
|
return a === ((t = r.offset) == null ? void 0 : t.placement) && (o = r.arrow) != null && o.alignmentOffset ? {} : {
|
|
543
544
|
x: s + i.x,
|
|
544
545
|
y: l + i.y,
|
|
@@ -549,7 +550,7 @@ const bn = function(e) {
|
|
|
549
550
|
};
|
|
550
551
|
}
|
|
551
552
|
};
|
|
552
|
-
},
|
|
553
|
+
}, bn = function(e) {
|
|
553
554
|
return e === void 0 && (e = {}), {
|
|
554
555
|
name: "shift",
|
|
555
556
|
options: e,
|
|
@@ -565,38 +566,38 @@ const bn = function(e) {
|
|
|
565
566
|
fn: (g) => {
|
|
566
567
|
let {
|
|
567
568
|
x: C,
|
|
568
|
-
y:
|
|
569
|
+
y: R
|
|
569
570
|
} = g;
|
|
570
571
|
return {
|
|
571
572
|
x: C,
|
|
572
|
-
y:
|
|
573
|
+
y: R
|
|
573
574
|
};
|
|
574
575
|
}
|
|
575
576
|
},
|
|
576
577
|
...i
|
|
577
|
-
} =
|
|
578
|
+
} = Ne(e, n), u = {
|
|
578
579
|
x: t,
|
|
579
580
|
y: o
|
|
580
|
-
},
|
|
581
|
-
let f =
|
|
581
|
+
}, d = await Ct(n, i), v = me(xe(s)), m = bt(v);
|
|
582
|
+
let f = u[m], h = u[v];
|
|
582
583
|
if (l) {
|
|
583
|
-
const g = m === "y" ? "top" : "left", C = m === "y" ? "bottom" : "right",
|
|
584
|
-
f = at(
|
|
584
|
+
const g = m === "y" ? "top" : "left", C = m === "y" ? "bottom" : "right", R = f + d[g], E = f - d[C];
|
|
585
|
+
f = at(R, f, E);
|
|
585
586
|
}
|
|
586
587
|
if (a) {
|
|
587
|
-
const g = v === "y" ? "top" : "left", C = v === "y" ? "bottom" : "right",
|
|
588
|
-
|
|
588
|
+
const g = v === "y" ? "top" : "left", C = v === "y" ? "bottom" : "right", R = h + d[g], E = h - d[C];
|
|
589
|
+
h = at(R, h, E);
|
|
589
590
|
}
|
|
590
|
-
const
|
|
591
|
+
const c = r.fn({
|
|
591
592
|
...n,
|
|
592
593
|
[m]: f,
|
|
593
|
-
[v]:
|
|
594
|
+
[v]: h
|
|
594
595
|
});
|
|
595
596
|
return {
|
|
596
|
-
...
|
|
597
|
+
...c,
|
|
597
598
|
data: {
|
|
598
|
-
x:
|
|
599
|
-
y:
|
|
599
|
+
x: c.x - t,
|
|
600
|
+
y: c.y - o,
|
|
600
601
|
enabled: {
|
|
601
602
|
[m]: l,
|
|
602
603
|
[v]: a
|
|
@@ -610,7 +611,7 @@ function Ke() {
|
|
|
610
611
|
return typeof window < "u";
|
|
611
612
|
}
|
|
612
613
|
function Ee(e) {
|
|
613
|
-
return
|
|
614
|
+
return St(e) ? (e.nodeName || "").toLowerCase() : "#document";
|
|
614
615
|
}
|
|
615
616
|
function J(e) {
|
|
616
617
|
var n;
|
|
@@ -618,9 +619,9 @@ function J(e) {
|
|
|
618
619
|
}
|
|
619
620
|
function ue(e) {
|
|
620
621
|
var n;
|
|
621
|
-
return (n = (
|
|
622
|
+
return (n = (St(e) ? e.ownerDocument : e.document) || window.document) == null ? void 0 : n.documentElement;
|
|
622
623
|
}
|
|
623
|
-
function
|
|
624
|
+
function St(e) {
|
|
624
625
|
return Ke() ? e instanceof Node || e instanceof J(e).Node : !1;
|
|
625
626
|
}
|
|
626
627
|
function se(e) {
|
|
@@ -632,7 +633,7 @@ function ce(e) {
|
|
|
632
633
|
function ut(e) {
|
|
633
634
|
return !Ke() || typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof J(e).ShadowRoot;
|
|
634
635
|
}
|
|
635
|
-
const
|
|
636
|
+
const xn = /* @__PURE__ */ new Set(["inline", "contents"]);
|
|
636
637
|
function Ve(e) {
|
|
637
638
|
const {
|
|
638
639
|
overflow: n,
|
|
@@ -640,15 +641,15 @@ function Ve(e) {
|
|
|
640
641
|
overflowY: o,
|
|
641
642
|
display: s
|
|
642
643
|
} = le(e);
|
|
643
|
-
return /auto|scroll|overlay|hidden|clip/.test(n + o + t) && !
|
|
644
|
+
return /auto|scroll|overlay|hidden|clip/.test(n + o + t) && !xn.has(s);
|
|
644
645
|
}
|
|
645
|
-
const
|
|
646
|
-
function
|
|
647
|
-
return
|
|
646
|
+
const kn = /* @__PURE__ */ new Set(["table", "td", "th"]);
|
|
647
|
+
function Cn(e) {
|
|
648
|
+
return kn.has(Ee(e));
|
|
648
649
|
}
|
|
649
|
-
const
|
|
650
|
+
const Sn = [":popover-open", ":modal"];
|
|
650
651
|
function ze(e) {
|
|
651
|
-
return
|
|
652
|
+
return Sn.some((n) => {
|
|
652
653
|
try {
|
|
653
654
|
return e.matches(n);
|
|
654
655
|
} catch {
|
|
@@ -656,12 +657,12 @@ function ze(e) {
|
|
|
656
657
|
}
|
|
657
658
|
});
|
|
658
659
|
}
|
|
659
|
-
const
|
|
660
|
+
const Rn = ["transform", "translate", "scale", "rotate", "perspective"], En = ["transform", "translate", "scale", "rotate", "perspective", "filter"], $n = ["paint", "layout", "strict", "content"];
|
|
660
661
|
function et(e) {
|
|
661
662
|
const n = tt(), t = se(e) ? le(e) : e;
|
|
662
|
-
return
|
|
663
|
+
return Rn.some((o) => t[o] ? t[o] !== "none" : !1) || (t.containerType ? t.containerType !== "normal" : !1) || !n && (t.backdropFilter ? t.backdropFilter !== "none" : !1) || !n && (t.filter ? t.filter !== "none" : !1) || En.some((o) => (t.willChange || "").includes(o)) || $n.some((o) => (t.contain || "").includes(o));
|
|
663
664
|
}
|
|
664
|
-
function
|
|
665
|
+
function An(e) {
|
|
665
666
|
let n = ge(e);
|
|
666
667
|
for (; ce(n) && !Se(n); ) {
|
|
667
668
|
if (et(n))
|
|
@@ -675,9 +676,9 @@ function Fn(e) {
|
|
|
675
676
|
function tt() {
|
|
676
677
|
return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
|
|
677
678
|
}
|
|
678
|
-
const
|
|
679
|
+
const Fn = /* @__PURE__ */ new Set(["html", "body", "#document"]);
|
|
679
680
|
function Se(e) {
|
|
680
|
-
return
|
|
681
|
+
return Fn.has(Ee(e));
|
|
681
682
|
}
|
|
682
683
|
function le(e) {
|
|
683
684
|
return J(e).getComputedStyle(e);
|
|
@@ -703,14 +704,14 @@ function ge(e) {
|
|
|
703
704
|
);
|
|
704
705
|
return ut(n) ? n.host : n;
|
|
705
706
|
}
|
|
706
|
-
function
|
|
707
|
+
function Rt(e) {
|
|
707
708
|
const n = ge(e);
|
|
708
|
-
return Se(n) ? e.ownerDocument ? e.ownerDocument.body : e.body : ce(n) && Ve(n) ? n :
|
|
709
|
+
return Se(n) ? e.ownerDocument ? e.ownerDocument.body : e.body : ce(n) && Ve(n) ? n : Rt(n);
|
|
709
710
|
}
|
|
710
711
|
function Oe(e, n, t) {
|
|
711
712
|
var o;
|
|
712
713
|
n === void 0 && (n = []), t === void 0 && (t = !0);
|
|
713
|
-
const s =
|
|
714
|
+
const s = Rt(e), l = s === ((o = e.ownerDocument) == null ? void 0 : o.body), a = J(s);
|
|
714
715
|
if (l) {
|
|
715
716
|
const r = _e(a);
|
|
716
717
|
return n.concat(a, a.visualViewport || [], Ve(s) ? s : [], r && t ? Oe(r) : []);
|
|
@@ -720,7 +721,7 @@ function Oe(e, n, t) {
|
|
|
720
721
|
function _e(e) {
|
|
721
722
|
return e.parent && Object.getPrototypeOf(e.parent) ? e.frameElement : null;
|
|
722
723
|
}
|
|
723
|
-
function
|
|
724
|
+
function Et(e) {
|
|
724
725
|
const n = le(e);
|
|
725
726
|
let t = parseFloat(n.width) || 0, o = parseFloat(n.height) || 0;
|
|
726
727
|
const s = ce(e), l = s ? e.offsetWidth : t, a = s ? e.offsetHeight : o, r = Ie(t) !== l || Ie(o) !== a;
|
|
@@ -733,7 +734,7 @@ function $t(e) {
|
|
|
733
734
|
function nt(e) {
|
|
734
735
|
return se(e) ? e : e.contextElement;
|
|
735
736
|
}
|
|
736
|
-
function
|
|
737
|
+
function Ce(e) {
|
|
737
738
|
const n = nt(e);
|
|
738
739
|
if (!ce(n))
|
|
739
740
|
return ie(1);
|
|
@@ -741,58 +742,58 @@ function ke(e) {
|
|
|
741
742
|
width: o,
|
|
742
743
|
height: s,
|
|
743
744
|
$: l
|
|
744
|
-
} =
|
|
745
|
+
} = Et(n);
|
|
745
746
|
let a = (l ? Ie(t.width) : t.width) / o, r = (l ? Ie(t.height) : t.height) / s;
|
|
746
747
|
return (!a || !Number.isFinite(a)) && (a = 1), (!r || !Number.isFinite(r)) && (r = 1), {
|
|
747
748
|
x: a,
|
|
748
749
|
y: r
|
|
749
750
|
};
|
|
750
751
|
}
|
|
751
|
-
const
|
|
752
|
-
function
|
|
752
|
+
const Tn = /* @__PURE__ */ ie(0);
|
|
753
|
+
function $t(e) {
|
|
753
754
|
const n = J(e);
|
|
754
|
-
return !tt() || !n.visualViewport ?
|
|
755
|
+
return !tt() || !n.visualViewport ? Tn : {
|
|
755
756
|
x: n.visualViewport.offsetLeft,
|
|
756
757
|
y: n.visualViewport.offsetTop
|
|
757
758
|
};
|
|
758
759
|
}
|
|
759
|
-
function
|
|
760
|
+
function On(e, n, t) {
|
|
760
761
|
return n === void 0 && (n = !1), !t || n && t !== J(e) ? !1 : n;
|
|
761
762
|
}
|
|
762
|
-
function
|
|
763
|
+
function ke(e, n, t, o) {
|
|
763
764
|
n === void 0 && (n = !1), t === void 0 && (t = !1);
|
|
764
765
|
const s = e.getBoundingClientRect(), l = nt(e);
|
|
765
766
|
let a = ie(1);
|
|
766
|
-
n && (o ? se(o) && (a =
|
|
767
|
-
const r =
|
|
768
|
-
let i = (s.left + r.x) / a.x,
|
|
767
|
+
n && (o ? se(o) && (a = Ce(o)) : a = Ce(e));
|
|
768
|
+
const r = On(l, t, o) ? $t(l) : ie(0);
|
|
769
|
+
let i = (s.left + r.x) / a.x, u = (s.top + r.y) / a.y, d = s.width / a.x, v = s.height / a.y;
|
|
769
770
|
if (l) {
|
|
770
771
|
const m = J(l), f = o && se(o) ? J(o) : o;
|
|
771
|
-
let
|
|
772
|
-
for (;
|
|
773
|
-
const g =
|
|
774
|
-
i *= g.x,
|
|
772
|
+
let h = m, c = _e(h);
|
|
773
|
+
for (; c && o && f !== h; ) {
|
|
774
|
+
const g = Ce(c), C = c.getBoundingClientRect(), R = le(c), E = C.left + (c.clientLeft + parseFloat(R.paddingLeft)) * g.x, V = C.top + (c.clientTop + parseFloat(R.paddingTop)) * g.y;
|
|
775
|
+
i *= g.x, u *= g.y, d *= g.x, v *= g.y, i += E, u += V, h = J(c), c = _e(h);
|
|
775
776
|
}
|
|
776
777
|
}
|
|
777
778
|
return Me({
|
|
778
|
-
width:
|
|
779
|
+
width: d,
|
|
779
780
|
height: v,
|
|
780
781
|
x: i,
|
|
781
|
-
y:
|
|
782
|
+
y: u
|
|
782
783
|
});
|
|
783
784
|
}
|
|
784
785
|
function Ue(e, n) {
|
|
785
786
|
const t = je(e).scrollLeft;
|
|
786
|
-
return n ? n.left + t :
|
|
787
|
+
return n ? n.left + t : ke(ue(e)).left + t;
|
|
787
788
|
}
|
|
788
|
-
function
|
|
789
|
+
function At(e, n) {
|
|
789
790
|
const t = e.getBoundingClientRect(), o = t.left + n.scrollLeft - Ue(e, t), s = t.top + n.scrollTop;
|
|
790
791
|
return {
|
|
791
792
|
x: o,
|
|
792
793
|
y: s
|
|
793
794
|
};
|
|
794
795
|
}
|
|
795
|
-
function
|
|
796
|
+
function Vn(e) {
|
|
796
797
|
let {
|
|
797
798
|
elements: n,
|
|
798
799
|
rect: t,
|
|
@@ -805,28 +806,28 @@ function Ln(e) {
|
|
|
805
806
|
let i = {
|
|
806
807
|
scrollLeft: 0,
|
|
807
808
|
scrollTop: 0
|
|
808
|
-
},
|
|
809
|
-
const
|
|
809
|
+
}, u = ie(1);
|
|
810
|
+
const d = ie(0), v = ce(o);
|
|
810
811
|
if ((v || !v && !l) && ((Ee(o) !== "body" || Ve(a)) && (i = je(o)), ce(o))) {
|
|
811
|
-
const f =
|
|
812
|
-
|
|
812
|
+
const f = ke(o);
|
|
813
|
+
u = Ce(o), d.x = f.x + o.clientLeft, d.y = f.y + o.clientTop;
|
|
813
814
|
}
|
|
814
|
-
const m = a && !v && !l ?
|
|
815
|
+
const m = a && !v && !l ? At(a, i) : ie(0);
|
|
815
816
|
return {
|
|
816
|
-
width: t.width *
|
|
817
|
-
height: t.height *
|
|
818
|
-
x: t.x *
|
|
819
|
-
y: t.y *
|
|
817
|
+
width: t.width * u.x,
|
|
818
|
+
height: t.height * u.y,
|
|
819
|
+
x: t.x * u.x - i.scrollLeft * u.x + d.x + m.x,
|
|
820
|
+
y: t.y * u.y - i.scrollTop * u.y + d.y + m.y
|
|
820
821
|
};
|
|
821
822
|
}
|
|
822
|
-
function
|
|
823
|
+
function Ln(e) {
|
|
823
824
|
return Array.from(e.getClientRects());
|
|
824
825
|
}
|
|
825
826
|
function Dn(e) {
|
|
826
|
-
const n = ue(e), t = je(e), o = e.ownerDocument.body, s =
|
|
827
|
+
const n = ue(e), t = je(e), o = e.ownerDocument.body, s = be(n.scrollWidth, n.clientWidth, o.scrollWidth, o.clientWidth), l = be(n.scrollHeight, n.clientHeight, o.scrollHeight, o.clientHeight);
|
|
827
828
|
let a = -t.scrollLeft + Ue(e);
|
|
828
829
|
const r = -t.scrollTop;
|
|
829
|
-
return le(o).direction === "rtl" && (a +=
|
|
830
|
+
return le(o).direction === "rtl" && (a += be(n.clientWidth, o.clientWidth) - s), {
|
|
830
831
|
width: s,
|
|
831
832
|
height: l,
|
|
832
833
|
x: a,
|
|
@@ -834,19 +835,19 @@ function Dn(e) {
|
|
|
834
835
|
};
|
|
835
836
|
}
|
|
836
837
|
const dt = 25;
|
|
837
|
-
function
|
|
838
|
+
function Pn(e, n) {
|
|
838
839
|
const t = J(e), o = ue(e), s = t.visualViewport;
|
|
839
840
|
let l = o.clientWidth, a = o.clientHeight, r = 0, i = 0;
|
|
840
841
|
if (s) {
|
|
841
842
|
l = s.width, a = s.height;
|
|
842
|
-
const
|
|
843
|
-
(!
|
|
843
|
+
const d = tt();
|
|
844
|
+
(!d || d && n === "fixed") && (r = s.offsetLeft, i = s.offsetTop);
|
|
844
845
|
}
|
|
845
|
-
const
|
|
846
|
-
if (
|
|
847
|
-
const
|
|
848
|
-
|
|
849
|
-
} else
|
|
846
|
+
const u = Ue(o);
|
|
847
|
+
if (u <= 0) {
|
|
848
|
+
const d = o.ownerDocument, v = d.body, m = getComputedStyle(v), f = d.compatMode === "CSS1Compat" && parseFloat(m.marginLeft) + parseFloat(m.marginRight) || 0, h = Math.abs(o.clientWidth - v.clientWidth - f);
|
|
849
|
+
h <= dt && (l -= h);
|
|
850
|
+
} else u <= dt && (l += u);
|
|
850
851
|
return {
|
|
851
852
|
width: l,
|
|
852
853
|
height: a,
|
|
@@ -854,26 +855,26 @@ function In(e, n) {
|
|
|
854
855
|
y: i
|
|
855
856
|
};
|
|
856
857
|
}
|
|
857
|
-
const
|
|
858
|
-
function
|
|
859
|
-
const t =
|
|
858
|
+
const In = /* @__PURE__ */ new Set(["absolute", "fixed"]);
|
|
859
|
+
function qn(e, n) {
|
|
860
|
+
const t = ke(e, !0, n === "fixed"), o = t.top + e.clientTop, s = t.left + e.clientLeft, l = ce(e) ? Ce(e) : ie(1), a = e.clientWidth * l.x, r = e.clientHeight * l.y, i = s * l.x, u = o * l.y;
|
|
860
861
|
return {
|
|
861
862
|
width: a,
|
|
862
863
|
height: r,
|
|
863
864
|
x: i,
|
|
864
|
-
y:
|
|
865
|
+
y: u
|
|
865
866
|
};
|
|
866
867
|
}
|
|
867
868
|
function ft(e, n, t) {
|
|
868
869
|
let o;
|
|
869
870
|
if (n === "viewport")
|
|
870
|
-
o =
|
|
871
|
+
o = Pn(e, t);
|
|
871
872
|
else if (n === "document")
|
|
872
873
|
o = Dn(ue(e));
|
|
873
874
|
else if (se(n))
|
|
874
|
-
o =
|
|
875
|
+
o = qn(n, t);
|
|
875
876
|
else {
|
|
876
|
-
const s =
|
|
877
|
+
const s = $t(e);
|
|
877
878
|
o = {
|
|
878
879
|
x: n.x - s.x,
|
|
879
880
|
y: n.y - s.y,
|
|
@@ -883,11 +884,11 @@ function ft(e, n, t) {
|
|
|
883
884
|
}
|
|
884
885
|
return Me(o);
|
|
885
886
|
}
|
|
886
|
-
function
|
|
887
|
+
function Ft(e, n) {
|
|
887
888
|
const t = ge(e);
|
|
888
|
-
return t === n || !se(t) || Se(t) ? !1 : le(t).position === "fixed" ||
|
|
889
|
+
return t === n || !se(t) || Se(t) ? !1 : le(t).position === "fixed" || Ft(t, n);
|
|
889
890
|
}
|
|
890
|
-
function
|
|
891
|
+
function Mn(e, n) {
|
|
891
892
|
const t = n.get(e);
|
|
892
893
|
if (t)
|
|
893
894
|
return t;
|
|
@@ -896,20 +897,20 @@ function Bn(e, n) {
|
|
|
896
897
|
let a = l ? ge(e) : e;
|
|
897
898
|
for (; se(a) && !Se(a); ) {
|
|
898
899
|
const r = le(a), i = et(a);
|
|
899
|
-
!i && r.position === "fixed" && (s = null), (l ? !i && !s : !i && r.position === "static" && !!s &&
|
|
900
|
+
!i && r.position === "fixed" && (s = null), (l ? !i && !s : !i && r.position === "static" && !!s && In.has(s.position) || Ve(a) && !i && Ft(e, a)) ? o = o.filter((d) => d !== a) : s = r, a = ge(a);
|
|
900
901
|
}
|
|
901
902
|
return n.set(e, o), o;
|
|
902
903
|
}
|
|
903
|
-
function
|
|
904
|
+
function Bn(e) {
|
|
904
905
|
let {
|
|
905
906
|
element: n,
|
|
906
907
|
boundary: t,
|
|
907
908
|
rootBoundary: o,
|
|
908
909
|
strategy: s
|
|
909
910
|
} = e;
|
|
910
|
-
const a = [...t === "clippingAncestors" ? ze(n) ? [] :
|
|
911
|
-
const v = ft(n,
|
|
912
|
-
return
|
|
911
|
+
const a = [...t === "clippingAncestors" ? ze(n) ? [] : Mn(n, this._c) : [].concat(t), o], r = a[0], i = a.reduce((u, d) => {
|
|
912
|
+
const v = ft(n, d, s);
|
|
913
|
+
return u.top = be(v.top, u.top), u.right = Pe(v.right, u.right), u.bottom = Pe(v.bottom, u.bottom), u.left = be(v.left, u.left), u;
|
|
913
914
|
}, ft(n, r, s));
|
|
914
915
|
return {
|
|
915
916
|
width: i.right - i.left,
|
|
@@ -918,33 +919,33 @@ function Hn(e) {
|
|
|
918
919
|
y: i.top
|
|
919
920
|
};
|
|
920
921
|
}
|
|
921
|
-
function
|
|
922
|
+
function Hn(e) {
|
|
922
923
|
const {
|
|
923
924
|
width: n,
|
|
924
925
|
height: t
|
|
925
|
-
} =
|
|
926
|
+
} = Et(e);
|
|
926
927
|
return {
|
|
927
928
|
width: n,
|
|
928
929
|
height: t
|
|
929
930
|
};
|
|
930
931
|
}
|
|
931
932
|
function Nn(e, n, t) {
|
|
932
|
-
const o = ce(n), s = ue(n), l = t === "fixed", a =
|
|
933
|
+
const o = ce(n), s = ue(n), l = t === "fixed", a = ke(e, !0, l, n);
|
|
933
934
|
let r = {
|
|
934
935
|
scrollLeft: 0,
|
|
935
936
|
scrollTop: 0
|
|
936
937
|
};
|
|
937
938
|
const i = ie(0);
|
|
938
|
-
function
|
|
939
|
+
function u() {
|
|
939
940
|
i.x = Ue(s);
|
|
940
941
|
}
|
|
941
942
|
if (o || !o && !l)
|
|
942
943
|
if ((Ee(n) !== "body" || Ve(s)) && (r = je(n)), o) {
|
|
943
|
-
const f =
|
|
944
|
+
const f = ke(n, !0, l, n);
|
|
944
945
|
i.x = f.x + n.clientLeft, i.y = f.y + n.clientTop;
|
|
945
|
-
} else s &&
|
|
946
|
-
l && !o && s &&
|
|
947
|
-
const
|
|
946
|
+
} else s && u();
|
|
947
|
+
l && !o && s && u();
|
|
948
|
+
const d = s && !o && !l ? At(s, r) : ie(0), v = a.left + r.scrollLeft - i.x - d.x, m = a.top + r.scrollTop - i.y - d.y;
|
|
948
949
|
return {
|
|
949
950
|
x: v,
|
|
950
951
|
y: m,
|
|
@@ -963,7 +964,7 @@ function vt(e, n) {
|
|
|
963
964
|
let t = e.offsetParent;
|
|
964
965
|
return ue(e) === t && (t = t.ownerDocument.body), t;
|
|
965
966
|
}
|
|
966
|
-
function
|
|
967
|
+
function Tt(e, n) {
|
|
967
968
|
const t = J(e);
|
|
968
969
|
if (ze(e))
|
|
969
970
|
return t;
|
|
@@ -977,12 +978,12 @@ function Ot(e, n) {
|
|
|
977
978
|
return t;
|
|
978
979
|
}
|
|
979
980
|
let o = vt(e, n);
|
|
980
|
-
for (; o &&
|
|
981
|
+
for (; o && Cn(o) && Ye(o); )
|
|
981
982
|
o = vt(o, n);
|
|
982
|
-
return o && Se(o) && Ye(o) && !et(o) ? t : o ||
|
|
983
|
+
return o && Se(o) && Ye(o) && !et(o) ? t : o || An(e) || t;
|
|
983
984
|
}
|
|
984
|
-
const
|
|
985
|
-
const n = this.getOffsetParent ||
|
|
985
|
+
const Wn = async function(e) {
|
|
986
|
+
const n = this.getOffsetParent || Tt, t = this.getDimensions, o = await t(e.floating);
|
|
986
987
|
return {
|
|
987
988
|
reference: Nn(e.reference, await n(e.floating), e.strategy),
|
|
988
989
|
floating: {
|
|
@@ -993,25 +994,25 @@ const Kn = async function(e) {
|
|
|
993
994
|
}
|
|
994
995
|
};
|
|
995
996
|
};
|
|
996
|
-
function
|
|
997
|
+
function Kn(e) {
|
|
997
998
|
return le(e).direction === "rtl";
|
|
998
999
|
}
|
|
999
|
-
const
|
|
1000
|
-
convertOffsetParentRelativeRectToViewportRelativeRect:
|
|
1000
|
+
const zn = {
|
|
1001
|
+
convertOffsetParentRelativeRectToViewportRelativeRect: Vn,
|
|
1001
1002
|
getDocumentElement: ue,
|
|
1002
|
-
getClippingRect:
|
|
1003
|
-
getOffsetParent:
|
|
1004
|
-
getElementRects:
|
|
1005
|
-
getClientRects:
|
|
1006
|
-
getDimensions:
|
|
1007
|
-
getScale:
|
|
1003
|
+
getClippingRect: Bn,
|
|
1004
|
+
getOffsetParent: Tt,
|
|
1005
|
+
getElementRects: Wn,
|
|
1006
|
+
getClientRects: Ln,
|
|
1007
|
+
getDimensions: Hn,
|
|
1008
|
+
getScale: Ce,
|
|
1008
1009
|
isElement: se,
|
|
1009
|
-
isRTL:
|
|
1010
|
+
isRTL: Kn
|
|
1010
1011
|
};
|
|
1011
|
-
function
|
|
1012
|
+
function Ot(e, n) {
|
|
1012
1013
|
return e.x === n.x && e.y === n.y && e.width === n.width && e.height === n.height;
|
|
1013
1014
|
}
|
|
1014
|
-
function
|
|
1015
|
+
function jn(e, n) {
|
|
1015
1016
|
let t = null, o;
|
|
1016
1017
|
const s = ue(e);
|
|
1017
1018
|
function l() {
|
|
@@ -1020,44 +1021,44 @@ function Un(e, n) {
|
|
|
1020
1021
|
}
|
|
1021
1022
|
function a(r, i) {
|
|
1022
1023
|
r === void 0 && (r = !1), i === void 0 && (i = 1), l();
|
|
1023
|
-
const
|
|
1024
|
-
left:
|
|
1024
|
+
const u = e.getBoundingClientRect(), {
|
|
1025
|
+
left: d,
|
|
1025
1026
|
top: v,
|
|
1026
1027
|
width: m,
|
|
1027
1028
|
height: f
|
|
1028
|
-
} =
|
|
1029
|
+
} = u;
|
|
1029
1030
|
if (r || n(), !m || !f)
|
|
1030
1031
|
return;
|
|
1031
|
-
const
|
|
1032
|
-
rootMargin: -
|
|
1033
|
-
threshold:
|
|
1032
|
+
const h = Le(v), c = Le(s.clientWidth - (d + m)), g = Le(s.clientHeight - (v + f)), C = Le(d), E = {
|
|
1033
|
+
rootMargin: -h + "px " + -c + "px " + -g + "px " + -C + "px",
|
|
1034
|
+
threshold: be(0, Pe(1, i)) || 1
|
|
1034
1035
|
};
|
|
1035
1036
|
let V = !0;
|
|
1036
|
-
function
|
|
1037
|
-
const
|
|
1038
|
-
if (
|
|
1037
|
+
function T(W) {
|
|
1038
|
+
const S = W[0].intersectionRatio;
|
|
1039
|
+
if (S !== i) {
|
|
1039
1040
|
if (!V)
|
|
1040
1041
|
return a();
|
|
1041
|
-
|
|
1042
|
+
S ? a(!1, S) : o = setTimeout(() => {
|
|
1042
1043
|
a(!1, 1e-7);
|
|
1043
1044
|
}, 1e3);
|
|
1044
1045
|
}
|
|
1045
|
-
|
|
1046
|
+
S === 1 && !Ot(u, e.getBoundingClientRect()) && a(), V = !1;
|
|
1046
1047
|
}
|
|
1047
1048
|
try {
|
|
1048
|
-
t = new IntersectionObserver(
|
|
1049
|
+
t = new IntersectionObserver(T, {
|
|
1049
1050
|
...E,
|
|
1050
1051
|
// Handle <iframe>s
|
|
1051
1052
|
root: s.ownerDocument
|
|
1052
1053
|
});
|
|
1053
1054
|
} catch {
|
|
1054
|
-
t = new IntersectionObserver(
|
|
1055
|
+
t = new IntersectionObserver(T, E);
|
|
1055
1056
|
}
|
|
1056
1057
|
t.observe(e);
|
|
1057
1058
|
}
|
|
1058
1059
|
return a(!0), l;
|
|
1059
1060
|
}
|
|
1060
|
-
function
|
|
1061
|
+
function Un(e, n, t, o) {
|
|
1061
1062
|
o === void 0 && (o = {});
|
|
1062
1063
|
const {
|
|
1063
1064
|
ancestorScroll: s = !0,
|
|
@@ -1065,51 +1066,50 @@ function Zn(e, n, t, o) {
|
|
|
1065
1066
|
elementResize: a = typeof ResizeObserver == "function",
|
|
1066
1067
|
layoutShift: r = typeof IntersectionObserver == "function",
|
|
1067
1068
|
animationFrame: i = !1
|
|
1068
|
-
} = o,
|
|
1069
|
-
|
|
1069
|
+
} = o, u = nt(e), d = s || l ? [...u ? Oe(u) : [], ...Oe(n)] : [];
|
|
1070
|
+
d.forEach((C) => {
|
|
1070
1071
|
s && C.addEventListener("scroll", t, {
|
|
1071
1072
|
passive: !0
|
|
1072
1073
|
}), l && C.addEventListener("resize", t);
|
|
1073
1074
|
});
|
|
1074
|
-
const v =
|
|
1075
|
+
const v = u && r ? jn(u, t) : null;
|
|
1075
1076
|
let m = -1, f = null;
|
|
1076
1077
|
a && (f = new ResizeObserver((C) => {
|
|
1077
|
-
let [
|
|
1078
|
-
|
|
1078
|
+
let [R] = C;
|
|
1079
|
+
R && R.target === u && f && (f.unobserve(n), cancelAnimationFrame(m), m = requestAnimationFrame(() => {
|
|
1079
1080
|
var E;
|
|
1080
1081
|
(E = f) == null || E.observe(n);
|
|
1081
1082
|
})), t();
|
|
1082
|
-
}),
|
|
1083
|
-
let
|
|
1083
|
+
}), u && !i && f.observe(u), f.observe(n));
|
|
1084
|
+
let h, c = i ? ke(e) : null;
|
|
1084
1085
|
i && g();
|
|
1085
1086
|
function g() {
|
|
1086
|
-
const C =
|
|
1087
|
-
|
|
1087
|
+
const C = ke(e);
|
|
1088
|
+
c && !Ot(c, C) && t(), c = C, h = requestAnimationFrame(g);
|
|
1088
1089
|
}
|
|
1089
1090
|
return t(), () => {
|
|
1090
1091
|
var C;
|
|
1091
|
-
|
|
1092
|
-
s &&
|
|
1093
|
-
}), v?.(), (C = f) == null || C.disconnect(), f = null, i && cancelAnimationFrame(
|
|
1092
|
+
d.forEach((R) => {
|
|
1093
|
+
s && R.removeEventListener("scroll", t), l && R.removeEventListener("resize", t);
|
|
1094
|
+
}), v?.(), (C = f) == null || C.disconnect(), f = null, i && cancelAnimationFrame(h);
|
|
1094
1095
|
};
|
|
1095
1096
|
}
|
|
1096
|
-
const
|
|
1097
|
+
const Zn = wn, Xn = bn, Qn = pn, Yn = (e, n, t) => {
|
|
1097
1098
|
const o = /* @__PURE__ */ new Map(), s = {
|
|
1098
|
-
platform:
|
|
1099
|
+
platform: zn,
|
|
1099
1100
|
...t
|
|
1100
1101
|
}, l = {
|
|
1101
1102
|
...s.platform,
|
|
1102
1103
|
_c: o
|
|
1103
1104
|
};
|
|
1104
|
-
return
|
|
1105
|
+
return mn(e, n, {
|
|
1105
1106
|
...s,
|
|
1106
1107
|
platform: l
|
|
1107
1108
|
});
|
|
1108
1109
|
}, Be = {
|
|
1109
1110
|
text: (e, n, t) => {
|
|
1110
1111
|
const o = String(e[n] ?? "").toLowerCase(), s = (t.value ?? "").toLowerCase().trim();
|
|
1111
|
-
if (!s && !["empty", "notEmpty"].includes(t.operator ?? ""))
|
|
1112
|
-
return !0;
|
|
1112
|
+
if (!s && !["empty", "notEmpty"].includes(t.operator ?? "")) return !0;
|
|
1113
1113
|
switch (t.operator) {
|
|
1114
1114
|
case "contains":
|
|
1115
1115
|
return o.includes(s);
|
|
@@ -1134,8 +1134,7 @@ const Xn = bn, Qn = xn, Yn = gn, Gn = (e, n, t) => {
|
|
|
1134
1134
|
"multi-select": (e, n, t) => t.value?.length ? t.value.includes(String(e[n])) : !0,
|
|
1135
1135
|
"number-range": (e, n, t) => {
|
|
1136
1136
|
const o = Number(e[n]);
|
|
1137
|
-
if (isNaN(o))
|
|
1138
|
-
return !1;
|
|
1137
|
+
if (isNaN(o)) return !1;
|
|
1139
1138
|
switch (t.operator) {
|
|
1140
1139
|
case "between":
|
|
1141
1140
|
return !(t.min != null && o < t.min || t.max != null && o > t.max);
|
|
@@ -1157,8 +1156,7 @@ const Xn = bn, Qn = xn, Yn = gn, Gn = (e, n, t) => {
|
|
|
1157
1156
|
},
|
|
1158
1157
|
"date-range": (e, n, t) => {
|
|
1159
1158
|
const o = new Date(String(e[n]));
|
|
1160
|
-
if (isNaN(o.getTime()))
|
|
1161
|
-
return !1;
|
|
1159
|
+
if (isNaN(o.getTime())) return !1;
|
|
1162
1160
|
const s = t.value ?? null, l = t.start ? new Date(t.start) : null, a = t.end ? new Date(t.end) : null;
|
|
1163
1161
|
switch (t.operator ?? "between") {
|
|
1164
1162
|
case "between":
|
|
@@ -1192,7 +1190,7 @@ const Xn = bn, Qn = xn, Yn = gn, Gn = (e, n, t) => {
|
|
|
1192
1190
|
return !0;
|
|
1193
1191
|
}
|
|
1194
1192
|
};
|
|
1195
|
-
function
|
|
1193
|
+
function we(e, n) {
|
|
1196
1194
|
const t = {
|
|
1197
1195
|
operator: n?.operator,
|
|
1198
1196
|
value: n?.value ?? null
|
|
@@ -1221,7 +1219,7 @@ function Ce(e, n) {
|
|
|
1221
1219
|
throw new Error(`Unsupported filter type: ${e}`);
|
|
1222
1220
|
}
|
|
1223
1221
|
}
|
|
1224
|
-
function
|
|
1222
|
+
function Gn(e) {
|
|
1225
1223
|
switch (e.type) {
|
|
1226
1224
|
case "text":
|
|
1227
1225
|
return e.operator ? ["empty", "notEmpty"].includes(e.operator || "") ? !0 : !!e.value?.trim() : !1;
|
|
@@ -1260,7 +1258,7 @@ const Jn = _({
|
|
|
1260
1258
|
}
|
|
1261
1259
|
});
|
|
1262
1260
|
function _n(e, n, t, o, s, l) {
|
|
1263
|
-
return y(),
|
|
1261
|
+
return y(), x("div", Ae({ class: e.flexClasses }, e.attrs), [
|
|
1264
1262
|
j(e.$slots, "default")
|
|
1265
1263
|
], 16);
|
|
1266
1264
|
}
|
|
@@ -1286,15 +1284,15 @@ const ye = /* @__PURE__ */ ae(Jn, [["render", _n]]), eo = { class: "vs-multisele
|
|
|
1286
1284
|
},
|
|
1287
1285
|
emits: ["update:modelValue"],
|
|
1288
1286
|
setup(e, { emit: n }) {
|
|
1289
|
-
const t = e, o = n, s =
|
|
1287
|
+
const t = e, o = n, s = q(""), l = q([...t.modelValue ?? []]), a = F(() => {
|
|
1290
1288
|
const f = new Set(t.columnData.filter(Boolean));
|
|
1291
1289
|
return Array.from(f);
|
|
1292
1290
|
}), r = F(() => {
|
|
1293
1291
|
const f = s.value.toLowerCase();
|
|
1294
|
-
return a.value.filter((
|
|
1295
|
-
}), i = F(() => l.value.length),
|
|
1296
|
-
const
|
|
1297
|
-
|
|
1292
|
+
return a.value.filter((h) => h.toString().toLowerCase().includes(f));
|
|
1293
|
+
}), i = F(() => l.value.length), u = F(() => a.value.length - l.value.length), d = (f) => {
|
|
1294
|
+
const h = l.value.indexOf(f);
|
|
1295
|
+
h > -1 ? l.value.splice(h, 1) : l.value.push(f), o("update:modelValue", [...l.value]);
|
|
1298
1296
|
}, v = () => {
|
|
1299
1297
|
l.value = [...a.value], o("update:modelValue", [...l.value]);
|
|
1300
1298
|
}, m = () => {
|
|
@@ -1305,20 +1303,20 @@ const ye = /* @__PURE__ */ ae(Jn, [["render", _n]]), eo = { class: "vs-multisele
|
|
|
1305
1303
|
(f) => {
|
|
1306
1304
|
l.value = [...f || []];
|
|
1307
1305
|
}
|
|
1308
|
-
), (f,
|
|
1309
|
-
|
|
1310
|
-
|
|
1306
|
+
), (f, h) => (y(), x("div", eo, [
|
|
1307
|
+
b("div", to, [
|
|
1308
|
+
b("button", {
|
|
1311
1309
|
onClick: pe(v, ["stop"])
|
|
1312
|
-
}, "Select All (" +
|
|
1313
|
-
|
|
1310
|
+
}, "Select All (" + B(u.value) + ")", 1),
|
|
1311
|
+
b("button", {
|
|
1314
1312
|
onClick: pe(m, ["stop"])
|
|
1315
|
-
}, "Deselect All (" +
|
|
1313
|
+
}, "Deselect All (" + B(i.value) + ")", 1)
|
|
1316
1314
|
]),
|
|
1317
1315
|
ne(ye, { direction: "row" }, {
|
|
1318
1316
|
default: X(() => [
|
|
1319
|
-
te(
|
|
1317
|
+
te(b("input", {
|
|
1320
1318
|
type: "text",
|
|
1321
|
-
"onUpdate:modelValue":
|
|
1319
|
+
"onUpdate:modelValue": h[0] || (h[0] = (c) => s.value = c),
|
|
1322
1320
|
placeholder: "Search...",
|
|
1323
1321
|
class: "vs-multiselect-search vs-w-full"
|
|
1324
1322
|
}, null, 512), [
|
|
@@ -1327,49 +1325,48 @@ const ye = /* @__PURE__ */ ae(Jn, [["render", _n]]), eo = { class: "vs-multisele
|
|
|
1327
1325
|
]),
|
|
1328
1326
|
_: 1
|
|
1329
1327
|
}),
|
|
1330
|
-
e.isLoading ? (y(),
|
|
1331
|
-
(y(!0),
|
|
1332
|
-
key:
|
|
1333
|
-
onClick: pe((g) =>
|
|
1334
|
-
class: G({ selected: l.value.includes(
|
|
1328
|
+
e.isLoading ? (y(), x("div", no, "Loading options...")) : (y(), x("ul", oo, [
|
|
1329
|
+
(y(!0), x(z, null, Q(r.value, (c) => (y(), x("li", {
|
|
1330
|
+
key: c,
|
|
1331
|
+
onClick: pe((g) => d(c), ["stop"]),
|
|
1332
|
+
class: G({ selected: l.value.includes(c) })
|
|
1335
1333
|
}, [
|
|
1336
|
-
|
|
1337
|
-
l.value.includes(
|
|
1338
|
-
|
|
1334
|
+
b("span", lo, B(c), 1),
|
|
1335
|
+
l.value.includes(c) ? (y(), x("svg", ao, [...h[1] || (h[1] = [
|
|
1336
|
+
b("path", {
|
|
1339
1337
|
"stroke-linecap": "round",
|
|
1340
1338
|
"stroke-linejoin": "round",
|
|
1341
1339
|
"stroke-width": "2",
|
|
1342
1340
|
d: "M5 13l4 4L19 7"
|
|
1343
1341
|
}, null, -1)
|
|
1344
|
-
])])) :
|
|
1342
|
+
])])) : D("", !0)
|
|
1345
1343
|
], 10, so))), 128))
|
|
1346
1344
|
]))
|
|
1347
1345
|
]));
|
|
1348
1346
|
}
|
|
1349
|
-
}),
|
|
1347
|
+
}), De = /* @__PURE__ */ new Map();
|
|
1350
1348
|
function io(e) {
|
|
1351
|
-
const n =
|
|
1349
|
+
const n = q(e.columnData || []), t = q(!1), o = () => t.value = !0, s = () => t.value = !1;
|
|
1352
1350
|
async function l(r = !1) {
|
|
1353
|
-
if (!e.asyncOptions)
|
|
1354
|
-
return;
|
|
1351
|
+
if (!e.asyncOptions) return;
|
|
1355
1352
|
const i = e.cacheKey ?? "default";
|
|
1356
|
-
if (!r &&
|
|
1357
|
-
n.value =
|
|
1353
|
+
if (!r && De.has(i)) {
|
|
1354
|
+
n.value = De.get(i);
|
|
1358
1355
|
return;
|
|
1359
1356
|
}
|
|
1360
1357
|
try {
|
|
1361
1358
|
o();
|
|
1362
|
-
const
|
|
1363
|
-
n.value =
|
|
1364
|
-
} catch (
|
|
1365
|
-
console.error("Failed to load async filter options:",
|
|
1359
|
+
const u = await e.asyncOptions(), d = Array.isArray(u) ? u : [];
|
|
1360
|
+
n.value = d, De.set(i, d);
|
|
1361
|
+
} catch (u) {
|
|
1362
|
+
console.error("Failed to load async filter options:", u);
|
|
1366
1363
|
} finally {
|
|
1367
1364
|
s();
|
|
1368
1365
|
}
|
|
1369
1366
|
}
|
|
1370
1367
|
function a() {
|
|
1371
1368
|
const r = e.cacheKey ?? "default";
|
|
1372
|
-
|
|
1369
|
+
De.delete(r);
|
|
1373
1370
|
}
|
|
1374
1371
|
return {
|
|
1375
1372
|
columnOrAsyncOptions: n,
|
|
@@ -1438,8 +1435,8 @@ const co = {
|
|
|
1438
1435
|
"date-range": ["between", "equals", "notEqual", "before", "after", "empty", "notEmpty"],
|
|
1439
1436
|
custom: []
|
|
1440
1437
|
};
|
|
1441
|
-
function i(
|
|
1442
|
-
switch (
|
|
1438
|
+
function i(k) {
|
|
1439
|
+
switch (k) {
|
|
1443
1440
|
case "notEqual":
|
|
1444
1441
|
return "Not Equal";
|
|
1445
1442
|
case "greaterThan":
|
|
@@ -1457,176 +1454,178 @@ const co = {
|
|
|
1457
1454
|
case "notEmpty":
|
|
1458
1455
|
return "Not Empty";
|
|
1459
1456
|
default:
|
|
1460
|
-
return
|
|
1457
|
+
return k.charAt(0).toUpperCase() + k.slice(1);
|
|
1461
1458
|
}
|
|
1462
1459
|
}
|
|
1463
|
-
const
|
|
1460
|
+
const u = F(() => t.type === "custom" ? [] : t.operators?.length ? t.operators : r[t.type]), d = q(null), v = q(null), m = q(), f = q(!1);
|
|
1464
1461
|
Y(
|
|
1465
1462
|
() => t.visible,
|
|
1466
|
-
async (
|
|
1467
|
-
f.value = !!
|
|
1463
|
+
async (k) => {
|
|
1464
|
+
f.value = !!k, f.value ? (await oe(), V(), t.asyncOptions && a()) : T();
|
|
1468
1465
|
},
|
|
1469
1466
|
{ immediate: !0 }
|
|
1470
1467
|
);
|
|
1471
|
-
const
|
|
1468
|
+
const h = F(
|
|
1469
|
+
() => Gn(t.modelValue ?? we(t.type))
|
|
1470
|
+
), c = q(we(t.type, t.modelValue));
|
|
1472
1471
|
Y(
|
|
1473
1472
|
() => t.modelValue,
|
|
1474
|
-
(
|
|
1475
|
-
|
|
1473
|
+
(k) => {
|
|
1474
|
+
c.value = we(t.type, k);
|
|
1476
1475
|
},
|
|
1477
1476
|
{ immediate: !0 }
|
|
1478
1477
|
);
|
|
1479
|
-
function h() {
|
|
1480
|
-
o("open");
|
|
1481
|
-
}
|
|
1482
1478
|
function g() {
|
|
1483
|
-
o("
|
|
1479
|
+
o("open");
|
|
1484
1480
|
}
|
|
1485
1481
|
function C() {
|
|
1486
|
-
|
|
1482
|
+
o("update:modelValue", { ...c.value }), o("apply", { ...c.value });
|
|
1487
1483
|
}
|
|
1488
|
-
function
|
|
1489
|
-
o("
|
|
1484
|
+
function R() {
|
|
1485
|
+
c.value = we(t.type), o("update:modelValue", { ...c.value }), o("clear"), E();
|
|
1490
1486
|
}
|
|
1491
1487
|
function E() {
|
|
1492
|
-
|
|
1493
|
-
|
|
1488
|
+
o("close");
|
|
1489
|
+
}
|
|
1490
|
+
function V() {
|
|
1491
|
+
!d.value || !v.value || (m.value = Un(d.value, v.value, () => {
|
|
1492
|
+
Yn(d.value, v.value, {
|
|
1494
1493
|
placement: "bottom-start",
|
|
1495
|
-
middleware: [
|
|
1496
|
-
}).then(({ x:
|
|
1494
|
+
middleware: [Zn(6), Qn(), Xn({ padding: 8 })]
|
|
1495
|
+
}).then(({ x: k, y: w }) => {
|
|
1497
1496
|
Object.assign(v.value.style, {
|
|
1498
|
-
left: `${
|
|
1499
|
-
top: `${
|
|
1497
|
+
left: `${k}px`,
|
|
1498
|
+
top: `${w}px`,
|
|
1500
1499
|
position: "absolute",
|
|
1501
1500
|
zIndex: 2e3
|
|
1502
1501
|
});
|
|
1503
1502
|
});
|
|
1504
1503
|
}));
|
|
1505
1504
|
}
|
|
1506
|
-
function
|
|
1505
|
+
function T() {
|
|
1507
1506
|
m.value?.(), m.value = void 0;
|
|
1508
1507
|
}
|
|
1509
|
-
function
|
|
1510
|
-
const
|
|
1511
|
-
f.value &&
|
|
1508
|
+
function W(k) {
|
|
1509
|
+
const w = k.target;
|
|
1510
|
+
f.value && d.value && v.value && !d.value.contains(w) && !v.value.contains(w) && E();
|
|
1512
1511
|
}
|
|
1513
|
-
function
|
|
1514
|
-
|
|
1512
|
+
function S(k) {
|
|
1513
|
+
k.key === "Escape" && f.value && E();
|
|
1515
1514
|
}
|
|
1516
1515
|
return Re(() => {
|
|
1517
|
-
document.addEventListener("click",
|
|
1518
|
-
}),
|
|
1519
|
-
document.removeEventListener("click",
|
|
1520
|
-
}), (
|
|
1521
|
-
|
|
1516
|
+
document.addEventListener("click", W), document.addEventListener("keydown", S);
|
|
1517
|
+
}), mt(() => {
|
|
1518
|
+
document.removeEventListener("click", W), document.removeEventListener("keydown", S), T();
|
|
1519
|
+
}), (k, w) => (y(), x(z, null, [
|
|
1520
|
+
b("span", {
|
|
1522
1521
|
ref_key: "referenceRef",
|
|
1523
|
-
ref:
|
|
1522
|
+
ref: d,
|
|
1524
1523
|
class: G(["vs-column-filter", {
|
|
1525
|
-
"is-active":
|
|
1526
|
-
"in-active":
|
|
1524
|
+
"is-active": h.value,
|
|
1525
|
+
"in-active": !h.value
|
|
1527
1526
|
}]),
|
|
1528
|
-
onClick: pe(
|
|
1529
|
-
}, [...
|
|
1530
|
-
|
|
1527
|
+
onClick: pe(g, ["stop"])
|
|
1528
|
+
}, [...w[13] || (w[13] = [
|
|
1529
|
+
b("svg", {
|
|
1531
1530
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1532
1531
|
height: "24px",
|
|
1533
1532
|
viewBox: "0 -960 960 960",
|
|
1534
1533
|
width: "24px",
|
|
1535
1534
|
fill: "currentColor"
|
|
1536
1535
|
}, [
|
|
1537
|
-
|
|
1536
|
+
b("path", { d: "M400-240v-80h160v80H400ZM240-440v-80h480v80H240ZM120-640v-80h720v80H120Z" })
|
|
1538
1537
|
], -1)
|
|
1539
1538
|
])], 2),
|
|
1540
1539
|
(y(), fe(Dt, { to: "body" }, [
|
|
1541
|
-
ne(
|
|
1540
|
+
ne(Pt, { name: "fade" }, {
|
|
1542
1541
|
default: X(() => [
|
|
1543
|
-
f.value ? (y(),
|
|
1542
|
+
f.value ? (y(), x("div", {
|
|
1544
1543
|
key: 0,
|
|
1545
1544
|
ref_key: "floatingRef",
|
|
1546
1545
|
ref: v,
|
|
1547
1546
|
class: "vs-filter-dropdown",
|
|
1548
1547
|
style: { position: "absolute", "z-index": "1000" },
|
|
1549
|
-
onClick:
|
|
1548
|
+
onClick: w[12] || (w[12] = pe(() => {
|
|
1550
1549
|
}, ["stop"]))
|
|
1551
1550
|
}, [
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
te(
|
|
1555
|
-
"onUpdate:modelValue":
|
|
1551
|
+
c.value.type === "text" ? (y(), x("div", co, [
|
|
1552
|
+
u.value.length > 1 ? (y(), x("div", uo, [
|
|
1553
|
+
te(b("select", {
|
|
1554
|
+
"onUpdate:modelValue": w[0] || (w[0] = (p) => c.value.operator = p),
|
|
1556
1555
|
class: "vs-operator-select vs-mx-auto vs-w-full"
|
|
1557
1556
|
}, [
|
|
1558
|
-
(y(!0),
|
|
1559
|
-
key:
|
|
1560
|
-
value:
|
|
1561
|
-
},
|
|
1557
|
+
(y(!0), x(z, null, Q(u.value, (p) => (y(), x("option", {
|
|
1558
|
+
key: p,
|
|
1559
|
+
value: p
|
|
1560
|
+
}, B(i(p)), 9, fo))), 128))
|
|
1562
1561
|
], 512), [
|
|
1563
|
-
[Qe,
|
|
1562
|
+
[Qe, c.value.operator]
|
|
1564
1563
|
])
|
|
1565
|
-
])) :
|
|
1564
|
+
])) : D("", !0),
|
|
1566
1565
|
ne(ye, {
|
|
1567
1566
|
direction: "row",
|
|
1568
1567
|
class: "mb-6"
|
|
1569
1568
|
}, {
|
|
1570
1569
|
default: X(() => [
|
|
1571
|
-
te(
|
|
1570
|
+
te(b("input", {
|
|
1572
1571
|
type: "text",
|
|
1573
|
-
"onUpdate:modelValue":
|
|
1572
|
+
"onUpdate:modelValue": w[1] || (w[1] = (p) => c.value.value = p),
|
|
1574
1573
|
placeholder: "Search...",
|
|
1575
1574
|
class: "vs-input vs-mx-auto vs-w-full"
|
|
1576
1575
|
}, null, 512), [
|
|
1577
|
-
[he,
|
|
1576
|
+
[he, c.value.value]
|
|
1578
1577
|
])
|
|
1579
1578
|
]),
|
|
1580
1579
|
_: 1
|
|
1581
1580
|
})
|
|
1582
|
-
])) :
|
|
1581
|
+
])) : c.value.type === "multi-select" ? (y(), x("div", vo, [
|
|
1583
1582
|
ne(ye, {
|
|
1584
1583
|
direction: "row",
|
|
1585
1584
|
class: "mb-6 vs-align-center vs-justify-end"
|
|
1586
1585
|
}, {
|
|
1587
1586
|
default: X(() => [
|
|
1588
|
-
e.asyncOptions ? (y(),
|
|
1587
|
+
e.asyncOptions ? (y(), x("span", {
|
|
1589
1588
|
key: 0,
|
|
1590
|
-
onClick:
|
|
1589
|
+
onClick: w[2] || (w[2] = (p) => $(a)(!0)),
|
|
1591
1590
|
class: "vs-cursor-pointer"
|
|
1592
|
-
}, [...
|
|
1593
|
-
|
|
1591
|
+
}, [...w[14] || (w[14] = [
|
|
1592
|
+
b("svg", {
|
|
1594
1593
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1595
1594
|
height: "24px",
|
|
1596
1595
|
viewBox: "0 -960 960 960",
|
|
1597
1596
|
width: "24px",
|
|
1598
1597
|
fill: "var(--vs-inactive)"
|
|
1599
1598
|
}, [
|
|
1600
|
-
|
|
1599
|
+
b("path", { d: "M480-160q-134 0-227-93t-93-227q0-134 93-227t227-93q69 0 132 28.5T720-690v-110h80v280H520v-80h168q-32-56-87.5-88T480-720q-100 0-170 70t-70 170q0 100 70 170t170 70q77 0 139-44t87-116h84q-28 106-114 173t-196 67Z" })
|
|
1601
1600
|
], -1)
|
|
1602
|
-
])])) :
|
|
1601
|
+
])])) : D("", !0)
|
|
1603
1602
|
]),
|
|
1604
1603
|
_: 1
|
|
1605
1604
|
}),
|
|
1606
1605
|
ne(ro, {
|
|
1607
1606
|
isLoading: $(l),
|
|
1608
1607
|
columnData: $(s),
|
|
1609
|
-
modelValue:
|
|
1610
|
-
"onUpdate:modelValue":
|
|
1608
|
+
modelValue: c.value.value,
|
|
1609
|
+
"onUpdate:modelValue": w[3] || (w[3] = (p) => c.value.value = p),
|
|
1611
1610
|
placeholder: "Select values..."
|
|
1612
1611
|
}, null, 8, ["isLoading", "columnData", "modelValue"])
|
|
1613
|
-
])) :
|
|
1614
|
-
|
|
1615
|
-
te(
|
|
1616
|
-
"onUpdate:modelValue":
|
|
1612
|
+
])) : c.value.type === "number-range" ? (y(), x("div", ho, [
|
|
1613
|
+
u.value.length > 1 ? (y(), x("div", mo, [
|
|
1614
|
+
te(b("select", {
|
|
1615
|
+
"onUpdate:modelValue": w[4] || (w[4] = (p) => c.value.operator = p),
|
|
1617
1616
|
class: "vs-operator-select vs-w-full"
|
|
1618
1617
|
}, [
|
|
1619
|
-
(y(!0),
|
|
1620
|
-
key:
|
|
1621
|
-
value:
|
|
1622
|
-
},
|
|
1618
|
+
(y(!0), x(z, null, Q(u.value, (p) => (y(), x("option", {
|
|
1619
|
+
key: p,
|
|
1620
|
+
value: p
|
|
1621
|
+
}, B(i(p)), 9, po))), 128))
|
|
1623
1622
|
], 512), [
|
|
1624
|
-
[Qe,
|
|
1623
|
+
[Qe, c.value.operator]
|
|
1625
1624
|
])
|
|
1626
|
-
])) : (y(),
|
|
1627
|
-
|
|
1625
|
+
])) : (y(), x("div", go, [
|
|
1626
|
+
b("span", yo, B(c.value.operator), 1)
|
|
1628
1627
|
])),
|
|
1629
|
-
|
|
1628
|
+
c.value.operator === "between" ? (y(), fe(ye, {
|
|
1630
1629
|
key: 2,
|
|
1631
1630
|
justify: "between",
|
|
1632
1631
|
align: "center",
|
|
@@ -1634,75 +1633,75 @@ const co = {
|
|
|
1634
1633
|
class: "mb-6"
|
|
1635
1634
|
}, {
|
|
1636
1635
|
default: X(() => [
|
|
1637
|
-
te(
|
|
1636
|
+
te(b("input", {
|
|
1638
1637
|
type: "number",
|
|
1639
|
-
"onUpdate:modelValue":
|
|
1638
|
+
"onUpdate:modelValue": w[5] || (w[5] = (p) => c.value.min = p),
|
|
1640
1639
|
placeholder: "Min",
|
|
1641
1640
|
class: "vs-input vs-w-full"
|
|
1642
1641
|
}, null, 512), [
|
|
1643
1642
|
[
|
|
1644
1643
|
he,
|
|
1645
|
-
|
|
1644
|
+
c.value.min,
|
|
1646
1645
|
void 0,
|
|
1647
1646
|
{ number: !0 }
|
|
1648
1647
|
]
|
|
1649
1648
|
]),
|
|
1650
|
-
|
|
1651
|
-
te(
|
|
1649
|
+
w[15] || (w[15] = b("span", null, "-", -1)),
|
|
1650
|
+
te(b("input", {
|
|
1652
1651
|
type: "number",
|
|
1653
|
-
"onUpdate:modelValue":
|
|
1652
|
+
"onUpdate:modelValue": w[6] || (w[6] = (p) => c.value.max = p),
|
|
1654
1653
|
placeholder: "Max",
|
|
1655
1654
|
class: "vs-input vs-w-full"
|
|
1656
1655
|
}, null, 512), [
|
|
1657
1656
|
[
|
|
1658
1657
|
he,
|
|
1659
|
-
|
|
1658
|
+
c.value.max,
|
|
1660
1659
|
void 0,
|
|
1661
1660
|
{ number: !0 }
|
|
1662
1661
|
]
|
|
1663
1662
|
])
|
|
1664
1663
|
]),
|
|
1665
1664
|
_: 1
|
|
1666
|
-
})) : ["equals", "notEqual", "greaterThan", "lessThan"].includes(
|
|
1665
|
+
})) : ["equals", "notEqual", "greaterThan", "lessThan"].includes(c.value.operator || "") ? (y(), fe(ye, {
|
|
1667
1666
|
key: 3,
|
|
1668
1667
|
direction: "row"
|
|
1669
1668
|
}, {
|
|
1670
1669
|
default: X(() => [
|
|
1671
|
-
te(
|
|
1670
|
+
te(b("input", {
|
|
1672
1671
|
type: "number",
|
|
1673
|
-
"onUpdate:modelValue":
|
|
1672
|
+
"onUpdate:modelValue": w[7] || (w[7] = (p) => c.value.value = p),
|
|
1674
1673
|
placeholder: "Enter number",
|
|
1675
1674
|
class: "vs-input vs-w-full"
|
|
1676
1675
|
}, null, 512), [
|
|
1677
1676
|
[
|
|
1678
1677
|
he,
|
|
1679
|
-
|
|
1678
|
+
c.value.value,
|
|
1680
1679
|
void 0,
|
|
1681
1680
|
{ number: !0 }
|
|
1682
1681
|
]
|
|
1683
1682
|
])
|
|
1684
1683
|
]),
|
|
1685
1684
|
_: 1
|
|
1686
|
-
})) : ["empty", "notEmpty"].includes(
|
|
1687
|
-
|
|
1688
|
-
])])) :
|
|
1689
|
-
])) :
|
|
1690
|
-
|
|
1691
|
-
te(
|
|
1692
|
-
"onUpdate:modelValue":
|
|
1685
|
+
})) : ["empty", "notEmpty"].includes(c.value.operator || "") ? (y(), x("div", wo, [...w[16] || (w[16] = [
|
|
1686
|
+
b("div", { class: "vs-muted vs-text-center vs-pt-sm" }, "No input required", -1)
|
|
1687
|
+
])])) : D("", !0)
|
|
1688
|
+
])) : c.value.type === "date-range" ? (y(), x("div", bo, [
|
|
1689
|
+
u.value.length > 1 ? (y(), x("div", xo, [
|
|
1690
|
+
te(b("select", {
|
|
1691
|
+
"onUpdate:modelValue": w[8] || (w[8] = (p) => c.value.operator = p),
|
|
1693
1692
|
class: "vs-operator-select vs-w-full"
|
|
1694
1693
|
}, [
|
|
1695
|
-
(y(!0),
|
|
1696
|
-
key:
|
|
1697
|
-
value:
|
|
1698
|
-
},
|
|
1694
|
+
(y(!0), x(z, null, Q(u.value, (p) => (y(), x("option", {
|
|
1695
|
+
key: p,
|
|
1696
|
+
value: p
|
|
1697
|
+
}, B(i(p)), 9, ko))), 128))
|
|
1699
1698
|
], 512), [
|
|
1700
|
-
[Qe,
|
|
1699
|
+
[Qe, c.value.operator]
|
|
1701
1700
|
])
|
|
1702
|
-
])) : (y(),
|
|
1703
|
-
|
|
1701
|
+
])) : (y(), x("div", Co, [
|
|
1702
|
+
b("span", So, B(c.value.operator), 1)
|
|
1704
1703
|
])),
|
|
1705
|
-
|
|
1704
|
+
c.value.operator === "between" ? (y(), fe(ye, {
|
|
1706
1705
|
key: 2,
|
|
1707
1706
|
justify: "between",
|
|
1708
1707
|
align: "center",
|
|
@@ -1710,69 +1709,69 @@ const co = {
|
|
|
1710
1709
|
class: "mb-6"
|
|
1711
1710
|
}, {
|
|
1712
1711
|
default: X(() => [
|
|
1713
|
-
te(
|
|
1712
|
+
te(b("input", {
|
|
1714
1713
|
type: "date",
|
|
1715
|
-
"onUpdate:modelValue":
|
|
1714
|
+
"onUpdate:modelValue": w[9] || (w[9] = (p) => c.value.start = p),
|
|
1716
1715
|
class: "vs-input vs-w-full"
|
|
1717
1716
|
}, null, 512), [
|
|
1718
|
-
[he,
|
|
1717
|
+
[he, c.value.start]
|
|
1719
1718
|
]),
|
|
1720
|
-
|
|
1721
|
-
te(
|
|
1719
|
+
w[17] || (w[17] = b("span", null, "-", -1)),
|
|
1720
|
+
te(b("input", {
|
|
1722
1721
|
type: "date",
|
|
1723
|
-
"onUpdate:modelValue":
|
|
1722
|
+
"onUpdate:modelValue": w[10] || (w[10] = (p) => c.value.end = p),
|
|
1724
1723
|
class: "vs-input vs-w-full"
|
|
1725
1724
|
}, null, 512), [
|
|
1726
|
-
[he,
|
|
1725
|
+
[he, c.value.end]
|
|
1727
1726
|
])
|
|
1728
1727
|
]),
|
|
1729
1728
|
_: 1
|
|
1730
|
-
})) : ["equals", "notEqual", "before", "after"].includes(
|
|
1729
|
+
})) : ["equals", "notEqual", "before", "after"].includes(c.value.operator || "") ? (y(), fe(ye, {
|
|
1731
1730
|
key: 3,
|
|
1732
1731
|
direction: "row",
|
|
1733
1732
|
class: "vs-filter-single-date"
|
|
1734
1733
|
}, {
|
|
1735
1734
|
default: X(() => [
|
|
1736
|
-
te(
|
|
1735
|
+
te(b("input", {
|
|
1737
1736
|
type: "date",
|
|
1738
|
-
"onUpdate:modelValue":
|
|
1737
|
+
"onUpdate:modelValue": w[11] || (w[11] = (p) => c.value.value = p),
|
|
1739
1738
|
class: "vs-input vs-w-full"
|
|
1740
1739
|
}, null, 512), [
|
|
1741
|
-
[he,
|
|
1740
|
+
[he, c.value.value]
|
|
1742
1741
|
])
|
|
1743
1742
|
]),
|
|
1744
1743
|
_: 1
|
|
1745
|
-
})) : ["empty", "notEmpty"].includes(
|
|
1746
|
-
])) :
|
|
1747
|
-
|
|
1748
|
-
|
|
1744
|
+
})) : ["empty", "notEmpty"].includes(c.value.operator || "") ? (y(), x("div", Ro, " No date input required ")) : D("", !0)
|
|
1745
|
+
])) : D("", !0),
|
|
1746
|
+
c.value.type !== "custom" ? (y(), x("div", Eo, [
|
|
1747
|
+
b("button", {
|
|
1749
1748
|
class: "vs-btn vs-btn-primary",
|
|
1750
|
-
onClick:
|
|
1749
|
+
onClick: C
|
|
1751
1750
|
}, "Apply"),
|
|
1752
|
-
|
|
1751
|
+
b("button", {
|
|
1753
1752
|
class: "vs-btn vs-btn-secondary",
|
|
1754
|
-
onClick:
|
|
1753
|
+
onClick: R
|
|
1755
1754
|
}, "Clear")
|
|
1756
|
-
])) :
|
|
1757
|
-
j(
|
|
1758
|
-
filter:
|
|
1759
|
-
apply:
|
|
1760
|
-
clear:
|
|
1755
|
+
])) : D("", !0),
|
|
1756
|
+
j(k.$slots, "custom", {
|
|
1757
|
+
filter: c.value,
|
|
1758
|
+
apply: C,
|
|
1759
|
+
clear: R
|
|
1761
1760
|
}, void 0, !0)
|
|
1762
|
-
], 512)) :
|
|
1761
|
+
], 512)) : D("", !0)
|
|
1763
1762
|
]),
|
|
1764
1763
|
_: 3
|
|
1765
1764
|
})
|
|
1766
1765
|
]))
|
|
1767
1766
|
], 64));
|
|
1768
1767
|
}
|
|
1769
|
-
}), Ao = /* @__PURE__ */ ae($o, [["__scopeId", "data-v-
|
|
1768
|
+
}), Ao = /* @__PURE__ */ ae($o, [["__scopeId", "data-v-a4176350"]]), Fo = ["data-field", "rowspan"], To = { class: "vs-header-content" }, Oo = { class: "vs-header-label" }, Vo = {
|
|
1770
1769
|
key: 0,
|
|
1771
1770
|
class: "vs-sort-icons"
|
|
1772
1771
|
}, Lo = {
|
|
1773
1772
|
key: 1,
|
|
1774
1773
|
class: "vs-sort-priority"
|
|
1775
|
-
},
|
|
1774
|
+
}, Do = /* @__PURE__ */ _({
|
|
1776
1775
|
__name: "HeaderCell",
|
|
1777
1776
|
props: {
|
|
1778
1777
|
column: {},
|
|
@@ -1802,16 +1801,16 @@ const co = {
|
|
|
1802
1801
|
function i() {
|
|
1803
1802
|
t.column.field && o("clearFilter", t.column.field);
|
|
1804
1803
|
}
|
|
1805
|
-
function
|
|
1804
|
+
function u() {
|
|
1806
1805
|
t.column.field && o("closeFilter", t.column.field);
|
|
1807
1806
|
}
|
|
1808
|
-
function
|
|
1807
|
+
function d() {
|
|
1809
1808
|
t.column.field && o("openFilter", t.column.field);
|
|
1810
1809
|
}
|
|
1811
|
-
return (v, m) => e.column && e.column.field ? (y(),
|
|
1810
|
+
return (v, m) => e.column && e.column.field ? (y(), x("th", {
|
|
1812
1811
|
key: 0,
|
|
1813
1812
|
onClick: l,
|
|
1814
|
-
style:
|
|
1813
|
+
style: pt([
|
|
1815
1814
|
{
|
|
1816
1815
|
width: e.column.width + "%",
|
|
1817
1816
|
textAlign: "center"
|
|
@@ -1826,40 +1825,40 @@ const co = {
|
|
|
1826
1825
|
]])
|
|
1827
1826
|
}, [
|
|
1828
1827
|
j(v.$slots, `header-${e.column.field}`, { column: e.column }, () => [
|
|
1829
|
-
|
|
1830
|
-
|
|
1831
|
-
e.column.sortable ? (y(),
|
|
1832
|
-
|
|
1828
|
+
b("div", To, [
|
|
1829
|
+
b("span", Oo, B(e.column.label), 1),
|
|
1830
|
+
e.column.sortable ? (y(), x("div", Vo, [
|
|
1831
|
+
b("span", {
|
|
1833
1832
|
class: G(["vs-sort-icon vs-sort-asc", {
|
|
1834
1833
|
"vs-active": e.sortHelpers.isColumnSorted(e.column.field) && e.sortHelpers.getSortOrder(e.column.field) === "asc"
|
|
1835
1834
|
}])
|
|
1836
1835
|
}, [...m[2] || (m[2] = [
|
|
1837
|
-
|
|
1836
|
+
b("svg", {
|
|
1838
1837
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1839
1838
|
height: "24px",
|
|
1840
1839
|
viewBox: "0 -960 960 960",
|
|
1841
1840
|
width: "24px",
|
|
1842
1841
|
fill: "var(--vs-gray-800)"
|
|
1843
1842
|
}, [
|
|
1844
|
-
|
|
1843
|
+
b("path", { d: "m280-400 200-200 200 200H280Z" })
|
|
1845
1844
|
], -1)
|
|
1846
1845
|
])], 2),
|
|
1847
|
-
|
|
1846
|
+
b("span", {
|
|
1848
1847
|
class: G(["vs-sort-icon vs-sort-desc", {
|
|
1849
1848
|
"vs-active": e.sortHelpers.isColumnSorted(e.column.field) && e.sortHelpers.getSortOrder(e.column.field) === "desc"
|
|
1850
1849
|
}])
|
|
1851
1850
|
}, [...m[3] || (m[3] = [
|
|
1852
|
-
|
|
1851
|
+
b("svg", {
|
|
1853
1852
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1854
1853
|
height: "24px",
|
|
1855
1854
|
viewBox: "0 -960 960 960",
|
|
1856
1855
|
width: "24px"
|
|
1857
1856
|
}, [
|
|
1858
|
-
|
|
1857
|
+
b("path", { d: "M480-360 280-560h400L480-360Z" })
|
|
1859
1858
|
], -1)
|
|
1860
1859
|
])], 2)
|
|
1861
|
-
])) :
|
|
1862
|
-
e.sortHelpers.getSortPriority(e.column.field) !== null ? (y(),
|
|
1860
|
+
])) : D("", !0),
|
|
1861
|
+
e.sortHelpers.getSortPriority(e.column.field) !== null ? (y(), x("span", Lo, B(e.sortHelpers.getSortPriority(e.column.field)), 1)) : D("", !0),
|
|
1863
1862
|
e.column.filter ? (y(), fe(Ao, {
|
|
1864
1863
|
key: 2,
|
|
1865
1864
|
type: e.column.filter.type,
|
|
@@ -1872,26 +1871,26 @@ const co = {
|
|
|
1872
1871
|
"column-data": a(),
|
|
1873
1872
|
onApply: m[1] || (m[1] = (f) => r(f)),
|
|
1874
1873
|
onClear: i,
|
|
1875
|
-
onClose:
|
|
1876
|
-
onOpen:
|
|
1874
|
+
onClose: u,
|
|
1875
|
+
onOpen: d
|
|
1877
1876
|
}, Te({ _: 2 }, [
|
|
1878
1877
|
e.column.filter.custom ? {
|
|
1879
1878
|
name: "custom",
|
|
1880
|
-
fn: X(({ filter: f, apply:
|
|
1879
|
+
fn: X(({ filter: f, apply: h, clear: c }) => [
|
|
1881
1880
|
j(v.$slots, e.column.filter.custom, {
|
|
1882
1881
|
filter: f,
|
|
1883
|
-
apply:
|
|
1884
|
-
clear:
|
|
1882
|
+
apply: h,
|
|
1883
|
+
clear: c
|
|
1885
1884
|
}, void 0, !0)
|
|
1886
1885
|
]),
|
|
1887
1886
|
key: "0"
|
|
1888
1887
|
} : void 0
|
|
1889
|
-
]), 1032, ["type", "async-options", "field", "operators", "modelValue", "visible", "column-data"])) :
|
|
1888
|
+
]), 1032, ["type", "async-options", "field", "operators", "modelValue", "visible", "column-data"])) : D("", !0)
|
|
1890
1889
|
])
|
|
1891
1890
|
], !0)
|
|
1892
|
-
], 14, Fo)) :
|
|
1891
|
+
], 14, Fo)) : D("", !0);
|
|
1893
1892
|
}
|
|
1894
|
-
}),
|
|
1893
|
+
}), ht = /* @__PURE__ */ ae(Do, [["__scopeId", "data-v-69e5e343"]]), Po = { key: 0 }, Io = {
|
|
1895
1894
|
key: 0,
|
|
1896
1895
|
class: "vs-expand-column",
|
|
1897
1896
|
rowspan: "2",
|
|
@@ -1903,7 +1902,7 @@ const co = {
|
|
|
1903
1902
|
rowspan: "2",
|
|
1904
1903
|
style: { width: "5%" },
|
|
1905
1904
|
"data-field": "_checkbox"
|
|
1906
|
-
}, Mo = { class: "vs-checkbox" }, Bo = ["id", "checked", "indeterminate"], Ho = ["for"],
|
|
1905
|
+
}, Mo = { class: "vs-checkbox" }, Bo = ["id", "checked", "indeterminate"], Ho = ["for"], No = ["colspan", "data-field"], Wo = {
|
|
1907
1906
|
key: 0,
|
|
1908
1907
|
class: "vs-expand-column",
|
|
1909
1908
|
style: { width: "5%" },
|
|
@@ -1937,50 +1936,50 @@ const co = {
|
|
|
1937
1936
|
const l = F({
|
|
1938
1937
|
get: () => t.filters,
|
|
1939
1938
|
set: (f) => o("update:filters", f)
|
|
1940
|
-
}), a =
|
|
1939
|
+
}), a = q(null);
|
|
1941
1940
|
function r(f) {
|
|
1942
1941
|
a.value = f;
|
|
1943
1942
|
}
|
|
1944
1943
|
function i(f) {
|
|
1945
1944
|
a.value === f && (a.value = null);
|
|
1946
1945
|
}
|
|
1947
|
-
const
|
|
1946
|
+
const u = q(null), d = F(() => t.columns.some((f) => f.children && f.children.length)), v = F(() => {
|
|
1948
1947
|
const f = [];
|
|
1949
|
-
return t.columns.forEach((
|
|
1950
|
-
|
|
1948
|
+
return t.columns.forEach((h) => {
|
|
1949
|
+
h.children && h.children.length ? f.push(...h.children) : f.push(h);
|
|
1951
1950
|
}), f;
|
|
1952
1951
|
});
|
|
1953
1952
|
function m(f) {
|
|
1954
|
-
return
|
|
1955
|
-
(
|
|
1953
|
+
return d.value ? t.columns.some(
|
|
1954
|
+
(h) => h.children && h.children.some((c) => c.field === f.field)
|
|
1956
1955
|
) : !0;
|
|
1957
1956
|
}
|
|
1958
|
-
return (f,
|
|
1957
|
+
return (f, h) => (y(), x("thead", {
|
|
1959
1958
|
ref_key: "headerRef",
|
|
1960
|
-
ref:
|
|
1959
|
+
ref: u
|
|
1961
1960
|
}, [
|
|
1962
|
-
|
|
1963
|
-
e.expandable ? (y(),
|
|
1964
|
-
e.isItemSelectedControlled ? (y(),
|
|
1965
|
-
|
|
1966
|
-
|
|
1961
|
+
d.value ? (y(), x("tr", Po, [
|
|
1962
|
+
e.expandable ? (y(), x("th", Io)) : D("", !0),
|
|
1963
|
+
e.isItemSelectedControlled ? (y(), x("th", qo, [
|
|
1964
|
+
b("div", Mo, [
|
|
1965
|
+
b("input", {
|
|
1967
1966
|
type: "checkbox",
|
|
1968
1967
|
id: e.tablename + "-main-checkbox",
|
|
1969
1968
|
checked: e.isAllChecked,
|
|
1970
1969
|
indeterminate: e.isSomeChecked,
|
|
1971
1970
|
onChange: s
|
|
1972
1971
|
}, null, 40, Bo),
|
|
1973
|
-
|
|
1972
|
+
b("label", {
|
|
1974
1973
|
for: e.tablename + "-main-checkbox"
|
|
1975
1974
|
}, null, 8, Ho)
|
|
1976
1975
|
])
|
|
1977
|
-
])) :
|
|
1978
|
-
(y(!0),
|
|
1979
|
-
key:
|
|
1976
|
+
])) : D("", !0),
|
|
1977
|
+
(y(!0), x(z, null, Q(t.columns, (c) => (y(), x(z, {
|
|
1978
|
+
key: c.field || c.label
|
|
1980
1979
|
}, [
|
|
1981
|
-
!
|
|
1980
|
+
!c.children || !c.children.length ? (y(), fe(ht, Ae({
|
|
1982
1981
|
key: 0,
|
|
1983
|
-
column:
|
|
1982
|
+
column: c,
|
|
1984
1983
|
rows: e.rows,
|
|
1985
1984
|
rowspan: 2,
|
|
1986
1985
|
"sort-helpers": e.sortHelpers,
|
|
@@ -1989,49 +1988,49 @@ const co = {
|
|
|
1989
1988
|
"header-class": e.headerClass,
|
|
1990
1989
|
tablename: e.tablename
|
|
1991
1990
|
}, { ref_for: !0 }, f.$attrs, {
|
|
1992
|
-
onApplyFilter:
|
|
1993
|
-
onClearFilter:
|
|
1991
|
+
onApplyFilter: h[0] || (h[0] = (g, C) => o("applyFilter", g, C)),
|
|
1992
|
+
onClearFilter: h[1] || (h[1] = (g) => o("clearFilter", g)),
|
|
1994
1993
|
onOpenFilter: r,
|
|
1995
1994
|
onCloseFilter: i,
|
|
1996
|
-
"onUpdate:filters":
|
|
1995
|
+
"onUpdate:filters": h[2] || (h[2] = (g) => o("update:filters", g))
|
|
1997
1996
|
}), Te({ _: 2 }, [
|
|
1998
1997
|
Q(f.$slots, (g, C) => ({
|
|
1999
1998
|
name: C,
|
|
2000
|
-
fn: X((
|
|
2001
|
-
j(f.$slots, C, Ae({ ref_for: !0 },
|
|
1999
|
+
fn: X((R) => [
|
|
2000
|
+
j(f.$slots, C, Ae({ ref_for: !0 }, R), void 0, !0)
|
|
2002
2001
|
])
|
|
2003
2002
|
}))
|
|
2004
|
-
]), 1040, ["column", "rows", "sort-helpers", "filters", "open-filter", "header-class", "tablename"])) : (y(),
|
|
2003
|
+
]), 1040, ["column", "rows", "sort-helpers", "filters", "open-filter", "header-class", "tablename"])) : (y(), x("th", {
|
|
2005
2004
|
key: 1,
|
|
2006
|
-
colspan:
|
|
2007
|
-
"data-field": `group-${
|
|
2005
|
+
colspan: c.children.length,
|
|
2006
|
+
"data-field": `group-${c.label}`,
|
|
2008
2007
|
class: "vs-group-header",
|
|
2009
2008
|
style: { textAlign: "center" }
|
|
2010
|
-
},
|
|
2009
|
+
}, B(c.label), 9, No))
|
|
2011
2010
|
], 64))), 128))
|
|
2012
|
-
])) :
|
|
2013
|
-
|
|
2014
|
-
e.expandable && !
|
|
2015
|
-
e.isItemSelectedControlled && !
|
|
2016
|
-
|
|
2017
|
-
|
|
2011
|
+
])) : D("", !0),
|
|
2012
|
+
b("tr", null, [
|
|
2013
|
+
e.expandable && !d.value ? (y(), x("th", Wo)) : D("", !0),
|
|
2014
|
+
e.isItemSelectedControlled && !d.value ? (y(), x("th", Ko, [
|
|
2015
|
+
b("div", zo, [
|
|
2016
|
+
b("input", {
|
|
2018
2017
|
type: "checkbox",
|
|
2019
2018
|
id: e.tablename + "-main-checkbox",
|
|
2020
2019
|
checked: e.isAllChecked,
|
|
2021
2020
|
indeterminate: e.isSomeChecked,
|
|
2022
2021
|
onChange: s
|
|
2023
2022
|
}, null, 40, jo),
|
|
2024
|
-
|
|
2023
|
+
b("label", {
|
|
2025
2024
|
for: e.tablename + "-main-checkbox"
|
|
2026
2025
|
}, null, 8, Uo)
|
|
2027
2026
|
])
|
|
2028
|
-
])) :
|
|
2029
|
-
(y(!0),
|
|
2030
|
-
key:
|
|
2027
|
+
])) : D("", !0),
|
|
2028
|
+
(y(!0), x(z, null, Q(v.value, (c) => (y(), x(z, {
|
|
2029
|
+
key: c.field
|
|
2031
2030
|
}, [
|
|
2032
|
-
|
|
2031
|
+
c.field && m(c) ? (y(), fe(ht, Ae({
|
|
2033
2032
|
key: 0,
|
|
2034
|
-
column:
|
|
2033
|
+
column: c,
|
|
2035
2034
|
rows: e.rows,
|
|
2036
2035
|
"sort-helpers": e.sortHelpers,
|
|
2037
2036
|
filters: l.value,
|
|
@@ -2039,19 +2038,19 @@ const co = {
|
|
|
2039
2038
|
"header-class": e.headerClass,
|
|
2040
2039
|
tablename: e.tablename
|
|
2041
2040
|
}, { ref_for: !0 }, f.$attrs, {
|
|
2042
|
-
onApplyFilter:
|
|
2043
|
-
onClearFilter:
|
|
2041
|
+
onApplyFilter: h[3] || (h[3] = (g, C) => o("applyFilter", g, C)),
|
|
2042
|
+
onClearFilter: h[4] || (h[4] = (g) => o("clearFilter", g)),
|
|
2044
2043
|
onOpenFilter: r,
|
|
2045
2044
|
onCloseFilter: i,
|
|
2046
|
-
"onUpdate:filters":
|
|
2045
|
+
"onUpdate:filters": h[5] || (h[5] = (g) => o("update:filters", g))
|
|
2047
2046
|
}), Te({ _: 2 }, [
|
|
2048
2047
|
Q(f.$slots, (g, C) => ({
|
|
2049
2048
|
name: C,
|
|
2050
|
-
fn: X((
|
|
2051
|
-
j(f.$slots, C, Ae({ ref_for: !0 },
|
|
2049
|
+
fn: X((R) => [
|
|
2050
|
+
j(f.$slots, C, Ae({ ref_for: !0 }, R), void 0, !0)
|
|
2052
2051
|
])
|
|
2053
2052
|
}))
|
|
2054
|
-
]), 1040, ["column", "rows", "sort-helpers", "filters", "open-filter", "header-class", "tablename"])) :
|
|
2053
|
+
]), 1040, ["column", "rows", "sort-helpers", "filters", "open-filter", "header-class", "tablename"])) : D("", !0)
|
|
2055
2054
|
], 64))), 128))
|
|
2056
2055
|
])
|
|
2057
2056
|
], 512));
|
|
@@ -2090,148 +2089,148 @@ const co = {
|
|
|
2090
2089
|
},
|
|
2091
2090
|
emits: ["row-click"],
|
|
2092
2091
|
setup(e, { emit: n }) {
|
|
2093
|
-
const t = e, o = F(() => t.rowKey ?? "id"), s =
|
|
2092
|
+
const t = e, o = F(() => t.rowKey ?? "id"), s = q(null), l = F(() => t.columns.flatMap(
|
|
2094
2093
|
(a) => "children" in a ? a.children : [a]
|
|
2095
2094
|
));
|
|
2096
|
-
return (a, r) => (y(),
|
|
2095
|
+
return (a, r) => (y(), x("tbody", {
|
|
2097
2096
|
ref_key: "bodyRef",
|
|
2098
2097
|
ref: s
|
|
2099
2098
|
}, [
|
|
2100
|
-
e.loading ? (y(),
|
|
2101
|
-
|
|
2099
|
+
e.loading ? (y(), x("tr", Qo, [
|
|
2100
|
+
b("td", {
|
|
2102
2101
|
colspan: e.totalColumns,
|
|
2103
2102
|
class: "vs-loading"
|
|
2104
2103
|
}, [
|
|
2105
|
-
r[2] || (r[2] =
|
|
2106
|
-
|
|
2104
|
+
r[2] || (r[2] = b("div", { class: "vs-spinner" }, null, -1)),
|
|
2105
|
+
b("span", null, B(e.loadingText), 1)
|
|
2107
2106
|
], 8, Yo)
|
|
2108
|
-
])) : e.paginatedRows.length ? (y(!0),
|
|
2109
|
-
key: e.getRowKey(i,
|
|
2107
|
+
])) : e.paginatedRows.length ? (y(!0), x(z, { key: 2 }, Q(e.paginatedRows, (i, u) => (y(), x(z, {
|
|
2108
|
+
key: e.getRowKey(i, u)
|
|
2110
2109
|
}, [
|
|
2111
|
-
|
|
2110
|
+
b("tr", {
|
|
2112
2111
|
class: G([
|
|
2113
2112
|
e.rowClass,
|
|
2114
2113
|
{ "vs-row-clickable": e.hasRowClick },
|
|
2115
2114
|
{ "vs-row-selected": e.isRowSelected(i, e.selectedItems, o.value) }
|
|
2116
2115
|
]),
|
|
2117
|
-
onClick: (
|
|
2116
|
+
onClick: (d) => a.$emit("row-click", i, u)
|
|
2118
2117
|
}, [
|
|
2119
|
-
e.expandable ? (y(),
|
|
2118
|
+
e.expandable ? (y(), x("td", {
|
|
2120
2119
|
key: 0,
|
|
2121
2120
|
class: "vs-expand-column",
|
|
2122
2121
|
"data-field": "_expand",
|
|
2123
2122
|
onClick: r[0] || (r[0] = pe(() => {
|
|
2124
2123
|
}, ["stop"]))
|
|
2125
2124
|
}, [
|
|
2126
|
-
|
|
2125
|
+
b("button", {
|
|
2127
2126
|
class: "vs-expand-btn",
|
|
2128
2127
|
type: "button",
|
|
2129
|
-
"aria-expanded": e.isRowExpanded(i,
|
|
2130
|
-
"aria-controls": `row-details-${e.getRowKey(i,
|
|
2131
|
-
onClick: pe((
|
|
2128
|
+
"aria-expanded": e.isRowExpanded(i, u),
|
|
2129
|
+
"aria-controls": `row-details-${e.getRowKey(i, u)}`,
|
|
2130
|
+
onClick: pe((d) => e.toggleRowExpansion(i, u), ["stop"])
|
|
2132
2131
|
}, [
|
|
2133
|
-
e.isRowExpanded(i,
|
|
2134
|
-
|
|
2132
|
+
e.isRowExpanded(i, u) ? (y(), x("span", os, [...r[4] || (r[4] = [
|
|
2133
|
+
b("svg", {
|
|
2135
2134
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2136
2135
|
height: "24px",
|
|
2137
2136
|
viewBox: "0 -960 960 960",
|
|
2138
2137
|
width: "24px",
|
|
2139
2138
|
fill: "var(--vs-gray-800)"
|
|
2140
2139
|
}, [
|
|
2141
|
-
|
|
2140
|
+
b("path", { d: "M480-345 240-585l56-56 184 183 184-183 56 56-240 240Z" })
|
|
2142
2141
|
], -1)
|
|
2143
|
-
])])) : (y(),
|
|
2144
|
-
|
|
2142
|
+
])])) : (y(), x("span", ss, [...r[5] || (r[5] = [
|
|
2143
|
+
b("svg", {
|
|
2145
2144
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2146
2145
|
height: "24px",
|
|
2147
2146
|
viewBox: "0 -960 960 960",
|
|
2148
2147
|
width: "24px",
|
|
2149
2148
|
fill: "var(--vs-gray-800)"
|
|
2150
2149
|
}, [
|
|
2151
|
-
|
|
2150
|
+
b("path", { d: "M504-480 320-664l56-56 240 240-240 240-56-56 184-184Z" })
|
|
2152
2151
|
], -1)
|
|
2153
2152
|
])]))
|
|
2154
2153
|
], 8, ns)
|
|
2155
|
-
])) :
|
|
2156
|
-
e.isItemSelectedControlled ? (y(),
|
|
2154
|
+
])) : D("", !0),
|
|
2155
|
+
e.isItemSelectedControlled ? (y(), x("td", {
|
|
2157
2156
|
key: 1,
|
|
2158
2157
|
class: "vs-checkbox-column",
|
|
2159
2158
|
"data-field": "_checkbox",
|
|
2160
2159
|
onClick: r[1] || (r[1] = pe(() => {
|
|
2161
2160
|
}, ["stop"]))
|
|
2162
2161
|
}, [
|
|
2163
|
-
|
|
2164
|
-
|
|
2162
|
+
b("div", ls, [
|
|
2163
|
+
b("input", {
|
|
2165
2164
|
type: "checkbox",
|
|
2166
|
-
id: e.tablename + "-checkbox-" + e.getRowKey(i,
|
|
2165
|
+
id: e.tablename + "-checkbox-" + e.getRowKey(i, u),
|
|
2167
2166
|
value: i,
|
|
2168
|
-
checked: e.selectedItems.some((
|
|
2169
|
-
onChange: (
|
|
2167
|
+
checked: e.selectedItems.some((d, v) => e.getRowKey(d, v) === e.getRowKey(i, u)),
|
|
2168
|
+
onChange: (d) => e.toggleRow(i, u)
|
|
2170
2169
|
}, null, 40, as),
|
|
2171
|
-
|
|
2172
|
-
for: e.tablename + "-checkbox-" + e.getRowKey(i,
|
|
2170
|
+
b("label", {
|
|
2171
|
+
for: e.tablename + "-checkbox-" + e.getRowKey(i, u)
|
|
2173
2172
|
}, null, 8, rs)
|
|
2174
2173
|
])
|
|
2175
|
-
])) :
|
|
2176
|
-
(y(!0),
|
|
2177
|
-
|
|
2178
|
-
key:
|
|
2174
|
+
])) : D("", !0),
|
|
2175
|
+
(y(!0), x(z, null, Q(l.value, (d) => (y(), x(z, null, [
|
|
2176
|
+
d && d.field ? (y(), x("td", {
|
|
2177
|
+
key: d.field,
|
|
2179
2178
|
class: G(e.cellClass),
|
|
2180
|
-
"data-field":
|
|
2179
|
+
"data-field": d.field
|
|
2181
2180
|
}, [
|
|
2182
|
-
j(a.$slots, `cell-${
|
|
2181
|
+
j(a.$slots, `cell-${d.field}`, {
|
|
2183
2182
|
item: i,
|
|
2184
|
-
value: e.getValue(i,
|
|
2185
|
-
column:
|
|
2186
|
-
index:
|
|
2183
|
+
value: e.getValue(i, d.field),
|
|
2184
|
+
column: d,
|
|
2185
|
+
index: u
|
|
2187
2186
|
}, () => [
|
|
2188
|
-
Ge(
|
|
2187
|
+
Ge(B(e.getValue(i, d.field)), 1)
|
|
2189
2188
|
], !0)
|
|
2190
|
-
], 10, is)) :
|
|
2189
|
+
], 10, is)) : D("", !0)
|
|
2191
2190
|
], 64))), 256))
|
|
2192
2191
|
], 10, ts),
|
|
2193
|
-
e.expandable ? (y(),
|
|
2194
|
-
e.isRowExpanded(i,
|
|
2195
|
-
|
|
2192
|
+
e.expandable ? (y(), x(z, { key: 0 }, [
|
|
2193
|
+
e.isRowExpanded(i, u) ? (y(), x("tr", cs, [
|
|
2194
|
+
b("td", {
|
|
2196
2195
|
colspan: e.totalColumns,
|
|
2197
2196
|
class: "vs-expanded-cell"
|
|
2198
2197
|
}, [
|
|
2199
|
-
e.isRowLoading(i,
|
|
2198
|
+
e.isRowLoading(i, u) ? j(a.$slots, "row-expanded-loader", {
|
|
2200
2199
|
key: 0,
|
|
2201
2200
|
item: i,
|
|
2202
|
-
index:
|
|
2201
|
+
index: u
|
|
2203
2202
|
}, () => [
|
|
2204
|
-
r[6] || (r[6] =
|
|
2205
|
-
|
|
2203
|
+
r[6] || (r[6] = b("div", { class: "vs-loader-bar" }, [
|
|
2204
|
+
b("div", { class: "vs-loader-bar-inner" })
|
|
2206
2205
|
], -1))
|
|
2207
|
-
], !0) : (y(),
|
|
2206
|
+
], !0) : (y(), x("div", ds, [
|
|
2208
2207
|
j(a.$slots, "row-expanded", {
|
|
2209
2208
|
item: i,
|
|
2210
|
-
index:
|
|
2209
|
+
index: u
|
|
2211
2210
|
}, () => [
|
|
2212
2211
|
r[7] || (r[7] = Ge(" Expanded details for row ", -1)),
|
|
2213
|
-
|
|
2212
|
+
b("b", null, B(e.getRowKey(i, u)), 1)
|
|
2214
2213
|
], !0)
|
|
2215
2214
|
]))
|
|
2216
2215
|
], 8, us)
|
|
2217
|
-
])) :
|
|
2218
|
-
], 64)) :
|
|
2219
|
-
], 64))), 128)) : (y(),
|
|
2220
|
-
|
|
2216
|
+
])) : D("", !0)
|
|
2217
|
+
], 64)) : D("", !0)
|
|
2218
|
+
], 64))), 128)) : (y(), x("tr", Go, [
|
|
2219
|
+
b("td", {
|
|
2221
2220
|
colspan: e.totalColumns,
|
|
2222
2221
|
class: "vs-no-data"
|
|
2223
2222
|
}, [
|
|
2224
2223
|
j(a.$slots, "no-data", {}, () => [
|
|
2225
|
-
r[3] || (r[3] =
|
|
2226
|
-
|
|
2224
|
+
r[3] || (r[3] = b("div", { class: "vs-no-data-icon" }, [
|
|
2225
|
+
b("svg", {
|
|
2227
2226
|
viewBox: "0 0 24 24",
|
|
2228
2227
|
fill: "currentColor"
|
|
2229
2228
|
}, [
|
|
2230
|
-
|
|
2229
|
+
b("path", { d: "M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-5 14H7v-2h7v2zm3-4H7v-2h10v2zm0-4H7V7h10v2z" })
|
|
2231
2230
|
])
|
|
2232
2231
|
], -1)),
|
|
2233
|
-
|
|
2234
|
-
|
|
2232
|
+
b("div", _o, B(e.noDataText), 1),
|
|
2233
|
+
b("div", es, B(e.noDataDescription), 1)
|
|
2235
2234
|
], !0)
|
|
2236
2235
|
], 8, Jo)
|
|
2237
2236
|
]))
|
|
@@ -2249,19 +2248,19 @@ const co = {
|
|
|
2249
2248
|
const l = s.target;
|
|
2250
2249
|
t("update:modelValue", l.value), t("inputTyped", l.value);
|
|
2251
2250
|
};
|
|
2252
|
-
return (s, l) => (y(),
|
|
2253
|
-
l[0] || (l[0] =
|
|
2254
|
-
|
|
2251
|
+
return (s, l) => (y(), x("div", hs, [
|
|
2252
|
+
l[0] || (l[0] = b("div", { class: "vs-search-icon" }, [
|
|
2253
|
+
b("svg", {
|
|
2255
2254
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2256
2255
|
height: "22px",
|
|
2257
2256
|
viewBox: "0 -960 960 960",
|
|
2258
2257
|
width: "22px",
|
|
2259
2258
|
fill: "#e3e3e3"
|
|
2260
2259
|
}, [
|
|
2261
|
-
|
|
2260
|
+
b("path", { d: "M784-120 532-372q-30 24-69 38t-83 14q-109 0-184.5-75.5T120-580q0-109 75.5-184.5T380-840q109 0 184.5 75.5T640-580q0 44-14 83t-38 69l252 252-56 56ZM380-400q75 0 127.5-52.5T560-580q0-75-52.5-127.5T380-760q-75 0-127.5 52.5T200-580q0 75 52.5 127.5T380-400Z" })
|
|
2262
2261
|
])
|
|
2263
2262
|
], -1)),
|
|
2264
|
-
|
|
2263
|
+
b("input", {
|
|
2265
2264
|
type: "text",
|
|
2266
2265
|
class: "vs-search-input",
|
|
2267
2266
|
placeholder: e.placeholder,
|
|
@@ -2286,19 +2285,19 @@ const co = {
|
|
|
2286
2285
|
const t = n, o = (s) => {
|
|
2287
2286
|
t("update:searchQuery", s), t("search", s);
|
|
2288
2287
|
};
|
|
2289
|
-
return (s, l) => (y(),
|
|
2290
|
-
|
|
2291
|
-
e.showSearch ? (y(),
|
|
2288
|
+
return (s, l) => (y(), x("div", ys, [
|
|
2289
|
+
b("div", ws, [
|
|
2290
|
+
e.showSearch ? (y(), x("div", bs, [
|
|
2292
2291
|
ne(gs, {
|
|
2293
2292
|
"model-value": e.searchQuery,
|
|
2294
2293
|
"onUpdate:modelValue": o,
|
|
2295
2294
|
placeholder: e.searchPlaceholder,
|
|
2296
2295
|
class: G(e.searchClass)
|
|
2297
2296
|
}, null, 8, ["model-value", "placeholder", "class"])
|
|
2298
|
-
])) :
|
|
2297
|
+
])) : D("", !0),
|
|
2299
2298
|
j(s.$slots, "left", {}, void 0, !0)
|
|
2300
2299
|
]),
|
|
2301
|
-
|
|
2300
|
+
b("div", xs, [
|
|
2302
2301
|
j(s.$slots, "right", {}, void 0, !0)
|
|
2303
2302
|
])
|
|
2304
2303
|
]));
|
|
@@ -2330,8 +2329,8 @@ const co = {
|
|
|
2330
2329
|
if (typeof a.footerValue == "function")
|
|
2331
2330
|
try {
|
|
2332
2331
|
i = a.footerValue(n.rows);
|
|
2333
|
-
} catch (
|
|
2334
|
-
console.warn(`Error computing footerValue for column "${a.field}"`,
|
|
2332
|
+
} catch (u) {
|
|
2333
|
+
console.warn(`Error computing footerValue for column "${a.field}"`, u);
|
|
2335
2334
|
}
|
|
2336
2335
|
else a.footerValue !== void 0 && (i = a.footerValue);
|
|
2337
2336
|
return {
|
|
@@ -2352,15 +2351,15 @@ const co = {
|
|
|
2352
2351
|
}
|
|
2353
2352
|
return typeof l == "number" ? s.field === "price" ? `$${l.toFixed(2)}` : s.field === "tax" ? l.toFixed(2) : l.toLocaleString() : String(l);
|
|
2354
2353
|
}
|
|
2355
|
-
return (s, l) => t.value.length ? (y(),
|
|
2356
|
-
|
|
2357
|
-
e.expandable ? (y(),
|
|
2358
|
-
e.isItemSelectedControlled ? (y(),
|
|
2359
|
-
(y(!0),
|
|
2354
|
+
return (s, l) => t.value.length ? (y(), x("tfoot", Ss, [
|
|
2355
|
+
b("tr", Rs, [
|
|
2356
|
+
e.expandable ? (y(), x("td", Es)) : D("", !0),
|
|
2357
|
+
e.isItemSelectedControlled ? (y(), x("td", $s)) : D("", !0),
|
|
2358
|
+
(y(!0), x(z, null, Q(t.value, (a, r) => (y(), x("td", {
|
|
2360
2359
|
key: r,
|
|
2361
2360
|
"data-field": a.field,
|
|
2362
2361
|
class: G(["vs-footer-cell", a.footerClass || ""]),
|
|
2363
|
-
style:
|
|
2362
|
+
style: pt(a.footerStyle || {})
|
|
2364
2363
|
}, [
|
|
2365
2364
|
a.hasFooter ? j(s.$slots, `footer-${a.field}`, {
|
|
2366
2365
|
key: 0,
|
|
@@ -2368,19 +2367,25 @@ const co = {
|
|
|
2368
2367
|
value: a.footerValue,
|
|
2369
2368
|
rows: e.rows
|
|
2370
2369
|
}, () => [
|
|
2371
|
-
Ge(
|
|
2372
|
-
], !0) :
|
|
2370
|
+
Ge(B(a.formattedValue), 1)
|
|
2371
|
+
], !0) : D("", !0)
|
|
2373
2372
|
], 14, As))), 128))
|
|
2374
2373
|
])
|
|
2375
|
-
])) :
|
|
2374
|
+
])) : D("", !0);
|
|
2376
2375
|
}
|
|
2377
2376
|
}), Ts = /* @__PURE__ */ ae(Fs, [["__scopeId", "data-v-f3b614d3"]]);
|
|
2378
2377
|
function Os(e, n, t) {
|
|
2379
|
-
const o =
|
|
2380
|
-
Y(
|
|
2381
|
-
|
|
2382
|
-
|
|
2383
|
-
|
|
2378
|
+
const o = q(1), s = q(e.sort ? [...e.sort] : []);
|
|
2379
|
+
Y(
|
|
2380
|
+
() => e.sort,
|
|
2381
|
+
(v) => {
|
|
2382
|
+
v && (s.value = [...v]);
|
|
2383
|
+
},
|
|
2384
|
+
{ deep: !0 }
|
|
2385
|
+
);
|
|
2386
|
+
const l = F(
|
|
2387
|
+
() => e.serverOptions?.sort ?? s.value ?? []
|
|
2388
|
+
);
|
|
2384
2389
|
return {
|
|
2385
2390
|
activeSort: l,
|
|
2386
2391
|
sortHelpers: {
|
|
@@ -2392,8 +2397,8 @@ function Os(e, n, t) {
|
|
|
2392
2397
|
getSortOrder: (v) => l.value.find((m) => m.field === v)?.order ?? null,
|
|
2393
2398
|
handleSort: (v, m) => {
|
|
2394
2399
|
let f = [...s.value];
|
|
2395
|
-
const
|
|
2396
|
-
m.shiftKey ?
|
|
2400
|
+
const h = f.findIndex((c) => c.field === v);
|
|
2401
|
+
m.shiftKey ? h === -1 ? f.push({ field: v, order: "asc" }) : f[h]?.order === "asc" ? f[h].order = "desc" : f.splice(h, 1) : h === -1 ? f = [{ field: v, order: "asc" }] : f[h]?.order === "asc" ? f = [{ field: v, order: "desc" }] : f = [], f = f.map((c, g) => ({ ...c, priority: g + 1 })), s.value = [...f], e.serverOptions ? n("update:serverOptions", { ...e.serverOptions, sort: f }) : n("update:sort", f), t.value = o.value, n("sortChanged", { sort: f });
|
|
2397
2402
|
}
|
|
2398
2403
|
}
|
|
2399
2404
|
};
|
|
@@ -2401,19 +2406,19 @@ function Os(e, n, t) {
|
|
|
2401
2406
|
function Vs(e, n, t, o, s) {
|
|
2402
2407
|
const l = F({
|
|
2403
2408
|
get: () => e.serverItemsLength !== void 0 ? e.serverItemsLength : s.value.length,
|
|
2404
|
-
set: (
|
|
2405
|
-
console.log("serverItemsLength: ",
|
|
2409
|
+
set: (d) => {
|
|
2410
|
+
console.log("serverItemsLength: ", d), e.serverItemsLength !== void 0 && n("update:serverItemsLength", d);
|
|
2406
2411
|
}
|
|
2407
2412
|
}), a = F({
|
|
2408
2413
|
get: () => e.serverOptions?.page ?? t.value,
|
|
2409
|
-
set: (
|
|
2410
|
-
e.serverOptions ? n("update:serverOptions", { ...e.serverOptions, page:
|
|
2414
|
+
set: (d) => {
|
|
2415
|
+
e.serverOptions ? n("update:serverOptions", { ...e.serverOptions, page: d }) : t.value = d;
|
|
2411
2416
|
}
|
|
2412
2417
|
}), r = F(() => {
|
|
2413
|
-
const
|
|
2414
|
-
return
|
|
2415
|
-
}), i = (
|
|
2416
|
-
e.serverOptions && n("update:serverOptions", { ...e.serverOptions, page:
|
|
2418
|
+
const d = o.value;
|
|
2419
|
+
return Wt(t.value, d, l.value);
|
|
2420
|
+
}), i = (d) => {
|
|
2421
|
+
e.serverOptions && n("update:serverOptions", { ...e.serverOptions, page: d }), n("pageUpdated", d);
|
|
2417
2422
|
};
|
|
2418
2423
|
return {
|
|
2419
2424
|
currentPage: a,
|
|
@@ -2434,7 +2439,7 @@ function Ls(e, n, t, o) {
|
|
|
2434
2439
|
set: (a) => o.value = a
|
|
2435
2440
|
});
|
|
2436
2441
|
return Y(o, (a) => {
|
|
2437
|
-
const r = e.serverItemsLength ?? e.rows.length, i =
|
|
2442
|
+
const r = e.serverItemsLength ?? e.rows.length, i = wt(r, a);
|
|
2438
2443
|
t.value > i ? t.value = i || 1 : t.value < 1 && (t.value = 1);
|
|
2439
2444
|
}), {
|
|
2440
2445
|
vsRowsPerPage: s,
|
|
@@ -2443,7 +2448,7 @@ function Ls(e, n, t, o) {
|
|
|
2443
2448
|
}
|
|
2444
2449
|
};
|
|
2445
2450
|
}
|
|
2446
|
-
function
|
|
2451
|
+
function Ds(e, n) {
|
|
2447
2452
|
const t = (a) => {
|
|
2448
2453
|
n.value = a, e("inputTyped", a);
|
|
2449
2454
|
};
|
|
@@ -2462,114 +2467,118 @@ function Ps(e, n) {
|
|
|
2462
2467
|
}
|
|
2463
2468
|
};
|
|
2464
2469
|
}
|
|
2465
|
-
function
|
|
2466
|
-
const t =
|
|
2470
|
+
function Ps(e, n) {
|
|
2471
|
+
const t = q([]), o = q(/* @__PURE__ */ new Map()), s = F({
|
|
2467
2472
|
get: () => e.expanded ?? t.value,
|
|
2468
|
-
set: (
|
|
2469
|
-
e.expanded !== void 0 ? n("update:expanded",
|
|
2473
|
+
set: (d) => {
|
|
2474
|
+
e.expanded !== void 0 ? n("update:expanded", d) : t.value = d;
|
|
2470
2475
|
}
|
|
2471
2476
|
});
|
|
2472
|
-
function l(
|
|
2473
|
-
return typeof e.rowKey == "function" ? e.rowKey(
|
|
2477
|
+
function l(d, v) {
|
|
2478
|
+
return typeof e.rowKey == "function" ? e.rowKey(d, v) : typeof e.rowKey == "string" && d[e.rowKey] !== void 0 ? d[e.rowKey] : v;
|
|
2474
2479
|
}
|
|
2475
|
-
function a(
|
|
2476
|
-
const m = l(
|
|
2480
|
+
function a(d, v) {
|
|
2481
|
+
const m = l(d, v);
|
|
2477
2482
|
return s.value.includes(m);
|
|
2478
2483
|
}
|
|
2479
|
-
function r(
|
|
2480
|
-
const m = l(
|
|
2481
|
-
let
|
|
2482
|
-
f ? (
|
|
2484
|
+
function r(d, v) {
|
|
2485
|
+
const m = l(d, v), f = s.value.includes(m);
|
|
2486
|
+
let h;
|
|
2487
|
+
f ? (h = s.value.filter((c) => c !== m), n("collapseRow", { row: d, index: v, rowId: m })) : (h = e.accordion ? [m] : [...s.value, m], n("expandRow", { row: d, index: v, rowId: m })), s.value = h;
|
|
2483
2488
|
}
|
|
2484
|
-
function i(
|
|
2485
|
-
const m = l(
|
|
2489
|
+
function i(d, v) {
|
|
2490
|
+
const m = l(d, v);
|
|
2486
2491
|
return o.value.get(m) === !0;
|
|
2487
2492
|
}
|
|
2488
|
-
function
|
|
2489
|
-
o.value.set(
|
|
2493
|
+
function u(d, v) {
|
|
2494
|
+
o.value.set(d, v);
|
|
2490
2495
|
}
|
|
2491
2496
|
return {
|
|
2492
2497
|
expandedRows: s,
|
|
2493
2498
|
isRowExpanded: a,
|
|
2494
2499
|
toggleRowExpansion: r,
|
|
2495
2500
|
getRowId: l,
|
|
2496
|
-
setRowLoading:
|
|
2501
|
+
setRowLoading: u,
|
|
2497
2502
|
isRowLoading: i
|
|
2498
2503
|
};
|
|
2499
2504
|
}
|
|
2500
2505
|
function Is(e, n, t) {
|
|
2501
|
-
const o =
|
|
2502
|
-
if (!i.field)
|
|
2503
|
-
|
|
2504
|
-
|
|
2505
|
-
|
|
2506
|
-
return !0;
|
|
2507
|
-
const u = r[i.field];
|
|
2506
|
+
const o = q({}), s = F(() => t?.serverMode ? e.value : e.value.filter((r) => n.every((i) => {
|
|
2507
|
+
if (!i.field) return !0;
|
|
2508
|
+
const u = o.value[i.field];
|
|
2509
|
+
if (!u || !u.type) return !0;
|
|
2510
|
+
const d = r[i.field];
|
|
2508
2511
|
if (i.filter?.filterFn)
|
|
2509
|
-
return i.filter.filterFn(
|
|
2510
|
-
if (
|
|
2512
|
+
return i.filter.filterFn(d, u.value, r);
|
|
2513
|
+
if (u.type === "custom" && i.filter?.filterKey) {
|
|
2511
2514
|
const m = Be[i.filter.filterKey];
|
|
2512
|
-
return typeof m == "function" ? m(r, i.field,
|
|
2515
|
+
return typeof m == "function" ? m(r, i.field, u) : !0;
|
|
2513
2516
|
}
|
|
2514
|
-
const v = Be[
|
|
2515
|
-
return typeof v == "function" ? v(r, i.field,
|
|
2517
|
+
const v = Be[u.type];
|
|
2518
|
+
return typeof v == "function" ? v(r, i.field, u) : !0;
|
|
2516
2519
|
})));
|
|
2517
|
-
Y(
|
|
2518
|
-
|
|
2519
|
-
|
|
2520
|
-
|
|
2521
|
-
|
|
2522
|
-
|
|
2523
|
-
|
|
2524
|
-
|
|
2525
|
-
|
|
2526
|
-
|
|
2527
|
-
case "text":
|
|
2528
|
-
c[u] = {
|
|
2529
|
-
...m,
|
|
2530
|
-
value: v.value ?? null
|
|
2520
|
+
Y(
|
|
2521
|
+
o,
|
|
2522
|
+
(r) => {
|
|
2523
|
+
if (t?.serverMode && t.onServerFilter) {
|
|
2524
|
+
const i = Object.entries(r).reduce(
|
|
2525
|
+
(u, [d, v]) => {
|
|
2526
|
+
if (!v?.type) return u;
|
|
2527
|
+
const m = {
|
|
2528
|
+
type: v.type,
|
|
2529
|
+
operator: v.operator
|
|
2531
2530
|
};
|
|
2532
|
-
|
|
2533
|
-
|
|
2534
|
-
|
|
2535
|
-
|
|
2536
|
-
|
|
2537
|
-
|
|
2538
|
-
|
|
2539
|
-
|
|
2540
|
-
|
|
2541
|
-
|
|
2542
|
-
|
|
2543
|
-
|
|
2544
|
-
|
|
2545
|
-
|
|
2546
|
-
|
|
2547
|
-
|
|
2548
|
-
|
|
2549
|
-
|
|
2550
|
-
|
|
2551
|
-
|
|
2552
|
-
|
|
2553
|
-
|
|
2554
|
-
|
|
2555
|
-
|
|
2556
|
-
|
|
2557
|
-
|
|
2558
|
-
|
|
2559
|
-
|
|
2560
|
-
|
|
2561
|
-
|
|
2562
|
-
|
|
2563
|
-
|
|
2564
|
-
|
|
2565
|
-
|
|
2566
|
-
|
|
2567
|
-
|
|
2568
|
-
|
|
2569
|
-
|
|
2531
|
+
switch (v.type) {
|
|
2532
|
+
case "text":
|
|
2533
|
+
u[d] = {
|
|
2534
|
+
...m,
|
|
2535
|
+
value: v.value ?? null
|
|
2536
|
+
};
|
|
2537
|
+
break;
|
|
2538
|
+
case "multi-select":
|
|
2539
|
+
u[d] = {
|
|
2540
|
+
...m,
|
|
2541
|
+
value: v.value ?? []
|
|
2542
|
+
};
|
|
2543
|
+
break;
|
|
2544
|
+
case "number-range":
|
|
2545
|
+
u[d] = {
|
|
2546
|
+
...m,
|
|
2547
|
+
value: v.value ?? null,
|
|
2548
|
+
min: v.min ?? null,
|
|
2549
|
+
max: v.max ?? null
|
|
2550
|
+
};
|
|
2551
|
+
break;
|
|
2552
|
+
case "date-range":
|
|
2553
|
+
u[d] = {
|
|
2554
|
+
...m,
|
|
2555
|
+
value: v.value ?? null,
|
|
2556
|
+
start: v.start ?? null,
|
|
2557
|
+
end: v.end ?? null
|
|
2558
|
+
};
|
|
2559
|
+
break;
|
|
2560
|
+
case "custom":
|
|
2561
|
+
u[d] = {
|
|
2562
|
+
...m,
|
|
2563
|
+
value: v.value,
|
|
2564
|
+
filterKey: v.filterKey
|
|
2565
|
+
};
|
|
2566
|
+
break;
|
|
2567
|
+
}
|
|
2568
|
+
return u;
|
|
2569
|
+
},
|
|
2570
|
+
{}
|
|
2571
|
+
);
|
|
2572
|
+
t.onServerFilter(i);
|
|
2573
|
+
}
|
|
2574
|
+
},
|
|
2575
|
+
{ deep: !0 }
|
|
2576
|
+
);
|
|
2577
|
+
function l(r, i, u) {
|
|
2578
|
+
i ? o.value[r] = we(i.type, i) : u && (o.value[r] = we(u));
|
|
2570
2579
|
}
|
|
2571
2580
|
function a(r, i) {
|
|
2572
|
-
i ? o.value[r] =
|
|
2581
|
+
i ? o.value[r] = we(i) : delete o.value[r];
|
|
2573
2582
|
}
|
|
2574
2583
|
return {
|
|
2575
2584
|
filters: o,
|
|
@@ -2582,55 +2591,50 @@ function qs(e, n = {}) {
|
|
|
2582
2591
|
const { enabled: t = !1, maxHeight: o = "calc(100vh - 250px)" } = n;
|
|
2583
2592
|
let s = null, l = null;
|
|
2584
2593
|
const a = () => {
|
|
2585
|
-
const
|
|
2586
|
-
if (!t || !
|
|
2587
|
-
|
|
2588
|
-
|
|
2589
|
-
!u || !v || (c.parentElement?.classList.contains("vs-table-wrapper") ? s = c.parentElement : (s = document.createElement("div"), s.classList.add("vs-table-wrapper"), c.parentNode?.insertBefore(s, c), s.appendChild(c)), Object.assign(s.style, {
|
|
2594
|
+
const u = e.value;
|
|
2595
|
+
if (!t || !u) return;
|
|
2596
|
+
const d = u.querySelector("thead"), v = u.querySelector("tbody");
|
|
2597
|
+
!d || !v || (u.parentElement?.classList.contains("vs-table-wrapper") ? s = u.parentElement : (s = document.createElement("div"), s.classList.add("vs-table-wrapper"), u.parentNode?.insertBefore(s, u), s.appendChild(u)), Object.assign(s.style, {
|
|
2590
2598
|
overflowY: "auto",
|
|
2591
2599
|
overflowX: "auto",
|
|
2592
2600
|
position: "relative",
|
|
2593
2601
|
maxHeight: typeof o == "number" ? `${o}px` : o
|
|
2594
|
-
}), Object.assign(
|
|
2602
|
+
}), Object.assign(d.style, {
|
|
2595
2603
|
position: "sticky",
|
|
2596
2604
|
top: "0",
|
|
2597
2605
|
zIndex: "5",
|
|
2598
2606
|
background: "var(--vs-table-header-bg, #fff)"
|
|
2599
2607
|
}), l || (l = new ResizeObserver(() => {
|
|
2600
2608
|
r();
|
|
2601
|
-
}), l.observe(
|
|
2609
|
+
}), l.observe(u)), r());
|
|
2602
2610
|
}, r = () => {
|
|
2603
|
-
const
|
|
2604
|
-
if (!
|
|
2605
|
-
|
|
2606
|
-
|
|
2607
|
-
|
|
2608
|
-
|
|
2609
|
-
const
|
|
2610
|
-
if (!f)
|
|
2611
|
-
|
|
2612
|
-
|
|
2613
|
-
|
|
2614
|
-
|
|
2615
|
-
const h = [];
|
|
2616
|
-
m.forEach((g) => {
|
|
2617
|
-
Array.from(g.querySelectorAll("th")).forEach((S) => {
|
|
2618
|
-
parseInt(S.getAttribute("colspan") || "1", 10) === 1 && h.push(S);
|
|
2611
|
+
const u = e.value;
|
|
2612
|
+
if (!u) return;
|
|
2613
|
+
const d = u.querySelector("thead"), v = u.querySelector("tbody");
|
|
2614
|
+
if (!d || !v) return;
|
|
2615
|
+
const m = Array.from(d.querySelectorAll("tr")), f = v.querySelector("tr");
|
|
2616
|
+
if (!f) return;
|
|
2617
|
+
const h = Array.from(f.querySelectorAll("td"));
|
|
2618
|
+
if (!h.length || h.length === 1 || f.querySelector(".vs-no-data") != null) return;
|
|
2619
|
+
const g = [];
|
|
2620
|
+
m.forEach((C) => {
|
|
2621
|
+
Array.from(C.querySelectorAll("th")).forEach((E) => {
|
|
2622
|
+
parseInt(E.getAttribute("colspan") || "1", 10) === 1 && g.push(E);
|
|
2619
2623
|
});
|
|
2620
|
-
}),
|
|
2621
|
-
const
|
|
2622
|
-
|
|
2623
|
-
}), m.forEach((
|
|
2624
|
-
Array.from(
|
|
2625
|
-
const
|
|
2626
|
-
if (
|
|
2627
|
-
let
|
|
2628
|
-
const
|
|
2629
|
-
for (let
|
|
2630
|
-
const
|
|
2631
|
-
|
|
2624
|
+
}), g.forEach((C, R) => {
|
|
2625
|
+
const E = h[R];
|
|
2626
|
+
E && (C.style.width = `${E.offsetWidth}px`);
|
|
2627
|
+
}), m.forEach((C) => {
|
|
2628
|
+
Array.from(C.querySelectorAll("th")).forEach((E) => {
|
|
2629
|
+
const V = parseInt(E.getAttribute("colspan") || "1", 10);
|
|
2630
|
+
if (V > 1) {
|
|
2631
|
+
let T = 0;
|
|
2632
|
+
const W = Array.from(C.children).indexOf(E);
|
|
2633
|
+
for (let S = 0; S < V; S++) {
|
|
2634
|
+
const k = h[W + S];
|
|
2635
|
+
k && (T += k.offsetWidth);
|
|
2632
2636
|
}
|
|
2633
|
-
|
|
2637
|
+
T > 0 && (E.style.width = `${T}px`);
|
|
2634
2638
|
}
|
|
2635
2639
|
});
|
|
2636
2640
|
});
|
|
@@ -2641,65 +2645,73 @@ function qs(e, n = {}) {
|
|
|
2641
2645
|
t && (await oe(), a());
|
|
2642
2646
|
}), He(() => {
|
|
2643
2647
|
i();
|
|
2644
|
-
}), Y(
|
|
2645
|
-
|
|
2646
|
-
|
|
2648
|
+
}), Y(
|
|
2649
|
+
() => t,
|
|
2650
|
+
async (u) => {
|
|
2651
|
+
await oe(), u ? a() : i();
|
|
2652
|
+
}
|
|
2653
|
+
), {
|
|
2647
2654
|
refresh: a,
|
|
2648
2655
|
cleanup: i
|
|
2649
2656
|
};
|
|
2650
2657
|
}
|
|
2651
2658
|
function Ms(e, n = {}) {
|
|
2652
|
-
const {
|
|
2653
|
-
|
|
2654
|
-
|
|
2659
|
+
const {
|
|
2660
|
+
enabled: t = !1,
|
|
2661
|
+
maxHeight: o = "calc(100vh - 250px)",
|
|
2662
|
+
debounceMs: s = 100
|
|
2663
|
+
} = n;
|
|
2664
|
+
let l = null, a = null, r = null, i = !1, u = !1, d = null;
|
|
2665
|
+
const m = ((c, g = 100) => {
|
|
2655
2666
|
let C = null;
|
|
2656
|
-
return (...
|
|
2657
|
-
C && clearTimeout(C), C = window.setTimeout(() =>
|
|
2667
|
+
return (...R) => {
|
|
2668
|
+
C && clearTimeout(C), C = window.setTimeout(() => c(...R), g);
|
|
2658
2669
|
};
|
|
2659
2670
|
})(() => {
|
|
2660
2671
|
i || (i = !0, cancelAnimationFrame(r), r = requestAnimationFrame(() => {
|
|
2661
|
-
const
|
|
2662
|
-
if (!
|
|
2663
|
-
|
|
2664
|
-
|
|
2665
|
-
|
|
2672
|
+
const c = e.value;
|
|
2673
|
+
if (!c) return;
|
|
2674
|
+
const g = c.querySelector("tfoot"), C = c.querySelector("tbody");
|
|
2675
|
+
if (!g || !C) return;
|
|
2676
|
+
const R = g.querySelector("tr"), E = C.querySelector("tr");
|
|
2677
|
+
if (!R || !E) {
|
|
2678
|
+
i = !1;
|
|
2666
2679
|
return;
|
|
2667
|
-
|
|
2668
|
-
|
|
2680
|
+
}
|
|
2681
|
+
const V = Array.from(R.querySelectorAll("td, th")), T = Array.from(E.querySelectorAll("td"));
|
|
2682
|
+
if (!V.length || !T.length) {
|
|
2669
2683
|
i = !1;
|
|
2670
2684
|
return;
|
|
2671
2685
|
}
|
|
2672
|
-
|
|
2673
|
-
if (!V.length || !L.length) {
|
|
2686
|
+
if (T.length === 1 || E.querySelector(".vs-no-data") != null) {
|
|
2674
2687
|
i = !1;
|
|
2675
2688
|
return;
|
|
2676
2689
|
}
|
|
2677
|
-
let
|
|
2678
|
-
V.forEach((
|
|
2679
|
-
const
|
|
2680
|
-
if (
|
|
2681
|
-
const
|
|
2682
|
-
if (
|
|
2683
|
-
const
|
|
2684
|
-
|
|
2690
|
+
let S = 0;
|
|
2691
|
+
V.forEach((k) => {
|
|
2692
|
+
const w = parseInt(k.getAttribute("colspan") || "1", 10);
|
|
2693
|
+
if (w === 1) {
|
|
2694
|
+
const p = T[S];
|
|
2695
|
+
if (p) {
|
|
2696
|
+
const A = p.offsetWidth;
|
|
2697
|
+
k.offsetWidth !== A && (k.style.width = `${A}px`, k.style.minWidth = `${A}px`);
|
|
2685
2698
|
}
|
|
2686
|
-
|
|
2699
|
+
S += 1;
|
|
2687
2700
|
} else {
|
|
2688
|
-
let
|
|
2689
|
-
for (let
|
|
2690
|
-
const
|
|
2691
|
-
|
|
2701
|
+
let p = 0;
|
|
2702
|
+
for (let A = 0; A < w; A++) {
|
|
2703
|
+
const P = T[S + A];
|
|
2704
|
+
P && (p += P.offsetWidth);
|
|
2692
2705
|
}
|
|
2693
|
-
|
|
2706
|
+
p > 0 && k.offsetWidth !== p && (k.style.width = `${p}px`, k.style.minWidth = `${p}px`), S += w;
|
|
2694
2707
|
}
|
|
2695
2708
|
}), i = !1;
|
|
2696
2709
|
}));
|
|
2697
2710
|
}, s), f = () => {
|
|
2698
|
-
const
|
|
2699
|
-
if (!t || !
|
|
2700
|
-
|
|
2701
|
-
|
|
2702
|
-
!g || !C || (h.parentElement?.classList.contains("vs-table-wrapper") ? l = h.parentElement : (l = document.createElement("div"), l.classList.add("vs-table-wrapper"), h.parentNode?.insertBefore(l, h), l.appendChild(h)), Object.assign(l.style, {
|
|
2711
|
+
const c = e.value;
|
|
2712
|
+
if (!t || !c) return;
|
|
2713
|
+
const g = c.querySelector("tfoot"), C = c.querySelector("tbody"), R = c.querySelector("thead");
|
|
2714
|
+
!g || !C || (c.parentElement?.classList.contains("vs-table-wrapper") ? l = c.parentElement : (l = document.createElement("div"), l.classList.add("vs-table-wrapper"), c.parentNode?.insertBefore(l, c), l.appendChild(c)), Object.assign(l.style, {
|
|
2703
2715
|
overflowY: "auto",
|
|
2704
2716
|
overflowX: "auto",
|
|
2705
2717
|
position: "relative",
|
|
@@ -2709,103 +2721,130 @@ function Ms(e, n = {}) {
|
|
|
2709
2721
|
bottom: "0",
|
|
2710
2722
|
zIndex: "5",
|
|
2711
2723
|
background: "var(--vs-table-footer-bg, var(--vs-table-header-bg, #fff))"
|
|
2712
|
-
}), !
|
|
2724
|
+
}), !u && R && (d = () => {
|
|
2713
2725
|
const E = l.scrollLeft;
|
|
2714
|
-
|
|
2715
|
-
}, l.addEventListener("scroll",
|
|
2726
|
+
R.scrollLeft = E, g.scrollLeft = E;
|
|
2727
|
+
}, l.addEventListener("scroll", d), u = !0), a || (a = new ResizeObserver(() => {
|
|
2716
2728
|
m();
|
|
2717
|
-
}), a.observe(
|
|
2718
|
-
},
|
|
2719
|
-
cancelAnimationFrame(r), a && (a.disconnect(), a = null), l &&
|
|
2720
|
-
const
|
|
2721
|
-
if (
|
|
2722
|
-
const g =
|
|
2729
|
+
}), a.observe(c)), m());
|
|
2730
|
+
}, h = () => {
|
|
2731
|
+
cancelAnimationFrame(r), a && (a.disconnect(), a = null), l && d && u && (l.removeEventListener("scroll", d), u = !1);
|
|
2732
|
+
const c = e.value;
|
|
2733
|
+
if (c) {
|
|
2734
|
+
const g = c.querySelector("tfoot");
|
|
2723
2735
|
g && (g.style.position = "", g.style.bottom = "", g.style.zIndex = "", g.style.background = "");
|
|
2724
2736
|
}
|
|
2725
2737
|
};
|
|
2726
2738
|
return Re(async () => {
|
|
2727
2739
|
t && (await oe(), f());
|
|
2728
|
-
}), He(
|
|
2729
|
-
|
|
2730
|
-
|
|
2740
|
+
}), He(h), Y(
|
|
2741
|
+
() => t,
|
|
2742
|
+
async (c) => {
|
|
2743
|
+
await oe(), c ? f() : h();
|
|
2744
|
+
}
|
|
2745
|
+
), {
|
|
2731
2746
|
refresh: m,
|
|
2732
|
-
cleanup:
|
|
2747
|
+
cleanup: h
|
|
2733
2748
|
};
|
|
2734
2749
|
}
|
|
2735
2750
|
function Bs(e, n, t = {}, o) {
|
|
2736
|
-
const s = o || (Fe(e.rows) ? e.rows :
|
|
2737
|
-
|
|
2738
|
-
|
|
2739
|
-
|
|
2751
|
+
const s = o || (Fe(e.rows) ? e.rows : gt(e.rows)), l = q(1), a = q(e.serverOptions?.rowsPerPage ?? e.rowsPerPage), r = q(""), i = q(), u = q(null), d = q(), { isRowExpanded: v, toggleRowExpansion: m, getRowId: f, setRowLoading: h, isRowLoading: c } = Ps(e, n), { filters: g, filteredData: C, setFilter: R, clearFilter: E } = Is(
|
|
2752
|
+
F(() => $(s)),
|
|
2753
|
+
Kt($(e.columns)),
|
|
2754
|
+
{
|
|
2755
|
+
serverMode: !!e.serverOptions,
|
|
2756
|
+
onServerFilter(I) {
|
|
2757
|
+
n("filterChange", I);
|
|
2758
|
+
}
|
|
2740
2759
|
}
|
|
2741
|
-
|
|
2742
|
-
|
|
2743
|
-
|
|
2744
|
-
|
|
2745
|
-
|
|
2746
|
-
|
|
2760
|
+
), { activeSort: V, sortHelpers: T } = Os(e, n, l), { onInputTyped: W } = Ds(n, r), { totalRecords: S, recordRange: k, handlePageChange: w } = Vs(
|
|
2761
|
+
e,
|
|
2762
|
+
n,
|
|
2763
|
+
l,
|
|
2764
|
+
a,
|
|
2765
|
+
F(() => N.value)
|
|
2766
|
+
), { handleRowsPerPage: p } = Ls(e, n, l, a), { header: A = !0, footer: P = !0, maxHeight: L = "calc(100vh - 100px)" } = t, O = qs(d, { enabled: A, maxHeight: L }), H = Ms(d, { enabled: P, maxHeight: L }), M = F(() => {
|
|
2767
|
+
let I = C.value;
|
|
2768
|
+
return e.serverOptions || r.value && (I = lt(I, r.value)), I;
|
|
2769
|
+
}), N = F(() => {
|
|
2770
|
+
let I = M.value;
|
|
2771
|
+
return e.serverOptions || (r.value && (I = lt(I, r.value)), V.value.length && (I = Ht(I, V.value))), I = I.map((ve, Ze) => ({
|
|
2747
2772
|
...ve,
|
|
2748
2773
|
isExpanded: v(ve, Ze)
|
|
2749
|
-
})),
|
|
2774
|
+
})), I;
|
|
2750
2775
|
});
|
|
2751
2776
|
Y([g, r], () => l.value = 1, { deep: !0 });
|
|
2752
|
-
const
|
|
2753
|
-
return Y(s, (
|
|
2754
|
-
Array.isArray(
|
|
2777
|
+
const K = F(() => e.serverOptions ? N.value : Nt(N.value, l.value, a.value));
|
|
2778
|
+
return Y(s, (I) => {
|
|
2779
|
+
Array.isArray(I) && I.length > 1e3 && console.log(`[useDataTable] Large dataset updated (${I.length} rows)`);
|
|
2755
2780
|
}), {
|
|
2756
2781
|
// Pagination
|
|
2757
2782
|
page: l,
|
|
2758
|
-
totalRecords:
|
|
2759
|
-
recordRange:
|
|
2760
|
-
handlePageChange:
|
|
2783
|
+
totalRecords: S,
|
|
2784
|
+
recordRange: k,
|
|
2785
|
+
handlePageChange: w,
|
|
2761
2786
|
rowsPerPage: a,
|
|
2762
|
-
handleRowsPerPage:
|
|
2787
|
+
handleRowsPerPage: p,
|
|
2763
2788
|
// Sorting
|
|
2764
|
-
processedRows:
|
|
2765
|
-
paginatedRows:
|
|
2766
|
-
sortHelpers:
|
|
2789
|
+
processedRows: N,
|
|
2790
|
+
paginatedRows: K,
|
|
2791
|
+
sortHelpers: T,
|
|
2767
2792
|
// Search
|
|
2768
2793
|
searchQuery: r,
|
|
2769
|
-
onInputTyped:
|
|
2794
|
+
onInputTyped: W,
|
|
2770
2795
|
// Expandable
|
|
2771
2796
|
isRowExpanded: v,
|
|
2772
2797
|
toggleRowExpansion: m,
|
|
2773
2798
|
getRowId: f,
|
|
2774
|
-
setRowLoading:
|
|
2775
|
-
isRowLoading:
|
|
2799
|
+
setRowLoading: h,
|
|
2800
|
+
isRowLoading: c,
|
|
2776
2801
|
// Column filters
|
|
2777
2802
|
filters: g,
|
|
2778
2803
|
filteredData: C,
|
|
2779
|
-
setFilter:
|
|
2804
|
+
setFilter: R,
|
|
2780
2805
|
clearFilter: E,
|
|
2781
2806
|
// Table Ref
|
|
2782
2807
|
tableContainer: i,
|
|
2783
|
-
tableResponsiveRef:
|
|
2784
|
-
tableRef:
|
|
2808
|
+
tableResponsiveRef: u,
|
|
2809
|
+
tableRef: d,
|
|
2785
2810
|
// Sticky Header and Footer
|
|
2786
2811
|
refresh() {
|
|
2787
|
-
O.refresh?.(),
|
|
2812
|
+
O.refresh?.(), H.refresh?.();
|
|
2788
2813
|
},
|
|
2789
2814
|
cleanup() {
|
|
2790
|
-
O.cleanup?.(),
|
|
2815
|
+
O.cleanup?.(), H.cleanup?.();
|
|
2791
2816
|
}
|
|
2792
2817
|
};
|
|
2793
2818
|
}
|
|
2794
2819
|
function Hs(e, n) {
|
|
2795
|
-
const t =
|
|
2796
|
-
Y(
|
|
2797
|
-
|
|
2798
|
-
|
|
2820
|
+
const t = q(e.itemSelected || []);
|
|
2821
|
+
Y(
|
|
2822
|
+
() => e.itemSelected,
|
|
2823
|
+
(c) => {
|
|
2824
|
+
c ? t.value = [...c] : t.value = [];
|
|
2825
|
+
},
|
|
2826
|
+
{ immediate: !0, deep: !0 }
|
|
2827
|
+
);
|
|
2799
2828
|
const o = F({
|
|
2800
2829
|
get: () => t.value,
|
|
2801
|
-
set: (
|
|
2802
|
-
t.value =
|
|
2830
|
+
set: (c) => {
|
|
2831
|
+
t.value = c, n("update:itemSelected", c);
|
|
2803
2832
|
}
|
|
2804
|
-
}), s = F(() => e.itemSelected !== null), l = F(
|
|
2805
|
-
|
|
2806
|
-
|
|
2807
|
-
|
|
2808
|
-
|
|
2833
|
+
}), s = F(() => e.itemSelected !== null), l = F(
|
|
2834
|
+
() => e.rows.length > 0 && o.value.length === e.rows.length
|
|
2835
|
+
), a = F(() => !e.rows.length || !o.value.length ? !1 : !l.value && e.rows.some(
|
|
2836
|
+
(c, g) => o.value.some(
|
|
2837
|
+
(C, R) => re(C, R, e.rowKey) === re(c, g, e.rowKey)
|
|
2838
|
+
)
|
|
2839
|
+
)), r = (c, g) => {
|
|
2840
|
+
const C = re(c, g, e.rowKey);
|
|
2841
|
+
o.value.some(
|
|
2842
|
+
(E, V) => re(E, V, e.rowKey) === C
|
|
2843
|
+
) ? (o.value = o.value.filter(
|
|
2844
|
+
(E, V) => re(E, V, e.rowKey) !== C
|
|
2845
|
+
), n("rowDeselected", c, g)) : (o.value = [...o.value, c], n("rowSelected", c, g));
|
|
2846
|
+
}, i = (c) => {
|
|
2847
|
+
const g = c.target;
|
|
2809
2848
|
o.value = g.checked ? [...e.rows] : [], n("allRowsSelected", o.value);
|
|
2810
2849
|
};
|
|
2811
2850
|
return {
|
|
@@ -2815,12 +2854,14 @@ function Hs(e, n) {
|
|
|
2815
2854
|
isSomeChecked: a,
|
|
2816
2855
|
toggleRow: r,
|
|
2817
2856
|
toggleAll: i,
|
|
2818
|
-
selectRow: (
|
|
2819
|
-
|
|
2857
|
+
selectRow: (c, g) => {
|
|
2858
|
+
yt(c, o.value, e.rowKey) || (o.value = [...o.value, c], n("rowSelected", c, g));
|
|
2820
2859
|
},
|
|
2821
|
-
deselectRow: (
|
|
2822
|
-
const C = re(
|
|
2823
|
-
o.value = o.value.filter(
|
|
2860
|
+
deselectRow: (c, g) => {
|
|
2861
|
+
const C = re(c, g, e.rowKey);
|
|
2862
|
+
o.value = o.value.filter(
|
|
2863
|
+
(R, E) => re(R, E, e.rowKey) !== C
|
|
2864
|
+
), n("rowDeselected", c, g);
|
|
2824
2865
|
},
|
|
2825
2866
|
selectAll: () => {
|
|
2826
2867
|
o.value = [...e.rows], n("allRowsSelected", o.value);
|
|
@@ -2841,173 +2882,189 @@ function Hs(e, n) {
|
|
|
2841
2882
|
}
|
|
2842
2883
|
};
|
|
2843
2884
|
}
|
|
2844
|
-
function
|
|
2845
|
-
const o =
|
|
2885
|
+
function Ns(e, n, t = q(!1)) {
|
|
2886
|
+
const o = q(!1), s = q(!1);
|
|
2846
2887
|
let l = !1;
|
|
2847
2888
|
const a = () => {
|
|
2848
|
-
if (l)
|
|
2849
|
-
|
|
2850
|
-
|
|
2851
|
-
|
|
2852
|
-
|
|
2853
|
-
const
|
|
2854
|
-
|
|
2855
|
-
|
|
2856
|
-
|
|
2857
|
-
|
|
2858
|
-
|
|
2859
|
-
|
|
2860
|
-
|
|
2861
|
-
|
|
2862
|
-
|
|
2863
|
-
|
|
2864
|
-
|
|
2865
|
-
|
|
2866
|
-
|
|
2867
|
-
|
|
2868
|
-
const W = q.closest("thead") !== null;
|
|
2869
|
-
q.style.zIndex = W ? "4" : "3";
|
|
2889
|
+
if (l) return;
|
|
2890
|
+
const S = e.value?.parentElement, k = e.value;
|
|
2891
|
+
if (!S || !k) return;
|
|
2892
|
+
const w = S.scrollLeft, p = S.scrollWidth - S.clientWidth;
|
|
2893
|
+
o.value = w > 0, s.value = w < p - 1;
|
|
2894
|
+
const A = Array.from(k.querySelectorAll(".vs-sticky-left")), P = Array.from(k.querySelectorAll(".vs-sticky-right"));
|
|
2895
|
+
if (w > 0 ? A.forEach((L) => {
|
|
2896
|
+
const O = L.closest("thead") !== null;
|
|
2897
|
+
L.style.zIndex = O ? "5" : "4";
|
|
2898
|
+
}) : A.forEach((L) => {
|
|
2899
|
+
const O = L.closest("thead") !== null;
|
|
2900
|
+
L.style.zIndex = O ? "4" : "3";
|
|
2901
|
+
}), P.length) {
|
|
2902
|
+
const L = P[0], O = L ? k.offsetWidth - L.offsetLeft : k.offsetWidth;
|
|
2903
|
+
S.scrollWidth - (w + S.clientWidth) <= O + 5 ? P.forEach((M) => {
|
|
2904
|
+
const N = M.closest("thead") !== null;
|
|
2905
|
+
M.style.zIndex = N ? "5" : "4";
|
|
2906
|
+
}) : P.forEach((M) => {
|
|
2907
|
+
const N = M.closest("thead") !== null;
|
|
2908
|
+
M.style.zIndex = N ? "4" : "3";
|
|
2870
2909
|
});
|
|
2871
2910
|
}
|
|
2872
2911
|
}, r = () => {
|
|
2873
|
-
const
|
|
2874
|
-
return
|
|
2875
|
-
}, i = (
|
|
2876
|
-
const
|
|
2877
|
-
return
|
|
2878
|
-
},
|
|
2879
|
-
const
|
|
2880
|
-
return
|
|
2881
|
-
const
|
|
2882
|
-
|
|
2883
|
-
}),
|
|
2884
|
-
}, v = (
|
|
2885
|
-
for (const
|
|
2886
|
-
if (
|
|
2887
|
-
if (
|
|
2912
|
+
const S = e.value;
|
|
2913
|
+
return S ? Array.from(S.querySelectorAll("tr")) : [];
|
|
2914
|
+
}, i = (S) => S.filter((k) => k.closest("tbody")), u = (S) => {
|
|
2915
|
+
const k = S[0];
|
|
2916
|
+
return k ? Array.from(k.children) : [];
|
|
2917
|
+
}, d = (S) => {
|
|
2918
|
+
const k = /* @__PURE__ */ new Map();
|
|
2919
|
+
return S.forEach((w, p) => {
|
|
2920
|
+
const A = w.getAttribute("data-field");
|
|
2921
|
+
A && k.set(A, p);
|
|
2922
|
+
}), k;
|
|
2923
|
+
}, v = (S) => {
|
|
2924
|
+
for (const k of S)
|
|
2925
|
+
if (k.children?.length) {
|
|
2926
|
+
if (k.children.some((w) => w.sticky === "left" || w.sticky === "right"))
|
|
2888
2927
|
return !0;
|
|
2889
|
-
} else if (
|
|
2928
|
+
} else if (k.sticky === "left" || k.sticky === "right")
|
|
2890
2929
|
return !0;
|
|
2891
2930
|
return !1;
|
|
2892
|
-
}, m = (
|
|
2893
|
-
const
|
|
2894
|
-
return v(
|
|
2895
|
-
(
|
|
2896
|
-
}),
|
|
2897
|
-
if (
|
|
2898
|
-
|
|
2899
|
-
const
|
|
2900
|
-
if (
|
|
2901
|
-
|
|
2902
|
-
|
|
2903
|
-
q === "left" && R.push(K), q === "right" && T.push(K);
|
|
2931
|
+
}, m = (S, k, w) => {
|
|
2932
|
+
const p = [], A = [];
|
|
2933
|
+
return v(w) && S.forEach((L, O) => {
|
|
2934
|
+
(L.classList.contains("vs-expand-column") || L.classList.contains("vs-checkbox-column")) && p.push(O);
|
|
2935
|
+
}), w.forEach((L) => {
|
|
2936
|
+
if (L.children?.length)
|
|
2937
|
+
L.children.forEach((O) => {
|
|
2938
|
+
const H = k.get(O.field);
|
|
2939
|
+
if (H === void 0) return;
|
|
2940
|
+
const M = L.sticky || O.sticky;
|
|
2941
|
+
M === "left" && p.push(H), M === "right" && A.push(H);
|
|
2904
2942
|
});
|
|
2905
2943
|
else {
|
|
2906
|
-
const O =
|
|
2907
|
-
if (O === void 0)
|
|
2908
|
-
|
|
2909
|
-
|
|
2910
|
-
K === "left" && R.push(O), K === "right" && T.push(O);
|
|
2944
|
+
const O = k.get(L.field);
|
|
2945
|
+
if (O === void 0) return;
|
|
2946
|
+
const H = L.sticky;
|
|
2947
|
+
H === "left" && p.push(O), H === "right" && A.push(O);
|
|
2911
2948
|
}
|
|
2912
2949
|
}), {
|
|
2913
|
-
left: [...new Set(
|
|
2914
|
-
right: [...new Set(
|
|
2950
|
+
left: [...new Set(p)].sort((L, O) => L - O),
|
|
2951
|
+
right: [...new Set(A)].sort((L, O) => O - L)
|
|
2915
2952
|
};
|
|
2916
|
-
}, f = (
|
|
2917
|
-
const
|
|
2918
|
-
let
|
|
2919
|
-
return
|
|
2920
|
-
|
|
2921
|
-
const
|
|
2922
|
-
|
|
2923
|
-
}),
|
|
2924
|
-
},
|
|
2925
|
-
const
|
|
2926
|
-
return
|
|
2927
|
-
|
|
2928
|
-
}), { firstChild:
|
|
2929
|
-
},
|
|
2930
|
-
if (
|
|
2931
|
-
if (
|
|
2932
|
-
const
|
|
2933
|
-
if (
|
|
2934
|
-
const
|
|
2935
|
-
return
|
|
2953
|
+
}, f = (S, k) => {
|
|
2954
|
+
const w = /* @__PURE__ */ new Map();
|
|
2955
|
+
let p = 0;
|
|
2956
|
+
return k.forEach((A) => {
|
|
2957
|
+
w.set(A, p);
|
|
2958
|
+
const P = S[A];
|
|
2959
|
+
P && (p += P.offsetWidth);
|
|
2960
|
+
}), w;
|
|
2961
|
+
}, h = (S) => {
|
|
2962
|
+
const k = /* @__PURE__ */ new Map(), w = /* @__PURE__ */ new Map();
|
|
2963
|
+
return S.forEach((p) => {
|
|
2964
|
+
p.children?.length && (k.set(p.label, p.children[0]?.field), w.set(p.label, p.children[p.children.length - 1]?.field));
|
|
2965
|
+
}), { firstChild: k, lastChild: w };
|
|
2966
|
+
}, c = (S, k, w, p) => {
|
|
2967
|
+
if (S) {
|
|
2968
|
+
if (S.startsWith("group-")) {
|
|
2969
|
+
const A = S.replace(/^group-/, "");
|
|
2970
|
+
if (p === "left") {
|
|
2971
|
+
const P = w.firstChild.get(A);
|
|
2972
|
+
return P ? k.get(P) : void 0;
|
|
2936
2973
|
} else {
|
|
2937
|
-
const
|
|
2938
|
-
return
|
|
2974
|
+
const P = w.lastChild.get(A);
|
|
2975
|
+
return P ? k.get(P) : void 0;
|
|
2939
2976
|
}
|
|
2940
2977
|
}
|
|
2941
|
-
return
|
|
2978
|
+
return k.get(S);
|
|
2942
2979
|
}
|
|
2943
|
-
}, g = (
|
|
2944
|
-
|
|
2945
|
-
Array.from(
|
|
2946
|
-
|
|
2980
|
+
}, g = (S) => {
|
|
2981
|
+
S.forEach((k) => {
|
|
2982
|
+
Array.from(k.children).forEach((p) => {
|
|
2983
|
+
p.style.position = "", p.style.left = "", p.style.right = "", p.style.zIndex = "", p.style.background = "", p.style.minWidth = "", p.style.width = "", p.classList.remove("vs-sticky-left", "vs-sticky-right");
|
|
2947
2984
|
});
|
|
2948
2985
|
});
|
|
2949
|
-
}, C = (
|
|
2986
|
+
}, C = (S, k, w, p, A, P) => {
|
|
2950
2987
|
if (!l) {
|
|
2951
2988
|
l = !0;
|
|
2952
2989
|
try {
|
|
2953
|
-
|
|
2954
|
-
const O = Array.from(
|
|
2955
|
-
O.forEach((
|
|
2956
|
-
const
|
|
2957
|
-
if (!
|
|
2958
|
-
|
|
2959
|
-
|
|
2960
|
-
|
|
2961
|
-
|
|
2962
|
-
|
|
2963
|
-
|
|
2990
|
+
S.forEach((L) => {
|
|
2991
|
+
const O = Array.from(L.children), H = L.closest("thead") !== null;
|
|
2992
|
+
O.forEach((M) => {
|
|
2993
|
+
const N = M.getAttribute("data-field");
|
|
2994
|
+
if (!N) return;
|
|
2995
|
+
const K = c(
|
|
2996
|
+
N,
|
|
2997
|
+
A,
|
|
2998
|
+
P,
|
|
2999
|
+
p
|
|
3000
|
+
);
|
|
3001
|
+
if (K === void 0 || !k.includes(K)) return;
|
|
3002
|
+
const I = w.get(K) || 0, ve = H ? "4" : "3";
|
|
3003
|
+
M.style.position = "sticky", M.style[p] = `${I}px`, M.style.zIndex = ve, M.classList.add(`vs-sticky-${p}`), M.style.background = "var(--vs-table-bg, #fff)";
|
|
2964
3004
|
});
|
|
2965
3005
|
});
|
|
2966
3006
|
} finally {
|
|
2967
3007
|
l = !1;
|
|
2968
3008
|
}
|
|
2969
3009
|
}
|
|
2970
|
-
},
|
|
2971
|
-
if (l)
|
|
2972
|
-
|
|
2973
|
-
|
|
2974
|
-
|
|
2975
|
-
|
|
2976
|
-
const
|
|
2977
|
-
if (
|
|
2978
|
-
|
|
2979
|
-
|
|
2980
|
-
|
|
2981
|
-
|
|
2982
|
-
|
|
3010
|
+
}, R = async () => {
|
|
3011
|
+
if (l) return;
|
|
3012
|
+
const S = r();
|
|
3013
|
+
if (!S.length) return;
|
|
3014
|
+
const k = i(S);
|
|
3015
|
+
if (!k.length) return;
|
|
3016
|
+
const w = u(k);
|
|
3017
|
+
if (w.length === 1 || k[0]?.querySelector(".vs-no-data") != null) return;
|
|
3018
|
+
const A = d(w), P = m(w, A, n.value);
|
|
3019
|
+
if (g(S), P.left.length > 0 || P.right.length > 0) {
|
|
3020
|
+
const L = f(w, P.left), O = f(w, P.right), H = h(n.value);
|
|
3021
|
+
C(
|
|
3022
|
+
S,
|
|
3023
|
+
P.left,
|
|
3024
|
+
L,
|
|
3025
|
+
"left",
|
|
3026
|
+
A,
|
|
3027
|
+
H
|
|
3028
|
+
), C(
|
|
3029
|
+
S,
|
|
3030
|
+
P.right,
|
|
3031
|
+
O,
|
|
3032
|
+
"right",
|
|
3033
|
+
A,
|
|
3034
|
+
H
|
|
3035
|
+
);
|
|
2983
3036
|
}
|
|
2984
3037
|
a();
|
|
2985
3038
|
}, E = async () => {
|
|
2986
3039
|
l || (await oe(), setTimeout(() => {
|
|
2987
3040
|
try {
|
|
2988
|
-
|
|
2989
|
-
} catch (
|
|
2990
|
-
console.warn("[useStickyColumns] refreshSticky failed:",
|
|
3041
|
+
R();
|
|
3042
|
+
} catch (S) {
|
|
3043
|
+
console.warn("[useStickyColumns] refreshSticky failed:", S);
|
|
2991
3044
|
}
|
|
2992
3045
|
}, 150));
|
|
2993
3046
|
}, V = () => {
|
|
2994
3047
|
e.value?.parentElement?.addEventListener("scroll", a), a();
|
|
2995
|
-
},
|
|
3048
|
+
}, T = () => {
|
|
2996
3049
|
e.value?.parentElement?.removeEventListener("scroll", a);
|
|
2997
3050
|
};
|
|
2998
3051
|
Re(async () => {
|
|
2999
3052
|
await oe(), setTimeout(() => {
|
|
3000
3053
|
E();
|
|
3001
3054
|
}, 300), V();
|
|
3002
|
-
}), He(
|
|
3003
|
-
let
|
|
3004
|
-
return Y(
|
|
3005
|
-
|
|
3006
|
-
|
|
3007
|
-
|
|
3008
|
-
|
|
3055
|
+
}), He(T);
|
|
3056
|
+
let W = null;
|
|
3057
|
+
return Y(
|
|
3058
|
+
[n, t],
|
|
3059
|
+
() => {
|
|
3060
|
+
W && clearTimeout(W), W = setTimeout(() => {
|
|
3061
|
+
E();
|
|
3062
|
+
}, 100);
|
|
3063
|
+
},
|
|
3064
|
+
{ deep: !0 }
|
|
3065
|
+
), { hasLeftShadow: o, hasRightShadow: s, refreshSticky: E };
|
|
3009
3066
|
}
|
|
3010
|
-
function
|
|
3067
|
+
function Ws(e, n) {
|
|
3011
3068
|
let t = null, o = null;
|
|
3012
3069
|
const s = () => {
|
|
3013
3070
|
const a = e.value;
|
|
@@ -3065,7 +3122,7 @@ const Ks = { class: "vs-datatable" }, zs = {
|
|
|
3065
3122
|
},
|
|
3066
3123
|
emits: ["update:serverItemsLength", "update:serverOptions", "pageUpdated", "inputTyped", "update:sort", "sortChanged", "update:itemSelected", "rowSelected", "rowDeselected", "allRowsSelected", "rowClick", "tableBeforeMount", "tableMounted", "tableUnmounted", "dataLoaded", "dataError", "update:expanded", "expandRow", "collapseRow", "filterChange"],
|
|
3067
3124
|
setup(e, { expose: n, emit: t }) {
|
|
3068
|
-
const o = e, s =
|
|
3125
|
+
const o = e, s = gt(o.rows);
|
|
3069
3126
|
Y(
|
|
3070
3127
|
() => o.rows,
|
|
3071
3128
|
(ee) => {
|
|
@@ -3073,27 +3130,27 @@ const Ks = { class: "vs-datatable" }, zs = {
|
|
|
3073
3130
|
},
|
|
3074
3131
|
{ deep: !1 }
|
|
3075
3132
|
);
|
|
3076
|
-
const l = t, a =
|
|
3077
|
-
page:
|
|
3133
|
+
const l = t, a = It(), r = F(() => !!a.onRowClick), i = q(), u = q(), {
|
|
3134
|
+
page: d,
|
|
3078
3135
|
rowsPerPage: v,
|
|
3079
3136
|
totalRecords: m,
|
|
3080
3137
|
recordRange: f,
|
|
3081
|
-
handlePageChange:
|
|
3082
|
-
handleRowsPerPage:
|
|
3138
|
+
handlePageChange: h,
|
|
3139
|
+
handleRowsPerPage: c,
|
|
3083
3140
|
paginatedRows: g,
|
|
3084
3141
|
sortHelpers: C,
|
|
3085
|
-
searchQuery:
|
|
3142
|
+
searchQuery: R,
|
|
3086
3143
|
onInputTyped: E,
|
|
3087
3144
|
isRowExpanded: V,
|
|
3088
|
-
toggleRowExpansion:
|
|
3089
|
-
setRowLoading:
|
|
3090
|
-
isRowLoading:
|
|
3091
|
-
filters:
|
|
3092
|
-
setFilter:
|
|
3093
|
-
clearFilter:
|
|
3094
|
-
tableRef:
|
|
3095
|
-
tableContainer:
|
|
3096
|
-
tableResponsiveRef:
|
|
3145
|
+
toggleRowExpansion: T,
|
|
3146
|
+
setRowLoading: W,
|
|
3147
|
+
isRowLoading: S,
|
|
3148
|
+
filters: k,
|
|
3149
|
+
setFilter: w,
|
|
3150
|
+
clearFilter: p,
|
|
3151
|
+
tableRef: A,
|
|
3152
|
+
tableContainer: P,
|
|
3153
|
+
tableResponsiveRef: L,
|
|
3097
3154
|
refresh: O
|
|
3098
3155
|
} = Bs(
|
|
3099
3156
|
o,
|
|
@@ -3101,19 +3158,19 @@ const Ks = { class: "vs-datatable" }, zs = {
|
|
|
3101
3158
|
{ header: o.stickyHeader, footer: o.stickyFooter },
|
|
3102
3159
|
s
|
|
3103
3160
|
), {
|
|
3104
|
-
selectedItems:
|
|
3105
|
-
isItemSelectedControlled:
|
|
3106
|
-
isAllChecked:
|
|
3107
|
-
isSomeChecked:
|
|
3108
|
-
toggleAll:
|
|
3161
|
+
selectedItems: H,
|
|
3162
|
+
isItemSelectedControlled: M,
|
|
3163
|
+
isAllChecked: N,
|
|
3164
|
+
isSomeChecked: K,
|
|
3165
|
+
toggleAll: I,
|
|
3109
3166
|
toggleRow: ve
|
|
3110
3167
|
} = Hs(o, l), Ze = F(
|
|
3111
|
-
() =>
|
|
3112
|
-
), { hasLeftShadow:
|
|
3113
|
-
|
|
3168
|
+
() => Bt(o.columns, M.value, o.expandable)
|
|
3169
|
+
), { hasLeftShadow: Vt, hasRightShadow: Lt, refreshSticky: $e } = Ns(
|
|
3170
|
+
A,
|
|
3114
3171
|
F(() => o.columns)
|
|
3115
3172
|
);
|
|
3116
|
-
return
|
|
3173
|
+
return Ws(A, $e), Y(
|
|
3117
3174
|
() => g.value,
|
|
3118
3175
|
() => {
|
|
3119
3176
|
oe(() => {
|
|
@@ -3130,8 +3187,8 @@ const Ks = { class: "vs-datatable" }, zs = {
|
|
|
3130
3187
|
},
|
|
3131
3188
|
{ deep: !0 }
|
|
3132
3189
|
), n({
|
|
3133
|
-
toggleRowExpansion:
|
|
3134
|
-
setRowLoading:
|
|
3190
|
+
toggleRowExpansion: T,
|
|
3191
|
+
setRowLoading: W,
|
|
3135
3192
|
refreshSticky: $e
|
|
3136
3193
|
}), Re(async () => {
|
|
3137
3194
|
setTimeout(() => {
|
|
@@ -3142,15 +3199,15 @@ const Ks = { class: "vs-datatable" }, zs = {
|
|
|
3142
3199
|
} catch (ee) {
|
|
3143
3200
|
l("dataError", ee);
|
|
3144
3201
|
}
|
|
3145
|
-
}),
|
|
3202
|
+
}), mt(() => {
|
|
3146
3203
|
l("tableUnmounted");
|
|
3147
|
-
}),
|
|
3204
|
+
}), qt(() => {
|
|
3148
3205
|
l("tableBeforeMount");
|
|
3149
|
-
}), (ee, U) => (y(),
|
|
3206
|
+
}), (ee, U) => (y(), x("div", Ks, [
|
|
3150
3207
|
ne(Cs, {
|
|
3151
3208
|
"show-search": e.showSearch,
|
|
3152
|
-
"search-query": $(
|
|
3153
|
-
"onUpdate:searchQuery": U[0] || (U[0] = (Z) => Fe(
|
|
3209
|
+
"search-query": $(R),
|
|
3210
|
+
"onUpdate:searchQuery": U[0] || (U[0] = (Z) => Fe(R) ? R.value = Z : null),
|
|
3154
3211
|
onSearch: $(E),
|
|
3155
3212
|
"search-placeholder": e.searchPlaceholder,
|
|
3156
3213
|
"search-class": e.searchClass
|
|
@@ -3163,25 +3220,25 @@ const Ks = { class: "vs-datatable" }, zs = {
|
|
|
3163
3220
|
]),
|
|
3164
3221
|
_: 3
|
|
3165
3222
|
}, 8, ["show-search", "search-query", "onSearch", "search-placeholder", "search-class"]),
|
|
3166
|
-
|
|
3223
|
+
b("div", {
|
|
3167
3224
|
ref_key: "tableContainer",
|
|
3168
|
-
ref:
|
|
3225
|
+
ref: P,
|
|
3169
3226
|
class: G(["vs-table-container vs-position-relative vs-overflow-auto", [
|
|
3170
3227
|
e.containerClass,
|
|
3171
3228
|
{
|
|
3172
|
-
"has-left-shadow": $(
|
|
3173
|
-
"has-right-shadow": $(
|
|
3229
|
+
"has-left-shadow": $(Vt),
|
|
3230
|
+
"has-right-shadow": $(Lt)
|
|
3174
3231
|
}
|
|
3175
3232
|
]])
|
|
3176
3233
|
}, [
|
|
3177
|
-
|
|
3234
|
+
b("div", {
|
|
3178
3235
|
ref_key: "tableResponsiveRef",
|
|
3179
|
-
ref:
|
|
3236
|
+
ref: L,
|
|
3180
3237
|
class: G(["vs-table-wrapper", { "vs-sticky-header-wrapper": e.stickyHeader }])
|
|
3181
3238
|
}, [
|
|
3182
|
-
|
|
3239
|
+
b("table", {
|
|
3183
3240
|
ref_key: "tableRef",
|
|
3184
|
-
ref:
|
|
3241
|
+
ref: A,
|
|
3185
3242
|
class: G(["vs-table", e.tableClass])
|
|
3186
3243
|
}, [
|
|
3187
3244
|
ne(Xo, {
|
|
@@ -3189,21 +3246,21 @@ const Ks = { class: "vs-datatable" }, zs = {
|
|
|
3189
3246
|
ref: i,
|
|
3190
3247
|
columns: e.columns,
|
|
3191
3248
|
expandable: e.expandable,
|
|
3192
|
-
"is-item-selected-controlled": $(
|
|
3193
|
-
"is-all-checked": $(
|
|
3194
|
-
"is-some-checked": $(
|
|
3249
|
+
"is-item-selected-controlled": $(M),
|
|
3250
|
+
"is-all-checked": $(N),
|
|
3251
|
+
"is-some-checked": $(K),
|
|
3195
3252
|
tablename: e.tablename,
|
|
3196
3253
|
"sort-helpers": $(C),
|
|
3197
|
-
filters: $(
|
|
3198
|
-
"onUpdate:filters": U[1] || (U[1] = (Z) => Fe(
|
|
3254
|
+
filters: $(k),
|
|
3255
|
+
"onUpdate:filters": U[1] || (U[1] = (Z) => Fe(k) ? k.value = Z : null),
|
|
3199
3256
|
rows: e.rows,
|
|
3200
3257
|
"header-class": e.headerClass,
|
|
3201
|
-
onToggleAll: $(
|
|
3258
|
+
onToggleAll: $(I),
|
|
3202
3259
|
onApplyFilter: U[2] || (U[2] = (Z, de) => {
|
|
3203
|
-
$(
|
|
3260
|
+
$(w)(Z, de), d.value = 1;
|
|
3204
3261
|
}),
|
|
3205
3262
|
onClearFilter: U[3] || (U[3] = (Z) => {
|
|
3206
|
-
$(
|
|
3263
|
+
$(p)(Z), d.value = 1;
|
|
3207
3264
|
})
|
|
3208
3265
|
}, Te({ _: 2 }, [
|
|
3209
3266
|
Q(ee.$slots, (Z, de) => ({
|
|
@@ -3215,7 +3272,7 @@ const Ks = { class: "vs-datatable" }, zs = {
|
|
|
3215
3272
|
]), 1032, ["columns", "expandable", "is-item-selected-controlled", "is-all-checked", "is-some-checked", "tablename", "sort-helpers", "filters", "rows", "header-class", "onToggleAll"]),
|
|
3216
3273
|
ne(vs, {
|
|
3217
3274
|
ref_key: "bodyRef",
|
|
3218
|
-
ref:
|
|
3275
|
+
ref: u,
|
|
3219
3276
|
loading: e.loading,
|
|
3220
3277
|
"loading-text": e.loadingText,
|
|
3221
3278
|
"no-data-text": e.noDataText,
|
|
@@ -3223,8 +3280,8 @@ const Ks = { class: "vs-datatable" }, zs = {
|
|
|
3223
3280
|
"paginated-rows": $(g),
|
|
3224
3281
|
"total-columns": Ze.value,
|
|
3225
3282
|
expandable: e.expandable,
|
|
3226
|
-
"is-item-selected-controlled": $(
|
|
3227
|
-
"selected-items": $(
|
|
3283
|
+
"is-item-selected-controlled": $(M),
|
|
3284
|
+
"selected-items": $(H),
|
|
3228
3285
|
tablename: e.tablename,
|
|
3229
3286
|
columns: e.columns,
|
|
3230
3287
|
"row-key": e.rowKey,
|
|
@@ -3232,12 +3289,12 @@ const Ks = { class: "vs-datatable" }, zs = {
|
|
|
3232
3289
|
"cell-class": e.cellClass,
|
|
3233
3290
|
"has-row-click": r.value,
|
|
3234
3291
|
"get-row-key": $(re),
|
|
3235
|
-
"get-value": $(
|
|
3292
|
+
"get-value": $(Mt),
|
|
3236
3293
|
"is-row-expanded": $(V),
|
|
3237
|
-
"is-row-loading": $(
|
|
3238
|
-
"toggle-row-expansion": $(
|
|
3294
|
+
"is-row-loading": $(S),
|
|
3295
|
+
"toggle-row-expansion": $(T),
|
|
3239
3296
|
"toggle-row": $(ve),
|
|
3240
|
-
"is-row-selected": $(
|
|
3297
|
+
"is-row-selected": $(yt),
|
|
3241
3298
|
onRowClick: U[4] || (U[4] = (Z, de) => ee.$emit("rowClick", Z, de))
|
|
3242
3299
|
}, Te({ _: 2 }, [
|
|
3243
3300
|
Q(ee.$slots, (Z, de) => ({
|
|
@@ -3252,32 +3309,32 @@ const Ks = { class: "vs-datatable" }, zs = {
|
|
|
3252
3309
|
columns: e.columns,
|
|
3253
3310
|
rows: $(g),
|
|
3254
3311
|
expandable: e.expandable,
|
|
3255
|
-
"is-item-selected-controlled": $(
|
|
3256
|
-
}, null, 8, ["columns", "rows", "expandable", "is-item-selected-controlled"])) :
|
|
3312
|
+
"is-item-selected-controlled": $(M)
|
|
3313
|
+
}, null, 8, ["columns", "rows", "expandable", "is-item-selected-controlled"])) : D("", !0)
|
|
3257
3314
|
], 2)
|
|
3258
3315
|
], 2)
|
|
3259
3316
|
], 2),
|
|
3260
|
-
e.showPagination ? (y(),
|
|
3261
|
-
|
|
3262
|
-
ne(
|
|
3317
|
+
e.showPagination ? (y(), x("div", zs, [
|
|
3318
|
+
b("div", js, [
|
|
3319
|
+
ne(nn, {
|
|
3263
3320
|
modelValue: $(v),
|
|
3264
3321
|
"onUpdate:modelValue": U[5] || (U[5] = (Z) => Fe(v) ? v.value = Z : null),
|
|
3265
|
-
onRowsPerPageChanged: $(
|
|
3322
|
+
onRowsPerPageChanged: $(c)
|
|
3266
3323
|
}, null, 8, ["modelValue", "onRowsPerPageChanged"]),
|
|
3267
|
-
U[7] || (U[7] =
|
|
3268
|
-
|
|
3324
|
+
U[7] || (U[7] = b("div", { class: "vs-divider" }, null, -1)),
|
|
3325
|
+
b("div", Us, B($(f).start < 1 ? 0 : $(f).start) + " - " + B($(f).end) + " of " + B($(m)) + " " + B(e.entriesText), 1)
|
|
3269
3326
|
]),
|
|
3270
|
-
ne(
|
|
3271
|
-
modelValue: $(
|
|
3272
|
-
"onUpdate:modelValue": U[6] || (U[6] = (Z) => Fe(
|
|
3327
|
+
ne(Gt, {
|
|
3328
|
+
modelValue: $(d),
|
|
3329
|
+
"onUpdate:modelValue": U[6] || (U[6] = (Z) => Fe(d) ? d.value = Z : null),
|
|
3273
3330
|
totalRecords: $(m),
|
|
3274
3331
|
rowsPerPage: $(v),
|
|
3275
3332
|
maxVisible: e.maxVisiblePages,
|
|
3276
3333
|
tablename: e.tablename,
|
|
3277
3334
|
class: G(e.paginationClass),
|
|
3278
|
-
onPageChanged: $(
|
|
3335
|
+
onPageChanged: $(h)
|
|
3279
3336
|
}, null, 8, ["modelValue", "totalRecords", "rowsPerPage", "maxVisible", "tablename", "class", "onPageChanged"])
|
|
3280
|
-
])) :
|
|
3337
|
+
])) : D("", !0)
|
|
3281
3338
|
]));
|
|
3282
3339
|
}
|
|
3283
3340
|
}), Xs = /* @__PURE__ */ ae(Zs, [["__scopeId", "data-v-397a4bba"]]), Ys = {
|